From 6e9a21015b1c08dd4214d10a58e21707a451991e Mon Sep 17 00:00:00 2001
From: Apertis CI <devel@lists.apertis.org>
Date: Tue, 28 Mar 2023 11:13:56 +0000
Subject: [PATCH] Import Upstream version 21.1.7

---
 ChangeLog                                     | 18381 +++++++--
 Makefile.am                                   |    22 +-
 Makefile.in                                   |   114 +-
 README.md                                     |     2 +-
 Xext/Makefile.in                              |    49 +-
 Xext/geext.c                                  |     8 +-
 Xext/hashtable.c                              |     2 +-
 Xext/hashtable.h                              |     2 +-
 Xext/meson.build                              |     4 +-
 Xext/saver.c                                  |     8 +-
 Xext/shm.c                                    |     6 +-
 Xext/vidmode.c                                |     4 +-
 Xext/xres.c                                   |    10 +-
 Xext/xselinux_ext.c                           |    23 +-
 Xext/xselinux_hooks.c                         |    10 +-
 Xext/xselinux_label.c                         |    10 +-
 Xext/xselinuxint.h                            |     2 +-
 Xext/xtest.c                                  |    10 +-
 Xext/xvmain.c                                 |     8 +-
 Xi/Makefile.in                                |    49 +-
 Xi/closedev.c                                 |     2 +-
 Xi/exevents.c                                 |   400 +-
 Xi/exglobals.h                                |     3 -
 Xi/extinit.c                                  |   142 +-
 Xi/grabdev.c                                  |     2 +-
 Xi/selectev.c                                 |     4 +-
 Xi/xichangehierarchy.h                        |     2 +-
 Xi/xipassivegrab.c                            |    51 +-
 Xi/xiproperty.c                               |    15 +-
 Xi/xiquerydevice.c                            |    57 +-
 Xi/xiselectev.c                               |    66 +-
 aclocal.m4                                    |    81 +-
 compile                                       |     2 +-
 composite/Makefile.in                         |    49 +-
 composite/compalloc.c                         |     5 +-
 composite/compinit.c                          |    52 +-
 composite/compint.h                           |     2 -
 composite/compwindow.c                        |    17 +-
 composite/meson.build                         |     4 +-
 config.guess                                  |  1206 +-
 config.sub                                    |   669 +-
 config/Makefile.in                            |    49 +-
 config/udev.c                                 |   102 +-
 configure                                     | 30998 ++++++++--------
 configure.ac                                  |   268 +-
 damageext/Makefile.in                         |    49 +-
 damageext/damageext.c                         |     6 +-
 dbe/Makefile.in                               |    49 +-
 dbe/dbe.c                                     |     4 +-
 dbe/dbestruct.h                               |     2 +-
 dbe/meson.build                               |     4 +-
 depcomp                                       |     2 +-
 dix/Makefile.am                               |    19 +-
 dix/Makefile.in                               |   110 +-
 dix/Xserver-dtrace.h.in                       |    99 -
 dix/colormap.c                                |     4 +-
 dix/cursor.c                                  |     1 +
 dix/devices.c                                 |    59 +-
 dix/dispatch.c                                |   148 +-
 dix/dixfonts.c                                |     2 +-
 dix/enterleave.c                              |     6 +-
 dix/eventconvert.c                            |   164 +
 dix/events.c                                  |   378 +-
 dix/gestures.c                                |   362 +
 dix/getevents.c                               |   211 +-
 dix/globals.c                                 |    14 +-
 dix/grabs.c                                   |     7 +
 dix/inpututils.c                              |    72 +-
 dix/main.c                                    |    10 +-
 dix/meson.build                               |    15 +-
 dix/pixmap.c                                  |    53 +-
 dix/privates.c                                |    37 +-
 dix/property.c                                |     5 +-
 dix/ptrveloc.c                                |     6 +-
 dix/region.c                                  |     7 +-
 dix/resource.c                                |    14 +-
 dix/swaprep.c                                 |     4 +-
 dix/touch.c                                   |    87 +-
 dix/window.c                                  |    96 +-
 doc/Makefile.in                               |    49 +-
 doc/Xserver-spec.xml                          |    27 +-
 doc/dtrace/Makefile.in                        |    47 +-
 doc/dtrace/Xserver-DTrace.xml                 |     2 +-
 doc/dtrace/meson.build                        |    64 +
 doc/meson.build                               |    39 +
 dri3/Makefile.am                              |     4 +-
 dri3/Makefile.in                              |    53 +-
 dri3/dri3.c                                   |     4 -
 dri3/dri3_priv.h                              |     1 +
 dri3/dri3_request.c                           |     4 -
 dri3/dri3_screen.c                            |     4 -
 dri3/meson.build                              |     5 +-
 exa/Makefile.in                               |    49 +-
 exa/exa.c                                     |     2 +-
 exa/exa.h                                     |     4 +-
 exa/exa_accel.c                               |     2 +-
 exa/exa_mixed.c                               |     4 +-
 exa/exa_offscreen.c                           |    13 +-
 exa/exa_priv.h                                |     6 +-
 exa/exa_unaccel.c                             |     8 +-
 fb/Makefile.in                                |    49 +-
 fb/fbbltone.c                                 |     2 +-
 fb/fbcmap_mi.c                                |     2 +-
 fb/fbpixmap.c                                 |     2 +-
 fb/meson.build                                |     4 +-
 glamor/Makefile.in                            |    49 +-
 glamor/glamor.c                               |   247 +-
 glamor/glamor.h                               |     5 +-
 glamor/glamor_composite_glyphs.c              |    15 +-
 glamor/glamor_egl.c                           |    96 +-
 glamor/glamor_fbo.c                           |    55 +-
 glamor/glamor_font.c                          |     4 +-
 glamor/glamor_gradient.c                      |     6 +-
 glamor/glamor_largepixmap.c                   |     2 +-
 glamor/glamor_picture.c                       |    31 +-
 glamor/glamor_pixmap.c                        |     2 +-
 glamor/glamor_priv.h                          |    71 +-
 glamor/glamor_program.c                       |    23 +-
 glamor/glamor_rects.c                         |     6 +-
 glamor/glamor_render.c                        |    24 +-
 glamor/glamor_spans.c                         |    20 +-
 glamor/glamor_transfer.c                      |    50 +-
 glamor/glamor_transfer.h                      |     3 -
 glamor/glamor_transform.c                     |     7 +-
 glamor/glamor_utils.h                         |    63 +-
 glamor/glamor_vbo.c                           |     2 +-
 glamor/glamor_xv.c                            |   182 +-
 glx/Makefile.in                               |    49 +-
 glx/createcontext.c                           |    16 +-
 glx/extension_string.c                        |     9 +-
 glx/extension_string.h                        |     1 +
 glx/glxcmds.c                                 |    59 +-
 glx/glxcontext.h                              |     5 +
 glx/glxdricommon.c                            |    30 +
 glx/glxext.h                                  |     5 +
 glx/indirect_dispatch_swap.c                  |    12 -
 glx/indirect_util.c                           |     2 +-
 glx/meson.build                               |     7 +-
 glx/vndcmds.c                                 |     3 +
 hw/Makefile.am                                |    14 +-
 hw/Makefile.in                                |    57 +-
 hw/dmx/Makefile.am                            |    86 -
 hw/dmx/Makefile.in                            |  1206 -
 hw/dmx/config/Canvas.c                        |   165 -
 hw/dmx/config/Canvas.h                        |    55 -
 hw/dmx/config/CanvasP.h                       |    65 -
 hw/dmx/config/Makefile.am                     |    71 -
 hw/dmx/config/Makefile.in                     |  1229 -
 hw/dmx/config/TODO                            |     7 -
 hw/dmx/config/dmxcompat.c                     |   234 -
 hw/dmx/config/dmxcompat.h                     |    44 -
 hw/dmx/config/dmxconfig.c                     |   561 -
 hw/dmx/config/dmxconfig.h                     |    61 -
 hw/dmx/config/dmxparse.c                      |   688 -
 hw/dmx/config/dmxparse.h                      |   291 -
 hw/dmx/config/dmxprint.c                      |   532 -
 hw/dmx/config/dmxprint.h                      |    43 -
 hw/dmx/config/dmxtodmx.c                      |    51 -
 hw/dmx/config/man/Makefile.am                 |     2 -
 hw/dmx/config/man/Makefile.in                 |   848 -
 hw/dmx/config/man/dmxtodmx.man                |    41 -
 hw/dmx/config/man/vdltodmx.man                |    95 -
 hw/dmx/config/man/xdmxconfig.man              |    63 -
 hw/dmx/config/meson.build                     |    82 -
 hw/dmx/config/parser.c                        |  1724 -
 hw/dmx/config/parser.h                        |   121 -
 hw/dmx/config/parser.y                        |   227 -
 hw/dmx/config/scanner.c                       |  2039 -
 hw/dmx/config/scanner.l                       |   187 -
 hw/dmx/config/test-a.in                       |     1 -
 hw/dmx/config/test-a.out                      |     2 -
 hw/dmx/config/test-b.in                       |     1 -
 hw/dmx/config/test-b.out                      |     1 -
 hw/dmx/config/test-c.in                       |     1 -
 hw/dmx/config/test-c.out                      |     2 -
 hw/dmx/config/test-d.in                       |     1 -
 hw/dmx/config/test-d.out                      |     2 -
 hw/dmx/config/test-e.in                       |     1 -
 hw/dmx/config/test-e.out                      |     2 -
 hw/dmx/config/test-f.in                       |     2 -
 hw/dmx/config/test-f.out                      |   Bin 69 -> 0 bytes
 hw/dmx/config/test-g.in                       |     4 -
 hw/dmx/config/test-g.out                      |     4 -
 hw/dmx/config/test-h.in                       |     7 -
 hw/dmx/config/test-h.out                      |     7 -
 hw/dmx/config/test-i.in                       |     3 -
 hw/dmx/config/test-i.out                      |     3 -
 hw/dmx/config/test-j.in                       |    13 -
 hw/dmx/config/test-j.out                      |    11 -
 hw/dmx/config/test-k.in                       |     3 -
 hw/dmx/config/test-k.out                      |     3 -
 hw/dmx/config/test-l.in                       |    12 -
 hw/dmx/config/test-l.out                      |    12 -
 hw/dmx/config/vdltodmx.c                      |    59 -
 hw/dmx/config/xdmxconfig.c                    |  1232 -
 hw/dmx/dmx-config.h                           |    75 -
 hw/dmx/dmx.c                                  |  1200 -
 hw/dmx/dmx.h                                  |   408 -
 hw/dmx/dmx_glxvisuals.c                       |   615 -
 hw/dmx/dmx_glxvisuals.h                       |    57 -
 hw/dmx/dmxcb.c                                |   229 -
 hw/dmx/dmxcb.h                                |    53 -
 hw/dmx/dmxclient.h                            |   128 -
 hw/dmx/dmxcmap.c                              |   222 -
 hw/dmx/dmxcmap.h                              |    65 -
 hw/dmx/dmxcursor.c                            |  1023 -
 hw/dmx/dmxcursor.h                            |    73 -
 hw/dmx/dmxdpms.c                              |   201 -
 hw/dmx/dmxdpms.h                              |    43 -
 hw/dmx/dmxextension.c                         |  1705 -
 hw/dmx/dmxextension.h                         |   115 -
 hw/dmx/dmxfont.c                              |   573 -
 hw/dmx/dmxfont.h                              |    57 -
 hw/dmx/dmxgc.c                                |   446 -
 hw/dmx/dmxgc.h                                |    85 -
 hw/dmx/dmxgcops.c                             |   637 -
 hw/dmx/dmxgcops.h                             |    95 -
 hw/dmx/dmxinit.c                              |  1061 -
 hw/dmx/dmxinit.h                              |    50 -
 hw/dmx/dmxinput.c                             |   130 -
 hw/dmx/dmxinput.h                             |   142 -
 hw/dmx/dmxlog.c                               |   446 -
 hw/dmx/dmxlog.h                               |    81 -
 hw/dmx/dmxpict.c                              |  1277 -
 hw/dmx/dmxpict.h                              |   116 -
 hw/dmx/dmxpixmap.c                            |   262 -
 hw/dmx/dmxpixmap.h                            |    63 -
 hw/dmx/dmxprop.c                              |   375 -
 hw/dmx/dmxprop.h                              |    45 -
 hw/dmx/dmxscrinit.c                           |   485 -
 hw/dmx/dmxscrinit.h                           |    48 -
 hw/dmx/dmxstat.c                              |   238 -
 hw/dmx/dmxstat.h                              |    55 -
 hw/dmx/dmxsync.c                              |   207 -
 hw/dmx/dmxsync.h                              |    43 -
 hw/dmx/dmxvisual.c                            |   146 -
 hw/dmx/dmxvisual.h                            |    47 -
 hw/dmx/dmxwindow.c                            |  1044 -
 hw/dmx/dmxwindow.h                            |   131 -
 hw/dmx/doc/DMXSpec-v1.txt                     |   458 -
 hw/dmx/doc/DMXSpec.txt                        |   875 -
 hw/dmx/doc/Makefile.am                        |    34 -
 hw/dmx/doc/Makefile.in                        |   771 -
 hw/dmx/doc/dmx.xml                            |  3412 --
 hw/dmx/doc/scaled.xml                         |   727 -
 hw/dmx/doxygen/Makefile.am                    |    36 -
 hw/dmx/doxygen/Makefile.in                    |   728 -
 hw/dmx/doxygen/doxygen.conf.in                |  2400 --
 hw/dmx/doxygen/footer.html                    |     4 -
 hw/dmx/examples/Makefile.am                   |    70 -
 hw/dmx/examples/Makefile.in                   |  1364 -
 hw/dmx/examples/dmxaddinput.c                 |    85 -
 hw/dmx/examples/dmxaddscreen.c                |   106 -
 hw/dmx/examples/dmxinfo.c                     |   256 -
 hw/dmx/examples/dmxreconfig.c                 |   161 -
 hw/dmx/examples/dmxresize.c                   |   103 -
 hw/dmx/examples/dmxrminput.c                  |    79 -
 hw/dmx/examples/dmxrmscreen.c                 |    81 -
 hw/dmx/examples/dmxwininfo.c                  |   477 -
 hw/dmx/examples/ev.c                          |   274 -
 hw/dmx/examples/evi.c                         |    87 -
 hw/dmx/examples/meson.build                   |    53 -
 hw/dmx/examples/res.c                         |   101 -
 hw/dmx/examples/xbell.c                       |   101 -
 hw/dmx/examples/xinput.c                      |   355 -
 hw/dmx/examples/xled.c                        |   126 -
 hw/dmx/examples/xtest.c                       |    77 -
 hw/dmx/glxProxy/Makefile.am                   |    42 -
 hw/dmx/glxProxy/Makefile.in                   |   938 -
 hw/dmx/glxProxy/compsize.c                    |   641 -
 hw/dmx/glxProxy/compsize.h                    |    58 -
 hw/dmx/glxProxy/g_disptab.c                   |   610 -
 hw/dmx/glxProxy/g_disptab.h                   |   699 -
 hw/dmx/glxProxy/g_renderswap.c                |  2663 --
 hw/dmx/glxProxy/global.c                      |    70 -
 hw/dmx/glxProxy/glxcmds.c                     |  3843 --
 hw/dmx/glxProxy/glxcmds.h                     |    43 -
 hw/dmx/glxProxy/glxcmdsswap.c                 |  1157 -
 hw/dmx/glxProxy/glxcontext.h                  |   109 -
 hw/dmx/glxProxy/glxdrawable.h                 |    65 -
 hw/dmx/glxProxy/glxerror.h                    |    51 -
 hw/dmx/glxProxy/glxext.c                      |   497 -
 hw/dmx/glxProxy/glxext.h                      |    70 -
 hw/dmx/glxProxy/glxfbconfig.c                 |   106 -
 hw/dmx/glxProxy/glxfbconfig.h                 |    39 -
 hw/dmx/glxProxy/glxscreens.c                  |   340 -
 hw/dmx/glxProxy/glxscreens.h                  |    53 -
 hw/dmx/glxProxy/glxserver.h                   |   292 -
 hw/dmx/glxProxy/glxsingle.c                   |  1067 -
 hw/dmx/glxProxy/glxsingle.h                   |    50 -
 hw/dmx/glxProxy/glxswap.c                     |   560 -
 hw/dmx/glxProxy/glxswap.h                     |    46 -
 hw/dmx/glxProxy/glxutil.h                     |    39 -
 hw/dmx/glxProxy/glxvendor.c                   |   618 -
 hw/dmx/glxProxy/glxvendor.h                   |    53 -
 hw/dmx/glxProxy/glxvisuals.c                  |   158 -
 hw/dmx/glxProxy/glxvisuals.h                  |    46 -
 hw/dmx/glxProxy/meson.build                   |    27 -
 hw/dmx/glxProxy/render2swap.c                 |   283 -
 hw/dmx/glxProxy/renderpixswap.c               |   403 -
 hw/dmx/glxProxy/unpack.h                      |   223 -
 hw/dmx/input/ChkNotMaskEv.c                   |   106 -
 hw/dmx/input/ChkNotMaskEv.h                   |    40 -
 hw/dmx/input/Makefile.am                      |    56 -
 hw/dmx/input/Makefile.in                      |   957 -
 hw/dmx/input/atKeynames.h                     |   292 -
 hw/dmx/input/dmxarg.c                         |   177 -
 hw/dmx/input/dmxarg.h                         |    49 -
 hw/dmx/input/dmxbackend.c                     |   661 -
 hw/dmx/input/dmxbackend.h                     |    56 -
 hw/dmx/input/dmxcommon.c                      |   702 -
 hw/dmx/input/dmxcommon.h                      |   124 -
 hw/dmx/input/dmxconsole.c                     |  1090 -
 hw/dmx/input/dmxconsole.h                     |    59 -
 hw/dmx/input/dmxdetach.c                      |    60 -
 hw/dmx/input/dmxdummy.c                       |    88 -
 hw/dmx/input/dmxdummy.h                       |    43 -
 hw/dmx/input/dmxevents.c                      |   826 -
 hw/dmx/input/dmxevents.h                      |    46 -
 hw/dmx/input/dmxinputinit.c                   |  1350 -
 hw/dmx/input/dmxinputinit.h                   |   284 -
 hw/dmx/input/dmxmap.c                         |   127 -
 hw/dmx/input/dmxmap.h                         |    42 -
 hw/dmx/input/dmxmotion.c                      |   148 -
 hw/dmx/input/dmxmotion.h                      |    48 -
 hw/dmx/input/dmxxinput.c                      |    75 -
 hw/dmx/input/meson.build                      |    32 -
 hw/dmx/input/usb-common.c                     |   492 -
 hw/dmx/input/usb-common.h                     |    54 -
 hw/dmx/input/usb-keyboard.c                   |   478 -
 hw/dmx/input/usb-keyboard.h                   |    47 -
 hw/dmx/input/usb-mouse.c                      |   133 -
 hw/dmx/input/usb-mouse.h                      |    47 -
 hw/dmx/input/usb-other.c                      |   166 -
 hw/dmx/input/usb-other.h                      |    47 -
 hw/dmx/input/usb-private.h                    |   117 -
 hw/dmx/man/Makefile.am                        |     2 -
 hw/dmx/man/Makefile.in                        |   848 -
 hw/dmx/man/Xdmx.man                           |   732 -
 hw/dmx/meson.build                            |    91 -
 hw/kdrive/Makefile.in                         |    49 +-
 hw/kdrive/ephyr/Makefile.in                   |    49 +-
 hw/kdrive/ephyr/README                        |    32 +-
 hw/kdrive/ephyr/ephyr.c                       |    12 +-
 hw/kdrive/ephyr/ephyr.h                       |     2 +-
 hw/kdrive/ephyr/ephyr_glamor_glx.c            |     4 +-
 hw/kdrive/ephyr/ephyrinit.c                   |     2 +-
 hw/kdrive/ephyr/ephyrlog.h                    |     2 +-
 hw/kdrive/ephyr/ephyrvideo.c                  |     2 +-
 hw/kdrive/ephyr/hostx.c                       |     6 +-
 hw/kdrive/ephyr/hostx.h                       |     2 +-
 hw/kdrive/ephyr/man/Makefile.in               |    47 +-
 hw/kdrive/ephyr/meson.build                   |     2 +-
 hw/kdrive/src/Makefile.am                     |     4 +-
 hw/kdrive/src/Makefile.in                     |    59 +-
 hw/kdrive/src/fourcc.h                        |   132 -
 hw/kdrive/src/kdrive.c                        |    20 +-
 hw/kdrive/src/kinput.c                        |     6 -
 hw/kdrive/src/kxv.c                           |     2 +-
 hw/kdrive/src/meson.build                     |     3 +-
 hw/meson.build                                |     8 -
 hw/vfb/InitInput.c                            |     6 -
 hw/vfb/InitOutput.c                           |    64 +-
 hw/vfb/Makefile.am                            |     3 +-
 hw/vfb/Makefile.in                            |    52 +-
 hw/vfb/man/Makefile.in                        |    47 +-
 hw/vfb/meson.build                            |     1 +
 hw/xfree86/Makefile.am                        |     9 +-
 hw/xfree86/Makefile.in                        |    62 +-
 hw/xfree86/common/Makefile.am                 |     9 +-
 hw/xfree86/common/Makefile.in                 |    82 +-
 hw/xfree86/common/compiler.h                  |     8 +-
 hw/xfree86/common/dgaproc.h                   |     1 -
 hw/xfree86/common/meson.build                 |    26 +-
 hw/xfree86/common/xf86.h                      |    16 +-
 hw/xfree86/common/xf86Build.h.in              |     2 -
 hw/xfree86/common/xf86Build.sh                |    13 -
 hw/xfree86/common/xf86Bus.c                   |    99 +-
 hw/xfree86/common/xf86Bus.h                   |     1 -
 hw/xfree86/common/xf86Config.c                |    79 +-
 hw/xfree86/common/xf86Configure.c             |     4 +-
 hw/xfree86/common/xf86Cursor.c                |     4 +-
 hw/xfree86/common/xf86DGA.c                   |    39 +-
 hw/xfree86/common/xf86Events.c                |    27 +-
 hw/xfree86/common/xf86Globals.c               |     5 +-
 hw/xfree86/common/xf86Helper.c                |    83 +-
 hw/xfree86/common/xf86Init.c                  |   250 +-
 hw/xfree86/common/xf86Mode.c                  |     4 +-
 hw/xfree86/common/xf86Module.h                |     7 +-
 hw/xfree86/common/xf86Opt.h                   |     2 +-
 hw/xfree86/common/xf86Option.c                |    10 +-
 hw/xfree86/common/xf86Priv.h                  |     9 +-
 hw/xfree86/common/xf86Privstr.h               |     3 +-
 hw/xfree86/common/xf86VGAarbiter.c            |     5 +-
 hw/xfree86/common/xf86Xinput.c                |    84 +-
 hw/xfree86/common/xf86Xinput.h                |    19 +
 hw/xfree86/common/xf86fbman.c                 |     4 +-
 hw/xfree86/common/xf86pciBus.c                |     2 +-
 hw/xfree86/common/xf86platformBus.c           |    54 +-
 hw/xfree86/common/xf86str.h                   |     5 +-
 hw/xfree86/common/xf86xv.c                    |     2 +-
 hw/xfree86/common/xisb.c                      |     2 +-
 hw/xfree86/ddc/Makefile.in                    |    49 +-
 hw/xfree86/ddc/edid.h                         |     2 +-
 hw/xfree86/ddc/interpret_edid.c               |     2 +-
 hw/xfree86/ddc/print_edid.c                   |     4 +-
 hw/xfree86/dixmods/Makefile.am                |    15 +-
 hw/xfree86/dixmods/Makefile.in                |    98 +-
 hw/xfree86/dixmods/meson.build                |    18 +-
 hw/xfree86/doc/Makefile.in                    |    47 +-
 hw/xfree86/doc/README.modes                   |     2 +-
 hw/xfree86/doc/Registry                       |     1 -
 hw/xfree86/doc/ddxDesign.xml                  |    46 +-
 hw/xfree86/doc/meson.build                    |    35 +
 hw/xfree86/dri/Makefile.in                    |    49 +-
 hw/xfree86/dri/dri.c                          |     2 +-
 hw/xfree86/dri2/Makefile.in                   |    49 +-
 hw/xfree86/dri2/dri2.c                        |    83 +-
 hw/xfree86/dri2/dri2.h                        |     8 +-
 hw/xfree86/dri2/dri2ext.c                     |     2 +-
 hw/xfree86/dri2/pci_ids/Makefile.in           |    47 +-
 hw/xfree86/dri2/pci_ids/i965_pci_ids.h        |    11 +
 hw/xfree86/dri2/pci_ids/pci_id_driver_map.h   |     9 +-
 hw/xfree86/drivers/Makefile.am                |     3 +
 hw/xfree86/drivers/Makefile.in                |    54 +-
 hw/xfree86/drivers/inputtest/Makefile.am      |    48 +
 .../{vbe => drivers/inputtest}/Makefile.in    |   333 +-
 hw/xfree86/drivers/inputtest/inputtestdrv.man |   112 +
 hw/xfree86/drivers/inputtest/meson.build      |    26 +
 .../inputtest/xf86-input-inputtest-protocol.h |   172 +
 .../drivers/inputtest/xf86-input-inputtest.c  |  1135 +
 hw/xfree86/drivers/modesetting/Makefile.in    |    49 +-
 hw/xfree86/drivers/modesetting/dri2.c         |    23 +-
 hw/xfree86/drivers/modesetting/driver.c       |   385 +-
 hw/xfree86/drivers/modesetting/driver.h       |    67 +-
 .../drivers/modesetting/drmmode_display.c     |   453 +-
 .../drivers/modesetting/drmmode_display.h     |    29 +-
 hw/xfree86/drivers/modesetting/meson.build    |     1 -
 .../drivers/modesetting/modesetting.man       |    28 +
 hw/xfree86/drivers/modesetting/pageflip.c     |   177 +-
 hw/xfree86/drivers/modesetting/present.c      |    73 +-
 hw/xfree86/drivers/modesetting/vblank.c       |   208 +-
 hw/xfree86/exa/Makefile.in                    |    49 +-
 hw/xfree86/exa/man/Makefile.in                |    47 +-
 hw/xfree86/fbdevhw/Makefile.in                |    49 +-
 hw/xfree86/fbdevhw/fbdevhw.c                  |     8 +-
 hw/xfree86/fbdevhw/fbpriv.h                   |     2 +-
 hw/xfree86/fbdevhw/man/Makefile.in            |    47 +-
 hw/xfree86/glamor_egl/Makefile.in             |    49 +-
 hw/xfree86/i2c/Makefile.in                    |    49 +-
 hw/xfree86/i2c/xf86i2c.c                      |    10 +-
 hw/xfree86/int10/INT10.HOWTO                  |     4 +-
 hw/xfree86/int10/Makefile.am                  |     7 +-
 hw/xfree86/int10/Makefile.in                  |    73 +-
 hw/xfree86/int10/generic.c                    |    14 +-
 hw/xfree86/int10/helper_exec.c                |     6 +-
 hw/xfree86/int10/meson.build                  |     4 +
 hw/xfree86/{vbe => int10}/vbe.c               |     6 +-
 hw/xfree86/{vbe => int10}/vbe.h               |     3 +-
 hw/xfree86/{vbe => int10}/vbeModes.c          |     2 +-
 hw/xfree86/{vbe => int10}/vbeModes.h          |     0
 hw/xfree86/int10/xf86int10.c                  |     2 +-
 hw/xfree86/loader/Makefile.in                 |    49 +-
 hw/xfree86/loader/loader.c                    |     3 +-
 hw/xfree86/loader/loader.h                    |     1 -
 hw/xfree86/loader/loadmod.c                   |     7 +-
 hw/xfree86/man/Makefile.in                    |    47 +-
 hw/xfree86/man/Xorg.man                       |    10 +-
 hw/xfree86/man/xorg.conf.man                  |    26 +-
 hw/xfree86/meson.build                        |    51 +-
 hw/xfree86/modes/Makefile.am                  |     1 -
 hw/xfree86/modes/Makefile.in                  |    63 +-
 hw/xfree86/modes/meson.build                  |     5 +-
 hw/xfree86/modes/xf86Crtc.c                   |    58 +-
 hw/xfree86/modes/xf86Crtc.h                   |    10 +-
 hw/xfree86/modes/xf86EdidModes.c              |     4 +-
 hw/xfree86/modes/xf86Modes.c                  |    31 +
 hw/xfree86/modes/xf86RandR12.c                |    53 +-
 hw/xfree86/modes/xf86Rotate.c                 |     4 +-
 hw/xfree86/modes/xf86cvt.c                    |   295 -
 hw/xfree86/os-support/Makefile.in             |    49 +-
 hw/xfree86/os-support/bsd/Makefile.am         |    12 +-
 hw/xfree86/os-support/bsd/Makefile.in         |    89 +-
 hw/xfree86/os-support/bsd/arm_video.c         |     3 +
 hw/xfree86/os-support/bsd/bsd_apm.c           |   137 -
 hw/xfree86/os-support/bsd/bsd_init.c          |     6 +-
 hw/xfree86/os-support/bsd/bsd_kqueue_apm.c    |   199 -
 hw/xfree86/os-support/bsd/memrange.h          |     2 +-
 hw/xfree86/os-support/bus/Makefile.in         |    49 +-
 hw/xfree86/os-support/hurd/Makefile.am        |     2 +-
 hw/xfree86/os-support/hurd/Makefile.in        |    51 +-
 hw/xfree86/os-support/linux/Makefile.am       |    17 +-
 hw/xfree86/os-support/linux/Makefile.in       |    88 +-
 hw/xfree86/os-support/linux/lnx_agp.c         |     1 +
 hw/xfree86/os-support/linux/lnx_apm.c         |     9 +-
 hw/xfree86/os-support/linux/lnx_init.c        |    16 +-
 hw/xfree86/os-support/linux/lnx_platform.c    |    28 +-
 hw/xfree86/os-support/linux/lnx_video.c       |    34 +-
 hw/xfree86/os-support/linux/systemd-logind.c  |    79 +-
 hw/xfree86/os-support/meson.build             |    46 +-
 hw/xfree86/os-support/misc/Makefile.in        |    49 +-
 hw/xfree86/os-support/shared/sigio.c          |     8 +-
 hw/xfree86/os-support/solaris/Makefile.am     |     2 +-
 hw/xfree86/os-support/solaris/Makefile.in     |    51 +-
 hw/xfree86/os-support/solaris/sun_apm.c       |     2 +-
 hw/xfree86/os-support/stub/Makefile.in        |    49 +-
 hw/xfree86/os-support/xf86_OSproc.h           |     6 +-
 hw/xfree86/parser/Configint.h                 |     6 +-
 hw/xfree86/parser/Flags.c                     |     2 -
 hw/xfree86/parser/Makefile.in                 |    49 +-
 hw/xfree86/parser/Monitor.c                   |     2 +-
 hw/xfree86/parser/write.c                     |     2 +-
 hw/xfree86/parser/xf86tokens.h                |     1 -
 hw/xfree86/ramdac/BT.c                        |   167 -
 hw/xfree86/ramdac/BT.h                        |    37 -
 hw/xfree86/ramdac/BTPriv.h                    |    20 -
 hw/xfree86/ramdac/CURSOR.NOTES                |    42 +-
 hw/xfree86/ramdac/IBM.c                       |   645 -
 hw/xfree86/ramdac/IBM.h                       |   418 -
 hw/xfree86/ramdac/IBMPriv.h                   |    27 -
 hw/xfree86/ramdac/Makefile.am                 |     8 +-
 hw/xfree86/ramdac/Makefile.in                 |    87 +-
 hw/xfree86/ramdac/TI.c                        |   726 -
 hw/xfree86/ramdac/TI.h                        |   106 -
 hw/xfree86/ramdac/TIPriv.h                    |    29 -
 hw/xfree86/ramdac/meson.build                 |     9 -
 hw/xfree86/ramdac/xf86CursorRD.c              |     4 +-
 hw/xfree86/ramdac/xf86HWCurs.c                |    14 +-
 hw/xfree86/ramdac/xf86RamDac.c                |   152 -
 hw/xfree86/ramdac/xf86RamDac.h                |    88 -
 hw/xfree86/ramdac/xf86RamDacCmap.c            |    70 -
 hw/xfree86/ramdac/xf86RamDacPriv.h            |    13 -
 hw/xfree86/sdksyms.sh                         |    29 +-
 hw/xfree86/shadowfb/Makefile.in               |    49 +-
 hw/xfree86/utils/Makefile.am                  |     1 -
 hw/xfree86/utils/Makefile.in                  |    50 +-
 hw/xfree86/utils/cvt/Makefile.am              |    35 -
 hw/xfree86/utils/cvt/Makefile.in              |   972 -
 hw/xfree86/utils/cvt/cvt.c                    |   294 -
 hw/xfree86/utils/gtf/Makefile.in              |    49 +-
 hw/xfree86/utils/man/Makefile.am              |     2 +-
 hw/xfree86/utils/man/Makefile.in              |    49 +-
 hw/xfree86/utils/man/cvt.man                  |    41 -
 hw/xfree86/vbe/Makefile.am                    |    14 -
 hw/xfree86/vbe/meson.build                    |    10 -
 hw/xfree86/vbe/vbe_module.c                   |    22 -
 hw/xfree86/vgahw/Makefile.in                  |    49 +-
 hw/xfree86/vgahw/vgaHW.c                      |    10 +-
 hw/xfree86/vgahw/vgaHW.h                      |     2 +-
 hw/xfree86/x86emu/Makefile.in                 |    49 +-
 hw/xfree86/x86emu/decode.c                    |     2 +-
 hw/xfree86/x86emu/ops.c                       |    18 +-
 hw/xfree86/x86emu/prim_ops.c                  |    14 +-
 hw/xfree86/x86emu/sys.c                       |     4 +-
 hw/xfree86/x86emu/x86emu/debug.h              |     4 +-
 hw/xfree86/x86emu/x86emu/regs.h               |     2 +-
 hw/xfree86/x86emu/x86emu/x86emui.h            |     4 +-
 hw/xfree86/xkb/Makefile.in                    |    49 +-
 hw/xfree86/xkb/xkbPrivate.c                   |    17 -
 hw/xfree86/xorg-wrapper.c                     |     2 +-
 hw/xfree86/xorgconf.cpp                       |     8 +-
 hw/xnest/Args.c                               |     2 +-
 hw/xnest/Display.c                            |     2 +-
 hw/xnest/Handlers.c                           |     2 +-
 hw/xnest/Init.c                               |    12 +-
 hw/xnest/Keyboard.c                           |    12 +-
 hw/xnest/Makefile.am                          |     3 +-
 hw/xnest/Makefile.in                          |    52 +-
 hw/xnest/Window.c                             |     2 +-
 hw/xnest/man/Makefile.in                      |    47 +-
 hw/xnest/man/Xnest.man                        |     2 +-
 hw/xnest/meson.build                          |     1 +
 hw/xquartz/GL/Makefile.in                     |    49 +-
 hw/xquartz/GL/meson.build                     |     5 +
 hw/xquartz/Makefile.am                        |    10 +-
 hw/xquartz/Makefile.in                        |    83 +-
 hw/xquartz/NSUserDefaults+XQuartzDefaults.h   |    49 +
 hw/xquartz/NSUserDefaults+XQuartzDefaults.m   |   148 +
 hw/xquartz/X11Application.h                   |    48 -
 hw/xquartz/X11Application.m                   |   550 +-
 hw/xquartz/X11Controller.m                    |   231 +-
 hw/xquartz/bundle/Info.plist.cpp              |    33 +-
 hw/xquartz/bundle/Makefile.am                 |     6 +-
 hw/xquartz/bundle/Makefile.in                 |   118 +-
 .../French.lproj/main.nib/designable.nib      |   200 +-
 .../French.lproj/main.nib/keyedobjects.nib    |   Bin 48881 -> 46612 bytes
 .../main.nib/keyedobjects-110000.nib          |   Bin 0 -> 44697 bytes
 hw/xquartz/bundle/chown-bundle.sh             |     7 +
 hw/xquartz/bundle/meson.build                 |    59 +
 hw/xquartz/darwin.c                           |    33 -
 .../{bundle/Xquartz.plist => defaults.plist}  |    12 +-
 hw/xquartz/mach-startup/Makefile.am           |     2 +-
 hw/xquartz/mach-startup/Makefile.in           |    56 +-
 hw/xquartz/mach-startup/bundle-main.c         |    20 +-
 hw/xquartz/mach-startup/meson.build           |    99 +
 hw/xquartz/mach-startup/stub.c                |   111 +-
 hw/xquartz/man/Makefile.in                    |    47 +-
 hw/xquartz/man/Xquartz.man                    |     2 +-
 hw/xquartz/meson.build                        |   107 +-
 hw/xquartz/pbproxy/Makefile.am                |     4 +-
 hw/xquartz/pbproxy/Makefile.in                |    83 +-
 hw/xquartz/pbproxy/app-main.m                 |    40 -
 hw/xquartz/pbproxy/meson.build                |    34 +
 hw/xquartz/pbproxy/x-selection.m              |    45 +-
 hw/xquartz/quartz.c                           |    12 +-
 hw/xquartz/quartzKeyboard.c                   |    11 -
 hw/xquartz/xpr/Makefile.in                    |    49 +-
 hw/xquartz/xpr/appledristr.h                  |   160 +-
 hw/xquartz/xpr/meson.build                    |    18 +
 hw/xquartz/xpr/x-list.c                       |     3 +-
 hw/xquartz/xpr/xprCursor.c                    |     4 +-
 hw/xquartz/xpr/xprFrame.c                     |    26 +-
 hw/xquartz/xpr/xprScreen.c                    |     6 +-
 hw/xwayland/Makefile.am                       |   137 -
 hw/xwayland/Makefile.in                       |  1449 -
 hw/xwayland/drm.xml                           |   185 -
 hw/xwayland/meson.build                       |   103 -
 hw/xwayland/xwayland-cursor.c                 |   314 -
 hw/xwayland/xwayland-cvt.c                    |   311 -
 hw/xwayland/xwayland-glamor-eglstream.c       |   933 -
 hw/xwayland/xwayland-glamor-gbm.c             |  1077 -
 hw/xwayland/xwayland-glamor-xv.c              |   412 -
 hw/xwayland/xwayland-glamor.c                 |   266 -
 hw/xwayland/xwayland-input.c                  |  2956 --
 hw/xwayland/xwayland-output.c                 |   474 -
 hw/xwayland/xwayland-present.c                |   579 -
 hw/xwayland/xwayland-shm.c                    |   306 -
 hw/xwayland/xwayland-vidmode.c                |   420 -
 hw/xwayland/xwayland.c                        |  1356 -
 hw/xwayland/xwayland.h                        |   495 -
 hw/xwin/InitInput.c                           |    15 -
 hw/xwin/InitOutput.c                          |    46 +-
 hw/xwin/Makefile.am                           |    18 +-
 hw/xwin/Makefile.in                           |   122 +-
 hw/xwin/ddraw.h                               |    24 +-
 hw/xwin/dri/Makefile.in                       |    49 +-
 hw/xwin/dri/windowsdri.h                      |     1 -
 hw/xwin/glx/Makefile.am                       |     7 -
 hw/xwin/glx/Makefile.in                       |    57 +-
 hw/xwin/glx/indirect.c                        |   281 +-
 hw/xwin/glx/indirect.h                        |     1 +
 hw/xwin/glx/meson.build                       |     4 +-
 hw/xwin/glx/winpriv.c                         |    23 -
 hw/xwin/man/Makefile.in                       |    47 +-
 hw/xwin/man/XWin.man                          |    32 +-
 hw/xwin/man/XWinrc.man                        |    29 +-
 hw/xwin/meson.build                           |     9 +-
 hw/xwin/system.XWinrc                         |    12 +-
 hw/xwin/win.h                                 |   168 +-
 hw/xwin/winallpriv.c                          |     2 +-
 hw/xwin/winauth.c                             |    29 +-
 hw/xwin/winclipboard/Makefile.am              |     1 +
 hw/xwin/winclipboard/Makefile.in              |    50 +-
 hw/xwin/winclipboard/internal.h               |   119 +
 hw/xwin/winclipboard/meson.build              |     8 +-
 hw/xwin/winclipboard/textconv.c               |     9 -
 hw/xwin/winclipboard/thread.c                 |   286 +-
 hw/xwin/winclipboard/winclipboard.h           |     7 +-
 hw/xwin/winclipboard/wndproc.c                |   333 +-
 hw/xwin/winclipboard/xevents.c                |   930 +-
 hw/xwin/winclipboard/xwinclip.c               |    53 +-
 hw/xwin/winclipboard/xwinclip.man             |    14 +-
 hw/xwin/winclipboardinit.c                    |    12 +-
 hw/xwin/winconfig.c                           |    24 +-
 hw/xwin/winconfig.h                           |     2 +-
 hw/xwin/wincreatewnd.c                        |    40 +-
 hw/xwin/wincursor.c                           |     2 +-
 hw/xwin/winengine.c                           |     3 -
 hw/xwin/winglobals.c                          |     2 +-
 hw/xwin/winglobals.h                          |     6 +-
 hw/xwin/winkeynames.h                         |     8 +-
 hw/xwin/winlayouts.h                          |     2 +
 hw/xwin/winmonitors.c                         |     4 +-
 hw/xwin/winmouse.c                            |     2 +-
 hw/xwin/winmultiwindowicons.c                 |     5 +-
 hw/xwin/winmultiwindowicons.h                 |     2 +-
 hw/xwin/winmultiwindowwindow.c                |   264 +-
 hw/xwin/winmultiwindowwm.c                    |   111 +-
 hw/xwin/winmultiwindowwndproc.c               |   193 +-
 hw/xwin/winprefs.c                            |    76 +-
 hw/xwin/winprefs.h                            |     3 +
 hw/xwin/winprefsyacc.c                        |   216 +-
 hw/xwin/winprefsyacc.h                        |    11 +-
 hw/xwin/winprocarg.c                          |   130 +-
 hw/xwin/winrandr.c                            |    40 +-
 hw/xwin/winscrinit.c                          |    93 +-
 hw/xwin/winshadddnl.c                         |     1 +
 hw/xwin/winshadgdi.c                          |   163 +-
 hw/xwin/wintrayicon.c                         |     5 -
 hw/xwin/winvalargs.c                          |    39 +-
 hw/xwin/winwin32rootless.c                    |   965 -
 hw/xwin/winwin32rootlesswindow.c              |   420 -
 hw/xwin/winwin32rootlesswndproc.c             |  1080 -
 hw/xwin/winwindow.h                           |     6 +-
 hw/xwin/winwindowswm.c                        |   596 -
 hw/xwin/winwndproc.c                          |    82 +-
 include/Makefile.am                           |    16 +-
 include/Makefile.in                           |   113 +-
 {dix => include}/Xserver.d                    |     0
 include/dix-config.h.in                       |    12 +-
 include/dix.h                                 |   144 +-
 include/dixfont.h                             |     1 -
 include/dixgrabs.h                            |     1 +
 include/do-not-use-config.h.in                |   126 +-
 include/eventconvert.h                        |     3 +
 include/events.h                              |     1 +
 include/eventstr.h                            |    39 +
 include/exevents.h                            |    11 +-
 {hw/xfree86/common => include}/fourcc.h       |    20 +
 include/glxvndabi.h                           |     2 +-
 include/input.h                               |   113 +-
 include/inputstr.h                            |    32 +-
 include/inpututils.h                          |     5 +
 include/meson.build                           |   384 +-
 include/misc.h                                |     2 +
 include/opaque.h                              |     5 -
 include/os.h                                  |    15 +-
 include/pixmap.h                              |     6 +-
 include/pixmapstr.h                           |     4 +-
 include/privates.h                            |     1 +
 include/probes.h                              |     4 +-
 include/property.h                            |     2 +-
 include/protocol-versions.h                   |     4 +-
 include/resource.h                            |     3 +-
 include/screenint.h                           |    17 +-
 include/scrnintstr.h                          |    32 +-
 include/site.h                                |   126 -
 include/systemd-logind.h                      |     2 +
 include/windowstr.h                           |     2 -
 include/xkbstr.h                              |     2 +-
 include/xorg-config.h.in                      |     3 -
 include/xorg-config.h.meson.in                |     3 -
 include/xwayland-config.h.in                  |    13 -
 include/xwayland-config.h.meson.in            |    11 -
 install-sh                                    |   148 +-
 ltmain.sh                                     |   915 +-
 m4/libtool.m4                                 |   260 +-
 m4/ltoptions.m4                               |     4 +-
 m4/ltsugar.m4                                 |     2 +-
 m4/ltversion.m4                               |    13 +-
 m4/lt~obsolete.m4                             |     4 +-
 man/Makefile.in                               |    47 +-
 man/Xserver.man                               |    31 +-
 meson.build                                   |   380 +-
 meson_options.txt                             |    58 +-
 mi/Makefile.in                                |    49 +-
 mi/meson.build                                |     4 +-
 mi/mi.h                                       |     6 +
 mi/miarc.c                                    |     4 +-
 mi/mibitblt.c                                 |     6 +-
 mi/micmap.c                                   |    10 +-
 mi/micopy.c                                   |     8 +-
 mi/mieq.c                                     |    40 +-
 mi/miexpose.c                                 |    16 +-
 mi/miglblt.c                                  |     2 +-
 mi/miinitext.c                                |    39 +-
 mi/miinitext.h                                |    83 +
 mi/mipointer.c                                |     6 +-
 mi/mipointer.h                                |     2 +-
 mi/miscrinit.c                                |    13 +-
 mi/misprite.c                                 |    93 +-
 mi/mizerline.c                                |     2 +-
 miext/Makefile.in                             |    49 +-
 miext/damage/Makefile.in                      |    49 +-
 miext/damage/meson.build                      |     4 +-
 miext/rootless/Makefile.in                    |    49 +-
 miext/rootless/meson.build                    |    13 +
 miext/rootless/rootless.h                     |     4 +-
 miext/rootless/rootlessCommon.c               |    44 +-
 miext/rootless/rootlessCommon.h               |     2 +-
 miext/rootless/rootlessGC.c                   |    10 +-
 miext/rootless/rootlessScreen.c               |    11 +-
 miext/rootless/rootlessWindow.c               |     6 +-
 miext/shadow/Makefile.in                      |    49 +-
 miext/shadow/meson.build                      |     4 +-
 miext/shadow/shadow.c                         |     2 +-
 miext/sync/Makefile.in                        |    49 +-
 miext/sync/meson.build                        |     4 +-
 miext/sync/misyncstr.h                        |     2 +-
 missing                                       |     2 +-
 os/Makefile.am                                |     4 +-
 os/Makefile.in                                |    53 +-
 os/WaitFor.c                                  |     6 +-
 os/access.c                                   |    55 +-
 os/auth.c                                     |     4 +-
 os/backtrace.c                                |     4 +-
 os/client.c                                   |   112 +-
 os/connection.c                               |    92 +-
 os/inputthread.c                              |     8 +-
 os/io.c                                       |     6 +-
 os/log.c                                      |    11 +-
 os/meson.build                                |    39 +-
 os/strcasestr.c                               |     1 -
 os/utils.c                                    |    55 +-
 os/xdmcp.c                                    |    18 +-
 os/xserver_poll.c                             |     4 +
 os/xsha1.c                                    |     9 +
 present/Makefile.am                           |     6 +-
 present/Makefile.in                           |    62 +-
 present/meson.build                           |     8 +-
 present/present.c                             |   109 +-
 present/present.h                             |    32 +-
 present/present_event.c                       |     4 -
 present/present_execute.c                     |     4 -
 present/present_fake.c                        |    32 +-
 present/present_fence.c                       |     4 -
 present/present_notify.c                      |     4 -
 present/present_priv.h                        |    63 +-
 present/present_request.c                     |     4 -
 present/present_scmd.c                        |   139 +-
 present/present_screen.c                      |    85 +-
 present/present_vblank.c                      |    92 +-
 present/present_wnmd.c                        |   721 -
 pseudoramiX/Makefile.in                       |    49 +-
 randr/Makefile.in                             |    49 +-
 randr/meson.build                             |     4 +-
 randr/randr.c                                 |   143 +-
 randr/randrstr.h                              |    10 +
 randr/rrcrtc.c                                |   177 +-
 randr/rrlease.c                               |     2 +-
 randr/rrmonitor.c                             |    36 +-
 randr/rroutput.c                              |    28 +-
 randr/rrprovider.c                            |    54 +-
 randr/rrscreen.c                              |    12 +-
 record/Makefile.in                            |    49 +-
 record/record.c                               |    14 +-
 render/Makefile.in                            |    49 +-
 render/meson.build                            |     4 +-
 render/mipict.c                               |     6 +-
 render/picture.c                              |    30 +-
 render/render.c                               |     9 +
 test-driver                                   |    19 +-
 test/Makefile.am                              |     1 +
 test/Makefile.in                              |    59 +-
 test/damage/meson.build                       |     9 +
 test/damage/primitives.c                      |   374 +
 test/fixes.c                                  |     3 +
 test/input.c                                  |     6 +-
 test/list.c                                   |     3 +
 test/meson.build                              |   158 +-
 test/misc.c                                   |     5 +-
 test/scripts/xephyr-glamor-piglit.sh          |     9 +
 test/scripts/xinit-piglit-session.sh          |     2 +
 test/signal-logging.c                         |     3 +
 test/simple-xinit.c                           |    39 +-
 test/string.c                                 |     3 +
 test/test_xkb.c                               |     3 +
 test/touch.c                                  |     3 +
 test/xfree86.c                                |     6 +-
 test/xi1/protocol-xchangedevicecontrol.c      |     3 +
 test/xi2/protocol-common.c                    |     3 +
 test/xi2/protocol-eventconvert.c              |     9 +-
 test/xi2/protocol-xigetclientpointer.c        |     3 +
 test/xi2/protocol-xigetselectedevents.c       |     3 +
 test/xi2/protocol-xipassivegrabdevice.c       |     5 +-
 test/xi2/protocol-xiquerydevice.c             |     6 +-
 test/xi2/protocol-xiquerypointer.c            |     3 +
 test/xi2/protocol-xiqueryversion.c            |     3 +
 test/xi2/protocol-xiselectevents.c            |    38 +-
 test/xi2/protocol-xisetclientpointer.c        |     3 +
 test/xi2/protocol-xiwarppointer.c             |     3 +
 test/xi2/xi2.c                                |     3 +
 test/xtest.c                                  |     5 +-
 xfixes/Makefile.am                            |     1 +
 xfixes/Makefile.in                            |    60 +-
 xfixes/cursor.c                               |     8 +-
 xfixes/disconnect.c                           |   147 +
 xfixes/meson.build                            |     1 +
 xfixes/xfixes.c                               |    38 +-
 xfixes/xfixesint.h                            |    23 +-
 xkb/Makefile.in                               |    49 +-
 xkb/XKBMisc.c                                 |     6 +-
 xkb/ddxLoad.c                                 |    29 +-
 xkb/xkb.c                                     |   209 +-
 xkb/xkbActions.c                              |    42 +-
 xkb/xkbInit.c                                 |     4 +-
 xkb/xkbUtils.c                                |     1 +
 xkb/xkbtext.c                                 |     1 +
 xkb/xkmread.c                                 |     2 +-
 xorg-server.m4                                |     2 +-
 ylwrap                                        |     2 +-
 881 files changed, 46956 insertions(+), 118929 deletions(-)
 delete mode 100644 dix/Xserver-dtrace.h.in
 create mode 100644 dix/gestures.c
 create mode 100644 doc/dtrace/meson.build
 create mode 100644 doc/meson.build
 delete mode 100644 hw/dmx/Makefile.am
 delete mode 100644 hw/dmx/Makefile.in
 delete mode 100644 hw/dmx/config/Canvas.c
 delete mode 100644 hw/dmx/config/Canvas.h
 delete mode 100644 hw/dmx/config/CanvasP.h
 delete mode 100644 hw/dmx/config/Makefile.am
 delete mode 100644 hw/dmx/config/Makefile.in
 delete mode 100644 hw/dmx/config/TODO
 delete mode 100644 hw/dmx/config/dmxcompat.c
 delete mode 100644 hw/dmx/config/dmxcompat.h
 delete mode 100644 hw/dmx/config/dmxconfig.c
 delete mode 100644 hw/dmx/config/dmxconfig.h
 delete mode 100644 hw/dmx/config/dmxparse.c
 delete mode 100644 hw/dmx/config/dmxparse.h
 delete mode 100644 hw/dmx/config/dmxprint.c
 delete mode 100644 hw/dmx/config/dmxprint.h
 delete mode 100644 hw/dmx/config/dmxtodmx.c
 delete mode 100644 hw/dmx/config/man/Makefile.am
 delete mode 100644 hw/dmx/config/man/Makefile.in
 delete mode 100644 hw/dmx/config/man/dmxtodmx.man
 delete mode 100644 hw/dmx/config/man/vdltodmx.man
 delete mode 100644 hw/dmx/config/man/xdmxconfig.man
 delete mode 100644 hw/dmx/config/meson.build
 delete mode 100644 hw/dmx/config/parser.c
 delete mode 100644 hw/dmx/config/parser.h
 delete mode 100644 hw/dmx/config/parser.y
 delete mode 100644 hw/dmx/config/scanner.c
 delete mode 100644 hw/dmx/config/scanner.l
 delete mode 100644 hw/dmx/config/test-a.in
 delete mode 100644 hw/dmx/config/test-a.out
 delete mode 100644 hw/dmx/config/test-b.in
 delete mode 100644 hw/dmx/config/test-b.out
 delete mode 100644 hw/dmx/config/test-c.in
 delete mode 100644 hw/dmx/config/test-c.out
 delete mode 100644 hw/dmx/config/test-d.in
 delete mode 100644 hw/dmx/config/test-d.out
 delete mode 100644 hw/dmx/config/test-e.in
 delete mode 100644 hw/dmx/config/test-e.out
 delete mode 100644 hw/dmx/config/test-f.in
 delete mode 100644 hw/dmx/config/test-f.out
 delete mode 100644 hw/dmx/config/test-g.in
 delete mode 100644 hw/dmx/config/test-g.out
 delete mode 100644 hw/dmx/config/test-h.in
 delete mode 100644 hw/dmx/config/test-h.out
 delete mode 100644 hw/dmx/config/test-i.in
 delete mode 100644 hw/dmx/config/test-i.out
 delete mode 100644 hw/dmx/config/test-j.in
 delete mode 100644 hw/dmx/config/test-j.out
 delete mode 100644 hw/dmx/config/test-k.in
 delete mode 100644 hw/dmx/config/test-k.out
 delete mode 100644 hw/dmx/config/test-l.in
 delete mode 100644 hw/dmx/config/test-l.out
 delete mode 100644 hw/dmx/config/vdltodmx.c
 delete mode 100644 hw/dmx/config/xdmxconfig.c
 delete mode 100644 hw/dmx/dmx-config.h
 delete mode 100644 hw/dmx/dmx.c
 delete mode 100644 hw/dmx/dmx.h
 delete mode 100644 hw/dmx/dmx_glxvisuals.c
 delete mode 100644 hw/dmx/dmx_glxvisuals.h
 delete mode 100644 hw/dmx/dmxcb.c
 delete mode 100644 hw/dmx/dmxcb.h
 delete mode 100644 hw/dmx/dmxclient.h
 delete mode 100644 hw/dmx/dmxcmap.c
 delete mode 100644 hw/dmx/dmxcmap.h
 delete mode 100644 hw/dmx/dmxcursor.c
 delete mode 100644 hw/dmx/dmxcursor.h
 delete mode 100644 hw/dmx/dmxdpms.c
 delete mode 100644 hw/dmx/dmxdpms.h
 delete mode 100644 hw/dmx/dmxextension.c
 delete mode 100644 hw/dmx/dmxextension.h
 delete mode 100644 hw/dmx/dmxfont.c
 delete mode 100644 hw/dmx/dmxfont.h
 delete mode 100644 hw/dmx/dmxgc.c
 delete mode 100644 hw/dmx/dmxgc.h
 delete mode 100644 hw/dmx/dmxgcops.c
 delete mode 100644 hw/dmx/dmxgcops.h
 delete mode 100644 hw/dmx/dmxinit.c
 delete mode 100644 hw/dmx/dmxinit.h
 delete mode 100644 hw/dmx/dmxinput.c
 delete mode 100644 hw/dmx/dmxinput.h
 delete mode 100644 hw/dmx/dmxlog.c
 delete mode 100644 hw/dmx/dmxlog.h
 delete mode 100644 hw/dmx/dmxpict.c
 delete mode 100644 hw/dmx/dmxpict.h
 delete mode 100644 hw/dmx/dmxpixmap.c
 delete mode 100644 hw/dmx/dmxpixmap.h
 delete mode 100644 hw/dmx/dmxprop.c
 delete mode 100644 hw/dmx/dmxprop.h
 delete mode 100644 hw/dmx/dmxscrinit.c
 delete mode 100644 hw/dmx/dmxscrinit.h
 delete mode 100644 hw/dmx/dmxstat.c
 delete mode 100644 hw/dmx/dmxstat.h
 delete mode 100644 hw/dmx/dmxsync.c
 delete mode 100644 hw/dmx/dmxsync.h
 delete mode 100644 hw/dmx/dmxvisual.c
 delete mode 100644 hw/dmx/dmxvisual.h
 delete mode 100644 hw/dmx/dmxwindow.c
 delete mode 100644 hw/dmx/dmxwindow.h
 delete mode 100644 hw/dmx/doc/DMXSpec-v1.txt
 delete mode 100644 hw/dmx/doc/DMXSpec.txt
 delete mode 100644 hw/dmx/doc/Makefile.am
 delete mode 100644 hw/dmx/doc/Makefile.in
 delete mode 100644 hw/dmx/doc/dmx.xml
 delete mode 100644 hw/dmx/doc/scaled.xml
 delete mode 100644 hw/dmx/doxygen/Makefile.am
 delete mode 100644 hw/dmx/doxygen/Makefile.in
 delete mode 100644 hw/dmx/doxygen/doxygen.conf.in
 delete mode 100644 hw/dmx/doxygen/footer.html
 delete mode 100644 hw/dmx/examples/Makefile.am
 delete mode 100644 hw/dmx/examples/Makefile.in
 delete mode 100644 hw/dmx/examples/dmxaddinput.c
 delete mode 100644 hw/dmx/examples/dmxaddscreen.c
 delete mode 100644 hw/dmx/examples/dmxinfo.c
 delete mode 100644 hw/dmx/examples/dmxreconfig.c
 delete mode 100644 hw/dmx/examples/dmxresize.c
 delete mode 100644 hw/dmx/examples/dmxrminput.c
 delete mode 100644 hw/dmx/examples/dmxrmscreen.c
 delete mode 100644 hw/dmx/examples/dmxwininfo.c
 delete mode 100644 hw/dmx/examples/ev.c
 delete mode 100644 hw/dmx/examples/evi.c
 delete mode 100644 hw/dmx/examples/meson.build
 delete mode 100644 hw/dmx/examples/res.c
 delete mode 100644 hw/dmx/examples/xbell.c
 delete mode 100644 hw/dmx/examples/xinput.c
 delete mode 100644 hw/dmx/examples/xled.c
 delete mode 100644 hw/dmx/examples/xtest.c
 delete mode 100644 hw/dmx/glxProxy/Makefile.am
 delete mode 100644 hw/dmx/glxProxy/Makefile.in
 delete mode 100644 hw/dmx/glxProxy/compsize.c
 delete mode 100644 hw/dmx/glxProxy/compsize.h
 delete mode 100644 hw/dmx/glxProxy/g_disptab.c
 delete mode 100644 hw/dmx/glxProxy/g_disptab.h
 delete mode 100644 hw/dmx/glxProxy/g_renderswap.c
 delete mode 100644 hw/dmx/glxProxy/global.c
 delete mode 100644 hw/dmx/glxProxy/glxcmds.c
 delete mode 100644 hw/dmx/glxProxy/glxcmds.h
 delete mode 100644 hw/dmx/glxProxy/glxcmdsswap.c
 delete mode 100644 hw/dmx/glxProxy/glxcontext.h
 delete mode 100644 hw/dmx/glxProxy/glxdrawable.h
 delete mode 100644 hw/dmx/glxProxy/glxerror.h
 delete mode 100644 hw/dmx/glxProxy/glxext.c
 delete mode 100644 hw/dmx/glxProxy/glxext.h
 delete mode 100644 hw/dmx/glxProxy/glxfbconfig.c
 delete mode 100644 hw/dmx/glxProxy/glxfbconfig.h
 delete mode 100644 hw/dmx/glxProxy/glxscreens.c
 delete mode 100644 hw/dmx/glxProxy/glxscreens.h
 delete mode 100644 hw/dmx/glxProxy/glxserver.h
 delete mode 100644 hw/dmx/glxProxy/glxsingle.c
 delete mode 100644 hw/dmx/glxProxy/glxsingle.h
 delete mode 100644 hw/dmx/glxProxy/glxswap.c
 delete mode 100644 hw/dmx/glxProxy/glxswap.h
 delete mode 100644 hw/dmx/glxProxy/glxutil.h
 delete mode 100644 hw/dmx/glxProxy/glxvendor.c
 delete mode 100644 hw/dmx/glxProxy/glxvendor.h
 delete mode 100644 hw/dmx/glxProxy/glxvisuals.c
 delete mode 100644 hw/dmx/glxProxy/glxvisuals.h
 delete mode 100644 hw/dmx/glxProxy/meson.build
 delete mode 100644 hw/dmx/glxProxy/render2swap.c
 delete mode 100644 hw/dmx/glxProxy/renderpixswap.c
 delete mode 100644 hw/dmx/glxProxy/unpack.h
 delete mode 100644 hw/dmx/input/ChkNotMaskEv.c
 delete mode 100644 hw/dmx/input/ChkNotMaskEv.h
 delete mode 100644 hw/dmx/input/Makefile.am
 delete mode 100644 hw/dmx/input/Makefile.in
 delete mode 100644 hw/dmx/input/atKeynames.h
 delete mode 100644 hw/dmx/input/dmxarg.c
 delete mode 100644 hw/dmx/input/dmxarg.h
 delete mode 100644 hw/dmx/input/dmxbackend.c
 delete mode 100644 hw/dmx/input/dmxbackend.h
 delete mode 100644 hw/dmx/input/dmxcommon.c
 delete mode 100644 hw/dmx/input/dmxcommon.h
 delete mode 100644 hw/dmx/input/dmxconsole.c
 delete mode 100644 hw/dmx/input/dmxconsole.h
 delete mode 100644 hw/dmx/input/dmxdetach.c
 delete mode 100644 hw/dmx/input/dmxdummy.c
 delete mode 100644 hw/dmx/input/dmxdummy.h
 delete mode 100644 hw/dmx/input/dmxevents.c
 delete mode 100644 hw/dmx/input/dmxevents.h
 delete mode 100644 hw/dmx/input/dmxinputinit.c
 delete mode 100644 hw/dmx/input/dmxinputinit.h
 delete mode 100644 hw/dmx/input/dmxmap.c
 delete mode 100644 hw/dmx/input/dmxmap.h
 delete mode 100644 hw/dmx/input/dmxmotion.c
 delete mode 100644 hw/dmx/input/dmxmotion.h
 delete mode 100644 hw/dmx/input/dmxxinput.c
 delete mode 100644 hw/dmx/input/meson.build
 delete mode 100644 hw/dmx/input/usb-common.c
 delete mode 100644 hw/dmx/input/usb-common.h
 delete mode 100644 hw/dmx/input/usb-keyboard.c
 delete mode 100644 hw/dmx/input/usb-keyboard.h
 delete mode 100644 hw/dmx/input/usb-mouse.c
 delete mode 100644 hw/dmx/input/usb-mouse.h
 delete mode 100644 hw/dmx/input/usb-other.c
 delete mode 100644 hw/dmx/input/usb-other.h
 delete mode 100644 hw/dmx/input/usb-private.h
 delete mode 100644 hw/dmx/man/Makefile.am
 delete mode 100644 hw/dmx/man/Makefile.in
 delete mode 100644 hw/dmx/man/Xdmx.man
 delete mode 100644 hw/dmx/meson.build
 delete mode 100644 hw/kdrive/src/fourcc.h
 delete mode 100644 hw/xfree86/common/xf86Build.h.in
 delete mode 100755 hw/xfree86/common/xf86Build.sh
 create mode 100644 hw/xfree86/doc/meson.build
 create mode 100644 hw/xfree86/drivers/inputtest/Makefile.am
 rename hw/xfree86/{vbe => drivers/inputtest}/Makefile.in (70%)
 create mode 100644 hw/xfree86/drivers/inputtest/inputtestdrv.man
 create mode 100644 hw/xfree86/drivers/inputtest/meson.build
 create mode 100644 hw/xfree86/drivers/inputtest/xf86-input-inputtest-protocol.h
 create mode 100644 hw/xfree86/drivers/inputtest/xf86-input-inputtest.c
 rename hw/xfree86/{vbe => int10}/vbe.c (99%)
 rename hw/xfree86/{vbe => int10}/vbe.h (99%)
 rename hw/xfree86/{vbe => int10}/vbeModes.c (99%)
 rename hw/xfree86/{vbe => int10}/vbeModes.h (100%)
 delete mode 100644 hw/xfree86/modes/xf86cvt.c
 delete mode 100644 hw/xfree86/os-support/bsd/bsd_apm.c
 delete mode 100644 hw/xfree86/os-support/bsd/bsd_kqueue_apm.c
 delete mode 100644 hw/xfree86/ramdac/BT.c
 delete mode 100644 hw/xfree86/ramdac/BT.h
 delete mode 100644 hw/xfree86/ramdac/BTPriv.h
 delete mode 100644 hw/xfree86/ramdac/IBM.c
 delete mode 100644 hw/xfree86/ramdac/IBM.h
 delete mode 100644 hw/xfree86/ramdac/IBMPriv.h
 delete mode 100644 hw/xfree86/ramdac/TI.c
 delete mode 100644 hw/xfree86/ramdac/TI.h
 delete mode 100644 hw/xfree86/ramdac/TIPriv.h
 delete mode 100644 hw/xfree86/ramdac/xf86RamDac.c
 delete mode 100644 hw/xfree86/ramdac/xf86RamDac.h
 delete mode 100644 hw/xfree86/ramdac/xf86RamDacCmap.c
 delete mode 100644 hw/xfree86/ramdac/xf86RamDacPriv.h
 delete mode 100644 hw/xfree86/utils/cvt/Makefile.am
 delete mode 100644 hw/xfree86/utils/cvt/Makefile.in
 delete mode 100644 hw/xfree86/utils/cvt/cvt.c
 delete mode 100644 hw/xfree86/utils/man/cvt.man
 delete mode 100644 hw/xfree86/vbe/Makefile.am
 delete mode 100644 hw/xfree86/vbe/meson.build
 delete mode 100644 hw/xfree86/vbe/vbe_module.c
 create mode 100644 hw/xquartz/GL/meson.build
 create mode 100644 hw/xquartz/NSUserDefaults+XQuartzDefaults.h
 create mode 100644 hw/xquartz/NSUserDefaults+XQuartzDefaults.m
 create mode 100644 hw/xquartz/bundle/Resources/zh_TW.lproj/main.nib/keyedobjects-110000.nib
 create mode 100755 hw/xquartz/bundle/chown-bundle.sh
 create mode 100644 hw/xquartz/bundle/meson.build
 rename hw/xquartz/{bundle/Xquartz.plist => defaults.plist} (56%)
 create mode 100644 hw/xquartz/mach-startup/meson.build
 create mode 100644 hw/xquartz/pbproxy/meson.build
 create mode 100644 hw/xquartz/xpr/meson.build
 delete mode 100644 hw/xwayland/Makefile.am
 delete mode 100644 hw/xwayland/Makefile.in
 delete mode 100644 hw/xwayland/drm.xml
 delete mode 100644 hw/xwayland/meson.build
 delete mode 100644 hw/xwayland/xwayland-cursor.c
 delete mode 100644 hw/xwayland/xwayland-cvt.c
 delete mode 100644 hw/xwayland/xwayland-glamor-eglstream.c
 delete mode 100644 hw/xwayland/xwayland-glamor-gbm.c
 delete mode 100644 hw/xwayland/xwayland-glamor-xv.c
 delete mode 100644 hw/xwayland/xwayland-glamor.c
 delete mode 100644 hw/xwayland/xwayland-input.c
 delete mode 100644 hw/xwayland/xwayland-output.c
 delete mode 100644 hw/xwayland/xwayland-present.c
 delete mode 100644 hw/xwayland/xwayland-shm.c
 delete mode 100644 hw/xwayland/xwayland-vidmode.c
 delete mode 100644 hw/xwayland/xwayland.c
 delete mode 100644 hw/xwayland/xwayland.h
 create mode 100644 hw/xwin/winclipboard/internal.h
 delete mode 100644 hw/xwin/winwin32rootless.c
 delete mode 100644 hw/xwin/winwin32rootlesswindow.c
 delete mode 100644 hw/xwin/winwin32rootlesswndproc.c
 delete mode 100644 hw/xwin/winwindowswm.c
 rename {dix => include}/Xserver.d (100%)
 rename {hw/xfree86/common => include}/fourcc.h (90%)
 delete mode 100644 include/site.h
 delete mode 100644 include/xwayland-config.h.in
 delete mode 100644 include/xwayland-config.h.meson.in
 create mode 100644 mi/miinitext.h
 create mode 100644 miext/rootless/meson.build
 delete mode 100644 present/present_wnmd.c
 create mode 100644 test/damage/meson.build
 create mode 100644 test/damage/primitives.c
 create mode 100644 xfixes/disconnect.c

diff --git a/ChangeLog b/ChangeLog
index 37fa693..606405e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,2624 +1,10458 @@
-commit 6b767cdf6574081164aa6c6a7b617cda579b84c6
-Author: Matt Turner <mattst88@gmail.com>
-Date:   Tue Apr 13 10:01:34 2021 -0400
+commit af9111ac7fa399a5a33fbfa145060e1850f41e0e
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Tue Feb 7 10:30:37 2023 +1000
 
-    xserver 1.20.11
+    xserver 21.1.7
     
-    Signed-off-by: Matt Turner <mattst88@gmail.com>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
 
-commit a1a1aa2c14636284669b28a956d756d5705dcf15
-Author: Matthieu Herrb <matthieu@herrb.eu>
-Date:   Sun Mar 21 18:38:57 2021 +0100
+commit 9ca7d3f61a88ae6cf47fdf139b6215d745db976b
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Wed Jan 25 11:41:40 2023 +1000
 
-    Fix XChangeFeedbackControl() request underflow
+    Xi: fix potential use-after-free in DeepCopyPointerClasses
     
-    CVE-2021-3472 / ZDI-CAN-1259
+    CVE-2023-0494, ZDI-CAN-19596
     
     This vulnerability was discovered by:
     Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
     
-    Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    (cherry picked from commit 0ba6d8c37071131a49790243cdac55392ecf71ec)
+
+commit 4b925d388f76764dcb02dfd1cd7276262dcd7d74
+Author: Mike Gorse <mgorse@suse.com>
+Date:   Wed Jan 25 02:02:48 2023 +0000
 
-commit 8890c44a75304097667ac7d42e83e2d78b105cb5
+    dix: Use CopyPartialInternalEvent in EnqueueEvent
+    
+    The event might be a DeviceEvent allocated on the stack, in
+    AccessXKeyboardEvent for instance. Fixes out-of-bounds read.
+    
+    Signed-off-by: Mike Gorse <mgorse@suse.com>
+    (cherry picked from commit 2ef5ef57bd37a8bec2ac454053b283c6f87c3b40)
+
+commit 44d6c82ac82a78d904a6d47387ac363d9699b891
 Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-Date:   Sun Feb 21 21:49:58 2021 -0800
+Date:   Wed Jan 18 10:38:41 2023 -0800
 
-    xquartz: Remove a check for NSAppKitVersionNumber >= NSAppKitVersionNumber10_7
+    darwin: Implement DetermineClientCmd for macOS
     
-    This check is always true on our supported systems.
+    Withoug a proper implementation of DetermineClientCmd, clients that
+    connect via an ssh tunnel are miscategorized as local.  This results
+    in failures when we try to use SCM_RIGHTS (eg: in MIT-SHM).
     
+    Fixes: https://github.com/XQuartz/XQuartz/issues/314
     Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-    (cherry picked from commit 5ae47a9d579e8cb0fbe938455faea53ed75d7098)
+    (cherry picked from commit 0ea9b595891f2f31915538192961f3404d9ca699)
 
-commit 3c3680c366f78168e828e4a35d41a048c6e2bb54
+commit 1317083fbc407dc9dbb04ba5b98187b75222a16f
 Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-Date:   Sun Feb 21 21:49:14 2021 -0800
+Date:   Wed Jan 18 12:19:05 2023 -0800
 
-    xquartz: Don't include strndup.c any more since we no longer support 10.8 and older
+    os: Use LOCAL_PEERPID from sys/un.h if it is available to detemine the pid when falling back on getpeereids()
+    
+    This provides a way to determine the pid of a peer connection on
+    systems like darwin that do not support getpeerucred() nor
+    SO_PEERCRED.
     
     Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-    (cherry picked from commit b960675257d301605def6008bddcccb0980a3c4c)
+    (cherry picked from commit 8a4ab2287398773a4868c220662d93bf84ec6241)
 
-commit e1fdc856aedfcb4788011415930a0c6861df5123
+commit a6c49106cef36e84eb11d64e325465250b7678be
 Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-Date:   Sun Feb 21 20:58:42 2021 -0800
+Date:   Wed Jan 18 12:02:54 2023 -0800
 
-    xquartz: Add a launch trampoline to better integrate with modern versions of macOS
+    os: Update GetLocalClientCreds to prefer getpeerucred() or SO_PEERCRED over getpeereid()
+    
+    GetLocalClientCreds() was preferring getpeereid() above other implementations.
+    
+    getpeereid(), however, only returns the effective uid and gid of the peer,
+    leaving the pid unset.  When this happens, we are unable to use the pid to
+    determine the peer's command line arguments and incorrectly treat ssh-tunneled
+    traffic as local.
+    
+    To address this, we now prioritize getpeerucred() or SO_PEERCRED as those two
+    implementations will return the pid in addition to uid and gid.
     
-    Fixes: https://github.com/XQuartz/XQuartz/issues/6
     Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-    (cherry picked from commit 694724e42c4a3eadb32891220084b03504f9586b)
+    (cherry picked from commit 165d5c1260edcb998c5cf31d3969723c7452aa7f)
 
-commit 8f8e9c53e71ca58e8c23482d8f37687840371cda
+commit a220f53cb81248d06fb6f044c102c6ab8bffe2d5
 Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-Date:   Fri Feb 19 23:16:56 2021 -0800
+Date:   Wed Jan 18 10:44:27 2023 -0800
 
-    xquartz: Don't process AppKit events if we haven't finished initializing
+    os: Update AllocNewConnection() debug logging to include whether or not the client is local
     
     Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-    (cherry picked from commit 25035229b73742f9e6a96ac3e535b30b5c6196a8)
+    (cherry picked from commit 2577291f010e07173d0fc8b310ac355928f8ed7d)
 
-commit aa6f84021aaae145f54ebf98787e363e1c2022c6
+commit 07f9689507eee11bdbc2828ac1319fbde91ad27c
 Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-Date:   Sat Feb 20 17:24:14 2021 -0800
+Date:   Sun Nov 27 22:25:49 2022 -0800
 
-    xquartz: Allocate each fbconfig separately
-    
-    A change during the 1.20 development cycle resulted in fbconfigs being walked
-    and deallocated individually during __glXScreenDestroy.  This change
-    now avoids a use-after-free caused by that change.
+    Revert "meson: Don't build COMPOSITE for XQuartz"
     
-    ==50859==ERROR: AddressSanitizer: heap-use-after-free on address 0x00010d3819c8 at pc 0x0001009d4230 bp 0x00016feca7a0 sp 0x00016feca798
-    READ of size 8 at 0x00010d3819c8 thread T5
-        #0 0x1009d422c in __glXScreenDestroy glxscreens.c:448
-        #1 0x10091cc98 in __glXAquaScreenDestroy indirect.c:510
-        #2 0x1009d2734 in glxCloseScreen glxscreens.c:169
-        #3 0x100740a24 in dix_main main.c:325
-        #4 0x10023ed50 in server_thread quartzStartup.c:65
-        #5 0x199ae7fd0 in _pthread_start+0x13c (libsystem_pthread.dylib:arm64e+0x6fd0)
-        #6 0x199ae2d38 in thread_start+0x4 (libsystem_pthread.dylib:arm64e+0x1d38)
+    This will allow us to remove build-time conditionalization on COMPOSITE
+    while still allowing XQuartz to disable it and use ROOTLESS.
     
-    0x00010d3819c8 is located 200 bytes inside of 12800-byte region [0x00010d381900,0x00010d384b00)
-    freed by thread T5 here:
-        #0 0x101477ba8 in wrap_free+0x98 (libclang_rt.asan_osx_dynamic.dylib:arm64e+0x3fba8)
-        #1 0x1009d4240 in __glXScreenDestroy glxscreens.c:449
-        #2 0x10091cc98 in __glXAquaScreenDestroy indirect.c:510
-        #3 0x1009d2734 in glxCloseScreen glxscreens.c:169
-        #4 0x100740a24 in dix_main main.c:325
-        #5 0x10023ed50 in server_thread quartzStartup.c:65
-        #6 0x199ae7fd0 in _pthread_start+0x13c (libsystem_pthread.dylib:arm64e+0x6fd0)
-        #7 0x199ae2d38 in thread_start+0x4 (libsystem_pthread.dylib:arm64e+0x1d38)
+    This reverts commit 5f2d652377995c0c0c3cf07463b5018450661d13
     
-    previously allocated by thread T5 here:
-        #0 0x101477e38 in wrap_calloc+0x9c (libclang_rt.asan_osx_dynamic.dylib:arm64e+0x3fe38)
-        #1 0x100925a40 in __glXAquaCreateVisualConfigs visualConfigs.c:116
-        #2 0x10091cb24 in __glXAquaScreenProbe+0x224 (X11.bin:arm64+0x100730b24)
-        #3 0x1009cd840 in xorgGlxServerInit glxext.c:528
-        #4 0x10074539c in _CallCallbacks dixutils.c:743
-        #5 0x100932a70 in CallCallbacks callback.h:83
-        #6 0x100932478 in GlxExtensionInit vndext.c:244
-        #7 0x10020a364 in InitExtensions miinitext.c:267
-        #8 0x10073fe7c in dix_main main.c:197
-        #9 0x10023ed50 in server_thread quartzStartup.c:65
-        #10 0x199ae7fd0 in _pthread_start+0x13c (libsystem_pthread.dylib:arm64e+0x6fd0)
-        #11 0x199ae2d38 in thread_start+0x4 (libsystem_pthread.dylib:arm64e+0x1d38)
+    (cherry picked from commit 66e7b7349dffda6fef51ed029fdc91b787ca4c08)
+
+commit 8ea43dd8bf8f8f2cb82a2a1f2c004ee873e7810d
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Sun Nov 27 22:23:43 2022 -0800
+
+    xquartz: Disable COMPOSITE at runtime
     
-    Regressed-in: 4b0a3cbab131eb453e2b3fc0337121969258a7be
-    CC: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
     Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-    (cherry picked from commit 487286d47260782d331229af10df17711cbca1ea)
+    (cherry picked from commit 2567388a2957cef526df1b7efb2684aa74feb641)
 
-commit 7aa51bb5728f001bdffdca7f669db1678d903160
+commit aa0d8d440c39beb276cd26723d822728ce394e01
 Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-Date:   Sat Feb 20 15:17:18 2021 -0800
+Date:   Tue Jan 17 07:33:19 2023 -0800
 
-    xquartz: Fix a compiler warning about const incompatible pointer assignment
+    xquartz: Update the about box copyright to 2023
     
-    driWrap.c:541:30: error: assigning to 'GCOps *' (aka 'struct _GCOps *') from 'const GCOps *' (aka 'const struct _GCOps *') discards
-          qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
-            pGCPriv->originalOps = pGC->ops;
-                                 ^ ~~~~~~~~
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+    (cherry picked from commit 15077090d371a2679d274c5d129a3102762d18ec)
+
+commit 8feba178f8b73b983033c197c384c580a6397a41
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Sat Jan 14 23:33:59 2023 -0800
+
+    xquartz: Fix building with autoconf
     
+    Regressed-in: 5d302c378d9d21b34db2434425b766ac4f05de89
     Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-    (cherry picked from commit 6a83fb51b7a8b2e167e7d6380229b69e5452f91f)
 
-commit d751c46bd7ce1f350df04cfc9ec9f3ba73058ccd
+commit c8ef9e38187e00dbaf956893f987e15e8f42f61c
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Tue Jul 12 14:44:48 2022 +0200
+
+    dix: Fix overzealous caching of ResourceClientBits()
+    
+    Commit c7311654 cached the value of ResourceClientBits(), but that value
+    depends on the `MaxClients` value set either from the command line or
+    from the configuration file.
+    
+    For the latter, a call to ResourceClientBits() is issued before the
+    configuration file is read, meaning that the cached value is from the
+    default, not from the maximum number of clients set in the configuration
+    file.
+    
+    That obviously causes all sort of issues, including memory corruption
+    and crashes of the Xserver when reaching the default limit value.
+    
+    To avoid that issue, also keep the LimitClient value, and recompute the
+    ilog2() value if that changes, as on startup when the value is set from
+    the the xorg.conf ServerFlags section.
+    
+    v2: Drop the `cache == 0` test
+        Rename cache vars
+    
+    Fixes: c7311654 - dix: cache ResourceClientBits() value
+    Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1310
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+    (cherry picked from commit 2efa6d659508346358a1ef27b2393e18843f66a3)
+
+commit a0216de2367429788be4ef430026ada215106ff5
 Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-Date:   Thu Feb 18 23:16:15 2021 -0800
+Date:   Wed Dec 14 23:45:13 2022 -0800
 
-    xquartz: Fix build with sparkle enabled
+    rootless: Add additional debug logging to help triage XQuartz fb/rootless/damage crashes
     
     Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-    (cherry picked from commit a3ddcdd56c246e2226c7cdf372c2a1294eb6d888)
+    (cherry picked from commit 07ed1a623a4b36cdb741a322008ba53d913dc765)
 
-commit 03c2e12a82e772461e069addbafdecdfff029ca5
+commit 264272f3d76e4f1e50d984640c57de77aca9ba37
 Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-Date:   Thu Feb 18 12:43:53 2021 -0800
+Date:   Wed Dec 14 17:07:46 2022 -0800
 
-    xquartz: Silence a compiler warning about missing internal methods on NSApplication
+    xquartz: Use xorg_backtrace() instead of rolling our own for debugging
     
     Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-    (cherry picked from commit 279bcbd9cf9e557a6789d6e4cede8e8799c3788e)
+    (cherry picked from commit d1a9a50792110683ae3f993eeeffeee79cf9cbce)
 
-commit fcbd57367ef2daa125d7acbbf00953477f9dc5cc
+commit 20f380c6d93be3ef561251584163d1fe1ae2d966
 Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-Date:   Thu Feb 18 22:19:21 2021 -0800
+Date:   Wed Dec 21 01:18:11 2022 -0800
 
-    xquartz: Rewrite Window menu handling to not depend on X11App.windowsMenu.numberOfItems being correct in -awakeFromNib
+    xquartz: Ignore SIGPIPE at process launch
     
-    Fixes: https://github.com/XQuartz/XQuartz/issues/56
     Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-    (cherry picked from commit fe89c70e472a9da0541b798eea60c5362b49a99d)
+    (cherry picked from commit 9a66690eaf67c19b90e07f39b16436d34b59e27a)
+
+commit 59b6fc88ed9f4b22397a568c2483e4c558856ffa
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Mon Dec 19 10:46:20 2022 +0100
+
+    xserver 21.1.6
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+
+commit b7760d41c177983c2f2fca2ebdb8105628291720
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Mon Dec 19 10:06:45 2022 +1000
+
+    Xext: fix invalid event type mask in XTestSwapFakeInput
+    
+    In commit b320ca0 the mask was inadvertently changed from octal 0177 to
+    hexadecimal 0x177.
+    
+    Fixes commit b320ca0ffe4c0c872eeb3a93d9bde21f765c7c63
+      Xtest: disallow GenericEvents in XTestSwapFakeInput
+    
+    Found by Stuart Cassoff
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    (cherry picked from commit bb1711b7fba42f2a0c7d1c09beee241a1b2bcc30)
+
+commit 69ab3bcaa0f6a5adef6ec19161eb856a4744b32c
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Wed Jul 13 11:23:09 2022 +1000
+
+    xkb: fix some possible memleaks in XkbGetKbdByName
+    
+    GetComponentByName returns an allocated string, so let's free that if we
+    fail somewhere.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    (cherry picked from commit 18f91b950e22c2a342a4fbc55e9ddf7534a707d2)
 
-commit b27c6602b39e02aa7ef25ea03b59ef499fc3dc1e
+commit 5dbb2b52cfeab212b5c9b7e344692a6384efdc4c
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Tue Jul 5 12:06:20 2022 +1000
+
+    xkb: proof GetCountedString against request length attacks
+    
+    GetCountedString did a check for the whole string to be within the
+    request buffer but not for the initial 2 bytes that contain the length
+    field. A swapped client could send a malformed request to trigger a
+    swaps() on those bytes, writing into random memory.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    (cherry picked from commit 11beef0b7f1ed290348e45618e5fa0d2bffcb72e)
+
+commit becf9d51c33a21e7700b18bb2324f466bb966de5
 Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-Date:   Thu Feb 18 15:41:29 2021 -0800
+Date:   Wed Dec 14 00:13:34 2022 -0800
 
-    xquartz: Convert X11Controller ivars into @properties
+    xquartz: Fix some formatting
     
     Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-    (cherry picked from commit 41aed8f69634ec61ea0e40fff1cfdaf868be843e)
 
-commit 625c7e4deced7e57a724b05750a92586a2785ff0
+commit 61d18bed664769b1d94ea1320e27f71560a01af2
+Author: John D Pell <John+git@gaelicWizard.net>
+Date:   Tue Jul 13 23:46:28 2021 -0700
+
+    XQuartz: stub: Call LSOpenApplication instead of fork()/exec()
+    
+    Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+
+commit f292fbfaac0c653ee49bbb24deb3add2b5da602f
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Wed Dec 14 11:34:41 2022 +1000
+
+    xserver 21.1.5
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit e860bbce4fdb169e84033529331ae2666e679de7
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Mon Dec 5 15:55:54 2022 +1000
+
+    xkb: reset the radio_groups pointer to NULL after freeing it
+    
+    Unlike other elements of the keymap, this pointer was freed but not
+    reset. On a subsequent XkbGetKbdByName request, the server may access
+    already freed memory.
+    
+    CVE-2022-4283, ZDI-CAN-19530
+    
+    This vulnerability was discovered by:
+    Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
+    (cherry picked from commit ccdd431cd8f1cabae9d744f0514b6533c438908c)
+
+commit 8a1fa008b2f90abce6cabb27d9bc2ed76d07b678
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Tue Nov 29 13:26:57 2022 +1000
+
+    Xi: avoid integer truncation in length check of ProcXIChangeProperty
+    
+    This fixes an OOB read and the resulting information disclosure.
+    
+    Length calculation for the request was clipped to a 32-bit integer. With
+    the correct stuff->num_items value the expected request size was
+    truncated, passing the REQUEST_FIXED_SIZE check.
+    
+    The server then proceeded with reading at least stuff->num_items bytes
+    (depending on stuff->format) from the request and stuffing whatever it
+    finds into the property. In the process it would also allocate at least
+    stuff->num_items bytes, i.e. 4GB.
+    
+    The same bug exists in ProcChangeProperty and ProcXChangeDeviceProperty,
+    so let's fix that too.
+    
+    CVE-2022-46344, ZDI-CAN 19405
+    
+    This vulnerability was discovered by:
+    Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
+    (cherry picked from commit 8f454b793e1f13c99872c15f0eed1d7f3b823fe8)
+
+commit 40f431de8a76f737c68ae659fee8472583f15e49
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Tue Nov 29 13:24:00 2022 +1000
+
+    Xi: return an error from XI property changes if verification failed
+    
+    Both ProcXChangeDeviceProperty and ProcXIChangeProperty checked the
+    property for validity but didn't actually return the potential error.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
+    (cherry picked from commit b8a84cb0f2807b07ab70ca9915fcdee21301b8ca)
+
+commit d6c7de9eadca980c8ce3b3b7752b67bfa95e6f31
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Tue Nov 29 14:53:07 2022 +1000
+
+    Xext: free the screen saver resource when replacing it
+    
+    This fixes a use-after-free bug:
+    
+    When a client first calls ScreenSaverSetAttributes(), a struct
+    ScreenSaverAttrRec is allocated and added to the client's
+    resources.
+    
+    When the same client calls ScreenSaverSetAttributes() again, a new
+    struct ScreenSaverAttrRec is allocated, replacing the old struct. The
+    old struct was freed but not removed from the clients resources.
+    
+    Later, when the client is destroyed the resource system invokes
+    ScreenSaverFreeAttr and attempts to clean up the already freed struct.
+    
+    Fix this by letting the resource system free the old attrs instead.
+    
+    CVE-2022-46343, ZDI-CAN 19404
+    
+    This vulnerability was discovered by:
+    Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
+    (cherry picked from commit 842ca3ccef100ce010d1d8f5f6d6cc1915055900)
+
+commit 67927cc41f452228188bbe2aa34a9ee4a9ce0c6b
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Wed Nov 30 11:20:40 2022 +1000
+
+    Xext: free the XvRTVideoNotify when turning off from the same client
+    
+    This fixes a use-after-free bug:
+    
+    When a client first calls XvdiSelectVideoNotify() on a drawable with a
+    TRUE onoff argument, a struct XvVideoNotifyRec is allocated. This struct
+    is added twice to the resources:
+      - as the drawable's XvRTVideoNotifyList. This happens only once per
+        drawable, subsequent calls append to this list.
+      - as the client's XvRTVideoNotify. This happens for every client.
+    
+    The struct keeps the ClientPtr around once it has been added for a
+    client. The idea, presumably, is that if the client disconnects we can remove
+    all structs from the drawable's list that match the client (by resetting
+    the ClientPtr to NULL), but if the drawable is destroyed we can remove
+    and free the whole list.
+    
+    However, if the same client then calls XvdiSelectVideoNotify() on the
+    same drawable with a FALSE onoff argument, only the ClientPtr on the
+    existing struct was set to NULL. The struct itself remained in the
+    client's resources.
+    
+    If the drawable is now destroyed, the resource system invokes
+    XvdiDestroyVideoNotifyList which frees the whole list for this drawable
+    - including our struct. This function however does not free the resource
+    for the client since our ClientPtr is NULL.
+    
+    Later, when the client is destroyed and the resource system invokes
+    XvdiDestroyVideoNotify, we unconditionally set the ClientPtr to NULL. On
+    a struct that has been freed previously. This is generally frowned upon.
+    
+    Fix this by calling FreeResource() on the second call instead of merely
+    setting the ClientPtr to NULL. This removes the struct from the client
+    resources (but not from the list), ensuring that it won't be accessed
+    again when the client quits.
+    
+    Note that the assignment tpn->client = NULL; is superfluous since the
+    XvdiDestroyVideoNotify function will do this anyway. But it's left for
+    clarity and to match a similar invocation in XvdiSelectPortNotify.
+    
+    CVE-2022-46342, ZDI-CAN 19400
+    
+    This vulnerability was discovered by:
+    Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
+    (cherry picked from commit b79f32b57cc0c1186b2899bce7cf89f7b325161b)
+
+commit a6c0d7b142e762a6b9934a23e060ea91ff5afcea
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Tue Nov 29 13:55:32 2022 +1000
+
+    Xi: disallow passive grabs with a detail > 255
+    
+    The XKB protocol effectively prevents us from ever using keycodes above
+    255. For buttons it's theoretically possible but realistically too niche
+    to worry about. For all other passive grabs, the detail must be zero
+    anyway.
+    
+    This fixes an OOB write:
+    
+    ProcXIPassiveUngrabDevice() calls DeletePassiveGrabFromList with a
+    temporary grab struct which contains tempGrab->detail.exact = stuff->detail.
+    For matching existing grabs, DeleteDetailFromMask is called with the
+    stuff->detail value. This function creates a new mask with the one bit
+    representing stuff->detail cleared.
+    
+    However, the array size for the new mask is 8 * sizeof(CARD32) bits,
+    thus any detail above 255 results in an OOB array write.
+    
+    CVE-2022-46341, ZDI-CAN 19381
+    
+    This vulnerability was discovered by:
+    Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
+    (cherry picked from commit 51eb63b0ee1509c6c6b8922b0e4aa037faa6f78b)
+
+commit 936d34bdff4c479ccd0405fc221ff8e4c6c7014d
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Tue Nov 29 12:55:45 2022 +1000
+
+    Xtest: disallow GenericEvents in XTestSwapFakeInput
+    
+    XTestSwapFakeInput assumes all events in this request are
+    sizeof(xEvent) and iterates through these in 32-byte increments.
+    However, a GenericEvent may be of arbitrary length longer than 32 bytes,
+    so any GenericEvent in this list would result in subsequent events to be
+    misparsed.
+    
+    Additional, the swapped event is written into a stack-allocated struct
+    xEvent (size 32 bytes). For any GenericEvent longer than 32 bytes,
+    swapping the event may thus smash the stack like an avocado on toast.
+    
+    Catch this case early and return BadValue for any GenericEvent.
+    Which is what would happen in unswapped setups anyway since XTest
+    doesn't support GenericEvent.
+    
+    CVE-2022-46340, ZDI-CAN 19265
+    
+    This vulnerability was discovered by:
+    Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
+    (cherry picked from commit b320ca0ffe4c0c872eeb3a93d9bde21f765c7c63)
+
+commit 5f2d652377995c0c0c3cf07463b5018450661d13
 Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-Date:   Thu Feb 18 14:39:46 2021 -0800
+Date:   Sun Nov 27 15:04:13 2022 -0800
 
-    xquartz: Convert X11Application ivars into @properties
+    meson: Don't build COMPOSITE for XQuartz
     
     Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-    (cherry picked from commit c2750e1fab774c8e6675ecf284124ff55b5be9cf)
+    (cherry picked from commit 9c0373366988cc0b909ba31e61c43cc46e054b40)
 
-commit 3017fec60581c1ab32ad3d6768baf04179fda5e2
+commit 3dee0aac2c0ed4538880b65ee528e4633d103592
 Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-Date:   Thu Feb 18 14:47:50 2021 -0800
+Date:   Thu Nov 24 10:58:26 2022 -0800
 
-    xquartz: Fold quartzCommon.h into quartz.h
+    xquartz: Move default applications list outside of the main executable
     
-    Everything declared in it comes from quartz.c, so match reality.
+    This will allow side-wide customization.
     
+    Fixes: https://github.com/XQuartz/XQuartz/issues/274
     Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-    (cherry picked from commit f51b97b0de2e562e341f2d72c5f00a74c71a159f)
+    (cherry picked from commit e654de80ed560c480efc072d876808b1d78da052)
 
-commit bdaff44f98587fd0112f3d86a461ee3ce190277c
+commit 5d302c378d9d21b34db2434425b766ac4f05de89
 Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-Date:   Thu Feb 18 13:00:43 2021 -0800
+Date:   Thu Nov 24 11:04:08 2022 -0800
 
-    xquartz: Fold away some unnecessary hops to X11Controller through X11Application
+    xquartz: Remove unused macro (X11LIBDIR)
     
     Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-    (cherry picked from commit 4b4500c48f06e7ef41cd94f417e49b3f4f1412ae)
+    (cherry picked from commit 3dbd809c0e2d8da4191dd4a3fd4abdd14be0d838)
+
+commit 6bf62381d0a1fb54226a10f9d0e6b03aff12f3aa
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Tue Jul 12 16:09:23 2022 +0300
+
+    xserver 21.1.4
+
+commit 06b23cccb1166fcccc2f5fe7259b3ef9e1d0f32e
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Tue Jul 5 11:11:06 2022 +1000
+
+    xkb: add request length validation for XkbSetGeometry
+    
+    No validation of the various fields on that report were done, so a
+    malicious client could send a short request that claims it had N
+    sections, or rows, or keys, and the server would process the request for
+    N sections, running out of bounds of the actual request data.
+    
+    Fix this by adding size checks to ensure our data is valid.
+    
+    ZDI-CAN 16062, CVE-2022-2319.
+    
+    This vulnerability was discovered by:
+    Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    (cherry picked from commit 6907b6ea2b4ce949cb07271f5b678d5966d9df42)
+
+commit e3a530540f2f13739b0233ec51d7a3985a7ec4be
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Tue Jul 5 09:50:41 2022 +1000
+
+    xkb: swap XkbSetDeviceInfo and XkbSetDeviceInfoCheck
+    
+    XKB often uses a FooCheck and Foo function pair, the former is supposed
+    to check all values in the request and error out on BadLength,
+    BadValue, etc. The latter is then called once we're confident the values
+    are good (they may still fail on an individual device, but that's a
+    different topic).
+    
+    In the case of XkbSetDeviceInfo, those functions were incorrectly
+    named, with XkbSetDeviceInfo ending up as the checker function and
+    XkbSetDeviceInfoCheck as the setter function. As a result, the setter
+    function was called before the checker function, accessing request
+    data and modifying device state before we ensured that the data is
+    valid.
+    
+    In particular, the setter function relied on values being already
+    byte-swapped. This in turn could lead to potential OOB memory access.
+    
+    Fix this by correctly naming the functions and moving the length checks
+    over to the checker function. These were added in 87c64fc5b0 to the
+    wrong function, probably due to the incorrect naming.
+    
+    Fixes ZDI-CAN 16070, CVE-2022-2320.
+    
+    This vulnerability was discovered by:
+    Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
+    
+    Introduced in c06e27b2f6fd9f7b9f827623a48876a225264132
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    (cherry picked from commit dd8caf39e9e15d8f302e54045dd08d8ebf1025dc)
+
+commit e75840565775dc95b848b366aeed44066a9d8a28
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Tue Jul 5 12:40:47 2022 +1000
+
+    xkb: switch to array index loops to moving pointers
+    
+    Most similar loops here use a pointer that advances with each loop
+    iteration, let's do the same here for consistency.
+    
+    No functional changes.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
+    (cherry picked from commit f1070c01d616c5f21f939d5ebc533738779451ac)
 
-commit 7d22031a6bd949f9357904310422901515a5ace7
+commit f3d9c6ff12b5a8a1a9f316b096d5573060747ff9
 Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-Date:   Thu Feb 18 09:41:30 2021 -0800
+Date:   Mon Jul 4 14:16:43 2022 -0700
 
-    xquartz: Fold away array_with_strings_and_numbers and simplify with more modern Objective-C
+    xquartz: Add missing files to distribution tarball
     
+    Fixes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1346
     Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-    (cherry picked from commit 39c0e1c0ab6a0a89a71f26446973c779ca7fd927)
 
-commit 937b63ff44edecc58ef020a0bfa453d98332482c
+commit 147c17fc786c268ec51dc0f0655e69f6493f7ef2
 Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-Date:   Thu Feb 18 09:33:56 2021 -0800
+Date:   Sat Jul 2 14:15:50 2022 -0700
 
-    xqaurtz: Remove message_kit_thread() and use dispatch instead
+    XQuartz: Improve type safety for X11Controller's application menu editor
     
     Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-    (cherry picked from commit 87f8fe1f74f10faf0ffc84f03539799ad4c2465e)
+    (cherry picked from commit 4cfdc5af31ae8282903d0f65cff858330b9f9d1a)
 
-commit e531d3a4cbca1a689189fe512fed7d7aeb84de34
+commit 9e2fc7e2484be7c577ee5baf3765734beef9adc2
 Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-Date:   Wed Feb 17 23:58:53 2021 -0800
+Date:   Sat Jul 2 14:17:18 2022 -0700
 
-    xquartz: Use objc_autoreleasePoolPush / objc_autoreleasePoolPop directly in QuartzBlockHandler
+    xquartz: Fix a possible crash when editing the Application menu due to mutaing immutable arrays
     
-    It violates @autoreleasepool best practices, and this helps collapse quartzCocoa.m into quartz.c
+    Crashing on exception: -[__NSCFArray replaceObjectAtIndex:withObject:]: mutating method sent to immutable object
+    
+    Application Specific Backtrace 0:
+    0   CoreFoundation                      0x00007ff80d2c5e9b __exceptionPreprocess + 242
+    1   libobjc.A.dylib                     0x00007ff80d027e48 objc_exception_throw + 48
+    2   CoreFoundation                      0x00007ff80d38167b _CFThrowFormattedException + 194
+    3   CoreFoundation                      0x00007ff80d382a25 -[__NSCFArray removeObjectAtIndex:].cold.1 + 0
+    4   CoreFoundation                      0x00007ff80d2e6c0b -[__NSCFArray replaceObjectAtIndex:withObject:] + 119
+    5   X11.bin                             0x00000001003180f9 -[X11Controller tableView:setObjectValue:forTableColumn:row:] + 169
     
+    Fixes: https://github.com/XQuartz/XQuartz/issues/267
     Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-    (cherry picked from commit 94e4e173486c2a94ddcfd2d0515e1ee6731f6656)
+    (cherry picked from commit dfd057996b26420309c324ec844a5ba6dd07eda3)
 
-commit 08cf6c90fdc31a563843dceeae3caeb8840951da
+commit 86ace20398a6c559e89213622538134b72e448b1
 Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-Date:   Wed Feb 17 22:04:55 2021 -0800
+Date:   Fri Jul 1 14:26:06 2022 -0700
 
-    xquartz: Minor code modernization -- @autoreleasepool adoption
+    xquartz: Use correct defines when building to support Sparkle updates
     
     Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-    (cherry picked from commit fba421f700498fa382089df47942df36a2d75ce6)
+    (cherry picked from commit aa636b97c66343b25e508b9c73d8505e8c11b1d9)
 
-commit 26e0c59a970229b343d00e6343436cbde2ce6354
-Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-Date:   Wed Feb 17 20:55:06 2021 -0800
+commit 855b96a85bc0711460a2542573a9a3959d1bfefa
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Sun Dec 19 16:51:39 2021 +0200
 
-    xquartz: Remove some dead code for compatibility with older nibs
+    xfree86: Fix event data alignment in inputtest driver
     
-    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-    (cherry picked from commit 318f8a4a8a47a0ce4bbbf4290469e933602c9b30)
+    This fixes address sanitizer errors when running unit tests. The
+    additional copying may reduce performance by a small amount, but we
+    don't care about that because this driver is used for testing only.
+    
+    Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
+    (cherry picked from commit 7d2014e7d523e10623203582b9f573303750f087)
+
+commit 9d05ee10c231edacc69b342677ae8c3cc32f97e5
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Sun Jan 16 10:42:15 2022 +0200
+
+    dix: Don't send touch end to clients that do async grab without touches
+    
+    GTK3 menu widget creates a selection for touch and other events and
+    after receiving touch events creates an async grab that excludes touch
+    events. Unfortunately it relies on X server not sending the touch end
+    event in order to function properly. Sending touch end event will cause
+    it to think that the initiating touch ended and when it actually ends,
+    the ButtonRelease event will make it think that the menu should be
+    closed. As a result, the menu will be open only for the duration of the
+    touch making it useless.
+    
+    This commit reverts f682e0563f736ed2c2c612ed575e05b6e3db945e.
+    
+    Fixes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1255
+    
+    Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
+    (cherry picked from commit 43e934a19f644cddedae73602e86429c9dc5074a)
+
+commit b713e717c34d539486f661c03a0f1b35b3208d21
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Sun Jan 23 22:18:52 2022 +0200
+
+    dix: Correctly save replayed event into GrabInfoRec
+    
+    When processing events we operate on InternalEvent pointers. They may
+    actually refer to a an instance of DeviceEvent, GestureEvent or any
+    other event that comprises the InternalEvent union. This works well in
+    practice because we always look into event type before doing anything,
+    except in the case of copying the event.
+    
+    *dst_event = *src_event would copy whole InternalEvent event and would
+    cause out of bounds read in case the pointed to event was not
+    InternalEvent but e.g. DeviceEvent.
+    
+    This regression has been introduced in
+    23a8b62d34344575f9df9d057fb74bfefa94a77b.
+    
+    Fixes https://gitlab.freedesktop.org/xorg/xserver/-/issues/1261
+    
+    Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
+    (cherry picked from commit 6ef5c05728f8b18170fbc8415d7502495a08670b)
+
+commit cd3d21d8c44a35c22b7eca61a58bb5620b116102
+Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
+Date:   Wed Jan 26 00:05:55 2022 +0100
+
+    xkb: fix XkbSetMap when changing a keysym without changing a keytype
+    
+    As the comment says:
+    
+    "symsPerKey/mapWidths must be filled regardless of client-side flags"
+    
+    so we always have to call CheckKeyTypes which will notably fill mapWidths
+    and nTypes. That is needed for CheckKeySyms to work since it checks the
+    width. Without it, any request with XkbKeySymsMask but not
+    XkbKeyTypesMask will fail because of the missing width information, for
+    instance this:
+    
+      XkbDescPtr xkb;
+      if (!(xkb = XkbGetMap (dpy, XkbKeyTypesMask|XkbKeySymsMask, XkbUseCoreKbd))) {
+        fprintf (stderr, "ERROR getting map\n");
+        exit(1);
+      }
+      XFlush (dpy);
+      XSync (dpy, False);
+    
+      XkbMapChangesRec changes = { .changed = 0 };
+      int oneGroupType[XkbNumKbdGroups] = { XkbOneLevelIndex };
+    
+      if (XkbChangeTypesOfKey(xkb, keycode, 1, XkbGroup1Mask, oneGroupType, &changes)) {
+        fprintf(stderr, "ERROR changing type of key\n");
+        exit(1);
+      }
+      XkbKeySymEntry(xkb,keycode,0,0) = keysym;
+    
+      if (!XkbChangeMap(dpy,xkb,&changes)) {
+        fprintf(stderr, "ERROR changing map\n");
+        exit(1);
+      }
+    
+      XkbFreeKeyboard (xkb, 0, TRUE);
+      XFlush (dpy);
+      XSync (dpy, False);
+    
+    This had being going under the radar since about ever until commit
+    de940e06f8733d87bbb857aef85d830053442cfe ("xkb: fix key type index check
+    in _XkbSetMapChecks") fixed checking the values of kt_index, which was
+    previously erroneously ignoring errors and ignoring all other checks, just
+    because nTypes was not set, precisely because CheckKeyTypes was not called.
+    
+    Note: yes, CheckKeyTypes is meant to be callable without XkbKeyTypesMask, it
+    does properly check for that and just fills nTypes and mapWidths in that
+    case.
+    
+    Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
+    (cherry picked from commit 0217cc6e0cf5013366105a90f5f91ccc4bab5425)
+
+commit f575524314e9f20a1ff639f6bd65386cdbd083f4
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Thu Feb 3 20:04:52 2022 +0200
+
+    Revert "os: Try to discover the current seat with the XDG_SEAT var first"
+    
+    This reverts commit b27eaa72837eebe80adfe6c257a71a6b9eaf66ee.
 
-commit 2853f38965f521cafb8991737db1c655960acc72
+commit 419fbf639d8f53d39449c157a9554bd5482ed64f
 Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-Date:   Thu Feb 18 16:05:34 2021 -0800
+Date:   Sun Jun 26 10:31:54 2022 -0700
 
-    xquartz: Remove a workaround for AppKit versions older than Lion
+    XQuartz: Add TCC reason keys to Info.plist
     
     Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-    (cherry picked from commit 72a39dccf99191fbfbb4b399c446fd017d55f24e)
+    (cherry picked from commit 9ce7264889e36fddbdf6bac332225ad6f628ad5d)
 
-commit 1edc9b980b49e6f9c79f90b7045f9f94c5553247
+commit 66ac50090dd191f1b16daf338ca3b46d9147fbbd
 Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-Date:   Thu Feb 18 22:26:08 2021 -0800
+Date:   Sun Jun 26 02:40:20 2022 -0700
 
-    xquartz: Apply spell check fixes from master for easier cherry-picking of changes in xquartz
+    XQuartz: Build the bundle trampoline when using meson
+    
+    This brings the change for e1fdc856aedfcb4788011415930a0c6861df5123 into meson based builds
     
-    See also: 23e83724df4809fd7857cc609c33ce7e8d3021a4
     Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+    (cherry picked from commit b00cf4aef881e00533f995c141c3586749cd7ca1)
 
-commit 67f25cc1870a587f0e687da9f1281031b6543533
+commit 033d93a021e86dd5ce9b2b3a1554a72c7031a7f2
 Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-Date:   Wed Feb 17 15:45:45 2021 -0800
+Date:   Mon Jun 20 17:08:53 2022 -0700
 
-    xquartz: Fix applications menu table background color for dark mode
+    meson: Support building Xnest and Xorg on darwin
     
-    Fixes: https://github.com/XQuartz/XQuartz/issues/32
     Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-    (cherry picked from commit 7e2875035800887f3f41f75cba4299088daf939a)
+    (cherry picked from commit ef8101560eefd6160df6d4b57ddb65ea2328c441)
 
-commit 4028c2ad14a71e6b0c8a892a154f1a50736f2dd5
+commit 433f53a1a08390a038176b7c1207512cf1dd3f44
 Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-Date:   Wed Feb 17 15:16:26 2021 -0800
+Date:   Mon Jun 20 20:19:06 2022 -0700
 
-    xquartz: Apply Xcode 12.4 automatic updates to nibs
+    tests: Fix build failure from missing micmap.c
+    
+    FAILED: test/tests
+    clang  -o test/tests test/tests.p/.._mi_miinitext.c.o test/tests.p/fixes.c.o test/tests.p/input.c.o test/tests.p/list.c.o test/tests.p/misc.c.o test/tests.p/signal-logging.c.o test/tests.p/string.c.o test/tests.p/test_xkb.c.o test/tests.p/tests-common.c.o test/tests.p/tests.c.o test/tests.p/touch.c.o test/tests.p/xfree86.c.o test/tests.p/xtest.c.o test/tests.p/hashtabletest.c.o -Wl,-dead_strip_dylibs -Wl,-headerpad_max_install_names -Wl,-undefined,error -fvisibility=hidden -O0 -g3 -gdwarf-2 -mmacosx-version-min=10.9 -Werror=unguarded-availability-new -Werror=format -Werror=objc-method-access -Werror=incompatible-pointer-types -F/Applications/Utilities/XQuartz.app/Contents/Frameworks -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.13.sdk -arch x86_64 -O0 -g3 -gdwarf-2 -mmacosx-version-min=10.9 -Werror=unguarded-availability-new -Werror=format -Werror=objc-method-access -Werror=incompatible-pointer-types -F/Applications/Utilities/XQuartz.app/Contents/Frameworks -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.13.sdk -arch x86_64 -Wl,-rpath,/opt/X11/lib mi/liblibxserver_mi.a dix/liblibxserver_dix.a composite/liblibxserver_composite.a damageext/liblibxserver_damageext.a dbe/liblibxserver_dbe.a randr/liblibxserver_randr.a miext/damage/liblibxserver_miext_damage.a render/liblibxserver_render.a present/liblibxserver_present.a Xext/liblibxserver_xext.a miext/sync/liblibxserver_miext_sync.a xfixes/liblibxserver_xfixes.a Xi/liblibxserver_xi.a xkb/liblibxserver_xkb.a record/liblibxserver_record.a os/liblibxserver_os.a os/liblibxlibc.a glx/liblibglxvnd.a hw/xfree86/common/libxorg_common.a hw/xfree86/loader/libxorg_loader.a hw/xfree86/ddc/libxorg_ddc.a hw/xfree86/xkb/libxorg_xkb.a hw/xfree86/i2c/libxorg_i2c.a hw/xfree86/modes/libxorg_modes.a hw/xfree86/os-support/libxorg_os_support.a hw/xfree86/parser/libxorg_parser.a hw/xfree86/ramdac/libxorg_ramdac.a fb/liblibxserver_fb.a Xext/liblibxserver_xext_vidmode.a dix/liblibxserver_main.a config/liblibxserver_config.a /opt/X11/lib/libpixman-1.dylib /opt/X11/lib/libxcvt.dylib /opt/X11/lib/libxkbfile.dylib /opt/X11/lib/libXfont2.dylib /opt/X11/lib/libXdmcp.dylib -lm /opt/X11/lib/libxshmfence.dylib -ldl -lpthread /opt/X11/lib/libXau.dylib /opt/X11/lib/libGL.dylib
+    Undefined symbols for architecture x86_64:
+      "_micmapScrPrivateKeyRec", referenced from:
+          _DGAInstallCmap in libxorg_common.a(xf86DGA.c.o)
+          _xf86HandleColormaps in libxorg_common.a(xf86cmap.c.o)
+          _CMapInstallColormap in libxorg_common.a(xf86cmap.c.o)
+          _CMapEnterVT in libxorg_common.a(xf86cmap.c.o)
+          _CMapSwitchMode in libxorg_common.a(xf86cmap.c.o)
+          _CMapSetDGAMode in libxorg_common.a(xf86cmap.c.o)
+          _CMapChangeGamma in libxorg_common.a(xf86cmap.c.o)
+          ...
+    ld: symbol(s) not found for architecture x86_64
     
     Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-    (cherry picked from commit 85beee9885a8e65960fbbde2de9aa28598b4d6ae)
+    (cherry picked from commit 6645ff59069d603806d749e8af73893cf88d2c06)
 
-commit ff1c8e2f72a7dc978187a46e089577b09c009c27
+commit 3868f364728ae0cc35621bbfdd36bfa2e3f09fda
 Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-Date:   Wed Feb 17 13:38:31 2021 -0800
+Date:   Mon Jun 20 20:05:46 2022 -0700
 
-    xquartz: Update the about box copyright to 2021
+    xf86-input-inputtest: Fix build on systems without SOCK_NONBLOCK
     
     Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-    (cherry picked from commit 4e892aa6e132447e43d7bae7e3aca4f1fb172f93)
+    (cherry picked from commit 707f23dab8787b4154011186206dc9964e2ebc11)
 
-commit a16df6028458597c1ab722c7fe3464e6dd315b43
+commit afcaaac96767d773422512e755e5ad3691a0627c
 Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-Date:   Mon Feb 1 16:27:38 2021 -0800
+Date:   Mon Jun 20 19:51:39 2022 -0700
 
-    xquartz: Ensure we call into TIS on the main thread
-    
-    There is a place where this code was called on the main thread.
+    print_edid: Fix a format string error
     
-    We're using a rather nasty anti-pattern to just call a block inline rather
-    than synchonously calling it on the main thread if we're already on the main
-    thread.  This code could use a good overhaul, but I don't have time to rip
-    it apart right now.  This will address the immediate issue.
+    ../hw/xfree86/ddc/print_edid.c:511:20: error: format specifies type 'unsigned short' but the argument has type 'int' [-Werror,-Wformat]
+                       det_mon->type - DS_VENDOR);
+                       ^~~~~~~~~~~~~~~~~~~~~~~~~
     
-    Fixes: https://github.com/XQuartz/XQuartz/issues/40
-    Fixes: https://github.com/XQuartz/XQuartz/issues/48
     Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-    (cherry picked from commit c9a3b14c1472632afaff340f73a77a2b961f195a)
+    (cherry picked from commit 199b8c0853c92ce19a589186f326621477401b74)
 
-commit 2087b7782cde6e6a6c5b4786c2c1f136ee18bb51
+commit 6bb98fc62ddf8b0dd90f7b0b45978a0d0425ed5a
 Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-Date:   Wed Jan 27 15:03:46 2021 -0800
+Date:   Tue Jun 21 11:46:14 2022 -0700
 
-    xquartz: Ensure that NSRunAlertPanel() is run on the main thread
+    xquartz: Update autotools-based builds of XQuartz to account for recent changes
     
-    Fixes: https://github.com/XQuartz/XQuartz/issues/30
     Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-    (cherry picked from commit 520e7a1310ddc25b30bcaa0ea3eeaa6c4d137c8c)
 
-commit 2fe5bf4badb21479511479914def04bf29312e4d
+commit 4ea6f661edbbd84b3f2b308675bd2aa848b53746
 Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-Date:   Wed Jan 27 13:46:02 2021 -0800
+Date:   Mon Jun 20 20:32:26 2022 -0700
 
-    xquartz: Remove support for older versions of libXplugin
+    Revert "meson: Bump requirement to meson-0.50.0"
+    
+    This bump is causing issues with our CI.  Sorry about that.
+    
+    This reverts commit a6a20a7c40f86b5586286aaa614e6b64a5987d82
+    
+    (cherry picked from commit 8cd0397e5b4c1f0e0add1fea67f82b811214bf3e)
+
+commit a6a20a7c40f86b5586286aaa614e6b64a5987d82
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Sun Jun 19 23:06:40 2022 -0700
+
+    meson: Provide options to set CFBundleVersion and CFBundleVersionString in XQuartz
     
     Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-    (cherry picked from commit 7d0bb7ed061458698ff27856976939b261e73b23)
+    (cherry picked from commit 4f5999826aa478ba5f138e74cfccdf3b854c8e54)
 
-commit bc1a2a0d830c76b03c5210b4059aea0f0470f095
+commit 37285e6252ce3afca5bc205121f83271548dfca9
 Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-Date:   Wed Jan 27 13:43:01 2021 -0800
+Date:   Sun Jun 19 19:56:26 2022 -0700
 
-    xquartz: Remove unused include of AvailabilityMacros.h from various sources
+    xquartz: Update copyright for 2022
     
     Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-    (cherry picked from commit 5e7c0762e6fdaefc9b8257c0f875432b1877c49e)
+    (cherry picked from commit b12f5dc62d964d0279e1fa9403259cfd8e491285)
 
-commit 393da8b4390f63e6b634a51f733f1b129626ee1a
+commit 96e7b55c5d6898a6715b62d5e01581617d218997
 Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-Date:   Wed Jan 27 13:40:48 2021 -0800
+Date:   Sun Jun 19 19:55:44 2022 -0700
 
-    xquartz: Remove support for building for i386
+    xquartz: Update Sparkle configuration to use SUPublicEDKey
     
     Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-    (cherry picked from commit 59f22341a8b4cd468d6f37fb17dd7fde347e430b)
+    (cherry picked from commit 1d90bef30c4dfe13dd5e70fea606a02380cbcee6)
 
-commit 43aaa10931b4d3a43c2c575cfd120bea442581ea
+commit 6465263be8ae98283f8e99a3e95d04e786386040
 Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-Date:   Wed Jan 27 13:35:17 2021 -0800
+Date:   Sun Jun 19 22:18:16 2022 -0700
 
-    xquartz: Remove support for Mountain Lion and earlier versions of macOS
+    meson: Bump requirement to meson-0.50.0
+    
+    WARNING: Project specifies a minimum meson_version '>= 0.47.0' but uses features which were added in newer versions:
+     * 0.50.0: {'install arg in configure_file'}
     
     Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-    (cherry picked from commit aea15a76593f98205e44f20632178dc384c02d57)
+    (cherry picked from commit 0a27f96d1d0e474b308be982fa7069d3ae0d9892)
 
-commit fb492686d70fc3166c005c273a587dc7dd4da651
+commit e48acd9c40c09b7c66a7bfc6650afc216ba78cca
 Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-Date:   Wed Jan 27 13:33:22 2021 -0800
+Date:   Thu Jun 16 00:10:26 2022 -0700
 
-    xquartz: Remove support for Lion and earlier versions of macOS
+    XQuartz: Ensure scroll events are delivered to a single window (not both X11 and AppKit)
     
+    Fixes: https://github.com/XQuartz/XQuartz/issues/130
     Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-    (cherry picked from commit c0b2d3e099a60f55b18ca9c30373000f12d40fe2)
+    (cherry picked from commit 4532b696c644cb7f21e96cf76d3e6b21ccc0e309)
 
-commit 34784415ad7c369b93cee1deeea98e8610f133f2
+commit 140d9a0f75194d4079d5cd1e4ad4683c6f47683e
 Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-Date:   Wed Jan 27 13:29:52 2021 -0800
+Date:   Sat Feb 20 14:21:01 2021 -0800
 
-    xquartz: Remove support for SnowLeopard and earlier versions of macOS
+    xquartz: Fold spaces related preferences into NSUserDefaults+XQuartzDefaults
     
     Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-    (cherry picked from commit cc9cf6f085be6e8264f925a11d67a12ad47a042b)
+    (cherry picked from commit f40610e0b4f2b4ae54ef6bbff756cb4a60e17e3b)
 
-commit d3f81ecaf99c804728b206155875c52e41f0723b
+commit 03ec5b132f0b3e07f9340faaacaa2455717fd8d1
 Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-Date:   Wed Jan 27 13:09:50 2021 -0800
+Date:   Sat Feb 20 14:00:14 2021 -0800
 
-    xquartz: Remove check for libdispatch now that we don't support pre-SnowLeopard
+    xquartz pbproxy: Adopt NSUserDefaults+XQuartzDefaults for preferences
     
     Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-    (cherry picked from commit f699aac2ea2cf6a3e2d3bdcb2d8179e103de1d4e)
+    (cherry picked from commit 6134c73aebc3f928639e8f802be49ec8ecc17e66)
 
-commit 739c5bd32f5683c1e03c96700f5bb499517b3eaf
+commit 6df6178bb917f596ec2f61a3aabf99eea620b6ec
 Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-Date:   Wed Jan 27 13:23:18 2021 -0800
+Date:   Fri Feb 19 22:49:11 2021 -0800
 
-    xquartz: Remove support for Leopard and earlier versions of macOS
+    xquartz: Create a separate category for organizing user preferences
     
     Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-    (cherry picked from commit 5ad49102722274f53b9b011082d9e0f202fcd9a4)
+    (cherry picked from commit 963ba6d9adf578ec8d7ed12ae22dece76b895172)
 
-commit 2d7eb824996e51875a5bc8b76c159bb52249690c
+commit c6c1cba397ffa203123a8a6690dee728089e7325
 Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-Date:   Wed Jan 27 13:18:35 2021 -0800
+Date:   Sat Sep 10 22:32:56 2016 -0700
 
-    xquartz: Remove support for Tiger and earlier versions of macOS
+    os/connection: Improve abstraction for launchd secure sockets
+    
+    This changes away from hard-coding the /tmp/launch-* path to now
+    supporting a generic <absolute path to unix socket>[.<screen>]
+    format for $DISPLAY.
+    
+    cf-libxcb: d978a4f69b30b630f28d07f1003cf290284d24d8
     
     Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-    (cherry picked from commit 6e6db055f8b517ae9d63351d4c00fd480cb6b54a)
+    CC: Adam Jackson <ajax@kemper.freedesktop.org>
+    (cherry picked from commit 83d0d911069d502232d719882cd1c5cd090defa1)
 
-commit 080f9eb76a13252f0fc132192ab99232df0e0d92
+commit 663af2f17eec2cc064f3d1e25e00fb840c441964
 Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-Date:   Wed Jan 27 13:12:34 2021 -0800
+Date:   Sun Jun 12 22:06:01 2022 -0700
 
-    os: Remove support for Tiger and earlier versions of macOS
+    X11Application: Ensure TIS operations are done on the main thread
     
+    Fixes: https://github.com/XQuartz/XQuartz/issues/205
     Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-    (cherry picked from commit 20b86c4060c1d4fbc099675d5100fe17e4ac0147)
+    (cherry picked from commit b1afcecc61d841f95e786e4f4f84184f91d149f1)
 
-commit be9d2fd871139ec491806c0843af59cbac65fc84
+commit bd3564cf377deace41b359740331d84e3086e916
 Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-Date:   Wed Jan 27 13:25:54 2021 -0800
+Date:   Fri Apr 23 02:15:30 2021 -0700
 
-    xquartz: Remove support for Panther and earlier versions of macOS
+    rootless: Dead code removal (ROOTLESS_REDISPLAY_DELAY is already defined)
     
     Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-    (cherry picked from commit 74aef85bd88a1fdb22d445ad14975232a7bebdd7)
+    (cherry picked from commit c11b55f3c0c64645bca964aece825de0bdd92b1f)
 
-commit d39eb58409a4452353c73d362d847f9262181e10
-Author: Jim DeLaHunt <from.github@jdlh.com>
-Date:   Mon Dec 11 00:08:52 2017 -0800
+commit 53173fdab492f0f638f6616fcf01af0b9ea6338d
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Thu Jan 20 10:20:38 2022 +0100
+
+    render: Fix build with gcc 12
+    
+    The xserver fails to compile with the latest gcc 12:
+    
+     render/picture.c: In function ‘CreateSolidPicture’:
+     render/picture.c:874:26: error: array subscript ‘union _SourcePict[0]’ is partly outside array bounds of ‘unsigned char[16]’ [-Werror=array-bounds]
+      874 |     pPicture->pSourcePict->type = SourcePictTypeSolidFill;
+          |                          ^~
+     render/picture.c:868:45: note: object of size 16 allocated by ‘malloc’
+      868 |     pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(PictSolidFill));
+          |                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+     render/picture.c: In function ‘CreateLinearGradientPicture’:
+     render/picture.c:906:26: error: array subscript ‘union _SourcePict[0]’ is partly outside array bounds of ‘unsigned char[32]’ [-Werror=array-bounds]
+      906 |     pPicture->pSourcePict->linear.type = SourcePictTypeLinear;
+          |                          ^~
+     render/picture.c:899:45: note: object of size 32 allocated by ‘malloc’
+      899 |     pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(PictLinearGradient));
+          |                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+     render/picture.c: In function ‘CreateConicalGradientPicture’:
+     render/picture.c:989:26: error: array subscript ‘union _SourcePict[0]’ is partly outside array bounds of ‘unsigned char[32]’ [-Werror=array-bounds]
+      989 |     pPicture->pSourcePict->conical.type = SourcePictTypeConical;
+          |                          ^~
+     render/picture.c:982:45: note: object of size 32 allocated by ‘malloc’
+      982 |     pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(PictConicalGradient));
+          |                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+     cc1: some warnings being treated as errors
+     ninja: build stopped: subcommand failed.
+    
+    This is because gcc 12 has become stricter and raises a warning now.
+    
+    Fix the warning/error by allocating enough memory to store the union
+    struct.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Acked-by: Michel Dänzer <mdaenzer@redhat.com>
+    Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1256
+    (cherry picked from commit c6b0dcb82d4db07a2f32c09a8c09c85a5f57248e)
 
-    Fix typo "XQaurtz" in Xquartz.man
+commit 69774044716039fa70655b3bc6dd6a4ff4535cfd
+Author: Błażej Szczygieł <spaz16@wp.pl>
+Date:   Thu Jan 13 00:47:27 2022 +0100
+
+    present: Check for NULL to prevent crash
     
-    (cherry picked from commit 0e272ac458fbd530787273073473e566b0ac306e)
+    Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1275
+    Signed-off-by: Błażej Szczygieł <spaz16@wp.pl>
+    Tested-by: Aaron Plattner <aplattner@nvidia.com>
+    (cherry picked from commit 22d5818851967408bb7c903cb345b7ca8766094c)
 
-commit 1f2b73176f25567e28ac227faffd9311d6b65dff
-Author: Christopher Chavez <chrischavez@gmx.us>
-Date:   Sat Apr 25 05:09:51 2020 +0000
+commit 85397cc2efe8fa73461cd21afe700829b2eca768
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Mon Jan 3 00:23:30 2022 +0200
 
-    XQuartz: recognize F16-F20 and Menu keys
+    xserver 21.1.3
     
-    Signed-off-by: Christopher Chavez <chrischavez@gmx.us>
-    (cherry picked from commit 462beb5338a44390e2fff03096942b035b509830)
+    Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
 
-commit ecc4ebf5355503268fc04923115b15b8d2e5d338
-Author: Jon Turney <jon.turney@dronecode.org.uk>
-Date:   Thu Apr 18 11:37:32 2019 +0100
+commit 001feb6692b77254db6a4906a82fa1bdadfd7b85
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Oct 26 11:46:37 2021 -0400
 
-    xquartz: Add stub ddxInputThread()
+    glx/dri: Filter out fbconfigs that don't have a supported pixmap format
     
-    Omitted from 4ad21c32
+    For depth 30 in particular it's not uncommon for the DDX to not have
+    a configured pixmap format. Since the client expects to back both
+    GLXPixmaps and GLXPbuffers with X Pixmaps, trying to use an x2rgb10
+    fbconfig would fail along various paths to CreatePixmap. Filter these
+    fbconfigs out so the client can't ask for something that we know won't
+    work.
     
-    (cherry picked from commit f013979507da96377fad0e58b0699d9de051bb39)
+    (cherry picked from commit f6c070a1ac05801c52ae60efb7dc4b3142653b7d)
 
-commit f5df31c76118816124be323a3caed22f42cdb50c
-Author: Fabrice Fontaine <fontaine.fabrice@gmail.com>
-Date:   Thu Dec 10 22:32:59 2020 +0100
+commit 66890ca569291a53ea9cdc6ec19070173e522260
+Author: Jocelyn Falempe <jfalempe@redhat.com>
+Date:   Fri Dec 17 10:18:25 2021 +0100
 
-    meson.build: KMS support also depends on dri2
+    xf86/logind: fix missing call to vtenter if the platform device is not paused
     
-    Kernel modesettings support also depends on dri2, see
-    ./hw/xfree86/drivers/modesetting/meson.build
+    If there is one platform device, which is not paused nor resumed,
+    systemd_logind_vtenter() will never get called.
+    This break suspend/resume, and switching to VT on system with Nvidia
+    proprietary driver.
+    This is a regression introduced by f5bd039633fa83
     
-    So update meson.build to reflect the changes made in configure.ac by
-    commit 9c81b8f5b5d7bc987f73e8ef01a81e61205e58ee
+    So now call systemd_logind_vtenter() if there are no paused
+    platform devices.
     
-    Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
-    (cherry picked from commit 5d73a8b59e0d01d1ee4cb484e4b43563cec2eee9)
+    Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1271
+    Fixes: f5bd0396 - xf86/logind: fix call systemd_logind_vtenter after receiving drm device resume
+    
+    Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com>
+    Tested-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Hans de Goede <hdegoede@redhat.com>
 
-commit b09f5f42dcc58cf73ae5ca85a65018aaee72e06f
-Author: Mariusz Ceier <mceier+freedesktop@gmail.com>
-Date:   Wed Dec 2 12:29:15 2020 +0100
+commit fec0e2501b424ec6cfbf4c7983727acfafea0ccb
+Author: Jocelyn Falempe <jfalempe@redhat.com>
+Date:   Thu Dec 16 15:46:43 2021 +0100
 
-    xwayland: Replace LogMessage with LogMessageVerb
+    xf86/logind: Fix compilation error when built without logind/platform bus
     
-    LogMessage logs only when the XLOG_VERBOSITY is >= 1, but by default
-    XLOG_VERBOSITY is 0.
+    This was introduced by commit 8eb1396d
     
-    Signed-off-by: Mariusz Ceier <mceier+freedesktop@gmail.com>
-    (cherry picked from commit 95539ab37baa1292d1f2daaa552f9741b0364cad)
+    Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1269
+    Fixes: da9d012a9 - xf86/logind: Fix drm_drop_master before vt_reldisp
+    
+    Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com>
+    Reviewed-by: Hans de Goede <hdegoede@redhat.com>
 
-commit c17872d50215938b1a5d899d50907ced01b28eb9
-Author: Michal Srb <msrb@suse.com>
-Date:   Thu Jun 21 13:44:04 2018 +0200
+commit 8223a9d6d9ed2b9a4c1e6373f6ab854fdbda9ead
+Author: Matthieu Herrb <matthieu@herrb.eu>
+Date:   Tue Nov 16 23:38:46 2021 +0100
 
-    xkb: Fix heap overflow caused by optimized away min.
+    Convert more funcs to use InternalEvent.
     
-    Calling strlen on char[4] that does not need to contain '\0' is wrong and X
-    server may end up running into uninitialized memory.
+    This fixes a crash when a DeviceEvent struct converted to
+    InteralEvent was beeing copied as InternalEvent (and thus
+    causing out of bounds reads) in ActivateGrabNoDelivery()
+    in events.c: 3876    *grabinfo->sync.event = *real_event;
     
-    In addition GCC 8 is clever enough that it knows that strlen on char[4] can
-    return 0, 1, 2, 3 or cause undefined behavior. With this knowledge it can
-    optimize away the min(..., 4). In reality it can cause the memcpy to be called
-    with bigger size than 4 and overflow the destination buffer.
+    Possible fix for https://gitlab.freedesktop.org/xorg/xserver/-/issues/1253
     
-    Fixes: 83913de25d35 (xkb: Silence some compiler warnings)
-    Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/288
-    Signed-off-by: Matt Turner <mattst88@gmail.com>
-    (cherry picked from commit 74627d13c75cab7aa73c0e713feae0934e780ba0)
+    Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
+    (cherry picked from commit 5b8817a019845e1066c373022133985a0e2d718f)
 
-commit bc111a2e67e16d4e6d4f3196ab86c22c1e278c45
-Author: Matt Turner <mattst88@gmail.com>
-Date:   Tue Dec 1 10:55:00 2020 -0500
+commit b27eaa72837eebe80adfe6c257a71a6b9eaf66ee
+Author: nerdopolis <bluescreen_avenger@verizon.net>
+Date:   Fri Oct 8 18:15:29 2021 -0400
 
-    xserver 1.20.10
+    os: Try to discover the current seat with the XDG_SEAT var first
     
-    Signed-off-by: Matt Turner <mattst88@gmail.com>
+    (cherry picked from commit ca1dfdc9aa4b548de624d3a9af5147a998ba3d79)
 
-commit 06d1a032ee491547f7037c3ff042065dc2aeaa99
-Author: Matthieu Herrb <matthieu@herrb.eu>
-Date:   Thu Nov 12 19:15:07 2020 +0100
+commit 9852b29380673484aea25771a3e812c8e8a40393
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Wed Dec 15 15:46:09 2021 +0200
 
-    Check SetMap request length carefully.
+    xserver 21.1.2
     
-    Avoid out of bounds memory accesses on too short request.
+    Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
+
+commit 9fe2991075aca3321d59d03f3e45faca6cb718b8
+Author: Sam James <sam@gentoo.org>
+Date:   Wed Dec 15 10:41:22 2021 +0200
+
+    hw/xfree86: fix sbus build for SPARC
     
-    ZDI-CAN 11572 /  CVE-2020-14360
+    Initially reported downstream in Gentoo. Manifests with errors like:
+    ```
+    gnu/bin/ld: hw/xfree86/common/libxorg_common.a(xf86fbBus.c.o): in function `xf86ClaimFbSlot':
+    xf86fbBus.c:(.text+0x20): undefined reference to `sbusSlotClaimed'
+    /usr/lib/gcc/sparc-unknown-linux-gnu/11.2.0/../../../../sparc-unknown-linux-gnu/bin/ld: xf86fbBus.c:(.text+0x2c): undefined reference to `sbusSlotClaimed'
+    ```
     
-    This vulnerability was discovered by:
-    Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
+    While we use the headers in meson.build, we don't reference xf86sbusBus.c
+    which defines the missing symbols like sbusSlotClaimed.
     
-    Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
-    (cherry picked from commit 446ff2d3177087b8173fa779fa5b77a2a128988b)
+    Bug: https://bugs.gentoo.org/828513
+    Signed-off-by: Sam James <sam@gentoo.org>
+    (cherry picked from commit 6c1a1fcc4bff90546ebc954f428c6df97005ea50)
 
-commit 7ccb3b0eabb4658daf0ecb2c78a53609ae2c263b
-Author: Matthieu Herrb <matthieu@herrb.eu>
-Date:   Sun Oct 11 17:05:09 2020 +0200
+commit 0b67785cd13e65d37416f75ab938bdc49cf4732f
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Wed Dec 15 10:41:21 2021 +0200
 
-    Fix XkbSetDeviceInfo() and SetDeviceIndicators() heap overflows
+    render: Fix out of bounds access in SProcRenderCompositeGlyphs()
     
-    ZDI-CAN 11389 / CVE-2020-25712
+    ZDI-CAN-14192, CVE-2021-4008
     
-    This vulnerability was discovered by:
+    This vulnerability was discovered and the fix was suggested by:
     Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
     
-    Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
-    (cherry picked from commit 87c64fc5b0db9f62f4e361444f4b60501ebf67b9)
+    Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
+    (cherry picked from commit ebce7e2d80e7c80e1dda60f2f0bc886f1106ba60)
 
-commit 440ed5948ba5818abf5ea5fdc5a9d98514658fd3
-Author: Michel Dänzer <mdaenzer@redhat.com>
-Date:   Tue Dec 1 11:25:31 2020 +0100
+commit 7209982d2a89f2e27d2f83f8952e9512be813aa4
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Wed Dec 15 10:41:20 2021 +0200
 
-    present/wnmd: Translate update region to screen space
-    
-    The region as passed in is in the source pixmap's coordinate space, so
-    intersecting it with the clipList (which is in screen space) resulted in
-    disappointment.
+    Xext: Fix out of bounds access in SProcScreenSaverSuspend()
     
-    Fixes Firefox popups such as the hamburger menu when using the EGL
-    backend.
+    ZDI-CAN-14951, CVE-2021-4010
     
-    v2:
-    * Drop vblank->x/y_off from RegionTranslate call, since they're always
-      0 here (present_wnmd_check_flip rejects flips for x/y_off != 0).
+    This vulnerability was discovered and the fix was suggested by:
+    Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
     
-    Reported-by: Robert Mader <robert.mader@posteo.de>
-    Tested-by: Robert Mader <robert.mader@posteo.de>
-    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
-    Tested-by: Joakim Tjernlund <joakim.tjernlund@infinera.com> # v1
-    (cherry picked from commit 466b8b43fb355c6040cee45406860b8b8c04e948)
+    Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
+    (cherry picked from commit 6c4c53010772e3cb4cb8acd54950c8eec9c00d21)
 
-commit 54f9af1c61bd10e2e65cbb17069e0c9ec1f9a2c5
-Author: Kishore Kadiyala <kishore.kadiyala@intel.com>
-Date:   Tue Dec 1 11:13:51 2020 +0100
+commit 6f09e7d3913a8188e32062f5e196bebb06bab140
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Wed Dec 15 10:41:19 2021 +0200
 
-    modesetting: keep going if a modeset fails on EnterVT
+    xfixes: Fix out of bounds access in *ProcXFixesCreatePointerBarrier()
     
-    There was a time when setting a mode on a CRTC would not depend on the
-    associated connector's state. If a mode had been set successfully once,
-    it would mean it would work later on.
+    ZDI-CAN-14950, CVE-2021-4009
     
-    This changed with the introduction of new connectors type that now
-    require a link training sequence (DP, HDMI 2.0), and that means that
-    some events may have happened while the X server was not master that
-    would then prevent the mode from successfully be restored to its
-    previous state.
+    This vulnerability was discovered and the fix was suggested by:
+    Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
     
-    This patch relaxes the requirement that all modes should be restored on
-    EnterVT, or the entire X-Server would go down by allowing modesets to
-    fail (with some warnings). If a modeset fails, the CRTC will be
-    disabled, and a RandR event will be sent for the desktop environment to
-    fix the situation as well as possible.
+    Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
+    (cherry picked from commit b5196750099ae6ae582e1f46bd0a6dad29550e02)
+
+commit a82d523edb30e5856adca9f258ac716108c71f19
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Wed Dec 15 10:41:18 2021 +0200
+
+    record: Fix out of bounds access in SwapCreateRegister()
     
-    Additional patches might be needed to make sure that the user would
-    never be left with all screens black in some scenarios.
+    ZDI-CAN-14952, CVE-2021-4011
     
-    v2 (Martin Peres):
-     - whitespace fixes
-     - remove the uevent handling (it is done in a previous patch)
-     - improve the commit message
-     - reduce the size of the patch by not changing lines needlessly
-     - return FALSE if one modeset fails in ignore mode
-     - add comments/todos to explain why we do things
-     - disable the CRTCs that failed the modeset
+    This vulnerability was discovered and the fix was suggested by:
+    Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
     
-    Signed-off-by: Kishore Kadiyala <kishore.kadiyala@intel.com>
-    Signed-off-by: Martin Peres <martin.peres@linux.intel.com>
-    Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-    Tested-by: Kishore Kadiyala <kishore.kadiyala@intel.com>
-    Closes: #1010
-    (cherry picked from commit efb3abddd49fb75bd6d0e31046fed43d258c93da)
+    Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
+    (cherry picked from commit e56f61c79fc3cee26d83cda0f84ae56d5979f768)
 
-commit bd0f53725b581e4698f5f3ec366a9507bd2556e2
-Author: Martin Peres <martin.peres@linux.intel.com>
-Date:   Tue Dec 1 11:10:34 2020 +0100
+commit a39218d99c6961dda0142d9956eb7404a37d9bd2
+Author: Matthieu Herrb <matthieu@herrb.eu>
+Date:   Wed Dec 15 10:41:17 2021 +0200
 
-    modesetting: check the kms state on EnterVT
-    
-    Normally, we would receive a uevent coming from Linux's DRM subsystem,
-    which would trigger the check for disappearing/appearing resources.
-    However, this event is not received when X is not master (another VT
-    is selected), and so the userspace / desktop environment would not be
-    notified about the changes that happened while X wasn't master.
+    remove the PRE_RELEASE message.
     
-    To fix the issue, this patch forces a refresh on EnterVT by splitting
-    the kms-checking code from the uevent handling into its own (exported)
-    function called drmmode_update_kms_state. This function is then called
-    from both the uevent-handling function, and on EnterVT right before
-    restoring the modes.
+    With the new numbering scheme, XORG_VERISON_SNAP doesn't mean
+    a pre-release version anymore.
     
-    Signed-off-by: Martin Peres <martin.peres@linux.intel.com>
-    Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-    Acked-by: Kishore Kadiyala <kishore.kadiyala@intel.com>
-    Tested-by: Kishore Kadiyala <kishore.kadiyala@intel.com>
-    (cherry picked from commit 293cf660c95d7ba36510bcc4114d7fd5c5f3801c)
+    Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
+    (cherry picked from commit 4de9666b6d3c86660d728ddfc13d88700e5ff20d)
 
-commit 5c400cae1f9817045378966effa6bca91e45aead
-Author: Olivier Fourdan <ofourdan@redhat.com>
-Date:   Tue Oct 27 16:33:55 2020 +0100
+commit fc2eb7e8cc19a41e034f2f4286af58f8b4825d65
+Author: Matt Turner <mattst88@gmail.com>
+Date:   Tue Dec 7 21:39:58 2021 -0800
 
-    configure: Build hashtable for Xres and glvnd
-    
-    With autoconf, hashtable support is built along with Xres support.
+    test: #undef NDEBUG so assert is not compiled away
     
-    Yet, glvnd also use it, so when disabling Xres from configure, the
-    build will fail at link time because hashtable functions are not
-    available.
+    (cherry picked from commit d189102c783653a10931051175de24277a157331)
+
+commit 7caf29ca6607ddf4c19a81d19c0f4acc6deb8936
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Sat Nov 13 16:42:36 2021 +0200
+
+    meson: Correctly set DDXOSVERRORF and DDXBEFORERESET on xwin
     
-    Untie the build of hashtable from Xres support, just like meson build
-    does.
+    This worked with autotools, but not meson build system.
     
-    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
-    Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1091
-    (cherry picked from commit 899cebb76ab7754fea49f7babcd64a7e94052cc8)
+    Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
+    (cherry picked from commit 04c93b98e9e4593aa2e6701bb08f5e27c3544d8a)
 
-commit 253569a3d281996d7c84041020e14313756900da
-Author: Olivier Fourdan <ofourdan@redhat.com>
-Date:   Thu Nov 5 18:35:54 2020 +0100
+commit 101791f80fdefea738421a414177899db7c76e83
+Author: Jonathan Gray <jsg@jsg.id.au>
+Date:   Fri Dec 3 19:17:18 2021 +1100
 
-    xwayland: Create an xwl_window for toplevel only
+    glamor: fix free of uninitialised pointers
     
-    One general assumption in Xwayland is that the xwl_window remains the
-    same for all the child windows of the toplevel window.
+    Attempting to run fvwm on a x61/965gm with xserver 1.21.1 with the
+    modesetting driver on OpenBSD/amd64 would cause the xserver to
+    reliably crash.
     
-    When mapping a new X11 window, ensure_surface_for_window() checks for an
-    existing xwl_window by using xwl_window_get() which will just check for
-    the registered xwl_window for the window.
+    I tracked this down to the free() calls introduced in
+    2906ee5e4a722138cccb3265a615da7705a52589
+    (d1ca47e1242b51c79cec7287f52c36c8e494706b in branch).
     
-    That means that a client mapping a child window of an existing window
-    with a xwl_window will get another different xwl_window.
+    clang also warns about this:
+    glamor_program.c:296:13: warning: variable 'vs_prog_string' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
+    glamor_program.c:290:9: warning: variable 'vs_prog_string' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
+    glamor_program.c:288:9: warning: variable 'vs_prog_string' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
+    glamor_program.c:277:13: warning: variable 'vs_prog_string' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
+    glamor_program.c:296:13: warning: variable 'fs_prog_string' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
+    glamor_program.c:290:9: warning: variable 'fs_prog_string' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
+    glamor_program.c:288:9: warning: variable 'fs_prog_string' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
+    glamor_program.c:277:13: warning: variable 'fs_prog_string' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
     
-    If an X11 client issues a Present request on the parent window, hence
-    placed underneath its child window of the same size, the Wayland
-    compositor may not send the frame callback event for the parent's
-    Wayland surface which is reckoned to be not visible, obscured behind
-    the other Wayland surface for the child X11 window.
+    Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
+    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
+    Fixes: 2906ee5e4 ("glamor: Fix leak in glamor_build_program()")
+    (cherry picked from commit 5ac6319776b13f96a2b336da4b35237618a5b001)
+
+commit 2c6989f81e62bac05a583c39fa09a06172d1ece5
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Thu Dec 2 10:41:03 2021 +1000
+
+    xkb: fix XkbSetMap check for the keytypes count
     
-    That bug affects some games running in wine which may get 1 fps because
-    the repaint occurs only on timeout with a long interval (as with, e.g.
-    https://bugs.winehq.org/show_bug.cgi?id=47066)
+    The previous if/else condition resulted in us always setting the key
+    type count to the current number of key types. Split this up correctly.
     
-    Fix ensure_surface_for_window() by using xwl_window_from_window() which
-    will walk the window tree, so that a child window won't get another
-    xwl_window than its parent.
+    Regression introduced in de940e06f8733d87bbb857aef85d830053442cfe
     
-    https://gitlab.freedesktop.org/xorg/xserver/-/issues/1099
-    See-also: https://bugs.winehq.org/show_bug.cgi?id=47066
-    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
-    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
-    (cherry picked from commit 606ba7fc51e5420646f75c4e672fbe61eb7c7e6e)
+    Fixes #1249
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    (cherry picked from commit be16bd8543f80ad2933ec9c37f082617c7084165)
 
-commit 0811a9ff783c252b3e4d558bf31c6b066b0633e1
-Author: Olivier Fourdan <ofourdan@redhat.com>
-Date:   Mon Nov 2 15:44:31 2020 +0100
+commit 49444ce9f7ad34fff6ff94a9db95337f4bfd7b03
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Sat Nov 13 17:23:54 2021 +0200
 
-    xwayland: non-rootless requires the wl_shell protocol
+    Revert "hw/xfree86: Propagate physical dimensions from DRM connector"
     
-    When running non-rootless, Xwayland requires that the Wayland compositor
-    supports the wl_shell protocol.
+    Quite a lot of applications currently expect the screen DPI exposed by
+    the X server to be 96 even when the real display DPI is different.
+    Additionally, currently Xwayland completely ignores any hardware
+    information and sets the DPI to 96. Accordingly the new behavior, even
+    if it fixes a bug, should not be enabled automatically to all users.
     
-    Check for wl_shell protocol support at startup and exit cleanly if
-    missing rather than segfaulting later in ensure_surface_for_window()
-    while trying to use wl_shell_get_shell_surface().
+    A better solution would be to make the default DPI stay as is and enable
+    the correct behavior with a command line option (maybe -dpi auto, or
+    similar). For now let's just revert the bug fix.
     
-    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
-    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
-    Reviewed-by: Simon Ser <contact@emersion.fr>
-    (cherry picked from commit ffd02d9b26bd560849c407a6dd4f5c4d7d2c1736)
+    This reverts commit 05b3c681ea2f478c0cb941c2f8279919cf78de6d.
+    
+    Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
+    (cherry picked from commit 35af1299e73483eaf93d913a960e1d1738bc7de6)
 
-commit b3ae038c32870a4a1bb42b6e1cf2ebedc8b7bc8d
-Author: Alex Goins <agoins@nvidia.com>
-Date:   Mon Oct 5 18:19:52 2020 -0500
+commit 6f11b3c803898e0effe6ade2ae951f5758936152
+Author: Dave Airlie <airlied@redhat.com>
+Date:   Thu Nov 11 06:35:19 2021 +1000
 
-    glamor: Update pixmap's devKind when making it exportable
+    dri2: add crocus to the list of va_gl users
     
-    When making a pixmap exportable, glamor will currently create a temporary
-    exported pixmap backed by a GBM bo, with the devKind updated to the stride of
-    the bo. However, when the backing of the exported pixmap is swapped into the
-    original, the devKind of the original is not updated.
+    (cherry picked from commit a7b0a7fabd137183cc42a5edb15697e354c4450c)
+
+commit 8eb1396d3ecfd2bf968105a99759ae9445bdf768
+Author: Jocelyn Falempe <jfalempe@redhat.com>
+Date:   Thu Nov 18 14:51:21 2021 +0100
+
+    xf86/logind: Fix drm_drop_master before vt_reldisp
     
-    Some GBM bos may get implicitly padded, in which case the devKind of the pixmap
-    will not match the stride of the backing bo. For example, an 800x600 pixmap will
-    have a devKind of 3200, but the bo's stride will be 3328. This can cause
-    corruption with PRIME, when the sink uses the wrong stride to display the shared
-    pixmap.
+    When switching to VT, the ioctl DRM_DROP_MASTER must be done before
+    the ioctl VT_RELDISP. Otherwise the kernel can't change the modesetting
+    reliably, and this leads to the console not showing up in some cases, like
+    after unplugging a docking station with a DP or HDMI monitor.
     
-    This commit changes glamor_make_pixmap_exportable() to update the devKind of the
-    original pixmap after it swaps exported pixmap's backing into it, keeping
-    everything consistent.
+    Before doing the VT_RELDISP, send a dbus message to logind, to
+    pause the drm device, so logind will do the ioctl DRM_DROP_MASTER.
     
-    Fixes issue #1018.
+    With this patch, it changes the order logind will send the resume
+    event, and drm will be sent last instead of first.
+    so there is a also fix to call systemd_logind_vtenter() at the right time.
     
-    Signed-off-by: Alex Goins <agoins@nvidia.com>
-    Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
-    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
-    (cherry picked from commit 7a7e55c5c1d6461a9f4d9a4e0129c1c6e1fd3d66)
+    Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com>
+    Reviewed-by: Hans de Goede <hdegoede@redhat.com>
+    (cherry picked from commit da9d012a9c760896941769d4127e3cfb1a7a9f03)
 
-commit d6c389cb87b220f7005cebf483708267b5f4a1c3
-Author: Bernhard Ãœbelacker <bernhardu@mailbox.org>
-Date:   Sun Sep 27 18:03:48 2020 +0200
+commit 6834f977a5eadbc3289f27b2bb83997132a39fdd
+Author: Jocelyn Falempe <jfalempe@redhat.com>
+Date:   Thu Nov 18 14:45:42 2021 +0100
 
-    os: Fix instruction pointer written in xorg_backtrace
+    xf86/logind: fix call systemd_logind_vtenter after receiving drm device resume
     
-    The address retrieved in "pip.start_ip" is not necessarily the same
-    address as unw_get_proc_name finds as nearest symbol and returns in "off".
-    Therefore using "pip.start_ip + off" is not reliable, at least
-    visible in the binaries from the Debian repository.
+    logind send the resume event for input devices and drm device,
+    in any order. if we call vt_enter before logind resume the drm device,
+    it leads to a driver error, because logind has not done the
+    DRM_IOCTL_SET_MASTER on it.
     
-    Bug-Debian: https://bugs.debian.org/971088
+    Keep the old workaround to make sure we call systemd_logind_vtenter at
+    least once if there are no platform device
     
-    Signed-off-by: Bernhard Ãœbelacker <bernhardu@mailbox.org>
-    (cherry picked from commit c15dd0ba4893f79f7181e783cb1ba404edca917a)
+    Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com>
+    Reviewed-by: Hans de Goede <hdegoede@redhat.com>
+    (cherry picked from commit f5bd039633fa8360a10bd2aabb0111571f6275b0)
 
-commit c3e4c1a0fd5d4d6015e9e6317b758018317e56d1
-Author: Michel Dänzer <mdaenzer@redhat.com>
-Date:   Tue Jul 28 18:40:47 2020 +0200
+commit 0ed7b1224ef17ff3d27e791e03e0d98dd6373c8a
+Author: nerdopolis <bluescreen_avenger@verizon.net>
+Date:   Fri Oct 8 21:51:43 2021 -0400
 
-    present/wnmd: Execute copies at target_msc-1 already
-    
-    It always takes one update cycle for the copy to become visible on the
-    host windowing system, so waiting for the target MSC resulted in 1 cycle
-    delay.
-    
-    We re-use the idle list for copies which were executed but need their
-    completion event sent.
+    xfree86: On Linux, while only seat0 can have TTYs, don't assmume all seat0s have TTYs
     
-    Fixes black seams when resizing the "Builder" sub-window of
+    (cherry picked from commit b8c12aac651d626c5120e6e8e18b42e7528caf43)
+
+commit 6b997fb74e5c9473ee3989fca8d592a3a0d16067
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Sun Nov 7 01:33:56 2021 +0200
+
+    xserver 21.1.1
     
-     GDK_BACKEND=x11 gtk4-demo
+    Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
+
+commit 70a0c48ff3bb7e3392035ef333cc5c8453508f33
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Sat Nov 6 20:09:48 2021 +0200
+
+    Makefile.am: Add missing meson build files to release tarball
+
+commit db0da823f55734baf4c1e4de680e7091f33aac17
+Author: Matthieu Herrb <matthieu.herrb@laas.fr>
+Date:   Sun Oct 31 11:28:28 2021 +0100
+
+    Make xf86CompatOutput() return NULL when there are no privates
     
-    on Xwayland (see
-    https://gitlab.gnome.org/GNOME/mutter/-/issues/1290#note_873557).
+    Some drivers (mach64 w/o DRI for instance) don't initialize privates.
     
-    Unfortunately, this cannot completely fix the seams with apps which
-    queue up multiple frames in advance, since there's always at least one
-    queued frame corresponding to the old window size. But it should at
-    least help a little in that case as well.
+    Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
+    (cherry picked from commit 80eeff3ebac772e25c9107199989e677457dbe06)
+
+commit fdb266ff814f6abb6ce006ecbac5ba78a92cdbca
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Tue Nov 2 14:04:08 2021 +0000
+
+    s/__/@/ in inputtestdrv manpage
     
-    v2:
-    * Bug fix: Don't update exec_msc in present_wnmd_check_flip_window.
-      (Roman Gilg)
-    * Use exec_msc = target_msc - 1 instead of exec_msc--, and add a
-      comment, for clarity.
-    v3:
-    * Drop exec_msc = target_msc again in present_wnmd_execute.
-    * present_execute_copy should never set vblank->queued in
-      present_wnmd_execute now, so replace that branch with an assertion.
-      (Roman Gilg)
+    Update manpage subsitution style for 2e497bf8
     
-    Reviewed-by: Roman Gilg <subdiff@gmail.com>
-    Tested-by: Roman Gilg <subdiff@gmail.com>
-    (cherry picked from commit 1cccb486d48a5d2e7649836b993805bb65dc09e3)
-    [Since present_wnmd_event_notify hasn't been split up on the 1.20
-    branch, it needs to check vblank->flip. Doing the same in
-    present_wnmd_free_idle_vblanks to be safe, though I'm not sure it's
-    actually possible to hit non-flips there.]
+    (cherry picked from commit 0099412ea4347b02e61ea21946f309f2535cc07b)
 
-commit 96ef31e0f20fcffb2edfe4cb9510f994c188785f
-Author: Michel Dänzer <mdaenzer@redhat.com>
-Date:   Tue Jul 28 18:53:45 2020 +0200
+commit 27a0ee32ccef8d621aaa758c804fc9a5ceeb5a56
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Wed Oct 27 13:36:45 2021 +0300
 
-    present/wnmd: Move up present_wnmd_queue_vblank
+    xserver 21.1
     
-    Allowing it to be called from more functions than before. No functional
-    change.
-    
-    Reviewed-by: Roman Gilg <subdiff@gmail.com>
-    Tested-by: Roman Gilg <subdiff@gmail.com>
-    (cherry picked from commit d14ea667feccf085c7d66a7c63f380975e07af66)
+    Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
 
-commit 669e40390c3679b649db33f0aa4ae4cfdd17e2a9
-Author: Michel Dänzer <mdaenzer@redhat.com>
-Date:   Fri Sep 11 17:00:35 2020 +0200
+commit d4944ceda1727180bbee1c582b4ac0796c2748cc
+Author: Mario Kleiner <mario.kleiner.de@gmail.com>
+Date:   Mon Oct 18 08:14:04 2021 +0200
+
+    Fix RandR leasing for more than 1 simultaneously active lease.
+    
+    Due to a switched order of parameters in the xorg_list_add()
+    call inside ProcRRCreateLease(), adding a new lease for RandR
+    output leasing does not actually add the new RRLeasePtr lease
+    record to the list of existing leases for a X-Screen, but instead
+    replaces the existing list with a new list that has the new lease
+    as the only element, and probably leaks a bit of memory.
+    
+    Therefore the server "forgets" all active leases for a screen,
+    except for the last added lease. If multiple leases are created
+    in a session, then destruction of all leases but the last one
+    will fail in many cases, e.g., during server shutdown in
+    RRCloseScreen(), or resource destruction, e.g., in
+    RRCrtcDestroyResource().
+    
+    Most importantly, it fails if a client simply close(fd)'es the
+    DRM master descriptor to release a lease, quits, gets killed or
+    crashes. In this case the kernel will destroy the lease and shut
+    down the display output, then send a lease event via udev to the
+    ddx, which e.g., in the modesetting-ddx will trigger a call to
+    drmmode_validate_leases().
+    
+    That function is supposed to detect the released lease and tell
+    the server to terminate the lease on the server side as well,
+    via xf86CrtcLeaseTerminated(), but this doesn't happen for all
+    the leases the server has forgotten. The end result is a dead
+    video output, as the server won't reinitialize the crtc's
+    corresponding to the terminated but forgotten lease.
+    
+    This bug was observed when using the amdvlk AMD OSS Vulkan
+    driver and trying to lease multiple VKDisplay's, and also
+    under Mesa radv, as both Mesa Vulkan/WSI/Display and amdvlk
+    terminate leases by simply close()ing the lease fd, not by
+    sending explicit RandR protocol requests to free leases.
+    
+    Leasing worked, but ending a session with multiple active
+    leases ended in a lot of unpleasant darkness.
+    
+    Fixing the wrong argument order to xorg_list_add() fixes the
+    problem. Tested on single-X-Screen and dual-X-Screen setups,
+    with one, two or three active leases.
+    
+    Please merge this for the upcoming server 21.1 branch.
+    Merging into server 1.20 would also make a lot of sense.
+    
+    Fixes: e4e3447603b5fd3a38a92c3f972396d1f81168ad
+    Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
+    Cc: Keith Packard <keithp@keithp.com>
+    (cherry picked from commit f467f85ca1f780d5c7cf3c20888e399708d761ac)
 
-    present: Add present_vblank::exec_msc field
+commit e59faa4b8cc5aaa19474a5e7ca3a99d08006f8c5
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Thu Oct 14 17:33:40 2021 +0300
+
+    xserver 21.1 RC 2
+
+commit 3fb94f3c5ca73f15a78dbc6904380b9b9e402bf4
+Author: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
+Date:   Fri Jul 23 09:23:45 2021 +0100
+
+    dix/privates.c: Avoid undefined behaviour after realloc()
     
-    For tracking the MSC when the present can be executed separately from
-    the target MSC.
+    Adding the offset between the realloc result and the old allocation to
+    update pointers into the new allocation is undefined behaviour: the
+    old pointers are no longer valid after realloc() according to the C
+    standard. While this works on almost all architectures and compilers,
+    it causes  problems on architectures that track pointer bounds (e.g.
+    CHERI or Arm's Morello): the DevPrivateKey pointers will still have the
+    bounds of the previous allocation and therefore any dereference will
+    result in a run-time trap.
     
-    Allows removing the requeue field instead, plus more later.
+    I found this due to a crash (dereferencing an invalid capability) while
+    trying to run `XVnc` on a CHERI-RISC-V system. With this commit I can
+    successfully connect to the XVnc instance running inside a QEMU with a
+    VNC viewer on my host.
     
-    v2:
-    * Rename wait_msc → exec_msc (Roman Gilg)
-    * Use exec_msc = target_msc instead of exec_msc++, for clarity.
-    * Bug fix: Set exec_msc = target_msc also if present_flip returned
-      false in present_execute.
-    v3:
-    * Set exec_msc = target_msc also if present_wnmd_flip returned
-      false in present_wnmd_execute, for consistency.
-    v4:
-    * Specifically check for exec_msc == crtc_msc + 1 in
-      present_execute_wait/copy, to avoid re-introducing
-      https://bugs.freedesktop.org/show_bug.cgi?id=94596 .
+    This also changes the check whether the allocation was moved to use
+    uintptr_t instead of a pointer since according to the C standard:
+    "The value of a pointer becomes indeterminate when the object it
+    points to (or just past) reaches the end of its lifetime." Casting to an
+    integer type avoids this undefined behaviour.
     
-    Reviewed-by: Roman Gilg <subdiff@gmail.com>
-    Tested-by: Roman Gilg <subdiff@gmail.com>
-    (cherry picked from commit b0b3159abd8001fa3f6dfc44a288a95a62aa5cf6)
+    Signed-off-by: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
+    (cherry picked from commit f9f705bf3cf0d169d54a70f235cc99e106dbda43)
 
-commit dae234efdb7bba75744aa1697386df3c0db5348a
-Author: Michel Dänzer <mdaenzer@redhat.com>
-Date:   Fri Sep 11 17:00:18 2020 +0200
+commit b89fdd523e2c9e9b0cdf37b263833c4b0a8868b8
+Author: nerdopolis <rbos@rbos>
+Date:   Thu Sep 30 08:51:18 2021 -0400
 
-    present: Move flip target_msc adjustment out of present_vblank_create
+    xf86: Accept devices with the 'simpledrm' driver.
     
-    Preparation for different handling between SCMD & WNMD. No functional
-    change intended.
+    SimpleDRM 'devices' are a fallback device, and do not have a busid
+    so they are getting skipped. This will allow simpledrm to work
+    with the modesetting driver
     
-    Reviewed-by: Roman Gilg <subdiff@gmail.com>
-    Tested-by: Roman Gilg <subdiff@gmail.com>
-    (cherry picked from commit 4c92dea952f7fed19857904f0f552900257ef4b9)
+    (cherry picked from commit b9218fadf3c09d83566549279d68886d8258f79c)
 
-commit 1930ed233fdec5d22e4fc192769a0126faabb3ea
-Author: Olivier Fourdan <ofourdan@redhat.com>
-Date:   Mon Sep 14 15:39:10 2020 +0200
+commit fbc690ccaf12d6536951d0ba403dfbb92c7c4115
+Author: Mario Kleiner <mario.kleiner.de@gmail.com>
+Date:   Fri Oct 1 09:47:41 2021 +0200
 
-    xwayland: Remove pending stream reference when freeing
+    modesetting: Consider RandR primary output for selectioh of sync crtc.
     
-    The EGLStream backend keeps a queue of pending streams for each Xwayland
-    window.
+    The "sync crtc" is the crtc used to drive the display timing of a
+    drawable under DRI2 and DRI3/Present. If a drawable intersects
+    multiple video outputs, then normally the crtc is chosen which has
+    the largest intersection area with the drawable.
     
-    However, when this pending queue is freed, the corresponding private
-    data may not be cleared (typically if the pixmap for this window has
-    changed before the compositor finished attaching the consumer for the
-    window's pixmap's original eglstream), leading to a use-after-free and a
-    crash when trying to use that data as the window pixmap.
+    If multiple outputs / crtc's have exacty the same intersection
+    area then the crtc chosen was simply the first one with maximum
+    intersection. Iow. the choice was random, depending on plugging
+    order of displays.
     
-    Make sure to clear the private data when the pending stream is freed.
+    This adds the ability to choose a preferred output in such a tie
+    situation. The RandR output marked as "primary output" is chosen
+    on such a tie.
     
-    Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1055
-    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
-    Tested-by: Karol Szuster <karolsz9898@gmail.com>
-    Reviewed-by: Adam Jackson <ajax@redhat.com>
-    (cherry picked from commit a5f439dcd21b4fda093cb382bb1a758b434a1444)
+    This new behaviour and its implementation is consistent with other
+    video ddx drivers. See amdgpu-ddx, ati-ddx and nouveau-ddx for
+    reference. This commit is a straightforward port from amdgpu-ddx.
+    
+    Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
+    (cherry picked from commit 4b75e65766a9ef3a26d4c1c9d7af9fc6d1d7be5b)
 
-commit 1ac389dda89b2882c80767c91bbe88e01818491c
-Author: Greg V <greg@unrelenting.technology>
-Date:   Tue Sep 15 17:41:04 2020 +0300
+commit 22f4ff1026eeffc566f87453d7f1f70dc23ad4e0
+Author: Mario Kleiner <mario.kleiner.de@gmail.com>
+Date:   Fri Oct 1 08:49:10 2021 +0200
 
-    xwayland: use drmGetNodeTypeFromFd for checking if a node is a render one
+    modesetting: Handle mixed VRR and non-VRR display setups better.
     
-    Major/minor numbers are a.. major (ha) source of pain in FreeBSD porting.
-    In this case, Xwayland was thinking that /dev/dri/card0 is already a render node,
-    because the st_rdev on FreeBSD was passing the Linux-style check,
-    and because of the assumption, acceleration would fail because
-    various ioctls like AMDGPU_INFO would be denied on the non-render node.
+    In a setup with both VRR capable and non-VRR capable displays,
+    it was so far inconsistent if the driver would allow use of
+    VRR support or not, as "is_connector_vrr_capable" was set to
+    whatever the capabilities of the last added drm output were.
+    Iow. the plugging order of monitors determined the outcome.
     
-    Switch to libdrm's function that already works correctly on all platforms.
+    Fix this: Now if at least one display is VRR capable, the driver
+    will treat an X-Screen as capable for VRR, plugging order no
+    longer matters.
     
-    Signed-off-by: Greg V <greg@unrelenting.technology>
-    Reviewed-by: Emmanuel Vadot <manu@FreeBSD.org>
-    (cherry picked from commit 239ebdc9e447d4f836d0c2aa6068c6064fffb46c)
+    Tested with a dual-display setup with one VRR monitor and one
+    non-VRR monitor. This is also beneficial with the new Option
+    "AsyncFlipSecondaries".
+    
+    When we are at it, also add some so far missing description of
+    the "VariableRefresh" driver option, copied from amdgpu-ddx.
+    
+    Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
+    (cherry picked from commit 017ce263376aa64a495c4d71a140a24b1dff7054)
 
-commit d108c2c82cba242ea5998d7c91254d90d3a5db71
-Author: Olivier Fourdan <ofourdan@redhat.com>
-Date:   Fri Sep 11 11:30:18 2020 +0200
+commit 0d0986bf3b924ccb26e4bc6a8c06aed41f238683
+Author: Mario Kleiner <mario.kleiner.de@gmail.com>
+Date:   Fri Oct 1 07:42:01 2021 +0200
 
-    xwayland: Do not discard frame callbacks on allow commits
+    modesetting: Enable GAMMA_LUT for lut's with up to 4096 slots.
     
-    Currently, when a X11 client (usually the X11 window manager from a
-    Wayland compositor) changes the value of the X11 property
-    `_XWAYLAND_ALLOW_COMMITS` from `false` to `true`, all pending frame
-    callbacks on the window are discarded so that the commit occurs
-    immediately.
+    A lut size of 4096 slots has been verified to work correctly,
+    as tested with amdgpu-kms. Intel Tigerlake Gen12 hw has a very
+    large GAMMA_LUT size of 262145 slots, but also issues with its
+    current GAMMA_LUT implementation, as of Linux 5.14.
     
-    Weston uses that mechanism to prevent the content of the window from
-    showing before it's ready when mapping the window initially, but
-    discarding the pending frame callbacks has no effect on the initial
-    mapping of the X11 window since at that point there cannot be any frame
-    callback on a surface which hasn't been committed yet anyway.
+    Therefore we keep GAMMA_LUT off for large lut's. This currently
+    excludes Intel Icelake, Tigerlake and later.
     
-    However, discarding pending frame callbacks can be problematic if we
-    were to use the same `_XWAYLAND_ALLOW_COMMITS` mechanism to prevent
-    damages to be posted before the X11 toplevel is updated completely
-    (including the window decorations from the X11 window manager).
+    This can be overriden via the "UseGammaLUT" boolean xorg.conf option
+    to force use of GAMMA_LUT on or off.
     
-    Remove the portion of code discarding the pending frame callback,
-    Xwayland should always wait for a pending frame callback if there's one
-    before posting new damages.
+    See following link for the Tigerlake situation:
+    https://gitlab.freedesktop.org/drm/intel/-/issues/3916#note_1085315
     
-    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
-    Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
-    https://gitlab.freedesktop.org/xorg/xserver/merge_requests/333
-    (cherry picked from commit 66da95a172c4941b75ffedcdaa0138c0a48f11fb)
+    Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
+    (cherry picked from commit 66e5a5bb12c58413a4d71781c5a7f63f675bfe55)
 
-commit 174cb91d82d643f78d8ba2b9999312b9d7dea98c
-Author: Michel Dänzer <mdaenzer@redhat.com>
-Date:   Mon Sep 7 18:40:34 2020 +0200
+commit bc1327e6de82da560c97f66c9c196d9bbd2d24be
+Author: Ray Strode <rstrode@redhat.com>
+Date:   Mon Oct 4 14:27:54 2021 -0400
 
-    present/wnmd: Remove dead check from present_wnmd_check_flip
+    xkb: Drop check for XkbSetMapResizeTypes
     
-    present_wnmd_toplvl_pixmap_window returns a window with the same window
-    pixmap, so the check could never fail.
+    Commit 446ff2d3177087b8173fa779fa5b77a2a128988b added checks to
+    prevalidate the size of incoming SetMap requests.
     
-    Reviewed-by: Roman Gilg <subdiff@gmail.com>
-    (cherry picked from commit b6b1161fd7ac409156fb69439897bcabdeacf393)
-
-commit 51ee6e5ceb0cacc8e2fa225ad5391ffb159e36a0
-Author: Michel Dänzer <mdaenzer@redhat.com>
-Date:   Mon Sep 7 18:39:17 2020 +0200
-
-    xwayland: Check window pixmap in xwl_present_check_flip2
+    That commit checks for the XkbSetMapResizeTypes flag to be set before
+    allowing key types data to be processed.
     
-    We can only flip if the window pixmap matches that of the toplevel
-    window. Doing so regardless could cause the toplevel window pixmap to
-    get destroyed while it was still referenced by the window, resulting in
-    use-after-free and likely a crash.
+    key types data can be changed or even just sent wholesale unchanged
+    without the number of key types changing, however. The check for
+    XkbSetMapResizeTypes rejects those legitimate requests. In particular,
+    XkbChangeMap never sets XkbSetMapResizeTypes and so always fails now
+    any time XkbKeyTypesMask is in the changed mask.
     
-    Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1033
-    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
-    Reviewed-by: Roman Gilg <subdiff@gmail.com>
-    (cherry picked from commit 4c25356d6cd908c5030c70e712076dff318ac00d)
+    This commit drops the check for XkbSetMapResizeTypes in flags when
+    prevalidating the request length.
+    
+    (cherry picked from commit 8b7f4d3259e8b7d1eb3d8a83e8852989e869596a)
 
-commit f4006d795cb199bf7deeb00f542c592db6a5becb
-Author: Michel Dänzer <mdaenzer@redhat.com>
-Date:   Mon Sep 7 18:35:10 2020 +0200
+commit b87536682c185b6a825525d01e95e264018c0997
+Author: Mario Kleiner <mario.kleiner.de@gmail.com>
+Date:   Tue Sep 14 07:52:33 2021 +0200
 
-    present/wnmd: Can't use page flipping for windows clipped by children
+    Revert "modesetting: Only use GAMMA_LUT if its size is 1024"
     
-    Noticed this was missing while working on the following fix.
+    This reverts commit 617f591fc44e24413e1f91017d16734999bbbac1.
     
-    v2:
-    * Dropped present_wnmd_can_window_flip hunk (that function is never
-      called, will be cleaned up in a follow-up MR).
+    The problem described in that commit exists, but the two
+    preceeding commits with improvements to the servers RandR
+    code should avoid the mentioned problems while allowing the
+    use of GAMMA_LUT's instead of legacy gamma lut.
     
-    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com> # v1
-    Reviewed-by: Roman Gilg <subdiff@gmail.com>
-    (cherry picked from commit 7ac303c7b1e3b1be79ba3648e217798683e65a99)
+    Use of legacy gamma lut's is not a good fix, because it will reduce
+    color output precision of gpu's with more than 1024 GAMMA_LUT
+    slots, e.g., AMD, ARM MALI and KOMEDA with 4096 slot luts,
+    and some Mediathek parts with 512 slot luts. On KOMEDA, legacy
+    lut's are completely unsupported by the kms driver, so gamma
+    correction gets disabled.
+    
+    The situation is especially bad on Intel Icelake and later:
+    Use of legacy gamma tables will cause the kms driver to switch
+    to hardware legacy lut's with 256 slots, 8 bit wide, without
+    interpolation. This way color output precision is restricted to
+    8 bpc and any deep color / HDR output (10 bpc, fp16, fixed point 16)
+    becomes impossible. The latest Intel gen gpu's would have worse
+    color precision than parts which are more than 10 years old.
+    
+    Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
+    (cherry picked from commit 545fa90cbf37a4c18f013dabc9f3bfb8310a5a98)
 
-commit 1e84fda2020b12a83c6b9c6d31ab84f993c6176c
-Author: Michel Dänzer <mdaenzer@redhat.com>
-Date:   Tue Sep 1 11:24:57 2020 +0200
+commit 473a48660fc8a326312df2d5925017ce8152c7db
+Author: Mario Kleiner <mario.kleiner.de@gmail.com>
+Date:   Tue Sep 14 07:51:46 2021 +0200
 
-    xfree86: Take second reference for SavedCursor in xf86CursorSetCursor
+    xfree86: Let xf86RandR12CrtcComputeGamma() deal with non-power-of-2 sizes.
     
-    The same pointer is kept in CurrentCursor as well, therefore two
-    RefCursor calls are needed.
+    The assumption in the upsampling code was that the crtc->gamma_size
+    size of the crtc's gamma table is a power of two. This is true for
+    almost all current driver + gpu combos at least on Linux, with typical
+    sizes of 256, 512, 1024 or 4096 slots.
     
-    Fixes use-after-free after switching VTs.
+    However, Intel Gen-11 Icelake and later are outliers, as their gamma
+    table has 2^18 + 1 slots, very big and not a power of two!
     
-    Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1067
-    (cherry picked from commit 919f1f46fc67dae93b2b3f278fcbfc77af34ec58)
+    Try to make upsampling behave at least reasonable: Replicate the
+    last gamma value to fill up remaining crtc->gamma_red/green/blue
+    slots, which would normally stay uninitialized. This is important,
+    because while the intel display driver does not actually use all
+    2^18+1 values passed as part of a GAMMA_LUT, it does need the
+    very last slot, which would not get initialized by the old code.
+    
+    This should hopefully create reasonable behaviour with Icelake+
+    but is untested on the actual Intel hw due to lack of suitable
+    hw.
+    
+    Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
+    (cherry picked from commit 7326e131df3d1373dd796d9e2d931e81a3536bad)
 
-commit 8c3c8bda2c44fb3d62b954b02b08e3b1771ef5bc
-Author: Michel Dänzer <mdaenzer@redhat.com>
-Date:   Tue Aug 25 17:26:56 2020 +0200
+commit b33f487a7ca276e11214eb45b87aab970ca43d79
+Author: Mario Kleiner <mario.kleiner.de@gmail.com>
+Date:   Tue Sep 14 07:40:49 2021 +0200
 
-    glamor: Fix glamor_poly_fill_rect_gl xRectangle::width/height handling
+    xfree86: Avoid crash in xf86RandR12CrtcSetGamma() memcpy path.
     
-    (Using GLSL 1.30 or newer)
+    If randrp->palette_size is zero, the memcpy() path can read past the
+    end of the randr_crtc's gammaRed/Green/Blue tables if the hw crtc's
+    gamma_size is greater than the randr_crtc's gammaSize.
     
-    The width/height members of xRectangle are unsigned, but they were
-    being interpreted as signed when converting to floating point for the
-    vertex shader, producing incorrect drawing for values > 32767.
+    Avoid this by clamping the to-be-copied size to the smaller of both
+    sizes.
     
-    v2:
-    * Use separate GL_UNSIGNED_SHORT vertex attribute for width/height.
-      (Eric Anholt)
+    Note that during regular server startup, the memcpy() path is only
+    taken initially twice, but then a suitable palette is created for
+    use during a session. Therefore during an actual running X-Session,
+    the xf86RandR12CrtcComputeGamma() will be used, which makes sure that
+    data is properly up- or down-sampled for mismatching source and
+    target crtc gamma sizes.
     
-    Reviewed-by: Eric Anholt <eric@anholt.net>
-    (cherry picked from commit 032af35657aa95c6bbdb74ff8c72e535b9b56cfa)
-
-commit b28c882889cbea9be3748d3dee1b21ba6eb90b66
-Author: Arthur Williams <taaparthur@gmail.com>
-Date:   Fri Sep 25 04:52:57 2020 +0000
-
-    include: Increase the number of max. input devices to 256.
+    This should avoid reading past randr_crtc gamma memory for gpu's
+    with big crtc->gamma_size, e.g., AMD/MALI/KOMEDA 4096 slots, or
+    Intel Icelake and later with 262145 slots.
     
-    Extending the decade old f0124ed93, to increase the number of input
-    devices from 40 to 256. 40 translates at most 9 MD, while 256 will allow
-    63 MD. It is an arbitrary number, but people are hitting the current
-    limit under reasonable conditions.
+    Tested against modesetting-ddx and amdgpu-ddx under screen color
+    depth 24 (8 bpc) and 30 (10 bpc) to make sure that clamping happens
+    properly.
     
-    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=64793
-    Signed-off-by: Arthur Williams <taaparthur@gmail.com>
+    This is an alternative fix for the one attempted in commit
+    617f591fc44e24413e1f91017d16734999bbbac1.
     
-    (cherry picked from commit fe439596b99db65bbae35eff1ea0b79db167f8d6)
+    Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
+    (cherry picked from commit 966f567432e91762382db09129f8fb4e2e434437)
 
-commit af4c84ce8855e84c0ad89b929bc972e884f0b8e3
+commit d1ca47e1242b51c79cec7287f52c36c8e494706b
 Author: Olivier Fourdan <ofourdan@redhat.com>
-Date:   Tue Sep 8 10:03:33 2020 +0200
+Date:   Tue Sep 14 16:32:45 2021 +0200
 
-    Revert "linux: Make platform device probe less fragile"
+    glamor: Fix leak in glamor_build_program()
+    
+    Fix the possible leak of `vs_prog_string` and `fs_prog_string` in case
+    of failure, as reported by covscan.
     
-    This reverts commit 74b7427c41b4e4104af7abf70a996c086d3d7628.
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+    (cherry picked from commit 2906ee5e4a722138cccb3265a615da7705a52589)
+
+commit d00e7dfc9da165810a578fa0910475686e1fa51c
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Tue Sep 21 23:35:42 2021 +0300
+
+    xserver 21.1 RC 1
     
-    https://gitlab.freedesktop.org/xorg/xserver/-/issues/1068
+    Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
 
-commit 39cb95e959fab97a7e255dda1a1599b096fb0f7e
-Author: Olivier Fourdan <ofourdan@redhat.com>
-Date:   Tue Sep 8 10:03:11 2020 +0200
+commit 4ee66f574a70948ca90a5db94dd666a389a5ff3e
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Wed Sep 15 21:49:17 2021 +0300
 
-    Revert "linux: Fix platform device PCI detection for complex bus topologies"
+    Drop XWayland DDX
+
+commit 72c5d153c920d769802ed73a1b9bfd0d32e7c178
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date:   Fri Sep 10 11:02:00 2021 -0700
+
+    xfree86: NUL-terminate strings in hwEnableIO
+    
+    The Linux version of xf86EnableIO calls a helper function called hwEnableIO().
+    Except on Alpha, this function reads /proc/ioports looking for the 'keyboard'
+    and 'timer' ports, extracts the port ranges, and enables access to them. It does
+    this by reading 4 bytes from the string for the start port number and 4 bytes
+    for the last port number, passing those to atoi(). However, it doesn't add a
+    fifth byte for a NUL terminator, so some implementations of atoi() read past the
+    end of this string, triggering an AddressSanitizer error:
+    
+      ==1383==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7fff71fd5b74 at pc 0x7fe1be0de3e0 bp 0x7fff71fd5ae0 sp 0x7fff71fd5288
+      READ of size 5 at 0x7fff71fd5b74 thread T0
+          #0 0x7fe1be0de3df in __interceptor_atoi /build/gcc/src/gcc/libsanitizer/asan/asan_interceptors.cpp:520
+          #1 0x564971adcc45 in hwEnableIO ../hw/xfree86/os-support/linux/lnx_video.c:138
+          #2 0x564971adce87 in xf86EnableIO ../hw/xfree86/os-support/linux/lnx_video.c:174
+          #3 0x5649719f6a30 in InitOutput ../hw/xfree86/common/xf86Init.c:439
+          #4 0x564971585924 in dix_main ../dix/main.c:190
+          #5 0x564971b6246e in main ../dix/stubmain.c:34
+          #6 0x7fe1bdab6b24 in __libc_start_main (/usr/lib/libc.so.6+0x27b24)
+          #7 0x564971490e9d in _start (/home/aaron/git/x/xserver/build.asan/hw/xfree86/Xorg+0xb2e9d)
+    
+      Address 0x7fff71fd5b74 is located in stack of thread T0 at offset 100 in frame
+          #0 0x564971adc96a in hwEnableIO ../hw/xfree86/os-support/linux/lnx_video.c:118
+    
+        This frame has 3 object(s):
+          [32, 40) 'n' (line 120)
+          [64, 72) 'buf' (line 122)
+          [96, 100) 'target' (line 122) <== Memory access at offset 100 overflows this variable
+      HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork
+            (longjmp and C++ exceptions *are* supported)
+      SUMMARY: AddressSanitizer: stack-buffer-overflow /build/gcc/src/gcc/libsanitizer/asan/asan_interceptors.cpp:520 in __interceptor_atoi
+      Shadow bytes around the buggy address:
+        0x10006e3f2b10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+        0x10006e3f2b20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+        0x10006e3f2b30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+        0x10006e3f2b40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+        0x10006e3f2b50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+      =>0x10006e3f2b60: 00 00 f1 f1 f1 f1 00 f2 f2 f2 00 f2 f2 f2[04]f3
+        0x10006e3f2b70: f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+        0x10006e3f2b80: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1
+        0x10006e3f2b90: f1 f1 f8 f2 00 f2 f2 f2 f8 f3 f3 f3 00 00 00 00
+        0x10006e3f2ba0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1
+        0x10006e3f2bb0: f1 f1 00 f3 f3 f3 00 00 00 00 00 00 00 00 00 00
+      Shadow byte legend (one shadow byte represents 8 application bytes):
+        Addressable:           00
+        Partially addressable: 01 02 03 04 05 06 07
+        Heap left redzone:       fa
+        Freed heap region:       fd
+        Stack left redzone:      f1
+        Stack mid redzone:       f2
+        Stack right redzone:     f3
+        Stack after return:      f5
+        Stack use after scope:   f8
+        Global redzone:          f9
+        Global init order:       f6
+        Poisoned by user:        f7
+        Container overflow:      fc
+        Array cookie:            ac
+        Intra object redzone:    bb
+        ASan internal:           fe
+        Left alloca redzone:     ca
+        Right alloca redzone:    cb
+        Shadow gap:              cc
+      ==1383==ABORTING
+    
+    Fix this by NUL-terminating the string.
+    
+    Fixes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1193#note_1053306
+    Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
+
+commit 617f591fc44e24413e1f91017d16734999bbbac1
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date:   Thu Sep 9 15:29:50 2021 -0700
+
+    modesetting: Only use GAMMA_LUT if its size is 1024
     
-    This reverts commit 5c96eb5f44e62a4cfe835023cde304eb5795b8fd.
+    GAMMA_LUT sizes other than 1024 cause a crash during startup if the memcpy()
+    calls in xf86RandR12CrtcSetGamma() read past the end of the legacy X11 /
+    XVidMode gamma ramp.
     
-    https://gitlab.freedesktop.org/xorg/xserver/-/issues/1068
+    This is a problem on Intel ICL / GEN11 platforms because they report a GAMMA_LUT
+    size of 262145. Since it's not clear that the modesetting driver will generate a
+    proper gamma ramp at that size even if xf86RandR12CrtcSetGamma() is fixed, just
+    disable use of GAMMA_LUT for sizes other than 1024 for now. This will cause the
+    modesetting driver to disable the CTM property and fall back to the legacy gamma
+    LUT.
+    
+    Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
+    Fixes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1193
+    Tested-by: Mark Herbert
 
-commit 4b6fce5975c2f931a0478cf4deeec97529b05eb6
-Author: Olivier Fourdan <ofourdan@redhat.com>
-Date:   Tue Sep 8 10:01:55 2020 +0200
+commit e59e24c8779de65db87b8c07bc3f2abb479be082
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Mon Sep 6 22:41:32 2021 +0300
 
-    Revert "linux: Fix platform device probe for DT-based PCI"
+    glamor: Fix handling of 1-bit pixmaps
+    
+    Since 8702c938b33b9ec180d64754eb922515c7c4a98b the pixmap formats are
+    handled in a single place. In the process of conversion the difference
+    between pixmap formats that can be uploaded and those that can be
+    rendered on GL side has been lost. This affects only 1-bit pixmaps: as
+    they aren't supported on GL, but can be converted to a R8 or A8 format
+    for rendering (see glamor_get_tex_format_type_from_pictformat()).
     
-    This reverts commit 249a12c54a9316b089bd22683c011519348496df.
+    To work around this we add a separate flag that specifies whether the
+    format actually supports rendering in GL, convert all checks to use this
+    flag and then add 1-bit pixmap formats that don't support rendering in
+    GL.
     
-    https://gitlab.freedesktop.org/xorg/xserver/-/issues/1068
+    Fixes: 8702c938b33b9ec180d64754eb922515c7c4a98b
+    Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1210
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
+    Tested-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+    Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
 
-commit afb77415e1fb862c322754230f63bb70fd596943
-Author: Matt Turner <mattst88@gmail.com>
-Date:   Tue Aug 25 08:23:42 2020 -0700
+commit 68f01c0f02ece4f6efe9ce18be81244246a1e114
+Author: Mario Kleiner <mario.kleiner.de@gmail.com>
+Date:   Mon Aug 30 05:42:04 2021 +0200
+
+    modesetting: Add option for non-vsynced flips for "secondary" outputs.
+    
+    Whenever an unredirected fullscreen window uses pageflipping for a
+    DRI3/Present PresentPixmap() operation and the X-Screen has more than
+    one active output, multiple crtc's need to execute pageflips. Only
+    after the last flip has completed can the PresentPixmap operation
+    as a whole complete.
+    
+    If a sync_flip is requested for the present, then the current
+    implementation will synchronize each pageflip to the vblank of
+    its associated crtc. This provides tear-free image presentation
+    across all outputs, but introduces a different artifact, if not
+    all outputs run at the same refresh rate with perfect synchrony:
+    The slowest output throttles the presentation rate, and present
+    completion is delayed to flip completion of the "latest" output
+    to complete. This means degraded performance, e.g., a dual-display
+    setup with a 144 Hz monitor and a 60 Hz monitor will always be
+    throttled to at most 60 fps. It also means non-constant present
+    rate if refresh cycles drift against each other, creating complex
+    "beat patterns", tremors, stutters and periodic slowdowns - quite
+    irritating!
+    
+    Such a scenario will be especially annoying if one uses multiple
+    outputs in "mirror mode" aka "clone mode". One output will usually
+    be the "production output" with the highest quality and fastest
+    display attached, whereas a secondary mirror output just has a
+    cheaper display for monitoring attached. Users care about perfect
+    and perfectly timed tear-free presentation on the "production output",
+    but cares less about quality on the secondary "mirror output". They
+    are willing to trade quality on secondary outputs away in exchange
+    for better presentation timing on the "production output".
+    
+    One example use case for such production + monitoring displays are
+    neuroscience / medical science applications where one high quality
+    display device is used to present visual animations to test subjects
+    or patients in a fMRI scanner room (production display), whereas
+    an operator monitors the same visual animations from a control room
+    on a lower quality display. Presentation timing needs to be perfect,
+    and animations high-speed and tear-free for the production display,
+    whereas quality and timing don't matter for the monitoring display.
+    
+    This commit gives users the option to choose such a trade-off as
+    opt-in:
+    
+    It adds a new boolean option "AsyncFlipSecondaries" to the device section
+    of xorg.conf. If this option is specified as true, then DRI3 pageflip
+    behaviour changes as follows:
+    
+    1. The "reference crtc" for a windows PresentPixmap operation does a
+       vblank synced flip, or a DRM_MODE_PAGE_FLIP_ASYNC non-synchronized
+       flip, as requested by the caller, just as in the past. Typically
+       flips will be requested to be vblank synchronized for tear-free
+       presentation. The "reference crtc" is the one chosen by the caller
+       to drive presentation timing (as specified by PresentPixmap()'s
+       "target_msc", "divisor", "remainder" parameters and implemented by
+       vblank events) and to deliver Present completion timestamps (msc
+       and ust) extracted from its pageflip completion event.
+    
+    2. All other crtc's, which also page-flip in a multi-display configuration,
+       will try to flip with DRM_MODE_PAGE_FLIP_ASYNC, ie. immediately and
+       not synchronized to vblank. This allows the PresentPixmap operation
+       to complete with little delay compared to a single-display present,
+       especially if the different crtc's run at different video refresh
+       rates or their refresh cycles are not perfectly synchronized, but
+       drift against each other. The downside is potential tearing artifacts
+       on all outputs apart from the one of the "reference crtc".
+    
+    Successfully tested on a AMD gpu with single-display, dual-display and
+    triple-display setups, and with single-X-Screen as well as dual-X-Screen
+    "ZaphodHeads" configurations.
+    
+    Please consider merging this commit for the upcoming server 1.21 branch.
+    
+    Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
+
+commit 1fd5dec11bbb85e87f70a39f1c1b59af95a7feaf
+Author: Ignacio Casal Quinteiro <qignacio@amazon.com>
+Date:   Tue Sep 7 16:58:10 2021 +0200
 
-    xserver 1.20.9
+    touchevents: set the screen pointer after checking the device is enabled
     
-    Signed-off-by: Matt Turner <mattst88@gmail.com>
+    If the device is disabled the sprite is NULL so we get a seg fault
 
-commit 705d7213935820d9f56563ee9e17aa9beb365c1e
-Author: Matthieu Herrb <matthieu@herrb.eu>
-Date:   Tue Aug 18 14:55:01 2020 +0200
+commit b3b81c8c2090cd49410960a021baf0d27fdd2ab3
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Fri Sep 3 14:33:15 2021 +0300
 
-    Fix XRecordRegisterClients() Integer underflow
+    Drop DMX DDX
     
-    CVE-2020-14362 ZDI-CAN-11574
+    It turns out xdmx currently crashes when any client attempts to use GL
+    and it has been in such state for about 14 years. There was a patch to
+    fix the problem [1] 4 years ago, but it never got merged. The last
+    activity on any bugs referring to xdmx has been more than 4 years ago.
     
-    This vulnerability was discovered by:
-    Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
+    Given such situation, I find it unlikely that anyone is still using xdmx
+    and just having the code is a drain of resources.
     
-    Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
-    (cherry picked from commit 24acad216aa0fc2ac451c67b2b86db057a032050)
+    [1]: https://lists.x.org/archives/xorg-devel/2017-June/053919.html
+    
+    Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
 
-commit 5b384e7678c5a155dd8752f018c8292153c1295e
-Author: Matthieu Herrb <matthieu@herrb.eu>
-Date:   Tue Aug 18 14:52:29 2020 +0200
+commit 8f8ebf870b55c9875b7cfd8ef69c1df02d589b4a
+Author: Mario Kleiner <mario.kleiner.de@gmail.com>
+Date:   Sat Aug 28 02:27:20 2021 +0200
+
+    modesetting: Allow Present flips with mismatched stride on atomic drivers.
+    
+    When using DRI3+Present with PRIME render offload, sometimes there is
+    a mismatch between the stride of the to-be-presented Pixmap and the
+    frontbuffer. The current code would reject a pageflip present in this
+    case if atomic modesetting is not enabled, ie. always, as atomic
+    modesetting is disabled by default due to brokeness in the current
+    modesetting-ddx.
+    
+    Fullscreen presents without page flipping however trigger the copy
+    path as fallback, which causes not only unreliable presentation timing
+    and degraded performance, but also massive tearing artifacts due to
+    rendering to the framebuffer without any hardware sync to vblank.
+    Tearing is extra awful on modesetting-ddx because glamor afaics seems
+    to use drawing of a textured triangle strip for the copy implementation,
+    not a dedicated blitter engine. The rasterization pattern creates extra
+    awful tearing artifacts.
+    
+    We can do better: According to a tip from Michel Daenzer (thanks!),
+    at least atomic modesetting capable kms drivers should be able to
+    reliably change scanout stride during a pageflip, even if atomic
+    modesetting is not actually enabled for the modesetting client.
+    
+    This commit adds detection logic to find out if the underlying kms
+    driver is atomic_modeset_capable, and if so, it no longer rejects
+    page flip presents on mismatched stride between new Pixmap and
+    frontbuffer.
+    
+    We (ab)use a call to drmSetClientCap(ms->fd, DRM_CLIENT_CAP_ATOMIC, 0);
+    for this purpose. The call itself has no practical effect, as it
+    requests disabling atomic mode, although atomic mode is disabled by
+    default. However, the return value of drmSetClientCap() tells us if the
+    underlying kms driver is atomic modesetting capable: An atomic driver
+    will return 0 for success. A legacy non-atomic driver will return a
+    non-zero error code, either -EINVAL for early atomic Linux versions
+    4.0 - 4.19 (or for non-atomic Linux 3.x and earlier), or -EOPNOTSUPP
+    for Linux 4.20 and later.
+    
+    Testing on a MacBookPro 2017 with Intel Kabylake display server gpu +
+    AMD Polaris11 as prime renderoffload gpu, X-Server master + Mesa 21.0.3
+    show improvement from unbearable tearing to perfect, despite a stride
+    mismatch between display gpu and Pixmap of 11776 Bytes vs. 11520
+    Bytes. That this is correct behaviour was also confirmed by comparing the
+    behaviour and .check_flip implementation of the patched modesetting-ddx
+    against the current intel-ddx SNA Present implementation.
+    
+    Please consider merging this patch before the server-1.21 branch point.
+    This patch could also be cherry-picked into the server 1.20 branch to
+    fix the same limitation.
+    
+    Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
 
-    Fix XkbSelectEvents() integer underflow
+commit 7d34b1f2b7c612c3171e0b9758b5fc094bc33f63
+Author: Simon Ser <contact@emersion.fr>
+Date:   Fri Jun 18 11:04:45 2021 +0200
+
+    xwayland: add -noTouchPointerEmulation
     
-    CVE-2020-14361 ZDI-CAN 11573
+    In some scenarios, the Wayland compositor might have more knowledge
+    than the X11 server and may be able to perform pointer emulation for
+    touch events better. Add a command-line switch to allow compositors
+    to turn Xwayland pointer emulation off.
     
-    This vulnerability was discovered by:
-    Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
+    Signed-off-by: Simon Ser <contact@emersion.fr>
+
+commit 7c63c582a17b206a33b57a70dd61e7919a6ef9fe
+Author: Mario Kleiner <mario.kleiner.de@gmail.com>
+Date:   Thu Aug 26 17:06:49 2021 +0200
+
+    Revert "glamor: Enable modifier support for xfree86 too"
+    
+    This reverts commit 9b8999411033c9473cd68e92e4690a91aecf5b95.
+    
+    Turns out that defaulting glamor_egl->dmabuf_capable = TRUE
+    breaks kms page-flipping on various Mesa+Linux/DRM-KMS+hardware
+    combos, resulting in broken presentation timing, degraded performance
+    and awful tearing. E.g., my testing shows that X-Server master +
+    Mesa 21.2 + Linux 5.3 on Intel Kabylake has broken pageflipping.
+    Similar behaviour was observed in the past on RaspberryPi 4/400
+    with VideoCore-6 by myself and others, and iirc by myself on some
+    AMD gpu's, although my memories of the latter are a bit dim.
+    
+    Cfe. https://gitlab.freedesktop.org/mesa/mesa/-/issues/3601 and
+    possibly https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/254
+    for related problems.
+    
+    The reason for pageflip failure on the modesetting-ddx under
+    DRI3/Present seems to be the following sequence:
+    
+    1. Atomic modesetting for the modesetting-ddx is broken and therefore
+       both disabled by default in the modesetting-ddx itself and also
+       force-disabled by the Linux kernel since quite a while. If the kernel
+       detects drmSetClientCap(fd, DRM_CLIENT_CAP_ATOMIC, 1); from the
+       X-Server, it will reject the request, as a countermeasure to all the
+       past and current brokeness.
+    
+    2. Without DRM_CLIENT_CAP_ATOMIC we don't get the implied universal
+       planes support (DRM_CLIENT_CAP_UNIVERSAL_PLANES).
+    
+    3. Without DRM_CLIENT_CAP_UNIVERSAL_PLANES, drmModeGetPlaneResources()
+       will only return overlay planes, but not primary- or cursor planes.
+    
+    4. As modesetting-ddx drmmode_crtc_create_planes() function can only
+       operate on primary planes, but can't get any from drmModeGetPlaneResources(),
+       the drmmode_crtc_create_planes() mostly turns into a no-op, never
+       executes populate_format_modifiers() and therefore the Linux kernels
+       DRM-KMS driver is not ever queried for the list of scanout/pageflip
+       capable DRM format modifiers. Iow. the drmmode_crtc->formats[i].modifiers
+       list stays empty with zero drmmode_crtc->formats[i].num_modifiers.
+    
+    5. The list from step 4 provides the format+modifiers for intersection
+       which would get returned by the X-Servers DRI3 backend as response to
+       a xcb_dri3_get_supported_modifiers_window_modifiers() request. Given
+       an empty list was returned in step 4, this will lead to return of an
+       empty modifiers list by xcb_dri3_get_supported_modifiers_window_modifiers().
+    
+    6. Both Mesa's DRI3/Present OpenGL backbuffer allocation logic and iirc
+       Mesa/Vulkan/WSI/X11's swapchain image allocation logic use the list
+       from xcb_dri3_get_supported_modifiers_window_modifiers() for format+
+       modifier selection for scanout/pageflip capable buffers. Cfe. Mesa's
+       dri3_alloc_render_buffer() function.
+    
+       Due to the empty list, the Mesa code falls back to the format+modifiers
+       reported by xcb_dri3_get_supported_modifiers_screen_modifiers()
+       instead. This list contains all modifiers reported by GLAMOR as
+       result of glamor_get_formats() and glamor_get_modifiers(), which
+       in turn are query results from Mesa eglQueryDmaBufFormatsEXT()
+       and eglQueryDmaBufModifiersEXT(). Iow. all format+modifiers which
+       are supported for rendering are considered for the OpenGL backbuffers
+       and Vulkan swapchain buffers.
+    
+    7. Depending on kms driver + gpu combo and Mesa version, such buffers
+       are often not direct-scanout / pageflip capable, and so pageflipping
+       can't be used for DRI3/Present of fullscreen windows. Whenever the
+       system has to fallback to copies instead of pageflips, the results
+       are broken presentation timing, degraded performance and quite
+       horrible tearing, as the current DRI3/Present implementation does not
+       perform any hardware synchronization of copy presents to the start
+       of vblank or similar.
+    
+    By defaulting glamor_egl->dmabuf_capable = FALSE instead, as the server
+    1.20 branch does, we avoid this failure:
+    
+    1. glamor_get_modifiers() turns into a no-op and returns false, not
+       reporting any supported dmabuf modifiers to the servers DRI3 code,
+       ie. the servers cache_formats_and_modifiers() function can't retrieve
+       and cache any format+modifiers. Therefore the servers DRI3 code now
+       also reports an empty format+modifiers list when Mesa does a
+       xcb_dri3_get_supported_modifiers_screen_modifiers() query.
+    
+    2. Mesa's buffer allocation code therefore falls back to using the old
+       DRI image extensions createImage() function to allocate buffers
+       with use flags __DRI_IMAGE_USE_SCANOUT | __DRI_IMAGE_USE_BACKBUFFER
+       and our OpenGL backbuffers / Vulkan swapchain images get allocated
+       in a direct-scanout / pageflip capable format. Pageflipping works,
+       timing and performance is good, presentation is tear-free.
+    
+    Please consider merging this for branching the X-Server 1.21 branch.
     
-    Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
-    (cherry picked from commit 90304b3c2018a6b8f4a79de86364d2af15cb9ad8)
+    Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
 
-commit eff3f6cdd398bfac040351e99e64baf3bf64fa2e
-Author: Matthieu Herrb <matthieu@herrb.eu>
-Date:   Tue Aug 18 14:49:04 2020 +0200
+commit c5a9287dcf8d77ab104d56ac27ad6b1ff957fdfb
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Wed May 12 16:51:26 2021 +0100
 
-    Fix XIChangeHierarchy() integer underflow
-    
-    CVE-2020-14346 / ZDI-CAN-11429
-    
-    This vulnerability was discovered by:
-    Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
+    Don't underlink inputtest on targets which require complete linkage
     
-    Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
-    (cherry picked from commit 1e3392b07923987c6c9d09cf75b24f397b59bd5e)
+    Don't underlink inputtest on targets which require complete linkage
+    (e.g. when building for PE/COFF)
 
-commit 1d3a1092c30af660b1366fcd344af745590aa29f
-Author: Matthieu Herrb <matthieu@herrb.eu>
-Date:   Tue Aug 18 14:46:32 2020 +0200
+commit d68b50ec032fe4f02bde817abfd30328ec96a11c
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Sat Jul 10 17:38:01 2021 +0100
 
-    Correct bounds checking in XkbSetNames()
+    Fix compilation with windows.h from latest w32api
     
-    CVE-2020-14345 / ZDI 11428
+    misc.h has complex logic (checking MAXSHORT is undefined etc.)
+    controlling if it includes assert.h or not.
     
-    This vulnerability was discovered by:
-    Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
+    Including windows.h from w32api 9.0.0 now trips over that, causing
+    assert.h to not be included, causing various errors, e.g.
     
-    Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
-    (cherry picked from commit 11f22a3bf694d7061d552c99898d843bcdaf0cf1)
+    In file included from ../include/cursor.h:53,
+                     from ../include/dix.h:54,
+                     from ../os/osdep.h:139,
+                     from ../hw/xwin/winauth.c:40:
+    ../include/privates.h: In function ‘dixGetPrivateAddr’:
+    ../include/privates.h:121:5: error: implicit declaration of function ‘assert’ [-Werror=implicit-function-declaration]
+    
+    Fix this by IWYU in privates.h
 
-commit 249a12c54a9316b089bd22683c011519348496df
-Author: Huacai Chen <chenhc@lemote.com>
-Date:   Sun Jul 5 05:59:58 2020 -0400
+commit ab86be0ed9233d6683daf00d359c562b12e137c8
+Author: Mario Kleiner <mario.kleiner.de@gmail.com>
+Date:   Fri Aug 27 19:27:29 2021 +0200
 
-    linux: Fix platform device probe for DT-based PCI
+    modesetting: Fix VRR window property handling.
     
-    On a DT-base PCI platform, the sysfs path of vga device is like this:
-    /sys/devices/platform/bus@10000000/1a000000.pci/pci0000:00/0000:00:11.0/0000:04:00.0.
+    A misplaced error check can cause this failure scenario, and does
+    so reliably as tested on Ubuntu 21.04 with KDE Plasma 5 desktop
+    within the first few seconds of login session startup, rendering
+    VRR under modesetting-ddx unusable:
     
-    Then the ID_PATH from udev is platform-1a000000.pci-pci-0000:04:00.0 and
-    the BusID will be pci-0000:04:00.0, which causes Xorg start fail. This
-    is because config_udev_odev_setup_attribs() use strstr() to search the
-    first "pci-" in ID_PATH. To fix this, we implement a strrstr() function
-    and use it to search the last "pci-" in ID_PATH, which can get a correct
-    BusID.
+    1. Some X11 client application changes some window property.
     
-    (backported from commit 9fbd3e43dd9e13700df96b508c3d97f77e2b9f7e)
+    2. ms_change_property() is called as part of the property change
+       handling call chain (client->requestVector[X_ChangeProperty]).
+       It removes itself temporarily from the call chain - or so it
+       thinks, hooking up saved_change_property instead.
     
-    Reviewed-by: Dave Airlie <airlied@redhat.com>
-    Signed-off-by: Huacai Chen <chenhc@lemote.com>
-
-commit 5c96eb5f44e62a4cfe835023cde304eb5795b8fd
-Author: Adam Jackson <ajax@redhat.com>
-Date:   Wed Jun 19 14:23:56 2019 -0400
-
-    linux: Fix platform device PCI detection for complex bus topologies
+    3. ret = saved_change_property(client) is called and fails
+       temporarily for some non-critical reason.
     
-    Suppose you're in a Hyper-V guest and are trying to use PCI passthrough.
-    The ID_PATH that udev will construct for that looks something like
-    "acpi-VMBUS:00-pci-b8c8:00:00.0", and obviously looking for "pci-" in
-    the first four characters of that is going to not work.
+    4. The misplaced error check returns early (error abort), without
+       first restoring ms_change_property() as initial X_ChangeProperty
+       handler in the call chain again.
     
-    Instead, strstr. I suppose it's possible you could have _multiple_ PCI
-    buses in the path, in which case you'd want strrstr, if that were a
-    thing.
+    -> Now ms_change_property() has removed itself permanently from the
+       property handler call chain for the remainder of the X session
+       and VRR property changes on windows are no longer handled, ie.
+       VRR no longer gets enabled/disabled in response to window VRR
+       property changes.
     
-    (backported from commit 9acff309434a8029bcce1b22530043459bb71791)
+    Place the error check at the proper place, just as it is correctly
+    done by amdgpu-ddx, and in modesetting-ddx ms_delete_property()
+    function.
     
-    Signed-off-by: Adam Jackson <ajax@redhat.com>
-    Signed-off-by: Huacai Chen <chenhc@lemote.com>
+    Verified to fix VRR handling with an AMD gpu under KDE desktop
+    session.
+    
+    Please consider merging before branching the server 1.21 branch.
+    
+    Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
 
-commit 74b7427c41b4e4104af7abf70a996c086d3d7628
-Author: Adam Jackson <ajax@redhat.com>
-Date:   Tue Sep 18 14:37:51 2018 -0400
+commit 18d3131f9a332096825c09106a931c427246ddb7
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Thu Aug 5 22:43:54 2021 +0300
 
-    linux: Make platform device probe less fragile
+    meson: Implement developer documentation build
     
-    At the point where xf86BusProbe runs we haven't yet taken our own VT,
-    which means we can't perform drm "master" operations on the device. This
-    is tragic, because we need master to fish the bus id string out of the
-    kernel, which we can only do after drmSetInterfaceVersion, which for
-    some reason stores that string on the device not the file handle and
-    thus needs master access.
+    Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
+
+commit 722da1c62caad961ce09fc226daf84465f4b7a7e
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Fri Aug 6 15:21:53 2021 +0300
+
+    meson: Add option to disable libdrm support
     
-    Fortunately we know the format of the busid string, and it happens to
-    almost be the same as the ID_PATH variable from udev. Use that instead
-    and stop calling drmSetInterfaceVersion.
+    Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
+
+commit 1f720dc9a319bb66e2f5f28568614e81aa9e9e4d
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Aug 17 16:06:57 2021 -0400
+
+    dmx: Fix some redeclaration warnings from gcc 11
     
-    (backported from commit 0816e8fca6194dfb4cc94c3a7fcb2c7f2a921386)
+    Of the form:
     
-    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
-    Signed-off-by: Adam Jackson <ajax@redhat.com>
-    Signed-off-by: Huacai Chen <chenhc@lemote.com>
+        ../hw/dmx/config/xdmxconfig.c:68:26: warning: redundant redeclaration of ‘dmxConfigEntry’ [-Wredundant-decls]
+           68 | extern DMXConfigEntryPtr dmxConfigEntry;
+              |                          ^~~~~~~~~~~~~~
 
-commit 4979ac8f0be6fa2c4a1edd8a527f7d2134d8586a
-Author: Matthieu Herrb <matthieu@herrb.eu>
-Date:   Sat Jul 25 19:33:50 2020 +0200
+commit b49f0f9b323d66056aa9cd88f9ca1a124037bf32
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Aug 17 16:04:40 2021 -0400
 
-    fix for ZDI-11426
+    xkb: Silence a warning from gcc 11
     
-    Avoid leaking un-initalized memory to clients by zeroing the
-    whole pixmap on initial allocation.
+    I get this:
     
-    This vulnerability was discovered by:
-    Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
+        In function ‘TryCopyStr’,
+            inlined from ‘CopyISOLockArgs’ at ../xkb/xkbtext.c:875:9:
+        ../xkb/xkbtext.c:720:13: warning: ‘tbuf’ may be used uninitialized [-Wmaybe-uninitialized]
+          720 |             strcat(to, from);
+              |             ^~~~~~~~~~~~~~~~
+        ../xkb/xkbtext.c: In function ‘CopyISOLockArgs’:
+        <built-in>: note: by argument 1 of type ‘const char *’ to ‘__builtin_strlen’ declared here
+        ../xkb/xkbtext.c:871:10: note: ‘tbuf’ declared here
+          871 |     char tbuf[64];
+              |          ^~~~
     
-    Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
-    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-    (cherry picked from commit a6b2cbe91793ae4967cd21a7103d889248029553)
+    Just initialize tbuf so it definitely works.
 
-commit 2720b871575504349d9f4dffbc73539f1626bd78
-Author: Aaron Ma <aaron.ma@canonical.com>
-Date:   Thu Jul 30 11:02:39 2020 +0200
+commit c1138d8ec8d029de54261e355c0e5da0b001044a
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Fri Jul 9 15:30:16 2021 -0400
 
-    xfree86: add drm modes on non-GTF panels
+    xinput: Silence a warning from gcc 11
     
-    EDID1.4 replaced GTF Bit with Continuous or Non-Continuous Frequency Display.
+    [45/388] Compiling C object Xi/liblibxserver_xi.a.p/xichangehierarchy.c.o
+    ../Xi/xichangehierarchy.c:61:32: warning: argument 1 of type ‘int[256]’ with mismatched bound [-Warray-parameter=]
+       61 | XISendDeviceHierarchyEvent(int flags[MAXDEVICES])
+          |                            ~~~~^~~~~~~~~~~~~~~~~
+    In file included from ../Xi/xichangehierarchy.c:54:
+    ../Xi/xichangehierarchy.h:42:37: note: previously declared as ‘int[]’
+       42 | void XISendDeviceHierarchyEvent(int flags[]);
+          |                                 ~~~~^~~~~~~
+
+commit f3a98334e6a56858853f3894b0f48ee040741410
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Fri Jul 9 15:26:47 2021 -0400
+
+    selinux: Stop using security_context_t
     
-    Check the "Display Range Limits Descriptor" for GTF support.
-    If panel doesn't support GTF, then add gtf modes.
+    This is apparently deprecated now and is and was always just char *.
+
+commit 6f63873da55de33e51c1f6849a65501e380f19bc
+Author: Simon Ser <contact@emersion.fr>
+Date:   Mon Jul 5 15:30:16 2021 +0200
+
+    xwayland: fix xdg_output leak
     
-    Otherwise X will only show the modes in "Detailed Timing Descriptor".
+    The xdg_output wasn't cleaned up when destroying the xwl_output.
     
-    V2: Coding style changes.
-    V3: Coding style changes, remove unused variate.
-    V4: remove unused variate.
+    Signed-off-by: Simon Ser <contact@emersion.fr>
+
+commit 659260a0b7c1cef6060bd62a83deb03e3fa472b1
+Author: Demi Marie Obenour <demi@invisiblethingslab.com>
+Date:   Fri Aug 6 13:23:08 2021 -0400
+
+    More missing version checks in SProcs
     
-    BugLink: https://gitlab.freedesktop.org/drm/intel/issues/313
-    Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
-    Reviewed-by: Adam Jackson <ajax@redhat.com>
-    (cherry picked from commit 6a79a737e2c0bc730ee693b4ea4a1530c108be4e)
+    The bug in XFixes was also found in GenericEvent and Damage.
 
-commit 7da8e7babee16f7d518cd9ee2a71c950fe2c3c3f
+commit e4dabe8d9395d60699aa9831626920adaa847680
 Author: Roman Gilg <subdiff@gmail.com>
-Date:   Fri Jul 24 12:21:37 2020 +0200
+Date:   Sat Aug 7 14:15:07 2021 +0200
 
-    present: Check valid region in window mode flips
-    
-    For Pixmap flips to have well defined outcomes the window must be contained by
-    the valid region if such region was specified.
+    Remove build-only include from public header
     
-    The valid region is inserted as an argument to the check in window mode.
-    Setting this argument is missing in screen mode as well but we ignore it for now
-    and only add it to window mode.
+    The dix-config.h file is not installed, but dix.h is. The include makes the
+    compilation of external drivers fail (for example the libinput driver).
     
-    It seems there are none or only very few clients actually making use of valid
-    regions at the moment. For simplicity we therefore just check if a valid region
-    was set by the client and in this case do never flip, independently of the
-    window being contained by the region or not.
+    The Xserver compilation also works without the include, so just remove it.
     
     Signed-off-by: Roman Gilg <subdiff@gmail.com>
-    (cherry picked from commit 591916ea9e7a77f68f436b4a541402d9deadfe64)
 
-commit 4a65b6617ecc43b754885894f6575fb7dc4bb74d
-Author: Michel Dänzer <mdaenzer@redhat.com>
-Date:   Thu Jul 23 19:14:28 2020 +0200
+commit 31fb35a7afc782e857bf60e524e7d966dbcd2551
+Author: Demi Marie Obenour <demi@invisiblethingslab.com>
+Date:   Tue Jul 20 22:58:42 2021 -0400
 
-    xwayland: Handle NULL xwl_seat in xwl_seat_can_emulate_pointer_warp
-    
-    This can happen e.g. with weston's headless backend.
+    XFixes: add version check for byteswapped clients
     
-    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
-    (cherry picked from commit e33453f9111b21e4814d628e6ae00bc7b200f404)
+    The version check for byteswapped clients was missing.
 
-commit 10cabe0b978677cfac4bfb405295a16ee8eedb34
-Author: Michel Dänzer <mdaenzer@redhat.com>
-Date:   Tue Mar 17 12:58:12 2020 +0100
+commit 7eba412072afdc9d27896410872e40364a8010bf
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Fri Mar 26 15:48:23 2021 +0100
 
-    xwayland: Propagate damage x1/y1 coordinates in xwl_present_flip
+    xfree86: Move xf86CVTMode() function
     
-    This couldn't have worked correctly for non-0 x1/y1.
+    The xf86CVTMode() was implemented in a standalone source file because it
+    was being used for both the xfree86 API and the standalone cvt utility.
     
-    Noticed by inspection.
+    Now that the cvt utility is removed (as part of libxcvt) we can move the
+    small xf86CVTMode() function with the rest of the xf86Modes sources.
     
-    Reviewed-by: Simon Ser <contact@emersion.fr>
-    (cherry picked from commits 9141196d3104ab37385c3e385deaa70c002dd184)
-    (cherry picked fixup from commit 85a6fd11c723888ca093785a3df43066fdca9c33)
+    Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1142
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Matt Turner <mattst88@gmail.com>
 
-commit 3b51978b9ca8cdc71508f6db2411255ca6406c3a
-Author: Alan Coopersmith <alan.coopersmith@oracle.com>
-Date:   Tue Jul 21 18:34:28 2020 +0200
+commit f2781e95369583259991cd3add6f90f33be32171
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Thu Mar 25 10:27:31 2021 +0100
 
-    doc: Update URLs in Xserver-DTrace.xml
+    xfree86/cvt: Drop cvt utility
     
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-    (cherry picked from commit 0006aecba097b437f96a462075494d68bdad24c1)
+    The cvt utility is now replaced by the standalone version found in
+    libxcvt, no need to build the one in xfree86 anymore.
+    
+    Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1142
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Matt Turner <mattst88@gmail.com>
 
-commit 6cbd6a09b9037c6e6074127324978a51442ca375
+commit f788289bdcc4f04bd2fb62552df1c8c1ae0aea45
 Author: Olivier Fourdan <ofourdan@redhat.com>
-Date:   Tue Jun 2 11:23:46 2020 +0200
+Date:   Thu Mar 25 10:19:55 2021 +0100
 
-    xwayland: Use a fixed DPI value for core protocol
+    xfree86: Use libxcvt
     
-    The way Xwayland works (like all Wayland clients), it first queries the
-    Wayland registry, set up all relevant protocols and then initializes its
-    own structures.
+    Replace the local implementation of the VESA CVT standard timing
+    modelines generator with the one from libxct to avoid code duplication.
     
-    That means Xwayland will get the Wayland outputs from the Wayland
-    compositor, compute the physical size of the combined outputs and set
-    the corresponding Xwayland screen properties accordingly.
+    Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1142
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Matt Turner <mattst88@gmail.com>
+
+commit 6ea2c001f9d23c91113b937fb99053e262d21df6
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Thu Mar 25 10:17:49 2021 +0100
+
+    xwayland: Use libxcvt
     
-    Then it creates the X11 screen using fbScreenInit() but does so by using
-    a default DPI value of 96. That value is used to set the physical size
-    of the X11 screen, hence overriding the value computed from the actual
-    physical size provided by the Wayland compositor.
+    Xwayland is using a copy of the CVT generator found in Xorg.
     
-    As a result, the DPI computed by tools such as xdpyinfo will always be
-    96 regardless of the actual screen size and resolution.
+    Rather than duplicating the code within the xserver tree, use the
+    libxcvt implementation instead.
     
-    However, if the Wayland outputs get reconfigured, or new outputs added,
-    or existing outputs removed, Xwayland will recompute and update the
-    physical size of the screen, leading to an unexpected change of DPI.
+    Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1142
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Matt Turner <mattst88@gmail.com>
+
+commit a4ab57cb748674823744a8ef5a0b416ee553efe8
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Thu Mar 25 10:16:31 2021 +0100
+
+    build: Add dependency on libxcvt
     
-    To avoid that discrepancy, use a fixed size DPI (defaults to 96, and can
-    be set using the standard command lime option "-dpi") and compute a
-    physical screen size to match that DPI setting.
+    libxcvt is a library providing a standalone version of the X server
+    implementation of the VESA CVT standard timing modelines generator.
     
-    Note that only affects legacy core protocols, X11 clients can still get
-    the actual physical output size as reported by the Wayland compositor
-    using the RandR protocol, which also allows for the size to be 0 if the
-    size is unknown or meaningless.
+    Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1142
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Matt Turner <mattst88@gmail.com>
+
+commit 84897891e5e7eb44068cda22284dca70c6cfd1a2
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Fri Jul 9 15:11:51 2021 +0200
+
+    ci: Install libxcvt from git
     
     Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
-    Reviewed-by: Simon Ser <contact@emersion.fr>
-    Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/731
-    (cherry picked from commit b0413b6e99c6b5fbc04229ce64ddf1f41b08e63e)
 
-commit d4e8c4622890b0cdcfe5f4b9c5608d15ce976901
-Author: Simon Ser <contact@emersion.fr>
-Date:   Tue Jul 21 18:28:01 2020 +0200
+commit 5c2592cbb19f996c4bb87bca4e4e46ab911d4bec
+Author: Demi Marie Obenour <demi@invisiblethingslab.com>
+Date:   Tue Jul 20 22:37:26 2021 -0400
 
-    xwayland: only use linux-dmabuf if format/modifier was advertised
+    Add do-while loops to DIX macros
     
-    Previously, linux-dmabuf was used unconditionally if the buffer had a
-    modifier. However creating a linux-dmabuf buffer with a format/modifier
-    which hasn't been advertised will fail.
+    This ensures they will behave properly in conditionals and always
+    require a trailing semicolon.
+
+commit d83c84bd9dc7fbd3588ce70b0c8bf0f63ed29ff3
+Author: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
+Date:   Fri Jul 23 09:24:50 2021 +0100
+
+    Mark the dixChangeWindowProperty() value argument as const
     
-    Change xwl_glamor_gbm_get_wl_buffer_for_pixmap to use linux-dmabuf when
-    the format/modifier has been advertised only.
+    It is copied using memcpy() and not modified so we can add const. This
+    fixes a -Wincompatible-pointer-types-discards-qualifiers compiler warning
+    that was failing a -Werror XVnc build for me.
     
-    Signed-off-by: Simon Ser <contact@emersion.fr>
-    Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1035
-    Tested-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
-    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
-    (cherry picked from commit c0e13cbf5a56e1fdd1e4ce58ebdefb6d2904e4b3)
+    Signed-off-by: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
 
-commit c726ceacc1a39c56d2b054ac5f35798d0c3640d7
-Author: Martin Weber <martin.weber@secunet.com>
-Date:   Tue Jul 21 18:24:41 2020 +0200
+commit fb5322ce2819260c07e06ab22b47df0a5d19f07d
+Author: Zoltán Böszörményi <zboszor@gmail.com>
+Date:   Thu Jul 8 06:14:21 2021 +0200
 
-    hw/xfree86: Avoid cursor use after free
+    glamoregl: Initialize glamor on the main device
     
-    During a VT-Switch a raw pointer to the shared cursor object
-    is saved which is then freed (in case of low refcount) by a call to
-    xf86CursorSetCursor with argument pCurs = NullCursor.
-    This leads to a dangling pointer which can follow in a use after free.
+    This allows e.g. an UDL device (driven by llvmpipe) to be automatically
+    set up with GPU acceleration via reverse PRIME.
     
-    This fix ensures that there is a shared handle saved for the VT-Switch cycle.
+    The result is e.g.:
     
-    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
-    (cherry picked from commit 7ae221ad5774756766dc78a73d71f4163ac7b1c6)
+      # DISPLAY=:0.2 xrandr --listproviders
+      Providers: number : 2
+      Provider 0: id: 0xec cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 1 outputs: 1 associated providers: 1 name:modesetting
+      Provider 1: id: 0x12c cap: 0xb, Source Output, Sink Output, Sink Offload crtcs: 2 outputs: 2 associated providers: 1 name:Intel
+    
+    Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
 
-commit 0679d4660579d0f399b5a9b8140d0c0d3483fa9f
-Author: Alan Coopersmith <alan.coopersmith@oracle.com>
-Date:   Tue Jul 21 18:14:51 2020 +0200
+commit f08bc32f5abc23ea715c15e8e86150434cc99e4f
+Author: Zoltán Böszörményi <zboszor@gmail.com>
+Date:   Thu Jul 8 06:13:24 2021 +0200
 
-    Update URL's in man pages
+    xf86: Assign GPUs to screens according to configuration
     
-    Mostly http->https conversions, but also replaces gitweb.fd.o
-    with gitlab.fd.o, and xquartz.macosforge.org with xquartz.org.
+    If there is an explicit configuration, assign the RandR provider
+    of the GPUDevice to the screen it was specified for.
     
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-    (cherry picked from commit a5151f58cf98d1696d60a3577dc50851f159da8a)
-
-commit 3059a2e62ae7ef665a537ee0fc2ec24beccf17ae
-Author: Olivier Fourdan <ofourdan@redhat.com>
-Date:   Wed Jun 3 10:17:13 2020 +0200
-
-    xwayland: Disable the MIT-SCREEN-SAVER extension when rootless
+    If there is no configuration (default case) the screen number is
+    still 0 so it doesn't change behaviour.
     
-    Xwayland is just a Wayland client, no X11 screensaver should be
-    expected to work reliably on Xwayland when running rootless because
-    Xwayland cannot grab the input devices so it has no way to actually
-    lock the screen managed by the Wayland compositor.
+    The result is e.g:
     
-    Turn off the screensaver on Xwayland when running rootless by setting
-    the screensaver timeout and interval and their default values to zero
-    and disable the MIT-SCREEN-SAVER extension.
+      # DISPLAY=:0.2 xrandr --listproviders
+      Providers: number : 2
+      Provider 0: id: 0xd2 cap: 0x2, Sink Output crtcs: 1 outputs: 1 associated providers: 0 name:modesetting
+      Provider 1: id: 0xfd cap: 0xb, Source Output, Sink Output, Sink Offload crtcs: 2 outputs: 2 associated providers: 0 name:Intel
     
-    Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1051
-    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
-    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
-    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
-    (cherry picked from commit 5c20e4b834145f590c68dbc98e33c7d3d710001a)
+    Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
 
-commit 23c55ec32973e0a75d723e3f37769dd711c9c59c
-Author: Michel Dänzer <mdaenzer@redhat.com>
-Date:   Wed Jul 22 18:20:14 2020 +0200
+commit cd567415cc5645f8cdc78e85e8887e5cce76e6d7
+Author: Zoltán Böszörményi <zboszor@gmail.com>
+Date:   Thu Jul 8 06:09:44 2021 +0200
 
-    xwayland: Hold a pixmap reference in struct xwl_present_event
-    
-    In the log of the commit below, I claimed this wasn't necessary on the
-    1.20 branch, but this turned out to be wrong: It meant that
-    event->buffer could already be destroyed in xwl_present_free_event,
-    resulting in use-after-free and likely a crash.
+    xf86: Extract screen configuration matching into its own function
     
-    Fixes: 22c0808ac88f "xwayland: Free all remaining events in
-                         xwl_present_cleanup"
+    Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
 
-commit 1179938c179a6e96170275e24adac3325539be65
-Author: Alex Goins <agoins@nvidia.com>
-Date:   Thu Jul 2 20:12:43 2020 -0500
+commit 16571b8926a5a7ba5a1885b36a16857addbe8f41
+Author: Boris-Barboris <ismailsiege@gmail.com>
+Date:   Tue Jun 22 00:51:08 2021 +0300
 
-    randr: Check rrPrivKey in RRHasScanoutPixmap()
-    
-    RRHasScanoutPixmap() is called from xf86CheckHWCursor(), regardless of whether
-    or not RandR has been initialized.
+    Don't hardcode fps for fake screen
     
-    As mentioned in commit 4226c6d, it's possible that RandR has not been
-    initialized if the server is configured with Xinerama and there is more than one
-    X screen. Calling rrGetScrPriv when RandR isn't initialized causes an assertion
-    failure that aborts the server:
+    Currently, when main hardware screen is powered-off,
+    X server initializes fake screen's timer with
+    1 second update interval.
     
-          Xorg: ../include/privates.h:121: dixGetPrivateAddr: Assertion
-          key->initialized' failed.
+    Streaming software like Nomachine or Vnc, as well as
+    desktop input automation suffers from it, since it
+    will forever be stuck on 1 fps until the display is
+    turned back on.
     
-    Just as in commit 4226c6d, fix the problem by checking
-    dixPrivateKeyRegistered(rrPrivKey) before calling rrGetScrPriv.
+    This commit adds command line option -fakescreenfps <int>
+    that allows the user to change the default fake screen
+    timer.
     
-    Signed-off-by: Alex Goins <agoins@nvidia.com>
-    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
-    (cherry picked from commit 8eeff5d7880c6885ee6f206355599f13d739afa7)
+    Signed-off-by: Baranin Alexander <ismailsiege@gmail.com>
 
-commit 4912f693e8e3abbd090ee02b4bfe14703c3bad0f
-Author: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
-Date:   Fri May 15 18:33:11 2020 +0200
+commit 8836b9d243444031b6396d39d345f2f83b5fa6a9
+Author: Łukasz Spintzyk <lukasz.spintzyk@synaptics.com>
+Date:   Thu Jul 22 13:12:05 2021 +0200
 
-    modesetting: Fix front_bo leak at drmmode_xf86crtc_resize on XRandR rotation
-    
-    Since the introduction of "modesetting: Remove unnecessary fb addition from
-    drmmode_xf86crtc_resize" the fb_id isn't initialited at
-    drmmode_xf86crtc_resize.
-    
-    Rotate operation of XRandR uses rotate_bo. So in this case the fb_id
-    associated to the front_bo is not initialized at drmmode_set_mode_major.
-    So fd_id remains 0.
+    modesetting: unflip not possible when glamor is not set
     
-    As every call to drmmode_xf86crtc_resize allocates a new front_bo we should
-    destroy unconditionally the old_front_bo if operation success. So we free
-    the allocated GBM handles.
+    This is fixing crashes of xfce when running under qemu
+
+commit d6c02ffd9c910637f6b3b7249507998e9e45f93c
+Author: Łukasz Spintzyk <lukasz.spintzyk@synaptics.com>
+Date:   Mon Jul 19 14:25:28 2021 +0200
+
+    present: fallback get_crtc to return crtc belonging to screen with present extension
     
-    This avoids crashing xserver with a OOM in the RPI4 1Gb at 4k resolution
-    after 3 series xrandr rotations from normal to left and vice versa reported at
-    https://github.com/raspberrypi/firmware/issues/1345
+    Since crtc can belong to secondary output that may not have present
+    extension enabled we should fallback to first enabled crtc or fake crtc.
     
-    Signed-off-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
-    Reviewed-by: Keith Packard <keithp@keithp.com>
-    Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1024
-    Fixes: 8774532121 "modesetting: Remove unnecessary fb addition from
-           drmmode_xf86crtc_resize"
-    (cherry picked from commit 73480f172aeced074dd9301ae4d97f7d2f3a9a45)
+    Fix for issue xorg/xserver#1195
 
-commit ccbcf083d5c676311aab77cc837a2539a7278a62
-Author: Lyude Paul <lyude@redhat.com>
-Date:   Tue Jul 14 18:32:39 2020 -0400
+commit f6f2f203bcde47c334836191982d77bbbbbf533c
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Thu May 20 19:00:10 2021 +0200
 
-    xwayland: Store xwl_tablet_pad in its own private key
+    present: Drop flip_idler member from present_vblank_rec
     
-    When a slave device causes the master virtual pointer device to change
-    device types, the device's private data pointer
-    (device->public.devicePrivate) is also changed to match the type of the
-    slave device. This can be a problem though, as tablet pad devices will
-    set the device's private data pointer to their own xwl_tablet_pad
-    struct. This can cause us to dereference the pointer as the wrong type,
-    and result in a segfault:
+    It's redundant with the pixmap member of struct xwl_present_event.
     
-    Thread 1 "Xwayland" received signal SIGSEGV, Segmentation fault.
-    wl_proxy_marshal (proxy=0x51, opcode=opcode@entry=0) at src/wayland-client.c:792
-    792             va_start(ap, opcode);
-    (gdb) bt
-    0  wl_proxy_marshal (proxy=0x51, opcode=opcode@entry=0) at
-      src/wayland-client.c:792
-    1  0x00005610b27b6c55 in wl_pointer_set_cursor (hotspot_y=0,
-      hotspot_x=0, surface=0x0, serial=<optimized out>, wl_pointer=<optimized
-      out>) at /usr/include/wayland-client-protocol.h:4610
-    2  xwl_seat_set_cursor (xwl_seat=xwl_seat@entry=0x5610b46d5d10) at
-      xwayland-cursor.c:137
-    3  0x00005610b27b6ecd in xwl_set_cursor (device=<optimized out>,
-      screen=<optimized out>, cursor=<optimized out>, x=<optimized out>,
-      y=<optimized out>) at xwayland-cursor.c:249
-    4  0x00005610b2800b46 in miPointerUpdateSprite (pDev=0x5610b4501a30) at
-      mipointer.c:468
-    5  miPointerUpdateSprite (pDev=0x5610b4501a30) at mipointer.c:410
-    6  0x00005610b2800e56 in miPointerDisplayCursor (pCursor=0x5610b4b35740,
-      pScreen=0x5610b3d54410, pDev=0x5610b4501a30) at mipointer.c:206
-    7  miPointerDisplayCursor (pDev=0x5610b4501a30, pScreen=0x5610b3d54410,
-      pCursor=0x5610b4b35740) at mipointer.c:194
-    8  0x00005610b27ed62b in CursorDisplayCursor (pDev=<optimized out>,
-      pScreen=0x5610b3d54410, pCursor=0x5610b4b35740) at cursor.c:168
-    9  0x00005610b28773ee in AnimCurDisplayCursor (pDev=0x5610b4501a30,
-      pScreen=0x5610b3d54410, pCursor=0x5610b4b35740) at animcur.c:197
-    10 0x00005610b28eb4ca in ChangeToCursor (pDev=0x5610b4501a30,
-      cursor=0x5610b4b35740) at events.c:938
-    11 0x00005610b28ec99f in WindowHasNewCursor
-      (pWin=pWin@entry=0x5610b4b2e0c0) at events.c:3362
-    12 0x00005610b291102d in ChangeWindowAttributes (pWin=0x5610b4b2e0c0,
-      vmask=<optimized out>, vlist=vlist@entry=0x5610b4c41dcc,
-      client=client@entry=0x5610b4b2c900) at window.c:1561
-    13 0x00005610b28db8e3 in ProcChangeWindowAttributes (client=0x5610b4b2c900)
-      at dispatch.c:746
-    14 0x00005610b28e1e5b in Dispatch () at dispatch.c:497
-    15 0x00005610b28e5f34 in dix_main (argc=16, argv=0x7ffc7a601b68,
-      envp=<optimized out>) at main.c:276
-    16 0x00007f8828cde042 in __libc_start_main (main=0x5610b27ae930 <main>,
-      argc=16, argv=0x7ffc7a601b68, init=<optimized out>, fini=<optimized
-      out>, rtld_fini=<optimized out>, stack_end=0x7ffc7a601b58) at
-      ../csu/libc-start.c:308
-    17 0x00005610b27ae96e in _start () at cursor.c:1064
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
+
+commit 212cfbcf68d279f2b3494e79fe8e3fbaabeba77c
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Wed May 12 15:25:51 2021 +0200
+
+    xwayland/present: Use present_vblank_ptr instead of xwl_present_event*
     
-    Simple reproducer in gnome-shell: open up an Xwayland window, press some
-    tablet buttons, lock and unlock the screen. Repeat if it doesn't crash
-    the first time.
+    Where the latter isn't really needed.
     
-    So, let's fix this by registering our own device-specific private key
-    for storing a backpointer to xwl_tablet_pad, so that all input devices
-    have their private data pointers set to their respective xwl_seat.
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
+
+commit fe8c7855f3a85f156c792a3f18a175138407054b
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Wed May 12 12:51:32 2021 +0200
+
+    xwayland/present: Fold xwl_present_release_event into _free_event
     
-    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
-    Signed-off-by: Lyude Paul <lyude@redhat.com>
-    (cherry picked from commit ba0e789b912671c724a21b3a30291247718bcf7d)
+    The only difference was unhooking from the vblank.event_queue list,
+    which is already done by xwl_present_flip_notify_vblank in
+    xwl_present_msc_bump.
 
-commit cc36135595fad70ce81697d7c98eb8a26cec9a72
-Author: SimonP <simonp.git@gmail.com>
-Date:   Tue Jun 9 13:26:48 2020 +0200
+commit 31d2ebca77fcabec81194ae6dcd724c699b1b513
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Mon May 10 18:33:43 2021 +0200
 
-    xwayland: Initialise values in xwlVidModeGetGamma()
+    xwayland/present: Drop target_msc member from struct xwl_present_event
     
-    ProcVidModeGetGamma() relies on GetGamma() to initialise values if it
-    returns TRUE. Without this, we're sending uninitialised values to
-    clients.
+    Use present_vblank_rec::exec_msc instead.
     
-    Fixes: xorg/xserver#1040
-    (cherry picked from commit 6748a4094158d2bde1630b915a5318f9f22c8e0a)
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
 
-commit 533cc6ca046a9e59503bd0763ab28f66284f7dc7
-Author: Sjoerd Simons <sjoerd@collabora.com>
-Date:   Fri Apr 10 16:34:06 2020 +0200
+commit 495ec596640e26b6995c93eedc922d2702ad64ad
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Mon May 10 19:04:07 2021 +0200
 
-    xwayland: Fix crashes when there is no pointer
+    xwayland/present: Drop pending member from struct xwl_present_event
     
-    When running with a weston session without a pointer device (thus with
-    the wl_seat not having a pointer) xwayland pointer warping and pointer
-    confining should simply be ignored to avoid crashes.
+    We are handling two cases here: the active flip or the pending flip.
     
-    Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
-    (cherry picked from commit d35f68336b0a462dc660797d1779581f348af04e)
+    For the pending flip (event->pending == TRUE), we called
+    xwl_present_release_pixmap.
+    
+    For the active flip (event->pending == FALSE), we called
+    xwl_present_release_event. However, xwl_present_flip_notify_vblank
+    already unhooked event->vblank.event_queue. So this was effectively the
+    same as calling xwl_present_release_pixmap.
+    
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
 
-commit 3aa31823dbc3dd026ce08958ca5324d7af94a86a
-Author: Olivier Fourdan <ofourdan@redhat.com>
-Date:   Tue May 5 15:40:43 2020 +0200
+commit f73340445fe1da9ae9bc3197eb2ef41589aa2a4e
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Fri May 7 18:16:23 2021 +0200
 
-    xwayland: Clear private on device removal
+    xwayland/present: Drop list member from struct xwl_present_event
     
-    Xwayland uses the device private to point to the `xwl_seat`.
+    Use present_vblank_rec::event_queue instead.
     
-    Device may be removed at any time, including on suspend.
+    The changes in xwl_present_execute shouldn't really be needed, since
+    we should never hit queue_vblank in present_execute_wait. But let's be
+    safe rather than sorry, plus this simplifies the code.
     
-    On resume, if the DIX code ends up calling a function that requires the
-    `xwl_seat` such as `xwl_set_cursor()` we may end up pointing at random
-    data.
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
+
+commit aac31d2758d4e84774b633ec108d18f0bad6ef64
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Fri May 7 17:58:27 2021 +0200
+
+    xwayland/present: Drop exec_queue member from struct xwl_present_window
     
-    Make sure the clear the device private data on removal so that we don't
-    try to use it and crash later.
+    Doesn't serve any purpose anymore.
     
-    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
-    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
-    https://gitlab.freedesktop.org/xorg/xserver/issues/709
-    (cherry picked from commit 4195e8035645007be313ade79032b8d561ceec6c)
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
 
-commit 22c0808ac88f917541fe40ab30e85364adac82bc
+commit f8c086b2145d1c9364e9b43ff4d796791d8af169
 Author: Michel Dänzer <mdaenzer@redhat.com>
-Date:   Fri Jun 19 18:10:18 2020 +0200
+Date:   Fri May 7 17:55:13 2021 +0200
 
-    xwayland: Free all remaining events in xwl_present_cleanup
+    xwayland/present: Fold xwl_present_event_notify into its caller
     
-    At the end of xwl_present_cleanup, these events aren't reachable
-    anymore, so if we don't free them first, they're leaked.
+    Can just call xwl_present_execute directly.
     
-    (cherry picked from commit 64565ea344fef0171497952ef75f019cb420fe3b)
+    This allows dropping the window member from struct xwl_present_window as
+    well.
     
-    v2:
-    * Simpler backport, no need to keep a reference to the pixmap on the
-      1.20 branch.
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
 
-commit 37779d7f4028e94c8383a937eab57a6ffb15c38b
+commit c30f3d08acb01a41df0fe7176f237137f3039480
 Author: Michel Dänzer <mdaenzer@redhat.com>
-Date:   Fri Jun 19 18:14:35 2020 +0200
+Date:   Fri May 7 17:49:07 2021 +0200
 
-    xwayland: Always use xwl_present_free_event for freeing Present events
+    xwayland/present: Use exec_queue for deferring completion events
     
-    Minor cleanup, and will make the next change simpler. No functional
-    change intended.
+    We clear the vblank->pixmap field, so next time xwl_present_execute
+    falls through to present_execute_post.
     
-    Reviewed-by: Dave Airlie <airlied@redhat.com>
-    (cherry picked from commit 1beffba699e2cc3f23039d2177c025bc127966de)
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
 
-commit ba52e5eb0e3b30aa63a8b51e8899eca88d9e0a30
+commit 4503c8d9ea7df5bda470501e638a730d91d718c9
 Author: Michel Dänzer <mdaenzer@redhat.com>
-Date:   Thu Jun 25 18:11:31 2020 +0200
+Date:   Fri May 7 12:56:30 2021 +0200
 
-    present/wnmd: Free flip_queue entries in present_wnmd_clear_window_flip
-    
-    When present_wnmd_clear_window_flip is done, present_destroy_window
-    frees struct present_window_priv, and the events in the flip queue
-    become unreachable. So if we don't free them first, they're leaked.
+    xwayland/present: Fold xwl_present_idle_notify into its caller
     
-    Also drop the call to present_wnmd_set_abort_flip, which just sets a
-    flag in struct present_window_priv and thus can't have any observable
-    effect after present_destroy_window.
+    Allows simplification by avoiding indirection.
     
-    Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1042
-    Reviewed-by: Dave Airlie <airlied@redhat.com>
-    (cherry picked from commit 1bdedc8dbb9d035b85444c2558a137470ff52113)
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
 
-commit b3310ed5036b098509e40b3642c2265132445e6a
+commit b2a06e0700fa48c1e77fc687e6af39a4bb7c2ceb
 Author: Michel Dänzer <mdaenzer@redhat.com>
-Date:   Thu Jun 25 18:09:27 2020 +0200
+Date:   Fri May 7 12:34:49 2021 +0200
 
-    present/wnmd: Keep pixmap pointer in present_wnmd_clear_window_flip
+    xwayland/present: Drop sync_flip member of struct xwl_present_window
     
-    The comment was incorrect: Any reference held by the window (see
-    present_wnmd_execute) is in addition to the one in struct present_vblank
-    (see present_vblank_create). So if we don't drop the latter, the pixmap
-    will be leaked.
+    The same information can be determined from the flip queue.
     
-    Reviewed-by: Dave Airlie <airlied@redhat.com>
-    (cherry picked from commit bc9dd1c71c3722284ffaa7183f4119151b25a44f)
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
 
-commit fc297c87d6755c11380a44e3510689cc76eb1ee1
-Author: Simon Ser <contact@emersion.fr>
-Date:   Mon May 4 18:20:17 2020 +0200
+commit fc53e3c536b5a338c595b5724c7d0b4734e45871
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Thu May 6 18:42:46 2021 +0200
 
-    xwayland: import DMA-BUFs with GBM_BO_USE_RENDERING only
+    xwaland/present: Drop flip_pending member of struct xwl_present_window
     
-    Drop GBM_BO_USE_SCANOUT from the GBM_BO_IMPORT_FD import, add
-    GBM_BO_USE_RENDERING to the GBM_BO_IMPORT_FD_MODIFIER import.
+    Use the first element of the flip_queue list for the same purpose.
     
-    If the DMA-BUF cannot be scanned out, gbm_bo_import with
-    GBM_BO_USE_SCANOUT will fail. However Xwayland doesn't need to scan-out
-    the buffer and can work fine without scanout. Glamor only needs
-    GBM_BO_USE_RENDERING.
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
+
+commit c592c66625d964e8ed1f3fcfc01a245e4c8a8015
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Fri May 7 12:21:44 2021 +0200
+
+    xwayland/present: Fold xwl_present_flip_notify into its callers
     
-    Signed-off-by: Simon Ser <contact@emersion.fr>
-    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
-    Reviewed-by: Daniel Stone <daniels@collabora.com>
-    (cherry picked from commit 421ce458f1d295015c108eb32f9611e527649cf8)
+    No need for them to be separate anymore.
+    
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
 
-commit 0430d13c1ed8ddbb1d5a57d7e507771f8079d9af
-Author: Olivier Fourdan <ofourdan@redhat.com>
-Date:   Fri Apr 24 17:45:49 2020 +0200
+commit 42301760802ea1cbe3698797c2bfb3a91ee02430
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Fri Apr 23 12:59:55 2021 +0200
 
-    xwayland: Fix infinite loop at startup
+    xwayland/present: Embed present_vblank_rec in xwl_present_event
     
-    Mutter recently added headless tests, and when running those tests the
-    Wayland compositor runs for a very short time.
+    This allows for various simplifications.
     
-    Xwayland is spawned by the Wayland compositor and upon startup will
-    query the various Wayland protocol supported by the compositor.
+    Use the pointer to the struct memory as the event ID. In contrast to
+    the SCMD code for Xorg (where pending DRM events cannot be cancelled),
+    this is safe here, because we can destroy pending Wayland callbacks. So
+    we can't get a callback with a stale pointer to freed memory.
     
-    To do so, it will do a roundtrip to the Wayland server waiting for
-    events it expects.
+    Remove xwl_present_window::release_list in favour of
+    present_vblank_rec::window_list.
     
-    If the Wayland compositor terminates before Xwayland has got the replies
-    it expects, it will loop indefinitely calling `wl_display_roundtrip()`
-    continuously.
+    Remove xwl_present_event::xwl_present_window in favour of
+    present_vblank_rec::window.
     
-    To avoid that issue, add a new `xwl_screen_roundtrip()` that checks for
-    the returned value from `wl_display_roundtrip()` and fails if it is
-    negative.
+    xwl_present_free_event is never called for a NULL pointer anymore, no
+    need to check.
     
-    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
-    Reviewed-by: Roman Gilg <subdiff@gmail.com>
-    Reviewed-by: Jonas Ã…dahl <jadahl@gmail.com>
+    v2:
+    * Restore DestroyWindow wrapping order to make sure
+      present_destroy_window doesn't call xwl_present_abort_vblank.
     
-    (cherry picked from commit 785e59060c00129e47da6c0877604a56d7e0e32f)
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
 
-commit b8b10e29302d94832be8f0d8aa7aa1b54e42762c
-Author: Hans de Goede <hdegoede@redhat.com>
-Date:   Mon Jun 24 21:46:26 2019 +0200
+commit 61cc5d96ed281a082d8dd414506dea0084e446fd
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Wed May 5 15:02:25 2021 +0200
 
-    modesetting: Disable pageflipping when using a swcursor
+    present: Refactor present_vblank_init helper ouf of _vblank_create
     
-    The miPointerSpriteFunc swcursor code expects there to only be a single
-    framebuffer and when the cursor moves it will undo the damage of the
-    previous draw, potentially overwriting what ever is there in a new
-    framebuffer installed after a flip.
+    Allows embedding into another struct.
     
-    This leads to all kind of artifacts, so we need to disable pageflipping
-    when a swcursor is used.
-    
-    The code for this has shamelessly been copied from the xf86-video-amdgpu
-    code.
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
+
+commit 35f173ddb606f9fbac7957e427fe28a377204cfe
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Thu Apr 29 18:44:04 2021 +0200
+
+    xwayland/present: Drop abort member of struct xwl_present_event
     
-    Fixes: https://gitlab.freedesktop.org/xorg/xserver/issues/828
+    We can call xwl_present_free_event unconditionally from
+    xwl_present_abort_vblank, since the sync_callback is already destroyed
+    in xwl_present_cleanup.
     
-    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
-    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
-    (cherry picked from commit 0aaac8d783e78c040a70a55ba8d67809abd7e625)
-    Signed-off-by: Łukasz Spintzyk <lukasz.spintzyk@displaylink.com>
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
 
-commit 271934db9f3b1297754b29855646e0a4ee01db59
-Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
-Date:   Tue Oct 30 18:43:51 2018 +0100
+commit 0517460301cbf9c6ed3020ef1dd0cd1df94ea178
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Tue May 11 12:56:53 2021 +0200
 
-    dix: do not send focus event when grab actually does not change
+    xwayland/present: Simplify calls to Xwayland-private functions
     
-    c67f2eac5651 ("dix: always send focus event on grab change") made dix
-    always sent events when it's a NotifyGrab or NotifyUngrab, even if
-    from == to, because 'from' can just come from a previous XSetInputFocus
-    call.
+    Change parameter types to what's really needed, or just fold the
+    function into its only caller.
     
-    However, when an application calls XGrabKeyboard several times on
-    the same window, we are now sending spurious FocusOut+FocusIn with
-    NotifyGrab, even if the grab does not actually change. This makes screen
-    readers for blind people spuriously emit activity events which disturb
-    screen reading workflow when e.g. switching between menus.
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
+
+commit 490248ea70d3fe923446e17312880ae63590d45c
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Mon Apr 19 12:59:56 2021 +0200
+
+    xwayland/present: Rename present_wnmd_* functions to xwl_present_*
     
-    This commit avoids calling DoFocusEvents in that precise case, i.e. when
-    oldWin is a previous grab and the new grab is the same window.
+    The WNMD indirection is gone.
     
-    Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
-    Reviewed-by: Adam Jackson <ajax@redhat.com>
-    (cherry picked from commit 364d64981549544213e2bca8de6ff8a5b2b5a69e)
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
 
-commit f84ad082557f9cde6b8faa373eca6a0a89ba7d56
-Author: Matt Turner <mattst88@gmail.com>
-Date:   Sun Mar 29 13:02:03 2020 -0700
+commit 0c0cbbc7cb4fa917a2b33494efb6dc03e5de9051
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Wed Apr 21 17:15:27 2021 +0200
 
-    xserver 1.20.8
+    present: Remove present_wnmd_info_rec
     
-    Signed-off-by: Matt Turner <mattst88@gmail.com>
+    Doesn't serve any purpose anymore.
+    
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
 
-commit 8837279869309317c110afb6f2f3c24484c77657
-Author: Jon Turney <jon.turney@dronecode.org.uk>
-Date:   Wed Apr 17 11:37:11 2019 +0100
+commit 561c63d0f13a8c6379ed05338172570f93dbce37
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Mon Apr 19 18:41:59 2021 +0200
 
-    Fix old-style definition warning for xf86OSInputThreadInit()
+    xwayland/present: Merge present_wnmd_flips_stop & xwl_present_flips_stop
     
-    ../hw/xfree86/os-support/stub/stub_init.c: In function ‘xf86OSInputThreadInit’:
-    ../hw/xfree86/os-support/stub/stub_init.c:29:1: warning: old-style function definition [-Wold-style-definition]
+    Just use the latter instead of the former elsewhere. No need for them
+    to be separate anymore.
     
-    (cherry picked from commit 7c266cafed14b38c039091651069ae9888c3a8ae)
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
 
-commit 0c012f968b4e02a2bc892ce71f7bea9bd3f7fb22
-Author: Jon Turney <jon.turney@dronecode.org.uk>
-Date:   Wed Mar 13 14:57:14 2019 +0000
+commit a67f16fde1ff094c3ec4fffe8a7269b30c7b8668
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Mon Apr 19 18:53:36 2021 +0200
 
-    Add xf86OSInputThreadInit to stub os-support as well
+    xwayland/present: Fold present_wnmd_get_ust_msc into its callers
     
-    stub os support also needs to provide xf86OSInputThreadInit, omitted in
-    ea1527a8
+    Just use xwl_present_get_ust_msc directly. No need for the indirection
+    anymore.
     
-    (cherry picked from commit c020769dbfb965740c8441d8242b738ef572a7c9)
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
 
-commit b259485975078087fe6bde2b9e1eccf4ae14120c
+commit 080c1ca3f57b4226f34624b0cd2171ffbbc2be4f
 Author: Michel Dänzer <mdaenzer@redhat.com>
-Date:   Tue Mar 17 11:45:22 2020 +0100
+Date:   Mon Apr 19 18:46:23 2021 +0200
 
-    xwayland: Delete all frame_callback_list nodes in xwl_unrealize_window
+    xwayland/present: Fold present_wnmd_queue_vblank into its callers
     
-    We were only calling xwl_present_unrealize_window for the toplevel
-    window, but the list can contain entries from child windows as well,
-    in which case we were leaving dangling pointers to freed memory.
+    Just use xwl_present_queue_vblank directly. No need for the indirection
+    anymore.
     
-    Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/1000
-    Fixes: c5067feaeea1 "xwayland: Use single frame callback for Present
-                         flips and normal updates"
-    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
-    Tested-by: Olivier Fourdan <ofourdan@redhat.com>
-    (cherry picked from commit 5e91587302e85fd6f0e8d5ffbe30182e18c6913f)
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
 
-commit a033571644d277dc49a489f7ae32c4ad92856543
-Author: Jonas Ã…dahl <jadahl@gmail.com>
-Date:   Fri Sep 13 17:11:27 2019 +0200
+commit c22887bc7a83e9b8ad112aadaec069b0366fc38e
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Mon Apr 19 18:51:06 2021 +0200
 
-    xwayland/glamor-gbm: Handle DRM_FORMAT_MOD_INVALID gracefully
+    xwayland/present: Fold present_wnmd_get_crtc into present_wnmd_pixmap
     
-    The compositor may send DRM_FORMAT_MOD_INVALID instead of a list of
-    modifiers for various reasons. Handle this gracefully by ignoring it.
+    And use xwl_present_get_crtc directly.
     
-    Without this, if a compositor would send DRM_FORMAT_MOD_INVALID, it'd
-    result in empty windows provided by Xwayland.
+    No need for them to be separate anymore.
     
-    Signed-off-by: Jonas Ã…dahl <jadahl@gmail.com>
-    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
-    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
-    (cherry picked from commit edf964434eac10ffbe27cc883e3ab95505669aee)
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
 
-commit 3c48bd50ad33f2a533ac76afa38d6e3906ebc28a
-Author: Arthur Williams <taaparthur@gmail.com>
-Date:   Sun Oct 6 18:55:35 2019 +0000
+commit cb35ff596ec4e4fc6a4e96d55e280cdf399791e1
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Mon Apr 19 18:34:07 2021 +0200
 
-    dix: Check for NULL spriteInfo in GetPairedDevice
-    
-    There is a race when reseting the XServer that causes spriteInfo to be
-    NULL in GetPairedDevice resulting a segfault and subsequent crash. The
-    problem was noticed when opening a connection, creating master devices,
-    destroying master devices and closing the connection during testing.
+    xwayland/present: Fold present_wnmd_check_flip into its callers
     
-    Signed-off-by: Arthur Williams <taaparthur@gmail.com>
+    Mainly into xwl_present_check_flip, and call that from
+    present_wnmd_check_flip_window.
     
+    No need for them to be separate anymore.
     
-    (cherry picked from commit e693c9657f98c334e9921ca2f8ebf710497c0c6a)
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
 
-commit 1610ef1d6b5ba99da9d1a639f3b65b2e61514a7d
-Author: David Seifert <soap@gentoo.org>
-Date:   Fri Jan 24 12:49:44 2020 +0100
+commit 7b78cf6b3ae386b9df2483692041dfa38a91bedb
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Mon Apr 19 18:26:55 2021 +0200
 
-    Fix building with `-fno-common`
+    xwayland/present: Simplify query_capabilities
     
-    * GCC 10 will switch the default to `-fno-common`.
-      https://gcc.gnu.org/PR85678
+    No need for the WNMD indirection anymore.
     
-    Bug: https://bugs.gentoo.org/705880
-    Signed-off-by: Matt Turner <mattst88@gmail.com>
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
 
-commit 2a185dd22ddb5b0d7d2ef5948591028766bb9530
+commit 244403ec8718d782d57a830ece9357a75a0dd70b
 Author: Michel Dänzer <mdaenzer@redhat.com>
-Date:   Mon Mar 2 18:09:31 2020 +0100
+Date:   Mon Apr 19 18:01:52 2021 +0200
 
-    xwayland: Use frame callbacks for Present vblank events
-    
-    Instead of only the fallback timer.
-    
-    Fixes https://gitlab.freedesktop.org/xorg/xserver/issues/854
+    xwayland/present: Fold present_wnmd_abort_vblank into its only caller
     
-    v2:
-    * Drop unused frame_callback member of struct xwl_present_window
-      (Olivier Fourdan)
+    No need for them to be separate anymore.
     
-    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
-    (cherry picked from commit 9b31358c52e951883bf7c01c953a9da080542244)
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
 
-commit 99a6d6b15e0757a4652a569a1b2070c76a00b567
+commit f7adbc2166b7a4662cbd69507d8cbac11034c87e
 Author: Michel Dänzer <mdaenzer@redhat.com>
-Date:   Wed Nov 27 18:04:06 2019 +0100
+Date:   Mon Apr 19 18:06:22 2021 +0200
 
-    xwayland: Use single frame callback for Present flips and normal updates
+    xwayland/present: Drop present_wnmd_flush in favour of xwl_present_flush
     
-    Using a list of Present windows that need to be called back.
+    No need for the indirection anymore.
     
-    This prepares for the following change, there should be no change in
-    observed behaviour.
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
+
+commit 7fd114365d694360540bc46cd615aa47373be0a8
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Mon Apr 19 19:02:32 2021 +0200
+
+    xwayland/present: Fold present_wnmd_flip into present_wnmd_execute
     
-    v2:
-    * Use xwl_window_create_frame_callback instead of making the
-      frame_listener struct non-static (Olivier Fourdan)
+    No need for the indirection anymore.
     
-    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
-    (cherry picked from commit c5067feaeea115761f0a72f37407c6e5e943d1a1)
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
 
-commit 915cc107767624bd7914c962347bab9c2e21cdff
+commit 2e1dcd731f98a8beceee699cc57b7082f98916c4
 Author: Michel Dänzer <mdaenzer@redhat.com>
-Date:   Fri Dec 13 18:26:35 2019 +0100
+Date:   Tue Apr 20 19:01:12 2021 +0200
 
-    xwayland: Add xwl_window_create_frame_callback helper
+    xwayland/present: Fold present_wnmd_screen_init into xwl_present_init
     
-    This will be used by the following changes. No functional change
-    intended.
+    No need for them to be separate anymore.
     
-    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
-    (cherry picked from commit f80eea0529b2cfb805a9c7d4994a4235451131e3)
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
 
-commit 94dad4f05133171805ee94095bbcd20ece754eba
-Author: Dor Askayo <dor.askayo@gmail.com>
-Date:   Wed Feb 19 17:22:11 2020 +0100
+commit b6419359b6b11ec659f59cc74075fcf049591425
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Wed Apr 21 12:50:02 2021 +0200
 
-    xwayland: clear pixmaps after creation in rootless mode
-    
-    When a pixmap is created with a backing FBO, the FBO should be cleared
-    to avoid rendering uninitialized memory. This could happen when the
-    pixmap is rendered without being filled in its entirety.
+    present: Move present_wnmd.c contents to hw/xwayland/xwayland-present.c
     
-    One example is when a top-level window without a background is
-    resized. The pixmap would be reallocated to prepare for more pixels,
-    but uninitialized memory would be rendered in the resize offset until
-    the client sends a frame that fills these additional pixels.
+    This will allow eliminating indirections and making the Xwayland Present
+    code more efficient and easier to follow.
     
-    Another example is when a new top-level window is created without a
-    background. Uninitialized memory would be rendered after the pixmap is
-    allocated and before the client sends its first frame.
+    While this technically changes the Xorg video driver ABI, I don't know
+    of any drivers using the dropped present_wnmd_* symbols, and I doubt a
+    Xorg driver could make use of them as is anyway.
     
-    This issue is only apparent in OpenGL implementations that don't zero
-    the VRAM of allocated buffers by default, such as RadeonSI.
+    (As a bonus, Xorg no longer links any Xwayland specific Present code)
     
-    Signed-off-by: Dor Askayo <dor.askayo@gmail.com>
-    Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/636
-    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
-    (cherry picked from commit 0e9a0c203c2ae4eae12bdbb95428f398211c7bee)
+    v2:
+    * Wrap DestroyWindow before initializing Present, so that
+      present_destroy_window runs before xwl_present_cleanup. Avoids crash
+      due to present_destroy_window calling xwl_present_* functions when
+      xwl_present_window was already freed. (Olivier Fourdan)
     
-    [ Michel Dänzer:
-    * Squashed in commit ebf549db2d9341d99e0d0847b948dd798d98f7dc
-    * Dropped code related to glamor_format, which only exists on master ]
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
 
-commit 0238359bced17f9db0e266111897d154ab117d68
+commit c35a716b02921e2fcae5fe89295a99c6dd5dec8c
 Author: Michel Dänzer <mdaenzer@redhat.com>
-Date:   Fri Feb 7 12:15:07 2020 +0100
+Date:   Fri Apr 16 18:45:39 2021 +0200
 
-    xwayland: Call glamor_block_handler from xwl_screen_post_damage
+    present: Fold wnmd_init_mode_hooks into wnmd_screen_init
     
-    In between the two phases introduced by the previous change. This makes
-    sure all pending drawing to the new buffers is flushed before they're
-    committed to the Wayland server.
-    (cherry picked from commit a542224ea28e2e8ccaf5e0df85bf6c603e97599a)
+    Preparation for moving WNMD code to hw/xwayland. No functional change
+    intended.
+    
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
 
-commit a93bce6bfc6c610676a7fbc76639854c5553cb2c
+commit 10bdd87fe49cbd9b4c4b584024d663b928d3f1be
 Author: Michel Dänzer <mdaenzer@redhat.com>
-Date:   Fri Feb 7 12:06:39 2020 +0100
+Date:   Fri Apr 16 18:43:48 2021 +0200
 
-    xwayland: Split up xwl_screen_post_damage into two phases
-    
-    The first phase sets the new surface properties for all damaged
-    windows, then the second phase commits all surface updates.
+    present: Move present_wnmd_screen_init to present_wnmd.c
     
-    This is preparatory for the next change, there should be no observable
-    change in behaviour (other than the order of Wayland protocol
-    requests).
+    Now all WNMD code is in present_wnmd.c.
     
-    Reviewed-by: Adam Jackson <ajax@redhat.com>
-    (cherry picked from commit f88d9b1f779835302e02e255fcd45989db7f488d)
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
 
-commit 1ba5e528d52ed9d7d67eb45c5d3e04b6f5d22b05
-Author: Maarten Lankhorst <dev@mblankhorst.nl>
-Date:   Thu Apr 25 11:46:41 2019 +0200
+commit b6d54b0f5d2fb3dc8a4b2812bfee94112c332256
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Wed Apr 21 17:01:36 2021 +0200
 
-    modesetting: Disable atomic support by default
+    present: Dispatch clear_window_flip via present_screen_priv hook
     
-    The atomic driver has issues with modesetting when stealing
-    connectors from a different crtc, a black screen when doing rotation
-    on a different crtc, and in general is just a mapping of the legacy
-    helpers to atomic. This is already done in the kernel, so just
-    fallback to legacy by default until this is fixed.
+    Eliminates special cases in present_destroy_window.
     
-    Please backport to 1.20, as we don't want to enable it for everyone
-    there. It breaks for existing users.
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
+
+commit 93666ebe37a9c8d64b814c7af6b895f89ca5ff88
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Wed Apr 21 18:39:36 2021 +0200
+
+    present: Remove create_event_id hook
     
-    The fixes to make the xserver more atomic have been pending on the
-    mailing list for ages.
+    Each present_vblank_create caller generates and sets the ID afterwards.
     
-    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110375
-    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110030
-    References: https://gitlab.freedesktop.org/xorg/xserver/merge_requests/36/commits
-    Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
-    (cherry picked from commit f0d78b47ac49977a6007f5fe081f00c6eb19a12e)
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
 
-commit d44bbb4710961651dcf10701bc562f1f01509010
-Author: Eric Anholt <eric@anholt.net>
-Date:   Mon Feb 10 10:22:34 2020 +0100
+commit 44f705a5b6b4f79682c5e649eb718a193e01ec47
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Mon Apr 19 18:19:30 2021 +0200
 
-    glamor: Fix a compiler warning since the recent OOM fixes.
+    present: Pass capabilities to present_vblank_create by value
     
-    Signed-off-by: Eric Anholt <eric@anholt.net>
-    (cherry picked from commit 3b26b90cb787a14fa5f8bb2033eab8ab6562a9a5)
+    Preparation for moving WNMD code to hw/xwayland. No functional change
+    intended.
+    
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
 
-commit d2a6c8708ca4f27c8d9aade6db2c4e7f2d8c624f
-Author: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
-Date:   Mon Feb 10 10:21:02 2020 +0100
+commit 86e645bcfaea63bc3f91e4ccbbc19569929b92c3
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Fri Jul 2 12:41:34 2021 +0200
 
-    glamor: Fallback to system memory for RW PBO buffer allocation
-    
-    We currently support two modes of operation for RW PBO buffers: one
-    that allocates a pack buffer with GL memory and one that uses system
-    memory when the former is not supported.
+    xwayland/eglstream: Drop xwl_eglstream_set_window_pixmap
     
-    Since allocation with system memory is less likely to fail, add a
-    fallback to system memory when GL memory failed instead of bailing
-    out.
+    Not sure why we'd need to abandon a pending stream for a pixmap just
+    because it's no longer a window pixmap. Let's try not to.
     
-    Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
-    (cherry picked from commit 8c4e8d9eff03cefc987f13c900b0a47403946127)
+    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
 
-commit ca034c2f2cfff8e49b816b8ecbaa96215b796e36
-Author: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
-Date:   Mon Feb 10 10:20:30 2020 +0100
+commit ba8763c27b2ebc91850abfcaf32ae972e80142e7
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Fri Jul 2 12:57:21 2021 +0200
 
-    glamor: Propagate glamor_prepare_access failures in copy helpers
+    xwayland/eglstream: Consolidate pending_cb destruction
     
-    glamor_prepare_access can fail for a few reasons, especially when
-    failing to allocate a PBO buffer. Take this in account and bail in
-    the copy helpers that call the helper when a failure happens.
+    Into a new xwl_eglstream_destroy_pending_stream helper.
     
-    Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
-    (cherry picked from commit de6b3fac1f26075ce915006c914c4a4755617715)
+    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
 
-commit a7b165d994d74131778a5a9bcffec957f1d1cacb
-Author: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
-Date:   Mon Feb 10 10:20:04 2020 +0100
+commit 204f10c29e0f323e7829ecf48e0f002be96e194d
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Wed Jul 7 18:53:35 2021 +0200
 
-    glamor: Error out on out-of-memory when allocating PBO for FBO access
+    xwayland: Call RRTellChanged if the RandR configuration may have changed
     
-    Packed buffer allocation (which happens at glBufferData time with the
-    buffer bound) can fail when there is no GL memory left.
+    This makes sure RandR events are sent to interested clients as needed.
+    This was happening implicitly in some cases, but not in others, e.g. if
+    the root window size didn't change.
     
-    Pick up the error when it happens, print a proper error message, do
-    some cleanup and bail.
+    If this were to call RRTellChanged more often than necessary in some
+    cases, that should be harmless, as it only sends events if something
+    has actually changed since last time.
     
-    Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
-    (cherry picked from commit bc2e12239f86e5a4acd220744f42eb83ba55d328)
+    Should fix https://bugzilla.redhat.com/show_bug.cgi?id=1979892 .
+    
+    v2:
+    * Call RRTellChanged at the very end of update_screen_size, just in
+      case.
+    
+    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
 
-commit 428b5ce4da99a43bfa0c1933ec447f7feb3639a1
-Author: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
-Date:   Mon Feb 10 10:19:18 2020 +0100
+commit a6d178b6af4bb4cd7ba28299c3ddd9d90bcbaaa5
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Wed Jul 7 18:51:02 2021 +0200
 
-    glamor: Propagate FBO allocation failure for picture to texture upload
+    randr: Bail from RRTellChanged if there's no root window yet
     
-    When uploading a picture to a texture, glamor_upload_picture_to_texture
-    calls glamor_pixmap_ensure_fbo to ensure that there is backing FBO.
-    The FBO will be allocated if the picture's drawable pixmap does not have
-    one already, which can fail when there is no GL memory left.
+    This can happen if RRTellChanged is called during initialization.
     
-    glamor_upload_picture_to_texture checks that the call succeeded and will
-    enter the failure path if it did not. However, unlike many other
-    functions in glamor, this one has ret set to TRUE initially, so it needs
-    to be set to FALSE when a failure happens.
+    Continuing in that case makes no sense conceptually:
     
-    Otherwise, the error is not propagated and the failure path return TRUE.
-    This leads to a fault when trying to access the FBO pointer later on.
+    * Any event sent over the wire requires a corresponding window.
+    * No root window probably means there can't be any clients which could
+      receive the events.
     
-    Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
-    (cherry picked from commit c98c7709c67d8ed6b7455ec700a49b58c396ec2c)
+    In practice, it would result in a crash down the road due to
+    dereferencing the NULL ScreenRec::root pointer.
+    
+    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
 
-commit 948afd768398955f043fef8e14d7d154cea25f85
+commit 7e20c8b7b8357eb8986f89e85be22ab1c29f2ca4
+Author: Matt Turner <mattst88@gmail.com>
+Date:   Thu Jul 8 12:15:13 2021 -0700
+
+    Build xz tarballs instead of bzip2
+    
+    Signed-off-by: Matt Turner <mattst88@gmail.com>
+
+commit a9552868697cae02e37e67ae774a072885f202f8
 Author: Dave Airlie <airlied@redhat.com>
-Date:   Thu Feb 6 17:59:08 2020 +0100
+Date:   Thu Jul 1 06:48:55 2021 +1000
 
-    modesetting: remove unnecessary error message, fix zaphod leases
+    glamor: add EXT_gpu_shader4 support
     
-    I introduced this error with the MST hotplug code, but it can trigger
-    on zaphod setups, and is perfectly fine. There is no support for
-    MST/hotplug on zaphod setups currently, so we can just skip over
-    the dynamic connector handling here. However we shouldn't skip
-    over the lease handling so move it into the codepath.
+    This enables a number of the GLSL 1.30 paths on GPUs that have
+    EXT_gpu_shader4 but don't have GLSL 1.30 exposed.
     
-    Fixes: 9257b1252da9 ("modesetting: add dynamic connector hotplug support (MST) (v3)")
-    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
-    Signed-off-by: Dave Airlie <airlied@redhat.com>
-    (cherry picked from commit 1cfdd1a96580733df3625bcea3384ffee3dc92df)
+    (Intel gen4/5 mainly)
+    
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
 
-commit 1c3e51dabadbf65e7fdedbebbdcd19a85fb03e34
-Author: Michel Dänzer <mdaenzer@redhat.com>
-Date:   Thu Feb 6 17:57:16 2020 +0100
+commit a2f5b917f511fca1c9b1501495664e2f63c2e1b0
+Author: Dave Airlie <airlied@redhat.com>
+Date:   Fri Jul 2 04:52:23 2021 +1000
 
-    xfree86/modes: Bail from xf86RotateRedisplay if pScreen->root is NULL
+    glamor: add glamor_glsl_has_ints wrapper
     
-    Avoids a crash in xf86RotatePrepare -> DamageRegister during
-    CreateScreenResources if rotation or another transform is configured for
-    any connected RandR output in xorg.conf. The generic rotation/transform
-    code generally can't work without the root window currently.
+    This should make adding gpu shader4 support cleaner
     
-    Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/969
-    Fixes: 094f42cdfe5d "xfree86/modes: Call xf86RotateRedisplay from
-                         xf86CrtcRotate"
-    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
     Reviewed-by: Adam Jackson <ajax@redhat.com>
-    (cherry picked from commit 6a5e47c57d16de8b6a6a2636f3cbad1aebec32e2)
 
-commit af2fd88b1019f63fe3ce871f9e99b3e1e4608b25
-Author: Daniel Llewellyn <daniel@bowlhat.net>
-Date:   Thu Feb 6 17:56:12 2020 +0100
+commit b4f55712da4d7294bfeb6cffc45b572fd999d800
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Mon Jul 5 21:40:55 2021 +0300
 
-    os: Ignore dying client in ResetCurrentRequest
+    xserver 21.0.99.1
     
-    You might as well, it's harmless. Better, some cleanup code (like DRI2
-    swap wait) needs to run both normally and at client exit, so it
-    simplifies the callers to not need to check first. See 4308f5d3 for a
-    similar example.
+    Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
+
+commit b67e514dbb59bffc23b75d47ca7f24e96c4aeb05
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Sat Jun 26 09:44:39 2021 +0300
+
+    meson: Fix warnings when reading back and checking feature flags
     
-    Props: @ajax (Adam Jackson)
+    Meson does not like comparing things of different types which is a
+    problem when reading back values of feature flags as they may contain
+    either false (bool) or 1 (string).
     
-    Fixes: xorg/xserver#211
+    Since there is a strong reason why we use false when the feature does
+    not exist, we work around this issue by always converting the returned
+    value to int via to_int().
     
-    Signed-off-by: Daniel Llewellyn <diddledan@ubuntu.com>
-    (cherry picked from commit 578371616e09364318c9fb2371a693d438b31b29)
+    Fixes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1190
+    Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
 
-commit e5293f1c5d7b20d98ed4975dc29a6f88c8bc6a0d
+commit b2a0de4f072fdcc0fb20a0853f7edaf714add9d9
 Author: Adam Jackson <ajax@redhat.com>
-Date:   Thu Feb 6 17:55:25 2020 +0100
+Date:   Tue Jun 22 12:39:56 2021 -0400
 
-    Revert "dri2: Don't make reference to noClientException"
-    
-    It's true that the value would always be -1, if it's not zero, but it's
-    usually zero is the problem. As a result we return failure from
-    otherwise successful indirect GLX paths, which isn't very nice of us.
+    xfixes: Allow the client to upgrade the fixes protocol version
     
-    This reverts commit 7d33ab0f8c7958b205076f71e4b47c24aace77fd.
+    If you say FixesQueryVersion twice we remember whatever the second
+    version number was. With just libXfixes this isn't an issue because the
+    request is hidden in extension setup, but libxcb-xfixes doesn't do that
+    for you, which means the second one can _lower_ the requested fixes
+    version, disabling requests that the client thought it had enabled.
     
-    Fixes: https://gitlab.freedesktop.org/xorg/xserver/issues/211
-    (cherry picked from commit e1fa3beb2fe2519e69f859f0acdc68e5a770de27)
+    Paper over this by allowing the version number to be raised but not
+    lowered. Also go ahead and delete the minor version number from the
+    client state since xfixes doesn't have minor versions (yet, anyway).
 
-commit d845ceae53bb425695e6a185b51ae1b432dd4672
-Author: George Matsumura <gmmatsumura01@bvsd.org>
-Date:   Thu Feb 6 17:54:36 2020 +0100
+commit 7d509b6f342d9732b567dc4efa867ea24919853b
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Fri Apr 30 09:56:05 2021 +0200
 
-    Restrict 1x1 pixmap filling optimization to GXcopy
+    xwayland/eglstream: Remove stream validity
     
-    This restricts an optimization whereby the filling of 1x1 pixmaps
-    went around the driver-provided function to cases where the
-    source color is meant to be directly copied to the destination,
-    as opposed to other operations which should produce different
-    destination values than just the foreground color.
+    To avoid an EGL stream in the wrong state, if the window pixmap changed
+    before the stream was connected, we would still keep the pending stream
+    but mark it as invalid. Once the callback is received, the pending would
+    be simply discarded.
     
-    Signed-off-by: George Matsumura <gmmatsumura01@bvsd.org>
+    But all of this is actually to avoid a bug in egl-wayland, there should
+    not be any problem with Xwayland destroying an EGL stream while the
+    compositor is still using it.
+    
+    With that bug now fixed in egl-wayland 1.1.7, we can safely drop all
+    that logic from Xwayland EGLstream backend.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
     Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
-    (cherry picked from commit 83826075e59c0393c16d2a2482dc5c9f2fdf4564)
+    Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1189
 
-commit c2ef88c4d3a551ff7646bfb86550cae32b02a510
-Author: Michel Dänzer <mdaenzer@redhat.com>
-Date:   Tue Jan 14 09:23:34 2020 +0100
+commit 2be9f795bc15012dc912f595003e01bb6aa66f54
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Wed Jun 23 11:35:17 2021 +0200
 
-    modesetting: Explicitly #include "mi.h"
+    xwayland/eglstream: Keep pending stream if the pixmap didn't change
     
-    For the miClearDrawable prototype. Apparently it doesn't get pulled in
-    for some build configurations, breaking the build.
+    If the pixmap does not actually change in set_window_pixmap(), there is
+    no need to invalidate the pending stream, if there's one.
     
-    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
-    (cherry picked from commit a24a786fc8490fda08b15c3dab6fa6750f008ecb)
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Suggested-by: Michel Dänzer <mdaenzer@redhat.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
 
-commit ad7364d8d7f936b9b08195e47d2f6ee9329ff687
-Author: Kenneth Graunke <kenneth@whitecape.org>
-Date:   Mon Jan 13 23:34:49 2020 -0800
+commit 2531ee02450e3be3549daa09407557c3addeba02
+Author: orbea <orbea@riseup.net>
+Date:   Wed Jun 23 05:50:21 2021 -0700
 
-    configure: Define GLAMOR_HAS_EGL_QUERY_DRIVER when available
+    hw/dmx/config: Link directly with libdmxconfig.a
     
-    Commit 195c2ef8f9f07b9bdabc0f554a9033b7857b99c7 added this to the Meson
-    build but neglected to add it to autotools.
+    When building xserver with slibtool (https://dev.midipix.org/cross/slibtool)
+    the build will fail.
     
-    v2: Also update dix-config.h.in
+      /usr/bin/ld: cannot find -ldmxconfig
     
-    Fixes: 195c2ef8f ("glamor: Add a function to get the driver name via EGL_MESA_query_driver")
+    This is because xserver creates libdmxconfig.a internally and then links with
+    the linker flag -ldmxconfig. However according to automake documentation the
+    -lfoo linker flags should only be used for external dependencies and all
+    internal libraries should be linked with the libtool archive file (.la) or
+    the static archive (.a) when the former is not available.
     
-    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com> [v1]
-    Reviewed-by: Eric Engestrom <eric@engestrom.ch> [v1]
-    Reviewed-by: Matt Turner <mattst88@gmail.com>
-    (cherry picked from commit 25ca99df38a2c28c25ab20a917e68442285f2353)
+    GNU libtool is far more permissive and happens to silently obscure this issue
+    while slibtool fails because it instead sees '-L./.libs -ldmxconfig'.
 
-commit 489f4191f3c881c6c8acce97ec612167a4ae0f33
-Author: Matt Turner <mattst88@gmail.com>
-Date:   Mon Jan 13 14:47:48 2020 -0800
+commit 2f53d1cf7304574a516f6868822307648bc35333
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Wed Apr 7 18:22:05 2021 +0300
 
-    xserver 1.20.7
+    config: Fix platform busid parsing when there is no ID_PATH prop
     
-    Signed-off-by: Matt Turner <mattst88@gmail.com>
+    On at least Lenovo Thinkpad E585 udev does not have ID_PATH property for
+    the drm node (see
+    https://gitlab.freedesktop.org/xorg/xserver/-/issues/993). While this is
+    likely udev bug, this causes the device to be not recognized as
+    attribs->busid is NULL, which causes platform_find_pci_info to be not
+    called and corresponding xf86_platform_devices[i]->pdev to be NULL.
+    
+    At this moment pdev being NULL will cause a crash, but this is a
+    different bug.
+    
+    Fixes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/993
+    Fixes: 0816e8fc linux: Make platform device probe less fragile
+    Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
+    Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
 
-commit 279789183ed377127073955d21d44ee3b01ac763
-Author: Alan Coopersmith <alan.coopersmith@oracle.com>
-Date:   Mon Sep 23 15:12:01 2019 -0700
+commit d4b38e111946b934d0f8438dc295dd9f7316318c
+Author: Olivier Certner <olce.freedesktop@certner.fr>
+Date:   Tue Feb 9 10:49:00 2021 +0100
 
-    ospoll: Fix Solaris ports implementation to build on Solaris 11.4
+    os: Properly report failure to link lock file
     
-    Wrong version got committed, but wasn't noticed since it only builds
-    with meson, not autoconf.
+    Stop assuming that a failure to link always means that the file indeed
+    exists. In case of other failure (e.g., permissions), the user would get an
+    inconsistent "Can't read lock file" message.
     
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-    (cherry picked from commit 0e8c0d2f238e5d50daaf4672bd80ad519673b5e3)
+    Signed-off-by: Olivier Certner <olce.freedesktop@certner.fr>
 
-commit cc503031c32496efb28ed81d32a547ded46a0815
-Author: Alan Coopersmith <alan.coopersmith@oracle.com>
-Date:   Thu Feb 21 15:38:07 2019 -0800
+commit d66b7ec12986efd4f32fcc84cdaacbd04ec98ccb
+Author: Łukasz Spintzyk <lukasz.spintzyk@synaptics.com>
+Date:   Wed Jun 23 15:26:23 2021 +0200
 
-    os-support/solaris: Set IOPL for input thread too
-    
-    Since the Solaris kernel tracks IOPL per thread, and doesn't inherit
-    raised IOPL levels when creating a new thread, we need to turn it on
-    in the input thread for input drivers like vmmouse that need register
-    access to work correctly.
+    xfree86: Fix out of array bound access to xf86Entities
     
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-    (cherry picked from commit 12769c516d9356bd92f90e2f53a4853dbfdc4aed)
+    Signed-off-by: Łukasz Spintzyk <lukasz.spintzyk@synaptics.com>
 
-commit f778e76eb4bc6b9219a8b1a903a2fb1a30c2c92a
-Author: Alan Coopersmith <alan.coopersmith@oracle.com>
-Date:   Thu Feb 21 15:35:38 2019 -0800
+commit 0d93bbfa2cfacbb73741f8bed0e32fa1a656b928
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Fri Mar 26 00:51:02 2021 +0200
 
-    Add xf86OSInputThreadInit call from common layer into os-support layer
+    xfree86: Fix potentially NULL reference to platform device's PCI device
     
-    Allows os backends to run additional code as necessary to set up the
-    input thread.
+    xf86_platform_devices[i].pdev may be NULL in cases we fail to parse the
+    busid in config_udev_odev_setup_attribs() (see also [1], [2]) such as
+    when udev does not give use ID_PATH. This in turn leads to
+    platform_find_pci_info() being not called and pdev being NULL.
     
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-    (cherry picked from commit ea1527a8a662dcc5ac3ed49135740aa5f24f74bc)
+    [1]: https://gitlab.freedesktop.org/xorg/xserver/-/issues/993
+    [2]: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1076
+    
+    Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
+    Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
 
-commit e3f26605d85d987da434640f52646d728f1fe919
-Author: Alan Coopersmith <alan.coopersmith@oracle.com>
-Date:   Thu Feb 21 15:22:57 2019 -0800
+commit 303763941f9941e2e215a3c978b72de495478033
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Fri Mar 26 00:51:01 2021 +0200
 
-    Add ddxInputThread call from os layer into ddx layer
+    xfree86: Consistently check for reference to primaryBus pci_device
     
-    Allows ddx's to run additional code as necessary to set up the
-    input thread.
+    This is the only place where we don't check whether
+    primaryBus.id.plat->pdev is not NULL before accessing its members.
     
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-    (cherry picked from commit 4ad21c3247d98ac6c5ad71fa36be60ed04f7c92c)
+    It may be NULL in cases we fail to parse the busid in
+    config_udev_odev_setup_attribs() (see also [1], [2]) such as when udev
+    does not give use ID_PATH. This in turn leads to
+    platform_find_pci_info() being not called and pdev being NULL in one of
+    the items within the xf86_platform_devices array. For this to cause a
+    crash we only need it to become the primaryBus device.
+    
+    [1]: https://gitlab.freedesktop.org/xorg/xserver/-/issues/993
+    [2]: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1076
+    
+    Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
 
-commit bb405cdc85b6e31c0beef60a07a2cfe5b87dcde6
-Author: Alan Coopersmith <alan.coopersmith@oracle.com>
-Date:   Thu Feb 21 14:51:22 2019 -0800
+commit b9722d39cd619ac55c2cfbb5644eabb84ff57f1b
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Thu Jun 17 18:00:50 2021 +0300
 
-    os-support/solaris: Drop ExtendedEnabled global variable
+    configure.ac: Switch project version to 20.x.y style
     
-    Keeping track of kernel state in user space doesn't buy us anything,
-    and introduces bugs, as we were keeping global state but the Solaris
-    kernel tracks IOPL per thread.
+    Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
+    Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
+
+commit ef89b6648e2a806237a6d2fa598e1b9c83f128b4
+Author: Zoltán Böszörményi <zboszor@pr.hu>
+Date:   Mon Jun 21 12:12:41 2021 +0200
+
+    xfree86: Fix NULL pointer dereference crash
     
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-    (cherry picked from commit 7533fa9bd5a4a0f7743d553be186514d684308c8)
+    screenp->displays[count] (passed to configDisplay() in
+    configScreen()) is NULL if there is no Virtual setting
+    in the configuration.
+    
+    Fixes: f8a6be04d0c7e6a99824ff888ad6c010960c5c21 ("xfree86: Change
+    displays array to pointers array to fix invalid pointer issues
+    after table reallocation")
+    
+    Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
 
-commit 977f3acfceb91f1dd10c8bf84b9d7515b2a59457
-Author: Michel Dänzer <mdaenzer@redhat.com>
-Date:   Fri Dec 20 15:51:00 2019 +0100
+commit aad61e8e03311eb8bae4f7db59e65634733eadc2
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Fri Jun 18 14:52:55 2021 +0200
 
-    glamor: Only use dual blending with GLSL >= 1.30
+    glx: Fix use after free in MakeCurrent
     
-    It can't be used with older GLSL. Fixes a crash when attempting to
-    anyway.
+    The fix from commit c468d34c7 - "glx: Set ContextTag for all contexts"
+    is actually incomplete, it correctly sets the context tag for direct
+    contexts as well, but would fail to mark the context's currentClient.
     
-    Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/97
-    Fixes: e7308b6c7756 "glamor: Add support for CA rendering in a single pass."
-    Reviewed-by: Dave Airlie <airlied@redhat.com>
-    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
-    (Cherry picked from commit 5bfca0038e92d61e58d4dc1a54748faef8273023)
+    As a result, when the context is destroyed, it would be freed
+    immediately rather than being just scheduled for deletion, even though
+    it is still current for some client. leading to a use-after-free.
+    
+    Make sure to also set the context's currentClient for direct contexts as
+    well, not just indirect ones.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Fixes: c468d34c7 - "glx: Set ContextTag for all contexts"
+    Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1186
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
 
-commit cfc5e5040c93486323165196550dbe18aec46402
-Author: Aaron Plattner <aplattner@nvidia.com>
-Date:   Thu Dec 26 13:40:17 2019 -0800
+commit 021b3c2f778e718338f232b94880fc3ae9092085
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Tue Jun 15 12:40:47 2021 +0300
 
-    modesetting: Check whether RandR was initialized before calling rrGetScrPriv
+    configure.ac: Bump inputproto dep to 2.3.99.1
     
-    Calling rrGetScrPriv when RandR isn't initialized causes an assertion
-    failure that aborts the server:
+    This should have been part of 6cbcbc81525b131b5b94409ea870af663d5c28bb.
     
-     Xorg: ../include/privates.h:121: dixGetPrivateAddr: Assertion `key->initialized' failed.
+    Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
+
+commit 05b3c681ea2f478c0cb941c2f8279919cf78de6d
+Author: Daniel Strnad <strnadda@gmail.com>
+Date:   Tue May 19 15:52:35 2020 +0200
+
+    hw/xfree86: Propagate physical dimensions from DRM connector
     
-     Thread 1 "Xorg" received signal SIGABRT, Aborted.
-     0x00007ffff78a8f25 in raise () from /usr/lib/libc.so.6
-     (gdb) bt
-     #0  0x00007ffff78a8f25 in raise () from /usr/lib/libc.so.6
-     #1  0x00007ffff7892897 in abort () from /usr/lib/libc.so.6
-     #2  0x00007ffff7892767 in __assert_fail_base.cold () from /usr/lib/libc.so.6
-     #3  0x00007ffff78a1526 in __assert_fail () from /usr/lib/libc.so.6
-     #4  0x00007ffff7fb57c1 in dixGetPrivateAddr (privates=0x555555ab1b60, key=0x555555855720 <rrPrivKeyRec>) at ../include/privates.h:121
-     #5  0x00007ffff7fb5822 in dixGetPrivate (privates=0x555555ab1b60, key=0x555555855720 <rrPrivKeyRec>) at ../include/privates.h:136
-     #6  0x00007ffff7fb586a in dixLookupPrivate (privates=0x555555ab1b60, key=0x555555855720 <rrPrivKeyRec>) at ../include/privates.h:166
-     #7  0x00007ffff7fb8445 in CreateScreenResources (pScreen=0x555555ab1790) at ../hw/xfree86/drivers/modesetting/driver.c:1335
-     #8  0x000055555576c5e4 in xf86CrtcCreateScreenResources (screen=0x555555ab1790) at ../hw/xfree86/modes/xf86Crtc.c:744
-     #9  0x00005555555d8bb6 in dix_main (argc=4, argv=0x7fffffffead8, envp=0x7fffffffeb00) at ../dix/main.c:214
-     #10 0x00005555557a4f0b in main (argc=4, argv=0x7fffffffead8, envp=0x7fffffffeb00) at ../dix/stubmain.c:34
+    Physical dimmension of display can be obtained not just by configuration or
+    DDC, but also directly from kernel via drmModeGetConnector(). Until now
+    xserver silently discarded these values even when no configuration nor EDID
+    were present and fallbacked to default DPI.
+
+commit f8a6be04d0c7e6a99824ff888ad6c010960c5c21
+Author: Łukasz Spintzyk <lukasz.spintzyk@synaptics.com>
+Date:   Tue Jun 8 20:02:21 2021 +0200
+
+    xfree86: Change displays array to pointers array to fix invalid pointer issues after table reallocation
     
-    This can happen, for example, if the server is configured with Xinerama
-    and there is more than one X screen:
+    There are rare cases when xf86SetDepthBpp is resizing displays array in confScreen.
+    As that array is shared between set of ScrnInfoRec's then realloc might invalidate chached DispPtr display values in
+    otheres ScrnInfoRec objects.
     
-     Section "ServerLayout"
-       Identifier "crash"
-       Screen 0 "modesetting"
-       Screen 1 "dummy" RightOf "modesetting"
-       Option "Xinerama"
-     EndSection
+    If we will change displays array as an array of pointers to DispRec then cached DispRec pointers in ScrnInfoRec
+    won't be invalid after reallocation of displays array.
     
-     Section "Device"
-       Identifier "modesetting"
-       Driver "modesetting"
-     EndSection
+    Signed-off-by: Łukasz Spintzyk <lukasz.spintzyk@synaptics.com>
+
+commit 1a1bd5cf7a1a3364afb625f020e1c013fbabfbb6
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Fri Apr 16 16:15:35 2021 +0300
+
+    modesetting: Add a limit on async page flip error log frequency
     
-     Section "Screen"
-       Identifier "modesetting"
-       Device "modesetting"
-     EndSection
+    In certain circumstances we will have a lot of flip errors without a
+    reasonable way to prevent them. In such case we reduce the number of
+    logged messages to at least not fill the error logs.
     
-     Section "Device"
-       Identifier "dummy"
-       Driver "dummy"
-     EndSection
+    The details are as follows:
     
-     Section "Screen"
-       Identifier "dummy"
-       Device "dummy"
-     EndSection
+    At least on i915 hardware support for async page flip support depends on
+    the used modifiers which themselves can change dynamically for a screen.
+    This results in the following problems:
     
-    The problem does not reproduce if there is only one X screen because of
-    this code in xf86RandR12Init:
+    - We can't know about whether a particular CRTC will be able to do an
+    async flip without hardcoding the same logic as the kernel as there's no
+    interface to query this information.
     
-     #ifdef PANORAMIX
-         /* XXX disable RandR when using Xinerama */
-         if (!noPanoramiXExtension) {
-             if (xf86NumScreens == 1)
-                 noPanoramiXExtension = TRUE;
-             else
-                 return TRUE;
-         }
-     #endif
+    - There is no way to give this information to an application, because
+    the protocol of the present extension does not specify anything about
+    changing of the capabilities on runtime or the need to re-query them.
     
-    Fix the problem by checking dixPrivateKeyRegistered(rrPrivKey) before
-    calling rrGetScrPriv. This is similar to what the xf86-video-amdgpu
-    driver does:
-    https://gitlab.freedesktop.org/xorg/driver/xf86-video-amdgpu/blob/fd66f5c0bea2b7c22a47bfd5eb1f22d32d166d9c/src/amdgpu_kms.c#L388
+    Even if the above was solved, the only benefit would be avoiding a
+    roundtrip to the kernel and reduced amount of error logs. The former
+    does not seem to be a good enough benefit compared to the amount of work
+    that would need to be done. The latter is solved in this commit.
     
-    Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
-    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
-    (cherry picked from commit 4226c6d0329df440551b7b91ae573a82c64a1ac9)
+    Reviewed-by: Eero Tamminen <eero.t.tamminen@intel.com>
+    Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
 
-commit fb2540648a293def46bf0afa183e0884fa4496be
-Author: Peter Hutterer <peter.hutterer@who-t.net>
-Date:   Wed May 29 16:19:55 2019 +1000
+commit 9992245c5f7821de1fbd866f43f0afe55080ed67
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Fri Apr 16 16:15:34 2021 +0300
 
-    Xi: return AlreadyGrabbed for key grabs > 255
+    modesetting: Extract flip failure logging to a single place
     
-    We can't have high keycodes because everything in XKB relies on 8 bits. XI2's
-    API allows for 32-bit keycodes so we have to take those but nothing in the
-    server is really ready for this. The effect of this right now is that any high
-    keycode grab is clipped to 255 and thus ends up grabbing a different key
-    instead.
+    Reviewed-by: Eero Tamminen <eero.t.tamminen@intel.com>
+    Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
+
+commit 9adb13e296baead53112a268ddfd291195742c71
+Author: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
+Date:   Tue Jun 8 14:52:17 2021 +0200
+
+    glamor: Avoid using GL_QUADS on V3D
     
-    https://bugzilla.redhat.com/show_bug.cgi?id=1697804
+    Like in 0e3f1252dacdc3194 ("glamor: Avoid using GL_QUADS on VC4")
+    this will avoid mesa to fallback doing conversion for QUADS primitives.
     
-    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-    (cherry picked from commit f4cdbf640b6440df4af784ca35e1b1340965cc10)
+    Signed-off-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
+    Reviewed-by: Emma Anholt <emma@anholt.net>
 
-commit 87ca1bdf6935c4b11b41ca071f1f4b8d8347fee9
+commit 104c7c50485238a1e8c2090dc96126e9624ef870
 Author: Michel Dänzer <mdaenzer@redhat.com>
-Date:   Tue Dec 3 18:39:40 2019 +0100
+Date:   Tue May 18 18:02:59 2021 +0200
 
-    xwayland: Do flush GPU work in xwl_present_flush
-    
-    The Present code sends the idle notification event to the client after
-    xwl_present_flush returns. If we don't flush our GPU work here, the
-    client may race to draw another frame to the same buffer, so we may end
-    up copying (parts of) that new frame instead of the one we meant to.
+    xwayland/present: Move wl_buffer check into xwl_glamor_check_flip
     
-    Fixes https://gitlab.freedesktop.org/xorg/xserver/issues/835
+    Keeps the glamor specific code together more.
     
     Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
-    (Cherry picked from commit 2a2234ad1a0fe88400c1511fea67741e4ad09f7f)
-    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
 
-commit 8aad09dd79f0504715edac56e21439809a5d529e
+commit 3641c24bd012d032ec289cde312a9a5a3ba8c3bf
 Author: Michel Dänzer <mdaenzer@redhat.com>
-Date:   Tue Nov 26 17:17:12 2019 +0100
+Date:   Tue May 18 17:56:50 2021 +0200
 
-    modesetting: Clear new screen pixmap storage on RandR resize
+    xwayland/eglstream: Handle xwl_pixmap_get returning NULL
     
-    Fixes random garbage being visible intermittently.
+    In xwl_glamor_eglstream_get_wl_buffer_for_pixmap. This can likely be hit
+    now with an SHM pixmap via the Present flip path. There might be other
+    corner cases.
     
-    Reviewed-by: Adam Jackson <ajax@redhat.com>
-    (Cherry picked from commit 9ba13bac9dd076f166ff0d063fc144b904a40d12)
-    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
+    Fixes: f3eb1684fa50 "xwayland: enable MIT-SHM shared pixmaps"
+    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
 
-commit 094f42cdfe5d4c0b8e329445c529ee1e59278999
+commit d163e0a1d5ec54cc726d45a239a0777d0a84d610
 Author: Michel Dänzer <mdaenzer@redhat.com>
-Date:   Tue Nov 26 17:16:37 2019 +0100
+Date:   Fri Jun 11 18:25:01 2021 +0200
 
-    xfree86/modes: Call xf86RotateRedisplay from xf86CrtcRotate
+    ci: Fix UPSTREAM_REPO -> FDO_UPSTREAM_REPO
     
-    If a new rotate buffer was allocated. This makes sure the new buffer
-    has valid transformed contents when it starts being displayed.
+    The latter is what ci-templates expect.
     
-    Reviewed-by: Adam Jackson <ajax@redhat.com>
-    (Cherry picked from commit 327df450ffcf5bda5b4254db0208d355860d1010)
-    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
+    Fixes: ab73c16930d6 "ci: Update to the latest templates"
+    Reviewed-by: Simon Ser <contact@emersion.fr>
 
-commit b50175fe867ae067888049318264824524c0616a
-Author: Michel Dänzer <mdaenzer@redhat.com>
-Date:   Tue Nov 26 17:14:46 2019 +0100
+commit 7e7c147105ac704a7b33bdee0f85dc9ccdd8f747
+Author: Lukasz Spintzyk <lukasz.spintzyk@gmail.com>
+Date:   Mon Jun 7 09:30:46 2021 +0200
 
-    modesetting: Call glamor_finish from drmmode_crtc_set_mode
+    modesetting: Disable reverse prime offload mode for displays running on evdi,udl
     
-    This makes sure any pending drawing to a new scanout buffer will be
-    visible from the start.
+    This mode for displays running on evdi/udl as side effect of failed glamor_egl_init
+    reverse_prime_offload_mode was initialized to FALSE
     
-    This makes the finish call in drmmode_copy_fb superfluous, so remove it.
+    After Mesa upgrade to 21.0.0 GL_RENDERER is not llvmpipe that results in successful glamor_egl_init
+    and reverse_prime_offload_mode enabled.
     
-    Reviewed-by: Adam Jackson <ajax@redhat.com>
-    (Cherry picked from commit c66c548eabf06835cb0cb906598fb87c7bb30cf4)
-    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
+    This commit is explicitly disabling reverse_prime_offload_mode for evdi and udl drivers
+    
+    Signed-off-by: Łukasz Spintzyk <lukasz.spintzyk@synaptics.com>
 
-commit 255d8c3c36a9d52b3acc5e016efa0ef0f2371f79
-Author: Kenneth Graunke <kenneth@whitecape.org>
-Date:   Thu Nov 21 23:03:50 2019 -0800
+commit c468d34c7208c9041f9c077b54a00ae9cccad6a3
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Thu Jun 3 17:51:01 2021 +0200
 
-    modesetting: Use EGL_MESA_query_driver to select DRI driver if possible
-    
-    We now ask Glamor to use EGL_MESA_query_driver to obtain the DRI driver
-    name; if successful, we use that as the DRI driver name.  Following the
-    existing dri2.c logic, we also use the same name for the VDPAU driver,
-    except for i965 (and now iris), where we switch to the "va_gl" fallback.
+    glx: Set ContextTag for all contexts
     
-    This allows us to bypass the PCI ID lists in xserver and centralize the
-    driver selection mechanism inside Mesa.  The hope is that we no longer
-    have to update these lists for any future hardware.
+    Currently, xorgGlxMakeCurrent() would set the context tag only for
+    indirect GLX contexts.
     
-    (backported from commit 8d4be7f6c4f7c673d7ec1a6bfdef944907a3916e)
+    However, several other places expect to find a context for the tag or
+    they would raise a GLXBadContextTag error, such as WaitGL() or WaitX().
     
-    Acked-by: Michel Dänzer <mdaenzer@redhat.com>
-
-commit 2a1a96d956f4023796737d26a32354e940c8e6cf
-Author: Kenneth Graunke <kenneth@whitecape.org>
-Date:   Thu Nov 21 23:01:28 2019 -0800
-
-    glamor: Add a function to get the driver name via EGL_MESA_query_driver
+    Set the context tag for direct contexts as well, to avoid raising an
+    error and possibly killing the client.
     
-    This maps to eglGetDisplayDriverName if EGL_MESA_query_render is
-    supported, otherwise it returns NULL.
+    Thanks to Erik Kurzinger <ekurzinger@nvidia.com> for spotting the issue.
     
-    (cherry picked from commit 195c2ef8f9f07b9bdabc0f554a9033b7857b99c7)
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
 
-commit 6b3fafa9bfa94b9b04a1a44dc52afb7c4bc250ce
-Author: Matt Turner <mattst88@gmail.com>
-Date:   Fri Nov 22 17:52:04 2019 -0500
+commit 6b47321bc6138bcd737b36e038aba904d56f1cf6
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Wed Apr 28 13:33:29 2021 +0200
 
-    xserver 1.20.6
+    dix: Add optional terminate delay
     
-    Signed-off-by: Matt Turner <mattst88@gmail.com>
-
-commit 88f12aa74bf4fea25d5b8d8002b3088432feb405
-Author: Matt Turner <mattst88@gmail.com>
-Date:   Thu Nov 21 11:23:18 2019 -0500
-
-    xfree86: Test presence of isastream()
+    When the command line option "-terminate" is used, it could be
+    interesting to give it an optional grace period to let the Xserver
+    running for a little longer in case a new connection occurs.
     
-    isastream() was never more than a stub in glibc, and was removed in
-    glibc-2.30 by commit a0a0dc83173c ("Remove obsolete, never-implemented
-    XSI STREAMS declarations").
+    This adds an optional parameter to the "-terminate" command line option
+    for this purpose.
     
-    Bug: https://bugs.gentoo.org/700838
-    Reviewed-by: Julien Cristau <jcristau@debian.org>
-    Signed-off-by: Matt Turner <mattst88@gmail.com>
-    (cherry picked from commit e6ab7f9f342f463092c45226f3294074351fdd5e)
+    v2: Use a delay in seconds instead of milliseconds
+        (Martin Peres <martin.peres@mupuf.org>)
+    v3: Clarify man page entry, ensure terminateDelay is always >= 0,
+        simplify TimerFree(). (Peter Hutterer <peter.hutterer@who-t.net>)
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
 
-commit 0e60139064b84b856c59e5a456e26c60710b1b69
+commit e167299f6050d85778e62ed2a1e544ceef6452fc
 Author: Olivier Fourdan <ofourdan@redhat.com>
-Date:   Mon Nov 18 17:28:45 2019 +0100
+Date:   Fri Feb 19 12:03:39 2021 +0100
 
-    present/wnmd: Relax assertion on CRTC on abort_vblank()
+    xfixes: Add ClientDisconnectMode
     
-    Currently, the function `present_wnmd_abort_vblank()` would fail if the
-    given `crtc` is NULL.
+    With Wayland compositors now being able to start Xwayland on demand, the
+    next logical step is to be able to stop Xwayland when there is no more
+    need for it.
     
-    However, `xwl_present_get_crtc()` can return `NULL` under some
-    circumstances, which would cause an unexpected termination of Xwayland
-    in such a case, caused by the assertion failure being triggered.
+    The Xserver itself is capable of terminating itself once all X11 clients
+    are gone, yet in a typical full session, there are a number of X11
+    clients running continuously (e.g. the Xsettings daemon, IBus, etc.).
     
-    Remove the assertion, considering that the `crtc` isn't actually used in
-    neither `present_wnmd_abort_vblank()` nor `xwl_present_abort_vblank()`.
+    Those always-running clients will prevent the Xserver from terminating,
+    because the actual number of X11 clients will never drop to 0. Worse,
+    the X11 window manager of a Wayland compositor also counts as an X11
+    client, hence also preventing Xwayland from stopping.
+    
+    Some compositors such as mutter use the XRes extension to query the X11
+    clients connected, match their PID with the actual executable name and
+    compare those with a list of executables that can be ignored when
+    deciding to kill the Xserver.
+    
+    But that's not just clumsy, it is also racy, because a new X11 client
+    might initiate a connection the X11 server right when the compositor is
+    about to kill it.
+    
+    To solve this issue directly at the Xserver level, this add new entries
+    to the XFixes extension to let the X11 clients themselves specify the
+    disconnect mode they expect.
+    
+    Typically, those X11 daemon clients would specify the disconnect mode
+    XFixesClientDisconnectFlagTerminate to let the Xserver know that they
+    should not be accounted for when checking the remaining clients prior
+    to terminate.
     
     Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
-    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
-    Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/937
-    (cherry picked from commit 4f984fc06bd57cabfa38f6191f10714878dc8969)
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
 
-commit 2edadf26f1f8deddbe171115fa502337ac62df02
-Author: Aaron Plattner <aplattner@nvidia.com>
-Date:   Tue Nov 19 10:08:51 2019 -0800
+commit b7a85e44da91d1663d5b4eabac06327c92a80f91
+Author: Erik Kurzinger <ekurzinger@nvidia.com>
+Date:   Thu Dec 10 14:24:32 2020 -0800
 
-    os: Don't crash in AttendClient if the client is gone
+    glx: don't create implicit GLXWindow if one already exists
     
-    If a client is in the process of being closed down, then its client->osPrivate
-    pointer will be set to NULL by CloseDownConnection. This can cause a crash if
-    freeing the client's resources results in a call to AttendClient. For example,
-    if the client has a pending sync fence:
+    If a GLXMakeCurrent request specifies an X window as its drawable,
+    __glXGetDrawable will implicitly create a GLXWindow for it. However,
+    the client may have already explicitly created a GLXWindow for that X
+    window. If that happens, two __glXDrawableRes resources will be added
+    to the window.
     
-     Thread 1 "X" received signal SIGSEGV, Segmentation fault.
-     AttendClient (client=0x5571c4aed9a0) at ../os/connection.c:942
-     (gdb) bt
-     #0  AttendClient (client=0x5571c4aed9a0) at ../os/connection.c:942
-     #1  0x00005571c3dbb865 in SyncAwaitTriggerFired (pTrigger=<optimized out>) at ../Xext/sync.c:694
-     #2  0x00005571c3dd5749 in miSyncDestroyFence (pFence=0x5571c5063980) at ../miext/sync/misync.c:120
-     #3  0x00005571c3dbbc69 in FreeFence (obj=<optimized out>, id=<optimized out>) at ../Xext/sync.c:1909
-     #4  0x00005571c3d7a01d in doFreeResource (res=0x5571c506e3d0, skip=skip@entry=0) at ../dix/resource.c:880
-     #5  0x00005571c3d7b1dc in FreeClientResources (client=0x5571c4aed9a0) at ../dix/resource.c:1146
-     #6  FreeClientResources (client=0x5571c4aed9a0) at ../dix/resource.c:1109
-     #7  0x00005571c3d5525f in CloseDownClient (client=0x5571c4aed9a0) at ../dix/dispatch.c:3473
-     #8  0x00005571c3d55eeb in Dispatch () at ../dix/dispatch.c:492
-     #9  0x00005571c3d59e96 in dix_main (argc=3, argv=0x7ffe7854bc28, envp=<optimized out>) at ../dix/main.c:276
-     #10 0x00007fea4837cb6b in __libc_start_main (main=0x5571c3d1d060 <main>, argc=3, argv=0x7ffe7854bc28, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffe7854bc18) at ../csu/libc-start.c:308
-     #11 0x00005571c3d1d09a in _start () at ../Xext/sync.c:2378
-     (gdb) print client->osPrivate
-     $1 = (void *) 0x0
+    If the explicitly-created GLXWindow is later destroyed by the client,
+    DrawableGone will call FreeResourceByType on the X window, but this
+    will actually free the resource for the implicitly-created GLXWindow,
+    since that one would be at the head of the list.
     
-    Since the client is about to be freed, its ignore count doesn't matter and
-    AttendClient can simply be a no-op. Check for client->clientGone in AttendClient
-    and remove similar checks from two callers that had them.
+    Then if the X window is destroyed after that, the resource for the
+    explicitly-created GLXWindow will be freed. But that GLXWindow was
+    already destroyed above. This crashes the server when it tries to call
+    the destroyed GLXWindow's destructor. It also means the
+    implicitly-created GLXWindow would have been leaked since the
+    FreeResourceByType call mentioned above skips calling the destructor.
     
-    Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
-    (cherry picked from commit 4308f5d3d1fbd0f5dce81e22c0c3f08c65a7c9d8)
+    To fix this, if __glXGetDrawable is given an X window, it should check
+    if there is already a GLXWindow associated with it, and only create an
+    implicit one if there is not.
+    
+    Signed-off-by: Erik Kurzinger <ekurzinger@nvidia.com>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
 
-commit 68cfee97bc59580724d594c82f5ee55a980dadf0
-Author: Adam Jackson <ajax@redhat.com>
-Date:   Wed Oct 9 11:57:18 2019 -0400
+commit 8274dd664335cd72739a1107f174e7a974a9ea24
+Author: Jan Beich <jbeich@FreeBSD.org>
+Date:   Sun May 30 19:49:43 2021 +0000
 
-    dix: Call SourceValidate before GetImage
-    
-    This ensures that any prep work for the drawable we're about to read
-    from is already done before we call down to GetImage. This should be no
-    functional change as most of the callers with a non-trivial
-    SourceValidate are already wrapping GetImage and doing the equivalent
-    thing, but we'll be simplifying that shortly.
+    meson: provide fallback for *proto dependencies
     
-    More importantly this ensures that if any of that prep work would
-    generate events - like automatic compositing flushing rendering to a
-    parent pixmap which then triggers damage - then it happens entirely
-    before we start writing the GetImage reply header.
+    Meson has a built-in facility to use bundled versions of dependencies
+    if system packages are too old. Enable for xorgproto after 8e504d8b36eb:
     
-    Note that we do not do the same for GetSpans, but that's okay. The only
-    way to get to GetSpans is through miCopyArea or miCopyPlane - where the
-    callers must already call SourceValidate - or miGetImage - which this
-    commit now protects with SourceValidate.
+    Run-time dependency xproto found: YES 7.0.33
+    Run-time dependency randrproto found: YES 1.6.0
+    Run-time dependency renderproto found: YES 0.11.1
+    Run-time dependency xextproto found: YES 7.3.0
+    Dependency inputproto found: NO found 2.3.2 but need: '>= 2.3.99.1'
+    Found CMake: /usr/local/bin/cmake (3.20.2)
+    Run-time dependency inputproto found: NO (tried pkgconfig and cmake)
+    Looking for a fallback subproject for the dependency inputproto
     
-    Fixes: xorg/xserver#902
-    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
-    (cherry picked from commit 516e75dbb6bbf97c7af9c2226242ffd9259fec11)
+    meson.build:73:0: ERROR: Neither a subproject directory nor a xorgproto.wrap file was found.
 
-commit 2320fd4b52a60411714170d516fc58e6ec516353
-Author: Adam Jackson <ajax@redhat.com>
-Date:   Wed Oct 9 11:27:12 2019 -0400
+commit 34a58d7714025bc1043bf5282358406eb10e4b8e
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Thu May 20 16:46:33 2021 +0200
 
-    mi: Add a default no-op miSourceValidate
+    xwayland/eglstream: Log when GL_OES_EGL_image is missing
     
-    Slightly simplifies the callers since they don't need to check for
-    non-NULL anymore.
+    That will dramatically affect performance, might as well log when we
+    cannot use GL_OES_EGL_image with the NVIDIA closed-source driver.
     
-    I do extremely hate the workarounds here to suppress misprite taking the
-    cursor down though. Surely there's a better way.
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit fae58e9b03696a3890f9c876306c68ffa6f9ff30
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Mon May 17 18:20:57 2021 +0200
+
+    xwayland/eglstream: Use "nvidia" for GLVND
     
-    [1.20: Do not in fact simplify the callers as above, since it would
-    change the ABI. - ajax]
+    If the EGLStream backend is able to use hardware acceleration with the
+    NVIDIA closed source driver, we should use the "nvidia" GLX
+    implementation instead of the one from Mesa to take advantage of the
+    NVIDIA hardware accelerated rendering.
     
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
     Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
-    (cherry picked from commit ff310903f34ac34c916ad74e919d1ac12aea4715)
 
-commit 07efd81b819f21046afc0bb7e19a6cdf7f3c7ea9
+commit 24fc8aea1e4bbaba780f1a316fba797a0198f603
 Author: Olivier Fourdan <ofourdan@redhat.com>
-Date:   Mon Jul 1 13:20:39 2019 +0200
+Date:   Thu May 20 12:11:42 2021 +0200
 
-    compiler.h: Do not include sys/io.h on ARM with glibc
+    xwayland: Add preferred GLVND vendor to xwl_screen
     
-    <sys/io.h> on ARM hasn't worked for a long, long time, so it was removed
-    it from glibc upstream.
+    If Xwayland's EGLstream backend supports hardware acceleration with the
+    NVIDIA closed-source driver, the GLX library also needs to be one
+    shipped by NVIDIA, that's what GLVND is for.
     
-    Remove the include to avoid a compilation failure on ARM with glibc.
+    Add a new member to the xwl_screen that the backend can optionally set
+    to the preferred GLVND vendor to use.
+    
+    If not set, "mesa" is assumed.
     
     Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
-    Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/840
-    (cherry picked from commit fe4cd0e7f5c58fa94db36326aadc1bd4e6d73eba)
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
 
-commit 03b91e17ce72649b2d6946213f5a7d152bfe7098
-Author: Aaron Plattner <aplattner@nvidia.com>
-Date:   Wed Nov 6 10:45:43 2019 -0800
+commit 2de5ded3c6d73c1672d2cb14d603cb23fcd477e5
+Author: Niveditha Rau <niveditha.rau@oracle.com>
+Date:   Tue May 11 15:08:41 2021 -0700
 
-    xfree86: Call ScreenInit for protocol screens before GPU screens
+    glx: Check for byte-swapping in SetReplyHeader
     
-    During startup, the xfree86 DDX's InitOutput() calls PreInit for
-    protocol screens first, and then GPU screens. On teardown, dix_main()
-    calls CloseScreen in the reverse order: GPU screens first starting with
-    the last one and then working backwards, and then protocol screens also
-    in reverse order.
+    Check for the need to byte-swap when attempting to display
+    GL apps between a big-endian server and little-endian client
+    or vice versa.
     
-    InitOutput() calls ScreenInit in the wrong order: for GPU screens first and then
-    for protocol screens. This causes a problem for drivers that have global state
-    that is tied to the first screen that calls ScreenInit.
+    Fixes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1127
+
+commit bcb1de600a7656e4ee6434a8d2e2772ca9fd0473
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Thu Apr 22 11:47:29 2021 -0400
+
+    glx: Fix error return code in GLXGetDrawableAttributes
     
-    Fix this by simply re-ordering the for loops to call PreInit for
-    protocol screens first and then for GPU screens second.
+    This should only ever throw GLXBadDrawable, says the protocol spec.
+
+commit eb6f8daca5dc15af321d0bcc54cd6cb8b6779257
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Sun May 30 13:26:48 2021 +0300
+
+    Xi: Work around broken libxcb that doesn't ignore unknown device classes
+    
+    libxcb 14.1 and older are not forwards-compatible with new device
+    classes as it does not properly ignore unknown device classes. Since
+    breaking libxcb would break quite a lot of applications, we instead
+    report Gesture device class only if the client advertised support for XI
+    2.4.
+    
+    Clients may still not work in cases when a client advertises XI 2.4
+    support and then a completely separate module within the client uses
+    broken libxcb to call XIQueryDevice.
     
-    (cherry picked from commit e5e9a8ca91d1c087edd8788a110251ad940dbc94)
+    Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
 
-commit 325f694e97a117aec47aa2e1a9b2b28c3c47994e
-Author: Alex Goins <agoins@nvidia.com>
-Date:   Tue Sep 17 18:36:35 2019 -0500
+commit 7e692633fb9ab8e1ed2a88c3abb4fe04144c0a80
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Sun May 30 13:26:47 2021 +0300
 
-    modesetting: Implement ms_covering_randr_crtc() for ms_present_get_crtc()
+    Xi: Implement gesture support for XIQueryDevice
+
+commit 0886254f96f40e59193ccbb0e3acbd5ae92dbaa3
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Sun May 30 13:26:46 2021 +0300
+
+    xfree86: Bump input minor ABI due to addition touchpad gestures
     
-    ms_present_get_crtc() returns an RRCrtcPtr, but derives it from a xf86CrtcPtr
-    found via ms_dri2_crtc_covering_drawable()=>ms_covering_crtc(). As a result, it
-    depends on all associated DIX ScreenRecs having an xf86CrtcConfigPtr DDX
-    private.
+    Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
+
+commit 1cdc3b5d146818993c5a9436d17e1d0888054c38
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Sun May 30 13:26:45 2021 +0300
+
+    xfree86: Implement gesture support for test input driver
+
+commit dccc0275f4f3740cc625fb60ab1d014d6ec10709
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Sun May 30 13:26:44 2021 +0300
+
+    Bump XI protocol version to 2.4
+
+commit 75feb1366809bfb6d50734c10ab11258783a2e9d
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Sun May 30 13:26:43 2021 +0300
+
+    Xi: Include gestures among events that may freeze device
+
+commit 5163fc8bc28ce8bc2703cddcd9f2775ebc311766
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Sun May 30 13:26:42 2021 +0300
+
+    Implement gesture processing logic
+
+commit d3c52df16105de5ac37e196a49b173e426caf417
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Sun May 30 13:26:41 2021 +0300
+
+    hw/xfree86: Implement public APIs to submit gesture events
+
+commit 100a2ad6da4ba90f8d489c7a2ed3f3f0ac879a6f
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Sun May 30 13:26:40 2021 +0300
+
+    dix: Implement gesture event submission code path
+
+commit 7656a9c8dddbc57adfd4fd05f8e26b1845ac8738
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Sun May 30 13:26:39 2021 +0300
+
+    dix: Implement internal gesture state handling
+
+commit 0bf4123fd3bc945d150884e6ea38bd2b81c0994b
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Sun May 30 13:26:38 2021 +0300
+
+    dix: Implement gesture event fixups before delivery
+
+commit 227f601de31aabf6aaa897477e42e6b7f8f7c963
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Sun May 30 13:26:37 2021 +0300
+
+    xi: Implement conversions from internal to Xi2 gesture event structs
+
+commit f3462178caf09a8777b8671eb03949b75c8ee07a
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Sun May 30 13:26:36 2021 +0300
+
+    test/xi2: Verify that XI_GestureSwipeEnd is ignored when outside mask
+
+commit 407a2234b32d9cb3fed2cc7e8069bb41b98e143f
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Sun May 30 13:26:35 2021 +0300
+
+    test/xi2: Update tests for gesture event types
+
+commit f83f7dbb1c1be406b82da9bca12be3c43d6bfeee
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Sun May 30 13:26:34 2021 +0300
+
+    xi: Bump max supported XI2 event type
+
+commit 81909546397eb180ed8983bdb80f5673dbae71ac
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Sun May 30 13:26:33 2021 +0300
+
+    xi: Implement selection logic for gesture event types
+
+commit 080bac39c844bd16b7e1493797c6e7644badf0ab
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Sun May 30 13:26:32 2021 +0300
+
+    xi: Implement grab support for new gesture event types
+
+commit b544a1fdb8fa7e7efc7dde66089e901d957061d9
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Sun May 30 13:26:31 2021 +0300
+
+    xi: Implement internal gesture event struct
+
+commit 22fa31ed561ed1e78bf3651f28e11882b1eac51f
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Sun May 30 13:26:30 2021 +0300
+
+    dix: Add new internal event enums for gesture events
+
+commit 8e504d8b36eb8f23bf8cfa46143d046cc6b8ea51
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Sun May 30 13:26:29 2021 +0300
+
+    meson: Depend on inputproto 2.3.99.1
     
-    Some DIX ScreenRecs don't have an xf86CrtcConfigPtr DDX private, but do have an
-    rrScrPrivPtr DDX private. Given that we can derive all of the information we
-    need from RandR, we can support these screens by avoiding the use of xf86Crtc.
-    This change implements an RandR-based path for ms_present_get_crtc(), allowing
-    drawables to successfully fall back to syncing to the primary output, even if
-    the slave doesn't have an xf86CrtcConfigPtr DDX private.
+    Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
+
+commit 2acde60147797393e0ee9428cff0f74cdc0a9227
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Sun May 30 13:26:28 2021 +0300
+
+    .gitlab-ci: Install xorgproto 2021.4.99.2 from git
     
-    Without this change, if a slave doesn't have an xf86CrtcConfigPtr DDX private,
-    drawables will fall back to 1 FPS if they overlap an output on that slave.
+    This is required for the support of upcoming XI 2.4 protocol.
     
-    Signed-off-by: Alex Goins <agoins@nvidia.com>
-    (cherry picked from commit 562c7888be538c4d043ec1f374a9d9afa0b305a4)
+    Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
 
-commit aa43dce15f69624ce939bb69bafc3df5a9b78dbb
-Author: Alex Goins <agoins@nvidia.com>
-Date:   Tue Sep 17 18:03:34 2019 -0500
+commit 236d1775509404b0dcf44873422dd8652b1e9588
+Author: Claes Nästén <pekdon@gmail.com>
+Date:   Fri May 14 13:57:10 2021 +0000
 
-    modesetting: Fix ms_covering_crtc() segfault with non-xf86Crtc slave
+    os: include unistd.h when HAVE_PSTACK is defined
     
-    DIX ScreenRecs don't necessarily have an xf86CrtcConfigPtr DDX private.
-    ms_covering_crtc() assumes that they do, which can result in a segfault.
+    On Solaris when HAVE_PSTACK is defined unistd.h needs to be included to
+    avoid implicit declarations of pipe, read, execle etc.
+
+commit 7515c23a416825f0db51f9b445279b12d5918ebf
+Author: Erik Kurzinger <ekurzinger@nvidia.com>
+Date:   Tue May 11 17:00:21 2021 -0400
+
+    xwayland/eglstream: flush stream after eglSwapBuffers
     
-    Update ms_covering_crtc() to check the XF86_CRTC_CONFIG_PTR() returned pointer
-    before dereferencing it. This will still mean that ms_covering_crtc() can't fall
-    back to the primary output when a drawable overlaps a slave output (going to the
-    1 FPS default instead), but it won't segfault.
+    When eglSwapBuffers inserts a new frame into a window's stream, there may be a
+    delay before the state of the consumer end of the stream is updated to reflect
+    this. If the subsequent wl_surface_attach, wl_surface_damage, wl_surface_commit
+    calls are received by the compositor before then, it will (typically) re-use
+    the previous frame acquired from the stream instead of the latest one.
     
-    Signed-off-by: Alex Goins <agoins@nvidia.com>
-    (cherry picked from commit 797e7a0ceb673fe2870c673e248835526a84d000)
+    This can leave the window displaying out-of-date contents, which might never be
+    updated thereafter.
+    
+    To fix this, after calling eglSwapBuffers, xwl_glamor_eglstream_post_damage
+    should call eglStreamFlushNV. This call will block until it can be guaranteed
+    that the state of the consumer end of the stream has been updated to reflect
+    that a new frame is available.
+    
+    Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1171
+    
+    Signed-off-by: Erik Kurzinger <ekurzinger@nvidia.com>
 
-commit 341a4787157c68597951727d5d11a2813a31ec7e
-Author: Alex Goins <agoins@nvidia.com>
-Date:   Wed Aug 28 18:24:16 2019 -0500
+commit f3eb1684fa5008ad7c881f798a5efb7441b23035
+Author: Simon Ser <contact@emersion.fr>
+Date:   Mon Apr 19 22:49:56 2021 +0200
 
-    modesetting: Fix ms_covering_crtc() segfault with non-modesetting slave primary
+    xwayland: enable MIT-SHM shared pixmaps
     
-    ms_covering_crtc() uses RRFirstOutput() to determine a primary output to fall
-    back to if a drawable is overlapping a slave output.
+    Allow X11 clients to create shared pixmaps via the MIT-SHM
+    extension under Xwayland. Tested with a wlroots patch [1].
     
-    If the primary output is a slave output, RRFirstOutput() will return a slave
-    output even if passed a master ScreenPtr. ms_covering_crtc() dereferences the
-    output's devPrivate, which is invalid for non-modesetting outputs, and can
-    crash.
+    Also add a few assertions to make sure we have wl_buffers where we
+    need them.
     
-    Changing RRFirstOutput() could have unintended side effects for other callers,
-    so this change replaces the call to RRFirstOutput() with ms_first_output().
-    ms_first_output() ignores the primary output if it doesn't match the given
-    ScreenPtr, choosing the first connected output instead.
+    [1]: https://github.com/swaywm/wlroots/pull/2875
     
-    Signed-off-by: Alex Goins <agoins@nvidia.com>
-    (cherry picked from commit 3ef9029ace4245d9f8929aa71e22bc6a6f40b7b3)
+    Signed-off-by: Simon Ser <contact@emersion.fr>
+    Acked-by: Michel Dänzer <mdaenzer@redhat.com>
 
-commit 2dd9dfc8d9a5dc906ee06d667a756ab267f55e64
-Author: Alex Goins <agoins@nvidia.com>
-Date:   Wed Sep 4 12:25:31 2019 -0500
+commit 3d33d885fcd1215a74c1819278cf6f9557c9860b
+Author: Erik Kurzinger <ekurzinger@nvidia.com>
+Date:   Fri May 14 08:26:49 2021 -0400
 
-    randr: Fix RRCrtcDetachScanoutPixmap() segfault during server teardown
+    xwayland/eglstream: allow commits to dma-buf backed pixmaps
     
-    During server teardown, mrootdraw is NULL, which can cause segfaults if
-    master->Stop{,Flipping}PixmapTracking() don't do NULL checking. In this case we
-    shouldn't need to do master->Stop{,Flipping}PixmapTracking() anyway, so just
-    skip it.
+    As of commit 098e0f52 xwl_glamor_eglstream_allow_commits will not allow commits
+    if the xwl_pixmap does not have an EGLSurface. This is valid for pixmaps backed
+    by an EGLStream, however pixmaps backed by a dma-buf for OpenGL or Vulkan
+    rendering will never have an EGLSurface.  Unlike EGLStream backed pixmaps,
+    though, glamor will render directly to the buffer that Xwayland passes to the
+    compositor. Hence, they don't require the intermediate copy in
+    xwl_glamor_eglstream_post_damage that EGLStream backed pixmaps do, so there is
+    no need for an EGLSurface.
     
-    Signed-off-by: Alex Goins <agoins@nvidia.com>
-    (cherry picked from commit c82f814313a813d7e1a2d7d3b1f7561810446b34)
+    Signed-off-by: Erik Kurzinger <ekurzinger@nvidia.com>
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
 
-commit 642c1f83b9ed2452ceb20457a4423a8f52a7a8c4
-Author: Hans de Goede <hdegoede@redhat.com>
-Date:   Mon Nov 4 20:03:17 2019 +0100
+commit 012350e3db47fef0404346f55968032e62004fcf
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Fri Apr 30 16:23:10 2021 +0200
 
-    glamor/xwayland: Define EGL_NO_X11
+    xwayland/eglstream: Set ALU to GXCopy for blitting
     
-    Define EGL_NO_X11 everywhere were we also define MESA_EGL_NO_X11_HEADERS,
-    EGL_NO_X11 is the MESA_EGL_NO_X11_HEADERS equivalent for the egl headers
-    shipped with libglvnd.
+    The EGLstream backend's post damage function uses a shader and
+    glDrawArrays() to copy the data from the glamor's pixmap texture prior
+    to do the eglSwapBuffers().
     
-    This fixes the xserver not building with the libglvnd-1.2.0 headers:
+    However, glDrawArrays() can be affected by the GL state, and therefore
+    not reliably produce the expected copy, causing the content of the
+    buffer to be corrupted.
     
-    In file included from /usr/include/EGL/eglplatform.h:128,
-                     from /usr/include/epoxy/egl_generated.h:11,
-                     from /usr/include/epoxy/egl.h:46,
-                     from glamor_priv.h:43,
+    Make sure to set the ALU to GXCopy prior to call glDrawArrays() to get
+    the expected result.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Suggested-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit d85bfa6ab7495281516f3a4b05dc1ff0b2c4bf91
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Tue May 4 10:56:38 2021 +0200
+
+    xwayland/eglstream: Do not always increment pixmap refcnt on commit
+    
+    Currently, the EGLstream backend would increment the pixmap refcount for
+    each commit, and decrease that refcount on the wl_buffer release
+    callback.
+    
+    But that's relying on the compositor sending us a release callback for
+    each commit, otherwise the pixmap refcount will keep increasing and the
+    pixmap will be leaked.
+    
+    So instead, increment the refcount on the pixmap only when we have not
+    received a release notification for the wl_buffer, to avoid increasing
+    the pixmap refcount more than once without a corresponding release
+    event.
+    
+    This way, if the pixmap is still in use when released on the X11 side,
+    the EGL stream will be kept until the compositor releases it.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Suggested-by: Michel Dänzer <mdaenzer@redhat.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit b583395cd38ad101c7541bd8b0e91143ced44703
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Fri Apr 30 09:02:29 2021 +0200
+
+    xwayland/eglstream: Check eglSwapBuffers()
+    
+    EGLstream's post_damage() would unconditionally return success
+    regardless of the actual status of the eglSwapBuffers().
+    
+    Yet, if eglSwapBuffers() fails, we should not post the corresponding
+    damage as they wouldn't match the actual content of the buffer.
+    
+    Use the eglSwapBuffers() return value as the return value for
+    post_damage() and do not take a refrence on the pixmap if it fails.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit a45799971083c47082d085d3732a5b12692cf75b
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Mon Apr 19 14:52:38 2021 +0200
+
+    xwayland/eglstream: Fix calloc/malloc
+    
+    Use calloc() instead of malloc() like the rest of the code.
+    
+    Also fix the arguments of calloc() calls to match the definition which
+    is calloc(size_t nmemb, size_t size).
+    
+    This is a cleanup patch, no functional change.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit 098e0f52c088c6eb52c7e54c5a11cefabd480908
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Mon Apr 19 18:11:19 2021 +0200
+
+    xwayland/eglstream: Do not commit without surface
+    
+    The EGL surface for the xwl_pixmap is created once the stream is ready
+    and valid.
+    
+    If the pixmap's EGL surface fails, for whatever reason, the xwl_pixmap
+    will be unusable and will end up as an invalid wl_buffer.
+    
+    Make sure we do not allow commits in that case and recreate the
+    xwl_pixmap/stream.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+    https://gitlab.freedesktop.org/xorg/xserver/-/issues/1156
+
+commit bee2ebb29f0999862ab39af26c673c00af40b082
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Tue Apr 27 14:17:19 2021 +0200
+
+    xwayland/eglstream: Drop the list of pending streams
+    
+    Now that the pending stream is associated with the xwl_pixmap for
+    EGLStream and the xwl_pixmap itself is associated to the pixmap, we have
+    a reliable way to get to those data from any pending stream.
+    
+    As a result, the list of pending streams that we keep in the EGLStream
+    global structure becomes useless.
+    
+    So we can drop the pending stream's xwl_pixmap and also the list of
+    pending streams altogether, and save us a walk though that list for each
+    callback.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Suggested-by: Michel Dänzer <mdaenzer@redhat.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit e19bf86c17ef9c802fea24410cc6b1f51a19ce7f
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Wed Apr 14 17:31:08 2021 +0200
+
+    xwayland/eglstream: Keep a reference to the pixmap
+    
+    Commit affc47452 - "xwayland: Drop the separate refcount for the
+    xwl_pixmap" removed the separate reference counter for the xwl_pixmap
+    which holds the EGLStream.
+    
+    While that works fine for the common case, if the window's pixmap is
+    changed before the stream is ready, the older pixmap will be destroyed
+    and the xwl_pixmap along with it, even if the compositor is still using
+    the stream.
+    
+    The code that was removed with commit affc47452 was taking care of that
+    by increasing the separate reference counter for the xwl_pixmap, but it
+    no longer the case.
+    
+    As a result, we may end up with the EGL stream in the wrong state when
+    trying to use it, which will cascade down into all sort of issues.
+    
+    To avoid the problem, increase the reference count on the pixmap when it
+    is marked as invalid in EGLStream's SetWindowPixmap().
+    
+    This way, the xwl_pixmap and the EGLStream are kept until released by
+    the compositor, even when the pixmap changes before stream is ready.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+    Fixes: affc47452 xwayland: Drop the separate refcount for the xwl_pixmap
+    https://gitlab.freedesktop.org/xorg/xserver/-/issues/1156
+
+commit cb61ecc7291cfbed2f76d4437cd7450b8e4dab00
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Fri Apr 16 10:38:23 2021 +0200
+
+    xwayland/eglstream: Dissociate pending stream from window
+    
+    Previously, we would have pending streams associated with top level X11
+    windows, keeping temporary accounting for the pending streams before
+    they get fully initialized for the xwl_pixmap which would be associated
+    with X11 pixmaps.
+    
+    If the window content changes before the stream is ready, the
+    corresponding pending stream would be marked as invalid and the pending
+    stream would be eventually removed once the stream becomes ready.
+    
+    Since commit affc47452 - "xwayland: Drop the separate refcount for the
+    xwl_pixmap", we no longer keep a separate reference counter for the
+    xwl_pixmap, but rather tie it to the X11 pixmap lifespan. Yet, the
+    pending stream would still be associated with the X11 toplevel window.
+    
+    Dissociate the pending streams from the X11 toplevel window, to keep it
+    tied only to the xwl_pixmap so that we can have:
+    
+     - pixmap <-> xwl_pixmap
+     - xwl_pixmap <-> pending stream
+    
+    Of course, the pending streams remain temporary and get removed as soon
+    as the ready callback is triggered, but the pending streams are not
+    linked to the X11 window anymore which can change their content, and
+    therefore their X11 pixmap at any time.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+    https://gitlab.freedesktop.org/xorg/xserver/-/issues/1156
+
+commit cc596bcfb273eeab82ac3d59867668af8bad2abf
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Thu Apr 1 08:46:52 2021 +0200
+
+    xwayland/eglstream: Add more error checking
+    
+    eglCreateStreamKHR() can fail and return EGL_NO_STREAM_KHR, in which
+    case there is no point in trying to create a buffer from it.
+    
+    Similarly, eglCreateStreamProducerSurfaceKHR() also fail and return
+    EGL_NO_SURFACE, which in turn will be used in eglMakeCurrent() as
+    draw/read surface, and therefore would mean no draw/read buffer.
+    
+    In those cases, log the error, and bail out early. That won't solve the
+    issue but will help with investigating the root cause of issues with
+    EGLStream backend.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+    https://gitlab.freedesktop.org/xorg/xserver/-/issues/1156
+
+commit 823f3254fabd16e5e721da57cd260beac9b8f8bd
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Thu Apr 15 10:59:36 2021 +0200
+
+    xwayland/eglstream: Small refactoring
+    
+    Some functions are called "callback" whereas they are not longer
+    callback functions or "unref" while they no longer deal with a reference
+    counter anymore, which is quite confusing. Rename those functions to be
+    more explicit.
+    
+    Also, the pending streams can be destroyed in different places, move the
+    common code to separate function to avoid duplicating code and help with
+    readability of the code.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Acked-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit 85244d2a2081d61a2e4a06e847041f638de01e3f
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Wed Mar 31 09:49:35 2021 +0200
+
+    xwayland/eglstream: Check framebuffer status
+    
+    The EGLStream backend would sometime generate GL errors trying to draw
+    to the framebuffer, which gives an invalid buffer, which in turn would
+    generate a Wayland error from the compositor which is fatal to the
+    client.
+    
+    Check the framebuffer status and bail out early if it's not complete,
+    to avoid getting into trouble later.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+    https://gitlab.freedesktop.org/xorg/xserver/-/issues/1156
+
+commit 252cbad316f43edc08aa5c844789398a58ba270c
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Wed Mar 31 13:57:45 2021 +0200
+
+    xwayland/glamor: Add return status to post_damage
+    
+    If the glamor backend failed to post damage, the caller should do the
+    same to avoid a failure to attach the buffer to the Wayland surface.
+    
+    Change the API of Xwayland's glamor backend post_damage() to return a
+    status so that xwl_window_post_damage() can tell whether the callee
+    failed.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+    https://gitlab.freedesktop.org/xorg/xserver/-/issues/1156
+
+commit 3b265c59a6456f6e4abfb9e1694237bc56f1776a
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Tue Mar 30 08:48:25 2021 +0200
+
+    glamor: Dump backtrace on GL error
+    
+    Currrently, when a GL error is triggered, glamor would log the error
+    which may not be sufficient to trace it back to the cause of the error.
+    
+    Also dump the backtrace which may give more information as to where the
+    error comes from.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Martin Peres <martin.peres@mupuf.org>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+    https://gitlab.freedesktop.org/xorg/xserver/-/issues/1156
+
+commit 25d2f4948f0abd39e099b8ac69b7cb1dab38a10a
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Mon Mar 29 15:01:15 2021 +0200
+
+    xwayland: Check buffer prior to attaching it
+    
+    If the buffer is NULL, do not even try to attach it, and risk a Wayland
+    protocol error which would be fatal to us.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Martin Peres <martin.peres@mupuf.org>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+    https://gitlab.freedesktop.org/xorg/xserver/-/issues/1156
+
+commit 4f0889e98306d30a37aba0fadb1fd3790c13205a
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Mon Mar 29 14:22:56 2021 +0200
+
+    xwayland/eglstream: Check buffer creation
+    
+    EGLStream wl_eglstream_display_create_stream() may fail, yet Xwayland
+    would try to attach the buffer which may cause a fatal Wayland protocol
+    error raised by the compositor.
+    
+    Check if the buffer creation worked, and fail gracefully otherwise (like
+    wayland-eglsurface does).
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Martin Peres <martin.peres@mupuf.org>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+    https://gitlab.freedesktop.org/xorg/xserver/-/issues/1156
+
+commit 4f6fbd5009ae533cf0b3bbe382502254f9276a01
+Author: Erik Kurzinger <ekurzinger@nvidia.com>
+Date:   Tue Apr 27 07:23:44 2021 -0400
+
+    xwayland-eglstream: fix X11 rendering to flipping GL / VK window
+    
+    If a window is being used for direct rendering with OpenGL or Vulkan, and is
+    using the flipping path for presentation, it's pixmap will be set to a dma-buf
+    backed pixmap created by the client-side GL driver. However, this means that
+    xwl_glamor_eglstream_post_damage won't work since it requires that the pixmap
+    has an EGLSurface that it can render to, which dma-buf backed pixmaps do not.
+    
+    In this case, though, xwl_glamor_eglstream_post_damage is not necessary since
+    glamor will have rendered directly to the pixmap, so we can simply pass it
+    directly to the compositor. There's no need for the intermediate copy we
+    normally do in that function.
+    
+    Therefore, this change adds an early-return case to post_damage for dma-buf
+    backed pixmaps, and removes the corresponding asserts from that function and
+    allow_commits.
+    
+    Signed-off-by: Erik Kurzinger <ekurzinger@nvidia.com>
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit a50a0e348542bf32fb4239ee05a485772837f2f3
+Author: qarmin <mikrutrafal54@gmail.com>
+Date:   Tue Apr 28 22:05:02 2020 +0200
+
+    glxcmds: Fix possible out of bounds
+
+commit 3ea46f9336693d713ab63f422fffce42f9060a2c
+Author: Mazlan, Hazwan Arif <hazwan.arif.mazlan@intel.com>
+Date:   Thu Jul 30 10:12:27 2020 +0800
+
+    dri2: Sync i965_pci_ids.h from mesa iris_pci_ids.h
+    
+    Copied TGL PCI ID from MESA iris_pci_ids.h
+    This update brings in a significant number of new platform ID's
+    Sync up until commit f02ae698
+    
+    Signed-off-by: Mazlan, Hazwan Arif <hazwan.arif.mazlan@intel.com>
+
+commit d3933a24d1abdcb56f45e6076cb84a1110674a8a
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Tue Apr 23 17:59:29 2019 +0100
+
+    CI: Add an x86 MinGW-w64 cross build
+    
+    Only cross-build for x86 MinGW-w64, as x64 MinGW-w64 will probably
+    require fixing LLP64 issues.
+    
+    I don't know any source for pre-built cross-dependencies of the X
+    server, so build these from git.
+    
+    Don't build with GLX enabled, so I don't have to deal with
+    cross-building mesa and it's dependencies, for the moment.
+
+commit 7e142cb2a848acb6af986fa91d254d4c23963b24
+Author: luporl <luporl@FreeBSD.org>
+Date:   Wed Dec 9 11:11:15 2020 -0300
+
+    xserver: fix RGB mask handling
+    
+    On FreeBSD 13.0-CURRENT for PowerPC64 big-endian (BE), X was
+    crashing in some cases. For instance, when twm was started
+    and the background was clicked to open its menu, X crashed
+    with a segmentation fault, trying to dereference a null pointer
+    at CreatePicture().
+    
+    There were 2 issues with xorg-server handling of RGB masks that
+    caused the pointer above to be null and thus the crash:
+    - wrong use of ffs() to get the RGB offsets from the masks
+    - overflow when shifting a 16-bit integer
+    
+    This change fixes both issues. They happen when the system is BE
+    but has a video adapter using a little-endian (LE) ARGB32
+    framebuffer. In order to display the correct colors, this setup
+    requires a BE RGBA32 color format to be used by X, by setting
+    the RGB masks appropriately, that didn't work properly because of
+    the issues above.
+
+commit 5be3b80b8d084ca5721be8791910d5827d1b6014
+Author: Łukasz Spintzyk <lukasz.spintzyk@synaptics.com>
+Date:   Fri Sep 18 14:32:01 2020 +0200
+
+    modesetting: Remove few common functions from ms namespace
+    
+    A lot of that code is the same as in xf86-amdgpu and xf86-nouveau drivers. By removing that functions from
+    ms namespace we can move that code to common implementation.
+    
+    Signed-off-by: Łukasz Spintzyk <lukasz.spintzyk@synaptics.com>
+
+commit c282be503e267afdd050df837d4cf61e0e7287b7
+Author: Łukasz Spintzyk <lukasz.spintzyk@synaptics.com>
+Date:   Fri Sep 18 14:31:53 2020 +0200
+
+    modesetting: remove unnecessary ms_covering_xf86_crtc dup of ms_covering_randr_crtc
+    
+    Signed-off-by: Łukasz Spintzyk <lukasz.spintzyk@synaptics.com>
+
+commit b923364c5ec8251e81b4aa5fd451d9d7bb038009
+Author: Łukasz Spintzyk <lukasz.spintzyk@synaptics.com>
+Date:   Fri Sep 18 14:31:47 2020 +0200
+
+    modesetting: Find crtc on secondary outputs as fallback instead of returning primary crtc
+    
+    Signed-off-by: Łukasz Spintzyk <lukasz.spintzyk@synaptics.com>
+
+commit d2dce22b6775c772282ac2c0e224ef9685ab34fa
+Author: Łukasz Spintzyk <lukasz.spintzyk@synaptics.com>
+Date:   Fri Sep 18 14:31:34 2020 +0200
+
+    present: fix msc offset calculation in screen mode
+    
+    Instead of getting the current msc value from the window crtc,
+    which not exist take the last saved msc value saved in
+    the window_priv struct
+    
+    Signed-off-by: Łukasz Spintzyk <lukasz.spintzyk@synaptics.com>
+
+commit 908deb0895f9fe345d70be933d251ea10511d30a
+Author: Łukasz Spintzyk <lukasz.spintzyk@synaptics.com>
+Date:   Fri Sep 18 14:31:25 2020 +0200
+
+    present: Use crtc's screen present operation for syncing
+    
+    Signed-off-by: Łukasz Spintzyk <lukasz.spintzyk@synaptics.com>
+
+commit d03c0de77ba36bb5221d00ac84dcdd6aae0df453
+Author: Łukasz Spintzyk <lukasz.spintzyk@synaptics.com>
+Date:   Fri Sep 18 14:29:25 2020 +0200
+
+    modesetting: Initialize present extension despite glamor is disabled
+    
+    Signed-off-by: Łukasz Spintzyk <lukasz.spintzyk@synaptics.com>
+
+commit 7aaf54a1884f71dc363f0b884e57bcb67407a6cd
+Author: Matthieu Herrb <matthieu@herrb.eu>
+Date:   Sun Mar 21 18:38:57 2021 +0100
+
+    Fix XChangeFeedbackControl() request underflow
+    
+    CVE-2021-3472 / ZDI-CAN-1259
+    
+    This vulnerability was discovered by:
+    Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
+    
+    Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
+
+commit 66ce61983db0a067e48143750c4d5557d5638b1c
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Thu Mar 18 09:59:17 2021 +1000
+
+    xkb: silence a compiler warning
+    
+    xkb.c: In function ‘ProcXkbSetMap’:
+    xkb.c:2747:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
+     2747 |     DeviceIntPtr master = GetMaster(dev, MASTER_KEYBOARD);
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit f6b8f8c071a575e54645aeb0bd3cb37377b0e4d3
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Thu Mar 18 09:44:53 2021 +1000
+
+    xkb: don't require a trailing slash for the XKM output dir
+    
+    Rework the function to use a single snprintf call instead of a mix of
+    strcpy/strcats. This now also appends a trailing slash where needed so we
+    don't rely on the build system to set this for us.
+    
+    Also, since /tmp/ is the fallback and we never check if everything succeeded,
+    assert if we can't use /tmp/. This will never be triggered anyway, the only
+    caller to OutputDirectory() uses sizeof(PATH_MAX-sized array).
+    
+    Follow-up from 6c51818a0f55282cbe5a870f58ca82ca45ee472d
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit eceafd4a2d159f5c2b789ad77ee283c2aa848a59
+Author: Jan Beich <jbeich@FreeBSD.org>
+Date:   Fri Apr 9 14:44:13 2021 +0000
+
+    meson: switch getpeer* checks to autotools style
+    
+    Checking for function "getpeereid" : YES
+    Checking for function "getpeerucred" : NO
+    [...]
+    include/meson.build:182:7: ERROR: Argument to "not" is not a boolean.
+    
+    Fixes: 68c2cfadd6d3 ("meson: Make sure defines are either set to 1 or not defined")
+
+commit 9f8421af637942e5d9963828f4ce55f456410603
+Author: Jan Beich <jbeich@FreeBSD.org>
+Date:   Fri Apr 9 15:22:22 2021 +0000
+
+    meson: check pthread_setname_np like autotools
+    
+    FreeBSD < 12.2 and OpenBSD only have pthread_set_name_np.
+    As libpthread isn't in scope use -Werror to trip the check.
+    
+    Header <pthread.h> has symbol "PTHREAD_MUTEX_RECURSIVE" : YES
+    Checking if "pthread_setname_np(tid, name)" compiles: YES
+    
+    os/inputthread.c:326:5: error: implicit declaration of function 'pthread_setname_np' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
+        pthread_setname_np (pthread_self(), "InputThread");
+        ^
+    os/inputthread.c:447:5: error: implicit declaration of function 'pthread_setname_np' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
+        pthread_setname_np (pthread_self(), "MainThread");
+        ^
+    
+    Fixes: c20e7b5e2222 ("meson: Automatically detect HAVE_PTHREAD_SETNAME_NP")
+
+commit 38e875904b039ec1889e7c81eb1d577a4f69b26d
+Author: Erik Kurzinger <ekurzinger@nvidia.com>
+Date:   Thu Dec 3 14:57:51 2020 -0800
+
+    xwayland: implement pixmap_from_buffers for the eglstream backend
+    
+    Provides an implementation for the pixmap_from_buffers DRI3 function for
+    xwayland's eglstream backend. This will be used by the NVIDIA GLX driver
+    to pass buffers from client applications to the server. These can then
+    be presented using the PRESENT extension.
+    
+    To hopefully make this less error-prone, we also introduce a "type"
+    field for this struct to distinguish between xwl_pixmaps for the new
+    DRI3-created pixmaps and those for the existing glamor-created pixmaps.
+    
+    Additionally, the patch enables wnmd present mode with the eglstream backend.
+    This involves creating a wl_buffer for the provided dma-buf before importing it
+    into EGL and passing this to the compositor so it can be scanned out directly
+    if possible.
+    
+    Since both backends now support this present mode, the HAS_PRESENT_FLIP flag is
+    no longer needed, so it can be removed.
+    
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
+    Signed-off-by: Erik Kurzinger <ekurzinger@nvidia.com>
+
+commit bc99dd2127f12f1aae55971c09a2792eeaa98444
+Author: Erik Kurzinger <ekurzinger@nvidia.com>
+Date:   Wed Mar 3 11:56:41 2021 +0100
+
+    xwayland: Add check_flip() glamor backend function
+    
+    This is preliminary work for hardware accelerated rendering with the
+    NVIDIA driver.
+    
+    This exposes a new glamor backend function, check_flip, which can be
+    used to control whether flipping is supported for the given pixmap.
+    
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
+    Signed-off-by: Erik Kurzinger <ekurzinger@nvidia.com>
+
+commit 400d4d0fdd55192f394e1a8273dfb2423c895ec0
+Author: Erik Kurzinger <ekurzinger@nvidia.com>
+Date:   Fri Feb 12 12:09:27 2021 -0800
+
+    xwayland: move formats and modifiers functions to common glamor code
+    
+    This is preliminary work for hardware accelerated rendering with the
+    NVIDIA driver.
+    
+    This moves the modifiers and formats functions previously only available
+    to the GBM backend to the common glamor code so that it can be used by
+    both the GBM and EGLStream backends.
+    
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
+    Signed-off-by: Erik Kurzinger <ekurzinger@nvidia.com>
+
+commit ae225417c0a0828ffb24e11eb4b968c34692e25a
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Wed Mar 3 09:55:12 2021 +0100
+
+    xwayland: Move dmabuf interface to common glamor code
+    
+    This is preliminary work for hardware accelerated rendering with the
+    NVIDIA driver.
+    
+    The EGLStream backend can possibly also use the dmabuf interface, so
+    move the relevant code from the GBM specific source to the common bits.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+
+commit d231ce2d9ce9644e77e8dbe8c5a23eeb11e85b55
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Wed Apr 7 22:16:43 2021 +0300
+
+    meson: Disable LTO for tests
+    
+    `-flto=auto` together with `-Wl,-wrap` causes link errors at least in
+    certain compilers (e.g. GCC 10.2.0). Since this is reoccurring issue
+    (internet search shows similar problems with GCC 4.6 a decade ago) let's
+    disable LTO for tests even if it's disabled elsewhere.
+    
+    Fixes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1116
+    Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
+
+commit 68c2cfadd6d31f0787bc35dbafe32d7dfd638e27
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Mon Apr 5 16:24:47 2021 +0300
+
+    meson: Make sure defines are either set to 1 or not defined
+    
+    This will make the behavior of meson consistent with autotools. The
+    configuration macros are exposed to public headers so any inconsistency
+    is likely to break code for anyone who's not careful to use #ifdef
+    instead of #if.
+    
+    Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
+
+commit faff5bbdf5dec53101a9d8f624f45262016154c1
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Mon Apr 5 16:24:46 2021 +0300
+
+    meson: Sync the name of INPUTTHREAD conf macro with autotools build
+    
+    The rest of dix code uses INPUTTHREAD, so having a different name in
+    meson configuration was an oversight.
+    
+    Fixes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/936
+    
+    Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
+
+commit b25795462f4754ec2e3c677a41dea33ed1be79da
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Mon Apr 5 16:24:48 2021 +0300
+
+    meson: Add missing pthread dependency for libxserver_os library
+    
+    Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
+
+commit 9582ef4efc72afa9f84b6469b5f81ce5dd8eb15d
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Mon Apr 5 16:24:45 2021 +0300
+
+    meson: Fix typo in libxserver_os dependencies for openbsd
+    
+    This has not been tested, but os_deps is not used anywhere in the file,
+    so it's likely this was a typo.
+    
+    Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
+
+commit 689496ed657ef055869f5eda7e09ff35edff30cc
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Wed Apr 7 21:55:03 2021 +0300
+
+    meson: Switch project version to 20.x.y style
+
+commit 2df55813d0f553050ff06065a67e90f678db593a
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Wed Apr 7 21:55:02 2021 +0300
+
+    meson: Drop version subpatch handling
+
+commit 5d3679104aaeabac585894606ad317b433b65238
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Wed Apr 7 21:55:01 2021 +0300
+
+    meson.build: Keep the protocol version looking like xserver 1.20.x did
+    
+    This effectively changes the versioning to be as if xserver 21.0 was
+    xserver 1.21.0. This should keep any client-side version checks that
+    know about the Xorg 7.0 -> xserver 1.0 epoch from getting confused.
+
+commit 3e4e70db10a4b2d531ccd649c18317ea2a49d256
+Author: George Matsumura <gmmatsumura01@bvsd.org>
+Date:   Wed Apr 7 17:28:46 2021 -0600
+
+    meson: Fix DragonFly BSD identifier in meson build files
+    
+    This changes the operating system identifier tested against
+    host_machine.system() in meson build files from "dragonflybsd"
+    to the officially stable "dragonfly".
+    
+    Signed-off-by: George Matsumura <gmmatsumura01@bvsd.org>
+
+commit 199f278a1b7570b1cb6e24b8bedb4d721b3c9938
+Author: Edouard Gaulué <edouard@e-gaulue.com>
+Date:   Tue Mar 16 20:59:17 2021 +0100
+
+    French text in Preferences Pane Review
+
+commit 65b27d82f2c6c3eecbc7370765ee7c036b245b2f
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Sun Apr 4 16:10:28 2021 -0700
+
+    xquartz: Call PseudoramiXExtensionInit() through InitOutput() just like xwin
+    
+    Fixes: https://github.com/XQuartz/XQuartz/issues/140
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+
+commit 34e2a64ce00c219d64b8169b774661d5727c45c7
+Author: Pascal VITOUX <vitoux.pascal@gmail.com>
+Date:   Fri Nov 27 16:54:59 2020 +0000
+
+    xfree86: fix gtf support detection for EDID 1.4
+    
+    According to the "VESA Enhanced EDID Standard", all GTF compliant
+    displays are continuous frequency.
+    
+    The GTF support flags in 'Display Range Limits Descriptor' cannot be
+    used if the display is a non-continuous frequency multi-mode display.
+    
+    Closes #1105
+    Signed-off-by: Pascal VITOUX <vitoux.pascal@gmail.com>
+    Fixes: 6a79a737 ("xfree86: add drm modes on non-GTF panels")
+    Reviewed-by: Aaron Ma aaron.ma@canonical.com
+
+commit b75d0cca28aaae5cd21ad76ad2822138fac2882a
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date:   Fri Feb 19 11:47:13 2021 -0800
+
+    modesetting: Defer crtc gamma size upgrade to drmmode_setup_colormap
+    
+    Rather than trying to create a gamma ramp array of the appropriate size in
+    drmmode_crtc_init when the GAMMA_LUT property should be used, just flag the crtc
+    as wanting to use the GAMMA_LUT property and then replace the gamma ramp later,
+    right before calling xf86HandleColormaps. This avoids a problem during initial
+    startup where xf86RandR12CreateObjects12 hard-codes a gamma ramp size of 256,
+    causing xf86RandR12CrtcSetGamma to read past the end of the DIX layer's RandR
+    gamma ramp array:
+    
+      PreInit
+        drmmode_pre_init
+          drmmode_crtc_init
+            crtc->gamma_size = 1024
+    
+      ScreenInit
+        xf86CrtcScreenInit
+          xf86RandR12Init
+            xf86RandR12Init12
+              xf86RandR12CreateObjects12
+                RRCrtcCreate
+                  randr_crtc->gammaSize = 0
+              xf86RandR12InitGamma(pScrn, 256)
+                RRCrtcGammaSetSize
+                  randr_crtc->gammaSize = 256
+              xf86RandR12InitGamma
+                xf86RandR12CrtcInitGamma
+                  RRCrtcGammaSet
+                    xf86RandR12CrtcSetGamma
+                      // crtc->gamma_size is 1024 here, while randr_crtc->gammaRed
+                      // is a 256-element array.
+                      memcpy(crtc->gamma_red, randr_crtc->gammaRed, crtc->gamma_size * sizeof(crtc->gamma_red[0]));
+        drmmode_setup_colormap
+          xf86HandleColormaps
+            xf86RandR12InitGamma
+              RRCrtcGammaSetSize
+                randr_crtc->gammaSize = 1024
+    
+    Fixes: 245b9db0 - modesetting: Use GAMMA_LUT when available
+    Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1126
+    Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
+    Reviewed-by: Robert Morell <rmorell@nvidia.com>
+
+commit ab8f8c98418db6954b17d93280b7b526fc1d3f7c
+Author: Jeremie Courreges-Anglas <jca@wxcvbn.org>
+Date:   Thu Jan 21 23:52:15 2021 +0100
+
+    xserver/os: safer IPv6 "kame hack" fix, only override sin6_scope_id if zero
+    
+    This helps on KAME-based systems which want to get rid of this hack.
+    The assumption is that if sin6_scope_id is set, then the interface index
+    is no longer embedded in the address.
+    
+    Signed-off-by: Jeremie Courreges-Anglas <jca@wxcvbn.org>
+
+commit aeed57d722f2eb978c17fd7e859334d34af38d05
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Fri Mar 26 00:09:41 2021 +0200
+
+    xkb: Fix parsing of XkbSA_DeviceValuator action type
+    
+    The xkb spec defines that the 7th element of the DeviceValuator key
+    action description is "valuator 2 value".
+    
+    This error most likely was accidentally introduced as a copy-paste error
+    in edeb033f29ae2d52e86c543ccbf22fb7ae1fdb7f.
+    
+    Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
+
+commit a3931ec6f43857aeed7feac5d223d7db6728145e
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Thu Mar 25 22:46:33 2021 +0200
+
+    xfree86: Create a symlink X -> Xorg when installing using meson
+    
+    This brings the behavior closer than what we currently have with
+    autotools-based build system.
+    
+    Meson does not currently have native support for symlinks.
+    See https://github.com/mesonbuild/meson/issues/1602.
+    
+    Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
+
+commit 09cd65233e0f5c04e7e3d063decf357f239a65f6
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Thu Mar 25 22:48:56 2021 +0200
+
+    xfree86: Set appropriate install_mode for suid_wrapper
+
+commit 88b5e1a219a16dd66be6302dbf88ec93d317f991
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Thu Mar 25 22:48:55 2021 +0200
+
+    meson: Bump min meson version to 0.47 to get install_mode support
+
+commit 82d2156ba7b4e592a2ceb5da767b690862852caa
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Thu Mar 25 22:51:39 2021 +0200
+
+    xfree86: Fix meson overwriting suid wrapper with the wrapped executable
+    
+    Meson gets confused when there are two targets of the same name within
+    the same directory, so we use a different intermediate name.
+    
+    This is a problem with the Xorg SUID wrapper which has the same filename
+    as the real Xorg executable and is configured in the same meson.build
+    file. This commit works around this by using a different filename in
+    build stage and renaming only when installing.
+    
+    Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
+
+commit ba51acb1de752924c389cedbca39b5dc63679ee6
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Thu Mar 25 22:57:56 2021 +0200
+
+    miext: Remove if check which is always true
+    
+    In both cases we check for width > 0 just above, and the variable is not
+    modified between the checks, so the condition is always true.
+    
+    Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
+
+commit 99e7ccffb38b4c93ff0c73586ec72a7fb78cae53
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Thu Mar 25 23:18:14 2021 +0200
+
+    dix: Fix URL to description of focus in/out model
+    
+    The current URL points to an unrelated patch for acpid.
+    
+    Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
+
+commit 1b7dca27eb44eac9cb0a8d1463d968872c76f4d5
+Author: Simon Ser <contact@emersion.fr>
+Date:   Thu Feb 18 12:04:48 2021 +0100
+
+    xwayland: remove wl_log_set_handler_client workaround
+    
+    This bumps the minimum Wayland version to 1.5 (released in 2014).
+    
+    Signed-off-by: Simon Ser <contact@emersion.fr>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Martin Peres <martin.peres@mupuf.org>
+
+commit 6c51818a0f55282cbe5a870f58ca82ca45ee472d
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Fri Mar 5 15:23:53 2021 +0100
+
+    meson: Make sure XKM_OUTPUT_DIR has a trailing slash
+    
+    RunXkbComp passes an invalid file path to xkbcomp if there's no
+    trailing slash.
+    
+    Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1146
+    Suggested-by: Dylan Baker <dylan.c.baker@intel.com>
+
+commit 376eaadde36f80fcbe6b0391a3385e77b4602854
+Author: Jan Beich <jbeich@FreeBSD.org>
+Date:   Fri Mar 5 22:50:51 2021 +0000
+
+    meson: hide C API if Xorg is disabled (like autotools)
+    
+    When building only Xwayland using Meson some files are always installed.
+    This causes package conflict if Xwayland is built separately from Xorg.
+    
+      include/xorg/compositeext.h
+      include/xorg/damage.h
+      include/xorg/damagestr.h
+      include/xorg/dbestruct.h
+      include/xorg/dri3.h
+      include/xorg/fb.h
+      include/xorg/fboverlay.h
+      include/xorg/fbpict.h
+      include/xorg/fbrop.h
+      include/xorg/geext.h
+      include/xorg/geint.h
+      include/xorg/glyphstr.h
+      include/xorg/mi.h
+      include/xorg/micmap.h
+      include/xorg/micoord.h
+      include/xorg/migc.h
+      include/xorg/miline.h
+      include/xorg/mioverlay.h
+      include/xorg/mipict.h
+      include/xorg/mipointer.h
+      include/xorg/mipointrst.h
+      include/xorg/mistruct.h
+      include/xorg/misync.h
+      include/xorg/misyncfd.h
+      include/xorg/misyncshm.h
+      include/xorg/misyncstr.h
+      include/xorg/mizerarc.h
+      include/xorg/panoramiX.h
+      include/xorg/panoramiXsrv.h
+      include/xorg/picture.h
+      include/xorg/picturestr.h
+      include/xorg/present.h
+      include/xorg/presentext.h
+      include/xorg/randrstr.h
+      include/xorg/rrtransform.h
+      include/xorg/shadow.h
+      include/xorg/shmint.h
+      include/xorg/syncsdk.h
+      include/xorg/vndserver.h
+      include/xorg/wfbrename.h
+      include/xorg/xace.h
+      include/xorg/xacestr.h
+      include/xorg/xorg-server.h
+      include/xorg/xvdix.h
+      include/xorg/xvmcext.h
+      share/aclocal/xorg-server.m4
+    
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit 4ae36f418ed683532b0b6991e4a1e7d56740b845
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Mon Mar 8 21:02:40 2021 -0800
+
+    xquartz: Ensure the mouse pointer is shown when switching to a native macOS alert or window
+    
+    Fixes: https://github.com/XQuartz/XQuartz/issues/100
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+
+commit b2d96b5cd459963a9587ee9c86afc9266ba3d02b
+Author: Matthieu Herrb <matthieu.herrb@laas.fr>
+Date:   Sat Feb 27 11:30:18 2021 +0100
+
+    Avoid sequences of malloc(0) / free() by checking the length.
+    
+    This has an impact on heap fragmentation.
+    
+    Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
+
+commit 15a413e11d186a9206a39a9b2fe4b72c065d5918
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Mon Feb 22 23:02:42 2021 -0800
+
+    xquartz: Update meson build to remove deleted files
+    
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+
+commit e59848548a462f1a0ac751bb8bb6afe56258cf4e
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Fri Mar 5 22:57:24 2021 -0800
+
+    xquartz: Fix appFlags build failure with macOS 10.15+ SDKs
+    
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+
+commit 69e087caa4fdfcc303080c021ba463afcf4290c7
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Fri Feb 5 11:36:15 2021 +0100
+
+    xwayland: Fix path in pkg-config with autoconf
+    
+    When using autoconf/automake to build Xwayland, the actual path to
+    Xwayland is not fully qualified and refers to the "exec_prefix".
+    
+    As a result, the path provided by the generated pkg-config file is wrong
+    when using autoconf to build the Xserver.
+    
+    Fix the xwayland.pc file to also set the variable "prefix" and
+    "exec_prefix" so that the path to Xwayland is fully resolved.
+    
+    Add those variables to the meson build as well for good measure.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Acked-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit d7391f383ddca5089586b4d04fede56169a1a85e
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Thu Mar 4 14:13:41 2021 +0100
+
+    xwayland: Fix LeaveNotify for relative pointer
+    
+    Since commit 20c78f38, we use the relative pointer for enter/leave
+    events.
+    
+    However, sprite_check_lost_focus() which verifies whether the pointer has
+    left an Xwayland surface still explicitly check for the absolute
+    pointer.
+    
+    As a result, no LeaveNotify event is emitted anymore now when the
+    pointer crosses from an Xwayland surface to a Wayland native one.
+    
+    Make sure to check the last slave device against get_pointer_event() as
+    well, not just the absolute pointer.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Acked-by: Martin Peres <martin.peres@mupuf.org>
+    Acked-by: Roman Gilg <subdiff@gmail.com>
+    Tested-by: Roman Gilg <subdiff@gmail.com>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Fixes: 20c78f38 - xwayland: use get_pointer_device() for enter/leave
+                      handling too
+
+commit a5367face12d8e4162bc49a60b5d13955a7fb293
+Author: Jacob Cherry <jcherry@nvidia.com>
+Date:   Wed Mar 3 17:50:31 2021 +0000
+
+    xfree86: Fix autoconfig secondary GPU devices
+    
+    The code path added by commit 69e4b8e6 (xfree86: attempt to autoconfig
+    gpu slave devices (v3)) assumes that it will only be run if the primary
+    device on the screen is the first device in xf86configptr->conf_device_lst.
+    While this is true most of the time, there are two specific cases where
+    this assumption fails.
+    
+    First, if the first device in conf_device_lst is assigned to a different
+    seat than the running X server, it will be skipped by the previous
+    FIND_SUITABLE macro usage. Second, if the primary device was explicitly
+    assigned to the screen but auto_gpu_device is still set and no secondary
+    devices were explicitly listed, that device may not be the first device
+    in conf_device_lst.
+    
+    When the first device in conf_device_lst is not the primary device
+    assigned to the screen, two problems emerge. First, the first device in
+    conf_device_lst will never be assigned to the screen as a secondary
+    device. Second, the primary device is additionally assigned to the
+    screen as a secondary device. The combination of these problems causes
+    certain otherwise valid configurations to be invalid. For example, if a
+    primary device is assigned to a screen and a secondary device is listed
+    in the config but not explicitly assigned to the screen, then one order
+    of the device sections results in a usable PRIME or Reverse PRIME setup
+    and the other order does not.
+    
+    This commit removes the assumption that the primary device is the first
+    device in conf_device_lst by starting the loop from the start of
+    conf_device_lst and skipping the primary device when it is encountered.
+    
+    Signed-off-by: Jacob Cherry <jcherry@nvidia.com>
+
+commit 97ed0048e45f4909a0c164b27e768af8c9364068
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Fri Dec 18 17:53:33 2020 +0100
+
+    xwayland: Delay cursor visibility update
+    
+    Xwayland won't emulate XWarpPointer requests if the cursor is visible,
+    this is to avoid having the cursor jumping on screen and preventing
+    random X11 clients from controlling the pointer in Wayland, while
+    allowing games which use that mechanism with a hidden cursor to work in
+    Xwayland.
+    
+    There are, however, games which tend to do it in the wrong order, i.e.
+    show the cursor before moving the pointer, and because Xwayland will not
+    allow an X11 client to move the pointer while the cursor is visible, the
+    requests will fail.
+    
+    Add a workaround for such X11 clients, when the cursor is being shown,
+    keep it invisible until the cursor is actually moved. This way, X11
+    clients which show their cursor just before moving it would still have a
+    chance to succeed.
+    
+    v2: Add a timeout to show the cursor for well behaved clients.
+    v3: Some cleanup (Michel)
+    v4: Do not cancel cursor delay when updating the cursor to avoid
+        delaying cursor visibility indefinitely if the client keeps
+        settings different cursors (Michel)
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Tested-by: Jaap Buurman jaapbuurman@gmail.com
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+    Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/734
+
+commit 9d329a0fb17c1a7840408d329ee2e2a04d357387
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Sun Feb 21 21:49:58 2021 -0800
+
+    xquartz: Remove a check for NSAppKitVersionNumber >= NSAppKitVersionNumber10_7
+    
+    This check is always true on our supported systems.
+    
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+
+commit 839b49ac05c3285434d8487b48d8b52323187e44
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Sun Feb 21 21:49:14 2021 -0800
+
+    xquartz: Don't include strndup.c any more since we no longer support 10.8 and older
+    
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+
+commit 677eb6827bd68bdf29e3539d1e10e9872896efec
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Sun Feb 21 20:58:42 2021 -0800
+
+    xquartz: Add a launch trampoline to better integrate with modern versions of macOS
+    
+    Fixes: https://github.com/XQuartz/XQuartz/issues/6
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+
+commit 25035229b73742f9e6a96ac3e535b30b5c6196a8
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Fri Feb 19 23:16:56 2021 -0800
+
+    xquartz: Don't process AppKit events if we haven't finished initializing
+    
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+
+commit 487286d47260782d331229af10df17711cbca1ea
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Sat Feb 20 17:24:14 2021 -0800
+
+    xquartz: Allocate each fbconfig separately
+    
+    A change during the 1.20 development cycle resulted in fbconfigs being walked
+    and deallocated individually during __glXScreenDestroy.  This change
+    now avoids a use-after-free caused by that change.
+    
+    ==50859==ERROR: AddressSanitizer: heap-use-after-free on address 0x00010d3819c8 at pc 0x0001009d4230 bp 0x00016feca7a0 sp 0x00016feca798
+    READ of size 8 at 0x00010d3819c8 thread T5
+        #0 0x1009d422c in __glXScreenDestroy glxscreens.c:448
+        #1 0x10091cc98 in __glXAquaScreenDestroy indirect.c:510
+        #2 0x1009d2734 in glxCloseScreen glxscreens.c:169
+        #3 0x100740a24 in dix_main main.c:325
+        #4 0x10023ed50 in server_thread quartzStartup.c:65
+        #5 0x199ae7fd0 in _pthread_start+0x13c (libsystem_pthread.dylib:arm64e+0x6fd0)
+        #6 0x199ae2d38 in thread_start+0x4 (libsystem_pthread.dylib:arm64e+0x1d38)
+    
+    0x00010d3819c8 is located 200 bytes inside of 12800-byte region [0x00010d381900,0x00010d384b00)
+    freed by thread T5 here:
+        #0 0x101477ba8 in wrap_free+0x98 (libclang_rt.asan_osx_dynamic.dylib:arm64e+0x3fba8)
+        #1 0x1009d4240 in __glXScreenDestroy glxscreens.c:449
+        #2 0x10091cc98 in __glXAquaScreenDestroy indirect.c:510
+        #3 0x1009d2734 in glxCloseScreen glxscreens.c:169
+        #4 0x100740a24 in dix_main main.c:325
+        #5 0x10023ed50 in server_thread quartzStartup.c:65
+        #6 0x199ae7fd0 in _pthread_start+0x13c (libsystem_pthread.dylib:arm64e+0x6fd0)
+        #7 0x199ae2d38 in thread_start+0x4 (libsystem_pthread.dylib:arm64e+0x1d38)
+    
+    previously allocated by thread T5 here:
+        #0 0x101477e38 in wrap_calloc+0x9c (libclang_rt.asan_osx_dynamic.dylib:arm64e+0x3fe38)
+        #1 0x100925a40 in __glXAquaCreateVisualConfigs visualConfigs.c:116
+        #2 0x10091cb24 in __glXAquaScreenProbe+0x224 (X11.bin:arm64+0x100730b24)
+        #3 0x1009cd840 in xorgGlxServerInit glxext.c:528
+        #4 0x10074539c in _CallCallbacks dixutils.c:743
+        #5 0x100932a70 in CallCallbacks callback.h:83
+        #6 0x100932478 in GlxExtensionInit vndext.c:244
+        #7 0x10020a364 in InitExtensions miinitext.c:267
+        #8 0x10073fe7c in dix_main main.c:197
+        #9 0x10023ed50 in server_thread quartzStartup.c:65
+        #10 0x199ae7fd0 in _pthread_start+0x13c (libsystem_pthread.dylib:arm64e+0x6fd0)
+        #11 0x199ae2d38 in thread_start+0x4 (libsystem_pthread.dylib:arm64e+0x1d38)
+    
+    Regressed-in: 4b0a3cbab131eb453e2b3fc0337121969258a7be
+    CC: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+
+commit 6a83fb51b7a8b2e167e7d6380229b69e5452f91f
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Sat Feb 20 15:17:18 2021 -0800
+
+    xquartz: Fix a compiler warning about const incompatible pointer assignment
+    
+    driWrap.c:541:30: error: assigning to 'GCOps *' (aka 'struct _GCOps *') from 'const GCOps *' (aka 'const struct _GCOps *') discards
+          qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
+            pGCPriv->originalOps = pGC->ops;
+                                 ^ ~~~~~~~~
+    
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+
+commit a3ddcdd56c246e2226c7cdf372c2a1294eb6d888
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Thu Feb 18 23:16:15 2021 -0800
+
+    xquartz: Fix build with sparkle enabled
+    
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+
+commit 279bcbd9cf9e557a6789d6e4cede8e8799c3788e
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Thu Feb 18 12:43:53 2021 -0800
+
+    xquartz: Silence a compiler warning about missing internal methods on NSApplication
+    
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+
+commit fe89c70e472a9da0541b798eea60c5362b49a99d
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Thu Feb 18 22:19:21 2021 -0800
+
+    xquartz: Rewrite Window menu handling to not depend on X11App.windowsMenu.numberOfItems being correct in -awakeFromNib
+    
+    Fixes: https://github.com/XQuartz/XQuartz/issues/56
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+
+commit 41aed8f69634ec61ea0e40fff1cfdaf868be843e
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Thu Feb 18 15:41:29 2021 -0800
+
+    xquartz: Convert X11Controller ivars into @properties
+    
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+
+commit c2750e1fab774c8e6675ecf284124ff55b5be9cf
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Thu Feb 18 14:39:46 2021 -0800
+
+    xquartz: Convert X11Application ivars into @properties
+    
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+
+commit f51b97b0de2e562e341f2d72c5f00a74c71a159f
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Thu Feb 18 14:47:50 2021 -0800
+
+    xquartz: Fold quartzCommon.h into quartz.h
+    
+    Everything declared in it comes from quartz.c, so match reality.
+    
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+
+commit 4b4500c48f06e7ef41cd94f417e49b3f4f1412ae
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Thu Feb 18 13:00:43 2021 -0800
+
+    xquartz: Fold away some unnecessary hops to X11Controller through X11Application
+    
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+
+commit 39c0e1c0ab6a0a89a71f26446973c779ca7fd927
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Thu Feb 18 09:41:30 2021 -0800
+
+    xquartz: Fold away array_with_strings_and_numbers and simplify with more modern Objective-C
+    
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+
+commit 87f8fe1f74f10faf0ffc84f03539799ad4c2465e
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Thu Feb 18 09:33:56 2021 -0800
+
+    xqaurtz: Remove message_kit_thread() and use dispatch instead
+    
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+
+commit 94e4e173486c2a94ddcfd2d0515e1ee6731f6656
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Wed Feb 17 23:58:53 2021 -0800
+
+    xquartz: Use objc_autoreleasePoolPush / objc_autoreleasePoolPop directly in QuartzBlockHandler
+    
+    It violates @autoreleasepool best practices, and this helps collapse quartzCocoa.m into quartz.c
+    
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+
+commit fba421f700498fa382089df47942df36a2d75ce6
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Wed Feb 17 22:04:55 2021 -0800
+
+    xquartz: Minor code modernization -- @autoreleasepool adoption
+    
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+
+commit 318f8a4a8a47a0ce4bbbf4290469e933602c9b30
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Wed Feb 17 20:55:06 2021 -0800
+
+    xquartz: Remove some dead code for compatibility with older nibs
+    
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+
+commit 72a39dccf99191fbfbb4b399c446fd017d55f24e
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Thu Feb 18 16:05:34 2021 -0800
+
+    xquartz: Remove a workaround for AppKit versions older than Lion
+    
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+
+commit 7e2875035800887f3f41f75cba4299088daf939a
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Wed Feb 17 15:45:45 2021 -0800
+
+    xquartz: Fix applications menu table background color for dark mode
+    
+    Fixes: https://github.com/XQuartz/XQuartz/issues/32
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+
+commit 85beee9885a8e65960fbbde2de9aa28598b4d6ae
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Wed Feb 17 15:16:26 2021 -0800
+
+    xquartz: Apply Xcode 12.4 automatic updates to nibs
+    
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+
+commit 4e892aa6e132447e43d7bae7e3aca4f1fb172f93
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Wed Feb 17 13:38:31 2021 -0800
+
+    xquartz: Update the about box copyright to 2021
+    
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+
+commit c9a3b14c1472632afaff340f73a77a2b961f195a
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Mon Feb 1 16:27:38 2021 -0800
+
+    xquartz: Ensure we call into TIS on the main thread
+    
+    There is a place where this code was called on the main thread.
+    
+    We're using a rather nasty anti-pattern to just call a block inline rather
+    than synchonously calling it on the main thread if we're already on the main
+    thread.  This code could use a good overhaul, but I don't have time to rip
+    it apart right now.  This will address the immediate issue.
+    
+    Fixes: https://github.com/XQuartz/XQuartz/issues/40
+    Fixes: https://github.com/XQuartz/XQuartz/issues/48
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+
+commit af17b5c499ded807395c7ef02254d5af8ddc4667
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Mon Feb 15 14:52:32 2021 +0200
+
+    dix: Use correct listener to deliver touch end events
+    
+    This fixes an problem left in f682e0563f736ed2c2c612ed575e05b6e3db945e
+    due to an incorrect cherry-pick.
+    
+    We must use old listener->listener to deliver the touch event. Otherwise
+    grab won't let the event through and the abovementioned commit has no
+    effect.
+    
+    Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
+
+commit 20c78f38a0b33b88bc82a2bcd54d2e6c74a4c132
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Tue Feb 16 14:48:13 2021 +1000
+
+    xwayland: use get_pointer_device() for enter/leave handling too
+    
+    In Weston, clicking the window decoration of an Xwayland client gives us a
+    wl_pointer.button event immediately followed by a wl_pointer.leave event.
+    The leave event does not contain any button state information, so the button
+    remains logically down in the DIX.
+    
+    Once the pointer button is released, a wl_pointer.enter event is sent with
+    the current button state (zero). This needs to trigger a ButtonRelease event
+    but for that we need to ensure that the device is the same as the one we send
+    ButtonPress events through.
+    
+    Fixes a regression introduced in a4095162ca923992a8cfae6d0f09ff9f8144762a.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
+
+commit dee2bb033e78e2f4aae7f5708c3d4fc74a9957de
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Mon Feb 15 11:33:56 2021 +0100
+
+    dix: Guard against non-existing PtrFeedbackPtr
+    
+    Trying to change the pointer control settings on a device without
+    PtrFeedbackPtr would be a bug and a crash in the Xserver.
+    
+    Guard against that case by returning early with a BadImplementation
+    error, that might kill the X11 client but the Xserver would survive.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Related: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1137
+
+commit ab76272a7d2bff997985893c89147412a7360310
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Mon Feb 15 11:23:59 2021 +0100
+
+    xwayland: Add PtrFeedback to the touch device
+    
+    Trying to change the acceleration/threshold on Xwayland cannot work, and
+    the corresponding handler xwl_pointer_control() is a no-op.
+    
+    Yet, an X11 client trying to change those on the touch device may
+    possibly cause a crash because the touch device in Xwayland doesn't set
+    that.
+    
+    Initialize the touch device's PtrFeedback to make sure that just cannot
+    happen.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1137
+
+commit a4095162ca923992a8cfae6d0f09ff9f8144762a
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Thu Feb 11 11:42:01 2021 +0100
+
+    xwayland: Use relative device for buttons/axis
+    
+    We are using the relative pointer for motion events, but buttons and
+    axis events still go through the absolute pointer device.
+    
+    That means additional DeviceChanged events that could be avoided if the
+    buttons and axis events were coming from the same device as motion
+    events.
+    
+    Route those events to the relative pointer if available so that motion,
+    buttons and axis events come from the same device (most of the time).
+    
+    Suggested-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Related: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1130
+
+commit 1abab61dc23d585860bc847bcecb1b0315977c27
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Thu Feb 11 15:32:34 2021 +0100
+
+    xwayland: Add wheel axis to relative pointer
+    
+    The relative pointer only has 2 axis, if we want to route the mouse
+    wheel events to that device, we need to add the axis definition, similar
+    to what is done for the absolute pointer.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Related: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1130
+
+commit 71817928247971566903d56c0571db61b7933747
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Tue Feb 9 13:33:05 2021 +0100
+
+    xwayland: Split dispatch_pointer_motion_event
+    
+    This is a cleanup patch, no functional change.
+    
+    Split the function dispatch_pointer_motion_event() into three separate
+    simpler functions, relative motion with a warp emulator, relative motion
+    and absolute motion.
+    
+    This makes the code a lot easier to read for me, rather than having
+    everything in a single function with nested if/else conditions.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit c5c5322ad69b0751f16c785a479b2989b8794235
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Tue Feb 9 13:04:59 2021 +0100
+
+    xwayland: Use relative values for raw events
+    
+    Xwayland supports relative motion events from the Wayland compositor via
+    the relative-pointer protocol, and converts those to the absolute range
+    in device units for raw events.
+    
+    Some X11 clients however wrongly assume relative values in the axis
+    values even for devices explicitly labeled as absolute. While this is a
+    bug in the client, such applications would work fine in plain Xorg but
+    not with Xwayland.
+    
+    To avoid that issue, use the relative values for raw events without
+    conversion, so that such application continue to work in Xwayland.
+    
+    Thanks Peter for figuring out the root cause.
+    
+    v2: Don't duplicate relative and absolute events (Peter)
+    v3: Use POINTER_RAWONLY (Peter)
+    
+    Suggested-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1130
+
+commit ebdb2e264676c3b27a708328348efe73e0d3c8c2
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Tue Feb 9 13:01:21 2021 +0100
+
+    xwayland: Use a resolution of 0 for relative motion
+    
+    That's what evdev/libinput drivers do.
+    
+    Suggested-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Related: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1130
+
+commit b5e1f13681090fc327dc2cabee1dc123273e785b
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Thu Feb 11 09:48:12 2021 +0100
+
+    dix: Add POINTER_RAWONLY flag
+    
+    This add a new flag POINTER_RAWONLY for GetPointerEvents() which does
+    pretty much the opposite of POINTER_NORAW.
+    
+    Basically, this tells GetPointerEvents() that we only want the
+    DeviceChanged events and any raw events for this motion but no actual
+    motion events.
+    
+    This is preliminary work for Xwayland to be able to use relative motion
+    events for raw events. Xwayland would use absolute events for raw
+    events, but some X11 clients (wrongly) assume raw events to be always
+    relative.
+    
+    To allow such clients to work with Xwayland, it needs to switch to
+    relative raw events (if those are available from the Wayland
+    compositor).
+    
+    However, Xwayland cannot use relative motion events for actual pointer
+    location because that would cause a drift over time, the pointer being
+    actually controlled by the Wayland compositor.
+    
+    So Xwayland needs to be able to send only relative raw events, hence
+    this API.
+    
+    Bump the ABI_XINPUT_VERSION minor version to reflect that API addition.
+    
+    v2: Actually avoid sending motion events (Peter)
+    v3: Keep sending raw emulated events with RAWONLY (Peter)
+    
+    Suggested-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Related: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1130
+
+commit 213129012bc0fe508a8a4180ffda1ef661894049
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Sun Dec 20 00:48:22 2020 +0200
+
+    Xi: Deliver pointer emulated touch events to grabbing client
+    
+    Delivery of emulated events usually happens only to the owning client.
+    If there are grabs, only the grabbing client may receive these events.
+    
+    This logic does not work during the touch event replay in
+    DeactivatePointerGrab(), as the previous grab is no longer in the
+    listener queue of the touch, so the next owner gets whole emulated event
+    sequence. This may trigger implicit grabs. After replay,
+    DeactivatePointerGrab() will update the global grab without regard to
+    this new implicit grab, which leads to issues down the line.
+    
+    This change is effectively the same as 35e5a76cc1 except that the change
+    is limited to only emulated pointer events. Otherwise, in the case of a
+    device grab we end up not sending any touch events to clients that
+    selected XI_TouchOwnership event and should get touch events before they
+    get ownership of touch sequence.
+    
+    Fixes #7
+    
+    https://bugs.freedesktop.org/show_bug.cgi?id=96536
+
+commit 30e11535afb3c4efc3a5cef640de44c7cd9bb561
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Sun Dec 20 00:48:21 2020 +0200
+
+    Revert "Xi: Use current device active grab to deliver touch events if any"
+    
+    This reverts commit 98e3db2ac43d4a3f13475cb160c8ce0155ac7d61.
+
+commit f682e0563f736ed2c2c612ed575e05b6e3db945e
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Mon Feb 8 05:21:29 2021 +0200
+
+    dix: Send touch end to clients that do async grab without touch events
+    
+    If a XI2 client started listening to touches due to a selection and then
+    creates an active async grab that does not include touch events, then it
+    currently won't get the touch end event which will produce inconsistent
+    view of the pending touches.
+    
+    Note that we only need to consider touch listeners and can ignore
+    pointer emulation. Under XI2 if a active grab replaces a passive
+    implicit grab and the active grab does not include the button release
+    event, the client won't get it either.
+
+commit c7730cfe5577ebde006d408f502766d8c3a73670
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Wed May 13 16:48:55 2020 +0200
+
+    xwayland: Translate keyboard grabs on the root window
+    
+    When an X11 client issues an active grab on the keyboard, Xwayland
+    forward this to the Wayland compositor using the Xwayland specific
+    protocol "xwayland-keyboard-grab" if it can find the corresponding
+    Xwayland window.
+    
+    Some X11 clients (typically older games) however try to issue the
+    keyboard grab on the X11 root window, which has obviously no matching
+    Xwayland window. In such a case, the grab is simply ignored and the game
+    will not work as expected.
+    
+    To workaround that issue, if an X11 client issues a keyboard grab on the
+    root window, Xwayland will search for a toplevel window belonging to the
+    same X11 client that it can use as the grab window instead.
+    
+    This way, the grab can be forwarded to the Wayland compositor that can
+    either grant or deny the request based on the window and its internal
+    policies.
+    
+    The heuristic picks the first realized toplevel window belonging to the
+    client so that the Wayland compositor will send it the keyboard events,
+    and the Xserver grab mechanism will then take care of routing the events
+    to the expected X11 window by itself.
+    
+    v2: Make the test more clear (Dor Askayo <dor.askayo@gmail.com>)
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Acked-by: Jonas Ã…dahl <jadahl@gmail.com>
+    See-also: https://gitlab.gnome.org/GNOME/mutter/-/issues/1249
+
+commit 520e7a1310ddc25b30bcaa0ea3eeaa6c4d137c8c
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Wed Jan 27 15:03:46 2021 -0800
+
+    xquartz: Ensure that NSRunAlertPanel() is run on the main thread
+    
+    Fixes: https://github.com/XQuartz/XQuartz/issues/30
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+
+commit 7d0bb7ed061458698ff27856976939b261e73b23
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Wed Jan 27 13:46:02 2021 -0800
+
+    xquartz: Remove support for older versions of libXplugin
+    
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+
+commit 5e7c0762e6fdaefc9b8257c0f875432b1877c49e
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Wed Jan 27 13:43:01 2021 -0800
+
+    xquartz: Remove unused include of AvailabilityMacros.h from various sources
+    
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+
+commit 59f22341a8b4cd468d6f37fb17dd7fde347e430b
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Wed Jan 27 13:40:48 2021 -0800
+
+    xquartz: Remove support for building for i386
+    
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+
+commit aea15a76593f98205e44f20632178dc384c02d57
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Wed Jan 27 13:35:17 2021 -0800
+
+    xquartz: Remove support for Mountain Lion and earlier versions of macOS
+    
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+
+commit c0b2d3e099a60f55b18ca9c30373000f12d40fe2
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Wed Jan 27 13:33:22 2021 -0800
+
+    xquartz: Remove support for Lion and earlier versions of macOS
+    
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+
+commit cc9cf6f085be6e8264f925a11d67a12ad47a042b
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Wed Jan 27 13:29:52 2021 -0800
+
+    xquartz: Remove support for SnowLeopard and earlier versions of macOS
+    
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+
+commit f699aac2ea2cf6a3e2d3bdcb2d8179e103de1d4e
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Wed Jan 27 13:09:50 2021 -0800
+
+    xquartz: Remove check for libdispatch now that we don't support pre-SnowLeopard
+    
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+
+commit 5ad49102722274f53b9b011082d9e0f202fcd9a4
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Wed Jan 27 13:23:18 2021 -0800
+
+    xquartz: Remove support for Leopard and earlier versions of macOS
+    
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+
+commit 6e6db055f8b517ae9d63351d4c00fd480cb6b54a
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Wed Jan 27 13:18:35 2021 -0800
+
+    xquartz: Remove support for Tiger and earlier versions of macOS
+    
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+
+commit 20b86c4060c1d4fbc099675d5100fe17e4ac0147
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Wed Jan 27 13:12:34 2021 -0800
+
+    os: Remove support for Tiger and earlier versions of macOS
+    
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+
+commit 74aef85bd88a1fdb22d445ad14975232a7bebdd7
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Wed Jan 27 13:25:54 2021 -0800
+
+    xquartz: Remove support for Panther and earlier versions of macOS
+    
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+
+commit 0e272ac458fbd530787273073473e566b0ac306e
+Author: Jim DeLaHunt <from.github@jdlh.com>
+Date:   Mon Dec 11 00:08:52 2017 -0800
+
+    Fix typo "XQaurtz" in Xquartz.man
+
+commit 5429791b1cf7f6cabf6c64aad0a4b1b5418253c9
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Thu Jan 28 17:11:44 2021 +0100
+
+    Revert "mi: Shortcut miDoCopy/miCopyArea based on clipList"
+    
+    This reverts commit f665a9c9e6c8643f3050378249db3088ae3057be.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Acked-by: Martin Peres <martin.peres@mupuf.org>
+    Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1108
+    Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1128
+
+commit 3cdac5ba07a79761652d960e0e907601f82718bc
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Wed Sep 9 10:51:24 2020 +0200
+
+    mi: List extensions in usage message
+    
+    Not all extensions can be enabled or disabled at runtime, list the
+    extensions which can from the help message rather than on error only.
+    
+    v2:
+     * Print the header message in the ListStaticExtensions() (Peter
+       Hutterer)
+     * Do not export ListStaticExtensions() as Xserver API
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit a81c98e42a954580ca0d43c89169dc2069c87b96
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Tue Sep 8 18:34:48 2020 +0200
+
+    mi: Don't log the full extension list on disable
+    
+    When enabling or disabling an extension which is not known to the
+    Xserver, it will log an error message and list the extensions it knows
+    about.
+    
+    That clutters the logs when the Xserver is Xwayland spawned by the
+    Wayland compositor who doesn't actually know the list of extensions
+    enabled at build time in the Xserver.
+    
+    Considering that disabling a non-existing extension is a no-op anyway,
+    list all the extensions available only when attempting to enable an
+    extension which the Xserver doesn't know about.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit 4341f1da728e4c67187b48865faf06c1312bcdff
+Author: Misha Gusarov <dottedmag@dottedmag.net>
+Date:   Wed Jan 27 12:37:51 2021 +0000
+
+    xwayland: Add -verbose option as in xfree86
+    
+    Makes it easier to debug Xwayland problems.
+    
+    Signed-off-by: Misha Gusarov <dottedmag@dottedmag.net>
+
+commit 0148a15da1616a868d71abe1b56e3f28cc79533c
+Author: Julien Cristau <jcristau@debian.org>
+Date:   Wed Jan 6 10:20:53 2021 +0100
+
+    compiler.h: don't define inb/outb and friends on mips
+    
+    The definition relies on IOPortBase, which is only ever set in
+    hw/xfree86/os-support/bsd/arm_video.c
+    
+    This caused build failures on linux/mips with GCC 10, due to this
+    change (from https://gcc.gnu.org/gcc-10/changes.html#c):
+    
+    "GCC now defaults to -fno-common. As a result, global variable accesses
+    are more efficient on various targets. In C, global variables with
+    multiple tentative definitions now result in linker errors. With
+    -fcommon such definitions are silently merged during linking."
+    
+    As a result anything including compiler.h would get its own definition
+    of IOPortBase and the linker would error out.
+
+commit f08ab719df921e1269691553daf56853380fb241
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Thu Dec 17 18:58:28 2020 +0100
+
+    ci: Test ninja dist in meson jobs
+    
+    While this isn't critical yet, it might become so at some point, so
+    let's make sure it keeps working.
+    
+    Don't set the PIGLIT/XTEST_DIR variables for ninja dist, testing XTS
+    once against each DDX is enough (as part of ninja test).
+    
+    Requires git in the docker image.
+    
+    v2:
+    * Drop /usr/local/bin/xkbcomp symlink, no longer needed with xkbcomp
+      1.4.1 (Peter Hutterer)
+
+commit 099eb6261cfb4a7a674ead467a8a9dfb2ee173d8
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Fri Jan 15 18:32:30 2021 +0100
+
+    ci: Build xkbcomp 1.4.1 for the docker image
+    
+    This is a requirement for testing meson dist in CI.
+
+commit 9716c4193fd4db7cdf3c6d7fb32d4ad2919cbe46
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Fri Jan 22 10:29:29 2021 +0100
+
+    xwayland: Add new pkg-config variable for listenfd
+    
+    Since commit b3f3d65e, xwayland now supports the command line option
+    "-listenfd" for passing file descriptors and marked "-listen" as
+    deprecated for this specific purpose.
+    
+    Add a new pkg-config variable "have_listenfd" to the xwayland.pc so that
+    compositors can know this is available and use listenfd in place of the
+    deprecated option.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+    Reviewed-by: Jonas Ã…dahl <jadahl@gmail.com>
+
+commit a9269808f394955f213e34303c2c14fd61c35ab5
+Author: Erik Kurzinger <ekurzinger@nvidia.com>
+Date:   Thu Jan 7 07:00:33 2021 -0800
+
+    xwayland: remove unused parameter of xwl_glamor_pixmap_get_wl_buffer
+    
+    There are currently no callers that make use of the "created" output parameter
+    of xwl_glamor_pixmap_get_wl_buffer. Remove it, along with the corresponding
+    argument of the associated EGL backend entrypoint.
+
+commit 532245798085a67b5ff906778f88373d5bcd2e4c
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Tue Dec 22 07:30:46 2020 +0200
+
+    xfree86/inputtest: Drop extraneous linux-specific include
+    
+    Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
+
+commit 3ab3083cc20534c83a5a35f0af1f2779f8df0b7b
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Sun Dec 20 01:11:43 2020 +0200
+
+    xi: Don't deliver emulated motion when there's no owner for touch end
+    
+    Pointer-emulated touch events should only be delivered to the client
+    that owns the sequence even if it's a core client that became the
+    effective owner of the sequency by selecting for pointer press and
+    movement.
+    
+    Currently the emulated events are delivered like this already (see
+    TouchResourceIsOwner() check in DeliverEmulatedMotionEvent()), except in
+    the case of TouchEnd, in which case the generated motion event is still
+    delivered to some client that's not necessarily the owner of the touch
+    sequence.
+    
+    We already know whether a touch sequence that is about to emulate a
+    pointer event has an owner, we just need to check that. This further
+    allows to simplify DeliverEmulatedMotionEvent() as it won't ever be
+    called for non-owned touch events.
+    
+    https://bugs.freedesktop.org/show_bug.cgi?id=60394
+    
+    Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
+
+commit 365cbbfc4b99f7d9937d1b8b61f1483556a5b57a
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Fri Dec 18 09:36:30 2020 -0500
+
+    os, shm: fcntl()'s third argument is integer, not pointer
+    
+    All of these uses were attempting to set FD_CLOEXEC, which happens to be
+    (1<<0). Since flags is going to be aligned in memory, its address is
+    never going to have the low bit set, so we were never actually setting
+    what we meant to.
+    
+    Fixes: xorg/xserver#1114
+
+commit 5e3900904ddc27f3d5580ce3a07929469d82fb5e
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Fri Dec 18 04:39:07 2020 +0200
+
+    xfree86: Use different scroll increment than libinput in inputtest drv
+    
+    Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
+
+commit 58465a3dd90c3bc698ba9ebb2c4a516df6ff7dfd
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Thu Dec 17 03:08:06 2020 +0200
+
+    xfree86: Add scroll axes to touch devices in inputtest driver
+    
+    Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
+
+commit 91a8013990a967bfd8c4145c4a79b86cc495a205
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Thu Dec 17 03:08:05 2020 +0200
+
+    xfree86: Add support for pressure valuator axis in inputtest driver
+    
+    Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
+
+commit 742b87f7ee5abd1406a77ac1baacbc43759bd275
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Thu Dec 17 03:08:04 2020 +0200
+
+    xfree86: Fix axis labels for PointerAbsolute input of inputtest driver
+    
+    Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
+
+commit e4a9f0bb4e36cffe4f7021bfa27753a9f42df2ff
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Mon Dec 14 15:38:42 2020 +0100
+
+    xwayland: Remove unneeded variable
+    
+    Just a small code cleanup, there is no need to allocate a variable only
+    to check the return value of eglInitialize().
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+    Reviewed-by: Tony Lindgren <tony@atomide.com>
+
+commit 95be87db986470c8fce5ea91af0bbf3177f1de36
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Mon Dec 14 10:06:12 2020 +0100
+
+    xwayland: Refactor glamor EGL init
+    
+    Glamor requires at least big GL 2.1 or GLES2, therefore Xwayland tries
+    to initialize first GL and then GLES2 if that fails.
+    
+    It does that all in one single function which makes the code slightly
+    complicated, move the initialization of big-GL and GLES2 to separate
+    functions to help with readability of the code.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+    Reviewed-by: Tony Lindgren <tony@atomide.com>
+
+commit 65673b02ef28884da3267fe1be579c20e2cddfa6
+Author: Tony Lindgren <tony@atomide.com>
+Date:   Tue Dec 1 12:54:36 2020 +0200
+
+    xwayland: fix GL version check for GLES only devices
+    
+    We currently bail out early for GLES only devices, and call
+    epoxy_gl_version() too early for GLES only that will make GLES only
+    devices return NULL for glGetString(GL_RENDERER).
+    
+    Let's also add a check to see if we need to recreate the context to
+    avoid pointless warnings for GLES only devices as suggested by
+    Olivier Fourdan <ofourdan@redhat.com>.
+    
+    Fixes: a506b4ec - xwayland: make context current to check GL version
+    Signed-off-by: Tony Lindgren <tony@atomide.com>
+
+commit 5d73a8b59e0d01d1ee4cb484e4b43563cec2eee9
+Author: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date:   Thu Dec 10 22:32:59 2020 +0100
+
+    meson.build: KMS support also depends on dri2
+    
+    Kernel modesettings support also depends on dri2, see
+    ./hw/xfree86/drivers/modesetting/meson.build
+    
+    So update meson.build to reflect the changes made in configure.ac by
+    commit 9c81b8f5b5d7bc987f73e8ef01a81e61205e58ee
+    
+    Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+
+commit 8c0afc9eb26a0866301072dec30717885fd14305
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Sat Oct 10 02:09:05 2020 +0300
+
+    xfree86: Implement a test input driver
+    
+    Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
+
+commit f95d81e88be07f43c91660e675d077ccd9ee47a9
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Mon Dec 7 14:21:56 2020 +0100
+
+    xwayland: Hold window buffer until released
+    
+    The window buffer mechanism would free the pixmap and its corresponding
+    Wayland buffer as soon as window buffers are disposed.
+    
+    Typically when the X11 window is unrealized, the current window buffer
+    is still used by the Wayland compositor and yet Xwayland will destroy
+    the buffer.
+    
+    As a matter of fact, Xwayland should not destroy the Wayland buffer
+    before the wl_buffer.release event is received.
+    
+    Add a reference counter to the window buffer similar to the to pixmap
+    reference counter to keep the buffer around until the release callback
+    is received.
+    
+    Increase that reference counter on the buffer which will be attached to
+    the surface, and drop that reference when receiving the release callback
+    notification.
+    
+    v2: Use a specific reference counter on the buffer rather than relying
+        on the pixmap refcnt (Michel Dänzer <mdaenzer@redhat.com>)
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+    Acked-by: Martin Peres <martin.peres@mupuf.org>
+
+commit 85d8eac4bcf44c077bb82aaae10ae45feb9c4e72
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Mon Dec 7 14:09:58 2020 +0100
+
+    xwayland: Hold cursor buffer until released
+    
+    The cursor code would destroy the buffer as soon as the cursor is
+    unrealized on X11 side.
+    
+    Yet, the Wayland compositor may still be using the buffer as long as a
+    released callback has not been received.
+    
+    Increase the reference counter on the pixmap to hold a reference on the
+    pixmap when attaching it to the surface and use the new pixmap release
+    callback mechanism to release that reference when the buffer is
+    released.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Acked-by: Martin Peres <martin.peres@mupuf.org>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit 79afbd608b7e6abc5d6d0f7e1fb6e460500c7934
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Thu Dec 10 10:10:05 2020 +0100
+
+    xwayland: Factorize common cursor code
+    
+    The seat and tablet cursor functions are very similar, factorize the
+    commonalities to simplify the code and reduce the copy/paste.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit 36e353bcf428c4e6a31292ffa749ea6395cba4a3
+Author: Prabhu Sundararaj <prabhu.sundararaj@nxp.com>
+Date:   Wed Nov 25 08:02:41 2020 +0100
+
+    Remove check for useSIGIO option
+    
+    Commit 6a5a4e60373c1386b311b2a8bb666c32d68a9d99 removed the option to
+    configure useSIGIO option. Indeed, the xfree86 SIGIO support was
+    reworked to use internal versions of OsBlockSIGIO and OsReleaseSIGIO.
+    
+    As a result, useSIGIO is no longer needed and can dropped
+    
+    Fixes: 6a5a4e60 - Remove SIGIO support for input [v5]
+    Closes: xorg/xserver#1107
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+    Signed-off-by: Prabhu Sundararaj <prabhu.sundararaj@nxp.com>
+    Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>
+    Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+
+commit 95539ab37baa1292d1f2daaa552f9741b0364cad
+Author: Mariusz Ceier <mceier+freedesktop@gmail.com>
+Date:   Wed Dec 2 12:29:15 2020 +0100
+
+    xwayland: Replace LogMessage with LogMessageVerb
+    
+    LogMessage logs only when the XLOG_VERBOSITY is >= 1, but by default
+    XLOG_VERBOSITY is 0, so for example warning about deprected -listen
+    parameter is never shown when running "Xwayland -listen 32 -help".
+    
+    Signed-off-by: Mariusz Ceier <mceier+freedesktop@gmail.com>
+
+commit 74627d13c75cab7aa73c0e713feae0934e780ba0
+Author: Michal Srb <msrb@suse.com>
+Date:   Thu Jun 21 13:44:04 2018 +0200
+
+    xkb: Fix heap overflow caused by optimized away min.
+    
+    Calling strlen on char[4] that does not need to contain '\0' is wrong and X
+    server may end up running into uninitialized memory.
+    
+    In addition GCC 8 is clever enough that it knows that strlen on char[4] can
+    return 0, 1, 2, 3 or cause undefined behavior. With this knowledge it can
+    optimize away the min(..., 4). In reality it can cause the memcpy to be called
+    with bigger size than 4 and overflow the destination buffer.
+    
+    Fixes: 83913de25d35 (xkb: Silence some compiler warnings)
+    Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/288
+    Signed-off-by: Matt Turner <mattst88@gmail.com>
+
+commit 446ff2d3177087b8173fa779fa5b77a2a128988b
+Author: Matthieu Herrb <matthieu@herrb.eu>
+Date:   Thu Nov 12 19:15:07 2020 +0100
+
+    Check SetMap request length carefully.
+    
+    Avoid out of bounds memory accesses on too short request.
+    
+    ZDI-CAN 11572 /  CVE-2020-14360
+    
+    This vulnerability was discovered by:
+    Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
+    
+    Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
+
+commit 87c64fc5b0db9f62f4e361444f4b60501ebf67b9
+Author: Matthieu Herrb <matthieu@herrb.eu>
+Date:   Sun Oct 11 17:05:09 2020 +0200
+
+    Fix XkbSetDeviceInfo() and SetDeviceIndicators() heap overflows
+    
+    ZDI-CAN 11389 / CVE-2020-25712
+    
+    This vulnerability was discovered by:
+    Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
+    
+    Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
+
+commit 11652706b0aa7d2609b710db0bd1262c5f6ed596
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Fri Nov 20 16:54:02 2020 +0100
+
+    present/wnmd: Translate update region to screen space
+    
+    The region as passed in is in the source pixmap's coordinate space, so
+    intersecting it with the clipList (which is in screen space) resulted in
+    disappointment.
+    
+    Fixes Firefox popups such as the hamburger menu when using the EGL
+    backend.
+    
+    v2:
+    * Drop vblank->x/y_off from RegionTranslate call, since they're always
+      0 here (present_wnmd_check_flip rejects flips for x/y_off != 0).
+    
+    Reported-by: Robert Mader <robert.mader@posteo.de>
+    Tested-by: Robert Mader <robert.mader@posteo.de>
+    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
+    Tested-by: Joakim Tjernlund <joakim.tjernlund@infinera.com> # v1
+
+commit b0530fe42286f340032566ce0bf22a5e9ddfe67f
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Tue Jan 28 18:51:53 2020 +0100
+
+    glx: Remove unused bswap_CARD64
+    
+    GCC warned about it:
+    
+    ../../../glx/indirect_dispatch_swap.c:85:1: warning: ‘bswap_CARD64’ defined but not used [-Wunused-function]
+       85 | bswap_CARD64(const void *src)
+          | ^~~~~~~~~~~~
+
+commit 3ce05a44f3d9b114af936f39e3f44552c5bf2c43
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Thu Nov 26 14:39:32 2020 +0100
+
+    modesetting: Fix build with DebugPresent() enabled
+    
+    By default, the macro DebugPresent() is a no-op but it can be enabled
+    at build time for debugging purpose.
+    
+    However, doing so prevents the code to build because one debug statement
+    tries to make use of a non-existent variable:
+    
+      present.c: In function ‘ms_present_queue_vblank’:
+      present.c:147:18: error: ‘vbl’ undeclared (first use in this function)
+        147 |                  vbl.request.sequence));
+            |                  ^~~
+      present.c:49:32: note: in definition of macro ‘DebugPresent’
+        49 | #define DebugPresent(x) ErrorF x
+           |                                ^
+    
+    Fix the build with DebugPresent() by removing the vbl variable from the
+    debug message.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+
+commit 95b79aa907789a16f736097abe959e906f86f63a
+Author: Erik Kurzinger <ekurzinger@nvidia.com>
+Date:   Fri Nov 13 14:36:14 2020 -0800
+
+    GLX: fix context render type queries
+    
+    Querying the GLX_RENDER_TYPE of a GLX context via glXQueryContext will
+    currently return the render type of the context's FB config, which is
+    a bitmask of GLX_RGBA_BIT / GLX_COLOR_INDEX_BIT / ... values. However,
+    this query should really return the render type that was specified
+    when creating the context, which is one of GLX_RGBA_TYPE /
+    GLX_COLOR_INDEX_TYPE / .... To enable this, save the render type when
+    creating a new context (defaulting to GLX_RGBA_TYPE if unspecified),
+    and then include this value in the context attributes sent to clients.
+
+commit 9c81b8f5b5d7bc987f73e8ef01a81e61205e58ee
+Author: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date:   Wed Jan 8 22:51:42 2020 +0100
+
+    configure.ac: KMS support also depends on dri2
+    
+    Kernel modesettings support also depends on dri2, see
+    http://cgit.freedesktop.org/xorg/xserver/tree/hw/xfree86/drivers/modesetting/Makefile.am#n46
+    
+    Fix #479
+    
+    Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
+    [Patch retrieved (with a small update of commit message) from:
+    https://git.buildroot.net/buildroot/tree/package/x11r7/xserver_xorg-server/1.20.6/0001-modesettings-needs-dri2.patch]
+    Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+
+commit 682167475c1930f80a68de58e522ac08dbb35fa8
+Author: Böszörményi Zoltán <zboszor@pr.hu>
+Date:   Thu Nov 14 09:29:20 2019 +0100
+
+    Introduce and use BUS_USB
+    
+    With !155, the device bus ID received via udev is constructed
+    properly with the "usb:" prefix. But, it is not enough to
+    make the following line to work in Section "Device":
+    
+        BusID  "usb:0:1.2:1.0"
+    
+    Introduce BUS_USB, so the prefix can be distinguished from BUS_PCI
+    and check the supplied BusID value against device->attribs->busid
+    in xf86PlatformDeviceCheckBusID().
+    
+    Signed-off-by: Böszörményi Zoltán <zboszor@pr.hu>
+
+commit c0dcadad6c18b06ddc6e349d7c58bfccb715ff55
+Author: Reza Arbab <arbab@linux.ibm.com>
+Date:   Wed Mar 27 11:45:02 2019 -0500
+
+    linux: Fix udev ID_PATH parsing for udl devices
+    
+    The ID_PATH for a udl device looks like this:
+    
+      $ udevadm info /dev/dri/card2 | grep -w ID_PATH
+      E: ID_PATH=pci-0000:00:14.0-usb-0:9.1:1.0
+    
+    The parsing added in 0816e8fca6194 ("linux: Make platform device probe
+    less fragile"), sets OdevAttributes::busid to "pci:0000:00:14.0", where
+    drmGetBusid() would have returned "3-9.1:1.0".
+    
+    Identifying this as a "pci:*" device eventually causes the vendor/device
+    id check in probeSingleDevice() to fail, because a USB controller isn't
+    a supported device:
+    
+      $ udevadm info --path=/devices/pci0000:00/0000:00:14.0 | grep -e VENDOR -e ID_PCI_CLASS
+      E: ID_PCI_CLASS_FROM_DATABASE=Serial bus controller
+      E: ID_VENDOR_FROM_DATABASE=Intel Corporation
+    
+    Instead of parsing out "pci:0000:00:14.0" in this case, use
+    "usb:0:9.1:1.0" so the device probe will succeed.
+    
+    Fixes: 0816e8fca6194 ("linux: Make platform device probe less fragile")
+    Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
+
+commit af4622d3f90382225afb83e3896cb6f236f30c0a
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date:   Fri Nov 20 19:43:25 2020 -0800
+
+    modesetting: Add missing copyright notices
+    
+    I forgot to add these in commits 4fefe73fe, b6985d6b3, 245b9db03, and 4e670f128.
+    
+    Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
+
+commit 07e6935030c8f0a757bce0a90c54b59d8bf47df6
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Sat Oct 10 02:51:40 2020 +0300
+
+    test/xi2: Fix mask size in XISelectEvents test
+    
+    XI2LASTEVENT identifies the bit number, not the mask size in bits. The
+    mask size in bits is XI2LASTEVENT + 1 and the mask size in bytes is
+    (XI2LASTEVENT + 8) / 8 or XI2MASKSIZE.
+
+commit f5220117e970a40c09babe199709bb2db69c4311
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Sat Oct 10 02:51:39 2020 +0300
+
+    dix: Extract FreezeThisEventIfNeededForSyncGrab()
+
+commit 36f8dacc0652ddc5657e70942269f1f9e22710c6
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Sat Oct 10 02:51:37 2020 +0300
+
+    dix: Extract ActivateGrabNoDeliver()
+
+commit 23a8b62d34344575f9df9d057fb74bfefa94a77b
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Sat Oct 10 02:51:36 2020 +0300
+
+    dix: Store replayed event into GrabInfoRec struct as InternalEvent*
+
+commit 8bd8b3af1931629db548d39bb390edbef4315b0b
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Sat Oct 10 02:51:35 2020 +0300
+
+    dix: Rename LISTENER_* to TOUCH_LISTENER_*
+
+commit f6e0bf68333f7edb02e3b937bc164f6591da2320
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Sat Oct 10 02:51:34 2020 +0300
+
+    Xi: Make check_for_touch_selection_conflicts() more generic
+
+commit 56d720592155c55617728e8ddf1ba8192fe5d46c
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Sat Oct 10 02:51:33 2020 +0300
+
+    dix: Extract DeliverDeviceClassesChangedEvent() utility function
+
+commit 5b0c5344b7131f0812bcbf070194adaa2175d150
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Sat Oct 10 02:51:32 2020 +0300
+
+    dix: Extract CopySprite() utility
+
+commit acd819ac07bf66165f5d44af4a224f68c31bc30d
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Sat Oct 10 02:51:31 2020 +0300
+
+    dix: Extract FixUpXI2DeviceEventFromWindow()
+
+commit bb7aab6afe8655fc40ecff49791889b6512bb6a0
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Sat Nov 21 15:45:49 2020 +0000
+
+    hw/xwin: Fix building with -fno-common
+    
+    Provide an actual definition of noDriExtension where used, rather than a
+    tentative definition in a header, to fix compilation with -fno-common
+    (the default with gcc 10).
+
+commit d18dcecbe08a9ff22e43f12b6b7679a6ef1a6eb0
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Mon Nov 2 10:24:45 2020 +0100
+
+    xwayland: Clean up pending eglstream on pixmap destroy
+    
+    EGLStream implementation in Xwayland keeps a list of pending streams for
+    a window.
+    
+    If the windows's pixmap is destroyed while there is a pending stream,
+    the pending stream will point to freed memory once the callback is
+    triggered.
+    
+    Make sure to cancel the pending stream if there's one when the pixmap is
+    destroyed.
+    
+    v2:
+     * Use xorg_list_for_each_entry() instead of the safe variant (Michel
+       Dänzer <mdaenzer@redhat.com>)
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Tested-by: Karol Szuster <karolsz9898@gmail.com>
+    Acked-by: Michel Dänzer <mdaenzer@redhat.com>
+    Closes https://gitlab.freedesktop.org/xorg/xserver/-/issues/1096
+
+commit 662b2bcb84d5782aff1b93732eb010b0b43e5706
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Tue Sep 22 09:54:15 2020 +0200
+
+    xwayland: Use the pixmap release callback with EGLStream
+    
+    Commit 77658741 - "xwayland: Add buffer release callback" added an API
+    to deal with Wayland buffer release callbacks.
+    
+    The EGLstream implementation has its own wl_buffer callback, move that
+    to the buffer release API instead so we don't have to deal with Wayland
+    buffers directly and match the other Xwayland pixmap backend
+    implementations.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+    Tested-by: Erik Kurzinger <ekurzinger@nvidia.com>
+
+commit e538601128c1a8bb4247a817da2bbb3f671811b3
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sun Nov 1 15:52:48 2020 -0800
+
+    int10: wrap entire V_ADDR_R* macros in parens for safer expansion
+    
+    Resolves warnings from Oracle Parfait static analyser:
+    
+    Error: Misleading macro
+       Misleading macro [misleading-macro]:
+          misleading evaluation of ternary '?:' operator in expansion of macro V_ADDR_RB due to missing parentheses
+            at line 392 of hw/xfree86/int10/generic.c.
+            '|' operator has higher precedence than ternary '?:' operator inside macro body at line 431
+            low precedence ternary '?:' operator is hidden by expansion of macro V_ADDR_RB at line 431
+       Misleading macro [misleading-macro]:
+          misleading evaluation of ternary '?:' operator in expansion of macro V_ADDR_RB due to missing parentheses
+            at line 392 of hw/xfree86/int10/generic.c.
+            '<<' operator has higher precedence than ternary '?:' operator inside macro body at line 431
+            low precedence ternary '?:' operator is hidden by expansion of macro V_ADDR_RB at line 431
+       Misleading macro [misleading-macro]:
+          misleading evaluation of ternary '?:' operator in expansion of macro V_ADDR_RB due to missing parentheses
+            at line 392 of hw/xfree86/int10/generic.c.
+            '<<' operator has higher precedence than ternary '?:' operator inside macro body at line 442
+            low precedence ternary '?:' operator is hidden by expansion of macro V_ADDR_RB at line 442
+       Misleading macro [misleading-macro]:
+          misleading evaluation of ternary '?:' operator in expansion of macro V_ADDR_RB due to missing parentheses
+            at line 392 of hw/xfree86/int10/generic.c.
+            '<<' operator has higher precedence than ternary '?:' operator inside macro body at line 443
+            low precedence ternary '?:' operator is hidden by expansion of macro V_ADDR_RB at line 443
+       Misleading macro [misleading-macro]:
+          misleading evaluation of ternary '?:' operator in expansion of macro V_ADDR_RB due to missing parentheses
+            at line 392 of hw/xfree86/int10/generic.c.
+            '|' operator has higher precedence than ternary '?:' operator inside macro body at line 443
+            low precedence ternary '?:' operator is hidden by expansion of macro V_ADDR_RB at line 441
+       Misleading macro [misleading-macro]:
+          misleading evaluation of ternary '?:' operator in expansion of macro V_ADDR_RB due to missing parentheses
+            at line 392 of hw/xfree86/int10/generic.c.
+            '<<' operator has higher precedence than ternary '?:' operator inside macro body at line 443
+            low precedence ternary '?:' operator is hidden by expansion of macro V_ADDR_RB at line 443
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit a6574033f464c7cde02bce8f1b130ff6b2b2d9eb
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sun Nov 1 15:45:08 2020 -0800
+
+    xkb: always set *mask_rtrn in XkbVirtualModsToReal
+    
+    Resolves warning from Oracle Parfait static analyser:
+    
+    Error: Uninitialised memory
+       Uninitialised memory variable [uninitialised-mem-var] (CWE 457):
+          Possible access to uninitialised memory referenced by variable 'mask'
+            at line 721 of xkb/XKBMisc.c in function 'XkbUpdateKeyTypeVirtualMods'.
+            Path in callee avoiding write at line 720
+              mask allocated at line 718
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 034e792662a1c0c6ab52190e457b1f017bec01c6
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sun Nov 1 13:55:59 2020 -0800
+
+    dmx: example code should set a good example
+    
+    Resolves warning from Oracle Parfait static analyser:
+    
+    Error: Unchecked result
+       Unchecked result [unchecked-result-call-X]:
+          Unchecked return value from call to XOpenDisplay. Value display must be ch
+    ecked to ensure this function was successful.
+            at line 73 of hw/dmx/examples/xbell.c in function 'main'.
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit d00594ebc7941a5491ad5583d6890ab7dc2ffc43
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sun Nov 1 13:38:21 2020 -0800
+
+    AddInputDevice: only need to check once if we failed to calloc dev
+    
+    Resolves warning from Oracle Parfait static analyser:
+    
+    Warning: Impossible or redundant condition
+       Impossible or redundant condition [impossible-redundant-condition]:
+          Condition 'dev != NULL' of branch is determined by previous branch
+            at line 270 of dix/devices.c in function 'AddInputDevice'.
+              Condition 'dev != NULL' from this branch implies following branch is always true at line 262
+    
+    Fixes: commit 493ad83323
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 250db8708ac7ab11356b42faa493b6f1ba753013
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Tue Sep 15 11:49:20 2020 +0200
+
+    xwayland: Add and hook up test script
+    
+    It runs XTS via piglit on (non-rootless) Xwayland on weston using the
+    headless backend.
+    
+    Xwayland might use glamor if enabled in the build, but we're making sure
+    it uses software rendering.
+    
+    v2:
+    * Use weston-info to wait for weston to be ready, instead of just a
+      fixed sleep. (Martin Peres)
+    v3:
+    * Build wayland 1.18 & weston 9.0 locally, since the packages in Debian
+      buster are too old for current Xwayland.
+    
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
+
+commit 821399a9c920323e4934a2fd6375b86a151fa83c
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Wed Nov 11 12:45:36 2020 +0100
+
+    ci: Base docker image on Debian buster instead of testing
+    
+    By its nature, testing incurs a risk of breaking something every time
+    we bump the image.
+    
+    This requires building wayland-protocols locally, since the package in
+    buster is too old for current Xwayland.
+    
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
+
+commit ab73c16930d67e5c80a23727804850406309b787
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Wed Sep 16 16:32:02 2020 +0200
+
+    ci: Update to the latest templates
+    
+    They now ensure the image is up to date in forked projects, and we no
+    longer need to reconstruct the image name.
+    
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
+
+commit 852d6d49109a3f0a9a73c86f5d5165d2c8dc5cbe
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Thu Nov 12 12:19:09 2020 +0100
+
+    ci: Explicitly list packages needed to build xserver
+    
+    Instead of relying on apt-get build-dep.
+    
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
+
+commit 8469935fe26659219560f425c7b35d564ad77324
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Thu Nov 12 12:01:45 2020 +0100
+
+    ci: Use a variable for ephemeral packages
+    
+    So that they only need to be listed once.
+    
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
+
+commit 996ba1b99a7212471d3c24359056c412de70c28d
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Wed Nov 11 18:22:28 2020 +0100
+
+    ci: Remove rendercheck Git tree
+    
+    Noticed this was missing while making changes in this area.
+    
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
+
+commit 8fc84a00254f642947397276e14d7740f502895d
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Wed Nov 11 19:02:50 2020 +0100
+
+    ci: Set GIT_STRATEGY=none for the container build job
+    
+    It doesn't need a full checkout of the xserver Git tree, so this can
+    save some time and resources.
+    
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
+
+commit 9a7515943f5a9b70567512cdc48cb2f688b3284b
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Wed Sep 16 12:55:35 2020 +0200
+
+    ci: Use $FDO_CI_CONCURRENT if set
+    
+    To take advantage of more than 4 CPU cores available to the container.
+    
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
+
+commit 28ed4b95e90fb225fc32cfdce16df603ab600fcd
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Tue Nov 10 10:40:05 2020 +0100
+
+    xwayland: Add a man page
+    
+    Xwayland was missing a man page, add one.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Martin Peres <martin.peres@mupuf.org>
+
+commit d14cef853af52408e7ddba31b72cf5ac14389754
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Tue Nov 10 10:02:39 2020 +0100
+
+    xwayland: Do not list option "-eglstream" if not supported
+    
+    As Xwayland is usually spawned by the Wayland server/compositor, its
+    command line options are not always adjustable.
+    
+    Yet, if EGLStream is not supported in a given Xwayland build, the option
+    will do nothing (yet we must still accept it otherwise Xwayland would
+    refuse to run if the Wayland compositor uses it).
+    
+    If Xwayland was built without support for EGLStream, there is not point
+    in showing the option in the help message though.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Martin Peres <martin.peres@mupuf.org>
+
+commit d163f938a00c177c5ff28e779993f18ee69476d4
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Tue Nov 10 09:53:57 2020 +0100
+
+    xwayland: Add help entry for -shm
+    
+    The command line options "-shm" is used to instruct Xwayland to prefer
+    shared-memory for passing buffers to the Wayland server, rather than
+    using glamor and DRI3.
+    
+    The option was there from the beginning, yet not documented in the
+    "-help" message.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Martin Peres <martin.peres@mupuf.org>
+
+commit df3aa4922fd7e256169e541188b724f67ca948e1
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Fri Nov 6 10:14:19 2020 +0100
+
+    xwayland: Make window_get_client_toplevel non-recursive
+    
+    Noticed while reading the code.
+    
+    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
+
+commit 899cebb76ab7754fea49f7babcd64a7e94052cc8
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Tue Oct 27 16:33:55 2020 +0100
+
+    configure: Build hashtable for Xres and glvnd
+    
+    With autoconf, hashtable support is built along with Xres support.
+    
+    Yet, glvnd also use it, so when disabling Xres from configure, the
+    build will fail at link time because hashtable functions are not
+    available.
+    
+    Untie the build of hashtable from Xres support, just like meson build
+    does.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1091
+
+commit 606ba7fc51e5420646f75c4e672fbe61eb7c7e6e
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Thu Nov 5 18:35:54 2020 +0100
+
+    xwayland: Create an xwl_window for toplevel only
+    
+    One general assumption in Xwayland is that the xwl_window remains the
+    same for all the child windows of the toplevel window.
+    
+    When mapping a new X11 window, ensure_surface_for_window() checks for an
+    existing xwl_window by using xwl_window_get() which will just check for
+    the registered xwl_window for the window.
+    
+    That means that a client mapping a child window of an existing window
+    with a xwl_window will get another different xwl_window.
+    
+    If an X11 client issues a Present request on the parent window, hence
+    placed underneath its child window of the same size, the Wayland
+    compositor may not send the frame callback event for the parent's
+    Wayland surface which is reckoned to be not visible, obscured behind
+    the other Wayland surface for the child X11 window.
+    
+    That bug affects some games running in wine which may get 1 fps because
+    the repaint occurs only on timeout with a long interval (as with, e.g.
+    https://bugs.winehq.org/show_bug.cgi?id=47066)
+    
+    Fix ensure_surface_for_window() by using xwl_window_from_window() which
+    will walk the window tree, so that a child window won't get another
+    xwl_window than its parent.
+    
+    https://gitlab.freedesktop.org/xorg/xserver/-/issues/1099
+    See-also: https://bugs.winehq.org/show_bug.cgi?id=47066
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit ffd02d9b26bd560849c407a6dd4f5c4d7d2c1736
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Mon Nov 2 15:44:31 2020 +0100
+
+    xwayland: non-rootless requires the XDG-WM-Base protocol
+    
+    When running non-rootless, Xwayland requires that the Wayland compositor
+    supports the XDG-WM-Base protocol.
+    
+    Check for XDG-WM-Base protocol support at startup and exit cleanly if
+    missing rather than segfaulting later in ensure_surface_for_window()
+    while trying to use xdg_wm_base_get_xdg_surface().
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+    Reviewed-by: Simon Ser <contact@emersion.fr>
+
+commit 7a7e55c5c1d6461a9f4d9a4e0129c1c6e1fd3d66
+Author: Alex Goins <agoins@nvidia.com>
+Date:   Mon Oct 5 18:19:52 2020 -0500
+
+    glamor: Update pixmap's devKind when making it exportable
+    
+    When making a pixmap exportable, glamor will currently create a temporary
+    exported pixmap backed by a GBM bo, with the devKind updated to the stride of
+    the bo. However, when the backing of the exported pixmap is swapped into the
+    original, the devKind of the original is not updated.
+    
+    Some GBM bos may get implicitly padded, in which case the devKind of the pixmap
+    will not match the stride of the backing bo. For example, an 800x600 pixmap will
+    have a devKind of 3200, but the bo's stride will be 3328. This can cause
+    corruption with PRIME, when the sink uses the wrong stride to display the shared
+    pixmap.
+    
+    This commit changes glamor_make_pixmap_exportable() to update the devKind of the
+    original pixmap after it swaps exported pixmap's backing into it, keeping
+    everything consistent.
+    
+    Fixes issue #1018.
+    
+    Signed-off-by: Alex Goins <agoins@nvidia.com>
+    Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit affc47452507d7e4605fd8c9a16db078e4f2aea2
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Sep 22 16:13:00 2020 -0400
+
+    xwayland: Drop the separate refcount for the xwl_pixmap
+    
+    Instead, bump the pixmap's refcount at the bottom of post_damage to
+    reflect the compositor's hold on the buffer, and "destroy" the pixmap in
+    the buffer release callback (which will dec the pixmap's refcount and
+    free if necessary).
+    
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit 4e670f1281ad75c5673b6ac75645036d810da8d9
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date:   Fri Oct 25 00:06:40 2019 -0700
+
+    modesetting: Add CTM RandR property
+    
+    When the "CTM" (color transform matrix) modesetting property is available,
+    create a corresponding RandR property.
+    
+    To match the format of the property available in the amdgpu driver, expose it as
+    an array of 18 32-bit XA_INTEGERs representing a 3x3 matrix in row-major order,
+    where each entry is a S31.32 sign-magnitude fixed-point number with the
+    fractional part listed first.
+    
+    Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
+    Acked-by: Michel Dänzer <mdaenzer@redhat.com>
+    Reviewed-by: James Jones <jajones@nvidia.com>
+
+commit 245b9db03a1e1189b992409283e3d88b5d56e62d
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date:   Thu Oct 24 13:46:35 2019 -0700
+
+    modesetting: Use GAMMA_LUT when available
+    
+    If the kernel exposes GAMMA_LUT and GAMMA_LUT_SIZE properties and the size is
+    not what the server has pre-configured for the crtc, free the old gamma ramp
+    memory allocated by the server and replace it with new allocations of the
+    appropriate size.
+    
+    In addition, when GAMMA_LUT is available, use drmModeCreatePropertyBlob() and
+    drmModeObjectSetProperty() to set the gamma ramp rather than using the legacy
+    drmModeCrtcSetGamma() function.
+    
+    Add a new option "UseGammaLUT" to allow disabling this new behavior and falling
+    back to drmModeCrtcSetGamma() unconditionally.
+    
+    Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
+
+commit b6985d6b3fb3e9ae36f638b0fd65cfad3d4bbd46
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date:   Thu Oct 24 13:41:39 2019 -0700
+
+    modesetting: Query properties even in non-atomic mode
+    
+    Modeset properties can be set even when ms->atomic_modeset is disabled by using
+    the drmModeObjectSetProperty() function.
+    
+    This will be necessary in a later change in order to set the GAMMA_LUT and CTM
+    properties.
+    
+    Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
+
+commit 4fefe73feaee31a992b284963599d63feb598807
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date:   Tue Oct 22 10:06:30 2019 -0700
+
+    modesetting: Store property values in drmmode_prop_info_rec
+    
+    A later change will need to read the value of the GAMMA_LUT_SIZE property.
+    
+    Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
+
+commit 1626e9fa77c0d3715d38ededd43656aa6d942bd9
+Author: Peter Harris <pharris@opentext.com>
+Date:   Wed Sep 30 16:01:06 2020 -0400
+
+    glx: set errorValue when returning GLXBadFBConfig
+    
+    client->errorValue is already set in validGlxFBConfig. Set it in
+    __glXDisp_CreateContextAttribsARB for consistency.
+    
+    Signed-off-by: Peter Harris <pharris@opentext.com>
+
+commit 96d19e898acb56d8fc6e6febbc6498f67cdd66a0
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Thu Sep 24 17:08:27 2020 -0400
+
+    glx: Implement GLX_EXT_get_drawable_type
+    
+    Trivial extension to let the client query whether this is a window
+    pixmap or pbuffer. Mostly for Mesa's convenience when setting up
+    drawable state, but plausibly useful for apps and middleware as well.
+    
+    Upstream OpenGL Registry merge request:
+    
+    https://github.com/KhronosGroup/OpenGL-Registry/pull/425
+
+commit c15dd0ba4893f79f7181e783cb1ba404edca917a
+Author: Bernhard Ãœbelacker <bernhardu@mailbox.org>
+Date:   Sun Sep 27 18:03:48 2020 +0200
+
+    os: Fix instruction pointer written in xorg_backtrace
+    
+    The address retrieved in "pip.start_ip" is not necessarily the same
+    address as unw_get_proc_name finds as nearest symbol and returns in "off".
+    Therefore using "pip.start_ip + off" is not reliable, at least
+    visible in the binaries from the Debian repository.
+    
+    Bug-Debian: https://bugs.debian.org/971088
+    
+    Signed-off-by: Bernhard Ãœbelacker <bernhardu@mailbox.org>
+
+commit acc581c96f16fe3c097dfd0da4ff33f7b104597d
+Author: Dor Askayo <dor.askayo@gmail.com>
+Date:   Sat Sep 26 15:54:45 2020 +0300
+
+    dri3: Add missing libdrm dependency in Makefile.am
+    
+    Fixes: 0ce93e5ba774 "dri3: Include dix-config.h instead of
+                         xorg-config.h"
+    Signed-off-by: Dor Askayo <dor.askayo@gmail.com>
+
+commit efb3abddd49fb75bd6d0e31046fed43d258c93da
+Author: Kishore Kadiyala <kishore.kadiyala@intel.com>
+Date:   Sat Sep 19 01:28:14 2020 +0530
+
+    modesetting: keep going if a modeset fails on EnterVT
+    
+    There was a time when setting a mode on a CRTC would not depend on the
+    associated connector's state. If a mode had been set successfully once,
+    it would mean it would work later on.
+    
+    This changed with the introduction of new connectors type that now
+    require a link training sequence (DP, HDMI 2.0), and that means that
+    some events may have happened while the X server was not master that
+    would then prevent the mode from successfully be restored to its
+    previous state.
+    
+    This patch relaxes the requirement that all modes should be restored on
+    EnterVT, or the entire X-Server would go down by allowing modesets to
+    fail (with some warnings). If a modeset fails, the CRTC will be
+    disabled, and a RandR event will be sent for the desktop environment to
+    fix the situation as well as possible.
+    
+    Additional patches might be needed to make sure that the user would
+    never be left with all screens black in some scenarios.
+    
+    v2 (Martin Peres):
+     - whitespace fixes
+     - remove the uevent handling (it is done in a previous patch)
+     - improve the commit message
+     - reduce the size of the patch by not changing lines needlessly
+     - return FALSE if one modeset fails in ignore mode
+     - add comments/todos to explain why we do things
+     - disable the CRTCs that failed the modeset
+    
+    Signed-off-by: Kishore Kadiyala <kishore.kadiyala@intel.com>
+    Signed-off-by: Martin Peres <martin.peres@linux.intel.com>
+    Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
+    Tested-by: Kishore Kadiyala <kishore.kadiyala@intel.com>
+    Closes: #1010
+
+commit 293cf660c95d7ba36510bcc4114d7fd5c5f3801c
+Author: Martin Peres <martin.peres@linux.intel.com>
+Date:   Fri Apr 24 18:06:16 2020 +0300
+
+    modesetting: check the kms state on EnterVT
+    
+    Normally, we would receive a uevent coming from Linux's DRM subsystem,
+    which would trigger the check for disappearing/appearing resources.
+    However, this event is not received when X is not master (another VT
+    is selected), and so the userspace / desktop environment would not be
+    notified about the changes that happened while X wasn't master.
+    
+    To fix the issue, this patch forces a refresh on EnterVT by splitting
+    the kms-checking code from the uevent handling into its own (exported)
+    function called drmmode_update_kms_state. This function is then called
+    from both the uevent-handling function, and on EnterVT right before
+    restoring the modes.
+    
+    Signed-off-by: Martin Peres <martin.peres@linux.intel.com>
+    Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
+    Acked-by: Kishore Kadiyala <kishore.kadiyala@intel.com>
+    Tested-by: Kishore Kadiyala <kishore.kadiyala@intel.com>
+
+commit 4c00369024c9754e670fca37804711fef2980e2f
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Tue Sep 22 20:53:49 2020 +0300
+
+    Bump input minor ABI due to addition of input event drain callback
+    
+    Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
+
+commit 5eb985e3531b69d3ddc4dc0d4b69b4280b1626f8
+Author: Povilas Kanapickas <povilas@radix.lt>
+Date:   Thu Sep 17 00:55:17 2020 +0300
+
+    mi: Add a callback to notify driver about input event submission
+    
+    This is useful for mock input drivers that control the server in
+    integration tests. Given that input submission happens on a different
+    thread than processing, it's otherwise impossible for the driver to
+    synchronize with the completion of the processing of submitted events.
+    
+    Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
+
+commit a5f439dcd21b4fda093cb382bb1a758b434a1444
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Mon Sep 14 15:39:10 2020 +0200
+
+    xwayland: Remove pending stream reference when freeing
+    
+    The EGLStream backend keeps a queue of pending streams for each Xwayland
+    window.
+    
+    However, when this pending queue is freed, the corresponding private
+    data may not be cleared (typically if the pixmap for this window has
+    changed before the compositor finished attaching the consumer for the
+    window's pixmap's original eglstream), leading to a use-after-free and a
+    crash when trying to use that data as the window pixmap.
+    
+    Make sure to clear the private data when the pending stream is freed.
+    
+    Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1055
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Tested-by: Karol Szuster <karolsz9898@gmail.com>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit 0b86c0c36241989d7e9662d007c5297fe22ae8b5
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Mon Sep 14 14:35:22 2020 +0200
+
+    xwayland: Add a flag for n-buffers in EGL backend
+    
+    Using multiple window buffers crashes with EGLStream, which does not
+    need it anyway as this is handled through EGL directly.
+    
+    Add a flag to the EGL backend to indicate whether it would benefit from
+    multiple buffers and use this in the get_buffer() function.
+    
+    Thanks to Adam Jackson <ajax@redhat.com> for pointing out that issue
+    with EGLStream.
+    
+    v2: Fix logical test (Adam Jackson <ajax@redhat.com>)
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit ae84f14fb554e5ad54c51c2e6d52ab4a68bf7a0a
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Mon Sep 14 14:26:34 2020 +0200
+
+    xwayland: Add a flag to expose EGL backend features
+    
+    The present flip does not work with the EGLStream backend. Similarly,
+    the EGLStream backend does not require the buffer to be flushed as
+    eglSwapBuffers() should take care of this.
+    
+    Instead of actually checking the backend in use in the present code,
+    add a flag in the form of a bitfield to the EGL backend to indicate
+    its features and requirements.
+    
+    This should not introduce any functional change.
+    
+    v2: Fix logical test (Adam Jackson <ajax@redhat.com>)
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit 239ebdc9e447d4f836d0c2aa6068c6064fffb46c
+Author: Greg V <greg@unrelenting.technology>
+Date:   Tue Sep 15 17:41:04 2020 +0300
+
+    xwayland: use drmGetNodeTypeFromFd for checking if a node is a render one
+    
+    Major/minor numbers are a.. major (ha) source of pain in FreeBSD porting.
+    In this case, Xwayland was thinking that /dev/dri/card0 is already a render node,
+    because the st_rdev on FreeBSD was passing the Linux-style check,
+    and because of the assumption, acceleration would fail because
+    various ioctls like AMDGPU_INFO would be denied on the non-render node.
+    
+    Switch to libdrm's function that already works correctly on all platforms.
+    
+    Signed-off-by: Greg V <greg@unrelenting.technology>
+    Reviewed-by: Emmanuel Vadot <manu@FreeBSD.org>
+
+commit add3df2001a2eadc41c47683f50fdc0fd8b14964
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Tue Sep 15 11:43:16 2020 +0200
+
+    Consolidate fourcc.h
+    
+    Move the copy in hw/xfree86/common to include/, and remove the one in
+    hw/kdrive/src/.
+    
+    Fixes DIX glamor code including an xfree86 DDX header.
+
+commit 62d8c1cc69e273199c9eb23e87b8631d32c56d33
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Tue Sep 15 11:41:34 2020 +0200
+
+    present: Include dix-config.h instead of xorg-config.h
+    
+    This is DIX code.
+
+commit 0ce93e5ba774a53459bac8c23016c5d3232038eb
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Tue Sep 15 11:38:55 2020 +0200
+
+    dri3: Include dix-config.h instead of xorg-config.h
+    
+    This is DIX code.
+
+commit 97f858d336a85cb49de6275918793c773d5d9db1
+Author: Uday Kiran Pichika <pichika.uday.kiran@intel.com>
+Date:   Wed Aug 19 16:20:15 2020 +0530
+
+    modesetting: Allow users to opt-in VRR support
+    
+    Fetch VariableRefresh option value from X conf file for
+    modesetting backend DDX driver. This option defaults to false,
+    and must be set to "true" in conf file for variable refresh
+    support in the DDX driver.
+    
+    Signed-off-by: Uday Kiran Pichika <pichika.uday.kiran@intel.com>
+
+commit ede2c32ce116138ddf081932ea2c33bd6f4b6990
+Author: Uday Kiran Pichika <pichika.uday.kiran@intel.com>
+Date:   Thu Jun 18 16:07:33 2020 +0530
+
+    modesetting: Detect changes to the _VARIABLE_REFRESH window properties
+    
+    Window wrappers gets the notification when the window
+    properties changes. These wrappers are mainly used to
+    keep track of per-window _VARIABLE_REFRESH property values.
+    
+    These changes have been ported from AMDGPU
+    
+    Signed-off-by: Uday Kiran Pichika <pichika.uday.kiran@intel.com>
+
+commit 9823ea4ed24db76b1e61d69a8da8f7599857d02a
+Author: Uday Kiran Pichika <pichika.uday.kiran@intel.com>
+Date:   Thu Jun 18 11:31:31 2020 +0530
+
+    modesetting: Lay the foundation for enabling VRR
+    
+    These changes have been ported from AMD GPU DDX driver.
+    
+    This patch adds support for setting the CRTC variable refresh property
+    for suitable windows flipping via the Present extension.
+    
+    In order for a window to be suitable for variable refresh it must have
+    the _VARIABLE_REFRESH property set by the MESA and inform Modesetting
+    DDX driver with window property updates.
+    
+    Then the window must pass the checks required to be suitable for
+    Present extension flips - it must cover the entire X screen and no
+    other window may already be flipping. And also DRM connector should
+    be VRR capable.
+    
+    With these conditions met every CRTC for the X screen will have their
+    variable refresh property set to true.
+    
+    Kernel Changes to support this feature in I915 driver is under development.
+    
+    Tested with DOTA2, Xonotic and custom GLX apps.
+    
+    Signed-off-by: Uday Kiran Pichika <pichika.uday.kiran@intel.com>
+
+commit 42878790708c2a9ecdbb81f635e5e3a34842e34c
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Fri Sep 4 13:03:35 2020 +0200
+
+    present/wnmd: Remove no-op present_wnmd_flip_destroy
+    
+    Reviewed-by: Roman Gilg <subdiff@gmail.com>
+
+commit 59c40b0ee7cd864dd098f5ac41bbfe96e7bd0e9b
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Fri Sep 4 13:02:04 2020 +0200
+
+    present/wnmd: Remove dead present_wnmd_can_window_flip
+    
+    present_can_window_flip is only called from the Xorg modesetting
+    driver, never in WNMD mode.
+    
+    Reviewed-by: Roman Gilg <subdiff@gmail.com>
+
+commit b6b1161fd7ac409156fb69439897bcabdeacf393
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Fri Sep 4 12:50:00 2020 +0200
+
+    present/wnmd: Remove dead check from present_wnmd_check_flip
+    
+    present_wnmd_toplvl_pixmap_window returns a window with the same window
+    pixmap, so the check could never fail.
+    
+    Reviewed-by: Roman Gilg <subdiff@gmail.com>
+
+commit 4c25356d6cd908c5030c70e712076dff318ac00d
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Thu Aug 27 18:36:15 2020 +0200
+
+    xwayland: Check window pixmap in xwl_present_check_flip2
+    
+    We can only flip if the window pixmap matches that of the toplevel
+    window. Doing so regardless could cause the toplevel window pixmap to
+    get destroyed while it was still referenced by the window, resulting in
+    use-after-free and likely a crash.
+    
+    Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1033
+    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Roman Gilg <subdiff@gmail.com>
+
+commit 7ac303c7b1e3b1be79ba3648e217798683e65a99
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Fri Aug 28 11:57:39 2020 +0200
+
+    present/wnmd: Can't use page flipping for windows clipped by children
+    
+    Noticed this was missing while working on the following fix.
+    
+    v2:
+    * Dropped present_wnmd_can_window_flip hunk (that function is never
+      called, will be cleaned up in a follow-up MR).
+    
+    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com> # v1
+    Reviewed-by: Roman Gilg <subdiff@gmail.com>
+
+commit 727df0a74e75982f4352f0a3e574fcf6db3372f7
+Author: Roman Gilg <subdiff@gmail.com>
+Date:   Mon Aug 10 19:14:28 2020 +0200
+
+    xwayland: Replace need_rotate boolean with simple check on xdg-output
+    
+    The need_rotate variable is only used once anymore and had semantics which lead
+    to errors in the past. In particular when negated we are dealing with a double
+    negation.
+    
+    The variable gets replaced with a simple check on the xdg-output directly.
+    
+    Signed-off-by: Roman Gilg <subdiff@gmail.com>
+
+commit da791ed9fdc715dcbe73c60a4c4ab2d385ab28e4
+Author: Roman Gilg <subdiff@gmail.com>
+Date:   Thu Aug 13 16:55:03 2020 +0200
+
+    Revert "xserver: Fix a typo"
+    
+    This reverts commit 427f8bc00981703abe3153b6da575faa69fe2748.
+    
+    When receiving an output update for the mode size we need to rotate the stored
+    width and height values if and only if we have an xdg-output for this output
+    since in this case the stored values describe the output's size in logical
+    space, i.e. rotated.
+    
+    The here reverted commit made a code change with which we would not rotate though
+    when an xdg-output was available since in this case the need_rotate variable was
+    set to False what caused in the check afterwards the first branch to execute.
+
+commit 92f4a9ade3c97bda833b0e10f10856b2542f793c
+Author: Roman Gilg <subdiff@gmail.com>
+Date:   Mon Aug 10 19:01:52 2020 +0200
+
+    xwayland: Switch width and height argument order
+    
+    That is just a small style-change to the output_get_new_size function. The
+    function before did take first the height and then the width argument, what
+    is unusual since resolutions are normally named the other way around, for
+    example 1920x1080. Also compare the update_screen_size function.
+    
+    Therefore change the order of arguments for output_get_new_size.
+    
+    Signed-off-by: Roman Gilg <subdiff@gmail.com>
+
+commit 1805383d9eb17ef8ac159366c684ac85b3d53731
+Author: Roman Gilg <subdiff@gmail.com>
+Date:   Mon Aug 10 18:58:56 2020 +0200
+
+    xwayland: simplify output_get_new_size function
+    
+    We can just read out the xdg_output field of the provided xwl_output to check
+    if a rotation is necessary or not.
+    
+    This makes the function easier to understand. Additionally some documentation
+    is added.
+    
+    Signed-off-by: Roman Gilg <subdiff@gmail.com>
+
+commit 919f1f46fc67dae93b2b3f278fcbfc77af34ec58
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Mon Aug 31 12:10:43 2020 +0200
+
+    xfree86: Take second reference for SavedCursor in xf86CursorSetCursor
+    
+    The same pointer is kept in CurrentCursor as well, therefore two
+    RefCursor calls are needed.
+    
+    Fixes use-after-free after switching VTs.
+    
+    Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1067
+
+commit 2902b78535ecc6821cc027351818b28a5c7fdbdc
+Author: Matthieu Herrb <matthieu@herrb.eu>
+Date:   Tue Aug 18 14:55:01 2020 +0200
+
+    Fix XRecordRegisterClients() Integer underflow
+    
+    CVE-2020-14362 ZDI-CAN-11574
+    
+    This vulnerability was discovered by:
+    Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
+    
+    Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
+
+commit 144849ea27230962227e62a943b399e2ab304787
+Author: Matthieu Herrb <matthieu@herrb.eu>
+Date:   Tue Aug 18 14:52:29 2020 +0200
+
+    Fix XkbSelectEvents() integer underflow
+    
+    CVE-2020-14361 ZDI-CAN 11573
+    
+    This vulnerability was discovered by:
+    Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
+    
+    Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
+
+commit c940cc8b6c0a2983c1ec974f1b3f019795dd4cff
+Author: Matthieu Herrb <matthieu@herrb.eu>
+Date:   Tue Aug 18 14:49:04 2020 +0200
+
+    Fix XIChangeHierarchy() integer underflow
+    
+    CVE-2020-14346 / ZDI-CAN-11429
+    
+    This vulnerability was discovered by:
+    Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
+    
+    Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
+
+commit f7cd1276bbd4fe3a9700096dec33b52b8440788d
+Author: Matthieu Herrb <matthieu@herrb.eu>
+Date:   Tue Aug 18 14:46:32 2020 +0200
+
+    Correct bounds checking in XkbSetNames()
+    
+    CVE-2020-14345 / ZDI 11428
+    
+    This vulnerability was discovered by:
+    Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
+    
+    Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
+
+commit 1cccb486d48a5d2e7649836b993805bb65dc09e3
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Tue Jul 28 18:40:47 2020 +0200
+
+    present/wnmd: Execute copies at target_msc-1 already
+    
+    It always takes one update cycle for the copy to become visible on the
+    host windowing system, so waiting for the target MSC resulted in 1 cycle
+    delay.
+    
+    We re-use the idle list for copies which were executed but need their
+    completion event sent.
+    
+    Fixes black seams when resizing the "Builder" sub-window of
+    
+     GDK_BACKEND=x11 gtk4-demo
+    
+    on Xwayland (see
+    https://gitlab.gnome.org/GNOME/mutter/-/issues/1290#note_873557).
+    
+    Unfortunately, this cannot completely fix the seams with apps which
+    queue up multiple frames in advance, since there's always at least one
+    queued frame corresponding to the old window size. But it should at
+    least help a little in that case as well.
+    
+    v2:
+    * Bug fix: Don't update exec_msc in present_wnmd_check_flip_window.
+      (Roman Gilg)
+    * Use exec_msc = target_msc - 1 instead of exec_msc--, and add a
+      comment, for clarity.
+    v3:
+    * Drop exec_msc = target_msc again in present_wnmd_execute.
+    * present_execute_copy should never set vblank->queued in
+      present_wnmd_execute now, so replace that branch with an assertion.
+      (Roman Gilg)
+    
+    Reviewed-by: Roman Gilg <subdiff@gmail.com>
+    Tested-by: Roman Gilg <subdiff@gmail.com>
+
+commit d14ea667feccf085c7d66a7c63f380975e07af66
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Tue Jul 28 18:53:45 2020 +0200
+
+    present/wnmd: Move up present_wnmd_queue_vblank
+    
+    Allowing it to be called from more functions than before. No functional
+    change.
+    
+    Reviewed-by: Roman Gilg <subdiff@gmail.com>
+    Tested-by: Roman Gilg <subdiff@gmail.com>
+
+commit b0b3159abd8001fa3f6dfc44a288a95a62aa5cf6
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Wed Aug 12 17:38:33 2020 +0200
+
+    present: Add present_vblank::exec_msc field
+    
+    For tracking the MSC when the present can be executed separately from
+    the target MSC.
+    
+    Allows removing the requeue field instead, plus more later.
+    
+    v2:
+    * Rename wait_msc → exec_msc (Roman Gilg)
+    * Use exec_msc = target_msc instead of exec_msc++, for clarity.
+    * Bug fix: Set exec_msc = target_msc also if present_flip returned
+      false in present_execute.
+    v3:
+    * Set exec_msc = target_msc also if present_wnmd_flip returned
+      false in present_wnmd_execute, for consistency.
+    v4:
+    * Specifically check for exec_msc == crtc_msc + 1 in
+      present_execute_wait/copy, to avoid re-introducing
+      https://bugs.freedesktop.org/show_bug.cgi?id=94596 .
+    
+    Reviewed-by: Roman Gilg <subdiff@gmail.com>
+    Tested-by: Roman Gilg <subdiff@gmail.com>
+
+commit 4c92dea952f7fed19857904f0f552900257ef4b9
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Tue Jul 28 18:48:42 2020 +0200
+
+    present: Move flip target_msc adjustment out of present_vblank_create
+    
+    Preparation for different handling between SCMD & WNMD. No functional
+    change intended.
+    
+    Reviewed-by: Roman Gilg <subdiff@gmail.com>
+    Tested-by: Roman Gilg <subdiff@gmail.com>
+
+commit 032af35657aa95c6bbdb74ff8c72e535b9b56cfa
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Fri Jul 24 18:21:05 2020 +0200
+
+    glamor: Fix glamor_poly_fill_rect_gl xRectangle::width/height handling
+    
+    (Using GLSL 1.30 or newer)
+    
+    The width/height members of xRectangle are unsigned, but they were
+    being interpreted as signed when converting to floating point for the
+    vertex shader, producing incorrect drawing for values > 32767.
+    
+    v2:
+    * Use separate GL_UNSIGNED_SHORT vertex attribute for width/height.
+      (Eric Anholt)
+    
+    Reviewed-by: Eric Anholt <eric@anholt.net>
+
+commit b22b4da980b763af5124f26627cad93983542d6b
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Fri Aug 14 19:19:46 2020 -0400
+
+    glamor: Fix debugging callback setup on GLES
+    
+    You will not find GL_ARB_* extensions in a GLES context by definition,
+    the droid you're looking for is named GL_KHR_debug.
+    
+    Reviewed-by: Eric Anholt <eric@anholt.net>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit 5c20e4b834145f590c68dbc98e33c7d3d710001a
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Wed Jun 3 10:17:13 2020 +0200
+
+    xwayland: Disable the MIT-SCREEN-SAVER extension when rootless
+    
+    Xwayland is just a Wayland client, no X11 screensaver should be
+    expected to work reliably on Xwayland when running rootless because
+    Xwayland cannot grab the input devices so it has no way to actually
+    lock the screen managed by the Wayland compositor.
+    
+    Turn off the screensaver on Xwayland when running rootless by setting
+    the screensaver timeout and interval and their default values to zero
+    and disable the MIT-SCREEN-SAVER extension.
+    
+    Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1051
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit aac28e162e5108510065ad4c323affd6deffd816
+Author: Matthieu Herrb <matthieu@herrb.eu>
+Date:   Sat Jul 25 19:33:50 2020 +0200
+
+    fix for ZDI-11426
+    
+    Avoid leaking un-initalized memory to clients by zeroing the
+    whole pixmap on initial allocation.
+    
+    This vulnerability was discovered by:
+    Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
+    
+    Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
+    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 9d8e7c4828747f6bba438528c6ef6e2577b50522
+Author: Ignacio Casal Quinteiro <qignacio@amazon.com>
+Date:   Thu Jul 16 10:19:43 2020 +0200
+
+    XKB: Add debug key actions for grabs & window tree
+    
+    Replicate 7d2543a3cb3089241982ce4f8984fd723d5312a1 but for
+    all types of X servers
+
+commit c24eb7e31e750d2b9ba8f1b72f53b07a57495395
+Author: Roman Gilg <subdiff@gmail.com>
+Date:   Tue Jul 28 20:24:50 2020 +0200
+
+    xwayland: Simplify Present event handling code
+    
+    Instead of optionally return early when an event is aborted and potentially
+    clean it up in there we can only optionally inform Present if not aborted and
+    afterwards clean it up if required.
+    
+    Saves some lines of code and conditional branches.
+    
+    Signed-off-by: Roman Gilg <subdiff@gmail.com>
+
+commit 06901e12c07691112b91b26b0c2000f8971e48b5
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Thu Jun 4 13:25:45 2020 +0100
+
+    meson: Also ignore kms, kms_udev, hal options on Cygwin
+
+commit 4c2d1fe0454ca2b7c13e600a31f6733705c1c7b9
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Wed Jul 29 20:32:49 2020 +0100
+
+    hw/xwin: Update for renames in xserver/output API
+    
+    Update commit ea47af87 renaming master_pixmap to primary_pixmap in
+    struct PixmapRec.
+
+commit 9fbd3e43dd9e13700df96b508c3d97f77e2b9f7e
+Author: Huacai Chen <chenhc@lemote.com>
+Date:   Sun Jul 5 05:59:58 2020 -0400
+
+    linux: Fix platform device probe for DT-based PCI
+    
+    On a DT-base PCI platform, the sysfs path of vga device is like this:
+    /sys/devices/platform/bus@10000000/1a000000.pci/pci0000:00/0000:00:11.0/0000:04:00.0.
+    
+    Then the ID_PATH from udev is platform-1a000000.pci-pci-0000:04:00.0 and
+    the BusID will be pci-0000:04:00.0, which causes Xorg start fail. This
+    is because config_udev_odev_setup_attribs() use strstr() to search the
+    first "pci-" in ID_PATH. To fix this, we implement a strrstr() function
+    and use it to search the last "pci-" in ID_PATH, which can get a correct
+    BusID.
+    
+    Signed-off-by: Huacai Chen <chenhc@lemote.com>
+
+commit 591916ea9e7a77f68f436b4a541402d9deadfe64
+Author: Roman Gilg <subdiff@gmail.com>
+Date:   Fri Jul 24 12:21:37 2020 +0200
+
+    present: Check valid region in window mode flips
+    
+    For Pixmap flips to have well defined outcomes the window must be contained by
+    the valid region if such region was specified.
+    
+    The valid region is inserted as an argument to the check in window mode.
+    Setting this argument is missing in screen mode as well but we ignore it for now
+    and only add it to window mode.
+    
+    It seems there are none or only very few clients actually making use of valid
+    regions at the moment. For simplicity we therefore just check if a valid region
+    was set by the client and in this case do never flip, independently of the
+    window being contained by the region or not.
+    
+    Signed-off-by: Roman Gilg <subdiff@gmail.com>
+
+commit bf794bd7bfa3bdcf7de95ce237eb50ecc6ec11d2
+Author: Roman Gilg <subdiff@gmail.com>
+Date:   Tue Jul 14 14:32:25 2020 +0200
+
+    present: Remove superfluous set abort flip function in window mode
+    
+    The function is never called from present_screen.c in contrast to the behavior
+    in screen mode.
+    
+    In present_wnmd.c we can simply remove the function which does an unnecessary
+    check of the property before setting it and directly set the property at the
+    two locations the function was called previously.
+    
+    Signed-off-by: Roman Gilg <subdiff@gmail.com>
+
+commit ab880b8b9e8d67a05fcb085097c94bbddf7dcb95
+Author: Roman Gilg <subdiff@gmail.com>
+Date:   Sun Jul 12 13:42:31 2020 +0200
+
+    present: Idle vblanks any time in window mode
+    
+    With the newly introduced separate API method for idling a presented Pixmap in
+    window mode we can simplify the logic by allowing calls to it at any point in
+    time.
+    
+    This is done by setting the flip_idler flag if the Pixmap was idled before
+    being presented.
+    
+    Signed-off-by: Roman Gilg <subdiff@gmail.com>
+
+commit 932c6baca274f57beab51cd0dff1f7fa934e0ed0
+Author: Roman Gilg <subdiff@gmail.com>
+Date:   Sat Jul 11 19:15:46 2020 +0200
+
+    present: Notify via distinct API functions in window mode
+    
+    Notifying Present about events' states was done prior with the single function
+    present_wnmd_event_notify just like in screen mode. But it is more intelligible
+    if at least in window mode we make use of three different functions with names
+    that directly indicate what their purpose is:
+    
+    * present_wnmd_event_notify only for queued events feedback.
+    * present_wnmd_flip_notify for when a presentation occured (flip).
+    * present_wnmd_idle_notify for when the Pixmap of the event can be reused.
+    
+    This is an API-breaking change in regards to window mode. DDX written against
+    the previous version won't work anymore. It is assumed that there only exists
+    the XWayland DDX at the moment using the window mode such that this is not an
+    issue for the overall ecosystem.
+    
+    Signed-off-by: Roman Gilg <subdiff@gmail.com>
+
+commit f8211095c3d94307225318902598e8f79d038f26
+Author: Roman Gilg <subdiff@gmail.com>
+Date:   Sat Feb 15 01:58:22 2020 +0100
+
+    xwayland: Rename present event lists
+    
+    Rename the lists release_queue to release_list and event_list to
+    wait_list.
+    
+    The prior names release_queue and event_list were ambiguous: in both are event-
+    like vblanks which can be removed from the lists in random order. In the
+    release_queue can be flips that are already released but still wait for the
+    sync or frame callback but normally the release comes later. In the event_list
+    are queued events waiting for a later msc.
+    
+    Signed-off-by: Roman Gilg <subdiff@gmail.com>
+
+commit 0db326e5ca3dd244dda502c8261801c04ff792ab
+Author: Roman Gilg <subdiff@gmail.com>
+Date:   Wed Jul 8 10:24:41 2020 +0200
+
+    xwayland: Remove unused xwl_screen entry
+    
+    In xwl_present_window an xwl_screen entry was declared but never actually used.
+    
+    Signed-off-by: Roman Gilg <subdiff@gmail.com>
+
+commit 495bf63a7df066672d9d44dedeb1f49658a247d8
+Author: Alex Goins <agoins@nvidia.com>
+Date:   Thu Jul 2 20:03:06 2020 -0500
+
+    randr: Re-add removed NULL checks to xf86RandR12.c
+    
+    Commit 1e3f9ea1 removed some NULL checks from xf86RandR12.c, on the premise that
+    they can't be reached unless RandR has already been initialized. For threesuch
+    calls, that's not true:
+    
+    xf86Crtc.c::xf86CrtcScreenInit():
+    
+        if (c == config->num_crtc) {
+            xf86RandR12SetRotations(screen, RR_Rotate_0 | RR_Rotate_90 |
+                                    RR_Rotate_180 | RR_Rotate_270 |
+                                    RR_Reflect_X | RR_Reflect_Y);
+            xf86RandR12SetTransformSupport(screen, TRUE);
+        }
+        else {
+            xf86RandR12SetRotations(screen, RR_Rotate_0);
+            xf86RandR12SetTransformSupport(screen, FALSE);
+        }
+    
+    xf86Crtc.c::xf86CrtcCloseScreen():
+    
+        xf86RandR12CloseScreen(screen);
+    
+    This change adds checks back to xf86RandR12Set{Rotations,TransformSupport}() and
+    xf86RandR12CloseScreen(), checking that xf86RandR12KeyRec has been registered.
+    Without this, X will hit an assert that causes it to abort.
+    
+    Signed-off-by: Alex Goins <agoins@nvidia.com>
+
+commit 8eeff5d7880c6885ee6f206355599f13d739afa7
+Author: Alex Goins <agoins@nvidia.com>
+Date:   Thu Jul 2 20:12:43 2020 -0500
+
+    randr: Check rrPrivKey in RRHasScanoutPixmap()
+    
+    RRHasScanoutPixmap() is called from xf86CheckHWCursor(), regardless of whether
+    or not RandR has been initialized.
+    
+    As mentioned in commit 4226c6d, it's possible that RandR has not been
+    initialized if the server is configured with Xinerama and there is more than one
+    X screen. Calling rrGetScrPriv when RandR isn't initialized causes an assertion
+    failure that aborts the server:
+    
+          Xorg: ../include/privates.h:121: dixGetPrivateAddr: Assertion
+          key->initialized' failed.
+    
+    Just as in commit 4226c6d, fix the problem by checking
+    dixPrivateKeyRegistered(rrPrivKey) before calling rrGetScrPriv.
+    
+    Signed-off-by: Alex Goins <agoins@nvidia.com>
+
+commit 6172bd2b41a7ce158b9052af3e373318e5e4381c
+Author: Alex Goins <agoins@nvidia.com>
+Date:   Thu Jul 2 18:39:11 2020 -0500
+
+    randr: Check rrPrivKey before autobinding GPU screens
+    
+    RRProviderAutoConfigGpuScreen() is called from outside RandR, so there is no
+    guarantee that RandR has been initialized when it is called.
+    
+    As mentioned in commit 4226c6d, it's possible that RandR has not been
+    initialized if the server is configured with Xinerama and there is more than one
+    X screen. Calling rrGetScrPriv when RandR isn't initialized causes an assertion
+    failure that aborts the server:
+    
+      Xorg: ../include/privates.h:121: dixGetPrivateAddr: Assertion
+      key->initialized' failed.
+    
+    Just as in commit 4226c6d, fix the problem by checking
+    dixPrivateKeyRegistered(rrPrivKey) before calling rrGetScrPriv.
+    
+    Signed-off-by: Alex Goins <agoins@nvidia.com>
+
+commit e33453f9111b21e4814d628e6ae00bc7b200f404
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Fri Jul 10 18:56:42 2020 +0200
+
+    xwayland: Handle NULL xwl_seat in xwl_seat_can_emulate_pointer_warp
+    
+    This can happen e.g. with weston's headless backend.
+    
+    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
+
+commit ddb86e94c07a269dfc9cd80543f9f6a2c3e934a2
+Author: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
+Date:   Sat Jul 11 19:47:40 2020 +0200
+
+    xwayland: Remove harmless duplicated #include
+
+commit a137dd5f79d272a57c6704143dc9c25a9b59c927
+Author: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
+Date:   Sat Jul 11 19:34:59 2020 +0200
+
+    xwayland: Use memfd_create() when available
+    
+    This (so-far) Linux-only API lets users create file descriptors purely
+    in memory, without any backing file on the filesystem and the race
+    condition which could ensue when unlink()ing it.
+    
+    It also allows seals to be placed on the file, ensuring to every other
+    process that we won’t be allowed to shrink the contents, potentially
+    causing a SIGBUS when they try reading it.
+    
+    This patch is best viewed with the -w option of git log -p.
+    
+    This is a port of this commit from Weston:
+    https://gitlab.freedesktop.org/wayland/weston/-/commit/deae98ef45e060b8412a5edd195fb0c7c14f0321
+    
+    Fixes #848.
+    
+    Signed-off-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
+
+commit ba0e789b912671c724a21b3a30291247718bcf7d
+Author: Lyude Paul <lyude@redhat.com>
+Date:   Tue Jul 14 18:32:39 2020 -0400
+
+    xwayland: Store xwl_tablet_pad in its own private key
+    
+    When a slave device causes the master virtual pointer device to change
+    device types, the device's private data pointer
+    (device->public.devicePrivate) is also changed to match the type of the
+    slave device. This can be a problem though, as tablet pad devices will
+    set the device's private data pointer to their own xwl_tablet_pad
+    struct. This can cause us to dereference the pointer as the wrong type,
+    and result in a segfault:
+    
+    Thread 1 "Xwayland" received signal SIGSEGV, Segmentation fault.
+    wl_proxy_marshal (proxy=0x51, opcode=opcode@entry=0) at src/wayland-client.c:792
+    792             va_start(ap, opcode);
+    (gdb) bt
+    0  wl_proxy_marshal (proxy=0x51, opcode=opcode@entry=0) at
+      src/wayland-client.c:792
+    1  0x00005610b27b6c55 in wl_pointer_set_cursor (hotspot_y=0,
+      hotspot_x=0, surface=0x0, serial=<optimized out>, wl_pointer=<optimized
+      out>) at /usr/include/wayland-client-protocol.h:4610
+    2  xwl_seat_set_cursor (xwl_seat=xwl_seat@entry=0x5610b46d5d10) at
+      xwayland-cursor.c:137
+    3  0x00005610b27b6ecd in xwl_set_cursor (device=<optimized out>,
+      screen=<optimized out>, cursor=<optimized out>, x=<optimized out>,
+      y=<optimized out>) at xwayland-cursor.c:249
+    4  0x00005610b2800b46 in miPointerUpdateSprite (pDev=0x5610b4501a30) at
+      mipointer.c:468
+    5  miPointerUpdateSprite (pDev=0x5610b4501a30) at mipointer.c:410
+    6  0x00005610b2800e56 in miPointerDisplayCursor (pCursor=0x5610b4b35740,
+      pScreen=0x5610b3d54410, pDev=0x5610b4501a30) at mipointer.c:206
+    7  miPointerDisplayCursor (pDev=0x5610b4501a30, pScreen=0x5610b3d54410,
+      pCursor=0x5610b4b35740) at mipointer.c:194
+    8  0x00005610b27ed62b in CursorDisplayCursor (pDev=<optimized out>,
+      pScreen=0x5610b3d54410, pCursor=0x5610b4b35740) at cursor.c:168
+    9  0x00005610b28773ee in AnimCurDisplayCursor (pDev=0x5610b4501a30,
+      pScreen=0x5610b3d54410, pCursor=0x5610b4b35740) at animcur.c:197
+    10 0x00005610b28eb4ca in ChangeToCursor (pDev=0x5610b4501a30,
+      cursor=0x5610b4b35740) at events.c:938
+    11 0x00005610b28ec99f in WindowHasNewCursor
+      (pWin=pWin@entry=0x5610b4b2e0c0) at events.c:3362
+    12 0x00005610b291102d in ChangeWindowAttributes (pWin=0x5610b4b2e0c0,
+      vmask=<optimized out>, vlist=vlist@entry=0x5610b4c41dcc,
+      client=client@entry=0x5610b4b2c900) at window.c:1561
+    13 0x00005610b28db8e3 in ProcChangeWindowAttributes (client=0x5610b4b2c900)
+      at dispatch.c:746
+    14 0x00005610b28e1e5b in Dispatch () at dispatch.c:497
+    15 0x00005610b28e5f34 in dix_main (argc=16, argv=0x7ffc7a601b68,
+      envp=<optimized out>) at main.c:276
+    16 0x00007f8828cde042 in __libc_start_main (main=0x5610b27ae930 <main>,
+      argc=16, argv=0x7ffc7a601b68, init=<optimized out>, fini=<optimized
+      out>, rtld_fini=<optimized out>, stack_end=0x7ffc7a601b58) at
+      ../csu/libc-start.c:308
+    17 0x00005610b27ae96e in _start () at cursor.c:1064
+    
+    Simple reproducer in gnome-shell: open up an Xwayland window, press some
+    tablet buttons, lock and unlock the screen. Repeat if it doesn't crash
+    the first time.
+    
+    So, let's fix this by registering our own device-specific private key
+    for storing a backpointer to xwl_tablet_pad, so that all input devices
+    have their private data pointers set to their respective xwl_seat.
+    
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Signed-off-by: Lyude Paul <lyude@redhat.com>
+
+commit 85a6fd11c723888ca093785a3df43066fdca9c33
+Author: Roman Gilg <subdiff@gmail.com>
+Date:   Wed Jul 8 17:08:55 2020 +0200
+
+    xwayland: Damage surface in surface-relative coordinates
+    
+    In 9141196d positional coordinates were added to the damage call of pixmap
+    flips. The damage box coordinates are in screen space though and we need
+    to convert them first to surface-relative ones by substracting the origin
+    of the window.
+    
+    Signed-off-by: Roman Gilg <subdiff@gmail.com>
+
+commit ed624544d4aef72db8dd575ad55ef5e206c54757
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Fri Jul 10 11:01:10 2020 +0200
+
+    xfree86: Bump ABI_VIDEODRV_VERSION to 25.2
+    
+    This gives out of tree drivers a fighting chance to build against both
+    sides of
+    https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/468 .
+    
+    Reviewed-by: Dave Airlie <airlied@redhat.com>
+
+commit ea47af87f692b291a988834c6f14d73a08cb1d75
+Author: Dave Airlie <airlied@redhat.com>
+Date:   Mon Jul 6 07:00:50 2020 +1000
+
+    xserver/output: rename some badly named variables/APIs.
+    
+    This is an API and ABI break
+    
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 15b7738389b36ec2739d4f599539bcb7c2be89a1
+Author: Dave Airlie <airlied@redhat.com>
+Date:   Mon Jul 6 07:00:04 2020 +1000
+
+    exa: rename some badly named variables
+    
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 5188603ff7d25186c9076fefeceba825f3a40d47
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Mon Apr 20 11:29:16 2020 +0200
+
+    xwayland: Add a pkg-config file for Xwayland
+    
+    Xwayland is usually spawned by the Wayland compositor which sets the
+    command line options.
+    
+    If a command line option is not supported, Xwayland will fail to start.
+    
+    That somehow makes the Xwayland command line option sort of ABI, the
+    Wayland compositor need to know if a particular option is supported by
+    Xwayland at build time.
+    
+    Also, currently, Xwayland is being installed along with the rest of the
+    common executable programs that users may run, which is sub-optimal
+    because, well, Xwayland is not a common executable program, it's meant
+    to be a proxy between the Wayland compositor and the legacy X11 clients
+    which wouldn't be able to run on Wayland otherwise.
+    
+    Xwayland would be better installed in `libexec` but that directory is
+    (purposedly) not in the user `PATH` and therefore the Wayland compositor
+    may not be able to find Xwayland in that case.
+    
+    To solve both problems (which options are supported by Xwayland and
+    where to look for it), add a `pkg-config` file specifically for Xwayland
+    which gives the full path to Xwayland (`xwayland`) and which options it
+    supports (using `pkg-config` variables).
+    
+    The `pkg-config` file also provides the `Version` so the build scripts
+    can check for a particular version if necessary.
+    
+    Obviously, Wayland compositors are not required to use the `pkg-config`
+    file and can continue to use whatever mechanism they deem preferable.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit 2beefda5a80e5a016c32c1da733f9415a121179d
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Tue Mar 17 12:55:34 2020 +0100
+
+    xwayland: Move xwl_surface_damage definition to xwayland-screen.c
+    
+    It was already declared in xwayland-screen.h, and only takes a screen
+    parameter, no window ones.
+    
+    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
+
+commit 12af425acd3f4a3a8aa85352857b130b0006b83c
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Thu Jun 25 17:56:41 2020 +0200
+
+    xwayland: Rename xwl_pixmap_cb → xwl_buffer_release_cb
+    
+    Seems clearer.
+    
+    While we're at it, also drop the unused pixmap parameter.
+    
+    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
+
+commit 9eb0b4f731e21952f93e168900f10bf07e261107
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Thu Jun 25 17:49:27 2020 +0200
+
+    xwayland: Remove xwl_present_event::buffer_released in favor of ::pixmap
+    
+    No need for the separate boolean.
+    
+    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
+
+commit 9141196d3104ab37385c3e385deaa70c002dd184
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Tue Mar 17 12:58:12 2020 +0100
+
+    xwayland: Propagate damage x1/y1 coordinates in xwl_present_flip
+    
+    This couldn't have worked correctly for non-0 x1/y1.
+    
+    Noticed by inspection.
+    
+    Reviewed-by: Simon Ser <contact@emersion.fr>
+
+commit 0006aecba097b437f96a462075494d68bdad24c1
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sun Jul 5 13:18:45 2020 -0700
+
+    doc: Update URLs in Xserver-DTrace.xml
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 23e83724df4809fd7857cc609c33ce7e8d3021a4
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sun Jul 5 13:07:33 2020 -0700
+
+    Fix spelling/wording issues
+    
+    Most (but not all) of these were found by using
+      codespell --builtin clear,rare,usage,informal,code,names
+    but not everything reported by that was fixed.
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit b0413b6e99c6b5fbc04229ce64ddf1f41b08e63e
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Tue Jun 2 11:23:46 2020 +0200
+
+    xwayland: Use a fixed DPI value for core protocol
+    
+    The way Xwayland works (like all Wayland clients), it first queries the
+    Wayland registry, set up all relevant protocols and then initializes its
+    own structures.
+    
+    That means Xwayland will get the Wayland outputs from the Wayland
+    compositor, compute the physical size of the combined outputs and set
+    the corresponding Xwayland screen properties accordingly.
+    
+    Then it creates the X11 screen using fbScreenInit() but does so by using
+    a default DPI value of 96. That value is used to set the physical size
+    of the X11 screen, hence overriding the value computed from the actual
+    physical size provided by the Wayland compositor.
+    
+    As a result, the DPI computed by tools such as xdpyinfo will always be
+    96 regardless of the actual screen size and resolution.
+    
+    However, if the Wayland outputs get reconfigured, or new outputs added,
+    or existing outputs removed, Xwayland will recompute and update the
+    physical size of the screen, leading to an unexpected change of DPI.
+    
+    To avoid that discrepancy, use a fixed size DPI (defaults to 96, and can
+    be set using the standard command lime option "-dpi") and compute a
+    physical screen size to match that DPI setting.
+    
+    Note that only affects legacy core protocols, X11 clients can still get
+    the actual physical output size as reported by the Wayland compositor
+    using the RandR protocol, which also allows for the size to be 0 if the
+    size is unknown or meaningless.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Simon Ser <contact@emersion.fr>
+    Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/731
+
+commit 6748a4094158d2bde1630b915a5318f9f22c8e0a
+Author: SimonP <simonp.git@gmail.com>
+Date:   Tue Jun 9 13:26:48 2020 +0200
+
+    xwayland: Initialise values in xwlVidModeGetGamma()
+    
+    ProcVidModeGetGamma() relies on GetGamma() to initialise values if it
+    returns TRUE. Without this, we're sending uninitialised values to
+    clients.
+    
+    Fixes: xorg/xserver#1040
+
+commit d35f68336b0a462dc660797d1779581f348af04e
+Author: Sjoerd Simons <sjoerd@collabora.com>
+Date:   Fri Apr 10 16:34:06 2020 +0200
+
+    xwayland: Fix crashes when there is no pointer
+    
+    When running with a weston session without a pointer device (thus with
+    the wl_seat not having a pointer) xwayland pointer warping and pointer
+    confining should simply be ignored to avoid crashes.
+    
+    Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
+
+commit 73480f172aeced074dd9301ae4d97f7d2f3a9a45
+Author: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
+Date:   Fri May 15 18:33:11 2020 +0200
+
+    modesetting: Fix front_bo leak at drmmode_xf86crtc_resize on XRandR rotation
+    
+    Since the introduction of "modesetting: Remove unnecessary fb addition from
+    drmmode_xf86crtc_resize" the fb_id isn't initialited at
+    drmmode_xf86crtc_resize.
+    
+    Rotate operation of XRandR uses rotate_bo. So in this case the fb_id
+    associated to the front_bo is not initialized at drmmode_set_mode_major.
+    So fd_id remains 0.
+    
+    As every call to drmmode_xf86crtc_resize allocates a new front_bo we should
+    destroy unconditionally the old_front_bo if operation success. So we free
+    the allocated GBM handles.
+    
+    This avoids crashing xserver with a OOM in the RPI4 1Gb at 4k resolution
+    after 3 series xrandr rotations from normal to left and vice versa reported at
+    https://github.com/raspberrypi/firmware/issues/1345
+    
+    Signed-off-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+    Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1024
+    Fixes: 8774532121 "modesetting: Remove unnecessary fb addition from
+           drmmode_xf86crtc_resize"
+
+commit b67052742980fd3ec669100048da71e09aa61358
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Fri Jun 19 18:10:18 2020 +0200
+
+    xwayland: Free all remaining events in xwl_present_cleanup
+    
+    These events aren't reachable after xwl_present_cleanup, so they're
+    leaked if we don't free them first.
+    
+    This requires storing the pixmap pointer in struct xwl_present_window.
+    Luckily, the buffer pointer isn't used for anything, so just replace
+    that.
+    
+    v2:
+    * Bump pixmap reference count in xwl_present_flip and drop it in
+      xwl_present_free_event, fixes use-after-free in the latter due to the
+      pixmap already being destroyed.
+    
+    Reviewed-by: Dave Airlie <airlied@redhat.com>
+
+commit 1beffba699e2cc3f23039d2177c025bc127966de
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Fri Jun 19 18:14:35 2020 +0200
+
+    xwayland: Always use xwl_present_free_event for freeing Present events
+    
+    Minor cleanup, and will make the next change simpler. No functional
+    change intended.
+    
+    Reviewed-by: Dave Airlie <airlied@redhat.com>
+
+commit 1bdedc8dbb9d035b85444c2558a137470ff52113
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Fri Jun 19 17:24:42 2020 +0200
+
+    present/wnmd: Free flip_queue entries in present_wnmd_clear_window_flip
+    
+    When present_wnmd_clear_window_flip is done, present_destroy_window
+    frees struct present_window_priv, and the events in the flip queue
+    become unreachable. So if we don't free them first, they're leaked.
+    
+    Also drop the call to present_wnmd_set_abort_flip, which just sets a
+    flag in struct present_window_priv and thus can't have any observable
+    effect after present_destroy_window.
+    
+    Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1042
+    Reviewed-by: Dave Airlie <airlied@redhat.com>
+
+commit bc9dd1c71c3722284ffaa7183f4119151b25a44f
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Fri Jun 19 17:02:40 2020 +0200
+
+    present/wnmd: Keep pixmap pointer in present_wnmd_clear_window_flip
+    
+    The comment was incorrect: Any reference held by the window (see
+    present_wnmd_execute) is in addition to the one in struct present_vblank
+    (see present_vblank_create). So if we don't drop the latter, the pixmap
+    will be leaked.
+    
+    Reviewed-by: Dave Airlie <airlied@redhat.com>
+
+commit 7ae221ad5774756766dc78a73d71f4163ac7b1c6
+Author: Martin Weber <martin.weber@secunet.com>
+Date:   Fri Jun 19 16:51:15 2020 +0200
+
+    hw/xfree86: Avoid cursor use after free
+    
+    During a VT-Switch a raw pointer to the shared cursor object
+    is saved which is then freed (in case of low refcount) by a call to
+    xf86CursorSetCursor with argument pCurs = NullCursor.
+    This leads to a dangling pointer which can follow in a use after free.
+    
+    This fix ensures that there is a shared handle saved for the VT-Switch cycle.
+    
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit 6a79a737e2c0bc730ee693b4ea4a1530c108be4e
+Author: Aaron Ma <aaron.ma@canonical.com>
+Date:   Sat Apr 11 17:29:35 2020 +0800
+
+    xfree86: add drm modes on non-GTF panels
+    
+    EDID1.4 replaced GTF Bit with Continuous or Non-Continuous Frequency Display.
+    
+    Check the "Display Range Limits Descriptor" for GTF support.
+    If panel doesn't support GTF, then add gtf modes.
+    
+    Otherwise X will only show the modes in "Detailed Timing Descriptor".
+    
+    V2: Coding style changes.
+    V3: Coding style changes, remove unused variate.
+    V4: remove unused variate.
+    
+    BugLink: https://gitlab.freedesktop.org/drm/intel/issues/313
+    Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit d6558477d7a264c2132bc977b51d80fc0277d1e0
+Author: Simon Ser <contact@emersion.fr>
+Date:   Tue Jun 2 15:40:16 2020 +0200
+
+    xwayland: allow using linux-dmabuf with DRM_FORMAT_MOD_INVALID
+    
+    When the linux-dmabuf protocol is available, prefer it over the old
+    wl_drm protocol. Previously wl_drm was used when modifiers aren't
+    supported, however linux-dmabuf supports formats without modifiers too.
+    In this case, linux-dmabuf will send a DRM_FORMAT_MOD_INVALID modifier
+    for each supported format [1].
+    
+    This allows compositors to better handle these buffers, getting a
+    DMA-BUF and implementing features like direct scan-out.
+    
+    A similar logic has been implemented for EGL [2].
+    
+    DRM_FORMAT_MOD_INVALID is now stored in the xwl_screen->formats list.
+    glamor_get_modifiers still returns FALSE with zero modifiers if the
+    only advertised modifier is DRM_FORMAT_MOD_INVALID.
+    
+    [1]: https://gitlab.freedesktop.org/wayland/wayland-protocols/commit/fb9b2a87317c77e26283da5f6c9559d709f6fdcd
+    [2]: https://gitlab.freedesktop.org/mesa/mesa/-/commit/c376865f5eeca535c4aa8e33bcf166052c1ce2f2
+    
+    Signed-off-by: Simon Ser <contact@emersion.fr>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit c0e13cbf5a56e1fdd1e4ce58ebdefb6d2904e4b3
+Author: Simon Ser <contact@emersion.fr>
+Date:   Tue Jun 2 15:28:38 2020 +0200
+
+    xwayland: only use linux-dmabuf if format/modifier was advertised
+    
+    Previously, linux-dmabuf was used unconditionally if the buffer had a
+    modifier. However creating a linux-dmabuf buffer with a format/modifier
+    which hasn't been advertised will fail.
+    
+    Change xwl_glamor_gbm_get_wl_buffer_for_pixmap to use linux-dmabuf when
+    the format/modifier has been advertised only.
+    
+    Signed-off-by: Simon Ser <contact@emersion.fr>
+    Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1035
+    Tested-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit 9c8d2744584868aa2655bf3ec047f2f9669e4291
+Author: Simon Ser <contact@emersion.fr>
+Date:   Mon May 4 10:53:57 2020 +0200
+
+    xwayland: don't use GBM_BO_USE_SCANOUT
+    
+    This flag should only be used when the caller intends to display the
+    buffer on a hardware plane. Xwayland isn't a DRM client, so it doesn't
+    make sense to use this flag.
+    
+    This change will allow the driver to potentially use buffer parameters
+    that are more optimized.
+    
+    Signed-off-by: Simon Ser <contact@emersion.fr>
+    Reviewed-by: Daniel Stone <daniels@collabora.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit fc4f248544f207ffd68303da22ea1e27beb3729f
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Fri Jun 5 14:33:03 2020 -0400
+
+    xwayland: Set the vendor name for GLX_EXT_libglvnd
+    
+    Without this the client library will flail around looking for a default
+    provider, probably one named "indirect", and that defeats the point of
+    having the EGL provider for direct context support in the first place.
+    
+    This assumes that "mesa" will work, of course, and in general it should.
+    Mesa drivers will DTRT through the DRI3 setup path, and if our glamor is
+    atop something non-Mesa then you should fall back to llvmpipe like 1.20.
+    In the future it might be useful to differentiate the vendor here based
+    on whether glamor is using gbm or streams.
+    
+    Fixes: xorg/xserver#1032
+
+commit 5dc16f6fec672c10fc26dcaaf00df0f6bed0ef9a
+Author: Matthieu Herrb <matthieu@herrb.eu>
+Date:   Tue Jun 2 17:32:11 2020 +0200
+
+    Remove BSD APM support.
+    
+    None of the current BSD is actually using this code.
+    (checked DragonFly 5.8.1, FreeBSD 11.2, NetBSD 9.0 and OpenBSD 6.7)
+    
+    Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
+
+commit b5b529799a20f8a262066daeb726307c0631f208
+Author: Jan Beich <jbeich@FreeBSD.org>
+Date:   Sun Feb 9 15:28:10 2020 +0000
+
+    meson: split udev from udev_kms which requires systemd
+    
+    DragonFly and FreeBSD can use xf86-input-libinput with config/udev.
+    
+    ld: error: undefined symbol: xf86PlatformDeviceProbe
+    >>> referenced by xf86platformBus.c
+    >>>               xf86platformBus.c.o:(xf86platformProbe) in archive hw/xfree86/common/libxorg_common.a
+    
+    ld: error: undefined symbol: xf86PlatformDeviceCheckBusID
+    >>> referenced by xf86platformBus.c
+    >>>               xf86platformBus.c.o:(xf86platformProbeDev) in archive hw/xfree86/common/libxorg_common.a
+    
+    ld: error: undefined symbol: xf86PlatformReprobeDevice
+    >>> referenced by xf86platformBus.c
+    >>>               xf86platformBus.c.o:(xf86platformVTProbe) in archive hw/xfree86/common/libxorg_common.a
+    
+    ld: error: undefined symbol: NewGPUDeviceRequest
+    >>> referenced by udev.c
+    >>>               udev.c.o:(device_added) in archive config/liblibxserver_config.a
+    
+    ld: error: undefined symbol: DeleteGPUDeviceRequest
+    >>> referenced by udev.c
+    >>>               udev.c.o:(device_removed) in archive config/liblibxserver_config.a
+
+commit be731e0bdc7d76ad3782d5b533b6bcc8378f41ad
+Author: Jan Beich <jbeich@FreeBSD.org>
+Date:   Sun Feb 9 15:12:39 2020 +0000
+
+    glx: unbreak on Unix without /usr/include/drm
+    
+    In file included from ../glx/glxdri2.c:35:
+    /usr/local/include/GL/internal/dri_interface.h:43:10: fatal error: 'drm.h' file not found
+     #include <drm.h>
+              ^~~~~~~
+    In file included from ../glx/glxdriswrast.c:39:
+    /usr/local/include/GL/internal/dri_interface.h:43:10: fatal error: 'drm.h' file not found
+     #include <drm.h>
+              ^~~~~~~
+
+commit f2cf236da8e8fefd6f503ceb0a448c5ad9651024
+Author: Jan Beich <jbeich@FreeBSD.org>
+Date:   Sat Nov 16 18:40:36 2019 +0000
+
+    os: unbreak xsha1 on FreeBSD
+    
+    ../os/xsha1.c:36:10: fatal error: 'sha1.h' file not found
+     #include <sha1.h>
+              ^~~~~~~~
+    ../os/xsha1.c:45:5: error: implicit declaration of function 'SHA1Init' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
+        SHA1Init(ctx);
+        ^
+    ../os/xsha1.c:54:5: error: implicit declaration of function 'SHA1Update' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
+        SHA1Update(sha1_ctx, data, size);
+        ^
+    ../os/xsha1.c:63:5: error: implicit declaration of function 'SHA1Final' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
+        SHA1Final(result, sha1_ctx);
+        ^
+
+commit 4195e8035645007be313ade79032b8d561ceec6c
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Tue May 5 15:40:43 2020 +0200
+
+    xwayland: Clear private on device removal
+    
+    Xwayland uses the device private to point to the `xwl_seat`.
+    
+    Device may be removed at any time, including on suspend.
+    
+    On resume, if the DIX code ends up calling a function that requires the
+    `xwl_seat` such as `xwl_set_cursor()` we may end up pointing at random
+    data.
+    
+    Make sure the clear the device private data on removal so that we don't
+    try to use it and crash later.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    https://gitlab.freedesktop.org/xorg/xserver/issues/709
+
+commit 6ef1b0108ebe98c58fe5e00c86de52452c817518
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Fri May 8 10:54:31 2020 +1000
+
+    gitlab CI: use the fdo ci-templates repository
+    
+    wayland/ci-templates was moved to freedesktop/ci-templates, everything
+    else stayed the same so the sha is still valid.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Acked-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit 421ce458f1d295015c108eb32f9611e527649cf8
+Author: Simon Ser <contact@emersion.fr>
+Date:   Mon May 4 18:20:17 2020 +0200
+
+    xwayland: import DMA-BUFs with GBM_BO_USE_RENDERING only
+    
+    Drop GBM_BO_USE_SCANOUT from the GBM_BO_IMPORT_FD import, add
+    GBM_BO_USE_RENDERING to the GBM_BO_IMPORT_FD_MODIFIER import.
+    
+    If the DMA-BUF cannot be scanned out, gbm_bo_import with
+    GBM_BO_USE_SCANOUT will fail. However Xwayland doesn't need to scan-out
+    the buffer and can work fine without scanout. Glamor only needs
+    GBM_BO_USE_RENDERING.
+    
+    Signed-off-by: Simon Ser <contact@emersion.fr>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+    Reviewed-by: Daniel Stone <daniels@collabora.com>
+
+commit 0777cf46d7260f3d0c7fe82af5c94137d1e4f3de
+Author: Carlos Garnacho <carlosg@gnome.org>
+Date:   Thu May 7 20:15:14 2020 +0200
+
+    xwayland: Improve checks for confined_to on InputOnly windows
+    
+    In this pretty Wine/Proton specific kludge, we try to handle confining grabs
+    on InputOnly windows by trying to find the InputOutput window that the pointer
+    would get visually confined to.
+    
+    The grabbing window and the visible window come from different clients, so
+    we used to simply resort to the pointer focus. This is troublesome though, as
+    the call may happen very soon at a time that the toplevel wasn't yet mapped by
+    the Wayland compositor, so the pointer focus may well be out of date soon.
+    
+    In these situations, it does seem that even though the confining grab happens
+    too early to have the wayland surface mapped, the xserver view of the WindowPtr
+    does already reflect the size. Use this to find out the better window to
+    assign the confining grab to, one whose geometry fully contains the InputOnly
+    window's.
+    
+    Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
+    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
+
+commit f486e2fdaa1b252405a3aee90bd495b8b4c851f2
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Tue May 5 10:38:50 2020 +0200
+
+    xwayland: Remove undeeded test
+    
+    xwl_seat_maybe_lock_on_hidden_cursor() checks that the value of
+    cursor_confinement_window is not NULL, yet there is no code path
+    that could lead to this.
+    
+    Remove the test for cursor_confinement_window being set, it's useless.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Carlos Garnacho <carlosg@gnome.org>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit baa8d12e464664b5ad3c591be05a0087482790ca
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Thu Apr 30 13:55:42 2020 +0200
+
+    xwayland: Lock on entering surface if needed
+    
+    When an X11 client issues a ConfinePointer wit ha hidden cursor,
+    Xwayland may translate that as a pointer lock.
+    
+    However, if the pointer is located on another window at the time,
+    the request may be ignored, even if the pointer later enters the window.
+    
+    To avoid that issue, check again if locking the pointer with a hidden
+    cursor is needed when pointer enters a surface.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Carlos Garnacho <carlosg@gnome.org>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 1345f804a88efc11c58f8388983d34445d3e5928
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Tue Mar 24 16:33:16 2020 +0100
+
+    xwayland: confine motion events to the confined window
+    
+    When an X11 client has an active grab on the pointer, all events are
+    reported relative to the window with the grab.
+    
+    For Xwayland, if an X11 client has a grab with a pointer confinement
+    active, while pointer focus is on another window, motion events should
+    not be reported to the client with the grab, because that sets the X11
+    client appart, the events would be reported when the pointer is on any
+    X11 window but not on Wayland native surfaces.
+    
+    Therefore, if the pointer is confined on a window and that window
+    differs from the actual pointer focus window, just pretend we lost
+    pointer focus to another window.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/962
+    Reviewed-by: Carlos Garnacho <carlosg@gnome.org>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 5929b789f9c6531ee257504a7be9c9e3a49b30eb
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Tue Mar 24 16:12:38 2020 +0100
+
+    xwayland: Do not lock the pointer on the wrong window
+    
+    If a client issues a grab on the pointer while the cursor is on another
+    X11 window, and then hides the cursor, we may end up locking the pointer
+    onto that other window.
+    
+    Then a button click might end up moving the focus away from the window
+    which issued the grab, leaving the whole setup in a mixed up state.
+    
+    Typically, if the pointer is on another X11 window, we should not try to
+    lock the pointer, so that it can be moved back to the window which
+    actually issues the grab (and hence the pointer confinement). Typically,
+    this is the same as an X11 client issuing a pointer grab while the
+    cursor is on another Wayland native window.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/962
+    Reviewed-by: Carlos Garnacho <carlosg@gnome.org>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit a5151f58cf98d1696d60a3577dc50851f159da8a
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sun May 10 17:46:33 2020 -0700
+
+    Update URL's in man pages
+    
+    Mostly http->https conversions, but also replaces gitweb.fd.o
+    with gitlab.fd.o, and xquartz.macosforge.org with xquartz.org.
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 9bf33bab32fdfbe68b287947f55906ff0ac67f04
+Author: Martin Weber <martin.weber@secunet.com>
+Date:   Fri May 8 16:45:50 2020 +0200
+
+    test: Fix struct initialization warning
+
+commit 462beb5338a44390e2fff03096942b035b509830
+Author: Christopher Chavez <chrischavez@gmx.us>
+Date:   Sat Apr 25 05:09:51 2020 +0000
+
+    XQuartz: recognize F16-F20 and Menu keys
+    
+    Signed-off-by: Christopher Chavez <chrischavez@gmx.us>
+
+commit 9937183e4bd2e96154bb4724805f74341ae84bd6
+Author: Alexander Volkov <a.volkov@rusbitech.ru>
+Date:   Tue Apr 21 12:38:03 2020 +0300
+
+    Fix build with gcc 9.3.0's -Werror=alloc-size-larger-than=
+
+commit 89f42b88216c0899977dd3861cbf13c5bae321d8
+Author: Alexander Volkov <a.volkov@rusbitech.ru>
+Date:   Tue Apr 21 01:01:21 2020 +0300
+
+    gitlab-ci: Bump DEBIAN_TAG to build with gcc 9.3.0
+
+commit 9890e91265cb58c0cddc4de3c8845d18ae6e5a77
+Author: Tobias Stoeckmann <tobias@stoeckmann.org>
+Date:   Sun Apr 19 15:29:43 2020 +0200
+
+    hw/xfree86: Support ACPI without APM.
+    
+    On systems with ACPI but disabled APM (e.g. --disable-linux-apm)
+    the code does not compile due to preprocessor directives.
+    
+    If APM is disabled, the final return statement is considered to
+    be part of ACPI's last if-statement, leading to a function which
+    has no final return statement at all.
+    
+    I have refactored the code so ACPI and APM are independent of each
+    other.
+    
+    Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
+
+commit 785e59060c00129e47da6c0877604a56d7e0e32f
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Fri Apr 24 17:45:49 2020 +0200
+
+    xwayland: Fix infinite loop at startup
+    
+    Mutter recently added headless tests, and when running those tests the
+    Wayland compositor runs for a very short time.
+    
+    Xwayland is spawned by the Wayland compositor and upon startup will
+    query the various Wayland protocol supported by the compositor.
+    
+    To do so, it will do a roundtrip to the Wayland server waiting for
+    events it expects.
+    
+    If the Wayland compositor terminates before Xwayland has got the replies
+    it expects, it will loop indefinitely calling `wl_display_roundtrip()`
+    continuously.
+    
+    To avoid that issue, add a new `xwl_screen_roundtrip()` that checks for
+    the returned value from `wl_display_roundtrip()` and fails if it is
+    negative.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Roman Gilg <subdiff@gmail.com>
+    Reviewed-by: Jonas Ã…dahl <jadahl@gmail.com>
+
+commit 2fe13a1f448ff27925f92a557f145bab9ab91a0e
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Fri Feb 11 16:10:36 2011 +0000
+
+    hw/xwin: Drop call to setlocale()
+    
+    Since we now only work with UTF-8 (or ISO8859-1) text in the clipboard,
+    we don't need to setlocale().
+
+commit f269e01e1a783227c88b395cf6f55dcadeb751c9
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Mon Jul 2 17:25:53 2018 +0100
+
+    hw/xwin: Consistently use BOOL type from Xmd.h
+    
+    This avoids including Xdefs.h, which means we avoid all the issues with
+    _XSERVER64 effecting how types are defined by that.
+
+commit 4055fed1e7933c05afe143cbd18743c1ff1c7fee
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Sun Jul 1 15:53:42 2018 +0100
+
+    hw/xwin: Remove XSetAuthorization() for helper clients
+    
+    All helper client code now uses xcb, so calling XSetAuthorization() is
+    no longer needed.
+    
+    This is the last reference to libX11 from helper clients, so linking
+    with x11-xcb and libX11 is no longer required.
+    
+    Also drop (unneeded?) linking with libXau.
+    
+    Also drop installing these prerequistes on AppvVeyor.
+    
+    Also move prototypes for functions in winauth.c from win.h into a new
+    header, winauth.h, and include that where needed.
+
+commit 9e02e023b08e24d4213ca14d99612e4cf5ef2f1e
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Sat Jun 30 16:00:16 2018 +0100
+
+    hw/xwin: xcbify clipboard integration
+    
+    Convert clipboard integration code from libX11 to xcb
+    
+    This drops support for COMPOUND_TEXT.  Presumably some ancient
+    (pre-2000) clients exist which support that, but not UTF8_STRING, but we
+    don't have an example to test with. (Given the nature of the thing, the
+    users of those clients probably work in CJK languages)
+    
+    Supporting COMPOUND_TEXT would also involve writing (or extracting from
+    Xlib) support for the ISO 2022 encoding.
+    
+    v2:
+    Fix the length of text property set by a SelectionRequest
+    
+    The length of the text property is not neccessarily the same as the
+    length of the clipboard text before it is d2u converted (specifically,
+    if that contains any '\r\n' sequences, it will be shorter as they are
+    now just '\n')
+
+commit f4936de73c094e35eb293f32ab470347741a4fa0
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Sun Jul 1 12:11:19 2018 +0100
+
+    hw/xwin: Remove nounicodeclipboard option
+    
+    Always use CF_UNICODETEXT clipboard format.  Windows will automatically
+    down-convert to CF_TEXT for clients which request that.
+    
+    This is subtly different in one way: if CF_TEXT is requested, we now
+    post CF_UNICODETEXT and it is converted to CF_TEXT *in the locale of the
+    requesting process*.  Previously, we would convert to CF_TEXT *in our
+    locale* and post that.
+    
+    It looks like the code in the !X_HAVE_UTF8_STRING case didn't actually
+    work correctly, but fortunately that has never been true...
+
+commit 9f51dfdec37c991173c7a580fd1c279cfe09142e
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Sat Jun 30 16:15:52 2018 +0100
+
+    hw/xwin: Remove support for pre-Vista Win32 clipboard API
+    
+    The original Win32 clipboard API is widely regarded as terrible, since
+    it relies on clients co-operatively managing the clipboard viewer chain,
+    and a single buggy client can break it for all other clients.
+    
+    The last Windows version only supporting that API was Windows XP (5.1),
+    EOLed in 2014.
+    
+    (This requires MinGW-w64 w32api 6.0.0 or later for
+    Add/RemoveClipboardListener correctly exported by the x86_64 user32
+    implib)
+
+commit 9a4b62798bf4bcc2828a2a485e878e7d4447d03d
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Fri Apr 26 02:26:44 2019 +0100
+
+    hw/xwin: Fix lingering uses of libX11 types and values
+
+commit d7010cd93a381f1fc0cc681ddb70df9371370644
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Thu Nov 19 18:06:28 2015 +0000
+
+    hw/xwin: Warn about too large Windows -> X clipboard pastes
+    
+    XChangeProperty() requests larger than the ~16MB permitted even with
+    BigReq will fail BadLength
+
+commit 56a91f20671402a8c6f60c40e5e4e18f7978c740
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Wed Nov 18 21:27:23 2015 +0000
+
+    hw/xwin: Implement INCR protocol for X clipboard -> Windows clipboard
+    
+    Also, relax the timeout mechanism so it allows 1 second between events,
+    rather than 1 second for the entire transfer, as transfers of large
+    pastes can take more than 1 second.
+    
+    Also, prefer UTF8_STRING encoding to COMPOUND_TEXT encoding
+
+commit 4f95d87d66b6a6e11aa8616c9242e0907ffee66b
+Author: Michael Stapelberg <stapelberg@google.com>
+Date:   Thu Mar 26 21:53:58 2020 +0100
+
+    Xorg: honor AutoRepeat option
+    
+    This option was implemented before the drivers were split in ≈2006,
+    and e.g. XWin still supports it.
+    
+    With this commit, Xorg regains support, so that the following configuration can
+    be used to set the repeat rate for all keyboard devices without having to modify
+    Xorg command-line flags or having to automate xset(1):
+    
+    Section "InputClass"
+            Identifier "system-keyboard"
+            MatchIsKeyboard "on"
+            Option "XkbLayout" "de"
+            Option "XkbVariant" "neo"
+            Option "AutoRepeat" "250 30"
+    EndSection
+    
+    Signed-off-by: Michael Stapelberg <stapelberg@google.com>
+
+commit 5684d436e2b65cd0fe305460e437a2f69af29865
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Thu Apr 19 14:49:22 2018 -0400
+
+    xinput: Remove PropagateMask
+    
+    Initialized to a constant value, never modified, never varied by device.
+    
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit 4520ec9bd54b261fa2b210e9550d76087ef06259
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Thu Apr 19 14:42:47 2018 -0400
+
+    xinput: Remove ExtExclusiveMasks
+    
+    Initialized to a constant value, never modified, never varied by device.
+    
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit 1e29f3ea3eb63cfcb78a463ee0345ec22a013033
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Thu Mar 5 16:32:56 2020 -0500
+
+    glx: Require screens match for share contexts for classic CreateContext
+    
+    The GLX_ARB_create_context path (with which this should all get unified,
+    someday, sigh) already enforces this, but the classic path does not.
+    It's effectively assumed by the implementation anyway, so let's enforce
+    it rather than do crashy things.
+    
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit b56e501092169a9c0a60663d832ee71898a8bc4b
+Author: Vasily Khoruzhick <anarsoul@gmail.com>
+Date:   Fri Mar 20 20:36:25 2020 -0700
+
+    glx: fixup symbol name for get_extensions function
+    
+    glxProbeDriver() concatenates __DRI_DRIVER_GET_EXTENSIONS with driver name
+    to get symbol name for get_extension function. Unfortunately that doesn't
+    work for drivers that have hyphen in their name, e.g. sun4i-drm --
+    get_extensions() for these uses underscore instead.
+    
+    As result dlsym() doesn't find get_extension() function and AIGLX
+    initialization fails resulting in following message in Xorg.0.log:
+    
+    (EE) AIGLX error: sun4i-drm does not export required DRI extension
+    
+    Replace all non-alpha-numeric characters with underscore to fix the issue.
+    
+    Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
+
+commit 5e91587302e85fd6f0e8d5ffbe30182e18c6913f
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Tue Mar 17 11:45:22 2020 +0100
+
+    xwayland: Delete all frame_callback_list nodes in xwl_unrealize_window
+    
+    We were only calling xwl_present_unrealize_window for the toplevel
+    window, but the list can contain entries from child windows as well,
+    in which case we were leaving dangling pointers to freed memory.
+    
+    Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/1000
+    Fixes: c5067feaeea1 "xwayland: Use single frame callback for Present
+                         flips and normal updates"
+    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
+    Tested-by: Olivier Fourdan <ofourdan@redhat.com>
+
+commit 5b9010fa6b0ab0971dddf5108d5a5046c05180b0
+Author: Yuriy Vasilev <uuvasiliev@yandex.ru>
+Date:   Fri Mar 6 20:22:19 2020 +0300
+
+    modesetting: add support for GBM_FORMAT_ARGB1555
+    
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+    Signed-off-by: Yuriy Vasilev <uuvasiliev@yandex.ru>
+
+commit 8315fc4ea2e04598ce0c7e9771786a9334f0d456
+Author: Yuriy Vasilev <uuvasiliev@yandex.ru>
+Date:   Thu Mar 5 17:02:26 2020 +0300
+
+    modesetting: add support for GBM_FORMAT_RGB565
+    
+    This allow x-server to run with -depth 16.
+    
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+    Signed-off-by: Yuriy Vasilev <uuvasiliev@yandex.ru>
+
+commit 3d6efc4aaff80301c0b10b7b6ba297eb5e54c1a0
+Author: mntmn <lukas@mntre.com>
+Date:   Sat Feb 22 17:25:15 2020 +0100
+
+    xwayland: port rooted xwayland from wl_shell to xdg-shell protocol
+    
+    Recently, rooted Xwayland crashes on wlroots-based compositors, because
+    wlroots removed the deprecated wl_shell protocol.
+    This MR fixes this by changing the code in question to the xdg-shell
+    protocol. My motivation do this: on etnaviv-based embedded platforms,
+    rooted Xwayland is much faster and doesn't cause UI rendering bugs
+    compared to rootless Xwayland.
+    
+    Signed-off-by: Lukas F. Hartmann <lukas@mntre.com>
+
+commit de940e06f8733d87bbb857aef85d830053442cfe
+Author: Peter Harris <pharris@opentext.com>
+Date:   Thu Nov 14 14:06:21 2019 -0500
+
+    xkb: fix key type index check in _XkbSetMapChecks
+    
+    This code block was moved from a function that returns 0 for failure to a
+    function that returns 0 for Success in commit
+    649293f6b634e6305b6737a841d6e9d0f0065d6c. Change the return value to
+    BadValue to match the other checks in _XkbSetMapChecks.
+    
+    Set nTypes to xkb->map->num_types when XkbKeyTypesMask is not set, to
+    allow requests with the XkbKeyTypesMask flag unset in stuff->present to
+    succeed.
+    
+    Fixes a potential heap smash when client->swapped is true, because the
+    remainder of the request will not be swapped after "return 0", but
+    _XkbSetMap will be called anyway (because 0 is Success).
+    
+    Signed-off-by: Peter Harris <pharris@opentext.com>
+
+commit 270e439739e023463e7e0719a4eede69d45f7a3f
+Author: Peter Harris <pharris@opentext.com>
+Date:   Thu Nov 14 14:00:31 2019 -0500
+
+    xkb: only swap once in XkbSetMap
+    
+    The server swaps part of the request in _XkbSetMapChecks instead of
+    SProcXkbSetMap (presumably because walking the XkbSetMap request is hard,
+    and we don't want to maintain another copy of that code).
+    
+    Swap the first time _XkbSetMapChecks is called, not the second time.
+    
+    Signed-off-by: Peter Harris <pharris@opentext.com>
+
+commit d4faab8708779df265239b203ed5f020bff681bf
+Author: Hans de Goede <hdegoede@redhat.com>
+Date:   Mon Nov 4 15:01:18 2019 +0100
+
+    xwayland: Remove unnecessary xwl_window_is_toplevel() check from xwl_output_set_window_randr_emu_props()
+    
+    Since the recent fix to call xwl_output_set_window_randr_emu_props() from
+    ensure_surface_for_window(), it is now only called on a toplevel window,
+    so the is-toplevel check is not necessary for the
+    xwl_output_set_window_randr_emu_props() case.
+    
+    This commit moves the check to xwl_output_set_randr_emu_prop_callback()
+    so that we only do it when we are walking over all Windows of a client
+    to update the property on a change of the emulated resolution.
+    
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
+    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+
+commit 148f428dfccf606b932a00d5a00af06e8dca8a7e
+Author: Hans de Goede <hdegoede@redhat.com>
+Date:   Mon Nov 4 14:32:29 2019 +0100
+
+    xwayland: Fix setting of _XWAYLAND_RANDR_EMU_MONITOR_RECTS prop on new windows
+    
+    For window-manager managed windows, xwl_realize_window is only called for
+    the window-manager's decoration window and not for the actual client window
+    on which we should set the _XWAYLAND_RANDR_EMU_MONITOR_RECTS prop.
+    
+    Usualy this is not a problem since we walk all client windows to update
+    the property when the resolution is changed through a randr call.
+    
+    But for apps which first do the randr change and only then create their
+    window this does not work, and our xwl_output_set_window_randr_emu_props
+    call in xwl_realize_window is a no-op as that is only called for the wm
+    decoration window and not for the actual client's window.
+    
+    This commit fixes this by making ensure_surface_for_window() call
+    xwl_output_set_window_randr_emu_props on the first and only child of
+    window-manager managed windows.
+    
+    Note this also removes the non-functional xwl_output_set_window_randr_emu_props
+    call from xwl_realize_window, which was intended to do this, but does not
+    work.
+    
+    This fixes apps using the ogre3d library always running at the
+    monitors native resolution.
+    
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
+    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+
+commit 4cfc2677f5c82ca5db0919de549b9b077f1ba113
+Author: Hans de Goede <hdegoede@redhat.com>
+Date:   Mon Nov 4 11:46:49 2019 +0100
+
+    xwayland: Call xwl_window_check_resolution_change_emulation() on newly created O-R windows
+    
+    Some clients, which use vidmode to change the resolution when going fullscreen,
+    create an override-redirect window and never trigger the screen->ResizeWindow
+    callback we rely on to do the xwl_window_check_resolution_change_emulation().
+    
+    This causes us to not apply a viewport to them, causing the fullscreen window
+    to not fill the entire monitor.
+    
+    This commit adds a call to xwl_window_check_resolution_change_emulation()
+    at the end of ensure_surface_for_window() to fix this. Note that
+    ensure_surface_for_window() exits early without creating an xwl_window
+    for new windows which will not be backed by a wayland surface and which
+    thus will not have an xwl_window.
+    
+    This fixes ClanLib-0.6.x and alleggl-4.4.x using apps not properly
+    fullscreening.
+    
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
+    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+
+commit 88342353de45e64f408c38bb10cd1506ba0f159a
+Author: Hans de Goede <hdegoede@redhat.com>
+Date:   Mon Oct 7 14:27:49 2019 +0200
+
+    xwayland: Fix emulated modes not being removed when screen rotation is used
+    
+    The code building the mode-list does the following to deal with screen
+    rotation:
+    
+        if (need_rotate || xwl_output->rotation & (RR_Rotate_0 | RR_Rotate_180)) {
+            mode_width = xwl_output->width;
+            mode_height = xwl_output->height;
+        } else {
+            mode_width = xwl_output->height;
+            mode_height = xwl_output->width;
+        }
+    
+    This means we need to do something similar in xwl_output_set_emulated_mode()
+    to determine if the mode being set is the actual (not-emulated) output mode
+    and we this should remove any emulated modes set by the client.
+    
+    All callers of xwl_output_set_emulated_mode always pass a mode pointer
+    to a member of xwl_output->randr_output->modes, so we do not need to
+    duplicate this code, instead we can simply check that the passed in mode
+    is modes[0] which always is the actual output mode.
+    
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
+    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+
+commit 10df0437a2b142e61c4d84ffffa9592ac6846ef1
+Author: Hans de Goede <hdegoede@redhat.com>
+Date:   Thu Jan 9 11:00:36 2020 +0100
+
+    xwayland: Also hook screen's MoveWindow method
+    
+    Not only hook the ResizeWindow method of the screen (which really is
+    MoveAndResize) but also hook the MoveWindow method for checking if we
+    need to setup a viewport for resolution change emulation.
+    
+    Our resolution change emulation check if the windows origin matches
+    the monitors origin and the windows origin can also be changed by just
+    a move without being resized.
+    
+    Also checking on a move becomes esp. important when we move to checking
+    on changes to the top-level non-window-manager client (X11)Window instead
+    of on changes to the xwl_window later on in this patch series.
+    
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
+    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+
+commit 4fc107460a349a1a46f0e5251e6fd2a31f4c0428
+Author: Hans de Goede <hdegoede@redhat.com>
+Date:   Wed Jan 15 14:36:45 2020 +0100
+
+    xwayland: Also check resolution-change-emulation when the xwl_window itself moves
+    
+    The recent change to use the top-level non-window-manager Window drawable
+    coordinates from xwl_window_check_resolution_change_emulation() in
+    combination with only calling it on a resize when the top-level window
+    is moved breaks things with mutter/gnome-shell.
+    
+    When fullscreening a X11 window, mutter moves its window-decoration Window
+    wrapping the top-level Window to the monitor's origin coordinates (e.g. 0x0)
+    last. This updates the top-level's drawable coordinates, but as the
+    actual MoveWindow is called on the wrapper Window and not on the toplevel
+    we do not call xwl_window_check_resolution_change_emulation() and we never
+    enable the viewport.
+    
+    This commit fixes this by also calling
+    xwl_window_check_resolution_change_emulation() if the Window being moved
+    is an xwl_window itself.
+    
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
+    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+
+commit 6d98f840da6dfcf2a69e03a1b3fa0bf602ba1f27
+Author: Roman Gilg <subdiff@gmail.com>
+Date:   Fri Jan 3 17:55:28 2020 +0100
+
+    xwayland: Check emulation on client toplevel resize
+    
+    When a reparented window is resized directly check the emulation instead of
+    doing this only when the window manager parent window is resized, what might
+    never happen.
+    
+    For that to work we need to make sure that we compare the current size of the
+    client toplevel when looking for an emulated mode.
+    
+    Changes by Hans de Goede:
+    - Remove xwl_window x, y, width and height members as those are no longer used.
+    - Add check for xwl_window_from_window() returning NULL.
+    
+    Signed-off-by: Roman Gilg <subdiff@gmail.com>
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
+    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+
+commit 060f10062eb1761515b762b46cba56c7a53db72c
+Author: Roman Gilg <subdiff@gmail.com>
+Date:   Wed Jan 15 10:07:58 2020 +0100
+
+    xwayland: Make window_get_none_wm_owner return a Window instead of a Client
+    
+    Make window_get_none_wm_owner return the first non-wm-window instead of the
+    owner (client) of the first non-wm-window and rename it to
+    window_get_client_toplevel to match its new behavior.
+    
+    This is a preparation patch for switching to using the drawable coordinates
+    in xwl_window_should_enable_viewport()
+    
+    Changes by Hans de Goede:
+    - Split this change out into a separate patch for easier reviewing
+    - Rename window_get_none_wm_owner to window_get_client_toplevel to match
+      its new behavior
+    
+    Signed-off-by: Roman Gilg <subdiff@gmail.com>
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
+    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+
+commit a69f7fbb54efc8ffad320c8afd23cb41fc9edc27
+Author: Roman Gilg <subdiff@gmail.com>
+Date:   Fri Jan 3 17:27:28 2020 +0100
+
+    xwayland: Recurse on finding the none-wm owner
+    
+    An X11 window manager might add a chain of parent windows when reparenting to a
+    decoration window.
+    
+    That is for example the case for KWin, which reparents client windows to one
+    decoration and another wrapper parent window.
+    
+    Account for that by a recursion into the tree. For now assume as before that
+    all X11 window managers reparent with one child only for these parent windows.
+    
+    Changes by Hans de Goede:
+    - Move the xwl_window_is_toplevel() from a later patch in this series here
+      as it really belongs together with these changes
+    - Drop no longer necessary xwl_window argument from window_get_none_wm_owner
+      parameters
+    
+    Signed-off-by: Roman Gilg <subdiff@gmail.com>
+    Reviewed-by: Hans de Goede <hdegoede@redhat.com>
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
+    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+
+commit 948e02872feb641a176b3af82b6ef1201c97bb16
+Author: Roman Gilg <subdiff@gmail.com>
+Date:   Fri Jan 3 17:12:14 2020 +0100
+
+    xwayland: Reuse viewport instead of recreating
+    
+    When a viewport is already created we can reuse this object instead of
+    destroying it and getting a new one for updating the source rectangle and
+    destination size.
+    
+    Signed-off-by: Roman Gilg <subdiff@gmail.com>
+    Reviewed-by: Hans de Goede <hdegoede@redhat.com>
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
+    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+
+commit ded89300c1dd541f59fe6e93c5c69d7fe7088244
+Author: Hans de Goede <hdegoede@redhat.com>
+Date:   Mon Jan 27 11:08:00 2020 +0100
+
+    xwayland: Cache client-id for the window-manager client
+    
+    Instead of iterating over all clients which are listening for events on the
+    root window and checking if the client we are dealing with is the one
+    listening for SubstructureRedirectMask | ResizeRedirectMask events and thus
+    is the window-manager, cache the client-id of the window-manager in
+    xwl_screen and use that when checking if a client is the window-manager.
+    
+    Note that we cache and compare the client-id rather then the ClienPtr,
+    this saves reading the ClientPtr from the global clients array when doing
+    the comparison.
+    
+    Suggested-by: Olivier Fourdan <ofourdan@redhat.com>
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
+    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+
+commit 1e44861aba449eec81d69b1da3a6e6f88676e04f
+Author: Roman Gilg <subdiff@gmail.com>
+Date:   Mon May 27 23:01:53 2019 +0200
+
+    present: Rename window_msc variable in present function
+    
+    The value is not the current msc of the window, but the target value
+    the client sets independently of the window speicific msc offset. Make
+    this clearer.
+    
+    Signed-off-by: Roman Gilg <subdiff@gmail.com>
+    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
+
+commit d3c1b223cec2b475c4f1661d7e5dc5238d08d8f6
+Author: Roman Gilg <subdiff@gmail.com>
+Date:   Mon May 27 22:58:49 2019 +0200
+
+    present: Move scmd-update-window-crtc function
+    
+    Move the code portion down. That way it is at a similar position as in
+    the window mode file.
+    
+    Signed-off-by: Roman Gilg <subdiff@gmail.com>
+    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
+
+commit 8c2dcc5f800438d2b4545d21a515e013e6aac484
+Author: Roman Gilg <subdiff@gmail.com>
+Date:   Mon May 27 22:49:23 2019 +0200
+
+    present: Code cleanup of window to crtc timings update
+    
+    Make the code more readable by going through some logical abort
+    conditions. Also make the function only about updating the crtc
+    msc value and not about also returning the next target msc.
+    
+    Signed-off-by: Roman Gilg <subdiff@gmail.com>
+    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
+
+commit 4d89ba0058457d51f2e1a132c0b7fc8a3ec5c76d
+Author: Roman Gilg <subdiff@gmail.com>
+Date:   Mon May 27 22:42:34 2019 +0200
+
+    present: Unfold and annotate the target-msc getter
+    
+    Unfold and extensively annotate the target-msc adjustment function, to make
+    it easier to understand what's happening and why.
+    
+    Signed-off-by: Roman Gilg <subdiff@gmail.com>
+    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
+
+commit 99e55f1b955e2db442184756fcd8b95791fd71de
+Author: Roman Gilg <subdiff@gmail.com>
+Date:   Mon May 27 22:32:22 2019 +0200
+
+    present: Adjust timings with value arguments
+    
+    We can use value arguments instead of pointers when adjusting the timings
+    by returning the adjusted value. This improves the readability.
+    
+    Signed-off-by: Roman Gilg <subdiff@gmail.com>
+    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
+
+commit 4709d24f8e3ef5ee79085b77401eaacd7e1690c7
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Fri Feb 14 15:20:59 2020 +0100
+
+    xwayland: Add version command line option
+    
+    Xorg supports the '-version' command line option, add something similar
+    to Xwayland.
+    
+    Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/976
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Jonas Ã…dahl <jadahl@gmail.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit ee9f6e20de1408d572dc1eba33f3d2a8501d7da5
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Aug 27 18:10:38 2019 -0400
+
+    meson: Add support for libunwind
+
+commit 42aaf37241fedfd6a0f72b255f2d45d6ea34d8c6
+Author: Zoltán Böszörményi <zboszor@gmail.com>
+Date:   Wed Feb 12 21:29:52 2020 +0000
+
+    Fix modesetting device matching through kmsdev device path
+    
+    xf86platformProbeDev didn't check the device path, fix it.
+    
+    This is a problem when trying to set up a non-PCI device via
+    explicit xorg.conf.d configuration.
+    
+    An USB DisplayLink device, being non-PCI was always set up
+    as a GPU device assigned to screen 0 instead of a regular
+    framebuffer, potentially having its own dedicated screen,
+    despite such configuration as below. Only the relevant parts
+    of the configuration are quoted, it's part of a larger context
+    with an Intel chip that has 3 outputs:
+    * DP1 connected to an LCD panel,
+    * VGA1 connected to an external monitor,
+    * HDMI1 unconnected and having no user visible connector
+    
+    Section "ServerFlags"
+            Option          "AutoBindGPU" "false"
+    EndSection
+    
+    ...
+    
+    Section "Device"
+            Identifier      "Intel2"
+            Driver          "intel"
+            BusID           "PCI:0:2:0"
+            Screen          2
+            Option          "Monitor-HDMI1" "HDMI1"
+            Option          "ZaphodHeads" "HDMI1"
+    EndSection
+    
+    Section "Device"
+            Identifier      "UDL"
+            Driver          "modesetting"
+            Option          "kmsdev" "/dev/dri/card0"
+            #BusID          "usb:0:1.2:1.0"
+            Option          "Monitor-DVI-I-1" "DVI-I-1"
+            Option          "ShadowFB" "on"
+            Option          "DoubleShadow" "on"
+    EndSection
+    
+    ...
+    
+    Section "Screen"
+            Identifier      "SCREEN2"
+            Option          "AutoServerLayout" "on"
+            Device          "UDL"
+            GPUDevice       "Intel2"
+            Monitor         "Monitor-DVI-I-1"
+            SubSection      "Display"
+                    Modes   "1024x768"
+                    Depth   24
+            EndSubSection
+    EndSection
+    
+    Section "ServerLayout"
+            Identifier      "LAYOUT"
+            Option          "AutoServerLayout" "on"
+            Screen          0 "SCREEN"
+            Screen          1 "SCREEN1" RightOf "SCREEN"
+            Screen          2 "SCREEN2" RightOf "SCREEN1"
+    EndSection
+    
+    On the particular machine I was trying to set up an UDL device,
+    I found the following structure was being used to match
+    the device to a platform device while I was debugging the issue:
+    
+    xf86_platform_devices[0] == Intel, /dev/dri/card1, primary platform device
+    xf86_platform_devices[1] == UDL, /dev/dri/card0
+    
+    devList[0] == "Intel0", ZaphodHeads: DP1
+    devList[1] == "Intel1", ZaphodHeads: VGA1
+    devList[2] == "UDL"
+    devList[3] == "Intel2", ZaphodHeads: HDMI1 (intended GPU device to UDL)
+    
+    When xf86platformProbeDev() matched the UDL device, the BusID
+    check failed in both cases of:
+    * BusID "usb:0:1.2:1.0" was specified
+    * Option "kmsdev" "/dev/dri/card0" was specified
+    
+    As a result, xf86platformProbeDev() went on to call probeSingleDevice()
+    with xf86_platform_devices[0] and devList[2], resulting in the
+    UDL device being set up as a GPU device assigned to the first screen
+    instead of as a framebuffer on the third screen as the configuration
+    specified.
+    
+    Checking Option "kmsdev" in code code may be a layering violation.
+    But the modesetting driver is actually part of the Xorg sources
+    instead of being an external driver, so he "kmsdev" path knowledge
+    may be used here.
+    
+    Signed-off-by: Böszörményi Zoltán <zboszor@pr.hu>
+
+commit a542224ea28e2e8ccaf5e0df85bf6c603e97599a
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Fri Feb 7 12:15:07 2020 +0100
+
+    xwayland: Call glamor_block_handler from xwl_screen_post_damage
+    
+    In between the two phases introduced by the previous change. This makes
+    sure all pending drawing to the new buffers is flushed before they're
+    committed to the Wayland server.
+
+commit f88d9b1f779835302e02e255fcd45989db7f488d
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Fri Feb 7 12:06:39 2020 +0100
+
+    xwayland: Split up xwl_screen_post_damage into two phases
+    
+    The first phase sets the new surface properties for all damaged
+    windows, then the second phase commits all surface updates.
+    
+    This is preparatory for the next change, there should be no observable
+    change in behaviour (other than the order of Wayland protocol
+    requests).
+    
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit 7b33c2d3f31fe03f88cc26f08590f2baf1a6ef36
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Thu Feb 6 18:45:19 2020 +0100
+
+    Revert "xwayland/glamor-gbm: Add xwl_glamor_gbm_post_damage hook"
+    
+    This reverts commit 9e85aa9c1fbf51ef00674e3a91aded4083a14a15.
+    
+    To be replaced with a better solution.
+    
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit 1310346d6052c91910f526cbdcc81061fe6abd94
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Mon Feb 10 18:48:05 2020 +0100
+
+    gitlab-ci: Add meson build job with glamor disabled
+    
+    To prevent breakage with glamor disabled from creeping in again.
+    
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit 72ccd7f540a36185ecdb62324c68496fb57e65fe
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Mon Feb 10 18:44:11 2020 +0100
+
+    gitlab-ci: Drop "-build-and-test" job name suffix
+    
+    It's long and kind of redundant.
+    
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit 49553049e871d03e9e26672843de8712d20f688a
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Mon Feb 10 18:57:42 2020 +0100
+
+    modesetting: Remove local variable only used with glamor enabled
+    
+    Resulted in a build failure with -Werror:
+    
+    ../hw/xfree86/drivers/modesetting/drmmode_display.c: In function ‘drmmode_crtc_set_mode’:
+    ../hw/xfree86/drivers/modesetting/drmmode_display.c:759:15: error: unused variable ‘screen’ [-Werror=unused-variable]
+      759 |     ScreenPtr screen = crtc->scrn->pScreen;
+          |               ^~~~~~
+    
+    Fixes: c66c548eabf0 "modesetting: Call glamor_finish from
+                         drmmode_crtc_set_mode"
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit 0cb9fa7949d6c5398de220fbdbe1e262e943fcbb
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Mon Feb 10 18:41:44 2020 +0100
+
+    modesetting: Fix build with glamor disabled
+    
+    Fixes: cb1b1e184723 "modesetting: Indirect the glamor API through
+                         LoaderSymbol"
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit bfb36a5806196e257958907bfcdd71c24acc5d37
+Author: Pekka Paalanen <pekka.paalanen@collabora.com>
+Date:   Mon Feb 10 16:07:41 2020 +0100
+
+    randr: auto-bind of GPU is a config change
+    
+    When a GPU is auto-bound adding more outputs to a screen, that needs to count
+    as a configuration change on that screen so that a WM listening for
+    RRScreenChangeNotify gets notified and handles it as a hotplug. This is
+    particularly for cases where the outputs are already connected. Otherwise
+    nothing might happen.
+    
+    Issue #909 describes a real world case where plugging in a DisplayLink dock
+    with a monitor already connected is sometimes left inactive by GNOME. That
+    issue is a race, and requires adding a sleep(5); as the first thing in
+    NewGPUDeviceRequest() to reproduce reliably. With the sleep, the monitor in the
+    dock will never activate automatically. Add this fix over the sleep, and the
+    issue is gone.
+    
+    This fix was originally developed on a branch replicating Ubuntu 19.04 patch
+    set based on xserver 1.20.4. Testing on master branch was impossible due to
+    xorg/xserver#910.
+    
+    Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/909
+    
+    Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit 3aa754c3637694a2a3083b8fd9fba0bc862b1a67
+Author: David Seifert <soap@gentoo.org>
+Date:   Wed Feb 5 11:32:24 2020 +0100
+
+    Always use `-fno-common` in CI
+    
+    * This prevents issues from creeping back in at a later stage.
+
+commit 1cfdd1a96580733df3625bcea3384ffee3dc92df
+Author: Dave Airlie <airlied@redhat.com>
+Date:   Tue Feb 4 16:02:06 2020 +1000
+
+    modesetting: remove unnecessary error message, fix zaphod leases
+    
+    I introduced this error with the MST hotplug code, but it can trigger
+    on zaphod setups, and is perfectly fine. There is no support for
+    MST/hotplug on zaphod setups currently, so we can just skip over
+    the dynamic connector handling here. However we shouldn't skip
+    over the lease handling so move it into the codepath.
+    
+    Fixes: 9257b1252da9 ("modesetting: add dynamic connector hotplug support (MST) (v3)")
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+    Signed-off-by: Dave Airlie <airlied@redhat.com>
+
+commit 9e85aa9c1fbf51ef00674e3a91aded4083a14a15
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Thu Jan 30 12:29:03 2020 +0100
+
+    xwayland/glamor-gbm: Add xwl_glamor_gbm_post_damage hook
+    
+    It flushes any pending drawing to the kernel, to make sure it'll be
+    visible to the Wayland server.
+    
+    Without this, it was possible for the Wayland server to process surface
+    commits before Xwayland got around to flushing the corresponding
+    drawing, which could result in stale or even completely random window
+    contents being visible.
+    
+    v2:
+    * Make EGL backend post_damage hook mandatory, don't check for NULL in
+      xwl_glamor_post_damage. (Olivier Fourdan)
+    
+    Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/951
+    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
+
+commit 6a5e47c57d16de8b6a6a2636f3cbad1aebec32e2
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Mon Jan 27 17:47:10 2020 +0100
+
+    xfree86/modes: Bail from xf86RotateRedisplay if pScreen->root is NULL
+    
+    Avoids a crash in xf86RotatePrepare -> DamageRegister during
+    CreateScreenResources if rotation or another transform is configured for
+    any connected RandR output in xorg.conf. The generic rotation/transform
+    code generally can't work without the root window currently.
+    
+    Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/969
+    Fixes: 094f42cdfe5d "xfree86/modes: Call xf86RotateRedisplay from
+                         xf86CrtcRotate"
+    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit 578371616e09364318c9fb2371a693d438b31b29
+Author: Daniel Llewellyn <daniel@bowlhat.net>
+Date:   Wed Jan 29 21:33:24 2020 +0000
+
+    os: Ignore dying client in ResetCurrentRequest
+    
+    You might as well, it's harmless. Better, some cleanup code (like DRI2
+    swap wait) needs to run both normally and at client exit, so it
+    simplifies the callers to not need to check first. See 4308f5d3 for a
+    similar example.
+    
+    Props: @ajax (Adam Jackson)
+    
+    Fixes: xorg/xserver#211
+    
+    Signed-off-by: Daniel Llewellyn <diddledan@ubuntu.com>
+
+commit b6a5389e1789d63c6c61983b973b8559953afc88
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Tue Jan 28 18:39:10 2020 +0100
+
+    gitlab-ci: Enable -Werror in the meson build job
+    
+    There are no warnings left, so let's prevent new ones from creeping
+    back in.
+
+commit 794fd7e563ca9430a4a29a8e9f1923c07c23a480
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Tue Jan 28 18:35:45 2020 +0100
+
+    tests/misc: Drop redundant screenInfo declaration
+    
+    GCC warned about it:
+    
+    ../test/misc.c:36:19: warning: redundant redeclaration of ‘screenInfo’ [-Wredundant-decls]
+       36 | extern ScreenInfo screenInfo;
+          |                   ^~~~~~~~~~
+    In file included from ../test/misc.c:30:
+    ../include/scrnintstr.h:688:29: note: previous declaration of ‘screenInfo’ was here
+      688 | extern _X_EXPORT ScreenInfo screenInfo;
+          |                             ^~~~~~~~~~
+
+commit 4287604425e7ff905036541829896d1ddf7c65d0
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Tue Jan 28 18:31:13 2020 +0100
+
+    Xephyr: Cast "red" to char* for xcb_aux_parse_color
+    
+    xcb_aux_parse_color takes a non-const pointer, even though it doesn't
+    modify the string or take ownership of its memory.
+    
+    Avoids the following warning from GCC:
+    
+    ../hw/kdrive/ephyr/hostx.c: In function ‘hostx_init’:
+    ../hw/kdrive/ephyr/hostx.c:683:30: warning: passing argument 1 of ‘xcb_aux_parse_color’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
+      683 |     if (!xcb_aux_parse_color("red", &red, &green, &blue)) {
+          |                              ^~~~~
+    In file included from ../hw/kdrive/ephyr/hostx.c:50:
+    /usr/include/xcb/xcb_aux.h:194:27: note: expected ‘char *’ but argument is of type ‘const char *’
+      194 | xcb_aux_parse_color(char *color_name,
+          |                     ~~~~~~^~~~~~~~~~
+
+commit 65387391a551fff6fec808d48b9bf4b6181cb050
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Tue Jan 28 18:22:45 2020 +0100
+
+    loader: strdup const string assigned to local variable name
+    
+    There's a free(name) at the end of the function.
+    
+    GCC warned about this:
+    
+    ../hw/xfree86/loader/loadmod.c: In function ‘LoadModule’:
+    ../hw/xfree86/loader/loadmod.c:702:18: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
+      702 |         m = name = "int10";
+          |                  ^
+
+commit e1fa3beb2fe2519e69f859f0acdc68e5a770de27
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Jan 28 13:26:41 2020 -0500
+
+    Revert "dri2: Don't make reference to noClientException"
+    
+    It's true that the value would always be -1, if it's not zero, but it's
+    usually zero is the problem. As a result we return failure from
+    otherwise successful indirect GLX paths, which isn't very nice of us.
+    
+    This reverts commit 7d33ab0f8c7958b205076f71e4b47c24aace77fd.
+    
+    Fixes: https://gitlab.freedesktop.org/xorg/xserver/issues/211
+
+commit 435d41d5ffe5467f43225b59411ca9f9a05c10a6
+Author: David Seifert <soap@gentoo.org>
+Date:   Fri Jan 24 12:49:44 2020 +0100
+
+    Fix building with `-fno-common`
+    
+    * GCC 10 will switch the default to `-fno-common`.
+      https://gcc.gnu.org/PR85678
+    
+    Bug: https://bugs.gentoo.org/705880
+    Signed-off-by: Matt Turner <mattst88@gmail.com>
+
+commit 83826075e59c0393c16d2a2482dc5c9f2fdf4564
+Author: George Matsumura <gmmatsumura01@bvsd.org>
+Date:   Thu Dec 26 23:01:26 2019 +0000
+
+    Restrict 1x1 pixmap filling optimization to GXcopy
+    
+    This restricts an optimization whereby the filling of 1x1 pixmaps
+    went around the driver-provided function to cases where the
+    source color is meant to be directly copied to the destination,
+    as opposed to other operations which should produce different
+    destination values than just the foreground color.
+    
+    Signed-off-by: George Matsumura <gmmatsumura01@bvsd.org>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit 0839b0523a01067cb9c9b53ebdd9ce4c00f0eb12
+Author: E5ten <ethancsommer@gmail.com>
+Date:   Wed Jan 15 17:36:06 2020 +0000
+
+    meson: add prefix to serverconfigdir
+    
+    fixes #853
+
+commit a24a786fc8490fda08b15c3dab6fa6750f008ecb
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Tue Jan 14 09:23:34 2020 +0100
+
+    modesetting: Explicitly #include "mi.h"
+    
+    For the miClearDrawable prototype. Apparently it doesn't get pulled in
+    for some build configurations, breaking the build.
+    
+    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
+
+commit 25ca99df38a2c28c25ab20a917e68442285f2353
+Author: Kenneth Graunke <kenneth@whitecape.org>
+Date:   Mon Jan 13 23:34:49 2020 -0800
+
+    configure: Define GLAMOR_HAS_EGL_QUERY_DRIVER when available
+    
+    Commit 195c2ef8f9f07b9bdabc0f554a9033b7857b99c7 added this to the Meson
+    build but neglected to add it to autotools.
+    
+    v2: Also update dix-config.h.in
+    
+    Fixes: 195c2ef8f ("glamor: Add a function to get the driver name via EGL_MESA_query_driver")
+    
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com> [v1]
+    Reviewed-by: Eric Engestrom <eric@engestrom.ch> [v1]
+    Reviewed-by: Matt Turner <mattst88@gmail.com>
+
+commit 49456e0a37fac7bc9d1f01bc1519fb0d699956db
+Author: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date:   Fri Dec 27 23:33:37 2019 +0100
+
+    hw/xfree86/common/xf86Init.c: fix build without glx
+    
+    Since commit d8ec33fe0542141aed1d9016d2ecaf52da944b4b, an include on
+    glxvndabi.h has been added to hw/xfree86/common/xf86Init.c
+    
+    However, if glx is disabled through --disable-glx and GLX headers are
+    not installed in the build's environment, build fails on:
+    
+    In file included from xf86Init.c:81:
+    ../../../include/glxvndabi.h:64:10: fatal error: GL/glxproto.h: No such file or directory
+       64 | #include <GL/glxproto.h>
+          |          ^~~~~~~~~~~~~~~
+    
+    Fix this failure by removing this include which does not seem to be
+    needed (an other option would have been to keep it under an ifdef GLXEXT
+    block)
+    
+    Fixes:
+     - http://autobuild.buildroot.org/results/de838a843f97673d1381a55fd4e9b07164693913
+    
+    Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+
+commit 26004df63c25061586a967f3586795a75280acc2
+Author: Lubomir Rintel <lkundrak@v3.sk>
+Date:   Wed Dec 25 18:54:03 2019 +0100
+
+    glamor_egl: Reject OpenGL < 2.1 early on
+    
+    The Etnaviv driver on GC2000 reports desktop OpenGL 1.3 but also OpenGL ES 2.0.
+    However, with the modesetting driver, GLES2 never gets a chance:
+    
+      [ 11233.393] Require OpenGL version 2.1 or later.
+      [ 11233.393] (EE) modeset(0): Failed to initialize glamor at ScreenInit() time.
+      [ 11233.393] (EE)
+      Fatal server error:
+      [ 11233.395] (EE) AddScreen/ScreenInit failed for driver 0
+    
+    Let's reject old desktop GL early on, just like XWayland seems to do.
+    
+    This is perhaps a slightly bit more complicated that one would expect, since we
+    need to call eglMakeCurrent() before we query the GL version.
+    
+    Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
+
+commit 98bfee6a1b901a6f886d74dcc9fd3cbb68838375
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Mon Dec 23 09:26:17 2019 +0100
+
+    xwayland: Include xwayland-window.h from xwayland-glamor-eglstream.c
+    
+    Fixes build failure.
+    
+    Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/954
+    Fixes: 89e32d00f6e0 "xwayland: Move Xwayland windows to its own sources"
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
+
+commit e914fb16adcab8807a280450d5cdfff4bbdce96b
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Mon Dec 23 09:53:26 2019 +0100
+
+    gitlab-ci: Install libnvidia-egl-wayland-dev package
+    
+    In order to build-test the Xwayland eglstream code.
+    
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
+
+commit a52122c7f2697361f53e82ac384ff3f4eba24c76
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Mon Dec 23 09:32:07 2019 +0100
+
+    gitlab-ci: Use sorted lists of distro packages, one per line
+    
+    This will make it easier to review changes.
+    
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
+
+commit 37a64ede3b545cda9edde65c65c02054d2da43cb
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Mon Dec 23 09:51:43 2019 +0100
+
+    gitlab-ci: Strip down docker image contents more
+    
+    Making the image significantly smaller.
+    
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
+
+commit 23b72d8e4b624ffd81a35e3b62be2430051a6ffa
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Mon Dec 23 09:35:09 2019 +0100
+
+    gitlab-ci: Use -j4 instead of -j$(proc)
+    
+    The shared GitLab CI runners are configured for jobs making use of up
+    to 4 CPU cores, attempting to use more may overload them.
+    
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
+
+commit 9107a610deb130d0e4ddee92d6ca9a08a8e103f3
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Mon Dec 23 10:41:32 2019 +0100
+
+    gitlab-ci: Use host-mapped directory for ccache
+    
+    Same as done in Mesa.
+    
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
+
+commit 4226c6d0329df440551b7b91ae573a82c64a1ac9
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date:   Thu Dec 26 13:40:17 2019 -0800
+
+    modesetting: Check whether RandR was initialized before calling rrGetScrPriv
+    
+    Calling rrGetScrPriv when RandR isn't initialized causes an assertion
+    failure that aborts the server:
+    
+     Xorg: ../include/privates.h:121: dixGetPrivateAddr: Assertion `key->initialized' failed.
+    
+     Thread 1 "Xorg" received signal SIGABRT, Aborted.
+     0x00007ffff78a8f25 in raise () from /usr/lib/libc.so.6
+     (gdb) bt
+     #0  0x00007ffff78a8f25 in raise () from /usr/lib/libc.so.6
+     #1  0x00007ffff7892897 in abort () from /usr/lib/libc.so.6
+     #2  0x00007ffff7892767 in __assert_fail_base.cold () from /usr/lib/libc.so.6
+     #3  0x00007ffff78a1526 in __assert_fail () from /usr/lib/libc.so.6
+     #4  0x00007ffff7fb57c1 in dixGetPrivateAddr (privates=0x555555ab1b60, key=0x555555855720 <rrPrivKeyRec>) at ../include/privates.h:121
+     #5  0x00007ffff7fb5822 in dixGetPrivate (privates=0x555555ab1b60, key=0x555555855720 <rrPrivKeyRec>) at ../include/privates.h:136
+     #6  0x00007ffff7fb586a in dixLookupPrivate (privates=0x555555ab1b60, key=0x555555855720 <rrPrivKeyRec>) at ../include/privates.h:166
+     #7  0x00007ffff7fb8445 in CreateScreenResources (pScreen=0x555555ab1790) at ../hw/xfree86/drivers/modesetting/driver.c:1335
+     #8  0x000055555576c5e4 in xf86CrtcCreateScreenResources (screen=0x555555ab1790) at ../hw/xfree86/modes/xf86Crtc.c:744
+     #9  0x00005555555d8bb6 in dix_main (argc=4, argv=0x7fffffffead8, envp=0x7fffffffeb00) at ../dix/main.c:214
+     #10 0x00005555557a4f0b in main (argc=4, argv=0x7fffffffead8, envp=0x7fffffffeb00) at ../dix/stubmain.c:34
+    
+    This can happen, for example, if the server is configured with Xinerama
+    and there is more than one X screen:
+    
+     Section "ServerLayout"
+       Identifier "crash"
+       Screen 0 "modesetting"
+       Screen 1 "dummy" RightOf "modesetting"
+       Option "Xinerama"
+     EndSection
+    
+     Section "Device"
+       Identifier "modesetting"
+       Driver "modesetting"
+     EndSection
+    
+     Section "Screen"
+       Identifier "modesetting"
+       Device "modesetting"
+     EndSection
+    
+     Section "Device"
+       Identifier "dummy"
+       Driver "dummy"
+     EndSection
+    
+     Section "Screen"
+       Identifier "dummy"
+       Device "dummy"
+     EndSection
+    
+    The problem does not reproduce if there is only one X screen because of
+    this code in xf86RandR12Init:
+    
+     #ifdef PANORAMIX
+         /* XXX disable RandR when using Xinerama */
+         if (!noPanoramiXExtension) {
+             if (xf86NumScreens == 1)
+                 noPanoramiXExtension = TRUE;
+             else
+                 return TRUE;
+         }
+     #endif
+    
+    Fix the problem by checking dixPrivateKeyRegistered(rrPrivKey) before
+    calling rrGetScrPriv. This is similar to what the xf86-video-amdgpu
+    driver does:
+    https://gitlab.freedesktop.org/xorg/driver/xf86-video-amdgpu/blob/fd66f5c0bea2b7c22a47bfd5eb1f22d32d166d9c/src/amdgpu_kms.c#L388
+    
+    Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit b1ee4036bfd59dfd506ed8312b63edffc913b1c1
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Mon Dec 23 10:06:25 2019 +0100
+
+    gitlab-ci: Mark jobs as interruptible
+    
+    Allowing redundant pipelines to be automatically cancelled.
+
+commit 1e9c63beddb3010bb1f6eb96679410ca0aca037e
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Mon Dec 23 10:03:20 2019 +0100
+
+    gitlab-ci: Turn .retry YAML anchor into .ci-run-policy template
+    
+    To match Mesa.
+
+commit 456dff1bf890459840718339279dcb84d36531eb
+Author: Alex Goins <agoins@nvidia.com>
+Date:   Thu Dec 12 20:18:53 2019 -0600
+
+    modesetting: Fix msSharePixmapBacking Segfault Regression
+    
+    Commit cb1b1e184 modified msSharePixmapBacking() to derive modesettingPtr from
+    the 'screen' argument. Unfortunately, the name of the argument is misleading --
+    the screen is the slave screen. If the master is modesetting,
+    and the slave is not modesetting, it will segfault.
+    
+    To fix the problem, this change derives modesettingPtr from
+    ppix->drawable.pScreen. This method is already used when calling
+    ms->glamor.shareable_fd_from_pixmap() later in the function.
+    
+    To avoid future issues, this change also renames the 'screen' argument to
+    'slave'.
+    
+    Signed-off-by: Alex Goins <agoins@nvidia.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit 58155baeac494c95a45d99d44dd9307e8aedd2af
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Wed Dec 18 15:00:11 2019 +0100
+
+    xwayland: Cleanup and remove `xwayland.h`
+    
+    Now that each source and header should be in order, we can safely cleaup
+    the last remaining bits from the main `xwayland.h` which is not needed
+    anymore and can be removed.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit c830bd847fa5b60db95dcbb54dde3868f2a31a9a
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Wed Dec 18 10:33:16 2019 +0100
+
+    xwayland: Remove `MODIFIER_META` definition
+    
+    It's nowhere to be used.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit 4c644fd792e642fc566f7b0b08bc000ecf641a50
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Wed Dec 18 14:13:34 2019 +0100
+
+    xwayland: Move Xwayland GLX declaration
+    
+    Move the Xwayland GLX declaration to its own header file.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit 808a0a038b945171e0c6e18093fe1b9daeafe26a
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Wed Dec 18 11:18:22 2019 +0100
+
+    xwayland: Move Xwayland vidmode declaration
+    
+    Move the Xwayland vidmode declaration to its own header file.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit e8ba8a94e120abf78886ca809f0bf01e7258367c
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Wed Dec 18 10:56:34 2019 +0100
+
+    xwayland: Move Xwayland CVT declaration
+    
+    Move the Xwayland CVT declaration to its own header file.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit 0617c635fa3577965c5fa198ed4e57da8fee919d
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Wed Dec 18 10:03:43 2019 +0100
+
+    xwayland: Separate Xwayland screen code
+    
+    Move Xwayland screen related code to a separate source file and header.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit 211609a9387a5fb0df83ef6ddea59ef817ea2f59
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Wed Dec 18 10:45:17 2019 +0100
+
+    xwayland: Move Xwayland cursor declarations
+    
+    Move the Xwayland cursor declarations to their own header file.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit aaeeb10b74920110c36efe069a47722bda5063dd
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Tue Dec 17 18:02:17 2019 +0100
+
+    xwayland: Move Xwayland output declarations
+    
+    Move the Xwayland output declarations to their own header file.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit 091b24f13e3a9cf46f1c55ba0ba3f35e0bb41a59
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Tue Dec 17 17:40:21 2019 +0100
+
+    xwayland: Move Xwayland input declarations
+    
+    Move the Xwayland input declarations to their own header file.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit e23d2223d89ee9ae7977b028f2a6522707e921d6
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Tue Dec 17 17:18:11 2019 +0100
+
+    xwayland: Move Xwayland present declarations
+    
+    Move the Xwayland Present declarations to their own header file.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit d780bdc2fdaeb94b873a9b6dd05a3ab636840ce7
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Tue Dec 17 17:07:58 2019 +0100
+
+    xwayland: Separate Xwayland pixmap code
+    
+    Move Xwayland generic pixmap code to a separate source file and header.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit 89e32d00f6e03fcdab267bfd9f0b0c5c2747d380
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Tue Dec 17 15:07:07 2019 +0100
+
+    xwayland: Move Xwayland windows to its own sources
+    
+    Over time, Xwayland main source file `xwayland.c` has grown in size
+    which makes it look cluttered and harder to read.
+    
+    Move the code dealing with Xwayland window to its own source and header
+    files.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit 3a59650ba74e9d97473fa39269fdb74ad7e1cd43
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Mon Dec 16 17:23:30 2019 +0100
+
+    xwayland: Move GLAMOR declarations to their own header
+    
+    Currently, `xwayland.h` contains all the declarations, which is a bit
+    awkward and hard to follow.
+    
+    Move the GLAMOR relevant declarations to their own header file.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit 177c8a230232d114cdbe1650bd22a396d182f5f8
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Mon Dec 16 17:07:02 2019 +0100
+
+    xwayland: Move SHM declarations to their own header
+    
+    Currently, `xwayland.h` contains all the declarations, which is a bit
+    awkward and hard to follow.
+    
+    Move the SHM relevant declarations to their own header file.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit c20e61fddc8c2b8838533f23f54c1c5acea3e05f
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Tue Dec 17 08:48:51 2019 +0100
+
+    xwayland: Move Xwayland structures to their own header
+    
+    Currently, `xwayland.h` contains all the declarations, which is a bit
+    awkward and hard to follow.
+    
+    Move the Xwayland structures declarations to their own header file.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit 5bfca0038e92d61e58d4dc1a54748faef8273023
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Wed Dec 18 18:18:50 2019 +0100
+
+    glamor: Only use dual blending with GLSL >= 1.30
+    
+    It can't be used with older GLSL. Fixes a crash when attempting to
+    anyway.
+    
+    Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/97
+    Fixes: e7308b6c7756 "glamor: Add support for CA rendering in a single pass."
+    Reviewed-by: Dave Airlie <airlied@redhat.com>
+    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
+
+commit 846e81ecb83f30b555ce71a32cd6965d7b9939a5
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Tue Dec 17 18:39:17 2019 +0100
+
+    xwayland: Create duplicate TrueColor GLXFBConfigs for Composite
+    
+    Similar to what is done in Xorg. Not doing this prevented apps from
+    using GLX with a Composite visual, e.g. Firefox WebRender or Chromium.
+    
+    v2:
+    * Fix inverted direct_color test, fixes Chromium as well.
+    * Drop Composite extension guards, since other Xwayland code calls
+      compRedirectWindow/compUnredirectWindow unconditionally anyway.
+    
+    Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/921
+    Fixes: 8469241592b94b "xwayland: Add EGL-backed GLX provider"
+    Reviewed-by: Adam Jackson <ajax@redhat.com> # v1
+
+commit 02e7a497ceacef490921a8ae7115cd9f28a66dec
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Tue Dec 17 18:43:07 2019 +0100
+
+    xwayland: Fix duplicate "direct_color" comment to say "double_buffer"
+    
+    Fixes: 8469241592b94b "xwayland: Add EGL-backed GLX provider"
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit 9b31358c52e951883bf7c01c953a9da080542244
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Wed Nov 27 18:56:05 2019 +0100
+
+    xwayland: Use frame callbacks for Present vblank events
+    
+    Instead of only the fallback timer.
+    
+    Fixes https://gitlab.freedesktop.org/xorg/xserver/issues/854
+    
+    v2:
+    * Drop unused frame_callback member of struct xwl_present_window
+      (Olivier Fourdan)
+    
+    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
+
+commit c5067feaeea115761f0a72f37407c6e5e943d1a1
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Wed Nov 27 18:04:06 2019 +0100
+
+    xwayland: Use single frame callback for Present flips and normal updates
+    
+    Using a list of Present windows that need to be called back.
+    
+    This prepares for the following change, there should be no change in
+    observed behaviour.
+    
+    v2:
+    * Use xwl_window_create_frame_callback instead of making the
+      frame_listener struct non-static (Olivier Fourdan)
+    
+    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
+
+commit f80eea0529b2cfb805a9c7d4994a4235451131e3
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Fri Dec 13 18:26:35 2019 +0100
+
+    xwayland: Add xwl_window_create_frame_callback helper
+    
+    This will be used by the following changes. No functional change
+    intended.
+    
+    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
+
+commit 46e5236bbe0ca90f1c2a480c54d3f729d4930dfb
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Thu Dec 12 13:50:16 2019 +0100
+
+    xwayland: Take border width into account
+    
+    Damage coordinates are relative to the drawable, (0,0) being the top
+    left corner inside the border.
+    
+    Therefore, when applying damages or accumulating damages between window
+    buffers, we need to take the window border width into account as well,
+    otherwise the updates might be only partial or misplaced.
+    
+    Related: https://gitlab.freedesktop.org/xorg/xserver/issues/951
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit 1cb886bc2a3e556b15779300350ec8867b4f907e
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Fri Dec 13 11:10:03 2019 +0100
+
+    xwayland: Recycle window buffers when setting pixmap
+    
+    Right now, we would recycle the window buffers whenever the window the
+    window is resized.
+    
+    This, however, is not sufficient to guarantee that the buffers are up
+    to date, since changing the window border width for example would not
+    trigger a `WindowResize` (the border being outside the window).
+    
+    Make sure we recycle the buffers on `SetWindowPixmap` to ensure that
+    the buffers will be recycled whenever the pixmap size is changed.
+    
+    Related: https://gitlab.freedesktop.org/xorg/xserver/issues/951
+    Suggested-by: Michel Dänzer <mdaenzer@redhat.com>
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit 71c3a97142265804d64f443bd1ddb68ac356f8a3
+Author: dslater38 <dslater38@gmail.com>
+Date:   Thu Dec 12 04:54:46 2019 +0000
+
+    XWin: Fix infinite loop in GetShift()
+    
+    GetShift(int mask) can be called with mask==0, causing
+    it to go into an infinite loop.
+    
+    Note: GetShift(mask) will return 0 for a mask of
+    both 0 and -1. The assumption is that if mask == 0,
+    then the corresponding bits for which we're calculating
+    the shift, are also 0.
+
+commit 0c729bb958375fbd8fb6811ff1ecc88bd9f80282
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Thu Dec 12 09:23:47 2019 +1000
+
+    gitlab CI: update to the latest version of the ci-templates
+    
+    Primarily to fix the skopeo copy issue that causes pipelines to fail right
+    now, see ci-templates commit 0a9bdd33a98f05af67.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 2a2234ad1a0fe88400c1511fea67741e4ad09f7f
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Fri Nov 29 09:40:13 2019 +0100
+
+    xwayland: Do flush GPU work in xwl_present_flush
+    
+    The Present code sends the idle notification event to the client after
+    xwl_present_flush returns. If we don't flush our GPU work here, the
+    client may race to draw another frame to the same buffer, so we may end
+    up copying (parts of) that new frame instead of the one we meant to.
+    
+    Fixes https://gitlab.freedesktop.org/xorg/xserver/issues/835
+    
+    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
+
+commit cd999f08c608458d6207110ed237c3a78441870b
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Fri Oct 25 16:28:50 2019 +0200
+
+    xwayland: Use multiple window buffers
+    
+    Xwayland takes care of not attaching a new buffer if a frame callback is
+    pending.
+    
+    Yet, the existing buffer (which was previously attached) may still be
+    updated from the X11 side, causing unexpected visual glitches to the
+    buffer.
+    
+    Add multiple buffering to the xwl_window and alternate between buffers,
+    to leave the Wayland buffer untouched between frame callbacks and avoid
+    stuttering or tearing issues.
+    
+    Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/835
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit 1c6f875f52d74d2137161399e134c4888c4eadf2
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Wed Nov 6 11:49:33 2019 +0100
+
+    xwayland: Add multiple window buffering support
+    
+    Add a mechanism to create, recycle and destroy window buffers when
+    needed.
+    
+    Typically, this adds a new `xwl_window_buffer` structure which
+    represents a buffer for a given Xwayland window.
+    
+    Each Xwayland window has two different pools of buffers:
+    
+     - The available buffers pool:
+       Those are buffers which where created previously and that have either
+       not been submitted to the compositor or submitted and released.
+    
+     - The unavailable buffers pool:
+       Those are typically the buffers which are being used by the
+       compositor, awaiting a release.
+    
+    Initially, an Xwayland window starts with both pools empty. As soon as a
+    new buffer is needed, it's either created (if there is none available)
+    or picked from the pool of available buffers.
+    
+    Once submitted to the compositor, the buffer is moved to the pool of
+    unavailable buffers. When the corresponding `wl_buffer` is released by
+    the compositor, it is moved back to pool of available buffers again to
+    be reused when needed.
+    
+    To avoid keeping too many buffers around doing nothing, a garbage
+    collection of older, unused buffers also takes care of disposing the
+    buffers being unused for some time.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit 77658741869f6a01cec0bdf49827494fb0f06edf
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Wed Oct 30 13:17:34 2019 +0100
+
+    xwayland: Add buffer release callback
+    
+    The API `wl_buffer_add_listener` is misleading in the sense that there
+    can be only one `wl_buffer` release callback, and trying to add a new
+    listener when once is already in place will lead to a protocol error.
+    
+    The Xwayland EGL backends may need to set up their own `wl_buffer`
+    release listener, meaning that there is no way to our own `wl_buffer`
+    release callback.
+    
+    To avoid the problem, add our own callback API to be notified when the
+    `wl_buffer` associated with an `xwl_pixmap` is released, triggered from
+    the different `xwl_pixmap` implementations.
+    
+    Also update the Present code to use the new buffer release callback API.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit 8d4be7f6c4f7c673d7ec1a6bfdef944907a3916e
+Author: Kenneth Graunke <kenneth@whitecape.org>
+Date:   Thu Nov 21 23:03:50 2019 -0800
+
+    modesetting: Use EGL_MESA_query_driver to select DRI driver if possible
+    
+    New now ask Glamor to use EGL_MESA_query_driver to obtain the DRI driver
+    name; if successful, we use that as the DRI driver name.  Following the
+    existing dri2.c logic, we also use the same name for the VDPAU driver,
+    except for i965 (and now iris), where we switch to the "va_gl" fallback.
+    
+    This allows us to bypass the PCI ID lists in xserver and centralize the
+    driver selection mechanism inside Mesa.  The hope is that we no longer
+    have to update these lists for any future hardware.
+
+commit 195c2ef8f9f07b9bdabc0f554a9033b7857b99c7
+Author: Kenneth Graunke <kenneth@whitecape.org>
+Date:   Thu Nov 21 23:01:28 2019 -0800
+
+    glamor: Add a function to get the driver name via EGL_MESA_query_driver
+    
+    This maps to eglGetDisplayDriverName if EGL_MESA_query_render is
+    supported, otherwise it returns NULL.
+
+commit 60003023fa5b301dd621da4797f8a93035ebeeca
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Fri Nov 22 18:32:38 2019 +0100
+
+    modesetting: Use glamor_clear_pixmap in drmmode_clear_pixmap
+    
+    Should be slightly more efficient.
+    
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit 9ba13bac9dd076f166ff0d063fc144b904a40d12
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Mon Nov 18 18:06:28 2019 +0100
+
+    modesetting: Clear new screen pixmap storage on RandR resize
+    
+    Fixes random garbage being visible intermittently.
+    
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit 327df450ffcf5bda5b4254db0208d355860d1010
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Fri Nov 22 17:51:22 2019 +0100
+
+    xfree86/modes: Call xf86RotateRedisplay from xf86CrtcRotate
+    
+    If a new rotate buffer was allocated. This makes sure the new buffer
+    has valid transformed contents when it starts being displayed.
+    
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit c66c548eabf06835cb0cb906598fb87c7bb30cf4
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Fri Nov 22 17:58:12 2019 +0100
+
+    modesetting: Call glamor_finish from drmmode_crtc_set_mode
+    
+    This makes sure any pending drawing to a new scanout buffer will be
+    visible from the start.
+    
+    This makes the finish call in drmmode_copy_fb superfluous, so remove it.
+    
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit 06ef320e9bc1f1098df9cd5581f072528f28128e
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Fri Nov 22 18:05:04 2019 +0100
+
+    modesetting: Add glamor_finish() convenience macro
+    
+    This will simplify backporting the following fix to the 1.20 branch.
+    
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit e6ab7f9f342f463092c45226f3294074351fdd5e
+Author: Matt Turner <mattst88@gmail.com>
+Date:   Thu Nov 21 11:23:18 2019 -0500
+
+    xfree86: Test presence of isastream()
+    
+    isastream() was never more than a stub in glibc, and was removed in
+    glibc-2.30 by commit a0a0dc83173c ("Remove obsolete, never-implemented
+    XSI STREAMS declarations").
+    
+    Bug: https://bugs.gentoo.org/700838
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+    Signed-off-by: Matt Turner <mattst88@gmail.com>
+
+commit ebf549db2d9341d99e0d0847b948dd798d98f7dc
+Author: Dor Askayo <dor.askayo@gmail.com>
+Date:   Fri Nov 22 17:12:03 2019 +0100
+
+    glamor: make sure the correct FBO is cleared
+    
+    This also removes an unnecesary call to glDrawBuffer.
+    
+    Signed-off-by: Dor Askayo <dor.askayo@gmail.com>
+    Fixes: 0e9a0c20 - "xwayland: clear pixmaps after creation in rootless
+                       mode"
+    Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/933
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit cb1b1e184723fc4748b9a28736fa07fdc5c2990c
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Mon Nov 18 16:46:44 2019 -0500
+
+    Revert "Revert "modesetting: Indirect the glamor API through LoaderSymbol""
+    
+    Now that we've fixed LoaderSymbolFromModule this should work properly.
+    
+    This reverts commit 5c7c6d5cffa98e4749185af9211d7642b57673d8.
+    
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit ab61c16ef07fde6eb7110c63c344c54eb2a2d117
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Mon Nov 18 16:43:50 2019 -0500
+
+    loader: Make LoaderSymbolFromModule take a ModuleDescPtr
+    
+    The thing you get back from xf86LoadSubModule is a ModuleDescPtr, not a
+    dlsym handle. We don't expose ModuleDescPtr to the drivers, so change
+    LoaderSymbolFromModule to cast its void * argument to a ModuleDescPtr.
+    
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit 4308f5d3d1fbd0f5dce81e22c0c3f08c65a7c9d8
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date:   Tue Nov 19 10:08:51 2019 -0800
+
+    os: Don't crash in AttendClient if the client is gone
+    
+    If a client is in the process of being closed down, then its client->osPrivate
+    pointer will be set to NULL by CloseDownConnection. This can cause a crash if
+    freeing the client's resources results in a call to AttendClient. For example,
+    if the client has a pending sync fence:
+    
+     Thread 1 "X" received signal SIGSEGV, Segmentation fault.
+     AttendClient (client=0x5571c4aed9a0) at ../os/connection.c:942
+     (gdb) bt
+     #0  AttendClient (client=0x5571c4aed9a0) at ../os/connection.c:942
+     #1  0x00005571c3dbb865 in SyncAwaitTriggerFired (pTrigger=<optimized out>) at ../Xext/sync.c:694
+     #2  0x00005571c3dd5749 in miSyncDestroyFence (pFence=0x5571c5063980) at ../miext/sync/misync.c:120
+     #3  0x00005571c3dbbc69 in FreeFence (obj=<optimized out>, id=<optimized out>) at ../Xext/sync.c:1909
+     #4  0x00005571c3d7a01d in doFreeResource (res=0x5571c506e3d0, skip=skip@entry=0) at ../dix/resource.c:880
+     #5  0x00005571c3d7b1dc in FreeClientResources (client=0x5571c4aed9a0) at ../dix/resource.c:1146
+     #6  FreeClientResources (client=0x5571c4aed9a0) at ../dix/resource.c:1109
+     #7  0x00005571c3d5525f in CloseDownClient (client=0x5571c4aed9a0) at ../dix/dispatch.c:3473
+     #8  0x00005571c3d55eeb in Dispatch () at ../dix/dispatch.c:492
+     #9  0x00005571c3d59e96 in dix_main (argc=3, argv=0x7ffe7854bc28, envp=<optimized out>) at ../dix/main.c:276
+     #10 0x00007fea4837cb6b in __libc_start_main (main=0x5571c3d1d060 <main>, argc=3, argv=0x7ffe7854bc28, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffe7854bc18) at ../csu/libc-start.c:308
+     #11 0x00005571c3d1d09a in _start () at ../Xext/sync.c:2378
+     (gdb) print client->osPrivate
+     $1 = (void *) 0x0
+    
+    Since the client is about to be freed, its ignore count doesn't matter and
+    AttendClient can simply be a no-op. Check for client->clientGone in AttendClient
+    and remove similar checks from two callers that had them.
+    
+    Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
+
+commit 66da95a172c4941b75ffedcdaa0138c0a48f11fb
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Tue Nov 12 10:03:55 2019 +0100
+
+    xwayland: Do not discard frame callbacks on allow commits
+    
+    Currently, when a X11 client (usually the X11 window manager from a
+    Wayland compositor) changes the value of the X11 property
+    `_XWAYLAND_ALLOW_COMMITS` from `false` to `true`, all pending frame
+    callbacks on the window are discarded so that the commit occurs
+    immediately.
+    
+    Weston uses that mechanism to prevent the content of the window from
+    showing before it's ready when mapping the window initially, but
+    discarding the pending frame callbacks has no effect on the initial
+    mapping of the X11 window since at that point there cannot be any frame
+    callback on a surface which hasn't been committed yet anyway.
+    
+    However, discarding pending frame callbacks can be problematic if we
+    were to use the same `_XWAYLAND_ALLOW_COMMITS` mechanism to prevent
+    damages to be posted before the X11 toplevel is updated completely
+    (including the window decorations from the X11 window manager).
+    
+    Remove the portion of code discarding the pending frame callback,
+    Xwayland should always wait for a pending frame callback if there's one
+    before posting new damages.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+    https://gitlab.freedesktop.org/xorg/xserver/merge_requests/333
+
+commit 4f984fc06bd57cabfa38f6191f10714878dc8969
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Mon Nov 18 17:28:45 2019 +0100
+
+    present/wnmd: Relax assertion on CRTC on abort_vblank()
+    
+    Currently, the function `present_wnmd_abort_vblank()` would fail if the
+    given `crtc` is NULL.
+    
+    However, `xwl_present_get_crtc()` can return `NULL` under some
+    circumstances, which would cause an unexpected termination of Xwayland
+    in such a case, caused by the assertion failure being triggered.
+    
+    Remove the assertion, considering that the `crtc` isn't actually used in
+    neither `present_wnmd_abort_vblank()` nor `xwl_present_abort_vblank()`.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+    Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/937
+
+commit 5c7c6d5cffa98e4749185af9211d7642b57673d8
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Fri Nov 15 11:32:38 2019 +0100
+
+    Revert "modesetting: Indirect the glamor API through LoaderSymbol"
+    
+    This reverts commit dd63f717fe8636315343f421f4f2ee299258f079.
+    
+    Caused a crash at least on some systems.
+    
+    Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/934
+
+commit dd63f717fe8636315343f421f4f2ee299258f079
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Oct 8 13:11:09 2019 -0400
+
+    modesetting: Indirect the glamor API through LoaderSymbol
+    
+    Prerequisite for building all of xserver with -z now.
+    
+    Gitlab: https://gitlab.freedesktop.org/xorg/xserver/issues/692
+
+commit 45f35a0c6666c5f35df482948e0c8e91167429ef
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Oct 8 12:52:28 2019 -0400
+
+    modesetting: Indirect the shadow API through LoaderSymbol
+    
+    Prerequisite for building all of xserver with -z now.
+    
+    Gitlab: https://gitlab.freedesktop.org/xorg/xserver/issues/692
+
+commit 8760fab0a15805bdd12bb8f12bb1c665fde86cc2
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Oct 8 13:29:22 2019 -0400
+
+    loader: Move LoaderSymbolFromModule() to public API
+    
+    Bare LoaderSymbol() isn't really a great API, this is more of a direct
+    map to dlsym like you want.
+    
+    Gitlab: https://gitlab.freedesktop.org/xorg/xserver/issues/692
+
+commit e5e9a8ca91d1c087edd8788a110251ad940dbc94
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date:   Wed Nov 6 10:45:43 2019 -0800
+
+    xfree86: Call ScreenInit for protocol screens before GPU screens
+    
+    During startup, the xfree86 DDX's InitOutput() calls PreInit for
+    protocol screens first, and then GPU screens. On teardown, dix_main()
+    calls CloseScreen in the reverse order: GPU screens first starting with
+    the last one and then working backwards, and then protocol screens also
+    in reverse order.
+    
+    InitOutput() calls ScreenInit in the wrong order: for GPU screens first and then
+    for protocol screens. This causes a problem for drivers that have global state
+    that is tied to the first screen that calls ScreenInit.
+    
+    Fix this by simply re-ordering the for loops to call PreInit for
+    protocol screens first and then for GPU screens second.
+
+commit 562c7888be538c4d043ec1f374a9d9afa0b305a4
+Author: Alex Goins <agoins@nvidia.com>
+Date:   Tue Sep 17 18:36:35 2019 -0500
+
+    modesetting: Implement ms_covering_randr_crtc() for ms_present_get_crtc()
+    
+    ms_present_get_crtc() returns an RRCrtcPtr, but derives it from a xf86CrtcPtr
+    found via ms_dri2_crtc_covering_drawable()=>ms_covering_crtc(). As a result, it
+    depends on all associated DIX ScreenRecs having an xf86CrtcConfigPtr DDX
+    private.
+    
+    Some DIX ScreenRecs don't have an xf86CrtcConfigPtr DDX private, but do have an
+    rrScrPrivPtr DDX private. Given that we can derive all of the information we
+    need from RandR, we can support these screens by avoiding the use of xf86Crtc.
+    This change implements an RandR-based path for ms_present_get_crtc(), allowing
+    drawables to successfully fall back to syncing to the primary output, even if
+    the slave doesn't have an xf86CrtcConfigPtr DDX private.
+    
+    Without this change, if a slave doesn't have an xf86CrtcConfigPtr DDX private,
+    drawables will fall back to 1 FPS if they overlap an output on that slave.
+    
+    Signed-off-by: Alex Goins <agoins@nvidia.com>
+
+commit 797e7a0ceb673fe2870c673e248835526a84d000
+Author: Alex Goins <agoins@nvidia.com>
+Date:   Tue Sep 17 18:03:34 2019 -0500
+
+    modesetting: Fix ms_covering_crtc() segfault with non-xf86Crtc slave
+    
+    DIX ScreenRecs don't necessarily have an xf86CrtcConfigPtr DDX private.
+    ms_covering_crtc() assumes that they do, which can result in a segfault.
+    
+    Update ms_covering_crtc() to check the XF86_CRTC_CONFIG_PTR() returned pointer
+    before dereferencing it. This will still mean that ms_covering_crtc() can't fall
+    back to the primary output when a drawable overlaps a slave output (going to the
+    1 FPS default instead), but it won't segfault.
+    
+    Signed-off-by: Alex Goins <agoins@nvidia.com>
+
+commit 3ef9029ace4245d9f8929aa71e22bc6a6f40b7b3
+Author: Alex Goins <agoins@nvidia.com>
+Date:   Wed Aug 28 18:24:16 2019 -0500
+
+    modesetting: Fix ms_covering_crtc() segfault with non-modesetting slave primary
+    
+    ms_covering_crtc() uses RRFirstOutput() to determine a primary output to fall
+    back to if a drawable is overlapping a slave output.
+    
+    If the primary output is a slave output, RRFirstOutput() will return a slave
+    output even if passed a master ScreenPtr. ms_covering_crtc() dereferences the
+    output's devPrivate, which is invalid for non-modesetting outputs, and can
+    crash.
+    
+    Changing RRFirstOutput() could have unintended side effects for other callers,
+    so this change replaces the call to RRFirstOutput() with ms_first_output().
+    ms_first_output() ignores the primary output if it doesn't match the given
+    ScreenPtr, choosing the first connected output instead.
+    
+    Signed-off-by: Alex Goins <agoins@nvidia.com>
+
+commit c82f814313a813d7e1a2d7d3b1f7561810446b34
+Author: Alex Goins <agoins@nvidia.com>
+Date:   Wed Sep 4 12:25:31 2019 -0500
+
+    randr: Fix RRCrtcDetachScanoutPixmap() segfault during server teardown
+    
+    During server teardown, mrootdraw is NULL, which can cause segfaults if
+    master->Stop{,Flipping}PixmapTracking() don't do NULL checking. In this case we
+    shouldn't need to do master->Stop{,Flipping}PixmapTracking() anyway, so just
+    skip it.
+    
+    Signed-off-by: Alex Goins <agoins@nvidia.com>
+
+commit fe439596b99db65bbae35eff1ea0b79db167f8d6
+Author: Arthur Williams <taaparthur@gmail.com>
+Date:   Thu Oct 17 22:47:37 2019 -0700
+
+    include: Increase the number of max. input devices to 256.
+    
+    Extending the decade old f0124ed93, to increase the number of input
+    devices from 40 to 256. 40 translates at most 9 MD, while 256 will allow
+    63 MD. It is an arbitrary number, but people are hitting the current
+    limit under reasonable conditions.
+    
+    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=64793
+    Signed-off-by: Arthur Williams <taaparthur@gmail.com>
+
+commit eddad048e35cbf0968d0f892009a248359a15ecd
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Wed Oct 30 15:33:39 2019 +0100
+
+    xwayland: Cosmetic, fix indentation
+    
+    For some reason, indentation for EGL backend hooks was broken.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit 4a857b161ce1202c60ac464c8eb6de358fed5508
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Wed Oct 30 13:11:28 2019 +0100
+
+    xwayland/shm: Use `calloc()`
+    
+    Currently, Xwayland pixmap SHM code uses `malloc()` to allocate the
+    xwl_pixmap.
+    
+    Use `calloc()` instead, as the EGLstream backend does, as it is safer
+    (initializing the allocated data to 0).
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit 0d4667b65a81047fe5d5af537d295c64cfa08d9c
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Wed Oct 30 11:50:24 2019 +0100
+
+    xwayland/glamor-gbm: Use `calloc()`
+    
+    Currently, glamor GBM backend uses `malloc()` to allocate the
+    xwl_pixmap.
+    
+    Use `calloc()` instead, as the EGLstream backend does, as it is safer
+    (initializing the allocated data to 0).
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit 2c5acdef3aab52d0a416aee3654a63328847f22e
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Thu Oct 31 09:04:19 2019 +0100
+
+    xwayland/eglstream: Fix order of `calloc()` args
+    
+    The definition by the manual is `calloc(size_t nmemb, size_t size)`.
+    
+    Swap the arguments of calloc() calls to match the definition.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit 0e9a0c203c2ae4eae12bdbb95428f398211c7bee
+Author: Dor Askayo <dor.askayo@gmail.com>
+Date:   Thu Nov 7 12:25:42 2019 +0100
+
+    xwayland: clear pixmaps after creation in rootless mode
+    
+    When a pixmap is created with a backing FBO, the FBO should be cleared
+    to avoid rendering uninitialized memory. This could happen when the
+    pixmap is rendered without being filled in its entirety.
+    
+    One example is when a top-level window without a background is
+    resized. The pixmap would be reallocated to prepare for more pixels,
+    but uninitialized memory would be rendered in the resize offset until
+    the client sends a frame that fills these additional pixels.
+    
+    Another example is when a new top-level window is created without a
+    background. Uninitialized memory would be rendered after the pixmap is
+    allocated and before the client sends its first frame.
+    
+    This issue is only apparent in OpenGL implementations that don't zero
+    the VRAM of allocated buffers by default, such as RadeonSI.
+    
+    Signed-off-by: Dor Askayo <dor.askayo@gmail.com>
+    Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/636
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit a506b4ecb6c54fd0388e628520eec75ea3bcb27c
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Wed Nov 6 15:37:22 2019 +0100
+
+    xwayland: make context current to check GL version
+    
+    `glGetString(GL_VERSION)` will return NULL without a current context.
+    
+    Commit dabc7d8b (“xwayland: Fall back to GLES2 if we don't get at least
+    GL 2.1 in glamor”) would check the context is created, but it is made
+    current just after, so the call to `epoxy_gl_version()` would return 0,
+    hence defeating the version check.
+    
+    Make the context current prior to call `epoxy_gl_version()`.
+    
+    Fixes: dabc7d8b - xwayland: Fall back to GLES2 if we don't get at least
+                      GL 2.1 in glamor
+    Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/932
+    https://gitlab.freedesktop.org/xorg/xserver/merge_requests/324
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+
+commit dabc7d8bf2d964460286168b52899c42b3369f8d
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Wed Oct 30 11:20:40 2019 -0400
+
+    xwayland: Fall back to GLES2 if we don't get at least GL 2.1 in glamor
+    
+    Some particularly unfortunate hardware (Intel gen3, mostly) will give
+    you GLES2 but not GL 2.1. Fall back to GLES2 for such cases so you still
+    get accelerated GLX.
+
+commit 741bd73429e337071f49509ddcc5fb392e20b0f6
+Author: Hans de Goede <hdegoede@redhat.com>
+Date:   Mon Nov 4 20:03:17 2019 +0100
+
+    glamor/xwayland: Define EGL_NO_X11
+    
+    Define EGL_NO_X11 everywhere were we also define MESA_EGL_NO_X11_HEADERS,
+    EGL_NO_X11 is the MESA_EGL_NO_X11_HEADERS equivalent for the egl headers
+    shipped with libglvnd.
+    
+    This fixes the xserver not building with the libglvnd-1.2.0 headers:
+    
+    In file included from /usr/include/EGL/eglplatform.h:128,
+                     from /usr/include/epoxy/egl_generated.h:11,
+                     from /usr/include/epoxy/egl.h:46,
+                     from glamor_priv.h:43,
                      from glamor_composite_glyphs.c:25:
     /usr/include/X11/Xlib.h:222:2: error: conflicting types for 'GC'
       222 | *GC;
@@ -2631,29 +10465,796 @@ Date:   Mon Nov 4 20:03:17 2019 +0100
           |   ^~
     
     Signed-off-by: Hans de Goede <hdegoede@redhat.com>
-    (cherry picked from commit 741bd73429e337071f49509ddcc5fb392e20b0f6)
 
-commit 2f55e8dc270fb65e8ff013c5e846a1a510c761e0
+commit 622eea366aaf162479eaabd93c88fa04efe98bcc
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Sat Oct 26 17:12:26 2019 +0100
+
+    meson: Add sha1 library options
+    
+    v2: Set the define for xha1.c programatically, rather than using loads
+    of conditionals.
+
+commit 417e4553f143820acc33998898bbd5c3d4567bcd
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Wed Oct 9 12:07:00 2019 -0400
+
+    misprite: Stop wrapping GetImage/GetSpans
+    
+    SourceValidate handles this for us consistently now.
+    
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit 77f614eb331b0240c699f7aef13a8046c9c2c70a
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Wed Oct 9 12:05:56 2019 -0400
+
+    composite: Stop wrapping GetImage/GetSpans
+    
+    SourceValidate handles this for us consistently now.
+    
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit 516e75dbb6bbf97c7af9c2226242ffd9259fec11
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Wed Oct 9 11:57:18 2019 -0400
+
+    dix: Call SourceValidate before GetImage
+    
+    This ensures that any prep work for the drawable we're about to read
+    from is already done before we call down to GetImage. This should be no
+    functional change as most of the callers with a non-trivial
+    SourceValidate are already wrapping GetImage and doing the equivalent
+    thing, but we'll be simplifying that shortly.
+    
+    More importantly this ensures that if any of that prep work would
+    generate events - like automatic compositing flushing rendering to a
+    parent pixmap which then triggers damage - then it happens entirely
+    before we start writing the GetImage reply header.
+    
+    Note that we do not do the same for GetSpans, but that's okay. The only
+    way to get to GetSpans is through miCopyArea or miCopyPlane - where the
+    callers must already call SourceValidate - or miGetImage - which this
+    commit now protects with SourceValidate.
+    
+    Fixes: xorg/xserver#902
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit ff310903f34ac34c916ad74e919d1ac12aea4715
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Wed Oct 9 11:27:12 2019 -0400
+
+    mi: Add a default no-op miSourceValidate
+    
+    Slightly simplifies the callers since they don't need to check for
+    non-NULL anymore.
+    
+    I do extremely hate the workarounds here to suppress misprite taking the
+    cursor down though. Surely there's a better way.
+    
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit 89a9927b1e5ac416441a33b44abddf8372edfe6a
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Wed Oct 16 14:44:49 2019 -0400
+
+    include: Remove now-empty site.h
+
+commit ff4e2c24ec599ecdbd24eb181afb50f896beb46d
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Wed Oct 16 14:43:36 2019 -0400
+
+    dix: Move default screensaver defaults into globals.c
+
+commit 43fc5307804edc9a09e7ad8794a02b5e18c4f9db
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Wed Oct 16 14:41:20 2019 -0400
+
+    include: Move some input-related default #defines to input.h
+
+commit 2d1ed64d2aedb1af5476ba011bbd36ddcf00c311
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Wed Oct 16 14:33:43 2019 -0400
+
+    dix: Remove -to option to set the default connection timeout
+    
+    One minute is admittedly arbitrary, but again, pretty sure this never
+    gets set on the command line in practice.
+
+commit 46a275522f8692b8fc20043ec7a5e74d43448f0b
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Wed Oct 16 14:30:18 2019 -0400
+
+    xdmcp: Remove unconfigurable COMPILEDDISPLAYCLASS
+
+commit 66eb933ec91724a351b7368cf7171adb108299fb
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Wed Oct 16 14:28:33 2019 -0400
+
+    os: Remove unconfigurable DEFAULT_ACCESS_CONTROL macro
+
+commit 56ea4c769c2d65df2de86009e8e499f39a8a3d4d
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Wed Oct 16 14:21:06 2019 -0400
+
+    dix: Remove -fn and -fc options to set default text/cursor fonts
+    
+    I strongly suspect these never get used in the wild, and it's not an
+    especially useful thing to do in any case.
+
+commit 4ebce1ed8b63decb0919146a034f0c80ac47c3cd
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Wed Oct 16 13:56:34 2019 -0400
+
+    os: Move log verbosity defaults into os/log.c
+    
+    There's not any configuration knobs for this so there's no real reason
+    to leave them in a configgy header.
+
+commit e21371984def00b0e0b5cfc976bfd1756a2905d4
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Wed Oct 16 13:52:54 2019 -0400
+
+    include: Remove unused default value for COMPILEDDEFAULTFONTPATH
+    
+    Again, we're setting this at configure time now.
+
+commit f58fee67b1730798a57629da2f496c9fa594d143
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Wed Oct 16 13:51:41 2019 -0400
+
+    include: Remove unused default value for VENDOR_RELEASE
+    
+    We're always setting this in the appropriate blah-config.h now.
+
+commit 4b936ebcaaa80cc1dc1a51f110c7ecd77b06950e
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Wed Oct 16 13:51:11 2019 -0400
+
+    include: Remove unused VENDOR_STRING
+
+commit ec659f021e62338018ac09ea61c3f4baa4fdf6e2
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Wed Oct 16 13:49:13 2019 -0400
+
+    dix: Remove now-unused SetVendorString
+
+commit fc671085ee52c6599005e2359930bebe6195ca83
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Wed Oct 16 13:42:15 2019 -0400
+
+    dmx: Stop overriding the vendor string
+
+commit 0e4bd71d02d09c320e76280ae8f14df169387507
+Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
+Date:   Tue Sep 3 16:44:56 2019 +0300
+
+    modesetting: Fix possible_crtcs
+    
+    Populate outout possible_crtcs as the union of possible_crtcs from
+    the encoders rather than the intersection. Otherwise we're easily left
+    with possible_crtcs==0 when all the possible encoders have
+    non-overlapping possible_crtcs.
+    
+    No idea what the magic 0x7f is about, but keep it around in case
+    it matters.
+    
+    Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
+
+commit 334f1107146a2e6ebf6f7743b77aec2ad5c46f75
+Author: Alexander Tsoy <alexander@tsoy.me>
+Date:   Mon Sep 23 18:23:40 2019 +0300
+
+    configure: Set libdrm flags correctly if only XORG is enabled
+    
+    This fixes modesetting driver build failure which can be triggered with
+    the following configure options:
+    
+    $ ./configure --disable-dri --disable-dri2 --disable-dri3
+    --disable-config-udev --enable-xorg
+    
+    Bugzilla: https://bugs.gentoo.org/689768
+    Signed-off-by: Alexander Tsoy <alexander@tsoy.me>
+    Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
+
+commit a1e3dfa50a9a9a41c93c12f19f40d97c56ddf850
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Sat Oct 26 18:43:01 2019 +0100
+
+    xquartz: Remove trailing quote to fix build
+    
+    Fix xquartz build after typo in 3c78d637 ("global: Remove BUILD_DATE and
+    BUILD_TIME")
+
+commit 0cf15714e1253f4ef61bb5e1f825b318a48b3cac
+Author: Keith Packard <keithp@keithp.com>
+Date:   Thu May 16 12:24:01 2019 -0700
+
+    modesetting: typo in drmmode_display.c -- ',' instead of ';' at end of line
+    
+    This seems like a simple typo to me; thanks to C it isn't caught by
+    the compiler.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 427f8bc00981703abe3153b6da575faa69fe2748
+Author: Robert Mader <robert.mader@posteo.de>
+Date:   Wed Oct 16 19:14:06 2019 +0200
+
+    xserver: Fix a typo
+    
+    If `need_rotate` is TRUE, we should check for the right rotate.
+
+commit 55482c1caf4dbe7f4735b75366bd4acd81937fc1
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Oct 15 13:40:01 2019 -0400
+
+    render: Fix undefined shift in xRenderColorToCard32
+    
+    Delightfully this is undefined even though CARD16 is an "unsigned" type,
+    because it's an unsigned short, which C promotes to signed int because
+    everything is stupid.
+
+commit 592525386ad81cf9c8816f42f01a5bea01034e98
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Oct 15 13:32:36 2019 -0400
+
+    dix: Fix undefined memset in _dixInitScreenPrivates
+    
+    Again, memset(0, ...) is undefined.
+
+commit f44ac101c523a0439bd1a864850e3c1a4e154549
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Oct 15 13:21:37 2019 -0400
+
+    record: Fix undefined memcpy in RecordAClientStateChange
+    
+    If we don't have any recording contexts just skip all this. Note this
+    also skips a pointless trip through malloc(0)/free.
+
+commit 9155e0c7c6696ec8c657e32bf41a08f88a8f3d0d
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Oct 15 13:16:17 2019 -0400
+
+    mi: Fix undefined memcpy in mieqGrowQueue
+    
+    The first time we get here, eventQueue->events is NULL.
+
+commit 6fe7c43fa52ffa9b91887ea7f8044e54b12637c9
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Oct 15 13:10:35 2019 -0400
+
+    dix: Fix undefined shift in ht_generic_hash
+    
+    The hits keep coming.
+
+commit 1e5f478b7e1183d38ad07d1f5e68fdc9680f2eb8
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Oct 15 13:08:57 2019 -0400
+
+    dix: Fix undefined shift in HashResourceID
+    
+    Again, we need all of the bits of an unsigned int to make this work.
+
+commit 3671a3ee88dac3cf1a301adf27dc2b43b069815b
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Oct 15 13:01:27 2019 -0400
+
+    mi: Fix undefined shift in miSetVisualTypesAndMasks
+    
+    The masks we end up building will occupy all 32 bits of an unsigned int,
+    which means we had better build the shifts out of unsigned ints, because
+    left-shifting a signed int all the way into the sign bit is undefined.
+
+commit a41d45eedc0c217c28def47acbd8759e31706b96
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Oct 15 11:59:39 2019 -0400
+
+    dix: Fix undefined memset in dixInitPrivates
+    
+    When we set these up initially, no subsystems have allocated any
+    privates yet, so the storage address will be null, and memset(NULL, ...)
+    is undefined.
+
+commit 535f14656a2a42f0cca13a4264e8111300e5806d
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Mon Oct 14 12:48:24 2019 +0200
+
+    Revert https://gitlab.freedesktop.org/xorg/xserver/merge_requests/235
+    
+    Caused assertion failures / crashes with Xorg.
+    
+    Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/916
+
+commit 5315f988d9f175e4850f4259f691a68d95ce7ac2
+Author: Hans de Goede <hdegoede@redhat.com>
+Date:   Mon Sep 2 17:32:45 2019 +0200
+
+    xwayland: Set _XWAYLAND_RANDR_EMU_MONITOR_RECTS property for resolution emulation
+    
+    Apps using randr to change the resolution when going fullscreen, in
+    combination with _NET_WM_STATE_FULLSCREEN to tell the window-manager (WM)
+    to make their window fullscreen, expect the WM to give the fullscreen window
+    the size of the emulated resolution as would happen when run under Xorg (*).
+    
+    We need the WM to emulate this behavior for these apps to work correctly,
+    with Xwaylands resolution change emulation. For the WM to emulate this,
+    it needs to know about the emulated resolution for the Windows owning
+    client for each monitor.
+    
+    This commit adds a _XWAYLAND_RANDR_EMU_MONITOR_RECTS property, which
+    contains 4 Cardinals (32 bit integers) per monitor with resolution
+    emulation info. Window-managers can use this to get the emulated
+    resolution for the client and size the window correctly.
+    
+    *) Since under Xorg the resolution will actually be changed and after that
+    going fullscreen through NET_WM_STATE_FULLSCREEN will size the window to
+    be equal to the new resolution.
+    
+    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
+    Acked-by: Michel Dänzer <mdaenzer@redhat.com>
+    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+
+commit 0c305dbff8a44f3fa3d6aefd372a967029a7a527
+Author: Hans de Goede <hdegoede@redhat.com>
+Date:   Mon Aug 26 12:26:34 2019 +0200
+
+    xwayland: xwl_window_should_enable_viewport: Add extra test
+    
+    Games based on the allegro gaming library or on ClanLib-1.0 do not size
+    their window to match the fullscreen resolution, instead they use a
+    window covering the entire screen, drawing only the fullscreen resolution
+    part of it.
+    
+    This commit adds a check for these games, so that we correctly apply a
+    viewport to them making fullscreen work properly for these games under
+    Xwayland.
+    
+    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
+    Acked-by: Michel Dänzer <mdaenzer@redhat.com>
+    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+
+commit 38de6260816674b5430144cc38a8a27d93d1bf19
+Author: Hans de Goede <hdegoede@redhat.com>
+Date:   Tue Jul 9 09:31:13 2019 +0200
+
+    xwayland: Add vidmode mode changing emulation support
+    
+    Add support for fake mode changes using viewport, for apps which want to
+    change the resolution when going fullscreen.
+    
+    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
+    Acked-by: Michel Dänzer <mdaenzer@redhat.com>
+    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+
+commit bcad1b813a04b9f3ff225f57a4baad09bd6315b9
+Author: Hans de Goede <hdegoede@redhat.com>
+Date:   Mon Jul 8 18:35:27 2019 +0200
+
+    xwayland: Add xwlVidModeGetCurrentRRMode helper to the vidmode code
+    
+    crtc->mode reflects the mode set through the xrandr extension, once we
+    add support for also changing the mode through the vidmode extension this
+    will no longer correctly reflect the emulated resolution.
+    
+    Add a new xwlVidModeGetCurrentRRMode helper which determines the mode by
+    looking at the emulated_mode instead.
+    
+    Likewise add a xwlVidModeGetRRMode helper and use that in
+    xwlVidModeCheckModeForMonitor/xwlVidModeCheckModeForDriver to allow any
+    mode listed in the randr_output's mode list.
+    
+    This is a preparation patch for adding emulated mode/resolution change
+    support to Xwayland's XF86 vidmode extension emulation.
+    
+    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
+    Acked-by: Michel Dänzer <mdaenzer@redhat.com>
+    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+
+commit 43c80078126f6f33c6ab7d3cf4668733bde03366
+Author: Hans de Goede <hdegoede@redhat.com>
+Date:   Mon Jul 8 14:00:27 2019 +0200
+
+    xwayland: Add xwlRRModeToDisplayMode() helper function
+    
+    This is a preparation patch for adding emulated mode/resolution change
+    support to Xwayland's XF86 vidmode extension emulation, using the
+    Wayland viewport extension.
+    
+    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
+    Acked-by: Michel Dänzer <mdaenzer@redhat.com>
+    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+
+commit d99b9ff0f237d15e7eb507484493c73b393d5dba
+Author: Hans de Goede <hdegoede@redhat.com>
+Date:   Tue Jul 2 11:55:26 2019 +0200
+
+    xwayland: Add support for randr-resolution change emulation using viewport
+    
+    Add support for per client randr-resolution change emulation using viewport,
+    for apps which want to change the resolution when going fullscreen.
+    
+    Partly based on earlier work on this by Robert Mader <robert.mader@posteo.de>
+    
+    Note SDL2 and SFML do not restore randr resolution when going from
+    fullscreen -> windowed, I believe this is caused by us still reporting the
+    desktop resolution when they query the resolution.  This is not a problem
+    because when windowed the toplevel window size includes the window-decorations
+    so it never matches the emulated resolution.
+    
+    One exception would be the window being resizable in Windowed mode and the
+    user resizing the window so that including decorations it matches the
+    emulated resolution *and* the window being at pos 0x0. But this is an
+    extreme corner case. Still I will submit patches upstream to SDL2
+    and SFML to always restore the desktop resolution under Xwayland,
+    disabling resolution emulation all together when going windowed.
+    
+    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
+    Acked-by: Michel Dänzer <mdaenzer@redhat.com>
+    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+
+commit aca0a588eb40a5e6669094a2ab7f71ca0ba06b16
+Author: Hans de Goede <hdegoede@redhat.com>
+Date:   Thu Aug 29 23:04:36 2019 +0200
+
+    xwayland: Add support for storing per client per output emulated resolution
+    
+    Add support for storing per output randr/vidmode emulated resolution
+    into the per client data.
+    
+    Since we do not have a free/delete callback for the client this uses
+    a simple static array. The entries are tied to a specific output by the
+    server_output_id, with a server_output_id of 0 indicating a free slot
+    (0 is the "None" Wayland object id).
+    
+    Note that even if we were to store this in a linked list, we would still
+    need the server_output_id as this is *per client* *per output*.
+    
+    This is a preparation patch for adding randr/vidmode resolution
+    change emulation.
+    
+    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
+    Acked-by: Michel Dänzer <mdaenzer@redhat.com>
+    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+
+commit 905cb8b9e27add5f49a45fe167a0005bf05218bc
+Author: Hans de Goede <hdegoede@redhat.com>
+Date:   Thu Aug 29 22:45:12 2019 +0200
+
+    xwayland: Add per client private data
+    
+    Add per client private data, which for now is empty.
+    
+    This is a preparation patch for adding randr/vidmode resolution
+    change emulation.
+    
+    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
+    Acked-by: Michel Dänzer <mdaenzer@redhat.com>
+    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+
+commit e89872f51aa834fa9d94a4ca4822f03b0341ab4f
+Author: Robert Mader <robert.mader@posteo.de>
+Date:   Mon Jan 22 17:57:38 2018 +0100
+
+    xwayland: Use RandR 1.2 interface (rev 2)
+    
+    This adds the RandR 1.2 interface to xwayland and allows modes
+    advertised by the compositor to be set in an undistructive manner.
+    
+    With this patch, applications that try to set the resolution will usually
+    succeed and work while other apps using the same xwayland
+    instance are not affected at all.
+    
+    The RandR 1.2 interface will be needed to implement fake-mode-setting and
+    already makes applications work much cleaner and predictive when a mode
+    was set.
+    
+    [hdegoede@redhat.com: Make crtc_set only succeed if the mode matches
+     the desktop resolution]
+    
+    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
+    Acked-by: Michel Dänzer <mdaenzer@redhat.com>
+    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+
+commit 0d656d796071fb637e4969ea800855fe5d1c9728
+Author: Hans de Goede <hdegoede@redhat.com>
+Date:   Wed Jun 26 16:46:54 2019 +0200
+
+    xwayland: Add fake output modes to xrandr output mode lists
+    
+    This is a preparation patch for adding support for apps which want to
+    change the resolution when they go fullscreen because they are hardcoded
+    to render at a specific resolution, e.g. 640x480.
+    
+    Follow up patches will fake the mode-switch these apps want by using
+    WPviewport to scale there pixmap to cover the entire output.
+    
+    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
+    Acked-by: Michel Dänzer <mdaenzer@redhat.com>
+    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+
+commit 7c6f17790d3aedb164481264b0f05a8a14103731
+Author: Robert Mader <robert.mader@posteo.de>
+Date:   Tue Jul 2 12:03:12 2019 +0200
+
+    xwayland: Use buffer_damage instead of surface damage if available
+    
+    When a viewport is set, damage will only work properly when using
+    wl_surface_damage_buffer instead of wl_surface_damage.
+    
+    When no viewport is set, there should be no difference between
+    surface and buffer damage.
+    
+    This is a preparation patch for using viewport to add support for fake
+    mode-changes through xrandr for apps which want to change the resolution
+    when going fullscreen.
+    
+    Changes by Hans de Goede <hdegoede@redhat.com>:
+    -Split the damage changes out into their own patch
+    -Add xwl_surface_damage helper
+    -Also use buffer_damage / the new helper for the present and cursor code
+    
+    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
+    Acked-by: Michel Dänzer <mdaenzer@redhat.com>
+    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+
+commit 47bba4625339592d08b375bcd8e51029c0000850
+Author: Robert Mader <robert.mader@posteo.de>
+Date:   Mon Jan 22 22:02:32 2018 +0100
+
+    xwayland: Add wp_viewport wayland extension support
+    
+    This commit adds support for the wayland wp_viewport extension, note
+    nothing uses this yet.
+    
+    This is a preparation patch for adding support for fake mode-changes through
+    xrandr for apps which want to change the resolution when going fullscreen.
+    
+    [hdegoede@redhat.com: Split the code for the extension out into its own patch]
+    
+    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
+    Acked-by: Michel Dänzer <mdaenzer@redhat.com>
+    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+
+commit 834a467af978ac7a24ed17b8c8e58b6cddb4faf9
+Author: Hans de Goede <hdegoede@redhat.com>
+Date:   Thu Aug 29 14:18:28 2019 +0200
+
+    dix: Add GetCurrentClient helper
+    
+    Request-handlers as registered in the requestVector array, always get
+    passed the clientPtr for the client which sent the request.
+    But the implementation of many request-handlers typically consists of
+    a generic handler calling implementation specific callbacks and / or
+    various helpers often multiple levels deep and in many cases the clientPtr
+    does not get passed to the callbacks / helpers.
+    
+    This means that in some places where we would like to have access to the
+    current-client, we cannot easily access it and fixing this would require
+    a lot of work and often would involve ABI breakage.
+    
+    This commit adds a GetCurrentClient helper which can be used as a
+    shortcut to get access to the clienPtr for the currently being processed
+    request without needing a lot of refactoring and ABI breakage.
+    
+    Note using this new GetCurrentClient helper is only safe for code
+    which only runs from the main thread, this new variable MUST NOT be used
+    by code which runs from signal handlers or from the input-thread.
+    
+    The specific use-case which resulted in the creation of this patch is adding
+    support for emulation of randr / vidmode resolution changes to Xwayland.
+    This emulation will not actually change the monitor resolution instead it
+    will scale any window with a size which exactly matches the requested
+    resolution to fill the entire monitor. The main use-case for this is
+    games which are hard-coded to render at a specific resolution and have
+    sofar relied on randr / vidmode to change the monitor resolution when going
+    fullscreen.
+    
+    To make this emulation as robust as possible (e.g. avoid accidentally scaling
+    windows from other apps) we want to make the emulated resolution a per client
+    state. But e.g. the RRSetCrtc function does not take a client pointer; and is
+    a (used) part of the Xorg server ABI (note the problem is not just limited
+    to RRSetCrtc).
+    
+    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+
+commit b2a0d6065d86b8bf409ffae41180662560c42ce7
+Author: Emil Velikov <emil.velikov@collabora.com>
+Date:   Fri Jul 12 14:45:16 2019 +0100
+
+    vfb: add DRI3/glamor support
+    
+    This commit adds DRI3/glamor support, effectively translating into
+    hardware GPU support.
+    
+    Theoretically it should be possible to use DRM/GPU drivers such as
+    virtio or vgem, although only the intel i915 driver is currently tested.
+    
+    Since Xvfb does no modeset, it opens the render node. Currently that is
+    fixed to "/dev/dri/renderD128" and will be tweaked with future commits.
+    
+    Specific use-cases are left for the reader - testing glamor, GL driver
+    or others.
+    
+    v2: Drop GLAMOR_NO_XV, use GLAMOR_FOR_XORG instead (Michel Dänzer)
+    v3: Fix build w/o glamor
+    v4:
+     - Split out glamor dependency patch for meson (Pekka)
+     - Enhance commit message (Pekka)
+     - Use O_CLOEXEC with open() (Pekka)
+     - Enhance error path, memory leak comments (Pekka)
+    
+    Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
+
+commit 9e574a5bd828e813ff31bdd5cbec52539534a958
+Author: Emil Velikov <emil.velikov@collabora.com>
+Date:   Mon Sep 23 16:23:02 2019 +0100
+
+    meson: glamor depends on gbm and epoxy mark as such
+    
+    Currently glamor depends on epoxy and gbm, even the autotools build
+    enforces that.
+    
+    Follow suite and do the same for the meson build.
+    
+    v1: Split out from larger patch (Pekka)
+    
+    Signed-off-by: Emil Velikov <emil.velikov@collbora.com>
+
+commit 86c8458f3d09d2c4fb68de7e6ab515739e8f8b3c
+Author: Emil Velikov <emil.velikov@collabora.com>
+Date:   Fri Jul 12 11:34:44 2019 +0100
+
+    vfb: clarify code flow in vfbScreenInit
+    
+    v2: Enhance commit message (Pekka)
+    
+    Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
+
+commit 744c419cb4eaed4006b5f0f319b72d7ffa9fbc6d
+Author: Emil Velikov <emil.velikov@collabora.com>
+Date:   Fri Jul 19 10:53:19 2019 +0100
+
+    glamor: check for non NULL pixmap at close_screen
+    
+    DDX such as Xorg, Xwayland & Xephyr do not destroy the pixmap before
+    they call into CloseScreen. At the same time Xvfb (support for glamor
+    coming with later commit) do.
+    
+    As such the pixmap will be NULL and we'll crash out.
+    
+    Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
+
+commit 7667180fb9dbd606e40c000aefc807371d2fb478
+Author: Emil Velikov <emil.velikov@collabora.com>
+Date:   Fri Jul 19 10:53:19 2019 +0100
+
+    glamor_egl: check for non NULL pixmap at egl_close_screen
+    
+    DDX such as Xorg, Xwayland & Xephyr do not destroy the pixmap before
+    they call into CloseScreen. At the same time Xvfb (support for glamor
+    coming with later commit) do.
+    
+    As such the pixmap will be NULL and we'll crash out.
+    
+    Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
+
+commit 15354fb68f09eecceec5747a58cd16e6ce9236ca
+Author: Emil Velikov <emil.velikov@collabora.com>
+Date:   Fri Jul 19 15:57:52 2019 +0100
+
+    glamor_egl: override the CloseScreen/DestroyPixmap earlier
+    
+    Currently we wrap the EGL CloseScreen/DestroyPixmap callbacks after the
+    glamor ones. Thus upon teardown, we'll end calling things in the wrong
+    order.
+    
+    Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
+
+commit 89597eeba6e7a3418caa375f19f8dd303219881c
+Author: Emil Velikov <emil.velikov@collabora.com>
+Date:   Thu Jul 18 14:04:33 2019 +0100
+
+    glamor_egl: remove unneeded xf86 includes/GLAMOR_FOR_XORG
+    
+    As of last commit, all of glamor_egl ix xf86 agnostic, so adjust the
+    includes and drop the GLAMOR_FOR_XORG instances.
+    
+    Note the macro is still used for glamor_xv_init() which pulls xf86.
+    
+    v2: Drop GLAMOR_FOR_XORG guards (Michel Dänzer)
+    
+    Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
+
+commit f3ab3d0c6123c8e7ddd3be6142f721590d153848
+Author: Emil Velikov <emil.velikov@collabora.com>
+Date:   Thu Jul 18 13:57:02 2019 +0100
+
+    glamor_egl: disable modifiers via glamor_init()
+    
+    Currently we parse through xf86Info.debug to check if we the modifiers
+    should be disabled. Handle that within DDX and pass GLAMOR_NO_MODIFIERS
+    into the glamor_init() flags.
+    
+    This allows individual DDX control over the setting - say when modifiers
+    are woking OK with one implementation and not the other.
+    
+    Most importantly, this removes the final xf86 piece from the codebase.
+    
+    Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
+
+commit 4018811838c344ee92d10e60789853e4ba512612
+Author: Emil Velikov <emil.velikov@collabora.com>
+Date:   Wed Jul 17 16:07:43 2019 +0100
+
+    glamor_egl: don't use ScrnInfoRec::privates
+    
+    Move from the xf86 specific ScrnInfoRec::privates, to the dix private
+    handling. Since there's no FreeScreen function in ScreenPtr, fold the
+    former within the existing CloseScreen.
+    
+    Users, such as modesetting are updated, and out of tree drivers will
+    need equivalent, yet trivial, patch.
+    
+    Note: we need to ensure that the screen private is unset and the screen
+    callbacks are restored in our CloseScreen function.
+    
+    Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
+
+commit 1b5183b26d9977d46f6624126a2b2b6d77a74659
+Author: Emil Velikov <emil.velikov@collabora.com>
+Date:   Thu Jul 18 15:58:13 2019 +0100
+
+    glamor_egl: move glamor_egl_cleanup() further up
+    
+    We'll use the function within glamor_egl_close_screen() with next patch.
+    
+    Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
+
+commit 6a557167366b8b1352709397df50649d5665b755
+Author: Emil Velikov <emil.velikov@collabora.com>
+Date:   Tue Jul 16 17:50:13 2019 +0100
+
+    glamor/egl: remove unused function pointers
+    
+    The following two members of glamor_egl_screen_private has been unused
+    for a little while now.
+     CreateScreenResources
+     CloseScreen
+    
+    Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
+
+commit 52a2a052aa3ab92b07c185c1fc2bf4ee2d727f4d
+Author: Emil Velikov <emil.velikov@collabora.com>
+Date:   Fri Jul 12 17:47:27 2019 +0100
+
+    glamor_egl: use LogMessage over xf86DrvMsg
+    
+    Much of glamor already use LogMessage() so we might as well be
+    consistent. This effectively paves the way of making glamor-egl xf86
+    agnostic.
+    
+    Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
+
+commit 3340ddf37743fdf197dfc16a97107435ff53c6e4
 Author: Adam Jackson <ajax@redhat.com>
 Date:   Wed Oct 9 16:03:17 2019 -0400
 
     meson: Apparently 1.2 is < 1.2.0
     
     Siiiigh.
-    
-    (cherry picked from commit 3340ddf37743fdf197dfc16a97107435ff53c6e4)
 
-commit e16eb696f2238796827794d2d3b23f268cf4daf0
+commit c7486613b0dc586f93f6ba293d9b55c69995b05c
 Author: Adam Jackson <ajax@redhat.com>
 Date:   Wed Oct 9 15:17:47 2019 -0400
 
     meson: Fix another reference to "gl" 9.2.0
     
     Previous commit e6ef2b12 missed a spot.
-    
-    (cherry picked from commit c7486613b0dc586f93f6ba293d9b55c69995b05c)
 
-commit a57729d3180ee4bc3ae012cfd03fe5188d858a83
+commit e6ef2b12404dfec7f23592a3524d2a63d9d25802
 Author: Marvin Schmidt <marv@exherbo.org>
 Date:   Tue Sep 24 09:58:43 2019 +0200
 
@@ -2675,10 +11276,43 @@ Date:   Tue Sep 24 09:58:43 2019 +0200
     provided libraries
     
     [1] https://github.com/NVIDIA/libglvnd/commit/0dfaea2bcb7cdcc785f95e244223bd004a2d7fba
+
+commit afd80cfcd5ed7cd45d72620e74df86b016f81f3a
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Mon Sep 16 12:43:20 2019 +0100
+
+    Revert "appveyor: Drop building Xorg server"
+    
+    This reverts commit a9537cfdd1ed9656f4e29225af8861418b4fd682.
+    
+    This is buildable again since !244
+
+commit e693c9657f98c334e9921ca2f8ebf710497c0c6a
+Author: Arthur Williams <taaparthur@gmail.com>
+Date:   Sun Oct 6 11:55:35 2019 -0700
+
+    dix: Check for NULL spriteInfo in GetPairedDevice
+    
+    There is a race when reseting the XServer that causes spriteInfo to be
+    NULL in GetPairedDevice resulting a segfault and subsequent crash. The
+    problem was noticed when opening a connection, creating master devices,
+    destroying master devices and closing the connection during testing.
+    
+    Signed-off-by: Arthur Williams <taaparthur@gmail.com>
+
+commit a505ecba1048048c168472e4b4a92c13f92b0613
+Author: Sven Joachim <svenjoac@gmx.de>
+Date:   Fri Oct 4 10:29:31 2019 +0200
+
+    gitlab-ci: Add a manpage substitutions regression test
     
-    (cherry picked from commit e6ef2b12404dfec7f23592a3524d2a63d9d25802)
+    This catches the broken manpages in the autoconf build which appeared
+    after commit 2e497bf887ac ("man: s/__/@/g") and were only partly
+    rectified by commit 0445705a8bbf ("man: Fix automake seddery").
+    
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
 
-commit 3491f1dc5c701656e2f69f74b459dfcaef9451d6
+commit de0d39f825cce7422986011ee9d5db91f15e2987
 Author: Sven Joachim <svenjoac@gmx.de>
 Date:   Wed Oct 2 18:26:07 2019 +0200
 
@@ -2692,26 +11326,575 @@ Date:   Wed Oct 2 18:26:07 2019 +0200
     This should be a candidate for the 1.20 branch.
     
     Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
-    (cherry picked from commit de0d39f825cce7422986011ee9d5db91f15e2987)
 
-commit df1f8f691d7550a18d2076a44c109b1cb6da05ae
-Author: Alexander Tsoy <alexander@tsoy.me>
-Date:   Mon Sep 23 18:23:40 2019 +0300
+commit 726e4230c6ffe3148f9877eba32287cfe8d158c1
+Author: Sven Joachim <svenjoac@gmx.de>
+Date:   Wed Oct 2 18:25:17 2019 +0200
 
-    configure: Set libdrm flags correctly if only XORG is enabled
+    xwayland: Add more files to .gitignore
     
-    This fixes modesetting driver build failure which can be triggered with
-    the following configure options:
+    Also sort the file again, missed in commit c8c276c9569b.
+
+commit b2de577f6388c6dd7a463e5cebb8b1366bb45d1f
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Jul 23 14:33:45 2019 -0400
+
+    xfree86: Merge vbe into int10
     
-    $ ./configure --disable-dri --disable-dri2 --disable-dri3
-    --disable-config-udev --enable-xorg
+    There's not really a good reason to keep these separate, the vbe code
+    requires int10 and is not very large. This change eliminates the
+    build-time options for vbe; if you build int10, you get vbe.
     
-    Bugzilla: https://bugs.gentoo.org/689768
-    Signed-off-by: Alexander Tsoy <alexander@tsoy.me>
+    Gitlab: https://gitlab.freedesktop.org/xorg/xserver/issues/692
     Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
-    (cherry picked from commit 334f1107146a2e6ebf6f7743b77aec2ad5c46f75)
 
-commit fada61e89dd1f20fe8e2e0fb9e4baefb45b4b848
+commit e7b5af451c101608d8cc003e8dd0ff83ded17146
+Author: Sven Joachim <svenjoac@gmx.de>
+Date:   Mon Sep 30 18:44:25 2019 +0200
+
+    .dir-locals.el: Add missing final newline
+
+commit 47387916fb84f8f9c7931eb7162d1663a6023467
+Author: Sven Joachim <svenjoac@gmx.de>
+Date:   Mon Sep 30 18:43:13 2019 +0200
+
+    Fix various spelling errors
+
+commit 2a9268e4a0ba7b062ded4d361be3119d887aac41
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Sep 3 11:20:58 2019 -0400
+
+    dri2: Set fallback driver names for Intel and AMD chips
+    
+    i965 and radeonsi, respectively, are the drivers that have been
+    receiving new hardware support. It's really silly to need to update the
+    server side to know specific new devices IDs every time a new ASIC comes
+    out.
+    
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit cbdde938cbaf604741cd057fac743859ada342ec
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Fri Sep 27 11:43:52 2019 -0400
+
+    modesetting: Reduce "glamor initialization failed" message to X_INFO
+    
+    This might be an error or not, for example refusing to work on llvmpipe
+    is normal and expected. glamor_egl_init() will print X_ERROR messages if
+    appropriate, so we don't need to here.
+    
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit 0d8cc7bb180468fee72330f40d87f6e9db7b42c0
+Author: Michel Dänzer <mdaenzer@redhat.com>
+Date:   Mon Sep 23 18:35:41 2019 +0200
+
+    miext/sync: Make struct _SyncObject::initialized fully ABI compatible
+    
+    With a 32-bit build, putting the initialized field at the end of the
+    struct bumped the struct size from 20 bytes to 24, changing the layout
+    of other structs embedding struct _SyncObject. While this would be
+    acceptable on master, it caused crashes with 1.20.
+    
+    Making the initialized field a char and putting it in the hole before
+    the beingDestroyed field restores the 32-bit ABI as well.
+    
+    Fixes https://gitlab.freedesktop.org/xorg/xserver/issues/892
+    
+    Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
+    Reviewed-by: Alex Goins <agoins@nvidia.com>
+
+commit 6036e845271800b2e268f5cba9283ce07a7fad3a
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Mon Sep 23 16:28:42 2019 -0700
+
+    meson: fix builds on Solaris 11.4
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 0e8c0d2f238e5d50daaf4672bd80ad519673b5e3
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Mon Sep 23 15:12:01 2019 -0700
+
+    ospoll: Fix Solaris ports implementation to build on Solaris 11.4
+    
+    Wrong version got committed, but wasn't noticed since it only builds
+    with meson, not autoconf.
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit cca4bc342cacdbd1ce819c08af2f4795f6a704c3
+Author: Andres Rodriguez <andresx7@gmail.com>
+Date:   Fri Sep 6 18:32:44 2019 -0400
+
+    xf86: Disable unused crtc functions when a lease is revoked
+    
+    This fixes 'non-desktop' displays staying powered on after their lease
+    has been revoked.
+    
+    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111620
+    Cc: Keith Packard <keithp@keithp.com>
+    Signed-off-by: Andres Rodriguez <andresx7@gmail.com>
+
+commit 0f19381f4906e3100cd43544f1cad82d2a933c63
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Tue Jul 9 11:08:27 2019 +0200
+
+    xwayland: Don't create wl_buffer backing pixmap
+    
+    In non-rootless mode, not all pixmaps need a wl_buffer backing.
+    
+    Suggested-by: Twaik Yont (@twaik) in #834
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit edf964434eac10ffbe27cc883e3ab95505669aee
+Author: Jonas Ã…dahl <jadahl@gmail.com>
+Date:   Fri Sep 13 17:11:27 2019 +0200
+
+    xwayland/glamor-gbm: Handle DRM_FORMAT_MOD_INVALID gracefully
+    
+    The compositor may send DRM_FORMAT_MOD_INVALID instead of a list of
+    modifiers for various reasons. Handle this gracefully by ignoring it.
+    
+    Without this, if a compositor would send DRM_FORMAT_MOD_INVALID, it'd
+    result in empty windows provided by Xwayland.
+    
+    Signed-off-by: Jonas Ã…dahl <jadahl@gmail.com>
+    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit 429ee86ab949d6e49c07491a88d6b8d8babc3246
+Author: Martin Weber <martin.weber@secunet.com>
+Date:   Wed Sep 18 14:29:05 2019 +0200
+
+    udev: Fixed NULL pointer argument of strcmp
+    
+    Signed-off-by: Martin Weber <martin.weber@secunet.com>
+
+commit bcf2dd0cd20825ccf4284c67f678ad37ecd1d2b1
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Fri Feb 19 21:53:00 2016 +0000
+
+    hw/xwin: Add -icon option to set the screen window icon in windowed mode
+    
+    Add an -icon option to set the screen window icon in windowed mode
+    
+    Allow cygwin paths in an icon-specification
+    
+    Update man pages and system.XWinrc appropriately
+    
+    Also, log an error if the icon specified for TRAYICON cannot be loaded
+    
+    Also, fix a bug in appending a '\' to IconDirectory only if it doesn't
+    already end with one, which was fortunately benign.
+    
+    Note: LoadImageComma would be simpler if we just stated that XWinrc
+    paths are Cygwin paths on Cygwin, Windows paths on MinGW, but that could
+    break existing .XWinrc files
+    
+    Note: Given that we can specify paths in an icon-specifier, I'm not sure
+    what IconDirectory wins us.
+    
+    v2:
+    Fix formatting problems in man page additions
+    
+    v3:
+    Fix some more s/_/@/g in man pages
+
+commit ac5d3a200a6d4bdb9ae4a9ef6f2238cf185d38e5
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Tue Sep 10 17:28:36 2019 -0700
+
+    meson: don't require xf86bigfontproto if not building xf86bigfont support
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 7ad1d0d384085fb480e00547c22a3e8a14b514ea
+Author: Carlos Garnacho <carlosg@gnome.org>
+Date:   Sat Jul 20 00:16:43 2019 +0200
+
+    xwayland: Allow passing a fd for set up clients
+    
+    This FD also triggers the "wait for WM_S0" paths, so that the
+    compositor may set up a "maintenance line" for Xwayland, for
+    services that are essential to run before any client (eg. xrdb).
+    Those services would use this FD, disguised as an extra display
+    connection.
+    
+    This -initfd can be seen as a generalization of -wm, a Wayland
+    compositor may use -initfd to launch its WM and any other clients
+    that should start up, or it may use -wm as a dedicated connection for
+    the WM and optionally use -initfd for the misc. startup clients.
+    
+    If either of -wm or -initfd is passed, Xwayland will expect a selection
+    notification on WM_S0 before incorporating the FDs in -listen to the
+    poll list.
+    
+    Also, correct a minor typo in the listenfd argument output,
+    give → given.
+    
+    Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
+
+commit 78cc8b6f9613fc71f6ecc7e8848d54364a250634
+Author: Carlos Garnacho <carlosg@gnome.org>
+Date:   Mon Jan 7 15:33:35 2019 +0100
+
+    xwayland: Handle the case of windows being realized before redirection
+    
+    If Xwayland gets to realize a window meant for composition before the
+    compositor redirected windows (i.e. redirect mode is not RedirectDrawManual
+    yet), the window would stay "invisible" as we wouldn't create a
+    wl_surface/wl_shell_surface for it at any later point.
+    
+    This scenario may happen if the wayland compositor sets up a X11 socket
+    upfront, but waits to raise Xwayland until there are X11 clients. In this
+    case the first data on the socket is the client's, the compositor can hardly
+    beat that in order to redirect subwindows before the client realizes a
+    Window.
+    
+    In order to jump across this hurdle, allow the late creation of a matching
+    (shell) surface for the WindowPtr on SetWindowPixmapProc, so it is ensured
+    to be created after the compositor set up redirection.
+    
+    Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
+
+commit c2e8ae964052944312c5023ca7ea5c41a92990e5
+Author: Carlos Garnacho <carlosg@gnome.org>
+Date:   Mon Jan 7 15:33:31 2019 +0100
+
+    xwayland: Refactor surface creation into a separate function
+    
+    This is just called from xwl_window_realize() ATM, but will be useful in
+    future commits.
+    
+    Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
+
+commit 4e50440ae20c537d6a4edf356cda67dd33d4e5a8
+Author: Carlos Garnacho <carlosg@gnome.org>
+Date:   Mon Jan 7 15:20:05 2019 +0100
+
+    xwayland: Separate DamagePtr into separate window data
+    
+    This will be dissociated in future commits to handle the cases
+    where windows are being realized before there is a compositor
+    handling redirection.
+    
+    In that case, we still want the DamagePtr to be registered upfront
+    on RealizeWindowProc before a corresponding xwl_window might be
+    created. Most notably, it cannot be lazily created on
+    SetWindowPixmapProc as damage accounting gets broken.
+    
+    Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
+
+commit 07463a40458ecc52d935b1a0bd820f6d9664da22
+Author: Simon Ser <contact@emersion.fr>
+Date:   Tue Sep 3 13:10:33 2019 +0300
+
+    ci: bump DEBIAN_TAG
+    
+    The previous commit requires wayland-protocols 1.18. Bump DEBIAN_TAG to
+    re-generate the Debian image and get the wayland-protocols update.
+    
+    Signed-off-by: Simon Ser <contact@emersion.fr>
+    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+
+commit 01ed478c65227ae961d33bc1daf4a64da84f15a6
+Author: Simon Ser <contact@emersion.fr>
+Date:   Mon Sep 2 22:42:17 2019 +0300
+
+    xwayland: add support for xdg-output-unstable-v1 version 3
+    
+    This adds support for xdg-output-unstable-v1 version 3, added in [1].
+    
+    This new version deprecates zxdg_output_v1.done and replaces it with
+    wl_output.done. If the version is high enough, there's no need to wait for both
+    an xdg_output.done event and a wl_output.done event -- we only care about
+    wl_output.done.
+    
+    [1]: https://gitlab.freedesktop.org/wayland/wayland-protocols/commit/962dd535372c8e4681374c23d2603cbe06cd7031
+    
+    Signed-off-by: Simon Ser <contact@emersion.fr>
+    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
+
+commit f0d78b47ac49977a6007f5fe081f00c6eb19a12e
+Author: Maarten Lankhorst <dev@mblankhorst.nl>
+Date:   Thu Apr 25 11:46:41 2019 +0200
+
+    modesetting: Disable atomic support by default
+    
+    The atomic driver has issues with modesetting when stealing
+    connectors from a different crtc, a black screen when doing rotation
+    on a different crtc, and in general is just a mapping of the legacy
+    helpers to atomic. This is already done in the kernel, so just
+    fallback to legacy by default until this is fixed.
+    
+    Please backport to 1.20, as we don't want to enable it for everyone
+    there. It breaks for existing users.
+    
+    The fixes to make the xserver more atomic have been pending on the
+    mailing list for ages.
+    
+    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110375
+    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110030
+    References: https://gitlab.freedesktop.org/xorg/xserver/merge_requests/36/commits
+    Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
+
+commit 7d0e660e0e2808e098ab9d4de843e9b31c64af21
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Aug 27 15:54:42 2019 -0400
+
+    meson: Add dtrace support
+
+commit e0e051a3920e3e2731d35807e00d30ba9ef7f122
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Aug 27 15:50:23 2019 -0400
+
+    dtrace: s/#if/#ifdef/ for XSERVER_DTRACE
+    
+    No functional change, matches meson style.
+
+commit 7968d10fadd37eabd811481e1d47fe01706269f3
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Aug 27 15:48:59 2019 -0400
+
+    dtrace: Move Xserver.d from dix/ to include/
+    
+    dix/ is typically not in the include path, and this properly belongs in
+    include anyway since it's needed from os/ too.
+
+commit 4fa43fc5134bedf50904ec634f9a63d0570b0827
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Aug 27 15:43:50 2019 -0400
+
+    dtrace: Remove Xserver-dtrace.h.in hack
+    
+    This was a workaround for very old versions of dtrace(1) that didn't
+    support the -h switch. We no longer support such old OSes.
+
+commit f8c85961c8fcb283e4ed6fc2b942428e4da2d093
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Thu Aug 22 15:07:18 2019 -0400
+
+    glx: Disable GLX_EXT_import_context if !enableIndirectGLX
+    
+    GLX_EXT_import_context allows multiple clients to share the same
+    indirect context. If you can't create an indirect context, you're
+    certainly not going to be able to share one. Hide the extension from the
+    server string if we've disabled indirect contexts.
+    
+    This turns piglit's tests from fail to skip when indirect contexts are
+    disabled. Since GLX_EXT_import_context has been supported in
+    xfree86-derived servers since day 1 (it was included in the initial GLX
+    code drop from SGI), this is now also a hint to the client that indirect
+    contexts are unlikely to work at all.
+    
+    Reviewed-by: Michel Dänzer <michel@daenzer.net>
+
+commit 4f27d1e05f67eb8953a9bbed7e6f34b03456c64f
+Author: Christopher Chavez <chrischavez@gmx.us>
+Date:   Sat Jul 27 10:51:57 2019 -0500
+
+    XQuartz: translate additional mouse buttons
+    
+    Old behavior was to translate the middle mouse button, as well as
+    every other button that isn't the left or right mouse button,
+    to act as the middle mouse button (2).
+    
+    New behavior is to translate only the middle mouse button to 2,
+    and translate higher-numbered buttons to 8 and higher.
+    This allows additional mouse buttons to behave under XQuartz
+    more like they do by default under X11 on other platforms
+    (e.g. Linux and BSD distributions).
+    
+    Signed-off-by: Christopher Chavez <chrischavez@gmx.us>
+
+commit 436fd7e8b4966c305ea9c43f3c14c2ca04c35539
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Wed Jan 23 11:47:44 2019 -0500
+
+    render: Break PICT_a4
+    
+    The Render protocol requires this format, but it is wrong to do so. We
+    are not aware of any hardware with a real 4bpp implementation of this
+    format. Some GL hardware may have GL_LUMINANCE4_ALPHA4_EXT, and may also
+    be able to wire L to 1, but that would win you none of memory, quality,
+    or (likely) performance over A8. Any attempt to use this format is
+    therefore likely a (painful) software fallback.
+    
+    Pleasantly (and given the above, unsurprisingly) it seems to be unused
+    in the wild. None of the major toolkits will try to use it, and
+    rendercheck does not in fact validate that all of the "standard" picture
+    formats exist.
+    
+    Drop the explicit A4 setup from picture format initialization. Note that
+    the DDXes are not changed and still expose a depth-4 pixmap format, but
+    we only add picture formats for True/DirectColor-credible depths (i.e.
+    depth >= 15).
+    
+    Implements: xorg/proto/xorgproto!1
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit 0c5179c280a193a1dbbe29160906087f06eae6f2
+Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
+Date:   Tue Aug 20 17:46:09 2019 +0300
+
+    modesetting: Update props for dynamically added outputs
+    
+    Dynamically added outputs should have their properties
+    properly updated as well. Otherwise we're left with an output
+    with many of its propeties not exposed.
+    
+    Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
+    Reviewed-by: Michel Dänzer <michel@daenzer.net>
+
+commit 194ba38728b34a76885275dae153057c8afaf72e
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Mon Aug 19 14:27:54 2019 -0400
+
+    miext/sync: Fix needless ABI change
+    
+    The initialized field was added in:
+    
+        commit 82f01ad7869e3f2be51e41a8246dab5982bbc36a
+        Author: Alex Goins <agoins@nvidia.com>
+        Date:   Wed Apr 10 13:48:02 2019 -0500
+    
+            xsync: Add resource inside of SyncCreate, export SyncCreate
+    
+    But it added this field not at the end of SyncObject. It may not have
+    been _usefully_ possible to create those from another extension prior to
+    that commit, but that's still an ABI-incompatible change.
+
+commit 95dcc81cb122e5a4c5b38e84ef46eb872b2e1431
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Fri Aug 16 14:56:19 2019 -0400
+
+    glx: Fix previous context validation in xorgGlxMakeCurrent
+    
+    vnd has already verified that the context tag is valid before this gets
+    called, and we only set the context tag private data to non-null for
+    indirect clients. Mesa happens to be buggy and doesn't send MakeCurrent
+    requests nearly as much as it should for direct contexts, but if you fix
+    that, then unbinding a direct context would fail here with
+    GLXBadContextTag.
+    
+    Sadly Mesa will still need to carry a workaround here for broken
+    servers, but we should still fix the server.
+
+commit aed62f8fbea3f618f97ee0105b2d430c8cddf8f5
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Thu Aug 1 13:34:13 2019 +0200
+
+    meson/xwayland: No libdrm nor epoxy without glamor
+    
+    When building Xwayland with neither DRI nor GLamor support enabled with
+    the Meson build system, the resulting binary would still link against
+    libdrm and epoxy even though those are not used/needed.
+    
+    Make sure we require and link against libdrm and epoxy only if needed.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+
+commit e8a85ba818a82d8c5acacc53dfc4fdfff573ae90
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Thu Aug 1 13:28:48 2019 +0200
+
+    meson: Build miext/sync for Xwayland
+    
+    When using the Meson build system, miext/sync would be build only for
+    dri3.
+    
+    As a result, when building with Meson without DRI3 enabled, Xwayland
+    would fail to link because `miSyncShmScreenInit()` is nowhere to be
+    found.
+    
+    Make sure to build miext/sync for either DRI3 or Xwayland.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+
+commit c0bbc29ae59737ea0e55fd9c8b65133010d32b80
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Thu Aug 1 09:48:59 2019 +0200
+
+    meson: Move requirements in a single place
+    
+    Some modules are required in multiple places in the meson file.
+    
+    Move the actual requirements to the top of the file as a variable so
+    that updating a version does not require changing the actual value in
+    multiple places.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+
+commit bf758660c9c0e20abd141a1215e2e2b1ac342097
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Thu Aug 1 13:39:47 2019 +0200
+
+    configure/xwayland: No libdrm nor epoxy without glamor
+    
+    When building Xwayland without neither DRI nor GLamor support enabled
+    with the autotools build system, the resulting binary would still link
+    against libdrm and epoxy even though those are not used/needed.
+    
+    Make sure we require and link against libdrm and epoxy only if needed.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+
+commit 5096fcd492b1efd178773748e5f42177439426d6
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Wed Aug 14 14:10:07 2019 -0400
+
+    composite: Be more paranoid in compDestroyDamage
+    
+    Consider these two facts:
+    
+    - You can't rely on resource deletion order
+    - damageDestroyWindow automatically destroys any damage listener
+      connected to the doomed window
+    
+    Now consider a redirected window being destroyed. If the damage
+    associated with the redirection is destroyed before the window, then
+    when compFreeClientWindow tries to unredirect the window, the call to
+    compSetParentPixmap may see that cw->damageRegistered is still true, and
+    call DamageUnregister(NULL) (because compDestroyDamage already zeroed
+    out cw->damage), and you get a backtrace that looks like:
+    
+        #6  <signal handler called>
+        #7  DamageUnregister (pDamage=0x0) at damage.c:1773   <-----------------
+        #8  0x000000000051f767 in compSetParentPixmap (pWin=pWin@entry=0x28489c0) at compalloc.c:646
+        #9  0x000000000051fa01 in compFreeClientWindow (pWin=0x28489c0, id=<optimized out>) at compalloc.c:291
+        #10 0x000000000051a499 in FreeCompositeClientWindow (value=<optimized out>, ccwid=<optimized out>) at compext.c:74
+        #11 0x0000000000597932 in doFreeResource (res=0x28494c0, skip=0) at resource.c:880
+        #12 0x000000000059850e in FreeResource (id=857, skipDeleteFuncType=skipDeleteFuncType@entry=0) at resource.c:910
+        #13 0x000000000051ee01 in compUnredirectWindow (pClient=0x1f6b4e0, pWin=pWin@entry=0x28489c0, update=update@entry=0) at compalloc.c:336
+        #14 0x000000000051b723 in compCheckBackingStore (pWin=0x28489c0) at compinit.c:131
+        #15 compChangeWindowAttributes (pWin=0x28489c0, mask=<optimized out>) at compinit.c:152
+        #16 0x000000000051d1f9 in compDestroyWindow (pWin=0x28489c0) at compwindow.c:664
+        #17 0x00000000004d85be in damageDestroyWindow (pWindow=0x28489c0) at damage.c:1570
+        #18 0x00000000004896f0 in DbeDestroyWindow (pWin=0x28489c0) at dbe.c:1326
+        #19 0x00000000004d229e in present_destroy_window (window=0x28489c0) at present_screen.c:163
+        #20 0x000000000059c4e4 in FreeWindowResources (pWin=pWin@entry=0x28489c0) at window.c:1032
+        #21 0x000000000059f2c6 in DeleteWindow (value=0x28489c0, wid=<optimized out>) at window.c:1101
+        #22 0x0000000000597932 in doFreeResource (res=0x2843bd0, skip=skip@entry=0) at resource.c:880
+        #23 0x0000000000598b0c in FreeClientResources (client=client@entry=0x2848560) at resource.c:1146
+        #24 0x0000000000572e2f in CloseDownClient (client=0x2848560) at dispatch.c:3473
+    
+    Fix this by zeroing out more of the CompWindowPtr when the damage is
+    destroyed, so that any further calls into composite will avoid touching
+    cw->damage.
+
+commit 3c78d637553a5ed207cd67a6f84b9b1fffe5b91f
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Wed Aug 14 14:51:56 2019 -0400
+
+    global: Remove BUILD_DATE and BUILD_TIME
+    
+    All this does is make reproducible builds impossible.
+
+commit 61aa40aeb3d4efefda47f245ed4b83a1a19b1d4c
 Author: Matt Turner <mattst88@gmail.com>
 Date:   Fri Aug 9 20:22:29 2019 -0700
 
@@ -2753,300 +11936,284 @@ Date:   Fri Aug 9 20:22:29 2019 -0700
     
     Fixes: xorg/xserver#590
     Signed-off-by: Matt Turner <mattst88@gmail.com>
-    (cherry picked from commit 61aa40aeb3d4efefda47f245ed4b83a1a19b1d4c)
 
-commit e815db543450c38d1d4ec03184b8e82fa0a37498
-Author: Alexander Volkov <a.volkov@rusbitech.ru>
-Date:   Mon Feb 11 18:54:10 2019 +0300
-
-    shm: Use memfd_create when possible
-    
-    It doesn't require shared memory dir and thus allows
-    to avoid cases when this dir is detected incorrectly,
-    as in https://bugreports.qt.io/browse/QTBUG-71440
-    
-    Signed-off-by: Alexander Volkov <a.volkov@rusbitech.ru>
-    (cherry picked from commit f6753c117ef0f83499d5e2d6dda226fec9ddf803)
-
-commit 05c5b970136f0a11fffa16692744bdf5a23963e8
-Author: Eric Anholt <eric@anholt.net>
-Date:   Wed Sep 19 13:28:06 2018 -0700
-
-    shm: Pick the shm dir at run time, not build time.
-    
-    Prodding the builder's filesystem for tmp dirs doesn't necessarily
-    tell you anything about what the actual host's filesystem is going to
-    look like, so we should just try the dirs at runtime.
-    
-    Signed-off-by: Eric Anholt <eric@anholt.net>
-    (cherry picked from commit 19f6cb570becbc4e355807199c6e251fc7935132)
-
-commit 9ee4e35bfe084fa942c2b2ce46405e048eb335a8
-Author: Eric Anholt <eric@anholt.net>
-Date:   Wed Sep 19 13:20:12 2018 -0700
-
-    shm: reindent shm_tmpfile to follow our standards.
-    
-    Signed-off-by: Eric Anholt <eric@anholt.net>
-    (cherry picked from commit 804a9b4f57107fa2d0ed1ae0becda5bebaffe6e1)
-
-commit b6ee04e774af1fc2e2560583c95dfac688494c2a
-Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
-Date:   Mon Jul 1 02:31:02 2019 +0200
+commit c69b37e8da87c9f76dbf4add7340a77ea443c760
+Author: Hans de Goede <hdegoede@redhat.com>
+Date:   Thu Aug 8 21:56:59 2019 +0200
 
-    Fix crash on XkbSetMap
+    modesetting: Only log 1 error for consecutive flip failures
     
-    Some devices may not have keyboard information.
+    Only log 1 error for consecutive flip failures, instead of filling the
+    log and the disk with errors for each attempted flip.
     
-    Fixes #574
+    Despite our best efforts we may end up with a BO which gets refused
+    when we try to import it as a framebuffer, see e.g. :
+    https://bugs.freedesktop.org/show_bug.cgi?id=111306
+    This should not happen, but as the above bugs shows sometimes it does
+    and chances are it will happen again.
+    
+    Note ideally we should check if the import is possible at
+    ms_present_check_flip time, like the amdgpu code is doing since:
+    https://gitlab.freedesktop.org/xorg/driver/xf86-video-amdgpu/merge_requests/35
+    but that requires a chunk of refactoring work on the modesetting driver,
+    so for now this will have to do.
     
-    (cherry picked from commit 8469bfead9515ab3644f1769a1ff51466ba8ffee)
+    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
+    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
 
-commit 616b3e1dd19d51688e4cba380394bd93c62b50d4
-Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
-Date:   Mon Jul 1 02:33:26 2019 +0200
+commit 3dc838f77d9a9417adf6a03cc82aa4e9337153a7
+Author: Hans de Goede <hdegoede@redhat.com>
+Date:   Thu Aug 8 21:54:51 2019 +0200
 
-    Fix crash on XkbSetMap
+    modesetting: Improve page-flip error reporting
     
-    Since group_info and width are used for the key actions allocations,
-    when modifying them we need to take care of reallocation key actions if
-    needed.
+    Before this commit ms_do_pageflip logged a single error for both the
+    drmmode_bo_import failure path as well as for the queue_flip_on_crtc
+    path. This commit splits this into 2 separate error logs so that it is
+    clear what the cause of the flip-failure is.
     
-    (cherry picked from commit fabc4219622f3c0b41b1cb897c46e092377059e3)
+    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
+    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
 
-commit c747dbb250c11c6a02641b253e7322145dc9b913
-Author: Michel Dänzer <mdaenzer@redhat.com>
-Date:   Mon Sep 23 18:35:41 2019 +0200
+commit 12821852f0d82ecef686262382c84b2c1625a99f
+Author: Hans de Goede <hdegoede@redhat.com>
+Date:   Mon Jul 15 14:35:49 2019 +0200
 
-    miext/sync: Make struct _SyncObject::initialized fully ABI compatible
+    modesetting: Avoid duplicate error messages on present-flip errors
     
-    With a 32-bit build, putting the initialized field at the end of the
-    struct bumped the struct size from 20 bytes to 24, changing the layout
-    of other structs embedding struct _SyncObject. While this would be
-    acceptable on master, it caused crashes with 1.20.
+    Currently on present-flip failures we log 2 messages for each failure,
+    1 from ms_do_pageflip and then another one from ms_present_flip which
+    is the caller of ms_do_pageflip. This commit adds a log_prefix argument
+    to ms_do_pageflip so that its log messages can show if it is a DRI2 or
+    a Present flip which fails and removes the redundant error message from
+    ms_present_flip.
     
-    Making the initialized field a char and putting it in the hole before
-    the beingDestroyed field restores the 32-bit ABI as well.
+    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
+    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+
+commit 078277e4d92f05a90c4715d61b89b9d9d38d68ea
+Author: Dave Airlie <airlied@redhat.com>
+Date:   Fri Aug 17 09:49:24 2012 +1000
+
+    xf86: autobind GPUs to the screen
+    
+    This is a modified version of a patch we've been carry-ing in Fedora and
+    RHEL for years now. This patch automatically adds secondary GPUs to the
+    master as output sink / offload source making e.g. the use of
+    slave-outputs just work, with requiring the user to manually run
+    "xrandr --setprovideroutputsource" before he can hookup an external
+    monitor to his hybrid graphics laptop.
+    
+    There is one problem with this patch, which is why it was not upstreamed
+    before. What to do when a secondary GPU gets detected really is a policy
+    decission (e.g. one may want to autobind PCI GPUs but not USB ones) and
+    as such should be under control of the Desktop Environment.
+    
+    Unconditionally adding autobinding support to the xserver will result
+    in races between the DE dealing with the hotplug of a secondary GPU
+    and the server itself dealing with it.
+    
+    However we've waited for years for any Desktop Environments to actually
+    start doing some sort of autoconfiguration of secondary GPUs and there
+    is still not a single DE dealing with this, so I believe that it is
+    time to upstream this now.
+    
+    To avoid potential future problems if any DEs get support for doing
+    secondary GPU configuration themselves, the new autobind functionality
+    is made optional. Since no DEs currently support doing this themselves it
+    is enabled by default. When DEs grow support for doing this themselves
+    they can disable the servers autobinding through the servers cmdline or a
+    xorg.conf snippet.
     
-    Fixes https://gitlab.freedesktop.org/xorg/xserver/issues/892
+    Signed-off-by: Dave Airlie <airlied@gmail.com>
+    [hdegoede@redhat.com: Make configurable, fix with nvidia, submit upstream]
+    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+    Reviewed-by: Eric Anholt <eric@anholt.net>
+    Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
+    ---
+    Changes in v2:
+    -Make the default enabled instead of installing a xorg.conf
+     snippet which enables it unconditionally
     
-    Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
-    Reviewed-by: Alex Goins <agoins@nvidia.com>
-    (cherry picked from commit 0d8cc7bb180468fee72330f40d87f6e9db7b42c0)
+    Changes in v3:
+    -Handle GPUScreen autoconfig in randr/rrprovider.c, looking at
+     rrScrPriv->provider, rather then in hw/xfree86/modes/xf86Crtc.c
+     looking at xf86CrtcConfig->provider. This fixes the autoconfig not
+     working with the nvidia binary driver
 
-commit 5aadaac9499c71ebf88c0e5fc658d9d56c8a7e16
-Author: Andres Rodriguez <andresx7@gmail.com>
-Date:   Fri Sep 6 18:32:44 2019 -0400
+commit fbd2bb9dd047a206b9c8cfaca62079c8d866c617
+Author: Hans de Goede <hdegoede@redhat.com>
+Date:   Thu Aug 1 12:38:35 2019 +0200
 
-    xf86: Disable unused crtc functions when a lease is revoked
+    mi: Use GC clipregion instead of drawable in miDoCopy/miCopyArea
     
-    This fixes 'non-desktop' displays staying powered on after their lease
-    has been revoked.
+    As discussed in issue #829 the "mi: Shortcut miDoCopy/miCopyArea based
+    on clipList" change leads to pointer-trails (area under pointer not
+    restored when it moves) when using a software cursor.
     
-    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111620
-    Cc: Keith Packard <keithp@keithp.com>
-    Signed-off-by: Andres Rodriguez <andresx7@gmail.com>
+    Checking pGC->pCompositeClip instead of pDstDrawable->clipList fixes
+    this problem.
+    
+    Fixes: #829
+    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
 
-commit 63346c74393e1df4555f84367529802a67578ef6
-Author: Carlos Garnacho <carlosg@gnome.org>
-Date:   Mon Jan 7 15:33:35 2019 +0100
+commit 0aaac8d783e78c040a70a55ba8d67809abd7e625
+Author: Hans de Goede <hdegoede@redhat.com>
+Date:   Mon Jun 24 21:46:26 2019 +0200
 
-    xwayland: Handle the case of windows being realized before redirection
-    
-    If Xwayland gets to realize a window meant for composition before the
-    compositor redirected windows (i.e. redirect mode is not RedirectDrawManual
-    yet), the window would stay "invisible" as we wouldn't create a
-    wl_surface/wl_shell_surface for it at any later point.
+    modesetting: Disable pageflipping when using a swcursor
     
-    This scenario may happen if the wayland compositor sets up a X11 socket
-    upfront, but waits to raise Xwayland until there are X11 clients. In this
-    case the first data on the socket is the client's, the compositor can hardly
-    beat that in order to redirect subwindows before the client realizes a
-    Window.
+    The miPointerSpriteFunc swcursor code expects there to only be a single
+    framebuffer and when the cursor moves it will undo the damage of the
+    previous draw, potentially overwriting what ever is there in a new
+    framebuffer installed after a flip.
     
-    In order to jump across this hurdle, allow the late creation of a matching
-    (shell) surface for the WindowPtr on SetWindowPixmapProc, so it is ensured
-    to be created after the compositor set up redirection.
+    This leads to all kind of artifacts, so we need to disable pageflipping
+    when a swcursor is used.
     
-    Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
-    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
-    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
-    (cherry picked from commit 78cc8b6f9613fc71f6ecc7e8848d54364a250634)
-
-commit 12db645c7fc0539752a881df7ac2bcd09e3cb17b
-Author: Carlos Garnacho <carlosg@gnome.org>
-Date:   Mon Jan 7 15:33:31 2019 +0100
-
-    xwayland: Refactor surface creation into a separate function
+    The code for this has shamelessly been copied from the xf86-video-amdgpu
+    code.
     
-    This is just called from xwl_window_realize() ATM, but will be useful in
-    future commits.
+    Fixes: https://gitlab.freedesktop.org/xorg/xserver/issues/828
     
-    Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
-    (cherry picked from commit c2e8ae964052944312c5023ca7ea5c41a92990e5)
+    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
+    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
 
-commit e0af09061f9e8397ca564ec3bbedea51974455d4
-Author: Carlos Garnacho <carlosg@gnome.org>
-Date:   Mon Jan 7 15:20:05 2019 +0100
+commit 0331153b227c1cadf94f912cc02949d7159b02a2
+Author: Hans de Goede <hdegoede@redhat.com>
+Date:   Mon Jun 24 21:49:59 2019 +0200
 
-    xwayland: Separate DamagePtr into separate window data
+    modesetting: Fix compiler warning
     
-    This will be dissociated in future commits to handle the cases
-    where windows are being realized before there is a compositor
-    handling redirection.
+    Fix the following compiler warning:
     
-    In that case, we still want the DamagePtr to be registered upfront
-    on RealizeWindowProc before a corresponding xwl_window might be
-    created. Most notably, it cannot be lazily created on
-    SetWindowPixmapProc as damage accounting gets broken.
+    drmmode_display.c: In function ‘drmmode_create_bo’:
+    drmmode_display.c:1019:9: warning: ISO C90 forbids mixed declarations and code [
+     1019 |         uint32_t num_modifiers;
+          |         ^~~~~~~~
     
-    Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
-    (cherry picked from commit 4e50440ae20c537d6a4edf356cda67dd33d4e5a8)
+    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
+    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
 
-commit 045add84927051a33569ed701097e1fd514bf0ca
-Author: Adam Jackson <ajax@redhat.com>
-Date:   Fri Aug 16 14:56:19 2019 -0400
+commit 13f359fa838a9b5e855fbbee9c2f79bad84a1ace
+Author: Hans de Goede <hdegoede@redhat.com>
+Date:   Mon Jun 24 21:20:06 2019 +0200
 
-    glx: Fix previous context validation in xorgGlxMakeCurrent
-    
-    vnd has already verified that the context tag is valid before this gets
-    called, and we only set the context tag private data to non-null for
-    indirect clients. Mesa happens to be buggy and doesn't send MakeCurrent
-    requests nearly as much as it should for direct contexts, but if you fix
-    that, then unbinding a direct context would fail here with
-    GLXBadContextTag.
+    modesetting: Remove obsolete, unused msPixmapPrivate declaration and macro
     
-    Sadly Mesa will still need to carry a workaround here for broken
-    servers, but we should still fix the server.
+    When the pixmapPrivateKeyRec was moved from a global to being embedded
+    inside the drmmode_rec these 2 where missed, clean them up.
     
-    (cherry picked from commit 95dcc81cb122e5a4c5b38e84ef46eb872b2e1431)
+    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
+    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
 
-commit 8449c8623d6208b77e76596e8b10250817d3e8ab
-Author: Adam Jackson <ajax@redhat.com>
-Date:   Mon Aug 19 14:27:54 2019 -0400
+commit f9e7cdf65901665cf5a4efc4df3164337229f3ac
+Author: Hans de Goede <hdegoede@redhat.com>
+Date:   Mon Aug 5 17:12:01 2019 +0200
 
-    miext/sync: Fix needless ABI change
+    xf86: dri2: Use va_gl as VDPAU driver for Intel i965 GPUs
     
-    The initialized field was added in:
+    The modesetting driver (which now often is used with Intel GPUs),
+    relies on DRI2ScreenInit() to setup the DRI and VDPAU driver names.
     
-        commit 82f01ad7869e3f2be51e41a8246dab5982bbc36a
-        Author: Alex Goins <agoins@nvidia.com>
-        Date:   Wed Apr 10 13:48:02 2019 -0500
+    Before this commit it would always assign the same name to the 2 names,
+    but the VDPAU driver for i965 GPUs should be va_gl.
     
-            xsync: Add resource inside of SyncCreate, export SyncCreate
+    This commit adds a special case for the i965 case, replacing the
+    VDPAU driver name with "va_gl" if the GPU is using the i965 driver
+    for DRI.
     
-    But it added this field not at the end of SyncObject. It may not have
-    been _usefully_ possible to create those from another extension prior to
-    that commit, but that's still an ABI-incompatible change.
+    Note this commit adds a FIXME comment for a related memory leak, that leak
+    was already present and fixing it falls outside of the scope of this commit.
     
-    (cherry picked from commit 194ba38728b34a76885275dae153057c8afaf72e)
+    BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1413733
+    Cc: kwizart@gmail.com
+    Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
+    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
 
-commit 39b3005c329bc63676df72c43529d641bf305bcd
-Author: Aaron Plattner <aplattner@nvidia.com>
-Date:   Tue May 21 10:50:42 2019 -0700
+commit 6f41bf31051ec915cb4316421d3b7eddfebdd8c6
+Author: Ross Burton <ross.burton@intel.com>
+Date:   Thu Aug 1 15:24:51 2019 +0100
 
-    GLX: Set GlxServerExports::{major,minor}Version
+    sdksyms.sh: don't embed the build path
     
-    Commit 56c0a71fdd94a008e5d746261f70a713c4767f93 incremented the
-    GLXSERVER_VENDOR_ABI_MINOR_VERSION define, but this define was not actually
-    being used to set glxServer.minorVersion.
+    This script generates a header that has a comment containing the build path for
+    no real reason.  As this source can end up deployed on targets in debug packages
+    this means there is both potentially sensitive information leakage about the
+    build environment, and a source of change for reproducible builds.
+
+commit b7dae57f1d50ca3c8197f894c445a00b92a3ee9c
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sun Aug 4 10:28:51 2019 -0700
+
+    Fix NO_UNDEFINED build with statically linked fb
     
-    Update the initializer for glxServer to use the correct version numbers.
+    Stop trying to link to a shared library we no longer build
     
-    Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
-    (cherry picked from commit b4231d69028adc8123801a7552b40a15ea928d1b)
+    Fixes: commit c1703cdf3b - "xfree86: Link fb statically"
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
 
-commit d3034ef2f5121d85ae766a73fda4e523399043a9
-Author: Kyle Brenneman <kbrenneman@nvidia.com>
-Date:   Thu May 2 07:17:21 2019 -0600
+commit f107bde1e2e8c67eb42d0a5c757c0a1c777b0327
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Wed Jul 31 11:14:37 2019 +0200
 
-    GLX: Add a function to change a clients vendor list.
+    xwayland: Fix build warning without glamor
     
-    Add a new function, GlxServerExports::setClientScreenVendor, which will change
-    the vendor that handles GLX requests for a screen, but only for requests from
-    a specific client.
+    Building Xwayland without glamor support would raise a warning at build
+    time:
     
-    v2: Increment the GLXVND minor version number.
-    v3: Note the GLXVND version requirement for setClientScreenVendor.
+      xwayland.c: In function ‘xwl_screen_init’:
+      xwayland.c:980:10: warning: unused variable ‘use_eglstreams’
+        980 |     Bool use_eglstreams = FALSE;
+            |          ^~~~~~~~~~~~~~
     
-    Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
-    Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
-    Reviewed-by: Adam Jackson <ajax@redhat.com>
-    (cherry picked from commit 56c0a71fdd94a008e5d746261f70a713c4767f93)
+    When building without glamor support, we cannot have EGL Streams support
+    either, the two being related. So we do not need to declare the variable
+    `use_eglstreams` if glamor is not enabled.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
 
-commit abeae4a6d356653d50026707ecc2afceac83631e
-Author: Kyle Brenneman <kbrenneman@nvidia.com>
-Date:   Wed May 8 08:44:54 2019 -0600
+commit 8587bbd85adaa92a429257a7b6f75e60f56cd603
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Wed Jul 31 09:25:09 2019 +0200
 
-    GLX: Use the sending client for looking up XID's
-    
-    When GlxGetXIDMap looks up an unknown XID, it will now look up a vendor based
-    on the screen number for the XID and the client that sent the current request.
+    xwayland: Fix build without glamor
     
-    In GlxGetXIDMap, if the XID is for a regular X window, then it won't be in the
-    (XID -> vendor) mapping, so we have to look up a vendor by screen number.
+    When building Xwayland without glamor support enabled using automake,
+    the build would fail at link time trying to find `glamor_block_handler`:
     
-    With this change, GlxGetXIDMap will use the (screen -> vendor) map for
-    whichever client sent the current request, instead of using the global
-    (screen -> vendor) map.
+      /usr/bin/ld: xwayland-glx.o: in function `egl_drawable_wait_x':
+      hw/xwayland/xwayland-glx.c:102: undefined reference to
+      `glamor_block_handler'
     
-    Since GlxGetXIDMap doesn't take a ClientPtr argument, GlxDispatchRequest will
-    store the client for the current request in a global variable. That way, the
-    ABI for GLXVND doesn't need to change.
+    Make sure we don't try to build `xwayland-glx.c` without glamor in the
+    Xwayland Makefile.
     
-    v2: Fix an error check in GlxDispatchRequest.
+    Note: Meson build is fine because it's already build only with glamor
+    enabled.
     
-    Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
-    Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
-    Reviewed-by: Adam Jackson <ajax@redhat.com>
-    (cherry picked from commit 8b67ec7cc6fda243480a5a8ca118b66242f3eb2c)
+    Fixes: commit 8469241 - "xwayland: Add EGL-backed GLX provider"
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
 
-commit 1fdb7cbce538f0b37304a3cfc9fae4ff2fe9ece9
-Author: Kyle Brenneman <kbrenneman@nvidia.com>
-Date:   Thu Oct 19 15:14:51 2017 -0600
+commit a026972776b303fa640f54e5e8f0fc1abf879071
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Mon Mar 16 15:43:07 2015 +0000
 
-    GLX: Add a per-client vendor mapping.
-    
-    Each client now has its own (screen, vendor) mapping.
-    
-    Currently, it's just a copy of the global mapping, but later changes will allow
-    it to change.
-    
-    Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
-    Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
-    Reviewed-by: Adam Jackson <ajax@redhat.com>
-    (cherry picked from commit 37a36a6b5b887d5c5a17a6931ceba8ad5d1bb6d5)
+    Clarify authorization failure reason strings sent back to the client
 
-commit 82f01ad7869e3f2be51e41a8246dab5982bbc36a
-Author: Alex Goins <agoins@nvidia.com>
-Date:   Wed Apr 10 13:48:02 2019 -0500
+commit c1703cdf3b0d6663fcac68598eefe324ae4e1e71
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Jul 23 11:54:15 2019 -0400
 
-    xsync: Add resource inside of SyncCreate, export SyncCreate
-    
-    As shown by DRI3 adding the SyncCreateFenceFromFD() function, extensions may
-    want to create a fence, then initialize it in their own way. This currently
-    can't be done without adding a function directly to Xext/sync.c due to the fact
-    that the RTFence resource type is private and there is no external interface to
-    add to it.
-    
-    To facilitate other X extensions creating fences and initializing them, this
-    change exports SyncCreate() and adds the resource directly within it. Callers no
-    longer need to call AddResource() after SyncCreate(), they only need to
-    initialize the SyncObject.
+    xfree86: Link fb statically
     
-    To prevent FreeFence() and FreeCounter() from segfaulting if the call to
-    AddResource() fails before the sync object is initialized, this adds a new
-    'initialized' parameter to SyncObject that, when FALSE, causes FreeFence() and
-    FreeCounter() to skip de-initialization and simply free the object.
-    Initialization after adding the resource shouldn't otherwise be a problem due to
-    the single-threaded nature of X.
+    There's no real benefit to leaving this loadable, virtually every driver
+    is going to load it.
     
-    Signed-off-by: Alex Goins <agoins@nvidia.com>
-    Reviewed-by: James Jones <jajones@nvidia.com>
-    Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
-    (cherry picked from commit 7f962c70b6d9c346477f23f6c15211e749110078)
+    Reviewed-by: Jon Turney <jon.turney@dronecode.org.uk>
 
-commit dfd51be3ca2a244bbca27a95310b60e0c14940df
+commit d9ec525059dbe96fc893c73c0362be2a6dd73e85
 Author: Olivier Fourdan <ofourdan@redhat.com>
 Date:   Tue Jul 23 11:01:47 2019 +0200
 
@@ -3072,9 +12239,110 @@ Date:   Tue Jul 23 11:01:47 2019 +0200
     Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
     Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
     Bugzilla: https://bugzilla.redhat.com/1729925
-    (cherry picked from commit d9ec525059dbe96fc893c73c0362be2a6dd73e85)
 
-commit df7ee10d9812897b297c67fde29f0b134ffba3ec
+commit 454b3a826edb5fc6d0fea3a9cfd1a5e8fc568747
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Mon Jul 22 13:51:06 2019 -0400
+
+    hw: Rename boolean config value field from bool to boolean
+    
+    "bool" conflicts with C++ (meh) and stdbool.h (ngh alright fine). This
+    is a driver-visible change and will likely break the build for mach64,
+    but it can be fixed by simply using xf86ReturnOptValBool like every
+    other driver.
+    
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit 074c98cf5365c3d534f7c62ad6dbdd332883b46b
+Author: Paolo Borelli <pborelli@gnome.org>
+Date:   Mon Jul 22 12:46:31 2019 +0200
+
+    Xvfb: set rotations ret value
+
+commit a9537cfdd1ed9656f4e29225af8861418b4fd682
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Sun Jul 21 14:43:24 2019 +0100
+
+    appveyor: Drop building Xorg server
+    
+    (Temporarily) drop building Xorg server (since this doesn't work after
+    a530b6e8) until we come up with a better solution. (See #692)
+
+commit 401ff618cf5bb93648c05f025dfa96b0324e94b7
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Sat Jul 6 17:58:12 2019 +0100
+
+    appveyor: Workaround a Cygwin setup bug
+    
+    Run Cygwin's setup a second time to workaround for it's defective
+    handling of obsolete packages.
+    
+    (Specifically, python3-lxml is currently obsoleted by python36-lxml, but
+    that doesn't get installed on the first run)
+
+commit 011b87a8c6e68b992ed27db4e93ae1f1e6dc508f
+Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
+Date:   Wed Oct 29 14:05:52 2014 +0000
+
+    hw/xwin: Add EWMH properties for describing multiple desktops to the root window
+    
+    mate-terminal apparently requires these to be present to work
+    
+    We just set them to describe one desktop, for the moment.
+    
+    It seems we can safely ignore the _NET_WM_DESKTOP property on child
+    windows, and any _NET_WM_DESKTOP messages, as we only support one
+    desktop for windows to be on.
+    
+    Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
+
+commit 3d493e91ab66c8f66efaded6b81c87385863b843
+Author: Colin Harrison <colin@xming.myzen.co.uk>
+Date:   Tue Aug 28 15:30:23 2018 +0100
+
+    hw/xwin: Respect -notrayicon option on taskbar restart
+
+commit a588e6f81b1d8dfb9076358e5039d3ee6628a50f
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Thu Jul 2 22:21:28 2015 +0100
+
+    hw/xwin: Rename WM_WM_MAP{2,3} to WM_WM_MAP_{UN,}MANAGED
+    
+    WM_WM_MAP was removed in 52e05b92
+    
+    Rename WM_WM_MAP2 as WM_WM_MAP_UNMANAGED (meaning an override-redirect
+    window, which manages it's own activation)
+    
+    Rename WM_WM_MAP3 as WM_WM_MAP_MANAGED (meaning a normal window, which
+    is activated when clicked)
+
+commit a47e7eb247d5c61be43d31b32887dee1dc89ba67
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Fri May 9 22:09:38 2014 +0100
+
+    hw/xwin: Log counts of pixel formats which couldn't be used
+    
+    Log a count of pixel formats which couldn't be used for various reasons
+
+commit 82225aab81d581e943c67c679695a1d15757d69d
+Author: Ignacio Casal Quinteiro <qignacio@amazon.com>
+Date:   Wed Jul 17 14:45:46 2019 +0200
+
+    vfb: set gamma size to avoid xrandr to complain about it missing
+
+commit 492639f5e167b12ef81c4e4fa0e6a2749cbfe3a0
+Author: Ignacio Casal Quinteiro <qignacio@amazon.com>
+Date:   Wed Jul 17 14:39:29 2019 +0200
+
+    vfb: factor out method to free a single screen info
+
+commit 356ffd6729861bc9d0cd059fd8a99d7135fe50dd
+Author: Ignacio Casal Quinteiro <qignacio@amazon.com>
+Date:   Wed Jul 17 14:18:47 2019 +0200
+
+    vfb: no need for else if we are returning
+
+commit d0850241c6218f61127c45c2f95d6e791c3fea44
 Author: Adam Jackson <ajax@redhat.com>
 Date:   Mon Jul 15 11:38:44 2019 -0400
 
@@ -3087,9 +12355,22 @@ Date:   Mon Jul 15 11:38:44 2019 -0400
     
     Fixes: xorg/xserver#850
     Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
-    (cherry picked from commit d0850241c6218f61127c45c2f95d6e791c3fea44)
 
-commit 44c693f45d6abd6f7f3bd2f756d35811db143af7
+commit fe4cd0e7f5c58fa94db36326aadc1bd4e6d73eba
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Mon Jul 1 13:20:39 2019 +0200
+
+    compiler.h: Do not include sys/io.h on ARM with glibc
+    
+    <sys/io.h> on ARM hasn't worked for a long, long time, so it was removed
+    it from glibc upstream.
+    
+    Remove the include to avoid a compilation failure on ARM with glibc.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/840
+
+commit ce9455b5ee389b100a9b7da76b79690d97211b7a
 Author: Olivier Fourdan <ofourdan@redhat.com>
 Date:   Fri Jun 28 16:55:11 2019 +0200
 
@@ -3104,9 +12385,20 @@ Date:   Fri Jun 28 16:55:11 2019 +0200
     Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
     Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/834
     Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
-    (cherry picked from commit ce9455b5ee389b100a9b7da76b79690d97211b7a)
 
-commit 1804e7327113d128ac9a759da55fd3de0b9f8c35
+commit a530b6e8923f2b9153a773c8618a1e2f41619288
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Apr 30 18:01:27 2019 -0400
+
+    meson: Fix libshadow.so linkage
+    
+    Don't link against fb, it's the driver's responsibility to load that
+    first. Underlinking like this is unpleasant but this matches what
+    autotools does.
+    
+    Fixes: xorg/xserver#540
+
+commit a8d9ebeb43583e8d8ef182ac15adbdce256d4867
 Author: Matt Roper <matthew.d.roper@intel.com>
 Date:   Wed Jun 26 09:34:46 2019 -0700
 
@@ -3120,26 +12412,8 @@ Date:   Wed Jun 26 09:34:46 2019 -0700
     PCI-IDs").
     
     Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
-    (cherry picked from commit a8d9ebeb43583e8d8ef182ac15adbdce256d4867)
-
-commit 98e3db2ac43d4a3f13475cb160c8ce0155ac7d61
-Author: Marco Trevisan (Treviño) <mail@3v1n0.net>
-Date:   Fri Oct 26 19:52:49 2018 +0200
-
-    Xi: Use current device active grab to deliver touch events if any
-    
-    When Retrieving touch delivery data we need to check if we have an active
-    grab on such device, and in that case use it to delivery events.
-    If we don't do this, when rejecting the touch events in DeactivatePointerGrab,
-    we will end-up in creating an implicit grab that will change the device
-    deviceGrab's state, causing a recursion during TouchEndTouch.
-    
-    Fixes #7
-    
-    https://bugs.freedesktop.org/show_bug.cgi?id=96536
-    (cherry picked from commit 35e5a76cc1d02801fadd49d12e60664b02e4bebc)
 
-commit 26b6ba5347953ed5f60b7fb9454b45754b145c6f
+commit 2f0dd1816d556eef8c4b691330d39f13e1ed93f0
 Author: Michel Dänzer <michel.daenzer@amd.com>
 Date:   Wed Jul 3 11:53:56 2019 +0200
 
@@ -3151,10 +12425,322 @@ Date:   Wed Jul 3 11:53:56 2019 +0200
     and drivers are already checking for cases that really cannot work.
     
     Fixes issue #839.
+
+commit fabc4219622f3c0b41b1cb897c46e092377059e3
+Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
+Date:   Mon Jul 1 02:33:26 2019 +0200
+
+    Fix crash on XkbSetMap
+    
+    Since group_info and width are used for the key actions allocations,
+    when modifying them we need to take care of reallocation key actions if
+    needed.
+
+commit 8469bfead9515ab3644f1769a1ff51466ba8ffee
+Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
+Date:   Mon Jul 1 02:31:02 2019 +0200
+
+    Fix crash on XkbSetMap
+    
+    Some devices may not have keyboard information.
+    
+    Fixes #574
+
+commit ff6b771eeea763c19d057e8741a2cadb37db9b68
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Thu Mar 8 14:25:54 2018 +0000
+
+    hw/xwin: Improve data returned for RANDR queries
+    
+    Set a linear gamma ramp.  This avoids the xrandr command always warning
+    'Failed to get size of gamma for output default'
+    (perhaps we should be using GDI GetDeviceGammaRamp(), if possible?)
+    
+    Make CRTC report non-zero physical dimensions initially
+
+commit 2549ab2065ad293139d4e82e5d5a5ea13f7257c9
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Fri Mar 9 14:16:01 2018 +0000
+
+    hw/xwin: Always keep RANDR fake mode information up to date
+    
+    The rrGetInfo hook is not called for all RANDR requests (e.g.
+    RRGetOutputInfo), so we must always keep the fake mode information up to
+    date, rather than doing it lazily in the rrGetInfo hook)
+    
+    Because we are so bad, most GTK+3 versions treat the output name 'default'
+    specially, and don't try to use RANDR with it.  But versions 3.21.6 to
+    3.22.24, don't do this, and get badly confused by a CRTC with size 0x0.
+    
+    See:
+    https://bugzilla.gnome.org/show_bug.cgi?id=771033
+    https://bugzilla.gnome.org/show_bug.cgi?id=780101
+    
+    Future work: Rather than reporting a single fake CRTC with a mode matching
+    the entire virtual display, the fake CRTCs we report should match our
+    'pseudo-xinerama' monitors
+
+commit b078e03410f5f2a004ab9732eb6e5ed24da3edcf
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Wed Apr 19 14:50:38 2017 +0100
+
+    hw/xwin: Make QueryMonitor() slightly less insane
+    
+    Make QueryMonitor() slightly less insane, making it return TRUE if the
+    specified monitor exists, rather than always returning TRUE (which we
+    are uselessly checking, and then also checking if the specified monitor
+    exists)
+    
+    (Note that EnumDisplayMonitors() doesn't seem to have meaningful way to
+    return errors, see 5940580f)
+    
+    Also: Spamming the long UseMsg() after "Invalid monitor number" isn't very
+    helpful.
+    
+    Also: If we are exiting in ddxProcessArgument() due to an error in
+    options, use a non-zero exit status.
+
+commit 8f7e4b56d2e0abd09526c7d0eeee15bfb754e557
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Sun Oct 8 22:17:40 2017 +0100
+
+    hw/xwin: Fix transposed RaiseVolume and LowerVolume scan codes
+
+commit bfcaaecc552c7a3d85f6309b8079eb8e6fda8779
+Author: Colin Harrison <colin@xming.myzen.co.uk>
+Date:   Sat Jun 30 13:43:11 2018 +0100
+
+    hw/xwin: Add the Belgian (Comma) keyboard layout
+
+commit 188f461463fcc60432f9d7a76ad69ec97631db5d
+Author: Colin Harrison <colin@xming.myzen.co.uk>
+Date:   Thu Feb 22 13:18:42 2018 +0000
+
+    hw/xwin: Add Russian keyboard layout
+
+commit e39dc0f5b7c88c9ba670383658846a1f658cbc47
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Thu Jun 20 12:15:31 2019 -0400
+
+    present: Require presentproto 1.2
+    
+    The PresentOptionSuboptimal support code is not optional (once you've
+    enabled building Present at all), so require a protocol package version
+    that defines what we need.
+    
+    Fixes: xorg/xserver#821
+
+commit 9acff309434a8029bcce1b22530043459bb71791
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Wed Jun 19 14:23:56 2019 -0400
+
+    linux: Fix platform device PCI detection for complex bus topologies
+    
+    Suppose you're in a Hyper-V guest and are trying to use PCI passthrough.
+    The ID_PATH that udev will construct for that looks something like
+    "acpi-VMBUS:00-pci-b8c8:00:00.0", and obviously looking for "pci-" in
+    the first four characters of that is going to not work.
+    
+    Instead, strstr. I suppose it's possible you could have _multiple_ PCI
+    buses in the path, in which case you'd want strrstr, if that were a
+    thing.
+
+commit b3f3d65ed302baf78befe45eed458e666e1ff143
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Wed Jun 19 09:19:24 2019 +0200
+
+    xwayland: Add "-listenfd" option
+    
+    Using the existing command line option "-listen" for passing file
+    descriptors between the Wayland compositor and Xwayland is misleading,
+    Xwayland should add is own command line option for that specific use.
+    
+    As XWayland is spawned by the Wayland compositor, we cannot just change
+    the option, as that would break all existing Wayland compositors using
+    Xwayland, so we add a new options "-listenfd" and mark the previous one
+    as deprecated and log a warning, but it still works for backward
+    compatibility.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    https://gitlab.freedesktop.org/xorg/xserver/merge_requests/214
+
+commit 4a287cc2b6d849c29b43af07d93fa0048d8d6e90
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Tue Jun 18 10:41:02 2019 +0200
+
+    xwayland: Allow for regular transport types for listen
+    
+    Xwayland uses the command line option “-listen” to pass file descriptors
+    from the Wayland compositor.
+    
+    That breaks the traditional, documented behavior of the “-listen”
+    command line option which is to enable a transport type.
+    
+    Checks if the given option starts with a digit, otherwise treat it as a
+    regular transport type.
+    
+    Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/817
+    Suggested-by: Rodrigo Exterckötter Tjäder
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+
+commit 0dc0cef4959dfb16d8334f235150733e634e2ba9
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Jun 18 14:52:04 2019 -0400
+
+    xwayland-glx: Fix GLX visual mask setup
+    
+    a2rgb10 configs would end up with channel masks corresponding to
+    argb8888. This would confuse the GLX core code into matching an a2rgb10
+    config to the root window visual, and that would make things look wrong
+    and bad.
+    
+    Fix this by handling more cases. We're still not fully general here, and
+    this could still be wrong on big-endian. The XXX comment about doing
+    something less ugly still applies, ideally we would get this information
+    out of EGL instead of making lucky guesses. Still, better than it was.
+    
+    Fixes: xorg/xserver#824
+
+commit 2afee831a439add6cca5b7fa8c76a9de4326b2b7
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Thu Jan 5 13:17:59 2017 +0000
+
+    hw/xwin: Add an option to use alpha channel in multiwindow mode
+    
+    Add an option to turn on the use of the X window's alpha channel in
+    multiwindow mode, i.e. this uses the X window's alpha channel for
+    compositing into the native desktop.
+    
+    This works on W7/Vista (using DwmEnableBlurBehindWindow()), and Windows
+    10 (using the undocumented SetWindowCompositionAttribute()), but not on
+    Windows 8/8.1
+    
+    -compositewm must be enabled for this to be useful, as we only have a
+    pixmap with an alpha channel for the X window in that case.  The
+    framebuffer/root window doesn't have one (unless perhaps you are using
+    the rootless extension, maybe...).
+    
+    v2:
+    Update meson.build
+    
+    Future work:
+    
+    A window property to control use of alpha?
+    Option to turn off blur on W7/Vista
+    Implement _NET_WM_WINDOW_OPACITY
+
+commit 2e1bc743734cc1e1043c8f2c9497a5a172507bc9
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Tue Dec 1 19:33:38 2015 +0000
+
+    hw/xwin: Set convenience variables for WM_CREATE as well
+    
+    Set convenience variables in winTopLevelWindowProc() for WM_CREATE as
+    well.
+
+commit f67918353a14dad8aa75c965e036d106e7d2d1a4
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Sat Nov 7 19:44:09 2015 +0000
+
+    hw/xwin: Improve performance of -compositewm
+    
+    I think that a major cost in the current implementation is doing a
+    CreateDIBSection()/DestroyObject() on every refresh.  So provide our own
+    CreatePixmap() instead, which does the CreateDIBSection(), once.
+    
+    Testcase: glxgears or foobillard with direct swrast
+    Testcase: scrolling in a full-screen xterm
+    
+    v2:
+    Fix handling of RENDER Scratch Pixmaps
+    (A problem easily shown with gitk or emacs)
+    
+    v3:
+    Note that we don't own screen pixmap to release in DestroyPixmap
+    Log if unimplemented slow-path ever gets hit
+
+commit 6865fe71477206d989f982235fc32be4ff164ccd
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Mon Aug 10 20:16:16 2015 +0100
+
+    hw/xwin: Avoid artefacts when resizing a window
+    
+    Fill the area outside the current window size with black, rather than
+    leaking framebuffer contents or leaving it undrawn.
+
+commit ebcea16e71cd9c037351f2dc4527ca696346c8a6
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Mon Aug 3 16:47:38 2015 +0100
+
+    hw/xwin: A simpleminded attempt at composition
+    
+    Rather than drawing the window contents from the shadow framebuffer, use
+    Composite extension redirection to cause the server to maintain a bitmap
+    image of each top-level X window, and draw the window contents from
+    that, so that window contents which are occluded in the framebuffer show
+    correctly in the task bar and task switcher previews.
+    
+    v2:
+    Fix incorrect use of memset() found by gcc5
+    
+    hw/xwin/winshadgdi.c: In function ‘winBltExposedWindowRegionShadowGDI’:
+    hw/xwin/winshadgdi.c:861:9: warning: ‘memset’ used with constant zero length parameter; this could be due to transposed parameters [-Wmemset-transposed-args]
+    
+    v3:
+    Turn on -compositewm by default
+    
+    v4:
+    Ignore -swcursor if -compositewm
+    
+    -swcursor is not compatible with -compositewm (because the window
+    contents are drawn from an off-screen pixmap, not from the screen
+    pixmap, where the software cursor will be drawn).
+    
+    v5:
+    Update meson.build also
+    Add -compositewm option to help output
+    Update CI to install prerequisites
+
+commit adebc376b9fbda53d234a27f11eea9a0b945b50e
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Mon Aug 3 15:59:40 2015 +0100
+
+    hw/xwin: Push multiwindow wndproc WM_PAINT down into drawing engine
+    
+    Push the multiwindow wndproc WM_PAINT handling down into the drawing
+    engine.  Only the GDI engine is supported in multiwindow mode currently,
+    so we only need to do this in the GDI engine.
+
+commit 065f73353bfa5667e0fb4f42e338978b40e86652
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Mon Aug 3 11:39:36 2015 +0100
+
+    hw/xwin: Align winBltExposedRegionsShadowGDI with winTopLevelWindowProc's WM_PAINT
     
-    (cherry picked from commit 2f0dd1816d556eef8c4b691330d39f13e1ed93f0)
+    Make winBltExposedRegionsShadowGDI() do the same stuff that
+    winTopLevelWindowProc()'s WM_PAINT handler does.
+    
+    Note that winBltExposedRegionsShadowGDI() is currently used 1) in
+    windowed mode when the GDI engine is selected, and 2) in multiwindow
+    mode when "Hide Root Window" is off.
+
+commit f4cdbf640b6440df4af784ca35e1b1340965cc10
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Wed May 29 16:19:55 2019 +1000
+
+    Xi: return AlreadyGrabbed for key grabs > 255
+    
+    We can't have high keycodes because everything in XKB relies on 8 bits. XI2's
+    API allows for 32-bit keycodes so we have to take those but nothing in the
+    server is really ready for this. The effect of this right now is that any high
+    keycode grab is clipped to 255 and thus ends up grabbing a different key
+    instead.
+    
+    https://bugzilla.redhat.com/show_bug.cgi?id=1697804
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
 
-commit c86222d4bd94892f3bf3c5947c19793ca18bd9e2
+commit dea4a74621294391ce5901bb3339e1b8e7151efc
 Author: Carlos Garnacho <carlosg@gnome.org>
 Date:   Wed May 22 17:51:04 2019 +0200
 
@@ -3171,9 +12757,8 @@ Date:   Wed May 22 17:51:04 2019 +0200
     with xwl_seat_set_cursor() for pointers.
     
     Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
-    (cherry picked from commit dea4a74621294391ce5901bb3339e1b8e7151efc)
 
-commit 6e199e4613e149cd5d5ce69cdd6a259744b6cb44
+commit 26fe29f4fa53cbb7d51892e2cf397c084093812f
 Author: Olivier Fourdan <ofourdan@redhat.com>
 Date:   Fri Apr 26 13:37:09 2019 +0200
 
@@ -3196,9 +12781,30 @@ Date:   Fri Apr 26 13:37:09 2019 +0200
     Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/68
     Fixes: 86b2d8740a "glamor: Reallocate pixmap storage without modifiers
            if necessary"
-    (cherry picked from commit 26fe29f4fa53cbb7d51892e2cf397c084093812f)
 
-commit 34ad57e570f96dfe4bc493f14726b7a0ae6d45f9
+commit 48f4ab750955106cd650bb5d3fb1c44d7696aafa
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Tue Mar 12 17:25:41 2019 +0100
+
+    xwayland: check `glamor_set_pixmap_texture()` status
+    
+    With `glamor_set_pixmap_texture()` returning its status, remove the hack
+    and use the return value.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+
+commit 9e37e41fa78a33b95fd78e92b74b961086ab712b
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Tue Mar 12 17:15:10 2019 +0100
+
+    glamor: return status from `glamor_set_pixmap_texture()`
+    
+    Chnage the API for `glamor_set_pixmap_texture()` to return a status,
+    so that the caller can know whether it succeeded or not.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+
+commit fc6380a11be4c6202ed72f241dd9ee8c7c24671d
 Author: Olivier Fourdan <ofourdan@redhat.com>
 Date:   Tue Mar 12 15:38:03 2019 +0100
 
@@ -3254,9 +12860,53 @@ Date:   Tue Mar 12 15:38:03 2019 +0100
     
     Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
     Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/661
-    (cherry picked from commit fc6380a11be4c6202ed72f241dd9ee8c7c24671d)
 
-commit 6711b5c6fdf0581c77150306fff909d7bc63b8a4
+commit 766bf01b21306ec6bcf5ca884c0af15bdcde25f6
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Thu May 16 15:48:14 2019 -0400
+
+    glamor: Fix more fallback paths with non-GXcopy rop with GLES
+    
+    Desktop GL can handle arbitrary rops here, GLES can't. The switch
+    statement attempts to optimize some cases that GLES can still handle if
+    we precompute the right pixel value, but we were then throwing that
+    pixel value away and using gc->fgPixel anyway. Fix this, and now
+    xts-render passes against glamor+gles.
+
+commit 8469241592b94b002a975274a596ca0dcdd9563f
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Wed May 8 14:09:00 2019 -0400
+
+    xwayland: Add EGL-backed GLX provider
+    
+    Without this we're using driswrast to set up GLX visuals. This is
+    unfortunate because llvmpipe does not expose multisample configs, so
+    various apps that expect them will fail. With this we just query the
+    capabilities of the EGL that's backing glamor, and reflect that to the
+    GLX clients. This also paves the way for xserver to stop being a DRI
+    driver loader, which is nice.
+    
+    Fixes: xorg/xserver#640
+    Fixes: xorg/xserver#643
+    Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=98272
+    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit b4231d69028adc8123801a7552b40a15ea928d1b
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date:   Tue May 21 10:50:42 2019 -0700
+
+    GLX: Set GlxServerExports::{major,minor}Version
+    
+    Commit 56c0a71fdd94a008e5d746261f70a713c4767f93 incremented the
+    GLXSERVER_VENDOR_ABI_MINOR_VERSION define, but this define was not actually
+    being used to set glxServer.minorVersion.
+    
+    Update the initializer for glxServer to use the correct version numbers.
+    
+    Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
+
+commit 0a07446318f248b65fcbc8ab8a73ead51153f09e
 Author: Olivier Fourdan <ofourdan@redhat.com>
 Date:   Thu May 9 10:36:19 2019 +0200
 
@@ -3290,17 +12940,749 @@ Date:   Thu May 9 10:36:19 2019 +0200
     
     Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
     Bugzilla: https://bugzilla.redhat.com/1708119
-    (cherry picked from commit 0a07446318f248b65fcbc8ab8a73ead51153f09e)
 
-commit fbbdd5613122f0f7d74471f240c28e4c3b796065
+commit 965eda947d4c847c6e520317b57024b4586507ec
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Thu Apr 25 23:11:08 2019 +0100
+
+    mi: Provide ffs when compiling using MinGW
+    
+    I don't know how I feel about the promise made in 2e7f790b :)
+
+commit a838c840a3f8c55157615f072b9a3c3a4b476b37
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Thu Apr 25 22:44:49 2019 +0100
+
+    os: Ensure sigset_t is provided when compiling for MinGW
+    
+    Only _sigset_t is defined by MinGW's signal.h
+
+commit 7b4b030df8f9c994f3dc60cf85e74d234464af28
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Thu Jul 28 14:46:15 2016 +0100
+
+    configure: Check for sigprocmask
+    
+    MinGW defines SIG_BLOCK, but doesn't have signal masks, so rather than
+    checking for SIG_BLOCK, add a configure check for sigprocmask.
+    
+    v2:
+    Also add check to meson.build
+
+commit 6c5d048095379a85f1862429b9049edc1c82e167
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Thu Jul 28 14:09:51 2016 +0100
+
+    os: Fix build of xserver_poll.c on MinGW
+    
+    Include winsock.h for definition of fd_set type and select()
+    
+    Future work: Maybe this also needs some error checking for fd > FD_SETSIZE?
+
+commit 246b729df87e94e405a8b257f34a22fa2719d30c
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Thu Jul 28 14:26:38 2016 +0100
+
+    configure: Force --disable-input-thread for MinGW
+    
+    I don't think an input thread can ever be useful on Windows.
+    
+    There is a pthread emulation, so having the thread itself isn't much of
+    a problem.
+    
+    However, there is no device to wait on for Windows events, and even if
+    we were to replace select() with WFMO, Windows wants to send events for
+    a window to the thread which created that window.
+    
+    So, disable input thread by default for MinGW
+    
+    v2:
+    Also add similar to meson.build
+
+commit 29a8baa031a87ef44d1e5320ecec5015d26fd385
+Merge: 2aec5c3c81 56c0a71fdd
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date:   Fri May 17 08:39:50 2019 -0700
+
+    Merge commit 'refs/merge-requests/194/head' of gitlab.freedesktop.org:xorg/xserver
+
+commit 56c0a71fdd94a008e5d746261f70a713c4767f93
+Author: Kyle Brenneman <kbrenneman@nvidia.com>
+Date:   Thu May 2 07:17:21 2019 -0600
+
+    GLX: Add a function to change a clients vendor list.
+    
+    Add a new function, GlxServerExports::setClientScreenVendor, which will change
+    the vendor that handles GLX requests for a screen, but only for requests from
+    a specific client.
+    
+    v2: Increment the GLXVND minor version number.
+    v3: Note the GLXVND version requirement for setClientScreenVendor.
+    
+    Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
+    Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit 8b67ec7cc6fda243480a5a8ca118b66242f3eb2c
+Author: Kyle Brenneman <kbrenneman@nvidia.com>
+Date:   Wed May 8 08:44:54 2019 -0600
+
+    GLX: Use the sending client for looking up XID's
+    
+    When GlxGetXIDMap looks up an unknown XID, it will now look up a vendor based
+    on the screen number for the XID and the client that sent the current request.
+    
+    In GlxGetXIDMap, if the XID is for a regular X window, then it won't be in the
+    (XID -> vendor) mapping, so we have to look up a vendor by screen number.
+    
+    With this change, GlxGetXIDMap will use the (screen -> vendor) map for
+    whichever client sent the current request, instead of using the global
+    (screen -> vendor) map.
+    
+    Since GlxGetXIDMap doesn't take a ClientPtr argument, GlxDispatchRequest will
+    store the client for the current request in a global variable. That way, the
+    ABI for GLXVND doesn't need to change.
+    
+    v2: Fix an error check in GlxDispatchRequest.
+    
+    Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
+    Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit 37a36a6b5b887d5c5a17a6931ceba8ad5d1bb6d5
+Author: Kyle Brenneman <kbrenneman@nvidia.com>
+Date:   Thu Oct 19 15:14:51 2017 -0600
+
+    GLX: Add a per-client vendor mapping.
+    
+    Each client now has its own (screen, vendor) mapping.
+    
+    Currently, it's just a copy of the global mapping, but later changes will allow
+    it to change.
+    
+    Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
+    Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit 2aec5c3c812ffe4a85b5e62452b244819a812dd6
 Author: Adam Jackson <ajax@redhat.com>
-Date:   Thu May 30 14:07:06 2019 -0400
+Date:   Tue May 14 12:39:23 2019 -0400
 
-    xserver 1.20.5
+    glx: Fix potential crashes in glXWait{GL,X}
     
-    Signed-off-by: Adam Jackson <ajax@redhat.com>
+    glxc->drawPriv will be NULL if the context is direct, or if it is
+    current but without a bound drawable. Mesa's libGL won't normally emit
+    protocol for direct contexts for these calls, but a malign client could
+    still crash the server.
+
+commit a0f738a67327ca1315bacdf543c28cc3046989dc
+Author: brian <bphaslett@users.noreply.github.com>
+Date:   Thu May 2 16:25:50 2019 -0500
+
+    Fixed ioperm calls in hwEnableIO
+
+commit bb46e785405891775a30636a647e40a7dc4d1ca7
+Author: Topi Miettinen <toiwoton@gmail.com>
+Date:   Wed May 1 18:07:03 2019 +0300
+
+    os: add support for systemd notification
+    
+    It can take some time for Xorg to start. If Xorg runs as a systemd
+    service and other services are based on it, they have no way to
+    determine when Xorg is really ready to accept requests. Let's use
+    sd_notify() provided by libsystemd to signal systemd for readiness.
+    If Xorg has not been started as a systemd service, this won't do
+    anything.
+    
+    Signed-off-by: Topi Miettinen <toiwoton@gmail.com>
+
+commit 9d25408a59d6273f1c4c994de9cc53f488a8ec3c
+Author: Adam Richter <adamrichter4@gmail.com>
+Date:   Thu May 2 15:02:36 2019 -0700
+
+    assert(a && b) --> assert(a); assert(b)
+    
+    Separate each statement of the form "assert(a && b);" into "assert(a);"
+    and "assert(b);" for more precise diagnostics, except for this clever
+    use in drmmode_display.c where it was used to pass a hint to developers:
+    
+            assert(num_infos <= 32 && "update return type");
+
+commit dd1aebccf2e1722ac10fb73ed438251785283b8d
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Sat Apr 20 13:50:57 2019 +0100
+
+    travis: Suppress uninteresting warnings on OSX
+    
+    Suppress uninteresting warnings on OSX that we are drowning in, turned
+    on by default in meson.
+
+commit f0e22a76c93c98d67dbd5c966812b2901de5ed49
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Fri Apr 19 15:37:22 2019 +0100
+
+    travis: Add OSX meson build to matrix
+    
+    Unfortunately, a 'brew update' is currently needed to get the meson >=
+    0.46.0 required by xserver.
+
+commit 0bdfa5bc0ab050ce74c2289178f2f89790e2c8ef
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Sat Apr 20 01:24:21 2019 +0100
+
+    travis: Don't produce fat binaries on OSX
+    
+    Trying to build fat binaries for multiple arches tickles a bug [1] in
+    the framework detector in meson 0.50.  Workaround this by not bothering
+    building for x86, which is probably no great loss :S
+    
+    https://github.com/mesonbuild/meson/issues/5290
+
+commit 655b1eb32e3f7f9ba587e878a691fbc9195e81f5
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Thu Apr 18 17:06:41 2019 +0100
+
+    meson: Convert xquartz from autotools
+    
+    Differences from autotools:
+    
+    * Autotools defined NO_ALLOCA for OSX builds.  I don't think we need
+    this anymore as Xalloc.h is no longer used anywhere in the xserver.
+    
+    * X11.bin is linked with -u,miDCInitialize, and then libserver_mi
+    provided to satisfy (just) that.  It's been that way since the commit
+    which added it.  We can't write the equivalent in meson due to linker
+    argument ordering issues, but do we really need to?
+    
+    * An explicit -Dsecure-rpc=false is required for OSX, since in meson we
+    don't do the checks that XTRANS_SECURE_RPC_FLAGS did for the existence
+    of the specific RPC functions required.
+
+commit e5f4c7c80b3f15b1941c530e58fbded0fd06a97e
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Fri Apr 19 14:03:58 2019 +0100
+
+    xquartz: Fix a typo in man page substitution
+    
+    The typo fixed in d69460159 was still present for this setting when
+    added in ac439842.
+    
+    meson warns that there is no substitution with this name.
+
+commit ecf62b7ba6e7eba1a3f3a50d46eaf9f4f11550c4
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Fri Apr 19 14:01:48 2019 +0100
+
+    meson: Build rootless extension
+
+commit b4ed20c4f118031305f6ce76dda4e325950b2958
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Sat Apr 20 12:45:11 2019 +0100
+
+    Promote file containing date & time build was configured to top-level
+    
+    Promote the generated file containing the date & time build was
+    configured to top-level.
+    
+    Rename it from xf86Build.h to buildDateTIme.h.
+    
+    Use it as well in XQuartz, stringize BUILD_DATE when needed.
+
+commit 71cff63c06a6b494dc8921270535f33fb78bd32b
+Author: Adam Richter <adamrichter4@gmail.com>
+Date:   Wed May 1 15:22:15 2019 -0700
+
+    hw/dmx/glxProxy/glxcmds.c CreateContext(): free glxc->real_ids and glxc in a couple of error branches, per complaints from cppcheck.
+
+commit b6eb8cf03f5850d13ec21101ec1783a444aefcab
+Author: Adam Richter <adamrichter4@gmail.com>
+Date:   Wed May 1 15:22:02 2019 -0700
+
+    hw/xfree86/os-support/linux/lnx_agp.c xf86GetAGPInfo(): free(info) in an error path, caught by cppcheck.
+
+commit 99904a3a7b10f8a8314e7ab6b8c4af41cb445693
+Author: Adam Richter <adamrichter4@gmail.com>
+Date:   Wed May 1 15:21:48 2019 -0700
+
+    hw/xwin/glx/indirect.c glxWinScreenProbe(): Add free(screen) that was missing from an error path.  Caught by cppcheck.
+
+commit 007d812a832cf32b02542bbae13a3997e655171a
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Apr 30 13:40:43 2019 -0400
+
+    glx: Fix GLX_CONTEXT_RELEASE_BEHAVIOR_ARB handling
+    
+    None of this was getting compiled because we hadn't defined the macro
+    (and aren't getting them from <GL/glxext.h> because reasons). Fix that.
+    
+    Fixes: xorg/xserver#684
+
+commit a2302de6feb43dd10b159661d5fe7d2036c6c020
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Thu Oct 13 14:20:14 2016 +0100
+
+    hw/xwin: Remove mwextwm mode
+    
+    This has always been described as 'experimental'
+    
+    We don't think this has any users: This mode has been disabled in Cygwin
+    packages since March 2016. We've never provided the xwinwm WM for x86_64
+    Cygwin. No one has even asked where the option has gone.
+    
+    This leaves XQuartz as the only user of the rootless extension.
+    
+    Remove --enable-windowswm configure option
+    Remove multiwindowextwm stuff from Makefiles
+    Remove -mwextwm option
+    Remove -mwextwm from man-page and help
+    Un-ifdef XWIN_MULTIWINDOWEXTWM
+    
+    v2:
+    Remove rootless include paths
+    Remove windowswmproto from meson.build
+
+commit 504468d2cf56c6588342249c4625a0bfadf0751d
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Fri Apr 26 19:46:05 2019 +0100
+
+    meson: Don't use strndup() unless it's prototyped
+    
+    A workaround for https://github.com/mesonbuild/meson/issues/3672
+    
+    MinGW-w64 gcc has a built-in strndup, but it's not in the C library and
+    MinGW-w64 headers don't prototype it.
+    
+    Don't try to use it, as that will cause an undefined reference if gcc
+    decides that an out-of-line call is appropriate.
+
+commit d3a528c91ec77b29d4d70091f5eb6939919a19ab
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Thu Apr 25 23:21:46 2019 +0100
+
+    Remove unneeded include of dix.h from strcasestr.c
+    
+    In the meson build, functions to make up for the shortcomings of libc
+    are compiled into a separate library. We don't bother making the pixman
+    headers available (reasonably enough) to this compilation, but they are
+    required indirectly by dix.h.  Just remove this unneeded include.
+
+commit fd52110ec44b97359c2d75bb54047e6de10ed856
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Fri Apr 26 01:09:25 2019 +0100
+
+    meson: Don't try to build tests on Windows
+    
+    Most of these could be made to work, but would need to be ported off
+    using fork and poll...
+
+commit 50b8670fdf7ab9195617145c229d8fae8519f5a9
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Fri Apr 26 01:00:28 2019 +0100
+
+    meson: Require clock_gettime() as well for MONOTONIC_CLOCK
+    
+    As configure.ac, require that clock_gettime() exists as well to use
+    MONOTONIC_CLOCK (MinGW provides the define, but not the function)
+
+commit 92a52611f6ee2777cb11d5125c04a983b9a662d1
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Fri Apr 26 00:46:09 2019 +0100
+
+    meson: Link with ws2_32 for socket functions on Windows
+
+commit d21224cd150e28c2868c8d194e68fe4474cdce1b
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Fri Apr 26 00:32:29 2019 +0100
+
+    meson: Don't set UNIXCONN on Windows
+    
+    As XTRANS_CONNECTION_FLAGS did, don't try to build unix socket support
+    on Windows.
+
+commit 93a1cdcc78bc909e25a224b76ae8f6a90322d0ba
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Thu Apr 25 14:53:38 2019 +0100
+
+    meson: Fix hw/xwin for -Dglx=false
+    
+    hw/xwin/meson.build:140:0: ERROR:  Unknown variable "xwin_windowsdri".
+    hw/xwin/meson.build:141:0: ERROR:  Unknown variable "xwin_glx".
+
+commit 331850ce6f0c48a1cfc489da2a27ca0220997a2f
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Thu Apr 25 14:39:58 2019 +0100
+
+    meson: Fix value of libglxvnd in -Dglx=false build
+    
+    hw/vfb/meson.build:7:0: ERROR:  '' is not a target.
+
+commit c2feeca1b008fb01b2128daef2dc361dfb193a41
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Sun Apr 28 21:56:20 2019 +0100
+
+    meson: Absence of dri.pc is an error if building with GLX
+    
+    Currently, this can error if dri.pc isn't found, as we can't then get
+    the value of pkgconfig variable from it:
+    
+    include/meson.build:199:10: ERROR:  'dri' is not a pkgconfig dependency
+    
+    I think we need DRI_DRIVER_PATH (only) when building GLX, even if dri2/3
+    isn't enabled, so we know where to load swrast_dri.so from.
+    
+    (For autotools, configure.ac directly calls `pkg-config
+    --variable=dridriverdir dri`, the backticks swallowing any error,
+    causing the value of this define to be empty if dri.pc isn't present)
+
+commit 1f5742d27187fabba0c556b50ebfcd9fddfdcf2b
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Mon Dec 17 12:01:59 2018 +0000
+
+    meson: Fix building unit tests when protocol headers aren't in default include path
+
+commit f013979507da96377fad0e58b0699d9de051bb39
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Thu Apr 18 11:37:32 2019 +0100
+
+    xquartz: Add stub ddxInputThread()
+    
+    Omitted from 4ad21c32
+
+commit 836f93de99b35050d78d61d3654f7c5655184144
+Author: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date:   Fri Apr 19 10:19:50 2019 +0200
+
+    hw/xwayland/Makefile.am: fix build without glx
+    
+    Commit d8ec33fe0542141aed1d9016d2ecaf52da944b4b added libglxvnd.la to
+    Xwayland_LDFLAGS but GLX can be disabled through --disable-glx.
+    In this case, build fails on:
+    
+    make[3]: *** No rule to make target '../../glx/libglxvnd.la', needed by 'Xwayland'.  Stop.
+    make[3]: *** Waiting for unfinished jobs....
+    
+    Fixes:
+     - http://autobuild.buildroot.org/results/397f8098c57fc6c88aa12dc8d35ebb1b933d52ef
+    
+    Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+
+commit 0854732d55a76cdb584306e8e653c2bcd292a7cb
+Author: Diego Viola <diego.viola@gmail.com>
+Date:   Fri Apr 19 22:13:46 2019 -0300
+
+    ephyr: fix typo: rquires -> requires
+    
+    Signed-off-by: Diego Viola <diego.viola@gmail.com>
+
+commit 9c7ebf259f49f5e63906f572a1101747ac023b72
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Sun Sep 17 14:55:04 2017 +0100
+
+    appveyor: Use ccache
+    
+    Reduces i686 cygwin no-change build time from ~7 minutes to ~2.5 minutes
+
+commit 16d851375994332844fd434ed91fc6c0c24f8983
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Thu Apr 18 12:44:40 2019 +0100
+
+    appveyor: Drop cleaning of packaged libtool .la files
+    
+    Not needed as meson doesn't use libtool.  I think they've all been
+    rebuilt now, in any case...
+
+commit f3e6002d79aa51633ef06e34c2b13553ae008218
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Thu Apr 18 12:01:54 2019 +0100
+
+    appveyor: Drop trying to preserve build artefacts
+    
+    We stopped staging them in 1519475a, so this did nothing.
+
+commit 883530835d463124fcc9bc6143ef139819f6c981
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Thu Apr 18 12:07:34 2019 +0100
+
+    appveyor: Drop installing unnecessary packages
+    
+    Drop installing packages which were used by the autotools build (or
+    maybe even monolithic build!) but are no longer required by the meson
+    build
+    
+    Also, alphabetically sort within tools, protocol headers, devel
+    libraries, miscellaneous groups to match [1]
+    
+    [1] https://x.cygwin.com/docs/cg/prog-build-prerequisites.html
+    
+    Also, update to require xkbcomp-devel, split from xkbcomp
+
+commit 6370cf026ae0d752b0f28d4a25fd22c60fea26f0
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Wed Aug 8 17:29:55 2018 +0100
+
+    appveyor: Reformat an absurdly long line in .appveyor.yml
+    
+    Using YAML line-folding doesn't seem possible, as setup doesn't tolerate
+    spaces between package names, so instead drop some unneeded double quotes,
+    double quote the whole thing and escape newlines
+
+commit 7f962c70b6d9c346477f23f6c15211e749110078
+Author: Alex Goins <agoins@nvidia.com>
+Date:   Wed Apr 10 13:48:02 2019 -0500
+
+    xsync: Add resource inside of SyncCreate, export SyncCreate
+    
+    As shown by DRI3 adding the SyncCreateFenceFromFD() function, extensions may
+    want to create a fence, then initialize it in their own way. This currently
+    can't be done without adding a function directly to Xext/sync.c due to the fact
+    that the RTFence resource type is private and there is no external interface to
+    add to it.
+    
+    To facilitate other X extensions creating fences and initializing them, this
+    change exports SyncCreate() and adds the resource directly within it. Callers no
+    longer need to call AddResource() after SyncCreate(), they only need to
+    initialize the SyncObject.
+    
+    To prevent FreeFence() and FreeCounter() from segfaulting if the call to
+    AddResource() fails before the sync object is initialized, this adds a new
+    'initialized' parameter to SyncObject that, when FALSE, causes FreeFence() and
+    FreeCounter() to skip de-initialization and simply free the object.
+    Initialization after adding the resource shouldn't otherwise be a problem due to
+    the single-threaded nature of X.
+    
+    Signed-off-by: Alex Goins <agoins@nvidia.com>
+    Reviewed-by: James Jones <jajones@nvidia.com>
+    Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
+
+commit 8702c938b33b9ec180d64754eb922515c7c4a98b
+Author: Eric Anholt <eric@anholt.net>
+Date:   Tue Mar 26 15:10:49 2019 -0700
+
+    glamor: Introduce a central place for our pixmap format/type handling.
+    
+    We had various helper functions trying to come up with the
+    internalformat/format/type/render formats for pixmaps, and it's much
+    nicer to just detect what those should be once at startup.  This gives
+    us a chance to do the right thing for GLES.
+    
+    It also, notably, fixes our format/type for depth 15 and 16 setup for
+    desktop GL, so that we actually allocate 16bpp (GL_RGB/565) on most
+    drivers instead of 32bpp (GL_RGB/UBYTE).
+    
+    GLES still has regressions over desktop (2 regressions in llvmpipe
+    XTS, many in rendercheck), but I think this is a good baseline.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+
+commit c94da112a77bfc8c6b45ffe31c04e6b7931a3c9a
+Author: Eric Anholt <eric@anholt.net>
+Date:   Tue Mar 26 16:57:24 2019 -0700
+
+    glamor: Plumb the pixmap through fbo creation instead of a "format"
+    
+    For GLES, we're going to need a lot more logic for picking the
+    iformat/format/type of texture setup, so we'll want the pixmap's depth
+    and is_cbcr flag.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+
+commit 34485be2560ea6f96a849b5d05edb1de28caf2f3
+Author: Eric Anholt <eric@anholt.net>
+Date:   Tue Mar 26 15:58:59 2019 -0700
+
+    glamor: Stop trying to store the pixmap's "format" in glamor_pixmap_fbo.
+    
+    "format" is a bit of a confused term (internalformat vs GL format),
+    and all we really needed was "is this GL_RED?"
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+
+commit 1b2e224d7dca9d6d86d6150ba0a5ddf0abee1f22
+Author: Eric Anholt <eric@anholt.net>
+Date:   Tue Mar 26 15:02:38 2019 -0700
+
+    glamor: Switch the gl_flavor to a boolean is_gles.
+    
+    There are only 2 flavors we are distinguishing -- GL versions are
+    handled separately.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+
+commit 2764128e9fe775fabe28b0b9be427c16754e7128
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Wed Apr 17 11:43:57 2019 +0100
+
+    Fix missing prototype warning for xf86_find_platform_device_by_devnum()
+    
+    ../hw/kdrive/src/kdrive.c:999:1: warning: no previous prototype for ‘xf86_find_platform_device_by_devnum’ [-Wmissing-prototypes]
+    
+    Place the same guards around this stub as are around including the
+    hotplug.h header which declares the prototype.
+
+commit ba59427abae3a8b260e66fcfab90c9de96c3e01c
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Wed Apr 17 11:37:56 2019 +0100
+
+    Fix maybe-uninitialized warning in xf86NewInputDevice()
+    
+    If SYSTEMD_LOGIND is not defined, systemd_logind_take_fd is defined as a
+    macro evaluating to -1 by systemd-logind.h, leaving paused
+    uninitialized.
+    
+    ../hw/xfree86/common/xf86Xinput.c: In function ‘xf86NewInputDevice’:
+    ../hw/xfree86/common/xf86Xinput.c:919:16: warning: ‘paused’ may be used uninitialized in this function [-Wmaybe-uninitialized]
+    ../hw/xfree86/common/xf86Xinput.c:877:10: note: ‘paused’ was declared here
+
+commit 7c266cafed14b38c039091651069ae9888c3a8ae
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Wed Apr 17 11:37:11 2019 +0100
+
+    Fix old-style definition warning for xf86OSInputThreadInit()
+    
+    ../hw/xfree86/os-support/stub/stub_init.c: In function ‘xf86OSInputThreadInit’:
+    ../hw/xfree86/os-support/stub/stub_init.c:29:1: warning: old-style function definition [-Wold-style-definition]
+
+commit 6975807945d12c07f00e18df7fafeff43efa0267
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Thu Mar 14 16:37:35 2019 -0400
+
+    dix: Remove WindowRec::backStorage
+    
+    This is only being set, never read.
+
+commit 0f477cc68bbfe37555f73313dcc50b303c3ca210
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Thu Mar 14 16:34:40 2019 -0400
+
+    dix, composite: Optimize setting window backing store state
+    
+    We hide CWBackingStore from the screen hook if nothing's actually
+    changing, which means compChangeWindowAttributes no longer needs to
+    compare the requested state with the present one.
+
+commit 4e101e7e3b4d3e6cdb38f1cd60a764aaade5c4a2
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Thu Mar 14 16:19:02 2019 -0400
+
+    mi: Simplify a conditional in miHandleExposures
+    
+    miHandleExposures does two things: computes the region for which to
+    generate expose events, and (if the destination is a window) paints the
+    exposed regions with the background. The bit of this conditional we're
+    deleting here asserts that the source is either a pixmap or a window
+    without backing store. The only other possibility is a window _with_
+    backing store. In the old backing store implementation, this was where
+    you would recover bits from backing store. Since our "backing store" is
+    the redirected window pixmap, we know we've already copied all we could,
+    because CopyArea had already seen the entire window pixmap. So now in
+    that third case, we are still drawing to a pixmap (so there's no
+    background to paint) and we are still not generating events, so we can
+    exit early.
+    
+    The comment above the function about recovering bits from backing store
+    is clearly misleading, so delete that too.
+
+commit 147ed28bbf78f6b75a22b21458785aea536e44f8
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date:   Wed Apr 3 13:11:14 2019 -0700
+
+    xfree86: Export xf86GPUScreens and xf86NumGPUScreens
+    
+    Drivers may need to loop over the allocated screens during PreInit, for example
+    to consolidate xorg.conf options that apply to a GPU device as a whole.
+    Currently, this works for protocol screens becuase x86Screens is exported, but
+    does not work for GPU screens.
+    
+    Export xf86GPUScreens and xf86NumGPUScreens for consistency with xf86Screens and
+    xf86NumScreens.
+    
+    Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
+
+commit 0a005c4fe4fccc9bb6c3a5266065f8437621fdb9
+Author: Eric Anholt <eric@anholt.net>
+Date:   Thu Apr 4 16:26:26 2019 -0700
+
+    test: Fix meson build with xvfb disabled.
+    
+    Fixes #678
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+
+commit 8ab80fd5057f3d954ac6dc310cc8773e9694a0b1
+Author: Dave Airlie <airlied@redhat.com>
+Date:   Fri Mar 29 08:44:07 2019 +1000
+
+    xf86: set status to connected for monitors enabled in conf
+    
+    If the user sets Option "Enable" "TRUE" for a monitor, the X
+    server will connect the connector a crtc but tell the user it
+    is disconnected.
+    
+    However the user in this case is mutter, when it gets it's view
+    of the output configuration it sees the output is disconnected
+    and never sets it up again, which seems like the right thing to do.
+    
+    If we let the user enable a monitor, lets just set it as always
+    connected.
+    
+    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
+    Signed-off-by: Dave Airlie <airlied@redhat.com>
+
+commit f1790339d0c4cf09aa1b3f68c01d66eab1901718
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Sun Mar 31 16:35:16 2019 +0100
+
+    tests: Always separate rendercheck -f and -o options with a space
+
+commit fee147d75eef91be8cbfdd77dd444cc65c29b038
+Author: Michel Dänzer <michel.daenzer@amd.com>
+Date:   Fri Mar 29 10:12:40 2019 +0100
 
-commit 240868527bb11beb9a03ad0d3f24506f1b983729
+    gitlab-ci: Retry jobs after runner system failures
+    
+    Up to twice, for a total of 3 attempts maximum.
+    
+    This will hopefully avoid spurious CI pipeline failures due to
+    intermittent GitLab/docker infrastructure issues.
+    
+    Inspired by
+    https://gitlab.freedesktop.org/mesa/mesa/commit/6140ed3d2c5409bcdb5c0879411690ef222b086c
+    
+    Reviewed-by: Eric Anholt <eric@anholt.net>
+
+commit b5ef99f26ab5fdc5e9b4f63c977de3cb0f4d5d4f
+Author: Michel Dänzer <michel.daenzer@amd.com>
+Date:   Fri Mar 29 10:01:20 2019 +0100
+
+    gitlab-ci: Simplify autotools job script
+    
+    Drop the verbose test log output, matching the meson job script.
+    
+    Reviewed-by: Eric Anholt <eric@anholt.net>
+
+commit 35561d4d1e2bc168affdadd74e73ae5321c43a8a
+Author: Michel Dänzer <michel.daenzer@amd.com>
+Date:   Fri Mar 29 09:58:21 2019 +0100
+
+    gitlab-ci: Simplify meson job script
+    
+    This way, the second ninja command line will be visible again as well in
+    the job output.
+    
+    Reviewed-by: Eric Anholt <eric@anholt.net>
+
+commit 4adda1f6359fd96436dd61d0250b84f55b2fd277
+Author: Roman Gilg <subdiff@gmail.com>
+Date:   Fri Mar 29 10:55:31 2019 +0100
+
+    present: Call present_vblank_scrap in screen mode
+    
+    This cleans up some code duplication. No functional change.
+    
+    Signed-off-by: Roman Gilg <subdiff@gmail.com>
+    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
+
+commit d7b1753d446ecde3ff58e3de39a634c3137473c8
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Mon Mar 25 13:19:41 2019 +1000
 
@@ -3340,9 +13722,274 @@ Date:   Mon Mar 25 13:19:41 2019 +1000
     altogether and only leave the scaling for the relative x/y motion.
     
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-    (cherry picked from commit d7b1753d446ecde3ff58e3de39a634c3137473c8)
 
-commit 5bc29a67b8ab251048e0737eedcceb29bba25f5f
+commit 3b26b90cb787a14fa5f8bb2033eab8ab6562a9a5
+Author: Eric Anholt <eric@anholt.net>
+Date:   Mon Mar 25 16:30:18 2019 -0700
+
+    glamor: Fix a compiler warning since the recent OOM fixes.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+
+commit a63d796ce02ae94a016e6ec027fdf0d4bff68805
+Author: Eric Anholt <eric@anholt.net>
+Date:   Tue Mar 26 11:30:55 2019 -0700
+
+    gitlab-ci: Build and test glamor using Xephyr.
+    
+    I keep wanting this when reviewing people's glamor patches.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+
+commit ce5242fa2eef25c9921311480401bda6cd8952be
+Author: Eric Anholt <eric@anholt.net>
+Date:   Tue Mar 26 13:38:22 2019 -0700
+
+    gitlab-ci: Build and install a current version of rendercheck.
+    
+    For really testing glamor, we want it installed.  Use master instead
+    of whatever version is in repos, because we'll want to update when new
+    tests are added.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+
+commit 2a2f0ac3a99f32e6e5cc23003360534400d8f445
+Author: Eric Anholt <eric@anholt.net>
+Date:   Tue Mar 26 13:35:41 2019 -0700
+
+    gitlab-ci: Make shallow clones of git trees we'll be nuking at the end.
+    
+    We only check out master, and delete .git when we're done, so save the
+    bandwidth.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+
+commit 0dc271690b0841473e442ffbf97464876234a7c8
+Author: Eric Anholt <eric@anholt.net>
+Date:   Tue Mar 26 13:33:09 2019 -0700
+
+    gitlab-ci: Don't bother building piglit.
+    
+    We don't use any of piglit's tests, just the framework.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+
+commit 8c1dac5f83fba8fcd51f68214c0c5cf5d14ed2a7
+Author: Eric Anholt <eric@anholt.net>
+Date:   Tue Mar 26 12:58:39 2019 -0700
+
+    gitlab-ci: Install Mesa so we can test glamor.
+    
+    We need the DRI swrast driver (for GLX in vfb), and also libgl (for
+    libepoxy in glamor)
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+
+commit 3f3c489e51e1b8a82adee9c7c5942dadf218b70d
+Author: Eric Anholt <eric@anholt.net>
+Date:   Tue Mar 26 11:06:00 2019 -0700
+
+    test: Trim the Render ops that we test the composite paths on.
+    
+    We cover all Render ops under the "blend" group, so when we're doing
+    the cross products of some formats for the masking operation, skip
+    most of the ops (covering just zero, one, and src/dst alpha blend
+    factors along with a definitely non-glamor-accelerated one) .
+    
+    All the tests now complete in <20s of runtime on my skylake.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+
+commit 58c168ad93d770a3c48cc07daaa8a2acd1c0729d
+Author: Eric Anholt <eric@anholt.net>
+Date:   Tue Mar 26 10:21:29 2019 -0700
+
+    test: Execute rendercheck tests without using piglit.
+    
+    This gets us parallelism between rendercheck tests at the cost of
+    spinning up more Xvfbs, and nicer logging of the tests that are run.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+
+commit 82aab622952197003799d756f06881b2c7df48bc
+Author: Eric Anholt <eric@anholt.net>
+Date:   Wed Mar 27 09:47:41 2019 -0700
+
+    docker: Stop dumping long-summary and meson test logs in the CI logs.
+    
+    I've found that it's hard to find the original error in a dump full of
+    xserver debug spam for the passing cases, and when I needed to look at
+    this I end up using a proper editor on the file from the artifacts
+    view anyway.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+
+commit 05ded049acaa90ba07295f939910c22bb1e10e3a
+Author: Eric Anholt <eric@anholt.net>
+Date:   Tue Mar 26 13:43:05 2019 -0700
+
+    test: Skip a few tests on glamor that are known to fail on llvmpipe.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+
+commit 30369c6345250d71ef9ca5b12e4991c601e350c6
+Author: Eric Anholt <eric@anholt.net>
+Date:   Wed Mar 27 09:45:34 2019 -0700
+
+    gitlab-ci: Add a note about where to manage your containers.
+    
+    Michel noted that I could do this instead of bumping the tag as I
+    developed, so leave that note for the next person.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+
+commit 164a37eac2a5e7390f69ce152796df54e2f00d98
+Author: Eric Anholt <eric@anholt.net>
+Date:   Tue Mar 26 10:59:27 2019 -0700
+
+    simple-xinit: Introduce an escaped "--" argument.
+    
+    For testing xephyr-glamor on top of Xvfb in CI better, I want to be
+    able to make one command line describing the nested server invocation,
+    but that means I need to get two simple-xinits to split client/server
+    on different "--" arguments.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+
+commit 29aed56ec72d2e95dba8975eb44f385a5f6ef1ff
+Author: Eric Anholt <eric@anholt.net>
+Date:   Tue Mar 26 12:26:34 2019 -0700
+
+    simple-xinit: Avoid hanging if the server fails to set up the display fd.
+    
+    Early fatal errors may leave us with nothing in the displayfd pipe,
+    and we'd block forever.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+
+commit f7069723093de585d082cfd98f0191d163569a78
+Author: Benjamin Tissoires <benjamin.tissoires@gmail.com>
+Date:   Mon Mar 18 11:09:29 2019 +0100
+
+    CI: use wayland-ci-templates to manage the images
+    
+    There shouldn't be a difference for users, but this way we do manage
+    all of our containers from freedesktop.org
+    
+    Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
+    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
+
+commit 5a549c957a873bd44ab351e627828905ee7dbf18
+Author: Michael Biebl <biebl@debian.org>
+Date:   Wed Jan 24 04:05:47 2018 +0100
+
+    Revert "systemd-logind: Monitor systemd-logind going away"
+    
+    systemd-logind since version 234 (released 2017-07-12) supports being
+    restarted without losing state [1]. From the systemd NEWS file [2]:
+    
+     * systemd-logind may now be restarted without losing state. It stores
+       the file descriptors for devices it manages in the system manager
+       using the FDSTORE= mechanism. Please note that further changes in
+       other components may be required to make use of this (for example
+       Xorg has code to listen for stops of systemd-logind and terminate
+       itself when logind is stopped or restarted, in order to avoid using
+       stale file descriptors for graphical devices, which is now
+       counterproductive and must be reverted in order for restarts of
+       systemd-logind to be safe. See
+       https://cgit.freedesktop.org/xorg/xserver/commit/?id=dc48bd653c7e101.)
+    
+    This reverts commit dc48bd653c7e1013e2d69e3f59ae3cbc0c893473.
+    
+    Closes: #531
+    
+    [1] https://github.com/systemd/systemd/pull/5600
+    [2] https://github.com/systemd/systemd/commit/9f09a95a7e6127f526c0ef7b6fd060cc0b01cdcc
+
+commit f3567600cff5e91cbc2110cd72ce3fefbb8cab3a
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Thu Mar 14 17:15:52 2019 +0000
+
+    meson: handle missing xkbcomp.pc better
+    
+    Applying get_pkgconfig_variable() to a not-found dependency was always
+    documented as an error, but meson 0.49 now actually raises an error[1]:
+    
+      meson.build:110:4: ERROR:  'xkbcomp' is not a pkgconfig dependency
+    
+    Check xkbcomp_dep is a suitable dependency type before applying
+    get_pkgconfig_variable() to it.
+    
+    [1] but this is more by accident than design (see the discusssion at [2]
+    et seq.), so who knows where things will come to rest...
+    
+    [2] https://github.com/mesonbuild/meson/pull/4444#issuecomment-442443301
+
+commit ef91da2757050652c724f6e674e8b1acf5d0cb31
+Author: Michel Dänzer <michel.daenzer@amd.com>
+Date:   Wed Feb 27 18:29:50 2019 +0100
+
+    present/scmd: Check that the flip and screen pixmap pitches match
+    
+    If they don't, flipping will result in corrupted display.
+    
+    Test case:
+    
+    * Run Xorg at 1920x1080 with no window manager
+    * glxgears -geometry 2048x1080
+
+commit 9114c4341cec91ed41c9527c88200b7712357951
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Wed Mar 13 13:25:02 2019 +0000
+
+    meson: Drop a meson version check
+    
+    Drop some code conditional on meson version, which is not needed
+    since 7e046b94 bumped the minimum meson version
+
+commit c020769dbfb965740c8441d8242b738ef572a7c9
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Wed Mar 13 14:57:14 2019 +0000
+
+    Add xf86OSInputThreadInit to stub os-support as well
+    
+    stub os support also needs to provide xf86OSInputThreadInit, omitted in
+    ea1527a8
+
+commit 2e18eec6f03cc4d9d5bf62853c65d341b363f4b3
+Author: Michel Dänzer <michel.daenzer@amd.com>
+Date:   Fri Mar 8 18:49:04 2019 +0100
+
+    xwayland/present: Destroy sync_callback in xwl_present_cleanup
+    
+    xwl_present_cleanup frees the struct xwl_present_window memory,
+    so if there's a pending callback, we have to destroy it to prevent
+    use-after-free in xwl_present_sync_callback.
+    
+    Should fix issue #645.
+    
+    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
+
+commit f665a9c9e6c8643f3050378249db3088ae3057be
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Sep 30 12:26:28 2014 -0400
+
+    mi: Shortcut miDoCopy/miCopyArea based on clipList
+    
+    This is maybe one more comparison, but it catches FullyObscured windows
+    slightly earlier, so it's kind of a wash. The important thing is this
+    allows for paintable but unmapped windows, which will have non-empty
+    clipList.
+
+commit 3904216b01fd9dabee65e6cb120fa8aad5e8b459
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Wed Mar 6 17:03:58 2019 -0500
+
+    dix: Outdent Unmap{Window,Subwindows} a bit
+    
+    No functional change, just folding some conditionals together.
+
+commit 74479a99ecf18fdfdafd033b5efd8d785dd12c28
 Author: Olivier Fourdan <ofourdan@redhat.com>
 Date:   Fri Mar 8 18:19:16 2019 +0100
 
@@ -3355,72 +14002,107 @@ Date:   Fri Mar 8 18:19:16 2019 +0100
     the `pixmap_priv->fbo` is NULL and will segfault with a NULL pointer
     dereference trying to access the `pixmap_priv->fbo->tex`.
     
-    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
-    Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/647
-    (Cherry picked from commit 74479a99ecf18fdfdafd033b5efd8d785dd12c28)
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/647
+
+commit 8c4e8d9eff03cefc987f13c900b0a47403946127
+Author: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
+Date:   Mon Mar 4 11:52:43 2019 +0100
+
+    glamor: Fallback to system memory for RW PBO buffer allocation
+    
+    We currently support two modes of operation for RW PBO buffers: one
+    that allocates a pack buffer with GL memory and one that uses system
+    memory when the former is not supported.
+    
+    Since allocation with system memory is less likely to fail, add a
+    fallback to system memory when GL memory failed instead of bailing
+    out.
+    
+    Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
+
+commit de6b3fac1f26075ce915006c914c4a4755617715
+Author: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
+Date:   Mon Mar 4 11:38:20 2019 +0100
+
+    glamor: Propagate glamor_prepare_access failures in copy helpers
+    
+    glamor_prepare_access can fail for a few reasons, especially when
+    failing to allocate a PBO buffer. Take this in account and bail in
+    the copy helpers that call the helper when a failure happens.
+    
+    Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
 
-commit d0c7483b3edadf3ff9c12b4b024abd7b11b34ef1
-Author: Peter Hutterer <peter.hutterer@who-t.net>
-Date:   Fri Apr 5 12:39:00 2019 +0200
+commit bc2e12239f86e5a4acd220744f42eb83ba55d328
+Author: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
+Date:   Mon Mar 4 11:47:11 2019 +0100
 
-    xwayland: fix a realloc OOM error case
+    glamor: Error out on out-of-memory when allocating PBO for FBO access
     
-    Found by coverity
+    Packed buffer allocation (which happens at glBufferData time with the
+    buffer bound) can fail when there is no GL memory left.
     
-    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-    (Cherry picked from commit 7c25439f0db4c20a4eab4ed44262eb396305f58a)
+    Pick up the error when it happens, print a proper error message, do
+    some cleanup and bail.
+    
+    Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
 
-commit bb74db6b38f7ff75ed52a900fa62a995e77aede4
-Author: Olivier Fourdan <ofourdan@redhat.com>
-Date:   Fri Apr 5 12:33:28 2019 +0200
+commit c98c7709c67d8ed6b7455ec700a49b58c396ec2c
+Author: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
+Date:   Mon Mar 4 11:24:26 2019 +0100
 
-    xwayland: search for a render node to use
+    glamor: Propagate FBO allocation failure for picture to texture upload
     
-    wl_drm's protocol "device" event provides the path to the DRM device,
-    which may not be a render node, thus causing Xwayland to fall back to
-    DRM authentication which may fail if the user has switched to another
-    VT while Xwayland is starting.
+    When uploading a picture to a texture, glamor_upload_picture_to_texture
+    calls glamor_pixmap_ensure_fbo to ensure that there is backing FBO.
+    The FBO will be allocated if the picture's drawable pixmap does not have
+    one already, which can fail when there is no GL memory left.
     
-    Search for a render node corresponding to the given DRM device and try
-    to use it instead, as render nodes do not need DRM authentication and
-    Xwayland can make use of them if it can find one.
+    glamor_upload_picture_to_texture checks that the call succeeded and will
+    enter the failure path if it did not. However, unlike many other
+    functions in glamor, this one has ret set to TRUE initially, so it needs
+    to be set to FALSE when a failure happens.
     
-    Closes: https://bugs.freedesktop.org/108038
-    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
-    (Cherry picked from commit 361894497c6802b62c2da4a3dc7e98939fb24404)
+    Otherwise, the error is not propagated and the failure path return TRUE.
+    This leads to a fault when trying to access the FBO pointer later on.
+    
+    Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
 
-commit 87491ced98705a14be2bb5a3ce7e41cb5ffc11d0
-Author: Michel Dänzer <michel.daenzer@amd.com>
-Date:   Mon Mar 25 12:32:48 2019 +0100
+commit e51ebc18a7fb5b30213b3b5e743cba1f2e7a0e83
+Author: Andy Ritger <aritger@nvidia.com>
+Date:   Wed Feb 13 13:20:52 2019 -0800
 
-    present/scmd: Check that the flip and screen pixmap pitches match
+    xfree86/modes: Add "NoOutputInitialSize" option
     
-    If they don't, flipping will result in corrupted display.
+    Normally, the X server infers the initial screen size based on any
+    connected outputs.  However, if no outputs are connected, the X server
+    picks a default screen size of 1024 x 768.  This option overrides the
+    default screen size to use when no outputs are connected.  In contrast
+    to the "Virtual" Display SubSection entry, which applies unconditionally,
+    "NoOutputInitialSize" is only used if no outputs are detected when the
+    X server starts.
     
-    Test case:
+    Parse this option in the new exported helper function
+    xf86AssignNoOutputInitialSize(), so that other XFree86 loadable drivers
+    can use it, even if they don't use xf86InitialConfiguration().
     
-    * Run Xorg at 1920x1080 with no window manager
-    * glxgears -geometry 2048x1080
-    (Cherry picked from commit ef91da2757050652c724f6e674e8b1acf5d0cb31)
+    Signed-off-by: Andy Ritger <aritger@nvidia.com>
+    Reviewed-by: Keith Packard <keithp@keithp.com>
 
-commit 578156337176bf759dace40fb5a81919f65562f1
-Author: Michel Dänzer <michel.daenzer@amd.com>
-Date:   Mon Mar 25 12:32:04 2019 +0100
+commit 7e046b9467784451769af3a03db46e3c690063b0
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Mar 5 11:31:29 2019 -0500
 
-    xwayland/present: Destroy sync_callback in xwl_present_cleanup
-    
-    xwl_present_cleanup frees the struct xwl_present_window memory,
-    so if there's a pending callback, we have to destroy it to prevent
-    use-after-free in xwl_present_sync_callback.
+    meson: Bump required meson version to 0.46
     
-    Should fix issue #645.
+    We were being naughty:
     
-    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
-    (Cherry picked from commit 2e18eec6f03cc4d9d5bf62853c65d341b363f4b3)
+    WARNING: Project specifies a minimum meson_version '>= 0.42.0' but uses features which were added in newer versions:
+     * 0.46.0: {'compiler.has_multi_link_argument', 'compiler.has_link_argument'}
 
-commit 8e2f5410cec5b052fb4da9d1b774a5858903dc35
+commit 0ec9a13c2a207e98e2dd6b352552c0e069af0727
 Author: Michel Dänzer <michel.daenzer@amd.com>
-Date:   Mon Mar 25 12:29:23 2019 +0100
+Date:   Wed Feb 27 16:47:40 2019 +0100
 
     Revert "gitlab-ci: Only run docker-image stage if relevant source files change"
     
@@ -3434,38 +14116,55 @@ Date:   Mon Mar 25 12:29:23 2019 +0100
     * If the docker-image job of the first pipeline in a forked repository
       is cancelled or fails for any reason, and .gitlab-ci.yml isn't
       modified for the next pipeline run.
-    (Cherry picked from commit 0ec9a13c2a207e98e2dd6b352552c0e069af0727)
 
-commit 34553f502650641aec4f20ab43180804f17032c6
-Author: Ray Strode <rstrode@redhat.com>
-Date:   Fri Nov 16 14:36:55 2018 -0500
+commit 12769c516d9356bd92f90e2f53a4853dbfdc4aed
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Thu Feb 21 15:38:07 2019 -0800
 
-    dix: ensure work queues are cleared on reset
+    os-support/solaris: Set IOPL for input thread too
     
-    If the server resets, most client workqueues are cleaned up as the
-    clients are killed.
+    Since the Solaris kernel tracks IOPL per thread, and doesn't inherit
+    raised IOPL levels when creating a new thread, we need to turn it on
+    in the input thread for input drivers like vmmouse that need register
+    access to work correctly.
     
-    The one exception is the server's client, which is exempt from
-    the killing spree.
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit ea1527a8a662dcc5ac3ed49135740aa5f24f74bc
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Thu Feb 21 15:35:38 2019 -0800
+
+    Add xf86OSInputThreadInit call from common layer into os-support layer
     
-    If that client has a queued work procedure active, it won't get
-    cleared on reset.
+    Allows os backends to run additional code as necessary to set up the
+    input thread.
     
-    This commit ensures it gets cleared too.
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 4ad21c3247d98ac6c5ad71fa36be60ed04f7c92c
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Thu Feb 21 15:22:57 2019 -0800
+
+    Add ddxInputThread call from os layer into ddx layer
     
-    (cherry picked from commit 8738ce85df535bdfdfecfce1c0d64e209cc6e508)
+    Allows ddx's to run additional code as necessary to set up the
+    input thread.
     
-    Fixes: xorg/xserver#670
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
 
-commit 94f036d412f4f426abe950b57b9ec99b78068c39
-Author: Adam Jackson <ajax@redhat.com>
-Date:   Mon Feb 25 13:31:13 2019 -0500
+commit 7533fa9bd5a4a0f7743d553be186514d684308c8
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Thu Feb 21 14:51:22 2019 -0800
 
-    xserver 1.20.4
+    os-support/solaris: Drop ExtendedEnabled global variable
     
-    Signed-off-by: Adam Jackson <ajax@redhat.com>
+    Keeping track of kernel state in user space doesn't buy us anything,
+    and introduces bugs, as we were keeping global state but the Solaris
+    kernel tracks IOPL per thread.
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
 
-commit 9850d20c2aa2d8380f2e9c4521ef3c46a6c8fb00
+commit 432fad04e7aaad1f10d732a51665ecbe934246c6
 Author: Michel Dänzer <michel.daenzer@amd.com>
 Date:   Fri Feb 22 10:22:49 2019 +0100
 
@@ -3474,44 +14173,24 @@ Date:   Fri Feb 22 10:22:49 2019 +0100
     We don't set the PIGLIT_DIR and XTS_DIR environment variables for make
     distcheck for now, otherwise it complains about files left behind by
     piglit.
-    
-    (cherry picked from commit 432fad04e7aaad1f10d732a51665ecbe934246c6)
 
-commit fcac9b10c90c8a06c60f563f5ad8da1d4e49b7fc
+commit f9bbc9d5ead5cf298f0e3e0b7ac5229af830f6e7
 Author: Michel Dänzer <michel.daenzer@amd.com>
 Date:   Fri Feb 22 10:21:27 2019 +0100
 
     glx,xquartz: Fix make distcheck
     
     Guard BUILT_SOURCES and CLEANFILES by XWIN_GLX_WINDOWS/XQUARTZ.
-    
-    (cherry picked from commit f9bbc9d5ead5cf298f0e3e0b7ac5229af830f6e7)
-
-commit 01a03a476a5f963846fdb7702217be17ac1ecd6c
-Author: Michel Dänzer <michel.daenzer@amd.com>
-Date:   Fri Feb 22 11:16:36 2019 +0100
-
-    present/wnmd: Allow flipping if the window pixmap matches the toplevel's
-    
-    Instead of testing window->redirectDraw.
-    
-    With Xwayland, the toplevel window is always redirected, so this would
-    unnecessarily preclude flipping there in some cases, e.g. with wlroots
-    based Wayland compositors or with fullscreen X11 windows in weston.
-    
-    Fixes issue #631.
-    (Cherry picked from commit a093a88531599832811a1ba5cb85101af91a545e)
 
-commit e5984241ab8d7ca75eb3e5e893d63adb017ed0f5
+commit 2f12c8017508f23195db92503435fc3ef183da4b
 Author: Michel Dänzer <michel.daenzer@amd.com>
-Date:   Fri Feb 22 11:56:23 2019 +0100
+Date:   Tue Feb 19 18:37:53 2019 +0100
 
     gitlab-ci: Add autotools build & test job
-    (Cherry picked from commit 2f12c8017508f23195db92503435fc3ef183da4b)
 
-commit de6d87b61959cd3997feed3efe25fb2a36e543fb
+commit b577df77451d34e28cfef3bda5031a43caeba90a
 Author: Michel Dänzer <michel.daenzer@amd.com>
-Date:   Fri Feb 22 11:56:01 2019 +0100
+Date:   Thu Feb 14 17:39:24 2019 +0100
 
     gitlab-ci: Use ccache
     
@@ -3530,20 +14209,43 @@ Date:   Fri Feb 22 11:56:01 2019 +0100
       the docker-image job.
     
     Reviewed-by: Adam Jackson <ajax@redhat.com> # v1
-    (Cherry picked from commit b577df77451d34e28cfef3bda5031a43caeba90a)
 
-commit 37ad8dd978e8d35233e489e771f7dcf3e09c3b7a
+commit 537f06e21ee2c4c88ee062c26555338257e043ef
 Author: Michel Dänzer <michel.daenzer@amd.com>
-Date:   Fri Feb 22 11:55:31 2019 +0100
+Date:   Tue Feb 19 18:16:16 2019 +0100
 
     gitlab-ci: Add ccache to docker image, and leave in autotools
     
     We're going to make use of these in build & test jobs.
-    (Cherry picked from commit 537f06e21ee2c4c88ee062c26555338257e043ef)
 
-commit 61eccbcec930efeb1a124cc8edff70e6f65c927e
+commit f6753c117ef0f83499d5e2d6dda226fec9ddf803
+Author: Alexander Volkov <a.volkov@rusbitech.ru>
+Date:   Mon Feb 11 18:54:10 2019 +0300
+
+    shm: Use memfd_create when possible
+    
+    It doesn't require shared memory dir and thus allows
+    to avoid cases when this dir is detected incorrectly,
+    as in https://bugreports.qt.io/browse/QTBUG-71440
+    
+    Signed-off-by: Alexander Volkov <a.volkov@rusbitech.ru>
+
+commit 678d64aa2e929368b6d6f2b83bbf5540c4fa292d
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Fri Feb 8 13:29:14 2019 +1000
+
+    Xi: lock the input thread for any pointer barrier list manipulation
+    
+    The input thread checks the barriers for pointer positioning, swapping the
+    list out from underneath is considered impolite.
+    
+    Reported-by: Michel Dänzer <michel.daenzer@amd.com>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
+
+commit fede384962edd175b1a2ce6edd8d2ef9b0fd74f0
 Author: Michel Dänzer <michel.daenzer@amd.com>
-Date:   Fri Feb 22 11:54:57 2019 +0100
+Date:   Mon Feb 11 18:32:07 2019 +0100
 
     gitlab-ci: Don't rely on $CI_PROJECT_NAME
     
@@ -3552,11 +14254,10 @@ Date:   Fri Feb 22 11:54:57 2019 +0100
     
     Pointed out by Eric Engestrom in
     https://gitlab.freedesktop.org/mesa/mesa/merge_requests/224 .
-    (Cherry picked from commit fede384962edd175b1a2ce6edd8d2ef9b0fd74f0)
 
-commit e10cfd8fcc395360ce9acd93bfd7503da8e35381
+commit 8694395fcfd407190db74f31064960e484747377
 Author: Michel Dänzer <michel.daenzer@amd.com>
-Date:   Fri Feb 22 11:54:41 2019 +0100
+Date:   Thu Feb 7 17:35:13 2019 +0100
 
     gitlab-ci: Only run docker-image stage if relevant source files change
     
@@ -3565,112 +14266,29 @@ Date:   Fri Feb 22 11:54:41 2019 +0100
     (e.g. in a newly forked repository).
     
     Inspired by https://gitlab.freedesktop.org/mesa/mesa/merge_requests/143
-    (Cherry picked from commit 8694395fcfd407190db74f31064960e484747377)
-
-commit 7246730edfb4f9079eb0ef1c41c43c47854a7432
-Author: Michel Dänzer <michel.daenzer@amd.com>
-Date:   Fri Feb 22 11:53:55 2019 +0100
-
-    gitlab-ci: Set LC_ALL=C.UTF-8
-    
-    Although piglit could now handle non-ASCII characters in the
-    environment, meson was still failing without this (even though it's
-    using Python 3).
-    
-    Reviewed-by: Eric Anholt <eric@anholt.net>
-    (Cherry picked from commit bc6998b728749015bfd93a85fbae48af777c9a34)
-
-commit 8db5a711da6a0b8f28c885b968b1e6bf2d45ce62
-Author: Michel Dänzer <michel.daenzer@amd.com>
-Date:   Fri Feb 22 11:53:37 2019 +0100
-
-    test: Use .../piglit instead of .../piglit-*.py
-    
-    The latter use Python 2 and break with any non-ASCII characters in the
-    environment, the former uses Python 3 and works fine in that case.
-    
-    Reviewed-by: Eric Anholt <eric@anholt.net>
-    (Cherry picked from commit 4aaaf69229be574d6d11084225ecd91446a15170)
-
-commit 3314af2d15085118f2ca0d4ce65ae6ec1f38fbad
-Author: Michel Dänzer <michel.daenzer@amd.com>
-Date:   Fri Feb 22 11:53:12 2019 +0100
-
-    gitlab-ci: Docker image can be generated as part of pipeline
-    
-    This removes the dependency on an externally generated docker image, and
-    should make it easier to update the docker image or make other changes
-    related to it.
-    
-    This is based on Debian testing, because I'm most familiar with Debian.
-    But it should be easy to base it on another distro.
-    
-    v2:
-    * Use kaniko instead of docker-in-docker for image generation, so it can
-      also work in unprivileged runners.
-    * Drop piglit.conf & tetexec.cfg overrides, just make sure the files in
-      the image work.
-    (Cherry picked from commit f56d8e2282a3d1344aa1300c78faede0071a3bfa)
-
-commit e8b4e94d5192f72be3f768ac11a5e27890e6bc8d
-Author: Michel Dänzer <michel.daenzer@amd.com>
-Date:   Fri Feb 22 11:52:42 2019 +0100
-
-    Drop Travis Linux build in favour of GitLab CI
-    
-    Fold build-travis-deps.sh into .gitlab-ci.yml.
-    
-    Preparation for the next change, which would break the Travis Linux
-    build.
-    
-    Reviewed-by: Eric Anholt <eric@anholt.net>
-    (Cherry picked from commit ed44f9cd6a4ccf6de7dda70432764b4da10f3f44)
-
-commit 4925f38dc0559a8cbe01ec947edeb5eeb78a4df6
-Author: Michel Daenzer <michel@daenzer.net>
-Date:   Fri Feb 22 11:51:57 2019 +0100
-
-    Make artifacts of piglit results if job fails
-    
-    Can be useful for figuring out what caused the failure.
-    (Cherry picked from commit a7472da94136ef977b8d6af956a15767736236ea)
-
-commit b6ef90d83b4fd9230ca334116c61fd52f1d68209
-Author: Michel Daenzer <michel@daenzer.net>
-Date:   Fri Feb 22 11:51:35 2019 +0100
-
-    travis: Use a single meson invocation
-    
-    The prefix setting didn't take for some reason.
-    (Cherry picked from commit c1bb392b1df4023e9dec489facfa221a53499ddc)
 
-commit 7753fd9989e280783daeee1994d019155735dee5
+commit 8f8d358bad2d33de36686e8405ade8b5b921cafd
 Author: Adam Jackson <ajax@redhat.com>
-Date:   Fri Feb 22 11:50:05 2019 +0100
+Date:   Tue Jul 8 12:36:10 2014 -0400
 
-    gitlab: Skip the docker-in-docker step
+    ramdac: Remove core ramdac code
     
-    No idea which cult's cargo I was looking at there. Cuts about a minute
-    off the build time.
+    Now that there are no ramdac drivers this can go.
     
     Signed-off-by: Adam Jackson <ajax@redhat.com>
-    (Cherry picked from commit a41ccaa0857146e986f11360d4f2aeb3913af9a6)
 
-commit 524104e15c7169114e4fa3dd832990c58ee563a4
-Author: Peter Hutterer <peter.hutterer@who-t.net>
-Date:   Fri Feb 8 13:29:14 2019 +1000
+commit f0385fb420158ac3bc1c4c325431ffc5c62344bb
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Fri Feb 28 16:07:27 2014 -0500
 
-    Xi: lock the input thread for any pointer barrier list manipulation
+    ramdac: Remove ramdac drivers
     
-    The input thread checks the barriers for pointer positioning, swapping the
-    list out from underneath is considered impolite.
+    External RAMDACs are a very 1996 kind of thing, this code really doesn't
+    belong in the server.
     
-    Reported-by: Michel Dänzer <michel.daenzer@amd.com>
-    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
-    (cherry picked from commit 678d64aa2e929368b6d6f2b83bbf5540c4fa292d)
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
 
-commit ae9dda1e2620f402b434f10df581b0fdf0495ee8
+commit 937a5b78a2f6ea771132ff0f9ece708a23c1bdad
 Author: Peter Harris <pharris@opentext.com>
 Date:   Wed Jan 30 14:51:07 2019 -0500
 
@@ -3686,9 +14304,41 @@ Date:   Wed Jan 30 14:51:07 2019 -0500
     Restore the clockid split to fix the granularity of GetTimeInMicros.
     
     Signed-off-by: Peter Harris <pharris@opentext.com>
-    (cherry picked from commit 937a5b78a2f6ea771132ff0f9ece708a23c1bdad)
 
-commit 013c28a122a61beaf3a4ee7cc92b7ca2c92de7ab
+commit a093a88531599832811a1ba5cb85101af91a545e
+Author: Michel Dänzer <michel.daenzer@amd.com>
+Date:   Tue Jan 29 18:59:09 2019 +0100
+
+    present/wnmd: Allow flipping if the window pixmap matches the toplevel's
+    
+    Instead of testing window->redirectDraw.
+    
+    With Xwayland, the toplevel window is always redirected, so this would
+    unnecessarily preclude flipping there in some cases, e.g. with wlroots
+    based Wayland compositors or with fullscreen X11 windows in weston.
+    
+    Fixes issue #631.
+
+commit ff560488558deb299b0822a3e3bc66672f4c690f
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Wed Jan 23 14:23:40 2019 -0500
+
+    dri2: Stop pretending VGA arbitration matters
+    
+    The VGA arbiter controls the PCI bus' routing of legacy VGA resources,
+    specifically the video memory aperture at 0xa0000-0xb0000 (640k should
+    be etc.) and a handful of I/O ports. Since 128k is far too small for a
+    real framebuffer these days, every driver instead maps a linear version
+    of VRAM through the PCI BAR. And no DRI2 drivers ever need I/O port
+    access, because all operations they might be used for (legacy VGA CRTC
+    setup, mostly) happen on the kernel side.
+    
+    In other words, this just works, and we can stop breaking it.
+    
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+    Reviewed-by: Dave Airlie <airlied@redhat.com>
+
+commit d3a26bbf618507e1ca05b2bc99a880075b77db77
 Author: A. Wilcox <AWilcox@Wilcox-Tech.com>
 Date:   Sat Jan 26 15:37:56 2019 -0600
 
@@ -3702,10 +14352,8 @@ Date:   Sat Jan 26 15:37:56 2019 -0600
     
     Indeed, that PCI ID is missing from i965_pci_ids.  Adding it fixed the issue
     and allowed the system to work with i965_dri under modesetting.
-    
-    (cherry picked from commit d3a26bbf618507e1ca05b2bc99a880075b77db77)
 
-commit a51d7a730cfd82ab44ea5510eafdbe9d7043e706
+commit 709c6562975c3bea10dd0571527a4aac79a6bf6f
 Author: Adam Jackson <ajax@redhat.com>
 Date:   Tue Oct 16 12:58:25 2018 -0400
 
@@ -3715,9 +14363,8 @@ Date:   Tue Oct 16 12:58:25 2018 -0400
     clobbering it will do no good.
     
     Signed-off-by: Adam Jackson <ajax@redhat.com>
-    (cherry picked from commit 709c6562975c3bea10dd0571527a4aac79a6bf6f)
 
-commit 544d0e961cfa96043ed3e5a718a768444c4a4c4d
+commit bf991a5f989c5e6e726a3731f468b7b7d65d9f4a
 Author: Adam Jackson <ajax@redhat.com>
 Date:   Wed Jan 16 14:20:17 2019 -0500
 
@@ -3729,9 +14376,8 @@ Date:   Wed Jan 16 14:20:17 2019 -0500
     that strict.
     
     Signed-off-by: Adam Jackson <ajax@redhat.com>
-    (cherry picked from commit bf991a5f989c5e6e726a3731f468b7b7d65d9f4a)
 
-commit 2215e8c7cf06f46f9995c8a7817c7ede9774a551
+commit 086c2e3de55bbf0cbc1d97f7dc2db70a7f5e69e3
 Author: Adam Jackson <ajax@redhat.com>
 Date:   Mon Jan 14 12:42:00 2019 -0500
 
@@ -3741,9 +14387,32 @@ Date:   Mon Jan 14 12:42:00 2019 -0500
     attach the buffer for any particular pixmap. GetAttr seems more correct.
     
     Fixes: xorg/xserver#550
-    (cherry picked from commit 086c2e3de55bbf0cbc1d97f7dc2db70a7f5e69e3)
 
-commit 59e0b5f041eee92d0a51303082005ad8f053d8ca
+commit 6c1d720047b193f138e877e994cb4a4fb8e73753
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Oct 30 11:37:32 2018 -0400
+
+    agp: Make the legacy AGP interface optional
+    
+    The only thing using this anymore is the i810 driver, so this can safely
+    be disabled on non-i686 builds.
+    
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit 1e3f9ea14cced2ee894d072c977507ad43cb59c5
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Fri Jan 11 11:38:34 2019 -0500
+
+    randr: Remove funky indirection around the xf86 screen private key
+    
+    All of the null checks here are redundant, you can't get to those paths
+    unless RANDR's already been initialized. Delete them, and remove the
+    pointer too.
+    
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
+
+commit 30044b2253c2dd51e1aedb2f897159c657ca8f0d
 Author: Michel Dänzer <michel.daenzer@amd.com>
 Date:   Wed Dec 5 18:31:27 2018 +0100
 
@@ -3759,25 +14428,95 @@ Date:   Wed Dec 5 18:31:27 2018 +0100
     
     Fixes: 02ff0a5d7e32 "xf86RandR12: Fix XF86VidModeSetGamma triggering a
                          BadImplementation error"
-    (cherry picked from commit 30044b2253c2dd51e1aedb2f897159c657ca8f0d)
 
-commit 712d0e86aaee96ffe1ad6a708b9134889e47d1c6
+commit cc05c01925755310f027c61daa29648a10155f96
+Author: Rohan Garg <rohan@garg.io>
+Date:   Thu Dec 13 19:15:01 2018 +0100
+
+    glamor/glamor_egl.c: EGL_NATIVE_PIXMAP_KHR do not require contexts
+    
+    From https://www.khronos.org/registry/EGL/extensions/KHR/EGL_KHR_image_pixmap.txt
+    
+     * If <target> is EGL_NATIVE_PIXMAP_KHR, and <ctx> is not EGL_NO_CONTEXT,
+       the error EGL_BAD_PARAMETER is generated.
+    
+    Fixes: a5321ea4 ("Allow to create textured pixmaps from gbm_bo without using gem names")
+
+commit 88dd4cea51f7e461cb4859c06bfe641890caa97b
+Author: Rohan Garg <rohan@garg.io>
+Date:   Thu Dec 13 17:46:27 2018 +0100
+
+    glamor/egl: Drop a implicit depends on EGL_KHR_no_config_context
+    
+    Not all platforms provide EGL_KHR_no_config_context, this ensures
+    that eglCreateContext works on such platforms by querying for
+    a config.
+
+commit e3fb178617a579c98877a3baae14c4dfe4d55db8
 Author: Maya Rashish <maya@NetBSD.org>
 Date:   Thu Jan 10 14:55:17 2019 +0200
 
     xfree86: Try nouveau on NetBSD as well.
-    
-    (cherry picked from commit e3fb178617a579c98877a3baae14c4dfe4d55db8)
 
-commit ff1d1692e73b1729a6ced84bf58bcbe17f1c9d94
+commit bf2a7bb4ffbd199882fe4bd183561469833a9e6b
 Author: Maya Rashish <maya@NetBSD.org>
 Date:   Thu Jan 10 18:39:33 2019 +0200
 
     Fix typo in error message
+
+commit e8295c50209f2963fa2823e8de7e8363a38cd2d1
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Tue Jan 8 12:48:53 2019 +0100
+
+    xwayland: handle case without any crtc
+    
+    Xwayland creates and destroys the CRTC along with the Wayland outputs,
+    so there is possibly a case where the number of CRTC drops to 0.
+    
+    However, `xwl_present_get_crtc()` always return `crtcs[0]` which is
+    invalid when `numCrtcs` is 0.
+    
+    That leads to crash if a client queries the Present capabilities when
+    there is no CRTC, the backtrace looks like:
+    
+      #0  raise() from libc.so
+      #1  abort() from libc.so
+      #2  OsAbort() at utils.c:1350
+      #3  AbortServer() at log.c:879
+      #4  FatalError() at log.c:1017
+      #5  OsSigHandler() at osinit.c:156
+      #6  OsSigHandler() at osinit.c:110
+      #7  <signal handler called>
+      #8  main_arena() from libc.so
+      #9  proc_present_query_capabilities() at present_request.c:236
+      #10 Dispatch() at dispatch.c:478
+      #11 dix_main() at main.c:276
+    
+    To avoid returning an invalid pointer (`crtcs[0]`) in that case, simply
+    check for `numCrtcs` being 0 and return `NULL` in that case.
+    
+    Thanks to Michel Dänzer <michel.daenzer@amd.com> for pointing this as a
+    possible cause of the crash.
     
-    (cherry picked from commit bf2a7bb4ffbd199882fe4bd183561469833a9e6b)
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
+    Bugzilla: https://bugzilla.redhat.com/1609181
+
+commit bf5613f888e837641b9e16aacb36ffb43a9cccda
+Author: Roman Gilg <subdiff@gmail.com>
+Date:   Wed Jan 2 21:55:23 2019 +0100
+
+    xwayland: Fix wm_fd readin with no listen_fds
+    
+    Since 08843efc KWin was not able to start a Wayland session. Independently
+    of listen_fd_count add_client_fd must be called. Same holds for the
+    wm_selection_callback. Therefore just remove the condition.
+    
+    Bugzilla: https://bugs.freedesktop.org/109220
+    
+    Signed-off-by: Roman Gilg <subdiff@gmail.com>
 
-commit c091ea5e38b5c41eaf3b10c43dc043401e8251c5
+commit 7fb6338c68e158053295cb448faa5c559aa9990c
 Author: Alan Coopersmith <alan.coopersmith@oracle.com>
 Date:   Tue Jan 1 16:49:32 2019 -0800
 
@@ -3786,9 +14525,29 @@ Date:   Tue Jan 1 16:49:32 2019 -0800
     Fixes: xorg/xserver#469
     
     Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-    (cherry picked from commit 7fb6338c68e158053295cb448faa5c559aa9990c)
 
-commit 7b0f6102df3b18a048b791fe2304679b1eb2c9e7
+commit a3d01ee9d0b5e523b0771e2a26542ac15e29a33f
+Author: Michel Dänzer <michel.daenzer@amd.com>
+Date:   Wed Dec 19 10:11:22 2018 +0100
+
+    glamor: Remove unused format_for_pixmap helper
+    
+    Reviewed-by: Eric Anholt <eric@anholt.net>
+
+commit 2e256e8260648619e407b1de70fe43cf32819247
+Author: Michel Dänzer <michel.daenzer@amd.com>
+Date:   Wed Dec 19 11:10:10 2018 +0100
+
+    glamor: Allow HW acceleration for more RENDER formats
+    
+    As long as the storage format is compatible.
+    
+    v2:
+    * Remove explicit cases for formats handled by the default case.
+    
+    Reviewed-by: Eric Anholt <eric@anholt.net>
+
+commit 7e6faa5b3c05e0b7149ee840403885b0b40b5827
 Author: Michel Dänzer <michel.daenzer@amd.com>
 Date:   Wed Dec 19 10:06:23 2018 +0100
 
@@ -3797,9 +14556,84 @@ Date:   Wed Dec 19 10:06:23 2018 +0100
     Fixes x2r10g10b10 related rendercheck failures.
     
     Reviewed-by: Eric Anholt <eric@anholt.net>
-    (cherry picked from commit 7e6faa5b3c05e0b7149ee840403885b0b40b5827)
 
-commit 356cf07b8a8fe6faedf701ae259f8f077a234dd5
+commit d12881ea1d95bc8b189582da9e847a801927acce
+Author: Michel Dänzer <michel.daenzer@amd.com>
+Date:   Fri Dec 14 16:19:46 2018 +0100
+
+    Revert "ci: Work around broken python UTF8 handling in the CI docker image"
+    
+    This reverts commit 899d260701ff783254f8ead91dab8dc515d554f6.
+    
+    No longer necessary with the previous changes.
+    
+    Reviewed-by: Eric Anholt <eric@anholt.net>
+
+commit bc6998b728749015bfd93a85fbae48af777c9a34
+Author: Michel Dänzer <michel.daenzer@amd.com>
+Date:   Fri Dec 14 17:25:41 2018 +0100
+
+    gitlab-ci: Set LC_ALL=C.UTF-8
+    
+    Although piglit could now handle non-ASCII characters in the
+    environment, meson was still failing without this (even though it's
+    using Python 3).
+    
+    Reviewed-by: Eric Anholt <eric@anholt.net>
+
+commit 4aaaf69229be574d6d11084225ecd91446a15170
+Author: Michel Dänzer <michel.daenzer@amd.com>
+Date:   Wed Oct 10 10:31:12 2018 +0200
+
+    test: Use .../piglit instead of .../piglit-*.py
+    
+    The latter use Python 2 and break with any non-ASCII characters in the
+    environment, the former uses Python 3 and works fine in that case.
+    
+    Reviewed-by: Eric Anholt <eric@anholt.net>
+
+commit f56d8e2282a3d1344aa1300c78faede0071a3bfa
+Author: Michel Dänzer <michel.daenzer@amd.com>
+Date:   Fri Dec 14 11:04:24 2018 +0100
+
+    gitlab-ci: Docker image can be generated as part of pipeline
+    
+    This removes the dependency on an externally generated docker image, and
+    should make it easier to update the docker image or make other changes
+    related to it.
+    
+    This is based on Debian testing, because I'm most familiar with Debian.
+    But it should be easy to base it on another distro.
+    
+    v2:
+    * Use kaniko instead of docker-in-docker for image generation, so it can
+      also work in unprivileged runners.
+    * Drop piglit.conf & tetexec.cfg overrides, just make sure the files in
+      the image work.
+
+commit ed44f9cd6a4ccf6de7dda70432764b4da10f3f44
+Author: Michel Dänzer <michel.daenzer@amd.com>
+Date:   Thu Dec 13 18:29:31 2018 +0100
+
+    Drop Travis Linux build in favour of GitLab CI
+    
+    Fold build-travis-deps.sh into .gitlab-ci.yml.
+    
+    Preparation for the next change, which would break the Travis Linux
+    build.
+    
+    Reviewed-by: Eric Anholt <eric@anholt.net>
+
+commit 0e541b10933377572373da48d1f2932ff095dcde
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Thu Dec 13 23:00:32 2018 +0000
+
+    meson: Add misc unit tests
+    
+    v2:
+    has_link_argument requires meson 0.46.0
+
+commit fde27b9b4814b18aca6ec587bd3cfe9ab04b0c72
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Wed Nov 28 10:05:49 2018 +1000
 
@@ -3811,9 +14645,40 @@ Date:   Wed Nov 28 10:05:49 2018 +1000
     
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
     Tested-by: Michel Dänzer michel.daenzer@amd.com
-    (cherry picked from commit fde27b9b4814b18aca6ec587bd3cfe9ab04b0c72)
 
-commit c44eee243e6f4e488b586ad02e4fd00f587ebb49
+commit a7472da94136ef977b8d6af956a15767736236ea
+Author: Michel Daenzer <michel@daenzer.net>
+Date:   Wed Dec 12 18:34:36 2018 +0100
+
+    Make artifacts of piglit results if job fails
+    
+    Can be useful for figuring out what caused the failure.
+
+commit c1bb392b1df4023e9dec489facfa221a53499ddc
+Author: Michel Daenzer <michel@daenzer.net>
+Date:   Wed Dec 12 12:55:57 2018 +0100
+
+    travis: Use a single meson invocation
+    
+    The prefix setting didn't take for some reason.
+
+commit c73116540205c20162befe935ef608f4bed3af0a
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Fri Nov 30 13:09:53 2018 +0100
+
+    dix: cache ResourceClientBits() value
+    
+    The `LimitClient` is set once and for all at startup, whereas the
+    function `ResourceClientBits()` which returns the client field offset
+    within the XID based on the value of `LimitClient` can be called
+    repeatedly.
+    
+    Small optimization, cache the result of `ilog2()`, that saves running
+    the same loop over and over each time `ResourceClientBits()` is called.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+
+commit 48b1af2718ab81c66f565438553415c05f1faa5c
 Author: Ilia Mirkin <imirkin@alum.mit.edu>
 Date:   Mon Dec 10 23:34:11 2018 -0500
 
@@ -3824,27 +14689,42 @@ Date:   Mon Dec 10 23:34:11 2018 -0500
     
     Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
     Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-    (cherry picked from commit 48b1af2718ab81c66f565438553415c05f1faa5c)
 
-commit 10609630e753b475566be27b186af4b2e290fdc6
+commit 899d260701ff783254f8ead91dab8dc515d554f6
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Dec 11 12:30:59 2018 -0500
+
+    ci: Work around broken python UTF8 handling in the CI docker image
+    
+    Gitlab very kindly exposes the details of the git commit message (among
+    much else) in the environment. Unfortunately, piglit tries to handle the
+    environment in non-UTF8-safe ways, which means if the top-of-tree commit
+    mentions non-ASCII characters (say, in the author's name) then all the
+    tests fail and so does the pipeline.
+    
+    Fortunately none of those variables are things our piglit invocation
+    needs. Since I've failed to rebuild the docker image as yet, just clear
+    the likely variables from the environment before running piglit.
+    
+    This-makes-me: ☹
+
+commit 82ed89c0f8b18d8214430580dc80c8d3e37bef33
 Author: Adam Jackson <ajax@redhat.com>
 Date:   Thu Nov 29 14:48:11 2018 -0500
 
     automake: Distribute meson's configure header templates
     
     Fixes: xorg/xserver#17
-    (cherry picked from commit 82ed89c0f8b18d8214430580dc80c8d3e37bef33)
 
-commit f5a77233b983eb06eb727d25148b68d1bc410022
+commit a425eee6dce3b0cfd18b591907e8302a91b648c6
 Author: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
 Date:   Fri Nov 9 12:34:59 2018 +0000
 
     present: fix compile warning with debug traces
     
     Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
-    (cherry picked from commit a425eee6dce3b0cfd18b591907e8302a91b648c6)
 
-commit 4e12cba65682e97b056d8a8207189d4cf9c31862
+commit 7a44e8d4007b9c3ca55a5cc3f5e98601565311c7
 Author: Lyude Paul <lyude@redhat.com>
 Date:   Tue Nov 13 20:14:10 2018 -0500
 
@@ -3871,66 +14751,24 @@ Date:   Tue Nov 13 20:14:10 2018 -0500
     going to be used anymore, even in legacy mode.
     
     Signed-off-by: Lyude Paul <lyude@redhat.com>
-    (cherry picked from commit 7a44e8d4007b9c3ca55a5cc3f5e98601565311c7)
 
-commit 652918e736bcc577e221184415dcf61c05ac7bfb
+commit 17a22ad948009badbc79bbcd9a067004c98f5744
 Author: Alan Coopersmith <alan.coopersmith@oracle.com>
 Date:   Sun Nov 25 12:56:29 2018 -0800
 
     Update configure.ac bug URL for gitlab migration
     
     Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-    (cherry picked from commit 17a22ad948009badbc79bbcd9a067004c98f5744)
 
-commit 40b22a0571d422473a7a324daa65f6a768181644
+commit 5d097c2a20fce44cdb9d5c302d46bc7fa16edfec
 Author: Alan Coopersmith <alan.coopersmith@oracle.com>
 Date:   Sun Nov 18 15:49:27 2018 -0800
 
     Update README for gitlab migration
     
     Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-    (cherry picked from commit 5d097c2a20fce44cdb9d5c302d46bc7fa16edfec)
-
-commit a352f979545723054b0a74862a56dc53b1be93fb
-Author: Olivier Fourdan <ofourdan@redhat.com>
-Date:   Tue Jan 8 12:48:53 2019 +0100
-
-    xwayland: handle case without any crtc
-    
-    Xwayland creates and destroys the CRTC along with the Wayland outputs,
-    so there is possibly a case where the number of CRTC drops to 0.
-    
-    However, `xwl_present_get_crtc()` always return `crtcs[0]` which is
-    invalid when `numCrtcs` is 0.
-    
-    That leads to crash if a client queries the Present capabilities when
-    there is no CRTC, the backtrace looks like:
-    
-      #0  raise() from libc.so
-      #1  abort() from libc.so
-      #2  OsAbort() at utils.c:1350
-      #3  AbortServer() at log.c:879
-      #4  FatalError() at log.c:1017
-      #5  OsSigHandler() at osinit.c:156
-      #6  OsSigHandler() at osinit.c:110
-      #7  <signal handler called>
-      #8  main_arena() from libc.so
-      #9  proc_present_query_capabilities() at present_request.c:236
-      #10 Dispatch() at dispatch.c:478
-      #11 dix_main() at main.c:276
-    
-    To avoid returning an invalid pointer (`crtcs[0]`) in that case, simply
-    check for `numCrtcs` being 0 and return `NULL` in that case.
-    
-    Thanks to Michel Dänzer <michel.daenzer@amd.com> for pointing this as a
-    possible cause of the crash.
-    
-    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
-    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
-    Bugzilla: https://bugzilla.redhat.com/1609181
-    (cherry picked from commit e8295c50209f2963fa2823e8de7e8363a38cd2d1)
 
-commit 210cd529064348de7d4f9a9050b0cf68f8fd326c
+commit e6cd1c9bdefe83e7d99b703a68d26eebb451f889
 Author: Michel Dänzer <michel.daenzer@amd.com>
 Date:   Thu Nov 15 17:16:59 2018 +0100
 
@@ -3944,10 +14782,8 @@ Date:   Thu Nov 15 17:16:59 2018 +0100
     
     xwl_present_timer_callback neither completes async flips nor releases
     buffers, so the timer isn't needed for the buffer release queue.
-    
-    (cherry picked from commit e6cd1c9bdefe83e7d99b703a68d26eebb451f889)
 
-commit 7c28b0e34ecbe9842193733dfd86097c06921406
+commit f541615342ce6bfb0e6d4e68deb3a924a87e8ba9
 Author: Michel Dänzer <michel.daenzer@amd.com>
 Date:   Fri Nov 9 17:18:53 2018 +0100
 
@@ -3956,10 +14792,8 @@ Date:   Fri Nov 9 17:18:53 2018 +0100
     Fixes issue #12. Presumably the problem was that Present operations on
     unmapped windows were executed immediately instead of only when reaching
     the target MSC.
-    
-    (cherry picked from commit f541615342ce6bfb0e6d4e68deb3a924a87e8ba9)
 
-commit 46135957095ec954e21107d1001452e9533ef2ee
+commit 8c9538573cb9a342897eb3fb4b0c1e4ed917bd0e
 Author: Michel Dänzer <michel.daenzer@amd.com>
 Date:   Thu Nov 1 18:24:28 2018 +0100
 
@@ -3971,10 +14805,8 @@ Date:   Thu Nov 1 18:24:28 2018 +0100
     
     Fixes these symptoms when switching from fullscreen to windowed mode in
     sauerbraten.
-    
-    (cherry picked from commit 8c9538573cb9a342897eb3fb4b0c1e4ed917bd0e)
 
-commit 98f41563e6599eb762e6a3ec12f99ba6b5388039
+commit 6b016d58d23d16eaae9908a92ed90547d1926317
 Author: Michel Dänzer <michel.daenzer@amd.com>
 Date:   Thu Nov 1 18:44:24 2018 +0100
 
@@ -3990,10 +14822,229 @@ Date:   Thu Nov 1 18:44:24 2018 +0100
     window, followed by other drawing requests using the window as the
     destination, but nothing triggering xwl_present_flips_stop. The damage
     from the latter drawing requests would continue being ignored.
+
+commit 8738ce85df535bdfdfecfce1c0d64e209cc6e508
+Author: Ray Strode <rstrode@redhat.com>
+Date:   Fri Nov 16 14:36:55 2018 -0500
+
+    dix: ensure work queues are cleared on reset
+    
+    If the server resets, most client workqueues are cleaned up as the
+    clients are killed.
+    
+    The one exception is the server's client, which is exempt from
+    the killing spree.
+    
+    If that client has a queued work procedure active, it won't get
+    cleared on reset.
+    
+    This commit ensures it gets cleared too.
+
+commit 364d64981549544213e2bca8de6ff8a5b2b5a69e
+Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
+Date:   Tue Oct 30 18:43:51 2018 +0100
+
+    dix: do not send focus event when grab actually does not change
+    
+    c67f2eac5651 ("dix: always send focus event on grab change") made dix
+    always sent events when it's a NotifyGrab or NotifyUngrab, even if
+    from == to, because 'from' can just come from a previous XSetInputFocus
+    call.
+    
+    However, when an application calls XGrabKeyboard several times on
+    the same window, we are now sending spurious FocusOut+FocusIn with
+    NotifyGrab, even if the grab does not actually change. This makes screen
+    readers for blind people spuriously emit activity events which disturb
+    screen reading workflow when e.g. switching between menus.
+    
+    This commit avoids calling DoFocusEvents in that precise case, i.e. when
+    oldWin is a previous grab and the new grab is the same window.
+    
+    Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit 82f8cf8990009f6cac567814dd6b7fd41cfad82d
+Author: Manoj Gupta <manojgupta@chromium.org>
+Date:   Tue Nov 13 11:35:25 2018 -0800
+
+    config/udev: Include header <sys/sysmacros.h> to use major/minor
+    
+    glibc 2.25 has dropped sys/sysmacros.h from sys/types.h, so add
+    it explicitly in config/udev.c.
+    
+    This is similar to the commit 84e3b96b531363e47f6789aacfcae4aa60135e2e
+    
+    Signed-off-by: Manoj Gupta <manojgupta@chromium.org>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit fbdd4d679a7d020f78f7b877033b83e00f5a0f73
+Author: Michal Srb <msrb@suse.com>
+Date:   Mon Nov 12 13:51:48 2018 +0100
+
+    dix/window: Use ConfigureWindow instead of MoveWindow
+    
+    The screensaver can regularly move its window to random offsets. It should
+    use the ConfigureWindow function instead of calling the Screen's MoveWindow
+    directly. Some MoveWindow implementations, such as compMoveWindow, rely on
+    Screen's ConfigNotify being called first as it happens in ConfigureWindow.
+    
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit 23752b3ef889ada7b705c51f478f5817e5caaed3
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Thu Oct 25 13:13:13 2018 -0400
+
+    os: Establish new connections synchronously not on the work queue
+    
+    This contortion made a bit more sense before we got SetNotifyFd and
+    friends, but now there's no need for it.
+    
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 69d8ea4a49793a94f821d1a328856901a1c02a5a
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Thu Oct 25 11:22:19 2018 -0400
+
+    xkb: Write the _XKB_RULES_NAMES window property synchronously
+    
+    I can't think of a good reason why this would need to be deferred to the
+    work queue. When we get to this point we're never in the middle of
+    request processing, so we can't corrupt the event/reply stream.
+    
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 0a95a8ae625accaf0ef5e2372ef7f65a52658d9d
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Oct 23 15:07:48 2018 -0400
+
+    xwayland: Move command line fd initialization to InitOutput
+    
+    Again, as this is DDX state not screen state, run it from DDX setup not
+    screen setup.
+    
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit 08843efc5940563a2275c654804c999cfc772987
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Oct 23 14:33:24 2018 -0400
+
+    xwayland: Move wm_fd and listen_fds out of xwl_screen
+    
+    There are logically server state not screen state. Not that multiple
+    screens works, at the moment, but that's no excuse to be sloppy.
+    
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit 2118e4471be037f2e642f35ff0494aa09177c9ee
+Author: Marco Trevisan (Treviño) <mail@3v1n0.net>
+Date:   Sat Oct 27 03:54:09 2018 +0200
+
+    dix/events: reuse grab pointer value
+
+commit 35e5a76cc1d02801fadd49d12e60664b02e4bebc
+Author: Marco Trevisan (Treviño) <mail@3v1n0.net>
+Date:   Fri Oct 26 19:52:49 2018 +0200
+
+    Xi: Use current device active grab to deliver touch events if any
+    
+    When Retrieving touch delivery data we need to check if we have an active
+    grab on such device, and in that case use it to delivery events.
+    If we don't do this, when rejecting the touch events in DeactivatePointerGrab,
+    we will end-up in creating an implicit grab that will change the device
+    deviceGrab's state, causing a recursion during TouchEndTouch.
+    
+    Fixes #7
+    
+    https://bugs.freedesktop.org/show_bug.cgi?id=96536
+
+commit 700505144fcdd55b4bd1f6c30b7aa01bf848af11
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sat Nov 10 15:00:31 2018 -0800
+
+    Remove obsolete B16 & B32 tags in struct definitions
+    
+    They were defined as empty macros on all platforms except for the
+    long unsupported Cray systems which needed to use bitfields to define
+    types smaller than 64-bits.
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 6ef025a8728282db6a233bde55789b114f916abb
+Author: Michel Dänzer <michel.daenzer@amd.com>
+Date:   Tue Nov 6 11:33:19 2018 +0100
+
+    Revert "dix: Work around non-premultiplied ARGB cursor data harder"
+    
+    This reverts commit b45c74f0f2868689e7ed695b33e8c60cd378df0b.
+    
+    It broke the cursor in other games. Apparently those use cursor data
+    with premultiplied alpha, but with some pixels having r/g/b values
+    larger than the alpha value (which corresponds to original r/g/b
+    values > 1.0), triggering the workaround.
+    
+    Seems the cure turned out worse than the disease, so revert.
+    
+    Bugzilla: https://bugs.freedesktop.org/108650
+
+commit c901adc327bce4c0d19caf350cbcb0cd5254f306
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Wed Oct 31 11:43:33 2018 -0400
+
+    modesetting: Hush an unimportant log message
+    
+    Verbosity level 0 is "always print", just make it a normal message.
+    
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit 52451f1f89890e3088c6fd9d7da0708fd9263950
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Wed Sep 5 12:10:20 2018 -0400
+
+    dix: De-ugly the prototype for Add{GPU,}Screen
+
+commit e50c85f4ebf559a3bac4817b41074c43d4691779
+Author: Eric Anholt <eric@anholt.net>
+Date:   Fri Oct 26 17:47:30 2018 -0700
+
+    Fix segfault on probing a non-PCI platform device on a system with PCI.
+    
+    Some Broadcom set-top-box boards have PCI busses, but the GPU is still
+    probed through DT.  We would dereference a null busid here in that
+    case.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+
+commit 3297a1c871a25647d9d08b5f528e640cc2a1d2c2
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Wed Oct 24 16:30:40 2018 -0400
+
+    include: Remove ___CLIENTSIGNALALL_DEFINED___ copypasta
+    
+    ___CLIENTSIGNAL_DEFINED___ is a hack to work around the declaration of
+    ClientSignal both in our own headers and in <X11/include/fontproto.h>,
+    the latter of which is properly part of libXfont (1, only) but packaged
+    in xorgproto because we have made some mistakes. ClientSignalAll needs
+    no such workaround.
+    
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+    Reviewed-by: Eric Anholt <eric@anholt.net>
+
+commit 06f448d4af905412b1e0b4074f7763ec85f2b6e8
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Wed Oct 24 16:23:04 2018 -0400
+
+    include: Stop including <X11/fonts/fontproto.h>
     
-    (cherry picked from commit 6b016d58d23d16eaae9908a92ed90547d1926317)
+    Despite being packaged in xorgproto (formerly fontsproto), fontproto.h
+    is actually a list of the ABI libXfont version 1 expected of the X
+    server. We switched to libXfont2 three years ago, this is unnecessary.
+    
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+    Reviewed-by: Eric Anholt <eric@anholt.net>
 
-commit f393801dbbe89bce716a8ceeb2b5c8440b9021ce
+commit ace551d8a2603e37b18237a52f62d627c75d9e2a
 Author: Michel Dänzer <michel.daenzer@amd.com>
 Date:   Thu Oct 18 17:42:01 2018 +0200
 
@@ -4017,9 +15068,8 @@ Date:   Thu Oct 18 17:42:01 2018 +0200
       the Wayland server doesn't send a frame event.
     
     Bugzilla: https://bugs.freedesktop.org/106713
-    (cherry picked from commit ace551d8a2603e37b18237a52f62d627c75d9e2a)
 
-commit e646e3054a3e1dbe8ff3906a546897246bcc78f0
+commit 2bfc46d4147dc0bec4cdbb80431a0f4cc1d3b030
 Author: Michel Dänzer <michel.daenzer@amd.com>
 Date:   Thu Oct 18 17:36:24 2018 +0200
 
@@ -4027,10 +15077,8 @@ Date:   Thu Oct 18 17:36:24 2018 +0200
     
     And consolidate more code from xwl_present_timer_callback and
     xwl_present_frame_callback in it.
-    
-    (cherry picked from commit 2bfc46d4147dc0bec4cdbb80431a0f4cc1d3b030)
 
-commit 47aed554b7c12c0c7f496c86a435dddaa51ae9bf
+commit 5e8b9a3a563047e3998d45e761f7a50e4b0f6cb3
 Author: Michel Dänzer <michel.daenzer@amd.com>
 Date:   Wed Oct 24 11:23:05 2018 +0200
 
@@ -4049,10 +15097,8 @@ Date:   Wed Oct 24 11:23:05 2018 +0200
     Calling xwl_present_reset_timer explicitly passes NULL to TimerSet if
     step 1 freed xwl_present_window->frame_timer, and it will allocate a new
     one.
-    
-    (cherry picked from commit 5e8b9a3a563047e3998d45e761f7a50e4b0f6cb3)
 
-commit cf8e064ec0bed45b8cda9ae390c7af78d8ede50f
+commit 036794bebce72a3fa2f95996d2e537ff568e0ff1
 Author: Olivier Fourdan <ofourdan@redhat.com>
 Date:   Fri Oct 19 16:04:32 2018 +0200
 
@@ -4093,9 +15139,20 @@ Date:   Fri Oct 19 16:04:32 2018 +0200
     Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
     Reviewed-by: Marco Trevisan <mail@3v1n0.net>
     Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
-    (cherry picked from commit 036794bebce72a3fa2f95996d2e537ff568e0ff1)
 
-commit f89518e17f7d507734af212785e0b3e47954f603
+commit 32abc222880119eba0adf17897c3d8d1cc1f17db
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Mon Oct 22 11:54:31 2018 +0200
+
+    present: Remove `present_event_abandon()`
+    
+    This has never been actually implemented, do not tempt people to use it.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Michel Daenzer <michel.daenzer@amd.com>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit b768b7d6cec41b8b320c468ec41aab5a8b49b27b
 Author: Olivier Fourdan <ofourdan@redhat.com>
 Date:   Mon Oct 22 11:48:25 2018 +0200
 
@@ -4144,30 +15201,43 @@ Date:   Mon Oct 22 11:48:25 2018 +0200
     Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
     Reviewed-by: Michel Daenzer <michel.daenzer@amd.com>
     Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
-    (cherry picked from commit b768b7d6cec41b8b320c468ec41aab5a8b49b27b)
 
-commit 64f5e6ec2d297f90e9b9785a1cb7285d609a1877
-Author: Michel Dänzer <michel.daenzer@amd.com>
-Date:   Fri Oct 19 18:27:37 2018 +0200
+commit 8d048a1fd3e3806c408192d33e62859f5bc5c343
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Oct 23 14:28:21 2018 -0400
 
-    xwayland: Plug leaks in xwl_present_sync_callback
-    
-    xwl_present_window->sync_callback was leaked.
+    os: Factor out CHECK_FOR_REQUIRED_ARGUMENTS
     
-    The event memory was leaked if the corresponding buffer had already been
-    released.
+    Lifted from vfb. xfree86 had almost the same thing but unparameterized,
+    port it to the vfb style.
     
-    (cherry picked from commit cb0de153bf0c486da7e968ab0f258c9c0c9ed34a)
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
 
-commit 971d418113740cae2d7d393850bad4926d1a7e86
-Author: Adam Jackson <ajax@redhat.com>
-Date:   Thu Oct 25 09:03:18 2018 -0400
+commit b45c74f0f2868689e7ed695b33e8c60cd378df0b
+Author: Michel Dänzer <michel.daenzer@amd.com>
+Date:   Thu Oct 25 10:50:03 2018 +0200
 
-    xserver 1.20.3
+    dix: Work around non-premultiplied ARGB cursor data harder
     
-    Signed-off-by: Adam Jackson <ajax@redhat.com>
+    Turns out some apps (e.g. the Civilization VI game) use
+    non-premultiplied cursor data which doesn't have any pixels with 0 alpha
+    but non-0 non-alpha, but can still result in visual artifacts.
+    
+    This uses the method suggested by Kamil in
+    https://bugs.freedesktop.org/92309#c19: check for pixels where any
+    colour component value is larger than the alpha value, which isn't
+    possible with premultiplied alpha.
+    
+    There can still be non-premultiplied data which won't be caught by this,
+    but that should result in slightly incorrect colours and/or blending at
+    the worst, not wildly incorrect colours such as shown in the bug report
+    below.
+    
+    Bugzilla: https://bugs.freedesktop.org/108355
+    Suggested-by: Kamil Paral <kamil.paral@gmail.com>
 
-commit da15c7413916f754708c62c2089265528cd661e2
+commit 248d164eae27f1f310266d78e52f13f64362f81e
 Author: Matthieu Herrb <matthieu@herrb.eu>
 Date:   Tue Oct 23 21:29:09 2018 +0200
 
@@ -4179,9 +15249,8 @@ Date:   Tue Oct 23 21:29:09 2018 +0200
     
     Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
     Reviewed-by: Adam Jackson <ajax@redhat.com>
-    (cherry picked from commit 248d164eae27f1f310266d78e52f13f64362f81e)
 
-commit 8a59e3b7dbb30532a7c3769c555e00d7c4301170
+commit 50c0cf885a6e91c0ea71fb49fa8f1b7c86fe330e
 Author: Matthieu Herrb <matthieu@herrb.eu>
 Date:   Tue Oct 23 21:29:08 2018 +0200
 
@@ -4199,9 +15268,120 @@ Date:   Tue Oct 23 21:29:08 2018 +0200
     Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
     Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
     Reviewed-by: Adam Jackson <ajax@redhat.com>
-    (cherry picked from commit 50c0cf885a6e91c0ea71fb49fa8f1b7c86fe330e)
 
-commit cfc3dec09e1a56bb050ba31bde0bbf499596063a
+commit 08ff37d05a04a1ceed6086cfceae9c34331cb633
+Author: Andreas Fett <a.fett@gmx.de>
+Date:   Mon Oct 22 22:03:22 2018 +0200
+
+    os/xdmcp: Fix binding of ipv6 source address
+    
+    Choose the socket fd of the correct address family based
+    on the address family of the argument to the -from option.
+    
+    Fixes: xorg/xserver#4
+
+commit 96e00730e7ab4a5a2bea453b0ce84e4f8c93acd8
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Wed Oct 24 15:00:09 2018 -0400
+
+    xfree86: bump video ABI version to 25.0
+    
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit cb0de153bf0c486da7e968ab0f258c9c0c9ed34a
+Author: Michel Dänzer <michel.daenzer@amd.com>
+Date:   Fri Oct 19 18:27:37 2018 +0200
+
+    xwayland: Plug leaks in xwl_present_sync_callback
+    
+    xwl_present_window->sync_callback was leaked.
+    
+    The event memory was leaked if the corresponding buffer had already been
+    released.
+
+commit 53d32c94f39b4a89f70fed2e102c5fb5d6cae8bc
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Oct 23 14:09:55 2018 -0400
+
+    dix: Remove the magic WhenMapped backing store hack
+    
+    Automatic compositing exists, if that's what you want then use it.
+    
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit 382c26dade81a4c629307a3bfe6f5cca5af640e0
+Author: Michel Dänzer <michel.daenzer@amd.com>
+Date:   Fri Oct 5 12:24:23 2018 +0200
+
+    glamor: Add support for exporting depth 15/8 pixmaps
+    
+    This allows X to run with glamor at these depths.
+
+commit a2d188c7db1baaf21b42c2e8bccf54c8d5486548
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Mon Oct 8 16:38:01 2018 +0200
+
+    xwayland: keep `xwl_present_timer_callback()` private
+    
+    `xwl_present_timer_callback()` is initially marked a private and later
+    implemented as public.
+    
+    Let's keep that private, shall we.
+    
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+
+commit 0816e8fca6194dfb4cc94c3a7fcb2c7f2a921386
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Sep 18 14:37:51 2018 -0400
+
+    linux: Make platform device probe less fragile
+    
+    At the point where xf86BusProbe runs we haven't yet taken our own VT,
+    which means we can't perform drm "master" operations on the device. This
+    is tragic, because we need master to fish the bus id string out of the
+    kernel, which we can only do after drmSetInterfaceVersion, which for
+    some reason stores that string on the device not the file handle and
+    thus needs master access.
+    
+    Fortunately we know the format of the busid string, and it happens to
+    almost be the same as the ID_PATH variable from udev. Use that instead
+    and stop calling drmSetInterfaceVersion.
+    
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit 71703e4e8bd00719eefad53c2ed6c604079f87ea
+Author: rpm-build <rpm-build>
+Date:   Wed Oct 17 09:00:59 2018 +1000
+
+    xfree86: ensure the readlink buffer is null-terminated
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Dave Airlie <airlied@redhat.com>
+
+commit ff91c696ff8f5f56da40e107cb5c321539758a81
+Author: Michal Srb <msrb@suse.com>
+Date:   Tue Oct 16 09:32:13 2018 +0200
+
+    xfree86: Only switch to original VT if it is active.
+    
+    If the X server is terminated while its VT is not active, it should
+    not change the current VT.
+    
+    v2: Query current state in xf86CloseConsole using VT_GETSTATE instead of
+        keeping track in xf86VTEnter/xf86VTLeave/etc.
+
+commit 7c25439f0db4c20a4eab4ed44262eb396305f58a
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Tue Oct 16 10:37:16 2018 +1000
+
+    xwayland: fix a realloc OOM error case
+    
+    Found by coverity
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit bd5fe7593fd0df236f3b2be1f062166ddba7d67c
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Tue Oct 16 09:42:51 2018 +1000
 
@@ -4211,17 +15391,16 @@ Date:   Tue Oct 16 09:42:51 2018 +1000
     value.
     
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-    (cherry picked from commit bd5fe7593fd0df236f3b2be1f062166ddba7d67c)
 
-commit 2a0c6c15c35cd262e7cdb86dcc43cb1aeb714c8e
-Author: Adam Jackson <ajax@redhat.com>
-Date:   Mon Oct 15 11:17:35 2018 -0400
+commit dda2323d239a48e50ac9fd6617d7b630d8a14235
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Tue Oct 16 09:39:54 2018 +1000
 
-    xserver 1.20.2
+    xwayland: make a if noop clearer to the compiler/coverity
     
-    Signed-off-by: Adam Jackson <ajax@redhat.com>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
 
-commit f5dc787fc9bb102e4eea477d1817e35370084ea2
+commit fc78bcca21e767697de6ad4d8e03b6728856f613
 Author: Adam Jackson <ajax@redhat.com>
 Date:   Wed Oct 10 14:09:11 2018 -0400
 
@@ -4229,9 +15408,8 @@ Date:   Wed Oct 10 14:09:11 2018 -0400
     
     Fixes: https://gitlab.freedesktop.org/xorg/driver/xf86-video-fbdev/issues/9
     Signed-off-by: Adam Jackson <ajax@redhat.com>
-    (cherry picked from commit fc78bcca21e767697de6ad4d8e03b6728856f613)
 
-commit 4795c069a503144ea31f01de0c039f32d9880292
+commit af151895f3cb1755a7a5631f2398a3d3b219cbef
 Author: Adam Jackson <ajax@redhat.com>
 Date:   Fri Oct 5 14:50:20 2018 -0400
 
@@ -4244,9 +15422,99 @@ Date:   Fri Oct 5 14:50:20 2018 -0400
     crash. Notice this case and fail gently.
     
     Signed-off-by: Adam Jackson <ajax@redhat.com>
-    (cherry picked from commit af151895f3cb1755a7a5631f2398a3d3b219cbef)
 
-commit 1e3c5d614ee33d9eac1d2cf6366feeb8341fc0f4
+commit 32677ce03d793a1f2aa8871112eb3d19b3cb762f
+Author: Alexander Volkov <a.volkov@rusbitech.ru>
+Date:   Mon Feb 26 19:41:18 2018 +0300
+
+    os/xdmcp: Don't create a new socket in XdmcpReset()
+    
+    xdmcpSocket survives during the reset, there is no
+    need to create a new one.
+    
+    This commit restores logic that was broken by
+    49c0f2413d32fdfe36e45861fcb32aaeab633094 in Xorg 1.19.
+    
+    Signed-off-by: Alexander Volkov <a.volkov@rusbitech.ru>
+
+commit 1bd5d0a53c5ff4169c5a6704c1c4b276f998b938
+Author: Pierre Ossman <ossman@cendio.se>
+Date:   Wed Oct 3 10:28:52 2018 +0200
+
+    Switch automatic composite update to WorkQueue
+    
+    It is currently (ab)using the screen BlockHandler callback to do
+    this. But this can cause problems with other extension as their
+    block handlers might have executed before Composite's. And the
+    operations Composite does might result in them wanting to change
+    timeouts.
+    
+    Practically this caused problems for TigerVNC's VNC extension which
+    failed to send out updates for Composite's screen updates.
+
+commit 43a0f9a5dbb469f4f403a8530f33be67618933b8
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Mon Oct 1 11:42:37 2018 -0400
+
+    modesetting: Don't free(dst) in drmmode_prop_info_copy
+    
+    The destination is always either on the stack or in the middle of some
+    struct.
+    
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit 361894497c6802b62c2da4a3dc7e98939fb24404
+Author: Olivier Fourdan <ofourdan@redhat.com>
+Date:   Wed Sep 26 15:40:32 2018 +0200
+
+    xwayland: search for a render node to use
+    
+    wl_drm's protocol "device" event provides the path to the DRM device,
+    which may not be a render node, thus causing Xwayland to fall back to
+    DRM authentication which may fail if the user has switched to another
+    VT while Xwayland is starting.
+    
+    Search for a render node corresponding to the given DRM device and try
+    to use it instead, as render nodes do not need DRM authentication and
+    Xwayland can make use of them if it can find one.
+    
+    Closes: https://bugs.freedesktop.org/108038
+    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+
+commit 03b2125005b1c8d4eb62a4173a74458bbe72807b
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Aug 7 15:40:13 2018 -0400
+
+    dix: Remove LegalModifier()
+    
+    This hasn't done anything besides return TRUE in a long long time.
+    
+    Reviewed-by: Eric Anholt <eric@anholt.net>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit a23eba2a91024d27da45e5aee1f4215f7ec2ae82
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Mon Nov 20 14:28:13 2017 -0500
+
+    dix: Merge AbortDDX into ddxGiveUp
+    
+    These are so close to identical that most DDXes implement one in terms
+    of the other. All the relevant cases can be distinguished by the error
+    code, so merge the functions together to make things simpler.
+    
+    Reviewed-by: Eric Anholt <eric@anholt.net>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit d78ac2f15913bf6f00e06986cc7db0ade9ebd806
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Aug 7 15:16:16 2018 -0400
+
+    mi: Factor out miSaveScreen
+    
+    Reviewed-by: Eric Anholt <eric@anholt.net>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit 0a9415cf793babed1f28c61f8047d51de04f1528
 Author: Adam Jackson <ajax@redhat.com>
 Date:   Fri Sep 14 11:33:43 2018 -0400
 
@@ -4278,53 +15546,45 @@ Date:   Fri Sep 14 11:33:43 2018 -0400
     
     Reviewed-by: Eric Anholt <eric@anholt.net>
     Signed-off-by: Adam Jackson <ajax@redhat.com>
-    (cherry picked from commit 0a9415cf793babed1f28c61f8047d51de04f1528)
 
-commit b58aa8ed9b0a052d615d34b103aa54ce357df12e
-Author: Alexander Volkov <a.volkov@rusbitech.ru>
-Date:   Mon Feb 26 19:41:18 2018 +0300
+commit feca61cdb5351bbe178f7083938a973703aff866
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Thu Sep 27 22:23:14 2018 +0100
 
-    os/xdmcp: Don't create a new socket in XdmcpReset()
-    
-    xdmcpSocket survives during the reset, there is no
-    need to create a new one.
-    
-    This commit restores logic that was broken by
-    49c0f2413d32fdfe36e45861fcb32aaeab633094 in Xorg 1.19.
-    
-    Signed-off-by: Alexander Volkov <a.volkov@rusbitech.ru>
-    (cherry picked from commit 32677ce03d793a1f2aa8871112eb3d19b3cb762f)
+    test: Initialize the pixmap in damage test
 
-commit b1215fb075b0166d5742c72041f58d512273bb50
-Author: Pierre Ossman <ossman@cendio.se>
-Date:   Wed Oct 3 10:28:52 2018 +0200
+commit d1c00c859c6676fbb540420c9055788bc19cb18f
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Aug 28 15:58:54 2018 -0400
 
-    Switch automatic composite update to WorkQueue
-    
-    It is currently (ab)using the screen BlockHandler callback to do
-    this. But this can cause problems with other extension as their
-    block handlers might have executed before Composite's. And the
-    operations Composite does might result in them wanting to change
-    timeouts.
+    xfree86: Remove -flippixels
     
-    Practically this caused problems for TigerVNC's VNC extension which
-    failed to send out updates for Composite's screen updates.
+    No supported driver supports 1bpp anymore, nor has in a very long time.
+    This option only worked with vgahw anyway.
     
-    (cherry picked from commit 1bd5d0a53c5ff4169c5a6704c1c4b276f998b938)
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
 
-commit a41b6ef2244f1a0003dada0962a9d785e74d7981
+commit 2bd631810d910975a5df55c0e76b02856d53688d
 Author: Adam Jackson <ajax@redhat.com>
-Date:   Mon Oct 1 11:42:37 2018 -0400
+Date:   Thu Sep 13 16:11:23 2018 -0400
 
-    modesetting: Don't free(dst) in drmmode_prop_info_copy
-    
-    The destination is always either on the stack or in the middle of some
-    struct.
+    automake: Fix Linux build with --disable-apm --disable-acpi
     
+    Fixes: accd32a4 (xorg: Remove the XF86PM define.)
     Signed-off-by: Adam Jackson <ajax@redhat.com>
-    (cherry picked from commit 43a0f9a5dbb469f4f403a8530f33be67618933b8)
 
-commit 9403335910f4e6b862af5c5ef835074be2c52edb
+commit 89901e14d2f98def2399fd0546838721e7ac452d
+Author: Eric Anholt <eric@anholt.net>
+Date:   Wed Sep 19 18:02:41 2018 -0700
+
+    test: Add the start of a testsuite for damage.
+    
+    Inspired by the previous bug, build something we can use to write
+    damage testcases, including testing for the bug.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+
+commit bc36594e0eb8bfa5a673bcfd8c8168f70994a1df
 Author: Cedric Roux <sed@free.fr>
 Date:   Wed Sep 12 19:14:18 2018 +0200
 
@@ -4338,9 +15598,8 @@ Date:   Wed Sep 12 19:14:18 2018 +0200
     
     Signed-off-by: Cedric Roux <sed@free.fr>
     Signed-off-by: Eric Anholt <eric@anholt.net>
-    (cherry picked from commit bc36594e0eb8bfa5a673bcfd8c8168f70994a1df)
 
-commit c26a47b4f2e170e283ca1683d5b6ca2d04823e80
+commit 734b2d6907f730571a2805cbc53fe7056190f19e
 Author: Olivier Fourdan <ofourdan@redhat.com>
 Date:   Thu Sep 20 16:32:29 2018 +0200
 
@@ -4351,9 +15610,271 @@ Date:   Thu Sep 20 16:32:29 2018 +0200
     Suggested-by: Peter Hutterer <peter.hutterer@who-t.net>
     Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
     Closes: https://gitlab.freedesktop.org/libinput/libinput/issues/138
-    (cherry picked from commit 734b2d6907f730571a2805cbc53fe7056190f19e)
 
-commit fb01b238c610e1955457dd9878d75b2c34c9a0c6
+commit 2f424df0ca340b1c4e47d9461b04a2c5ec3ec649
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Tue May 2 14:00:47 2017 +0100
+
+    hw/xwin/glx: Fix logging about WGL pxfs with overlays
+    
+    Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
+    Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
+
+commit d63f9dddeb0c656af2b8c6135cc40a76f0b5604f
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Fri Jul 15 15:18:36 2016 +0100
+
+    hw/xwin/glx: Use multisample attributes with wglChoosePixelFormatARB()
+    
+    Seems like this was omitted in error
+    
+    Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
+    Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
+
+commit e3398d921be74df9c5d23408f39e70548df896d8
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Fri Jul 15 15:15:18 2016 +0100
+
+    hw/xwin/glx: Add GLX_ARB_framebuffer_sRGB extension
+    
+    v2:
+    Fix a bogus warning about a missing pixelformat attribute issued for every
+    pixelformat when WGL_ARB_framebuffer_sRGB isn't available
+    
+    Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
+    Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
+
+commit 1fc240c6877e44fc9e6d85837dc2d27e26193291
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Fri Jul 15 13:46:45 2016 +0100
+
+    hw/xwin/glx: publish GLX create_context extensions
+    
+    Future work: To properly support GLX_ARB_create_context in indirect mode, we
+    need to use wglCreateContextAttribsARB() rather than wglCreateContext(),
+    when attribs are provided, rather than just dropping attribs on the floor,
+    as we currently do.
+    
+    That probably entails removing the deferred context creation and instead
+    using a temporary window, as direct WGL does.
+    
+    Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
+    Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
+
+commit 67b47d50dfb5f7a994ae44708d1b1ef1c42537b5
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Fri Jul 15 14:06:32 2016 +0100
+
+    hw/xwin/glx: Add support for float format fbconfig GLX extensions
+    
+    v2:
+    Set renderType more correctly
+    
+    Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
+    Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
+
+commit 6be9681eb9eb6645b19c09f7b3b6d5b5bef8866d
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Fri Jul 15 14:02:10 2016 +0100
+
+    hw/xwin/glx: Make WGL -> GLX extension mapping table-driven
+    
+    Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
+    Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
+
+commit ad6b4113cd27e7c57908081c0a20ab956d418f06
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Thu Jul 24 12:26:22 2014 +0100
+
+    hw/xwin/glx: Fallback to ChoosePixelFormat() if wglChoosePixelFormatARB() fails
+    
+    In glxWinSetPixelFormat() handle the case where wglChoosePixelFormatARB()
+    fails and fallback to ChoosePixelFormat()
+    
+    It seems for some drivers, wglChoosePixelFormatARB() can fail when the
+    provided DC doesn't belong to the driver (e.g. it's a compatible DC for a
+    bitmap, so allow a fallback to ChoosePixelFormat() if it fails.
+    
+    Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
+    Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
+
+commit 8c0adf404a25407995dae79664ef4875ce093497
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Sat Jan 11 16:35:31 2014 +0000
+
+    hw/xwin/glx: Don't create fbConfigs for un-accelerated pixelFormats
+    
+    Exposing these pixelFormats is problematic: they are provided by the 'GDI
+    Generic' renderer, which doesn't support the same set of extensions as the
+    IGD providing the more capable pixelFormats.
+    
+    Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
+    Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
+
+commit 6a2ce6c5da9456b97683db6224f38ef3b02cce4b
+Author: Ross Burton <ross.burton@intel.com>
+Date:   Thu Sep 20 13:21:34 2018 +0100
+
+    compiler.h: only use inx/outx on ARM with glibc
+    
+    musl only implements inx/outx on x86, so check for __GLIBC__ instead of
+    __linux__.
+    
+    Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+commit 5f65a6246fe752764045dd1e38912f1dccec71e4
+Author: Ross Burton <ross.burton@intel.com>
+Date:   Thu Sep 20 20:12:24 2018 +0100
+
+    xorg-server.m4: just all cflags instead of just sdkdir
+    
+    Instead of fetching just the sdkdir variable of xorg-server using pkg-config,
+    simply get all of the CFLAGS.  Aside from completeness, this helps builds in
+    sysroots as pkg-config knows what to do with --cflags but doesn't remap
+    arbitrary variables.
+    
+    Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+commit 19f6cb570becbc4e355807199c6e251fc7935132
+Author: Eric Anholt <eric@anholt.net>
+Date:   Wed Sep 19 13:28:06 2018 -0700
+
+    shm: Pick the shm dir at run time, not build time.
+    
+    Prodding the builder's filesystem for tmp dirs doesn't necessarily
+    tell you anything about what the actual host's filesystem is going to
+    look like, so we should just try the dirs at runtime.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+
+commit 804a9b4f57107fa2d0ed1ae0becda5bebaffe6e1
+Author: Eric Anholt <eric@anholt.net>
+Date:   Wed Sep 19 13:20:12 2018 -0700
+
+    shm: reindent shm_tmpfile to follow our standards.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+
+commit b8b64cd627232a1fed791b8baf562900144bf186
+Author: Eric Anholt <eric@anholt.net>
+Date:   Wed Sep 19 13:12:40 2018 -0700
+
+    xorg: Don't log "Build Operating System: Linux 4.9.0-5-amd64 x86_64 Debian"
+    
+    I don't think this is useful information to have in the log, and it's
+    a bunch of autotools and meson logic to produce it.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+
+commit bfa6e84641fc7473fc2eb7e0e872e6b9fc339c2a
+Author: Eric Anholt <eric@anholt.net>
+Date:   Wed Sep 19 13:07:16 2018 -0700
+
+    meson: Add configure option and autodetection of HAVE_INPUTTHREAD.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+
+commit a56da0ff2814f86af08668610327082b8e2f4308
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Wed Sep 12 17:19:38 2018 -0400
+
+    include: Remove now-dead declarations
+    
+    60ec8ead broke the autotools build:
+    
+        sdksyms.o:(.data+0x58): undefined reference to `InitConnectionLimits'
+        sdksyms.o:(.data+0x2ec8): undefined reference to `xf86ServerName'
+        collect2: error: ld returned 1 exit status
+        Makefile:811: recipe for target 'Xorg' failed
+    
+    Likewise 3a4d7c79 for InitConnectionLimits.
+    
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit a2c1260958fb8b4ec81b9107c5d1ca222cc7d770
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Mon Aug 27 15:02:50 2018 -0400
+
+    xfree86: Remove vestigial lastScrnFlag
+    
+    Only the mga XAA code ever set this (hence the compat macro), since XAA
+    is long gone this can go too.
+    
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit c7414f4d07b69a4b2f0d0af06f032393cf5fe6aa
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Wed Aug 22 14:57:05 2018 -0400
+
+    xfree86: Remove NoTrapSignals
+    
+    This was dangerous on UMS and largely pointless on KMS.
+
+commit d1aeaad5c6fc614c28129f5d2717c12ff7320081
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Wed Aug 22 12:30:32 2018 -0400
+
+    xfree86: Remove a fallback path we never hit
+    
+    If it's really this important we should just do it and not complain. We
+    never do it so it must not matter.
+    
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit 771980fc02c79bb44e8cee48da9ba159e6baeaa6
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Mon Aug 20 17:01:24 2018 -0400
+
+    xfree86: Remove some not-terribly-useful debugging
+    
+    I'm sure printing the address of function pointers in modules you'd
+    loaded might have made sense back when we rolled our own dlopen, but we
+    got better.
+    
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit 6a094185d14db6818d98a320c59e0c4d7d43d5a8
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Wed Aug 22 11:18:58 2018 -0400
+
+    xfree86: Remove some redundant zero-fill for ScrnInfoRec
+    
+    xf86AllocateScreen() callocs these for us.
+    
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit 60ec8eadc370a9b06cc3f105974c0c6b8ad1bb4e
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Aug 21 15:09:03 2018 -0400
+
+    xfree86: Remove unused xf86GetServerName()
+    
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit a41ccaa0857146e986f11360d4f2aeb3913af9a6
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Wed Sep 12 15:45:52 2018 -0400
+
+    gitlab: Skip the docker-in-docker step
+    
+    No idea which cult's cargo I was looking at there. Cuts about a minute
+    off the build time.
+    
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit 3a4d7c79e7fb14c6f914db921c3dce1c22f62cd9
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Wed Aug 29 15:48:28 2018 -0400
+
+    dix: Remove MaxClients
+    
+    This variable was no longer being read anywhere. MAXCLIENTS the macro is
+    the compile-time maximum limit, LIMITCLIENTS the macro is the default
+    limit, LimitClients the variable is the limit for the current server.
+    
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit 7d689f049c3cc16b8e0cb0103a384a2ceb84ea33
 Author: Adam Jackson <ajax@redhat.com>
 Date:   Wed Aug 29 15:42:20 2018 -0400
 
@@ -4364,9 +15885,48 @@ Date:   Wed Aug 29 15:42:20 2018 -0400
     legal values that the -maxclients command line option would.
     
     Signed-off-by: Adam Jackson <ajax@redhat.com>
-    (cherry picked from commit 7d689f049c3cc16b8e0cb0103a384a2ceb84ea33)
 
-commit cc4051ad6a3712c4407ffb608c8d23f2b66952d6
+commit d791c8e5abc174ae589d954b0beb51d232f60019
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Mon Aug 27 16:42:42 2018 -0400
+
+    dga: Make shutdown less magical and/or terrifying
+    
+    DGAShutdown() walks every screen and attempts to reset the mode.  That's
+    maybe a reasonable thing to do, although the explicit loop is certainly
+    a bad smell.
+    
+    In ddxGiveUp it's called after we've torn down the vga arbiter - and in
+    fact most of the rest of screen state - which is... very very bad.  The
+    other place it's called is from the Control-Alt-BackSpace handler, where
+    we don't even attempt to do vga arb setup, and where in any case we're
+    going to escape the main loop eventually anyway.
+    
+    Move all that cleanup work inside DGACloseScreen. This means it happens
+    earlier in server teardown than previously, but not in a way you're ever
+    going to be upset about.
+    
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit 3d06d111b272d495c2f12779097a3d9f1e632603
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Mon Aug 27 16:39:10 2018 -0400
+
+    dga: Simplify mieq handler registration
+    
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit 801977e8252f87f9ab156c7e02ad00fb1d70f8e5
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Mon Aug 27 16:34:20 2018 -0400
+
+    mi: Hush mieqSetHandler for no-op changes
+    
+    If we set the handler to the thing it's already set to, that's fine.
+    
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit ba0f5d854f4db52974ab5cd09191303b01b075ff
 Author: Dave Airlie <airlied@redhat.com>
 Date:   Wed Sep 12 11:39:32 2018 +1000
 
@@ -4378,9 +15938,8 @@ Date:   Wed Sep 12 11:39:32 2018 +1000
     fix it.
     
     Signed-off-by: Dave Airlie <airlied@redhat.com>
-    (cherry picked from commit ba0f5d854f4db52974ab5cd09191303b01b075ff)
 
-commit 64a7aac257ddbb000759d37386454866d8810545
+commit c4591ea17110b5c318a5ef4b0f17a4eea306ea71
 Author: Dave Airlie <airlied@redhat.com>
 Date:   Wed Sep 12 11:12:51 2018 +1000
 
@@ -4389,9 +15948,8 @@ Date:   Wed Sep 12 11:12:51 2018 +1000
     Pointed out by coverity.
     
     Signed-off-by: Dave Airlie <airlied@redhat.com>
-    (cherry picked from commit c4591ea17110b5c318a5ef4b0f17a4eea306ea71)
 
-commit fcbdb7c8b0d7bcc6a85e0beb2ce1dba76803486b
+commit 758393951233d1b2520cf4cefd33ec4288a3880a
 Author: Dave Airlie <airlied@redhat.com>
 Date:   Wed Sep 12 11:09:40 2018 +1000
 
@@ -4400,9 +15958,8 @@ Date:   Wed Sep 12 11:09:40 2018 +1000
     Pointed out by coverity.
     
     Signed-off-by: Dave Airlie <airlied@redhat.com>
-    (cherry picked from commit 758393951233d1b2520cf4cefd33ec4288a3880a)
 
-commit 83ef02839ce8982c2e841bc400abddbeb620481d
+commit cad3a1a82da3c8421b5cc98af27a779a38b5c709
 Author: Dave Airlie <airlied@redhat.com>
 Date:   Wed Sep 12 11:05:45 2018 +1000
 
@@ -4411,9 +15968,8 @@ Date:   Wed Sep 12 11:05:45 2018 +1000
     Pointed out by coverity.
     
     Signed-off-by: Dave Airlie <airlied@redhat.com>
-    (cherry picked from commit cad3a1a82da3c8421b5cc98af27a779a38b5c709)
 
-commit 66d36010a324480ac656e702e53f9c1f6fb60d5c
+commit b6c29a881eb49300fddfd0187cb10891f5257d3b
 Author: Dave Airlie <airlied@redhat.com>
 Date:   Wed Sep 12 10:56:40 2018 +1000
 
@@ -4424,9 +15980,8 @@ Date:   Wed Sep 12 10:56:40 2018 +1000
     Pointed out by coverity.
     
     Signed-off-by: Dave Airlie <airlied@redhat.com>
-    (cherry picked from commit b6c29a881eb49300fddfd0187cb10891f5257d3b)
 
-commit 795c58a1febb3deb9066d981b178d9cf14fdad03
+commit f0a5c0d1fdaeee3cd701215f4f57b7eacaf783c2
 Author: Dave Airlie <airlied@redhat.com>
 Date:   Wed Sep 12 10:52:25 2018 +1000
 
@@ -4436,9 +15991,8 @@ Date:   Wed Sep 12 10:52:25 2018 +1000
     
     Pointed out by coverity.
     Signed-off-by: Dave Airlie <airlied@redhat.com>
-    (cherry picked from commit f0a5c0d1fdaeee3cd701215f4f57b7eacaf783c2)
 
-commit bb384d0b110a99f2d935ed73d6589af46f818823
+commit c7fa6a0a0d4ad28ee21b8dd9ad4fbe33f462bc71
 Author: Dave Airlie <airlied@redhat.com>
 Date:   Wed Sep 12 10:50:21 2018 +1000
 
@@ -4449,9 +16003,8 @@ Date:   Wed Sep 12 10:50:21 2018 +1000
     Pointed out by coverity.
     
     Signed-off-by: Dave Airlie <airlied@redhat.com>
-    (cherry picked from commit c7fa6a0a0d4ad28ee21b8dd9ad4fbe33f462bc71)
 
-commit 26a83f9833054f5cf7c7d73b0f5aa080d400c26b
+commit 51ae6126dcf3e234d0f678f02934bc9515abb8ae
 Author: Dave Airlie <airlied@redhat.com>
 Date:   Wed Sep 12 10:33:04 2018 +1000
 
@@ -4462,9 +16015,8 @@ Date:   Wed Sep 12 10:33:04 2018 +1000
     v2: set modifies_failed to NULL at start (whot)
     
     Signed-off-by: Dave Airlie <airlied@redhat.com>
-    (cherry picked from commit 51ae6126dcf3e234d0f678f02934bc9515abb8ae)
 
-commit bdeab7863eb7abe2d9d05eed259542695935559c
+commit 3439929c510501929c6ef1d90477c33bf8838632
 Author: Dave Airlie <airlied@redhat.com>
 Date:   Wed Sep 12 10:30:13 2018 +1000
 
@@ -4476,18 +16028,81 @@ Date:   Wed Sep 12 10:30:13 2018 +1000
     Noticed by coverity scan.
     
     Signed-off-by: Dave Airlie <airlied@redhat.com>
-    (cherry picked from commit 3439929c510501929c6ef1d90477c33bf8838632)
 
-commit 8e646ca9850c071994354b503b5d2b62f99ef2a8
+commit 047794e3503774c576a815cc170663cbcff198dd
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Sep 11 10:33:25 2018 -0400
+
+    xselinux: warning fix
+    
+    ../Xext/xselinux_ext.c: In function ‘SELinuxExtensionInit’:
+    ../Xext/xselinux_ext.c:692:21: warning: variable ‘extEntry’ set but not used [-Wunused-but-set-variable]
+    
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit f4115bcc8c5f9d30ccfca5d5a7fc27acded02864
+Author: Julien Isorce <julien.isorce@gmail.com>
+Date:   Tue Sep 11 10:28:33 2018 -0700
+
+    glamor: add support for NV12 in Xv
+    
+    Useful when video decoders only output NV12. Currently
+    glamor Xv only supports I420 and YV12.
+    
+    Note that Intel's sna supports I420, YV12, YUY2, UYVY, NV12.
+    
+    Test: xvinfo | grep NV12
+    Test: gst-launch-1.0 videotestsrc ! video/x-raw, format=NV12 ! xvimagesink
+    
+    v2: Combine the two texture2Ds on u_sampler.
+    
+    Signed-off-by: Julien Isorce <jisorce@oblong.com>
+    Tested-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
+
+commit 44f5885686a30776160891e09cd4453afb9d5ade
+Author: Julien Isorce <julien.isorce@gmail.com>
+Date:   Thu Sep 6 15:38:14 2018 -0700
+
+    glamor: add support for GL_RG
+    
+    Allow to upload the CbCr plane of an NV12 image into a GL texture.
+    
+    Signed-off-by: Julien Isorce <jisorce@oblong.com>
+    Tested-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
+
+commit f98ff253c722da3f5ad747e6813752f9e74c54b5
+Author: Julien Isorce <julien.isorce@gmail.com>
+Date:   Thu Sep 6 15:38:13 2018 -0700
+
+    xfree86: define FOURCC_NV12 and XVIMAGE_NV12
+    
+    Useful for glamor.
+    
+    Signed-off-by: Julien Isorce <jisorce@oblong.com>
+    Tested-by: Olivier Fourdan <ofourdan@redhat.com>
+    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
+
+commit fc855216028e6a34b667c11e198aea405fb4bc00
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Thu Aug 9 09:55:23 2018 -0400
+
+    Remove old region API conversion scripts
+    
+    This was eight years ago, if you still need these you're in a bad place.
+    
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit c4f3e42fe316c90a73908a838ce64abbb28fe0a2
 Author: Adam Jackson <ajax@redhat.com>
 Date:   Wed Aug 29 16:07:59 2018 -0400
 
     modesetting: Document Option "DoubleShadow" in the man page
     
     Signed-off-by: Adam Jackson <ajax@redhat.com>
-    (cherry picked from commit c4f3e42fe316c90a73908a838ce64abbb28fe0a2)
 
-commit fdb80a327cfe213a206bc76d3cb43cbb33855547
+commit 0dc2c419e11cf28b8fa1e607d4cf2d15f2eb2306
 Author: Adam Jackson <ajax@redhat.com>
 Date:   Wed Aug 29 15:57:46 2018 -0400
 
@@ -4496,9 +16111,8 @@ Date:   Wed Aug 29 15:57:46 2018 -0400
     We don't support 8bpp, and we do have acceleration.
     
     Signed-off-by: Adam Jackson <ajax@redhat.com>
-    (cherry picked from commit 0dc2c419e11cf28b8fa1e607d4cf2d15f2eb2306)
 
-commit cffac815b957fd1296d61cc5c20ba3709a77ee4e
+commit 3f31f56929e80001970e3821ed8b10c6075df8e6
 Author: Olivier Fourdan <ofourdan@redhat.com>
 Date:   Wed Sep 5 10:49:27 2018 +0200
 
@@ -4556,9 +16170,8 @@ Date:   Wed Sep 5 10:49:27 2018 +0200
     
     Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1616269
     Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
-    (cherry picked from commit 3f31f56929e80001970e3821ed8b10c6075df8e6)
 
-commit 8dd7173eeba08f1ecfb414915625c609ad4b3297
+commit 53ce2ba0a19af9c549f47a4cc678afcebeb6087e
 Author: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
 Date:   Tue Aug 28 21:30:05 2018 +0100
 
@@ -4608,9 +16221,8 @@ Date:   Tue Aug 28 21:30:05 2018 +0100
     
     Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
     Reviewed-by: Daniel Stone <daniels@collabora.com>
-    (cherry picked from commit 53ce2ba0a19af9c549f47a4cc678afcebeb6087e)
 
-commit 1191b23f942cace785234f5d7fac972251c8f1db
+commit 75448671abe2c6ae3745eb5d2ed2e76df2de9c41
 Author: Olivier Fourdan <ofourdan@redhat.com>
 Date:   Wed Sep 5 15:20:17 2018 +0200
 
@@ -4633,9 +16245,8 @@ Date:   Wed Sep 5 15:20:17 2018 +0200
     Fixes: 99f0365b "Add a command line argument for disabling indirect GLX"
     Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107508
     Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
-    (cherry picked from commit 75448671abe2c6ae3745eb5d2ed2e76df2de9c41)
 
-commit 1b0db2c74258d20e3f99bd69c2914fd445abe920
+commit ce271535adb6974e0a43bb64c8ed7a5dcaff67a2
 Author: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
 Date:   Mon Aug 27 01:04:45 2018 +0100
 
@@ -4692,9 +16303,56 @@ Date:   Mon Aug 27 01:04:45 2018 +0100
     Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107314
     Reviewed-by: Roman Gilg <subdiff@gmail.com>
     Tested-by: Roman Gilg <subdiff@gmail.com>
-    (cherry picked from commit ce271535adb6974e0a43bb64c8ed7a5dcaff67a2)
 
-commit 48300a7775b4ff3200de200e8c5502d99bd99104
+commit b3f64786a3fd428f7fdccd8c884478fd62b70c16
+Author: Eric Anholt <eric@anholt.net>
+Date:   Tue Sep 4 20:52:57 2018 -0700
+
+    glamor: Add support for exporting depth 16 pixmaps.
+    
+    With a patch to mesa to expose rgb565 pbuffers even on a server with
+    only depth 24 and 32 visuals, fixes
+    dEQP-EGL.functional.render.single_context.gles2.rgb565_pbuffer.  Those
+    pbuffers (or at least something renderable with 565) are required by
+    the current CTS for GLES3, and having the server support DRI3 on those
+    pixmaps means that we can avoid having a different path for EGL
+    pbuffers compared to pixmaps.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
+
+commit b84e7f1c2293f22bd9fcd92a6a82601f94a060a5
+Author: Lyude Paul <lyude@redhat.com>
+Date:   Thu Sep 6 16:40:06 2018 -0400
+
+    meson: Fix building with -Ddga=false
+    
+    We forget to assign a value to xf86dgaproto_dep if -Ddga=false, which
+    causes the meson build to fail:
+    
+    meson.build:448:0: ERROR:  Unknown variable "xf86dgaproto_dep".
+    
+    A full log can be found at /home/lyudess/build/xserver/meson-logs/meson-log.txt
+    FAILED: build.ninja
+    
+    So, just set it to an empty dependency to fix that.
+    
+    Signed-off-by: Lyude Paul <lyude@redhat.com>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit a9a5bd0020dc76040d9b3722c0c88ccb12132dc0
+Author: Jon Turney <jon.turney@dronecode.org.uk>
+Date:   Mon Aug 27 12:41:22 2018 +0100
+
+    hw/xwin: Fix 'make distcheck'
+    
+    Add internal.h to SOURCES, omitted from 126c1cfa
+    
+    Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit cd285922cdec966825e47220b1182a57abc1ff90
 Author: Scott Anderson <scott@anderso.nz>
 Date:   Mon Aug 6 18:09:26 2018 +1200
 
@@ -4717,9 +16375,8 @@ Date:   Mon Aug 6 18:09:26 2018 +1200
     Signed-off-by: Scott Anderson <scott@anderso.nz>
     Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-    (cherry picked from commit cd285922cdec966825e47220b1182a57abc1ff90)
 
-commit cd19a752f8bbc6caae7bf2457c53c850121fe9b7
+commit f79e5368512b72bb463925983d265b070261b7aa
 Author: Jim Qu <Jim.Qu@amd.com>
 Date:   Mon Aug 27 13:37:38 2018 +0800
 
@@ -4750,9 +16407,21 @@ Date:   Mon Aug 27 13:37:38 2018 +0800
     
     Signed-off-by: Jim Qu <Jim.Qu@amd.com>
     Reviewed-by: Alex Goins <agoins@nvidia.com>
-    (cherry picked from commit f79e5368512b72bb463925983d265b070261b7aa)
 
-commit 5396a4aa084853805a73a2cfbbce156c47573916
+commit 8a3ae555efb02b3811cca0bfb4ddaf8fe1457778
+Author: Eric Anholt <eric@anholt.net>
+Date:   Thu Aug 9 13:02:41 2018 -0700
+
+    meson: Add an option to build XSELINUX.
+    
+    Dependencies are ported from the automake build.
+    
+    v2: Make it a tristate defaulting to 'auto'.  Use pkg-config for libaudit.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit a90f33721eba7f2dbde4a7278f1a213d696c85e9
 Author: Alex Goins <agoins@nvidia.com>
 Date:   Tue Aug 14 15:05:46 2018 -0500
 
@@ -4786,9 +16455,120 @@ Date:   Tue Aug 14 15:05:46 2018 -0500
     Signed-off-by: Alex Goins <agoins@nvidia.com>
     Reviewed-by: Keith Packard <keithp@keithp.com>
     Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
-    (cherry picked from commit a90f33721eba7f2dbde4a7278f1a213d696c85e9)
 
-commit 051a0efc5c28fb4be1199d73d59e0e4d329b1144
+commit 1fc20b985cc888345bc8c6fce7b43f10ce71fe43
+Author: Eric Anholt <eric@anholt.net>
+Date:   Tue Aug 7 16:23:19 2018 -0700
+
+    meson: Add detection of libsystemd-daemon.
+    
+    This enables Xtrans's systemd socket activation.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 4ba786677050684c8801201f6bd83ce884f2885e
+Author: Eric Anholt <eric@anholt.net>
+Date:   Tue Aug 7 16:23:18 2018 -0700
+
+    meson: Get close to parity with autotools for CLIENTIDS tracking.
+    
+    The client ID is only needed for XRes, and autotools build ignores the
+    --clientids= arg if xres is disabled.  We haven't made a meson option
+    for disabling tracking client ids (is it actually worth a build
+    option?), so just make this depend on xres.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit e047da37becc23a8d2549d8f264aaa18e4965186
+Author: Eric Anholt <eric@anholt.net>
+Date:   Tue Aug 7 16:23:17 2018 -0700
+
+    meson: Add missing setup of the NO_LOCAL_CLIENT_CRED define.
+    
+    Ported from autotools.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 049d2346abee091f18e6f62bcf7331267c2ba656
+Author: Eric Anholt <eric@anholt.net>
+Date:   Tue Aug 7 16:23:16 2018 -0700
+
+    meson: Make FALLBACK_INPUT_DRIVER configurable in meson.
+    
+    This makes us match the featureset of autotools, and also fixes the
+    non-Linux default value to match.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 97bd8bc9cb6d910420627760288696e2a0c5d226
+Author: Eric Anholt <eric@anholt.net>
+Date:   Tue Aug 7 16:23:14 2018 -0700
+
+    meson: Make xf86vidmodeproto mandatory.
+    
+    This is silly to have optional based on detection of the protocol
+    headers, particularly now that we have a single protocol header repo
+    to install.
+    
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+
+commit db53c439ba785a16f789918fe66da6ba161a0742
+Author: Eric Anholt <eric@anholt.net>
+Date:   Tue Aug 7 16:23:13 2018 -0700
+
+    meson: Add linking to x86 iopl libs on BSDs.
+    
+    Ported from automake.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 9869512cbf1bd87146f59106c0c71bda76cc0dcc
+Author: Eric Anholt <eric@anholt.net>
+Date:   Tue Aug 7 16:23:12 2018 -0700
+
+    meson: Add HAVE_LIBDISPATCH define to xquartz build.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 843e44adf17b2828991a26ac3f8f82cf2fa63bd3
+Author: Eric Anholt <eric@anholt.net>
+Date:   Tue Aug 7 16:23:11 2018 -0700
+
+    meson: Add PIO access support for FreeBSD and NetBSD on Alpha.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 513d52d58915f291c0f706b67b8dc73f45de109f
+Author: Eric Anholt <eric@anholt.net>
+Date:   Tue Aug 7 16:23:10 2018 -0700
+
+    meson, automake: Drop unused USESTDRES cflag setup.
+    
+    Nothing in tree references the flag.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit d0545847a06f375586927ea66c521a039439f708
+Author: vadym.shovkoplias <vadym.shovkoplias@globallogic.com>
+Date:   Thu Aug 9 12:25:08 2018 -0400
+
+    autotools: Handle case when bindir var in xkbcomp.pc is absent
+    
+    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107521
+    Fixes: 726839459cb (autotools: Derive xkb configuration from xkbcomp.pc)
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+    Signed-off-by: vadym.shovkoplias <vadym.shovkoplias@globallogic.com>
+
+commit 4fe02b8da3ca58500f7e6e017e388907cf4a8b73
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Wed Aug 8 15:22:41 2018 +1000
 
@@ -4801,17 +16581,76 @@ Date:   Wed Aug 8 15:22:41 2018 +1000
     Reported-by: Adam Jackson <ajax@redhat.com>
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
     Reviewed-by: Keith Packard <keithp@keithp.com>
-    (cherry picked from commit 4fe02b8da3ca58500f7e6e017e388907cf4a8b73)
 
-commit 1508ea68065b7976dbf56039f9b20dcaf0394431
-Author: Adam Jackson <ajax@redhat.com>
-Date:   Tue Aug 7 12:26:05 2018 -0400
+commit c20e7b5e2222c0cae2a487264748fa5db711e6e4
+Author: Eric Anholt <eric@anholt.net>
+Date:   Wed Aug 1 13:49:54 2018 -0700
 
-    xserver 1.20.1
+    meson: Automatically detect HAVE_PTHREAD_SETNAME_NP
     
-    Signed-off-by: Adam Jackson <ajax@redhat.com>
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 86c9245838b95e8a0c37fa61d835112933c738f0
+Author: Eric Anholt <eric@anholt.net>
+Date:   Wed Aug 1 13:49:53 2018 -0700
+
+    meson: Try to hook up BSD APM build configuration.
+    
+    I don't have a BSD to test on, but this should do the same as what
+    autotools did.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit accd32a466a1a87ab45b5422dff2ef5a9c867049
+Author: Eric Anholt <eric@anholt.net>
+Date:   Wed Aug 1 13:49:52 2018 -0700
+
+    xorg: Remove the XF86PM define.
+    
+    We already have pm_noop.c being built most of the time for the
+    no-OS-PM case, so just switch to always using it.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 708ddfbda1391468d66957e247f51854b39db5fa
+Author: Eric Anholt <eric@anholt.net>
+Date:   Wed Aug 1 13:49:51 2018 -0700
+
+    automake,meson: Remove HAVE_LIBUDEV define.
+    
+    CONFIG_UDEV and CONFIG_UDEV_KMS are the actual defines that are used
+    in the C code.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 7deaf990079b94c70d263d8f1e16bb954bd2917f
+Author: Eric Anholt <eric@anholt.net>
+Date:   Wed Aug 1 13:49:50 2018 -0700
+
+    meson: Automatically detect support for XTRANS_SEND_FDs.
+    
+    The SCM_RIGHTS flag seems to be the thing that xtrans depends on, and
+    meson makes the check easy without needing a build option.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit e3e5265743a3536f15c8b7ae521848a646cdc189
+Author: Eric Anholt <eric@anholt.net>
+Date:   Wed Aug 1 13:49:49 2018 -0700
+
+    meson: Remove XXX for libconfig in kdrive.
+    
+    This is already included in ephyr (the only kdrive server left)
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
 
-commit 101d15c7634b26eafb3c5f2edb7cafde102ce208
+commit 1ef7aed3e2bb2af32330f19b1e7560000512ddfe
 Author: Keith Packard <keithp@keithp.com>
 Date:   Tue Jun 26 09:20:00 2018 -0700
 
@@ -4831,46 +16670,28 @@ Date:   Tue Jun 26 09:20:00 2018 -0700
     Signed-off-by: Keith Packard <keithp@keithp.com>
     Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=106960
     Cc: Thomas Hellstrom <thellstrom@vmware.com>
-    (cherry picked from commit 1ef7aed3e2bb2af32330f19b1e7560000512ddfe)
-
-commit 9347326d28fffc7534cad0b084539e936aacfd45
-Author: Peter Hutterer <peter.hutterer@who-t.net>
-Date:   Wed Jul 18 13:22:43 2018 +1000
-
-    Xext: dynamically allocate the PanoramiXDepths[j].vids array
-    
-    Control flow is:
-       PanoramiXMaybeAddDepth() allocates an array size 240 (pDepth->numVisuals)
-       PanoramiXMaybeAddVisual() finds up to 270 matches (pScreen->numVisuals)
-       and writes those into the previously allocated array.
-    
-    This caused invalid reads/writes followed by eventually a double-free abort.
-    
-    Reproduced with xorg-integration-tests server test
-    XineramaTest.ScreenCrossing/* (and a bunch of others).
-    
-    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-    Reviewed-by: Keith Packard <keithp@keithp.com>
-    (cherry picked from commit 93cafb0828d2e24bd14616df1aa9883fb843dd6c)
 
-commit cbf1ca2dba7bc3561cf1a8023e5e18706adbdba6
-Author: emersion <contact@emersion.fr>
-Date:   Fri Jul 13 15:51:26 2018 -0400
+commit d625e16918ef9104863709eb108346464767c444
+Author: Takashi Iwai <tiwai@suse.de>
+Date:   Thu Jul 19 14:38:19 2018 +0200
 
-    xwayland: rotate logical size for RRMode
+    modesetting: Fix cirrus 24bpp breakage
     
-    The logical size is the size of the output in the global compositor
-    space. The mode width/height should be scaled as in the logical
-    size, but shouldn't be transformed. Thus we need to rotate back
-    the logical size to be able to use it as the mode width/height.
+    The recent rewrite of modesetting driver broke the 24bpp support.
+    As typically found on cirrus KMS, it leads to a blank screen, spewing
+    the error like:
+      failed to add fb -22
+      (EE) modeset(0): failed to set mode: Invalid argument
     
-    This fixes issues with pointer input on transformed outputs.
+    The culript is that the wrong bpp value of the front buffer is passed
+    to drmModeAddFB().  Fix it by replacing with the back buffer bpp,
+    drmmode->kbpp.
     
-    Signed-Off-By: Simon Ser <contact@emersion.fr>
-    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
-    (cherry picked from commit ce2dde9ed0243a18ae18af0879134f7c1afbd700)
+    Signed-off-by: Takashi Iwai <tiwai@suse.de>
+    Tested-by: Stefan Dirsch <sndirsch@suse.de>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
 
-commit 18a52a8e16046d8cabea6cf45913bf0b5be07709
+commit cdec2b3c195d1d080207ef01c55ff14b45370010
 Author: Olivier Fourdan <ofourdan@redhat.com>
 Date:   Wed Jul 25 16:33:23 2018 +0200
 
@@ -4887,48 +16708,43 @@ Date:   Wed Jul 25 16:33:23 2018 +0200
     Fixes: c8c276c956 ("glamor: Implement PixmapFromBuffers and BuffersFromPixmap")
     Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
     Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
-    (cherry picked from commit cdec2b3c195d1d080207ef01c55ff14b45370010)
 
-commit c256e31a9eba20da259f31ee70d1c8e1870993f1
-Author: Takashi Iwai <tiwai@suse.de>
-Date:   Thu Jul 19 14:38:19 2018 +0200
+commit ce2dde9ed0243a18ae18af0879134f7c1afbd700
+Author: emersion <contact@emersion.fr>
+Date:   Fri Jul 13 15:51:26 2018 -0400
 
-    modesetting: Fix cirrus 24bpp breakage
+    xwayland: rotate logical size for RRMode
     
-    The recent rewrite of modesetting driver broke the 24bpp support.
-    As typically found on cirrus KMS, it leads to a blank screen, spewing
-    the error like:
-      failed to add fb -22
-      (EE) modeset(0): failed to set mode: Invalid argument
+    The logical size is the size of the output in the global compositor
+    space. The mode width/height should be scaled as in the logical
+    size, but shouldn't be transformed. Thus we need to rotate back
+    the logical size to be able to use it as the mode width/height.
     
-    The culript is that the wrong bpp value of the front buffer is passed
-    to drmModeAddFB().  Fix it by replacing with the back buffer bpp,
-    drmmode->kbpp.
+    This fixes issues with pointer input on transformed outputs.
     
-    Signed-off-by: Takashi Iwai <tiwai@suse.de>
-    Tested-by: Stefan Dirsch <sndirsch@suse.de>
-    Reviewed-by: Adam Jackson <ajax@redhat.com>
-    (cherry picked from commit d625e16918ef9104863709eb108346464767c444)
+    Signed-Off-By: Simon Ser <contact@emersion.fr>
+    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
 
-commit 2da0bde4498cf4ee422e5a2cb2c53cbbb73df937
-Author: Matt Turner <mattst88@gmail.com>
-Date:   Tue May 22 21:10:55 2018 -0700
+commit 93cafb0828d2e24bd14616df1aa9883fb843dd6c
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Wed Jul 18 13:22:43 2018 +1000
 
-    xfree86: Inline xf86{Read,Write}Mmio{8,16,32} on alpha
+    Xext: dynamically allocate the PanoramiXDepths[j].vids array
     
-    In commit 9db2af6f757e (xfree86: Remove xf86{Map,Unmap}VidMem) we
-    somehow stopped exporting xf86{Read,Write}Mmio{8,16,32}. Since the
-    function pointer indirection was intended to support dense vs sparse and
-    sparse support is now gone, we can just make the functions static inline
-    in compiler.h and avoid all of this.
+    Control flow is:
+       PanoramiXMaybeAddDepth() allocates an array size 240 (pDepth->numVisuals)
+       PanoramiXMaybeAddVisual() finds up to 270 matches (pScreen->numVisuals)
+       and writes those into the previously allocated array.
     
-    Bugzilla: https://bugs.gentoo.org/548906
-    Tested-by: Christopher May-Townsend <chris@maytownsend.co.uk>
-    Reviewed-by: Adam Jackson <ajax@redhat.com>
-    Signed-off-by: Matt Turner <mattst88@gmail.com>
-    (cherry picked from commit 166ac294aefe21a6cfcc0e7a4c9525eef49c2f0c)
+    This caused invalid reads/writes followed by eventually a double-free abort.
+    
+    Reproduced with xorg-integration-tests server test
+    XineramaTest.ScreenCrossing/* (and a bunch of others).
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Keith Packard <keithp@keithp.com>
 
-commit b9e9eda08bd9198a6d089acd5d50677cd8713b33
+commit 1c7f34e99ff9750979a03ae20c6be1f2b42c284c
 Author: Stefan Agner <stefan@agner.ch>
 Date:   Thu Dec 22 15:41:06 2016 +0100
 
@@ -4943,9 +16759,8 @@ Date:   Thu Dec 22 15:41:06 2016 +0100
     
     Reviewed-by: Adam Jackson <ajax@redhat.com>
     Signed-off-by: Stefan Agner <stefan@agner.ch>
-    (cherry picked from commit 1c7f34e99ff9750979a03ae20c6be1f2b42c284c)
 
-commit 5c0662d44852363fe258c045250710ed881e56b7
+commit d95a1310ef8e08a93a28f9766d1b4093f7891404
 Author: Lyude Paul <lyude@redhat.com>
 Date:   Fri Jun 22 12:49:47 2018 -0400
 
@@ -4966,9 +16781,8 @@ Date:   Fri Jun 22 12:49:47 2018 -0400
     
     Reviewed-by: Adam Jackson <ajax@redhat.com>
     Signed-off-by: Lyude Paul <lyude@redhat.com>
-    (cherry picked from commit d95a1310ef8e08a93a28f9766d1b4093f7891404)
 
-commit 10285bc36b411edd923ee5d369244647ba2b714b
+commit d83efc47b7a524b4f8d4a993c27a3e402a98fa7c
 Author: Keith Packard <keithp@keithp.com>
 Date:   Tue Jun 26 16:34:29 2018 -0700
 
@@ -4979,9 +16793,8 @@ Date:   Tue Jun 26 16:34:29 2018 -0700
     
     Signed-off-by: Keith Packard <keithp@keithp.com>
     Reviewed-by: Daniel Stone <daniels@collabora.com>
-    (cherry picked from commit d83efc47b7a524b4f8d4a993c27a3e402a98fa7c)
 
-commit a530198ac0ffdc4c268d13e59079f7583930a284
+commit 4a11f66e4690f9e94dc61cb264f5ef78dbdb255a
 Author: Keith Packard <keithp@keithp.com>
 Date:   Tue Jun 26 14:05:31 2018 -0700
 
@@ -4998,9 +16811,8 @@ Date:   Tue Jun 26 14:05:31 2018 -0700
     
     Signed-off-by: Keith Packard <keithp@keithp.com>
     Reviewed-by: Daniel Stone <daniels@collabora.com>
-    (cherry picked from commit 4a11f66e4690f9e94dc61cb264f5ef78dbdb255a)
 
-commit cd7680adccdf8f6905a83ae08cbde7ac76693fe5
+commit 2faf4cef8bcf9bb2034a27219a656ea7221afc6c
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu Jun 28 11:45:16 2018 -0700
 
@@ -5016,9 +16828,8 @@ Date:   Thu Jun 28 11:45:16 2018 -0700
     Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=106960
     Reviewed-by: Adam Jackson <ajax@redhat.com>
     Signed-off-by: Keith Packard <keithp@keithp.com>
-    (cherry picked from commit 2faf4cef8bcf9bb2034a27219a656ea7221afc6c)
 
-commit ebd4cd71f49151fb699cf45e835f3719e6b31bf5
+commit c55a44a9a86aaece17c1a2e73c77e3e665c4888e
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu Jun 28 11:45:15 2018 -0700
 
@@ -5033,9 +16844,8 @@ Date:   Thu Jun 28 11:45:15 2018 -0700
     Signed-off-by: Keith Packard <keithp@keithp.com>
     Cc: thellstrom@vmware.com
     Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=106960
-    (cherry picked from commit c55a44a9a86aaece17c1a2e73c77e3e665c4888e)
 
-commit 1f169d5b38d93d725029d5f7dc237b558e8bb137
+commit 49283e238a0ba6051034ae635e5970891f17f9df
 Author: Jon Turney <jon.turney@dronecode.org.uk>
 Date:   Sat Jun 30 12:53:35 2018 +0100
 
@@ -5049,9 +16859,8 @@ Date:   Sat Jun 30 12:53:35 2018 +0100
     Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
     Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-    (cherry picked from commit 49283e238a0ba6051034ae635e5970891f17f9df)
 
-commit bc1882aa23a129c4b72b0bfc132cfd04db801a90
+commit 38ff29ec8ead0a293f50ac52146199babe4205ca
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu Jan 18 18:07:29 2018 -0800
 
@@ -5074,9 +16883,8 @@ Date:   Thu Jan 18 18:07:29 2018 -0800
     
     Signed-off-by: Keith Packard <keithp@keithp.com>
     Reviewed-by: Lyude Paul <lyude@redhat.com>
-    (cherry picked from commit 38ff29ec8ead0a293f50ac52146199babe4205ca)
 
-commit d60ce5b01f5988abc9957473d7175872c8845b08
+commit 2f39b2a07805194fdd7def30d941666963d6e670
 Author: Laurent Carlier <lordheavym@gmail.com>
 Date:   Sat Jun 16 13:00:01 2018 +0200
 
@@ -5088,9 +16896,8 @@ Date:   Sat Jun 16 13:00:01 2018 +0200
     Signed-off-by: Laurent Carlier <lordheavym@gmail.com>
     Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-    (cherry picked from commit 2f39b2a07805194fdd7def30d941666963d6e670)
 
-commit 79795bf9df395001c8d659ac8d28090ea9cefc8d
+commit c41d4ff48f72aa964afd131b59e1538295d062dc
 Author: Lyude Paul <lyude@redhat.com>
 Date:   Wed Jun 27 20:29:42 2018 -0400
 
@@ -5100,9 +16907,8 @@ Date:   Wed Jun 27 20:29:42 2018 -0400
     
     Signed-off-by: Lyude Paul <lyude@redhat.com>
     Reviewed-by: Karol Herbst <kherbst@redhat.com>
-    (cherry picked from commit c41d4ff48f72aa964afd131b59e1538295d062dc)
 
-commit 820ce7cb8bb07018de89e13aa50ae6090f2d84eb
+commit 9f02855e7a1b7a3c1e2ee7bfbc73e87c29126920
 Author: Thomas Hellstrom <thellstrom@vmware.com>
 Date:   Wed Jun 20 19:23:48 2018 +0200
 
@@ -5118,9 +16924,8 @@ Date:   Wed Jun 20 19:23:48 2018 +0200
     
     Reviewed-by: Deepak Rawat <drawat@vmware.com>
     Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
-    (cherry picked from commit 9f02855e7a1b7a3c1e2ee7bfbc73e87c29126920)
 
-commit ba6a9283817254dca90fd8f9ee695504e7c20908
+commit dc90b1c3c328f1d0b022a234b69ef32bda7ccb01
 Author: Lyude Paul <lyude@redhat.com>
 Date:   Wed Jun 20 19:12:32 2018 -0400
 
@@ -5130,9 +16935,8 @@ Date:   Wed Jun 20 19:12:32 2018 -0400
     
     Signed-off-by: Lyude Paul <lyude@redhat.com>
     Reviewed-by: Dave Airlie <airlied@redhat.com>
-    (cherry picked from commit dc90b1c3c328f1d0b022a234b69ef32bda7ccb01)
 
-commit 91ec6245d6269a88a3f3ecd10fa7a7b326b0a616
+commit 186a21c4bac744ffe645c8d1a6dda2d41c6d33d8
 Author: Lyude Paul <lyude@redhat.com>
 Date:   Wed Jun 20 19:12:31 2018 -0400
 
@@ -5164,9 +16968,8 @@ Date:   Wed Jun 20 19:12:31 2018 -0400
     Reviewed-by: Dave Airlie <airlied@redhat.com>
     Cc: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
     Fixes: c8c276c956 ("glamor: Implement PixmapFromBuffers and BuffersFromPixmap")
-    (cherry picked from commit 186a21c4bac744ffe645c8d1a6dda2d41c6d33d8)
 
-commit 821f38fa56087fcb11d2d2483366307fc88bf365
+commit c12f1bd4b76088ea66e3bec9ab9721a52b20cdf2
 Author: Lyude Paul <lyude@redhat.com>
 Date:   Thu Jun 7 20:30:34 2018 -0400
 
@@ -5195,9 +16998,21 @@ Date:   Thu Jun 7 20:30:34 2018 -0400
     Signed-off-by: Lyude Paul <lyude@redhat.com>
     Cc: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
     Reviewed-by: Dave Airlie <airlied@redhat.com>
-    (cherry picked from commit c12f1bd4b76088ea66e3bec9ab9721a52b20cdf2)
 
-commit 2f4d0d84266b82d8838b8b9b7972f45d66f0e2d1
+commit 5a8b886a956773669ceb2a2bcacd59184bcc7c99
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Mon Jun 11 15:10:04 2018 -0400
+
+    configure: Remove unused CONFIGFILE
+    
+    This isn't used for anything, which is just as well, because
+    /etc/xorg.conf is not in fact a path xserver will try to use.
+    
+    Bugzilla: https://bugs.freedesktop.org/8890
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+    Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
+
+commit a85e94a50c94b07574c8701a3ff3c1243f4257f4
 Author: Olivier Fourdan <ofourdan@redhat.com>
 Date:   Fri Jun 15 08:57:12 2018 +0200
 
@@ -5213,9 +17028,8 @@ Date:   Fri Jun 15 08:57:12 2018 +0200
     Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
     Tested-by: Tomas Pelka <tpelka@redhat.com>
     Reviewed-by: Lyude Paul <lyude@redhat.com>
-    (cherry picked from commit a85e94a50c94b07574c8701a3ff3c1243f4257f4)
 
-commit 394ed02f8761c7599fa08628a4d28d34337028f6
+commit f5aace7a27d6d61068dcae46c9756b669ab51d50
 Author: John Lumby <johnlumby@hotmail.com>
 Date:   Tue Jun 26 17:14:34 2018 -0700
 
@@ -5230,9 +17044,8 @@ Date:   Tue Jun 26 17:14:34 2018 -0700
     Signed-off-by: John Lumby <johnlumby@hotmail.com>
     Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
     Signed-off-by: Keith Packard <keithp@keithp.com>
-    (cherry picked from commit f5aace7a27d6d61068dcae46c9756b669ab51d50)
 
-commit 8c2f0f8cbdba04f3d2eb65e3ea98f809545f8e87
+commit f33cb4264387ed14a586ba080885b4d21e4aa48b
 Author: Damien Leone <dleone@nvidia.com>
 Date:   Mon Jun 18 16:24:28 2018 -0700
 
@@ -5246,9 +17059,8 @@ Date:   Mon Jun 18 16:24:28 2018 -0700
     
     Signed-off-by: Damien Leone <dleone@nvidia.com>
     Reviewed-by: Keith Packard <keithp@keithp.com>
-    (cherry picked from commit f33cb4264387ed14a586ba080885b4d21e4aa48b)
 
-commit 180ab06d4564579cf05cb44c2533ac914b68be77
+commit 92daeb31fa3235dc791e0444b072ec4bbc6e35ab
 Author: Olivier Fourdan <ofourdan@redhat.com>
 Date:   Mon Jun 11 09:21:08 2018 +0200
 
@@ -5260,9 +17072,8 @@ Date:   Mon Jun 11 09:21:08 2018 +0200
     
     Suggested-by: Emil Velikov <emil.velikov@collabora.com>
     Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
-    (cherry picked from commit 92daeb31fa3235dc791e0444b072ec4bbc6e35ab)
 
-commit c641d10ef04475f2898cc40536bd5a03371f2761
+commit 792359057bd54548555674d2d309c0cfeebac12d
 Author: Olivier Fourdan <ofourdan@redhat.com>
 Date:   Mon Jun 11 09:13:30 2018 +0200
 
@@ -5284,9 +17095,8 @@ Date:   Mon Jun 11 09:13:30 2018 +0200
     removing the pixmap size, and use the drawable size instead.
     
     Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
-    (cherry picked from commit 792359057bd54548555674d2d309c0cfeebac12d)
 
-commit 79ebd7f689492314067fc863510ad44683b67e64
+commit bdadaa25f5c1f62d30d8e76b4ebfcef414ed9c90
 Author: Olivier Fourdan <ofourdan@redhat.com>
 Date:   Tue Jun 5 19:38:45 2018 +0200
 
@@ -5298,9 +17108,8 @@ Date:   Tue Jun 5 19:38:45 2018 +0200
     Suggested-by: Emil Velikov <emil.velikov@collabora.com>
     Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
     Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
-    (cherry picked from commit bdadaa25f5c1f62d30d8e76b4ebfcef414ed9c90)
 
-commit 81969ab773ddf7bae04eb7d1cca3fe01344dcae9
+commit 5d843f6947538dabde258584a5795e0b25ea8779
 Author: Olivier Fourdan <ofourdan@redhat.com>
 Date:   Tue Jun 5 19:38:44 2018 +0200
 
@@ -5312,9 +17121,8 @@ Date:   Tue Jun 5 19:38:44 2018 +0200
     
     Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
     Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
-    (cherry picked from commit 5d843f6947538dabde258584a5795e0b25ea8779)
 
-commit 60020989b9759a05153f832a160e6f573d53e266
+commit d7185a84b60ed03aaa84eb522dcff365218e7211
 Author: Olivier Fourdan <ofourdan@redhat.com>
 Date:   Tue Jun 5 19:38:43 2018 +0200
 
@@ -5341,9 +17149,8 @@ Date:   Tue Jun 5 19:38:43 2018 +0200
     
     Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
     Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
-    (cherry picked from commit d7185a84b60ed03aaa84eb522dcff365218e7211)
 
-commit cb698ec2ba11b827c4e6785693a83a27eec3c635
+commit 48f037a27c45b571c9750ac812977ac0a33ab12b
 Author: Olivier Fourdan <ofourdan@redhat.com>
 Date:   Tue Jun 5 19:38:42 2018 +0200
 
@@ -5354,9 +17161,8 @@ Date:   Tue Jun 5 19:38:42 2018 +0200
     
     Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
     Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
-    (cherry picked from commit 48f037a27c45b571c9750ac812977ac0a33ab12b)
 
-commit 8ffee3a6bd8901b4c87890087b8bd2ccb4a30a5c
+commit f2fcb4877e976d078b0eb4755177170467341484
 Author: Olivier Fourdan <ofourdan@redhat.com>
 Date:   Tue Jun 5 19:38:41 2018 +0200
 
@@ -5367,9 +17173,8 @@ Date:   Tue Jun 5 19:38:41 2018 +0200
     
     Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
     Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
-    (cherry picked from commit f2fcb4877e976d078b0eb4755177170467341484)
 
-commit aad1525180c0352ab9ea22c35405226b3afa69cc
+commit b74b0f18b8d3032317e38453ee63ae9efd33a098
 Author: Olivier Fourdan <ofourdan@redhat.com>
 Date:   Tue Jun 5 19:38:40 2018 +0200
 
@@ -5384,9 +17189,8 @@ Date:   Tue Jun 5 19:38:40 2018 +0200
     
     Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
     Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
-    (cherry picked from commit b74b0f18b8d3032317e38453ee63ae9efd33a098)
 
-commit 831f7194b7006da14424da219661373e7d49114a
+commit de004eefc60ec595f5d6d81658468e082f8df930
 Author: Olivier Fourdan <ofourdan@redhat.com>
 Date:   Tue Jun 5 19:38:39 2018 +0200
 
@@ -5397,9 +17201,8 @@ Date:   Tue Jun 5 19:38:39 2018 +0200
     Suggested-by: Emil Velikov <emil.velikov@collabora.com>
     Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
     Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
-    (cherry picked from commit de004eefc60ec595f5d6d81658468e082f8df930)
 
-commit 60eda2af0acd54e05ab794947f106f8f2d421e90
+commit b823b43dca143810146f563d09e8996058b9d09e
 Author: Olivier Fourdan <ofourdan@redhat.com>
 Date:   Tue Jun 5 19:38:38 2018 +0200
 
@@ -5414,9 +17217,8 @@ Date:   Tue Jun 5 19:38:38 2018 +0200
     Suggested-by: Emil Velikov <emil.velikov@collabora.com>
     Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
     Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
-    (cherry picked from commit b823b43dca143810146f563d09e8996058b9d09e)
 
-commit f8e96b22bfac0733328fb9902c151003db5cc724
+commit 78ce4aa979ff3f5870fbc12a7e5c53547084a61a
 Author: Olivier Fourdan <ofourdan@redhat.com>
 Date:   Tue Jun 5 19:38:37 2018 +0200
 
@@ -5428,9 +17230,8 @@ Date:   Tue Jun 5 19:38:37 2018 +0200
     
     Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
     Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
-    (cherry picked from commit 78ce4aa979ff3f5870fbc12a7e5c53547084a61a)
 
-commit 443e3348bb3c561160a2542365507179bd8dd825
+commit f6b2109c1b49484af772df518314ec8e8432febe
 Author: Olivier Fourdan <ofourdan@redhat.com>
 Date:   Tue Jun 5 19:38:36 2018 +0200
 
@@ -5461,9 +17262,8 @@ Date:   Tue Jun 5 19:38:36 2018 +0200
     
     Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
     Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
-    (cherry picked from commit f6b2109c1b49484af772df518314ec8e8432febe)
 
-commit dea40be93577dff80cf25e9b39c2aaea030b9c9e
+commit d31a7be15e259275599a9f67e0d921471ae64913
 Author: Olivier Fourdan <ofourdan@redhat.com>
 Date:   Tue Jun 5 19:37:58 2018 +0200
 
@@ -5475,9 +17275,8 @@ Date:   Tue Jun 5 19:37:58 2018 +0200
     Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
     Reviewed-by: Lyude Paul <lyude@redhat.com>
     Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
-    (cherry picked from commit d31a7be15e259275599a9f67e0d921471ae64913)
 
-commit 04a19291c93aaa4feeaf7a87663eaf1ef7c1f4b8
+commit e16a6da79dea793a335be70ba07d5e1c1295b5eb
 Author: Olivier Fourdan <ofourdan@redhat.com>
 Date:   Tue Jun 5 19:37:57 2018 +0200
 
@@ -5494,9 +17293,8 @@ Date:   Tue Jun 5 19:37:57 2018 +0200
     Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
     Reviewed-by: Lyude Paul <lyude@redhat.com>
     Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
-    (cherry picked from commit e16a6da79dea793a335be70ba07d5e1c1295b5eb)
 
-commit de40a55235614d6114e97bd8c6f687bb555bdba8
+commit 44560af02823239e1b5b236e8cb365b5bdf24b6a
 Author: Olivier Fourdan <ofourdan@redhat.com>
 Date:   Tue Jun 5 19:37:56 2018 +0200
 
@@ -5551,9 +17349,8 @@ Date:   Tue Jun 5 19:37:56 2018 +0200
     Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
     Reviewed-by: Lyude Paul <lyude@redhat.com>
     Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
-    (cherry picked from commit 44560af02823239e1b5b236e8cb365b5bdf24b6a)
 
-commit 2d31a40db5ab3dc93863dc5ed9d9865490508575
+commit dbde3fec32641ae23389cffa12a04d3608936795
 Author: Olivier Fourdan <ofourdan@redhat.com>
 Date:   Tue Jun 5 19:37:55 2018 +0200
 
@@ -5569,9 +17366,8 @@ Date:   Tue Jun 5 19:37:55 2018 +0200
     Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
     Reviewed-by: Lyude Paul <lyude@redhat.com>
     Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
-    (cherry picked from commit dbde3fec32641ae23389cffa12a04d3608936795)
 
-commit 65d46b2dfd638f6f6c6e52f3494c64716fc6687e
+commit 06c31e782e360363238cf20e7afd3e4990a2c304
 Author: Olivier Fourdan <ofourdan@redhat.com>
 Date:   Tue Jun 5 19:37:54 2018 +0200
 
@@ -5594,9 +17390,8 @@ Date:   Tue Jun 5 19:37:54 2018 +0200
     Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
     Reviewed-by: Lyude Paul <lyude@redhat.com>
     Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
-    (cherry picked from commit 06c31e782e360363238cf20e7afd3e4990a2c304)
 
-commit 38835d1d8f613c3553149fc05e61a8bb9b0aef48
+commit 707d0f912b916e7546c4f7e7a5f7023a53e74615
 Author: Vladimir Panteleev <git@thecybershadow.net>
 Date:   Wed Jun 20 13:37:45 2018 +0000
 
@@ -5609,9 +17404,23 @@ Date:   Wed Jun 20 13:37:45 2018 +0000
     Fixes address sanitizer failure on 64-bit builds.
     
     Reviewed-by: Adam Jackson <ajax@redhat.com>
-    (cherry picked from commit 707d0f912b916e7546c4f7e7a5f7023a53e74615)
 
-commit d7220428daee26acecb6ae9771e255c801c83572
+commit 0170e200f546e4b3430bd07a70551436cf44b0be
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Mon Jun 11 09:04:22 2018 +1000
+
+    xwayland: add "tablet" into the tablet device names
+    
+    Changes the device name from "xwayland-stylus" to "xwayland-tablet stylus".
+    This doesn't fully address #26 but it goes a little step into making it more
+    human-readable.
+    
+    https://gitlab.freedesktop.org/wayland/wayland/issues/26
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
+
+commit ec7e2b54c5b4a34b2a077082967bc3ead30e227e
 Author: Alexander Volkov <a.volkov@rusbitech.ru>
 Date:   Tue Jun 5 13:05:39 2018 +0300
 
@@ -5626,9 +17435,8 @@ Date:   Tue Jun 5 13:05:39 2018 +0300
     Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=11080
     Signed-off-by: Alexander Volkov <a.volkov@rusbitech.ru>
     Reviewed-by: Adam Jackson <ajax@redhat.com>
-    (cherry picked from commit ec7e2b54c5b4a34b2a077082967bc3ead30e227e)
 
-commit 9e417072bcde15f32dbf083327b6fe0202bb4cf4
+commit 5c95be38e5af28108d8c6c08dfe08d1dfcb7ed42
 Author: Michał Górny <gentoo@mgorny.alt.pl>
 Date:   Mon Jun 11 17:17:31 2018 -0400
 
@@ -5641,9 +17449,25 @@ Date:   Mon Jun 11 17:17:31 2018 -0400
     Signed-off-by: Adam Jackson <ajax@redhat.com>
     Signed-off-by: Michał Górny <gentoo@mgorny.alt.pl>
     Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
-    (cherry picked from commit 5c95be38e5af28108d8c6c08dfe08d1dfcb7ed42)
 
-commit 2e66ed066e4a9b52bcebf2ca3762f7e1ad141cf0
+commit 166ac294aefe21a6cfcc0e7a4c9525eef49c2f0c
+Author: Matt Turner <mattst88@gmail.com>
+Date:   Tue May 22 21:10:55 2018 -0700
+
+    xfree86: Inline xf86{Read,Write}Mmio{8,16,32} on alpha
+    
+    In commit 9db2af6f757e (xfree86: Remove xf86{Map,Unmap}VidMem) we
+    somehow stopped exporting xf86{Read,Write}Mmio{8,16,32}. Since the
+    function pointer indirection was intended to support dense vs sparse and
+    sparse support is now gone, we can just make the functions static inline
+    in compiler.h and avoid all of this.
+    
+    Bugzilla: https://bugs.gentoo.org/548906
+    Tested-by: Christopher May-Townsend <chris@maytownsend.co.uk>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+    Signed-off-by: Matt Turner <mattst88@gmail.com>
+
+commit 1993f147d08170f07a72e43f0a0f27687e16967b
 Author: Olivier Fourdan <ofourdan@redhat.com>
 Date:   Fri Jun 8 16:23:44 2018 +0200
 
@@ -5666,9 +17490,8 @@ Date:   Fri Jun 8 16:23:44 2018 +0200
     Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
     Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
     Reviewed-by: Roman Gilg <subdiff@gmail.com>
-    (cherry picked from commit 1993f147d08170f07a72e43f0a0f27687e16967b)
 
-commit 883d4d00b46f18902ad402a156d56b1bfcc06ebe
+commit 10eec2ccb11701fe29ab246acd6c0bdc2991b775
 Author: Michel Dänzer <michel.daenzer@amd.com>
 Date:   Thu Jun 7 17:55:21 2018 +0200
 
@@ -5686,9 +17509,8 @@ Date:   Thu Jun 7 17:55:21 2018 +0200
     Reviewed-by: Keith Packard <keithp@keithp.com> # v1
     Reviewed-by: Roman Gilg <subdiff@gmail.com>
     Tested-by: Olivier Fourdan <ofourdan@redhat.com> # v1
-    (cherry picked from commit 10eec2ccb11701fe29ab246acd6c0bdc2991b775)
 
-commit 55171d738a0c2dd8a37ba2c880ea4658fd8001a2
+commit 6300049a9a4b84789a2e8141f5cad17adf22185c
 Author: Dave Airlie <airlied@redhat.com>
 Date:   Tue May 29 10:39:22 2018 +1000
 
@@ -5697,10 +17519,8 @@ Date:   Tue May 29 10:39:22 2018 +1000
     Pointed out on irc by q66.
     Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
     Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
-    
-    (cherry picked from commit 6300049a9a4b84789a2e8141f5cad17adf22185c)
 
-commit 64bf28572946da1db84f6e61b02b5e6432f13d10
+commit 40586cc4f8faa271d62fd84fe98c41debb878984
 Author: Roman Kapl <code@rkapl.cz>
 Date:   Thu Jun 7 03:31:42 2018 +0200
 
@@ -5710,9 +17530,8 @@ Date:   Thu Jun 7 03:31:42 2018 +0200
     
     Signed-off-by: Roman Kapl <code@rkapl.cz>
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-    (cherry picked from commit 40586cc4f8faa271d62fd84fe98c41debb878984)
 
-commit 273115a01285ff2ce4837687f9bfc9d745a519a3
+commit cefbc6a9356e5c6cf935b61557efa897762defae
 Author: Roman Kapl <code@rkapl.cz>
 Date:   Thu Jun 7 03:31:41 2018 +0200
 
@@ -5728,9 +17547,21 @@ Date:   Thu Jun 7 03:31:41 2018 +0200
     
     Signed-off-by: Roman Kapl <code@rkapl.cz>
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-    (cherry picked from commit cefbc6a9356e5c6cf935b61557efa897762defae)
 
-commit 69980e4e5a0d8ff3b36acf09e3c1e8eb76710726
+commit 9b8999411033c9473cd68e92e4690a91aecf5b95
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Wed Jun 6 15:56:26 2018 -0400
+
+    glamor: Enable modifier support for xfree86 too
+    
+    This was left disabled in 1.20.0, it's time to start being sure it
+    works.
+    
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+    Acked-by: Keith Packard <keithp@keithp.com>
+    Acked-by: Daniel Stone <daniels@collabora.com>
+
+commit 3ebef6ab850675e1091df2125ebdfbb147436e6c
 Author: Michel Dänzer <michel.daenzer@amd.com>
 Date:   Fri Jun 1 11:57:15 2018 +0200
 
@@ -5742,9 +17573,8 @@ Date:   Fri Jun 1 11:57:15 2018 +0200
     Fixes: 8171d4c2d67b "render: Store and use all 16bpc of precision for
                          solid pixels (v2.1)"
     Reviewed-by: Adam Jackson <ajax@redhat.com>
-    (cherry picked from commit 3ebef6ab850675e1091df2125ebdfbb147436e6c)
 
-commit 33f20c38fc15e6664635ad22a581d7860e4b185d
+commit 4d5950ce14676f970d9de97380929a93948b98f2
 Author: Michel Dänzer <michel.daenzer@amd.com>
 Date:   Wed May 23 11:18:02 2018 +0200
 
@@ -5761,9 +17591,8 @@ Date:   Wed May 23 11:18:02 2018 +0200
     Fixes: c8c276c9569b "glamor: Implement PixmapFromBuffers and
                          BuffersFromPixmap"
     Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
-    (cherry picked from commit 4d5950ce14676f970d9de97380929a93948b98f2)
 
-commit 544caffae1b0dc786383b117c036284feb579a66
+commit 3da999a0390407d512bf784e4faf01482bfff9ea
 Author: Michel Dänzer <michel.daenzer@amd.com>
 Date:   Wed May 23 11:38:13 2018 +0200
 
@@ -5775,9 +17604,8 @@ Date:   Wed May 23 11:38:13 2018 +0200
     Fixes: c8c276c9569b "glamor: Implement PixmapFromBuffers and
                          BuffersFromPixmap"
     Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
-    (cherry picked from commit 3da999a0390407d512bf784e4faf01482bfff9ea)
 
-commit a9a17581ce73a49f0a8d3b9dbb2db083fa44cb69
+commit 315c63c41d833700c505e4f21ffac4c59e1e3b2c
 Author: Michel Dänzer <michel.daenzer@amd.com>
 Date:   Fri May 18 11:23:01 2018 +0200
 
@@ -5787,9 +17615,8 @@ Date:   Fri May 18 11:23:01 2018 +0200
     
     Reviewed-by: Keith Packard <keithp@keithp.com>
     Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
-    (cherry picked from commit 315c63c41d833700c505e4f21ffac4c59e1e3b2c)
 
-commit c3a06e330b7e55e1daeefbb5c16a075c80233bb0
+commit ab53e2859facecc0486344679dc01ea31fb427e9
 Author: Michel Dänzer <michel.daenzer@amd.com>
 Date:   Fri May 18 11:23:00 2018 +0200
 
@@ -5799,9 +17626,35 @@ Date:   Fri May 18 11:23:00 2018 +0200
     
     Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
     Reviewed-by: Keith Packard <keithp@keithp.com>
-    (cherry picked from commit ab53e2859facecc0486344679dc01ea31fb427e9)
 
-commit 662273397c537d031e1aee7c607c925ec6bb2d10
+commit 1e9d5533e3c08fc22099d6dd0f11fa642ab4f1b0
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date:   Sun Apr 15 15:40:05 2018 +0100
+
+    os/WaitFor: Use the simpler xorg_list_for_each_entry()
+    
+    As we are not freeing elements while iterating the list of timers, we
+    can forgo using the safe variant, and reduce the number of pointer
+    dances required for the insertion sort.
+    
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+
+commit 6115d8b40ce0c91620b6d5e7d18e0da704409f89
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date:   Sun Apr 15 15:40:04 2018 +0100
+
+    os/WaitFor: Use xorg_list_append()
+    
+    Currently, we use xorg_list_add(new, head->prev) which is functionaly
+    equivalent to xorg_list_append(), but with more pointer chasing, so
+    reduce the strain on the reader and compiler by using the simpler
+    append().
+    
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+
+commit 7437b6dbdee050f8ebb3a79b9077d051c91880c3
 Author: Lukas F. Hartmann <lukas@mntmn.com>
 Date:   Tue May 15 21:51:56 2018 +0200
 
@@ -5833,10 +17686,8 @@ Date:   Tue May 15 21:51:56 2018 +0200
     Cheers
     Lukas (mntmn)
     Reviewed-by: Eric Anholt <eric@anholt.net>
-    
-    (cherry picked from commit 7437b6dbdee050f8ebb3a79b9077d051c91880c3)
 
-commit 590374bd9213091b51679887d473d1a3067c99b5
+commit 3ab32a537840c6e6d6228b4ba62f98fbf5224f8a
 Author: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
 Date:   Sun May 13 15:31:37 2018 +0200
 
@@ -5852,9 +17703,8 @@ Date:   Sun May 13 15:31:37 2018 +0200
     
     Signed-off-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
     Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
-    (cherry picked from commit 3ab32a537840c6e6d6228b4ba62f98fbf5224f8a)
 
-commit 5407be2c516fa23c505e7ba254367b5739399960
+commit 27eff10bfa1a02da7338a82e2312d2080e3e5876
 Author: Jon Turney <jon.turney@dronecode.org.uk>
 Date:   Sun May 13 19:36:05 2018 +0100
 
@@ -5864,9 +17714,8 @@ Date:   Sun May 13 19:36:05 2018 +0100
     
     Reviewed-by: Adam Jackson <ajax@redhat.com>
     Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
-    (cherry picked from commit 27eff10bfa1a02da7338a82e2312d2080e3e5876)
 
-commit acd881e271419a2fc08cfc34ed9845346cee9e84
+commit 47321bb455b1226c04711241496e62667eea34ea
 Author: Jon Turney <jon.turney@dronecode.org.uk>
 Date:   Sun May 13 19:36:04 2018 +0100
 
@@ -5874,9 +17723,8 @@ Date:   Sun May 13 19:36:04 2018 +0100
     
     Reviewed-by: Adam Jackson <ajax@redhat.com>
     Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
-    (cherry picked from commit 47321bb455b1226c04711241496e62667eea34ea)
 
-commit c09c78298cdb4cdd8383e252d8fe68adae1f3c54
+commit 08a3583b5b2f812cc7f039aebd74ff9b1cb0dbcd
 Author: Jon Turney <jon.turney@dronecode.org.uk>
 Date:   Sun May 13 19:36:03 2018 +0100
 
@@ -5886,7 +17734,14 @@ Date:   Sun May 13 19:36:03 2018 +0100
     
     Reviewed-by: Adam Jackson <ajax@redhat.com>
     Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
-    (cherry picked from commit 08a3583b5b2f812cc7f039aebd74ff9b1cb0dbcd)
+
+commit f50afa19fd67ca8a059eb909814a4d673bcb5a31
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Mon May 14 14:08:01 2018 -0400
+
+    Post-1.20 version bump
+    
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
 
 commit 82f8fc5ffc0065537896ec43ae60d67d9a164c75
 Author: Adam Jackson <ajax@redhat.com>
@@ -19196,7 +31051,7 @@ Date:   Fri Oct 28 09:28:32 2016 -0700
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 356db2340f5b473a7191c7969586ca5b0396c48f
-Merge: 9ed5b2635 03d99ef72
+Merge: 9ed5b26354 03d99ef729
 Author: Keith Packard <keithp@keithp.com>
 Date:   Fri Oct 28 09:05:54 2016 -0700
 
@@ -21137,7 +32992,7 @@ Date:   Sun Sep 11 03:07:44 2016 -0700
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 265c4e66533243b60d92cffc7769ecadb0292c8d
-Merge: 3caf671ed f5f4d32ac
+Merge: 3caf671ed2 f5f4d32ac7
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu Sep 15 21:32:46 2016 -0700
 
@@ -22322,7 +34177,7 @@ Date:   Fri Jul 29 17:45:45 2016 -0700
     Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer@amd.com>
 
 commit 387d6b5df3e11de5cb88db8a559128fcb62e4e5a
-Merge: d2558f063 8bb9d460f
+Merge: d2558f063a 8bb9d460fb
 Author: Keith Packard <keithp@keithp.com>
 Date:   Sat Aug 13 09:12:19 2016 -0700
 
@@ -24521,7 +36376,7 @@ Date:   Tue May 10 00:29:58 2016 +0000
     Signed-off-by: Guilherme Quentel Melo <gqmelo@gmail.com>
 
 commit 266cf39a8f108e2f365a9772f4ee4d9fca88eb36
-Merge: fa7b70a9b 848089e0d
+Merge: fa7b70a9b8 848089e0dd
 Author: Adam Jackson <ajax@redhat.com>
 Date:   Mon Jun 20 11:21:40 2016 -0400
 
@@ -25164,7 +37019,7 @@ Date:   Wed Mar 9 10:31:13 2016 +0100
     Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
 
 commit 3735ab965a4642273d070840bda4e827991e5219
-Merge: 7c77c42fe 43dbc556f
+Merge: 7c77c42fe8 43dbc556f3
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu Jun 2 07:47:16 2016 -0700
 
@@ -30929,7 +42784,7 @@ Date:   Mon Sep 21 07:16:12 2015 +0100
     Reviewed-by: Adam Jackson <ajax@redhat.com>
 
 commit 5b582a4a0350c253d729efb31b710851ae9a958e
-Merge: 1d4aa6724 27ad21254
+Merge: 1d4aa67242 27ad21254f
 Author: Adam Jackson <ajax@redhat.com>
 Date:   Mon Oct 19 12:23:22 2015 -0400
 
@@ -31540,7 +43395,7 @@ Date:   Fri Sep 25 14:04:34 2015 +0100
     Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
 
 commit dca5770af9e20bb1148374ebfd60931a81b148a2
-Merge: a31bbc450 21f384b7b
+Merge: a31bbc450a 21f384b7b8
 Author: Adam Jackson <ajax@redhat.com>
 Date:   Fri Sep 25 10:23:28 2015 -0400
 
@@ -32174,7 +44029,7 @@ Date:   Mon Sep 21 15:23:23 2015 -0400
     Signed-off-by: Adam Jackson <ajax@redhat.com>
 
 commit b25f7d0c165c4d32c73fbdf9080012503d319ba1
-Merge: db1089eaf 1ba4fde10
+Merge: db1089eafc 1ba4fde101
 Author: Adam Jackson <ajax@redhat.com>
 Date:   Mon Sep 21 17:34:48 2015 -0400
 
@@ -32797,7 +44652,7 @@ Date:   Tue Jul 7 18:19:50 2015 +0200
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 7ecdfbf0af3547295b245efa754123db65cabb43
-Merge: bca4f4b56 a0b4f30b1
+Merge: bca4f4b56c a0b4f30b1f
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Aug 17 18:53:25 2015 -0700
 
@@ -33044,7 +44899,7 @@ Date:   Thu Jul 16 15:12:52 2015 -0700
     Signed-off-by: Eric Anholt <eric@anholt.net>
 
 commit 2fcfa532532fbe4a7f668556808e6245ff4e36bc
-Merge: cb695b0f3 7b0f94062
+Merge: cb695b0f3b 7b0f940625
 Author: Eric Anholt <eric@anholt.net>
 Date:   Fri Jul 17 10:15:01 2015 -0700
 
@@ -33651,7 +45506,7 @@ Date:   Tue Jun 30 14:54:42 2015 +1000
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 991712f1e8deeb6289ee0abd9910e279d6396246
-Merge: 0cd228073 3c859112d
+Merge: 0cd228073a 3c859112d3
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Jul 8 10:43:31 2015 -0700
 
@@ -34203,28 +46058,28 @@ Date:   Tue May 12 14:19:15 2015 -0400
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 8a8d51358cea782147bb9b5b2e0902b1e47fcf4a
-Merge: b22534d8e 13c7d53df
+Merge: b22534d8e6 13c7d53df8
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Jun 29 21:04:53 2015 -0700
 
     Merge remote-tracking branch 'airlied/for-keithp'
 
 commit b22534d8e653575196180970292eaade33c090a8
-Merge: 0a625adee 780a69aff
+Merge: 0a625adeec 780a69aff0
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Jun 29 21:04:11 2015 -0700
 
     Merge remote-tracking branch 'jwrdecoede/for-keith'
 
 commit 0a625adeec465d6c7dcdb8622c53157b4e932bb0
-Merge: 84128c10b 790311cec
+Merge: 84128c10bb 790311cec3
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Jun 29 21:01:34 2015 -0700
 
     Merge remote-tracking branch 'anholt/glamor-next'
 
 commit 84128c10bb6d34f78f7a4148b3c640748efe58e1
-Merge: 9003a3e5c 8c86dd516
+Merge: 9003a3e5c5 8c86dd5160
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Jun 29 20:59:31 2015 -0700
 
@@ -35248,14 +47103,14 @@ Date:   Tue Mar 17 10:21:12 2015 +0900
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 0409b6e6d63e9cfb5dc71bb27de4b1ed0152dd9b
-Merge: c39c3a975 23702dd26
+Merge: c39c3a9750 23702dd268
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon May 11 16:50:43 2015 -0700
 
     Merge remote-tracking branch 'evelikov/master'
 
 commit c39c3a97508dc384c0757a0990c07b5d7b2fe97a
-Merge: 6b65e9618 747057852
+Merge: 6b65e96189 7470578520
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon May 11 16:34:48 2015 -0700
 
@@ -35274,7 +47129,7 @@ Date:   Wed May 6 15:07:21 2015 +1200
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit d7091a21d90cf463ae39ec5e8741123218ec5686
-Merge: c3ce9d8fd 8fb8bbb30
+Merge: c3ce9d8fd4 8fb8bbb306
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon May 11 15:49:34 2015 -0700
 
@@ -35342,7 +47197,7 @@ Date:   Sat Apr 25 21:19:25 2015 +0200
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 26e50e8b2cbd01d050b5ecc02d47488b53ecc08b
-Merge: 28ff661e7 c7b49bdbb
+Merge: 28ff661e73 c7b49bdbb9
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon May 11 15:36:53 2015 -0700
 
@@ -36006,7 +47861,7 @@ Date:   Tue Dec 30 09:13:15 2014 -0800
     Acked-by: Alex Deucher <alexander.deucher@amd.com>
 
 commit e608f3521eaaab972a3eea62aa04a65958351c1c
-Merge: d3b9c47c8 5de138307
+Merge: d3b9c47c84 5de1383070
 Author: Keith Packard <keithp@keithp.com>
 Date:   Tue Mar 31 09:06:08 2015 -0700
 
@@ -36078,7 +47933,7 @@ Date:   Tue Mar 31 11:18:44 2015 +1000
     Signed-off-by: Dave Airlie <airlied@redhat.com>
 
 commit 7088816fee0ca7d609c7bca41ef8c3fc938556f5
-Merge: 95e83ff87 e977b404d
+Merge: 95e83ff87a e977b404d7
 Author: Keith Packard <keithp@keithp.com>
 Date:   Fri Mar 27 06:45:56 2015 -0700
 
@@ -37567,7 +49422,7 @@ Date:   Thu Jan 15 22:03:18 2015 +0100
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 5f2e8ac51ccbf7c02f25c8cb7617df0238418cd1
-Merge: 4e12d7b6f 430147950
+Merge: 4e12d7b6f4 4301479508
 Author: Keith Packard <keithp@keithp.com>
 Date:   Sat Jan 10 14:51:57 2015 +1300
 
@@ -37651,7 +49506,7 @@ Date:   Sun Jan 4 19:13:35 2015 -0800
     Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
 
 commit 1c01633877caa4239f901f02fbe113926318d030
-Merge: 357385551 e774663fa
+Merge: 3573855514 e774663fa5
 Author: Keith Packard <keithp@keithp.com>
 Date:   Sun Jan 4 17:02:25 2015 -0800
 
@@ -38394,7 +50249,7 @@ Date:   Mon Dec 1 16:06:17 2014 -0500
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 6704bb0ed7a10dabe8ef3bb3adf8b8a7f29a78f0
-Merge: 8aa23f27c 1559a9439
+Merge: 8aa23f27c7 1559a94395
 Author: Keith Packard <keithp@keithp.com>
 Date:   Tue Dec 9 11:47:11 2014 -0800
 
@@ -38992,14 +50847,14 @@ Date:   Fri Jan 17 18:54:03 2014 -0800
     Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
 
 commit 3e7218a6c23354d66f508b18164cac98a346b3ee
-Merge: 6f4c398a0 bc71081f0
+Merge: 6f4c398a0e bc71081f0e
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Dec 8 18:07:55 2014 -0800
 
     Merge remote-tracking branch 'jturney/indirect-glx-fixes'
 
 commit 6f4c398a0e632b0c92e3cb8ee03ca7f5b5cc018e
-Merge: aae646069 5920433c3
+Merge: aae6460694 5920433c3a
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Dec 8 18:04:08 2014 -0800
 
@@ -39317,7 +51172,7 @@ Date:   Tue Nov 11 12:30:07 2014 -0500
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit ec0ac8970b508adcbc3d104b14a127118e4979d0
-Merge: 65cc0982a 0f88d4e79
+Merge: 65cc0982af 0f88d4e793
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Nov 24 15:39:51 2014 -0800
 
@@ -39863,7 +51718,7 @@ Date:   Tue Oct 21 15:03:55 2014 +0100
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 3a123fbdda56b24dc01a2308137144dc960e0d61
-Merge: 9b29fa957 7ea4a21fe
+Merge: 9b29fa957a 7ea4a21fee
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Oct 27 15:39:26 2014 -0700
 
@@ -39906,7 +51761,7 @@ Date:   Mon Oct 27 15:28:14 2014 -0700
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 59b12c454d9c4b5a26c6ad87c53abc671b15ce37
-Merge: 5574a0a07 cac4b064f
+Merge: 5574a0a07e cac4b064f9
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Oct 27 14:48:55 2014 -0700
 
@@ -40384,7 +52239,7 @@ Date:   Thu Oct 9 09:58:06 2014 +0200
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit de55aafa8f6a9e0dec364bec920d6f91ef2b39f0
-Merge: 462bf87c4 c79f824bf
+Merge: 462bf87c4d c79f824bf6
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu Oct 23 17:28:24 2014 -0700
 
@@ -40623,21 +52478,21 @@ Date:   Thu Oct 9 15:17:17 2014 +0200
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit d634ecdf82f244ff8ce75d351fc175792d254e5c
-Merge: 6622f0cb1 7ebf480f5
+Merge: 6622f0cb17 7ebf480f5e
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu Oct 9 15:08:31 2014 +0200
 
     Merge remote-tracking branch 'ajax/dead-code'
 
 commit 6622f0cb1761501f3287ffa8d3cbca3fd30f9f0c
-Merge: f12e7f498 5ecd7866f
+Merge: f12e7f4980 5ecd7866f7
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu Oct 9 15:05:26 2014 +0200
 
     Merge remote-tracking branch 'ajax/mi-cleanup'
 
 commit f12e7f4980416b74988052a04d0f2487b2c4a7e9
-Merge: da887726e aaf5e2d64
+Merge: da887726ee aaf5e2d643
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu Oct 9 14:21:19 2014 +0200
 
@@ -41015,7 +52870,7 @@ Date:   Thu Oct 2 10:26:53 2014 -0700
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit e9651e3dbc32650fcaf90888b4cbef81da77cfcd
-Merge: 9bc01dfc7 4433bc6d5
+Merge: 9bc01dfc70 4433bc6d53
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu Oct 2 10:24:33 2014 -0700
 
@@ -41087,7 +52942,7 @@ Date:   Thu Sep 25 15:27:22 2014 +0900
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 78c27d12e1f4857bfcfc92afbb69d5dd989232b9
-Merge: 6e50bfa70 1d6334dd0
+Merge: 6e50bfa706 1d6334dd0c
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Sep 29 13:04:49 2014 -0700
 
@@ -41544,7 +53399,7 @@ Date:   Wed Sep 17 07:41:27 2014 +0200
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit eaee6572beefca240c42791f9a3a6e547bedd410
-Merge: e3aa13b8d b84d25fd5
+Merge: e3aa13b8d6 b84d25fd53
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Sep 17 15:49:24 2014 -0700
 
@@ -42231,7 +54086,7 @@ Date:   Wed Sep 10 16:20:45 2014 +0900
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 54a1d4db825be90fb7be138e3267a15922d62f03
-Merge: 8f8dcfee2 f92df22a0
+Merge: 8f8dcfee20 f92df22a03
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu Sep 11 18:27:41 2014 -0700
 
@@ -42530,7 +54385,7 @@ Date:   Fri Jun 13 16:16:51 2014 +0100
     Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
 
 commit 35dc7c75150733dbcef8a18b6796f49a7c48ebee
-Merge: 3a51418b2 5f3485b06
+Merge: 3a51418b2d 5f3485b06e
 Author: Eric Anholt <eric@anholt.net>
 Date:   Mon Aug 25 15:52:58 2014 -0700
 
@@ -42741,7 +54596,7 @@ Date:   Mon Aug 11 15:23:02 2014 -0700
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit d09c9ddb866dea31e2adf82be329d5d3489718f5
-Merge: 606b701c5 ab32ee358
+Merge: 606b701c56 ab32ee3589
 Author: Keith Packard <keithp@keithp.com>
 Date:   Tue Aug 12 16:34:24 2014 -0700
 
@@ -43748,7 +55603,7 @@ Date:   Tue Jul 22 17:55:25 2014 +0200
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 556cdf8fe870bc23e0393c0eed15c86f49a0b9f8
-Merge: 83701c4ee 1faa76670
+Merge: 83701c4ee8 1faa766705
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu Jul 24 16:51:00 2014 -0700
 
@@ -43979,14 +55834,14 @@ Date:   Fri Jul 18 09:13:54 2014 -0400
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 5c2e9fa3d6c4bdf626fededce866056ba8eca502
-Merge: e678b4971 6d4954884
+Merge: e678b4971b 6d49548849
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu Jul 17 20:06:21 2014 -0700
 
     Merge remote-tracking branch 'anholt/glamor-next'
 
 commit 6d4954884908ea9894fcfe9836db1ba7bb45be61
-Merge: 9ddcb20f4 55f5bfb57
+Merge: 9ddcb20f47 55f5bfb578
 Author: Eric Anholt <eric@anholt.net>
 Date:   Thu Jul 17 18:00:44 2014 -0700
 
@@ -44518,7 +56373,7 @@ Date:   Mon Jul 7 08:27:44 2014 +1000
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
 
 commit 9de3cc8daa4c6e877d30a0e8ccfe0cc159f1dbe3
-Merge: 9308eafb7 a5499870e
+Merge: 9308eafb7d a5499870e2
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Jul 7 16:53:07 2014 -0700
 
@@ -44769,7 +56624,7 @@ Date:   Mon Jun 16 08:06:53 2014 +0100
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 736bed2aaf4bb672b6c7b33146fe84700baf22bd
-Merge: ce581ac3f d90b5f830
+Merge: ce581ac3fa d90b5f8301
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Jun 23 14:18:03 2014 -0700
 
@@ -44808,7 +56663,7 @@ Date:   Mon Feb 24 11:36:54 2014 +0100
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit ea47341792cf06eda5bbdf0aca48aacc024a5be0
-Merge: 334faabe6 a11bbd875
+Merge: 334faabe68 a11bbd875f
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Jun 23 13:50:54 2014 -0700
 
@@ -45539,7 +57394,7 @@ Date:   Wed May 28 08:13:59 2014 +0100
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit b5526141f78df15bc5df2497bc4b4a17f1a6368d
-Merge: dc8d06884 a205ec3ab
+Merge: dc8d068847 a205ec3ab7
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Jun 2 13:08:23 2014 -0700
 
@@ -45556,7 +57411,7 @@ Date:   Mon Jun 2 01:17:31 2014 +0400
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit a6ffdc69c4ac45bc39924159c7fab5f02f720f1f
-Merge: 63c48de63 1c10b3738
+Merge: 63c48de63b 1c10b37380
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Jun 2 11:30:24 2014 -0700
 
@@ -45581,7 +57436,7 @@ Date:   Fri May 30 16:50:35 2014 -0400
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit ab47ec9636b21a7f542d2e8612834915e7c8cc64
-Merge: 0df871cf3 cfaf2abba
+Merge: 0df871cf34 cfaf2abbac
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Jun 2 11:22:48 2014 -0700
 
@@ -45961,7 +57816,7 @@ Date:   Wed Apr 30 10:55:26 2014 +1000
     Reviewed-by: Keith Packard <keithp@keithp.com>
 
 commit d60724b752613ce2ad11c6ae102bf4513f9768ff
-Merge: a5b975714 15460eaed
+Merge: a5b9757142 15460eaed2
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu May 8 12:58:41 2014 -0700
 
@@ -46173,7 +58028,7 @@ Date:   Thu Apr 24 13:38:28 2014 -0400
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 6bd7ad914470322ddd02b50078e159234ebec643
-Merge: b92a9289f e06fbe4dc
+Merge: b92a9289fe e06fbe4dc8
 Author: Keith Packard <keithp@keithp.com>
 Date:   Tue Apr 29 09:37:37 2014 -0700
 
@@ -46956,7 +58811,7 @@ Date:   Mon Apr 21 16:30:49 2014 -0400
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit ba5c2b6c876a15fe18bc1ff1ab4e773c46bc9009
-Merge: 9c86d5f4f 66b602474
+Merge: 9c86d5f4f6 66b6024740
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Apr 21 14:59:51 2014 -0700
 
@@ -47376,7 +59231,7 @@ Date:   Tue Apr 8 01:01:28 2014 -0700
     Reviewed-by: Eric Anholt <eric@anholt.net>
 
 commit 3028ae6c9aa37168e249e0d847b29f8e3efb05b2
-Merge: bd3de10f8 ec6007e6f
+Merge: bd3de10f86 ec6007e6f7
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Apr 9 21:59:17 2014 -0700
 
@@ -47470,7 +59325,7 @@ Date:   Thu Apr 3 18:22:50 2014 +0100
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit b4d0bec22c15930abf13a7fb9d684208ccd56b1d
-Merge: 3c34dd360 6e539d881
+Merge: 3c34dd3603 6e539d8817
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu Apr 3 15:35:01 2014 -0700
 
@@ -47739,7 +59594,7 @@ Date:   Fri Mar 21 13:13:27 2014 -0700
     Reviewed-by: Julien Cristau <jcristau@debian.org>
 
 commit 84f977467b514af88019ab2791bf7a74530b54df
-Merge: 9d20d18fb 98924719d
+Merge: 9d20d18fb9 98924719d5
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu Apr 3 10:44:28 2014 -0700
 
@@ -47900,7 +59755,7 @@ Date:   Wed Mar 26 12:24:49 2014 +0100
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
 
 commit 9d20d18fb9dcc74bfa5392a2da40fd41b3e640d3
-Merge: 8468e2443 bc348bd2c
+Merge: 8468e24430 bc348bd2c4
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Mar 31 23:24:56 2014 -0700
 
@@ -48423,7 +60278,7 @@ Date:   Tue Mar 25 13:48:52 2014 -0400
     Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
 
 commit bda6fdc71c25b0c3f3747f445103a1995a5713f4
-Merge: e46820fb8 78167a98a
+Merge: e46820fb89 78167a98a8
 Author: Keith Packard <keithp@keithp.com>
 Date:   Tue Mar 25 16:06:03 2014 -0700
 
@@ -48542,7 +60397,7 @@ Date:   Sat Mar 22 14:30:04 2014 -0700
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit d9fdae5f4a648a10653e18dbc602646f3e22e522
-Merge: 99bee6c05 0e5d2996a
+Merge: 99bee6c054 0e5d2996ac
 Author: Keith Packard <keithp@keithp.com>
 Date:   Sat Mar 22 14:09:00 2014 -0700
 
@@ -48576,7 +60431,7 @@ Date:   Fri Jan 17 09:54:01 2014 -0500
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 1782316744866a181ed92486bb4dca6ac46d40bd
-Merge: 4fb31e482 2b77b208d
+Merge: 4fb31e4824 2b77b208da
 Author: Keith Packard <keithp@keithp.com>
 Date:   Sat Mar 22 13:46:15 2014 -0700
 
@@ -48810,7 +60665,7 @@ Date:   Wed Mar 19 10:27:39 2014 -0700
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
 
 commit 4fb31e4824d46edc80bb49b4065152899faa5ac6
-Merge: d18d3f6d1 0e531fbb9
+Merge: d18d3f6d18 0e531fbb97
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Mar 19 06:43:14 2014 -0700
 
@@ -48826,7 +60681,7 @@ Date:   Wed Mar 12 16:31:25 2014 +1000
     Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
 
 commit d18d3f6d18aa7827748f7ba14efd405b525883d0
-Merge: 81a4952d3 6649d0059
+Merge: 81a4952d3d 6649d0059e
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Mar 17 17:29:56 2014 -0700
 
@@ -49485,7 +61340,7 @@ Date:   Fri Mar 7 14:32:28 2014 -0800
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
 
 commit 81a4952d3dcab9ca3a1ee399c773f5ac352036c4
-Merge: 96a28e9c9 795066477
+Merge: 96a28e9c91 795066477e
 Author: Keith Packard <keithp@keithp.com>
 Date:   Tue Mar 11 22:04:36 2014 -0700
 
@@ -49845,7 +61700,7 @@ Date:   Mon Mar 10 08:58:37 2014 +1000
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 1c61d38528a573caadee2468ee59ea558c822e09
-Merge: 5350ae1d3 bf3543739
+Merge: 5350ae1d38 bf3543739d
 Author: Keith Packard <keithp@keithp.com>
 Date:   Fri Mar 7 22:07:19 2014 -0800
 
@@ -50384,7 +62239,7 @@ Date:   Sun Feb 9 11:20:59 2014 +0100
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 1940508a4af33d44a7a8ef24bbdcd1e31e228dab
-Merge: c85ea92af ddeca9274
+Merge: c85ea92af1 ddeca92749
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Feb 24 16:27:52 2014 -0800
 
@@ -50399,7 +62254,7 @@ Date:   Mon Feb 24 09:51:39 2014 -0800
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 0840a303c47b9b10ba8e24e62956da0f1675e963
-Merge: 0f10cfd4b 3d71df48e
+Merge: 0f10cfd4b9 3d71df48e7
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Feb 24 09:40:23 2014 -0800
 
@@ -50765,7 +62620,7 @@ Date:   Sun Feb 9 16:56:40 2014 -0800
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 5300212ce8e9364ba26497605f3edc089af20130
-Merge: ae796d43c 0b193b3ac
+Merge: ae796d43c9 0b193b3ac9
 Author: Keith Packard <keithp@keithp.com>
 Date:   Sun Feb 9 16:05:42 2014 -0800
 
@@ -51328,14 +63183,14 @@ Date:   Tue Jan 28 20:27:49 2014 -0800
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit da1660deeb9032ecca61f4bcdc9fc2eec2ada445
-Merge: 0fbb3d711 9fc19168e
+Merge: 0fbb3d711e 9fc19168e7
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Jan 27 19:02:15 2014 -0800
 
     Merge remote-tracking branch 'whot/for-keith'
 
 commit 0fbb3d711efec5222a57b45a70d28fc98380f3a1
-Merge: 7ddef4f70 b98e49379
+Merge: 7ddef4f703 b98e49379c
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Jan 27 14:11:09 2014 -0800
 
@@ -51823,14 +63678,14 @@ Date:   Wed Dec 11 11:55:37 2013 -0800
     Reviewed-by: Eric Anholt <eric@anholt.net>
 
 commit 25ebb9dbc9df659dec2bf6c27654a5bad2d11f94
-Merge: 409e8e29f 71baa466b
+Merge: 409e8e29fb 71baa466b1
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Jan 22 11:33:53 2014 -0800
 
     Merge remote-tracking branch 'whot/for-keith'
 
 commit 409e8e29fbe16122ba5a4249256fc56e2e68ea93
-Merge: 457bc8354 d6c8d7509
+Merge: 457bc83549 d6c8d75097
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Jan 22 11:32:35 2014 -0800
 
@@ -51858,21 +63713,21 @@ Date:   Sat Jan 4 00:09:45 2014 -0800
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 044a6ef2ff5f2c83a80b11e747f62f48830b526b
-Merge: 0b932cf47 77df653ae
+Merge: 0b932cf47a 77df653ae3
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Jan 22 11:28:54 2014 -0800
 
     Merge remote-tracking branch 'jeremyhu/master'
 
 commit 0b932cf47a4df8ea0f7488e285d218fe7c10dd77
-Merge: 1d76b02fa 295d41fa2
+Merge: 1d76b02fac 295d41fa2a
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Jan 22 11:27:36 2014 -0800
 
     Merge remote-tracking branch 'anholt/xserver-unifdef'
 
 commit 1d76b02fac79c0360ae201e4d1a8ba0e9a00e810
-Merge: 771f390ef 4dd62d780
+Merge: 771f390efd 4dd62d7807
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Jan 22 11:22:35 2014 -0800
 
@@ -52807,7 +64662,7 @@ Date:   Thu Dec 19 14:31:07 2013 -0800
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 4b1ead9d3400acc3402c2480d7cc0527750c32f0
-Merge: 4d6264614 929795d50
+Merge: 4d62646142 929795d50d
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu Dec 19 14:14:59 2013 -0800
 
@@ -56082,7 +67937,7 @@ Date:   Wed Nov 2 13:44:50 2011 +0800
     Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
 
 commit 2dbbe2565052cc024ce0e98918ed34c1239b780a
-Merge: 4d6264614 7982eca62
+Merge: 4d62646142 7982eca622
 Author: Eric Anholt <eric@anholt.net>
 Date:   Wed Dec 18 11:21:07 2013 -0800
 
@@ -56100,7 +67955,7 @@ Date:   Wed Dec 18 11:16:15 2013 -0800
     support code outside of glamor for now.
 
 commit 4d62646142718024b0981eb4f1fd0131e829161f
-Merge: f4bfb14f5 81ba89d67
+Merge: f4bfb14f53 81ba89d670
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Dec 16 09:27:57 2013 -0800
 
@@ -57167,7 +69022,7 @@ Date:   Fri Nov 15 13:26:36 2013 +0900
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 29240e5cbf6e7f875b128fc7bfc4d56b2350835a
-Merge: 0492deb8f 8ff7e32c3
+Merge: 0492deb8f8 8ff7e32c3e
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu Nov 14 17:02:04 2013 +0900
 
@@ -57431,7 +69286,7 @@ Date:   Thu Nov 7 15:18:28 2013 -0800
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit a239e6faf3fce848ac0d10c48f8e817db68a493c
-Merge: 43e5a43fa f70a8bf37
+Merge: 43e5a43fa8 f70a8bf371
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Nov 11 15:26:12 2013 -0800
 
@@ -57668,7 +69523,7 @@ Date:   Fri Nov 1 01:43:59 2013 -0700
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 977e2644b1d9e13b44debcb9a372bbc832ee32a3
-Merge: 66c5ee0ff f36f5a65f
+Merge: 66c5ee0ff4 f36f5a65f6
 Author: Keith Packard <keithp@keithp.com>
 Date:   Fri Nov 1 00:34:18 2013 -0700
 
@@ -57867,7 +69722,7 @@ Date:   Tue Oct 8 17:45:40 2013 -0400
     Reviewed-by: Adam Jackson <ajax@redhat.com>
 
 commit 95bf478b78e466002c382bcde7d4d62591e9215d
-Merge: abf5d5ac1 bb745f2b4
+Merge: abf5d5ac12 bb745f2b45
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu Oct 31 18:18:19 2013 -0700
 
@@ -57889,7 +69744,7 @@ Date:   Thu Oct 31 08:57:56 2013 -0700
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit e4636072949a76477fe7c9d54662a0b3536b1372
-Merge: 17ed7ac1f 5c5c1b779
+Merge: 17ed7ac1fe 5c5c1b7798
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu Oct 31 17:05:48 2013 -0700
 
@@ -58153,7 +70008,7 @@ Date:   Wed Oct 30 13:33:49 2013 +0200
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 1470c0a132806fb2ce817515ad4ddfe66eb7c98f
-Merge: 04ab07ca1 9f4afe7e8
+Merge: 04ab07ca19 9f4afe7e83
 Author: Keith Packard <keithp@keithp.com>
 Date:   Tue Oct 29 21:00:13 2013 -0700
 
@@ -58201,7 +70056,7 @@ Date:   Thu Oct 17 18:26:28 2013 -0700
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit b32a4c91ccd479638c2bd2c0143b6ea170c717d1
-Merge: be6680967 c671e935e
+Merge: be6680967a c671e935e7
 Author: Keith Packard <keithp@keithp.com>
 Date:   Tue Oct 29 09:37:30 2013 -0700
 
@@ -58475,7 +70330,7 @@ Date:   Fri Oct 18 17:31:01 2013 -0700
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit e3220d7bae4548bf64e5879c981ad070ac1f78f7
-Merge: 73b2660d7 2523a445a
+Merge: 73b2660d72 2523a445a0
 Author: Keith Packard <keithp@keithp.com>
 Date:   Fri Oct 18 17:22:52 2013 -0700
 
@@ -58485,7 +70340,7 @@ Date:   Fri Oct 18 17:22:52 2013 -0700
     also merging in the spurious merge at the top of that branch.
 
 commit f8662a133690773692dfa392ecfa3b8b56af8fa9
-Merge: 7cf1b595c 2523a445a
+Merge: 7cf1b595c8 2523a445a0
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Fri Oct 18 16:50:12 2013 +1000
 
@@ -58868,7 +70723,7 @@ Date:   Sun Oct 6 16:45:52 2013 +0100
     Reviewed-by: Adam Jackson <ajax@redhat.com>
 
 commit 6a9bd103cb993e873cb82664b677ceed73c0bd85
-Merge: ea3b7db4b 8aae28e3c
+Merge: ea3b7db4b7 8aae28e3cb
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Oct 7 17:29:38 2013 -0700
 
@@ -59057,7 +70912,7 @@ Date:   Sat Sep 28 15:26:33 2013 -0400
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit f3b529bf25db2700addbafc7aa4fc5b126ba9929
-Merge: 4399bd383 abc2bfca1
+Merge: 4399bd3832 abc2bfca16
 Author: Keith Packard <keithp@keithp.com>
 Date:   Fri Oct 4 14:04:48 2013 -0700
 
@@ -59074,14 +70929,14 @@ Date:   Mon Sep 30 13:30:46 2013 -0400
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 9ccb4a63982942fdce19609d2cadbd8e51708462
-Merge: 5d2ec6933 da5e20127
+Merge: 5d2ec6933f da5e20127a
 Author: Keith Packard <keithp@keithp.com>
 Date:   Fri Oct 4 13:54:55 2013 -0700
 
     Merge remote-tracking branch 'whot/for-keith'
 
 commit 5d2ec6933f6bb5116666ca1bfb07f0f20bf2a0b5
-Merge: 7d3d4ae55 6ee4d9f94
+Merge: 7d3d4ae55d 6ee4d9f94a
 Author: Keith Packard <keithp@keithp.com>
 Date:   Fri Oct 4 13:50:04 2013 -0700
 
@@ -59739,7 +71594,7 @@ Date:   Wed Aug 21 14:12:52 2013 -0400
     Signed-off-by: Adam Jackson <ajax@redhat.com>
 
 commit 47ff382d1fce25a8b097d45b79489e891f1f1228
-Merge: 6f89ae3e6 3752a8158
+Merge: 6f89ae3e64 3752a81580
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Sep 9 15:13:42 2013 -0700
 
@@ -60670,7 +72525,7 @@ Date:   Sat Aug 17 12:17:36 2013 +0200
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit f67d022523c59a27f3bf8791aa9ca6624318b1fd
-Merge: 5a36cdd91 9680f6a12
+Merge: 5a36cdd915 9680f6a12d
 Author: Keith Packard <keithp@keithp.com>
 Date:   Tue Aug 6 07:12:12 2013 +0200
 
@@ -60795,7 +72650,7 @@ Date:   Wed Jul 31 11:24:48 2013 +1000
     Signed-off-by: Dave Airlie <airlied@redhat.com>
 
 commit ff38bbe81ace85bf675bbaa0a9ca5f3b32ede449
-Merge: bdd1e22cb 4360514d1
+Merge: bdd1e22cbd 4360514d1c
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu Jul 25 22:50:27 2013 -0700
 
@@ -61098,7 +72953,7 @@ Date:   Mon Sep 3 15:19:43 2012 +0100
     Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
 
 commit d5ebe20f9ba9569351c4a41449866679fd60ba45
-Merge: 21ea7ebb6 33f7e6078
+Merge: 21ea7ebb6a 33f7e60785
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Jul 22 20:34:41 2013 -0700
 
@@ -61447,7 +73302,7 @@ Date:   Mon Jun 17 15:51:19 2013 -0700
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 227015d6544115258b74c31b700f9bd163540e24
-Merge: d9005d58c 80054fcaf
+Merge: d9005d58c0 80054fcafb
 Author: Keith Packard <keithp@keithp.com>
 Date:   Tue Jun 18 10:53:08 2013 -0700
 
@@ -61622,21 +73477,21 @@ Date:   Mon May 27 13:46:49 2013 +1000
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit cb3018d8a15add48efb3335e1f79b66378166008
-Merge: c76a1b343 6589f3b55
+Merge: c76a1b343d 6589f3b55e
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu May 23 19:58:46 2013 -0600
 
     Merge remote-tracking branch 'whot/unreviewed'
 
 commit c76a1b343d6a56aa9529e87f0eda8d61355d562b
-Merge: 891123ce9 9a5ad6533
+Merge: 891123ce9d 9a5ad65330
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu May 23 19:58:36 2013 -0600
 
     Merge remote-tracking branch 'whot/touch-grab-race-condition-56578-v3'
 
 commit 891123ce9dac5e52685b9a921b33d8279ba52956
-Merge: 7e97166c4 49521edaf
+Merge: 7e97166c4f 49521edaf8
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu May 23 10:30:15 2013 -0600
 
@@ -62409,14 +74264,14 @@ Date:   Fri Feb 15 11:19:10 2013 +1000
     Reviewed-by: Keith Packard <keithp@keithp.com>
 
 commit 2746c681639f9512e6e45fb8d0151b996b6aff7f
-Merge: 1e6cf8ec2 9878e097a
+Merge: 1e6cf8ec20 9878e097a7
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon May 6 10:52:40 2013 -0700
 
     Merge remote-tracking branch 'alanc/master'
 
 commit 1e6cf8ec20d07b73a11116564aba71b4e4291dcd
-Merge: dbfeaf706 5860408a1
+Merge: dbfeaf7062 5860408a19
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon May 6 10:20:21 2013 -0700
 
@@ -62783,21 +74638,21 @@ Date:   Sun Feb 10 10:24:59 2013 -0800
     Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
 
 commit 7ab98bafc9a3426fd40f8ae693430491333ba4fc
-Merge: 53da26afb 5ab260317
+Merge: 53da26afb7 5ab260317a
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Apr 24 14:14:45 2013 -0700
 
     Merge remote-tracking branch 'geertu/master'
 
 commit 53da26afb76bcce70b91c5df23d25e7e85c010cf
-Merge: 5ece86e92 d8d3c78b6
+Merge: 5ece86e921 d8d3c78b6e
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Apr 24 10:27:19 2013 -0700
 
     Merge remote-tracking branch 'whot/for-keith'
 
 commit 5ece86e921a1df457a9baab6a2357ccda4ad6957
-Merge: ef0a726bc 22cab8a28
+Merge: ef0a726bc8 22cab8a28a
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Apr 24 10:23:51 2013 -0700
 
@@ -63517,7 +75372,7 @@ Date:   Sat Feb 23 13:14:45 2013 +0100
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit c2ede8f92f0d6f15b1b2a04889cb54cd1728780b
-Merge: 190b03215 7050aae69
+Merge: 190b032151 7050aae69c
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Mar 18 11:26:24 2013 -0700
 
@@ -63541,7 +75396,7 @@ Date:   Thu Feb 14 15:06:57 2013 -0800
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 116f020102fd6c2a603069a639b113dfa31b48b7
-Merge: cf89aa537 0f537da72
+Merge: cf89aa5374 0f537da72d
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Mar 18 11:18:58 2013 -0700
 
@@ -63810,7 +75665,7 @@ Date:   Tue Mar 5 10:14:29 2013 +1000
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 604169af8b67afc74a292cdb9070a3a1f2d7c536
-Merge: 8f4640bdb 6ea59dc2d
+Merge: 8f4640bdb9 6ea59dc2d8
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Mar 4 21:09:59 2013 -0800
 
@@ -64009,7 +75864,7 @@ Date:   Mon Feb 27 16:43:10 2012 +1000
     Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
 
 commit 88517ced1fa2e621be2d05a319b522b3111da516
-Merge: 82425c66e 73974dd7e
+Merge: 82425c66e7 73974dd7ea
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Fri Feb 15 11:58:52 2013 +1000
 
@@ -64132,7 +75987,7 @@ Date:   Thu Feb 14 10:02:02 2013 +1000
     Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
 
 commit 90642948cc78834d95f7a3bddaac7ff77b68ed7e
-Merge: 9a35d4240 eda7dbff5
+Merge: 9a35d4240e eda7dbff5a
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu Feb 14 11:05:48 2013 -0800
 
@@ -64368,7 +76223,7 @@ Date:   Fri Jan 25 11:47:32 2013 +1000
     Reviewed-by: Keith Packard <keithp@keithp.com>
 
 commit 0d5bb882600ee7734af034fbea935a79d21d1e70
-Merge: b33fcb149 61a99aff9
+Merge: b33fcb1497 61a99aff9d
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Fri Feb 8 14:10:52 2013 +1000
 
@@ -64800,14 +76655,14 @@ Date:   Tue Jan 22 07:39:53 2013 +1000
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 069d8ed3eb659c48dd2b0f8b7b8c11f092fdb362
-Merge: 591c06277 d6dcde7a0
+Merge: 591c06277b d6dcde7a03
 Author: Keith Packard <keithp@keithp.com>
 Date:   Sun Jan 20 15:58:38 2013 -0800
 
     Merge remote-tracking branch 'jturney/xserver-next'
 
 commit 591c06277bb120ab9615633f2d28addbd3a2aa5f
-Merge: 6703a7c7c fa6ab7d9b
+Merge: 6703a7c7cf fa6ab7d9b2
 Author: Keith Packard <keithp@keithp.com>
 Date:   Sun Jan 20 15:52:26 2013 -0800
 
@@ -64990,7 +76845,7 @@ Date:   Wed Oct 26 17:03:25 2011 -0500
     Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
 
 commit fa6ab7d9b2d7fd8184f1e068360607845f5c33ab
-Merge: adde4e644 0e1ab433f
+Merge: adde4e6448 0e1ab433f4
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Fri Jan 11 14:58:17 2013 +1000
 
@@ -65407,14 +77262,14 @@ Date:   Wed Dec 19 12:47:35 2012 -0800
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 2a0b544f5c09f79e4ab04ea8103a5ecf59ee2e7b
-Merge: 0eb1559eb ba4bb3bc1
+Merge: 0eb1559eb2 ba4bb3bc1b
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Dec 19 12:26:00 2012 -0800
 
     Merge remote-tracking branch 'jeremyhu/master'
 
 commit 0eb1559eb29d11e63c2b33e317590a88d86fe313
-Merge: 386e4d76b ea1d76d1b
+Merge: 386e4d76ba ea1d76d1b6
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Dec 19 12:21:31 2012 -0800
 
@@ -65424,14 +77279,14 @@ Date:   Wed Dec 19 12:21:31 2012 -0800
     whitespace.
 
 commit 386e4d76baaffe226d2d561ff936509454eb0ac2
-Merge: 014a5c8a9 9ff2e8315
+Merge: 014a5c8a9d 9ff2e83151
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Dec 19 12:17:59 2012 -0800
 
     Merge remote-tracking branch 'alanc/master'
 
 commit 014a5c8a9d86f2f992183bff9106354fac2c3b0e
-Merge: f793b5fd3 2eefa5d6e
+Merge: f793b5fd3e 2eefa5d6e8
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Dec 19 12:09:31 2012 -0800
 
@@ -65593,7 +77448,7 @@ Date:   Wed Dec 12 11:02:19 2012 +1000
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 6d508b81857edaed03c7ee06410434ea56d9b701
-Merge: d982d8774 bb6f3514c
+Merge: d982d87743 bb6f3514ca
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Dec 17 11:45:45 2012 -0800
 
@@ -65603,7 +77458,7 @@ Date:   Mon Dec 17 11:45:45 2012 -0800
     reviewed them...
 
 commit d982d877436377597b8ed04bca1438d2edaf53ee
-Merge: da3eaf6bd 6b4aa8a35
+Merge: da3eaf6bdb 6b4aa8a359
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Dec 17 10:56:12 2012 -0800
 
@@ -65953,14 +77808,14 @@ Date:   Thu Nov 1 14:14:13 2012 -0400
     Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
 
 commit bb6f3514ca17d993c1af380e8d4480d61e5bbcae
-Merge: f961c3a3b 08da994a0
+Merge: f961c3a3b9 08da994a08
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Wed Dec 12 17:25:28 2012 +1000
 
     Merge branch 'stack-smash-on-touchpoint' into for-keith
 
 commit f961c3a3b9dfbe1201da317c24797ba7f979731e
-Merge: 36740d02b 39f19b3f3
+Merge: 36740d02b9 39f19b3f3b
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Wed Dec 12 17:25:23 2012 +1000
 
@@ -66161,7 +78016,7 @@ Date:   Tue Dec 4 15:03:37 2012 +1000
     Tested-by: Frank Roscher <Frank-Roscher@gmx.net>
 
 commit b51a1bd2766e7dc975ca8f1cacc3f8bd0e1a68a3
-Merge: e9ea96d6a ce6b65292
+Merge: e9ea96d6a8 ce6b652929
 Author: Keith Packard <keithp@keithp.com>
 Date:   Fri Nov 30 09:31:46 2012 -0800
 
@@ -66183,7 +78038,7 @@ Date:   Fri Nov 30 20:54:38 2012 +1000
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit ce6b6529290f7d42717aad3fd8a83aaaaf8962de
-Merge: 6e18599d6 3b9f1c701
+Merge: 6e18599d69 3b9f1c7017
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Thu Nov 29 14:49:22 2012 +1000
 
@@ -66296,7 +78151,7 @@ Date:   Thu Nov 8 14:28:09 2012 +0100
     Signed-off-by: Dave Airlie <airlied@redhat.com>
 
 commit 1712a45422a63f11b2146541279616fcfda09ec6
-Merge: e54f71a2c 338bec300
+Merge: e54f71a2c7 338bec3005
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Nov 28 07:54:13 2012 -0800
 
@@ -66429,7 +78284,7 @@ Date:   Wed Oct 17 12:06:47 2012 +0200
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit d50a94568e06a06df682a0028579d37a7b209d15
-Merge: 87b60efb8 cf05db8dd
+Merge: 87b60efb85 cf05db8dde
 Author: Keith Packard <keithp@keithp.com>
 Date:   Tue Nov 27 15:14:26 2012 -0800
 
@@ -66834,7 +78689,7 @@ Date:   Sat Oct 13 22:43:26 2012 -0400
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
 
 commit 6a6c3afe71ac82a93d9fd0034dd5bbdcf0eae1ea
-Merge: 14c9e245b 6f145084d
+Merge: 14c9e245ba 6f145084d5
 Author: Keith Packard <keithp@keithp.com>
 Date:   Sun Nov 18 21:50:20 2012 -0800
 
@@ -66944,7 +78799,7 @@ Date:   Sat Nov 17 11:52:10 2012 -0500
     Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
 
 commit 011f8458805e443ac9130865d2840a929a00cabf
-Merge: 54ba26cb1 b4e44b285
+Merge: 54ba26cb1f b4e44b285e
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Nov 5 17:16:07 2012 -0800
 
@@ -67271,7 +79126,7 @@ Date:   Wed Oct 24 23:57:11 2012 -0500
     Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
 
 commit 04f980ead5e9af066143a921e0a0e98f26f28ee5
-Merge: a194630f7 a4941ce49
+Merge: a194630f7f a4941ce496
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Nov 5 08:45:21 2012 -0800
 
@@ -67321,7 +79176,7 @@ Date:   Tue Sep 4 17:28:16 2012 +0100
     Reviewed-by:  Colin Harrison <colin.harrison@virgin.net>
 
 commit a194630f7f7b287cb4ea4a459df0745f4c0d4c1a
-Merge: 74a313042 d511a3016
+Merge: 74a3130426 d511a3016a
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu Nov 1 13:38:54 2012 -0700
 
@@ -67356,7 +79211,7 @@ Date:   Thu Oct 25 15:03:50 2012 +0200
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
 
 commit 74a3130426d7e1b456e45daa517769cd3e4b58c0
-Merge: 1ca096d5e f32ad6dd3
+Merge: 1ca096d5e0 f32ad6dd31
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Oct 29 09:09:16 2012 -0700
 
@@ -67510,14 +79365,14 @@ Date:   Sun Oct 14 23:38:20 2012 -0500
     Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
 
 commit 53830281b4da096f9c13107d73ec9c76ff1d14cc
-Merge: abc2ef590 9cbcb5bd6
+Merge: abc2ef590c 9cbcb5bd6a
 Author: Keith Packard <keithp@keithp.com>
 Date:   Fri Oct 26 18:04:34 2012 -0700
 
     Merge remote-tracking branch 'sandmann/for-keithp'
 
 commit abc2ef590c7cb33ebe21726f83b7347406975f95
-Merge: 0e85e5e62 c5396ec05
+Merge: 0e85e5e628 c5396ec05a
 Author: Keith Packard <keithp@keithp.com>
 Date:   Fri Oct 26 17:11:58 2012 -0700
 
@@ -68328,7 +80183,7 @@ Date:   Thu Oct 4 14:42:37 2012 -0700
     Reviewed-by: Julien Cristau <jcristau@debian.org>
 
 commit 8367dd9736d74eca971da345c2bf559ce5bbf649
-Merge: 36c18bb81 7998e2615
+Merge: 36c18bb81b 7998e26159
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu Oct 4 13:08:35 2012 -0700
 
@@ -68392,7 +80247,7 @@ Date:   Thu Oct 4 11:42:22 2012 -0700
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit f179b13b91c8891254d31345ee04e773839e6b87
-Merge: 4dd5989d1 3d2b768ef
+Merge: 4dd5989d15 3d2b768efa
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu Oct 4 11:39:46 2012 -0700
 
@@ -68544,7 +80399,7 @@ Date:   Fri Sep 7 18:10:35 2012 +0100
     Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
 
 commit 4dd5989d15465f3f3480b521d4e36673972fa24a
-Merge: 0b02150c2 506e3437c
+Merge: 0b02150c27 506e3437c7
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Sep 24 11:43:01 2012 -0700
 
@@ -68580,7 +80435,7 @@ Date:   Mon Sep 24 14:03:31 2012 -0400
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 7722bcbab2507d263c7685b15cccbfdd52fc3a24
-Merge: 4dc2a7674 f54987de9
+Merge: 4dc2a76740 f54987de97
 Author: Keith Packard <keithp@keithp.com>
 Date:   Sun Sep 23 16:04:13 2012 -0700
 
@@ -68826,7 +80681,7 @@ Date:   Thu Jun 16 17:40:24 2011 -0400
     Signed-off-by: Adam Jackson <ajax@redhat.com>
 
 commit d01921ec18c21f21d377b60626cc2d3418b84a7c
-Merge: 70e576687 245e7e036
+Merge: 70e5766874 245e7e0361
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu Sep 20 17:26:48 2012 +0200
 
@@ -69013,7 +80868,7 @@ Date:   Wed Sep 5 14:45:08 2012 -0700
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 856f80c8d7f22b979c72d9c70b70187df6004a03
-Merge: 0db936a5b b8ab93dfb
+Merge: 0db936a5b7 b8ab93dfbc
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Sep 5 11:02:58 2012 -0700
 
@@ -69158,7 +81013,7 @@ Date:   Mon Aug 27 17:15:19 2012 -0700
     Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
 
 commit a557edca6152ad09c685a00e01534c35a1f00f2e
-Merge: 6619f5c0e 24ffcfcde
+Merge: 6619f5c0e1 24ffcfcded
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Aug 27 08:06:09 2012 -0700
 
@@ -69350,7 +81205,7 @@ Date:   Thu Jul 19 22:15:10 2012 +0000
     Signed-off-by: Adam Jackson <ajax@redhat.com>
 
 commit ad5fe2d9614959b68bf71e23abf7e5abac9c2734
-Merge: 16d8da5ca 99b94af1f
+Merge: 16d8da5ca9 99b94af1ff
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Aug 15 13:29:17 2012 -0700
 
@@ -69491,21 +81346,21 @@ Date:   Sat Jul 14 16:07:51 2012 +0200
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 02f94b2d446f6700f791f318c551ac835af8445a
-Merge: 360fa7736 7f09126e0
+Merge: 360fa7736b 7f09126e06
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Aug 6 16:52:12 2012 -0700
 
     Merge remote-tracking branch 'whot/for-keith'
 
 commit 360fa7736b214cae3ccd39feb4dc87b9e7e9734c
-Merge: 2100e7238 ac09a4a09
+Merge: 2100e72388 ac09a4a091
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Aug 6 16:42:34 2012 -0700
 
     Merge remote-tracking branch 'airlied/for-keithp'
 
 commit 2100e72388a3dc174093d80c9723f021b4614d17
-Merge: 4a6f42dda c37c65052
+Merge: 4a6f42dda0 c37c65052f
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Aug 6 16:40:54 2012 -0700
 
@@ -69721,21 +81576,21 @@ Date:   Tue Jul 10 23:29:53 2012 -0700
     Reviewed-by: Keith Packard <keithp@keithp.com>
 
 commit 94b514d5e4b376d05e106eb3853da511256e8545
-Merge: 7d87545ba 732890004
+Merge: 7d87545ba7 7328900042
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Aug 6 15:13:17 2012 -0700
 
     Merge remote-tracking branch 'whot/for-keith'
 
 commit 7d87545ba7395ade507cca7bdca7052b26ed18d8
-Merge: ad707a7dc 988d7ace1
+Merge: ad707a7dcc 988d7ace19
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Aug 6 15:11:13 2012 -0700
 
     Merge remote-tracking branch 'jturney/master'
 
 commit ad707a7dcc65c30e030c7600b54f734090e56a91
-Merge: 5a51cb86f 884f51e97
+Merge: 5a51cb86f3 884f51e977
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Aug 6 15:08:01 2012 -0700
 
@@ -70206,7 +82061,7 @@ Date:   Thu Jul 19 15:00:03 2012 -0400
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 20b4d90f32b3ca5def5be2fdf04a91ae6c47f125
-Merge: 83df16953 fd228d318
+Merge: 83df169538 fd228d3184
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Jul 25 13:52:35 2012 -0700
 
@@ -70301,14 +82156,14 @@ Date:   Tue Jul 17 15:47:39 2012 -0700
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit beeea70495a8d5c4afc1b1eb2cc06a24ab1a986d
-Merge: 6e438a0e1 691028029
+Merge: 6e438a0e18 6910280297
 Author: Keith Packard <keithp@keithp.com>
 Date:   Tue Jul 17 12:17:39 2012 -0700
 
     Merge remote-tracking branch 'alanc/master'
 
 commit 6e438a0e183f5a6c22070746c038af53d5b935ca
-Merge: 5884e7ded 75966a418
+Merge: 5884e7dede 75966a4186
 Author: Keith Packard <keithp@keithp.com>
 Date:   Tue Jul 17 12:12:53 2012 -0700
 
@@ -70673,7 +82528,7 @@ Date:   Fri Jul 13 00:47:24 2012 +1000
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 746193a7f10f11cccae05c98b933aadf58fc7375
-Merge: a2d082953 2b74949ad
+Merge: a2d0829531 2b74949ad0
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu Jul 12 15:10:51 2012 -0700
 
@@ -70725,7 +82580,7 @@ Date:   Thu Jul 12 00:36:43 2012 +0100
     Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
 
 commit 656e5fea6c9ca15f932889edcc590dd01c881945
-Merge: 8b820f221 1720cd9ba
+Merge: 8b820f221a 1720cd9bad
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu Jul 12 08:26:35 2012 -0700
 
@@ -70927,7 +82782,7 @@ Date:   Tue Jul 10 01:14:13 2012 -0700
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 6e12cb147da58bd12a158807b2cd5afac32ae70f
-Merge: 532fbc29c 023127915
+Merge: 532fbc29c9 023127915e
 Author: Keith Packard <keithp@keithp.com>
 Date:   Tue Jul 10 00:52:11 2012 -0700
 
@@ -72610,7 +84465,7 @@ Date:   Thu Jul 5 21:11:16 2012 +0100
     Signed-off-by: Dave Airlie <airlied@redhat.com>
 
 commit 4d24192bd24fb20d16d0054d77bffda883faeb79
-Merge: 7c9d8cbd3 74b786f7c
+Merge: 7c9d8cbd36 74b786f7ce
 Author: Keith Packard <keithp@keithp.com>
 Date:   Fri Jul 6 12:17:17 2012 -0700
 
@@ -73142,7 +84997,7 @@ Date:   Thu Jun 28 17:17:12 2012 +0200
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
 
 commit d84f0f823eeeecdf0498aadd3fbb1d11dabc0837
-Merge: 12bfb4cf1 d04dfe3f7
+Merge: 12bfb4cf1b d04dfe3f75
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Wed Jul 4 21:23:48 2012 +1000
 
@@ -73260,7 +85115,7 @@ Date:   Fri Jun 22 13:02:40 2012 +1000
     Reviewed-by: Keith Packard <keithp@keithp.com>
 
 commit 24525d96a3b9dba67eb75042500b2f208a2cc246
-Merge: 4cd91bd4c 35e3d2291
+Merge: 4cd91bd4c6 35e3d22915
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Jul 2 22:35:39 2012 -0700
 
@@ -73580,14 +85435,14 @@ Date:   Thu Jun 28 12:07:11 2012 +1000
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 8b4f0a4fdd6c15f49458bc3a8c3135b8c389240d
-Merge: 59294a217 d642e7128
+Merge: 59294a2179 d642e71287
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu Jun 28 10:38:26 2012 -0700
 
     Merge remote-tracking branch 'jturney/master'
 
 commit 59294a2179bd5bb996693af004b470932df00ac6
-Merge: 855003c33 191b63065
+Merge: 855003c333 191b630656
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu Jun 28 10:11:44 2012 -0700
 
@@ -73819,7 +85674,7 @@ Date:   Fri Jun 24 13:32:10 2011 +0100
     Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
 
 commit 3ef3ce069d52dcfa932c90ccd30854a8d9daa15a
-Merge: a0c8716cd ff541e0a1
+Merge: a0c8716cdc ff541e0a1f
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu Jun 21 08:52:34 2012 -0700
 
@@ -73958,14 +85813,14 @@ Date:   Thu Jun 7 16:52:20 2012 +1000
     Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
 
 commit 8dc70acbf3d82611ac9ec1ec2a52edcc01934850
-Merge: ffb47a123 b59adc9c2
+Merge: ffb47a123d b59adc9c24
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu Jun 14 13:04:29 2012 -0700
 
     Merge remote-tracking branch 'alanc/master'
 
 commit ffb47a123ddd1233fb4229cf23483652065c5e82
-Merge: db9d2b8a5 b840ba5f5
+Merge: db9d2b8a50 b840ba5f54
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu Jun 14 13:01:17 2012 -0700
 
@@ -73984,7 +85839,7 @@ Date:   Thu Jun 7 15:01:59 2012 +0100
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 6d86b64dbaef5a16712fd1fdc3157f716d238877
-Merge: 812786f4d 4c68f5d39
+Merge: 812786f4d4 4c68f5d395
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu Jun 14 11:05:22 2012 -0700
 
@@ -74621,7 +86476,7 @@ Date:   Fri Apr 6 12:44:07 2012 -0700
     Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
 
 commit 3476eb38063473a7a5fcd78e2095e284118de839
-Merge: 78f0d9cdc 42ae2e819
+Merge: 78f0d9cdc4 42ae2e8199
 Author: Keith Packard <keithp@keithp.com>
 Date:   Sun Jun 3 20:24:24 2012 -0700
 
@@ -74932,7 +86787,7 @@ Date:   Tue May 22 21:19:40 2012 -0700
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 457fc77691b2df66f6dd3ba10ce7c1b61b9b42a3
-Merge: 2e237c838 5a3a98fcb
+Merge: 2e237c838f 5a3a98fcb7
 Author: Keith Packard <keithp@keithp.com>
 Date:   Tue May 22 10:32:29 2012 -0700
 
@@ -75152,7 +87007,7 @@ Date:   Thu Jan 26 15:44:40 2012 -0800
     Reviewed-by: Dave Airlie <airlied@redhat.com>
 
 commit ba883a0f3435d5da82a8134e696c4905eea70f23
-Merge: ae1c48ebc acdc4f54e
+Merge: ae1c48ebc8 acdc4f54ee
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu May 17 16:49:19 2012 -0700
 
@@ -75507,7 +87362,7 @@ Date:   Tue Apr 24 18:11:16 2012 +0200
     Signed-off-by: Dave Airlie <airlied@redhat.com>
 
 commit 3a94b338aaa48b656aae1bb3a5a9d64300c0a093
-Merge: afc153a5b c91d00e0f
+Merge: afc153a5b4 c91d00e0f3
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed May 9 21:17:16 2012 -0700
 
@@ -75690,7 +87545,7 @@ Date:   Wed Apr 18 17:51:50 2012 +0800
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
 
 commit 97041364a6acb2b66b5cfd06757c90a006ad50e9
-Merge: 19082726c ee542b855
+Merge: 19082726cb ee542b8559
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed May 2 20:47:25 2012 -0700
 
@@ -76082,7 +87937,7 @@ Date:   Thu Apr 19 16:51:46 2012 -0700
     Tested-By: Michal Suchanek <hramrach@gmail.com>
 
 commit d77eb7ee49ef19c2c4c7381d56e9d0f9c3fbc890
-Merge: 31e3c0ff7 c7b162555
+Merge: 31e3c0ff7f c7b1625558
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu Apr 19 15:48:34 2012 -0500
 
@@ -76101,7 +87956,7 @@ Date:   Thu Apr 19 15:25:41 2012 -0500
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit e6308e32fe2b5f74133d4d238ffa512257f6327c
-Merge: 3720aa33e 51a8d8dd1
+Merge: 3720aa33ee 51a8d8dd19
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu Apr 19 10:45:07 2012 -0500
 
@@ -76110,7 +87965,7 @@ Date:   Thu Apr 19 10:45:07 2012 -0500
     Touch input changes from Chase
 
 commit 51a8d8dd19d7496fe84b37a1f0a7a03658120539
-Merge: ebf214876 00cf1c40b
+Merge: ebf214876a 00cf1c40b2
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Thu Apr 19 17:03:54 2012 +1000
 
@@ -76518,7 +88373,7 @@ Date:   Tue Apr 17 11:48:03 2012 +0100
     cursor: hide cursors on LeaveVT
 
 commit 80fefc42f5e67e6b4a4b440d8991bee7e5f38359
-Merge: 9779b904c 12188c8a8
+Merge: 9779b904c7 12188c8a8a
 Author: Keith Packard <keithp@keithp.com>
 Date:   Sun Apr 15 21:05:30 2012 -0700
 
@@ -76887,7 +88742,7 @@ Date:   Fri Mar 23 08:20:22 2012 +1000
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
 
 commit 7f3997b01a8813c1d7055317eb06111aed8572c9
-Merge: 92d50c38b 31646d8fa
+Merge: 92d50c38b2 31646d8fa9
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Mar 26 16:41:52 2012 -0700
 
@@ -77306,7 +89161,7 @@ Date:   Fri Mar 23 14:54:05 2012 +0000
     modesetting: fix build against older Xext
 
 commit a7eac500e652f30deffd9dc5e623fab701077738
-Merge: bf876c87a d645edd11
+Merge: bf876c87a9 d645edd11e
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Thu Mar 22 13:13:07 2012 +1000
 
@@ -77440,7 +89295,7 @@ Date:   Wed Mar 14 17:22:18 2012 -0700
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
 
 commit bf876c87a9099fdfa63ed599f8ed9a954dd023d9
-Merge: 908ab3d58 c0b0a9bce
+Merge: 908ab3d580 c0b0a9bce9
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Thu Mar 22 11:34:43 2012 +1000
 
@@ -78072,7 +89927,7 @@ Date:   Sun Feb 19 08:34:25 2012 -0500
     Signed-off-by: Dave Airlie <airlied@redhat.com>
 
 commit 71594746c7da32e1c7986341a0da30f241a7a2be
-Merge: d53235af8 eaba06a27
+Merge: d53235af85 eaba06a27c
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Feb 22 18:07:20 2012 +1300
 
@@ -78317,7 +90172,7 @@ Date:   Sat Feb 11 16:13:44 2012 +1300
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 42b6756463ee0476340656707f1088dc6c2fd220
-Merge: 7674d00b0 ca64912c0
+Merge: 7674d00b04 ca64912c02
 Author: Keith Packard <keithp@keithp.com>
 Date:   Sat Feb 11 15:36:43 2012 +1300
 
@@ -79096,14 +90951,14 @@ Date:   Thu Jan 12 12:09:34 2012 -0800
     ABI change pended for 1.13
 
 commit e722ad6c3efa57b806ca0f2dc13114bd3619a88c
-Merge: e476af417 4e44580ef
+Merge: e476af417d 4e44580efd
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Jan 9 13:22:28 2012 -0800
 
     Merge remote-tracking branch 'jturney/rpavlik-xwin-fixes'
 
 commit e476af417d83730b11054f4e5b127ab5540bb332
-Merge: f4956faab 146008358
+Merge: f4956faab9 146008358e
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Jan 9 13:17:37 2012 -0800
 
@@ -79238,21 +91093,21 @@ Date:   Fri Jan 6 07:21:37 2012 +0000
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 0b113f7cdf5228dccd51a749a339c8669e3f20ff
-Merge: 0b2c6491c 777bf90ab
+Merge: 0b2c6491c5 777bf90abe
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Jan 9 13:07:25 2012 -0800
 
     Merge commit '777bf90abeac37087a3d0538b847742523d5acf2'
 
 commit 0b2c6491c5e5e1c9ba067299f3de61f5acee263b
-Merge: 1f5587e14 6b1943653
+Merge: 1f5587e144 6b19436536
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Jan 9 11:40:23 2012 -0800
 
     Merge remote-tracking branch 'whot/for-keith'
 
 commit 1f5587e14406c083687203030db6a11691ac9d9f
-Merge: a97252db2 6269977c9
+Merge: a97252db24 6269977c91
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Jan 9 11:37:59 2012 -0800
 
@@ -79757,7 +91612,7 @@ Date:   Tue Dec 27 14:02:01 2011 -0800
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 8dedf9831bd80514d800f0085213296a3726dba7
-Merge: cfc4c3d7f cf9618312
+Merge: cfc4c3d7fa cf96183122
 Author: Keith Packard <keithp@keithp.com>
 Date:   Tue Dec 27 13:13:48 2011 -0800
 
@@ -79856,7 +91711,7 @@ Date:   Thu Dec 22 10:00:15 2011 +1000
     Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
 
 commit e395efc25f9fd60377f32c2bf1a9153d70908236
-Merge: 2bb282cd4 fcda98c48
+Merge: 2bb282cd45 fcda98c486
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Thu Dec 22 09:29:59 2011 +1000
 
@@ -80294,14 +92149,14 @@ Date:   Mon Dec 19 14:52:41 2011 +1000
     Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
 
 commit 2d34b34ed7547b829979756ccfb2cff79368d0a4
-Merge: e4b4d83fa 1deede3c4
+Merge: e4b4d83fad 1deede3c48
 Author: Keith Packard <keithp@keithp.com>
 Date:   Tue Dec 20 00:23:33 2011 -0800
 
     Merge remote-tracking branch 'jeremyhu/master'
 
 commit e4b4d83fad37bb737e25f7226dbcd15b892f9528
-Merge: 4df65d247 d26cb7027
+Merge: 4df65d247b d26cb70272
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Dec 19 22:36:31 2011 -0800
 
@@ -80815,7 +92670,7 @@ Date:   Wed Dec 14 10:34:19 2011 +1000
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 7da7aa96a0acb895e1fe57a9d3f2d093479cf2a2
-Merge: b79de3f42 7528a6b88
+Merge: b79de3f42f 7528a6b88e
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Dec 14 11:40:10 2011 -0800
 
@@ -80833,7 +92688,7 @@ Date:   Wed Dec 14 10:31:23 2011 +1000
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
 
 commit 7528a6b88eb32098af4369a8bd9d70a808fa6f1c
-Merge: f0de5e399 898d97672
+Merge: f0de5e3990 898d976729
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Tue Dec 13 14:19:54 2011 +1000
 
@@ -81713,7 +93568,7 @@ Date:   Thu Dec 8 21:52:07 2011 -0800
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 522f8bcc0360d6a117e929a004bc956ab92037e9
-Merge: 6369b5966 2abe83df6
+Merge: 6369b59668 2abe83df68
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu Dec 8 20:57:26 2011 -0800
 
@@ -81914,14 +93769,14 @@ Date:   Thu Dec 1 16:24:32 2011 -0500
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 3ab8ee32470f7cf1223e04238bb8c5f74ed52fc3
-Merge: 22a666f99 98c4a888a
+Merge: 22a666f995 98c4a888a4
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Dec 7 12:42:17 2011 -0800
 
     Merge remote-tracking branch 'airlied/reviewed-fixes'
 
 commit 22a666f9952feb7248e9bb2faf777edaaac8175f
-Merge: 3824f558c e89b0324d
+Merge: 3824f558cc e89b0324da
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Dec 7 12:27:23 2011 -0800
 
@@ -82335,14 +94190,14 @@ Date:   Tue Nov 8 10:13:15 2011 -0800
     Reviewed-by: Jamey Sharp <jamey@minilop.net>
 
 commit 05f09354a30a4f5edd421220e1aa97be754c71bb
-Merge: 3197b773c 08ec4da6a
+Merge: 3197b773c8 08ec4da6a7
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu Dec 1 14:44:52 2011 +0000
 
     Merge remote-tracking branch 'jcristau/for-keith'
 
 commit 3197b773c81e58cd4aa412eccaee49526012ed6f
-Merge: 2dc5ba4a1 dfcec1d3f
+Merge: 2dc5ba4a1b dfcec1d3f9
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu Dec 1 14:36:58 2011 +0000
 
@@ -83218,7 +95073,7 @@ Date:   Fri Nov 4 23:26:25 2011 -0700
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit bfa2a1857a1efda7f171f10e855d200ca0dbcc1a
-Merge: f0d50cc66 e7cb8f802
+Merge: f0d50cc665 e7cb8f802a
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Nov 14 09:07:06 2011 -0800
 
@@ -83381,7 +95236,7 @@ Date:   Thu Nov 3 13:18:46 2011 +0000
     Not needed in here
 
 commit 548c6fe044068ffba9b5306dc6b11f2ba22782a4
-Merge: 3881b0bf1 ffe8ec86d
+Merge: 3881b0bf1c ffe8ec86db
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Nov 2 21:35:31 2011 -0700
 
@@ -83400,14 +95255,14 @@ Date:   Tue Nov 1 07:17:07 2011 -0400
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit d91aa0e6601bdf3e2cfa57b3412ab14ac486edc4
-Merge: 8df3a9ca5 401150d7d
+Merge: 8df3a9ca5a 401150d7dc
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Nov 2 21:20:07 2011 -0700
 
     Merge remote-tracking branch 'whot/two-screen-coordinates'
 
 commit 8df3a9ca5abbd56eb2013fa65250d21a8f18865b
-Merge: 8329afa59 ef895484c
+Merge: 8329afa59d ef895484c8
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Nov 2 21:18:16 2011 -0700
 
@@ -83562,7 +95417,7 @@ Date:   Mon Oct 31 15:01:12 2011 -0700
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 132545ff576cc69ed63f5a08127151fe550de4c3
-Merge: d0c6732a9 d7c44a7c9
+Merge: d0c6732a99 d7c44a7c97
 Author: Keith Packard <keithp@keithp.com>
 Date:   Sun Oct 30 16:57:58 2011 -0700
 
@@ -83788,7 +95643,7 @@ Date:   Tue Oct 25 23:48:16 2011 -0700
     Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
 
 commit 5701ab4a441eb113abd0851b0d71b82d12112854
-Merge: 7d50211ab a41214bc9
+Merge: 7d50211ab5 a41214bc9a
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Oct 24 22:09:00 2011 -0700
 
@@ -84013,7 +95868,7 @@ Date:   Mon Oct 24 18:47:06 2011 -0700
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit d9d3a01ffca5e2de650d098231e16205781804c5
-Merge: 17416e88d fb55f8f79
+Merge: 17416e88dc fb55f8f790
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Oct 24 18:12:23 2011 -0700
 
@@ -84190,21 +96045,21 @@ Date:   Thu Oct 20 14:28:56 2011 -0700
     Reviewed-by: Julien Cristau <jcristau@debian.org>
 
 commit ff61592441916b83aeb778c74352bb5b26247f84
-Merge: af3f64fb7 525d4172b
+Merge: af3f64fb77 525d4172b2
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Oct 19 19:14:32 2011 -0700
 
     Merge remote-tracking branch 'aplattner/for-master'
 
 commit af3f64fb77c13180e513ee99d1fd9a1b624fd8ea
-Merge: 15bbdc103 df0dd36de
+Merge: 15bbdc103b df0dd36dee
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Oct 19 17:33:07 2011 -0700
 
     Merge remote-tracking branch 'hramrach/pull'
 
 commit 15bbdc103b34b6b374815698946e6c409421a644
-Merge: a5266dcb3 323869f32
+Merge: a5266dcb3a 323869f329
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Oct 19 17:26:50 2011 -0700
 
@@ -84311,7 +96166,7 @@ Date:   Tue Aug 23 15:19:59 2011 -0700
     Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
 
 commit c8413362049cee8c30e0a9d67f78f9ebefe8e71f
-Merge: 64d2d1bef b67581cf8
+Merge: 64d2d1bef1 b67581cf82
 Author: Keith Packard <keithp@keithp.com>
 Date:   Tue Oct 18 07:45:24 2011 -0700
 
@@ -84458,14 +96313,14 @@ Date:   Fri Sep 30 10:59:47 2011 +1000
     Reviewed-by: Daniel Stone <daniel@fooishbar.org>
 
 commit 64d2d1bef14c7ec7156bb3aae64eff69f9f7be54
-Merge: fb84be47d 679c84bce
+Merge: fb84be47db 679c84bce9
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Oct 17 14:36:34 2011 -0700
 
     Merge remote-tracking branch 'jeremyhu/master'
 
 commit fb84be47db7cdaff406792c08e34670e8e0cbda9
-Merge: fae7ed62a 32b289e46
+Merge: fae7ed62ad 32b289e46c
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Oct 17 13:50:25 2011 -0700
 
@@ -85227,14 +97082,14 @@ Date:   Tue Aug 30 13:37:31 2011 +1000
     Reviewed-by: Daniel Stone <daniel@fooishbar.org>
 
 commit 6378d0233d21088b6429755627b4253859892c72
-Merge: 6e965d8a1 98b230669
+Merge: 6e965d8a18 98b230669f
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Oct 3 13:56:06 2011 -0700
 
     Merge remote-tracking branch 'herrb/master'
 
 commit 6e965d8a185087a55b2100b817e18f05b3ce5a00
-Merge: 466e4b3f1 ac5881d6d
+Merge: 466e4b3f17 ac5881d6d0
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Oct 3 13:47:49 2011 -0700
 
@@ -85370,14 +97225,14 @@ Date:   Mon Sep 26 22:38:44 2011 -0700
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 9a55b3661b4172f9a32cd6fefb254e06edb1a88a
-Merge: cf11ca360 84bb0207f
+Merge: cf11ca360c 84bb0207f6
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Oct 3 11:49:23 2011 -0700
 
     Merge remote-tracking branch 'alanc/master'
 
 commit cf11ca360c2ded5ca309faa9d039160947387bb8
-Merge: 463dd8706 6eae9fa28
+Merge: 463dd87062 6eae9fa284
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Oct 3 11:44:59 2011 -0700
 
@@ -85400,7 +97255,7 @@ Date:   Thu Sep 22 18:38:53 2011 +0300
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit f5d50b46ddeb039ab6564141f61261e94ee67637
-Merge: 57cd32e93 524e5445c
+Merge: 57cd32e934 524e5445c0
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Oct 3 11:36:28 2011 -0700
 
@@ -85536,7 +97391,7 @@ Date:   Sun Sep 25 20:44:26 2011 +0200
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
 
 commit 4c6bc0e76599dbe5ede2e1f48c9936a0e996b638
-Merge: 057cc92eb 3304bbff9
+Merge: 057cc92ebf 3304bbff9b
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Fri Sep 30 09:24:56 2011 +1000
 
@@ -85745,7 +97600,7 @@ Date:   Thu Sep 29 11:49:26 2011 +0100
     server recycling.
 
 commit 057cc92ebfeebe81b7d01ff2c6aa2c066c8d1a64
-Merge: afb1fe695 52c9b59a9
+Merge: afb1fe695d 52c9b59a9f
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Thu Sep 29 14:18:35 2011 +1000
 
@@ -86260,7 +98115,7 @@ Date:   Thu Sep 22 18:55:19 2011 -0700
     Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
 
 commit afb1fe695d197187a301c19863a128a65389b15c
-Merge: 7fb4bef03 c7163fdd3
+Merge: 7fb4bef039 c7163fdd30
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Sep 26 20:24:15 2011 -0700
 
@@ -88579,21 +100434,21 @@ Date:   Thu Sep 1 16:48:37 2011 -0700
     Reviewed-by: Matt Dew <marcoz@osource.org>
 
 commit 7fb4bef0394a5d09680985d34bce8252b61493cb
-Merge: 98f494009 c90903b4f
+Merge: 98f4940093 c90903b4f7
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Sep 21 14:34:27 2011 -0700
 
     Merge remote-tracking branch 'mattst88/for-keith'
 
 commit 98f4940093dc90c3366d3e4d3ddceacbaee299dc
-Merge: b018b8153 c8eacae4f
+Merge: b018b81533 c8eacae4f8
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Sep 21 14:30:19 2011 -0700
 
     Merge remote-tracking branch 'alanc/master'
 
 commit b018b815333b256b5e06dd6251b2e539f09f89fa
-Merge: 03d032991 0f380a500
+Merge: 03d032991d 0f380a5005
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Sep 21 14:17:14 2011 -0700
 
@@ -88923,7 +100778,7 @@ Date:   Wed Sep 7 17:47:56 2011 +0200
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit c92c83523ede8bc361526ac93d09d089fbbdae08
-Merge: 4ad271d06 24b2b43e8
+Merge: 4ad271d06c 24b2b43e85
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Sep 21 13:32:06 2011 -0700
 
@@ -89973,7 +101828,7 @@ Date:   Fri Jul 29 16:12:06 2011 -0700
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit b8f61c11c94708d4f17720a55945dee4621315a4
-Merge: 5596f10cc f51e42f58
+Merge: 5596f10cce f51e42f583
 Author: Keith Packard <keithp@keithp.com>
 Date:   Fri Jul 29 14:58:58 2011 -0700
 
@@ -90289,7 +102144,7 @@ Date:   Wed Jul 13 12:08:03 2011 +0100
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
 
 commit 01dbf2514aa0cc8c40a876a24e3cb0737c41da19
-Merge: 5a801af68 af0fbc37e
+Merge: 5a801af689 af0fbc37e3
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Jul 13 11:44:15 2011 -0700
 
@@ -90455,7 +102310,7 @@ Date:   Mon Oct 11 16:21:40 2010 +0100
     Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
 
 commit d4096abb591353405417e53816e5c46e904e7b25
-Merge: 61f87a75f 87d4f90bf
+Merge: 61f87a75f2 87d4f90bfc
 Author: Keith Packard <keithp@keithp.com>
 Date:   Fri Jul 1 15:45:45 2011 -0700
 
@@ -90693,14 +102548,14 @@ Date:   Tue Jun 7 21:22:15 2011 +0200
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
 
 commit 61f87a75f2bcda939a1778d39be8cfa5c886e6d8
-Merge: 0d2153a46 72d914335
+Merge: 0d2153a46c 72d914335c
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Jun 29 20:14:51 2011 -0700
 
     Merge remote-tracking branch 'jturney/master'
 
 commit 0d2153a46cc72d5f2e6a9081a3cf153aa3eb7787
-Merge: b631c39a2 932513e23
+Merge: b631c39a21 932513e23b
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Jun 29 20:08:32 2011 -0700
 
@@ -90721,7 +102576,7 @@ Date:   Thu Jun 23 13:37:45 2011 -0400
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit d5ca33ca2dd08e8436439da926d2dedaabc268fa
-Merge: 38d55f06c 4edf49d03
+Merge: 38d55f06cf 4edf49d032
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Jun 29 18:54:33 2011 -0700
 
@@ -90884,7 +102739,7 @@ Date:   Tue Jun 28 09:33:25 2011 -0700
     after 'make clean' causing 'make distcheck' to fail.
 
 commit f968f4ace9410d827fb6b68c4e38ea9516641309
-Merge: 4dbed2625 163441fe5
+Merge: 4dbed26254 163441fe53
 Author: Keith Packard <keithp@keithp.com>
 Date:   Tue Jun 28 09:10:14 2011 -0700
 
@@ -90959,7 +102814,7 @@ Date:   Tue Jun 14 17:21:48 2011 -0700
     Tested-by: Peter Hutterer <peter.hutterer@who-t.net>
 
 commit 8ac651552bb70ba36238f430adab2f7a7f24db6e
-Merge: 945b2ff81 47b6ba320
+Merge: 945b2ff814 47b6ba3204
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Jun 22 11:03:37 2011 -0700
 
@@ -91534,14 +103389,14 @@ Date:   Fri May 27 11:40:56 2011 +1000
     Reviewed-by: Daniel Stone <daniel@fooishbar.org>
 
 commit 02d11af01211da55e9d93fe0e1851a0c6fe57472
-Merge: bf9fd0a83 ab0df72cd
+Merge: bf9fd0a83e ab0df72cd3
 Author: Keith Packard <keithp@keithp.com>
 Date:   Tue Jun 7 12:31:15 2011 -0700
 
     Merge remote-tracking branch 'kibi/master'
 
 commit bf9fd0a83eef771ee018438f05e2d9f20b43539b
-Merge: 21eec367d 0d140567b
+Merge: 21eec367d0 0d140567ba
 Author: Keith Packard <keithp@keithp.com>
 Date:   Tue Jun 7 07:45:22 2011 -0700
 
@@ -91891,14 +103746,14 @@ Date:   Wed Jun 1 11:20:10 2011 -0700
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 0643c056512d10be8db223d18d6563292d57e916
-Merge: a2e6cfc18 d45f5b249
+Merge: a2e6cfc18a d45f5b2493
 Author: Keith Packard <keithp@keithp.com>
 Date:   Tue May 31 23:45:07 2011 -0700
 
     Merge remote-tracking branch 'ajax/xserver-next'
 
 commit a2e6cfc18aec1c0027b51572b03ec9f2ab074b56
-Merge: bc04065b5 8d84fd256
+Merge: bc04065b5c 8d84fd2566
 Author: Keith Packard <keithp@keithp.com>
 Date:   Tue May 31 23:42:52 2011 -0700
 
@@ -92034,7 +103889,7 @@ Date:   Tue May 24 16:02:42 2011 -0700
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 4725d6b0dbb6371af4a1b2fbef851dcfe155514a
-Merge: 1b2d17748 b5d828789
+Merge: 1b2d17748f b5d828789c
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed May 25 09:40:51 2011 -0600
 
@@ -92476,21 +104331,21 @@ Date:   Fri May 6 18:18:15 2011 +0300
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit ba5540221f2a46133371b4ff0d527b1a0a1443b1
-Merge: 6347a0b80 728d0bf20
+Merge: 6347a0b802 728d0bf20e
 Author: Keith Packard <keithp@keithp.com>
 Date:   Fri May 13 13:59:36 2011 -0700
 
     Merge remote-tracking branch 'whot/for-keith'
 
 commit 6347a0b802812bb185ada1bf0951add306935184
-Merge: 4d02c5397 f144fb771
+Merge: 4d02c53971 f144fb771f
 Author: Keith Packard <keithp@keithp.com>
 Date:   Fri May 13 13:54:29 2011 -0700
 
     Merge remote-tracking branch 'jeremyhu/master'
 
 commit 4d02c5397114ac4d15e794908f0708427e258261
-Merge: 043c17586 eac37f32b
+Merge: 043c175865 eac37f32b8
 Author: Keith Packard <keithp@keithp.com>
 Date:   Fri May 13 13:52:18 2011 -0700
 
@@ -93192,7 +105047,7 @@ Date:   Sat Apr 23 18:09:11 2011 -0700
     Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
 
 commit 5cb31cd0cbf83fff5f17a475e7b0e45246b19bf3
-Merge: 0f284f0f4 4d8735d38
+Merge: 0f284f0f42 4d8735d388
 Author: Keith Packard <keithp@keithp.com>
 Date:   Fri Apr 29 09:59:49 2011 -0700
 
@@ -93247,14 +105102,14 @@ Date:   Wed Apr 27 22:12:59 2011 -0700
     Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
 
 commit f6d4e75ec55ac6812f9dead42ecdffb9614578c7
-Merge: ec9ea4017 4318e6a14
+Merge: ec9ea40178 4318e6a147
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Apr 27 12:08:51 2011 -0700
 
     Merge remote-tracking branch 'jturney/master'
 
 commit ec9ea4017885cefe5519a4e890b0ff1a5518235a
-Merge: c6cb70be1 6f29dbf5e
+Merge: c6cb70be1e 6f29dbf5e3
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Apr 27 12:01:56 2011 -0700
 
@@ -93968,7 +105823,7 @@ Date:   Mon Mar 28 11:38:11 2011 -0400
     Signed-off-by: Søren Sandmann <ssp@redhat.com>
 
 commit 918a9c99cf2ebc73acb34b95f597904b93c690d9
-Merge: 88c4622b5 5f496bc91
+Merge: 88c4622b59 5f496bc919
 Author: Keith Packard <keithp@keithp.com>
 Date:   Fri Apr 22 11:20:16 2011 -0700
 
@@ -93998,7 +105853,7 @@ Date:   Mon Apr 18 08:23:48 2011 -0700
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 302bdc3c9678c028bed71dbe9c5ba04997626b6b
-Merge: 001b6b8b7 6f97fe5df
+Merge: 001b6b8b70 6f97fe5df1
 Author: Keith Packard <keithp@keithp.com>
 Date:   Fri Apr 22 10:48:37 2011 -0700
 
@@ -94728,14 +106583,14 @@ Date:   Wed Apr 6 14:51:45 2011 -0400
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
 
 commit 3085b178626c957854385c7a88a05ec3c7eb74f3
-Merge: c9d89cec1 3c45b59e6
+Merge: c9d89cec14 3c45b59e67
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Apr 6 08:34:10 2011 -0700
 
     Merge remote-tracking branch 'jturney/master'
 
 commit c9d89cec1407550cb2568f4cef146c93607bbae6
-Merge: a52049de2 bc61787a2
+Merge: a52049de2f bc61787a20
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Apr 4 11:57:39 2011 -0700
 
@@ -94982,7 +106837,7 @@ Date:   Wed Mar 23 18:06:51 2011 +0200
     Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
 
 commit a52049de2f846fe984d4db5ac8d2c1826c7b2d0b
-Merge: d044d3675 266ea63bc
+Merge: d044d36756 266ea63bc3
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Mon Apr 4 09:58:53 2011 +1000
 
@@ -95158,7 +107013,7 @@ Date:   Tue Mar 29 14:27:41 2011 +1000
     Reviewed-by: Keith Packard <keithp@keithp.com>
 
 commit e0a2ad51dfb7373aa602335490d9666d6101b5ea
-Merge: 327e1d880 3d688316a
+Merge: 327e1d8801 3d688316af
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Mar 30 10:51:27 2011 -0700
 
@@ -95387,14 +107242,14 @@ Date:   Mon Mar 28 17:18:39 2011 +0200
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit a095a6d4e8f5090907e8d3d66018636216300846
-Merge: a22486f84 ef9d04f8a
+Merge: a22486f848 ef9d04f8ad
 Author: Keith Packard <keithp@keithp.com>
 Date:   Sun Mar 27 20:06:29 2011 -0700
 
     Merge remote-tracking branch 'airlied/pwin-cleanup'
 
 commit a22486f848014000dc13dda470f77d4d8ea9e9f6
-Merge: 2ef4ff45e 633b81e8b
+Merge: 2ef4ff45ef 633b81e8ba
 Author: Keith Packard <keithp@keithp.com>
 Date:   Sun Mar 27 18:27:10 2011 -0700
 
@@ -95602,7 +107457,7 @@ Date:   Tue Mar 22 19:01:48 2011 -0700
     Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
 
 commit 03f45df93469f6aef391e97007b9614e0770cc4c
-Merge: efcb7275c 5fb329a04
+Merge: efcb7275ce 5fb329a04a
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Mar 23 13:38:37 2011 +0900
 
@@ -95791,7 +107646,7 @@ Date:   Sun Mar 13 20:01:30 2011 +0000
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 0ac4931753a5d5925fc844c8cbec08585aea57a7
-Merge: a8146f6be d7f801141
+Merge: a8146f6bec d7f8011418
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Mar 14 13:06:41 2011 -0700
 
@@ -96111,7 +107966,7 @@ Date:   Wed Mar 9 15:11:42 2011 +1000
     Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
 
 commit c3c0e2fdd326214e271ce144e8fc2725cbd738ef
-Merge: a19771e43 73555555a
+Merge: a19771e433 73555555a4
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Mar 9 14:25:54 2011 -0800
 
@@ -96480,28 +108335,28 @@ Date:   Fri Mar 4 01:12:01 2011 +0100
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 6c90e839d9872a37d371578c9c423e8213922044
-Merge: 0bc95d5b0 edcceedbd
+Merge: 0bc95d5b06 edcceedbd3
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu Mar 3 14:41:44 2011 -0800
 
     Merge remote branch 'whot/for-keith'
 
 commit 0bc95d5b06dcea65a1aa193ea907b50f7dd168b5
-Merge: 3f41f4ade 69a9171db
+Merge: 3f41f4adea 69a9171dbb
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu Mar 3 14:33:08 2011 -0800
 
     Merge remote branch 'jeremyhu/master'
 
 commit 3f41f4adea4bbb90d4bda4dab600595b655e3ed8
-Merge: 8e4c3ce55 dae24abcd
+Merge: 8e4c3ce55b dae24abcd4
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu Mar 3 14:12:36 2011 -0800
 
     Merge remote branch 'sandmann/for-keithp'
 
 commit 8e4c3ce55b0f186bc6ba4039e30629669b6087b7
-Merge: f3d19c0cf 296561506
+Merge: f3d19c0cf3 296561506a
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu Mar 3 13:42:07 2011 -0800
 
@@ -96575,7 +108430,7 @@ Date:   Mon Feb 28 12:32:53 2011 -0500
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
 
 commit c2207d11f243900bc2f641e08d80da63d84e97a8
-Merge: 00779932d 579ee8f5d
+Merge: 00779932de 579ee8f5d8
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Mon Feb 28 11:26:09 2011 +1000
 
@@ -96830,7 +108685,7 @@ Date:   Fri Feb 25 11:08:19 2011 +1000
     Reviewed-by: Fernando Carrijo <fcarrijo@freedesktop.org>
 
 commit 229b055bdbc53370944401649234e8a38183f4fb
-Merge: 6178959e3 b17fc99cb
+Merge: 6178959e3d b17fc99cb9
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu Feb 24 19:44:35 2011 -0800
 
@@ -96884,7 +108739,7 @@ Date:   Thu Feb 24 19:18:35 2011 -0800
     Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
 
 commit 83861595782aaa05907f9cf7b236d50261d404d9
-Merge: a1cc0e52b 4102a0096
+Merge: a1cc0e52b0 4102a00962
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu Feb 24 18:59:07 2011 -0800
 
@@ -96904,7 +108759,7 @@ Date:   Tue Nov 30 21:17:19 2010 +0500
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 365ad68fb9f7029550505b7c276a808050cada9c
-Merge: 0801afbd7 720c895db
+Merge: 0801afbd7c 720c895db9
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu Feb 24 18:49:40 2011 -0800
 
@@ -97238,7 +109093,7 @@ Date:   Wed Feb 23 14:44:23 2011 +0100
     Signed-off-by: Cyril Brulebois <kibi@debian.org>
 
 commit 579ee8f5d84c3a523b7b3e3941eabb226d1d19e2
-Merge: b63689313 17265ccb0
+Merge: b636893137 17265ccb02
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Wed Feb 23 08:44:42 2011 +1000
 
@@ -97544,14 +109399,14 @@ Date:   Fri Feb 18 14:46:33 2011 -0800
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 2c77aeb39f59f1a94cc603a2e6256a62ce785c36
-Merge: 816d67de2 402b329c3
+Merge: 816d67de2b 402b329c3a
 Author: Keith Packard <keithp@keithp.com>
 Date:   Fri Feb 18 14:29:32 2011 -0800
 
     Merge remote branch 'jcristau/for-keith'
 
 commit 816d67de2ba9bdfe652da32cb6447a3056342b98
-Merge: a73c28f0b 3bbb70a1a
+Merge: a73c28f0bd 3bbb70a1a7
 Author: Keith Packard <keithp@keithp.com>
 Date:   Fri Feb 18 12:20:26 2011 -0800
 
@@ -97571,14 +109426,14 @@ Date:   Thu Feb 10 16:27:29 2011 -0500
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 0bc9b15a622377c57e617411ccd26c4b5bf8cba4
-Merge: d1123b66e 93cd4b103
+Merge: d1123b66eb 93cd4b1034
 Author: Keith Packard <keithp@keithp.com>
 Date:   Fri Feb 18 12:04:41 2011 -0800
 
     Merge remote branch 'ajax/for-keithp'
 
 commit d1123b66ebbcf96dd816236f54befc568a5f7c68
-Merge: 5d020c313 f6e4ace9e
+Merge: 5d020c3135 f6e4ace9ea
 Author: Keith Packard <keithp@keithp.com>
 Date:   Fri Feb 18 11:59:25 2011 -0800
 
@@ -98293,7 +110148,7 @@ Date:   Thu Jan 13 20:19:18 2011 +0200
     Reviewed-by: Ville Syrjälä <ville.syrjala@nokia.com>
 
 commit ea1ffd3e60bdcedbec5a6f28929f8677bf45d450
-Merge: 12b0f7df2 53602c362
+Merge: 12b0f7df2c 53602c3621
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Feb 2 15:19:55 2011 -0800
 
@@ -98384,21 +110239,21 @@ Date:   Sun Jan 30 14:06:14 2011 +0100
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 246d40b685292fa6393ba22127152137494af2af
-Merge: 70f2d39fb 8c1f75a1d
+Merge: 70f2d39fbd 8c1f75a1d4
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Feb 2 14:51:33 2011 -0800
 
     Merge remote branch 'jeremyhu/master'
 
 commit 70f2d39fbde38d0baa687f1755b6c4c686f23052
-Merge: 3a91c2d21 a9d3c43a5
+Merge: 3a91c2d21c a9d3c43a57
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Feb 2 14:43:19 2011 -0800
 
     Merge remote branch 'jturney/master'
 
 commit 3a91c2d21c3231e2a011d95c3cfc01785430c1cf
-Merge: ac0a00a84 82b1eaa6c
+Merge: ac0a00a840 82b1eaa6ca
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Feb 2 14:37:00 2011 -0800
 
@@ -98651,21 +110506,21 @@ Date:   Thu Jan 13 16:08:29 2011 -0800
     Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
 
 commit be3be7580b6f6fd2f7fa4d4abfe5e1ab19470223
-Merge: 57a1d9b85 a1d885fdd
+Merge: 57a1d9b853 a1d885fdd6
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu Jan 20 21:21:21 2011 -0800
 
     Merge remote branch 'ajax/for-keithp'
 
 commit 57a1d9b85331f6fe19d5111f5163139572ffbf02
-Merge: 24ce650cf 642376979
+Merge: 24ce650cf4 6423769799
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu Jan 20 21:16:24 2011 -0800
 
     Merge remote branch 'whot/for-keith'
 
 commit 24ce650cf4f0c6fa72faecd38c53d40703e6c959
-Merge: bbdf81a05 09fd01090
+Merge: bbdf81a056 09fd010902
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu Jan 20 21:11:53 2011 -0800
 
@@ -99173,14 +111028,14 @@ Date:   Sat Jan 15 12:13:39 2011 -0800
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit abfea17342da774aa4e3a351a73c8f2af6e6fd28
-Merge: 361128389 e65c3f8bc
+Merge: 361128389e e65c3f8bcc
 Author: Keith Packard <keithp@keithp.com>
 Date:   Tue Jan 18 15:19:34 2011 -0800
 
     Merge remote branch 'ajax/for-keithp'
 
 commit 361128389e5cb0101cbd091ff8de77cf34608f6c
-Merge: 65ceaadbf d9225b960
+Merge: 65ceaadbf0 d9225b9602
 Author: Keith Packard <keithp@keithp.com>
 Date:   Tue Jan 18 15:18:08 2011 -0800
 
@@ -99518,7 +111373,7 @@ Date:   Tue Nov 23 11:38:50 2010 -0800
     Acked-by: Gaetan Nadon <memsize@videotron.ca>
 
 commit 8456625d64bb0013a496f3b56ea3aa20cf7a6142
-Merge: aa30a8658 ce74e7562
+Merge: aa30a86583 ce74e7562d
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Fri Jan 7 09:35:07 2011 +1000
 
@@ -99863,14 +111718,14 @@ Date:   Wed Jan 5 20:41:04 2011 +0200
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 0dede200c9ac7adbe8b8c16efacc3edc1f183cd9
-Merge: 7714357f5 2e781457d
+Merge: 7714357f50 2e781457d4
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Jan 5 08:51:46 2011 -0800
 
     Merge remote branch 'vsyrjala/misc_fixes'
 
 commit 7714357f506782973d25e270f85140b42507ed35
-Merge: 02e18c9fb b01dd9d33
+Merge: 02e18c9fb5 b01dd9d336
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Jan 5 08:43:18 2011 -0800
 
@@ -100563,7 +112418,7 @@ Date:   Wed Dec 15 14:59:13 2010 -0500
     Signed-off-by: Adam Jackson <ajax@redhat.com>
 
 commit e7dc253452a1ba64718a08fdc070405b494f53cd
-Merge: d1107918d d5b0d5857
+Merge: d1107918d4 d5b0d58573
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Dec 20 00:48:45 2010 -0800
 
@@ -100665,14 +112520,14 @@ Date:   Fri Dec 10 00:08:24 2010 +0000
     Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
 
 commit f1542f1d716723cba7c323849086585635121893
-Merge: 9716d3124 8a8fdd762
+Merge: 9716d31247 8a8fdd762a
 Author: Keith Packard <keithp@keithp.com>
 Date:   Tue Dec 14 15:04:12 2010 -0800
 
     Merge remote branch 'whot/for-keith'
 
 commit 9716d3124799c6db0d1c782aa72c72f972d5a158
-Merge: 03ea0b772 f641e4b34
+Merge: 03ea0b7726 f641e4b34a
 Author: Keith Packard <keithp@keithp.com>
 Date:   Tue Dec 14 15:01:36 2010 -0800
 
@@ -100849,7 +112704,7 @@ Date:   Wed Dec 8 18:54:30 2010 +0000
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 519d243f0c8e3c80226701f71d2cfa62e42dbff7
-Merge: 9f9c73231 446482efa
+Merge: 9f9c732311 446482efaa
 Author: Keith Packard <keithp@keithp.com>
 Date:   Tue Dec 7 13:39:58 2010 -0800
 
@@ -101307,14 +113162,14 @@ Date:   Sun Jun 6 15:23:37 2010 -0700
     Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
 
 commit f5b8bd620f91214c0b87e9b04d57015655792352
-Merge: 01e9fa7da 8127c83c8
+Merge: 01e9fa7da3 8127c83c81
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Dec 6 19:51:06 2010 -0800
 
     Merge remote branch 'jajones/for-keith'
 
 commit 01e9fa7da389fc7ab834b4234b8484514144b7f4
-Merge: 79870dbf7 68a1b0de9
+Merge: 79870dbf72 68a1b0de95
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Dec 6 19:45:11 2010 -0800
 
@@ -101337,14 +113192,14 @@ Date:   Sat Dec 4 16:13:29 2010 -0500
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit c4a7a5917ab828d4a0bd825a98e4d641bcb378f1
-Merge: 5de312a60 714b68d9e
+Merge: 5de312a60d 714b68d9e5
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Dec 6 19:28:07 2010 -0800
 
     Merge remote branch 'jeremyhu/master'
 
 commit 5de312a60d8227ed670849ecf888ea878aa81430
-Merge: 311cad331 8f42b2b69
+Merge: 311cad3315 8f42b2b693
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Dec 6 19:22:52 2010 -0800
 
@@ -101695,7 +113550,7 @@ Date:   Wed Nov 24 00:11:11 2010 +0100
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 3824417335ec00a87b51f8d05e592099b8507680
-Merge: dab064fa5 f4f41c812
+Merge: dab064fa5e f4f41c812d
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu Dec 2 08:39:33 2010 -0800
 
@@ -101945,14 +113800,14 @@ Date:   Sat Nov 27 00:14:51 2010 -0800
     Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
 
 commit 02449ee24b484c9fea501df5274d95a9f87cab23
-Merge: afd6eb66d b85f9063c
+Merge: afd6eb66d5 b85f9063c2
 Author: Keith Packard <keithp@keithp.com>
 Date:   Tue Nov 30 13:30:59 2010 -0800
 
     Merge remote branch 'ajax/for-keithp'
 
 commit afd6eb66d5ef6a59be4c03da4588aaa2ee47b9ad
-Merge: b16964910 ffcbfa006
+Merge: b16964910d ffcbfa0063
 Author: Keith Packard <keithp@keithp.com>
 Date:   Tue Nov 30 13:28:13 2010 -0800
 
@@ -102470,14 +114325,14 @@ Date:   Wed Nov 24 14:20:30 2010 +1000
     Reviewed-by: Keith Packard <keithp@keithp.com>
 
 commit 4e0f8f666e61390206c42ad2087477a912525bc7
-Merge: 400ddf2f5 639600fa7
+Merge: 400ddf2f58 639600fa7e
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Nov 24 11:47:33 2010 -0800
 
     Merge remote branch 'whot/for-keith'
 
 commit 400ddf2f58ce673c74d4e8ee829729cd3c75f8c9
-Merge: 7250f078c e074f745a
+Merge: 7250f078c1 e074f745a8
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Nov 24 11:46:18 2010 -0800
 
@@ -102827,21 +114682,21 @@ Date:   Tue Jun 22 19:45:26 2010 +0200
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
 
 commit 38c46ccf796462d068d95acb9022de2acfc3a1f7
-Merge: 3051dd513 c8998af3e
+Merge: 3051dd5135 c8998af3eb
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Nov 15 09:06:33 2010 +0800
 
     Merge remote branch 'whot/for-keith'
 
 commit 3051dd5135962283fc6c7de377a7c819d8a04e7f
-Merge: ed547a9fc c5975722a
+Merge: ed547a9fc8 c5975722a9
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Nov 15 08:58:02 2010 +0800
 
     Merge remote branch 'jeremyhu/master'
 
 commit ed547a9fc8a4f5cd95ef882b656a376c163eda6d
-Merge: 78f94f19a 84e8de127
+Merge: 78f94f19aa 84e8de1271
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Nov 15 08:51:27 2010 +0800
 
@@ -103112,7 +114967,7 @@ Date:   Wed Nov 10 21:35:58 2010 -0800
     Reviewed-by: Adam Jackson <ajax@redhat.com>
 
 commit 88cb61e1e55c54982b90e2a77465faaac6a0ba89
-Merge: 19f43836d 4ed4915bc
+Merge: 19f43836d1 4ed4915bc0
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Thu Nov 11 12:54:46 2010 +1000
 
@@ -103125,7 +114980,7 @@ Date:   Thu Nov 11 12:54:46 2010 +1000
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
 
 commit 4ed4915bc0fbe9b4419ca4a0d4e43c2fee032ae9
-Merge: 291c39dfe ec1bfbc66
+Merge: 291c39dfef ec1bfbc669
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Nov 10 16:58:21 2010 -0800
 
@@ -103185,14 +115040,14 @@ Date:   Sat Sep 11 17:55:57 2010 -0400
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit c9c0f93f8ed42413a05193ee71c69fa6b41f6a03
-Merge: 73f6de1ad 4132b1c59
+Merge: 73f6de1ad8 4132b1c591
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Nov 10 16:11:29 2010 -0800
 
     Merge remote branch 'whot/for-keith'
 
 commit 73f6de1ad8b5e1641102b54ff48a36ebb99ccacb
-Merge: 333b6ed26 3dc3aefb8
+Merge: 333b6ed26e 3dc3aefb88
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Nov 10 16:02:22 2010 -0800
 
@@ -103353,7 +115208,7 @@ Date:   Mon May 17 19:39:54 2010 +0200
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
 
 commit acba00c0c1129fe4ef7655f018cd21dbb1ee9a1f
-Merge: 383dfe23f 44e816541
+Merge: 383dfe23f1 44e8165414
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Nov 10 14:41:08 2010 -0800
 
@@ -103547,7 +115402,7 @@ Date:   Thu Nov 4 12:53:18 2010 +1000
     Reviewed-by: Julien Cristau <jcristau@debian.org>
 
 commit a52efb096e166e325deb3d6b502671f339a4fa15
-Merge: fe8d122b1 f72aadd38
+Merge: fe8d122b13 f72aadd38b
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Nov 3 06:50:45 2010 -0700
 
@@ -103949,7 +115804,7 @@ Date:   Sun Oct 17 09:58:50 2010 -0700
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit d738175eaf1098e29b8afb6de8e99b5098e366a7
-Merge: 8806a04f7 9872e0f01
+Merge: 8806a04f7f 9872e0f011
 Author: Keith Packard <keithp@keithp.com>
 Date:   Tue Oct 19 22:50:15 2010 -0700
 
@@ -104365,7 +116220,7 @@ Date:   Tue Mar 23 16:34:26 2010 +0000
     Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
 
 commit 5aff712a8d2eb9f965ecbb93216cc0bcdc327ae6
-Merge: 5b98c6267 e354ccac3
+Merge: 5b98c6267f e354ccac36
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Oct 18 17:16:23 2010 -0700
 
@@ -104576,7 +116431,7 @@ Date:   Mon Sep 27 13:58:40 2010 -0400
     Signed-off-by: Adam Jackson <ajax@redhat.com>
 
 commit eaf0b6a4d83d49930d21d5191f335fcac962632e
-Merge: 693e92d40 23229c7ce
+Merge: 693e92d404 23229c7ce5
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Fri Oct 15 13:46:59 2010 +1000
 
@@ -104983,7 +116838,7 @@ Date:   Sat Sep 25 10:05:10 2010 -0400
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 5532687a929426c4b1c4667f4591ed362f097c9b
-Merge: 9df4fb0ad 682a3ee60
+Merge: 9df4fb0adf 682a3ee608
 Author: Keith Packard <keithp@keithp.com>
 Date:   Tue Sep 28 08:15:07 2010 -0700
 
@@ -105159,7 +117014,7 @@ Date:   Tue Sep 21 15:13:30 2010 +0800
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 98197d931b266674557b52b4a7099c6470114e55
-Merge: 01ad3725a 402942cdb
+Merge: 01ad3725a8 402942cdbc
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu Sep 23 15:30:37 2010 -0700
 
@@ -105411,7 +117266,7 @@ Date:   Sun May 30 19:12:31 2010 +0300
     Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
 
 commit c768cdda92696b636c10bb2df64167d5274b4b99
-Merge: 5a725385f 207985363
+Merge: 5a725385fb 2079853632
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Sep 13 16:48:33 2010 -0700
 
@@ -105801,7 +117656,7 @@ Date:   Wed Sep 8 16:08:24 2010 -0400
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit bbffb85461eb63bfb1e01e2cb9674607b9221604
-Merge: 9a1a4ccbe 71972c253
+Merge: 9a1a4ccbe0 71972c2534
 Author: Keith Packard <keithp@keithp.com>
 Date:   Fri Sep 10 11:55:34 2010 -0700
 
@@ -105840,7 +117695,7 @@ Date:   Mon Aug 30 21:24:30 2010 +0300
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit ca0d578d29f37b61e62556fff59732741885625b
-Merge: cf88363db 08adf41f6
+Merge: cf88363db0 08adf41f63
 Author: Keith Packard <keithp@keithp.com>
 Date:   Fri Sep 10 11:50:27 2010 -0700
 
@@ -105870,7 +117725,7 @@ Date:   Fri Aug 27 10:20:29 2010 -0700
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit fa22f97af65efc2a147e9be0b7f288848965ff60
-Merge: 6edbdb7f9 654666529
+Merge: 6edbdb7f9e 6546665293
 Author: Keith Packard <keithp@keithp.com>
 Date:   Fri Sep 10 11:47:41 2010 -0700
 
@@ -107495,7 +119350,7 @@ Date:   Sat Jun 19 23:40:37 2010 -0700
     Reviewed-by: Patrick E. Kane <pekane52@gmail.com>
 
 commit 9fbbff3c0456f1969d45cc957d3260723caf62d7
-Merge: 95756f410 9ac8e206f
+Merge: 95756f410c 9ac8e206ff
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Jul 21 11:56:39 2010 -0700
 
@@ -107580,7 +119435,7 @@ Date:   Wed Jul 14 12:57:29 2010 -0700
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 0fc02c0bf92f694889589e3648acc08d4684de37
-Merge: 0540c4606 9d8ec712a
+Merge: 0540c46066 9d8ec712a6
 Author: Keith Packard <keithp@keithp.com>
 Date:   Tue Jul 13 15:05:36 2010 -0700
 
@@ -107677,7 +119532,7 @@ Date:   Fri Jul 9 10:36:12 2010 -0700
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 2307ab5bc9365ebbe04568edb7c7620a23689b70
-Merge: c65280ce8 fd4f5059f
+Merge: c65280ce8d fd4f5059f0
 Author: Keith Packard <keithp@keithp.com>
 Date:   Tue Jul 6 23:54:54 2010 -0400
 
@@ -107840,7 +119695,7 @@ Date:   Thu Jun 3 19:00:53 2010 -0700
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
 
 commit 69b2b5c85ec079ef49f84722daa5f148cedc2e1b
-Merge: b90faa715 143278583
+Merge: b90faa7156 1432785839
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu Jul 1 23:46:53 2010 -0400
 
@@ -108657,7 +120512,7 @@ Date:   Thu Jun 10 19:21:18 2010 -0700
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit a41d6e9bffbe56cfa1c3b84388a3d9f5a982f1a9
-Merge: 7e8f10012 f4190feb2
+Merge: 7e8f100121 f4190feb25
 Author: Keith Packard <keithp@keithp.com>
 Date:   Fri Jun 11 10:08:13 2010 -0700
 
@@ -108810,7 +120665,7 @@ Date:   Fri Jun 4 16:58:58 2010 +0700
     Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
 
 commit 620ca54aaa0b363fcf68cec1bd6c37e68c988352
-Merge: fd69234db 8ff9b502c
+Merge: fd69234db0 8ff9b502cf
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu Jun 10 19:18:53 2010 -0700
 
@@ -108882,7 +120737,7 @@ Date:   Thu Jun 3 19:17:14 2010 -0700
     Reviewed-by: Eamon Walsh <ewalsh@tycho.nsa.gov>
 
 commit 07a093add0b7e40c4d9b9b59273e3ff9e14a88a7
-Merge: 84190d209 dc614484f
+Merge: 84190d2095 dc614484f9
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu Jun 10 18:39:10 2010 -0700
 
@@ -109034,7 +120889,7 @@ Date:   Thu Jun 10 06:11:10 2010 -0700
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
 
 commit 84190d20954ef7888e4d96832c2a4b3225b4dfa2
-Merge: 4172aa137 5e1ef1f4d
+Merge: 4172aa137c 5e1ef1f4dd
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu Jun 10 13:36:35 2010 -0700
 
@@ -109362,7 +121217,7 @@ Date:   Fri Jun 4 14:22:06 2010 +0700
     Reviewed-by: Daniel Stone <daniel@fooishbar.org>
 
 commit 5d4e2c594059ffb536c8e506c2623320d3c6a787
-Merge: eacc42132 793dd3994
+Merge: eacc42132e 793dd39946
 Author: Keith Packard <keithp@keithp.com>
 Date:   Sat Jun 5 22:20:28 2010 -0700
 
@@ -109767,7 +121622,7 @@ Date:   Fri Jun 4 11:09:46 2010 +1000
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 0f12e86e600522768f5f64eafc1230526e700ab7
-Merge: aa7c09f7d f114f5498
+Merge: aa7c09f7d0 f114f54986
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu Jun 3 15:09:32 2010 -0700
 
@@ -109949,7 +121804,7 @@ Date:   Wed Jun 2 14:31:56 2010 -0700
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit b13d7a8e09c8e3eb5003420c3c0484431e5a052b
-Merge: f0ab726d8 dcceb90b1
+Merge: f0ab726d89 dcceb90b1d
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu Jun 3 07:01:26 2010 -0700
 
@@ -110414,7 +122269,7 @@ Date:   Mon May 24 09:14:27 2010 -0700
     Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
 
 commit b11465a6ecdc2b8373e6fc8af427edc4602bcaa1
-Merge: 7c085aebf 0abf065e3
+Merge: 7c085aebfe 0abf065e38
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon May 24 22:18:31 2010 -0700
 
@@ -110553,7 +122408,7 @@ Date:   Tue May 18 19:35:10 2010 +0300
     Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
 
 commit 2ffffb4daf6161e6a22d81442ecf6209acc9e975
-Merge: b5e0f6d8f d5306084b
+Merge: b5e0f6d8f4 d5306084b5
 Author: Keith Packard <keithp@keithp.com>
 Date:   Sun May 23 23:22:08 2010 -0700
 
@@ -110928,14 +122783,14 @@ Date:   Fri May 14 19:31:56 2010 +0300
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 103507af0c0ce7d7482a67163249864af36a2374
-Merge: 8bd8d81dc 99fcf655b
+Merge: 8bd8d81dc4 99fcf655bd
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed May 19 22:27:53 2010 -0700
 
     Merge remote branch 'vignatti/bus-cleanup'
 
 commit 8bd8d81dc473bf72ea108b1896a55e32defa02e2
-Merge: c620a1c0a 66d5ecc5f
+Merge: c620a1c0a4 66d5ecc5fd
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed May 19 22:27:20 2010 -0700
 
@@ -110955,7 +122810,7 @@ Date:   Thu May 20 10:26:56 2010 +1000
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 8b6c1809c09f832051327d86e1a25dc0ec5cc878
-Merge: d88ba7721 c38552d11
+Merge: d88ba7721d c38552d115
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed May 19 12:58:02 2010 -0700
 
@@ -111431,7 +123286,7 @@ Date:   Fri May 14 16:25:43 2010 +0300
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit f87002cb7d8729b1da4cbefe7653f4cfd3a2d956
-Merge: a4fbc0fed 890f536f8
+Merge: a4fbc0feda 890f536f8d
 Author: Keith Packard <keithp@keithp.com>
 Date:   Fri May 14 11:46:29 2010 -0700
 
@@ -111469,7 +123324,7 @@ Date:   Thu May 13 07:12:43 2010 +0300
     Reviewed-by: Keith Packard <keithp@keithp.com>
 
 commit 795432d4a92ed5b9fa4d9163e73c8e4fe4c74534
-Merge: f2a0c324e 92ed75ac5
+Merge: f2a0c324e3 92ed75ac59
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu May 13 18:22:49 2010 -0700
 
@@ -111751,7 +123606,7 @@ Date:   Sat May 8 15:19:03 2010 -0700
     Reviewed-by: Eamon Walsh <ewalsh@tycho.nsa.gov>
 
 commit 59857ee5da5f1f3f4900292581b9586477513211
-Merge: 21ceae900 432cbbec1
+Merge: 21ceae9002 432cbbec19
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed May 12 16:48:08 2010 -0700
 
@@ -111972,7 +123827,7 @@ Date:   Tue May 11 09:08:40 2010 -0700
     Reviewed-by: Adam Jackson <ajax@redhat.com>
 
 commit 3df22b293c1f1d27e7ce16662744c578d35b5aba
-Merge: fa6c70125 9de0e3174
+Merge: fa6c701257 9de0e31746
 Author: Keith Packard <keithp@keithp.com>
 Date:   Tue May 11 08:38:44 2010 -0700
 
@@ -112102,7 +123957,7 @@ Date:   Mon May 10 14:00:49 2010 -0700
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 95074538cce93abc1739a4d9dd78b0500fb8fec9
-Merge: c0799779d 2160ff524
+Merge: c0799779df 2160ff5240
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon May 10 13:49:33 2010 -0700
 
@@ -112330,7 +124185,7 @@ Date:   Fri Apr 30 12:18:09 2010 -0700
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit a80b1f888f2f7674a715d512ab950eeadee20448
-Merge: 497109986 0efd7b8d8
+Merge: 4971099860 0efd7b8d82
 Author: Keith Packard <keithp@keithp.com>
 Date:   Sun May 2 16:35:17 2010 -0700
 
@@ -112439,7 +124294,7 @@ Date:   Wed Apr 28 12:37:08 2010 -0700
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 986d46144b183a36b4e98aed95eca0c55a8b4251
-Merge: a974c8e7c b5b8f91b8
+Merge: a974c8e7cb b5b8f91b82
 Author: Keith Packard <keithp@keithp.com>
 Date:   Fri Apr 30 12:40:53 2010 -0700
 
@@ -112449,21 +124304,21 @@ Date:   Fri Apr 30 12:40:53 2010 -0700
             hw/xfree86/common/xf86xv.c
 
 commit a974c8e7cba40c8d7d1b91e07de8c414627b71a2
-Merge: 6581bc459 02e86221b
+Merge: 6581bc4591 02e86221b8
 Author: Keith Packard <keithp@keithp.com>
 Date:   Fri Apr 30 12:33:00 2010 -0700
 
     Merge remote branch 'whot/for-keith'
 
 commit 6581bc4591746c906d97f8b868f946c47bc6d756
-Merge: 0e91e19f7 d073e51be
+Merge: 0e91e19f78 d073e51bee
 Author: Keith Packard <keithp@keithp.com>
 Date:   Fri Apr 30 12:29:52 2010 -0700
 
     Merge remote branch 'yselkowitz/master'
 
 commit 0e91e19f783d21198fc2e210203e0f10040a9cd0
-Merge: 81a081c1f edbc56c08
+Merge: 81a081c1f0 edbc56c088
 Author: Keith Packard <keithp@keithp.com>
 Date:   Fri Apr 30 12:27:51 2010 -0700
 
@@ -112657,7 +124512,7 @@ Date:   Sat Apr 17 21:36:23 2010 +0200
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
 
 commit 3f63db89191701139d45332ca80b9d6eb327c773
-Merge: 41bdb6c00 54e51de8c
+Merge: 41bdb6c003 54e51de8cd
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Apr 26 20:18:13 2010 -0700
 
@@ -113054,7 +124909,7 @@ Date:   Wed Apr 21 18:28:13 2010 +0300
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 7ac6a6b7d0dfc5e021270b2898accd3425aa008a
-Merge: 0782894b5 f7ef6fd9a
+Merge: 0782894b57 f7ef6fd9a1
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Apr 21 16:07:38 2010 -0700
 
@@ -113312,7 +125167,7 @@ Date:   Mon Apr 19 09:26:10 2010 -0700
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit b3ab978df861c08298f57529e3db980489055c35
-Merge: a92b2c2c8 0ad022a72
+Merge: a92b2c2c8d 0ad022a729
 Author: Keith Packard <keithp@keithp.com>
 Date:   Sun Apr 18 22:01:40 2010 -0700
 
@@ -113474,7 +125329,7 @@ Date:   Wed Apr 14 17:27:51 2010 +0200
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
 
 commit e424d5812300e82de375d83dc0b490a76d865016
-Merge: 5b0faf355 0e7703f9b
+Merge: 5b0faf3554 0e7703f9b1
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu Apr 15 15:01:34 2010 -0700
 
@@ -113660,7 +125515,7 @@ Date:   Fri Apr 9 10:58:48 2010 -0400
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit ab60975fe28cb135b4183c57b7f50d3615921c1f
-Merge: adbbc6610 59edde7c2
+Merge: adbbc66108 59edde7c28
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Apr 12 21:40:41 2010 -0700
 
@@ -113720,7 +125575,7 @@ Date:   Tue Feb 16 08:11:41 2010 -0800
     Reviewed-by: Keith Packard <keithp@keithp.com>
 
 commit d7c98c1c81ae272f66edb05fde20f4c616604add
-Merge: 82cf3a4ae 03ccbd257
+Merge: 82cf3a4ae0 03ccbd2579
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Apr 7 22:25:51 2010 -0700
 
@@ -113888,14 +125743,14 @@ Date:   Mon Apr 5 19:12:22 2010 -0400
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit cbda58c963af5bb9c4643e9017dd4eec589ceff3
-Merge: a7698a677 c983f40fe
+Merge: a7698a6776 c983f40fe4
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Apr 7 15:51:38 2010 -0700
 
     Merge remote branch 'yselkowitz/master'
 
 commit a7698a677682a32960b885c22fdba2add70f4658
-Merge: 495cec794 165a4a9c7
+Merge: 495cec794d 165a4a9c7d
 Author: Keith Packard <keithp@keithp.com>
 Date:   Tue Apr 6 12:36:15 2010 -0700
 
@@ -114042,14 +125897,14 @@ Date:   Fri Mar 26 09:33:20 2010 -0700
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 57cb1a854a1b6d91d214b3fa250a7df2ed20d433
-Merge: 4b3d67a76 28a5f14b4
+Merge: 4b3d67a764 28a5f14b40
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Mar 29 11:46:00 2010 -0700
 
     Merge remote branch 'jeremyhu/master'
 
 commit 4b3d67a7647f696957727948f9757a261e15d14e
-Merge: 579715f83 aa9150835
+Merge: 579715f830 aa91508356
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Mar 29 11:44:07 2010 -0700
 
@@ -114466,7 +126321,7 @@ Date:   Mon Mar 22 18:01:17 2010 +0100
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit b29220dc765cb6f878c5466e00e4bd21f3bd803d
-Merge: c3da76643 ed31d50b5
+Merge: c3da76643a ed31d50b5f
 Author: Keith Packard <keithp@keithp.com>
 Date:   Sun Mar 21 23:01:58 2010 -0700
 
@@ -114714,7 +126569,7 @@ Date:   Sun Mar 21 17:23:46 2010 -0700
     Bump to 1.7.99.902 -- 1.8 RC2
 
 commit 235fa5030428084368e5be57fca695647b7b79c4
-Merge: 1c612acca fa5103a02
+Merge: 1c612acca8 fa5103a02b
 Author: Keith Packard <keithp@keithp.com>
 Date:   Sun Mar 21 15:38:40 2010 -0700
 
@@ -114740,7 +126595,7 @@ Date:   Wed Mar 17 14:32:38 2010 +1000
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 95ca39b981624df5338a16b506289014c431ae82
-Merge: e7ff95663 bf181915e
+Merge: e7ff956638 bf181915e1
 Author: Keith Packard <keithp@keithp.com>
 Date:   Sun Mar 21 15:24:06 2010 -0700
 
@@ -114928,7 +126783,7 @@ Date:   Fri Mar 12 16:52:56 2010 +0100
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit df9b6f16b27398545cd4cff8a56dd59a3813351d
-Merge: 5f169f549 5172253ba
+Merge: 5f169f5493 5172253bae
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Mar 15 08:26:58 2010 -0700
 
@@ -115253,7 +127108,7 @@ Date:   Wed Jan 27 20:38:38 2010 +0000
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 780c95caf9888fa4548dfe4c1c78a7e7ce99a9ed
-Merge: 018b17759 758f69717
+Merge: 018b177591 758f697175
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Feb 24 09:59:19 2010 -0800
 
@@ -115421,7 +127276,7 @@ Date:   Mon Feb 15 14:18:00 2010 +0200
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit ca9c2472d74c7107ccc117e2c9c723c168d2eccf
-Merge: e40ba5798 02d1116e7
+Merge: e40ba5798c 02d1116e7e
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Feb 22 13:26:06 2010 -0800
 
@@ -115759,7 +127614,7 @@ Date:   Fri Feb 12 13:46:03 2010 -0800
     Bump to 1.7.99.901 -- 1.8 RC1
 
 commit 57ffeb3f2b3313dcef92a396f1f55fdbc064b2c5
-Merge: c6d9bc092 c76248fda
+Merge: c6d9bc092c c76248fda9
 Author: Keith Packard <keithp@keithp.com>
 Date:   Fri Feb 12 13:36:32 2010 -0800
 
@@ -116486,7 +128341,7 @@ Date:   Wed Jan 27 11:34:45 2010 -0800
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 0b21a0416b4cb2c32da5e3fda05a0682eb97d56e
-Merge: 1e6fd65d0 837bd2bbc
+Merge: 1e6fd65d0b 837bd2bbc0
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Jan 27 14:14:15 2010 -0800
 
@@ -116805,7 +128660,7 @@ Date:   Mon Jan 11 18:02:55 2010 -0800
     Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
 
 commit 44f9c3d16c9c9b3362306a9ba26ee52e7baafeca
-Merge: 032f97808 84956ca43
+Merge: 032f97808c 84956ca43b
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Jan 13 10:19:21 2010 -0800
 
@@ -116961,7 +128816,7 @@ Date:   Thu Jan 7 14:12:34 2010 -0500
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 8ab4749aaefb3727b9fc58bb37b50a2d07eb1531
-Merge: 8d53d8448 9437504b2
+Merge: 8d53d84485 9437504b21
 Author: Keith Packard <keithp@keithp.com>
 Date:   Thu Jan 7 10:32:21 2010 -0800
 
@@ -117324,14 +129179,14 @@ Date:   Wed Dec 23 16:05:16 2009 +1000
     Signed-off-by: Julien Cristau <jcristau@debian.org>
 
 commit 9fad8f06fb89ac2ae05bea0fa24cab3df7677297
-Merge: 871bbe1d8 42e8c9224
+Merge: 871bbe1d87 42e8c9224e
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Dec 30 09:28:19 2009 -0800
 
     Merge remote branch 'dbn/inputclass'
 
 commit 871bbe1d87fa3c7ebd075e1d1eec33e45b08493d
-Merge: db2c6f7c9 e1165632b
+Merge: db2c6f7c91 e1165632bd
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Dec 30 09:16:45 2009 -0800
 
@@ -117646,7 +129501,7 @@ Date:   Tue Dec 22 15:40:40 2009 +1000
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 7dc78db79edd15b971110acaf16bbe7f69e40bdb
-Merge: 81a623f03 b44c9be24
+Merge: 81a623f036 b44c9be244
 Author: Keith Packard <keithp@keithp.com>
 Date:   Tue Dec 22 21:25:18 2009 -0800
 
@@ -117827,14 +129682,14 @@ Date:   Mon Dec 14 08:41:18 2009 +1000
     Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com>
 
 commit 0cb638dc6822e54567a1731ea1cf588475a226e9
-Merge: 6a6a041c2 fbdf493a3
+Merge: 6a6a041c2d fbdf493a3e
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Dec 16 21:58:44 2009 -0800
 
     Merge remote branch 'alanc/master'
 
 commit 6a6a041c2d8d32f6355db77cd59cff371038c683
-Merge: 8127465f4 d50319550
+Merge: 8127465f44 d503195504
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Dec 16 21:57:32 2009 -0800
 
@@ -118101,7 +129956,7 @@ Date:   Tue Dec 1 11:04:06 2009 -0800
     Acked-by: Soeren Sandmann <sandmann@daimi.au.dk>
 
 commit d3e054ac07dae12a82ad764b0622fddbef4b9ec5
-Merge: 12fb31815 97a6454ea
+Merge: 12fb31815d 97a6454ea5
 Author: Keith Packard <keithp@keithp.com>
 Date:   Fri Dec 11 09:22:22 2009 -0800
 
@@ -118320,7 +130175,7 @@ Date:   Wed Dec 2 20:24:02 2009 +0100
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 98c8b752254a27ab1aaf881b36bfda0f74929d0a
-Merge: 0e084d8c7 91c1bd78f
+Merge: 0e084d8c71 91c1bd78f7
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Dec 2 15:28:07 2009 -0800
 
@@ -119318,7 +131173,7 @@ Date:   Wed Nov 4 15:35:37 2009 +0200
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 7442f3355ab8f0bb2b1a270da18c65d8d315d4dd
-Merge: 0573042cd 7897b6c2d
+Merge: 0573042cdd 7897b6c2d4
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Nov 4 08:55:20 2009 -0800
 
@@ -119579,7 +131434,7 @@ Date:   Wed Oct 28 11:44:27 2009 -0700
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit deb72fc61464250af8185dab2da8ee09f13c55d8
-Merge: 55f4c80a4 a60e676f1
+Merge: 55f4c80a4c a60e676f1f
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Oct 28 10:54:13 2009 -0700
 
@@ -119730,7 +131585,7 @@ Date:   Thu Oct 22 00:00:35 2009 +0900
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 1228e2d052f0bb98175c55c194340773b5fedb40
-Merge: 08e7f62fa 52bc6d944
+Merge: 08e7f62faf 52bc6d9449
 Author: Keith Packard <keithp@keithp.com>
 Date:   Wed Oct 21 22:46:53 2009 +0900
 
@@ -120160,7 +132015,7 @@ Date:   Tue Oct 13 20:14:58 2009 -0500
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 6e158003e80534ce007290f75c89d698aec1d00b
-Merge: 2b14e1420 5e762f0e2
+Merge: 2b14e14203 5e762f0e2f
 Author: Keith Packard <keithp@keithp.com>
 Date:   Tue Oct 13 18:40:42 2009 -0700
 
@@ -120402,7 +132257,7 @@ Date:   Wed Oct 7 09:07:03 2009 -0700
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 68304215e25876ee639015969b4f07e1c9c515e0
-Merge: 6676f49e3 315aaef55
+Merge: 6676f49e34 315aaef557
 Author: Keith Packard <keithp@keithp.com>
 Date:   Tue Oct 6 22:41:42 2009 -0700
 
@@ -127805,7 +139660,7 @@ Date:   Thu Jun 4 17:33:25 2009 -0400
     xace: fix a bad send access hook call.
 
 commit 993daf06497c85bb6a1e70592df380503d721dfb
-Merge: 2bda50ee1 e1e8c7ddd
+Merge: 2bda50ee14 e1e8c7ddd7
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Thu Jun 4 15:11:36 2009 +1000
 
@@ -127868,7 +139723,7 @@ Date:   Wed Jun 3 13:37:32 2009 -0400
     s/MIN/min/, s/MAX/max/ (#2968)
 
 commit 6de67d3206f0a4e307070714564c19efc84da2ec
-Merge: af4e65840 7f027d9dc
+Merge: af4e658401 7f027d9dc0
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Wed Jun 3 16:11:33 2009 +1000
 
@@ -128263,7 +140118,7 @@ Date:   Thu May 28 15:32:03 2009 -0400
     These have been nops since 2006 and functionally void since 7.0.
 
 commit d7aef3f663f4b5d861799f8615dcd301d5ce2906
-Merge: a25f248fc e08c6a075
+Merge: a25f248fc3 e08c6a0752
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Thu May 28 17:20:58 2009 +1000
 
@@ -128315,7 +140170,7 @@ Date:   Mon May 4 19:24:47 2009 -0500
     Signed-off-by: Federico Mena Quintero <federico@novell.com>
 
 commit b12010e10f38951358b48ff1076c026f943b7cc3
-Merge: 6e6927247 f1441b835
+Merge: 6e69272473 f1441b8353
 Author: Søren Sandmann Pedersen <sandmann@redhat.com>
 Date:   Wed May 27 15:56:30 2009 -0400
 
@@ -130149,7 +142004,7 @@ Date:   Thu Apr 23 08:42:38 2009 -0700
     Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
 
 commit 057fc9a4f89282e440b5e11458f1dd8655879dd8
-Merge: 95628b797 932d6bcbb
+Merge: 95628b797e 932d6bcbb6
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Fri Apr 24 16:15:47 2009 +1000
 
@@ -130325,7 +142180,7 @@ Date:   Fri Apr 17 15:22:57 2009 +0200
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
 
 commit d5ad14c8ed4d8360e1df8cd0bacf6a7c9c31df91
-Merge: 54716fd3d 0e0642ee9
+Merge: 54716fd3db 0e0642ee94
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Sun Apr 19 22:28:22 2009 +1000
 
@@ -131152,7 +143007,7 @@ Date:   Thu Mar 26 22:22:32 2009 -0700
     Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
 
 commit 6c3b633299f12051fcf37fb8439f358de876cf03
-Merge: adf21dba7 0cfd48130
+Merge: adf21dba76 0cfd481308
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Tue Apr 7 19:36:27 2009 +1000
 
@@ -137653,7 +149508,7 @@ Date:   Thu Dec 4 09:47:25 2008 +1000
     Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
 
 commit 22d4ddcc3d63b7fbf2a23f5162075e4ee06db781
-Merge: d2dad384f c3bf15ba8
+Merge: d2dad384f5 c3bf15ba85
 Author: Matthieu Herrb <matthieu@crux.(none)>
 Date:   Sun Dec 7 23:56:15 2008 +0100
 
@@ -138609,7 +150464,7 @@ Date:   Tue Nov 25 23:15:35 2008 -0800
     New version of dolt
 
 commit 4715f079b9c61362755c95c1ebf89c97cc6fff2b
-Merge: 9ffc67193 ed597f19f
+Merge: 9ffc671939 ed597f19fd
 Author: Keith Packard <keithp@keithp.com>
 Date:   Tue Nov 25 22:19:08 2008 -0800
 
@@ -139490,7 +151345,7 @@ Date:   Fri Nov 21 12:21:45 2008 +1000
     Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
 
 commit 387563b77743d92be83420d982eaf57f5459a883
-Merge: 85f650c9b f6e01fa1b
+Merge: 85f650c9b7 f6e01fa1b8
 Author: Matthieu Herrb <matthieu.herrb@laas.fr>
 Date:   Sun Nov 23 13:15:46 2008 +0100
 
@@ -139892,7 +151747,7 @@ Date:   Fri Nov 14 12:36:20 2008 -0500
     Signed-off-by: James Cloos <cloos@jhcloos.com>
 
 commit ba4e08244ed3923eecf26842dfc1df17c696e053
-Merge: 81fd17f5f 5bad5d2ab
+Merge: 81fd17f5f4 5bad5d2abe
 Author: Alex Deucher <alexdeucher@gmail.com>
 Date:   Thu Nov 13 15:04:18 2008 -0500
 
@@ -146996,7 +158851,7 @@ Date:   Mon May 26 17:56:08 2008 +0930
     Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au>
 
 commit 26c1958c322be3ac4dfec9ba2c41c5202bd03709
-Merge: 5fe57787f 29586101d
+Merge: 5fe57787fa 29586101dc
 Author: Peter Hutterer <peter@cs.unisa.edu.au>
 Date:   Mon May 26 17:37:31 2008 +0930
 
@@ -147475,7 +159330,7 @@ Date:   Wed May 21 21:51:27 2008 +0930
     Big boss says UniSA isn't unique enough. Who am I to argue?
 
 commit 7509fb498c02fe1cebe4139612b8871ec877c130
-Merge: 2ae3bed33 dfb7de657
+Merge: 2ae3bed337 dfb7de6571
 Author: Peter Hutterer <peter@cs.unisa.edu.au>
 Date:   Wed May 21 16:25:35 2008 +0930
 
@@ -147535,7 +159390,7 @@ Date:   Tue May 20 10:54:32 2008 +0930
     fb: shut up two compiler warnings.
 
 commit 99d28c3ef37aeffe7d8ec41e45a650ba248c6958
-Merge: fc7e2566c 0178b6a4a
+Merge: fc7e2566cc 0178b6a4ab
 Author: Peter Hutterer <peter@cs.unisa.edu.au>
 Date:   Tue May 20 10:20:14 2008 +0930
 
@@ -148135,7 +159990,7 @@ Date:   Fri May 9 15:38:44 2008 -0700
     <http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=4258475>
 
 commit 7b3066d9b9099135d9c49e0682161d5568fc535b
-Merge: 2a3d1421e 315f08905
+Merge: 2a3d1421e0 315f089056
 Author: Drew Parsons <drew@emerall.com>
 Date:   Sat May 10 00:01:15 2008 +1000
 
@@ -148235,7 +160090,7 @@ Date:   Thu May 8 16:04:24 2008 -0400
     Bug #13104: Remove broken XAA a1 glyph fast path.
 
 commit ddaecfa13cefee7c66b39b606c8640c6544d4943
-Merge: 9c2e0871c cf20df39c
+Merge: 9c2e0871cf cf20df39cc
 Author: Adam Jackson <ajax@redhat.com>
 Date:   Thu May 8 14:33:58 2008 -0400
 
@@ -148493,7 +160348,7 @@ Date:   Fri May 2 14:56:58 2008 +0930
     xfree86: don't try to repaint the cursor before cursors exist.
 
 commit 334456952930cb3e55c02fcdada2d0c074cd0520
-Merge: 8e56fd972 3b8d53452
+Merge: 8e56fd9728 3b8d53452c
 Author: Peter Hutterer <peter@cs.unisa.edu.au>
 Date:   Fri May 2 11:00:14 2008 +0930
 
@@ -149402,7 +161257,7 @@ Date:   Mon Apr 21 22:06:38 2008 -0700
     (cherry picked from commit a033c0b3dbb3b963261faa39f0236457cb00ff44)
 
 commit 8190ef87547b704848231bde10b1cdffc6442790
-Merge: 179a082c2 2ddbfd345
+Merge: 179a082c26 2ddbfd3457
 Author: Peter Hutterer <peter@cs.unisa.edu.au>
 Date:   Tue Apr 22 18:04:05 2008 +0930
 
@@ -150040,7 +161895,7 @@ Date:   Mon Apr 14 09:58:49 2008 +0200
     EXA: Teach exaCompositeFallbackPictDesc() about x8r8g8b8.
 
 commit 1a9d7205cd5640eb65f019336097d86301942ea7
-Merge: 90f491cf8 6866e84e3
+Merge: 90f491cf8e 6866e84e3c
 Author: Peter Hutterer <peter@cs.unisa.edu.au>
 Date:   Mon Apr 14 16:25:58 2008 +0930
 
@@ -150225,7 +162080,7 @@ Date:   Fri Feb 22 11:01:51 2008 +1030
     X.Org Bug 14418 <http://bugs.freedesktop.org/show_bug.cgi?id=14418>
 
 commit 90f491cf8eb869f27c4278b26c1bb84432b12d63
-Merge: cbe01b308 b4380d803
+Merge: cbe01b3083 b4380d8030
 Author: Peter Hutterer <peter@cs.unisa.edu.au>
 Date:   Fri Apr 11 08:29:52 2008 +0930
 
@@ -150418,7 +162273,7 @@ Date:   Tue Apr 8 20:37:25 2008 -0700
     (cherry picked from commit 126e9bc8c480b403dedc44c1e8c4fe1476340ed9)
 
 commit cbe01b3083eb65c9d4259b1071683febebf11600
-Merge: 5ffbcfec3 389dae73c
+Merge: 5ffbcfec3d 389dae73cc
 Author: Peter Hutterer <peter@cs.unisa.edu.au>
 Date:   Wed Apr 9 10:46:46 2008 +0930
 
@@ -150518,7 +162373,7 @@ Date:   Thu Apr 3 14:50:05 2008 -0400
     EXA: Fix TS origin computation when implementing RenderComposite with tiling.
 
 commit fd06e8f8c1d82a9d91931e8532bee0fd9c9ca9ab
-Merge: b46a00918 6c0cfe3d4
+Merge: b46a009186 6c0cfe3d43
 Author: Peter Hutterer <whot@potoroo.wearablelab.ml.unisa.edu.au>
 Date:   Mon Apr 7 07:56:41 2008 +0930
 
@@ -150530,7 +162385,7 @@ Date:   Mon Apr 7 07:56:41 2008 +0930
             dix/dispatch.c
 
 commit 539bf3c2836727e7560c64144071b086f8ea32fe
-Merge: 3ab33e7cd 6c0cfe3d4
+Merge: 3ab33e7cd4 6c0cfe3d43
 Author: Sascha Hlusiak <saschahlusiak@arcor.de>
 Date:   Mon Apr 7 00:10:16 2008 +0200
 
@@ -150991,7 +162846,7 @@ Date:   Thu Mar 27 15:18:39 2008 +1000
     RH BZ 435216
 
 commit 9df915b84d45d39aed7557c98883b20a66da2e96
-Merge: 47eb658e8 333e7123d
+Merge: 47eb658e80 333e7123dc
 Author: Sascha Hlusiak <saschahlusiak@arcor.de>
 Date:   Tue Mar 25 17:50:50 2008 +0100
 
@@ -151533,7 +163388,7 @@ Date:   Tue Mar 4 02:44:48 2008 -0500
     XACE: Check the return value of the selection create hook call.
 
 commit 4f2cd0ed96d3b10c78774c721c2ffbfb0556dddd
-Merge: 23ae68a4c 453661a9e
+Merge: 23ae68a4c7 453661a9e1
 Author: Peter Hutterer <peter@cs.unisa.edu.au>
 Date:   Tue Mar 4 18:11:10 2008 +1030
 
@@ -152992,7 +164847,7 @@ Date:   Fri Feb 1 14:13:29 2008 +1030
     Reviewed-by: Peter Hutterer <peter@cs.unisa.edu.au>
 
 commit e5e531ce96264518f278f572a4d0bfcd345aa618
-Merge: 6c3868208 1692dcf19
+Merge: 6c38682084 1692dcf197
 Author: Peter Hutterer <peter@cs.unisa.edu.au>
 Date:   Thu Jan 31 16:36:17 2008 +1030
 
@@ -153109,14 +164964,14 @@ Date:   Mon Jan 28 12:18:43 2008 -0800
     (cherry picked from commit 116800279d2ec783c63f43d3902627edde6a4cff)
 
 commit 16b0614c8c441eb1692bde9e58fadf54a9c6f00f
-Merge: 1a88aed5c e915a2639
+Merge: 1a88aed5c8 e915a26397
 Author: David Nusinow <dnusinow@debian.org>
 Date:   Sat Jan 26 16:13:25 2008 -0500
 
     Merge commit 'upstream/master'
 
 commit 0ac175597712edfeae676f536746a4d26d625e30
-Merge: 210eeef49 e915a2639
+Merge: 210eeef495 e915a26397
 Author: Peter Hutterer <peter@cs.unisa.edu.au>
 Date:   Sat Jan 26 13:55:07 2008 +1030
 
@@ -153570,7 +165425,7 @@ Date:   Wed Jan 9 19:52:00 2008 -0800
     More Xv extension byte swapping fixes
 
 commit 38bf01bd1c925614a6e67a38aa3cefc7b8fe3bca
-Merge: 4e85c7c32 0883e838e
+Merge: 4e85c7c322 0883e838e2
 Author: Peter Hutterer <peter@cs.unisa.edu.au>
 Date:   Thu Jan 10 13:38:46 2008 +1030
 
@@ -153806,7 +165661,7 @@ Date:   Thu Jan 3 18:09:56 2008 +1030
     dix: free ClassesRec when a BadAlloc occurs during CoreKeyboardProc.
 
 commit 8da83836b60f7cdb75d08482f4311fa0e2ab4e1d
-Merge: eace88989 ae869fc76
+Merge: eace88989c ae869fc766
 Author: Peter Hutterer <peter@cs.unisa.edu.au>
 Date:   Thu Jan 3 17:04:54 2008 +1030
 
@@ -154445,7 +166300,7 @@ Date:   Fri Dec 14 00:53:54 2007 -0500
     Bump video driver ABI and extension ABI for devPrivates rework.
 
 commit 86b2e59bfb79bd042a13c35fbb4ccecec576f629
-Merge: 1c1a4bc97 cb0d7e2c2
+Merge: 1c1a4bc970 cb0d7e2c26
 Author: Eamon Walsh <ewalsh@tycho.nsa.gov>
 Date:   Fri Dec 14 00:32:24 2007 -0500
 
@@ -154493,7 +166348,7 @@ Date:   Thu Dec 13 15:55:28 2007 -0800
     (cherry picked from commit fc04c9759b30d062111d4a7f3f411ed0f18cbde4)
 
 commit c8feb73f5841e7812d8dfdb91f1064e2033d028c
-Merge: 9a7ce5736 a125ce4a8
+Merge: 9a7ce57363 a125ce4a84
 Author: Eamon Walsh <ewalsh@tycho.nsa.gov>
 Date:   Thu Dec 13 18:38:25 2007 -0500
 
@@ -155960,7 +167815,7 @@ Date:   Mon Nov 19 21:01:22 2007 -0500
             during merge conflict resolution.
 
 commit 2d17f47cc7d6b174857617d31ad1b437d8e97d94
-Merge: 60be452c2 ea9c63e93
+Merge: 60be452c2e ea9c63e93b
 Author: Eamon Walsh <ewalsh@tycho.nsa.gov>
 Date:   Mon Nov 19 18:10:46 2007 -0500
 
@@ -156288,7 +168143,7 @@ Date:   Thu Nov 8 17:25:36 2007 -0500
     Don't sleep(1) at server exit.
 
 commit 1603130236c55ddabc3854d4ba62d544debcf1f5
-Merge: f207e69d6 f7dd0c72b
+Merge: f207e69d62 f7dd0c72b8
 Author: Eamon Walsh <ewalsh@tycho.nsa.gov>
 Date:   Wed Nov 14 13:35:50 2007 -0500
 
@@ -156665,7 +168520,7 @@ Date:   Thu Nov 8 10:00:35 2007 +1030
     Also clean up to return error codes instead of sending the error manually.
 
 commit 184a7b8917a15bb2c719153b9b016c03aab42101
-Merge: a8808ac3d 0b729051c
+Merge: a8808ac3d0 0b729051c0
 Author: Peter Hutterer <peter@cs.unisa.edu.au>
 Date:   Thu Nov 8 09:34:35 2007 +1030
 
@@ -156676,7 +168531,7 @@ Date:   Thu Nov 8 09:34:35 2007 +1030
             Xi/opendev.c
 
 commit e94ab0b502160376d1956345196f7e1c7e2e886f
-Merge: 26e1fc7b4 9bee1c691
+Merge: 26e1fc7b42 9bee1c6912
 Author: Dodji Seketeli <dodji@openedhand.com>
 Date:   Wed Nov 7 19:04:24 2007 +0100
 
@@ -156715,7 +168570,7 @@ Date:   Wed Nov 7 18:43:16 2007 +0100
               XNEST_LIBS contains the right thing.
 
 commit 0b729051c04da7068f1e6dd319190bd0a362b2c0
-Merge: b7ee005d3 d7c5e8bfc
+Merge: b7ee005d32 d7c5e8bfc1
 Author: Peter Hutterer <peter@cs.unisa.edu.au>
 Date:   Wed Nov 7 15:37:23 2007 +1030
 
@@ -156814,7 +168669,7 @@ Date:   Tue Nov 6 16:26:09 2007 -0500
     on the x11perf benchmark.
 
 commit aaa50b64113b122aaebd46e3b78e3fb7a8d70500
-Merge: 868e30363 ddce48ede
+Merge: 868e303630 ddce48ede0
 Author: Dodji Seketeli <dodji@openedhand.com>
 Date:   Tue Nov 6 16:25:40 2007 +0100
 
@@ -156841,7 +168696,7 @@ Date:   Tue Nov 6 09:40:14 2007 +0000
     to subsequent assertion failure in libdbus.
 
 commit a52c9b2a59f27266557ff9d5d2c08492e04135a6
-Merge: c7e18beb3 58332894c
+Merge: c7e18beb3c 58332894c0
 Author: Eamon Walsh <ewalsh@tycho.nsa.gov>
 Date:   Mon Nov 5 19:08:36 2007 -0500
 
@@ -156869,7 +168724,7 @@ Date:   Mon Nov 5 15:01:13 2007 -0500
     xselinux: Register SELinux extension protocol names.
 
 commit 632c33c5c18b3e091c4fce98280af4d583e99640
-Merge: 4113f040c dda10c906
+Merge: 4113f040c5 dda10c9066
 Author: Dodji Seketeli <dodji@openedhand.com>
 Date:   Mon Nov 5 17:52:33 2007 +0100
 
@@ -157539,7 +169394,7 @@ Date:   Thu Oct 25 12:35:01 2007 -0400
     xselinux: Label the default device directly with the process context.
 
 commit b633d54b94d746d26e13014634d9f63bbb7e8f7d
-Merge: 4b05f19cb 48ca5961c
+Merge: 4b05f19cb9 48ca5961ca
 Author: Eamon Walsh <ewalsh@tycho.nsa.gov>
 Date:   Thu Oct 25 12:19:30 2007 -0400
 
@@ -157741,7 +169596,7 @@ Date:   Fri Oct 19 16:34:54 2007 -0700
     they should be.
 
 commit a3a95d3475dc91ed2e8a55bf484a6b3f2b5ac32a
-Merge: a358b87f4 7e1cada6c
+Merge: a358b87f45 7e1cada6c6
 Author: Eric Anholt <eric@anholt.net>
 Date:   Fri Oct 19 15:44:17 2007 -0700
 
@@ -157947,7 +169802,7 @@ Date:   Wed Oct 17 16:09:40 2007 -0400
     Need to merge so this type of thing stops happening.
 
 commit c3f7b862550fa8f46633162f83db8c27e46fc672
-Merge: af4dde0ac feac07595
+Merge: af4dde0ac1 feac075952
 Author: Eamon Walsh <ewalsh@tycho.nsa.gov>
 Date:   Wed Oct 17 15:00:54 2007 -0400
 
@@ -158527,7 +170382,7 @@ Date:   Sun Oct 14 14:59:12 2007 -0400
     Fix GLX byteswapping.
 
 commit 927757e1028f45f7fd94b9a2ab35567e0f34b2a8
-Merge: ccda4b66b 17ffc34ad
+Merge: ccda4b66bd 17ffc34ad5
 Author: Kristian Høgsberg <krh@redhat.com>
 Date:   Fri Oct 12 19:28:39 2007 -0400
 
@@ -158807,7 +170662,7 @@ Date:   Fri Oct 5 12:19:03 2007 +0930
     regardless of who is the pairing client.
 
 commit 4611f9568cdadf9c00f4b7ca4c77c8c6f07e94f8
-Merge: ab11bad54 3549a1282
+Merge: ab11bad547 3549a12823
 Author: Dodji Seketeli <dodji@openedhand.com>
 Date:   Thu Oct 4 13:07:50 2007 +0200
 
@@ -158880,7 +170735,7 @@ Date:   Thu Oct 4 11:38:01 2007 +0200
     it for them completely.
 
 commit 604ebb5a6de372e6a8a96e0ee997db7929126860
-Merge: 1365aeff5 4ba76a7e2
+Merge: 1365aeff54 4ba76a7e2b
 Author: Dodji Seketeli <dodji@openedhand.com>
 Date:   Wed Oct 3 16:13:16 2007 +0200
 
@@ -159018,7 +170873,7 @@ Date:   Tue Oct 2 13:13:51 2007 -0700
     Also fix incorrect library inclusion by kdrive which broke the build.
 
 commit 439edc768eea17667846ce573c843b8377e0dfb4
-Merge: c8ccf469d 93ae6fe18
+Merge: c8ccf469dc 93ae6fe18c
 Author: Eric Anholt <eric@anholt.net>
 Date:   Tue Oct 2 12:14:04 2007 -0700
 
@@ -159951,7 +171806,7 @@ Date:   Thu Sep 27 11:44:03 2007 +0930
     This is hopefully better than hardcodey calling CoreProcessPointerEvent.
 
 commit 27612748e0ec20f3a23839f0a12e39f598dd722c
-Merge: b61461425 3b114f260
+Merge: b61461425e 3b114f2603
 Author: Eamon Walsh <ewalsh@tycho.nsa.gov>
 Date:   Wed Sep 26 07:47:29 2007 -0400
 
@@ -160372,7 +172227,7 @@ Date:   Wed Sep 19 04:46:10 2007 -0700
     hey -- you have to start somewhere. ;)
 
 commit 97c150b61bbe436453b05d3c07cd2173870aac40
-Merge: 57907e094 547ad2125
+Merge: 57907e0943 547ad2125e
 Author: Eamon Walsh <ewalsh@tycho.nsa.gov>
 Date:   Wed Sep 19 07:25:55 2007 -0400
 
@@ -160497,7 +172352,7 @@ Date:   Sat Sep 15 14:01:57 2007 +0200
     Initialize output->pendingProperties.
 
 commit b9f7aeb20015290a8acf938a11bf9272bf3527cf
-Merge: e4d11e58c 06d27f804
+Merge: e4d11e58ce 06d27f8045
 Author: Eric Anholt <eric@anholt.net>
 Date:   Thu Sep 13 00:15:45 2007 +0000
 
@@ -160911,7 +172766,7 @@ Date:   Wed Sep 5 17:46:23 2007 -0700
     broken uses.
 
 commit e332335241af28ef0ab66b102d0cbc4e5c73ac68
-Merge: 7381e9149 accd71bda
+Merge: 7381e9149e accd71bda6
 Author: Ben Byer <bbyer@bbyer.apple.com>
 Date:   Wed Sep 5 15:51:23 2007 -0700
 
@@ -160956,7 +172811,7 @@ Date:   Wed Sep 5 14:31:01 2007 -0700
     so it doesn't make sense to require it when building on OSX/Darwin.
 
 commit ff01e44e33fd072958fb0157dae072f1b1c88944
-Merge: 8ba8c16af 47300ed2b
+Merge: 8ba8c16af7 47300ed2be
 Author: Ben Byer <bbyer@bbyer.apple.com>
 Date:   Wed Sep 5 13:56:08 2007 -0700
 
@@ -161106,7 +172961,7 @@ Date:   Tue Sep 4 14:49:49 2007 -0700
     Revert part of 529acb175440969af9d7fa38aab8d7dea0dc2661 because libtool is smart.
 
 commit bf5948518763b5e21eff806a0a9abc5f7757fa10
-Merge: 4062db402 735da3dcd
+Merge: 4062db4020 735da3dcd0
 Author: Matthieu Herrb <matthieu@bluenote.herrb.com>
 Date:   Tue Sep 4 22:40:31 2007 +0200
 
@@ -161422,7 +173277,7 @@ Date:   Tue Aug 28 09:28:25 2007 -0400
     FontRec privates.
 
 commit 85547073265ae9bc4ae3af920a6d3214fd1ca0c5
-Merge: 860a09cfb 7d54399cf
+Merge: 860a09cfb8 7d54399cfd
 Author: Eamon Walsh <ewalsh@tycho.nsa.gov>
 Date:   Tue Aug 28 07:25:21 2007 -0400
 
@@ -161522,7 +173377,7 @@ Date:   Fri Aug 24 16:00:31 2007 -0700
     Bump video driver ABI for pci-rework.
 
 commit 91f358336f77c0e4f577be65cca977d17298e36c
-Merge: b9a806f0b 8b6b40b72
+Merge: b9a806f0b3 8b6b40b727
 Author: Ian Romanick <idr@us.ibm.com>
 Date:   Fri Aug 24 15:04:21 2007 -0700
 
@@ -161576,7 +173431,7 @@ Date:   Fri Aug 24 13:04:48 2007 +0200
     case.
 
 commit 8b6b40b7271acd81a9548f502c18f46f3b640640
-Merge: ab7a6d860 3305d1719
+Merge: ab7a6d860d 3305d17195
 Author: Ian Romanick <idr@us.ibm.com>
 Date:   Thu Aug 23 18:19:17 2007 -0700
 
@@ -161713,7 +173568,7 @@ Date:   Wed Aug 22 16:54:29 2007 +0100
     Fix <pixman.h> include to <pixman/pixman.h>
 
 commit b6a7c0112c42a3287e53647c38b2c0c5bf8fefa0
-Merge: 53941c8e6 6ef4ecd82
+Merge: 53941c8e68 6ef4ecd826
 Author: Søren Sandmann Pedersen <sandmann@redhat.com>
 Date:   Tue Aug 21 14:26:34 2007 -0400
 
@@ -162025,7 +173880,7 @@ Date:   Mon Aug 13 10:43:48 2007 -0400
     current interface.
 
 commit f367285fd5825e0adc271982a529c9904ad65c89
-Merge: b1272eefd ff4bd3add
+Merge: b1272eefd9 ff4bd3addb
 Author: Peter Hutterer <peter@cs.unisa.edu.au>
 Date:   Sun Aug 12 15:31:10 2007 +0930
 
@@ -162400,7 +174255,7 @@ Date:   Wed Jul 25 14:57:13 2007 -0700
     ProcRenderAddGlyphs: Convert while loops to for loops where more natural
 
 commit e34fcd2bf42dbd72ab6ce2df80f2dcaa13416e74
-Merge: 32c0dcc8c f3955c0a0
+Merge: 32c0dcc8c0 f3955c0a02
 Author: Eamon Walsh <ewalsh@tycho.nsa.gov>
 Date:   Thu Aug 2 14:27:03 2007 -0400
 
@@ -163708,7 +175563,7 @@ Date:   Wed Jun 20 18:42:00 2007 +0200
     can't actually occur when swapped out.
 
 commit 1f97a7647606226cde61d6ad7a94f2b0b571a06c
-Merge: 5dee64fc9 2e7fef7d0
+Merge: 5dee64fc99 2e7fef7d08
 Author: Peter Hutterer <peter@cs.unisa.edu.au>
 Date:   Tue Jun 19 17:20:52 2007 +0930
 
@@ -163750,7 +175605,7 @@ Date:   Tue Jun 19 11:28:07 2007 +0930
     device to interact, so this seems like a reasonable solution.
 
 commit ab7a6d860d4a275a810a64b1ba7b13726ed10575
-Merge: e9130b8ba 2e7fef7d0
+Merge: e9130b8bac 2e7fef7d08
 Author: Ian Romanick <idr@us.ibm.com>
 Date:   Mon Jun 18 16:51:13 2007 -0700
 
@@ -163832,7 +175687,7 @@ Date:   Mon Jun 11 21:25:42 2007 -0400
     Delete fbBltmmx().
 
 commit e2a720c9a17dc860ee0a858c2b21fd71e86cdcd0
-Merge: 878cac71a 3f9adb18f
+Merge: 878cac71aa 3f9adb18f1
 Author: Eamon Walsh <ewalsh@tycho.nsa.gov>
 Date:   Mon Jun 11 15:29:11 2007 -0400
 
@@ -164156,7 +176011,7 @@ Date:   Tue May 29 14:54:27 2007 -0600
     Remove wscons keyboard handling stuff that doesn't belong there anymore.
 
 commit 60de6c7ef9bdcee043f63e8e0d493e6feba6a9d0
-Merge: 3a6549a16 2f13b7c11
+Merge: 3a6549a163 2f13b7c113
 Author: Matthieu Herrb <matthieu@deville.herrb.com>
 Date:   Tue May 29 12:14:49 2007 -0600
 
@@ -164329,7 +176184,7 @@ Date:   Wed May 23 12:56:04 2007 -0400
     Add missing offsets for window coordinates - reported by Colin Harrison
 
 commit 2a4aa63a23ddd816b647b851a01865861827a7eb
-Merge: 9cee4ec5e cc648e609
+Merge: 9cee4ec5e6 cc648e609d
 Author: Eamon Walsh <ewalsh@tycho.nsa.gov>
 Date:   Tue May 22 14:50:26 2007 -0400
 
@@ -164880,7 +176735,7 @@ Date:   Mon Apr 30 10:33:12 2007 -0600
     fix __glXErrorCallBack() proto
 
 commit 6b33459bf5aac23c3ecc7002d091c02f327d907a
-Merge: 18252a515 3c91a993e
+Merge: 18252a515d 3c91a993e8
 Author: Brian <brian@yutani.localnet.net>
 Date:   Mon Apr 30 10:26:19 2007 -0600
 
@@ -165068,7 +176923,7 @@ Date:   Fri Apr 27 08:13:08 2007 -0400
     are both 0.
 
 commit f28eea0647f007c2e2415ecc6fceef46201faad4
-Merge: 339b73e71 ae04f2cb0
+Merge: 339b73e710 ae04f2cb0a
 Author: Peter Hutterer <peter@cs.unisa.edu.au>
 Date:   Fri Apr 27 16:34:36 2007 +0930
 
@@ -165599,7 +177454,7 @@ Date:   Tue Apr 17 13:46:55 2007 -0400
     security: remove debugging code.
 
 commit 1f06d32ef58749d0f0c062193d237ee98f60e90f
-Merge: cf962a849 fc162c6cf
+Merge: cf962a849d fc162c6cfa
 Author: Eamon Walsh <ewalsh@tycho.nsa.gov>
 Date:   Tue Apr 17 12:10:22 2007 -0400
 
@@ -165770,7 +177625,7 @@ Date:   Thu Apr 12 11:16:19 2007 +0930
     This workaround is obsolete with 33a5d9605e3e282f6aa1921d7321a2a12ef02c42
 
 commit d4dad6f84f82a4ade5005c3aa93511c1295875b8
-Merge: f1f8b562a 33a5d9605
+Merge: f1f8b562aa 33a5d9605e
 Author: Peter Hutterer <peter@cs.unisa.edu.au>
 Date:   Thu Apr 12 11:11:03 2007 +0930
 
@@ -166024,7 +177879,7 @@ Date:   Fri Apr 6 13:38:12 2007 +0300
     GLcore: fix after moving xf86glx_util.[hc] to Mesa.
 
 commit cf962a849db2b259ca558c6265ea7e3328a4d312
-Merge: 5ad562565 5a804f2e9
+Merge: 5ad562565a 5a804f2e97
 Author: Eamon Walsh <ewalsh@tycho.nsa.gov>
 Date:   Thu Apr 5 14:41:39 2007 -0400
 
@@ -166170,7 +178025,7 @@ Date:   Tue Apr 3 09:27:57 2007 -0600
     about setting the XFree86Server symbol.
 
 commit 1cc8db72816cd079f30255046e10043c350bf683
-Merge: 645d87cf8 a39f297ad
+Merge: 645d87cf8e a39f297ada
 Author: Matthieu Herrb <matthieu@roadrock.(none)>
 Date:   Tue Apr 3 16:04:45 2007 +0200
 
@@ -166189,7 +178044,7 @@ Date:   Tue Apr 3 19:02:14 2007 +0930
     Delete all grabs from all devices when deleting a window.
 
 commit 5f382c9c7fbda6eccf8e76c28a90b55ff2f0aef3
-Merge: 9b0b34066 f09ee168e
+Merge: 9b0b340668 f09ee168e2
 Author: Peter Hutterer <peter@cs.unisa.edu.au>
 Date:   Tue Apr 3 15:07:18 2007 +0930
 
@@ -166309,7 +178164,7 @@ Date:   Mon Apr 2 12:26:27 2007 -0600
     formatting fixes
 
 commit e8777a91f37d828b9df839bf3d9cf2f954bdddb0
-Merge: a12054757 96ce17aa9
+Merge: a12054757d 96ce17aa94
 Author: Peter Hutterer <peter@cs.unisa.edu.au>
 Date:   Mon Apr 2 15:36:26 2007 +0930
 
@@ -166374,7 +178229,7 @@ Date:   Fri Mar 30 16:05:46 2007 -0600
     values of 1280 (my screen width).
 
 commit e9130b8bac73a0843d5ff6b2216eccfb3e094a48
-Merge: 2c6d47108 92e8cdbd3
+Merge: 2c6d471088 92e8cdbd32
 Author: Ian Romanick <idr@us.ibm.com>
 Date:   Fri Mar 30 13:39:15 2007 -0700
 
@@ -166511,7 +178366,7 @@ Date:   Wed Mar 28 12:57:11 2007 -0400
     xace: provide creation-time resource hook call in CreateWindow().
 
 commit 99b220969f2f8ba829bc8294b27ca90fd9311be4
-Merge: 728ad64d9 82a8b99a6
+Merge: 728ad64d97 82a8b99a6c
 Author: Eamon Walsh <ewalsh@tycho.nsa.gov>
 Date:   Wed Mar 28 12:54:04 2007 -0400
 
@@ -166524,7 +178379,7 @@ Date:   Wed Mar 28 12:03:19 2007 -0400
     Refuse to create tiny modes from EDID detailed timing.
 
 commit 2c6d47108880584f1221ff86c6c8947627f9f607
-Merge: c4fe1bcce 852204463
+Merge: c4fe1bcce1 8522044635
 Author: Ian Romanick <idr@us.ibm.com>
 Date:   Wed Mar 28 08:08:04 2007 -0700
 
@@ -166594,7 +178449,7 @@ Date:   Mon Mar 26 16:04:50 2007 -0700
     Fix indentation of fakexa help text.
 
 commit 728ad64d979fd9e5cca28e8c15118c18d707c431
-Merge: 0331c6a8f 6a0bed16e
+Merge: 0331c6a8fc 6a0bed16e8
 Author: Eamon Walsh <ewalsh@tycho.nsa.gov>
 Date:   Tue Mar 27 13:16:40 2007 -0400
 
@@ -166631,7 +178486,7 @@ Date:   Mon Mar 26 12:44:58 2007 -0700
     Update xorg.conf manpage for new RandR 1.2 monitor options.
 
 commit 0331c6a8fcba1dc27ef45aaf5f694799d0085413
-Merge: 84a066cc8 f7c5aa0dc
+Merge: 84a066cc88 f7c5aa0dc0
 Author: Eamon Walsh <ewalsh@tycho.nsa.gov>
 Date:   Mon Mar 26 10:28:05 2007 -0400
 
@@ -166996,7 +178851,7 @@ Date:   Mon Mar 19 16:11:01 2007 +1030
             by the evdev driver).
 
 commit 015d728bcde5b16a72a976579755421e3023626b
-Merge: 65b0eb60b b167583fe
+Merge: 65b0eb60b0 b167583fe2
 Author: Peter Hutterer <peter@cs.unisa.edu.au>
 Date:   Mon Mar 19 09:42:56 2007 +1030
 
@@ -167303,7 +179158,7 @@ Date:   Wed Mar 7 09:57:02 2007 -0500
     devPrivates rework: move reset functions into a single call.
 
 commit bb111291d854b4329e47367ce3c67e8a2785e6e9
-Merge: 74175e0af e9bfb2b3d
+Merge: 74175e0af7 e9bfb2b3d7
 Author: Eamon Walsh <ewalsh@tycho.nsa.gov>
 Date:   Wed Mar 7 09:03:46 2007 -0500
 
@@ -167375,7 +179230,7 @@ Date:   Tue Mar 6 11:09:30 2007 -0800
     updated todo list
 
 commit 81d581e655fc989da3be4256b83849a63b8607b7
-Merge: a05ffca8d d5aba03fe
+Merge: a05ffca8dd d5aba03fef
 Author: Ben Byer <bbyer@bbyer.(none)>
 Date:   Tue Mar 6 10:37:29 2007 -0800
 
@@ -167406,7 +179261,7 @@ Date:   Tue Mar 6 02:31:59 2007 -0800
     moved new event-handling code from X11Application.m to darwinEvents.c in preparation for making all Darwin servers use it
 
 commit 0ccd1443fd6db397b42e5b99ce733ce1316c785e
-Merge: ec1ef8a56 9b6bb06f1
+Merge: ec1ef8a56d 9b6bb06f13
 Author: Ben Byer <bbyer@bbyer.(none)>
 Date:   Tue Mar 6 01:04:50 2007 -0800
 
@@ -167481,7 +179336,7 @@ Date:   Mon Mar 5 12:34:37 2007 -0500
     devPrivates rework: remove some debugging code from dixFreePrivates.
 
 commit 23fc429aad5b2721911862617772c314e1036bb0
-Merge: e68482470 fe7b8f423
+Merge: e684824709 fe7b8f4237
 Author: Eamon Walsh <ewalsh@tycho.nsa.gov>
 Date:   Mon Mar 5 12:18:54 2007 -0500
 
@@ -167527,7 +179382,7 @@ Date:   Mon Feb 26 09:40:00 2007 +1100
     modes: add commit/prepare hooks
 
 commit 1f0075786fedde538a95e2f39681052e25021d88
-Merge: 57aa5e908 12175b668
+Merge: 57aa5e908d 12175b668a
 Author: Peter Hutterer <peter@cs.unisa.edu.au>
 Date:   Mon Mar 5 12:37:17 2007 +1030
 
@@ -167728,7 +179583,7 @@ Date:   Wed Feb 28 15:43:06 2007 +1030
     between coordinates stored in device and coordinates sent by the event.
 
 commit d9bcb22d199e8444b9762a35754e04d327dd5915
-Merge: 272d9341d c16343ac2
+Merge: 272d9341d0 c16343ac2c
 Author: Ben Byer <bbyer@bbyer.apple.com>
 Date:   Tue Feb 27 16:28:20 2007 -0800
 
@@ -168153,14 +180008,14 @@ Date:   Thu Feb 15 17:07:42 2007 +0200
     http://xorg.freedesktop.org/wiki/XDC2007Notes#head-2719037a1905516c45cf74f0e155c8703221e446
 
 commit f452507ca9209598401d15da0039aaa4e1fed1a3
-Merge: 04632835b 811675733
+Merge: 04632835b7 811675733e
 Author: Eamon Walsh <ewalsh@tycho.nsa.gov>
 Date:   Thu Feb 15 09:47:20 2007 -0500
 
     Merge branch 'master' into my-XACE-SELINUX
 
 commit 04632835b7402456fdcf6c8fa01970cd2804e27c
-Merge: 88f89b9ac 9ecf79ca0
+Merge: 88f89b9ac1 9ecf79ca01
 Author: Eamon Walsh <ewalsh@tycho.nsa.gov>
 Date:   Thu Feb 15 09:27:05 2007 -0500
 
@@ -168208,7 +180063,7 @@ Date:   Wed Feb 14 17:09:33 2007 +1030
     fix: WarpCursor needs to send MotionNotify.
 
 commit c4fe1bcce1c1e4822e688959b331b47a051d6e0a
-Merge: e540d572c d570ff7c8
+Merge: e540d572c5 d570ff7c81
 Author: Ian Romanick <idr@us.ibm.com>
 Date:   Wed Feb 14 15:39:52 2007 -0800
 
@@ -168272,7 +180127,7 @@ Date:   Mon Feb 12 17:18:29 2007 -0500
     Remove spurious LIBADD from xf4bpp
 
 commit 16eb7254f861465f988ae3861ac3449c2c966062
-Merge: 3814862a8 c4b7e9d1c
+Merge: 3814862a86 c4b7e9d1c1
 Author: Ian Romanick <idr@us.ibm.com>
 Date:   Fri Feb 9 12:38:49 2007 -0800
 
@@ -168451,7 +180306,7 @@ Date:   Mon Jan 29 17:30:59 2007 -0800
     Typical results were failure to sync, and a black screen.
 
 commit 3814862a869ee83d307eb01225d5949039f435d8
-Merge: a216de9b7 31f2d4a57
+Merge: a216de9b7f 31f2d4a57e
 Author: Ian Romanick <idr@us.ibm.com>
 Date:   Mon Jan 29 15:14:31 2007 -0800
 
@@ -168492,7 +180347,7 @@ Date:   Mon Jan 29 16:10:03 2007 +1030
     mi:     Fix cursor rendering issues.
 
 commit 15a81b6325d359990017b8e9f17ce18a7eff1354
-Merge: 3759254c0 cc3d66d4a
+Merge: 3759254c09 cc3d66d4a5
 Author: Peter Hutterer <peter@cs.unisa.edu.au>
 Date:   Sun Jan 28 17:18:57 2007 +1030
 
@@ -168505,7 +180360,7 @@ Date:   Wed Nov 15 17:50:02 2006 +1030
     o fix minor error in comment for GetPointerEvents()
 
 commit 3759254c0967ae83bdcbf097d9e8a58733c8e6f9
-Merge: ba547d4f6 ca5ebe397
+Merge: ba547d4f6a ca5ebe3971
 Author: Peter Hutterer <peter@cs.unisa.edu.au>
 Date:   Sun Jan 28 17:05:55 2007 +1030
 
@@ -168524,7 +180379,7 @@ Date:   Fri Jan 26 13:00:45 2007 +0100
     Xorg #9692
 
 commit a216de9b7ff55e2b73c487d037f248f00bd2e63b
-Merge: 24506ea65 cf7ca9d09
+Merge: 24506ea65b cf7ca9d09c
 Author: Ian Romanick <idr@us.ibm.com>
 Date:   Thu Jan 25 10:17:32 2007 -0800
 
@@ -168559,7 +180414,7 @@ Date:   Wed Jan 24 15:33:49 2007 -0800
     read_legcay_BIOS, and delete all remnants of it from all other places.
 
 commit fdb3a0798f0d17e72ec7293d59a7a81b5ffdf95b
-Merge: 39b51e1bf a53586eeb
+Merge: 39b51e1bfc a53586eebc
 Author: Ian Romanick <idr@us.ibm.com>
 Date:   Wed Jan 24 14:49:39 2007 -0800
 
@@ -168587,7 +180442,7 @@ Date:   Thu Jan 25 00:29:20 2007 +0800
     Make Xinearama screen information reflect CRTC rotation.
 
 commit 39b51e1bfc4924fc3bda4342ef9c6c0125d9f4fa
-Merge: 637b19b3e 788cfce91
+Merge: 637b19b3ee 788cfce911
 Author: Ian Romanick <idr@us.ibm.com>
 Date:   Tue Jan 23 13:25:56 2007 -0800
 
@@ -168629,7 +180484,7 @@ Date:   Mon Jan 22 09:13:59 2007 -0800
     ARCH_PCI_OS_INIT mechanism useless.  Remove it.
 
 commit 7dfb3cea913b02a6b36c308d1330bd40abe6b41f
-Merge: c279d5fdc 2dc866252
+Merge: c279d5fdc5 2dc866252c
 Author: Ian Romanick <idr@us.ibm.com>
 Date:   Mon Jan 22 08:44:36 2007 -0800
 
@@ -168667,7 +180522,7 @@ Date:   Fri Jan 19 14:52:23 2007 -0800
         -ardelay and -arinterval, respectively.
 
 commit c279d5fdc53612a90f33fafe9e9c59ced008dd51
-Merge: 88f248e67 14d6a9b32
+Merge: 88f248e671 14d6a9b327
 Author: Ian Romanick <idr@us.ibm.com>
 Date:   Fri Jan 19 12:59:54 2007 -0800
 
@@ -168960,7 +180815,7 @@ Date:   Tue Jan 9 16:34:40 2007 -0800
     Track rename of DamagePost -> DamageAdd.
 
 commit da09964a931cc64d05ab571bf545fdad35a6d395
-Merge: e1f73d220 e3aa6ad20
+Merge: e1f73d2208 e3aa6ad201
 Author: Ian Romanick <idr@us.ibm.com>
 Date:   Tue Jan 9 15:27:34 2007 -0800
 
@@ -169045,7 +180900,7 @@ Date:   Thu Jan 4 15:37:33 2007 -0800
     Incorporate new byte-order related configure changes.
 
 commit 8dd5771a1b91c331860b667fb18e484452000aad
-Merge: 45aa26ccb 7d2ec9217
+Merge: 45aa26ccb4 7d2ec92170
 Author: Ian Romanick <idr@us.ibm.com>
 Date:   Thu Jan 4 15:01:38 2007 -0800
 
@@ -169211,7 +181066,7 @@ Date:   Thu Dec 28 13:15:11 2006 -0800
     Export exaMove{In,Out}Pixmap().
 
 commit 683ca3f7afaf15fd3ca7918f6175b5a9e4a6f05b
-Merge: 05f915050 9563b2eea
+Merge: 05f915050c 9563b2eea2
 Author: Eric Anholt <eric@anholt.net>
 Date:   Wed Dec 27 16:11:31 2006 -0800
 
@@ -169252,7 +181107,7 @@ Date:   Sat Dec 9 22:51:59 2006 +0200
     Make sure we're not copying sym_interpret across from an empty source.
 
 commit 43a4376bd72ef1b6486cddb60ad57b2d6169292a
-Merge: 4b1c9ac3d d9e079d2a
+Merge: 4b1c9ac3d1 d9e079d2a3
 Author: Eamon Walsh <ewalsh@tycho.nsa.gov>
 Date:   Fri Dec 22 13:53:55 2006 -0500
 
@@ -169314,7 +181169,7 @@ Date:   Tue Dec 19 16:38:34 2006 -0800
     xorg.conf man page should say "XFree86-DGA", not "Xorg-DGA"
 
 commit a81dbaae0597492f0245080c6f5af7158e05e2d0
-Merge: fb6d676de d442998e3
+Merge: fb6d676de5 d442998e39
 Author: Eamon Walsh <ewalsh@tycho.nsa.gov>
 Date:   Tue Dec 19 16:11:19 2006 -0500
 
@@ -169354,7 +181209,7 @@ Date:   Tue Dec 19 18:45:25 2006 +0100
     This affects drivers with no UploadToScreen or UploadToScreen failures.
 
 commit 4334860e69e7d5b156082bd05c7a86708e5bad4c
-Merge: 7e4717683 fdcc22ca1
+Merge: 7e4717683d fdcc22ca17
 Author: Michel Dänzer <michel@tungstengraphics.com>
 Date:   Tue Dec 19 16:29:26 2006 +0100
 
@@ -169389,14 +181244,14 @@ Date:   Tue Dec 19 15:24:19 2006 +0100
     See https://bugs.freedesktop.org/show_bug.cgi?id=6772 .
 
 commit ca5ebe3971d8ebcfed00c5ebcd026cdd0ce0c6ba
-Merge: 4d07b5037 1b029fd89
+Merge: 4d07b50372 1b029fd896
 Author: Peter Hutterer <peter@cs.unisa.edu.au>
 Date:   Tue Dec 19 10:51:01 2006 +1030
 
     Merge branch 'master' of git://anongit.freedesktop.org/git/xorg/xserver
 
 commit 2d0a63126b3d3a17005b7e122617ee0c5f44a55b
-Merge: d8b5394ed 1b029fd89
+Merge: d8b5394eda 1b029fd896
 Author: Peter Hutterer <peter@cs.unisa.edu.au>
 Date:   Tue Dec 19 10:31:40 2006 +1030
 
@@ -169623,7 +181478,7 @@ Date:   Tue Dec 12 15:59:08 2006 -0500
     Split AssignClientState() into two routines, new routine is server-specific.
 
 commit 62e7722ebd8d341a23eb56cb330eeb00e6a975a6
-Merge: e12480699 f3c60900e
+Merge: e124806994 f3c60900e5
 Author: Eamon Walsh <ewalsh@tycho.nsa.gov>
 Date:   Tue Dec 12 13:54:33 2006 -0500
 
@@ -169727,7 +181582,7 @@ Date:   Sun Dec 10 11:24:05 2006 -0500
     Accept EDID > 1.3 but < 2.0 if we find it, assume it's compatible.
 
 commit e1f73d220873fa091695e46b7fcd008663a95a6f
-Merge: 27d682fa0 d56249a15
+Merge: 27d682fa03 d56249a15e
 Author: Ian Romanick <idr@us.ibm.com>
 Date:   Fri Dec 8 17:24:15 2006 -0800
 
@@ -169747,7 +181602,7 @@ Date:   Fri Dec 8 17:24:15 2006 -0800
             hw/xfree86/utils/scanpci/Makefile.am
 
 commit d56249a15ead51ad4d2117d5538ada24af05b693
-Merge: f1f8df188 ec84f72d0
+Merge: f1f8df1889 ec84f72d07
 Author: Jeremy C. Reed <reed@glacier.reedmedia.net>
 Date:   Fri Dec 8 15:52:37 2006 -0600
 
@@ -169909,7 +181764,7 @@ Date:   Tue Dec 5 18:50:19 2006 +1030
     Ironing some glitches caused by the merge
 
 commit 3c8f166022a2d19af14eb670fa382503ba1451cd
-Merge: 2a511492f f9f7d7f3b
+Merge: 2a511492f9 f9f7d7f3be
 Author: Peter Hutterer <peter@cs.unisa.edu.au>
 Date:   Tue Dec 5 18:28:33 2006 +1030
 
@@ -169990,7 +181845,7 @@ Date:   Fri Dec 1 15:56:52 2006 +1030
             DeliverDeviceEvents() caters for MPX devices.
 
 commit ccd804c6c01cdfffe938fa5336be9b5668a6f0c0
-Merge: 9423ac134 82912ad77
+Merge: 9423ac134a 82912ad770
 Author: Drew Parsons <drew@pug.localdomain>
 Date:   Fri Dec 1 15:21:57 2006 +1100
 
@@ -170029,7 +181884,7 @@ Date:   Wed Nov 29 22:19:57 2006 -0500
     Add required root window context to config file.
 
 commit 143558500a89a5c887c75c03798bae68c953cac9
-Merge: e3d3d29db ee9bdd3f4
+Merge: e3d3d29db5 ee9bdd3f4a
 Author: Eamon Walsh <ewalsh@tycho.nsa.gov>
 Date:   Wed Nov 29 20:41:41 2006 -0500
 
@@ -170163,7 +182018,7 @@ Date:   Mon Nov 27 16:21:31 2006 -0800
     Move mode handling helpers from ddcProperty.c to xf86Mode.c.
 
 commit b4b0d901d98371a8aa7b17d195e18e83e2a6a618
-Merge: 64de3baf8 d6cd0313c
+Merge: 64de3baf85 d6cd0313c7
 Author: Eric Anholt <eric@anholt.net>
 Date:   Mon Nov 27 15:43:15 2006 -0800
 
@@ -170382,7 +182237,7 @@ Date:   Mon Nov 20 13:10:07 2006 +1030
             bugfix in mipointer, semicolon after preprocessor statement
 
 commit ca2874b273232d9f51881b1cd754ed6847bfaf47
-Merge: c9a5f9d39 e2f6dacc7
+Merge: c9a5f9d391 e2f6dacc73
 Author: Alan Hourihane <alanh@fairlite.demon.co.uk>
 Date:   Sat Nov 18 19:56:32 2006 +0000
 
@@ -170555,7 +182410,7 @@ Date:   Tue Nov 14 15:33:07 2006 +0100
     Bug #9023: Only check mice for "mouse" or "void" if identifier is != NULL.
 
 commit a724b7f1302ba7a59f140b521f13d2ddf0fcf9bf
-Merge: 6facd958c f80a8ae6e
+Merge: 6facd958c2 f80a8ae6e6
 Author: Jeremy C. Reed <reed@glacier.reedmedia.net>
 Date:   Mon Nov 13 20:32:26 2006 -0600
 
@@ -170879,7 +182734,7 @@ Date:   Tue Nov 7 15:48:05 2006 -0800
     A couple more cases of error message before freeing strings.
 
 commit 05f1c302460a14c8fa9a943a12d69adcd3c30d58
-Merge: 3e7e0e350 46af6d1e9
+Merge: 3e7e0e3509 46af6d1e95
 Author: Adam Jackson <ajax@benzedrine.nwnk.net>
 Date:   Tue Nov 7 18:42:54 2006 -0500
 
@@ -170925,7 +182780,7 @@ Date:   Tue Nov 7 01:29:51 2006 -0800
     getevents.c
 
 commit c20d3bf7533da0bf26beaf7d8c359d18edbd70e8
-Merge: 028bbdc04 3d39c02fe
+Merge: 028bbdc041 3d39c02fe6
 Author: Keith Packard <keithp@neko.keithp.com>
 Date:   Tue Nov 7 01:21:28 2006 -0800
 
@@ -170964,14 +182819,14 @@ Date:   Mon Nov 6 00:30:09 2006 +0100
     Fix typo in Xvesa: incorrect reporting of DAC capabilities.
 
 commit 028bbdc0417173803695808ba9f48498519273a3
-Merge: 50504c68e 8deaaa312
+Merge: 50504c68e1 8deaaa312a
 Author: Keith Packard <keithp@neko.keithp.com>
 Date:   Sat Nov 4 17:46:26 2006 -0800
 
     Merge master back to randr-1.2
 
 commit 50504c68e1d407232cf83465981b235e542ef31f
-Merge: 8b87ce197 cde8806c2
+Merge: 8b87ce1974 cde8806c29
 Author: Keith Packard <keithp@neko.keithp.com>
 Date:   Sat Nov 4 17:43:19 2006 -0800
 
@@ -171051,7 +182906,7 @@ Date:   Fri Oct 27 12:36:56 2006 -0700
     and 1024x768@75 modes.
 
 commit 22ee2e4e1f1d9fd9ca9f25c9bf25370034b771d4
-Merge: 49a26681b bd0c82965
+Merge: 49a26681b2 bd0c829654
 Author: Alan Coopersmith <alan.coopersmith@sun.com>
 Date:   Fri Nov 3 12:54:56 2006 -0800
 
@@ -171164,7 +183019,7 @@ Date:   Thu Nov 2 12:25:03 2006 +0100
     Build with -D_PC on ix86 only.
 
 commit 543b397277d1f03b8091e44812010abcd5d80102
-Merge: 4056e6e79 645d05762
+Merge: 4056e6e79a 645d057620
 Author: Keith Packard <keithp@neko.keithp.com>
 Date:   Thu Nov 2 19:00:35 2006 -0800
 
@@ -171235,14 +183090,14 @@ Date:   Thu Nov 2 03:22:09 2006 +0200
     bump to 1.2.99.0
 
 commit 18c246a13b887b865de6a17e6cd1c259b9bc383d
-Merge: 794f2e729 4843d823f
+Merge: 794f2e7291 4843d823f4
 Author: Daniel Stone <daniel@fooishbar.org>
 Date:   Thu Nov 2 03:21:37 2006 +0200
 
     Merge branch 'input-hotplug'
 
 commit 4843d823f4d38d8bd468ce3a8feddbff229ed416
-Merge: ba9f5138f a7b944f0d
+Merge: ba9f5138fc a7b944f0d9
 Author: Daniel Stone <daniel@fooishbar.org>
 Date:   Thu Nov 2 03:18:13 2006 +0200
 
@@ -171258,7 +183113,7 @@ Date:   Thu Nov 2 03:16:10 2006 +0200
     config file.
 
 commit be291a6d9764cf29a7d9a8114d47d9f41ce856e9
-Merge: a2d624210 6fdfd9dad
+Merge: a2d6242106 6fdfd9dad9
 Author: Daniel Stone <daniel@fooishbar.org>
 Date:   Thu Nov 2 03:15:25 2006 +0200
 
@@ -171375,7 +183230,7 @@ Date:   Sun Oct 29 17:49:46 2006 +0100
     kill GNU-make'ism.
 
 commit 0107320fac0913aae2cb169992e31c670b4bd2f7
-Merge: 06b6b971d a34446f5b
+Merge: 06b6b971d0 a34446f5b3
 Author: Thomas Hellstrom <thomas-at-tungstengraphics-dot-com>
 Date:   Sun Oct 29 15:23:35 2006 +0100
 
@@ -171446,7 +183301,7 @@ Date:   Fri Oct 27 18:26:30 2006 +0200
     Import libdrm functions for the drm memory manager.
 
 commit e3d3d29db5eef057b4e8294377c9c3147436bc2f
-Merge: 92387e99d 004d00e66
+Merge: 92387e99d0 004d00e668
 Author: Eamon Walsh <ewalsh@tycho.nsa.gov>
 Date:   Thu Oct 26 20:21:16 2006 -0400
 
@@ -171497,7 +183352,7 @@ Date:   Thu Oct 26 20:38:58 2006 +0300
     lnx_ia64.c.
 
 commit 8c0556e7cb1de8c387ddd886a03a8f8afff1fd0e
-Merge: cdc8a4b7b 004d00e66
+Merge: cdc8a4b7b2 004d00e668
 Author: Daniel Stone <daniel@fooishbar.org>
 Date:   Thu Oct 26 15:21:22 2006 +0300
 
@@ -171515,7 +183370,7 @@ Date:   Thu Oct 26 01:10:08 2006 +0300
     The fallthrough to gettimeofday() is preserved.
 
 commit cdc8a4b7b2f099b8860a54c5c9f488e6f7c4913a
-Merge: 3da918a16 d28583329
+Merge: 3da918a16c d285833290
 Author: Daniel Stone <daniel@fooishbar.org>
 Date:   Thu Oct 26 00:28:30 2006 +0300
 
@@ -171556,14 +183411,14 @@ Date:   Wed Oct 25 11:39:27 2006 +0200
     without pretending it's always on.
 
 commit 59511974db843fa7e11133894cfc10c20fdaf60f
-Merge: 054f8cd26 598ac7a83
+Merge: 054f8cd267 598ac7a836
 Author: Keith Packard <keithp@neko.keithp.com>
 Date:   Tue Oct 24 17:26:20 2006 -0700
 
     Merge branch 'master' into randr-1.2
 
 commit 598ac7a83698327b607084abaebcbd22f8d25fbb
-Merge: 828c34e83 948a97b97
+Merge: 828c34e83c 948a97b97e
 Author: Keith Packard <keithp@neko.keithp.com>
 Date:   Tue Oct 24 17:23:12 2006 -0700
 
@@ -171662,7 +183517,7 @@ Date:   Tue Oct 24 09:04:14 2006 -0700
     Fix from HEAD accidentally reverted during merge.
 
 commit 8b909135664abb69ada522e8e39495d9eca717ac
-Merge: 21291d6ca 948a97b97
+Merge: 21291d6ca7 948a97b97e
 Author: Ian Romanick <idr@us.ibm.com>
 Date:   Tue Oct 24 08:57:59 2006 -0700
 
@@ -171719,7 +183574,7 @@ Date:   Mon Oct 23 05:12:15 2006 +0300
     Remove unused xf86CheckButton.
 
 commit c5b5b046e86b159a9d32451308f38246cc4587f7
-Merge: fab1d37ec 948a97b97
+Merge: fab1d37ecb 948a97b97e
 Author: Daniel Stone <daniel@fooishbar.org>
 Date:   Mon Oct 23 02:58:30 2006 +0300
 
@@ -171905,7 +183760,7 @@ Date:   Sat Oct 21 22:06:43 2006 +1000
     Minor typos in Xserver man page.
 
 commit e26a494f417c3c700636ee68892c3015b2e0f27a
-Merge: 736b0d507 aeba855b0
+Merge: 736b0d5078 aeba855b07
 Author: Zephaniah E. Hull <warp@agamemnon.b5>
 Date:   Sat Oct 21 04:26:14 2006 -0400
 
@@ -172219,7 +184074,7 @@ Date:   Fri Oct 13 17:34:53 2006 -0700
     Separate configuration from layout changes to send correct events.
 
 commit 335b503c5e7041bb0c44611e496d1c46f554e630
-Merge: bd3d93be8 cf948b7b0
+Merge: bd3d93be82 cf948b7b04
 Author: Daniel Stone <daniel@fooishbar.org>
 Date:   Fri Oct 13 18:10:45 2006 +0300
 
@@ -172233,7 +184088,7 @@ Date:   Fri Oct 13 14:48:10 2006 +0100
     to avoid cursor movements signalling io.
 
 commit 4b53a5e4b147ab748b28dffc1d330b7148d8efa6
-Merge: 23f6f08b7 042d4a407
+Merge: 23f6f08b7b 042d4a407d
 Author: Eamon Walsh <ewalsh@tycho.nsa.gov>
 Date:   Wed Oct 11 20:50:31 2006 -0400
 
@@ -172447,7 +184302,7 @@ Date:   Sat Oct 7 14:16:51 2006 +0300
     layer.
 
 commit 4c342246300e06bdf5c9c62cc1d2f6aa57a524db
-Merge: 8382234a7 49a70c857
+Merge: 8382234a7f 49a70c8570
 Author: Alan Coopersmith <alan.coopersmith@sun.com>
 Date:   Fri Oct 6 18:01:13 2006 -0700
 
@@ -172500,14 +184355,14 @@ Date:   Thu Oct 5 16:07:26 2006 -0400
     Improve error handling, messages during initialization.
 
 commit de63a469dcd0a8ae98554bca540ac0106cccf2a5
-Merge: 9c7440bdf 8382234a7
+Merge: 9c7440bdf5 8382234a7f
 Author: Daniel Stone <daniel@fooishbar.org>
 Date:   Thu Oct 5 20:29:19 2006 +0300
 
     Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug
 
 commit b4659faf9b455b44ac8e691cc7a8fc00a967c80b
-Merge: c4f30c635 8382234a7
+Merge: c4f30c6353 8382234a7f
 Author: Keith Packard <keithp@neko.keithp.com>
 Date:   Wed Oct 4 14:46:04 2006 -0700
 
@@ -172543,7 +184398,7 @@ Date:   Tue Oct 3 17:48:50 2006 -0700
     Don't insert RCS tag into generated pci id header files
 
 commit 75e0cc41b201b9ceb2615e7cec0dd5b4c136b343
-Merge: 6926776f0 20c0ceedf
+Merge: 6926776f0e 20c0ceedfb
 Author: Eamon Walsh <ewalsh@tycho.nsa.gov>
 Date:   Tue Oct 3 13:58:03 2006 -0400
 
@@ -172577,7 +184432,7 @@ Date:   Mon Oct 2 02:17:14 2006 +0300
     Use XkbCharToInt as that's what we're doing.
 
 commit 3c98cebb6e954855528794fec46830f456cbdec1
-Merge: fa1ac9417 2cf109843
+Merge: fa1ac94178 2cf1098436
 Author: Daniel Stone <daniel@fooishbar.org>
 Date:   Mon Oct 2 02:18:17 2006 +0300
 
@@ -172605,21 +184460,21 @@ Date:   Sat Sep 30 17:05:46 2006 +0300
     if built with --enable-debug.
 
 commit 20c0ceedfbce9ae5c70703900b52973917ac4cd0
-Merge: 49a70c857 84eb2c0a0
+Merge: 49a70c8570 84eb2c0a06
 Author: Eamon Walsh <ewalsh@tycho.nsa.gov>
 Date:   Fri Sep 29 15:37:00 2006 -0400
 
     Merge branch 'master' into my-XACE-modular
 
 commit 518db35ca3f569e7cb95dbddeddb93f3691de498
-Merge: 5d99e05f0 84eb2c0a0
+Merge: 5d99e05f05 84eb2c0a06
 Author: Daniel Stone <daniel@fooishbar.org>
 Date:   Fri Sep 29 00:35:21 2006 +0300
 
     Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug
 
 commit 5d99e05f05a42a82a9f02844df9bfebaa673759d
-Merge: ad631afcf 589337578
+Merge: ad631afcf3 5893375786
 Author: Daniel Stone <daniel@fooishbar.org>
 Date:   Fri Sep 29 00:35:07 2006 +0300
 
@@ -172643,7 +184498,7 @@ Date:   Thu Sep 28 15:09:40 2006 -0600
     Patch by Dan Nicholson.
 
 commit 4bc5dc2854e33bf343cdea44a3c3b4c41f6f4145
-Merge: cf6e9687f f9542e749
+Merge: cf6e9687ff f9542e7495
 Author: Aaron Plattner <aplattner@nvidia.com>
 Date:   Thu Sep 28 13:27:13 2006 -0700
 
@@ -172683,7 +184538,7 @@ Date:   Wed Aug 30 19:12:17 2006 +0200
     Add wrapper for new ioctl to update drawable information in the DRM.
 
 commit ad321fad4b9ab3a2c70cfff37ca6c8faaa5cce9c
-Merge: 5e9d33fe8 f7c1d9424
+Merge: 5e9d33fe87 f7c1d94241
 Author: Daniel Stone <daniel@fooishbar.org>
 Date:   Sun Sep 24 17:56:43 2006 +0300
 
@@ -172887,14 +184742,14 @@ Date:   Sat Sep 16 03:49:11 2006 -0400
     Thanks, automake.
 
 commit 6926776f0ecd1e8e81c5c40ccd3a97227bc44dcb
-Merge: 6950267dd 49a70c857
+Merge: 6950267dd6 49a70c8570
 Author: Eamon Walsh <ewalsh@tycho.nsa.gov>
 Date:   Fri Sep 15 15:28:13 2006 -0400
 
     Merge branch 'my-XACE-modular' into my-XACE-SELINUX
 
 commit 49a70c8570b03aff8239324a2474918a6fbc52a0
-Merge: d1110c5c8 05231e336
+Merge: d1110c5c83 05231e336d
 Author: Eamon Walsh <ewalsh@tycho.nsa.gov>
 Date:   Fri Sep 15 15:26:57 2006 -0400
 
@@ -173122,7 +184977,7 @@ Date:   Sun Sep 10 11:13:18 2006 -0700
     so I think we can tolerate the extra #ifdef for the next release.
 
 commit 60db190ecfce52cbfa888c0af3210634f9186bed
-Merge: 5e9d33fe8 65256109b
+Merge: 5e9d33fe87 65256109bb
 Author: Zephaniah E. Hull <warp@agamemnon.b5>
 Date:   Sun Sep 10 03:49:17 2006 -0400
 
@@ -173147,7 +185002,7 @@ Date:   Fri Sep 8 15:31:18 2006 -0400
     Add SELinux extension configure-time support.
 
 commit fb34c02861ab3629c1c85c156e73b158518db7c7
-Merge: 9c503f09c d1110c5c8
+Merge: 9c503f09ce d1110c5c83
 Author: Eamon Walsh <ewalsh@tycho.nsa.gov>
 Date:   Fri Sep 8 15:30:12 2006 -0400
 
@@ -173215,7 +185070,7 @@ Date:   Thu Sep 7 15:35:16 2006 -0400
     DRI locking between 2D and 3D drivers around VT switch.
 
 commit 5e9d33fe87f9d24e55c468d4b2bb761c9efdb26a
-Merge: 629798c73 64479fffa
+Merge: 629798c73a 64479fffa2
 Author: Daniel Stone <daniel@fooishbar.org>
 Date:   Thu Sep 7 15:43:31 2006 +0300
 
@@ -173267,7 +185122,7 @@ Date:   Tue Sep 5 15:23:54 2006 -0700
     (unsigned long)(1 << 31) = bad news on x86_64.
 
 commit 0b81fccd2ee4e054e5cffb739de07460ff2c13f7
-Merge: 20c4ac6e0 c2813514c
+Merge: 20c4ac6e03 c2813514cf
 Author: Eamon Walsh <ewalsh@tycho.nsa.gov>
 Date:   Tue Sep 5 18:03:25 2006 -0400
 
@@ -173333,7 +185188,7 @@ Date:   Tue Aug 29 16:35:32 2006 -0700
     appear in the server's string.
 
 commit 1c8851ad491dd02d1c79e620b46384956838ed42
-Merge: d59b52fc0 5ddbf4bcd
+Merge: d59b52fc08 5ddbf4bcd4
 Author: Ian Romanick <idr@us.ibm.com>
 Date:   Tue Aug 29 16:34:04 2006 -0700
 
@@ -173369,7 +185224,7 @@ Date:   Tue Aug 29 23:49:26 2006 +0300
     Yeah.  That was dumb.
 
 commit 942b4369990a255257f66835caf8671432c405a3
-Merge: 77d315bd2 393dc0a33
+Merge: 77d315bd2f 393dc0a338
 Author: Ian Romanick <idr@us.ibm.com>
 Date:   Tue Aug 29 13:30:37 2006 -0700
 
@@ -173429,7 +185284,7 @@ Date:   Tue Aug 29 13:19:12 2006 +0300
     couple of range-related thinkos in level name copying.
 
 commit 7fa3383e3c8eea7d1eb0e556393f2431cf8e6ed2
-Merge: 8d77d44fd ebbdc1342
+Merge: 8d77d44fda ebbdc1342a
 Author: Daniel Stone <daniel@fooishbar.org>
 Date:   Tue Aug 29 15:16:01 2006 +0300
 
@@ -173442,14 +185297,14 @@ Date:   Mon Aug 28 18:17:32 2006 -0400
     Remove calls to LoaderCheckUnresolved(), since it's now a stub.
 
 commit 8d77d44fda3aacbae62864a3620e09095b79e92d
-Merge: d6f36bd28 2fde560bb
+Merge: d6f36bd280 2fde560bbb
 Author: Daniel Stone <daniel@fooishbar.org>
 Date:   Sun Aug 27 23:08:49 2006 +0300
 
     Merge branch 'origin' into input-hotplug
 
 commit 20c4ac6e038607ebbf6c04639670514c016d8597
-Merge: 13c6713c8 8d4f21ab5
+Merge: 13c6713c82 8d4f21ab53
 Author: Eamon Walsh <ewalsh@tycho.nsa.gov>
 Date:   Fri Aug 25 18:49:46 2006 -0400
 
@@ -173482,7 +185337,7 @@ Date:   Fri Aug 25 12:05:16 2006 -0700
     GL_NV_{vertex,fragment}_program, and related extensions can be enabled.
 
 commit 21291d6ca7188e5733ed0c93215ee0f1f0f90cc9
-Merge: 1a5561c4e cd2da4e41
+Merge: 1a5561c4ec cd2da4e41e
 Author: Ian Romanick <idr@umwelt.(none)>
 Date:   Fri Aug 25 09:34:21 2006 -0700
 
@@ -173497,7 +185352,7 @@ Date:   Fri Aug 25 12:43:17 2006 +0300
     best-effort attempt to keep configs working.
 
 commit 7c4167f0d6b33c9c602b04fcfd246fd3aeddd709
-Merge: 393f8347e cd2da4e41
+Merge: 393f8347ed cd2da4e41e
 Author: Daniel Stone <daniel@fooishbar.org>
 Date:   Fri Aug 25 11:15:33 2006 +0300
 
@@ -173539,7 +185394,7 @@ Date:   Thu Aug 24 17:58:52 2006 -0700
     Add some missing bits of GL_SGI_color_table.
 
 commit ae608b2071d882966e9c7ede71f846b1ecec0b23
-Merge: 2c865277f b879356ce
+Merge: 2c865277fe b879356ce9
 Author: Ian Romanick <idr@umwelt.(none)>
 Date:   Thu Aug 24 14:56:33 2006 -0700
 
@@ -173562,7 +185417,7 @@ Date:   Thu Aug 24 14:49:46 2006 -0700
     Regenerate from gl_API.xml 1.62.  Functions move, no real changes.
 
 commit 3a36b0a24aa9e9e238faa7f00100f59800f5142b
-Merge: db1ab1bdb b879356ce
+Merge: db1ab1bdb2 b879356ce9
 Author: Daniel Stone <daniel@fooishbar.org>
 Date:   Thu Aug 24 23:35:28 2006 +0300
 
@@ -173600,7 +185455,7 @@ Date:   Thu Aug 24 15:50:15 2006 -0400
     More #ifdef USE_DEPRECATED_KEYBOARD_DRIVER.
 
 commit 4ed311cf1c29090c53e474a3001c5702ff8409df
-Merge: 73e58adda b29b236d8
+Merge: 73e58adda9 b29b236d88
 Author: Matthias Hopf <mhopf@suse.de>
 Date:   Thu Aug 24 20:17:10 2006 +0200
 
@@ -173633,7 +185488,7 @@ Date:   Thu Aug 24 14:51:26 2006 +0300
     Fix horrendous thinko.  Indicators now work perfectly.
 
 commit 4adf9af313c9f63b6ad734e174efe1d36ddb5813
-Merge: 33af05d58 67bd672c8
+Merge: 33af05d58f 67bd672c88
 Author: Daniel Stone <daniel@fooishbar.org>
 Date:   Thu Aug 24 10:59:33 2006 +0300
 
@@ -173652,7 +185507,7 @@ Date:   Wed Aug 23 22:39:42 2006 +0000
     Add xorg.conf IgnoreABI option which does the same thing as -ignoreABI
 
 commit b983773d446cef6a0948ca264ed48126e404ae9a
-Merge: 0623d3643 d9a86566c
+Merge: 0623d3643f d9a86566c2
 Author: Ian Romanick <idr@umwelt.(none)>
 Date:   Wed Aug 23 17:16:50 2006 -0700
 
@@ -173774,14 +185629,14 @@ Date:   Wed Aug 23 14:33:41 2006 +0300
     the moment), and use that instead of nasty pointer assignments.
 
 commit 52ba722e4c89c052609b4fc62e965d92778aa2dd
-Merge: 9138d5a51 05541259b
+Merge: 9138d5a51e 05541259bd
 Author: Eamon Walsh <ewalsh@tycho.nsa.gov>
 Date:   Mon Aug 21 18:49:31 2006 -0400
 
     Merge branch 'XACE-modular' into my-XACE-modular
 
 commit 05541259bdb0dfaab015a01caa3722b7a1b782e2
-Merge: c2535f679 a1ac0440b
+Merge: c2535f6792 a1ac0440bb
 Author: Alan Coopersmith <alan.coopersmith@sun.com>
 Date:   Mon Aug 21 13:07:41 2006 -0700
 
@@ -173797,7 +185652,7 @@ Date:   Fri Aug 18 18:03:41 2006 +0300
     configure time.
 
 commit 0704bb298cc826cd117815898c6bc015a693c2c9
-Merge: c14036977 a1ac0440b
+Merge: c14036977f a1ac0440bb
 Author: Daniel Stone <daniel@fooishbar.org>
 Date:   Fri Aug 18 17:30:14 2006 +0300
 
@@ -173817,14 +185672,14 @@ Date:   Fri Aug 18 17:24:34 2006 +0300
     input.h: add InitCoreDevices prototype
 
 commit 1c2cb30cd88ba4453f9da339025f8ff39f7f5412
-Merge: 633b6a69f 70ddd0f39
+Merge: 633b6a69f5 70ddd0f39d
 Author: Daniel Stone <daniel@fooishbar.org>
 Date:   Fri Aug 18 17:05:50 2006 +0300
 
     Merge branch 'origin' into input-hotplug
 
 commit 19f673b7788d32c220e7e06734f1074b0e4a999c
-Merge: cb0a565d2 70ddd0f39
+Merge: cb0a565d2b 70ddd0f39d
 Author: Daniel Stone <daniel@fooishbar.org>
 Date:   Fri Aug 18 17:05:41 2006 +0300
 
@@ -173847,7 +185702,7 @@ Date:   Fri Aug 18 14:43:10 2006 +0100
     (Brett Stahlman & Colin Harrison)
 
 commit 708b225689b5a4ba9ffe3372b584b715ef9eacdc
-Merge: e1f4565be ee5e2cbd2
+Merge: e1f4565be5 ee5e2cbd2b
 Author: Alan Hourihane <alanh@fairlite.demon.co.uk>
 Date:   Fri Aug 18 09:13:52 2006 +0100
 
@@ -173892,7 +185747,7 @@ Date:   Thu Aug 17 16:22:07 2006 -0400
     It would be really nice if we only did this in one place instead of 40.
 
 commit 633b6a69f560c0a77dcff78fdef5fcf0041e2e04
-Merge: 95dbfcf88 7da51447e
+Merge: 95dbfcf882 7da51447ea
 Author: Daniel Stone <daniel@fooishbar.org>
 Date:   Thu Aug 17 21:25:14 2006 +0300
 
@@ -174000,21 +185855,21 @@ Date:   Tue Aug 15 15:23:53 2006 +0300
     Fix debug_events prototype.
 
 commit d003bada3352ec7d734498c4c732904876a9d1e2
-Merge: d6433be3c a815b9b99
+Merge: d6433be3cc a815b9b990
 Author: Daniel Stone <daniel@fooishbar.org>
 Date:   Sat Aug 12 22:48:55 2006 +0300
 
     Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug
 
 commit a815b9b990e068f02d9cbba2b17f2cc3a30a9310
-Merge: 37943e2f1 984babe86
+Merge: 37943e2f1a 984babe86b
 Author: George Sapountzis <gsap7@yahoo.gr>
 Date:   Sat Aug 12 21:58:33 2006 +0300
 
     Merge branch 'master' of git+ssh://gsap7@git.freedesktop.org/git/xorg/xserver
 
 commit d6433be3cca807dd78fbb1f45d9ba0212283083d
-Merge: 2bf9e3dc1 984babe86
+Merge: 2bf9e3dc1e 984babe86b
 Author: Daniel Stone <daniel@fooishbar.org>
 Date:   Sat Aug 12 21:50:52 2006 +0300
 
@@ -174073,7 +185928,7 @@ Date:   Sat Aug 12 19:25:06 2006 +0300
     Define HAVE_EXECINFO_H as well as HAVE_BACKTRACE, when we find execinfo.h.
 
 commit 26c3cd1c9e3f52548389817a6d89a377e20c4269
-Merge: 008aa7eb6 c4951e0a6
+Merge: 008aa7eb6e c4951e0a6b
 Author: Daniel Stone <daniel@fooishbar.org>
 Date:   Sat Aug 12 18:58:18 2006 +0300
 
@@ -174102,7 +185957,7 @@ Date:   Thu Aug 10 20:43:15 2006 -0400
     mode.  Also add M_T_PREFERRED bit, to select a 'best' mode out of a set.
 
 commit c2535f67923bde0bfb0e72363467110806e2f40f
-Merge: c0cb8d1fb db82e12fa
+Merge: c0cb8d1fb8 db82e12fac
 Author: Alan Coopersmith <alan.coopersmith@sun.com>
 Date:   Thu Aug 10 10:37:59 2006 -0700
 
@@ -174124,7 +185979,7 @@ Date:   Thu Aug 10 20:28:06 2006 +0300
     auto.
 
 commit 1a5561c4ecccaf32b03c41373adf376100d457aa
-Merge: 190f229ed db82e12fa
+Merge: 190f229ed7 db82e12fac
 Author: Ian Romanick <idr@umwelt.(none)>
 Date:   Thu Aug 10 10:20:37 2006 -0700
 
@@ -174145,7 +186000,7 @@ Date:   Thu Aug 10 18:02:47 2006 +0300
     XKB (and thus don't need to count the extra repeat events).
 
 commit 172d45b9b75f95c997d1e9358040eead496e2a06
-Merge: 3832a3d7d db82e12fa
+Merge: 3832a3d7db db82e12fac
 Author: Daniel Stone <daniel@fooishbar.org>
 Date:   Thu Aug 10 14:14:54 2006 +0300
 
@@ -174190,7 +186045,7 @@ Date:   Wed Aug 9 14:48:51 2006 -0400
     Remove the bc flag from the -help text, since it's gone.
 
 commit 767f372dd02232469f9fd804b811a17eaf762e1e
-Merge: c4f5de6cc 462bb61b0
+Merge: c4f5de6cc3 462bb61b0f
 Author: Tilman Sauerbeck <tilman@code-monkey.de>
 Date:   Wed Aug 9 20:23:30 2006 +0200
 
@@ -174208,7 +186063,7 @@ Date:   Wed Aug 9 20:21:52 2006 +0200
     hooks.
 
 commit 5506b4ad200745236f997c121e8200179c47b749
-Merge: 4be9abb85 462bb61b0
+Merge: 4be9abb850 462bb61b0f
 Author: Daniel Stone <daniel@fooishbar.org>
 Date:   Wed Aug 9 07:21:01 2006 +0300
 
@@ -174269,7 +186124,7 @@ Date:   Tue Aug 8 14:54:10 2006 +0300
     Sending MapNotify is more correct in this case than NKN, so do that.
 
 commit 31089816317f27c668b12a15c74fdd226a8df9f7
-Merge: ab3ebfefd 12dbd8a02
+Merge: ab3ebfefdb 12dbd8a02f
 Author: Daniel Stone <daniel@fooishbar.org>
 Date:   Tue Aug 8 12:01:12 2006 +0300
 
@@ -174393,7 +186248,7 @@ Date:   Mon Aug 7 16:51:09 2006 +0300
     memcpy events into our event structure instead of doing pointer assignment.
 
 commit c85e64cba1d2d88f676ca7cf23b52a6f8219e90e
-Merge: a406f6bfe f54b71b77
+Merge: a406f6bfea f54b71b772
 Author: Daniel Stone <daniel@fooishbar.org>
 Date:   Mon Aug 7 15:54:55 2006 +0300
 
@@ -174480,7 +186335,7 @@ Date:   Wed Aug 2 09:55:32 2006 -0700
     Remove pciConfigPtr and all of the associated cruft.
 
 commit 966ebd3d2d84b440e89504d055a0e937303ed11d
-Merge: a94176627 39169fd37
+Merge: a94176627c 39169fd373
 Author: Ian Romanick <idr@umwelt.(none)>
 Date:   Wed Aug 2 08:14:58 2006 -0700
 
@@ -174535,14 +186390,14 @@ Date:   Mon Jul 31 13:54:36 2006 -0700
     Build fixes for last pull from HEAD.
 
 commit 65dc25d8f86b962f2adc765a9ff327419f98092b
-Merge: 69533fc04 b74c845a1
+Merge: 69533fc04f b74c845a12
 Author: Ian Romanick <idr@umwelt.(none)>
 Date:   Mon Jul 31 12:30:30 2006 -0700
 
     Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into pci-rework
 
 commit b74c845a1233f78b841ff8840272c50873300c20
-Merge: 3112a6c4f 02daa6bb1
+Merge: 3112a6c4f2 02daa6bb10
 Author: Ian Romanick <idr@umwelt.(none)>
 Date:   Mon Jul 31 10:26:06 2006 -0700
 
@@ -174566,7 +186421,7 @@ Date:   Mon Jul 31 17:32:05 2006 +0100
        and GC stripple and tile pixmaps.
 
 commit 69533fc04f38c67fd424776c5191a4ba57ba8c8f
-Merge: ef1aecaaf 24051ef97
+Merge: ef1aecaaf6 24051ef974
 Author: Ian Romanick <idr@umwelt.(none)>
 Date:   Mon Jul 31 09:26:04 2006 -0700
 
@@ -174614,7 +186469,7 @@ Date:   Sun Jul 30 11:08:47 2006 +0300
     remove README (which doesn't exist) from EXTRA_DIST
 
 commit 87fe85f38b6f781bf0e2eb555526e3d77779f9fa
-Merge: 3518e2d0d 654619d76
+Merge: 3518e2d0de 654619d76c
 Author: Daniel Stone <daniel@fooishbar.org>
 Date:   Sun Jul 30 10:51:34 2006 +0300
 
@@ -174712,7 +186567,7 @@ Date:   Wed Jul 26 13:25:13 2006 -0700
     Pass correct pointer to xf86MapLegacyIO.
 
 commit 3518e2d0debc97e2bacdefe604b280e7fdfdd216
-Merge: eb7733a48 3821f6aea
+Merge: eb7733a48a 3821f6aeaa
 Author: Daniel Stone <daniel@fooishbar.org>
 Date:   Wed Jul 26 11:29:21 2006 +0300
 
@@ -174739,7 +186594,7 @@ Date:   Tue Jul 25 15:38:09 2006 -0700
     pci_device_get_bridge_buses can be used.
 
 commit 380b51d605a82c98082a2cebd70a0d1d0735eaa7
-Merge: 82f6b7e75 8977b0743
+Merge: 82f6b7e75e 8977b07434
 Author: Ian Romanick <idr@umwelt.(none)>
 Date:   Tue Jul 25 11:30:04 2006 -0700
 
@@ -174837,7 +186692,7 @@ Date:   Sun Jul 23 19:02:12 2006 -0400
     Allow XOpenDevice on closed devices.
 
 commit e73e5e2a4d8f22889d840a7719479f9af686cb9c
-Merge: a73cef1f0 8977b0743
+Merge: a73cef1f00 8977b07434
 Author: Daniel Stone <daniel@fooishbar.org>
 Date:   Sat Jul 22 13:56:30 2006 -0400
 
@@ -174850,7 +186705,7 @@ Date:   Sun Jul 23 03:36:47 2006 +1000
     glx: fix typo from tag removal
 
 commit a73cef1f005ca66db18e952e676ee5a21b829700
-Merge: 672ca156b 70869fc67
+Merge: 672ca156bf 70869fc677
 Author: Daniel Stone <daniel@fooishbar.org>
 Date:   Sat Jul 22 12:07:22 2006 -0400
 
@@ -174893,7 +186748,7 @@ Date:   Fri Jul 21 19:16:38 2006 -0700
     Fix stupid typos.
 
 commit 672ca156bfb11440e6e234650bfba9d38e1edb52
-Merge: d14d91f09 6cf844ab6
+Merge: d14d91f094 6cf844ab69
 Author: Daniel Stone <daniel@fooishbar.org>
 Date:   Fri Jul 21 19:58:42 2006 -0400
 
@@ -174926,7 +186781,7 @@ Date:   Fri Jul 21 16:47:45 2006 -0700
     which in turn allows the elimination of hw/xfree86/int10/pci.c.
 
 commit 87a6346bf7f086b5f98b2b2ecd52f27efe864e56
-Merge: b73fb2ae3 0486d3966
+Merge: b73fb2ae35 0486d3966d
 Author: Daniel Stone <daniel@fooishbar.org>
 Date:   Fri Jul 21 19:36:25 2006 -0400
 
@@ -174941,7 +186796,7 @@ Date:   Fri Jul 21 19:35:04 2006 -0400
     XkbSA_XFree86Private.
 
 commit b73fb2ae35a82e0bdd48f01132e971fb84946ff1
-Merge: e7ac27ad8 aff404f29
+Merge: e7ac27ad81 aff404f293
 Author: Daniel Stone <daniel@fooishbar.org>
 Date:   Fri Jul 21 19:30:26 2006 -0400
 
@@ -174963,7 +186818,7 @@ Date:   Fri Jul 21 19:10:26 2006 -0400
     Ugh.
 
 commit 7465010d59ec435bd00b738f0cef766b352dc7eb
-Merge: 1d31ed778 0aaac95b0
+Merge: 1d31ed7782 0aaac95b0d
 Author: Daniel Stone <daniel@fooishbar.org>
 Date:   Fri Jul 21 19:05:41 2006 -0400
 
@@ -174989,7 +186844,7 @@ Date:   Fri Jul 21 18:41:46 2006 -0400
     Remove the loader's required and referenced symbol lists, dead code.
 
 commit 07ad92d2c4cb07db8487d76efc822fd7b88137cb
-Merge: 18624a9b7 22db3fdb5
+Merge: 18624a9b7c 22db3fdb54
 Author: Ian Romanick <idr@umwelt.(none)>
 Date:   Fri Jul 21 15:25:35 2006 -0700
 
@@ -175020,7 +186875,7 @@ Date:   Thu Jul 20 18:19:07 2006 -0700
     Fix the RandR failure path for rotated screens.
 
 commit 22db3fdb54d2f7f6b72638b46c186af6db04e214
-Merge: 2f98841fd 93cd53860
+Merge: 2f98841fde 93cd53860c
 Author: Ian Romanick <idr@umwelt.(none)>
 Date:   Fri Jul 21 13:55:37 2006 -0700
 
@@ -175263,7 +187118,7 @@ Date:   Thu Jul 20 17:33:13 2006 -0400
     Remove the DDXTIME conditional, for being unused.
 
 commit c69c00d6523a35232a32e54a533811fc2b37815a
-Merge: 46369350d 84683f19b
+Merge: 46369350d4 84683f19b4
 Author: Ian Romanick <idr@umwelt.(none)>
 Date:   Thu Jul 20 12:08:38 2006 -0700
 
@@ -175337,7 +187192,7 @@ Date:   Thu Jul 13 21:10:48 2006 -0700
     Modify linuxGetSizesStruct to use pci_device instead of pciConfigPtr.
 
 commit 12595a77d6c2f037f48dfe751bdc10505b3317df
-Merge: 37838de62 4c225a3a8
+Merge: 37838de62e 4c225a3a8b
 Author: Ian Romanick <idr@umwelt.(none)>
 Date:   Thu Jul 13 12:48:03 2006 -0700
 
@@ -175378,7 +187233,7 @@ Date:   Sat Jul 8 21:57:07 2006 +0100
     Fix crash in Xephyr when running on host X with keymap width < 4 ( i.e xvnc )
 
 commit 21e3e3ca298dce22e5fad6ef38aa6fe9736a1d3b
-Merge: e80562189 39b2f7b21
+Merge: e805621894 39b2f7b218
 Author: Matthew Allum <mallum@polystyrene.(none)>
 Date:   Sat Jul 8 21:13:52 2006 +0100
 
@@ -175465,7 +187320,7 @@ Date:   Thu Jul 6 17:39:14 2006 -0400
     Switch the default mouse device on Linux to /dev/input/mice.
 
 commit 37838de62edc474f44c0a48bd56470a6c23f8956
-Merge: fd49a0dcc 8d07ee070
+Merge: fd49a0dcc1 8d07ee070e
 Author: Ian Romanick <idr@umwelt.(none)>
 Date:   Thu Jul 6 13:01:57 2006 -0700
 
@@ -175491,7 +187346,7 @@ Date:   Thu Jul 6 14:22:33 2006 -0400
     Spotted by Aaron Plattner.
 
 commit fd49a0dcc13280cf195bd6c7ee0f23d0840cb665
-Merge: e66e7b48e 28b95fd9d
+Merge: e66e7b48e1 28b95fd9d1
 Author: Ian Romanick <idr@umwelt.(none)>
 Date:   Thu Jul 6 09:52:15 2006 -0700
 
@@ -175549,7 +187404,7 @@ Date:   Wed Jun 28 15:59:01 2006 -0400
     DoGetDrawableAttributes and __glXQueryContextInfoEXT.
 
 commit e66e7b48e15543f3753951a19376f0446759963a
-Merge: a9d484289 eb35f812a
+Merge: a9d4842893 eb35f812a5
 Author: Ian Romanick <idr@umwelt.(none)>
 Date:   Wed Jul 5 15:21:36 2006 -0700
 
@@ -175663,7 +187518,7 @@ Date:   Sat Jul 1 12:34:36 2006 -0700
     Missing close parenthesis in one of the setuid() fixes.
 
 commit 124a81eb389dfa510ac07ca93ee17c4c9d6e56ea
-Merge: d3d6c5f4d 179737d4a
+Merge: d3d6c5f4d0 179737d4a0
 Author: Keith Packard <keithp@neko.keithp.com>
 Date:   Sat Jul 1 11:12:50 2006 -0700
 
@@ -175691,7 +187546,7 @@ Date:   Wed Jun 7 01:46:00 2006 -0700
     Move variable declarations to start of blocks as required by c89
 
 commit a9d4842893b65232d61fe4c63f074d30e81021d2
-Merge: 66cac9b17 6bd4c2543
+Merge: 66cac9b174 6bd4c25439
 Author: Ian Romanick <idr@umwelt.(none)>
 Date:   Fri Jun 30 11:49:29 2006 -0700
 
@@ -175705,7 +187560,7 @@ Date:   Mon Jun 26 01:52:24 2006 +0200
     Updated for Solaris 10 changes to DDI
 
 commit 66cac9b17498497d939bfb7a4075bcee5a485e5f
-Merge: 7c4e54025 54d9acd51
+Merge: 7c4e540253 54d9acd511
 Author: Ian Romanick <idr@umwelt.(none)>
 Date:   Wed Jun 28 14:11:49 2006 -0700
 
@@ -175742,14 +187597,14 @@ Date:   Tue Jun 27 04:11:47 2006 +0200
     cairo's clip-operator test.
 
 commit 7c4e54025345455f420cd2abaa7a40679689d3cb
-Merge: 9d0a15dca ff6b59a0d
+Merge: 9d0a15dca5 ff6b59a0db
 Author: Ian Romanick <idr@umwelt.(none)>
 Date:   Mon Jun 26 14:39:44 2006 -0700
 
     Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into pci-rework
 
 commit ff6b59a0dbadbe61a53e48c23965d3073d95791b
-Merge: b3c869304 48c871564
+Merge: b3c869304c 48c871564d
 Author: Alan Coopersmith <alan.coopersmith@sun.com>
 Date:   Mon Jun 26 13:02:33 2006 -0700
 
@@ -175832,7 +187687,7 @@ Date:   Wed Jun 21 09:30:59 2006 -0700
     Add a manpage for EXA.
 
 commit 9d0a15dca56b14821cad474f9db9c332acb3b1e6
-Merge: 6c514ca14 d67fd1069
+Merge: 6c514ca14c d67fd10696
 Author: Ian Romanick <idr@umwelt.(none)>
 Date:   Thu Jun 22 16:21:10 2006 -0700
 
@@ -175868,7 +187723,7 @@ Date:   Wed Jun 21 18:12:41 2006 -0700
     Use XACE, not XCSECURITY to decide if SecurityLookup* are exported
 
 commit 3177dc498a955cd58cd6054a7c7e69724db4a59b
-Merge: 3f19803e0 91dcac529
+Merge: 3f19803e0b 91dcac5295
 Author: Alan Coopersmith <alan.coopersmith@sun.com>
 Date:   Wed Jun 21 18:06:06 2006 -0700
 
@@ -175881,7 +187736,7 @@ Date:   Wed Jun 21 18:05:51 2006 -0700
     APPGROUP requires both X-ACE & XC-SECURITY now
 
 commit 91dcac5295486cc55a34ad91704bfa483bd31eeb
-Merge: d8135eb9e 77c947b90
+Merge: d8135eb9e4 77c947b900
 Author: Adam Jackson <ajax@benzedrine.nwnk.net>
 Date:   Wed Jun 21 20:49:30 2006 -0400
 
@@ -175908,7 +187763,7 @@ Date:   Wed Jun 21 16:24:20 2006 -0700
     Correct ifdef - should be XACE, not XSECURITY
 
 commit 90af38fa0c46c2081d2becac262a614c26ba6ef1
-Merge: 3e098efa3 77c947b90
+Merge: 3e098efa35 77c947b900
 Author: Alan Coopersmith <alan.coopersmith@sun.com>
 Date:   Wed Jun 21 16:23:31 2006 -0700
 
@@ -175935,7 +187790,7 @@ Date:   Wed Jun 21 16:18:41 2006 -0700
      of updates.)
 
 commit aa131c51e06e735d7b54cadf51205f703a3de4ef
-Merge: 1708b0c7d 77aa701e8
+Merge: 1708b0c7d9 77aa701e89
 Author: Ian Romanick <idr@umwelt.(none)>
 Date:   Wed Jun 21 14:39:52 2006 -0700
 
@@ -176003,7 +187858,7 @@ Date:   Tue Jun 20 19:01:34 2006 -0700
      - Added X-ACE sources to Xext/Makefile.am
 
 commit a46c06dab8392cf8012c7cc0b916de9a9e569671
-Merge: 49b368c0b d44b2a0a5
+Merge: 49b368c0bb d44b2a0a57
 Author: Alan Coopersmith <alan.coopersmith@sun.com>
 Date:   Tue Jun 20 18:40:18 2006 -0700
 
@@ -176035,7 +187890,7 @@ Date:   Tue Jun 20 18:14:27 2006 -0700
     Move Xserver API for security extension to securitysrv.h
 
 commit 49b368c0bb04816c4a3579071c596b2398cae3ec
-Merge: 63f6e6bbf 481d4012e
+Merge: 63f6e6bbfd 481d4012e7
 Author: Alan Coopersmith <alanc@alf.(none)>
 Date:   Tue Jun 20 16:22:39 2006 -0700
 
@@ -176048,7 +187903,7 @@ Date:   Tue Jun 20 16:16:19 2006 -0700
     Don't add -ldl to XORG_LIBS if it's not needed for dlopen
 
 commit 63f6e6bbfd0d3677e29621af982c9392ead98dd7
-Merge: 88ede2cec 6df52fb77
+Merge: 88ede2cec7 6df52fb774
 Author: Alan Coopersmith <alanc@alf.(none)>
 Date:   Tue Jun 20 16:03:34 2006 -0700
 
@@ -176061,7 +187916,7 @@ Date:   Tue Jun 20 16:02:55 2006 -0700
     Delete code that's been inside #if 0 since X11R6.7.
 
 commit 75398cff82b56c0a8fc301e84e2087f59a61a360
-Merge: 1f91b5726 2b5868540
+Merge: 1f91b5726c 2b58685402
 Author: Ian Romanick <idr@umwelt.(none)>
 Date:   Tue Jun 20 15:49:47 2006 -0700
 
@@ -176073,7 +187928,7 @@ Date:   Tue Jun 20 15:49:47 2006 -0700
             hw/xfree86/loader/xf86sym.c
 
 commit 88ede2cec79281a43cecb43ee6dec65770f82530
-Merge: 227a31934 2b5868540
+Merge: 227a319340 2b58685402
 Author: Alan Coopersmith <alanc@alf.(none)>
 Date:   Tue Jun 20 15:29:55 2006 -0700
 
@@ -176123,7 +187978,7 @@ Date:   Wed May 5 20:07:37 2004 +0000
     (cherry picked from 0106715000196c7b349a0b4494b61545f0f5e138 commit)
 
 commit 0707eb33d6826e1300a905edea28c12134600b12
-Merge: 37f0ae024 98d17bba7
+Merge: 37f0ae0245 98d17bba71
 Author: Alan Coopersmith <alanc@alf.(none)>
 Date:   Mon Jun 19 17:09:51 2006 -0700
 
@@ -176288,7 +188143,7 @@ Date:   Fri Jun 16 10:14:30 2006 -0700
     hadn't been bumped.
 
 commit 72ac20c0e878ad48ff61f7e846cbf1005a4eb435
-Merge: fc3e81473 b90088321
+Merge: fc3e81473a b90088321e
 Author: Ian Romanick <idr@localhost.localdomain>
 Date:   Tue Jun 13 21:13:02 2006 -0700
 
@@ -176315,7 +188170,7 @@ Date:   Mon Jun 12 20:12:31 2006 +0200
     Provide option to report damage after operation is complete.
 
 commit fc3e81473a98d3b932faa73c0c01c21366a48a9e
-Merge: 4bedaad17 041ef2319
+Merge: 4bedaad17d 041ef23192
 Author: Ian Romanick <idr@localhost.localdomain>
 Date:   Mon Jun 12 09:41:06 2006 -0700
 
@@ -176352,7 +188207,7 @@ Date:   Fri Jun 9 16:08:06 2006 -0700
     another function that was already in that file.
 
 commit 7810d87cd6ae9316d88f6a2e7696deb8837cec27
-Merge: dcfaa9f4f caad8b724
+Merge: dcfaa9f4f8 caad8b724b
 Author: Ian Romanick <idr@localhost.localdomain>
 Date:   Fri Jun 9 15:16:50 2006 -0700
 
@@ -176424,7 +188279,7 @@ Date:   Fri Jun 9 09:51:28 2006 -0700
     based on FIXME in mi/miinitext.c
 
 commit dcfaa9f4f8fb10b75be50c9a49ccd88caf6d0f6a
-Merge: af9afe4cc 576e6fb11
+Merge: af9afe4cc5 576e6fb112
 Author: Ian Romanick <idr@localhost.localdomain>
 Date:   Thu Jun 8 15:03:00 2006 -0700
 
@@ -176444,7 +188299,7 @@ Date:   Thu Jun 8 17:46:53 2006 -0400
     Bug #7121: fix clipboard handling in Xming (Colin Harrison)
 
 commit af9afe4cc50df973bea2293a803f7dfdefaa6411
-Merge: caffac384 3930da3f6
+Merge: caffac3843 3930da3f62
 Author: Ian Romanick <idr@localhost.localdomain>
 Date:   Thu Jun 8 11:37:09 2006 -0700
 
@@ -176521,7 +188376,7 @@ Date:   Thu Jun 8 10:40:24 2006 -0700
     if anyone really cares about this code.
 
 commit caffac38432009e8dc01e7d3e72a7fa6fba2f078
-Merge: c5b3aa120 9fa73721f
+Merge: c5b3aa120b 9fa73721f0
 Author: Ian Romanick <idr@localhost.localdomain>
 Date:   Thu Jun 8 10:38:43 2006 -0700
 
@@ -176632,7 +188487,7 @@ Date:   Wed Jun 7 17:44:06 2006 -0700
     when the symbol PCI_DOM_FROM_TAG couldn't be resolved at run-time.
 
 commit 23182315f34e3a0065739b43b15d4560e75b41a1
-Merge: bc05158a5 757f40fca
+Merge: bc05158a5a 757f40fca5
 Author: Ian Romanick <idr@localhost.localdomain>
 Date:   Wed Jun 7 17:03:48 2006 -0700
 
@@ -176669,7 +188524,7 @@ Date:   Wed Jun 7 14:09:13 2006 -0700
     updated the .gitignore file with more auto-generated files
 
 commit bc05158a5ab00c548e4b04b5638afe07bc702260
-Merge: 46f55f5de cc465800d
+Merge: 46f55f5dea cc465800dd
 Author: Ian Romanick <idr@localhost.localdomain>
 Date:   Wed Jun 7 14:09:12 2006 -0700
 
@@ -176689,7 +188544,7 @@ Date:   Wed Jun 7 14:03:35 2006 -0700
     Fix compiler warnings about SetVendorRelease and SetVendorString
 
 commit 785c9789704ed142fe98cd17b5995e4a95b7141f
-Merge: 21ebcfd70 36d786e9f
+Merge: 21ebcfd702 36d786e9f0
 Author: Greg Kroah-Hartman <gregkh@suse.de>
 Date:   Wed Jun 7 13:20:21 2006 -0700
 
diff --git a/Makefile.am b/Makefile.am
index 19511f7..e003790 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -142,22 +142,18 @@ EXTRA_DIST += \
 	include/xorg-config.h.meson.in \
 	include/xwin-config.h.meson.in \
 	hw/xfree86/loader/symbol-test.c \
-	hw/xfree86/common/xf86Build.sh \
 	composite/meson.build \
 	config/meson.build \
 	damageext/meson.build \
 	dbe/meson.build \
 	dix/meson.build \
+	doc/dtrace/meson.build \
+	doc/meson.build \
 	dri3/meson.build \
 	exa/meson.build \
 	fb/meson.build \
 	glamor/meson.build \
 	glx/meson.build \
-	hw/dmx/config/meson.build \
-	hw/dmx/examples/meson.build \
-	hw/dmx/glxProxy/meson.build \
-	hw/dmx/input/meson.build \
-	hw/dmx/meson.build \
 	hw/kdrive/ephyr/meson.build \
 	hw/kdrive/meson.build \
 	hw/kdrive/src/meson.build \
@@ -166,8 +162,10 @@ EXTRA_DIST += \
 	hw/xfree86/common/meson.build \
 	hw/xfree86/ddc/meson.build \
 	hw/xfree86/dixmods/meson.build \
+	hw/xfree86/doc/meson.build \
 	hw/xfree86/dri2/meson.build \
 	hw/xfree86/dri/meson.build \
+	hw/xfree86/drivers/inputtest/meson.build \
 	hw/xfree86/drivers/modesetting/meson.build \
 	hw/xfree86/exa/meson.build \
 	hw/xfree86/fbdevhw/meson.build \
@@ -181,13 +179,16 @@ EXTRA_DIST += \
 	hw/xfree86/parser/meson.build \
 	hw/xfree86/ramdac/meson.build \
 	hw/xfree86/shadowfb/meson.build \
-	hw/xfree86/vbe/meson.build \
 	hw/xfree86/vgahw/meson.build \
 	hw/xfree86/x86emu/meson.build \
 	hw/xfree86/xkb/meson.build \
 	hw/xnest/meson.build \
+	hw/xquartz/bundle/meson.build \
+	hw/xquartz/GL/meson.build \
+	hw/xquartz/mach-startup/meson.build \
 	hw/xquartz/meson.build \
-	hw/xwayland/meson.build \
+	hw/xquartz/pbproxy/meson.build \
+	hw/xquartz/xpr/meson.build \
 	hw/xwin/dri/meson.build \
 	hw/xwin/glx/meson.build \
 	hw/xwin/meson.build \
@@ -195,6 +196,7 @@ EXTRA_DIST += \
 	include/meson.build \
 	meson.build \
 	miext/damage/meson.build \
+	miext/rootless/meson.build \
 	miext/shadow/meson.build \
 	miext/sync/meson.build \
 	mi/meson.build \
@@ -206,6 +208,8 @@ EXTRA_DIST += \
 	render/meson.build \
 	test/bigreq/meson.build \
 	test/bigreq/request-length.c \
+	test/damage/meson.build \
+	test/damage/primitives.c \
 	test/meson.build \
 	test/sync/meson.build \
 	test/sync/sync.c \
@@ -213,3 +217,5 @@ EXTRA_DIST += \
 	xfixes/meson.build \
 	Xi/meson.build \
 	xkb/meson.build
+
+DISTCLEANFILES = buildDateTime.h
diff --git a/Makefile.in b/Makefile.in
index 95259c3..cccd291 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -108,7 +108,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES = xserver.ent xorg-server.pc
 CONFIG_CLEAN_VPATH_FILES =
@@ -194,12 +193,9 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
-CSCOPE = cscope
 am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/xorg-server.pc.in \
-	$(srcdir)/xserver.ent.in COPYING ChangeLog INSTALL compile \
-	config.guess config.sub install-sh ltmain.sh missing
+	$(srcdir)/xserver.ent.in COPYING ChangeLog INSTALL README.md \
+	compile config.guess config.sub install-sh ltmain.sh missing
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 distdir = $(PACKAGE)-$(VERSION)
 top_distdir = $(distdir)
@@ -235,9 +231,11 @@ am__relativize = \
     dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
   done; \
   reldir="$$dir2"
-DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
+DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.xz
 GZIP_ENV = --best
-DIST_TARGETS = dist-bzip2 dist-gzip
+DIST_TARGETS = dist-xz dist-gzip
+# Exists only to be overridden by the user if desired.
+AM_DISTCHECK_DVI_TARGET = dvi
 distuninstallcheck_listfiles = find . -type f -print
 am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
   | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
@@ -259,8 +257,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -274,6 +270,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -292,14 +290,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -316,8 +306,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -373,6 +365,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -425,7 +419,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -449,29 +442,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -509,8 +486,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -521,14 +496,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -649,17 +618,16 @@ SUBDIRS = \
 EXTRA_DIST = xorg-server.pc.in xorg-server.m4 autogen.sh README.md \
 	meson_options.txt include/xorg-config.h.meson.in \
 	include/xwin-config.h.meson.in hw/xfree86/loader/symbol-test.c \
-	hw/xfree86/common/xf86Build.sh composite/meson.build \
-	config/meson.build damageext/meson.build dbe/meson.build \
-	dix/meson.build dri3/meson.build exa/meson.build \
+	composite/meson.build config/meson.build damageext/meson.build \
+	dbe/meson.build dix/meson.build doc/dtrace/meson.build \
+	doc/meson.build dri3/meson.build exa/meson.build \
 	fb/meson.build glamor/meson.build glx/meson.build \
-	hw/dmx/config/meson.build hw/dmx/examples/meson.build \
-	hw/dmx/glxProxy/meson.build hw/dmx/input/meson.build \
-	hw/dmx/meson.build hw/kdrive/ephyr/meson.build \
-	hw/kdrive/meson.build hw/kdrive/src/meson.build hw/meson.build \
-	hw/vfb/meson.build hw/xfree86/common/meson.build \
-	hw/xfree86/ddc/meson.build hw/xfree86/dixmods/meson.build \
+	hw/kdrive/ephyr/meson.build hw/kdrive/meson.build \
+	hw/kdrive/src/meson.build hw/meson.build hw/vfb/meson.build \
+	hw/xfree86/common/meson.build hw/xfree86/ddc/meson.build \
+	hw/xfree86/dixmods/meson.build hw/xfree86/doc/meson.build \
 	hw/xfree86/dri2/meson.build hw/xfree86/dri/meson.build \
+	hw/xfree86/drivers/inputtest/meson.build \
 	hw/xfree86/drivers/modesetting/meson.build \
 	hw/xfree86/exa/meson.build hw/xfree86/fbdevhw/meson.build \
 	hw/xfree86/glamor_egl/meson.build hw/xfree86/i2c/meson.build \
@@ -667,20 +635,23 @@ EXTRA_DIST = xorg-server.pc.in xorg-server.m4 autogen.sh README.md \
 	hw/xfree86/meson.build hw/xfree86/modes/meson.build \
 	hw/xfree86/os-support/meson.build \
 	hw/xfree86/parser/meson.build hw/xfree86/ramdac/meson.build \
-	hw/xfree86/shadowfb/meson.build hw/xfree86/vbe/meson.build \
-	hw/xfree86/vgahw/meson.build hw/xfree86/x86emu/meson.build \
-	hw/xfree86/xkb/meson.build hw/xnest/meson.build \
-	hw/xquartz/meson.build hw/xwayland/meson.build \
-	hw/xwin/dri/meson.build hw/xwin/glx/meson.build \
-	hw/xwin/meson.build hw/xwin/winclipboard/meson.build \
-	include/meson.build meson.build miext/damage/meson.build \
-	miext/shadow/meson.build miext/sync/meson.build mi/meson.build \
-	os/meson.build present/meson.build pseudoramiX/meson.build \
-	randr/meson.build record/meson.build render/meson.build \
-	test/bigreq/meson.build test/bigreq/request-length.c \
-	test/meson.build test/sync/meson.build test/sync/sync.c \
-	Xext/meson.build xfixes/meson.build Xi/meson.build \
-	xkb/meson.build
+	hw/xfree86/shadowfb/meson.build hw/xfree86/vgahw/meson.build \
+	hw/xfree86/x86emu/meson.build hw/xfree86/xkb/meson.build \
+	hw/xnest/meson.build hw/xquartz/bundle/meson.build \
+	hw/xquartz/GL/meson.build hw/xquartz/mach-startup/meson.build \
+	hw/xquartz/meson.build hw/xquartz/pbproxy/meson.build \
+	hw/xquartz/xpr/meson.build hw/xwin/dri/meson.build \
+	hw/xwin/glx/meson.build hw/xwin/meson.build \
+	hw/xwin/winclipboard/meson.build include/meson.build \
+	meson.build miext/damage/meson.build \
+	miext/rootless/meson.build miext/shadow/meson.build \
+	miext/sync/meson.build mi/meson.build os/meson.build \
+	present/meson.build pseudoramiX/meson.build randr/meson.build \
+	record/meson.build render/meson.build test/bigreq/meson.build \
+	test/bigreq/request-length.c test/damage/meson.build \
+	test/damage/primitives.c test/meson.build \
+	test/sync/meson.build test/sync/sync.c Xext/meson.build \
+	xfixes/meson.build Xi/meson.build xkb/meson.build
 DISTCHECK_CONFIGURE_FLAGS = \
 	--with-xkb-path=$(XKB_BASE_DIRECTORY) \
 	--with-xkb-bin-directory=$(XKB_BIN_DIRECTORY) \
@@ -715,6 +686,7 @@ DIST_SUBDIRS = \
 	hw \
 	test
 
+DISTCLEANFILES = buildDateTime.h
 all: all-recursive
 
 .SUFFIXES:
@@ -912,7 +884,6 @@ cscopelist-am: $(am__tagged_files)
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 	-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
@@ -986,6 +957,7 @@ distdir-am: $(DISTFILES)
 dist-gzip: distdir
 	tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
 	$(am__post_remove_distdir)
+
 dist-bzip2: distdir
 	tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
 	$(am__post_remove_distdir)
@@ -993,7 +965,6 @@ dist-bzip2: distdir
 dist-lzip: distdir
 	tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
 	$(am__post_remove_distdir)
-
 dist-xz: distdir
 	tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
 	$(am__post_remove_distdir)
@@ -1062,7 +1033,7 @@ distcheck: dist
 	    $(DISTCHECK_CONFIGURE_FLAGS) \
 	    --srcdir=../.. --prefix="$$dc_install_base" \
 	  && $(MAKE) $(AM_MAKEFLAGS) \
-	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
+	  && $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \
 	  && $(MAKE) $(AM_MAKEFLAGS) check \
 	  && $(MAKE) $(AM_MAKEFLAGS) install \
 	  && $(MAKE) $(AM_MAKEFLAGS) installcheck \
@@ -1147,6 +1118,7 @@ clean-generic:
 distclean-generic:
 	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
 	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
 
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
diff --git a/README.md b/README.md
index bc39f41..a40f2ca 100644
--- a/README.md
+++ b/README.md
@@ -19,7 +19,7 @@ Xorg mailing list:
 
   https://lists.freedesktop.org/mailman/listinfo/xorg
 
-The master development code repository can be found at:
+The primary development code repository can be found at:
 
   https://gitlab.freedesktop.org/xorg/xserver
 
diff --git a/Xext/Makefile.in b/Xext/Makefile.in
index da86c36..b62e24c 100644
--- a/Xext/Makefile.in
+++ b/Xext/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -121,7 +121,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -279,8 +278,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
@@ -300,8 +297,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -315,6 +310,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -333,14 +330,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -357,8 +346,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -414,6 +405,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -466,7 +459,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -490,29 +482,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -550,8 +526,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -562,14 +536,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -902,7 +870,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/Xext/geext.c b/Xext/geext.c
index 5009c08..05988c4 100644
--- a/Xext/geext.c
+++ b/Xext/geext.c
@@ -138,9 +138,15 @@ ProcGEDispatch(ClientPtr client)
 static int _X_COLD
 SProcGEDispatch(ClientPtr client)
 {
+    GEClientInfoPtr pGEClient = GEGetClient(client);
+
     REQUEST(xGEReq);
-    if (stuff->ReqType >= GENumberRequests)
+
+    if (pGEClient->major_version >= ARRAY_SIZE(version_requests))
         return BadRequest;
+    if (stuff->ReqType > version_requests[pGEClient->major_version])
+        return BadRequest;
+
     return (*SProcGEVector[stuff->ReqType]) (client);
 }
 
diff --git a/Xext/hashtable.c b/Xext/hashtable.c
index 93d1a2a..3434c99 100644
--- a/Xext/hashtable.c
+++ b/Xext/hashtable.c
@@ -240,7 +240,7 @@ unsigned
 ht_generic_hash(void *cdata, const void *ptr, int numBits)
 {
     HtGenericHashSetupPtr setup = cdata;
-    return one_at_a_time_hash(ptr, setup->keySize) & ~((~0) << numBits);
+    return one_at_a_time_hash(ptr, setup->keySize) & ~((~0U) << numBits);
 }
 
 int
diff --git a/Xext/hashtable.h b/Xext/hashtable.h
index a988af3..04e0be9 100644
--- a/Xext/hashtable.h
+++ b/Xext/hashtable.h
@@ -40,7 +40,7 @@ typedef struct {
     int             keySize;
 } HtGenericHashSetupRec, *HtGenericHashSetupPtr;
 
-/** @brief  ht_create initalizes a hash table for a certain hash table
+/** @brief  ht_create initializes a hash table for a certain hash table
             configuration
 
     @param[out] ht       The hash table structure to initialize
diff --git a/Xext/meson.build b/Xext/meson.build
index 7727e20..0600fe9 100644
--- a/Xext/meson.build
+++ b/Xext/meson.build
@@ -74,4 +74,6 @@ libxserver_xext_vidmode = static_library('libxserver_xext_vidmode',
     dependencies: common_dep,
 )
 
-install_data(hdrs_xext, install_dir: xorgsdkdir)
+if build_xorg
+    install_data(hdrs_xext, install_dir: xorgsdkdir)
+endif
diff --git a/Xext/saver.c b/Xext/saver.c
index c27a66c..fd6153c 100644
--- a/Xext/saver.c
+++ b/Xext/saver.c
@@ -366,7 +366,7 @@ ScreenSaverFreeSuspend(void *value, XID id)
         }
     }
 
-    /* Reenable the screensaver if this was the last client suspending it. */
+    /* Re-enable the screensaver if this was the last client suspending it. */
     if (screenSaverSuspended && suspendingClients == NULL) {
         screenSaverSuspended = FALSE;
 
@@ -1051,7 +1051,7 @@ ScreenSaverSetAttributes(ClientPtr client)
         pVlist++;
     }
     if (pPriv->attr)
-        FreeScreenAttr(pPriv->attr);
+        FreeResource(pPriv->attr->resource, AttrType);
     pPriv->attr = pAttr;
     pAttr->resource = FakeClientID(client->index);
     if (!AddResource(pAttr->resource, AttrType, (void *) pAttr))
@@ -1243,7 +1243,7 @@ ProcScreenSaverSuspend(ClientPtr client)
     /*
      * Allocate a suspension record for the client, and stop the screensaver
      * if it isn't already suspended by another client. We attach a resource ID
-     * to the record, so the screensaver will be reenabled and the record freed
+     * to the record, so the screensaver will be re-enabled and the record freed
      * if the client disconnects without reenabling it first.
      */
     this = malloc(sizeof(ScreenSaverSuspensionRec));
@@ -1351,8 +1351,8 @@ SProcScreenSaverSuspend(ClientPtr client)
     REQUEST(xScreenSaverSuspendReq);
 
     swaps(&stuff->length);
-    swapl(&stuff->suspend);
     REQUEST_SIZE_MATCH(xScreenSaverSuspendReq);
+    swapl(&stuff->suspend);
     return ProcScreenSaverSuspend(client);
 }
 
diff --git a/Xext/shm.c b/Xext/shm.c
index 24c6b10..071bd1a 100644
--- a/Xext/shm.c
+++ b/Xext/shm.c
@@ -303,8 +303,8 @@ ProcShmQueryVersion(ClientPtr client)
 }
 
 /*
- * Simulate the access() system call for a shared memory segement,
- * using the credentials from the client if available
+ * Simulate the access() system call for a shared memory segment,
+ * using the credentials from the client if available.
  */
 static int
 shm_access(ClientPtr client, SHMPERM_TYPE * perm, int readonly)
@@ -1248,7 +1248,7 @@ shm_tmpfile(void)
         int flags = fcntl(fd, F_GETFD);
         if (flags != -1) {
             flags |= FD_CLOEXEC;
-            (void) fcntl(fd, F_SETFD, &flags);
+            (void) fcntl(fd, F_SETFD, flags);
         }
 #endif
         return fd;
diff --git a/Xext/vidmode.c b/Xext/vidmode.c
index 6e4a7c7..c7c6164 100644
--- a/Xext/vidmode.c
+++ b/Xext/vidmode.c
@@ -277,8 +277,8 @@ ProcVidModeGetModeLine(ClientPtr client)
 
     /*
      * Older servers sometimes had server privates that the VidMode
-     * extention made available. So to be compatiable pretend that
-     * there are no server privates to pass to the client
+     * extension made available. So to be compatible pretend that
+     * there are no server privates to pass to the client.
      */
     rep.privsize = 0;
 
diff --git a/Xext/xres.c b/Xext/xres.c
index 7a7aabc..3543298 100644
--- a/Xext/xres.c
+++ b/Xext/xres.c
@@ -72,7 +72,7 @@ typedef struct {
     HashTable     visitedResources;
 
     /* Used by AddSubResourceSizeSpec when AddResourceSizeValue is
-       handling crossreferences */
+       handling cross-references */
     HashTable     visitedSubResources;
 
     /* used when ConstructResourceBytesCtx is passed to
@@ -442,7 +442,7 @@ WillConstructMask(ClientPtr client, CARD32 mask,
            client id spec
 
     @param sendClient Which client wishes to receive this answer. Used for
-                      byte endianess.
+                      byte endianness.
     @param client     Which client are we considering.
     @param mask       The client id spec mask indicating which information
                       we want about this client.
@@ -609,7 +609,7 @@ ProcXResQueryClientIds (ClientPtr client)
     return rc;
 }
 
-/** @brief Swaps xXResResourceIdSpec endianess */
+/** @brief Swaps xXResResourceIdSpec endianness */
 static void
 SwapXResResourceIdSpec(xXResResourceIdSpec *spec)
 {
@@ -617,7 +617,7 @@ SwapXResResourceIdSpec(xXResResourceIdSpec *spec)
     swapl(&spec->type);
 }
 
-/** @brief Swaps xXResResourceSizeSpec endianess */
+/** @brief Swaps xXResResourceSizeSpec endianness */
 static void
 SwapXResResourceSizeSpec(xXResResourceSizeSpec *size)
 {
@@ -627,7 +627,7 @@ SwapXResResourceSizeSpec(xXResResourceSizeSpec *size)
     swapl(&size->useCount);
 }
 
-/** @brief Swaps xXResResourceSizeValue endianess */
+/** @brief Swaps xXResResourceSizeValue endianness */
 static void
 SwapXResResourceSizeValue(xXResResourceSizeValue *rep)
 {
diff --git a/Xext/xselinux_ext.c b/Xext/xselinux_ext.c
index 1395a56..99501ee 100644
--- a/Xext/xselinux_ext.c
+++ b/Xext/xselinux_ext.c
@@ -37,8 +37,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define USE_SEL offsetof(SELinuxSubjectRec, sel_use_sid)
 
 typedef struct {
-    security_context_t octx;
-    security_context_t dctx;
+    char *octx;
+    char *dctx;
     CARD32 octx_len;
     CARD32 dctx_len;
     CARD32 id;
@@ -48,10 +48,10 @@ typedef struct {
  * Extension Dispatch
  */
 
-static security_context_t
+static char *
 SELinuxCopyContext(char *ptr, unsigned len)
 {
-    security_context_t copy = malloc(len + 1);
+    char *copy = malloc(len + 1);
 
     if (!copy)
         return NULL;
@@ -84,7 +84,7 @@ static int
 SELinuxSendContextReply(ClientPtr client, security_id_t sid)
 {
     SELinuxGetContextReply rep;
-    security_context_t ctx = NULL;
+    char *ctx = NULL;
     int len = 0;
 
     if (sid) {
@@ -117,7 +117,7 @@ ProcSELinuxSetCreateContext(ClientPtr client, unsigned offset)
 {
     PrivateRec **privPtr = &client->devPrivates;
     security_id_t *pSid;
-    security_context_t ctx = NULL;
+    char *ctx = NULL;
     char *ptr;
     int rc;
 
@@ -165,7 +165,7 @@ ProcSELinuxGetCreateContext(ClientPtr client, unsigned offset)
 static int
 ProcSELinuxSetDeviceContext(ClientPtr client)
 {
-    security_context_t ctx;
+    char *ctx;
     security_id_t sid;
     DeviceIntPtr dev;
     SELinuxSubjectRec *subj;
@@ -689,8 +689,6 @@ SELinuxResetProc(ExtensionEntry * extEntry)
 void
 SELinuxExtensionInit(void)
 {
-    ExtensionEntry *extEntry;
-
     /* Check SELinux mode on system, configuration file, and boolean */
     if (!is_selinux_enabled()) {
         LogMessage(X_INFO, "SELinux: Disabled on system\n");
@@ -710,8 +708,7 @@ SELinuxExtensionInit(void)
     SELinuxFlaskInit();
 
     /* Add extension to server */
-    extEntry = AddExtension(SELINUX_EXTENSION_NAME,
-                            SELinuxNumberEvents, SELinuxNumberErrors,
-                            ProcSELinuxDispatch, SProcSELinuxDispatch,
-                            SELinuxResetProc, StandardMinorOpcode);
+    AddExtension(SELINUX_EXTENSION_NAME, SELinuxNumberEvents,
+                 SELinuxNumberErrors, ProcSELinuxDispatch,
+                 SProcSELinuxDispatch, SELinuxResetProc, StandardMinorOpcode);
 }
diff --git a/Xext/xselinux_hooks.c b/Xext/xselinux_hooks.c
index 2d85928..57b24e4 100644
--- a/Xext/xselinux_hooks.c
+++ b/Xext/xselinux_hooks.c
@@ -114,7 +114,7 @@ SELinuxLabelClient(ClientPtr client)
     int fd = XaceGetConnectionNumber(client);
     SELinuxSubjectRec *subj;
     SELinuxObjectRec *obj;
-    security_context_t ctx;
+    char *ctx;
 
     subj = dixLookupPrivate(&client->devPrivates, subjectKey);
     obj = dixLookupPrivate(&client->devPrivates, objectKey);
@@ -169,7 +169,7 @@ SELinuxLabelInitial(void)
     XaceScreenAccessRec srec;
     SELinuxSubjectRec *subj;
     SELinuxObjectRec *obj;
-    security_context_t ctx;
+    char *ctx;
     void *unused;
 
     /* Do the serverClient */
@@ -773,7 +773,7 @@ SELinuxResourceState(CallbackListPtr *pcbl, void *unused, void *calldata)
     subj = dixLookupPrivate(&wClient(pWin)->devPrivates, subjectKey);
 
     if (subj->sid) {
-        security_context_t ctx;
+        char *ctx;
         int rc = avc_sid_to_context_raw(subj->sid, &ctx);
 
         if (rc < 0)
@@ -791,7 +791,7 @@ SELinuxResourceState(CallbackListPtr *pcbl, void *unused, void *calldata)
     obj = dixLookupPrivate(&pWin->devPrivates, objectKey);
 
     if (obj->sid) {
-        security_context_t ctx;
+        char *ctx;
         int rc = avc_sid_to_context_raw(obj->sid, &ctx);
 
         if (rc < 0)
@@ -847,7 +847,7 @@ void
 SELinuxFlaskInit(void)
 {
     struct selinux_opt avc_option = { AVC_OPT_SETENFORCE, (char *) 0 };
-    security_context_t ctx;
+    char *ctx;
     int ret = TRUE;
 
     switch (selinuxEnforcingState) {
diff --git a/Xext/xselinux_label.c b/Xext/xselinux_label.c
index 8559385..48414d8 100644
--- a/Xext/xselinux_label.c
+++ b/Xext/xselinux_label.c
@@ -97,7 +97,7 @@ static int
 SELinuxAtomToSIDLookup(Atom atom, SELinuxObjectRec * obj, int map, int polymap)
 {
     const char *name = NameForAtom(atom);
-    security_context_t ctx;
+    char *ctx;
     int rc = Success;
 
     obj->poly = 1;
@@ -255,7 +255,7 @@ SELinuxEventToSID(unsigned type, security_id_t sid_of_window,
 {
     const char *name = LookupEventName(type);
     security_id_t sid;
-    security_context_t ctx;
+    char *ctx;
 
     type &= 127;
 
@@ -291,7 +291,7 @@ SELinuxEventToSID(unsigned type, security_id_t sid_of_window,
 int
 SELinuxExtensionToSID(const char *name, security_id_t * sid_rtn)
 {
-    security_context_t ctx;
+    char *ctx;
 
     /* Look in the mappings of extension names to contexts */
     if (selabel_lookup_raw(label_hnd, &ctx, name, SELABEL_X_EXT) < 0) {
@@ -347,10 +347,10 @@ SELinuxTypeToClass(RESTYPE type)
     return (security_class_t) (unsigned long) tmp;
 }
 
-security_context_t
+char *
 SELinuxDefaultClientLabel(void)
 {
-    security_context_t ctx;
+    char *ctx;
 
     if (selabel_lookup_raw(label_hnd, &ctx, "remote", SELABEL_X_CLIENT) < 0)
         FatalError("SELinux: failed to look up remote-client context\n");
diff --git a/Xext/xselinuxint.h b/Xext/xselinuxint.h
index 57f8b73..5a58740 100644
--- a/Xext/xselinuxint.h
+++ b/Xext/xselinuxint.h
@@ -99,7 +99,7 @@ int
 
 security_class_t SELinuxTypeToClass(RESTYPE type);
 
-security_context_t SELinuxDefaultClientLabel(void);
+char *SELinuxDefaultClientLabel(void);
 
 void
  SELinuxLabelInit(void);
diff --git a/Xext/xtest.c b/Xext/xtest.c
index 38b8012..9b55b20 100644
--- a/Xext/xtest.c
+++ b/Xext/xtest.c
@@ -57,9 +57,10 @@
 
 #include "extinit.h"
 
-/* XTest events are sent during request processing and may be interruped by
+/* XTest events are sent during request processing and may be interrupted by
  * a SIGIO. We need a separate event list to avoid events overwriting each
- * other's memory */
+ * other's memory.
+ */
 static InternalEvent *xtest_evlist;
 
 /**
@@ -501,10 +502,11 @@ XTestSwapFakeInput(ClientPtr client, xReq * req)
 
     nev = ((req->length << 2) - sizeof(xReq)) / sizeof(xEvent);
     for (ev = (xEvent *) &req[1]; --nev >= 0; ev++) {
+        int evtype = ev->u.u.type & 0177;
         /* Swap event */
-        proc = EventSwapVector[ev->u.u.type & 0177];
+        proc = EventSwapVector[evtype];
         /* no swapping proc; invalid event type? */
-        if (!proc || proc == NotImplemented) {
+        if (!proc || proc == NotImplemented || evtype == GenericEvent) {
             client->errorValue = ev->u.u.type;
             return BadValue;
         }
diff --git a/Xext/xvmain.c b/Xext/xvmain.c
index c520c7d..2a08f87 100644
--- a/Xext/xvmain.c
+++ b/Xext/xvmain.c
@@ -425,7 +425,7 @@ XvdiDestroyVideoNotifyList(void *pn, XID id)
 {
     XvVideoNotifyPtr npn, cpn;
 
-    /* ACTUALLY DESTROY THE NOTITY LIST */
+    /* ACTUALLY DESTROY THE NOTIFY LIST */
 
     cpn = (XvVideoNotifyPtr) pn;
 
@@ -811,8 +811,10 @@ XvdiSelectVideoNotify(ClientPtr client, DrawablePtr pDraw, BOOL onoff)
         tpn = pn;
         while (tpn) {
             if (tpn->client == client) {
-                if (!onoff)
+                if (!onoff) {
                     tpn->client = NULL;
+                    FreeResource(tpn->id, XvRTVideoNotify);
+                }
                 return Success;
             }
             if (!tpn->client)
@@ -820,7 +822,7 @@ XvdiSelectVideoNotify(ClientPtr client, DrawablePtr pDraw, BOOL onoff)
             tpn = tpn->next;
         }
 
-        /* IF TUNNING OFF, THEN JUST RETURN */
+        /* IF TURNING OFF, THEN JUST RETURN */
 
         if (!onoff)
             return Success;
diff --git a/Xi/Makefile.in b/Xi/Makefile.in
index 620ea6d..483a6c2 100644
--- a/Xi/Makefile.in
+++ b/Xi/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -105,7 +105,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -217,8 +216,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
@@ -238,8 +235,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -253,6 +248,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -271,14 +268,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -295,8 +284,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -352,6 +343,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -404,7 +397,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -428,29 +420,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -488,8 +464,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -500,14 +474,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -885,7 +853,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/Xi/closedev.c b/Xi/closedev.c
index 199d38a..f68b523 100644
--- a/Xi/closedev.c
+++ b/Xi/closedev.c
@@ -108,7 +108,7 @@ DeleteDeviceEvents(DeviceIntPtr dev, WindowPtr pWin, ClientPtr client)
 
 /***********************************************************************
  *
- * Walk througth the window tree, deleting event selections for this client
+ * Walk through the window tree, deleting event selections for this client
  * from this device from all windows.
  *
  */
diff --git a/Xi/exevents.c b/Xi/exevents.c
index 659816a..dcd4efb 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -95,6 +95,7 @@ SOFTWARE.
 #include "exevents.h"
 #include "extnsionst.h"
 #include "exglobals.h"
+#include "eventstr.h"
 #include "dixevents.h"          /* DeliverFocusedEvent */
 #include "dixgrabs.h"           /* CreateGrab() */
 #include "scrnintstr.h"
@@ -168,6 +169,49 @@ IsTouchEvent(InternalEvent *event)
     return FALSE;
 }
 
+Bool
+IsGestureEvent(InternalEvent *event)
+{
+    switch (event->any.type) {
+    case ET_GesturePinchBegin:
+    case ET_GesturePinchUpdate:
+    case ET_GesturePinchEnd:
+    case ET_GestureSwipeBegin:
+    case ET_GestureSwipeUpdate:
+    case ET_GestureSwipeEnd:
+        return TRUE;
+    default:
+        break;
+    }
+    return FALSE;
+}
+
+Bool
+IsGestureBeginEvent(InternalEvent *event)
+{
+    switch (event->any.type) {
+    case ET_GesturePinchBegin:
+    case ET_GestureSwipeBegin:
+        return TRUE;
+    default:
+        break;
+    }
+    return FALSE;
+}
+
+Bool
+IsGestureEndEvent(InternalEvent *event)
+{
+    switch (event->any.type) {
+    case ET_GesturePinchEnd:
+    case ET_GestureSwipeEnd:
+        return TRUE;
+    default:
+        break;
+    }
+    return FALSE;
+}
+
 /**
  * @return the device matching the deviceid of the device set in the event, or
  * NULL if the event is not an XInput event.
@@ -575,8 +619,10 @@ DeepCopyPointerClasses(DeviceIntPtr from, DeviceIntPtr to)
             memcpy(to->button->xkb_acts, from->button->xkb_acts,
                    sizeof(XkbAction));
         }
-        else
+        else {
             free(to->button->xkb_acts);
+            to->button->xkb_acts = NULL;
+        }
 
         memcpy(to->button->labels, from->button->labels,
                from->button->numButtons * sizeof(Atom));
@@ -647,13 +693,32 @@ DeepCopyPointerClasses(DeviceIntPtr from, DeviceIntPtr to)
     /* Don't remove touch class if from->touch is non-existent. The to device
      * may have an active touch grab, so we need to keep the touch class record
      * around. */
+
+    if (from->gesture) {
+        if (!to->gesture) {
+            classes = to->unused_classes;
+            to->gesture = classes->gesture;
+            if (!to->gesture) {
+                if (!InitGestureClassDeviceStruct(to, from->gesture->max_touches))
+                    FatalError("[Xi] no memory for class shift.\n");
+            }
+            else
+                classes->gesture = NULL;
+        }
+
+        to->gesture->sourceid = from->gesture->sourceid;
+        /* to->gesture->gesture is separate on the master,  don't copy */
+    }
+    /* Don't remove gesture class if from->gesture is non-existent. The to device
+     * may have an active gesture grab, so we need to keep the gesture class record
+     * around. */
 }
 
 /**
  * Copies the CONTENT of the classes of device from into the classes in device
  * to. From and to are identical after finishing.
  *
- * If to does not have classes from currenly has, the classes are stored in
+ * If to does not have classes from currently has, the classes are stored in
  * to's devPrivates system. Later, we recover it again from there if needed.
  * Saves a few memory allocations.
  */
@@ -746,9 +811,8 @@ UpdateDeviceMotionMask(DeviceIntPtr device, unsigned short state,
 {
     Mask mask;
 
-    mask = DevicePointerMotionMask | state | motion_mask;
-    SetMaskForEvent(device->id, mask, DeviceMotionNotify);
     mask = PointerMotionMask | state | motion_mask;
+    SetMaskForEvent(device->id, mask, DeviceMotionNotify);
     SetMaskForEvent(device->id, mask, MotionNotify);
 }
 
@@ -1044,8 +1108,8 @@ ActivateEarlyAccept(DeviceIntPtr dev, TouchPointInfoPtr ti)
     XID error;
     GrabPtr grab = ti->listeners[0].grab;
 
-    BUG_RETURN(ti->listeners[0].type != LISTENER_GRAB &&
-               ti->listeners[0].type != LISTENER_POINTER_GRAB);
+    BUG_RETURN(ti->listeners[0].type != TOUCH_LISTENER_GRAB &&
+               ti->listeners[0].type != TOUCH_LISTENER_POINTER_GRAB);
     BUG_RETURN(!grab);
 
     client = rClient(grab);
@@ -1078,8 +1142,8 @@ FindOldestPointerEmulatedTouch(DeviceIntPtr dev)
             continue;
 
         for (j = 0; j < ti->num_listeners; j++) {
-            if (ti->listeners[j].type == LISTENER_POINTER_GRAB ||
-                ti->listeners[j].type == LISTENER_POINTER_REGULAR)
+            if (ti->listeners[j].type == TOUCH_LISTENER_POINTER_GRAB ||
+                ti->listeners[j].type == TOUCH_LISTENER_POINTER_REGULAR)
                 break;
         }
         if (j == ti->num_listeners)
@@ -1106,17 +1170,17 @@ TouchPuntToNextOwner(DeviceIntPtr dev, TouchPointInfoPtr ti,
                      TouchOwnershipEvent *ev)
 {
     TouchListener *listener = &ti->listeners[0]; /* new owner */
-    int accepted_early = listener->state == LISTENER_EARLY_ACCEPT;
+    int accepted_early = listener->state == TOUCH_LISTENER_EARLY_ACCEPT;
 
     /* Deliver the ownership */
-    if (listener->state == LISTENER_AWAITING_OWNER || accepted_early)
+    if (listener->state == TOUCH_LISTENER_AWAITING_OWNER || accepted_early)
         DeliverTouchEvents(dev, ti, (InternalEvent *) ev,
                            listener->listener);
-    else if (listener->state == LISTENER_AWAITING_BEGIN) {
+    else if (listener->state == TOUCH_LISTENER_AWAITING_BEGIN) {
         /* We can't punt to a pointer listener unless all older pointer
          * emulated touches have been seen already. */
-        if ((listener->type == LISTENER_POINTER_GRAB ||
-             listener->type == LISTENER_POINTER_REGULAR) &&
+        if ((listener->type == TOUCH_LISTENER_POINTER_GRAB ||
+             listener->type == TOUCH_LISTENER_POINTER_REGULAR) &&
             ti != FindOldestPointerEmulatedTouch(dev))
             return;
 
@@ -1159,7 +1223,7 @@ CheckOldestTouch(DeviceIntPtr dev)
 {
     TouchPointInfoPtr oldest = FindOldestPointerEmulatedTouch(dev);
 
-    if (oldest && oldest->listeners[0].state == LISTENER_AWAITING_BEGIN)
+    if (oldest && oldest->listeners[0].state == TOUCH_LISTENER_AWAITING_BEGIN)
         TouchPuntToNextOwner(dev, oldest, NULL);
 }
 
@@ -1183,7 +1247,7 @@ TouchRejected(DeviceIntPtr sourcedev, TouchPointInfoPtr ti, XID resource,
      * haven't received one yet already */
     for (i = 0; i < ti->num_listeners; i++) {
         if (ti->listeners[i].listener == resource) {
-            if (ti->listeners[i].state != LISTENER_HAS_END)
+            if (ti->listeners[i].state != TOUCH_LISTENER_HAS_END)
                 TouchEmitTouchEnd(sourcedev, ti, TOUCH_REJECT, resource);
             break;
         }
@@ -1229,12 +1293,12 @@ ProcessTouchOwnershipEvent(TouchOwnershipEvent *ev,
 
 
         /* For pointer-emulated listeners that ungrabbed the active grab,
-         * the state was forced to LISTENER_HAS_END. Still go
+         * the state was forced to TOUCH_LISTENER_HAS_END. Still go
          * through the motions of ending the touch if the listener has
          * already seen the end. This ensures that the touch record is ended in
          * the server.
          */
-        if (ti->listeners[0].state == LISTENER_HAS_END)
+        if (ti->listeners[0].state == TOUCH_LISTENER_HAS_END)
             TouchEmitTouchEnd(dev, ti, TOUCH_ACCEPT, ti->listeners[0].listener);
 
         /* The touch owner has accepted the touch.  Send TouchEnd events to
@@ -1245,10 +1309,10 @@ ProcessTouchOwnershipEvent(TouchOwnershipEvent *ev,
         while (ti->num_listeners > 1)
             TouchRemoveListener(ti, ti->listeners[1].listener);
         /* Owner accepted after receiving end */
-        if (ti->listeners[0].state == LISTENER_HAS_END)
+        if (ti->listeners[0].state == TOUCH_LISTENER_HAS_END)
             TouchEndTouch(dev, ti);
         else
-            ti->listeners[0].state = LISTENER_HAS_ACCEPTED;
+            ti->listeners[0].state = TOUCH_LISTENER_HAS_ACCEPTED;
     }
     else {  /* this is the very first ownership event for a grab */
         DeliverTouchEvents(dev, ti, (InternalEvent *) ev, ev->resource);
@@ -1293,21 +1357,13 @@ RetrieveTouchDeliveryData(DeviceIntPtr dev, TouchPointInfoPtr ti,
     int rc;
     InputClients *iclients = NULL;
     *mask = NULL;
-    *grab = NULL;
 
-    if (listener->type == LISTENER_GRAB ||
-        listener->type == LISTENER_POINTER_GRAB) {
+    if (listener->type == TOUCH_LISTENER_GRAB ||
+        listener->type == TOUCH_LISTENER_POINTER_GRAB) {
         *grab = listener->grab;
 
         BUG_RETURN_VAL(!*grab, FALSE);
-    }
-    else if (ti->emulate_pointer && dev->deviceGrab.grab &&
-             !dev->deviceGrab.fromPassiveGrab) {
-        /* There may be an active pointer grab on the device */
-        *grab = dev->deviceGrab.grab;
-    }
 
-    if (*grab) {
         *client = rClient(*grab);
         *win = (*grab)->window;
         *mask = (*grab)->xi2mask;
@@ -1323,7 +1379,7 @@ RetrieveTouchDeliveryData(DeviceIntPtr dev, TouchPointInfoPtr ti,
             int evtype;
 
             if (ti->emulate_pointer &&
-                listener->type == LISTENER_POINTER_REGULAR)
+                listener->type == TOUCH_LISTENER_POINTER_REGULAR)
                 evtype = GetXI2Type(TouchGetPointerEventType(ev));
             else
                 evtype = GetXI2Type(ev->any.type);
@@ -1364,6 +1420,8 @@ RetrieveTouchDeliveryData(DeviceIntPtr dev, TouchPointInfoPtr ti,
             /* if owner selected, oclients is NULL */
             *client = oclients ? rClient(oclients) : wClient(*win);
         }
+
+        *grab = NULL;
     }
 
     return TRUE;
@@ -1380,6 +1438,16 @@ DeliverTouchEmulatedEvent(DeviceIntPtr dev, TouchPointInfoPtr ti,
     int nevents;
     DeviceIntPtr kbd;
 
+    /* There may be a pointer grab on the device */
+    if (!grab) {
+        grab = dev->deviceGrab.grab;
+        if (grab) {
+            win = grab->window;
+            xi2mask = grab->xi2mask;
+            client = rClient(grab);
+        }
+    }
+
     /* We don't deliver pointer events to non-owners */
     if (!TouchResourceIsOwner(ti, listener->listener))
         return !Success;
@@ -1390,6 +1458,12 @@ DeliverTouchEmulatedEvent(DeviceIntPtr dev, TouchPointInfoPtr ti,
     nevents = TouchConvertToPointerEvent(ev, &motion, &button);
     BUG_RETURN_VAL(nevents == 0, BadValue);
 
+    /* Note that here we deliver only part of the events that are generated by the touch event:
+     *
+     * TouchBegin results in ButtonPress (motion is handled in DeliverEmulatedMotionEvent)
+     * TouchUpdate results in Motion
+     * TouchEnd results in ButtonRelease (motion is handled in DeliverEmulatedMotionEvent)
+     */
     if (nevents > 1)
         ptrev = &button;
 
@@ -1452,7 +1526,7 @@ DeliverTouchEmulatedEvent(DeviceIntPtr dev, TouchPointInfoPtr ti,
             g = AllocGrab(devgrab);
             BUG_WARN(!g);
 
-            *dev->deviceGrab.sync.event = ev->device_event;
+            CopyPartialInternalEvent(dev->deviceGrab.sync.event, ev);
 
             /* The listener array has a sequence of grabs and then one event
              * selection. Implicit grab activation occurs through delivering an
@@ -1464,16 +1538,16 @@ DeliverTouchEmulatedEvent(DeviceIntPtr dev, TouchPointInfoPtr ti,
             //l->resource_type = RT_NONE;
 
             if (devgrab->grabtype != XI2 || devgrab->type != XI_TouchBegin)
-                l->type = LISTENER_POINTER_GRAB;
+                l->type = TOUCH_LISTENER_POINTER_GRAB;
             else
-                l->type = LISTENER_GRAB;
+                l->type = TOUCH_LISTENER_GRAB;
         }
 
     }
     if (ev->any.type == ET_TouchBegin)
-        listener->state = LISTENER_IS_OWNER;
+        listener->state = TOUCH_LISTENER_IS_OWNER;
     else if (ev->any.type == ET_TouchEnd)
-        listener->state = LISTENER_HAS_END;
+        listener->state = TOUCH_LISTENER_HAS_END;
 
     return Success;
 }
@@ -1490,8 +1564,8 @@ DeliverEmulatedMotionEvent(DeviceIntPtr dev, TouchPointInfoPtr ti,
         GrabPtr grab;
         XI2Mask *mask;
 
-        if (ti->listeners[0].type != LISTENER_POINTER_REGULAR &&
-            ti->listeners[0].type != LISTENER_POINTER_GRAB)
+        if (ti->listeners[0].type != TOUCH_LISTENER_POINTER_REGULAR &&
+            ti->listeners[0].type != TOUCH_LISTENER_POINTER_GRAB)
             return;
 
         motion = ev->device_event;
@@ -1594,7 +1668,8 @@ ProcessTouchEvent(InternalEvent *ev, DeviceIntPtr dev)
     /* if emulate_pointer is set, emulate the motion event right
      * here, so we can ignore it for button event emulation. TouchUpdate
      * events which _only_ emulate motion just work normally */
-    if (emulate_pointer && ev->any.type != ET_TouchUpdate)
+    if (emulate_pointer && (ev->any.type == ET_TouchBegin ||
+                           (ev->any.type == ET_TouchEnd && ti->num_listeners > 0)))
         DeliverEmulatedMotionEvent(dev, ti, ev);
 
     if (emulate_pointer && IsMaster(dev))
@@ -1670,6 +1745,72 @@ ProcessBarrierEvent(InternalEvent *e, DeviceIntPtr dev)
     free(ev);
 }
 
+static BOOL
+IsAnotherGestureActiveOnMaster(DeviceIntPtr dev, InternalEvent* ev)
+{
+    GestureClassPtr g = dev->gesture;
+    if (g->gesture.active && g->gesture.sourceid != ev->gesture_event.sourceid) {
+        return TRUE;
+    }
+    return FALSE;
+}
+
+/**
+ * Processes and delivers a Gesture{Pinch,Swipe}{Begin,Update,End}.
+ *
+ * Due to having rather different delivery semantics (see the Xi 2.4 protocol
+ * spec for more information), this implements its own grab and event-selection
+ * delivery logic.
+ */
+void
+ProcessGestureEvent(InternalEvent *ev, DeviceIntPtr dev)
+{
+    GestureInfoPtr gi;
+    DeviceIntPtr kbd;
+    Bool deactivateGestureGrab = FALSE;
+    Bool delivered = FALSE;
+
+    if (!dev->gesture)
+        return;
+
+    if (IsMaster(dev) && IsAnotherGestureActiveOnMaster(dev, ev))
+        return;
+
+    if (IsGestureBeginEvent(ev))
+        gi = GestureBeginGesture(dev, ev);
+    else
+        gi = GestureFindActiveByEventType(dev, ev->any.type);
+
+    if (!gi) {
+        /* This may happen if gesture is no longer active or was never started. */
+        return;
+    }
+
+    kbd = GetMaster(dev, KEYBOARD_OR_FLOAT);
+    event_set_state_gesture(kbd, &ev->gesture_event);
+
+    if (IsGestureBeginEvent(ev))
+        GestureSetupListener(dev, gi, ev);
+
+    if (IsGestureEndEvent(ev) &&
+            dev->deviceGrab.grab &&
+            dev->deviceGrab.fromPassiveGrab &&
+            GrabIsGestureGrab(dev->deviceGrab.grab))
+        deactivateGestureGrab = TRUE;
+
+    delivered = DeliverGestureEventToOwner(dev, gi, ev);
+
+    if (delivered && !deactivateGestureGrab &&
+            (IsGestureBeginEvent(ev) || IsGestureEndEvent(ev)))
+        FreezeThisEventIfNeededForSyncGrab(dev, ev);
+
+    if (IsGestureEndEvent(ev))
+        GestureEndGesture(gi);
+
+    if (deactivateGestureGrab)
+        (*dev->deviceGrab.DeactivateGrab) (dev);
+}
+
 /**
  * Process DeviceEvents and DeviceChangedEvents.
  */
@@ -1762,7 +1903,7 @@ ProcessDeviceEvent(InternalEvent *ev, DeviceIntPtr device)
          * nested) to clients. */
         if (event->source_type == EVENT_SOURCE_FOCUS)
             return;
-        if (!grab && CheckDeviceGrabs(device, event, 0))
+        if (!grab && CheckDeviceGrabs(device, ev, 0))
             return;
         break;
     case ET_KeyRelease:
@@ -1775,7 +1916,7 @@ ProcessDeviceEvent(InternalEvent *ev, DeviceIntPtr device)
         if (b->map[key] == 0)   /* there's no button 0 */
             return;
         event->detail.button = b->map[key];
-        if (!grab && CheckDeviceGrabs(device, event, 0)) {
+        if (!grab && CheckDeviceGrabs(device, ev, 0)) {
             /* if a passive grab was activated, the event has been sent
              * already */
             return;
@@ -1864,6 +2005,14 @@ ProcessOtherEvent(InternalEvent *ev, DeviceIntPtr device)
     case ET_BarrierLeave:
         ProcessBarrierEvent(ev, device);
         break;
+    case ET_GesturePinchBegin:
+    case ET_GesturePinchUpdate:
+    case ET_GesturePinchEnd:
+    case ET_GestureSwipeBegin:
+    case ET_GestureSwipeUpdate:
+    case ET_GestureSwipeEnd:
+        ProcessGestureEvent(ev, device);
+        break;
     default:
         ProcessDeviceEvent(ev, device);
         break;
@@ -1880,14 +2029,14 @@ DeliverTouchBeginEvent(DeviceIntPtr dev, TouchPointInfoPtr ti,
     int rc = Success;
     Bool has_ownershipmask;
 
-    if (listener->type == LISTENER_POINTER_REGULAR ||
-        listener->type == LISTENER_POINTER_GRAB) {
+    if (listener->type == TOUCH_LISTENER_POINTER_REGULAR ||
+        listener->type == TOUCH_LISTENER_POINTER_GRAB) {
         rc = DeliverTouchEmulatedEvent(dev, ti, ev, listener, client, win,
                                        grab, xi2mask);
         if (rc == Success) {
-            listener->state = LISTENER_IS_OWNER;
+            listener->state = TOUCH_LISTENER_IS_OWNER;
             /* async grabs cannot replay, so automatically accept this touch */
-            if (listener->type == LISTENER_POINTER_GRAB &&
+            if (listener->type == TOUCH_LISTENER_POINTER_GRAB &&
                 dev->deviceGrab.grab &&
                 dev->deviceGrab.fromPassiveGrab &&
                 dev->deviceGrab.grab->pointerMode == GrabModeAsync)
@@ -1902,18 +2051,18 @@ DeliverTouchBeginEvent(DeviceIntPtr dev, TouchPointInfoPtr ti,
         rc = DeliverOneTouchEvent(client, dev, ti, grab, win, ev);
     if (!TouchResourceIsOwner(ti, listener->listener)) {
         if (has_ownershipmask)
-            state = LISTENER_AWAITING_OWNER;
+            state = TOUCH_LISTENER_AWAITING_OWNER;
         else
-            state = LISTENER_AWAITING_BEGIN;
+            state = TOUCH_LISTENER_AWAITING_BEGIN;
     }
     else {
         if (has_ownershipmask)
             TouchSendOwnershipEvent(dev, ti, 0, listener->listener);
 
-        if (listener->type == LISTENER_REGULAR)
-            state = LISTENER_HAS_ACCEPTED;
+        if (listener->type == TOUCH_LISTENER_REGULAR)
+            state = TOUCH_LISTENER_HAS_ACCEPTED;
         else
-            state = LISTENER_IS_OWNER;
+            state = TOUCH_LISTENER_IS_OWNER;
     }
     listener->state = state;
 
@@ -1928,14 +2077,14 @@ DeliverTouchEndEvent(DeviceIntPtr dev, TouchPointInfoPtr ti, InternalEvent *ev,
 {
     int rc = Success;
 
-    if (listener->type == LISTENER_POINTER_REGULAR ||
-        listener->type == LISTENER_POINTER_GRAB) {
+    if (listener->type == TOUCH_LISTENER_POINTER_REGULAR ||
+        listener->type == TOUCH_LISTENER_POINTER_GRAB) {
         /* Note: If the active grab was ungrabbed, we already changed the
-         * state to LISTENER_HAS_END but still get here. So we mustn't
+         * state to TOUCH_LISTENER_HAS_END but still get here. So we mustn't
          * actually send the event.
          * This is part two of the hack in DeactivatePointerGrab
          */
-        if (listener->state != LISTENER_HAS_END) {
+        if (listener->state != TOUCH_LISTENER_HAS_END) {
             rc = DeliverTouchEmulatedEvent(dev, ti, ev, listener, client, win,
                                            grab, xi2mask);
 
@@ -1945,14 +2094,14 @@ DeliverTouchEndEvent(DeviceIntPtr dev, TouchPointInfoPtr ti, InternalEvent *ev,
               * and we can continue.
               */
             if (rc == Success)
-                listener->state = LISTENER_HAS_END;
+                listener->state = TOUCH_LISTENER_HAS_END;
         }
         goto out;
     }
 
     /* A client is waiting for the begin, don't give it a TouchEnd */
-    if (listener->state == LISTENER_AWAITING_BEGIN) {
-        listener->state = LISTENER_HAS_END;
+    if (listener->state == TOUCH_LISTENER_AWAITING_BEGIN) {
+        listener->state = TOUCH_LISTENER_HAS_END;
         goto out;
     }
 
@@ -1960,19 +2109,19 @@ DeliverTouchEndEvent(DeviceIntPtr dev, TouchPointInfoPtr ti, InternalEvent *ev,
     if (ev->device_event.flags & TOUCH_REJECT ||
         (ev->device_event.flags & TOUCH_ACCEPT && !TouchResourceIsOwner(ti, listener->listener))) {
         /* Touch has been rejected, or accepted by its owner which is not this listener */
-        if (listener->state != LISTENER_HAS_END)
+        if (listener->state != TOUCH_LISTENER_HAS_END)
             rc = DeliverOneTouchEvent(client, dev, ti, grab, win, ev);
-        listener->state = LISTENER_HAS_END;
+        listener->state = TOUCH_LISTENER_HAS_END;
     }
     else if (TouchResourceIsOwner(ti, listener->listener)) {
         Bool normal_end = !(ev->device_event.flags & TOUCH_ACCEPT);
 
         /* FIXME: what about early acceptance */
-        if (normal_end && listener->state != LISTENER_HAS_END)
+        if (normal_end && listener->state != TOUCH_LISTENER_HAS_END)
             rc = DeliverOneTouchEvent(client, dev, ti, grab, win, ev);
 
         if ((ti->num_listeners > 1 ||
-             (ti->num_grabs > 0 && listener->state != LISTENER_HAS_ACCEPTED)) &&
+             (ti->num_grabs > 0 && listener->state != TOUCH_LISTENER_HAS_ACCEPTED)) &&
             (ev->device_event.flags & (TOUCH_ACCEPT | TOUCH_REJECT)) == 0) {
             ev->any.type = ET_TouchUpdate;
             ev->device_event.flags |= TOUCH_PENDING_END;
@@ -1980,7 +2129,7 @@ DeliverTouchEndEvent(DeviceIntPtr dev, TouchPointInfoPtr ti, InternalEvent *ev,
         }
 
         if (normal_end)
-            listener->state = LISTENER_HAS_END;
+            listener->state = TOUCH_LISTENER_HAS_END;
     }
 
  out:
@@ -2003,7 +2152,7 @@ DeliverTouchEvent(DeviceIntPtr dev, TouchPointInfoPtr ti, InternalEvent *ev,
         if (!TouchResourceIsOwner(ti, listener->listener))
             goto out;
         rc = DeliverOneTouchEvent(client, dev, ti, grab, win, ev);
-        listener->state = LISTENER_IS_OWNER;
+        listener->state = TOUCH_LISTENER_IS_OWNER;
     }
     else
         ev->device_event.deviceid = dev->id;
@@ -2013,8 +2162,8 @@ DeliverTouchEvent(DeviceIntPtr dev, TouchPointInfoPtr ti, InternalEvent *ev,
                                     xi2mask);
     }
     else if (ev->any.type == ET_TouchUpdate) {
-        if (listener->type == LISTENER_POINTER_REGULAR ||
-            listener->type == LISTENER_POINTER_GRAB)
+        if (listener->type == TOUCH_LISTENER_POINTER_REGULAR ||
+            listener->type == TOUCH_LISTENER_POINTER_GRAB)
             DeliverTouchEmulatedEvent(dev, ti, ev, listener, client, win, grab,
                                       xi2mask);
         else if (TouchResourceIsOwner(ti, listener->listener) ||
@@ -2068,6 +2217,111 @@ DeliverTouchEvents(DeviceIntPtr dev, TouchPointInfoPtr ti,
     }
 }
 
+/**
+ * Attempts to deliver a gesture event to the given client.
+ */
+static Bool
+DeliverOneGestureEvent(ClientPtr client, DeviceIntPtr dev, GestureInfoPtr gi,
+                       GrabPtr grab, WindowPtr win, InternalEvent *ev)
+{
+    int err;
+    xEvent *xi2;
+    Mask filter;
+    Window child = DeepestSpriteWin(&gi->sprite)->drawable.id;
+
+    /* If we fail here, we're going to leave a client hanging. */
+    err = EventToXI2(ev, &xi2);
+    if (err != Success)
+        FatalError("[Xi] %s: XI2 conversion failed in %s"
+                   " (%d)\n", dev->name, __func__, err);
+
+    FixUpEventFromWindow(&gi->sprite, xi2, win, child, FALSE);
+    filter = GetEventFilter(dev, xi2);
+    if (XaceHook(XACE_RECEIVE_ACCESS, client, win, xi2, 1) != Success)
+        return FALSE;
+    err = TryClientEvents(client, dev, xi2, 1, filter, filter, NullGrab);
+    free(xi2);
+
+    /* Returning the value from TryClientEvents isn't useful, since all our
+     * resource-gone cleanups will update the delivery list anyway. */
+    return TRUE;
+}
+
+/**
+ * Given a gesture event and a potential listener, retrieve info needed for processing the event.
+ *
+ * @param dev The device generating the gesture event.
+ * @param ev The gesture event to process.
+ * @param listener The gesture event listener that may receive the gesture event.
+ * @param[out] client The client that should receive the gesture event.
+ * @param[out] win The window to deliver the event on.
+ * @param[out] grab The grab to deliver the event through, if any.
+ * @return TRUE if an event should be delivered to the listener, FALSE
+ *         otherwise.
+ */
+static Bool
+RetrieveGestureDeliveryData(DeviceIntPtr dev, InternalEvent *ev, GestureListener* listener,
+                            ClientPtr *client, WindowPtr *win, GrabPtr *grab)
+{
+    int rc;
+    int evtype;
+    InputClients *iclients = NULL;
+    *grab = NULL;
+
+    if (listener->type == GESTURE_LISTENER_GRAB ||
+        listener->type == GESTURE_LISTENER_NONGESTURE_GRAB) {
+        *grab = listener->grab;
+
+        BUG_RETURN_VAL(!*grab, FALSE);
+
+        *client = rClient(*grab);
+        *win = (*grab)->window;
+    }
+    else {
+        rc = dixLookupResourceByType((void **) win, listener->listener, listener->resource_type,
+                                     serverClient, DixSendAccess);
+        if (rc != Success)
+            return FALSE;
+
+        /* note that we only will have XI2 listeners as
+           listener->type == GESTURE_LISTENER_REGULAR */
+        evtype = GetXI2Type(ev->any.type);
+
+        nt_list_for_each_entry(iclients, wOtherInputMasks(*win)->inputClients, next)
+            if (xi2mask_isset(iclients->xi2mask, dev, evtype))
+                break;
+
+        BUG_RETURN_VAL(!iclients, FALSE);
+
+        *client = rClient(iclients);
+    }
+
+    return TRUE;
+}
+
+/**
+ * Delivers a gesture to the owner, if possible and needed. Returns whether
+ * an event was delivered.
+ */
+Bool
+DeliverGestureEventToOwner(DeviceIntPtr dev, GestureInfoPtr gi, InternalEvent *ev)
+{
+    GrabPtr grab = NULL;
+    ClientPtr client;
+    WindowPtr win;
+
+    if (!gi->has_listener || gi->listener.type == GESTURE_LISTENER_NONGESTURE_GRAB) {
+        return 0;
+    }
+
+    if (!RetrieveGestureDeliveryData(dev, ev, &gi->listener, &client, &win, &grab))
+        return 0;
+
+    ev->gesture_event.deviceid = dev->id;
+
+    return DeliverOneGestureEvent(client, dev, gi, grab, win, ev);
+}
+
 int
 InitProximityClassDeviceStruct(DeviceIntPtr dev)
 {
@@ -2373,8 +2627,8 @@ GrabWindow(ClientPtr client, DeviceIntPtr dev, int type,
 
 /* Touch grab */
 int
-GrabTouch(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr mod_dev,
-          GrabParameters *param, GrabMask *mask)
+GrabTouchOrGesture(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr mod_dev,
+                   int type, GrabParameters *param, GrabMask *mask)
 {
     WindowPtr pWin;
     GrabPtr grab;
@@ -2392,7 +2646,7 @@ GrabTouch(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr mod_dev,
         return rc;
 
     grab = CreateGrab(client->index, dev, mod_dev, pWin, XI2,
-                      mask, param, XI_TouchBegin, 0, NullWindow, NullCursor);
+                      mask, param, type, 0, NullWindow, NullCursor);
     if (!grab)
         return BadAlloc;
 
@@ -2522,6 +2776,12 @@ FreeInputMask(OtherInputMasks ** imask)
     *imask = NULL;
 }
 
+#define XIPropagateMask (KeyPressMask | \
+                         KeyReleaseMask | \
+                         ButtonPressMask | \
+                         ButtonReleaseMask | \
+                         PointerMotionMask)
+
 void
 RecalculateDeviceDeliverableEvents(WindowPtr pWin)
 {
@@ -2548,7 +2808,7 @@ RecalculateDeviceDeliverableEvents(WindowPtr pWin)
                         inputMasks->deliverableEvents[i] |=
                             (wOtherInputMasks(tmp)->deliverableEvents[i]
                              & ~inputMasks->dontPropagateMask[i] &
-                             PropagateMask[i]);
+                             XIPropagateMask);
         }
         if (pChild->firstChild) {
             pChild = pChild->firstChild;
@@ -2662,7 +2922,7 @@ SendEvent(ClientPtr client, DeviceIntPtr d, Window dest, Bool propagate,
             return Success;
 
         /* If the input focus is PointerRootWin, send the event to where
-         * the pointer is if possible, then perhaps propogate up to root. */
+         * the pointer is if possible, then perhaps propagate up to root. */
         if (inputFocus == PointerRootWin)
             inputFocus = GetCurrentRootWindow(d);
 
@@ -2961,7 +3221,7 @@ DeviceEventSuppressForWindow(WindowPtr pWin, ClientPtr client, Mask mask,
 {
     struct _OtherInputMasks *inputMasks = wOtherInputMasks(pWin);
 
-    if (mask & ~PropagateMask[maskndx]) {
+    if (mask & ~XIPropagateMask) {
         client->errorValue = mask;
         return BadValue;
     }
diff --git a/Xi/exglobals.h b/Xi/exglobals.h
index 9f235e0..461a7f8 100644
--- a/Xi/exglobals.h
+++ b/Xi/exglobals.h
@@ -44,7 +44,6 @@ extern int DeviceBusy;
 extern int BadClass;
 
 /* Note: only the ones needed in files other than extinit.c are declared */
-extern const Mask DevicePointerMotionMask;
 extern const Mask DevicePointerMotionHintMask;
 extern const Mask DeviceFocusChangeMask;
 extern const Mask DeviceStateNotifyMask;
@@ -56,8 +55,6 @@ extern const Mask DevicePresenceNotifyMask;
 extern const Mask DevicePropertyNotifyMask;
 extern const Mask XIAllMasks;
 
-extern Mask PropagateMask[];
-
 extern int DeviceValuator;
 extern int DeviceKeyPress;
 extern int DeviceKeyRelease;
diff --git a/Xi/extinit.c b/Xi/extinit.c
index 33dacbe..4e5a13f 100644
--- a/Xi/extinit.c
+++ b/Xi/extinit.c
@@ -129,13 +129,8 @@ SOFTWARE.
  * breaks down. The device needs the dev->button->motionMask. If DBMM is
  * the same as BMM, we can ensure that both core and device events can be
  * delivered, without the need for extra structures in the DeviceIntRec. */
-const Mask DeviceKeyPressMask = KeyPressMask;
-const Mask DeviceKeyReleaseMask = KeyReleaseMask;
-const Mask DeviceButtonPressMask = ButtonPressMask;
-const Mask DeviceButtonReleaseMask = ButtonReleaseMask;
 const Mask DeviceProximityMask = (1L << 4);
 const Mask DeviceStateNotifyMask = (1L << 5);
-const Mask DevicePointerMotionMask = PointerMotionMask;
 const Mask DevicePointerMotionHintMask = PointerMotionHintMask;
 const Mask DeviceButton1MotionMask = Button1MotionMask;
 const Mask DeviceButton2MotionMask = Button2MotionMask;
@@ -153,7 +148,6 @@ const Mask DevicePropertyNotifyMask = (1L << 19);
 const Mask XIAllMasks = (1L << 20) - 1;
 
 int ExtEventIndex;
-Mask ExtExclusiveMasks[EMASKSIZE];
 
 static struct dev_type {
     Atom type;
@@ -364,8 +358,6 @@ RESTYPE RT_INPUTCLIENT;
 
 extern XExtensionVersion XIVersion;
 
-Mask PropagateMask[EMASKSIZE];
-
 /*****************************************************************
  *
  * Versioning support
@@ -520,7 +512,7 @@ static void
 SEventDeviceValuator(deviceValuator * from, deviceValuator * to)
 {
     int i;
-    INT32 *ip B32;
+    INT32 *ip;
 
     *to = *from;
     swaps(&to->sequenceNumber);
@@ -544,7 +536,7 @@ static void
 SDeviceStateNotifyEvent(deviceStateNotify * from, deviceStateNotify * to)
 {
     int i;
-    INT32 *ip B32;
+    INT32 *ip;
 
     *to = *from;
     swaps(&to->sequenceNumber);
@@ -858,6 +850,74 @@ SBarrierEvent(xXIBarrierEvent * from,
     swapl(&to->eventid);
 }
 
+static void
+SGesturePinchEvent(xXIGesturePinchEvent* from,
+                   xXIGesturePinchEvent* to)
+{
+    *to = *from;
+
+    swaps(&to->sequenceNumber);
+    swapl(&to->length);
+    swaps(&to->evtype);
+    swaps(&to->deviceid);
+    swapl(&to->time);
+    swapl(&to->detail);
+    swapl(&to->root);
+    swapl(&to->event);
+    swapl(&to->child);
+    swapl(&to->root_x);
+    swapl(&to->root_y);
+    swapl(&to->event_x);
+    swapl(&to->event_y);
+
+    swapl(&to->delta_x);
+    swapl(&to->delta_y);
+    swapl(&to->delta_unaccel_x);
+    swapl(&to->delta_unaccel_y);
+    swapl(&to->scale);
+    swapl(&to->delta_angle);
+    swaps(&to->sourceid);
+
+    swapl(&to->mods.base_mods);
+    swapl(&to->mods.latched_mods);
+    swapl(&to->mods.locked_mods);
+    swapl(&to->mods.effective_mods);
+    swapl(&to->flags);
+}
+
+static void
+SGestureSwipeEvent(xXIGestureSwipeEvent* from,
+                   xXIGestureSwipeEvent* to)
+{
+    *to = *from;
+
+    swaps(&to->sequenceNumber);
+    swapl(&to->length);
+    swaps(&to->evtype);
+    swaps(&to->deviceid);
+    swapl(&to->time);
+    swapl(&to->detail);
+    swapl(&to->root);
+    swapl(&to->event);
+    swapl(&to->child);
+    swapl(&to->root_x);
+    swapl(&to->root_y);
+    swapl(&to->event_x);
+    swapl(&to->event_y);
+
+    swapl(&to->delta_x);
+    swapl(&to->delta_y);
+    swapl(&to->delta_unaccel_x);
+    swapl(&to->delta_unaccel_y);
+    swaps(&to->sourceid);
+
+    swapl(&to->mods.base_mods);
+    swapl(&to->mods.latched_mods);
+    swapl(&to->mods.locked_mods);
+    swapl(&to->mods.effective_mods);
+    swapl(&to->flags);
+}
+
 /** Event swapping function for XI2 events. */
 void _X_COLD
 XI2EventSwap(xGenericEvent *from, xGenericEvent *to)
@@ -909,28 +969,24 @@ XI2EventSwap(xGenericEvent *from, xGenericEvent *to)
         SBarrierEvent((xXIBarrierEvent *) from,
                       (xXIBarrierEvent *) to);
         break;
+    case XI_GesturePinchBegin:
+    case XI_GesturePinchUpdate:
+    case XI_GesturePinchEnd:
+        SGesturePinchEvent((xXIGesturePinchEvent*) from,
+                           (xXIGesturePinchEvent*) to);
+        break;
+    case XI_GestureSwipeBegin:
+    case XI_GestureSwipeUpdate:
+    case XI_GestureSwipeEnd:
+        SGestureSwipeEvent((xXIGestureSwipeEvent*) from,
+                           (xXIGestureSwipeEvent*) to);
+        break;
     default:
         ErrorF("[Xi] Unknown event type to swap. This is a bug.\n");
         break;
     }
 }
 
-/**************************************************************************
- *
- * Allow the specified event to have its propagation suppressed.
- * The default is to not allow suppression of propagation.
- *
- */
-
-static void
-AllowPropagateSuppress(Mask mask)
-{
-    int i;
-
-    for (i = 0; i < MAXDEVICES; i++)
-        PropagateMask[i] |= mask;
-}
-
 /**************************************************************************
  *
  * Record an event mask where there is no unique corresponding event type.
@@ -951,23 +1007,6 @@ SetEventInfo(Mask mask, int constant)
     EventInfo[ExtEventIndex++].type = constant;
 }
 
-/**************************************************************************
- *
- * Allow the specified event to be restricted to being selected by one
- * client at a time.
- * The default is to allow more than one client to select the event.
- *
- */
-
-static void
-SetExclusiveAccess(Mask mask)
-{
-    int i;
-
-    for (i = 0; i < MAXDEVICES; i++)
-        ExtExclusiveMasks[i] |= mask;
-}
-
 /**************************************************************************
  *
  * Assign the specified mask to the specified event.
@@ -1029,20 +1068,16 @@ FixExtensionEvents(ExtensionEntry * extEntry)
     DeviceBusy += extEntry->errorBase;
     BadClass += extEntry->errorBase;
 
-    SetMaskForExtEvent(DeviceKeyPressMask, DeviceKeyPress);
-    AllowPropagateSuppress(DeviceKeyPressMask);
+    SetMaskForExtEvent(KeyPressMask, DeviceKeyPress);
     SetCriticalEvent(DeviceKeyPress);
 
-    SetMaskForExtEvent(DeviceKeyReleaseMask, DeviceKeyRelease);
-    AllowPropagateSuppress(DeviceKeyReleaseMask);
+    SetMaskForExtEvent(KeyReleaseMask, DeviceKeyRelease);
     SetCriticalEvent(DeviceKeyRelease);
 
-    SetMaskForExtEvent(DeviceButtonPressMask, DeviceButtonPress);
-    AllowPropagateSuppress(DeviceButtonPressMask);
+    SetMaskForExtEvent(ButtonPressMask, DeviceButtonPress);
     SetCriticalEvent(DeviceButtonPress);
 
-    SetMaskForExtEvent(DeviceButtonReleaseMask, DeviceButtonRelease);
-    AllowPropagateSuppress(DeviceButtonReleaseMask);
+    SetMaskForExtEvent(ButtonReleaseMask, DeviceButtonRelease);
     SetCriticalEvent(DeviceButtonRelease);
 
     SetMaskForExtEvent(DeviceProximityMask, ProximityIn);
@@ -1050,8 +1085,7 @@ FixExtensionEvents(ExtensionEntry * extEntry)
 
     SetMaskForExtEvent(DeviceStateNotifyMask, DeviceStateNotify);
 
-    SetMaskForExtEvent(DevicePointerMotionMask, DeviceMotionNotify);
-    AllowPropagateSuppress(DevicePointerMotionMask);
+    SetMaskForExtEvent(PointerMotionMask, DeviceMotionNotify);
     SetCriticalEvent(DeviceMotionNotify);
 
     SetEventInfo(DevicePointerMotionHintMask, _devicePointerMotionHint);
@@ -1069,8 +1103,6 @@ FixExtensionEvents(ExtensionEntry * extEntry)
     SetMaskForExtEvent(ChangeDeviceNotifyMask, ChangeDeviceNotify);
 
     SetEventInfo(DeviceButtonGrabMask, _deviceButtonGrab);
-    SetExclusiveAccess(DeviceButtonGrabMask);
-
     SetEventInfo(DeviceOwnerGrabButtonMask, _deviceOwnerGrabButton);
     SetEventInfo(DevicePresenceNotifyMask, _devicePresence);
     SetMaskForExtEvent(DevicePropertyNotifyMask, DevicePropertyNotify);
diff --git a/Xi/grabdev.c b/Xi/grabdev.c
index eb4f9bf..cb68cfa 100644
--- a/Xi/grabdev.c
+++ b/Xi/grabdev.c
@@ -153,7 +153,7 @@ ProcXGrabDevice(ClientPtr client)
  * set when XI starts up) and binary OR's the device's mask to whatever the
  * event mask for the given event type was.
  * If an error occurs, it is sent to the client. Errors are generated if
- *  - if the device given in the event classs is invalid
+ *  - if the device given in the event class is invalid
  *  - if the device in the class list is not the device given as parameter (no
  *  error if parameter is NULL)
  *
diff --git a/Xi/selectev.c b/Xi/selectev.c
index b9b8112..65c7bc8 100644
--- a/Xi/selectev.c
+++ b/Xi/selectev.c
@@ -65,8 +65,6 @@ SOFTWARE.
 #include "grabdev.h"
 #include "selectev.h"
 
-extern Mask ExtExclusiveMasks[];
-
 static int
 HandleDevicePresenceMask(ClientPtr client, WindowPtr win,
                          XEventClass * cls, CARD16 *count)
@@ -175,7 +173,7 @@ ProcXSelectExtensionEvent(ClientPtr client)
             }
             if ((ret =
                  SelectForWindow((DeviceIntPtr) tmp[i].dev, pWin, client,
-                                 tmp[i].mask, ExtExclusiveMasks[i])) != Success)
+                                 tmp[i].mask, DeviceButtonGrabMask)) != Success)
                 return ret;
         }
 
diff --git a/Xi/xichangehierarchy.h b/Xi/xichangehierarchy.h
index 8ec1915..649b654 100644
--- a/Xi/xichangehierarchy.h
+++ b/Xi/xichangehierarchy.h
@@ -39,6 +39,6 @@
 int SProcXIChangeHierarchy(ClientPtr /* client */ );
 int ProcXIChangeHierarchy(ClientPtr /* client */ );
 
-void XISendDeviceHierarchyEvent(int flags[]);
+void XISendDeviceHierarchyEvent(int flags[MAXDEVICES]);
 
 #endif                          /* CHDEVHIER_H */
diff --git a/Xi/xipassivegrab.c b/Xi/xipassivegrab.c
index d30f51f..c9ac2f8 100644
--- a/Xi/xipassivegrab.c
+++ b/Xi/xipassivegrab.c
@@ -114,14 +114,18 @@ ProcXIPassiveGrabDevice(ClientPtr client)
         stuff->grab_type != XIGrabtypeKeycode &&
         stuff->grab_type != XIGrabtypeEnter &&
         stuff->grab_type != XIGrabtypeFocusIn &&
-        stuff->grab_type != XIGrabtypeTouchBegin) {
+        stuff->grab_type != XIGrabtypeTouchBegin &&
+        stuff->grab_type != XIGrabtypeGesturePinchBegin &&
+        stuff->grab_type != XIGrabtypeGestureSwipeBegin) {
         client->errorValue = stuff->grab_type;
         return BadValue;
     }
 
     if ((stuff->grab_type == XIGrabtypeEnter ||
          stuff->grab_type == XIGrabtypeFocusIn ||
-         stuff->grab_type == XIGrabtypeTouchBegin) && stuff->detail != 0) {
+         stuff->grab_type == XIGrabtypeTouchBegin ||
+         stuff->grab_type == XIGrabtypeGesturePinchBegin ||
+         stuff->grab_type == XIGrabtypeGestureSwipeBegin) && stuff->detail != 0) {
         client->errorValue = stuff->detail;
         return BadValue;
     }
@@ -133,6 +137,12 @@ ProcXIPassiveGrabDevice(ClientPtr client)
         return BadValue;
     }
 
+    /* XI2 allows 32-bit keycodes but thanks to XKB we can never
+     * implement this. Just return an error for all keycodes that
+     * cannot work anyway, same for buttons > 255. */
+    if (stuff->detail > 255)
+        return XIAlreadyGrabbed;
+
     if (XICheckInvalidMaskBits(client, (unsigned char *) &stuff[1],
                                stuff->mask_len * 4) != Success)
         return BadValue;
@@ -203,21 +213,24 @@ ProcXIPassiveGrabDevice(ClientPtr client)
                                 &param, XI2, &mask);
             break;
         case XIGrabtypeKeycode:
-            /* XI2 allows 32-bit keycodes but thanks to XKB we can never
-             * implement this. Just return an error for all keycodes that
-             * cannot work anyway */
-            if (stuff->detail > 255)
-                status = XIAlreadyGrabbed;
-            else
-                status = GrabKey(client, dev, mod_dev, stuff->detail,
-                                 &param, XI2, &mask);
+            status = GrabKey(client, dev, mod_dev, stuff->detail,
+                             &param, XI2, &mask);
             break;
         case XIGrabtypeEnter:
         case XIGrabtypeFocusIn:
             status = GrabWindow(client, dev, stuff->grab_type, &param, &mask);
             break;
         case XIGrabtypeTouchBegin:
-            status = GrabTouch(client, dev, mod_dev, &param, &mask);
+            status = GrabTouchOrGesture(client, dev, mod_dev, XI_TouchBegin,
+                                        &param, &mask);
+            break;
+        case XIGrabtypeGesturePinchBegin:
+            status = GrabTouchOrGesture(client, dev, mod_dev,
+                                        XI_GesturePinchBegin, &param, &mask);
+            break;
+        case XIGrabtypeGestureSwipeBegin:
+            status = GrabTouchOrGesture(client, dev, mod_dev,
+                                        XI_GestureSwipeBegin, &param, &mask);
             break;
         }
 
@@ -307,7 +320,9 @@ ProcXIPassiveUngrabDevice(ClientPtr client)
         stuff->grab_type != XIGrabtypeKeycode &&
         stuff->grab_type != XIGrabtypeEnter &&
         stuff->grab_type != XIGrabtypeFocusIn &&
-        stuff->grab_type != XIGrabtypeTouchBegin) {
+        stuff->grab_type != XIGrabtypeTouchBegin &&
+        stuff->grab_type != XIGrabtypeGesturePinchBegin &&
+        stuff->grab_type != XIGrabtypeGestureSwipeBegin) {
         client->errorValue = stuff->grab_type;
         return BadValue;
     }
@@ -319,6 +334,12 @@ ProcXIPassiveUngrabDevice(ClientPtr client)
         return BadValue;
     }
 
+    /* We don't allow passive grabs for details > 255 anyway */
+    if (stuff->detail > 255) {
+        client->errorValue = stuff->detail;
+        return BadValue;
+    }
+
     rc = dixLookupWindow(&win, stuff->grab_window, client, DixSetAttrAccess);
     if (rc != Success)
         return rc;
@@ -348,6 +369,12 @@ ProcXIPassiveUngrabDevice(ClientPtr client)
     case XIGrabtypeTouchBegin:
         tempGrab->type = XI_TouchBegin;
         break;
+    case XIGrabtypeGesturePinchBegin:
+        tempGrab->type = XI_GesturePinchBegin;
+        break;
+    case XIGrabtypeGestureSwipeBegin:
+        tempGrab->type = XI_GestureSwipeBegin;
+        break;
     }
     tempGrab->grabtype = XI2;
     tempGrab->modifierDevice = mod_dev;
diff --git a/Xi/xiproperty.c b/Xi/xiproperty.c
index 6ec419e..066ba21 100644
--- a/Xi/xiproperty.c
+++ b/Xi/xiproperty.c
@@ -414,7 +414,7 @@ XIResetProperties(void)
  * @param val The property value
  * @param nelem_return The maximum number of elements to return.
  * @param buf_return Pointer to an array of at least @nelem_return values.
- * @return Success or the error code if an error occured.
+ * @return Success or the error code if an error occurred.
  */
 _X_EXPORT int
 XIPropToInt(XIPropertyValuePtr val, int *nelem_return, int **buf_return)
@@ -484,7 +484,7 @@ XIPropToInt(XIPropertyValuePtr val, int *nelem_return, int **buf_return)
  * @param val The property value
  * @param nelem_return The maximum number of elements to return.
  * @param buf_return Pointer to an array of at least @nelem_return values.
- * @return Success or the error code if an error occured.
+ * @return Success or the error code if an error occurred.
  */
 _X_EXPORT int
 XIPropToFloat(XIPropertyValuePtr val, int *nelem_return, float **buf_return)
@@ -521,7 +521,7 @@ XIPropToFloat(XIPropertyValuePtr val, int *nelem_return, float **buf_return)
 /* Registers a new property handler on the given device and returns a unique
  * identifier for this handler. This identifier is required to unregister the
  * property handler again.
- * @return The handler's identifier or 0 if an error occured.
+ * @return The handler's identifier or 0 if an error occurred.
  */
 long
 XIRegisterPropertyHandler(DeviceIntPtr dev,
@@ -890,7 +890,7 @@ ProcXChangeDeviceProperty(ClientPtr client)
     REQUEST(xChangeDevicePropertyReq);
     DeviceIntPtr dev;
     unsigned long len;
-    int totalSize;
+    uint64_t totalSize;
     int rc;
 
     REQUEST_AT_LEAST_SIZE(xChangeDevicePropertyReq);
@@ -902,6 +902,8 @@ ProcXChangeDeviceProperty(ClientPtr client)
 
     rc = check_change_property(client, stuff->property, stuff->type,
                                stuff->format, stuff->mode, stuff->nUnits);
+    if (rc != Success)
+        return rc;
 
     len = stuff->nUnits;
     if (len > (bytes_to_int32(0xffffffff - sizeof(xChangeDevicePropertyReq))))
@@ -1128,7 +1130,7 @@ ProcXIChangeProperty(ClientPtr client)
 {
     int rc;
     DeviceIntPtr dev;
-    int totalSize;
+    uint64_t totalSize;
     unsigned long len;
 
     REQUEST(xXIChangePropertyReq);
@@ -1141,6 +1143,9 @@ ProcXIChangeProperty(ClientPtr client)
 
     rc = check_change_property(client, stuff->property, stuff->type,
                                stuff->format, stuff->mode, stuff->num_items);
+    if (rc != Success)
+        return rc;
+
     len = stuff->num_items;
     if (len > bytes_to_int32(0xffffffff - sizeof(xXIChangePropertyReq)))
         return BadLength;
diff --git a/Xi/xiquerydevice.c b/Xi/xiquerydevice.c
index fbb51fe..e4731a1 100644
--- a/Xi/xiquerydevice.c
+++ b/Xi/xiquerydevice.c
@@ -43,6 +43,9 @@
 #include "xace.h"
 #include "inpututils.h"
 
+#include "exglobals.h"
+#include "privates.h"
+
 #include "xiquerydevice.h"
 
 static Bool ShouldSkipDevice(ClientPtr client, int deviceid, DeviceIntPtr d);
@@ -234,6 +237,9 @@ SizeDeviceClasses(DeviceIntPtr dev)
     if (dev->touch)
         len += sizeof(xXITouchInfo);
 
+    if (dev->gesture)
+        len += sizeof(xXIGestureInfo);
+
     return len;
 }
 
@@ -464,6 +470,46 @@ SwapTouchInfo(DeviceIntPtr dev, xXITouchInfo * touch)
     swaps(&touch->sourceid);
 }
 
+static Bool ShouldListGestureInfo(ClientPtr client)
+{
+    /* libxcb 14.1 and older are not forwards-compatible with new device classes as it does not
+     * properly ignore unknown device classes. Since breaking libxcb would break quite a lot of
+     * applications, we instead report Gesture device class only if the client advertised support
+     * for XI 2.4. Clients may still not work in cases when a client advertises XI 2.4 support
+     * and then a completely separate module within the client uses broken libxcb to call
+     * XIQueryDevice.
+     */
+    XIClientPtr pXIClient = dixLookupPrivate(&client->devPrivates, XIClientPrivateKey);
+    if (pXIClient->major_version) {
+        return version_compare(pXIClient->major_version, pXIClient->minor_version, 2, 4) >= 0;
+    }
+    return FALSE;
+}
+
+/**
+ * List gesture information
+ *
+ * @return The number of bytes written into info.
+ */
+static int
+ListGestureInfo(DeviceIntPtr dev, xXIGestureInfo * gesture)
+{
+    gesture->type = XIGestureClass;
+    gesture->length = sizeof(xXIGestureInfo) >> 2;
+    gesture->sourceid = dev->gesture->sourceid;
+    gesture->num_touches = dev->gesture->max_touches;
+
+    return gesture->length << 2;
+}
+
+static void
+SwapGestureInfo(DeviceIntPtr dev, xXIGestureInfo * gesture)
+{
+    swaps(&gesture->type);
+    swaps(&gesture->length);
+    swaps(&gesture->sourceid);
+}
+
 int
 GetDeviceUse(DeviceIntPtr dev, uint16_t * attachment)
 {
@@ -567,6 +613,13 @@ ListDeviceClasses(ClientPtr client, DeviceIntPtr dev,
         total_len += len;
     }
 
+    if (dev->gesture && ShouldListGestureInfo(client)) {
+        (*nclasses)++;
+        len = ListGestureInfo(dev, (xXIGestureInfo *) any);
+        any += len;
+        total_len += len;
+    }
+
     return total_len;
 }
 
@@ -598,7 +651,9 @@ SwapDeviceInfo(DeviceIntPtr dev, xXIDeviceInfo * info)
         case XITouchClass:
             SwapTouchInfo(dev, (xXITouchInfo *) any);
             break;
-
+        case XIGestureClass:
+            SwapGestureInfo(dev, (xXIGestureInfo *) any);
+            break;
         }
 
         any += len * 4;
diff --git a/Xi/xiselectev.c b/Xi/xiselectev.c
index 0498e01..edcb8a0 100644
--- a/Xi/xiselectev.c
+++ b/Xi/xiselectev.c
@@ -44,7 +44,9 @@
  * - If A has XIAllMasterDevices, B may select on XIAllDevices
  * - if A has device X, B may select on XIAllDevices/XIAllMasterDevices
  */
-static int check_for_touch_selection_conflicts(ClientPtr B, WindowPtr win, int deviceid)
+static int
+check_for_touch_selection_conflicts(ClientPtr B, WindowPtr win, int deviceid,
+                                    int evtype)
 {
     OtherInputMasks *inputMasks = wOtherInputMasks(win);
     InputClients *A = NULL;
@@ -67,19 +69,19 @@ static int check_for_touch_selection_conflicts(ClientPtr B, WindowPtr win, int d
             return BadImplementation;       /* this shouldn't happen */
 
         /* A has XIAllDevices */
-        if (xi2mask_isset_for_device(A->xi2mask, inputInfo.all_devices, XI_TouchBegin)) {
+        if (xi2mask_isset_for_device(A->xi2mask, inputInfo.all_devices, evtype)) {
             if (deviceid == XIAllDevices)
                 return BadAccess;
         }
 
         /* A has XIAllMasterDevices */
-        if (xi2mask_isset_for_device(A->xi2mask, inputInfo.all_master_devices, XI_TouchBegin)) {
+        if (xi2mask_isset_for_device(A->xi2mask, inputInfo.all_master_devices, evtype)) {
             if (deviceid == XIAllMasterDevices)
                 return BadAccess;
         }
 
         /* A has this device */
-        if (xi2mask_isset_for_device(A->xi2mask, tmp, XI_TouchBegin))
+        if (xi2mask_isset_for_device(A->xi2mask, tmp, evtype))
             return BadAccess;
     }
 
@@ -224,13 +226,63 @@ ProcXISelectEvents(ClientPtr client)
                 return BadValue;
             }
 
-            /* Only one client per window may select for touch events on the
-             * same devices, including master devices.
+            /* All three pinch gesture events must be selected at once */
+            if ((BitIsOn(bits, XI_GesturePinchBegin) ||
+                 BitIsOn(bits, XI_GesturePinchUpdate) ||
+                 BitIsOn(bits, XI_GesturePinchEnd)) &&
+                (!BitIsOn(bits, XI_GesturePinchBegin) ||
+                 !BitIsOn(bits, XI_GesturePinchUpdate) ||
+                 !BitIsOn(bits, XI_GesturePinchEnd))) {
+                client->errorValue = XI_GesturePinchBegin;
+                return BadValue;
+            }
+
+            /* All three swipe gesture events must be selected at once. Note
+               that the XI_GestureSwipeEnd is at index 32 which is on the next
+               4-byte mask element */
+            if (evmask->mask_len == 1 &&
+                (BitIsOn(bits, XI_GestureSwipeBegin) ||
+                 BitIsOn(bits, XI_GestureSwipeUpdate)))
+            {
+                client->errorValue = XI_GestureSwipeBegin;
+                return BadValue;
+            }
+
+            if (evmask->mask_len >= 2 &&
+                (BitIsOn(bits, XI_GestureSwipeBegin) ||
+                 BitIsOn(bits, XI_GestureSwipeUpdate) ||
+                 BitIsOn(bits, XI_GestureSwipeEnd)) &&
+                (!BitIsOn(bits, XI_GestureSwipeBegin) ||
+                 !BitIsOn(bits, XI_GestureSwipeUpdate) ||
+                 !BitIsOn(bits, XI_GestureSwipeEnd))) {
+                client->errorValue = XI_GestureSwipeBegin;
+                return BadValue;
+            }
+
+            /* Only one client per window may select for touch or gesture events
+             * on the same devices, including master devices.
              * XXX: This breaks if a device goes from floating to attached. */
             if (BitIsOn(bits, XI_TouchBegin)) {
                 rc = check_for_touch_selection_conflicts(client,
                                                          win,
-                                                         evmask->deviceid);
+                                                         evmask->deviceid,
+                                                         XI_TouchBegin);
+                if (rc != Success)
+                    return rc;
+            }
+            if (BitIsOn(bits, XI_GesturePinchBegin)) {
+                rc = check_for_touch_selection_conflicts(client,
+                                                         win,
+                                                         evmask->deviceid,
+                                                         XI_GesturePinchBegin);
+                if (rc != Success)
+                    return rc;
+            }
+            if (BitIsOn(bits, XI_GestureSwipeBegin)) {
+                rc = check_for_touch_selection_conflicts(client,
+                                                         win,
+                                                         evmask->deviceid,
+                                                         XI_GestureSwipeBegin);
                 if (rc != Success)
                     return rc;
             }
diff --git a/aclocal.m4 b/aclocal.m4
index 6ff056a..9ec7ba6 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,6 +1,6 @@
-# generated automatically by aclocal 1.16.2 -*- Autoconf -*-
+# generated automatically by aclocal 1.16.5 -*- Autoconf -*-
 
-# Copyright (C) 1996-2020 Free Software Foundation, Inc.
+# Copyright (C) 1996-2021 Free Software Foundation, Inc.
 
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -14,15 +14,15 @@
 m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
-[m4_warning([this file was generated for autoconf 2.69.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],,
+[m4_warning([this file was generated for autoconf 2.71.
 You have another version of autoconf.  It may work, but is not guaranteed to.
 If you have problems, you may need to regenerate the build system entirely.
 To do so, use the procedure documented by the package, typically 'autoreconf'.])])
 
 dnl fontutil.m4.  Generated from fontutil.m4.in by configure.
 dnl
-dnl This file comes from X.Org's font-util 1.3.2
+dnl This file comes from X.Org's font-util 1.3.1
 dnl
 dnl Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
 dnl
@@ -87,7 +87,7 @@ dnl from the copyright holders.
 # See the "minimum version" comment for each macro you use to see what
 # version you require.
 m4_defun([XORG_FONT_MACROS_VERSION],[
-m4_define([vers_have], [1.3.2])
+m4_define([vers_have], [1.3.1])
 m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
 m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
 m4_if(m4_cmp(maj_have, maj_needed), 0,,
@@ -2848,7 +2848,7 @@ AC_DEFUN([XTRANS_SECURE_RPC_FLAGS],
 ]) # XTRANS_SECURE_RPC_FLAGS
 
 
-# Copyright (C) 2002-2020 Free Software Foundation, Inc.
+# Copyright (C) 2002-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -2863,7 +2863,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
 [am__api_version='1.16'
 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 dnl require some minimum version.  Point them to the right macro.
-m4_if([$1], [1.16.2], [],
+m4_if([$1], [1.16.5], [],
       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 ])
 
@@ -2879,14 +2879,14 @@ m4_define([_AM_AUTOCONF_VERSION], [])
 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.16.2])dnl
+[AM_AUTOMAKE_VERSION([1.16.5])dnl
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 
 # Figure out how to run the assembler.                      -*- Autoconf -*-
 
-# Copyright (C) 2001-2020 Free Software Foundation, Inc.
+# Copyright (C) 2001-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -2906,7 +2906,7 @@ _AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl
 
 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
-# Copyright (C) 2001-2020 Free Software Foundation, Inc.
+# Copyright (C) 2001-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -2958,7 +2958,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd`
 
 # AM_CONDITIONAL                                            -*- Autoconf -*-
 
-# Copyright (C) 1997-2020 Free Software Foundation, Inc.
+# Copyright (C) 1997-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -2989,7 +2989,7 @@ AC_CONFIG_COMMANDS_PRE(
 Usually this means the macro was only invoked conditionally.]])
 fi])])
 
-# Copyright (C) 1999-2020 Free Software Foundation, Inc.
+# Copyright (C) 1999-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -3180,7 +3180,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
 
 # Generate code to set up dependency tracking.              -*- Autoconf -*-
 
-# Copyright (C) 1999-2020 Free Software Foundation, Inc.
+# Copyright (C) 1999-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -3248,7 +3248,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 
 # Do all the work for Automake.                             -*- Autoconf -*-
 
-# Copyright (C) 1996-2020 Free Software Foundation, Inc.
+# Copyright (C) 1996-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -3276,6 +3276,10 @@ m4_defn([AC_PROG_CC])
 # release and drop the old call support.
 AC_DEFUN([AM_INIT_AUTOMAKE],
 [AC_PREREQ([2.65])dnl
+m4_ifdef([_$0_ALREADY_INIT],
+  [m4_fatal([$0 expanded multiple times
+]m4_defn([_$0_ALREADY_INIT]))],
+  [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl
 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
 dnl the ones we care about.
 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
@@ -3312,7 +3316,7 @@ m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
 [_AM_SET_OPTIONS([$1])dnl
 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
 m4_if(
-  m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
+  m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]),
   [ok:ok],,
   [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
@@ -3364,6 +3368,20 @@ AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
 		  [m4_define([AC_PROG_OBJCXX],
 			     m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
 ])
+# Variables for tags utilities; see am/tags.am
+if test -z "$CTAGS"; then
+  CTAGS=ctags
+fi
+AC_SUBST([CTAGS])
+if test -z "$ETAGS"; then
+  ETAGS=etags
+fi
+AC_SUBST([ETAGS])
+if test -z "$CSCOPE"; then
+  CSCOPE=cscope
+fi
+AC_SUBST([CSCOPE])
+
 AC_REQUIRE([AM_SILENT_RULES])dnl
 dnl The testsuite driver may need to know about EXEEXT, so add the
 dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
@@ -3445,7 +3463,7 @@ for _am_header in $config_headers :; do
 done
 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
-# Copyright (C) 2001-2020 Free Software Foundation, Inc.
+# Copyright (C) 2001-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -3466,7 +3484,7 @@ if test x"${install_sh+set}" != xset; then
 fi
 AC_SUBST([install_sh])])
 
-# Copyright (C) 2003-2020 Free Software Foundation, Inc.
+# Copyright (C) 2003-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -3487,7 +3505,7 @@ AC_SUBST([am__leading_dot])])
 
 # Check to see how 'make' treats includes.	            -*- Autoconf -*-
 
-# Copyright (C) 2001-2020 Free Software Foundation, Inc.
+# Copyright (C) 2001-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -3530,7 +3548,7 @@ AC_SUBST([am__quote])])
 
 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
-# Copyright (C) 1997-2020 Free Software Foundation, Inc.
+# Copyright (C) 1997-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -3551,12 +3569,7 @@ AC_DEFUN([AM_MISSING_HAS_RUN],
 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 AC_REQUIRE_AUX_FILE([missing])dnl
 if test x"${MISSING+set}" != xset; then
-  case $am_aux_dir in
-  *\ * | *\	*)
-    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
-  *)
-    MISSING="\${SHELL} $am_aux_dir/missing" ;;
-  esac
+  MISSING="\${SHELL} '$am_aux_dir/missing'"
 fi
 # Use eval to expand $SHELL
 if eval "$MISSING --is-lightweight"; then
@@ -3569,7 +3582,7 @@ fi
 
 # Helper functions for option handling.                     -*- Autoconf -*-
 
-# Copyright (C) 2001-2020 Free Software Foundation, Inc.
+# Copyright (C) 2001-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -3598,7 +3611,7 @@ AC_DEFUN([_AM_SET_OPTIONS],
 AC_DEFUN([_AM_IF_OPTION],
 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
-# Copyright (C) 1999-2020 Free Software Foundation, Inc.
+# Copyright (C) 1999-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -3645,7 +3658,7 @@ AC_LANG_POP([C])])
 # For backward compatibility.
 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
 
-# Copyright (C) 2001-2020 Free Software Foundation, Inc.
+# Copyright (C) 2001-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -3664,7 +3677,7 @@ AC_DEFUN([AM_RUN_LOG],
 
 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
-# Copyright (C) 1996-2020 Free Software Foundation, Inc.
+# Copyright (C) 1996-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -3745,7 +3758,7 @@ AC_CONFIG_COMMANDS_PRE(
 rm -f conftest.file
 ])
 
-# Copyright (C) 2009-2020 Free Software Foundation, Inc.
+# Copyright (C) 2009-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -3805,7 +3818,7 @@ AC_SUBST([AM_BACKSLASH])dnl
 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
 ])
 
-# Copyright (C) 2001-2020 Free Software Foundation, Inc.
+# Copyright (C) 2001-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -3833,7 +3846,7 @@ fi
 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
-# Copyright (C) 2006-2020 Free Software Foundation, Inc.
+# Copyright (C) 2006-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -3852,7 +3865,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 
 # Check how to create a tarball.                            -*- Autoconf -*-
 
-# Copyright (C) 2004-2020 Free Software Foundation, Inc.
+# Copyright (C) 2004-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
diff --git a/compile b/compile
index 23fcba0..df363c8 100755
--- a/compile
+++ b/compile
@@ -3,7 +3,7 @@
 
 scriptversion=2018-03-07.03; # UTC
 
-# Copyright (C) 1999-2020 Free Software Foundation, Inc.
+# Copyright (C) 1999-2021 Free Software Foundation, Inc.
 # Written by Tom Tromey <tromey@cygnus.com>.
 #
 # This program is free software; you can redistribute it and/or modify
diff --git a/composite/Makefile.in b/composite/Makefile.in
index 9b62704..8ef447e 100644
--- a/composite/Makefile.in
+++ b/composite/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -107,7 +107,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -211,8 +210,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
@@ -232,8 +229,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -247,6 +242,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -265,14 +262,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -289,8 +278,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -346,6 +337,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -398,7 +391,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -422,29 +414,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -482,8 +458,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -494,14 +468,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -750,7 +718,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/composite/compalloc.c b/composite/compalloc.c
index 3e2f14f..eaabf0d 100644
--- a/composite/compalloc.c
+++ b/composite/compalloc.c
@@ -97,6 +97,8 @@ compDestroyDamage(DamagePtr pDamage, void *closure)
     CompWindowPtr cw = GetCompWindow(pWin);
 
     cw->damage = 0;
+    cw->damaged = 0;
+    cw->damageRegistered = 0;
 }
 
 static Bool
@@ -669,7 +671,8 @@ compReallocPixmap(WindowPtr pWin, int draw_x, int draw_y,
     int pix_x, pix_y;
     int pix_w, pix_h;
 
-    assert(cw && pWin->redirectDraw != RedirectDrawNone);
+    assert(cw);
+    assert(pWin->redirectDraw != RedirectDrawNone);
     cw->oldx = pOld->screen_x;
     cw->oldy = pOld->screen_y;
     pix_x = draw_x - bw;
diff --git a/composite/compinit.c b/composite/compinit.c
index 6ea33ea..a62c8d3 100644
--- a/composite/compinit.c
+++ b/composite/compinit.c
@@ -76,9 +76,6 @@ compCloseScreen(ScreenPtr pScreen)
     pScreen->CreateWindow = cs->CreateWindow;
     pScreen->CopyWindow = cs->CopyWindow;
     pScreen->PositionWindow = cs->PositionWindow;
-
-    pScreen->GetImage = cs->GetImage;
-    pScreen->GetSpans = cs->GetSpans;
     pScreen->SourceValidate = cs->SourceValidate;
 
     free(cs);
@@ -108,14 +105,12 @@ compInstallColormap(ColormapPtr pColormap)
 static void
 compCheckBackingStore(WindowPtr pWin)
 {
-    if (pWin->backingStore != NotUseful && !pWin->backStorage) {
+    if (pWin->backingStore != NotUseful) {
         compRedirectWindow(serverClient, pWin, CompositeRedirectAutomatic);
-        pWin->backStorage = TRUE;
     }
-    else if (pWin->backingStore == NotUseful && pWin->backStorage) {
+    else {
         compUnredirectWindow(serverClient, pWin,
                              CompositeRedirectAutomatic);
-        pWin->backStorage = FALSE;
     }
 }
 
@@ -139,38 +134,6 @@ compChangeWindowAttributes(WindowPtr pWin, unsigned long mask)
     return ret;
 }
 
-static void
-compGetImage(DrawablePtr pDrawable,
-             int sx, int sy,
-             int w, int h,
-             unsigned int format, unsigned long planemask, char *pdstLine)
-{
-    ScreenPtr pScreen = pDrawable->pScreen;
-    CompScreenPtr cs = GetCompScreen(pScreen);
-
-    pScreen->GetImage = cs->GetImage;
-    if (pDrawable->type == DRAWABLE_WINDOW)
-        compPaintChildrenToWindow((WindowPtr) pDrawable);
-    (*pScreen->GetImage) (pDrawable, sx, sy, w, h, format, planemask, pdstLine);
-    cs->GetImage = pScreen->GetImage;
-    pScreen->GetImage = compGetImage;
-}
-
-static void
-compGetSpans(DrawablePtr pDrawable, int wMax, DDXPointPtr ppt, int *pwidth,
-             int nspans, char *pdstStart)
-{
-    ScreenPtr pScreen = pDrawable->pScreen;
-    CompScreenPtr cs = GetCompScreen(pScreen);
-
-    pScreen->GetSpans = cs->GetSpans;
-    if (pDrawable->type == DRAWABLE_WINDOW)
-        compPaintChildrenToWindow((WindowPtr) pDrawable);
-    (*pScreen->GetSpans) (pDrawable, wMax, ppt, pwidth, nspans, pdstStart);
-    cs->GetSpans = pScreen->GetSpans;
-    pScreen->GetSpans = compGetSpans;
-}
-
 static void
 compSourceValidate(DrawablePtr pDrawable,
                    int x, int y,
@@ -182,9 +145,8 @@ compSourceValidate(DrawablePtr pDrawable,
     pScreen->SourceValidate = cs->SourceValidate;
     if (pDrawable->type == DRAWABLE_WINDOW && subWindowMode == IncludeInferiors)
         compPaintChildrenToWindow((WindowPtr) pDrawable);
-    if (pScreen->SourceValidate)
-        (*pScreen->SourceValidate) (pDrawable, x, y, width, height,
-                                    subWindowMode);
+    (*pScreen->SourceValidate) (pDrawable, x, y, width, height,
+                                subWindowMode);
     cs->SourceValidate = pScreen->SourceValidate;
     pScreen->SourceValidate = compSourceValidate;
 }
@@ -447,12 +409,6 @@ compScreenInit(ScreenPtr pScreen)
     cs->CloseScreen = pScreen->CloseScreen;
     pScreen->CloseScreen = compCloseScreen;
 
-    cs->GetImage = pScreen->GetImage;
-    pScreen->GetImage = compGetImage;
-
-    cs->GetSpans = pScreen->GetSpans;
-    pScreen->GetSpans = compGetSpans;
-
     cs->SourceValidate = pScreen->SourceValidate;
     pScreen->SourceValidate = compSourceValidate;
 
diff --git a/composite/compint.h b/composite/compint.h
index d501bad..423b641 100644
--- a/composite/compint.h
+++ b/composite/compint.h
@@ -168,8 +168,6 @@ typedef struct _CompScreen {
     Window overlayWid;
     CompOverlayClientPtr pOverlayClients;
 
-    GetImageProcPtr GetImage;
-    GetSpansProcPtr GetSpans;
     SourceValidateProcPtr SourceValidate;
 } CompScreenRec, *CompScreenPtr;
 
diff --git a/composite/compwindow.c b/composite/compwindow.c
index 54b4e6a..73a1871 100644
--- a/composite/compwindow.c
+++ b/composite/compwindow.c
@@ -72,10 +72,17 @@ compCheckWindow(WindowPtr pWin, void *data)
     else {
         assert(pWinPixmap == pParentPixmap);
     }
-    assert(0 < pWinPixmap->refcnt && pWinPixmap->refcnt < 3);
-    assert(0 < pScreenPixmap->refcnt && pScreenPixmap->refcnt < 3);
-    if (pParentPixmap)
-        assert(0 <= pParentPixmap->refcnt && pParentPixmap->refcnt < 3);
+
+    assert(0 < pWinPixmap->refcnt)
+    assert(pWinPixmap->refcnt < 3);
+
+    assert(0 < pScreenPixmap->refcnt);
+    assert(pScreenPixmap->refcnt < 3);
+
+    if (pParentPixmap) {
+        assert(0 <= pParentPixmap->refcnt);
+        assert(pParentPixmap->refcnt < 3);
+    }
     return WT_WALKCHILDREN;
 }
 
@@ -446,7 +453,7 @@ compReparentWindow(WindowPtr pWin, WindowPtr pPriorParent)
     compUnredirectOneSubwindow(pPriorParent, pWin);
     compRedirectOneSubwindow(pWin->parent, pWin);
     /*
-     * Add any implict redirect due to synthesized visual
+     * Add any implicit redirect due to synthesized visual
      */
     if (compImplicitRedirect(pWin, pWin->parent))
         compRedirectWindow(serverClient, pWin, CompositeRedirectAutomatic);
diff --git a/composite/meson.build b/composite/meson.build
index 7547f0e..4f3303e 100644
--- a/composite/meson.build
+++ b/composite/meson.build
@@ -16,4 +16,6 @@ libxserver_composite = static_library('libxserver_composite',
 	dependencies: common_dep,
 )
 
-install_data(hdrs_composite, install_dir: xorgsdkdir)
+if build_xorg
+    install_data(hdrs_composite, install_dir: xorgsdkdir)
+endif
diff --git a/config.guess b/config.guess
index 92bfc33..c7f17e8 100755
--- a/config.guess
+++ b/config.guess
@@ -1,12 +1,14 @@
-#! /bin/sh
+#!/usr/bin/sh
 # Attempt to guess a canonical system name.
-#   Copyright 1992-2020 Free Software Foundation, Inc.
+#   Copyright 1992-2022 Free Software Foundation, Inc.
 
-timestamp='2020-04-26'
+# shellcheck disable=SC2006,SC2268 # see below for rationale
+
+timestamp='2022-05-25'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
+# the Free Software Foundation, either version 3 of the License, or
 # (at your option) any later version.
 #
 # This program is distributed in the hope that it will be useful, but
@@ -27,11 +29,19 @@ timestamp='2020-04-26'
 # Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
 #
 # You can get the latest version of this script from:
-# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
+# https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
 #
 # Please send patches to <config-patches@gnu.org>.
 
 
+# The "shellcheck disable" line above the timestamp inhibits complaints
+# about features and limitations of the classic Bourne shell that were
+# superseded or lifted in POSIX.  However, this script identifies a wide
+# variety of pre-POSIX systems that do not have POSIX shells at all, and
+# even some reasonably current systems (Solaris 10 as case-in-point) still
+# have a pre-POSIX /bin/sh.
+
+
 me=`echo "$0" | sed -e 's,.*/,,'`
 
 usage="\
@@ -50,7 +60,7 @@ version="\
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright 1992-2020 Free Software Foundation, Inc.
+Copyright 1992-2022 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -84,6 +94,9 @@ if test $# != 0; then
   exit 1
 fi
 
+# Just in case it came from the environment.
+GUESS=
+
 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a
 # compiler to aid in system detection is discouraged as it requires
 # temporary files to be created and, as you can see below, it is a
@@ -102,7 +115,7 @@ set_cc_for_build() {
     # prevent multiple calls if $tmp is already set
     test "$tmp" && return 0
     : "${TMPDIR=/tmp}"
-    # shellcheck disable=SC2039
+    # shellcheck disable=SC2039,SC3028
     { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
 	{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } ||
 	{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } ||
@@ -112,7 +125,7 @@ set_cc_for_build() {
 	,,)    echo "int x;" > "$dummy.c"
 	       for driver in cc gcc c89 c99 ; do
 		   if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
-		       CC_FOR_BUILD="$driver"
+		       CC_FOR_BUILD=$driver
 		       break
 		   fi
 	       done
@@ -133,14 +146,12 @@ fi
 
 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
-UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
 
-case "$UNAME_SYSTEM" in
+case $UNAME_SYSTEM in
 Linux|GNU|GNU/*)
-	# If the system lacks a compiler, then just pick glibc.
-	# We could probably try harder.
-	LIBC=gnu
+	LIBC=unknown
 
 	set_cc_for_build
 	cat <<-EOF > "$dummy.c"
@@ -149,24 +160,37 @@ Linux|GNU|GNU/*)
 	LIBC=uclibc
 	#elif defined(__dietlibc__)
 	LIBC=dietlibc
-	#else
+	#elif defined(__GLIBC__)
 	LIBC=gnu
+	#else
+	#include <stdarg.h>
+	/* First heuristic to detect musl libc.  */
+	#ifdef __DEFINED_va_list
+	LIBC=musl
+	#endif
 	#endif
 	EOF
-	eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`"
+	cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
+	eval "$cc_set_libc"
 
-	# If ldd exists, use it to detect musl libc.
-	if command -v ldd >/dev/null && \
-		ldd --version 2>&1 | grep -q ^musl
-	then
-	    LIBC=musl
+	# Second heuristic to detect musl libc.
+	if [ "$LIBC" = unknown ] &&
+	   command -v ldd >/dev/null &&
+	   ldd --version 2>&1 | grep -q ^musl; then
+		LIBC=musl
+	fi
+
+	# If the system lacks a compiler, then just pick glibc.
+	# We could probably try harder.
+	if [ "$LIBC" = unknown ]; then
+		LIBC=gnu
 	fi
 	;;
 esac
 
 # Note: order is significant - the case branches are not exclusive.
 
-case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
+case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in
     *:NetBSD:*:*)
 	# NetBSD (nbsd) targets should (where applicable) match one or
 	# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
@@ -178,12 +202,12 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
 	#
 	# Note: NetBSD doesn't particularly care about the vendor
 	# portion of the name.  We always set it to "unknown".
-	sysctl="sysctl -n hw.machine_arch"
 	UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
-	    "/sbin/$sysctl" 2>/dev/null || \
-	    "/usr/sbin/$sysctl" 2>/dev/null || \
+	    /sbin/sysctl -n hw.machine_arch 2>/dev/null || \
+	    /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \
 	    echo unknown)`
-	case "$UNAME_MACHINE_ARCH" in
+	case $UNAME_MACHINE_ARCH in
+	    aarch64eb) machine=aarch64_be-unknown ;;
 	    armeb) machine=armeb-unknown ;;
 	    arm*) machine=arm-unknown ;;
 	    sh3el) machine=shl-unknown ;;
@@ -192,13 +216,13 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
 	    earmv*)
 		arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
 		endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
-		machine="${arch}${endian}"-unknown
+		machine=${arch}${endian}-unknown
 		;;
-	    *) machine="$UNAME_MACHINE_ARCH"-unknown ;;
+	    *) machine=$UNAME_MACHINE_ARCH-unknown ;;
 	esac
 	# The Operating System including object format, if it has switched
 	# to ELF recently (or will in the future) and ABI.
-	case "$UNAME_MACHINE_ARCH" in
+	case $UNAME_MACHINE_ARCH in
 	    earm*)
 		os=netbsdelf
 		;;
@@ -219,7 +243,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
 		;;
 	esac
 	# Determine ABI tags.
-	case "$UNAME_MACHINE_ARCH" in
+	case $UNAME_MACHINE_ARCH in
 	    earm*)
 		expr='s/^earmv[0-9]/-eabi/;s/eb$//'
 		abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
@@ -230,7 +254,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
 	# thus, need a distinct triplet. However, they do not need
 	# kernel version information, so it can be replaced with a
 	# suitable tag, in the style of linux-gnu.
-	case "$UNAME_VERSION" in
+	case $UNAME_VERSION in
 	    Debian*)
 		release='-gnu'
 		;;
@@ -241,51 +265,57 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
 	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
 	# contains redundant information, the shorter form:
 	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
-	echo "$machine-${os}${release}${abi-}"
-	exit ;;
+	GUESS=$machine-${os}${release}${abi-}
+	;;
     *:Bitrig:*:*)
 	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
-	echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE"
-	exit ;;
+	GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE
+	;;
     *:OpenBSD:*:*)
 	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
-	echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE"
-	exit ;;
+	GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE
+	;;
+    *:SecBSD:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'`
+	GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE
+	;;
     *:LibertyBSD:*:*)
 	UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
-	echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE"
-	exit ;;
+	GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE
+	;;
     *:MidnightBSD:*:*)
-	echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE"
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE
+	;;
     *:ekkoBSD:*:*)
-	echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE"
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE
+	;;
     *:SolidBSD:*:*)
-	echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE"
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE
+	;;
     *:OS108:*:*)
-	echo "$UNAME_MACHINE"-unknown-os108_"$UNAME_RELEASE"
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE
+	;;
     macppc:MirBSD:*:*)
-	echo powerpc-unknown-mirbsd"$UNAME_RELEASE"
-	exit ;;
+	GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE
+	;;
     *:MirBSD:*:*)
-	echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE"
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE
+	;;
     *:Sortix:*:*)
-	echo "$UNAME_MACHINE"-unknown-sortix
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-sortix
+	;;
     *:Twizzler:*:*)
-	echo "$UNAME_MACHINE"-unknown-twizzler
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-twizzler
+	;;
     *:Redox:*:*)
-	echo "$UNAME_MACHINE"-unknown-redox
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-redox
+	;;
     mips:OSF1:*.*)
-	echo mips-dec-osf1
-	exit ;;
+	GUESS=mips-dec-osf1
+	;;
     alpha:OSF1:*:*)
+	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+	trap '' 0
 	case $UNAME_RELEASE in
 	*4.0)
 		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
@@ -299,7 +329,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
 	# covers most systems running today.  This code pipes the CPU
 	# types through head -n 1, so we only detect the type of CPU 0.
 	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
-	case "$ALPHA_CPU_TYPE" in
+	case $ALPHA_CPU_TYPE in
 	    "EV4 (21064)")
 		UNAME_MACHINE=alpha ;;
 	    "EV4.5 (21064)")
@@ -336,117 +366,121 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
 	# A Tn.n version is a released field test version.
 	# A Xn.n version is an unreleased experimental baselevel.
 	# 1.2 uses "1.2" for uname -r.
-	echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`"
-	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
-	exitcode=$?
-	trap '' 0
-	exit $exitcode ;;
+	OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+	GUESS=$UNAME_MACHINE-dec-osf$OSF_REL
+	;;
     Amiga*:UNIX_System_V:4.0:*)
-	echo m68k-unknown-sysv4
-	exit ;;
+	GUESS=m68k-unknown-sysv4
+	;;
     *:[Aa]miga[Oo][Ss]:*:*)
-	echo "$UNAME_MACHINE"-unknown-amigaos
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-amigaos
+	;;
     *:[Mm]orph[Oo][Ss]:*:*)
-	echo "$UNAME_MACHINE"-unknown-morphos
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-morphos
+	;;
     *:OS/390:*:*)
-	echo i370-ibm-openedition
-	exit ;;
+	GUESS=i370-ibm-openedition
+	;;
     *:z/VM:*:*)
-	echo s390-ibm-zvmoe
-	exit ;;
+	GUESS=s390-ibm-zvmoe
+	;;
     *:OS400:*:*)
-	echo powerpc-ibm-os400
-	exit ;;
+	GUESS=powerpc-ibm-os400
+	;;
     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
-	echo arm-acorn-riscix"$UNAME_RELEASE"
-	exit ;;
+	GUESS=arm-acorn-riscix$UNAME_RELEASE
+	;;
     arm*:riscos:*:*|arm*:RISCOS:*:*)
-	echo arm-unknown-riscos
-	exit ;;
+	GUESS=arm-unknown-riscos
+	;;
     SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
-	echo hppa1.1-hitachi-hiuxmpp
-	exit ;;
+	GUESS=hppa1.1-hitachi-hiuxmpp
+	;;
     Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
 	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
-	if test "`(/bin/universe) 2>/dev/null`" = att ; then
-		echo pyramid-pyramid-sysv3
-	else
-		echo pyramid-pyramid-bsd
-	fi
-	exit ;;
+	case `(/bin/universe) 2>/dev/null` in
+	    att) GUESS=pyramid-pyramid-sysv3 ;;
+	    *)   GUESS=pyramid-pyramid-bsd   ;;
+	esac
+	;;
     NILE*:*:*:dcosx)
-	echo pyramid-pyramid-svr4
-	exit ;;
+	GUESS=pyramid-pyramid-svr4
+	;;
     DRS?6000:unix:4.0:6*)
-	echo sparc-icl-nx6
-	exit ;;
+	GUESS=sparc-icl-nx6
+	;;
     DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
 	case `/usr/bin/uname -p` in
-	    sparc) echo sparc-icl-nx7; exit ;;
-	esac ;;
+	    sparc) GUESS=sparc-icl-nx7 ;;
+	esac
+	;;
     s390x:SunOS:*:*)
-	echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
-	exit ;;
+	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+	GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL
+	;;
     sun4H:SunOS:5.*:*)
-	echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
-	exit ;;
+	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+	GUESS=sparc-hal-solaris2$SUN_REL
+	;;
     sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
-	echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
-	exit ;;
+	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+	GUESS=sparc-sun-solaris2$SUN_REL
+	;;
     i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
-	echo i386-pc-auroraux"$UNAME_RELEASE"
-	exit ;;
+	GUESS=i386-pc-auroraux$UNAME_RELEASE
+	;;
     i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
 	set_cc_for_build
 	SUN_ARCH=i386
 	# If there is a compiler, see if it is configured for 64-bit objects.
 	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
 	# This test works for both compilers.
-	if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
+	if test "$CC_FOR_BUILD" != no_compiler_found; then
 	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
-		(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+		(CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \
 		grep IS_64BIT_ARCH >/dev/null
 	    then
 		SUN_ARCH=x86_64
 	    fi
 	fi
-	echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
-	exit ;;
+	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+	GUESS=$SUN_ARCH-pc-solaris2$SUN_REL
+	;;
     sun4*:SunOS:6*:*)
 	# According to config.sub, this is the proper way to canonicalize
 	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
 	# it's likely to be more like Solaris than SunOS4.
-	echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
-	exit ;;
+	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+	GUESS=sparc-sun-solaris3$SUN_REL
+	;;
     sun4*:SunOS:*:*)
-	case "`/usr/bin/arch -k`" in
+	case `/usr/bin/arch -k` in
 	    Series*|S4*)
 		UNAME_RELEASE=`uname -v`
 		;;
 	esac
 	# Japanese Language versions have a version number like `4.1.3-JL'.
-	echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`"
-	exit ;;
+	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'`
+	GUESS=sparc-sun-sunos$SUN_REL
+	;;
     sun3*:SunOS:*:*)
-	echo m68k-sun-sunos"$UNAME_RELEASE"
-	exit ;;
+	GUESS=m68k-sun-sunos$UNAME_RELEASE
+	;;
     sun*:*:4.2BSD:*)
 	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
 	test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
-	case "`/bin/arch`" in
+	case `/bin/arch` in
 	    sun3)
-		echo m68k-sun-sunos"$UNAME_RELEASE"
+		GUESS=m68k-sun-sunos$UNAME_RELEASE
 		;;
 	    sun4)
-		echo sparc-sun-sunos"$UNAME_RELEASE"
+		GUESS=sparc-sun-sunos$UNAME_RELEASE
 		;;
 	esac
-	exit ;;
+	;;
     aushp:SunOS:*:*)
-	echo sparc-auspex-sunos"$UNAME_RELEASE"
-	exit ;;
+	GUESS=sparc-auspex-sunos$UNAME_RELEASE
+	;;
     # The situation for MiNT is a little confusing.  The machine name
     # can be virtually everything (everything which is not
     # "atarist" or "atariste" at least should have a processor
@@ -456,41 +490,41 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
     # MiNT.  But MiNT is downward compatible to TOS, so this should
     # be no problem.
     atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
-	echo m68k-atari-mint"$UNAME_RELEASE"
-	exit ;;
+	GUESS=m68k-atari-mint$UNAME_RELEASE
+	;;
     atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
-	echo m68k-atari-mint"$UNAME_RELEASE"
-	exit ;;
+	GUESS=m68k-atari-mint$UNAME_RELEASE
+	;;
     *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
-	echo m68k-atari-mint"$UNAME_RELEASE"
-	exit ;;
+	GUESS=m68k-atari-mint$UNAME_RELEASE
+	;;
     milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
-	echo m68k-milan-mint"$UNAME_RELEASE"
-	exit ;;
+	GUESS=m68k-milan-mint$UNAME_RELEASE
+	;;
     hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
-	echo m68k-hades-mint"$UNAME_RELEASE"
-	exit ;;
+	GUESS=m68k-hades-mint$UNAME_RELEASE
+	;;
     *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
-	echo m68k-unknown-mint"$UNAME_RELEASE"
-	exit ;;
+	GUESS=m68k-unknown-mint$UNAME_RELEASE
+	;;
     m68k:machten:*:*)
-	echo m68k-apple-machten"$UNAME_RELEASE"
-	exit ;;
+	GUESS=m68k-apple-machten$UNAME_RELEASE
+	;;
     powerpc:machten:*:*)
-	echo powerpc-apple-machten"$UNAME_RELEASE"
-	exit ;;
+	GUESS=powerpc-apple-machten$UNAME_RELEASE
+	;;
     RISC*:Mach:*:*)
-	echo mips-dec-mach_bsd4.3
-	exit ;;
+	GUESS=mips-dec-mach_bsd4.3
+	;;
     RISC*:ULTRIX:*:*)
-	echo mips-dec-ultrix"$UNAME_RELEASE"
-	exit ;;
+	GUESS=mips-dec-ultrix$UNAME_RELEASE
+	;;
     VAX*:ULTRIX*:*:*)
-	echo vax-dec-ultrix"$UNAME_RELEASE"
-	exit ;;
+	GUESS=vax-dec-ultrix$UNAME_RELEASE
+	;;
     2020:CLIX:*:* | 2430:CLIX:*:*)
-	echo clipper-intergraph-clix"$UNAME_RELEASE"
-	exit ;;
+	GUESS=clipper-intergraph-clix$UNAME_RELEASE
+	;;
     mips:*:*:UMIPS | mips:*:*:RISCos)
 	set_cc_for_build
 	sed 's/^	//' << EOF > "$dummy.c"
@@ -518,75 +552,76 @@ EOF
 	  dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
 	  SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
 	    { echo "$SYSTEM_NAME"; exit; }
-	echo mips-mips-riscos"$UNAME_RELEASE"
-	exit ;;
+	GUESS=mips-mips-riscos$UNAME_RELEASE
+	;;
     Motorola:PowerMAX_OS:*:*)
-	echo powerpc-motorola-powermax
-	exit ;;
+	GUESS=powerpc-motorola-powermax
+	;;
     Motorola:*:4.3:PL8-*)
-	echo powerpc-harris-powermax
-	exit ;;
+	GUESS=powerpc-harris-powermax
+	;;
     Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
-	echo powerpc-harris-powermax
-	exit ;;
+	GUESS=powerpc-harris-powermax
+	;;
     Night_Hawk:Power_UNIX:*:*)
-	echo powerpc-harris-powerunix
-	exit ;;
+	GUESS=powerpc-harris-powerunix
+	;;
     m88k:CX/UX:7*:*)
-	echo m88k-harris-cxux7
-	exit ;;
+	GUESS=m88k-harris-cxux7
+	;;
     m88k:*:4*:R4*)
-	echo m88k-motorola-sysv4
-	exit ;;
+	GUESS=m88k-motorola-sysv4
+	;;
     m88k:*:3*:R3*)
-	echo m88k-motorola-sysv3
-	exit ;;
+	GUESS=m88k-motorola-sysv3
+	;;
     AViiON:dgux:*:*)
 	# DG/UX returns AViiON for all architectures
 	UNAME_PROCESSOR=`/usr/bin/uname -p`
-	if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ]
+	if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110
 	then
-	    if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \
-	       [ "$TARGET_BINARY_INTERFACE"x = x ]
+	    if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \
+	       test "$TARGET_BINARY_INTERFACE"x = x
 	    then
-		echo m88k-dg-dgux"$UNAME_RELEASE"
+		GUESS=m88k-dg-dgux$UNAME_RELEASE
 	    else
-		echo m88k-dg-dguxbcs"$UNAME_RELEASE"
+		GUESS=m88k-dg-dguxbcs$UNAME_RELEASE
 	    fi
 	else
-	    echo i586-dg-dgux"$UNAME_RELEASE"
+	    GUESS=i586-dg-dgux$UNAME_RELEASE
 	fi
-	exit ;;
+	;;
     M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
-	echo m88k-dolphin-sysv3
-	exit ;;
+	GUESS=m88k-dolphin-sysv3
+	;;
     M88*:*:R3*:*)
 	# Delta 88k system running SVR3
-	echo m88k-motorola-sysv3
-	exit ;;
+	GUESS=m88k-motorola-sysv3
+	;;
     XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
-	echo m88k-tektronix-sysv3
-	exit ;;
+	GUESS=m88k-tektronix-sysv3
+	;;
     Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
-	echo m68k-tektronix-bsd
-	exit ;;
+	GUESS=m68k-tektronix-bsd
+	;;
     *:IRIX*:*:*)
-	echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`"
-	exit ;;
+	IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'`
+	GUESS=mips-sgi-irix$IRIX_REL
+	;;
     ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
-	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
-	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
+	GUESS=romp-ibm-aix    # uname -m gives an 8 hex-code CPU id
+	;;                    # Note that: echo "'`uname -s`'" gives 'AIX '
     i*86:AIX:*:*)
-	echo i386-ibm-aix
-	exit ;;
+	GUESS=i386-ibm-aix
+	;;
     ia64:AIX:*:*)
-	if [ -x /usr/bin/oslevel ] ; then
+	if test -x /usr/bin/oslevel ; then
 		IBM_REV=`/usr/bin/oslevel`
 	else
-		IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
+		IBM_REV=$UNAME_VERSION.$UNAME_RELEASE
 	fi
-	echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV"
-	exit ;;
+	GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV
+	;;
     *:AIX:2:3)
 	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
 		set_cc_for_build
@@ -603,16 +638,16 @@ EOF
 EOF
 		if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
 		then
-			echo "$SYSTEM_NAME"
+			GUESS=$SYSTEM_NAME
 		else
-			echo rs6000-ibm-aix3.2.5
+			GUESS=rs6000-ibm-aix3.2.5
 		fi
 	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
-		echo rs6000-ibm-aix3.2.4
+		GUESS=rs6000-ibm-aix3.2.4
 	else
-		echo rs6000-ibm-aix3.2
+		GUESS=rs6000-ibm-aix3.2
 	fi
-	exit ;;
+	;;
     *:AIX:*:[4567])
 	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
 	if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
@@ -620,56 +655,56 @@ EOF
 	else
 		IBM_ARCH=powerpc
 	fi
-	if [ -x /usr/bin/lslpp ] ; then
-		IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
+	if test -x /usr/bin/lslpp ; then
+		IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \
 			   awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
 	else
-		IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
+		IBM_REV=$UNAME_VERSION.$UNAME_RELEASE
 	fi
-	echo "$IBM_ARCH"-ibm-aix"$IBM_REV"
-	exit ;;
+	GUESS=$IBM_ARCH-ibm-aix$IBM_REV
+	;;
     *:AIX:*:*)
-	echo rs6000-ibm-aix
-	exit ;;
+	GUESS=rs6000-ibm-aix
+	;;
     ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
-	echo romp-ibm-bsd4.4
-	exit ;;
+	GUESS=romp-ibm-bsd4.4
+	;;
     ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
-	echo romp-ibm-bsd"$UNAME_RELEASE"   # 4.3 with uname added to
-	exit ;;                             # report: romp-ibm BSD 4.3
+	GUESS=romp-ibm-bsd$UNAME_RELEASE    # 4.3 with uname added to
+	;;                                  # report: romp-ibm BSD 4.3
     *:BOSX:*:*)
-	echo rs6000-bull-bosx
-	exit ;;
+	GUESS=rs6000-bull-bosx
+	;;
     DPX/2?00:B.O.S.:*:*)
-	echo m68k-bull-sysv3
-	exit ;;
+	GUESS=m68k-bull-sysv3
+	;;
     9000/[34]??:4.3bsd:1.*:*)
-	echo m68k-hp-bsd
-	exit ;;
+	GUESS=m68k-hp-bsd
+	;;
     hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
-	echo m68k-hp-bsd4.4
-	exit ;;
+	GUESS=m68k-hp-bsd4.4
+	;;
     9000/[34678]??:HP-UX:*:*)
-	HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
-	case "$UNAME_MACHINE" in
+	HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'`
+	case $UNAME_MACHINE in
 	    9000/31?)            HP_ARCH=m68000 ;;
 	    9000/[34]??)         HP_ARCH=m68k ;;
 	    9000/[678][0-9][0-9])
-		if [ -x /usr/bin/getconf ]; then
+		if test -x /usr/bin/getconf; then
 		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
 		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
-		    case "$sc_cpu_version" in
+		    case $sc_cpu_version in
 		      523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
 		      528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
 		      532)                      # CPU_PA_RISC2_0
-			case "$sc_kernel_bits" in
+			case $sc_kernel_bits in
 			  32) HP_ARCH=hppa2.0n ;;
 			  64) HP_ARCH=hppa2.0w ;;
 			  '') HP_ARCH=hppa2.0 ;;   # HP-UX 10.20
 			esac ;;
 		    esac
 		fi
-		if [ "$HP_ARCH" = "" ]; then
+		if test "$HP_ARCH" = ""; then
 		    set_cc_for_build
 		    sed 's/^		//' << EOF > "$dummy.c"
 
@@ -708,7 +743,7 @@ EOF
 		    test -z "$HP_ARCH" && HP_ARCH=hppa
 		fi ;;
 	esac
-	if [ "$HP_ARCH" = hppa2.0w ]
+	if test "$HP_ARCH" = hppa2.0w
 	then
 	    set_cc_for_build
 
@@ -729,12 +764,12 @@ EOF
 		HP_ARCH=hppa64
 	    fi
 	fi
-	echo "$HP_ARCH"-hp-hpux"$HPUX_REV"
-	exit ;;
+	GUESS=$HP_ARCH-hp-hpux$HPUX_REV
+	;;
     ia64:HP-UX:*:*)
-	HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
-	echo ia64-hp-hpux"$HPUX_REV"
-	exit ;;
+	HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'`
+	GUESS=ia64-hp-hpux$HPUX_REV
+	;;
     3050*:HI-UX:*:*)
 	set_cc_for_build
 	sed 's/^	//' << EOF > "$dummy.c"
@@ -764,36 +799,36 @@ EOF
 EOF
 	$CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
 		{ echo "$SYSTEM_NAME"; exit; }
-	echo unknown-hitachi-hiuxwe2
-	exit ;;
+	GUESS=unknown-hitachi-hiuxwe2
+	;;
     9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
-	echo hppa1.1-hp-bsd
-	exit ;;
+	GUESS=hppa1.1-hp-bsd
+	;;
     9000/8??:4.3bsd:*:*)
-	echo hppa1.0-hp-bsd
-	exit ;;
+	GUESS=hppa1.0-hp-bsd
+	;;
     *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
-	echo hppa1.0-hp-mpeix
-	exit ;;
+	GUESS=hppa1.0-hp-mpeix
+	;;
     hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
-	echo hppa1.1-hp-osf
-	exit ;;
+	GUESS=hppa1.1-hp-osf
+	;;
     hp8??:OSF1:*:*)
-	echo hppa1.0-hp-osf
-	exit ;;
+	GUESS=hppa1.0-hp-osf
+	;;
     i*86:OSF1:*:*)
-	if [ -x /usr/sbin/sysversion ] ; then
-	    echo "$UNAME_MACHINE"-unknown-osf1mk
+	if test -x /usr/sbin/sysversion ; then
+	    GUESS=$UNAME_MACHINE-unknown-osf1mk
 	else
-	    echo "$UNAME_MACHINE"-unknown-osf1
+	    GUESS=$UNAME_MACHINE-unknown-osf1
 	fi
-	exit ;;
+	;;
     parisc*:Lites*:*:*)
-	echo hppa1.1-hp-lites
-	exit ;;
+	GUESS=hppa1.1-hp-lites
+	;;
     C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
-	echo c1-convex-bsd
-	exit ;;
+	GUESS=c1-convex-bsd
+	;;
     C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
 	if getsysinfo -f scalar_acc
 	then echo c32-convex-bsd
@@ -801,17 +836,18 @@ EOF
 	fi
 	exit ;;
     C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
-	echo c34-convex-bsd
-	exit ;;
+	GUESS=c34-convex-bsd
+	;;
     C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
-	echo c38-convex-bsd
-	exit ;;
+	GUESS=c38-convex-bsd
+	;;
     C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
-	echo c4-convex-bsd
-	exit ;;
+	GUESS=c4-convex-bsd
+	;;
     CRAY*Y-MP:*:*:*)
-	echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
+	CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+	GUESS=ymp-cray-unicos$CRAY_REL
+	;;
     CRAY*[A-Z]90:*:*:*)
 	echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
 	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
@@ -819,112 +855,127 @@ EOF
 	      -e 's/\.[^.]*$/.X/'
 	exit ;;
     CRAY*TS:*:*:*)
-	echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
+	CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+	GUESS=t90-cray-unicos$CRAY_REL
+	;;
     CRAY*T3E:*:*:*)
-	echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
+	CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+	GUESS=alphaev5-cray-unicosmk$CRAY_REL
+	;;
     CRAY*SV1:*:*:*)
-	echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
+	CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+	GUESS=sv1-cray-unicos$CRAY_REL
+	;;
     *:UNICOS/mp:*:*)
-	echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
+	CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+	GUESS=craynv-cray-unicosmp$CRAY_REL
+	;;
     F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
 	FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
 	FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
 	FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
-	echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-	exit ;;
+	GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}
+	;;
     5000:UNIX_System_V:4.*:*)
 	FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
 	FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
-	echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-	exit ;;
+	GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}
+	;;
     i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
-	echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE"
-	exit ;;
+	GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE
+	;;
     sparc*:BSD/OS:*:*)
-	echo sparc-unknown-bsdi"$UNAME_RELEASE"
-	exit ;;
+	GUESS=sparc-unknown-bsdi$UNAME_RELEASE
+	;;
     *:BSD/OS:*:*)
-	echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE"
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE
+	;;
     arm:FreeBSD:*:*)
 	UNAME_PROCESSOR=`uname -p`
 	set_cc_for_build
 	if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
 	    | grep -q __ARM_PCS_VFP
 	then
-	    echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabi
+	    FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+	    GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi
 	else
-	    echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabihf
+	    FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+	    GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf
 	fi
-	exit ;;
+	;;
     *:FreeBSD:*:*)
 	UNAME_PROCESSOR=`/usr/bin/uname -p`
-	case "$UNAME_PROCESSOR" in
+	case $UNAME_PROCESSOR in
 	    amd64)
 		UNAME_PROCESSOR=x86_64 ;;
 	    i386)
 		UNAME_PROCESSOR=i586 ;;
 	esac
-	echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
-	exit ;;
+	FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+	GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL
+	;;
     i*:CYGWIN*:*)
-	echo "$UNAME_MACHINE"-pc-cygwin
-	exit ;;
+	GUESS=$UNAME_MACHINE-pc-cygwin
+	;;
     *:MINGW64*:*)
-	echo "$UNAME_MACHINE"-pc-mingw64
-	exit ;;
+	GUESS=$UNAME_MACHINE-pc-mingw64
+	;;
     *:MINGW*:*)
-	echo "$UNAME_MACHINE"-pc-mingw32
-	exit ;;
+	GUESS=$UNAME_MACHINE-pc-mingw32
+	;;
     *:MSYS*:*)
-	echo "$UNAME_MACHINE"-pc-msys
-	exit ;;
+	GUESS=$UNAME_MACHINE-pc-msys
+	;;
     i*:PW*:*)
-	echo "$UNAME_MACHINE"-pc-pw32
-	exit ;;
+	GUESS=$UNAME_MACHINE-pc-pw32
+	;;
+    *:SerenityOS:*:*)
+        GUESS=$UNAME_MACHINE-pc-serenity
+        ;;
     *:Interix*:*)
-	case "$UNAME_MACHINE" in
+	case $UNAME_MACHINE in
 	    x86)
-		echo i586-pc-interix"$UNAME_RELEASE"
-		exit ;;
+		GUESS=i586-pc-interix$UNAME_RELEASE
+		;;
 	    authenticamd | genuineintel | EM64T)
-		echo x86_64-unknown-interix"$UNAME_RELEASE"
-		exit ;;
+		GUESS=x86_64-unknown-interix$UNAME_RELEASE
+		;;
 	    IA64)
-		echo ia64-unknown-interix"$UNAME_RELEASE"
-		exit ;;
+		GUESS=ia64-unknown-interix$UNAME_RELEASE
+		;;
 	esac ;;
     i*:UWIN*:*)
-	echo "$UNAME_MACHINE"-pc-uwin
-	exit ;;
+	GUESS=$UNAME_MACHINE-pc-uwin
+	;;
     amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
-	echo x86_64-pc-cygwin
-	exit ;;
+	GUESS=x86_64-pc-cygwin
+	;;
     prep*:SunOS:5.*:*)
-	echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
-	exit ;;
+	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+	GUESS=powerpcle-unknown-solaris2$SUN_REL
+	;;
     *:GNU:*:*)
 	# the GNU system
-	echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`"
-	exit ;;
+	GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'`
+	GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'`
+	GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL
+	;;
     *:GNU/*:*:*)
 	# other systems with GNU libc and userland
-	echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC"
-	exit ;;
+	GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"`
+	GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+	GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC
+	;;
     *:Minix:*:*)
-	echo "$UNAME_MACHINE"-unknown-minix
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-minix
+	;;
     aarch64:Linux:*:*)
-	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
     aarch64_be:Linux:*:*)
 	UNAME_MACHINE=aarch64_be
-	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
     alpha:Linux:*:*)
 	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in
 	  EV5)   UNAME_MACHINE=alphaev5 ;;
@@ -937,60 +988,63 @@ EOF
 	esac
 	objdump --private-headers /bin/sh | grep -q ld.so.1
 	if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
-	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
-	exit ;;
-    arc:Linux:*:* | arceb:Linux:*:*)
-	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
     arm*:Linux:*:*)
 	set_cc_for_build
 	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
 	    | grep -q __ARM_EABI__
 	then
-	    echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+	    GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
 	else
 	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
 		| grep -q __ARM_PCS_VFP
 	    then
-		echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi
+		GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi
 	    else
-		echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf
+		GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf
 	    fi
 	fi
-	exit ;;
+	;;
     avr32*:Linux:*:*)
-	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
     cris:Linux:*:*)
-	echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
-	exit ;;
+	GUESS=$UNAME_MACHINE-axis-linux-$LIBC
+	;;
     crisv32:Linux:*:*)
-	echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
-	exit ;;
+	GUESS=$UNAME_MACHINE-axis-linux-$LIBC
+	;;
     e2k:Linux:*:*)
-	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
     frv:Linux:*:*)
-	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
     hexagon:Linux:*:*)
-	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
     i*86:Linux:*:*)
-	echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
-	exit ;;
+	GUESS=$UNAME_MACHINE-pc-linux-$LIBC
+	;;
     ia64:Linux:*:*)
-	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
     k1om:Linux:*:*)
-	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
     m32r*:Linux:*:*)
-	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
     m68*:Linux:*:*)
-	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
     mips:Linux:*:* | mips64:Linux:*:*)
 	set_cc_for_build
 	IS_GLIBC=0
@@ -1035,123 +1089,135 @@ EOF
 	#endif
 	#endif
 EOF
-	eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`"
+	cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`
+	eval "$cc_set_vars"
 	test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; }
 	;;
     mips64el:Linux:*:*)
-	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
     openrisc*:Linux:*:*)
-	echo or1k-unknown-linux-"$LIBC"
-	exit ;;
+	GUESS=or1k-unknown-linux-$LIBC
+	;;
     or32:Linux:*:* | or1k*:Linux:*:*)
-	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
     padre:Linux:*:*)
-	echo sparc-unknown-linux-"$LIBC"
-	exit ;;
+	GUESS=sparc-unknown-linux-$LIBC
+	;;
     parisc64:Linux:*:* | hppa64:Linux:*:*)
-	echo hppa64-unknown-linux-"$LIBC"
-	exit ;;
+	GUESS=hppa64-unknown-linux-$LIBC
+	;;
     parisc:Linux:*:* | hppa:Linux:*:*)
 	# Look for CPU level
 	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
-	  PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;;
-	  PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;;
-	  *)    echo hppa-unknown-linux-"$LIBC" ;;
+	  PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;;
+	  PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;;
+	  *)    GUESS=hppa-unknown-linux-$LIBC ;;
 	esac
-	exit ;;
+	;;
     ppc64:Linux:*:*)
-	echo powerpc64-unknown-linux-"$LIBC"
-	exit ;;
+	GUESS=powerpc64-unknown-linux-$LIBC
+	;;
     ppc:Linux:*:*)
-	echo powerpc-unknown-linux-"$LIBC"
-	exit ;;
+	GUESS=powerpc-unknown-linux-$LIBC
+	;;
     ppc64le:Linux:*:*)
-	echo powerpc64le-unknown-linux-"$LIBC"
-	exit ;;
+	GUESS=powerpc64le-unknown-linux-$LIBC
+	;;
     ppcle:Linux:*:*)
-	echo powerpcle-unknown-linux-"$LIBC"
-	exit ;;
-    riscv32:Linux:*:* | riscv64:Linux:*:*)
-	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
-	exit ;;
+	GUESS=powerpcle-unknown-linux-$LIBC
+	;;
+    riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
     s390:Linux:*:* | s390x:Linux:*:*)
-	echo "$UNAME_MACHINE"-ibm-linux-"$LIBC"
-	exit ;;
+	GUESS=$UNAME_MACHINE-ibm-linux-$LIBC
+	;;
     sh64*:Linux:*:*)
-	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
     sh*:Linux:*:*)
-	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
     sparc:Linux:*:* | sparc64:Linux:*:*)
-	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
     tile*:Linux:*:*)
-	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
     vax:Linux:*:*)
-	echo "$UNAME_MACHINE"-dec-linux-"$LIBC"
-	exit ;;
+	GUESS=$UNAME_MACHINE-dec-linux-$LIBC
+	;;
     x86_64:Linux:*:*)
 	set_cc_for_build
+	CPU=$UNAME_MACHINE
 	LIBCABI=$LIBC
-	if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
-	    if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \
-		(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
-		grep IS_X32 >/dev/null
-	    then
-		LIBCABI="$LIBC"x32
-	    fi
+	if test "$CC_FOR_BUILD" != no_compiler_found; then
+	    ABI=64
+	    sed 's/^	    //' << EOF > "$dummy.c"
+	    #ifdef __i386__
+	    ABI=x86
+	    #else
+	    #ifdef __ILP32__
+	    ABI=x32
+	    #endif
+	    #endif
+EOF
+	    cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'`
+	    eval "$cc_set_abi"
+	    case $ABI in
+		x86) CPU=i686 ;;
+		x32) LIBCABI=${LIBC}x32 ;;
+	    esac
 	fi
-	echo "$UNAME_MACHINE"-pc-linux-"$LIBCABI"
-	exit ;;
+	GUESS=$CPU-pc-linux-$LIBCABI
+	;;
     xtensa*:Linux:*:*)
-	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
     i*86:DYNIX/ptx:4*:*)
 	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
 	# earlier versions are messed up and put the nodename in both
 	# sysname and nodename.
-	echo i386-sequent-sysv4
-	exit ;;
+	GUESS=i386-sequent-sysv4
+	;;
     i*86:UNIX_SV:4.2MP:2.*)
 	# Unixware is an offshoot of SVR4, but it has its own version
 	# number series starting with 2...
 	# I am not positive that other SVR4 systems won't match this,
 	# I just have to hope.  -- rms.
 	# Use sysv4.2uw... so that sysv4* matches it.
-	echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION"
-	exit ;;
+	GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION
+	;;
     i*86:OS/2:*:*)
 	# If we were able to find `uname', then EMX Unix compatibility
 	# is probably installed.
-	echo "$UNAME_MACHINE"-pc-os2-emx
-	exit ;;
+	GUESS=$UNAME_MACHINE-pc-os2-emx
+	;;
     i*86:XTS-300:*:STOP)
-	echo "$UNAME_MACHINE"-unknown-stop
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-stop
+	;;
     i*86:atheos:*:*)
-	echo "$UNAME_MACHINE"-unknown-atheos
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-atheos
+	;;
     i*86:syllable:*:*)
-	echo "$UNAME_MACHINE"-pc-syllable
-	exit ;;
+	GUESS=$UNAME_MACHINE-pc-syllable
+	;;
     i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
-	echo i386-unknown-lynxos"$UNAME_RELEASE"
-	exit ;;
+	GUESS=i386-unknown-lynxos$UNAME_RELEASE
+	;;
     i*86:*DOS:*:*)
-	echo "$UNAME_MACHINE"-pc-msdosdjgpp
-	exit ;;
+	GUESS=$UNAME_MACHINE-pc-msdosdjgpp
+	;;
     i*86:*:4.*:*)
 	UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
 	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
-		echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL"
+		GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL
 	else
-		echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL"
+		GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL
 	fi
-	exit ;;
+	;;
     i*86:*:5:[678]*)
 	# UnixWare 7.x, OpenUNIX and OpenServer 6.
 	case `/bin/uname -X | grep "^Machine"` in
@@ -1159,12 +1225,12 @@ EOF
 	    *Pentium)	     UNAME_MACHINE=i586 ;;
 	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
 	esac
-	echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}"
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+	;;
     i*86:*:3.2:*)
 	if test -f /usr/options/cb.name; then
 		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
-		echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL"
+		GUESS=$UNAME_MACHINE-pc-isc$UNAME_REL
 	elif /bin/uname -X 2>/dev/null >/dev/null ; then
 		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
 		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
@@ -1174,11 +1240,11 @@ EOF
 			&& UNAME_MACHINE=i686
 		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
 			&& UNAME_MACHINE=i686
-		echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL"
+		GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL
 	else
-		echo "$UNAME_MACHINE"-pc-sysv32
+		GUESS=$UNAME_MACHINE-pc-sysv32
 	fi
-	exit ;;
+	;;
     pc:*:*:*)
 	# Left here for compatibility:
 	# uname -m prints for DJGPP always 'pc', but it prints nothing about
@@ -1186,31 +1252,31 @@ EOF
 	# Note: whatever this is, it MUST be the same as what config.sub
 	# prints for the "djgpp" host, or else GDB configure will decide that
 	# this is a cross-build.
-	echo i586-pc-msdosdjgpp
-	exit ;;
+	GUESS=i586-pc-msdosdjgpp
+	;;
     Intel:Mach:3*:*)
-	echo i386-pc-mach3
-	exit ;;
+	GUESS=i386-pc-mach3
+	;;
     paragon:*:*:*)
-	echo i860-intel-osf1
-	exit ;;
+	GUESS=i860-intel-osf1
+	;;
     i860:*:4.*:*) # i860-SVR4
 	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
-	  echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4
+	  GUESS=i860-stardent-sysv$UNAME_RELEASE    # Stardent Vistra i860-SVR4
 	else # Add other i860-SVR4 vendors below as they are discovered.
-	  echo i860-unknown-sysv"$UNAME_RELEASE"  # Unknown i860-SVR4
+	  GUESS=i860-unknown-sysv$UNAME_RELEASE     # Unknown i860-SVR4
 	fi
-	exit ;;
+	;;
     mini*:CTIX:SYS*5:*)
 	# "miniframe"
-	echo m68010-convergent-sysv
-	exit ;;
+	GUESS=m68010-convergent-sysv
+	;;
     mc68k:UNIX:SYSTEM5:3.51m)
-	echo m68k-convergent-sysv
-	exit ;;
+	GUESS=m68k-convergent-sysv
+	;;
     M680?0:D-NIX:5.3:*)
-	echo m68k-diab-dnix
-	exit ;;
+	GUESS=m68k-diab-dnix
+	;;
     M68*:*:R3V[5678]*:*)
 	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
     3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
@@ -1235,113 +1301,119 @@ EOF
 	/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
 	    && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
     m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
-	echo m68k-unknown-lynxos"$UNAME_RELEASE"
-	exit ;;
+	GUESS=m68k-unknown-lynxos$UNAME_RELEASE
+	;;
     mc68030:UNIX_System_V:4.*:*)
-	echo m68k-atari-sysv4
-	exit ;;
+	GUESS=m68k-atari-sysv4
+	;;
     TSUNAMI:LynxOS:2.*:*)
-	echo sparc-unknown-lynxos"$UNAME_RELEASE"
-	exit ;;
+	GUESS=sparc-unknown-lynxos$UNAME_RELEASE
+	;;
     rs6000:LynxOS:2.*:*)
-	echo rs6000-unknown-lynxos"$UNAME_RELEASE"
-	exit ;;
+	GUESS=rs6000-unknown-lynxos$UNAME_RELEASE
+	;;
     PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
-	echo powerpc-unknown-lynxos"$UNAME_RELEASE"
-	exit ;;
+	GUESS=powerpc-unknown-lynxos$UNAME_RELEASE
+	;;
     SM[BE]S:UNIX_SV:*:*)
-	echo mips-dde-sysv"$UNAME_RELEASE"
-	exit ;;
+	GUESS=mips-dde-sysv$UNAME_RELEASE
+	;;
     RM*:ReliantUNIX-*:*:*)
-	echo mips-sni-sysv4
-	exit ;;
+	GUESS=mips-sni-sysv4
+	;;
     RM*:SINIX-*:*:*)
-	echo mips-sni-sysv4
-	exit ;;
+	GUESS=mips-sni-sysv4
+	;;
     *:SINIX-*:*:*)
 	if uname -p 2>/dev/null >/dev/null ; then
 		UNAME_MACHINE=`(uname -p) 2>/dev/null`
-		echo "$UNAME_MACHINE"-sni-sysv4
+		GUESS=$UNAME_MACHINE-sni-sysv4
 	else
-		echo ns32k-sni-sysv
+		GUESS=ns32k-sni-sysv
 	fi
-	exit ;;
+	;;
     PENTIUM:*:4.0*:*)	# Unisys `ClearPath HMP IX 4000' SVR4/MP effort
 			# says <Richard.M.Bartel@ccMail.Census.GOV>
-	echo i586-unisys-sysv4
-	exit ;;
+	GUESS=i586-unisys-sysv4
+	;;
     *:UNIX_System_V:4*:FTX*)
 	# From Gerald Hewes <hewes@openmarket.com>.
 	# How about differentiating between stratus architectures? -djm
-	echo hppa1.1-stratus-sysv4
-	exit ;;
+	GUESS=hppa1.1-stratus-sysv4
+	;;
     *:*:*:FTX*)
 	# From seanf@swdc.stratus.com.
-	echo i860-stratus-sysv4
-	exit ;;
+	GUESS=i860-stratus-sysv4
+	;;
     i*86:VOS:*:*)
 	# From Paul.Green@stratus.com.
-	echo "$UNAME_MACHINE"-stratus-vos
-	exit ;;
+	GUESS=$UNAME_MACHINE-stratus-vos
+	;;
     *:VOS:*:*)
 	# From Paul.Green@stratus.com.
-	echo hppa1.1-stratus-vos
-	exit ;;
+	GUESS=hppa1.1-stratus-vos
+	;;
     mc68*:A/UX:*:*)
-	echo m68k-apple-aux"$UNAME_RELEASE"
-	exit ;;
+	GUESS=m68k-apple-aux$UNAME_RELEASE
+	;;
     news*:NEWS-OS:6*:*)
-	echo mips-sony-newsos6
-	exit ;;
+	GUESS=mips-sony-newsos6
+	;;
     R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
-	if [ -d /usr/nec ]; then
-		echo mips-nec-sysv"$UNAME_RELEASE"
+	if test -d /usr/nec; then
+		GUESS=mips-nec-sysv$UNAME_RELEASE
 	else
-		echo mips-unknown-sysv"$UNAME_RELEASE"
+		GUESS=mips-unknown-sysv$UNAME_RELEASE
 	fi
-	exit ;;
+	;;
     BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
-	echo powerpc-be-beos
-	exit ;;
+	GUESS=powerpc-be-beos
+	;;
     BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
-	echo powerpc-apple-beos
-	exit ;;
+	GUESS=powerpc-apple-beos
+	;;
     BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
-	echo i586-pc-beos
-	exit ;;
+	GUESS=i586-pc-beos
+	;;
     BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
-	echo i586-pc-haiku
-	exit ;;
-    x86_64:Haiku:*:*)
-	echo x86_64-unknown-haiku
-	exit ;;
+	GUESS=i586-pc-haiku
+	;;
+    ppc:Haiku:*:*)	# Haiku running on Apple PowerPC
+	GUESS=powerpc-apple-haiku
+	;;
+    *:Haiku:*:*)	# Haiku modern gcc (not bound by BeOS compat)
+	GUESS=$UNAME_MACHINE-unknown-haiku
+	;;
     SX-4:SUPER-UX:*:*)
-	echo sx4-nec-superux"$UNAME_RELEASE"
-	exit ;;
+	GUESS=sx4-nec-superux$UNAME_RELEASE
+	;;
     SX-5:SUPER-UX:*:*)
-	echo sx5-nec-superux"$UNAME_RELEASE"
-	exit ;;
+	GUESS=sx5-nec-superux$UNAME_RELEASE
+	;;
     SX-6:SUPER-UX:*:*)
-	echo sx6-nec-superux"$UNAME_RELEASE"
-	exit ;;
+	GUESS=sx6-nec-superux$UNAME_RELEASE
+	;;
     SX-7:SUPER-UX:*:*)
-	echo sx7-nec-superux"$UNAME_RELEASE"
-	exit ;;
+	GUESS=sx7-nec-superux$UNAME_RELEASE
+	;;
     SX-8:SUPER-UX:*:*)
-	echo sx8-nec-superux"$UNAME_RELEASE"
-	exit ;;
+	GUESS=sx8-nec-superux$UNAME_RELEASE
+	;;
     SX-8R:SUPER-UX:*:*)
-	echo sx8r-nec-superux"$UNAME_RELEASE"
-	exit ;;
+	GUESS=sx8r-nec-superux$UNAME_RELEASE
+	;;
     SX-ACE:SUPER-UX:*:*)
-	echo sxace-nec-superux"$UNAME_RELEASE"
-	exit ;;
+	GUESS=sxace-nec-superux$UNAME_RELEASE
+	;;
     Power*:Rhapsody:*:*)
-	echo powerpc-apple-rhapsody"$UNAME_RELEASE"
-	exit ;;
+	GUESS=powerpc-apple-rhapsody$UNAME_RELEASE
+	;;
     *:Rhapsody:*:*)
-	echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
-	exit ;;
+	GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE
+	;;
+    arm64:Darwin:*:*)
+	GUESS=aarch64-apple-darwin$UNAME_RELEASE
+	;;
     *:Darwin:*:*)
 	UNAME_PROCESSOR=`uname -p`
 	case $UNAME_PROCESSOR in
@@ -1356,7 +1428,7 @@ EOF
 	else
 	    set_cc_for_build
 	fi
-	if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
+	if test "$CC_FOR_BUILD" != no_compiler_found; then
 	    if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
 		   (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
 		   grep IS_64BIT_ARCH >/dev/null
@@ -1377,109 +1449,119 @@ EOF
 	    # uname -m returns i386 or x86_64
 	    UNAME_PROCESSOR=$UNAME_MACHINE
 	fi
-	echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE"
-	exit ;;
+	GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE
+	;;
     *:procnto*:*:* | *:QNX:[0123456789]*:*)
 	UNAME_PROCESSOR=`uname -p`
 	if test "$UNAME_PROCESSOR" = x86; then
 		UNAME_PROCESSOR=i386
 		UNAME_MACHINE=pc
 	fi
-	echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE"
-	exit ;;
+	GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE
+	;;
     *:QNX:*:4*)
-	echo i386-pc-qnx
-	exit ;;
+	GUESS=i386-pc-qnx
+	;;
     NEO-*:NONSTOP_KERNEL:*:*)
-	echo neo-tandem-nsk"$UNAME_RELEASE"
-	exit ;;
+	GUESS=neo-tandem-nsk$UNAME_RELEASE
+	;;
     NSE-*:NONSTOP_KERNEL:*:*)
-	echo nse-tandem-nsk"$UNAME_RELEASE"
-	exit ;;
+	GUESS=nse-tandem-nsk$UNAME_RELEASE
+	;;
     NSR-*:NONSTOP_KERNEL:*:*)
-	echo nsr-tandem-nsk"$UNAME_RELEASE"
-	exit ;;
+	GUESS=nsr-tandem-nsk$UNAME_RELEASE
+	;;
     NSV-*:NONSTOP_KERNEL:*:*)
-	echo nsv-tandem-nsk"$UNAME_RELEASE"
-	exit ;;
+	GUESS=nsv-tandem-nsk$UNAME_RELEASE
+	;;
     NSX-*:NONSTOP_KERNEL:*:*)
-	echo nsx-tandem-nsk"$UNAME_RELEASE"
-	exit ;;
+	GUESS=nsx-tandem-nsk$UNAME_RELEASE
+	;;
     *:NonStop-UX:*:*)
-	echo mips-compaq-nonstopux
-	exit ;;
+	GUESS=mips-compaq-nonstopux
+	;;
     BS2000:POSIX*:*:*)
-	echo bs2000-siemens-sysv
-	exit ;;
+	GUESS=bs2000-siemens-sysv
+	;;
     DS/*:UNIX_System_V:*:*)
-	echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE"
-	exit ;;
+	GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE
+	;;
     *:Plan9:*:*)
 	# "uname -m" is not consistent, so use $cputype instead. 386
 	# is converted to i386 for consistency with other x86
 	# operating systems.
-	# shellcheck disable=SC2154
-	if test "$cputype" = 386; then
+	if test "${cputype-}" = 386; then
 	    UNAME_MACHINE=i386
-	else
-	    UNAME_MACHINE="$cputype"
+	elif test "x${cputype-}" != x; then
+	    UNAME_MACHINE=$cputype
 	fi
-	echo "$UNAME_MACHINE"-unknown-plan9
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-plan9
+	;;
     *:TOPS-10:*:*)
-	echo pdp10-unknown-tops10
-	exit ;;
+	GUESS=pdp10-unknown-tops10
+	;;
     *:TENEX:*:*)
-	echo pdp10-unknown-tenex
-	exit ;;
+	GUESS=pdp10-unknown-tenex
+	;;
     KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
-	echo pdp10-dec-tops20
-	exit ;;
+	GUESS=pdp10-dec-tops20
+	;;
     XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
-	echo pdp10-xkl-tops20
-	exit ;;
+	GUESS=pdp10-xkl-tops20
+	;;
     *:TOPS-20:*:*)
-	echo pdp10-unknown-tops20
-	exit ;;
+	GUESS=pdp10-unknown-tops20
+	;;
     *:ITS:*:*)
-	echo pdp10-unknown-its
-	exit ;;
+	GUESS=pdp10-unknown-its
+	;;
     SEI:*:*:SEIUX)
-	echo mips-sei-seiux"$UNAME_RELEASE"
-	exit ;;
+	GUESS=mips-sei-seiux$UNAME_RELEASE
+	;;
     *:DragonFly:*:*)
-	echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
-	exit ;;
+	DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+	GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL
+	;;
     *:*VMS:*:*)
 	UNAME_MACHINE=`(uname -p) 2>/dev/null`
-	case "$UNAME_MACHINE" in
-	    A*) echo alpha-dec-vms ; exit ;;
-	    I*) echo ia64-dec-vms ; exit ;;
-	    V*) echo vax-dec-vms ; exit ;;
+	case $UNAME_MACHINE in
+	    A*) GUESS=alpha-dec-vms ;;
+	    I*) GUESS=ia64-dec-vms ;;
+	    V*) GUESS=vax-dec-vms ;;
 	esac ;;
     *:XENIX:*:SysV)
-	echo i386-pc-xenix
-	exit ;;
+	GUESS=i386-pc-xenix
+	;;
     i*86:skyos:*:*)
-	echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`"
-	exit ;;
+	SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`
+	GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL
+	;;
     i*86:rdos:*:*)
-	echo "$UNAME_MACHINE"-pc-rdos
-	exit ;;
-    i*86:AROS:*:*)
-	echo "$UNAME_MACHINE"-pc-aros
-	exit ;;
+	GUESS=$UNAME_MACHINE-pc-rdos
+	;;
+    i*86:Fiwix:*:*)
+	GUESS=$UNAME_MACHINE-pc-fiwix
+	;;
+    *:AROS:*:*)
+	GUESS=$UNAME_MACHINE-unknown-aros
+	;;
     x86_64:VMkernel:*:*)
-	echo "$UNAME_MACHINE"-unknown-esx
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-esx
+	;;
     amd64:Isilon\ OneFS:*:*)
-	echo x86_64-unknown-onefs
-	exit ;;
+	GUESS=x86_64-unknown-onefs
+	;;
     *:Unleashed:*:*)
-	echo "$UNAME_MACHINE"-unknown-unleashed"$UNAME_RELEASE"
-	exit ;;
+	GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE
+	;;
 esac
 
+# Do we have a guess based on uname results?
+if test "x$GUESS" != x; then
+    echo "$GUESS"
+    exit
+fi
+
 # No uname command or uname output not recognized.
 set_cc_for_build
 cat > "$dummy.c" <<EOF
@@ -1611,7 +1693,7 @@ main ()
 }
 EOF
 
-$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` &&
 	{ echo "$SYSTEM_NAME"; exit; }
 
 # Apollos put the system type in the environment.
@@ -1619,7 +1701,7 @@ test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; }
 
 echo "$0: unable to guess system type" >&2
 
-case "$UNAME_MACHINE:$UNAME_SYSTEM" in
+case $UNAME_MACHINE:$UNAME_SYSTEM in
     mips:Linux | mips64:Linux)
 	# If we got here on MIPS GNU/Linux, output extra information.
 	cat >&2 <<EOF
@@ -1636,14 +1718,16 @@ This script (version $timestamp), has failed to recognize the
 operating system you are using. If your script is old, overwrite *all*
 copies of config.guess and config.sub with the latest versions from:
 
-  https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
+  https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
 and
-  https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
+  https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
 EOF
 
-year=`echo $timestamp | sed 's,-.*,,'`
+our_year=`echo $timestamp | sed 's,-.*,,'`
+thisyear=`date +%Y`
 # shellcheck disable=SC2003
-if test "`expr "\`date +%Y\`" - "$year"`" -lt 3 ; then
+script_age=`expr "$thisyear" - "$our_year"`
+if test "$script_age" -lt 3 ; then
    cat >&2 <<EOF
 
 If $0 has already been updated, send the following data and any
diff --git a/config.sub b/config.sub
index 44ec7d8..b41da55 100755
--- a/config.sub
+++ b/config.sub
@@ -1,12 +1,14 @@
-#! /bin/sh
+#!/usr/bin/sh
 # Configuration validation subroutine script.
-#   Copyright 1992-2020 Free Software Foundation, Inc.
+#   Copyright 1992-2022 Free Software Foundation, Inc.
 
-timestamp='2020-06-20'
+# shellcheck disable=SC2006,SC2268 # see below for rationale
+
+timestamp='2022-01-03'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
+# the Free Software Foundation, either version 3 of the License, or
 # (at your option) any later version.
 #
 # This program is distributed in the hope that it will be useful, but
@@ -33,7 +35,7 @@ timestamp='2020-06-20'
 # Otherwise, we print the canonical config type on stdout and succeed.
 
 # You can get the latest version of this script from:
-# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
+# https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
 
 # This file is supposed to be the same for all GNU packages
 # and recognize all the CPU types, system types and aliases
@@ -50,6 +52,13 @@ timestamp='2020-06-20'
 #	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
 # It is wrong to echo any other type of specification.
 
+# The "shellcheck disable" line above the timestamp inhibits complaints
+# about features and limitations of the classic Bourne shell that were
+# superseded or lifted in POSIX.  However, this script identifies a wide
+# variety of pre-POSIX systems that do not have POSIX shells at all, and
+# even some reasonably current systems (Solaris 10 as case-in-point) still
+# have a pre-POSIX /bin/sh.
+
 me=`echo "$0" | sed -e 's,.*/,,'`
 
 usage="\
@@ -67,7 +76,7 @@ Report bugs and patches to <config-patches@gnu.org>."
 version="\
 GNU config.sub ($timestamp)
 
-Copyright 1992-2020 Free Software Foundation, Inc.
+Copyright 1992-2022 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -112,9 +121,11 @@ esac
 
 # Split fields of configuration type
 # shellcheck disable=SC2162
+saved_IFS=$IFS
 IFS="-" read field1 field2 field3 field4 <<EOF
 $1
 EOF
+IFS=$saved_IFS
 
 # Separate into logical components for further validation
 case $1 in
@@ -124,28 +135,27 @@ case $1 in
 		;;
 	*-*-*-*)
 		basic_machine=$field1-$field2
-		os=$field3-$field4
+		basic_os=$field3-$field4
 		;;
 	*-*-*)
 		# Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two
 		# parts
 		maybe_os=$field2-$field3
 		case $maybe_os in
-			nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc \
-			| linux-newlib* | linux-musl* | linux-uclibc* | uclinux-uclibc* \
+			nto-qnx* | linux-* | uclinux-uclibc* \
 			| uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
 			| netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
 			| storm-chaos* | os2-emx* | rtmk-nova*)
 				basic_machine=$field1
-				os=$maybe_os
+				basic_os=$maybe_os
 				;;
 			android-linux)
 				basic_machine=$field1-unknown
-				os=linux-android
+				basic_os=linux-android
 				;;
 			*)
 				basic_machine=$field1-$field2
-				os=$field3
+				basic_os=$field3
 				;;
 		esac
 		;;
@@ -154,7 +164,7 @@ case $1 in
 		case $field1-$field2 in
 			decstation-3100)
 				basic_machine=mips-dec
-				os=
+				basic_os=
 				;;
 			*-*)
 				# Second component is usually, but not always the OS
@@ -162,7 +172,11 @@ case $1 in
 					# Prevent following clause from handling this valid os
 					sun*os*)
 						basic_machine=$field1
-						os=$field2
+						basic_os=$field2
+						;;
+					zephyr*)
+						basic_machine=$field1-unknown
+						basic_os=$field2
 						;;
 					# Manufacturers
 					dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \
@@ -175,11 +189,11 @@ case $1 in
 					| microblaze* | sim | cisco \
 					| oki | wec | wrs | winbond)
 						basic_machine=$field1-$field2
-						os=
+						basic_os=
 						;;
 					*)
 						basic_machine=$field1
-						os=$field2
+						basic_os=$field2
 						;;
 				esac
 			;;
@@ -191,451 +205,451 @@ case $1 in
 		case $field1 in
 			386bsd)
 				basic_machine=i386-pc
-				os=bsd
+				basic_os=bsd
 				;;
 			a29khif)
 				basic_machine=a29k-amd
-				os=udi
+				basic_os=udi
 				;;
 			adobe68k)
 				basic_machine=m68010-adobe
-				os=scout
+				basic_os=scout
 				;;
 			alliant)
 				basic_machine=fx80-alliant
-				os=
+				basic_os=
 				;;
 			altos | altos3068)
 				basic_machine=m68k-altos
-				os=
+				basic_os=
 				;;
 			am29k)
 				basic_machine=a29k-none
-				os=bsd
+				basic_os=bsd
 				;;
 			amdahl)
 				basic_machine=580-amdahl
-				os=sysv
+				basic_os=sysv
 				;;
 			amiga)
 				basic_machine=m68k-unknown
-				os=
+				basic_os=
 				;;
 			amigaos | amigados)
 				basic_machine=m68k-unknown
-				os=amigaos
+				basic_os=amigaos
 				;;
 			amigaunix | amix)
 				basic_machine=m68k-unknown
-				os=sysv4
+				basic_os=sysv4
 				;;
 			apollo68)
 				basic_machine=m68k-apollo
-				os=sysv
+				basic_os=sysv
 				;;
 			apollo68bsd)
 				basic_machine=m68k-apollo
-				os=bsd
+				basic_os=bsd
 				;;
 			aros)
 				basic_machine=i386-pc
-				os=aros
+				basic_os=aros
 				;;
 			aux)
 				basic_machine=m68k-apple
-				os=aux
+				basic_os=aux
 				;;
 			balance)
 				basic_machine=ns32k-sequent
-				os=dynix
+				basic_os=dynix
 				;;
 			blackfin)
 				basic_machine=bfin-unknown
-				os=linux
+				basic_os=linux
 				;;
 			cegcc)
 				basic_machine=arm-unknown
-				os=cegcc
+				basic_os=cegcc
 				;;
 			convex-c1)
 				basic_machine=c1-convex
-				os=bsd
+				basic_os=bsd
 				;;
 			convex-c2)
 				basic_machine=c2-convex
-				os=bsd
+				basic_os=bsd
 				;;
 			convex-c32)
 				basic_machine=c32-convex
-				os=bsd
+				basic_os=bsd
 				;;
 			convex-c34)
 				basic_machine=c34-convex
-				os=bsd
+				basic_os=bsd
 				;;
 			convex-c38)
 				basic_machine=c38-convex
-				os=bsd
+				basic_os=bsd
 				;;
 			cray)
 				basic_machine=j90-cray
-				os=unicos
+				basic_os=unicos
 				;;
 			crds | unos)
 				basic_machine=m68k-crds
-				os=
+				basic_os=
 				;;
 			da30)
 				basic_machine=m68k-da30
-				os=
+				basic_os=
 				;;
 			decstation | pmax | pmin | dec3100 | decstatn)
 				basic_machine=mips-dec
-				os=
+				basic_os=
 				;;
 			delta88)
 				basic_machine=m88k-motorola
-				os=sysv3
+				basic_os=sysv3
 				;;
 			dicos)
 				basic_machine=i686-pc
-				os=dicos
+				basic_os=dicos
 				;;
 			djgpp)
 				basic_machine=i586-pc
-				os=msdosdjgpp
+				basic_os=msdosdjgpp
 				;;
 			ebmon29k)
 				basic_machine=a29k-amd
-				os=ebmon
+				basic_os=ebmon
 				;;
 			es1800 | OSE68k | ose68k | ose | OSE)
 				basic_machine=m68k-ericsson
-				os=ose
+				basic_os=ose
 				;;
 			gmicro)
 				basic_machine=tron-gmicro
-				os=sysv
+				basic_os=sysv
 				;;
 			go32)
 				basic_machine=i386-pc
-				os=go32
+				basic_os=go32
 				;;
 			h8300hms)
 				basic_machine=h8300-hitachi
-				os=hms
+				basic_os=hms
 				;;
 			h8300xray)
 				basic_machine=h8300-hitachi
-				os=xray
+				basic_os=xray
 				;;
 			h8500hms)
 				basic_machine=h8500-hitachi
-				os=hms
+				basic_os=hms
 				;;
 			harris)
 				basic_machine=m88k-harris
-				os=sysv3
+				basic_os=sysv3
 				;;
 			hp300 | hp300hpux)
 				basic_machine=m68k-hp
-				os=hpux
+				basic_os=hpux
 				;;
 			hp300bsd)
 				basic_machine=m68k-hp
-				os=bsd
+				basic_os=bsd
 				;;
 			hppaosf)
 				basic_machine=hppa1.1-hp
-				os=osf
+				basic_os=osf
 				;;
 			hppro)
 				basic_machine=hppa1.1-hp
-				os=proelf
+				basic_os=proelf
 				;;
 			i386mach)
 				basic_machine=i386-mach
-				os=mach
+				basic_os=mach
 				;;
 			isi68 | isi)
 				basic_machine=m68k-isi
-				os=sysv
+				basic_os=sysv
 				;;
 			m68knommu)
 				basic_machine=m68k-unknown
-				os=linux
+				basic_os=linux
 				;;
 			magnum | m3230)
 				basic_machine=mips-mips
-				os=sysv
+				basic_os=sysv
 				;;
 			merlin)
 				basic_machine=ns32k-utek
-				os=sysv
+				basic_os=sysv
 				;;
 			mingw64)
 				basic_machine=x86_64-pc
-				os=mingw64
+				basic_os=mingw64
 				;;
 			mingw32)
 				basic_machine=i686-pc
-				os=mingw32
+				basic_os=mingw32
 				;;
 			mingw32ce)
 				basic_machine=arm-unknown
-				os=mingw32ce
+				basic_os=mingw32ce
 				;;
 			monitor)
 				basic_machine=m68k-rom68k
-				os=coff
+				basic_os=coff
 				;;
 			morphos)
 				basic_machine=powerpc-unknown
-				os=morphos
+				basic_os=morphos
 				;;
 			moxiebox)
 				basic_machine=moxie-unknown
-				os=moxiebox
+				basic_os=moxiebox
 				;;
 			msdos)
 				basic_machine=i386-pc
-				os=msdos
+				basic_os=msdos
 				;;
 			msys)
 				basic_machine=i686-pc
-				os=msys
+				basic_os=msys
 				;;
 			mvs)
 				basic_machine=i370-ibm
-				os=mvs
+				basic_os=mvs
 				;;
 			nacl)
 				basic_machine=le32-unknown
-				os=nacl
+				basic_os=nacl
 				;;
 			ncr3000)
 				basic_machine=i486-ncr
-				os=sysv4
+				basic_os=sysv4
 				;;
 			netbsd386)
 				basic_machine=i386-pc
-				os=netbsd
+				basic_os=netbsd
 				;;
 			netwinder)
 				basic_machine=armv4l-rebel
-				os=linux
+				basic_os=linux
 				;;
 			news | news700 | news800 | news900)
 				basic_machine=m68k-sony
-				os=newsos
+				basic_os=newsos
 				;;
 			news1000)
 				basic_machine=m68030-sony
-				os=newsos
+				basic_os=newsos
 				;;
 			necv70)
 				basic_machine=v70-nec
-				os=sysv
+				basic_os=sysv
 				;;
 			nh3000)
 				basic_machine=m68k-harris
-				os=cxux
+				basic_os=cxux
 				;;
 			nh[45]000)
 				basic_machine=m88k-harris
-				os=cxux
+				basic_os=cxux
 				;;
 			nindy960)
 				basic_machine=i960-intel
-				os=nindy
+				basic_os=nindy
 				;;
 			mon960)
 				basic_machine=i960-intel
-				os=mon960
+				basic_os=mon960
 				;;
 			nonstopux)
 				basic_machine=mips-compaq
-				os=nonstopux
+				basic_os=nonstopux
 				;;
 			os400)
 				basic_machine=powerpc-ibm
-				os=os400
+				basic_os=os400
 				;;
 			OSE68000 | ose68000)
 				basic_machine=m68000-ericsson
-				os=ose
+				basic_os=ose
 				;;
 			os68k)
 				basic_machine=m68k-none
-				os=os68k
+				basic_os=os68k
 				;;
 			paragon)
 				basic_machine=i860-intel
-				os=osf
+				basic_os=osf
 				;;
 			parisc)
 				basic_machine=hppa-unknown
-				os=linux
+				basic_os=linux
 				;;
 			psp)
 				basic_machine=mipsallegrexel-sony
-				os=psp
+				basic_os=psp
 				;;
 			pw32)
 				basic_machine=i586-unknown
-				os=pw32
+				basic_os=pw32
 				;;
 			rdos | rdos64)
 				basic_machine=x86_64-pc
-				os=rdos
+				basic_os=rdos
 				;;
 			rdos32)
 				basic_machine=i386-pc
-				os=rdos
+				basic_os=rdos
 				;;
 			rom68k)
 				basic_machine=m68k-rom68k
-				os=coff
+				basic_os=coff
 				;;
 			sa29200)
 				basic_machine=a29k-amd
-				os=udi
+				basic_os=udi
 				;;
 			sei)
 				basic_machine=mips-sei
-				os=seiux
+				basic_os=seiux
 				;;
 			sequent)
 				basic_machine=i386-sequent
-				os=
+				basic_os=
 				;;
 			sps7)
 				basic_machine=m68k-bull
-				os=sysv2
+				basic_os=sysv2
 				;;
 			st2000)
 				basic_machine=m68k-tandem
-				os=
+				basic_os=
 				;;
 			stratus)
 				basic_machine=i860-stratus
-				os=sysv4
+				basic_os=sysv4
 				;;
 			sun2)
 				basic_machine=m68000-sun
-				os=
+				basic_os=
 				;;
 			sun2os3)
 				basic_machine=m68000-sun
-				os=sunos3
+				basic_os=sunos3
 				;;
 			sun2os4)
 				basic_machine=m68000-sun
-				os=sunos4
+				basic_os=sunos4
 				;;
 			sun3)
 				basic_machine=m68k-sun
-				os=
+				basic_os=
 				;;
 			sun3os3)
 				basic_machine=m68k-sun
-				os=sunos3
+				basic_os=sunos3
 				;;
 			sun3os4)
 				basic_machine=m68k-sun
-				os=sunos4
+				basic_os=sunos4
 				;;
 			sun4)
 				basic_machine=sparc-sun
-				os=
+				basic_os=
 				;;
 			sun4os3)
 				basic_machine=sparc-sun
-				os=sunos3
+				basic_os=sunos3
 				;;
 			sun4os4)
 				basic_machine=sparc-sun
-				os=sunos4
+				basic_os=sunos4
 				;;
 			sun4sol2)
 				basic_machine=sparc-sun
-				os=solaris2
+				basic_os=solaris2
 				;;
 			sun386 | sun386i | roadrunner)
 				basic_machine=i386-sun
-				os=
+				basic_os=
 				;;
 			sv1)
 				basic_machine=sv1-cray
-				os=unicos
+				basic_os=unicos
 				;;
 			symmetry)
 				basic_machine=i386-sequent
-				os=dynix
+				basic_os=dynix
 				;;
 			t3e)
 				basic_machine=alphaev5-cray
-				os=unicos
+				basic_os=unicos
 				;;
 			t90)
 				basic_machine=t90-cray
-				os=unicos
+				basic_os=unicos
 				;;
 			toad1)
 				basic_machine=pdp10-xkl
-				os=tops20
+				basic_os=tops20
 				;;
 			tpf)
 				basic_machine=s390x-ibm
-				os=tpf
+				basic_os=tpf
 				;;
 			udi29k)
 				basic_machine=a29k-amd
-				os=udi
+				basic_os=udi
 				;;
 			ultra3)
 				basic_machine=a29k-nyu
-				os=sym1
+				basic_os=sym1
 				;;
 			v810 | necv810)
 				basic_machine=v810-nec
-				os=none
+				basic_os=none
 				;;
 			vaxv)
 				basic_machine=vax-dec
-				os=sysv
+				basic_os=sysv
 				;;
 			vms)
 				basic_machine=vax-dec
-				os=vms
+				basic_os=vms
 				;;
 			vsta)
 				basic_machine=i386-pc
-				os=vsta
+				basic_os=vsta
 				;;
 			vxworks960)
 				basic_machine=i960-wrs
-				os=vxworks
+				basic_os=vxworks
 				;;
 			vxworks68)
 				basic_machine=m68k-wrs
-				os=vxworks
+				basic_os=vxworks
 				;;
 			vxworks29k)
 				basic_machine=a29k-wrs
-				os=vxworks
+				basic_os=vxworks
 				;;
 			xbox)
 				basic_machine=i686-pc
-				os=mingw32
+				basic_os=mingw32
 				;;
 			ymp)
 				basic_machine=ymp-cray
-				os=unicos
+				basic_os=unicos
 				;;
 			*)
 				basic_machine=$1
-				os=
+				basic_os=
 				;;
 		esac
 		;;
@@ -687,17 +701,17 @@ case $basic_machine in
 	bluegene*)
 		cpu=powerpc
 		vendor=ibm
-		os=cnk
+		basic_os=cnk
 		;;
 	decsystem10* | dec10*)
 		cpu=pdp10
 		vendor=dec
-		os=tops10
+		basic_os=tops10
 		;;
 	decsystem20* | dec20*)
 		cpu=pdp10
 		vendor=dec
-		os=tops20
+		basic_os=tops20
 		;;
 	delta | 3300 | motorola-3300 | motorola-delta \
 	      | 3300-motorola | delta-motorola)
@@ -707,7 +721,7 @@ case $basic_machine in
 	dpx2*)
 		cpu=m68k
 		vendor=bull
-		os=sysv3
+		basic_os=sysv3
 		;;
 	encore | umax | mmax)
 		cpu=ns32k
@@ -716,7 +730,7 @@ case $basic_machine in
 	elxsi)
 		cpu=elxsi
 		vendor=elxsi
-		os=${os:-bsd}
+		basic_os=${basic_os:-bsd}
 		;;
 	fx2800)
 		cpu=i860
@@ -729,7 +743,7 @@ case $basic_machine in
 	h3050r* | hiux*)
 		cpu=hppa1.1
 		vendor=hitachi
-		os=hiuxwe2
+		basic_os=hiuxwe2
 		;;
 	hp3k9[0-9][0-9] | hp9[0-9][0-9])
 		cpu=hppa1.0
@@ -772,36 +786,36 @@ case $basic_machine in
 	i*86v32)
 		cpu=`echo "$1" | sed -e 's/86.*/86/'`
 		vendor=pc
-		os=sysv32
+		basic_os=sysv32
 		;;
 	i*86v4*)
 		cpu=`echo "$1" | sed -e 's/86.*/86/'`
 		vendor=pc
-		os=sysv4
+		basic_os=sysv4
 		;;
 	i*86v)
 		cpu=`echo "$1" | sed -e 's/86.*/86/'`
 		vendor=pc
-		os=sysv
+		basic_os=sysv
 		;;
 	i*86sol2)
 		cpu=`echo "$1" | sed -e 's/86.*/86/'`
 		vendor=pc
-		os=solaris2
+		basic_os=solaris2
 		;;
 	j90 | j90-cray)
 		cpu=j90
 		vendor=cray
-		os=${os:-unicos}
+		basic_os=${basic_os:-unicos}
 		;;
 	iris | iris4d)
 		cpu=mips
 		vendor=sgi
-		case $os in
+		case $basic_os in
 		    irix*)
 			;;
 		    *)
-			os=irix4
+			basic_os=irix4
 			;;
 		esac
 		;;
@@ -812,47 +826,26 @@ case $basic_machine in
 	*mint | mint[0-9]* | *MiNT | *MiNT[0-9]*)
 		cpu=m68k
 		vendor=atari
-		os=mint
-		;;
-	mipsEE* | ee)
-		cpu=mips64r5900el
-		vendor=scei
-		case $os in
-		    linux*)
-			;;
-		    *)
-			os=elf
-			;;
-		esac
-		;;
-	iop)
-		cpu=mipsel
-		vendor=scei
-		os=irx
-		;;
-	dvp)
-		cpu=dvp
-		vendor=scei
-		os=elf
+		basic_os=mint
 		;;
 	news-3600 | risc-news)
 		cpu=mips
 		vendor=sony
-		os=newsos
+		basic_os=newsos
 		;;
 	next | m*-next)
 		cpu=m68k
 		vendor=next
-		case $os in
+		case $basic_os in
 		    openstep*)
 		        ;;
 		    nextstep*)
 			;;
 		    ns2*)
-		      os=nextstep2
+		      basic_os=nextstep2
 			;;
 		    *)
-		      os=nextstep3
+		      basic_os=nextstep3
 			;;
 		esac
 		;;
@@ -863,12 +856,12 @@ case $basic_machine in
 	op50n-* | op60c-*)
 		cpu=hppa1.1
 		vendor=oki
-		os=proelf
+		basic_os=proelf
 		;;
 	pa-hitachi)
 		cpu=hppa1.1
 		vendor=hitachi
-		os=hiuxwe2
+		basic_os=hiuxwe2
 		;;
 	pbd)
 		cpu=sparc
@@ -905,12 +898,12 @@ case $basic_machine in
 	sde)
 		cpu=mipsisa32
 		vendor=sde
-		os=${os:-elf}
+		basic_os=${basic_os:-elf}
 		;;
 	simso-wrs)
 		cpu=sparclite
 		vendor=wrs
-		os=vxworks
+		basic_os=vxworks
 		;;
 	tower | tower-32)
 		cpu=m68k
@@ -927,7 +920,7 @@ case $basic_machine in
 	w89k-*)
 		cpu=hppa1.1
 		vendor=winbond
-		os=proelf
+		basic_os=proelf
 		;;
 	none)
 		cpu=none
@@ -944,9 +937,11 @@ case $basic_machine in
 
 	*-*)
 		# shellcheck disable=SC2162
+		saved_IFS=$IFS
 		IFS="-" read cpu vendor <<EOF
 $basic_machine
 EOF
+		IFS=$saved_IFS
 		;;
 	# We use `pc' rather than `unknown'
 	# because (1) that's what they normally are, and
@@ -980,11 +975,11 @@ case $cpu-$vendor in
 	# some cases the only manufacturer, in others, it is the most popular.
 	craynv-unknown)
 		vendor=cray
-		os=${os:-unicosmp}
+		basic_os=${basic_os:-unicosmp}
 		;;
 	c90-unknown | c90-cray)
 		vendor=cray
-		os=${os:-unicos}
+		basic_os=${Basic_os:-unicos}
 		;;
 	fx80-unknown)
 		vendor=alliant
@@ -1025,10 +1020,15 @@ case $cpu-$vendor in
 		;;
 
 	# Here we normalize CPU types with a missing or matching vendor
+	armh-unknown | armh-alt)
+		cpu=armv7l
+		vendor=alt
+		basic_os=${basic_os:-linux-gnueabihf}
+		;;
 	dpx20-unknown | dpx20-bull)
 		cpu=rs6000
 		vendor=bull
-		os=${os:-bosx}
+		basic_os=${basic_os:-bosx}
 		;;
 
 	# Here we normalize CPU types irrespective of the vendor
@@ -1037,7 +1037,7 @@ case $cpu-$vendor in
 		;;
 	blackfin-*)
 		cpu=bfin
-		os=linux
+		basic_os=linux
 		;;
 	c54x-*)
 		cpu=tic54x
@@ -1050,7 +1050,7 @@ case $cpu-$vendor in
 		;;
 	e500v[12]-*)
 		cpu=powerpc
-		os=$os"spe"
+		basic_os=${basic_os}"spe"
 		;;
 	mips3*-*)
 		cpu=mips64
@@ -1060,7 +1060,7 @@ case $cpu-$vendor in
 		;;
 	m68knommu-*)
 		cpu=m68k
-		os=linux
+		basic_os=linux
 		;;
 	m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*)
 		cpu=s12z
@@ -1070,7 +1070,7 @@ case $cpu-$vendor in
 		;;
 	parisc-*)
 		cpu=hppa
-		os=linux
+		basic_os=linux
 		;;
 	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
 		cpu=i586
@@ -1126,11 +1126,14 @@ case $cpu-$vendor in
 	xscale-* | xscalee[bl]-*)
 		cpu=`echo "$cpu" | sed 's/^xscale/arm/'`
 		;;
+	arm64-* | aarch64le-*)
+		cpu=aarch64
+		;;
 
 	# Recognize the canonical CPU Types that limit and/or modify the
 	# company names they are paired with.
 	cr16-*)
-		os=${os:-elf}
+		basic_os=${basic_os:-elf}
 		;;
 	crisv32-* | etraxfs*-*)
 		cpu=crisv32
@@ -1141,7 +1144,7 @@ case $cpu-$vendor in
 		vendor=axis
 		;;
 	crx-*)
-		os=${os:-elf}
+		basic_os=${basic_os:-elf}
 		;;
 	neo-tandem)
 		cpu=neo
@@ -1168,7 +1171,7 @@ case $cpu-$vendor in
 		vendor=sony
 		;;
 	tile*-*)
-		os=${os:-linux-gnu}
+		basic_os=${basic_os:-linux-gnu}
 		;;
 
 	*)
@@ -1184,8 +1187,8 @@ case $cpu-$vendor in
 			| alphapca5[67] | alpha64pca5[67] \
 			| am33_2.0 \
 			| amdgcn \
-			| arc | arceb \
-			| arm  | arm[lb]e | arme[lb] | armv* \
+			| arc | arceb | arc32 | arc64 \
+			| arm | arm[lb]e | arme[lb] | armv* \
 			| avr | avr32 \
 			| asmjs \
 			| ba \
@@ -1193,7 +1196,7 @@ case $cpu-$vendor in
 			| bfin | bpf | bs2000 \
 			| c[123]* | c30 | [cjt]90 | c4x \
 			| c8051 | clipper | craynv | csky | cydra \
-			| d10v | d30v | dlx | dsp16xx | dvp \
+			| d10v | d30v | dlx | dsp16xx \
 			| e2k | elxsi | epiphany \
 			| f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \
 			| h8300 | h8500 \
@@ -1204,6 +1207,7 @@ case $cpu-$vendor in
 			| k1om \
 			| le32 | le64 \
 			| lm32 \
+			| loongarch32 | loongarch64 | loongarchx32 \
 			| m32c | m32r | m32rle \
 			| m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \
 			| m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \
@@ -1222,9 +1226,13 @@ case $cpu-$vendor in
 			| mips64vr5900 | mips64vr5900el \
 			| mipsisa32 | mipsisa32el \
 			| mipsisa32r2 | mipsisa32r2el \
+			| mipsisa32r3 | mipsisa32r3el \
+			| mipsisa32r5 | mipsisa32r5el \
 			| mipsisa32r6 | mipsisa32r6el \
 			| mipsisa64 | mipsisa64el \
 			| mipsisa64r2 | mipsisa64r2el \
+			| mipsisa64r3 | mipsisa64r3el \
+			| mipsisa64r5 | mipsisa64r5el \
 			| mipsisa64r6 | mipsisa64r6el \
 			| mipsisa64sb1 | mipsisa64sb1el \
 			| mipsisa64sr71k | mipsisa64sr71kel \
@@ -1248,7 +1256,7 @@ case $cpu-$vendor in
 			| powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \
 			| pru \
 			| pyramid \
-			| riscv | riscv32 | riscv64 \
+			| riscv | riscv32 | riscv32be | riscv64 | riscv64be \
 			| rl78 | romp | rs6000 | rx \
 			| s390 | s390x \
 			| score \
@@ -1260,6 +1268,7 @@ case $cpu-$vendor in
 			| sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \
 			| spu \
 			| tahoe \
+			| thumbv7* \
 			| tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \
 			| tron \
 			| ubicom32 \
@@ -1297,8 +1306,49 @@ esac
 
 # Decode manufacturer-specific aliases for certain operating systems.
 
-if [ x$os != x ]
+if test x$basic_os != x
 then
+
+# First recognize some ad-hoc cases, or perhaps split kernel-os, or else just
+# set os.
+case $basic_os in
+	gnu/linux*)
+		kernel=linux
+		os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'`
+		;;
+	os2-emx)
+		kernel=os2
+		os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'`
+		;;
+	nto-qnx*)
+		kernel=nto
+		os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'`
+		;;
+	*-*)
+		# shellcheck disable=SC2162
+		saved_IFS=$IFS
+		IFS="-" read kernel os <<EOF
+$basic_os
+EOF
+		IFS=$saved_IFS
+		;;
+	# Default OS when just kernel was specified
+	nto*)
+		kernel=nto
+		os=`echo "$basic_os" | sed -e 's|nto|qnx|'`
+		;;
+	linux*)
+		kernel=linux
+		os=`echo "$basic_os" | sed -e 's|linux|gnu|'`
+		;;
+	*)
+		kernel=
+		os=$basic_os
+		;;
+esac
+
+# Now, normalize the OS (knowing we just have one component, it's not a kernel,
+# etc.)
 case $os in
 	# First match some system type aliases that might get confused
 	# with valid system types.
@@ -1310,7 +1360,7 @@ case $os in
 		os=cnk
 		;;
 	solaris1 | solaris1.*)
-		os=`echo $os | sed -e 's|solaris1|sunos4|'`
+		os=`echo "$os" | sed -e 's|solaris1|sunos4|'`
 		;;
 	solaris)
 		os=solaris2
@@ -1318,9 +1368,6 @@ case $os in
 	unixware*)
 		os=sysv4.2uw
 		;;
-	gnu/linux*)
-		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
-		;;
 	# es1800 is here to avoid being matched by es* (a different OS)
 	es1800*)
 		os=ose
@@ -1342,12 +1389,9 @@ case $os in
 		os=sco3.2v4
 		;;
 	sco3.2.[4-9]*)
-		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+		os=`echo "$os" | sed -e 's/sco3.2./sco3.2v/'`
 		;;
-	sco3.2v[4-9]* | sco5v6*)
-		# Don't forget version if it is 3.2v4 or newer.
-		;;
-	scout)
+	sco*v* | scout)
 		# Don't match below
 		;;
 	sco*)
@@ -1356,78 +1400,25 @@ case $os in
 	psos*)
 		os=psos
 		;;
-	# Now accept the basic system types.
-	# The portable systems comes first.
-	# Each alternative MUST end in a * to match a version number.
-	# sysv* is not here because it comes later, after sysvr4.
-	gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
-	     | *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\
-	     | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
-	     | sym* | kopensolaris* | plan9* \
-	     | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
-	     | aos* | aros* | cloudabi* | sortix* | twizzler* \
-	     | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
-	     | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
-	     | knetbsd* | mirbsd* | netbsd* \
-	     | bitrig* | openbsd* | solidbsd* | libertybsd* | os108* \
-	     | ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \
-	     | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
-	     | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
-	     | udi* | eabi* | lites* | ieee* | go32* | aux* | hcos* \
-	     | chorusrdb* | cegcc* | glidix* \
-	     | cygwin* | msys* | pe* | moss* | proelf* | rtems* \
-	     | midipix* | mingw32* | mingw64* | linux-gnu* | linux-android* \
-	     | linux-newlib* | linux-musl* | linux-uclibc* \
-	     | uxpv* | beos* | mpeix* | udk* | moxiebox* \
-	     | interix* | uwin* | mks* | rhapsody* | darwin* \
-	     | openstep* | oskit* | conix* | pw32* | nonstopux* \
-	     | storm-chaos* | tops10* | tenex* | tops20* | its* | irx* \
-	     | os2* | vos* | palmos* | uclinux* | nucleus* \
-	     | morphos* | superux* | rtmk* | windiss* \
-	     | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
-	     | skyos* | haiku* | rdos* | toppers* | drops* | es* \
-	     | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
-	     | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
-	     | nsk* | powerunix* | genode*)
-	# Remember, each alternative MUST END IN *, to match a version number.
-		;;
 	qnx*)
-		case $cpu in
-		    x86 | i*86)
-			;;
-		    *)
-			os=nto-$os
-			;;
-		esac
+		os=qnx
 		;;
 	hiux*)
 		os=hiuxwe2
 		;;
-	nto-qnx*)
-		;;
-	nto*)
-		os=`echo $os | sed -e 's|nto|nto-qnx|'`
-		;;
-	sim | xray | os68k* | v88r* \
-	    | windows* | osx | abug | netware* | os9* \
-	    | macos* | mpw* | magic* | mmixware* | mon960* | lnews*)
-		;;
-	linux-dietlibc)
-		os=linux-dietlibc
-		;;
-	linux*)
-		os=`echo $os | sed -e 's|linux|linux-gnu|'`
-		;;
 	lynx*178)
 		os=lynxos178
 		;;
 	lynx*5)
 		os=lynxos5
 		;;
+	lynxos*)
+		# don't get caught up in next wildcard
+		;;
 	lynx*)
 		os=lynxos
 		;;
-	mac*)
+	mac[0-9]*)
 		os=`echo "$os" | sed -e 's|mac|macos|'`
 		;;
 	opened*)
@@ -1474,7 +1465,7 @@ case $os in
 		;;
 	# Preserve the version number of sinix5.
 	sinix5.*)
-		os=`echo $os | sed -e 's|sinix|sysv|'`
+		os=`echo "$os" | sed -e 's|sinix|sysv|'`
 		;;
 	sinix*)
 		os=sysv4
@@ -1497,18 +1488,12 @@ case $os in
 	sysvr4)
 		os=sysv4
 		;;
-	# This must come after sysvr4.
-	sysv*)
-		;;
 	ose*)
 		os=ose
 		;;
 	*mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
 		os=mint
 		;;
-	zvmoe)
-		os=zvmoe
-		;;
 	dicos*)
 		os=dicos
 		;;
@@ -1525,21 +1510,11 @@ case $os in
 			;;
 		esac
 		;;
-	nacl*)
-		;;
-	ios)
-		;;
-	psp)
-		;;
-	none)
-		;;
-	*-eabi)
-		;;
 	*)
-		echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2
-		exit 1
+		# No normalization, but not necessarily accepted, that comes below.
 		;;
 esac
+
 else
 
 # Here we handle the default operating systems that come with various machines.
@@ -1552,6 +1527,7 @@ else
 # will signal an error saying that MANUFACTURER isn't an operating
 # system, and we'll never get to this point.
 
+kernel=
 case $cpu-$vendor in
 	score-*)
 		os=elf
@@ -1563,7 +1539,8 @@ case $cpu-$vendor in
 		os=riscix1.2
 		;;
 	arm*-rebel)
-		os=linux
+		kernel=linux
+		os=gnu
 		;;
 	arm*-semi)
 		os=aout
@@ -1729,84 +1706,180 @@ case $cpu-$vendor in
 		os=none
 		;;
 esac
+
 fi
 
+# Now, validate our (potentially fixed-up) OS.
+case $os in
+	# Sometimes we do "kernel-libc", so those need to count as OSes.
+	musl* | newlib* | relibc* | uclibc*)
+		;;
+	# Likewise for "kernel-abi"
+	eabi* | gnueabi*)
+		;;
+	# VxWorks passes extra cpu info in the 4th filed.
+	simlinux | simwindows | spe)
+		;;
+	# Now accept the basic system types.
+	# The portable systems comes first.
+	# Each alternative MUST end in a * to match a version number.
+	gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
+	     | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \
+	     | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
+	     | sym* |  plan9* | psp* | sim* | xray* | os68k* | v88r* \
+	     | hiux* | abug | nacl* | netware* | windows* \
+	     | os9* | macos* | osx* | ios* \
+	     | mpw* | magic* | mmixware* | mon960* | lnews* \
+	     | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
+	     | aos* | aros* | cloudabi* | sortix* | twizzler* \
+	     | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
+	     | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
+	     | mirbsd* | netbsd* | dicos* | openedition* | ose* \
+	     | bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* \
+	     | ekkobsd* | freebsd* | riscix* | lynxos* | os400* \
+	     | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
+	     | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
+	     | udi* | lites* | ieee* | go32* | aux* | hcos* \
+	     | chorusrdb* | cegcc* | glidix* | serenity* \
+	     | cygwin* | msys* | pe* | moss* | proelf* | rtems* \
+	     | midipix* | mingw32* | mingw64* | mint* \
+	     | uxpv* | beos* | mpeix* | udk* | moxiebox* \
+	     | interix* | uwin* | mks* | rhapsody* | darwin* \
+	     | openstep* | oskit* | conix* | pw32* | nonstopux* \
+	     | storm-chaos* | tops10* | tenex* | tops20* | its* \
+	     | os2* | vos* | palmos* | uclinux* | nucleus* | morphos* \
+	     | scout* | superux* | sysv* | rtmk* | tpf* | windiss* \
+	     | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
+	     | skyos* | haiku* | rdos* | toppers* | drops* | es* \
+	     | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
+	     | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
+	     | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \
+	     | fiwix* )
+		;;
+	# This one is extra strict with allowed versions
+	sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
+		# Don't forget version if it is 3.2v4 or newer.
+		;;
+	none)
+		;;
+	*)
+		echo Invalid configuration \`"$1"\': OS \`"$os"\' not recognized 1>&2
+		exit 1
+		;;
+esac
+
+# As a final step for OS-related things, validate the OS-kernel combination
+# (given a valid OS), if there is a kernel.
+case $kernel-$os in
+	linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \
+		   | linux-musl* | linux-relibc* | linux-uclibc* )
+		;;
+	uclinux-uclibc* )
+		;;
+	-dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* )
+		# These are just libc implementations, not actual OSes, and thus
+		# require a kernel.
+		echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2
+		exit 1
+		;;
+	kfreebsd*-gnu* | kopensolaris*-gnu*)
+		;;
+	vxworks-simlinux | vxworks-simwindows | vxworks-spe)
+		;;
+	nto-qnx*)
+		;;
+	os2-emx)
+		;;
+	*-eabi* | *-gnueabi*)
+		;;
+	-*)
+		# Blank kernel with real OS is always fine.
+		;;
+	*-*)
+		echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2
+		exit 1
+		;;
+esac
+
 # Here we handle the case where we know the os, and the CPU type, but not the
 # manufacturer.  We pick the logical manufacturer.
 case $vendor in
 	unknown)
-		case $os in
-			riscix*)
+		case $cpu-$os in
+			*-riscix*)
 				vendor=acorn
 				;;
-			sunos*)
+			*-sunos*)
 				vendor=sun
 				;;
-			cnk*|-aix*)
+			*-cnk* | *-aix*)
 				vendor=ibm
 				;;
-			beos*)
+			*-beos*)
 				vendor=be
 				;;
-			hpux*)
+			*-hpux*)
 				vendor=hp
 				;;
-			mpeix*)
+			*-mpeix*)
 				vendor=hp
 				;;
-			hiux*)
+			*-hiux*)
 				vendor=hitachi
 				;;
-			unos*)
+			*-unos*)
 				vendor=crds
 				;;
-			dgux*)
+			*-dgux*)
 				vendor=dg
 				;;
-			luna*)
+			*-luna*)
 				vendor=omron
 				;;
-			genix*)
+			*-genix*)
 				vendor=ns
 				;;
-			clix*)
+			*-clix*)
 				vendor=intergraph
 				;;
-			mvs* | opened*)
+			*-mvs* | *-opened*)
+				vendor=ibm
+				;;
+			*-os400*)
 				vendor=ibm
 				;;
-			os400*)
+			s390-* | s390x-*)
 				vendor=ibm
 				;;
-			ptx*)
+			*-ptx*)
 				vendor=sequent
 				;;
-			tpf*)
+			*-tpf*)
 				vendor=ibm
 				;;
-			vxsim* | vxworks* | windiss*)
+			*-vxsim* | *-vxworks* | *-windiss*)
 				vendor=wrs
 				;;
-			aux*)
+			*-aux*)
 				vendor=apple
 				;;
-			hms*)
+			*-hms*)
 				vendor=hitachi
 				;;
-			mpw* | macos*)
+			*-mpw* | *-macos*)
 				vendor=apple
 				;;
-			*mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
+			*-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*)
 				vendor=atari
 				;;
-			vos*)
+			*-vos*)
 				vendor=stratus
 				;;
 		esac
 		;;
 esac
 
-echo "$cpu-$vendor-$os"
+echo "$cpu-$vendor-${kernel:+$kernel-}$os"
 exit
 
 # Local variables:
diff --git a/config/Makefile.in b/config/Makefile.in
index c27174e..c93ef1e 100644
--- a/config/Makefile.in
+++ b/config/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -116,7 +116,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -231,8 +230,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
@@ -252,8 +249,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -267,6 +262,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -285,14 +282,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -309,8 +298,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -366,6 +357,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -418,7 +411,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -442,29 +434,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -502,8 +478,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -514,14 +488,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -768,7 +736,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/config/udev.c b/config/udev.c
index 3a73189..836fc2a 100644
--- a/config/udev.c
+++ b/config/udev.c
@@ -39,6 +39,10 @@
 #include "globals.h"
 #include "systemd-logind.h"
 
+#ifdef HAVE_SYS_SYSMACROS_H
+#include <sys/sysmacros.h>
+#endif
+
 #define UDEV_XKB_PROP_KEY "xkb"
 
 #define LOG_PROPERTY(path, prop, val)                                   \
@@ -56,7 +60,7 @@ static struct udev_monitor *udev_monitor;
 
 #ifdef CONFIG_UDEV_KMS
 static void
-config_udev_odev_setup_attribs(const char *path, const char *syspath,
+config_udev_odev_setup_attribs(struct udev_device *udev_device, const char *path, const char *syspath,
                                int major, int minor,
                                config_odev_probe_proc_ptr probe_callback);
 #endif
@@ -95,6 +99,9 @@ device_added(struct udev_device *udev_device)
     const char *syspath;
     const char *tags_prop;
     const char *key, *value, *tmp;
+#ifdef CONFIG_UDEV_KMS
+    const char *subsys = NULL;
+#endif
     InputOption *input_options;
     InputAttributes attrs = { };
     DeviceIntPtr dev = NULL;
@@ -116,7 +123,9 @@ device_added(struct udev_device *udev_device)
     devnum = udev_device_get_devnum(udev_device);
 
 #ifdef CONFIG_UDEV_KMS
-    if (!strcmp(udev_device_get_subsystem(udev_device), "drm")) {
+    subsys = udev_device_get_subsystem(udev_device);
+
+    if (subsys && !strcmp(subsys, "drm")) {
         const char *sysname = udev_device_get_sysname(udev_device);
 
         if (strncmp(sysname, "card", 4) != 0)
@@ -128,7 +137,7 @@ device_added(struct udev_device *udev_device)
 
         LogMessage(X_INFO, "config/udev: Adding drm device (%s)\n", path);
 
-        config_udev_odev_setup_attribs(path, syspath, major(devnum),
+        config_udev_odev_setup_attribs(udev_device, path, syspath, major(devnum),
                                        minor(devnum), NewGPUDeviceRequest);
         return;
     }
@@ -312,7 +321,9 @@ device_removed(struct udev_device *device)
     const char *syspath = udev_device_get_syspath(device);
 
 #ifdef CONFIG_UDEV_KMS
-    if (!strcmp(udev_device_get_subsystem(device), "drm")) {
+    const char *subsys = udev_device_get_subsystem(device);
+
+    if (subsys && !strcmp(subsys, "drm")) {
         const char *sysname = udev_device_get_sysname(device);
         const char *path = udev_device_get_devnode(device);
         dev_t devnum = udev_device_get_devnum(device);
@@ -322,7 +333,7 @@ device_removed(struct udev_device *device)
 
         LogMessage(X_INFO, "config/udev: removing GPU device %s %s\n",
                    syspath, path);
-        config_udev_odev_setup_attribs(path, syspath, major(devnum),
+        config_udev_odev_setup_attribs(device, path, syspath, major(devnum),
                                        minor(devnum), DeleteGPUDeviceRequest);
         /* Retry vtenter after a drm node removal */
         systemd_logind_vtenter();
@@ -357,7 +368,9 @@ socket_handler(int fd, int ready, void *data)
             device_added(udev_device);
         } else if (!strcmp(action, "change")) {
             /* ignore change for the drm devices */
-            if (strcmp(udev_device_get_subsystem(udev_device), "drm")) {
+            const char *subsys = udev_device_get_subsystem(udev_device);
+
+            if (subsys && strcmp(subsys, "drm")) {
                 device_removed(udev_device);
                 device_added(udev_device);
             }
@@ -464,18 +477,86 @@ config_udev_fini(void)
 
 #ifdef CONFIG_UDEV_KMS
 
+/* Find the last occurrence of the needle in haystack */
+static char *strrstr(const char *haystack, const char *needle)
+{
+    char *prev, *last, *tmp;
+
+    prev = strstr(haystack, needle);
+    if (!prev)
+        return NULL;
+
+    last = prev;
+    tmp = prev + 1;
+
+    while (tmp) {
+        last = strstr(tmp, needle);
+        if (!last)
+            return prev;
+        else {
+            prev = last;
+            tmp = prev + 1;
+        }
+    }
+
+    return last;
+}
+
+/* For certain devices udev does not create ID_PATH entry (which is presumably a bug
+ * in udev). We work around that by implementing a minimal ID_PATH calculator
+ * ourselves along the same logic that udev uses. This works only for the case of
+ * a PCI device being directly connected to a PCI bus, but it will cover most end
+ * users with e.g. a new laptop which only has beta hardware driver support.
+ * See https://gitlab.freedesktop.org/xorg/xserver/-/issues/993 */
+static char*
+config_udev_get_fallback_bus_id(struct udev_device *udev_device)
+{
+    const char *sysname;
+    char *busid;
+
+    udev_device = udev_device_get_parent(udev_device);
+    if (udev_device == NULL)
+        return NULL;
+
+    if (strcmp(udev_device_get_subsystem(udev_device), "pci") != 0)
+        return NULL;
+
+    sysname = udev_device_get_sysname(udev_device);
+    busid = XNFalloc(strlen(sysname) + 5);
+    busid[0] = '\0';
+    strcat(busid, "pci:");
+    strcat(busid, sysname);
+
+    return busid;
+}
+
 static void
-config_udev_odev_setup_attribs(const char *path, const char *syspath,
+config_udev_odev_setup_attribs(struct udev_device *udev_device, const char *path, const char *syspath,
                                int major, int minor,
                                config_odev_probe_proc_ptr probe_callback)
 {
     struct OdevAttributes *attribs = config_odev_allocate_attributes();
+    const char *value, *str;
 
     attribs->path = XNFstrdup(path);
     attribs->syspath = XNFstrdup(syspath);
     attribs->major = major;
     attribs->minor = minor;
 
+    value = udev_device_get_property_value(udev_device, "ID_PATH");
+    if (value && (str = strrstr(value, "pci-"))) {
+        value = str;
+
+        if ((str = strstr(value, "usb-")))
+            value = str;
+
+        attribs->busid = XNFstrdup(value);
+        attribs->busid[3] = ':';
+    }
+
+    if (!value)
+        attribs->busid = config_udev_get_fallback_bus_id(udev_device);
+
     /* ownership of attribs is passed to probe layer */
     probe_callback(attribs);
 }
@@ -506,17 +587,18 @@ config_udev_odev_probe(config_odev_probe_proc_ptr probe_callback)
         const char *path = udev_device_get_devnode(udev_device);
         const char *sysname = udev_device_get_sysname(udev_device);
         dev_t devnum = udev_device_get_devnum(udev_device);
+        const char *subsys = udev_device_get_subsystem(udev_device);
 
-        if (!path || !syspath)
+        if (!path || !syspath || !subsys)
             goto no_probe;
-        else if (strcmp(udev_device_get_subsystem(udev_device), "drm") != 0)
+        else if (strcmp(subsys, "drm") != 0)
             goto no_probe;
         else if (strncmp(sysname, "card", 4) != 0)
             goto no_probe;
         else if (!check_seat(udev_device))
             goto no_probe;
 
-        config_udev_odev_setup_attribs(path, syspath, major(devnum),
+        config_udev_odev_setup_attribs(udev_device, path, syspath, major(devnum),
                                        minor(devnum), probe_callback);
     no_probe:
         udev_device_unref(udev_device);
diff --git a/configure b/configure
index 7e53cbd..dde3487 100755
--- a/configure
+++ b/configure
@@ -1,11 +1,12 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for xorg-server 1.20.11.
+# Generated by GNU Autoconf 2.71 for xorg-server 21.1.7.
 #
 # Report bugs to <https://gitlab.freedesktop.org/xorg/xserver/issues>.
 #
 #
-# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
+# Inc.
 #
 #
 # This configure script is free software; the Free Software Foundation
@@ -16,14 +17,16 @@
 
 # Be more Bourne compatible
 DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+as_nop=:
+if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
+then :
   emulate sh
   NULLCMD=:
   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
   # is contrary to our usage.  Disable this feature.
   alias -g '${1+"$@"}'='"$@"'
   setopt NO_GLOB_SUBST
-else
+else $as_nop
   case `(set -o) 2>/dev/null` in #(
   *posix*) :
     set -o posix ;; #(
@@ -33,46 +36,46 @@ esac
 fi
 
 
+
+# Reset variables that may have inherited troublesome values from
+# the environment.
+
+# IFS needs to be set, to space, tab, and newline, in precisely that order.
+# (If _AS_PATH_WALK were called with IFS unset, it would have the
+# side effect of setting IFS to empty, thus disabling word splitting.)
+# Quoting is to prevent editors from complaining about space-tab.
 as_nl='
 '
 export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
-    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
-  as_echo='print -r --'
-  as_echo_n='print -rn --'
-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
-  as_echo='printf %s\n'
-  as_echo_n='printf %s'
-else
-  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
-    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
-    as_echo_n='/usr/ucb/echo -n'
-  else
-    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
-    as_echo_n_body='eval
-      arg=$1;
-      case $arg in #(
-      *"$as_nl"*)
-	expr "X$arg" : "X\\(.*\\)$as_nl";
-	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
-      esac;
-      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
-    '
-    export as_echo_n_body
-    as_echo_n='sh -c $as_echo_n_body as_echo'
-  fi
-  export as_echo_body
-  as_echo='sh -c $as_echo_body as_echo'
-fi
+IFS=" ""	$as_nl"
+
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# Ensure predictable behavior from utilities with locale-dependent output.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# We cannot yet rely on "unset" to work, but we need these variables
+# to be unset--not just set to an empty or harmless value--now, to
+# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh).  This construct
+# also avoids known problems related to "unset" and subshell syntax
+# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
+for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
+do eval test \${$as_var+y} \
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+
+# Ensure that fds 0, 1, and 2 are open.
+if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
+if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
+if (exec 3>&2)            ; then :; else exec 2>/dev/null; fi
 
 # The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
+if ${PATH_SEPARATOR+false} :; then
   PATH_SEPARATOR=:
   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
@@ -81,13 +84,6 @@ if test "${PATH_SEPARATOR+set}" != set; then
 fi
 
 
-# IFS
-# We need space, tab and new line, in precisely that order.  Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" ""	$as_nl"
-
 # Find who we are.  Look in the path if we contain no directory separator.
 as_myself=
 case $0 in #((
@@ -96,8 +92,12 @@ case $0 in #((
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    test -r "$as_dir$0" && as_myself=$as_dir$0 && break
   done
 IFS=$as_save_IFS
 
@@ -109,30 +109,10 @@ if test "x$as_myself" = x; then
   as_myself=$0
 fi
 if test ! -f "$as_myself"; then
-  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
   exit 1
 fi
 
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there.  '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
-  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
 # Use a proper internal environment variable to ensure we don't fall
   # into an infinite loop, continuously re-executing ourselves.
@@ -154,20 +134,22 @@ esac
 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
 # Admittedly, this is quite paranoid, since all the known shells bail
 # out after a failed `exec'.
-$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
-as_fn_exit 255
+printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
   fi
   # We don't want this to propagate to other subprocesses.
           { _as_can_reexec=; unset _as_can_reexec;}
 if test "x$CONFIG_SHELL" = x; then
-  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+  as_bourne_compatible="as_nop=:
+if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
+then :
   emulate sh
   NULLCMD=:
   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
   # is contrary to our usage.  Disable this feature.
   alias -g '\${1+\"\$@\"}'='\"\$@\"'
   setopt NO_GLOB_SUBST
-else
+else \$as_nop
   case \`(set -o) 2>/dev/null\` in #(
   *posix*) :
     set -o posix ;; #(
@@ -187,12 +169,15 @@ as_fn_success || { exitcode=1; echo as_fn_success failed.; }
 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
-if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+if ( set x; as_fn_ret_success y && test x = \"\$1\" )
+then :
 
-else
+else \$as_nop
   exitcode=1; echo positional parameters were not saved.
 fi
 test x\$exitcode = x0 || exit 1
+blah=\$(echo \$(echo blah))
+test x\"\$blah\" = xblah || exit 1
 test -x / || exit 1"
   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
@@ -207,30 +192,38 @@ test \$(( 1 + 1 )) = 2 || exit 1
     PATH=/empty FPATH=/empty; export PATH FPATH
     test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
       || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1"
-  if (eval "$as_required") 2>/dev/null; then :
+  if (eval "$as_required") 2>/dev/null
+then :
   as_have_required=yes
-else
+else $as_nop
   as_have_required=no
 fi
-  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
+then :
 
-else
+else $as_nop
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 as_found=false
 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
   as_found=:
   case $as_dir in #(
 	 /*)
 	   for as_base in sh bash ksh sh5; do
 	     # Try only shells that exist, to save several forks.
-	     as_shell=$as_dir/$as_base
+	     as_shell=$as_dir$as_base
 	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
-		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+		    as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null
+then :
   CONFIG_SHELL=$as_shell as_have_required=yes
-		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+		   if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null
+then :
   break 2
 fi
 fi
@@ -238,14 +231,21 @@ fi
        esac
   as_found=false
 done
-$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
-	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
-  CONFIG_SHELL=$SHELL as_have_required=yes
-fi; }
 IFS=$as_save_IFS
+if $as_found
+then :
+
+else $as_nop
+  if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+	      as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
+then :
+  CONFIG_SHELL=$SHELL as_have_required=yes
+fi
+fi
 
 
-      if test "x$CONFIG_SHELL" != x; then :
+      if test "x$CONFIG_SHELL" != x
+then :
   export CONFIG_SHELL
              # We cannot yet assume a decent shell, so we have to provide a
 # neutralization value for shells without unset; and this also
@@ -263,18 +263,19 @@ esac
 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
 # Admittedly, this is quite paranoid, since all the known shells bail
 # out after a failed `exec'.
-$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
 exit 255
 fi
 
-    if test x$as_have_required = xno; then :
-  $as_echo "$0: This script requires a shell more modern than all"
-  $as_echo "$0: the shells that I found on your system."
-  if test x${ZSH_VERSION+set} = xset ; then
-    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
-    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+    if test x$as_have_required = xno
+then :
+  printf "%s\n" "$0: This script requires a shell more modern than all"
+  printf "%s\n" "$0: the shells that I found on your system."
+  if test ${ZSH_VERSION+y} ; then
+    printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+    printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
   else
-    $as_echo "$0: Please tell bug-autoconf@gnu.org and
+    printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and
 $0: https://gitlab.freedesktop.org/xorg/xserver/issues
 $0: about your system, including any error possibly output
 $0: before this message. Then install a modern shell, or
@@ -303,6 +304,7 @@ as_fn_unset ()
 }
 as_unset=as_fn_unset
 
+
 # as_fn_set_status STATUS
 # -----------------------
 # Set $? to STATUS, without forking.
@@ -320,6 +322,14 @@ as_fn_exit ()
   as_fn_set_status $1
   exit $1
 } # as_fn_exit
+# as_fn_nop
+# ---------
+# Do nothing but, unlike ":", preserve the value of $?.
+as_fn_nop ()
+{
+  return $?
+}
+as_nop=as_fn_nop
 
 # as_fn_mkdir_p
 # -------------
@@ -334,7 +344,7 @@ as_fn_mkdir_p ()
     as_dirs=
     while :; do
       case $as_dir in #(
-      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
       *) as_qdir=$as_dir;;
       esac
       as_dirs="'$as_qdir' $as_dirs"
@@ -343,7 +353,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 	 X"$as_dir" : 'X\(//\)[^/]' \| \
 	 X"$as_dir" : 'X\(//\)$' \| \
 	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
+printf "%s\n" X"$as_dir" |
     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
 	    s//\1/
 	    q
@@ -382,12 +392,13 @@ as_fn_executable_p ()
 # advantage of any shell optimizations that allow amortized linear growth over
 # repeated appends, instead of the typical quadratic growth present in naive
 # implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
+then :
   eval 'as_fn_append ()
   {
     eval $1+=\$2
   }'
-else
+else $as_nop
   as_fn_append ()
   {
     eval $1=\$$1\$2
@@ -399,18 +410,27 @@ fi # as_fn_append
 # Perform arithmetic evaluation on the ARGs, and store the result in the
 # global $as_val. Take advantage of shells that can avoid forks. The arguments
 # must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
+then :
   eval 'as_fn_arith ()
   {
     as_val=$(( $* ))
   }'
-else
+else $as_nop
   as_fn_arith ()
   {
     as_val=`expr "$@" || test $? -eq 1`
   }
 fi # as_fn_arith
 
+# as_fn_nop
+# ---------
+# Do nothing but, unlike ":", preserve the value of $?.
+as_fn_nop ()
+{
+  return $?
+}
+as_nop=as_fn_nop
 
 # as_fn_error STATUS ERROR [LINENO LOG_FD]
 # ----------------------------------------
@@ -422,9 +442,9 @@ as_fn_error ()
   as_status=$1; test $as_status -eq 0 && as_status=1
   if test "$4"; then
     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
   fi
-  $as_echo "$as_me: error: $2" >&2
+  printf "%s\n" "$as_me: error: $2" >&2
   as_fn_exit $as_status
 } # as_fn_error
 
@@ -451,7 +471,7 @@ as_me=`$as_basename -- "$0" ||
 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
 	 X"$0" : 'X\(//\)$' \| \
 	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
+printf "%s\n" X/"$0" |
     sed '/^.*\/\([^/][^/]*\)\/*$/{
 	    s//\1/
 	    q
@@ -495,7 +515,7 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
       s/-\n.*//
     ' >$as_me.lineno &&
   chmod +x "$as_me.lineno" ||
-    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+    { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
 
   # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
   # already done that, so ensure we don't try to do so again and fall
@@ -509,6 +529,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
   exit
 }
 
+
+# Determine whether it's possible to make 'echo' print without a newline.
+# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
+# for compatibility with existing Makefiles.
 ECHO_C= ECHO_N= ECHO_T=
 case `echo -n x` in #(((((
 -n*)
@@ -522,6 +546,13 @@ case `echo -n x` in #(((((
   ECHO_N='-n';;
 esac
 
+# For backward compatibility with old third-party macros, we provide
+# the shell variables $as_echo and $as_echo_n.  New code should use
+# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
+as_echo='printf %s\n'
+as_echo_n='printf %s'
+
+
 rm -f conf$$ conf$$.exe conf$$.file
 if test -d conf$$.dir; then
   rm -f conf$$.dir/conf$$.file
@@ -651,74 +682,52 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='xorg-server'
 PACKAGE_TARNAME='xorg-server'
-PACKAGE_VERSION='1.20.11'
-PACKAGE_STRING='xorg-server 1.20.11'
+PACKAGE_VERSION='21.1.7'
+PACKAGE_STRING='xorg-server 21.1.7'
 PACKAGE_BUGREPORT='https://gitlab.freedesktop.org/xorg/xserver/issues'
 PACKAGE_URL=''
 
 ac_unique_file="Makefile.am"
 # Factoring default headers for most tests.
 ac_includes_default="\
-#include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-# include <sys/stat.h>
+#include <stddef.h>
+#ifdef HAVE_STDIO_H
+# include <stdio.h>
 #endif
-#ifdef STDC_HEADERS
+#ifdef HAVE_STDLIB_H
 # include <stdlib.h>
-# include <stddef.h>
-#else
-# ifdef HAVE_STDLIB_H
-#  include <stdlib.h>
-# endif
 #endif
 #ifdef HAVE_STRING_H
-# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-#  include <memory.h>
-# endif
 # include <string.h>
 #endif
-#ifdef HAVE_STRINGS_H
-# include <strings.h>
-#endif
 #ifdef HAVE_INTTYPES_H
 # include <inttypes.h>
 #endif
 #ifdef HAVE_STDINT_H
 # include <stdint.h>
 #endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif"
 
+ac_header_c_list=
 ac_config_libobj_dir=os
 ac_subst_vars='am__EXEEXT_FALSE
 am__EXEEXT_TRUE
 LTLIBOBJS
 DIX_CFLAGS
-BUILD_TIME
-BUILD_DATE
 RELEASE_DATE
 SYSCONFDIR
 PROJECTROOT
-XWAYLAND_EGLSTREAM_FALSE
-XWAYLAND_EGLSTREAM_TRUE
-WAYLAND_PROTOCOLS_DATADIR
-SCANNER_ARG
-WAYLAND_SCANNER_LIBS
-WAYLAND_SCANNER_CFLAGS
-WAYLAND_SCANNER
-XWAYLAND_SYS_LIBS
-XWAYLAND_LIBS
-WAYLAND_EGLSTREAM_DATADIR
-WAYLAND_EGLSTREAM_LIBS
-WAYLAND_EGLSTREAM_CFLAGS
-XWAYLAND_FALSE
-XWAYLAND_TRUE
-XWAYLANDMODULES_LIBS
-XWAYLANDMODULES_CFLAGS
 XEPHYR_FALSE
 XEPHYR_TRUE
 KDRIVE_LIBS
@@ -733,29 +742,6 @@ XEPHYR_LIBS
 XEPHYR_CFLAGS
 KDRIVE_FALSE
 KDRIVE_TRUE
-DMX_BUILD_USB_FALSE
-DMX_BUILD_USB_TRUE
-X11EXAMPLES_DEP_LIBS
-X11EXAMPLES_DEP_CFLAGS
-XRESEXAMPLES_DEP_LIBS
-XRESEXAMPLES_DEP_CFLAGS
-XTSTEXAMPLES_DEP_LIBS
-XTSTEXAMPLES_DEP_CFLAGS
-DMXXIEXAMPLES_DEP_LIBS
-DMXXIEXAMPLES_DEP_CFLAGS
-DMXXMUEXAMPLES_DEP_LIBS
-DMXXMUEXAMPLES_DEP_CFLAGS
-DMXEXAMPLES_DEP_LIBS
-DMXEXAMPLES_DEP_CFLAGS
-XDMX_SYS_LIBS
-XDMX_LIBS
-XDMX_CFLAGS
-DMX_FALSE
-DMX_TRUE
-XDMXCONFIG_DEP_LIBS
-XDMXCONFIG_DEP_CFLAGS
-DMXMODULES_LIBS
-DMXMODULES_CFLAGS
 STANDALONE_XPBPROXY_FALSE
 STANDALONE_XPBPROXY_TRUE
 XQUARTZ_SPARKLE_FALSE
@@ -778,8 +764,6 @@ XWIN_WINDOWS_DRI_FALSE
 XWIN_WINDOWS_DRI_TRUE
 XWIN_GLX_WINDOWS_FALSE
 XWIN_GLX_WINDOWS_TRUE
-XWIN_MULTIWINDOWEXTWM_FALSE
-XWIN_MULTIWINDOWEXTWM_TRUE
 XWIN_FALSE
 XWIN_TRUE
 KHRONOS_SPEC_DIR
@@ -791,8 +775,6 @@ XWIN_SERVER_NAME
 XWIN_LIBS
 WINDOWSDRI_LIBS
 WINDOWSDRI_CFLAGS
-WINDOWSWM_LIBS
-WINDOWSWM_CFLAGS
 XWINMODULES_LIBS
 XWINMODULES_CFLAGS
 WINDRES
@@ -804,6 +786,8 @@ GLAMOR_LIBS
 GLAMOR_CFLAGS
 GLAMOR_FALSE
 GLAMOR_TRUE
+XORG_DRIVER_INPUT_INPUTTEST_FALSE
+XORG_DRIVER_INPUT_INPUTTEST_TRUE
 XORG_DRIVER_MODESETTING_FALSE
 XORG_DRIVER_MODESETTING_TRUE
 XORG_BUS_PLATFORM_FALSE
@@ -858,6 +842,8 @@ PCI_TXT_IDS_PATH
 PCIACCESS_LIBS
 PCIACCESS_CFLAGS
 symbol_visibility
+LIBXCVT_LIBS
+LIBXCVT_CFLAGS
 XNEST_SYS_LIBS
 XNEST_LIBS
 XNEST_FALSE
@@ -921,8 +907,6 @@ XKB_BIN_DIRECTORY
 XKB_BASE_DIRECTORY
 INT10MODULE_FALSE
 INT10MODULE_TRUE
-VBE_FALSE
-VBE_TRUE
 VGAHW_FALSE
 VGAHW_TRUE
 XF86UTILS_FALSE
@@ -1058,10 +1042,6 @@ ARM_VIDEO_TRUE
 ALPHA_VIDEO_FALSE
 ALPHA_VIDEO_TRUE
 GLX_ARCH_DEFINES
-BSD_KQUEUE_APM_FALSE
-BSD_KQUEUE_APM_TRUE
-BSD_APM_FALSE
-BSD_APM_TRUE
 FREEBSD_KLDLOAD_FALSE
 FREEBSD_KLDLOAD_TRUE
 FBDEVHW_FALSE
@@ -1080,6 +1060,7 @@ DTRACE
 TRADITIONALCPPFLAGS
 RAWCPPFLAGS
 RAWCPP
+CPP
 YFLAGS
 YACC
 LEXLIB
@@ -1095,11 +1076,14 @@ MANIFEST_TOOL
 RANLIB
 ac_ct_AR
 AR
+FILECMD
 NM
 ac_ct_DUMPBIN
 DUMPBIN
 LD
 FGREP
+EGREP
+GREP
 LIBTOOL
 OBJDUMP
 DLLTOOL
@@ -1173,9 +1157,6 @@ CHANGELOG_CMD
 STRICT_CFLAGS
 CWARNFLAGS
 BASE_CFLAGS
-EGREP
-GREP
-CPP
 am__fastdepCC_FALSE
 am__fastdepCC_TRUE
 CCDEPMODE
@@ -1196,6 +1177,9 @@ AM_BACKSLASH
 AM_DEFAULT_VERBOSITY
 AM_DEFAULT_V
 AM_V
+CSCOPE
+ETAGS
+CTAGS
 am__untar
 am__tar
 AMTAR
@@ -1283,6 +1267,7 @@ with_sysroot
 enable_libtool_lock
 enable_largefile
 with_dtrace
+enable_agp
 enable_werror
 enable_debug
 with_int10
@@ -1292,8 +1277,6 @@ with_vendor_web
 with_module_dir
 with_log_dir
 with_builder_addr
-with_os_name
-with_os_vendor
 with_builderstring
 enable_listen_tcp
 enable_listen_unix
@@ -1353,9 +1336,7 @@ enable_config_hal
 enable_config_wscons
 enable_xfree86_utils
 enable_vgahw
-enable_vbe
 enable_int10_module
-enable_windowswm
 enable_windowsdri
 enable_libdrm
 enable_clientids
@@ -1365,15 +1346,13 @@ enable_linux_apm
 enable_systemd_logind
 enable_suid_wrapper
 enable_xorg
-enable_dmx
 enable_xvfb
 enable_xnest
 enable_xquartz
-enable_xwayland
-enable_xwayland_eglstream
 enable_standalone_xpbproxy
 enable_xwin
 enable_glamor
+enable_xf86_input_inputtest
 enable_kdrive
 enable_xephyr
 enable_libunwind
@@ -1398,7 +1377,6 @@ CFLAGS
 LDFLAGS
 LIBS
 CPPFLAGS
-CPP
 PKG_CONFIG
 PKG_CONFIG_PATH
 PKG_CONFIG_LIBDIR
@@ -1413,6 +1391,7 @@ CCASFLAGS
 LT_SYS_LIBRARY_PATH
 YACC
 YFLAGS
+CPP
 PIXMAN_CFLAGS
 PIXMAN_LIBS
 SYSTEMD_DAEMON_CFLAGS
@@ -1451,6 +1430,8 @@ LIBUNWIND_CFLAGS
 LIBUNWIND_LIBS
 XNESTMODULES_CFLAGS
 XNESTMODULES_LIBS
+LIBXCVT_CFLAGS
+LIBXCVT_LIBS
 PCIACCESS_CFLAGS
 PCIACCESS_LIBS
 DGA_CFLAGS
@@ -1463,38 +1444,14 @@ GBM_CFLAGS
 GBM_LIBS
 XWINMODULES_CFLAGS
 XWINMODULES_LIBS
-WINDOWSWM_CFLAGS
-WINDOWSWM_LIBS
 WINDOWSDRI_CFLAGS
 WINDOWSDRI_LIBS
 KHRONOS_OPENGL_REGISTRY_CFLAGS
 KHRONOS_OPENGL_REGISTRY_LIBS
 XPBPROXY_CFLAGS
 XPBPROXY_LIBS
-DMXMODULES_CFLAGS
-DMXMODULES_LIBS
-XDMXCONFIG_DEP_CFLAGS
-XDMXCONFIG_DEP_LIBS
-DMXEXAMPLES_DEP_CFLAGS
-DMXEXAMPLES_DEP_LIBS
-DMXXMUEXAMPLES_DEP_CFLAGS
-DMXXMUEXAMPLES_DEP_LIBS
-DMXXIEXAMPLES_DEP_CFLAGS
-DMXXIEXAMPLES_DEP_LIBS
-XTSTEXAMPLES_DEP_CFLAGS
-XTSTEXAMPLES_DEP_LIBS
-XRESEXAMPLES_DEP_CFLAGS
-XRESEXAMPLES_DEP_LIBS
-X11EXAMPLES_DEP_CFLAGS
-X11EXAMPLES_DEP_LIBS
 XEPHYR_CFLAGS
-XEPHYR_LIBS
-XWAYLANDMODULES_CFLAGS
-XWAYLANDMODULES_LIBS
-WAYLAND_EGLSTREAM_CFLAGS
-WAYLAND_EGLSTREAM_LIBS
-WAYLAND_SCANNER_CFLAGS
-WAYLAND_SCANNER_LIBS'
+XEPHYR_LIBS'
 
 
 # Initialize some variables set by options.
@@ -1563,8 +1520,6 @@ do
   *)    ac_optarg=yes ;;
   esac
 
-  # Accept the important Cygnus configure options, so we can diagnose typos.
-
   case $ac_dashdash$ac_option in
   --)
     ac_dashdash=yes ;;
@@ -1605,9 +1560,9 @@ do
     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
     # Reject names that are not valid shell variable names.
     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error $? "invalid feature name: $ac_useropt"
+      as_fn_error $? "invalid feature name: \`$ac_useropt'"
     ac_useropt_orig=$ac_useropt
-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
     case $ac_user_opts in
       *"
 "enable_$ac_useropt"
@@ -1631,9 +1586,9 @@ do
     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error $? "invalid feature name: $ac_useropt"
+      as_fn_error $? "invalid feature name: \`$ac_useropt'"
     ac_useropt_orig=$ac_useropt
-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
     case $ac_user_opts in
       *"
 "enable_$ac_useropt"
@@ -1844,9 +1799,9 @@ do
     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error $? "invalid package name: $ac_useropt"
+      as_fn_error $? "invalid package name: \`$ac_useropt'"
     ac_useropt_orig=$ac_useropt
-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
     case $ac_user_opts in
       *"
 "with_$ac_useropt"
@@ -1860,9 +1815,9 @@ do
     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
     # Reject names that are not valid shell variable names.
     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error $? "invalid package name: $ac_useropt"
+      as_fn_error $? "invalid package name: \`$ac_useropt'"
     ac_useropt_orig=$ac_useropt
-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
     case $ac_user_opts in
       *"
 "with_$ac_useropt"
@@ -1906,9 +1861,9 @@ Try \`$0 --help' for more information"
 
   *)
     # FIXME: should be removed in autoconf 3.0.
-    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+    printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
-      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+      printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
     ;;
 
@@ -1924,7 +1879,7 @@ if test -n "$ac_unrecognized_opts"; then
   case $enable_option_checking in
     no) ;;
     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
-    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+    *)     printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
   esac
 fi
 
@@ -1988,7 +1943,7 @@ $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 	 X"$as_myself" : 'X\(//\)[^/]' \| \
 	 X"$as_myself" : 'X\(//\)$' \| \
 	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_myself" |
+printf "%s\n" X"$as_myself" |
     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
 	    s//\1/
 	    q
@@ -2045,7 +2000,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures xorg-server 1.20.11 to adapt to many kinds of systems.
+\`configure' configures xorg-server 21.1.7 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -2116,7 +2071,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of xorg-server 1.20.11:";;
+     short | recursive ) echo "Configuration of xorg-server 21.1.7:";;
    esac
   cat <<\_ACEOF
 
@@ -2146,6 +2101,7 @@ Optional Features:
                           optimize for fast installation [default=yes]
   --disable-libtool-lock  avoid locking (might break parallel builds)
   --disable-largefile     omit support for large files
+  --enable-agp            Enable AGP support (default: auto)
   --enable-werror         Obsolete - use --enable-strict-compilation instead
   --enable-debug          Enable debugging (default: disabled)
   --enable-listen-tcp     Listen on TCP by default (default:disabled)
@@ -2184,9 +2140,7 @@ Optional Features:
   --enable-config-wscons  Build wscons config support (default: auto)
   --enable-xfree86-utils  Build xfree86 DDX utilities (default: enabled)
   --enable-vgahw          Build Xorg with vga access (default: enabled)
-  --enable-vbe            Build Xorg with VBE module (default: enabled)
   --enable-int10-module   Build Xorg with int10 module (default: enabled)
-  --enable-windowswm      Build XWin with WindowsWM extension (default: no)
   --enable-windowsdri     Build XWin with WindowsDRI extension (default: auto)
   --enable-libdrm         Build Xorg with libdrm support (default: enabled)
   --disable-clientids     Build Xorg with client ID tracking (default:
@@ -2200,19 +2154,17 @@ Optional Features:
   --enable-suid-wrapper   Build suid-root wrapper for legacy driver support on
                           rootless xserver systems (default: no)
   --enable-xorg           Build Xorg server (default: auto)
-  --enable-dmx            Build DMX server (default: no)
   --enable-xvfb           Build Xvfb server (default: yes)
   --enable-xnest          Build Xnest server (default: auto)
   --enable-xquartz        Build Xquartz server for OS-X (default: auto)
-  --enable-xwayland       Build Xwayland server (default: auto)
-  --enable-xwayland-eglstream
-                          Build Xwayland eglstream support (default: no)
   --enable-standalone-xpbproxy
                           Build a standalone xpbproxy (in addition to the one
                           integrated into Xquartz as a separate thread)
                           (default: no)
   --enable-xwin           Build XWin server (default: auto)
   --enable-glamor         Build glamor dix module (default: auto)
+  --enable-xf86-input-inputtest
+                          Build Xorg test input driver (default: yes)
   --enable-kdrive         Build kdrive servers (default: no)
   --enable-xephyr         Build the kdrive Xephyr server (default: auto)
   --enable-libunwind      Use libunwind for backtracing (default: auto)
@@ -2263,9 +2215,6 @@ Optional Packages:
   --with-builder-addr=ADDRESS
                           Builder address (default:
                           xorg@lists.freedesktop.org)
-  --with-os-name=OSNAME   Name of OS (default: output of "uname -srm")
-  --with-os-vendor=OSVENDOR
-                          Name of OS vendor
   --with-builderstring=BUILDERSTRING
                           Additional builder string
   --with-fallback-input-driver=$FALLBACK_INPUT_DRIVER
@@ -2307,10 +2256,10 @@ Optional Packages:
                           org.x)
   --with-bundle-version=VERSION
                           Version to use for X11.app's CFBundleVersion
-                          (default: 1.20.11)
+                          (default: 21.1.7)
   --with-bundle-version-string=VERSION
                           Version to use for X11.app's
-                          CFBundleShortVersionString (default: 1.20.11)
+                          CFBundleShortVersionString (default: 21.1.7)
   --with-sparkle-feed-url=URL
                           URL for the Sparkle feed (default:
                           https://www.xquartz.org/releases/sparkle/release.xml)
@@ -2331,7 +2280,6 @@ Some influential environment variables:
   LIBS        libraries to pass to the linker, e.g. -l<library>
   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
               you have headers in a nonstandard directory <include dir>
-  CPP         C preprocessor
   PKG_CONFIG  path to pkg-config utility
   PKG_CONFIG_PATH
               directories to add to pkg-config's search path
@@ -2354,6 +2302,7 @@ Some influential environment variables:
   YFLAGS      The list of arguments that will be passed by default to $YACC.
               This script will default YFLAGS to the empty string to avoid a
               default value of `-d' given by some make applications.
+  CPP         C preprocessor
   PIXMAN_CFLAGS
               C compiler flags for PIXMAN, overriding pkg-config
   PIXMAN_LIBS linker flags for PIXMAN, overriding pkg-config
@@ -2417,6 +2366,10 @@ Some influential environment variables:
               C compiler flags for XNESTMODULES, overriding pkg-config
   XNESTMODULES_LIBS
               linker flags for XNESTMODULES, overriding pkg-config
+  LIBXCVT_CFLAGS
+              C compiler flags for LIBXCVT, overriding pkg-config
+  LIBXCVT_LIBS
+              linker flags for LIBXCVT, overriding pkg-config
   PCIACCESS_CFLAGS
               C compiler flags for PCIACCESS, overriding pkg-config
   PCIACCESS_LIBS
@@ -2436,10 +2389,6 @@ Some influential environment variables:
               C compiler flags for XWINMODULES, overriding pkg-config
   XWINMODULES_LIBS
               linker flags for XWINMODULES, overriding pkg-config
-  WINDOWSWM_CFLAGS
-              C compiler flags for WINDOWSWM, overriding pkg-config
-  WINDOWSWM_LIBS
-              linker flags for WINDOWSWM, overriding pkg-config
   WINDOWSDRI_CFLAGS
               C compiler flags for WINDOWSDRI, overriding pkg-config
   WINDOWSDRI_LIBS
@@ -2453,53 +2402,9 @@ Some influential environment variables:
               C compiler flags for XPBPROXY, overriding pkg-config
   XPBPROXY_LIBS
               linker flags for XPBPROXY, overriding pkg-config
-  DMXMODULES_CFLAGS
-              C compiler flags for DMXMODULES, overriding pkg-config
-  DMXMODULES_LIBS
-              linker flags for DMXMODULES, overriding pkg-config
-  XDMXCONFIG_DEP_CFLAGS
-              C compiler flags for XDMXCONFIG_DEP, overriding pkg-config
-  XDMXCONFIG_DEP_LIBS
-              linker flags for XDMXCONFIG_DEP, overriding pkg-config
-  DMXEXAMPLES_DEP_CFLAGS
-              C compiler flags for DMXEXAMPLES_DEP, overriding pkg-config
-  DMXEXAMPLES_DEP_LIBS
-              linker flags for DMXEXAMPLES_DEP, overriding pkg-config
-  DMXXMUEXAMPLES_DEP_CFLAGS
-              C compiler flags for DMXXMUEXAMPLES_DEP, overriding pkg-config
-  DMXXMUEXAMPLES_DEP_LIBS
-              linker flags for DMXXMUEXAMPLES_DEP, overriding pkg-config
-  DMXXIEXAMPLES_DEP_CFLAGS
-              C compiler flags for DMXXIEXAMPLES_DEP, overriding pkg-config
-  DMXXIEXAMPLES_DEP_LIBS
-              linker flags for DMXXIEXAMPLES_DEP, overriding pkg-config
-  XTSTEXAMPLES_DEP_CFLAGS
-              C compiler flags for XTSTEXAMPLES_DEP, overriding pkg-config
-  XTSTEXAMPLES_DEP_LIBS
-              linker flags for XTSTEXAMPLES_DEP, overriding pkg-config
-  XRESEXAMPLES_DEP_CFLAGS
-              C compiler flags for XRESEXAMPLES_DEP, overriding pkg-config
-  XRESEXAMPLES_DEP_LIBS
-              linker flags for XRESEXAMPLES_DEP, overriding pkg-config
-  X11EXAMPLES_DEP_CFLAGS
-              C compiler flags for X11EXAMPLES_DEP, overriding pkg-config
-  X11EXAMPLES_DEP_LIBS
-              linker flags for X11EXAMPLES_DEP, overriding pkg-config
   XEPHYR_CFLAGS
               C compiler flags for XEPHYR, overriding pkg-config
   XEPHYR_LIBS linker flags for XEPHYR, overriding pkg-config
-  XWAYLANDMODULES_CFLAGS
-              C compiler flags for XWAYLANDMODULES, overriding pkg-config
-  XWAYLANDMODULES_LIBS
-              linker flags for XWAYLANDMODULES, overriding pkg-config
-  WAYLAND_EGLSTREAM_CFLAGS
-              C compiler flags for WAYLAND_EGLSTREAM, overriding pkg-config
-  WAYLAND_EGLSTREAM_LIBS
-              linker flags for WAYLAND_EGLSTREAM, overriding pkg-config
-  WAYLAND_SCANNER_CFLAGS
-              C compiler flags for WAYLAND_SCANNER, overriding pkg-config
-  WAYLAND_SCANNER_LIBS
-              linker flags for WAYLAND_SCANNER, overriding pkg-config
 
 Use these variables to override the choices made by `configure' or to help
 it to find libraries and programs with nonstandard names/locations.
@@ -2520,9 +2425,9 @@ if test "$ac_init_help" = "recursive"; then
 case "$ac_dir" in
 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
 *)
-  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+  ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
   # A ".." for each directory in $ac_dir_suffix.
-  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+  ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
   case $ac_top_builddir_sub in
   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
@@ -2550,7 +2455,8 @@ esac
 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
 
     cd "$ac_dir" || { ac_status=$?; continue; }
-    # Check for guested configure.
+    # Check for configure.gnu first; this name is used for a wrapper for
+    # Metaconfig's "Configure" on case-insensitive file systems.
     if test -f "$ac_srcdir/configure.gnu"; then
       echo &&
       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
@@ -2558,7 +2464,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
       echo &&
       $SHELL "$ac_srcdir/configure" --help=recursive
     else
-      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+      printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
     fi || ac_status=$?
     cd "$ac_pwd" || { ac_status=$?; break; }
   done
@@ -2567,10 +2473,10 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-xorg-server configure 1.20.11
-generated by GNU Autoconf 2.69
+xorg-server configure 21.1.7
+generated by GNU Autoconf 2.71
 
-Copyright (C) 2012 Free Software Foundation, Inc.
+Copyright (C) 2021 Free Software Foundation, Inc.
 This configure script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it.
 _ACEOF
@@ -2587,14 +2493,14 @@ fi
 ac_fn_c_try_compile ()
 {
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  rm -f conftest.$ac_objext
+  rm -f conftest.$ac_objext conftest.beam
   if { { ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
   (eval "$ac_compile") 2>conftest.err
   ac_status=$?
   if test -s conftest.err; then
@@ -2602,14 +2508,15 @@ $as_echo "$ac_try_echo"; } >&5
     cat conftest.er1 >&5
     mv -f conftest.er1 conftest.err
   fi
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then :
+       } && test -s conftest.$ac_objext
+then :
   ac_retval=0
-else
-  $as_echo "$as_me: failed program was:" >&5
+else $as_nop
+  printf "%s\n" "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_retval=1
@@ -2619,176 +2526,6 @@ fi
 
 } # ac_fn_c_try_compile
 
-# ac_fn_c_try_cpp LINENO
-# ----------------------
-# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_cpp ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  if { { ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    grep -v '^ *+' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-    mv -f conftest.er1 conftest.err
-  fi
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } > conftest.i && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then :
-  ac_retval=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-    ac_retval=1
-fi
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-  as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_cpp
-
-# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
-# -------------------------------------------------------
-# Tests whether HEADER exists, giving a warning if it cannot be compiled using
-# the include files in INCLUDES and setting the cache variable VAR
-# accordingly.
-ac_fn_c_check_header_mongrel ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  if eval \${$3+:} false; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
-  $as_echo_n "(cached) " >&6
-fi
-eval ac_res=\$$3
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-else
-  # Is the header compilable?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
-$as_echo_n "checking $2 usability... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-#include <$2>
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_header_compiler=yes
-else
-  ac_header_compiler=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
-$as_echo_n "checking $2 presence... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <$2>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-  ac_header_preproc=yes
-else
-  ac_header_preproc=no
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
-  yes:no: )
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-( $as_echo "## ----------------------------------------------------------------- ##
-## Report this to https://gitlab.freedesktop.org/xorg/xserver/issues ##
-## ----------------------------------------------------------------- ##"
-     ) | sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  eval "$3=\$ac_header_compiler"
-fi
-eval ac_res=\$$3
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-fi
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-
-} # ac_fn_c_check_header_mongrel
-
-# ac_fn_c_try_run LINENO
-# ----------------------
-# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
-# that executables *can* be run.
-ac_fn_c_try_run ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  if { { ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
-  { { case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; }; then :
-  ac_retval=0
-else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-       $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_retval=$ac_status
-fi
-  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-  as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_run
-
 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
 # -------------------------------------------------------
 # Tests whether HEADER exists and can be compiled using the include files in
@@ -2796,49 +2533,54 @@ fi
 ac_fn_c_check_header_compile ()
 {
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+printf %s "checking for $2... " >&6; }
+if eval test \${$3+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 $4
 #include <$2>
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   eval "$3=yes"
-else
+else $as_nop
   eval "$3=no"
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 eval ac_res=\$$3
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
 } # ac_fn_c_check_header_compile
 
-# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
-# ---------------------------------------------
+# ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR
+# ------------------------------------------------------------------
 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
-# accordingly.
-ac_fn_c_check_decl ()
+# accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR.
+ac_fn_check_decl ()
 {
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
   as_decl_name=`echo $2|sed 's/ *(.*//'`
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
+printf %s "checking whether $as_decl_name is declared... " >&6; }
+if eval test \${$3+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
-$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
-if eval \${$3+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+  eval ac_save_FLAGS=\$$6
+  as_fn_append $6 " $5"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 $4
 int
-main ()
+main (void)
 {
 #ifndef $as_decl_name
 #ifdef __cplusplus
@@ -2852,19 +2594,22 @@ main ()
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   eval "$3=yes"
-else
+else $as_nop
   eval "$3=no"
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+  eval $6=\$ac_save_FLAGS
+
 fi
 eval ac_res=\$$3
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
-} # ac_fn_c_check_decl
+} # ac_fn_check_decl
 
 # ac_fn_c_try_link LINENO
 # -----------------------
@@ -2872,14 +2617,14 @@ $as_echo "$ac_res" >&6; }
 ac_fn_c_try_link ()
 {
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  rm -f conftest.$ac_objext conftest$ac_exeext
+  rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
   if { { ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
   (eval "$ac_link") 2>conftest.err
   ac_status=$?
   if test -s conftest.err; then
@@ -2887,17 +2632,18 @@ $as_echo "$ac_try_echo"; } >&5
     cat conftest.er1 >&5
     mv -f conftest.er1 conftest.err
   fi
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
        } && test -s conftest$ac_exeext && {
 	 test "$cross_compiling" = yes ||
 	 test -x conftest$ac_exeext
-       }; then :
+       }
+then :
   ac_retval=0
-else
-  $as_echo "$as_me: failed program was:" >&5
+else $as_nop
+  printf "%s\n" "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_retval=1
@@ -2918,11 +2664,12 @@ fi
 ac_fn_c_check_func ()
 {
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+printf %s "checking for $2... " >&6; }
+if eval test \${$3+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
@@ -2930,16 +2677,9 @@ else
 #define $2 innocuous_$2
 
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $2 (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+   which can conflict with char $2 (); below.  */
 
+#include <limits.h>
 #undef $2
 
 /* Override any GCC internal prototype to avoid an error.
@@ -2957,72 +2697,156 @@ choke me
 #endif
 
 int
-main ()
+main (void)
 {
 return $2 ();
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   eval "$3=yes"
-else
+else $as_nop
   eval "$3=no"
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 fi
 eval ac_res=\$$3
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
 } # ac_fn_c_check_func
 
-# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
-# --------------------------------------------
-# Tries to find the compile-time value of EXPR in a program that includes
-# INCLUDES, setting VAR accordingly. Returns whether the value could be
-# computed
-ac_fn_c_compute_int ()
+# ac_fn_c_try_cpp LINENO
+# ----------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
 {
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  if test "$cross_compiling" = yes; then
-    # Depending upon the size, compute the lo and hi bounds.
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-int
-main ()
-{
-static int test_array [1 - 2 * !(($2) >= 0)];
-test_array [0] = 0;
-return test_array [0];
+  if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } > conftest.i && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }
+then :
+  ac_retval=0
+else $as_nop
+  printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_lo=0 ac_mid=0
-  while :; do
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-int
-main ()
-{
-static int test_array [1 - 2 * !(($2) <= $ac_mid)];
-test_array [0] = 0;
-return test_array [0];
+    ac_retval=1
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
 
-  ;
+} # ac_fn_c_try_cpp
+
+# ac_fn_c_try_run LINENO
+# ----------------------
+# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
+# executables *can* be run.
+ac_fn_c_try_run ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+  { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }
+then :
+  ac_retval=0
+else $as_nop
+  printf "%s\n" "$as_me: program exited with status $ac_status" >&5
+       printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_retval=$ac_status
+fi
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_run
+
+# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
+# --------------------------------------------
+# Tries to find the compile-time value of EXPR in a program that includes
+# INCLUDES, setting VAR accordingly. Returns whether the value could be
+# computed
+ac_fn_c_compute_int ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if test "$cross_compiling" = yes; then
+    # Depending upon the size, compute the lo and hi bounds.
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main (void)
+{
+static int test_array [1 - 2 * !(($2) >= 0)];
+test_array [0] = 0;
+return test_array [0];
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  ac_lo=0 ac_mid=0
+  while :; do
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main (void)
+{
+static int test_array [1 - 2 * !(($2) <= $ac_mid)];
+test_array [0] = 0;
+return test_array [0];
+
+  ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   ac_hi=$ac_mid; break
-else
+else $as_nop
   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
 			if test $ac_lo -le $ac_mid; then
 			  ac_lo= ac_hi=
@@ -3030,14 +2854,14 @@ else
 			fi
 			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
   done
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 $4
 int
-main ()
+main (void)
 {
 static int test_array [1 - 2 * !(($2) < 0)];
 test_array [0] = 0;
@@ -3047,14 +2871,15 @@ return test_array [0];
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   ac_hi=-1 ac_mid=-1
   while :; do
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 $4
 int
-main ()
+main (void)
 {
 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
 test_array [0] = 0;
@@ -3064,9 +2889,10 @@ return test_array [0];
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   ac_lo=$ac_mid; break
-else
+else $as_nop
   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
 			if test $ac_mid -le $ac_hi; then
 			  ac_lo= ac_hi=
@@ -3074,14 +2900,14 @@ else
 			fi
 			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
   done
-else
+else $as_nop
   ac_lo= ac_hi=
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 # Binary search between lo and hi bounds.
 while test "x$ac_lo" != "x$ac_hi"; do
   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
@@ -3089,7 +2915,7 @@ while test "x$ac_lo" != "x$ac_hi"; do
 /* end confdefs.h.  */
 $4
 int
-main ()
+main (void)
 {
 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
 test_array [0] = 0;
@@ -3099,12 +2925,13 @@ return test_array [0];
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   ac_hi=$ac_mid
-else
+else $as_nop
   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 done
 case $ac_lo in #((
 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
@@ -3114,12 +2941,12 @@ esac
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 $4
-static long int longval () { return $2; }
-static unsigned long int ulongval () { return $2; }
+static long int longval (void) { return $2; }
+static unsigned long int ulongval (void) { return $2; }
 #include <stdio.h>
 #include <stdlib.h>
 int
-main ()
+main (void)
 {
 
   FILE *f = fopen ("conftest.val", "w");
@@ -3147,9 +2974,10 @@ main ()
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
-else
+else $as_nop
   ac_retval=1
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -3169,17 +2997,18 @@ rm -f conftest.val
 ac_fn_c_check_type ()
 {
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+printf %s "checking for $2... " >&6; }
+if eval test \${$3+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   eval "$3=no"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 $4
 int
-main ()
+main (void)
 {
 if (sizeof ($2))
 	 return 0;
@@ -3187,12 +3016,13 @@ if (sizeof ($2))
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 $4
 int
-main ()
+main (void)
 {
 if (sizeof (($2)))
 	    return 0;
@@ -3200,18 +3030,19 @@ if (sizeof (($2)))
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
 
-else
+else $as_nop
   eval "$3=yes"
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 eval ac_res=\$$3
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
 } # ac_fn_c_check_type
@@ -3223,16 +3054,17 @@ $as_echo "$ac_res" >&6; }
 ac_fn_c_check_member ()
 {
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
-$as_echo_n "checking for $2.$3... " >&6; }
-if eval \${$4+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
+printf %s "checking for $2.$3... " >&6; }
+if eval test \${$4+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 $5
 int
-main ()
+main (void)
 {
 static $2 ac_aggr;
 if (ac_aggr.$3)
@@ -3241,14 +3073,15 @@ return 0;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   eval "$4=yes"
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 $5
 int
-main ()
+main (void)
 {
 static $2 ac_aggr;
 if (sizeof ac_aggr.$3)
@@ -3257,29 +3090,50 @@ return 0;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   eval "$4=yes"
-else
+else $as_nop
   eval "$4=no"
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 eval ac_res=\$$4
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
 } # ac_fn_c_check_member
+ac_configure_args_raw=
+for ac_arg
+do
+  case $ac_arg in
+  *\'*)
+    ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+  esac
+  as_fn_append ac_configure_args_raw " '$ac_arg'"
+done
+
+case $ac_configure_args_raw in
+  *$as_nl*)
+    ac_safe_unquote= ;;
+  *)
+    ac_unsafe_z='|&;<>()$`\\"*?[ ''	' # This string ends in space, tab.
+    ac_unsafe_a="$ac_unsafe_z#~"
+    ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
+    ac_configure_args_raw=`      printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
+esac
+
 cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by xorg-server $as_me 1.20.11, which was
-generated by GNU Autoconf 2.69.  Invocation command line was
+It was created by xorg-server $as_me 21.1.7, which was
+generated by GNU Autoconf 2.71.  Invocation command line was
 
-  $ $0 $@
+  $ $0$ac_configure_args_raw
 
 _ACEOF
 exec 5>>config.log
@@ -3312,8 +3166,12 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    $as_echo "PATH: $as_dir"
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    printf "%s\n" "PATH: $as_dir"
   done
 IFS=$as_save_IFS
 
@@ -3348,7 +3206,7 @@ do
     | -silent | --silent | --silen | --sile | --sil)
       continue ;;
     *\'*)
-      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+      ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
     esac
     case $ac_pass in
     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
@@ -3383,11 +3241,13 @@ done
 # WARNING: Use '\'' to represent an apostrophe within the trap.
 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
 trap 'exit_status=$?
+  # Sanitize IFS.
+  IFS=" ""	$as_nl"
   # Save into config.log some information that might help in debugging.
   {
     echo
 
-    $as_echo "## ---------------- ##
+    printf "%s\n" "## ---------------- ##
 ## Cache variables. ##
 ## ---------------- ##"
     echo
@@ -3398,8 +3258,8 @@ trap 'exit_status=$?
     case $ac_val in #(
     *${as_nl}*)
       case $ac_var in #(
-      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+      *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
       esac
       case $ac_var in #(
       _ | IFS | as_nl) ;; #(
@@ -3423,7 +3283,7 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
 )
     echo
 
-    $as_echo "## ----------------- ##
+    printf "%s\n" "## ----------------- ##
 ## Output variables. ##
 ## ----------------- ##"
     echo
@@ -3431,14 +3291,14 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
     do
       eval ac_val=\$$ac_var
       case $ac_val in
-      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+      *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
       esac
-      $as_echo "$ac_var='\''$ac_val'\''"
+      printf "%s\n" "$ac_var='\''$ac_val'\''"
     done | sort
     echo
 
     if test -n "$ac_subst_files"; then
-      $as_echo "## ------------------- ##
+      printf "%s\n" "## ------------------- ##
 ## File substitutions. ##
 ## ------------------- ##"
       echo
@@ -3446,15 +3306,15 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
       do
 	eval ac_val=\$$ac_var
 	case $ac_val in
-	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+	*\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
 	esac
-	$as_echo "$ac_var='\''$ac_val'\''"
+	printf "%s\n" "$ac_var='\''$ac_val'\''"
       done | sort
       echo
     fi
 
     if test -s confdefs.h; then
-      $as_echo "## ----------- ##
+      printf "%s\n" "## ----------- ##
 ## confdefs.h. ##
 ## ----------- ##"
       echo
@@ -3462,8 +3322,8 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
       echo
     fi
     test "$ac_signal" != 0 &&
-      $as_echo "$as_me: caught signal $ac_signal"
-    $as_echo "$as_me: exit $exit_status"
+      printf "%s\n" "$as_me: caught signal $ac_signal"
+    printf "%s\n" "$as_me: exit $exit_status"
   } >&5
   rm -f core *.core core.conftest.* &&
     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
@@ -3477,63 +3337,48 @@ ac_signal=0
 # confdefs.h avoids OS command line length limits that DEFS can exceed.
 rm -f -r conftest* confdefs.h
 
-$as_echo "/* confdefs.h */" > confdefs.h
+printf "%s\n" "/* confdefs.h */" > confdefs.h
 
 # Predefined preprocessor variables.
 
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_NAME "$PACKAGE_NAME"
-_ACEOF
+printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
 
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
-_ACEOF
+printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
 
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION "$PACKAGE_VERSION"
-_ACEOF
+printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
 
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_STRING "$PACKAGE_STRING"
-_ACEOF
+printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
 
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
-_ACEOF
+printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
 
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_URL "$PACKAGE_URL"
-_ACEOF
+printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
 
 
 # Let the site file select an alternate cache file if it wants to.
 # Prefer an explicitly selected file to automatically selected ones.
-ac_site_file1=NONE
-ac_site_file2=NONE
 if test -n "$CONFIG_SITE"; then
-  # We do not want a PATH search for config.site.
-  case $CONFIG_SITE in #((
-    -*)  ac_site_file1=./$CONFIG_SITE;;
-    */*) ac_site_file1=$CONFIG_SITE;;
-    *)   ac_site_file1=./$CONFIG_SITE;;
-  esac
+  ac_site_files="$CONFIG_SITE"
 elif test "x$prefix" != xNONE; then
-  ac_site_file1=$prefix/share/config.site
-  ac_site_file2=$prefix/etc/config.site
+  ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
 else
-  ac_site_file1=$ac_default_prefix/share/config.site
-  ac_site_file2=$ac_default_prefix/etc/config.site
+  ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
 fi
-for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+
+for ac_site_file in $ac_site_files
 do
-  test "x$ac_site_file" = xNONE && continue
-  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
-$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+  case $ac_site_file in #(
+  */*) :
+     ;; #(
+  *) :
+    ac_site_file=./$ac_site_file ;;
+esac
+  if test -f "$ac_site_file" && test -r "$ac_site_file"; then
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
     sed 's/^/| /' "$ac_site_file" >&5
     . "$ac_site_file" \
-      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+      || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "failed to load site script $ac_site_file
 See \`config.log' for more details" "$LINENO" 5; }
   fi
@@ -3543,827 +3388,789 @@ if test -r "$cache_file"; then
   # Some versions of bash will fail to source /dev/null (special files
   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
-$as_echo "$as_me: loading cache $cache_file" >&6;}
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
     case $cache_file in
       [\\/]* | ?:[\\/]* ) . "$cache_file";;
       *)                      . "./$cache_file";;
     esac
   fi
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
-$as_echo "$as_me: creating cache $cache_file" >&6;}
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
   >$cache_file
 fi
 
-# Check that the precious variables saved in the cache have kept the same
-# value.
-ac_cache_corrupted=false
-for ac_var in $ac_precious_vars; do
-  eval ac_old_set=\$ac_cv_env_${ac_var}_set
-  eval ac_new_set=\$ac_env_${ac_var}_set
-  eval ac_old_val=\$ac_cv_env_${ac_var}_value
-  eval ac_new_val=\$ac_env_${ac_var}_value
-  case $ac_old_set,$ac_new_set in
-    set,)
-      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
-      ac_cache_corrupted=: ;;
-    ,set)
-      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
-      ac_cache_corrupted=: ;;
-    ,);;
-    *)
-      if test "x$ac_old_val" != "x$ac_new_val"; then
-	# differences in whitespace do not lead to failure.
-	ac_old_val_w=`echo x $ac_old_val`
-	ac_new_val_w=`echo x $ac_new_val`
-	if test "$ac_old_val_w" != "$ac_new_val_w"; then
-	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
-$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
-	  ac_cache_corrupted=:
-	else
-	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
-$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
-	  eval $ac_var=\$ac_old_val
-	fi
-	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
-$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
-	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
-$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
-      fi;;
-  esac
-  # Pass precious variables to config.status.
-  if test "$ac_new_set" = set; then
-    case $ac_new_val in
-    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
-    *) ac_arg=$ac_var=$ac_new_val ;;
-    esac
-    case " $ac_configure_args " in
-      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
-      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
-    esac
-  fi
-done
-if $ac_cache_corrupted; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
-$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
-  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
-fi
-## -------------------- ##
-## Main body of script. ##
-## -------------------- ##
+as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
+# Test code for whether the C compiler supports C89 (global declarations)
+ac_c_conftest_c89_globals='
+/* Does the compiler advertise C89 conformance?
+   Do not test the value of __STDC__, because some compilers set it to 0
+   while being otherwise adequately conformant. */
+#if !defined __STDC__
+# error "Compiler does not advertise C89 conformance"
+#endif
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+#include <stddef.h>
+#include <stdarg.h>
+struct stat;
+/* Most of the following tests are stolen from RCS 5.7 src/conf.sh.  */
+struct buf { int x; };
+struct buf * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+     char **p;
+     int i;
+{
+  return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+  char *s;
+  va_list v;
+  va_start (v,p);
+  s = g (p, va_arg (v,int));
+  va_end (v);
+  return s;
+}
 
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
+   function prototypes and stuff, but not \xHH hex character constants.
+   These do not provoke an error unfortunately, instead are silently treated
+   as an "x".  The following induces an error, until -std is added to get
+   proper ANSI mode.  Curiously \x00 != x always comes out true, for an
+   array size at least.  It is necessary to write \x00 == 0 to get something
+   that is true only with -std.  */
+int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
 
-RELEASE_DATE="2021-04-13"
-RELEASE_NAME="Arroz con Pollo"
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+   inside strings and character constants.  */
+#define FOO(x) '\''x'\''
+int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
 
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
+               int, int);'
 
-am__api_version='1.16'
+# Test code for whether the C compiler supports C89 (body of main).
+ac_c_conftest_c89_main='
+ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
+'
 
-ac_aux_dir=
-for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
-  if test -f "$ac_dir/install-sh"; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install-sh -c"
-    break
-  elif test -f "$ac_dir/install.sh"; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install.sh -c"
-    break
-  elif test -f "$ac_dir/shtool"; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/shtool install -c"
-    break
-  fi
-done
-if test -z "$ac_aux_dir"; then
-  as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
-fi
+# Test code for whether the C compiler supports C99 (global declarations)
+ac_c_conftest_c99_globals='
+// Does the compiler advertise C99 conformance?
+#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
+# error "Compiler does not advertise C99 conformance"
+#endif
 
-# These three variables are undocumented and unsupported,
-# and are intended to be withdrawn in a future Autoconf release.
-# They can cause serious problems if a builder's source tree is in a directory
-# whose full name contains unusual characters.
-ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
-ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
-ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
+#include <stdbool.h>
+extern int puts (const char *);
+extern int printf (const char *, ...);
+extern int dprintf (int, const char *, ...);
+extern void *malloc (size_t);
 
+// Check varargs macros.  These examples are taken from C99 6.10.3.5.
+// dprintf is used instead of fprintf to avoid needing to declare
+// FILE and stderr.
+#define debug(...) dprintf (2, __VA_ARGS__)
+#define showlist(...) puts (#__VA_ARGS__)
+#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
+static void
+test_varargs_macros (void)
+{
+  int x = 1234;
+  int y = 5678;
+  debug ("Flag");
+  debug ("X = %d\n", x);
+  showlist (The first, second, and third items.);
+  report (x>y, "x is %d but y is %d", x, y);
+}
 
-# Find a good install program.  We prefer a C program (faster),
-# so one script is as good as another.  But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AmigaOS /C/install, which installs bootblocks on floppy discs
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# OS/2's system install, which has a completely different semantic
-# ./install, which can be erroneously created by make from ./install.sh.
-# Reject install programs that cannot install multiple files.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
-$as_echo_n "checking for a BSD-compatible install... " >&6; }
-if test -z "$INSTALL"; then
-if ${ac_cv_path_install+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in #((
-  ./ | .// | /[cC]/* | \
-  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
-  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
-  /usr/ucb/* ) ;;
-  *)
-    # OSF1 and SCO ODT 3.0 have their own names for install.
-    # Don't use installbsd from OSF since it installs stuff as root
-    # by default.
-    for ac_prog in ginstall scoinst install; do
-      for ac_exec_ext in '' $ac_executable_extensions; do
-	if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
-	  if test $ac_prog = install &&
-	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
-	    # AIX install.  It has an incompatible calling convention.
-	    :
-	  elif test $ac_prog = install &&
-	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
-	    # program-specific install script used by HP pwplus--don't use.
-	    :
-	  else
-	    rm -rf conftest.one conftest.two conftest.dir
-	    echo one > conftest.one
-	    echo two > conftest.two
-	    mkdir conftest.dir
-	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
-	      test -s conftest.one && test -s conftest.two &&
-	      test -s conftest.dir/conftest.one &&
-	      test -s conftest.dir/conftest.two
-	    then
-	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
-	      break 3
-	    fi
-	  fi
-	fi
-      done
-    done
-    ;;
-esac
+// Check long long types.
+#define BIG64 18446744073709551615ull
+#define BIG32 4294967295ul
+#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
+#if !BIG_OK
+  #error "your preprocessor is broken"
+#endif
+#if BIG_OK
+#else
+  #error "your preprocessor is broken"
+#endif
+static long long int bignum = -9223372036854775807LL;
+static unsigned long long int ubignum = BIG64;
 
-  done
-IFS=$as_save_IFS
+struct incomplete_array
+{
+  int datasize;
+  double data[];
+};
 
-rm -rf conftest.one conftest.two conftest.dir
+struct named_init {
+  int number;
+  const wchar_t *name;
+  double average;
+};
 
-fi
-  if test "${ac_cv_path_install+set}" = set; then
-    INSTALL=$ac_cv_path_install
-  else
-    # As a last resort, use the slow shell script.  Don't cache a
-    # value for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the value is a relative name.
-    INSTALL=$ac_install_sh
-  fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
-$as_echo "$INSTALL" >&6; }
+typedef const char *ccp;
 
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+static inline int
+test_restrict (ccp restrict text)
+{
+  // See if C++-style comments work.
+  // Iterate through items via the restricted pointer.
+  // Also check for declarations in for loops.
+  for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
+    continue;
+  return 0;
+}
 
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+// Check varargs and va_copy.
+static bool
+test_varargs (const char *format, ...)
+{
+  va_list args;
+  va_start (args, format);
+  va_list args_copy;
+  va_copy (args_copy, args);
 
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+  const char *str = "";
+  int number = 0;
+  float fnumber = 0;
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
-$as_echo_n "checking whether build environment is sane... " >&6; }
-# Reject unsafe characters in $srcdir or the absolute working directory
-# name.  Accept space and tab only in the latter.
-am_lf='
+  while (*format)
+    {
+      switch (*format++)
+	{
+	case '\''s'\'': // string
+	  str = va_arg (args_copy, const char *);
+	  break;
+	case '\''d'\'': // int
+	  number = va_arg (args_copy, int);
+	  break;
+	case '\''f'\'': // float
+	  fnumber = va_arg (args_copy, double);
+	  break;
+	default:
+	  break;
+	}
+    }
+  va_end (args_copy);
+  va_end (args);
+
+  return *str && number && fnumber;
+}
 '
-case `pwd` in
-  *[\\\"\#\$\&\'\`$am_lf]*)
-    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
-esac
-case $srcdir in
-  *[\\\"\#\$\&\'\`$am_lf\ \	]*)
-    as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
-esac
 
-# Do 'set' in a subshell so we don't clobber the current shell's
-# arguments.  Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
-   am_has_slept=no
-   for am_try in 1 2; do
-     echo "timestamp, slept: $am_has_slept" > conftest.file
-     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
-     if test "$*" = "X"; then
-	# -L didn't work.
-	set X `ls -t "$srcdir/configure" conftest.file`
-     fi
-     if test "$*" != "X $srcdir/configure conftest.file" \
-	&& test "$*" != "X conftest.file $srcdir/configure"; then
+# Test code for whether the C compiler supports C99 (body of main).
+ac_c_conftest_c99_main='
+  // Check bool.
+  _Bool success = false;
+  success |= (argc != 0);
 
-	# If neither matched, then we have a broken ls.  This can happen
-	# if, for instance, CONFIG_SHELL is bash and it inherits a
-	# broken ls alias from the environment.  This has actually
-	# happened.  Such a system could not be considered "sane".
-	as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
-  alias in your environment" "$LINENO" 5
-     fi
-     if test "$2" = conftest.file || test $am_try -eq 2; then
-       break
-     fi
-     # Just in case.
-     sleep 1
-     am_has_slept=yes
-   done
-   test "$2" = conftest.file
-   )
-then
-   # Ok.
-   :
-else
-   as_fn_error $? "newly created file is older than distributed files!
-Check your system clock" "$LINENO" 5
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-# If we didn't sleep, we still need to ensure time stamps of config.status and
-# generated files are strictly newer.
-am_sleep_pid=
-if grep 'slept: no' conftest.file >/dev/null 2>&1; then
-  ( sleep 1 ) &
-  am_sleep_pid=$!
-fi
+  // Check restrict.
+  if (test_restrict ("String literal") == 0)
+    success = true;
+  char *restrict newvar = "Another string";
 
-rm -f conftest.file
+  // Check varargs.
+  success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
+  test_varargs_macros ();
 
-test "$program_prefix" != NONE &&
-  program_transform_name="s&^&$program_prefix&;$program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
-  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
-# Double any \ or $.
-# By default was `s,x,x', remove it if useless.
-ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
-program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+  // Check flexible array members.
+  struct incomplete_array *ia =
+    malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
+  ia->datasize = 10;
+  for (int i = 0; i < ia->datasize; ++i)
+    ia->data[i] = i * 1.234;
 
-# Expand $ac_aux_dir to an absolute path.
-am_aux_dir=`cd "$ac_aux_dir" && pwd`
+  // Check named initializers.
+  struct named_init ni = {
+    .number = 34,
+    .name = L"Test wide string",
+    .average = 543.34343,
+  };
 
-if test x"${MISSING+set}" != xset; then
-  case $am_aux_dir in
-  *\ * | *\	*)
-    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
-  *)
-    MISSING="\${SHELL} $am_aux_dir/missing" ;;
-  esac
-fi
-# Use eval to expand $SHELL
-if eval "$MISSING --is-lightweight"; then
-  am_missing_run="$MISSING "
-else
-  am_missing_run=
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
-$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
-fi
+  ni.number = 58;
 
-if test x"${install_sh+set}" != xset; then
-  case $am_aux_dir in
-  *\ * | *\	*)
-    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
-  *)
-    install_sh="\${SHELL} $am_aux_dir/install-sh"
-  esac
-fi
+  int dynamic_array[ni.number];
+  dynamic_array[0] = argv[0][0];
+  dynamic_array[ni.number - 1] = 543;
 
-# Installed binaries are usually stripped using 'strip' when the user
-# run "make install-strip".  However 'strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the 'STRIP' environment variable to overrule this program.
-if test "$cross_compiling" != no; then
-  if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_STRIP+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$STRIP"; then
-  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
+  // work around unused variable warnings
+  ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
+	 || dynamic_array[ni.number - 1] != 543);
+'
 
-fi
-fi
-STRIP=$ac_cv_prog_STRIP
-if test -n "$STRIP"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
-$as_echo "$STRIP" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
+# Test code for whether the C compiler supports C11 (global declarations)
+ac_c_conftest_c11_globals='
+// Does the compiler advertise C11 conformance?
+#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
+# error "Compiler does not advertise C11 conformance"
+#endif
 
+// Check _Alignas.
+char _Alignas (double) aligned_as_double;
+char _Alignas (0) no_special_alignment;
+extern char aligned_as_int;
+char _Alignas (0) _Alignas (int) aligned_as_int;
 
-fi
-if test -z "$ac_cv_prog_STRIP"; then
-  ac_ct_STRIP=$STRIP
-  # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_STRIP"; then
-  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_STRIP="strip"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
+// Check _Alignof.
+enum
+{
+  int_alignment = _Alignof (int),
+  int_array_alignment = _Alignof (int[100]),
+  char_alignment = _Alignof (char)
+};
+_Static_assert (0 < -_Alignof (int), "_Alignof is signed");
 
-fi
-fi
-ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
-if test -n "$ac_ct_STRIP"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
-$as_echo "$ac_ct_STRIP" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
+// Check _Noreturn.
+int _Noreturn does_not_return (void) { for (;;) continue; }
 
-  if test "x$ac_ct_STRIP" = x; then
-    STRIP=":"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    STRIP=$ac_ct_STRIP
-  fi
-else
-  STRIP="$ac_cv_prog_STRIP"
-fi
+// Check _Static_assert.
+struct test_static_assert
+{
+  int x;
+  _Static_assert (sizeof (int) <= sizeof (long int),
+                  "_Static_assert does not work in struct");
+  long int y;
+};
 
-fi
-INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+// Check UTF-8 literals.
+#define u8 syntax error!
+char const utf8_literal[] = u8"happens to be ASCII" "another string";
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
-$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
-if test -z "$MKDIR_P"; then
-  if ${ac_cv_path_mkdir+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_prog in mkdir gmkdir; do
-	 for ac_exec_ext in '' $ac_executable_extensions; do
-	   as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
-	   case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
-	     'mkdir (GNU coreutils) '* | \
-	     'mkdir (coreutils) '* | \
-	     'mkdir (fileutils) '4.1*)
-	       ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
-	       break 3;;
-	   esac
-	 done
-       done
-  done
-IFS=$as_save_IFS
+// Check duplicate typedefs.
+typedef long *long_ptr;
+typedef long int *long_ptr;
+typedef long_ptr long_ptr;
 
-fi
+// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
+struct anonymous
+{
+  union {
+    struct { int i; int j; };
+    struct { int k; long int l; } w;
+  };
+  int m;
+} v1;
+'
 
-  test -d ./--version && rmdir ./--version
-  if test "${ac_cv_path_mkdir+set}" = set; then
-    MKDIR_P="$ac_cv_path_mkdir -p"
-  else
-    # As a last resort, use the slow shell script.  Don't cache a
-    # value for MKDIR_P within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the value is a relative name.
-    MKDIR_P="$ac_install_sh -d"
-  fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
-$as_echo "$MKDIR_P" >&6; }
+# Test code for whether the C compiler supports C11 (body of main).
+ac_c_conftest_c11_main='
+  _Static_assert ((offsetof (struct anonymous, i)
+		   == offsetof (struct anonymous, w.k)),
+		  "Anonymous union alignment botch");
+  v1.i = 2;
+  v1.w.k = 5;
+  ok |= v1.i != 5;
+'
 
-for ac_prog in gawk mawk nawk awk
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_AWK+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$AWK"; then
-  ac_cv_prog_AWK="$AWK" # Let the user override the test.
-else
+# Test code for whether the C compiler supports C11 (complete).
+ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
+${ac_c_conftest_c99_globals}
+${ac_c_conftest_c11_globals}
+
+int
+main (int argc, char **argv)
+{
+  int ok = 0;
+  ${ac_c_conftest_c89_main}
+  ${ac_c_conftest_c99_main}
+  ${ac_c_conftest_c11_main}
+  return ok;
+}
+"
+
+# Test code for whether the C compiler supports C99 (complete).
+ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
+${ac_c_conftest_c99_globals}
+
+int
+main (int argc, char **argv)
+{
+  int ok = 0;
+  ${ac_c_conftest_c89_main}
+  ${ac_c_conftest_c99_main}
+  return ok;
+}
+"
+
+# Test code for whether the C compiler supports C89 (complete).
+ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
+
+int
+main (int argc, char **argv)
+{
+  int ok = 0;
+  ${ac_c_conftest_c89_main}
+  return ok;
+}
+"
+
+as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
+as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
+as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
+as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
+as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
+as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
+as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
+as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
+as_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H"
+as_fn_append ac_header_c_list " minix/config.h minix_config_h HAVE_MINIX_CONFIG_H"
+
+# Auxiliary files required by this configure script.
+ac_aux_files="ltmain.sh config.guess config.sub compile missing install-sh"
+
+# Locations in which to look for auxiliary files.
+ac_aux_dir_candidates="${srcdir}${PATH_SEPARATOR}${srcdir}/..${PATH_SEPARATOR}${srcdir}/../.."
+
+# Search for a directory containing all of the required auxiliary files,
+# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates.
+# If we don't find one directory that contains all the files we need,
+# we report the set of missing files from the *first* directory in
+# $ac_aux_dir_candidates and give up.
+ac_missing_aux_files=""
+ac_first_candidate=:
+printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
+as_found=false
+for as_dir in $ac_aux_dir_candidates
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_AWK="$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-AWK=$ac_cv_prog_AWK
-if test -n "$AWK"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
-$as_echo "$AWK" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+  as_found=:
 
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}:  trying $as_dir" >&5
+  ac_aux_dir_found=yes
+  ac_install_sh=
+  for ac_aux in $ac_aux_files
+  do
+    # As a special case, if "install-sh" is required, that requirement
+    # can be satisfied by any of "install-sh", "install.sh", or "shtool",
+    # and $ac_install_sh is set appropriately for whichever one is found.
+    if test x"$ac_aux" = x"install-sh"
+    then
+      if test -f "${as_dir}install-sh"; then
+        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}install-sh found" >&5
+        ac_install_sh="${as_dir}install-sh -c"
+      elif test -f "${as_dir}install.sh"; then
+        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}install.sh found" >&5
+        ac_install_sh="${as_dir}install.sh -c"
+      elif test -f "${as_dir}shtool"; then
+        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}shtool found" >&5
+        ac_install_sh="${as_dir}shtool install -c"
+      else
+        ac_aux_dir_found=no
+        if $ac_first_candidate; then
+          ac_missing_aux_files="${ac_missing_aux_files} install-sh"
+        else
+          break
+        fi
+      fi
+    else
+      if test -f "${as_dir}${ac_aux}"; then
+        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}${ac_aux} found" >&5
+      else
+        ac_aux_dir_found=no
+        if $ac_first_candidate; then
+          ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}"
+        else
+          break
+        fi
+      fi
+    fi
+  done
+  if test "$ac_aux_dir_found" = yes; then
+    ac_aux_dir="$as_dir"
+    break
+  fi
+  ac_first_candidate=false
 
-  test -n "$AWK" && break
+  as_found=false
 done
+IFS=$as_save_IFS
+if $as_found
+then :
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
-set x ${MAKE-make}
-ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.make <<\_ACEOF
-SHELL = /bin/sh
-all:
-	@echo '@@@%%%=$(MAKE)=@@@%%%'
-_ACEOF
-# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
-case `${MAKE-make} -f conftest.make 2>/dev/null` in
-  *@@@%%%=?*=@@@%%%*)
-    eval ac_cv_prog_make_${ac_make}_set=yes;;
-  *)
-    eval ac_cv_prog_make_${ac_make}_set=no;;
-esac
-rm -f conftest.make
-fi
-if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-  SET_MAKE=
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-  SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-rm -rf .tst 2>/dev/null
-mkdir .tst 2>/dev/null
-if test -d .tst; then
-  am__leading_dot=.
-else
-  am__leading_dot=_
+else $as_nop
+  as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5
 fi
-rmdir .tst 2>/dev/null
 
-# Check whether --enable-silent-rules was given.
-if test "${enable_silent_rules+set}" = set; then :
-  enableval=$enable_silent_rules;
-fi
 
-case $enable_silent_rules in # (((
-  yes) AM_DEFAULT_VERBOSITY=0;;
-   no) AM_DEFAULT_VERBOSITY=1;;
-    *) AM_DEFAULT_VERBOSITY=1;;
-esac
-am_make=${MAKE-make}
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
-$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
-if ${am_cv_make_support_nested_variables+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if $as_echo 'TRUE=$(BAR$(V))
-BAR0=false
-BAR1=true
-V=1
-am__doit:
-	@$(TRUE)
-.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
-  am_cv_make_support_nested_variables=yes
-else
-  am_cv_make_support_nested_variables=no
-fi
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+if test -f "${ac_aux_dir}config.guess"; then
+  ac_config_guess="$SHELL ${ac_aux_dir}config.guess"
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
-$as_echo "$am_cv_make_support_nested_variables" >&6; }
-if test $am_cv_make_support_nested_variables = yes; then
-    AM_V='$(V)'
-  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
-else
-  AM_V=$AM_DEFAULT_VERBOSITY
-  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+if test -f "${ac_aux_dir}config.sub"; then
+  ac_config_sub="$SHELL ${ac_aux_dir}config.sub"
 fi
-AM_BACKSLASH='\'
-
-if test "`cd $srcdir && pwd`" != "`pwd`"; then
-  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
-  # is not polluted with repeated "-I."
-  am__isrc=' -I$(srcdir)'
-  # test to see if srcdir already configured
-  if test -f $srcdir/config.status; then
-    as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
-  fi
+if test -f "$ac_aux_dir/configure"; then
+  ac_configure="$SHELL ${ac_aux_dir}configure"
 fi
 
-# test whether we have cygpath
-if test -z "$CYGPATH_W"; then
-  if (cygpath --version) >/dev/null 2>/dev/null; then
-    CYGPATH_W='cygpath -w'
-  else
-    CYGPATH_W=echo
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+  eval ac_old_set=\$ac_cv_env_${ac_var}_set
+  eval ac_new_set=\$ac_env_${ac_var}_set
+  eval ac_old_val=\$ac_cv_env_${ac_var}_value
+  eval ac_new_val=\$ac_env_${ac_var}_value
+  case $ac_old_set,$ac_new_set in
+    set,)
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,set)
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,);;
+    *)
+      if test "x$ac_old_val" != "x$ac_new_val"; then
+	# differences in whitespace do not lead to failure.
+	ac_old_val_w=`echo x $ac_old_val`
+	ac_new_val_w=`echo x $ac_new_val`
+	if test "$ac_old_val_w" != "$ac_new_val_w"; then
+	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+	  ac_cache_corrupted=:
+	else
+	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+	  eval $ac_var=\$ac_old_val
+	fi
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
+printf "%s\n" "$as_me:   former value:  \`$ac_old_val'" >&2;}
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
+printf "%s\n" "$as_me:   current value: \`$ac_new_val'" >&2;}
+      fi;;
+  esac
+  # Pass precious variables to config.status.
+  if test "$ac_new_set" = set; then
+    case $ac_new_val in
+    *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *) ac_arg=$ac_var=$ac_new_val ;;
+    esac
+    case " $ac_configure_args " in
+      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
+      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+    esac
   fi
+done
+if $ac_cache_corrupted; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
+  as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file'
+	    and start over" "$LINENO" 5
 fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
 
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-# Define the identity of the package.
- PACKAGE='xorg-server'
- VERSION='1.20.11'
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE "$PACKAGE"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define VERSION "$VERSION"
-_ACEOF
-
-# Some tools Automake needs.
-
-ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
-
-
-AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
-
-
-AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
 
+RELEASE_DATE="2023-02-07"
+RELEASE_NAME="Caramel Ice Cream"
 
-AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
 
+am__api_version='1.16'
 
-MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
 
-# For better backward compatibility.  To be removed once Automake 1.9.x
-# dies out for good.  For more background, see:
-# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
-# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
-mkdir_p='$(MKDIR_P)'
 
-# We need awk for the "check" target (and possibly the TAP driver).  The
-# system "awk" is bad on some platforms.
-# Always define AMTAR for backward compatibility.  Yes, it's still used
-# in the wild :-(  We should find a proper way to deprecate it ...
-AMTAR='$${TAR-tar}'
+  # Find a good install program.  We prefer a C program (faster),
+# so one script is as good as another.  But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+printf %s "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if test ${ac_cv_path_install+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    # Account for fact that we put trailing slashes in our PATH walk.
+case $as_dir in #((
+  ./ | /[cC]/* | \
+  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
+  /usr/ucb/* ) ;;
+  *)
+    # OSF1 and SCO ODT 3.0 have their own names for install.
+    # Don't use installbsd from OSF since it installs stuff as root
+    # by default.
+    for ac_prog in ginstall scoinst install; do
+      for ac_exec_ext in '' $ac_executable_extensions; do
+	if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then
+	  if test $ac_prog = install &&
+	    grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+	    # AIX install.  It has an incompatible calling convention.
+	    :
+	  elif test $ac_prog = install &&
+	    grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+	    # program-specific install script used by HP pwplus--don't use.
+	    :
+	  else
+	    rm -rf conftest.one conftest.two conftest.dir
+	    echo one > conftest.one
+	    echo two > conftest.two
+	    mkdir conftest.dir
+	    if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" &&
+	      test -s conftest.one && test -s conftest.two &&
+	      test -s conftest.dir/conftest.one &&
+	      test -s conftest.dir/conftest.two
+	    then
+	      ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c"
+	      break 3
+	    fi
+	  fi
+	fi
+      done
+    done
+    ;;
+esac
 
+  done
+IFS=$as_save_IFS
 
-# We'll loop over all known methods to create a tar archive until one works.
-_am_tools='gnutar  pax cpio none'
+rm -rf conftest.one conftest.two conftest.dir
 
-am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
+fi
+  if test ${ac_cv_path_install+y}; then
+    INSTALL=$ac_cv_path_install
+  else
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    INSTALL=$ac_install_sh
+  fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+printf "%s\n" "$INSTALL" >&6; }
 
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
 
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
 
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+printf %s "checking whether build environment is sane... " >&6; }
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name.  Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+  *[\\\"\#\$\&\'\`$am_lf]*)
+    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
+esac
+case $srcdir in
+  *[\\\"\#\$\&\'\`$am_lf\ \	]*)
+    as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
+esac
 
+# Do 'set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   am_has_slept=no
+   for am_try in 1 2; do
+     echo "timestamp, slept: $am_has_slept" > conftest.file
+     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+     if test "$*" = "X"; then
+	# -L didn't work.
+	set X `ls -t "$srcdir/configure" conftest.file`
+     fi
+     if test "$*" != "X $srcdir/configure conftest.file" \
+	&& test "$*" != "X conftest.file $srcdir/configure"; then
 
-# POSIX will say in a future version that running "rm -f" with no argument
-# is OK; and we want to be able to make that assumption in our Makefile
-# recipes.  So use an aggressive probe to check that the usage we want is
-# actually supported "in the wild" to an acceptable degree.
-# See automake bug#10828.
-# To make any issue more visible, cause the running configure to be aborted
-# by default if the 'rm' program in use doesn't match our expectations; the
-# user can still override this though.
-if rm -f && rm -fr && rm -rf; then : OK; else
-  cat >&2 <<'END'
-Oops!
+	# If neither matched, then we have a broken ls.  This can happen
+	# if, for instance, CONFIG_SHELL is bash and it inherits a
+	# broken ls alias from the environment.  This has actually
+	# happened.  Such a system could not be considered "sane".
+	as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
+  alias in your environment" "$LINENO" 5
+     fi
+     if test "$2" = conftest.file || test $am_try -eq 2; then
+       break
+     fi
+     # Just in case.
+     sleep 1
+     am_has_slept=yes
+   done
+   test "$2" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   as_fn_error $? "newly created file is older than distributed files!
+Check your system clock" "$LINENO" 5
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+  ( sleep 1 ) &
+  am_sleep_pid=$!
+fi
 
-Your 'rm' program seems unable to run without file operands specified
-on the command line, even when the '-f' option is present.  This is contrary
-to the behaviour of most rm programs out there, and not conforming with
-the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
+rm -f conftest.file
 
-Please tell bug-automake@gnu.org about your system, including the value
-of your $PATH and any error possibly output before this message.  This
-can help us improve future automake versions.
+test "$program_prefix" != NONE &&
+  program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"`
 
-END
-  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
-    echo 'Configuration will proceed anyway, since you have set the' >&2
-    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
-    echo >&2
-  else
-    cat >&2 <<'END'
-Aborting the configuration process, to ensure you take notice of the issue.
 
-You can download and install GNU coreutils to get an 'rm' implementation
-that behaves properly: <https://www.gnu.org/software/coreutils/>.
+# Expand $ac_aux_dir to an absolute path.
+am_aux_dir=`cd "$ac_aux_dir" && pwd`
 
-If you want to complete the configuration process using your problematic
-'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
-to "yes", and re-run configure.
 
-END
-    as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
-  fi
+  if test x"${MISSING+set}" != xset; then
+  MISSING="\${SHELL} '$am_aux_dir/missing'"
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --is-lightweight"; then
+  am_missing_run="$MISSING "
+else
+  am_missing_run=
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
+printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
 fi
 
-DEPDIR="${am__leading_dot}deps"
-
-ac_config_commands="$ac_config_commands depfiles"
+if test x"${install_sh+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\	*)
+    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+  *)
+    install_sh="\${SHELL} $am_aux_dir/install-sh"
+  esac
+fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5
-$as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; }
-cat > confinc.mk << 'END'
-am__doit:
-	@echo this is the am__doit target >confinc.out
-.PHONY: am__doit
-END
-am__include="#"
-am__quote=
-# BSD make does it like this.
-echo '.include "confinc.mk" # ignored' > confmf.BSD
-# Other make implementations (GNU, Solaris 10, AIX) do it like this.
-echo 'include confinc.mk # ignored' > confmf.GNU
-_am_result=no
-for s in GNU BSD; do
-  { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5
-   (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5
-   ac_status=$?
-   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-   (exit $ac_status); }
-  case $?:`cat confinc.out 2>/dev/null` in #(
-  '0:this is the am__doit target') :
-    case $s in #(
-  BSD) :
-    am__include='.include' am__quote='"' ;; #(
-  *) :
-    am__include='include' am__quote='' ;;
-esac ;; #(
-  *) :
-     ;;
-esac
-  if test "$am__include" != "#"; then
-    _am_result="yes ($s style)"
-    break
+# Installed binaries are usually stripped using 'strip' when the user
+# run "make install-strip".  However 'strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the 'STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_STRIP+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+    break 2
   fi
 done
-rm -f confinc.* confmf.*
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5
-$as_echo "${_am_result}" >&6; }
+  done
+IFS=$as_save_IFS
 
-# Check whether --enable-dependency-tracking was given.
-if test "${enable_dependency_tracking+set}" = set; then :
-  enableval=$enable_dependency_tracking;
 fi
-
-if test "x$enable_dependency_tracking" != xno; then
-  am_depcomp="$ac_aux_dir/depcomp"
-  AMDEPBACKSLASH='\'
-  am__nodep='_no'
 fi
- if test "x$enable_dependency_tracking" != xno; then
-  AMDEP_TRUE=
-  AMDEP_FALSE='#'
-else
-  AMDEP_TRUE='#'
-  AMDEP_FALSE=
-fi
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_CC="${ac_tool_prefix}gcc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+printf "%s\n" "$STRIP" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
 fi
-if test -z "$ac_cv_prog_CC"; then
-  ac_ct_CC=$CC
-  # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_CC"; then
-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_STRIP+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_CC="gcc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_STRIP="strip"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -4372,194 +4179,107 @@ IFS=$as_save_IFS
 
 fi
 fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+printf "%s\n" "$ac_ct_STRIP" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
-  if test "x$ac_ct_CC" = x; then
-    CC=""
+  if test "x$ac_ct_STRIP" = x; then
+    STRIP=":"
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
-    CC=$ac_ct_CC
+    STRIP=$ac_ct_STRIP
   fi
 else
-  CC="$ac_cv_prog_CC"
+  STRIP="$ac_cv_prog_STRIP"
 fi
 
-if test -z "$CC"; then
-          if test -n "$ac_tool_prefix"; then
-    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}cc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_CC="${ac_tool_prefix}cc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
 fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 
 
-  fi
-fi
-if test -z "$CC"; then
-  # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  ac_prog_rejected=no
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5
+printf %s "checking for a race-free mkdir -p... " >&6; }
+if test -z "$MKDIR_P"; then
+  if test ${ac_cv_path_mkdir+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
-       ac_prog_rejected=yes
-       continue
-     fi
-    ac_cv_prog_CC="cc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_prog in mkdir gmkdir; do
+	 for ac_exec_ext in '' $ac_executable_extensions; do
+	   as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue
+	   case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #(
+	     'mkdir ('*'coreutils) '* | \
+	     'BusyBox '* | \
+	     'mkdir (fileutils) '4.1*)
+	       ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext
+	       break 3;;
+	   esac
+	 done
+       done
   done
 IFS=$as_save_IFS
 
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_CC
-  shift
-  if test $# != 0; then
-    # We chose a different compiler from the bogus one.
-    # However, it has the same basename, so the bogon will be chosen
-    # first if we set CC to just the basename; use the full file name.
-    shift
-    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
-  fi
-fi
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
 fi
 
-
-fi
-if test -z "$CC"; then
-  if test -n "$ac_tool_prefix"; then
-  for ac_prog in cl.exe
-  do
-    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
+  test -d ./--version && rmdir ./--version
+  if test ${ac_cv_path_mkdir+y}; then
+    MKDIR_P="$ac_cv_path_mkdir -p"
+  else
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for MKDIR_P within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    MKDIR_P="$ac_install_sh -d"
   fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
 fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+printf "%s\n" "$MKDIR_P" >&6; }
 
-
-    test -n "$CC" && break
-  done
-fi
-if test -z "$CC"; then
-  ac_ct_CC=$CC
-  for ac_prog in cl.exe
+for ac_prog in gawk mawk nawk awk
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_CC"; then
-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_AWK+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_CC="$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_prog_AWK="$ac_prog"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -4568,1909 +4288,2072 @@ IFS=$as_save_IFS
 
 fi
 fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+printf "%s\n" "$AWK" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
-  test -n "$ac_ct_CC" && break
+  test -n "$AWK" && break
 done
 
-  if test "x$ac_ct_CC" = x; then
-    CC=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval test \${ac_cv_prog_make_${ac_make}_set+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+	@echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+  *@@@%%%=?*=@@@%%%*)
+    eval ac_cv_prog_make_${ac_make}_set=yes;;
+  *)
+    eval ac_cv_prog_make_${ac_make}_set=no;;
 esac
-    CC=$ac_ct_CC
-  fi
+rm -f conftest.make
 fi
-
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+  SET_MAKE=
+else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+  SET_MAKE="MAKE=${MAKE-make}"
 fi
 
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
 
-test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "no acceptable C compiler found in \$PATH
-See \`config.log' for more details" "$LINENO" 5; }
+# Check whether --enable-silent-rules was given.
+if test ${enable_silent_rules+y}
+then :
+  enableval=$enable_silent_rules;
+fi
 
-# Provide some information about the compiler.
-$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
-set X $ac_compile
-ac_compiler=$2
-for ac_option in --version -v -V -qversion; do
-  { { ac_try="$ac_compiler $ac_option >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
+case $enable_silent_rules in # (((
+  yes) AM_DEFAULT_VERBOSITY=0;;
+   no) AM_DEFAULT_VERBOSITY=1;;
+    *) AM_DEFAULT_VERBOSITY=1;;
 esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    sed '10a\
-... rest of stderr output deleted ...
-         10q' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-  fi
-  rm -f conftest.er1 conftest.err
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }
-done
-
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
-# Try to create an executable without -o first, disregard a.out.
-# It will help us diagnose broken compilers, and finding out an intuition
-# of exeext.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
-$as_echo_n "checking whether the C compiler works... " >&6; }
-ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-
-# The possible output files:
-ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
-
-ac_rmfiles=
-for ac_file in $ac_files
-do
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
-    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
-  esac
-done
-rm -f $ac_rmfiles
-
-if { { ac_try="$ac_link_default"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_link_default") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then :
-  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
-# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
-# in a Makefile.  We should not override ac_cv_exeext if it was cached,
-# so that the user can short-circuit this test for compilers unknown to
-# Autoconf.
-for ac_file in $ac_files ''
-do
-  test -f "$ac_file" || continue
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
-	;;
-    [ab].out )
-	# We found the default executable, but exeext='' is most
-	# certainly right.
-	break;;
-    *.* )
-	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
-	then :; else
-	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-	fi
-	# We set ac_cv_exeext here because the later test for it is not
-	# safe: cross compilers may not add the suffix if given an `-o'
-	# argument, so we may need to know it at that point already.
-	# Even if this section looks crufty: it has the advantage of
-	# actually working.
-	break;;
-    * )
-	break;;
-  esac
-done
-test "$ac_cv_exeext" = no && ac_cv_exeext=
-
+am_make=${MAKE-make}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
+printf %s "checking whether $am_make supports nested variables... " >&6; }
+if test ${am_cv_make_support_nested_variables+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if printf "%s\n" 'TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+	@$(TRUE)
+.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
+  am_cv_make_support_nested_variables=yes
 else
-  ac_file=''
+  am_cv_make_support_nested_variables=no
 fi
-if test -z "$ac_file"; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "C compiler cannot create executables
-See \`config.log' for more details" "$LINENO" 5; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
-$as_echo_n "checking for C compiler default output file name... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
-$as_echo "$ac_file" >&6; }
-ac_exeext=$ac_cv_exeext
-
-rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
-ac_clean_files=$ac_clean_files_save
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
-$as_echo_n "checking for suffix of executables... " >&6; }
-if { { ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then :
-  # If both `conftest.exe' and `conftest' are `present' (well, observable)
-# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
-# work properly (i.e., refer to `conftest.exe'), while it won't with
-# `rm'.
-for ac_file in conftest.exe conftest conftest.*; do
-  test -f "$ac_file" || continue
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
-    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-	  break;;
-    * ) break;;
-  esac
-done
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
+printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
+if test $am_cv_make_support_nested_variables = yes; then
+    AM_V='$(V)'
+  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
 else
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details" "$LINENO" 5; }
+  AM_V=$AM_DEFAULT_VERBOSITY
+  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
 fi
-rm -f conftest conftest$ac_cv_exeext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
-$as_echo "$ac_cv_exeext" >&6; }
+AM_BACKSLASH='\'
 
-rm -f conftest.$ac_ext
-EXEEXT=$ac_cv_exeext
-ac_exeext=$EXEEXT
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdio.h>
-int
-main ()
-{
-FILE *f = fopen ("conftest.out", "w");
- return ferror (f) || fclose (f) != 0;
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  am__isrc=' -I$(srcdir)'
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+  fi
+fi
 
-  ;
-  return 0;
-}
-_ACEOF
-ac_clean_files="$ac_clean_files conftest.out"
-# Check that the compiler produces executables we can run.  If not, either
-# the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
-$as_echo_n "checking whether we are cross compiling... " >&6; }
-if test "$cross_compiling" != yes; then
-  { { ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }
-  if { ac_try='./conftest$ac_cv_exeext'
-  { { case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; }; then
-    cross_compiling=no
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
   else
-    if test "$cross_compiling" = maybe; then
-	cross_compiling=yes
-    else
-	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details" "$LINENO" 5; }
-    fi
+    CYGPATH_W=echo
   fi
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
-$as_echo "$cross_compiling" >&6; }
 
-rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
-ac_clean_files=$ac_clean_files_save
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
-$as_echo_n "checking for suffix of object files... " >&6; }
-if ${ac_cv_objext+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-int
-main ()
-{
+# Define the identity of the package.
+ PACKAGE='xorg-server'
+ VERSION='21.1.7'
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.o conftest.obj
-if { { ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_compile") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then :
-  for ac_file in conftest.o conftest.obj conftest.*; do
-  test -f "$ac_file" || continue;
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
-    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
-       break;;
-  esac
-done
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot compute suffix of object files: cannot compile
-See \`config.log' for more details" "$LINENO" 5; }
-fi
-rm -f conftest.$ac_cv_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
-$as_echo "$ac_cv_objext" >&6; }
-OBJEXT=$ac_cv_objext
-ac_objext=$OBJEXT
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
-$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if ${ac_cv_c_compiler_gnu+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
 
-int
-main ()
-{
-#ifndef __GNUC__
-       choke me
-#endif
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_compiler_gnu=yes
-else
-  ac_compiler_gnu=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_c_compiler_gnu=$ac_compiler_gnu
+printf "%s\n" "#define VERSION \"$VERSION\"" >>confdefs.h
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
-$as_echo "$ac_cv_c_compiler_gnu" >&6; }
-if test $ac_compiler_gnu = yes; then
-  GCC=yes
-else
-  GCC=
-fi
-ac_test_CFLAGS=${CFLAGS+set}
-ac_save_CFLAGS=$CFLAGS
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
-$as_echo_n "checking whether $CC accepts -g... " >&6; }
-if ${ac_cv_prog_cc_g+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_save_c_werror_flag=$ac_c_werror_flag
-   ac_c_werror_flag=yes
-   ac_cv_prog_cc_g=no
-   CFLAGS="-g"
-   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+# Some tools Automake needs.
 
-int
-main ()
-{
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_prog_cc_g=yes
-else
-  CFLAGS=""
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-int
-main ()
-{
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
 
-else
-  ac_c_werror_flag=$ac_save_c_werror_flag
-	 CFLAGS="-g"
-	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
 
-int
-main ()
-{
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_prog_cc_g=yes
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+# For better backward compatibility.  To be removed once Automake 1.9.x
+# dies out for good.  For more background, see:
+# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+mkdir_p='$(MKDIR_P)'
+
+# We need awk for the "check" target (and possibly the TAP driver).  The
+# system "awk" is bad on some platforms.
+# Always define AMTAR for backward compatibility.  Yes, it's still used
+# in the wild :-(  We should find a proper way to deprecate it ...
+AMTAR='$${TAR-tar}'
+
+
+# We'll loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar  pax cpio none'
+
+am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
+
+
+
+
+
+# Variables for tags utilities; see am/tags.am
+if test -z "$CTAGS"; then
+  CTAGS=ctags
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test -z "$ETAGS"; then
+  ETAGS=etags
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-   ac_c_werror_flag=$ac_save_c_werror_flag
+
+if test -z "$CSCOPE"; then
+  CSCOPE=cscope
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
-$as_echo "$ac_cv_prog_cc_g" >&6; }
-if test "$ac_test_CFLAGS" = set; then
-  CFLAGS=$ac_save_CFLAGS
-elif test $ac_cv_prog_cc_g = yes; then
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-g"
-  fi
-else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
+
+
+
+# POSIX will say in a future version that running "rm -f" with no argument
+# is OK; and we want to be able to make that assumption in our Makefile
+# recipes.  So use an aggressive probe to check that the usage we want is
+# actually supported "in the wild" to an acceptable degree.
+# See automake bug#10828.
+# To make any issue more visible, cause the running configure to be aborted
+# by default if the 'rm' program in use doesn't match our expectations; the
+# user can still override this though.
+if rm -f && rm -fr && rm -rf; then : OK; else
+  cat >&2 <<'END'
+Oops!
+
+Your 'rm' program seems unable to run without file operands specified
+on the command line, even when the '-f' option is present.  This is contrary
+to the behaviour of most rm programs out there, and not conforming with
+the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
+
+Please tell bug-automake@gnu.org about your system, including the value
+of your $PATH and any error possibly output before this message.  This
+can help us improve future automake versions.
+
+END
+  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
+    echo 'Configuration will proceed anyway, since you have set the' >&2
+    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
+    echo >&2
   else
-    CFLAGS=
+    cat >&2 <<'END'
+Aborting the configuration process, to ensure you take notice of the issue.
+
+You can download and install GNU coreutils to get an 'rm' implementation
+that behaves properly: <https://www.gnu.org/software/coreutils/>.
+
+If you want to complete the configuration process using your problematic
+'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
+to "yes", and re-run configure.
+
+END
+    as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
   fi
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
-$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if ${ac_cv_prog_cc_c89+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_prog_cc_c89=no
-ac_save_CC=$CC
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdarg.h>
-#include <stdio.h>
-struct stat;
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
-     char **p;
-     int i;
-{
-  return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
-  char *s;
-  va_list v;
-  va_start (v,p);
-  s = g (p, va_arg (v,int));
-  va_end (v);
-  return s;
-}
 
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
-   function prototypes and stuff, but not '\xHH' hex character constants.
-   These don't provoke an error unfortunately, instead are silently treated
-   as 'x'.  The following induces an error, until -std is added to get
-   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
-   array size at least.  It's necessary to write '\x00'==0 to get something
-   that's true only with -std.  */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
 
-/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
-   inside strings and character constants.  */
-#define FOO(x) 'x'
-int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
 
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
-  ;
-  return 0;
-}
-_ACEOF
-for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
-	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
-  CC="$ac_save_CC $ac_arg"
-  if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_prog_cc_c89=$ac_arg
-fi
-rm -f core conftest.err conftest.$ac_objext
-  test "x$ac_cv_prog_cc_c89" != "xno" && break
-done
-rm -f conftest.$ac_ext
-CC=$ac_save_CC
 
-fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c89" in
-  x)
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
-  xno)
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
-  *)
-    CC="$CC $ac_cv_prog_cc_c89"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
-$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
-esac
-if test "x$ac_cv_prog_cc_c89" != xno; then :
 
-fi
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
-$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
-if ${am_cv_prog_cc_c_o+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-int
-main ()
-{
 
-  ;
-  return 0;
-}
-_ACEOF
-  # Make sure it works both with $CC and with simple cc.
-  # Following AC_PROG_CC_C_O, we do the test twice because some
-  # compilers refuse to overwrite an existing .o file with -o,
-  # though they will create one.
-  am_cv_prog_cc_c_o=yes
-  for am_i in 1 2; do
-    if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
-   ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
+
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5
+printf %s "checking whether ${MAKE-make} supports the include directive... " >&6; }
+cat > confinc.mk << 'END'
+am__doit:
+	@echo this is the am__doit target >confinc.out
+.PHONY: am__doit
+END
+am__include="#"
+am__quote=
+# BSD make does it like this.
+echo '.include "confinc.mk" # ignored' > confmf.BSD
+# Other make implementations (GNU, Solaris 10, AIX) do it like this.
+echo 'include confinc.mk # ignored' > confmf.GNU
+_am_result=no
+for s in GNU BSD; do
+  { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5
+   (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5
    ac_status=$?
    echo "$as_me:$LINENO: \$? = $ac_status" >&5
-   (exit $ac_status); } \
-         && test -f conftest2.$ac_objext; then
-      : OK
-    else
-      am_cv_prog_cc_c_o=no
-      break
-    fi
-  done
-  rm -f core conftest*
-  unset am_i
+   (exit $ac_status); }
+  case $?:`cat confinc.out 2>/dev/null` in #(
+  '0:this is the am__doit target') :
+    case $s in #(
+  BSD) :
+    am__include='.include' am__quote='"' ;; #(
+  *) :
+    am__include='include' am__quote='' ;;
+esac ;; #(
+  *) :
+     ;;
+esac
+  if test "$am__include" != "#"; then
+    _am_result="yes ($s style)"
+    break
+  fi
+done
+rm -f confinc.* confmf.*
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5
+printf "%s\n" "${_am_result}" >&6; }
+
+# Check whether --enable-dependency-tracking was given.
+if test ${enable_dependency_tracking+y}
+then :
+  enableval=$enable_dependency_tracking;
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
-$as_echo "$am_cv_prog_cc_c_o" >&6; }
-if test "$am_cv_prog_cc_c_o" != yes; then
-   # Losing compiler, so override with the script.
-   # FIXME: It is wrong to rewrite CC.
-   # But if we don't then we get into trouble of one sort or another.
-   # A longer-term fix would be to have automake use am__CC in this case,
-   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
-   CC="$am_aux_dir/compile $CC"
+
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+  am__nodep='_no'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+  AMDEP_TRUE=
+  AMDEP_FALSE='#'
+else
+  AMDEP_TRUE='#'
+  AMDEP_FALSE=
 fi
+
+
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-depcc="$CC"   am_compiler_list=
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
-$as_echo_n "checking dependency style of $depcc... " >&6; }
-if ${am_cv_CC_dependencies_compiler_type+:} false; then :
-  $as_echo_n "(cached) " >&6
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
 else
-  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
-  # We make a subdir and do the tests there.  Otherwise we can end up
-  # making bogus files that we don't know about and never remove.  For
-  # instance it was reported that on HP-UX the gcc test will end up
-  # making a dummy file named 'D' -- because '-MD' means "put the output
-  # in D".
-  rm -rf conftest.dir
-  mkdir conftest.dir
-  # Copy depcomp to subdir because otherwise we won't find it if we're
-  # using a relative directory.
-  cp "$am_depcomp" conftest.dir
-  cd conftest.dir
-  # We will build objects and dependencies in a subdirectory because
-  # it helps to detect inapplicable dependency modes.  For instance
-  # both Tru64's cc and ICC support -MD to output dependencies as a
-  # side effect of compilation, but ICC will put the dependencies in
-  # the current directory while Tru64 will put them in the object
-  # directory.
-  mkdir sub
-
-  am_cv_CC_dependencies_compiler_type=none
-  if test "$am_compiler_list" = ""; then
-     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}gcc"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+    break 2
   fi
-  am__universal=false
-  case " $depcc " in #(
-     *\ -arch\ *\ -arch\ *) am__universal=true ;;
-     esac
-
-  for depmode in $am_compiler_list; do
-    # Setup a source with many dependencies, because some compilers
-    # like to wrap large dependency lists on column 80 (with \), and
-    # we should not choose a depcomp mode which is confused by this.
-    #
-    # We need to recreate these files for each test, as the compiler may
-    # overwrite some of them when testing with obscure command lines.
-    # This happens at least with the AIX C compiler.
-    : > sub/conftest.c
-    for i in 1 2 3 4 5 6; do
-      echo '#include "conftst'$i'.h"' >> sub/conftest.c
-      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
-      # Solaris 10 /bin/sh.
-      echo '/* dummy */' > sub/conftst$i.h
-    done
-    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
-
-    # We check with '-c' and '-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle '-M -o', and we need to detect this.  Also, some Intel
-    # versions had trouble with output in subdirs.
-    am__obj=sub/conftest.${OBJEXT-o}
-    am__minus_obj="-o $am__obj"
-    case $depmode in
-    gcc)
-      # This depmode causes a compiler race in universal mode.
-      test "$am__universal" = false || continue
-      ;;
-    nosideeffect)
-      # After this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested.
-      if test "x$enable_dependency_tracking" = xyes; then
-	continue
-      else
-	break
-      fi
-      ;;
-    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
-      # This compiler won't grok '-c -o', but also, the minuso test has
-      # not run yet.  These depmodes are late enough in the game, and
-      # so weak that their functioning should not be impacted.
-      am__obj=conftest.${OBJEXT-o}
-      am__minus_obj=
-      ;;
-    none) break ;;
-    esac
-    if depmode=$depmode \
-       source=sub/conftest.c object=$am__obj \
-       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
-         >/dev/null 2>conftest.err &&
-       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
-       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
-      # icc doesn't choke on unknown options, it will just issue warnings
-      # or remarks (even with -Werror).  So we grep stderr for any message
-      # that says an option was ignored or not supported.
-      # When given -MP, icc 7.0 and 7.1 complain thusly:
-      #   icc: Command line warning: ignoring option '-M'; no argument required
-      # The diagnosis changed in icc 8.0:
-      #   icc: Command line remark: option '-MP' not supported
-      if (grep 'ignoring option' conftest.err ||
-          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
-        am_cv_CC_dependencies_compiler_type=$depmode
-        break
-      fi
-    fi
+done
   done
+IFS=$as_save_IFS
 
-  cd ..
-  rm -rf conftest.dir
-else
-  am_cv_CC_dependencies_compiler_type=none
 fi
-
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
-$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
-CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
-
- if
-  test "x$enable_dependency_tracking" != xno \
-  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
-  am__fastdepCC_TRUE=
-  am__fastdepCC_FALSE='#'
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
 else
-  am__fastdepCC_TRUE='#'
-  am__fastdepCC_FALSE=
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
-$as_echo_n "checking how to run the C preprocessor... " >&6; }
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
-  CPP=
 fi
-if test -z "$CPP"; then
-  if ${ac_cv_prog_CPP+:} false; then :
-  $as_echo_n "(cached) " >&6
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CC+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
 else
-      # Double quotes because CPP needs to be expanded
-    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
-    do
-      ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
 do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-		     Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+  IFS=$as_save_IFS
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="gcc"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
 else
-  # Broken: fails on valid input.
-continue
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
-rm -f conftest.err conftest.i conftest.$ac_ext
 
-  # OK, works on sane cases.  Now check whether nonexistent headers
-  # can be detected and how.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-  # Broken: success on invalid input.
-continue
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
 else
-  # Passes both tests.
-ac_preproc_ok=:
-break
+  CC="$ac_cv_prog_CC"
 fi
-rm -f conftest.err conftest.i conftest.$ac_ext
 
+if test -z "$CC"; then
+          if test -n "$ac_tool_prefix"; then
+    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}cc"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
 done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
-  break
-fi
-
-    done
-    ac_cv_prog_CPP=$CPP
+  done
+IFS=$as_save_IFS
 
 fi
-  CPP=$ac_cv_prog_CPP
-else
-  ac_cv_prog_CPP=$CPP
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
-$as_echo "$CPP" >&6; }
-ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-		     Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
 else
-  # Broken: fails on valid input.
-continue
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
-rm -f conftest.err conftest.i conftest.$ac_ext
 
-  # OK, works on sane cases.  Now check whether nonexistent headers
-  # can be detected and how.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-  # Broken: success on invalid input.
-continue
-else
-  # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
 
-else
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details" "$LINENO" 5; }
+  fi
 fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
-$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-if ${ac_cv_path_GREP+:} false; then :
-  $as_echo_n "(cached) " >&6
+if test -z "$CC"; then
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
 else
-  if test -z "$GREP"; then
-  ac_path_GREP_found=false
-  # Loop through the user's path and test for each of PROGNAME-LIST
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+  ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_prog in grep ggrep; do
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
-      as_fn_executable_p "$ac_path_GREP" || continue
-# Check for GNU ac_path_GREP and select it if it is found.
-  # Check for GNU $ac_path_GREP
-case `"$ac_path_GREP" --version 2>&1` in
-*GNU*)
-  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
-*)
-  ac_count=0
-  $as_echo_n 0123456789 >"conftest.in"
-  while :
-  do
-    cat "conftest.in" "conftest.in" >"conftest.tmp"
-    mv "conftest.tmp" "conftest.in"
-    cp "conftest.in" "conftest.nl"
-    $as_echo 'GREP' >> "conftest.nl"
-    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
-    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    as_fn_arith $ac_count + 1 && ac_count=$as_val
-    if test $ac_count -gt ${ac_path_GREP_max-0}; then
-      # Best one so far, save it but keep looking for a better one
-      ac_cv_path_GREP="$ac_path_GREP"
-      ac_path_GREP_max=$ac_count
-    fi
-    # 10*(2^10) chars as input seems more than enough
-    test $ac_count -gt 10 && break
-  done
-  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
-      $ac_path_GREP_found && break 3
-    done
-  done
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+       ac_prog_rejected=yes
+       continue
+     fi
+    ac_cv_prog_CC="cc"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
   done
 IFS=$as_save_IFS
-  if test -z "$ac_cv_path_GREP"; then
-    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# != 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set CC to just the basename; use the full file name.
+    shift
+    ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
   fi
-else
-  ac_cv_path_GREP=$GREP
 fi
-
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
-$as_echo "$ac_cv_path_GREP" >&6; }
- GREP="$ac_cv_path_GREP"
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
+else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
-$as_echo_n "checking for egrep... " >&6; }
-if ${ac_cv_path_EGREP+:} false; then :
-  $as_echo_n "(cached) " >&6
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl.exe
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
 else
-  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
-   then ac_cv_path_EGREP="$GREP -E"
-   else
-     if test -z "$EGREP"; then
-  ac_path_EGREP_found=false
-  # Loop through the user's path and test for each of PROGNAME-LIST
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_prog in egrep; do
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
-      as_fn_executable_p "$ac_path_EGREP" || continue
-# Check for GNU ac_path_EGREP and select it if it is found.
-  # Check for GNU $ac_path_EGREP
-case `"$ac_path_EGREP" --version 2>&1` in
-*GNU*)
-  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
-*)
-  ac_count=0
-  $as_echo_n 0123456789 >"conftest.in"
-  while :
-  do
-    cat "conftest.in" "conftest.in" >"conftest.tmp"
-    mv "conftest.tmp" "conftest.in"
-    cp "conftest.in" "conftest.nl"
-    $as_echo 'EGREP' >> "conftest.nl"
-    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
-    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    as_fn_arith $ac_count + 1 && ac_count=$as_val
-    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
-      # Best one so far, save it but keep looking for a better one
-      ac_cv_path_EGREP="$ac_path_EGREP"
-      ac_path_EGREP_max=$ac_count
-    fi
-    # 10*(2^10) chars as input seems more than enough
-    test $ac_count -gt 10 && break
-  done
-  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
-      $ac_path_EGREP_found && break 3
-    done
-  done
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
   done
 IFS=$as_save_IFS
-  if test -z "$ac_cv_path_EGREP"; then
-    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
-  fi
-else
-  ac_cv_path_EGREP=$EGREP
-fi
 
-   fi
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
-$as_echo "$ac_cv_path_EGREP" >&6; }
- EGREP="$ac_cv_path_EGREP"
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
+else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
-if ${ac_cv_header_stdc+:} false; then :
-  $as_echo_n "(cached) " >&6
+    test -n "$CC" && break
+  done
+fi
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in cl.exe
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CC+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="$ac_prog"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_header_stdc=yes
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
 else
-  ac_cv_header_stdc=no
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
-if test $ac_cv_header_stdc = yes; then
-  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <string.h>
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "memchr" >/dev/null 2>&1; then :
+  test -n "$ac_ct_CC" && break
+done
 
-else
-  ac_cv_header_stdc=no
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
 fi
-rm -f conftest*
 
 fi
-
-if test $ac_cv_header_stdc = yes; then
-  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "free" >/dev/null 2>&1; then :
-
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
+set dummy ${ac_tool_prefix}clang; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
 else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}clang"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
 fi
-
-if test $ac_cv_header_stdc = yes; then
-  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-  if test "$cross_compiling" = yes; then :
-  :
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <ctype.h>
-#include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
-		   (('a' <= (c) && (c) <= 'i') \
-		     || ('j' <= (c) && (c) <= 'r') \
-		     || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
 
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
-  int i;
-  for (i = 0; i < 256; i++)
-    if (XOR (islower (i), ISLOWER (i))
-	|| toupper (i) != TOUPPER (i))
-      return 2;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
 
-else
-  ac_cv_header_stdc=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "clang", so it can be a program name with args.
+set dummy clang; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CC+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="clang"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
 fi
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
+else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
 
-$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+else
+  CC="$ac_cv_prog_CC"
+fi
 
 fi
 
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
-		  inttypes.h stdint.h unistd.h
-do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
 
-fi
+test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
 
+# Provide some information about the compiler.
+printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion -version; do
+  { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    sed '10a\
+... rest of stderr output deleted ...
+         10q' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+  fi
+  rm -f conftest.er1 conftest.err
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
 done
 
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+int
+main (void)
+{
 
-  ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
-if test "x$ac_cv_header_minix_config_h" = xyes; then :
-  MINIX=yes
-else
-  MINIX=
-fi
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+printf %s "checking whether the C compiler works... " >&6; }
+ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
 
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
 
-  if test "$MINIX" = yes; then
+ac_rmfiles=
+for ac_file in $ac_files
+do
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+  esac
+done
+rm -f $ac_rmfiles
 
-$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
+if { { ac_try="$ac_link_default"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+  (eval "$ac_link_default") 2>&5
+  ac_status=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+then :
+  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile.  We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
+do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
+	;;
+    [ab].out )
+	# We found the default executable, but exeext='' is most
+	# certainly right.
+	break;;
+    *.* )
+	if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
+	then :; else
+	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	fi
+	# We set ac_cv_exeext here because the later test for it is not
+	# safe: cross compilers may not add the suffix if given an `-o'
+	# argument, so we may need to know it at that point already.
+	# Even if this section looks crufty: it has the advantage of
+	# actually working.
+	break;;
+    * )
+	break;;
+  esac
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
 
+else $as_nop
+  ac_file=''
+fi
+if test -z "$ac_file"
+then :
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
+{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "C compiler cannot create executables
+See \`config.log' for more details" "$LINENO" 5; }
+else $as_nop
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+printf %s "checking for C compiler default output file name... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+printf "%s\n" "$ac_file" >&6; }
+ac_exeext=$ac_cv_exeext
 
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+printf %s "checking for suffix of executables... " >&6; }
+if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+then :
+  # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	  break;;
+    * ) break;;
+  esac
+done
+else $as_nop
+  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest conftest$ac_cv_exeext
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+printf "%s\n" "$ac_cv_exeext" >&6; }
 
-$as_echo "#define _MINIX 1" >>confdefs.h
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdio.h>
+int
+main (void)
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
 
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files="$ac_clean_files conftest.out"
+# Check that the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+printf %s "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+  { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+  if { ac_try='./conftest$ac_cv_exeext'
+  { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then
+    cross_compiling=no
+  else
+    if test "$cross_compiling" = maybe; then
+	cross_compiling=yes
+    else
+	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details" "$LINENO" 5; }
+    fi
   fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+printf "%s\n" "$cross_compiling" >&6; }
 
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
-$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
-if ${ac_cv_safe_to_define___extensions__+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+ac_clean_files=$ac_clean_files_save
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+printf %s "checking for suffix of object files... " >&6; }
+if test ${ac_cv_objext+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-#         define __EXTENSIONS__ 1
-          $ac_includes_default
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_safe_to_define___extensions__=yes
-else
-  ac_cv_safe_to_define___extensions__=no
+rm -f conftest.o conftest.obj
+if { { ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+  (eval "$ac_compile") 2>&5
+  ac_status=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+then :
+  for ac_file in conftest.o conftest.obj conftest.*; do
+  test -f "$ac_file" || continue;
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
+    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+       break;;
+  esac
+done
+else $as_nop
+  printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5; }
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
-$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
-  test $ac_cv_safe_to_define___extensions__ = yes &&
-    $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
-
-  $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
-
-  $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
-
-  $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
-
-  $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
-
-
-
-# Require xorg-macros minimum of 1.14 for XORG_COMPILER_BRAND in XORG_DEFAULT_OPTIONS
-
-
-
-
-
-
-
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+printf "%s\n" "$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
+printf %s "checking whether the compiler supports GNU C... " >&6; }
+if test ${ac_cv_c_compiler_gnu+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+int
+main (void)
+{
+#ifndef __GNUC__
+       choke me
+#endif
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  ac_compiler_gnu=yes
+else $as_nop
+  ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
 
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
-$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
-if ${ac_cv_prog_cc_c99+:} false; then :
-  $as_echo_n "(cached) " >&6
+if test $ac_compiler_gnu = yes; then
+  GCC=yes
 else
-  ac_cv_prog_cc_c99=no
-ac_save_CC=$CC
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+y}
+ac_save_CFLAGS=$CFLAGS
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+printf %s "checking whether $CC accepts -g... " >&6; }
+if test ${ac_cv_prog_cc_g+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_save_c_werror_flag=$ac_c_werror_flag
+   ac_c_werror_flag=yes
+   ac_cv_prog_cc_g=no
+   CFLAGS="-g"
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <stdarg.h>
-#include <stdbool.h>
-#include <stdlib.h>
-#include <wchar.h>
-#include <stdio.h>
-
-// Check varargs macros.  These examples are taken from C99 6.10.3.5.
-#define debug(...) fprintf (stderr, __VA_ARGS__)
-#define showlist(...) puts (#__VA_ARGS__)
-#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
-static void
-test_varargs_macros (void)
-{
-  int x = 1234;
-  int y = 5678;
-  debug ("Flag");
-  debug ("X = %d\n", x);
-  showlist (The first, second, and third items.);
-  report (x>y, "x is %d but y is %d", x, y);
-}
-
-// Check long long types.
-#define BIG64 18446744073709551615ull
-#define BIG32 4294967295ul
-#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
-#if !BIG_OK
-  your preprocessor is broken;
-#endif
-#if BIG_OK
-#else
-  your preprocessor is broken;
-#endif
-static long long int bignum = -9223372036854775807LL;
-static unsigned long long int ubignum = BIG64;
 
-struct incomplete_array
+int
+main (void)
 {
-  int datasize;
-  double data[];
-};
-
-struct named_init {
-  int number;
-  const wchar_t *name;
-  double average;
-};
-
-typedef const char *ccp;
 
-static inline int
-test_restrict (ccp restrict text)
-{
-  // See if C++-style comments work.
-  // Iterate through items via the restricted pointer.
-  // Also check for declarations in for loops.
-  for (unsigned int i = 0; *(text+i) != '\0'; ++i)
-    continue;
+  ;
   return 0;
 }
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  ac_cv_prog_cc_g=yes
+else $as_nop
+  CFLAGS=""
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-// Check varargs and va_copy.
-static void
-test_varargs (const char *format, ...)
+int
+main (void)
 {
-  va_list args;
-  va_start (args, format);
-  va_list args_copy;
-  va_copy (args_copy, args);
-
-  const char *str;
-  int number;
-  float fnumber;
 
-  while (*format)
-    {
-      switch (*format++)
-	{
-	case 's': // string
-	  str = va_arg (args_copy, const char *);
-	  break;
-	case 'd': // int
-	  number = va_arg (args_copy, int);
-	  break;
-	case 'f': // float
-	  fnumber = va_arg (args_copy, double);
-	  break;
-	default:
-	  break;
-	}
-    }
-  va_end (args_copy);
-  va_end (args);
+  ;
+  return 0;
 }
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+
+else $as_nop
+  ac_c_werror_flag=$ac_save_c_werror_flag
+	 CFLAGS="-g"
+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
 int
-main ()
+main (void)
 {
 
-  // Check bool.
-  _Bool success = false;
-
-  // Check restrict.
-  if (test_restrict ("String literal") == 0)
-    success = true;
-  char *restrict newvar = "Another string";
-
-  // Check varargs.
-  test_varargs ("s, d' f .", "string", 65, 34.234);
-  test_varargs_macros ();
-
-  // Check flexible array members.
-  struct incomplete_array *ia =
-    malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
-  ia->datasize = 10;
-  for (int i = 0; i < ia->datasize; ++i)
-    ia->data[i] = i * 1.234;
-
-  // Check named initializers.
-  struct named_init ni = {
-    .number = 34,
-    .name = L"Test wide string",
-    .average = 543.34343,
-  };
-
-  ni.number = 58;
-
-  int dynamic_array[ni.number];
-  dynamic_array[ni.number - 1] = 543;
-
-  // work around unused variable warnings
-  return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
-	  || dynamic_array[ni.number - 1] != 543);
-
   ;
   return 0;
 }
 _ACEOF
-for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
+if ac_fn_c_try_compile "$LINENO"
+then :
+  ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+   ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
+if test $ac_test_CFLAGS; then
+  CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    CFLAGS=
+  fi
+fi
+ac_prog_cc_stdc=no
+if test x$ac_prog_cc_stdc = xno
+then :
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
+printf %s "checking for $CC option to enable C11 features... " >&6; }
+if test ${ac_cv_prog_cc_c11+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_cv_prog_cc_c11=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_c_conftest_c11_program
+_ACEOF
+for ac_arg in '' -std=gnu11
+do
+  CC="$ac_save_CC $ac_arg"
+  if ac_fn_c_try_compile "$LINENO"
+then :
+  ac_cv_prog_cc_c11=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+  test "x$ac_cv_prog_cc_c11" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+fi
+
+if test "x$ac_cv_prog_cc_c11" = xno
+then :
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+  if test "x$ac_cv_prog_cc_c11" = x
+then :
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
+printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
+     CC="$CC $ac_cv_prog_cc_c11"
+fi
+  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
+  ac_prog_cc_stdc=c11
+fi
+fi
+if test x$ac_prog_cc_stdc = xno
+then :
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
+printf %s "checking for $CC option to enable C99 features... " >&6; }
+if test ${ac_cv_prog_cc_c99+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_cv_prog_cc_c99=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_c_conftest_c99_program
+_ACEOF
+for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
 do
   CC="$ac_save_CC $ac_arg"
-  if ac_fn_c_try_compile "$LINENO"; then :
+  if ac_fn_c_try_compile "$LINENO"
+then :
   ac_cv_prog_cc_c99=$ac_arg
 fi
-rm -f core conftest.err conftest.$ac_objext
+rm -f core conftest.err conftest.$ac_objext conftest.beam
   test "x$ac_cv_prog_cc_c99" != "xno" && break
 done
 rm -f conftest.$ac_ext
 CC=$ac_save_CC
-
 fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c99" in
-  x)
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
-  xno)
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
-  *)
-    CC="$CC $ac_cv_prog_cc_c99"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
-$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
-esac
-if test "x$ac_cv_prog_cc_c99" != xno; then :
 
+if test "x$ac_cv_prog_cc_c99" = xno
+then :
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+  if test "x$ac_cv_prog_cc_c99" = x
+then :
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
+printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
+     CC="$CC $ac_cv_prog_cc_c99"
+fi
+  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
+  ac_prog_cc_stdc=c99
+fi
+fi
+if test x$ac_prog_cc_stdc = xno
+then :
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
+printf %s "checking for $CC option to enable C89 features... " >&6; }
+if test ${ac_cv_prog_cc_c89+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_c_conftest_c89_program
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+  CC="$ac_save_CC $ac_arg"
+  if ac_fn_c_try_compile "$LINENO"
+then :
+  ac_cv_prog_cc_c89=$ac_arg
 fi
-
-
-
-
-
-
-ac_fn_c_check_decl "$LINENO" "__clang__" "ac_cv_have_decl___clang__" "$ac_includes_default"
-if test "x$ac_cv_have_decl___clang__" = xyes; then :
-  CLANGCC="yes"
-else
-  CLANGCC="no"
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+  test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
 fi
 
-ac_fn_c_check_decl "$LINENO" "__INTEL_COMPILER" "ac_cv_have_decl___INTEL_COMPILER" "$ac_includes_default"
-if test "x$ac_cv_have_decl___INTEL_COMPILER" = xyes; then :
-  INTELCC="yes"
-else
-  INTELCC="no"
+if test "x$ac_cv_prog_cc_c89" = xno
+then :
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+  if test "x$ac_cv_prog_cc_c89" = x
+then :
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
+     CC="$CC $ac_cv_prog_cc_c89"
+fi
+  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
+  ac_prog_cc_stdc=c89
 fi
-
-ac_fn_c_check_decl "$LINENO" "__SUNPRO_C" "ac_cv_have_decl___SUNPRO_C" "$ac_includes_default"
-if test "x$ac_cv_have_decl___SUNPRO_C" = xyes; then :
-  SUNCC="yes"
-else
-  SUNCC="no"
 fi
 
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
+  ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
+printf %s "checking whether $CC understands -c and -o together... " >&6; }
+if test ${am_cv_prog_cc_c_o+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+int
+main (void)
+{
 
-
-
-
-
-if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
-	if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
-set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_PKG_CONFIG+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $PKG_CONFIG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
+  ;
+  return 0;
+}
+_ACEOF
+  # Make sure it works both with $CC and with simple cc.
+  # Following AC_PROG_CC_C_O, we do the test twice because some
+  # compilers refuse to overwrite an existing .o file with -o,
+  # though they will create one.
+  am_cv_prog_cc_c_o=yes
+  for am_i in 1 2; do
+    if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
+   ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); } \
+         && test -f conftest2.$ac_objext; then
+      : OK
+    else
+      am_cv_prog_cc_c_o=no
+      break
+    fi
   done
-IFS=$as_save_IFS
-
-  ;;
-esac
+  rm -f core conftest*
+  unset am_i
 fi
-PKG_CONFIG=$ac_cv_path_PKG_CONFIG
-if test -n "$PKG_CONFIG"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
-$as_echo "$PKG_CONFIG" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
+printf "%s\n" "$am_cv_prog_cc_c_o" >&6; }
+if test "$am_cv_prog_cc_c_o" != yes; then
+   # Losing compiler, so override with the script.
+   # FIXME: It is wrong to rewrite CC.
+   # But if we don't then we get into trouble of one sort or another.
+   # A longer-term fix would be to have automake use am__CC in this case,
+   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+   CC="$am_aux_dir/compile $CC"
 fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
-fi
-if test -z "$ac_cv_path_PKG_CONFIG"; then
-  ac_pt_PKG_CONFIG=$PKG_CONFIG
-  # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $ac_pt_PKG_CONFIG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
+depcc="$CC"   am_compiler_list=
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+printf %s "checking dependency style of $depcc... " >&6; }
+if test ${am_cv_CC_dependencies_compiler_type+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named 'D' -- because '-MD' means "put the output
+  # in D".
+  rm -rf conftest.dir
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CC_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
   fi
-done
+  am__universal=false
+  case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac
+
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+      # Solaris 10 /bin/sh.
+      echo '/* dummy */' > sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    # We check with '-c' and '-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle '-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs.
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
+    case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
+    nosideeffect)
+      # After this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested.
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+      # This compiler won't grok '-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
+    none) break ;;
+    esac
+    if depmode=$depmode \
+       source=sub/conftest.c object=$am__obj \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CC_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
   done
-IFS=$as_save_IFS
 
-  ;;
-esac
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CC_dependencies_compiler_type=none
 fi
-ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
-if test -n "$ac_pt_PKG_CONFIG"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
-$as_echo "$ac_pt_PKG_CONFIG" >&6; }
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+  am__fastdepCC_TRUE=
+  am__fastdepCC_FALSE='#'
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  am__fastdepCC_TRUE='#'
+  am__fastdepCC_FALSE=
 fi
 
-  if test "x$ac_pt_PKG_CONFIG" = x; then
-    PKG_CONFIG=""
+
+
+ac_header= ac_cache=
+for ac_item in $ac_header_c_list
+do
+  if test $ac_cache; then
+    ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
+    if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
+      printf "%s\n" "#define $ac_item 1" >> confdefs.h
+    fi
+    ac_header= ac_cache=
+  elif test $ac_header; then
+    ac_cache=$ac_item
   else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    PKG_CONFIG=$ac_pt_PKG_CONFIG
+    ac_header=$ac_item
   fi
-else
-  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
-fi
+done
 
-fi
-if test -n "$PKG_CONFIG"; then
-	_pkg_min_version=0.9.0
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
-$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
-	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-	else
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-		PKG_CONFIG=""
-	fi
-fi
-# Make sure we can run config.sub.
-$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
-  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
-$as_echo_n "checking build system type... " >&6; }
-if ${ac_cv_build+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_build_alias=$build_alias
-test "x$ac_build_alias" = x &&
-  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
-test "x$ac_build_alias" = x &&
-  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
-ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
-  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
-$as_echo "$ac_cv_build" >&6; }
-case $ac_cv_build in
-*-*-*) ;;
-*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
-esac
-build=$ac_cv_build
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_build
-shift
-build_cpu=$1
-build_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-build_os=$*
-IFS=$ac_save_IFS
-case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
-$as_echo_n "checking host system type... " >&6; }
-if ${ac_cv_host+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test "x$host_alias" = x; then
-  ac_cv_host=$ac_cv_build
-else
-  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
-    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
-fi
+
+
+
+if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
+then :
+
+printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
-$as_echo "$ac_cv_host" >&6; }
-case $ac_cv_host in
-*-*-*) ;;
-*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
-esac
-host=$ac_cv_host
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_host
-shift
-host_cpu=$1
-host_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-host_os=$*
-IFS=$ac_save_IFS
-case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
-$as_echo_n "checking for a sed that does not truncate output... " >&6; }
-if ${ac_cv_path_SED+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
-     for ac_i in 1 2 3 4 5 6 7; do
-       ac_script="$ac_script$as_nl$ac_script"
-     done
-     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
-     { ac_script=; unset ac_script;}
-     if test -z "$SED"; then
-  ac_path_SED_found=false
-  # Loop through the user's path and test for each of PROGNAME-LIST
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_prog in sed gsed; do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
-      as_fn_executable_p "$ac_path_SED" || continue
-# Check for GNU ac_path_SED and select it if it is found.
-  # Check for GNU $ac_path_SED
-case `"$ac_path_SED" --version 2>&1` in
-*GNU*)
-  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
-*)
-  ac_count=0
-  $as_echo_n 0123456789 >"conftest.in"
-  while :
-  do
-    cat "conftest.in" "conftest.in" >"conftest.tmp"
-    mv "conftest.tmp" "conftest.in"
-    cp "conftest.in" "conftest.nl"
-    $as_echo '' >> "conftest.nl"
-    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
-    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    as_fn_arith $ac_count + 1 && ac_count=$as_val
-    if test $ac_count -gt ${ac_path_SED_max-0}; then
-      # Best one so far, save it but keep looking for a better one
-      ac_cv_path_SED="$ac_path_SED"
-      ac_path_SED_max=$ac_count
-    fi
-    # 10*(2^10) chars as input seems more than enough
-    test $ac_count -gt 10 && break
-  done
-  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
-      $ac_path_SED_found && break 3
-    done
-  done
-  done
-IFS=$as_save_IFS
-  if test -z "$ac_cv_path_SED"; then
-    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
-  fi
-else
-  ac_cv_path_SED=$SED
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
-$as_echo "$ac_cv_path_SED" >&6; }
- SED="$ac_cv_path_SED"
-  rm -f conftest.sed
-
-
-
-
-
-
-# Check whether --enable-selective-werror was given.
-if test "${enable_selective_werror+set}" = set; then :
-  enableval=$enable_selective_werror; SELECTIVE_WERROR=$enableval
-else
-  SELECTIVE_WERROR=yes
-fi
-
-
-
-
-
-# -v is too short to test reliably with XORG_TESTSET_CFLAG
-if test "x$SUNCC" = "xyes"; then
-    BASE_CFLAGS="-v"
-else
-    BASE_CFLAGS=""
-fi
-
-# This chunk of warnings were those that existed in the legacy CWARNFLAGS
-
-
-
-
-
 
 
 
 
 
 
-
-
-xorg_testset_save_CFLAGS="$CFLAGS"
-
-if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
-	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
-$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
-if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
+printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; }
+if test ${ac_cv_safe_to_define___extensions__+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-int i;
+
+#         define __EXTENSIONS__ 1
+          $ac_includes_default
+int
+main (void)
+{
+
+  ;
+  return 0;
+}
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  xorg_cv_cc_flag_unknown_warning_option=yes
-else
-  xorg_cv_cc_flag_unknown_warning_option=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+if ac_fn_c_try_compile "$LINENO"
+then :
+  ac_cv_safe_to_define___extensions__=yes
+else $as_nop
+  ac_cv_safe_to_define___extensions__=no
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
-$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
-	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
-	CFLAGS="$xorg_testset_save_CFLAGS"
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
+printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; }
 
-if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
-	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
-		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
-	fi
-	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
-$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
-if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
+printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; }
+if test ${ac_cv_should_define__xopen_source+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_cv_should_define__xopen_source=no
+    if test $ac_cv_header_wchar_h = yes
+then :
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-int i;
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  xorg_cv_cc_flag_unused_command_line_argument=yes
-else
-  xorg_cv_cc_flag_unused_command_line_argument=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
-$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
-	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
-	CFLAGS="$xorg_testset_save_CFLAGS"
-fi
-
-found="no"
-
-	if test $found = "no" ; then
-		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
-			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
-		fi
 
-		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
-			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
-		fi
+          #include <wchar.h>
+          mbstate_t x;
+int
+main (void)
+{
 
-		CFLAGS="$CFLAGS -Wall"
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wall" >&5
-$as_echo_n "checking if $CC supports -Wall... " >&6; }
-		cacheid=xorg_cv_cc_flag__Wall
-		if eval \${$cacheid+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-int i;
+
+            #define _XOPEN_SOURCE 500
+            #include <wchar.h>
+            mbstate_t x;
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  eval $cacheid=yes
-else
-  eval $cacheid=no
+if ac_fn_c_try_compile "$LINENO"
+then :
+  ac_cv_should_define__xopen_source=yes
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
+printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; }
 
+  printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h
 
-		CFLAGS="$xorg_testset_save_CFLAGS"
+  printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h
 
-		eval supported=\$$cacheid
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
-$as_echo "$supported" >&6; }
-		if test "$supported" = "yes" ; then
-			BASE_CFLAGS="$BASE_CFLAGS -Wall"
-			found="yes"
-		fi
-	fi
+  printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h
 
+  printf "%s\n" "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h
 
+  printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
 
+  printf "%s\n" "#define _OPENBSD_SOURCE 1" >>confdefs.h
 
+  printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
 
+  printf "%s\n" "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
 
+  printf "%s\n" "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
 
+  printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
 
+  printf "%s\n" "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
 
+  printf "%s\n" "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
 
+  printf "%s\n" "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
 
+  printf "%s\n" "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
 
+  printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h
 
+  if test $ac_cv_header_minix_config_h = yes
+then :
+  MINIX=yes
+    printf "%s\n" "#define _MINIX 1" >>confdefs.h
 
+    printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h
 
-xorg_testset_save_CFLAGS="$CFLAGS"
+    printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h
 
-if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
-	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
-$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
-if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-int i;
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  xorg_cv_cc_flag_unknown_warning_option=yes
-else
-  xorg_cv_cc_flag_unknown_warning_option=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
-$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
-	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
-	CFLAGS="$xorg_testset_save_CFLAGS"
+else $as_nop
+  MINIX=
 fi
+  if test $ac_cv_safe_to_define___extensions__ = yes
+then :
+  printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h
 
-if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
-	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
-		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
-	fi
-	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
-$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
-if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-int i;
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  xorg_cv_cc_flag_unused_command_line_argument=yes
-else
-  xorg_cv_cc_flag_unused_command_line_argument=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
-$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
-	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
-	CFLAGS="$xorg_testset_save_CFLAGS"
+  if test $ac_cv_should_define__xopen_source = yes
+then :
+  printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h
+
 fi
 
-found="no"
 
-	if test $found = "no" ; then
-		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
-			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
-		fi
+# Require xorg-macros minimum of 1.14 for XORG_COMPILER_BRAND in XORG_DEFAULT_OPTIONS
 
-		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
-			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
-		fi
 
-		CFLAGS="$CFLAGS -Wpointer-arith"
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wpointer-arith" >&5
-$as_echo_n "checking if $CC supports -Wpointer-arith... " >&6; }
-		cacheid=xorg_cv_cc_flag__Wpointer_arith
-		if eval \${$cacheid+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+
+
+
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
+printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
+if test ${ac_cv_c_undeclared_builtin_options+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_save_CFLAGS=$CFLAGS
+   ac_cv_c_undeclared_builtin_options='cannot detect'
+   for ac_arg in '' -fno-builtin; do
+     CFLAGS="$ac_save_CFLAGS $ac_arg"
+     # This test program should *not* compile successfully.
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-int i;
+
+int
+main (void)
+{
+(void) strchr;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+
+else $as_nop
+  # This test program should compile successfully.
+        # No library function is consistently available on
+        # freestanding implementations, so test against a dummy
+        # declaration.  Include always-available headers on the
+        # off chance that they somehow elicit warnings.
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <float.h>
+#include <limits.h>
+#include <stdarg.h>
+#include <stddef.h>
+extern void ac_decl (int, char *);
+
 int
-main ()
+main (void)
 {
+(void) ac_decl (0, (char *) 0);
+  (void) ac_decl;
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  eval $cacheid=yes
-else
-  eval $cacheid=no
+if ac_fn_c_try_compile "$LINENO"
+then :
+  if test x"$ac_arg" = x
+then :
+  ac_cv_c_undeclared_builtin_options='none needed'
+else $as_nop
+  ac_cv_c_undeclared_builtin_options=$ac_arg
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
+          break
 fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+    done
+    CFLAGS=$ac_save_CFLAGS
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5
+printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; }
+  case $ac_cv_c_undeclared_builtin_options in #(
+  'cannot detect') :
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot make $CC report undeclared builtins
+See \`config.log' for more details" "$LINENO" 5; } ;; #(
+  'none needed') :
+    ac_c_undeclared_builtin_options='' ;; #(
+  *) :
+    ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;;
+esac
 
 
-		CFLAGS="$xorg_testset_save_CFLAGS"
-
-		eval supported=\$$cacheid
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
-$as_echo "$supported" >&6; }
-		if test "$supported" = "yes" ; then
-			BASE_CFLAGS="$BASE_CFLAGS -Wpointer-arith"
-			found="yes"
-		fi
-	fi
 
 
 
+ac_fn_check_decl "$LINENO" "__clang__" "ac_cv_have_decl___clang__" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl___clang__" = xyes
+then :
+  CLANGCC="yes"
+else $as_nop
+  CLANGCC="no"
+fi
+ac_fn_check_decl "$LINENO" "__INTEL_COMPILER" "ac_cv_have_decl___INTEL_COMPILER" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl___INTEL_COMPILER" = xyes
+then :
+  INTELCC="yes"
+else $as_nop
+  INTELCC="no"
+fi
+ac_fn_check_decl "$LINENO" "__SUNPRO_C" "ac_cv_have_decl___SUNPRO_C" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl___SUNPRO_C" = xyes
+then :
+  SUNCC="yes"
+else $as_nop
+  SUNCC="no"
+fi
+
+
+
+
+
+
+
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+	if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_PKG_CONFIG+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  case $PKG_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+printf "%s\n" "$PKG_CONFIG" >&6; }
+else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_PKG_CONFIG"; then
+  ac_pt_PKG_CONFIG=$PKG_CONFIG
+  # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_ac_pt_PKG_CONFIG+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  case $ac_pt_PKG_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
+if test -n "$ac_pt_PKG_CONFIG"; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
+printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; }
+else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+  if test "x$ac_pt_PKG_CONFIG" = x; then
+    PKG_CONFIG=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    PKG_CONFIG=$ac_pt_PKG_CONFIG
+  fi
+else
+  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
+fi
+
+fi
+if test -n "$PKG_CONFIG"; then
+	_pkg_min_version=0.9.0
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
+printf %s "checking pkg-config is at least version $_pkg_min_version... " >&6; }
+	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+	else
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+		PKG_CONFIG=""
+	fi
+fi
+
+
+  # Make sure we can run config.sub.
+$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 ||
+  as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+printf %s "checking build system type... " >&6; }
+if test ${ac_cv_build+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+  ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
+test "x$ac_build_alias" = x &&
+  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
+  as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+printf "%s\n" "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+printf %s "checking host system type... " >&6; }
+if test ${ac_cv_host+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if test "x$host_alias" = x; then
+  ac_cv_host=$ac_cv_build
+else
+  ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` ||
+    as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+printf "%s\n" "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+printf %s "checking for a sed that does not truncate output... " >&6; }
+if test ${ac_cv_path_SED+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+     for ac_i in 1 2 3 4 5 6 7; do
+       ac_script="$ac_script$as_nl$ac_script"
+     done
+     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
+     { ac_script=; unset ac_script;}
+     if test -z "$SED"; then
+  ac_path_SED_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_prog in sed gsed
+   do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
+      as_fn_executable_p "$ac_path_SED" || continue
+# Check for GNU ac_path_SED and select it if it is found.
+  # Check for GNU $ac_path_SED
+case `"$ac_path_SED" --version 2>&1` in
+*GNU*)
+  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
+*)
+  ac_count=0
+  printf %s 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    printf "%s\n" '' >> "conftest.nl"
+    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_SED_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_SED="$ac_path_SED"
+      ac_path_SED_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_SED_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_SED"; then
+    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
+  fi
+else
+  ac_cv_path_SED=$SED
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
+printf "%s\n" "$ac_cv_path_SED" >&6; }
+ SED="$ac_cv_path_SED"
+  rm -f conftest.sed
+
+
+
+
+
+
+# Check whether --enable-selective-werror was given.
+if test ${enable_selective_werror+y}
+then :
+  enableval=$enable_selective_werror; SELECTIVE_WERROR=$enableval
+else $as_nop
+  SELECTIVE_WERROR=yes
+fi
+
+
+
+
+
+# -v is too short to test reliably with XORG_TESTSET_CFLAG
+if test "x$SUNCC" = "xyes"; then
+    BASE_CFLAGS="-v"
+else
+    BASE_CFLAGS=""
+fi
+
+# This chunk of warnings were those that existed in the legacy CWARNFLAGS
+
 
 
 
@@ -6487,24 +6370,26 @@ xorg_testset_save_CFLAGS="$CFLAGS"
 
 if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
 	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
-$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
-if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
+printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
+if test ${xorg_cv_cc_flag_unknown_warning_option+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unknown_warning_option=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unknown_warning_option=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
-$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
 	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -6514,24 +6399,26 @@ if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
 		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 	fi
 	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
-$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
-if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
+printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
+if test ${xorg_cv_cc_flag_unused_command_line_argument+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unused_command_line_argument=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unused_command_line_argument=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
-$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
 	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -6547,31 +6434,33 @@ found="no"
 			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
 		fi
 
-		CFLAGS="$CFLAGS -Wmissing-declarations"
+		CFLAGS="$CFLAGS -Wall"
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-declarations" >&5
-$as_echo_n "checking if $CC supports -Wmissing-declarations... " >&6; }
-		cacheid=xorg_cv_cc_flag__Wmissing_declarations
-		if eval \${$cacheid+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wall" >&5
+printf %s "checking if $CC supports -Wall... " >&6; }
+		cacheid=xorg_cv_cc_flag__Wall
+		if eval test \${$cacheid+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   eval $cacheid=yes
-else
+else $as_nop
   eval $cacheid=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 fi
 
@@ -6579,10 +6468,10 @@ fi
 		CFLAGS="$xorg_testset_save_CFLAGS"
 
 		eval supported=\$$cacheid
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
-$as_echo "$supported" >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+printf "%s\n" "$supported" >&6; }
 		if test "$supported" = "yes" ; then
-			BASE_CFLAGS="$BASE_CFLAGS -Wmissing-declarations"
+			BASE_CFLAGS="$BASE_CFLAGS -Wall"
 			found="yes"
 		fi
 	fi
@@ -6605,24 +6494,26 @@ xorg_testset_save_CFLAGS="$CFLAGS"
 
 if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
 	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
-$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
-if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
+printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
+if test ${xorg_cv_cc_flag_unknown_warning_option+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unknown_warning_option=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unknown_warning_option=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
-$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
 	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -6632,24 +6523,26 @@ if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
 		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 	fi
 	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
-$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
-if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
+printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
+if test ${xorg_cv_cc_flag_unused_command_line_argument+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unused_command_line_argument=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unused_command_line_argument=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
-$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
 	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -6665,31 +6558,33 @@ found="no"
 			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
 		fi
 
-		CFLAGS="$CFLAGS -Wformat=2"
+		CFLAGS="$CFLAGS -Wpointer-arith"
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wformat=2" >&5
-$as_echo_n "checking if $CC supports -Wformat=2... " >&6; }
-		cacheid=xorg_cv_cc_flag__Wformat_2
-		if eval \${$cacheid+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wpointer-arith" >&5
+printf %s "checking if $CC supports -Wpointer-arith... " >&6; }
+		cacheid=xorg_cv_cc_flag__Wpointer_arith
+		if eval test \${$cacheid+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   eval $cacheid=yes
-else
+else $as_nop
   eval $cacheid=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 fi
 
@@ -6697,10 +6592,258 @@ fi
 		CFLAGS="$xorg_testset_save_CFLAGS"
 
 		eval supported=\$$cacheid
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
-$as_echo "$supported" >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+printf "%s\n" "$supported" >&6; }
 		if test "$supported" = "yes" ; then
-			BASE_CFLAGS="$BASE_CFLAGS -Wformat=2"
+			BASE_CFLAGS="$BASE_CFLAGS -Wpointer-arith"
+			found="yes"
+		fi
+	fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
+	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
+printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
+if test ${xorg_cv_cc_flag_unknown_warning_option+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  xorg_cv_cc_flag_unknown_warning_option=yes
+else $as_nop
+  xorg_cv_cc_flag_unknown_warning_option=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
+	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
+	CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
+	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
+		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+	fi
+	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
+printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
+if test ${xorg_cv_cc_flag_unused_command_line_argument+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  xorg_cv_cc_flag_unused_command_line_argument=yes
+else $as_nop
+  xorg_cv_cc_flag_unused_command_line_argument=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
+	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
+	CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+	if test $found = "no" ; then
+		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
+			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+		fi
+
+		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
+			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+		fi
+
+		CFLAGS="$CFLAGS -Wmissing-declarations"
+
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-declarations" >&5
+printf %s "checking if $CC supports -Wmissing-declarations... " >&6; }
+		cacheid=xorg_cv_cc_flag__Wmissing_declarations
+		if eval test \${$cacheid+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+int i;
+int
+main (void)
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+  eval $cacheid=yes
+else $as_nop
+  eval $cacheid=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+		CFLAGS="$xorg_testset_save_CFLAGS"
+
+		eval supported=\$$cacheid
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+printf "%s\n" "$supported" >&6; }
+		if test "$supported" = "yes" ; then
+			BASE_CFLAGS="$BASE_CFLAGS -Wmissing-declarations"
+			found="yes"
+		fi
+	fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
+	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
+printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
+if test ${xorg_cv_cc_flag_unknown_warning_option+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  xorg_cv_cc_flag_unknown_warning_option=yes
+else $as_nop
+  xorg_cv_cc_flag_unknown_warning_option=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
+	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
+	CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
+	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
+		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+	fi
+	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
+printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
+if test ${xorg_cv_cc_flag_unused_command_line_argument+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  xorg_cv_cc_flag_unused_command_line_argument=yes
+else $as_nop
+  xorg_cv_cc_flag_unused_command_line_argument=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
+	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
+	CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+	if test $found = "no" ; then
+		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
+			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+		fi
+
+		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
+			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+		fi
+
+		CFLAGS="$CFLAGS -Wformat=2"
+
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wformat=2" >&5
+printf %s "checking if $CC supports -Wformat=2... " >&6; }
+		cacheid=xorg_cv_cc_flag__Wformat_2
+		if eval test \${$cacheid+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+int i;
+int
+main (void)
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+  eval $cacheid=yes
+else $as_nop
+  eval $cacheid=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+		CFLAGS="$xorg_testset_save_CFLAGS"
+
+		eval supported=\$$cacheid
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+printf "%s\n" "$supported" >&6; }
+		if test "$supported" = "yes" ; then
+			BASE_CFLAGS="$BASE_CFLAGS -Wformat=2"
 			found="yes"
 		fi
 	fi
@@ -6716,29 +6859,31 @@ $as_echo "$supported" >&6; }
 
 		CFLAGS="$CFLAGS -Wformat"
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wformat" >&5
-$as_echo_n "checking if $CC supports -Wformat... " >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wformat" >&5
+printf %s "checking if $CC supports -Wformat... " >&6; }
 		cacheid=xorg_cv_cc_flag__Wformat
-		if eval \${$cacheid+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+		if eval test \${$cacheid+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   eval $cacheid=yes
-else
+else $as_nop
   eval $cacheid=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 fi
 
@@ -6746,8 +6891,8 @@ fi
 		CFLAGS="$xorg_testset_save_CFLAGS"
 
 		eval supported=\$$cacheid
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
-$as_echo "$supported" >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+printf "%s\n" "$supported" >&6; }
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Wformat"
 			found="yes"
@@ -6774,24 +6919,26 @@ xorg_testset_save_CFLAGS="$CFLAGS"
 
 if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
 	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
-$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
-if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
+printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
+if test ${xorg_cv_cc_flag_unknown_warning_option+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unknown_warning_option=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unknown_warning_option=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
-$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
 	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -6801,24 +6948,26 @@ if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
 		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 	fi
 	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
-$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
-if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
+printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
+if test ${xorg_cv_cc_flag_unused_command_line_argument+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unused_command_line_argument=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unused_command_line_argument=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
-$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
 	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -6836,29 +6985,31 @@ found="no"
 
 		CFLAGS="$CFLAGS -Wstrict-prototypes"
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wstrict-prototypes" >&5
-$as_echo_n "checking if $CC supports -Wstrict-prototypes... " >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wstrict-prototypes" >&5
+printf %s "checking if $CC supports -Wstrict-prototypes... " >&6; }
 		cacheid=xorg_cv_cc_flag__Wstrict_prototypes
-		if eval \${$cacheid+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+		if eval test \${$cacheid+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   eval $cacheid=yes
-else
+else $as_nop
   eval $cacheid=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 fi
 
@@ -6866,8 +7017,8 @@ fi
 		CFLAGS="$xorg_testset_save_CFLAGS"
 
 		eval supported=\$$cacheid
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
-$as_echo "$supported" >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+printf "%s\n" "$supported" >&6; }
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Wstrict-prototypes"
 			found="yes"
@@ -6892,24 +7043,26 @@ xorg_testset_save_CFLAGS="$CFLAGS"
 
 if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
 	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
-$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
-if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
+printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
+if test ${xorg_cv_cc_flag_unknown_warning_option+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unknown_warning_option=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unknown_warning_option=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
-$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
 	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -6919,24 +7072,26 @@ if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
 		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 	fi
 	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
-$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
-if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
+printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
+if test ${xorg_cv_cc_flag_unused_command_line_argument+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unused_command_line_argument=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unused_command_line_argument=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
-$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
 	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -6954,29 +7109,31 @@ found="no"
 
 		CFLAGS="$CFLAGS -Wmissing-prototypes"
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-prototypes" >&5
-$as_echo_n "checking if $CC supports -Wmissing-prototypes... " >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-prototypes" >&5
+printf %s "checking if $CC supports -Wmissing-prototypes... " >&6; }
 		cacheid=xorg_cv_cc_flag__Wmissing_prototypes
-		if eval \${$cacheid+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+		if eval test \${$cacheid+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   eval $cacheid=yes
-else
+else $as_nop
   eval $cacheid=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 fi
 
@@ -6984,8 +7141,8 @@ fi
 		CFLAGS="$xorg_testset_save_CFLAGS"
 
 		eval supported=\$$cacheid
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
-$as_echo "$supported" >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+printf "%s\n" "$supported" >&6; }
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Wmissing-prototypes"
 			found="yes"
@@ -7010,24 +7167,26 @@ xorg_testset_save_CFLAGS="$CFLAGS"
 
 if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
 	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
-$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
-if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
+printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
+if test ${xorg_cv_cc_flag_unknown_warning_option+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unknown_warning_option=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unknown_warning_option=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
-$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
 	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -7037,24 +7196,26 @@ if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
 		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 	fi
 	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
-$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
-if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
+printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
+if test ${xorg_cv_cc_flag_unused_command_line_argument+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unused_command_line_argument=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unused_command_line_argument=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
-$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
 	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -7072,29 +7233,31 @@ found="no"
 
 		CFLAGS="$CFLAGS -Wnested-externs"
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wnested-externs" >&5
-$as_echo_n "checking if $CC supports -Wnested-externs... " >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wnested-externs" >&5
+printf %s "checking if $CC supports -Wnested-externs... " >&6; }
 		cacheid=xorg_cv_cc_flag__Wnested_externs
-		if eval \${$cacheid+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+		if eval test \${$cacheid+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   eval $cacheid=yes
-else
+else $as_nop
   eval $cacheid=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 fi
 
@@ -7102,8 +7265,8 @@ fi
 		CFLAGS="$xorg_testset_save_CFLAGS"
 
 		eval supported=\$$cacheid
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
-$as_echo "$supported" >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+printf "%s\n" "$supported" >&6; }
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Wnested-externs"
 			found="yes"
@@ -7128,24 +7291,26 @@ xorg_testset_save_CFLAGS="$CFLAGS"
 
 if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
 	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
-$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
-if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
+printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
+if test ${xorg_cv_cc_flag_unknown_warning_option+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unknown_warning_option=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unknown_warning_option=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
-$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
 	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -7155,24 +7320,26 @@ if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
 		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 	fi
 	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
-$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
-if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
+printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
+if test ${xorg_cv_cc_flag_unused_command_line_argument+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unused_command_line_argument=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unused_command_line_argument=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
-$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
 	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -7190,29 +7357,31 @@ found="no"
 
 		CFLAGS="$CFLAGS -Wbad-function-cast"
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wbad-function-cast" >&5
-$as_echo_n "checking if $CC supports -Wbad-function-cast... " >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wbad-function-cast" >&5
+printf %s "checking if $CC supports -Wbad-function-cast... " >&6; }
 		cacheid=xorg_cv_cc_flag__Wbad_function_cast
-		if eval \${$cacheid+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+		if eval test \${$cacheid+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   eval $cacheid=yes
-else
+else $as_nop
   eval $cacheid=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 fi
 
@@ -7220,8 +7389,8 @@ fi
 		CFLAGS="$xorg_testset_save_CFLAGS"
 
 		eval supported=\$$cacheid
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
-$as_echo "$supported" >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+printf "%s\n" "$supported" >&6; }
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Wbad-function-cast"
 			found="yes"
@@ -7246,24 +7415,26 @@ xorg_testset_save_CFLAGS="$CFLAGS"
 
 if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
 	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
-$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
-if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
+printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
+if test ${xorg_cv_cc_flag_unknown_warning_option+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unknown_warning_option=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unknown_warning_option=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
-$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
 	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -7273,24 +7444,26 @@ if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
 		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 	fi
 	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
-$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
-if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
+printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
+if test ${xorg_cv_cc_flag_unused_command_line_argument+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unused_command_line_argument=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unused_command_line_argument=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
-$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
 	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -7308,29 +7481,31 @@ found="no"
 
 		CFLAGS="$CFLAGS -Wold-style-definition"
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wold-style-definition" >&5
-$as_echo_n "checking if $CC supports -Wold-style-definition... " >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wold-style-definition" >&5
+printf %s "checking if $CC supports -Wold-style-definition... " >&6; }
 		cacheid=xorg_cv_cc_flag__Wold_style_definition
-		if eval \${$cacheid+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+		if eval test \${$cacheid+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   eval $cacheid=yes
-else
+else $as_nop
   eval $cacheid=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 fi
 
@@ -7338,8 +7513,8 @@ fi
 		CFLAGS="$xorg_testset_save_CFLAGS"
 
 		eval supported=\$$cacheid
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
-$as_echo "$supported" >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+printf "%s\n" "$supported" >&6; }
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Wold-style-definition"
 			found="yes"
@@ -7357,29 +7532,31 @@ $as_echo "$supported" >&6; }
 
 		CFLAGS="$CFLAGS -fd"
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -fd" >&5
-$as_echo_n "checking if $CC supports -fd... " >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -fd" >&5
+printf %s "checking if $CC supports -fd... " >&6; }
 		cacheid=xorg_cv_cc_flag__fd
-		if eval \${$cacheid+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+		if eval test \${$cacheid+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   eval $cacheid=yes
-else
+else $as_nop
   eval $cacheid=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 fi
 
@@ -7387,8 +7564,8 @@ fi
 		CFLAGS="$xorg_testset_save_CFLAGS"
 
 		eval supported=\$$cacheid
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
-$as_echo "$supported" >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+printf "%s\n" "$supported" >&6; }
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -fd"
 			found="yes"
@@ -7413,24 +7590,26 @@ xorg_testset_save_CFLAGS="$CFLAGS"
 
 if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
 	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
-$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
-if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
+printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
+if test ${xorg_cv_cc_flag_unknown_warning_option+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unknown_warning_option=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unknown_warning_option=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
-$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
 	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -7440,24 +7619,26 @@ if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
 		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 	fi
 	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
-$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
-if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
+printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
+if test ${xorg_cv_cc_flag_unused_command_line_argument+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unused_command_line_argument=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unused_command_line_argument=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
-$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
 	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -7475,29 +7656,31 @@ found="no"
 
 		CFLAGS="$CFLAGS -Wdeclaration-after-statement"
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wdeclaration-after-statement" >&5
-$as_echo_n "checking if $CC supports -Wdeclaration-after-statement... " >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wdeclaration-after-statement" >&5
+printf %s "checking if $CC supports -Wdeclaration-after-statement... " >&6; }
 		cacheid=xorg_cv_cc_flag__Wdeclaration_after_statement
-		if eval \${$cacheid+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+		if eval test \${$cacheid+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   eval $cacheid=yes
-else
+else $as_nop
   eval $cacheid=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 fi
 
@@ -7505,8 +7688,8 @@ fi
 		CFLAGS="$xorg_testset_save_CFLAGS"
 
 		eval supported=\$$cacheid
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
-$as_echo "$supported" >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+printf "%s\n" "$supported" >&6; }
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Wdeclaration-after-statement"
 			found="yes"
@@ -7535,24 +7718,26 @@ xorg_testset_save_CFLAGS="$CFLAGS"
 
 if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
 	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
-$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
-if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
+printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
+if test ${xorg_cv_cc_flag_unknown_warning_option+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unknown_warning_option=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unknown_warning_option=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
-$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
 	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -7562,24 +7747,26 @@ if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
 		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 	fi
 	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
-$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
-if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
+printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
+if test ${xorg_cv_cc_flag_unused_command_line_argument+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unused_command_line_argument=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unused_command_line_argument=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
-$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
 	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -7597,29 +7784,31 @@ found="no"
 
 		CFLAGS="$CFLAGS -Wunused"
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wunused" >&5
-$as_echo_n "checking if $CC supports -Wunused... " >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wunused" >&5
+printf %s "checking if $CC supports -Wunused... " >&6; }
 		cacheid=xorg_cv_cc_flag__Wunused
-		if eval \${$cacheid+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+		if eval test \${$cacheid+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   eval $cacheid=yes
-else
+else $as_nop
   eval $cacheid=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 fi
 
@@ -7627,8 +7816,8 @@ fi
 		CFLAGS="$xorg_testset_save_CFLAGS"
 
 		eval supported=\$$cacheid
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
-$as_echo "$supported" >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+printf "%s\n" "$supported" >&6; }
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Wunused"
 			found="yes"
@@ -7653,24 +7842,26 @@ xorg_testset_save_CFLAGS="$CFLAGS"
 
 if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
 	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
-$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
-if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
+printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
+if test ${xorg_cv_cc_flag_unknown_warning_option+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unknown_warning_option=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unknown_warning_option=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
-$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
 	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -7680,24 +7871,26 @@ if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
 		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 	fi
 	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
-$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
-if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
+printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
+if test ${xorg_cv_cc_flag_unused_command_line_argument+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unused_command_line_argument=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unused_command_line_argument=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
-$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
 	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -7715,29 +7908,31 @@ found="no"
 
 		CFLAGS="$CFLAGS -Wuninitialized"
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wuninitialized" >&5
-$as_echo_n "checking if $CC supports -Wuninitialized... " >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wuninitialized" >&5
+printf %s "checking if $CC supports -Wuninitialized... " >&6; }
 		cacheid=xorg_cv_cc_flag__Wuninitialized
-		if eval \${$cacheid+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+		if eval test \${$cacheid+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   eval $cacheid=yes
-else
+else $as_nop
   eval $cacheid=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 fi
 
@@ -7745,8 +7940,8 @@ fi
 		CFLAGS="$xorg_testset_save_CFLAGS"
 
 		eval supported=\$$cacheid
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
-$as_echo "$supported" >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+printf "%s\n" "$supported" >&6; }
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Wuninitialized"
 			found="yes"
@@ -7771,24 +7966,26 @@ xorg_testset_save_CFLAGS="$CFLAGS"
 
 if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
 	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
-$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
-if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
+printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
+if test ${xorg_cv_cc_flag_unknown_warning_option+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unknown_warning_option=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unknown_warning_option=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
-$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
 	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -7798,24 +7995,26 @@ if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
 		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 	fi
 	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
-$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
-if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
+printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
+if test ${xorg_cv_cc_flag_unused_command_line_argument+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unused_command_line_argument=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unused_command_line_argument=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
-$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
 	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -7833,29 +8032,31 @@ found="no"
 
 		CFLAGS="$CFLAGS -Wshadow"
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wshadow" >&5
-$as_echo_n "checking if $CC supports -Wshadow... " >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wshadow" >&5
+printf %s "checking if $CC supports -Wshadow... " >&6; }
 		cacheid=xorg_cv_cc_flag__Wshadow
-		if eval \${$cacheid+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+		if eval test \${$cacheid+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   eval $cacheid=yes
-else
+else $as_nop
   eval $cacheid=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 fi
 
@@ -7863,8 +8064,8 @@ fi
 		CFLAGS="$xorg_testset_save_CFLAGS"
 
 		eval supported=\$$cacheid
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
-$as_echo "$supported" >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+printf "%s\n" "$supported" >&6; }
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Wshadow"
 			found="yes"
@@ -7889,24 +8090,26 @@ xorg_testset_save_CFLAGS="$CFLAGS"
 
 if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
 	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
-$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
-if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
+printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
+if test ${xorg_cv_cc_flag_unknown_warning_option+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unknown_warning_option=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unknown_warning_option=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
-$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
 	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -7916,24 +8119,26 @@ if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
 		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 	fi
 	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
-$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
-if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
+printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
+if test ${xorg_cv_cc_flag_unused_command_line_argument+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unused_command_line_argument=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unused_command_line_argument=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
-$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
 	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -7951,29 +8156,31 @@ found="no"
 
 		CFLAGS="$CFLAGS -Wmissing-noreturn"
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-noreturn" >&5
-$as_echo_n "checking if $CC supports -Wmissing-noreturn... " >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-noreturn" >&5
+printf %s "checking if $CC supports -Wmissing-noreturn... " >&6; }
 		cacheid=xorg_cv_cc_flag__Wmissing_noreturn
-		if eval \${$cacheid+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+		if eval test \${$cacheid+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   eval $cacheid=yes
-else
+else $as_nop
   eval $cacheid=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 fi
 
@@ -7981,8 +8188,8 @@ fi
 		CFLAGS="$xorg_testset_save_CFLAGS"
 
 		eval supported=\$$cacheid
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
-$as_echo "$supported" >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+printf "%s\n" "$supported" >&6; }
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Wmissing-noreturn"
 			found="yes"
@@ -8007,24 +8214,26 @@ xorg_testset_save_CFLAGS="$CFLAGS"
 
 if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
 	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
-$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
-if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
+printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
+if test ${xorg_cv_cc_flag_unknown_warning_option+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unknown_warning_option=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unknown_warning_option=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
-$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
 	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -8034,24 +8243,26 @@ if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
 		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 	fi
 	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
-$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
-if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
+printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
+if test ${xorg_cv_cc_flag_unused_command_line_argument+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unused_command_line_argument=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unused_command_line_argument=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
-$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
 	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -8069,29 +8280,31 @@ found="no"
 
 		CFLAGS="$CFLAGS -Wmissing-format-attribute"
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-format-attribute" >&5
-$as_echo_n "checking if $CC supports -Wmissing-format-attribute... " >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-format-attribute" >&5
+printf %s "checking if $CC supports -Wmissing-format-attribute... " >&6; }
 		cacheid=xorg_cv_cc_flag__Wmissing_format_attribute
-		if eval \${$cacheid+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+		if eval test \${$cacheid+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   eval $cacheid=yes
-else
+else $as_nop
   eval $cacheid=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 fi
 
@@ -8099,8 +8312,8 @@ fi
 		CFLAGS="$xorg_testset_save_CFLAGS"
 
 		eval supported=\$$cacheid
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
-$as_echo "$supported" >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+printf "%s\n" "$supported" >&6; }
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Wmissing-format-attribute"
 			found="yes"
@@ -8125,24 +8338,26 @@ xorg_testset_save_CFLAGS="$CFLAGS"
 
 if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
 	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
-$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
-if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
+printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
+if test ${xorg_cv_cc_flag_unknown_warning_option+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unknown_warning_option=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unknown_warning_option=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
-$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
 	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -8152,24 +8367,26 @@ if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
 		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 	fi
 	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
-$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
-if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
+printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
+if test ${xorg_cv_cc_flag_unused_command_line_argument+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unused_command_line_argument=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unused_command_line_argument=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
-$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
 	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -8187,29 +8404,31 @@ found="no"
 
 		CFLAGS="$CFLAGS -Wredundant-decls"
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wredundant-decls" >&5
-$as_echo_n "checking if $CC supports -Wredundant-decls... " >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wredundant-decls" >&5
+printf %s "checking if $CC supports -Wredundant-decls... " >&6; }
 		cacheid=xorg_cv_cc_flag__Wredundant_decls
-		if eval \${$cacheid+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+		if eval test \${$cacheid+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   eval $cacheid=yes
-else
+else $as_nop
   eval $cacheid=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 fi
 
@@ -8217,8 +8436,8 @@ fi
 		CFLAGS="$xorg_testset_save_CFLAGS"
 
 		eval supported=\$$cacheid
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
-$as_echo "$supported" >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+printf "%s\n" "$supported" >&6; }
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Wredundant-decls"
 			found="yes"
@@ -8243,24 +8462,26 @@ xorg_testset_save_CFLAGS="$CFLAGS"
 
 if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
 	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
-$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
-if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
+printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
+if test ${xorg_cv_cc_flag_unknown_warning_option+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unknown_warning_option=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unknown_warning_option=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
-$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
 	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -8270,24 +8491,26 @@ if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
 		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 	fi
 	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
-$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
-if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
+printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
+if test ${xorg_cv_cc_flag_unused_command_line_argument+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unused_command_line_argument=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unused_command_line_argument=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
-$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
 	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -8305,29 +8528,31 @@ found="no"
 
 		CFLAGS="$CFLAGS -Wlogical-op"
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wlogical-op" >&5
-$as_echo_n "checking if $CC supports -Wlogical-op... " >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wlogical-op" >&5
+printf %s "checking if $CC supports -Wlogical-op... " >&6; }
 		cacheid=xorg_cv_cc_flag__Wlogical_op
-		if eval \${$cacheid+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+		if eval test \${$cacheid+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   eval $cacheid=yes
-else
+else $as_nop
   eval $cacheid=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 fi
 
@@ -8335,8 +8560,8 @@ fi
 		CFLAGS="$xorg_testset_save_CFLAGS"
 
 		eval supported=\$$cacheid
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
-$as_echo "$supported" >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+printf "%s\n" "$supported" >&6; }
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Wlogical-op"
 			found="yes"
@@ -8373,24 +8598,26 @@ xorg_testset_save_CFLAGS="$CFLAGS"
 
 if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
 	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
-$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
-if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
+printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
+if test ${xorg_cv_cc_flag_unknown_warning_option+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unknown_warning_option=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unknown_warning_option=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
-$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
 	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -8400,24 +8627,26 @@ if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
 		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 	fi
 	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
-$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
-if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
+printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
+if test ${xorg_cv_cc_flag_unused_command_line_argument+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unused_command_line_argument=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unused_command_line_argument=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
-$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
 	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -8435,29 +8664,31 @@ found="no"
 
 		CFLAGS="$CFLAGS -Werror=implicit"
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=implicit" >&5
-$as_echo_n "checking if $CC supports -Werror=implicit... " >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=implicit" >&5
+printf %s "checking if $CC supports -Werror=implicit... " >&6; }
 		cacheid=xorg_cv_cc_flag__Werror_implicit
-		if eval \${$cacheid+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+		if eval test \${$cacheid+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   eval $cacheid=yes
-else
+else $as_nop
   eval $cacheid=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 fi
 
@@ -8465,8 +8696,8 @@ fi
 		CFLAGS="$xorg_testset_save_CFLAGS"
 
 		eval supported=\$$cacheid
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
-$as_echo "$supported" >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+printf "%s\n" "$supported" >&6; }
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Werror=implicit"
 			found="yes"
@@ -8484,29 +8715,31 @@ $as_echo "$supported" >&6; }
 
 		CFLAGS="$CFLAGS -errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED"
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED" >&5
-$as_echo_n "checking if $CC supports -errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED... " >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED" >&5
+printf %s "checking if $CC supports -errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED... " >&6; }
 		cacheid=xorg_cv_cc_flag__errwarn_E_NO_EXPLICIT_TYPE_GIVEN__errwarn_E_NO_IMPLICIT_DECL_ALLOWED
-		if eval \${$cacheid+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+		if eval test \${$cacheid+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   eval $cacheid=yes
-else
+else $as_nop
   eval $cacheid=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 fi
 
@@ -8514,8 +8747,8 @@ fi
 		CFLAGS="$xorg_testset_save_CFLAGS"
 
 		eval supported=\$$cacheid
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
-$as_echo "$supported" >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+printf "%s\n" "$supported" >&6; }
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED"
 			found="yes"
@@ -8540,24 +8773,26 @@ xorg_testset_save_CFLAGS="$CFLAGS"
 
 if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
 	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
-$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
-if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
+printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
+if test ${xorg_cv_cc_flag_unknown_warning_option+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unknown_warning_option=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unknown_warning_option=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
-$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
 	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -8567,24 +8802,26 @@ if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
 		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 	fi
 	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
-$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
-if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
+printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
+if test ${xorg_cv_cc_flag_unused_command_line_argument+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unused_command_line_argument=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unused_command_line_argument=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
-$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
 	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -8602,29 +8839,31 @@ found="no"
 
 		CFLAGS="$CFLAGS -Werror=nonnull"
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=nonnull" >&5
-$as_echo_n "checking if $CC supports -Werror=nonnull... " >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=nonnull" >&5
+printf %s "checking if $CC supports -Werror=nonnull... " >&6; }
 		cacheid=xorg_cv_cc_flag__Werror_nonnull
-		if eval \${$cacheid+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+		if eval test \${$cacheid+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   eval $cacheid=yes
-else
+else $as_nop
   eval $cacheid=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 fi
 
@@ -8632,8 +8871,8 @@ fi
 		CFLAGS="$xorg_testset_save_CFLAGS"
 
 		eval supported=\$$cacheid
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
-$as_echo "$supported" >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+printf "%s\n" "$supported" >&6; }
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Werror=nonnull"
 			found="yes"
@@ -8658,24 +8897,26 @@ xorg_testset_save_CFLAGS="$CFLAGS"
 
 if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
 	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
-$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
-if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
+printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
+if test ${xorg_cv_cc_flag_unknown_warning_option+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unknown_warning_option=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unknown_warning_option=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
-$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
 	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -8685,24 +8926,26 @@ if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
 		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 	fi
 	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
-$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
-if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
+printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
+if test ${xorg_cv_cc_flag_unused_command_line_argument+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unused_command_line_argument=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unused_command_line_argument=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
-$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
 	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -8720,29 +8963,31 @@ found="no"
 
 		CFLAGS="$CFLAGS -Werror=init-self"
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=init-self" >&5
-$as_echo_n "checking if $CC supports -Werror=init-self... " >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=init-self" >&5
+printf %s "checking if $CC supports -Werror=init-self... " >&6; }
 		cacheid=xorg_cv_cc_flag__Werror_init_self
-		if eval \${$cacheid+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+		if eval test \${$cacheid+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   eval $cacheid=yes
-else
+else $as_nop
   eval $cacheid=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 fi
 
@@ -8750,8 +8995,8 @@ fi
 		CFLAGS="$xorg_testset_save_CFLAGS"
 
 		eval supported=\$$cacheid
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
-$as_echo "$supported" >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+printf "%s\n" "$supported" >&6; }
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Werror=init-self"
 			found="yes"
@@ -8776,24 +9021,26 @@ xorg_testset_save_CFLAGS="$CFLAGS"
 
 if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
 	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
-$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
-if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
+printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
+if test ${xorg_cv_cc_flag_unknown_warning_option+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unknown_warning_option=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unknown_warning_option=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
-$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
 	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -8803,24 +9050,26 @@ if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
 		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 	fi
 	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
-$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
-if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
+printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
+if test ${xorg_cv_cc_flag_unused_command_line_argument+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unused_command_line_argument=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unused_command_line_argument=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
-$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
 	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -8838,29 +9087,31 @@ found="no"
 
 		CFLAGS="$CFLAGS -Werror=main"
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=main" >&5
-$as_echo_n "checking if $CC supports -Werror=main... " >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=main" >&5
+printf %s "checking if $CC supports -Werror=main... " >&6; }
 		cacheid=xorg_cv_cc_flag__Werror_main
-		if eval \${$cacheid+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+		if eval test \${$cacheid+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   eval $cacheid=yes
-else
+else $as_nop
   eval $cacheid=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 fi
 
@@ -8868,8 +9119,8 @@ fi
 		CFLAGS="$xorg_testset_save_CFLAGS"
 
 		eval supported=\$$cacheid
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
-$as_echo "$supported" >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+printf "%s\n" "$supported" >&6; }
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Werror=main"
 			found="yes"
@@ -8894,24 +9145,26 @@ xorg_testset_save_CFLAGS="$CFLAGS"
 
 if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
 	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
-$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
-if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
+printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
+if test ${xorg_cv_cc_flag_unknown_warning_option+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unknown_warning_option=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unknown_warning_option=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
-$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
 	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -8921,24 +9174,26 @@ if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
 		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 	fi
 	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
-$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
-if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
+printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
+if test ${xorg_cv_cc_flag_unused_command_line_argument+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unused_command_line_argument=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unused_command_line_argument=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
-$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
 	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -8956,29 +9211,31 @@ found="no"
 
 		CFLAGS="$CFLAGS -Werror=missing-braces"
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=missing-braces" >&5
-$as_echo_n "checking if $CC supports -Werror=missing-braces... " >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=missing-braces" >&5
+printf %s "checking if $CC supports -Werror=missing-braces... " >&6; }
 		cacheid=xorg_cv_cc_flag__Werror_missing_braces
-		if eval \${$cacheid+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+		if eval test \${$cacheid+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   eval $cacheid=yes
-else
+else $as_nop
   eval $cacheid=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 fi
 
@@ -8986,8 +9243,8 @@ fi
 		CFLAGS="$xorg_testset_save_CFLAGS"
 
 		eval supported=\$$cacheid
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
-$as_echo "$supported" >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+printf "%s\n" "$supported" >&6; }
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Werror=missing-braces"
 			found="yes"
@@ -9012,24 +9269,26 @@ xorg_testset_save_CFLAGS="$CFLAGS"
 
 if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
 	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
-$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
-if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
+printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
+if test ${xorg_cv_cc_flag_unknown_warning_option+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unknown_warning_option=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unknown_warning_option=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
-$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
 	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -9039,24 +9298,26 @@ if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
 		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 	fi
 	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
-$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
-if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
+printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
+if test ${xorg_cv_cc_flag_unused_command_line_argument+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unused_command_line_argument=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unused_command_line_argument=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
-$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
 	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -9074,29 +9335,31 @@ found="no"
 
 		CFLAGS="$CFLAGS -Werror=sequence-point"
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=sequence-point" >&5
-$as_echo_n "checking if $CC supports -Werror=sequence-point... " >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=sequence-point" >&5
+printf %s "checking if $CC supports -Werror=sequence-point... " >&6; }
 		cacheid=xorg_cv_cc_flag__Werror_sequence_point
-		if eval \${$cacheid+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+		if eval test \${$cacheid+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   eval $cacheid=yes
-else
+else $as_nop
   eval $cacheid=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 fi
 
@@ -9104,8 +9367,8 @@ fi
 		CFLAGS="$xorg_testset_save_CFLAGS"
 
 		eval supported=\$$cacheid
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
-$as_echo "$supported" >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+printf "%s\n" "$supported" >&6; }
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Werror=sequence-point"
 			found="yes"
@@ -9130,24 +9393,26 @@ xorg_testset_save_CFLAGS="$CFLAGS"
 
 if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
 	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
-$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
-if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
+printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
+if test ${xorg_cv_cc_flag_unknown_warning_option+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unknown_warning_option=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unknown_warning_option=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
-$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
 	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -9157,24 +9422,26 @@ if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
 		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 	fi
 	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
-$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
-if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
+printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
+if test ${xorg_cv_cc_flag_unused_command_line_argument+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unused_command_line_argument=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unused_command_line_argument=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
-$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
 	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -9192,29 +9459,31 @@ found="no"
 
 		CFLAGS="$CFLAGS -Werror=return-type"
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=return-type" >&5
-$as_echo_n "checking if $CC supports -Werror=return-type... " >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=return-type" >&5
+printf %s "checking if $CC supports -Werror=return-type... " >&6; }
 		cacheid=xorg_cv_cc_flag__Werror_return_type
-		if eval \${$cacheid+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+		if eval test \${$cacheid+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   eval $cacheid=yes
-else
+else $as_nop
   eval $cacheid=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 fi
 
@@ -9222,8 +9491,8 @@ fi
 		CFLAGS="$xorg_testset_save_CFLAGS"
 
 		eval supported=\$$cacheid
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
-$as_echo "$supported" >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+printf "%s\n" "$supported" >&6; }
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Werror=return-type"
 			found="yes"
@@ -9241,29 +9510,31 @@ $as_echo "$supported" >&6; }
 
 		CFLAGS="$CFLAGS -errwarn=E_FUNC_HAS_NO_RETURN_STMT"
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -errwarn=E_FUNC_HAS_NO_RETURN_STMT" >&5
-$as_echo_n "checking if $CC supports -errwarn=E_FUNC_HAS_NO_RETURN_STMT... " >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -errwarn=E_FUNC_HAS_NO_RETURN_STMT" >&5
+printf %s "checking if $CC supports -errwarn=E_FUNC_HAS_NO_RETURN_STMT... " >&6; }
 		cacheid=xorg_cv_cc_flag__errwarn_E_FUNC_HAS_NO_RETURN_STMT
-		if eval \${$cacheid+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+		if eval test \${$cacheid+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   eval $cacheid=yes
-else
+else $as_nop
   eval $cacheid=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 fi
 
@@ -9271,8 +9542,8 @@ fi
 		CFLAGS="$xorg_testset_save_CFLAGS"
 
 		eval supported=\$$cacheid
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
-$as_echo "$supported" >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+printf "%s\n" "$supported" >&6; }
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -errwarn=E_FUNC_HAS_NO_RETURN_STMT"
 			found="yes"
@@ -9297,24 +9568,26 @@ xorg_testset_save_CFLAGS="$CFLAGS"
 
 if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
 	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
-$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
-if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
+printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
+if test ${xorg_cv_cc_flag_unknown_warning_option+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unknown_warning_option=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unknown_warning_option=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
-$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
 	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -9324,24 +9597,26 @@ if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
 		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 	fi
 	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
-$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
-if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
+printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
+if test ${xorg_cv_cc_flag_unused_command_line_argument+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unused_command_line_argument=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unused_command_line_argument=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
-$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
 	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -9359,29 +9634,31 @@ found="no"
 
 		CFLAGS="$CFLAGS -Werror=trigraphs"
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=trigraphs" >&5
-$as_echo_n "checking if $CC supports -Werror=trigraphs... " >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=trigraphs" >&5
+printf %s "checking if $CC supports -Werror=trigraphs... " >&6; }
 		cacheid=xorg_cv_cc_flag__Werror_trigraphs
-		if eval \${$cacheid+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+		if eval test \${$cacheid+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   eval $cacheid=yes
-else
+else $as_nop
   eval $cacheid=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 fi
 
@@ -9389,8 +9666,8 @@ fi
 		CFLAGS="$xorg_testset_save_CFLAGS"
 
 		eval supported=\$$cacheid
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
-$as_echo "$supported" >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+printf "%s\n" "$supported" >&6; }
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Werror=trigraphs"
 			found="yes"
@@ -9415,24 +9692,26 @@ xorg_testset_save_CFLAGS="$CFLAGS"
 
 if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
 	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
-$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
-if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
+printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
+if test ${xorg_cv_cc_flag_unknown_warning_option+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unknown_warning_option=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unknown_warning_option=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
-$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
 	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -9442,24 +9721,26 @@ if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
 		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 	fi
 	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
-$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
-if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
+printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
+if test ${xorg_cv_cc_flag_unused_command_line_argument+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unused_command_line_argument=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unused_command_line_argument=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
-$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
 	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -9477,29 +9758,31 @@ found="no"
 
 		CFLAGS="$CFLAGS -Werror=array-bounds"
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=array-bounds" >&5
-$as_echo_n "checking if $CC supports -Werror=array-bounds... " >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=array-bounds" >&5
+printf %s "checking if $CC supports -Werror=array-bounds... " >&6; }
 		cacheid=xorg_cv_cc_flag__Werror_array_bounds
-		if eval \${$cacheid+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+		if eval test \${$cacheid+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   eval $cacheid=yes
-else
+else $as_nop
   eval $cacheid=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 fi
 
@@ -9507,8 +9790,8 @@ fi
 		CFLAGS="$xorg_testset_save_CFLAGS"
 
 		eval supported=\$$cacheid
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
-$as_echo "$supported" >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+printf "%s\n" "$supported" >&6; }
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Werror=array-bounds"
 			found="yes"
@@ -9533,24 +9816,26 @@ xorg_testset_save_CFLAGS="$CFLAGS"
 
 if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
 	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
-$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
-if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
+printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
+if test ${xorg_cv_cc_flag_unknown_warning_option+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unknown_warning_option=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unknown_warning_option=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
-$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
 	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -9560,24 +9845,26 @@ if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
 		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 	fi
 	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
-$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
-if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
+printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
+if test ${xorg_cv_cc_flag_unused_command_line_argument+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unused_command_line_argument=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unused_command_line_argument=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
-$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
 	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -9595,29 +9882,31 @@ found="no"
 
 		CFLAGS="$CFLAGS -Werror=write-strings"
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=write-strings" >&5
-$as_echo_n "checking if $CC supports -Werror=write-strings... " >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=write-strings" >&5
+printf %s "checking if $CC supports -Werror=write-strings... " >&6; }
 		cacheid=xorg_cv_cc_flag__Werror_write_strings
-		if eval \${$cacheid+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+		if eval test \${$cacheid+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   eval $cacheid=yes
-else
+else $as_nop
   eval $cacheid=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 fi
 
@@ -9625,8 +9914,8 @@ fi
 		CFLAGS="$xorg_testset_save_CFLAGS"
 
 		eval supported=\$$cacheid
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
-$as_echo "$supported" >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+printf "%s\n" "$supported" >&6; }
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Werror=write-strings"
 			found="yes"
@@ -9651,24 +9940,26 @@ xorg_testset_save_CFLAGS="$CFLAGS"
 
 if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
 	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
-$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
-if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
+printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
+if test ${xorg_cv_cc_flag_unknown_warning_option+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unknown_warning_option=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unknown_warning_option=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
-$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
 	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -9678,24 +9969,26 @@ if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
 		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 	fi
 	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
-$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
-if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
+printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
+if test ${xorg_cv_cc_flag_unused_command_line_argument+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unused_command_line_argument=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unused_command_line_argument=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
-$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
 	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -9713,29 +10006,31 @@ found="no"
 
 		CFLAGS="$CFLAGS -Werror=address"
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=address" >&5
-$as_echo_n "checking if $CC supports -Werror=address... " >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=address" >&5
+printf %s "checking if $CC supports -Werror=address... " >&6; }
 		cacheid=xorg_cv_cc_flag__Werror_address
-		if eval \${$cacheid+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+		if eval test \${$cacheid+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   eval $cacheid=yes
-else
+else $as_nop
   eval $cacheid=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 fi
 
@@ -9743,8 +10038,8 @@ fi
 		CFLAGS="$xorg_testset_save_CFLAGS"
 
 		eval supported=\$$cacheid
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
-$as_echo "$supported" >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+printf "%s\n" "$supported" >&6; }
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Werror=address"
 			found="yes"
@@ -9769,24 +10064,26 @@ xorg_testset_save_CFLAGS="$CFLAGS"
 
 if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
 	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
-$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
-if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
+printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
+if test ${xorg_cv_cc_flag_unknown_warning_option+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unknown_warning_option=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unknown_warning_option=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
-$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
 	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -9796,24 +10093,26 @@ if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
 		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 	fi
 	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
-$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
-if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
+printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
+if test ${xorg_cv_cc_flag_unused_command_line_argument+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unused_command_line_argument=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unused_command_line_argument=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
-$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
 	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -9831,29 +10130,31 @@ found="no"
 
 		CFLAGS="$CFLAGS -Werror=int-to-pointer-cast"
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=int-to-pointer-cast" >&5
-$as_echo_n "checking if $CC supports -Werror=int-to-pointer-cast... " >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=int-to-pointer-cast" >&5
+printf %s "checking if $CC supports -Werror=int-to-pointer-cast... " >&6; }
 		cacheid=xorg_cv_cc_flag__Werror_int_to_pointer_cast
-		if eval \${$cacheid+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+		if eval test \${$cacheid+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   eval $cacheid=yes
-else
+else $as_nop
   eval $cacheid=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 fi
 
@@ -9861,8 +10162,8 @@ fi
 		CFLAGS="$xorg_testset_save_CFLAGS"
 
 		eval supported=\$$cacheid
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
-$as_echo "$supported" >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+printf "%s\n" "$supported" >&6; }
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Werror=int-to-pointer-cast"
 			found="yes"
@@ -9880,29 +10181,31 @@ $as_echo "$supported" >&6; }
 
 		CFLAGS="$CFLAGS -errwarn=E_BAD_PTR_INT_COMBINATION"
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -errwarn=E_BAD_PTR_INT_COMBINATION" >&5
-$as_echo_n "checking if $CC supports -errwarn=E_BAD_PTR_INT_COMBINATION... " >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -errwarn=E_BAD_PTR_INT_COMBINATION" >&5
+printf %s "checking if $CC supports -errwarn=E_BAD_PTR_INT_COMBINATION... " >&6; }
 		cacheid=xorg_cv_cc_flag__errwarn_E_BAD_PTR_INT_COMBINATION
-		if eval \${$cacheid+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+		if eval test \${$cacheid+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   eval $cacheid=yes
-else
+else $as_nop
   eval $cacheid=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 fi
 
@@ -9910,8 +10213,8 @@ fi
 		CFLAGS="$xorg_testset_save_CFLAGS"
 
 		eval supported=\$$cacheid
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
-$as_echo "$supported" >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+printf "%s\n" "$supported" >&6; }
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -errwarn=E_BAD_PTR_INT_COMBINATION"
 			found="yes"
@@ -9936,24 +10239,26 @@ xorg_testset_save_CFLAGS="$CFLAGS"
 
 if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
 	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
-$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
-if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
+printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
+if test ${xorg_cv_cc_flag_unknown_warning_option+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unknown_warning_option=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unknown_warning_option=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
-$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
 	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -9963,24 +10268,26 @@ if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
 		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 	fi
 	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
-$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
-if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
+printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
+if test ${xorg_cv_cc_flag_unused_command_line_argument+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unused_command_line_argument=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unused_command_line_argument=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
-$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
 	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -9998,29 +10305,31 @@ found="no"
 
 		CFLAGS="$CFLAGS -Werror=pointer-to-int-cast"
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=pointer-to-int-cast" >&5
-$as_echo_n "checking if $CC supports -Werror=pointer-to-int-cast... " >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=pointer-to-int-cast" >&5
+printf %s "checking if $CC supports -Werror=pointer-to-int-cast... " >&6; }
 		cacheid=xorg_cv_cc_flag__Werror_pointer_to_int_cast
-		if eval \${$cacheid+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+		if eval test \${$cacheid+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   eval $cacheid=yes
-else
+else $as_nop
   eval $cacheid=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 fi
 
@@ -10028,8 +10337,8 @@ fi
 		CFLAGS="$xorg_testset_save_CFLAGS"
 
 		eval supported=\$$cacheid
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
-$as_echo "$supported" >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+printf "%s\n" "$supported" >&6; }
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Werror=pointer-to-int-cast"
 			found="yes"
@@ -10038,8 +10347,8 @@ $as_echo "$supported" >&6; }
 
  # Also -errwarn=E_BAD_PTR_INT_COMBINATION
 else
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You have chosen not to turn some select compiler warnings into errors.  This should not be necessary.  Please report why you needed to do so in a bug report at $PACKAGE_BUGREPORT" >&5
-$as_echo "$as_me: WARNING: You have chosen not to turn some select compiler warnings into errors.  This should not be necessary.  Please report why you needed to do so in a bug report at $PACKAGE_BUGREPORT" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: You have chosen not to turn some select compiler warnings into errors.  This should not be necessary.  Please report why you needed to do so in a bug report at $PACKAGE_BUGREPORT" >&5
+printf "%s\n" "$as_me: WARNING: You have chosen not to turn some select compiler warnings into errors.  This should not be necessary.  Please report why you needed to do so in a bug report at $PACKAGE_BUGREPORT" >&2;}
 
 
 
@@ -10057,24 +10366,26 @@ xorg_testset_save_CFLAGS="$CFLAGS"
 
 if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
 	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
-$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
-if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
+printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
+if test ${xorg_cv_cc_flag_unknown_warning_option+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unknown_warning_option=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unknown_warning_option=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
-$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
 	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -10084,24 +10395,26 @@ if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
 		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 	fi
 	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
-$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
-if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
+printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
+if test ${xorg_cv_cc_flag_unused_command_line_argument+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unused_command_line_argument=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unused_command_line_argument=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
-$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
 	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -10119,29 +10432,31 @@ found="no"
 
 		CFLAGS="$CFLAGS -Wimplicit"
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wimplicit" >&5
-$as_echo_n "checking if $CC supports -Wimplicit... " >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wimplicit" >&5
+printf %s "checking if $CC supports -Wimplicit... " >&6; }
 		cacheid=xorg_cv_cc_flag__Wimplicit
-		if eval \${$cacheid+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+		if eval test \${$cacheid+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   eval $cacheid=yes
-else
+else $as_nop
   eval $cacheid=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 fi
 
@@ -10149,8 +10464,8 @@ fi
 		CFLAGS="$xorg_testset_save_CFLAGS"
 
 		eval supported=\$$cacheid
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
-$as_echo "$supported" >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+printf "%s\n" "$supported" >&6; }
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Wimplicit"
 			found="yes"
@@ -10175,24 +10490,26 @@ xorg_testset_save_CFLAGS="$CFLAGS"
 
 if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
 	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
-$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
-if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
+printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
+if test ${xorg_cv_cc_flag_unknown_warning_option+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unknown_warning_option=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unknown_warning_option=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
-$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
 	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -10202,24 +10519,26 @@ if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
 		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 	fi
 	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
-$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
-if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
+printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
+if test ${xorg_cv_cc_flag_unused_command_line_argument+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unused_command_line_argument=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unused_command_line_argument=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
-$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
 	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -10237,29 +10556,31 @@ found="no"
 
 		CFLAGS="$CFLAGS -Wnonnull"
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wnonnull" >&5
-$as_echo_n "checking if $CC supports -Wnonnull... " >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wnonnull" >&5
+printf %s "checking if $CC supports -Wnonnull... " >&6; }
 		cacheid=xorg_cv_cc_flag__Wnonnull
-		if eval \${$cacheid+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+		if eval test \${$cacheid+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   eval $cacheid=yes
-else
+else $as_nop
   eval $cacheid=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 fi
 
@@ -10267,8 +10588,8 @@ fi
 		CFLAGS="$xorg_testset_save_CFLAGS"
 
 		eval supported=\$$cacheid
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
-$as_echo "$supported" >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+printf "%s\n" "$supported" >&6; }
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Wnonnull"
 			found="yes"
@@ -10293,24 +10614,26 @@ xorg_testset_save_CFLAGS="$CFLAGS"
 
 if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
 	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
-$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
-if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
+printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
+if test ${xorg_cv_cc_flag_unknown_warning_option+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unknown_warning_option=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unknown_warning_option=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
-$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
 	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -10320,24 +10643,26 @@ if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
 		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 	fi
 	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
-$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
-if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
+printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
+if test ${xorg_cv_cc_flag_unused_command_line_argument+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unused_command_line_argument=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unused_command_line_argument=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
-$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
 	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -10355,29 +10680,31 @@ found="no"
 
 		CFLAGS="$CFLAGS -Winit-self"
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Winit-self" >&5
-$as_echo_n "checking if $CC supports -Winit-self... " >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Winit-self" >&5
+printf %s "checking if $CC supports -Winit-self... " >&6; }
 		cacheid=xorg_cv_cc_flag__Winit_self
-		if eval \${$cacheid+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+		if eval test \${$cacheid+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   eval $cacheid=yes
-else
+else $as_nop
   eval $cacheid=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 fi
 
@@ -10385,8 +10712,8 @@ fi
 		CFLAGS="$xorg_testset_save_CFLAGS"
 
 		eval supported=\$$cacheid
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
-$as_echo "$supported" >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+printf "%s\n" "$supported" >&6; }
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Winit-self"
 			found="yes"
@@ -10411,24 +10738,26 @@ xorg_testset_save_CFLAGS="$CFLAGS"
 
 if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
 	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
-$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
-if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
+printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
+if test ${xorg_cv_cc_flag_unknown_warning_option+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unknown_warning_option=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unknown_warning_option=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
-$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
 	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -10438,24 +10767,26 @@ if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
 		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 	fi
 	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
-$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
-if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
+printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
+if test ${xorg_cv_cc_flag_unused_command_line_argument+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unused_command_line_argument=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unused_command_line_argument=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
-$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
 	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -10473,29 +10804,31 @@ found="no"
 
 		CFLAGS="$CFLAGS -Wmain"
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmain" >&5
-$as_echo_n "checking if $CC supports -Wmain... " >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmain" >&5
+printf %s "checking if $CC supports -Wmain... " >&6; }
 		cacheid=xorg_cv_cc_flag__Wmain
-		if eval \${$cacheid+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+		if eval test \${$cacheid+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   eval $cacheid=yes
-else
+else $as_nop
   eval $cacheid=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 fi
 
@@ -10503,8 +10836,8 @@ fi
 		CFLAGS="$xorg_testset_save_CFLAGS"
 
 		eval supported=\$$cacheid
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
-$as_echo "$supported" >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+printf "%s\n" "$supported" >&6; }
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Wmain"
 			found="yes"
@@ -10529,24 +10862,26 @@ xorg_testset_save_CFLAGS="$CFLAGS"
 
 if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
 	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
-$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
-if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
+printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
+if test ${xorg_cv_cc_flag_unknown_warning_option+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unknown_warning_option=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unknown_warning_option=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
-$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
 	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -10556,24 +10891,26 @@ if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
 		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 	fi
 	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
-$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
-if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
+printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
+if test ${xorg_cv_cc_flag_unused_command_line_argument+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unused_command_line_argument=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unused_command_line_argument=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
-$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
 	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -10591,29 +10928,31 @@ found="no"
 
 		CFLAGS="$CFLAGS -Wmissing-braces"
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-braces" >&5
-$as_echo_n "checking if $CC supports -Wmissing-braces... " >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-braces" >&5
+printf %s "checking if $CC supports -Wmissing-braces... " >&6; }
 		cacheid=xorg_cv_cc_flag__Wmissing_braces
-		if eval \${$cacheid+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+		if eval test \${$cacheid+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   eval $cacheid=yes
-else
+else $as_nop
   eval $cacheid=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 fi
 
@@ -10621,8 +10960,8 @@ fi
 		CFLAGS="$xorg_testset_save_CFLAGS"
 
 		eval supported=\$$cacheid
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
-$as_echo "$supported" >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+printf "%s\n" "$supported" >&6; }
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Wmissing-braces"
 			found="yes"
@@ -10647,24 +10986,26 @@ xorg_testset_save_CFLAGS="$CFLAGS"
 
 if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
 	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
-$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
-if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
+printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
+if test ${xorg_cv_cc_flag_unknown_warning_option+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unknown_warning_option=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unknown_warning_option=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
-$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
 	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -10674,24 +11015,26 @@ if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
 		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 	fi
 	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
-$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
-if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
+printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
+if test ${xorg_cv_cc_flag_unused_command_line_argument+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unused_command_line_argument=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unused_command_line_argument=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
-$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
 	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -10709,29 +11052,31 @@ found="no"
 
 		CFLAGS="$CFLAGS -Wsequence-point"
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wsequence-point" >&5
-$as_echo_n "checking if $CC supports -Wsequence-point... " >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wsequence-point" >&5
+printf %s "checking if $CC supports -Wsequence-point... " >&6; }
 		cacheid=xorg_cv_cc_flag__Wsequence_point
-		if eval \${$cacheid+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+		if eval test \${$cacheid+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   eval $cacheid=yes
-else
+else $as_nop
   eval $cacheid=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 fi
 
@@ -10739,8 +11084,8 @@ fi
 		CFLAGS="$xorg_testset_save_CFLAGS"
 
 		eval supported=\$$cacheid
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
-$as_echo "$supported" >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+printf "%s\n" "$supported" >&6; }
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Wsequence-point"
 			found="yes"
@@ -10765,24 +11110,26 @@ xorg_testset_save_CFLAGS="$CFLAGS"
 
 if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
 	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
-$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
-if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
+printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
+if test ${xorg_cv_cc_flag_unknown_warning_option+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unknown_warning_option=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unknown_warning_option=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
-$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
 	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -10792,24 +11139,26 @@ if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
 		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 	fi
 	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
-$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
-if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
+printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
+if test ${xorg_cv_cc_flag_unused_command_line_argument+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unused_command_line_argument=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unused_command_line_argument=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
-$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
 	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -10827,29 +11176,31 @@ found="no"
 
 		CFLAGS="$CFLAGS -Wreturn-type"
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wreturn-type" >&5
-$as_echo_n "checking if $CC supports -Wreturn-type... " >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wreturn-type" >&5
+printf %s "checking if $CC supports -Wreturn-type... " >&6; }
 		cacheid=xorg_cv_cc_flag__Wreturn_type
-		if eval \${$cacheid+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+		if eval test \${$cacheid+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   eval $cacheid=yes
-else
+else $as_nop
   eval $cacheid=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 fi
 
@@ -10857,8 +11208,8 @@ fi
 		CFLAGS="$xorg_testset_save_CFLAGS"
 
 		eval supported=\$$cacheid
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
-$as_echo "$supported" >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+printf "%s\n" "$supported" >&6; }
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Wreturn-type"
 			found="yes"
@@ -10883,24 +11234,26 @@ xorg_testset_save_CFLAGS="$CFLAGS"
 
 if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
 	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
-$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
-if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
+printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
+if test ${xorg_cv_cc_flag_unknown_warning_option+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unknown_warning_option=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unknown_warning_option=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
-$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
 	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -10910,24 +11263,26 @@ if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
 		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 	fi
 	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
-$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
-if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
+printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
+if test ${xorg_cv_cc_flag_unused_command_line_argument+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unused_command_line_argument=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unused_command_line_argument=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
-$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
 	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -10945,29 +11300,31 @@ found="no"
 
 		CFLAGS="$CFLAGS -Wtrigraphs"
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wtrigraphs" >&5
-$as_echo_n "checking if $CC supports -Wtrigraphs... " >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wtrigraphs" >&5
+printf %s "checking if $CC supports -Wtrigraphs... " >&6; }
 		cacheid=xorg_cv_cc_flag__Wtrigraphs
-		if eval \${$cacheid+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+		if eval test \${$cacheid+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   eval $cacheid=yes
-else
+else $as_nop
   eval $cacheid=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 fi
 
@@ -10975,8 +11332,8 @@ fi
 		CFLAGS="$xorg_testset_save_CFLAGS"
 
 		eval supported=\$$cacheid
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
-$as_echo "$supported" >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+printf "%s\n" "$supported" >&6; }
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Wtrigraphs"
 			found="yes"
@@ -11001,24 +11358,26 @@ xorg_testset_save_CFLAGS="$CFLAGS"
 
 if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
 	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
-$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
-if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
+printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
+if test ${xorg_cv_cc_flag_unknown_warning_option+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unknown_warning_option=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unknown_warning_option=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
-$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
 	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -11028,24 +11387,26 @@ if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
 		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 	fi
 	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
-$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
-if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
+printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
+if test ${xorg_cv_cc_flag_unused_command_line_argument+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unused_command_line_argument=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unused_command_line_argument=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
-$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
 	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -11063,29 +11424,31 @@ found="no"
 
 		CFLAGS="$CFLAGS -Warray-bounds"
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Warray-bounds" >&5
-$as_echo_n "checking if $CC supports -Warray-bounds... " >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Warray-bounds" >&5
+printf %s "checking if $CC supports -Warray-bounds... " >&6; }
 		cacheid=xorg_cv_cc_flag__Warray_bounds
-		if eval \${$cacheid+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+		if eval test \${$cacheid+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   eval $cacheid=yes
-else
+else $as_nop
   eval $cacheid=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 fi
 
@@ -11093,8 +11456,8 @@ fi
 		CFLAGS="$xorg_testset_save_CFLAGS"
 
 		eval supported=\$$cacheid
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
-$as_echo "$supported" >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+printf "%s\n" "$supported" >&6; }
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Warray-bounds"
 			found="yes"
@@ -11119,24 +11482,26 @@ xorg_testset_save_CFLAGS="$CFLAGS"
 
 if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
 	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
-$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
-if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
+printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
+if test ${xorg_cv_cc_flag_unknown_warning_option+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unknown_warning_option=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unknown_warning_option=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
-$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
 	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -11146,24 +11511,26 @@ if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
 		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 	fi
 	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
-$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
-if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
+printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
+if test ${xorg_cv_cc_flag_unused_command_line_argument+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unused_command_line_argument=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unused_command_line_argument=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
-$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
 	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -11181,29 +11548,31 @@ found="no"
 
 		CFLAGS="$CFLAGS -Wwrite-strings"
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wwrite-strings" >&5
-$as_echo_n "checking if $CC supports -Wwrite-strings... " >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wwrite-strings" >&5
+printf %s "checking if $CC supports -Wwrite-strings... " >&6; }
 		cacheid=xorg_cv_cc_flag__Wwrite_strings
-		if eval \${$cacheid+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+		if eval test \${$cacheid+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   eval $cacheid=yes
-else
+else $as_nop
   eval $cacheid=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 fi
 
@@ -11211,8 +11580,8 @@ fi
 		CFLAGS="$xorg_testset_save_CFLAGS"
 
 		eval supported=\$$cacheid
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
-$as_echo "$supported" >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+printf "%s\n" "$supported" >&6; }
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Wwrite-strings"
 			found="yes"
@@ -11237,24 +11606,26 @@ xorg_testset_save_CFLAGS="$CFLAGS"
 
 if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
 	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
-$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
-if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
+printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
+if test ${xorg_cv_cc_flag_unknown_warning_option+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unknown_warning_option=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unknown_warning_option=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
-$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
 	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -11264,24 +11635,26 @@ if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
 		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 	fi
 	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
-$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
-if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
+printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
+if test ${xorg_cv_cc_flag_unused_command_line_argument+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unused_command_line_argument=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unused_command_line_argument=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
-$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
 	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -11299,29 +11672,31 @@ found="no"
 
 		CFLAGS="$CFLAGS -Waddress"
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Waddress" >&5
-$as_echo_n "checking if $CC supports -Waddress... " >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Waddress" >&5
+printf %s "checking if $CC supports -Waddress... " >&6; }
 		cacheid=xorg_cv_cc_flag__Waddress
-		if eval \${$cacheid+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+		if eval test \${$cacheid+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   eval $cacheid=yes
-else
+else $as_nop
   eval $cacheid=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 fi
 
@@ -11329,8 +11704,8 @@ fi
 		CFLAGS="$xorg_testset_save_CFLAGS"
 
 		eval supported=\$$cacheid
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
-$as_echo "$supported" >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+printf "%s\n" "$supported" >&6; }
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Waddress"
 			found="yes"
@@ -11355,24 +11730,26 @@ xorg_testset_save_CFLAGS="$CFLAGS"
 
 if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
 	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
-$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
-if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
+printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
+if test ${xorg_cv_cc_flag_unknown_warning_option+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unknown_warning_option=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unknown_warning_option=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
-$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
 	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -11382,24 +11759,26 @@ if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
 		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 	fi
 	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
-$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
-if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
+printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
+if test ${xorg_cv_cc_flag_unused_command_line_argument+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unused_command_line_argument=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unused_command_line_argument=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
-$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
 	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -11417,29 +11796,31 @@ found="no"
 
 		CFLAGS="$CFLAGS -Wint-to-pointer-cast"
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wint-to-pointer-cast" >&5
-$as_echo_n "checking if $CC supports -Wint-to-pointer-cast... " >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wint-to-pointer-cast" >&5
+printf %s "checking if $CC supports -Wint-to-pointer-cast... " >&6; }
 		cacheid=xorg_cv_cc_flag__Wint_to_pointer_cast
-		if eval \${$cacheid+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+		if eval test \${$cacheid+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   eval $cacheid=yes
-else
+else $as_nop
   eval $cacheid=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 fi
 
@@ -11447,8 +11828,8 @@ fi
 		CFLAGS="$xorg_testset_save_CFLAGS"
 
 		eval supported=\$$cacheid
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
-$as_echo "$supported" >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+printf "%s\n" "$supported" >&6; }
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Wint-to-pointer-cast"
 			found="yes"
@@ -11473,24 +11854,26 @@ xorg_testset_save_CFLAGS="$CFLAGS"
 
 if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
 	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
-$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
-if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
+printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
+if test ${xorg_cv_cc_flag_unknown_warning_option+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unknown_warning_option=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unknown_warning_option=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
-$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
 	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -11500,24 +11883,26 @@ if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
 		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 	fi
 	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
-$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
-if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
+printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
+if test ${xorg_cv_cc_flag_unused_command_line_argument+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unused_command_line_argument=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unused_command_line_argument=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
-$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
 	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -11535,29 +11920,31 @@ found="no"
 
 		CFLAGS="$CFLAGS -Wpointer-to-int-cast"
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wpointer-to-int-cast" >&5
-$as_echo_n "checking if $CC supports -Wpointer-to-int-cast... " >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wpointer-to-int-cast" >&5
+printf %s "checking if $CC supports -Wpointer-to-int-cast... " >&6; }
 		cacheid=xorg_cv_cc_flag__Wpointer_to_int_cast
-		if eval \${$cacheid+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+		if eval test \${$cacheid+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   eval $cacheid=yes
-else
+else $as_nop
   eval $cacheid=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 fi
 
@@ -11565,8 +11952,8 @@ fi
 		CFLAGS="$xorg_testset_save_CFLAGS"
 
 		eval supported=\$$cacheid
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
-$as_echo "$supported" >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+printf "%s\n" "$supported" >&6; }
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Wpointer-to-int-cast"
 			found="yes"
@@ -11595,9 +11982,10 @@ fi
 
 
 # Check whether --enable-strict-compilation was given.
-if test "${enable_strict_compilation+set}" = set; then :
+if test ${enable_strict_compilation+y}
+then :
   enableval=$enable_strict_compilation; STRICT_COMPILE=$enableval
-else
+else $as_nop
   STRICT_COMPILE=no
 fi
 
@@ -11624,24 +12012,26 @@ xorg_testset_save_CFLAGS="$CFLAGS"
 
 if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
 	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
-$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
-if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
+printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
+if test ${xorg_cv_cc_flag_unknown_warning_option+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unknown_warning_option=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unknown_warning_option=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
-$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
 	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -11651,24 +12041,26 @@ if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
 		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 	fi
 	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
-$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
-if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
+printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
+if test ${xorg_cv_cc_flag_unused_command_line_argument+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unused_command_line_argument=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unused_command_line_argument=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
-$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
 	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -11686,29 +12078,31 @@ found="no"
 
 		CFLAGS="$CFLAGS -pedantic"
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -pedantic" >&5
-$as_echo_n "checking if $CC supports -pedantic... " >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -pedantic" >&5
+printf %s "checking if $CC supports -pedantic... " >&6; }
 		cacheid=xorg_cv_cc_flag__pedantic
-		if eval \${$cacheid+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+		if eval test \${$cacheid+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   eval $cacheid=yes
-else
+else $as_nop
   eval $cacheid=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 fi
 
@@ -11716,8 +12110,8 @@ fi
 		CFLAGS="$xorg_testset_save_CFLAGS"
 
 		eval supported=\$$cacheid
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
-$as_echo "$supported" >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+printf "%s\n" "$supported" >&6; }
 		if test "$supported" = "yes" ; then
 			STRICT_CFLAGS="$STRICT_CFLAGS -pedantic"
 			found="yes"
@@ -11742,24 +12136,26 @@ xorg_testset_save_CFLAGS="$CFLAGS"
 
 if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
 	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
-$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
-if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
+printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
+if test ${xorg_cv_cc_flag_unknown_warning_option+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unknown_warning_option=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unknown_warning_option=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
-$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
 	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -11769,24 +12165,26 @@ if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
 		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 	fi
 	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
-$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
-if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
+printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
+if test ${xorg_cv_cc_flag_unused_command_line_argument+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unused_command_line_argument=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unused_command_line_argument=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
-$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
 	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -11804,29 +12202,31 @@ found="no"
 
 		CFLAGS="$CFLAGS -Werror"
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror" >&5
-$as_echo_n "checking if $CC supports -Werror... " >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror" >&5
+printf %s "checking if $CC supports -Werror... " >&6; }
 		cacheid=xorg_cv_cc_flag__Werror
-		if eval \${$cacheid+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+		if eval test \${$cacheid+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   eval $cacheid=yes
-else
+else $as_nop
   eval $cacheid=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 fi
 
@@ -11834,8 +12234,8 @@ fi
 		CFLAGS="$xorg_testset_save_CFLAGS"
 
 		eval supported=\$$cacheid
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
-$as_echo "$supported" >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+printf "%s\n" "$supported" >&6; }
 		if test "$supported" = "yes" ; then
 			STRICT_CFLAGS="$STRICT_CFLAGS -Werror"
 			found="yes"
@@ -11853,29 +12253,31 @@ $as_echo "$supported" >&6; }
 
 		CFLAGS="$CFLAGS -errwarn"
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -errwarn" >&5
-$as_echo_n "checking if $CC supports -errwarn... " >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -errwarn" >&5
+printf %s "checking if $CC supports -errwarn... " >&6; }
 		cacheid=xorg_cv_cc_flag__errwarn
-		if eval \${$cacheid+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+		if eval test \${$cacheid+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   eval $cacheid=yes
-else
+else $as_nop
   eval $cacheid=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 fi
 
@@ -11883,8 +12285,8 @@ fi
 		CFLAGS="$xorg_testset_save_CFLAGS"
 
 		eval supported=\$$cacheid
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
-$as_echo "$supported" >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+printf "%s\n" "$supported" >&6; }
 		if test "$supported" = "yes" ; then
 			STRICT_CFLAGS="$STRICT_CFLAGS -errwarn"
 			found="yes"
@@ -11912,24 +12314,26 @@ xorg_testset_save_CFLAGS="$CFLAGS"
 
 if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
 	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
-$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
-if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
+printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
+if test ${xorg_cv_cc_flag_unknown_warning_option+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unknown_warning_option=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unknown_warning_option=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
-$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
 	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -11939,24 +12343,26 @@ if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
 		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 	fi
 	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
-$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
-if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
+printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
+if test ${xorg_cv_cc_flag_unused_command_line_argument+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   xorg_cv_cc_flag_unused_command_line_argument=yes
-else
+else $as_nop
   xorg_cv_cc_flag_unused_command_line_argument=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
-$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
+printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
 	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
 	CFLAGS="$xorg_testset_save_CFLAGS"
 fi
@@ -11974,29 +12380,31 @@ found="no"
 
 		CFLAGS="$CFLAGS -Werror=attributes"
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=attributes" >&5
-$as_echo_n "checking if $CC supports -Werror=attributes... " >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=attributes" >&5
+printf %s "checking if $CC supports -Werror=attributes... " >&6; }
 		cacheid=xorg_cv_cc_flag__Werror_attributes
-		if eval \${$cacheid+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+		if eval test \${$cacheid+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   eval $cacheid=yes
-else
+else $as_nop
   eval $cacheid=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 fi
 
@@ -12004,8 +12412,8 @@ fi
 		CFLAGS="$xorg_testset_save_CFLAGS"
 
 		eval supported=\$$cacheid
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
-$as_echo "$supported" >&6; }
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+printf "%s\n" "$supported" >&6; }
 		if test "$supported" = "yes" ; then
 			STRICT_CFLAGS="$STRICT_CFLAGS -Werror=attributes"
 			found="yes"
@@ -12033,18 +12441,14 @@ _ACEOF
 		PVM="0"
 	fi
 
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION_MINOR $PVM
-_ACEOF
+printf "%s\n" "#define PACKAGE_VERSION_MINOR $PVM" >>confdefs.h
 
 	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
 	if test "x$PVP" = "x"; then
 		PVP="0"
 	fi
 
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION_PATCHLEVEL $PVP
-_ACEOF
+printf "%s\n" "#define PACKAGE_VERSION_PATCHLEVEL $PVP" >>confdefs.h
 
 
 
@@ -12074,11 +12478,12 @@ case $host_os in
         # Solaris 2.0 - 11.3 use SysV man page section numbers, so we
         # check for a man page file found in later versions that use
         # traditional section numbers instead
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /usr/share/man/man7/attributes.7" >&5
-$as_echo_n "checking for /usr/share/man/man7/attributes.7... " >&6; }
-if ${ac_cv_file__usr_share_man_man7_attributes_7+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for /usr/share/man/man7/attributes.7" >&5
+printf %s "checking for /usr/share/man/man7/attributes.7... " >&6; }
+if test ${ac_cv_file__usr_share_man_man7_attributes_7+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   test "$cross_compiling" = yes &&
   as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
 if test -r "/usr/share/man/man7/attributes.7"; then
@@ -12087,11 +12492,12 @@ else
   ac_cv_file__usr_share_man_man7_attributes_7=no
 fi
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__usr_share_man_man7_attributes_7" >&5
-$as_echo "$ac_cv_file__usr_share_man_man7_attributes_7" >&6; }
-if test "x$ac_cv_file__usr_share_man_man7_attributes_7" = xyes; then :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__usr_share_man_man7_attributes_7" >&5
+printf "%s\n" "$ac_cv_file__usr_share_man_man7_attributes_7" >&6; }
+if test "x$ac_cv_file__usr_share_man_man7_attributes_7" = xyes
+then :
   SYSV_MAN_SECTIONS=false
-else
+else $as_nop
   SYSV_MAN_SECTIONS=true
 fi
 
@@ -12186,7 +12592,8 @@ MAN_SUBSTS="\
 
 
 # Check whether --enable-silent-rules was given.
-if test "${enable_silent_rules+set}" = set; then :
+if test ${enable_silent_rules+y}
+then :
   enableval=$enable_silent_rules;
 fi
 
@@ -12196,12 +12603,13 @@ case $enable_silent_rules in # (((
     *) AM_DEFAULT_VERBOSITY=0;;
 esac
 am_make=${MAKE-make}
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
-$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
-if ${am_cv_make_support_nested_variables+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if $as_echo 'TRUE=$(BAR$(V))
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
+printf %s "checking whether $am_make supports nested variables... " >&6; }
+if test ${am_cv_make_support_nested_variables+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if printf "%s\n" 'TRUE=$(BAR$(V))
 BAR0=false
 BAR1=true
 V=1
@@ -12213,8 +12621,8 @@ else
   am_cv_make_support_nested_variables=no
 fi
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
-$as_echo "$am_cv_make_support_nested_variables" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
+printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
 if test $am_cv_make_support_nested_variables = yes; then
     AM_V='$(V)'
   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
@@ -12231,9 +12639,10 @@ AM_BACKSLASH='\'
 
 
 # Check whether --with-doxygen was given.
-if test "${with_doxygen+set}" = set; then :
+if test ${with_doxygen+y}
+then :
   withval=$with_doxygen; use_doxygen=$withval
-else
+else $as_nop
   use_doxygen=auto
 fi
 
@@ -12242,11 +12651,12 @@ fi
 if test "x$use_doxygen" = x"auto"; then
    # Extract the first word of "doxygen", so it can be a program name with args.
 set dummy doxygen; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_DOXYGEN+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_DOXYGEN+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   case $DOXYGEN in
   [\\/]* | ?:[\\/]*)
   ac_cv_path_DOXYGEN="$DOXYGEN" # Let the user override the test with a path.
@@ -12256,11 +12666,15 @@ else
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_DOXYGEN="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_path_DOXYGEN="$as_dir$ac_word$ac_exec_ext"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -12272,17 +12686,17 @@ esac
 fi
 DOXYGEN=$ac_cv_path_DOXYGEN
 if test -n "$DOXYGEN"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOXYGEN" >&5
-$as_echo "$DOXYGEN" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DOXYGEN" >&5
+printf "%s\n" "$DOXYGEN" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
    if test "x$DOXYGEN" = "x"; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: doxygen not found - documentation targets will be skipped" >&5
-$as_echo "$as_me: WARNING: doxygen not found - documentation targets will be skipped" >&2;}
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: doxygen not found - documentation targets will be skipped" >&5
+printf "%s\n" "$as_me: WARNING: doxygen not found - documentation targets will be skipped" >&2;}
 	have_doxygen=no
    else
         have_doxygen=yes
@@ -12290,11 +12704,12 @@ $as_echo "$as_me: WARNING: doxygen not found - documentation targets will be ski
 elif test "x$use_doxygen" = x"yes" ; then
    # Extract the first word of "doxygen", so it can be a program name with args.
 set dummy doxygen; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_DOXYGEN+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_DOXYGEN+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   case $DOXYGEN in
   [\\/]* | ?:[\\/]*)
   ac_cv_path_DOXYGEN="$DOXYGEN" # Let the user override the test with a path.
@@ -12304,11 +12719,15 @@ else
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_DOXYGEN="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_path_DOXYGEN="$as_dir$ac_word$ac_exec_ext"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -12320,11 +12739,11 @@ esac
 fi
 DOXYGEN=$ac_cv_path_DOXYGEN
 if test -n "$DOXYGEN"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOXYGEN" >&5
-$as_echo "$DOXYGEN" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DOXYGEN" >&5
+printf "%s\n" "$DOXYGEN" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
@@ -12334,8 +12753,8 @@ fi
    have_doxygen=yes
 elif test "x$use_doxygen" = x"no" ; then
    if test "x$DOXYGEN" != "x"; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ignoring DOXYGEN environment variable since --with-doxygen=no was specified" >&5
-$as_echo "$as_me: WARNING: ignoring DOXYGEN environment variable since --with-doxygen=no was specified" >&2;}
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: ignoring DOXYGEN environment variable since --with-doxygen=no was specified" >&5
+printf "%s\n" "$as_me: WARNING: ignoring DOXYGEN environment variable since --with-doxygen=no was specified" >&2;}
    fi
    have_doxygen=no
 else
@@ -12343,19 +12762,19 @@ else
 fi
 if test "$have_doxygen" = yes; then
     # scrape the doxygen version
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking the doxygen version" >&5
-$as_echo_n "checking the doxygen version... " >&6; }
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the doxygen version" >&5
+printf %s "checking the doxygen version... " >&6; }
     doxygen_version=`$DOXYGEN --version 2>/dev/null`
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $doxygen_version" >&5
-$as_echo "$doxygen_version" >&6; }
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $doxygen_version" >&5
+printf "%s\n" "$doxygen_version" >&6; }
     as_arg_v1=$doxygen_version
 as_arg_v2=1.6.1
 awk "$as_awk_strverscmp" v1="$as_arg_v1" v2="$as_arg_v2" /dev/null
 case $? in #(
   1) :
     if test "x$use_doxygen" = xauto; then
-            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: doxygen version $doxygen_version found, but 1.6.1 needed" >&5
-$as_echo "$as_me: WARNING: doxygen version $doxygen_version found, but 1.6.1 needed" >&2;}
+            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: doxygen version $doxygen_version found, but 1.6.1 needed" >&5
+printf "%s\n" "$as_me: WARNING: doxygen version $doxygen_version found, but 1.6.1 needed" >&2;}
             have_doxygen=no
         else
             as_fn_error $? "doxygen version $doxygen_version found, but 1.6.1 needed" "$LINENO" 5
@@ -12373,11 +12792,12 @@ HAVE_DOT=no
 if test "x$have_doxygen" = "xyes"; then
   # Extract the first word of "dot", so it can be a program name with args.
 set dummy dot; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_DOT+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_DOT+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   case $DOT in
   [\\/]* | ?:[\\/]*)
   ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
@@ -12387,11 +12807,15 @@ else
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_path_DOT="$as_dir$ac_word$ac_exec_ext"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -12403,11 +12827,11 @@ esac
 fi
 DOT=$ac_cv_path_DOT
 if test -n "$DOT"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
-$as_echo "$DOT" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
+printf "%s\n" "$DOT" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
@@ -12435,14 +12859,14 @@ fi
 
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X.Org SGML entities >= 1.8" >&5
-$as_echo_n "checking for X.Org SGML entities >= 1.8... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for X.Org SGML entities >= 1.8" >&5
+printf %s "checking for X.Org SGML entities >= 1.8... " >&6; }
 XORG_SGML_PATH=
 if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xorg-sgml-doctools >= 1.8\""; } >&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xorg-sgml-doctools >= 1.8\""; } >&5
   ($PKG_CONFIG --exists --print-errors "xorg-sgml-doctools >= 1.8") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
   XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`
 else
@@ -12453,13 +12877,13 @@ fi
 # Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing
 # the path and the name of the doc stylesheet
 if test "x$XORG_SGML_PATH" != "x" ; then
-   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XORG_SGML_PATH" >&5
-$as_echo "$XORG_SGML_PATH" >&6; }
+   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XORG_SGML_PATH" >&5
+printf "%s\n" "$XORG_SGML_PATH" >&6; }
    STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11
    XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl
 else
-   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
@@ -12477,9 +12901,10 @@ fi
 
 
 # Check whether --enable-docs was given.
-if test "${enable_docs+set}" = set; then :
+if test ${enable_docs+y}
+then :
   enableval=$enable_docs; build_docs=$enableval
-else
+else $as_nop
   build_docs=yes
 fi
 
@@ -12492,17 +12917,18 @@ else
   ENABLE_DOCS_FALSE=
 fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build documentation" >&5
-$as_echo_n "checking whether to build documentation... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $build_docs" >&5
-$as_echo "$build_docs" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build documentation" >&5
+printf %s "checking whether to build documentation... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $build_docs" >&5
+printf "%s\n" "$build_docs" >&6; }
 
 
 
 # Check whether --enable-devel-docs was given.
-if test "${enable_devel_docs+set}" = set; then :
+if test ${enable_devel_docs+y}
+then :
   enableval=$enable_devel_docs; build_devel_docs=$enableval
-else
+else $as_nop
   build_devel_docs=yes
 fi
 
@@ -12515,19 +12941,20 @@ else
   ENABLE_DEVEL_DOCS_FALSE=
 fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build developer documentation" >&5
-$as_echo_n "checking whether to build developer documentation... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $build_devel_docs" >&5
-$as_echo "$build_devel_docs" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build developer documentation" >&5
+printf %s "checking whether to build developer documentation... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $build_devel_docs" >&5
+printf "%s\n" "$build_devel_docs" >&6; }
 
 
 
 
 
 # Check whether --with-xmlto was given.
-if test "${with_xmlto+set}" = set; then :
+if test ${with_xmlto+y}
+then :
   withval=$with_xmlto; use_xmlto=$withval
-else
+else $as_nop
   use_xmlto=auto
 fi
 
@@ -12536,11 +12963,12 @@ fi
 if test "x$use_xmlto" = x"auto"; then
    # Extract the first word of "xmlto", so it can be a program name with args.
 set dummy xmlto; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_XMLTO+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_XMLTO+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   case $XMLTO in
   [\\/]* | ?:[\\/]*)
   ac_cv_path_XMLTO="$XMLTO" # Let the user override the test with a path.
@@ -12550,11 +12978,15 @@ else
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_XMLTO="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_path_XMLTO="$as_dir$ac_word$ac_exec_ext"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -12566,17 +12998,17 @@ esac
 fi
 XMLTO=$ac_cv_path_XMLTO
 if test -n "$XMLTO"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLTO" >&5
-$as_echo "$XMLTO" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XMLTO" >&5
+printf "%s\n" "$XMLTO" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
    if test "x$XMLTO" = "x"; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: xmlto not found - documentation targets will be skipped" >&5
-$as_echo "$as_me: WARNING: xmlto not found - documentation targets will be skipped" >&2;}
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: xmlto not found - documentation targets will be skipped" >&5
+printf "%s\n" "$as_me: WARNING: xmlto not found - documentation targets will be skipped" >&2;}
 	have_xmlto=no
    else
         have_xmlto=yes
@@ -12584,11 +13016,12 @@ $as_echo "$as_me: WARNING: xmlto not found - documentation targets will be skipp
 elif test "x$use_xmlto" = x"yes" ; then
    # Extract the first word of "xmlto", so it can be a program name with args.
 set dummy xmlto; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_XMLTO+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_XMLTO+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   case $XMLTO in
   [\\/]* | ?:[\\/]*)
   ac_cv_path_XMLTO="$XMLTO" # Let the user override the test with a path.
@@ -12598,11 +13031,15 @@ else
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_XMLTO="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_path_XMLTO="$as_dir$ac_word$ac_exec_ext"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -12614,11 +13051,11 @@ esac
 fi
 XMLTO=$ac_cv_path_XMLTO
 if test -n "$XMLTO"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLTO" >&5
-$as_echo "$XMLTO" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XMLTO" >&5
+printf "%s\n" "$XMLTO" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
@@ -12628,8 +13065,8 @@ fi
    have_xmlto=yes
 elif test "x$use_xmlto" = x"no" ; then
    if test "x$XMLTO" != "x"; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ignoring XMLTO environment variable since --with-xmlto=no was specified" >&5
-$as_echo "$as_me: WARNING: ignoring XMLTO environment variable since --with-xmlto=no was specified" >&2;}
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: ignoring XMLTO environment variable since --with-xmlto=no was specified" >&5
+printf "%s\n" "$as_me: WARNING: ignoring XMLTO environment variable since --with-xmlto=no was specified" >&2;}
    fi
    have_xmlto=no
 else
@@ -12639,19 +13076,19 @@ fi
 # Test for a minimum version of xmlto, if provided.
 if test "$have_xmlto" = yes; then
     # scrape the xmlto version
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking the xmlto version" >&5
-$as_echo_n "checking the xmlto version... " >&6; }
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the xmlto version" >&5
+printf %s "checking the xmlto version... " >&6; }
     xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3`
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xmlto_version" >&5
-$as_echo "$xmlto_version" >&6; }
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xmlto_version" >&5
+printf "%s\n" "$xmlto_version" >&6; }
     as_arg_v1=$xmlto_version
 as_arg_v2=0.0.20
 awk "$as_awk_strverscmp" v1="$as_arg_v1" v2="$as_arg_v2" /dev/null
 case $? in #(
   1) :
     if test "x$use_xmlto" = xauto; then
-            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: xmlto version $xmlto_version found, but 0.0.20 needed" >&5
-$as_echo "$as_me: WARNING: xmlto version $xmlto_version found, but 0.0.20 needed" >&2;}
+            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: xmlto version $xmlto_version found, but 0.0.20 needed" >&5
+printf "%s\n" "$as_me: WARNING: xmlto version $xmlto_version found, but 0.0.20 needed" >&2;}
             have_xmlto=no
         else
             as_fn_error $? "xmlto version $xmlto_version found, but 0.0.20 needed" "$LINENO" 5
@@ -12674,19 +13111,22 @@ fi
 have_xmlto_text=no
 cat > conftest.xml << "EOF"
 EOF
-if test "$have_xmlto" = yes; then :
-  if $XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1; then :
+if test "$have_xmlto" = yes
+then :
+  if $XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1
+then :
   have_xmlto_text=yes
-else
+else $as_nop
   # Try it again with a non-empty XML file.
               cat > conftest.xml << "EOF"
 <x></x>
 EOF
-              if $XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1; then :
+              if $XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1
+then :
   have_xmlto_text=yes
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: xmlto cannot generate text format, this format skipped" >&5
-$as_echo "$as_me: WARNING: xmlto cannot generate text format, this format skipped" >&2;}
+else $as_nop
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: xmlto cannot generate text format, this format skipped" >&5
+printf "%s\n" "$as_me: WARNING: xmlto cannot generate text format, this format skipped" >&2;}
 fi
 fi
 fi
@@ -12713,9 +13153,10 @@ fi
 
 
 # Check whether --with-fop was given.
-if test "${with_fop+set}" = set; then :
+if test ${with_fop+y}
+then :
   withval=$with_fop; use_fop=$withval
-else
+else $as_nop
   use_fop=auto
 fi
 
@@ -12724,11 +13165,12 @@ fi
 if test "x$use_fop" = x"auto"; then
    # Extract the first word of "fop", so it can be a program name with args.
 set dummy fop; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_FOP+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_FOP+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   case $FOP in
   [\\/]* | ?:[\\/]*)
   ac_cv_path_FOP="$FOP" # Let the user override the test with a path.
@@ -12738,11 +13180,15 @@ else
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_FOP="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_path_FOP="$as_dir$ac_word$ac_exec_ext"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -12754,17 +13200,17 @@ esac
 fi
 FOP=$ac_cv_path_FOP
 if test -n "$FOP"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
-$as_echo "$FOP" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
+printf "%s\n" "$FOP" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
    if test "x$FOP" = "x"; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: fop not found - documentation targets will be skipped" >&5
-$as_echo "$as_me: WARNING: fop not found - documentation targets will be skipped" >&2;}
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: fop not found - documentation targets will be skipped" >&5
+printf "%s\n" "$as_me: WARNING: fop not found - documentation targets will be skipped" >&2;}
 	have_fop=no
    else
         have_fop=yes
@@ -12772,11 +13218,12 @@ $as_echo "$as_me: WARNING: fop not found - documentation targets will be skipped
 elif test "x$use_fop" = x"yes" ; then
    # Extract the first word of "fop", so it can be a program name with args.
 set dummy fop; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_FOP+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_FOP+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   case $FOP in
   [\\/]* | ?:[\\/]*)
   ac_cv_path_FOP="$FOP" # Let the user override the test with a path.
@@ -12786,11 +13233,15 @@ else
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_FOP="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_path_FOP="$as_dir$ac_word$ac_exec_ext"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -12802,11 +13253,11 @@ esac
 fi
 FOP=$ac_cv_path_FOP
 if test -n "$FOP"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
-$as_echo "$FOP" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
+printf "%s\n" "$FOP" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
@@ -12816,8 +13267,8 @@ fi
    have_fop=yes
 elif test "x$use_fop" = x"no" ; then
    if test "x$FOP" != "x"; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ignoring FOP environment variable since --with-fop=no was specified" >&5
-$as_echo "$as_me: WARNING: ignoring FOP environment variable since --with-fop=no was specified" >&2;}
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: ignoring FOP environment variable since --with-fop=no was specified" >&5
+printf "%s\n" "$as_me: WARNING: ignoring FOP environment variable since --with-fop=no was specified" >&2;}
    fi
    have_fop=no
 else
@@ -12842,9 +13293,10 @@ fi
 
 
 # Check whether --with-xsltproc was given.
-if test "${with_xsltproc+set}" = set; then :
+if test ${with_xsltproc+y}
+then :
   withval=$with_xsltproc; use_xsltproc=$withval
-else
+else $as_nop
   use_xsltproc=auto
 fi
 
@@ -12853,11 +13305,12 @@ fi
 if test "x$use_xsltproc" = x"auto"; then
    # Extract the first word of "xsltproc", so it can be a program name with args.
 set dummy xsltproc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_XSLTPROC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_XSLTPROC+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   case $XSLTPROC in
   [\\/]* | ?:[\\/]*)
   ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
@@ -12867,11 +13320,15 @@ else
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_path_XSLTPROC="$as_dir$ac_word$ac_exec_ext"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -12883,17 +13340,17 @@ esac
 fi
 XSLTPROC=$ac_cv_path_XSLTPROC
 if test -n "$XSLTPROC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
-$as_echo "$XSLTPROC" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
+printf "%s\n" "$XSLTPROC" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
    if test "x$XSLTPROC" = "x"; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: xsltproc not found - cannot transform XML documents" >&5
-$as_echo "$as_me: WARNING: xsltproc not found - cannot transform XML documents" >&2;}
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: xsltproc not found - cannot transform XML documents" >&5
+printf "%s\n" "$as_me: WARNING: xsltproc not found - cannot transform XML documents" >&2;}
 	have_xsltproc=no
    else
         have_xsltproc=yes
@@ -12901,11 +13358,12 @@ $as_echo "$as_me: WARNING: xsltproc not found - cannot transform XML documents"
 elif test "x$use_xsltproc" = x"yes" ; then
    # Extract the first word of "xsltproc", so it can be a program name with args.
 set dummy xsltproc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_XSLTPROC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_XSLTPROC+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   case $XSLTPROC in
   [\\/]* | ?:[\\/]*)
   ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
@@ -12915,11 +13373,15 @@ else
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_path_XSLTPROC="$as_dir$ac_word$ac_exec_ext"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -12931,11 +13393,11 @@ esac
 fi
 XSLTPROC=$ac_cv_path_XSLTPROC
 if test -n "$XSLTPROC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
-$as_echo "$XSLTPROC" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
+printf "%s\n" "$XSLTPROC" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
@@ -12945,8 +13407,8 @@ fi
    have_xsltproc=yes
 elif test "x$use_xsltproc" = x"no" ; then
    if test "x$XSLTPROC" != "x"; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ignoring XSLTPROC environment variable since --with-xsltproc=no was specified" >&5
-$as_echo "$as_me: WARNING: ignoring XSLTPROC environment variable since --with-xsltproc=no was specified" >&2;}
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: ignoring XSLTPROC environment variable since --with-xsltproc=no was specified" >&5
+printf "%s\n" "$as_me: WARNING: ignoring XSLTPROC environment variable since --with-xsltproc=no was specified" >&2;}
    fi
    have_xsltproc=no
 else
@@ -12970,11 +13432,12 @@ fi
 # Check for different types of support on different platforms
 case $host_os in
     solaris*)
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for umem_alloc in -lumem" >&5
-$as_echo_n "checking for umem_alloc in -lumem... " >&6; }
-if ${ac_cv_lib_umem_umem_alloc+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for umem_alloc in -lumem" >&5
+printf %s "checking for umem_alloc in -lumem... " >&6; }
+if test ${ac_cv_lib_umem_umem_alloc+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lumem  $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -12983,30 +13446,29 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* Override any GCC internal prototype to avoid an error.
    Use char because int might match the return type of a GCC
    builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
 char umem_alloc ();
 int
-main ()
+main (void)
 {
 return umem_alloc ();
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   ac_cv_lib_umem_umem_alloc=yes
-else
+else $as_nop
   ac_cv_lib_umem_umem_alloc=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_umem_umem_alloc" >&5
-$as_echo "$ac_cv_lib_umem_umem_alloc" >&6; }
-if test "x$ac_cv_lib_umem_umem_alloc" = xyes; then :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_umem_umem_alloc" >&5
+printf "%s\n" "$ac_cv_lib_umem_umem_alloc" >&6; }
+if test "x$ac_cv_lib_umem_umem_alloc" = xyes
+then :
   malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default'
 fi
 
@@ -13037,9 +13499,10 @@ XORG_MALLOC_DEBUG_ENV=$malloc_debug_env
 
 
 # Check whether --enable-unit-tests was given.
-if test "${enable_unit_tests+set}" = set; then :
+if test ${enable_unit_tests+y}
+then :
   enableval=$enable_unit_tests; enable_unit_tests=$enableval
-else
+else $as_nop
   enable_unit_tests=auto
 fi
 
@@ -13052,17 +13515,18 @@ else
   ENABLE_UNIT_TESTS_FALSE=
 fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build unit test cases" >&5
-$as_echo_n "checking whether to build unit test cases... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_unit_tests" >&5
-$as_echo "$enable_unit_tests" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build unit test cases" >&5
+printf %s "checking whether to build unit test cases... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_unit_tests" >&5
+printf "%s\n" "$enable_unit_tests" >&6; }
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -Wl,-wrap,exit" >&5
-$as_echo_n "checking whether the linker accepts -Wl,-wrap,exit... " >&6; }
-if ${xorg_cv_linker_flags__Wl__wrap_exit+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -Wl,-wrap,exit" >&5
+printf %s "checking whether the linker accepts -Wl,-wrap,exit... " >&6; }
+if test ${xorg_cv_linker_flags__Wl__wrap_exit+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
 
       ax_save_FLAGS=$LDFLAGS
       LDFLAGS="-Wl,-wrap,exit"
@@ -13071,26 +13535,27 @@ else
 #include <stdlib.h>
                       void __wrap_exit(int status) { return; }
 int
-main ()
+main (void)
 {
 exit(0);
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   xorg_cv_linker_flags__Wl__wrap_exit=yes
-else
+else $as_nop
   xorg_cv_linker_flags__Wl__wrap_exit=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
       LDFLAGS=$ax_save_FLAGS
 fi
 
 eval xorg_check_linker_flags=$xorg_cv_linker_flags__Wl__wrap_exit
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_check_linker_flags" >&5
-$as_echo "$xorg_check_linker_flags" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_check_linker_flags" >&5
+printf "%s\n" "$xorg_check_linker_flags" >&6; }
 if test "x$xorg_check_linker_flags" = xyes; then
 	have_ld_wrap=yes
 else
@@ -13138,8 +13603,6 @@ ac_config_headers="$ac_config_headers include/xkb-config.h"
 
 ac_config_headers="$ac_config_headers include/xwin-config.h"
 
-ac_config_headers="$ac_config_headers include/xwayland-config.h"
-
 ac_config_headers="$ac_config_headers include/version-config.h"
 
 
@@ -13152,11 +13615,12 @@ test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
 
 depcc="$CCAS"   am_compiler_list=
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
-$as_echo_n "checking dependency style of $depcc... " >&6; }
-if ${am_cv_CCAS_dependencies_compiler_type+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+printf %s "checking dependency style of $depcc... " >&6; }
+if test ${am_cv_CCAS_dependencies_compiler_type+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
   # We make a subdir and do the tests there.  Otherwise we can end up
   # making bogus files that we don't know about and never remove.  For
@@ -13261,8 +13725,8 @@ else
 fi
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CCAS_dependencies_compiler_type" >&5
-$as_echo "$am_cv_CCAS_dependencies_compiler_type" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CCAS_dependencies_compiler_type" >&5
+printf "%s\n" "$am_cv_CCAS_dependencies_compiler_type" >&6; }
 CCASDEPMODE=depmode=$am_cv_CCAS_dependencies_compiler_type
 
  if
@@ -13276,28 +13740,29 @@ else
 fi
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
-$as_echo_n "checking whether ln -s works... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
+printf %s "checking whether ln -s works... " >&6; }
 LN_S=$as_ln_s
 if test "$LN_S" = "ln -s"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
-$as_echo "no, using $LN_S" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
+printf "%s\n" "no, using $LN_S" >&6; }
 fi
 
 
 case `pwd` in
   *\ * | *\	*)
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
-$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
+printf "%s\n" "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
 esac
 
 
 
-macro_version='2.4.6'
-macro_revision='2.4.6'
+macro_version='2.4.7'
+macro_revision='2.4.7'
+
 
 
 
@@ -13334,8 +13799,8 @@ ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
-$as_echo_n "checking how to print strings... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
+printf %s "checking how to print strings... " >&6; }
 # Test print first, because it will be a builtin if present.
 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
    test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
@@ -13361,12 +13826,12 @@ func_echo_all ()
 }
 
 case $ECHO in
-  printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
-$as_echo "printf" >&6; } ;;
-  print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
-$as_echo "print -r" >&6; } ;;
-  *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
-$as_echo "cat" >&6; } ;;
+  printf*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: printf" >&5
+printf "%s\n" "printf" >&6; } ;;
+  print*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
+printf "%s\n" "print -r" >&6; } ;;
+  *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cat" >&5
+printf "%s\n" "cat" >&6; } ;;
 esac
 
 
@@ -13382,11 +13847,12 @@ esac
 
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
-$as_echo_n "checking for a sed that does not truncate output... " >&6; }
-if ${ac_cv_path_SED+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+printf %s "checking for a sed that does not truncate output... " >&6; }
+if test ${ac_cv_path_SED+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
      for ac_i in 1 2 3 4 5 6 7; do
        ac_script="$ac_script$as_nl$ac_script"
@@ -13400,10 +13866,15 @@ else
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_prog in sed gsed; do
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_prog in sed gsed
+   do
     for ac_exec_ext in '' $ac_executable_extensions; do
-      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
+      ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
       as_fn_executable_p "$ac_path_SED" || continue
 # Check for GNU ac_path_SED and select it if it is found.
   # Check for GNU $ac_path_SED
@@ -13412,13 +13883,13 @@ case `"$ac_path_SED" --version 2>&1` in
   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
 *)
   ac_count=0
-  $as_echo_n 0123456789 >"conftest.in"
+  printf %s 0123456789 >"conftest.in"
   while :
   do
     cat "conftest.in" "conftest.in" >"conftest.tmp"
     mv "conftest.tmp" "conftest.in"
     cp "conftest.in" "conftest.nl"
-    $as_echo '' >> "conftest.nl"
+    printf "%s\n" '' >> "conftest.nl"
     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
     as_fn_arith $ac_count + 1 && ac_count=$as_val
@@ -13446,8 +13917,8 @@ else
 fi
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
-$as_echo "$ac_cv_path_SED" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
+printf "%s\n" "$ac_cv_path_SED" >&6; }
  SED="$ac_cv_path_SED"
   rm -f conftest.sed
 
@@ -13464,11 +13935,154 @@ Xsed="$SED -e 1s/^X//"
 
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
-$as_echo_n "checking for fgrep... " >&6; }
-if ${ac_cv_path_FGREP+:} false; then :
-  $as_echo_n "(cached) " >&6
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+printf %s "checking for grep that handles long lines and -e... " >&6; }
+if test ${ac_cv_path_GREP+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if test -z "$GREP"; then
+  ac_path_GREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_prog in grep ggrep
+   do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
+      as_fn_executable_p "$ac_path_GREP" || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+  # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+  ac_count=0
+  printf %s 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    printf "%s\n" 'GREP' >> "conftest.nl"
+    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_GREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_GREP="$ac_path_GREP"
+      ac_path_GREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_GREP_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_GREP"; then
+    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
+else
+  ac_cv_path_GREP=$GREP
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+printf "%s\n" "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+printf %s "checking for egrep... " >&6; }
+if test ${ac_cv_path_EGREP+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+   then ac_cv_path_EGREP="$GREP -E"
+   else
+     if test -z "$EGREP"; then
+  ac_path_EGREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_prog in egrep
+   do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
+      as_fn_executable_p "$ac_path_EGREP" || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+  # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+  ac_count=0
+  printf %s 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    printf "%s\n" 'EGREP' >> "conftest.nl"
+    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_EGREP="$ac_path_EGREP"
+      ac_path_EGREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_EGREP_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_EGREP"; then
+    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
 else
+  ac_cv_path_EGREP=$EGREP
+fi
+
+   fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+printf "%s\n" "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
+printf %s "checking for fgrep... " >&6; }
+if test ${ac_cv_path_FGREP+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
    then ac_cv_path_FGREP="$GREP -F"
    else
@@ -13479,10 +14093,15 @@ else
 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_prog in fgrep; do
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_prog in fgrep
+   do
     for ac_exec_ext in '' $ac_executable_extensions; do
-      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
+      ac_path_FGREP="$as_dir$ac_prog$ac_exec_ext"
       as_fn_executable_p "$ac_path_FGREP" || continue
 # Check for GNU ac_path_FGREP and select it if it is found.
   # Check for GNU $ac_path_FGREP
@@ -13491,13 +14110,13 @@ case `"$ac_path_FGREP" --version 2>&1` in
   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
 *)
   ac_count=0
-  $as_echo_n 0123456789 >"conftest.in"
+  printf %s 0123456789 >"conftest.in"
   while :
   do
     cat "conftest.in" "conftest.in" >"conftest.tmp"
     mv "conftest.tmp" "conftest.in"
     cp "conftest.in" "conftest.nl"
-    $as_echo 'FGREP' >> "conftest.nl"
+    printf "%s\n" 'FGREP' >> "conftest.nl"
     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
     as_fn_arith $ac_count + 1 && ac_count=$as_val
@@ -13526,8 +14145,8 @@ fi
 
    fi
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
-$as_echo "$ac_cv_path_FGREP" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
+printf "%s\n" "$ac_cv_path_FGREP" >&6; }
  FGREP="$ac_cv_path_FGREP"
 
 
@@ -13552,17 +14171,18 @@ test -z "$GREP" && GREP=grep
 
 
 # Check whether --with-gnu-ld was given.
-if test "${with_gnu_ld+set}" = set; then :
+if test ${with_gnu_ld+y}
+then :
   withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
-else
+else $as_nop
   with_gnu_ld=no
 fi
 
 ac_prog=ld
 if test yes = "$GCC"; then
   # Check if gcc -print-prog-name=ld gives a path.
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
-$as_echo_n "checking for ld used by $CC... " >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
+printf %s "checking for ld used by $CC... " >&6; }
   case $host in
   *-*-mingw*)
     # gcc leaves a trailing carriage return, which upsets mingw
@@ -13591,15 +14211,16 @@ $as_echo_n "checking for ld used by $CC... " >&6; }
     ;;
   esac
 elif test yes = "$with_gnu_ld"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
-$as_echo_n "checking for GNU ld... " >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
+printf %s "checking for GNU ld... " >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
-$as_echo_n "checking for non-GNU ld... " >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
+printf %s "checking for non-GNU ld... " >&6; }
 fi
-if ${lt_cv_path_LD+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+if test ${lt_cv_path_LD+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -z "$LD"; then
   lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
   for ac_dir in $PATH; do
@@ -13628,18 +14249,19 @@ fi
 
 LD=$lt_cv_path_LD
 if test -n "$LD"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
-$as_echo "$LD" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+printf "%s\n" "$LD" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
-$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
-if ${lt_cv_prog_gnu_ld+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
+printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
+if test ${lt_cv_prog_gnu_ld+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   # I'd rather use --version here, but apparently some GNU lds only accept -v.
 case `$LD -v 2>&1 </dev/null` in
 *GNU* | *'with BFD'*)
@@ -13650,8 +14272,8 @@ case `$LD -v 2>&1 </dev/null` in
   ;;
 esac
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
-$as_echo "$lt_cv_prog_gnu_ld" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
+printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; }
 with_gnu_ld=$lt_cv_prog_gnu_ld
 
 
@@ -13662,11 +14284,12 @@ with_gnu_ld=$lt_cv_prog_gnu_ld
 
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
-$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
-if ${lt_cv_path_NM+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
+printf %s "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
+if test ${lt_cv_path_NM+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$NM"; then
   # Let the user override the test.
   lt_cv_path_NM=$NM
@@ -13691,13 +14314,13 @@ else
 	mingw*) lt_bad_file=conftest.nm/nofile ;;
 	*) lt_bad_file=/dev/null ;;
 	esac
-	case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
+	case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in
 	*$lt_bad_file* | *'Invalid file or object type'*)
 	  lt_cv_path_NM="$tmp_nm -B"
 	  break 2
 	  ;;
 	*)
-	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+	  case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in
 	  */dev/null*)
 	    lt_cv_path_NM="$tmp_nm -p"
 	    break 2
@@ -13716,8 +14339,8 @@ else
   : ${lt_cv_path_NM=no}
 fi
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
-$as_echo "$lt_cv_path_NM" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
+printf "%s\n" "$lt_cv_path_NM" >&6; }
 if test no != "$lt_cv_path_NM"; then
   NM=$lt_cv_path_NM
 else
@@ -13730,11 +14353,12 @@ else
   do
     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_DUMPBIN+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_DUMPBIN+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$DUMPBIN"; then
   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
 else
@@ -13742,11 +14366,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -13757,11 +14385,11 @@ fi
 fi
 DUMPBIN=$ac_cv_prog_DUMPBIN
 if test -n "$DUMPBIN"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
-$as_echo "$DUMPBIN" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
+printf "%s\n" "$DUMPBIN" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
@@ -13774,11 +14402,12 @@ if test -z "$DUMPBIN"; then
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_DUMPBIN+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$ac_ct_DUMPBIN"; then
   ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
 else
@@ -13786,11 +14415,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -13801,11 +14434,11 @@ fi
 fi
 ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
 if test -n "$ac_ct_DUMPBIN"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
-$as_echo "$ac_ct_DUMPBIN" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
+printf "%s\n" "$ac_ct_DUMPBIN" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
@@ -13817,15 +14450,15 @@ done
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
     DUMPBIN=$ac_ct_DUMPBIN
   fi
 fi
 
-    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
+    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in
     *COFF*)
       DUMPBIN="$DUMPBIN -symbols -headers"
       ;;
@@ -13846,11 +14479,12 @@ test -z "$NM" && NM=nm
 
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
-$as_echo_n "checking the name lister ($NM) interface... " >&6; }
-if ${lt_cv_nm_interface+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
+printf %s "checking the name lister ($NM) interface... " >&6; }
+if test ${lt_cv_nm_interface+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   lt_cv_nm_interface="BSD nm"
   echo "int some_variable = 0;" > conftest.$ac_ext
   (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
@@ -13866,15 +14500,16 @@ else
   fi
   rm -f conftest*
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
-$as_echo "$lt_cv_nm_interface" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
+printf "%s\n" "$lt_cv_nm_interface" >&6; }
 
 # find the maximum length of command line arguments
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
-$as_echo_n "checking the maximum length of command line arguments... " >&6; }
-if ${lt_cv_sys_max_cmd_len+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
+printf %s "checking the maximum length of command line arguments... " >&6; }
+if test ${lt_cv_sys_max_cmd_len+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
     i=0
   teststring=ABCD
 
@@ -13910,18 +14545,13 @@ else
     lt_cv_sys_max_cmd_len=8192;
     ;;
 
-  mint*)
-    # On MiNT this can take a long time and run out of memory.
-    lt_cv_sys_max_cmd_len=8192;
-    ;;
-
   amigaos*)
     # On AmigaOS with pdksh, this test takes hours, literally.
     # So we just punt and use a minimum line length of 8192.
     lt_cv_sys_max_cmd_len=8192;
     ;;
 
-  bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
+  bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*)
     # This has been around since 386BSD, at least.  Likely further.
     if test -x /sbin/sysctl; then
       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
@@ -13964,7 +14594,7 @@ else
   sysv5* | sco5v6* | sysv4.2uw2*)
     kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
     if test -n "$kargmax"; then
-      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[	 ]//'`
+      lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[	 ]//'`
     else
       lt_cv_sys_max_cmd_len=32768
     fi
@@ -14006,11 +14636,11 @@ else
 fi
 
 if test -n "$lt_cv_sys_max_cmd_len"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
-$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
+printf "%s\n" "$lt_cv_sys_max_cmd_len" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
-$as_echo "none" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5
+printf "%s\n" "none" >&6; }
 fi
 max_cmd_len=$lt_cv_sys_max_cmd_len
 
@@ -14054,11 +14684,12 @@ esac
 
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
-$as_echo_n "checking how to convert $build file names to $host format... " >&6; }
-if ${lt_cv_to_host_file_cmd+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
+printf %s "checking how to convert $build file names to $host format... " >&6; }
+if test ${lt_cv_to_host_file_cmd+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   case $host in
   *-*-mingw* )
     case $build in
@@ -14094,18 +14725,19 @@ esac
 fi
 
 to_host_file_cmd=$lt_cv_to_host_file_cmd
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
-$as_echo "$lt_cv_to_host_file_cmd" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
+printf "%s\n" "$lt_cv_to_host_file_cmd" >&6; }
 
 
 
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
-$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
-if ${lt_cv_to_tool_file_cmd+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
+printf %s "checking how to convert $build file names to toolchain format... " >&6; }
+if test ${lt_cv_to_tool_file_cmd+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   #assume ordinary cross tools, or native build.
 lt_cv_to_tool_file_cmd=func_convert_file_noop
 case $host in
@@ -14121,22 +14753,23 @@ esac
 fi
 
 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
-$as_echo "$lt_cv_to_tool_file_cmd" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
+printf "%s\n" "$lt_cv_to_tool_file_cmd" >&6; }
 
 
 
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
-$as_echo_n "checking for $LD option to reload object files... " >&6; }
-if ${lt_cv_ld_reload_flag+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
+printf %s "checking for $LD option to reload object files... " >&6; }
+if test ${lt_cv_ld_reload_flag+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   lt_cv_ld_reload_flag='-r'
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
-$as_echo "$lt_cv_ld_reload_flag" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
+printf "%s\n" "$lt_cv_ld_reload_flag" >&6; }
 reload_flag=$lt_cv_ld_reload_flag
 case $reload_flag in
 "" | " "*) ;;
@@ -14166,14 +14799,123 @@ esac
 
 
 
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}file", so it can be a program name with args.
+set dummy ${ac_tool_prefix}file; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_FILECMD+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if test -n "$FILECMD"; then
+  ac_cv_prog_FILECMD="$FILECMD" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_prog_FILECMD="${ac_tool_prefix}file"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+FILECMD=$ac_cv_prog_FILECMD
+if test -n "$FILECMD"; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FILECMD" >&5
+printf "%s\n" "$FILECMD" >&6; }
+else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_FILECMD"; then
+  ac_ct_FILECMD=$FILECMD
+  # Extract the first word of "file", so it can be a program name with args.
+set dummy file; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_FILECMD+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if test -n "$ac_ct_FILECMD"; then
+  ac_cv_prog_ac_ct_FILECMD="$ac_ct_FILECMD" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_FILECMD="file"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_FILECMD=$ac_cv_prog_ac_ct_FILECMD
+if test -n "$ac_ct_FILECMD"; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FILECMD" >&5
+printf "%s\n" "$ac_ct_FILECMD" >&6; }
+else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+  if test "x$ac_ct_FILECMD" = x; then
+    FILECMD=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    FILECMD=$ac_ct_FILECMD
+  fi
+else
+  FILECMD="$ac_cv_prog_FILECMD"
+fi
+
+
+
+
+
+
+
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
 set dummy ${ac_tool_prefix}objdump; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_OBJDUMP+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_OBJDUMP+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$OBJDUMP"; then
   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
 else
@@ -14181,11 +14923,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -14196,11 +14942,11 @@ fi
 fi
 OBJDUMP=$ac_cv_prog_OBJDUMP
 if test -n "$OBJDUMP"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
-$as_echo "$OBJDUMP" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
+printf "%s\n" "$OBJDUMP" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
@@ -14209,11 +14955,12 @@ if test -z "$ac_cv_prog_OBJDUMP"; then
   ac_ct_OBJDUMP=$OBJDUMP
   # Extract the first word of "objdump", so it can be a program name with args.
 set dummy objdump; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_OBJDUMP+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$ac_ct_OBJDUMP"; then
   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
 else
@@ -14221,11 +14968,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_OBJDUMP="objdump"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -14236,11 +14987,11 @@ fi
 fi
 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
 if test -n "$ac_ct_OBJDUMP"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
-$as_echo "$ac_ct_OBJDUMP" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
+printf "%s\n" "$ac_ct_OBJDUMP" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
   if test "x$ac_ct_OBJDUMP" = x; then
@@ -14248,8 +14999,8 @@ fi
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
     OBJDUMP=$ac_ct_OBJDUMP
@@ -14265,11 +15016,12 @@ test -z "$OBJDUMP" && OBJDUMP=objdump
 
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
-$as_echo_n "checking how to recognize dependent libraries... " >&6; }
-if ${lt_cv_deplibs_check_method+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
+printf %s "checking how to recognize dependent libraries... " >&6; }
+if test ${lt_cv_deplibs_check_method+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   lt_cv_file_magic_cmd='$MAGIC_CMD'
 lt_cv_file_magic_test_file=
 lt_cv_deplibs_check_method='unknown'
@@ -14295,7 +15047,7 @@ beos*)
 
 bsdi[45]*)
   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
-  lt_cv_file_magic_cmd='/usr/bin/file -L'
+  lt_cv_file_magic_cmd='$FILECMD -L'
   lt_cv_file_magic_test_file=/shlib/libc.so
   ;;
 
@@ -14329,14 +15081,14 @@ darwin* | rhapsody*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
-freebsd* | dragonfly*)
+freebsd* | dragonfly* | midnightbsd*)
   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
     case $host_cpu in
     i*86 )
       # Not sure whether the presence of OpenBSD here was a mistake.
       # Let's accept both of them until this is cleared up.
       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
-      lt_cv_file_magic_cmd=/usr/bin/file
+      lt_cv_file_magic_cmd=$FILECMD
       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
       ;;
     esac
@@ -14350,7 +15102,7 @@ haiku*)
   ;;
 
 hpux10.20* | hpux11*)
-  lt_cv_file_magic_cmd=/usr/bin/file
+  lt_cv_file_magic_cmd=$FILECMD
   case $host_cpu in
   ia64*)
     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
@@ -14397,7 +15149,7 @@ netbsd*)
 
 newos6*)
   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
-  lt_cv_file_magic_cmd=/usr/bin/file
+  lt_cv_file_magic_cmd=$FILECMD
   lt_cv_file_magic_test_file=/usr/lib/libnls.so
   ;;
 
@@ -14465,8 +15217,8 @@ os2*)
 esac
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
-$as_echo "$lt_cv_deplibs_check_method" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
+printf "%s\n" "$lt_cv_deplibs_check_method" >&6; }
 
 file_magic_glob=
 want_nocaseglob=no
@@ -14510,11 +15262,12 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_DLLTOOL+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_DLLTOOL+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$DLLTOOL"; then
   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
 else
@@ -14522,11 +15275,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -14537,11 +15294,11 @@ fi
 fi
 DLLTOOL=$ac_cv_prog_DLLTOOL
 if test -n "$DLLTOOL"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
-$as_echo "$DLLTOOL" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
+printf "%s\n" "$DLLTOOL" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
@@ -14550,11 +15307,12 @@ if test -z "$ac_cv_prog_DLLTOOL"; then
   ac_ct_DLLTOOL=$DLLTOOL
   # Extract the first word of "dlltool", so it can be a program name with args.
 set dummy dlltool; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_DLLTOOL+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$ac_ct_DLLTOOL"; then
   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
 else
@@ -14562,11 +15320,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -14577,11 +15339,11 @@ fi
 fi
 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
 if test -n "$ac_ct_DLLTOOL"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
-$as_echo "$ac_ct_DLLTOOL" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
+printf "%s\n" "$ac_ct_DLLTOOL" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
   if test "x$ac_ct_DLLTOOL" = x; then
@@ -14589,8 +15351,8 @@ fi
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
     DLLTOOL=$ac_ct_DLLTOOL
@@ -14607,11 +15369,12 @@ test -z "$DLLTOOL" && DLLTOOL=dlltool
 
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
-$as_echo_n "checking how to associate runtime and link libraries... " >&6; }
-if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
+printf %s "checking how to associate runtime and link libraries... " >&6; }
+if test ${lt_cv_sharedlib_from_linklib_cmd+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   lt_cv_sharedlib_from_linklib_cmd='unknown'
 
 case $host_os in
@@ -14634,8 +15397,8 @@ cygwin* | mingw* | pw32* | cegcc*)
 esac
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
-$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
+printf "%s\n" "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
 
@@ -14650,11 +15413,12 @@ if test -n "$ac_tool_prefix"; then
   do
     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_AR+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_AR+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$AR"; then
   ac_cv_prog_AR="$AR" # Let the user override the test.
 else
@@ -14662,11 +15426,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -14677,11 +15445,11 @@ fi
 fi
 AR=$ac_cv_prog_AR
 if test -n "$AR"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
-$as_echo "$AR" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+printf "%s\n" "$AR" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
@@ -14694,11 +15462,12 @@ if test -z "$AR"; then
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_AR+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_AR+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$ac_ct_AR"; then
   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
 else
@@ -14706,11 +15475,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_AR="$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -14721,11 +15494,11 @@ fi
 fi
 ac_ct_AR=$ac_cv_prog_ac_ct_AR
 if test -n "$ac_ct_AR"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
-$as_echo "$ac_ct_AR" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+printf "%s\n" "$ac_ct_AR" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
@@ -14737,8 +15510,8 @@ done
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
     AR=$ac_ct_AR
@@ -14746,42 +15519,60 @@ esac
 fi
 
 : ${AR=ar}
-: ${AR_FLAGS=cru}
 
 
 
 
 
 
+# Use ARFLAGS variable as AR's operation code to sync the variable naming with
+# Automake.  If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have
+# higher priority because thats what people were doing historically (setting
+# ARFLAGS for automake and AR_FLAGS for libtool).  FIXME: Make the AR_FLAGS
+# variable obsoleted/removed.
 
+test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr}
+lt_ar_flags=$AR_FLAGS
 
 
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
-$as_echo_n "checking for archiver @FILE support... " >&6; }
-if ${lt_cv_ar_at_file+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+
+
+# Make AR_FLAGS overridable by 'make ARFLAGS='.  Don't try to run-time override
+# by AR_FLAGS because that was never working and AR_FLAGS is about to die.
+
+
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
+printf %s "checking for archiver @FILE support... " >&6; }
+if test ${lt_cv_ar_at_file+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   lt_cv_ar_at_file=no
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
   echo conftest.$ac_objext > conftest.lst
       lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
       { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
   (eval $lt_ar_try) 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }
       if test 0 -eq "$ac_status"; then
 	# Ensure the archiver fails upon bogus file names.
@@ -14789,7 +15580,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
 	{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
   (eval $lt_ar_try) 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }
 	if test 0 -ne "$ac_status"; then
           lt_cv_ar_at_file=@
@@ -14798,11 +15589,11 @@ if ac_fn_c_try_compile "$LINENO"; then :
       rm -f conftest.* libconftest.a
 
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
-$as_echo "$lt_cv_ar_at_file" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
+printf "%s\n" "$lt_cv_ar_at_file" >&6; }
 
 if test no = "$lt_cv_ar_at_file"; then
   archiver_list_spec=
@@ -14819,11 +15610,12 @@ fi
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
 set dummy ${ac_tool_prefix}strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_STRIP+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_STRIP+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$STRIP"; then
   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
 else
@@ -14831,11 +15623,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -14846,11 +15642,11 @@ fi
 fi
 STRIP=$ac_cv_prog_STRIP
 if test -n "$STRIP"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
-$as_echo "$STRIP" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+printf "%s\n" "$STRIP" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
@@ -14859,11 +15655,12 @@ if test -z "$ac_cv_prog_STRIP"; then
   ac_ct_STRIP=$STRIP
   # Extract the first word of "strip", so it can be a program name with args.
 set dummy strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_STRIP+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$ac_ct_STRIP"; then
   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
 else
@@ -14871,11 +15668,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_STRIP="strip"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -14886,11 +15687,11 @@ fi
 fi
 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
 if test -n "$ac_ct_STRIP"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
-$as_echo "$ac_ct_STRIP" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+printf "%s\n" "$ac_ct_STRIP" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
   if test "x$ac_ct_STRIP" = x; then
@@ -14898,8 +15699,8 @@ fi
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
     STRIP=$ac_ct_STRIP
@@ -14918,11 +15719,12 @@ test -z "$STRIP" && STRIP=:
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_RANLIB+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_RANLIB+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$RANLIB"; then
   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
 else
@@ -14930,11 +15732,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -14945,11 +15751,11 @@ fi
 fi
 RANLIB=$ac_cv_prog_RANLIB
 if test -n "$RANLIB"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
-$as_echo "$RANLIB" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+printf "%s\n" "$RANLIB" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
@@ -14958,11 +15764,12 @@ if test -z "$ac_cv_prog_RANLIB"; then
   ac_ct_RANLIB=$RANLIB
   # Extract the first word of "ranlib", so it can be a program name with args.
 set dummy ranlib; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_RANLIB+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$ac_ct_RANLIB"; then
   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
 else
@@ -14970,11 +15777,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_RANLIB="ranlib"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -14985,11 +15796,11 @@ fi
 fi
 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
 if test -n "$ac_ct_RANLIB"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
-$as_echo "$ac_ct_RANLIB" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+printf "%s\n" "$ac_ct_RANLIB" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
   if test "x$ac_ct_RANLIB" = x; then
@@ -14997,8 +15808,8 @@ fi
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
     RANLIB=$ac_ct_RANLIB
@@ -15087,11 +15898,12 @@ compiler=$CC
 
 
 # Check for command to grab the raw symbol name followed by C symbol from nm.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
-$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
-if ${lt_cv_sys_global_symbol_pipe+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
+printf %s "checking command to parse $NM output from $compiler object... " >&6; }
+if test ${lt_cv_sys_global_symbol_pipe+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
 
 # These are sane defaults that work on at least a few old systems.
 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
@@ -15146,7 +15958,7 @@ esac
 
 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
   # Gets list of data symbols to import.
-  lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
+  lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'"
   # Adjust the below global symbol transforms to fixup imported variables.
   lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
   lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
@@ -15164,20 +15976,20 @@ fi
 # Transform an extracted symbol line into a proper C declaration.
 # Some systems (esp. on ia64) link data and code symbols differently,
 # so use this general approach.
-lt_cv_sys_global_symbol_to_cdecl="sed -n"\
+lt_cv_sys_global_symbol_to_cdecl="$SED -n"\
 $lt_cdecl_hook\
 " -e 's/^T .* \(.*\)$/extern int \1();/p'"\
 " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
 
 # Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
+lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\
 $lt_c_name_hook\
 " -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
 " -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
 
 # Transform an extracted symbol line into symbol name with lib prefix and
 # symbol address.
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\
 $lt_c_name_lib_hook\
 " -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
 " -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
@@ -15201,7 +16013,7 @@ for ac_symprfx in "" "_"; do
   if test "$lt_cv_nm_interface" = "MS dumpbin"; then
     # Fake it for dumpbin and say T for any non-static function,
     # D for any global variable and I for any imported variable.
-    # Also find C++ and __fastcall symbols from MSVC++,
+    # Also find C++ and __fastcall symbols from MSVC++ or ICC,
     # which start with @ or ?.
     lt_cv_sys_global_symbol_pipe="$AWK '"\
 "     {last_section=section; section=\$ 3};"\
@@ -15219,9 +16031,9 @@ for ac_symprfx in "" "_"; do
 "     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
 "     ' prfx=^$ac_symprfx"
   else
-    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[	 ]\($symcode$symcode*\)[	 ][	 ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+    lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[	 ]\($symcode$symcode*\)[	 ][	 ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
   fi
-  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
+  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'"
 
   # Check to see that the pipe works correctly.
   pipe_works=no
@@ -15243,14 +16055,14 @@ _LT_EOF
   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
     # Now try to grab the symbols.
     nlist=conftest.nm
     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
   (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; } && test -s "$nlist"; then
       # Try sorting and uniquifying the output.
       if sort "$nlist" | uniq > "$nlist"T; then
@@ -15319,7 +16131,7 @@ _LT_EOF
 	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; } && test -s conftest$ac_exeext; then
 	    pipe_works=yes
 	  fi
@@ -15354,11 +16166,11 @@ if test -z "$lt_cv_sys_global_symbol_pipe"; then
   lt_cv_sys_global_symbol_to_cdecl=
 fi
 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
-$as_echo "failed" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
+printf "%s\n" "failed" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
-$as_echo "ok" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+printf "%s\n" "ok" >&6; }
 fi
 
 # Response file support.
@@ -15404,13 +16216,14 @@ fi
 
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
-$as_echo_n "checking for sysroot... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
+printf %s "checking for sysroot... " >&6; }
 
 # Check whether --with-sysroot was given.
-if test "${with_sysroot+set}" = set; then :
+if test ${with_sysroot+y}
+then :
   withval=$with_sysroot;
-else
+else $as_nop
   with_sysroot=no
 fi
 
@@ -15423,29 +16236,30 @@ case $with_sysroot in #(
    fi
    ;; #(
  /*)
-   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
+   lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"`
    ;; #(
  no|'')
    ;; #(
  *)
-   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
-$as_echo "$with_sysroot" >&6; }
+   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
+printf "%s\n" "$with_sysroot" >&6; }
    as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
    ;;
 esac
 
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
-$as_echo "${lt_sysroot:-no}" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
+printf "%s\n" "${lt_sysroot:-no}" >&6; }
 
 
 
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
-$as_echo_n "checking for a working dd... " >&6; }
-if ${ac_cv_path_lt_DD+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
+printf %s "checking for a working dd... " >&6; }
+if test ${ac_cv_path_lt_DD+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   printf 0123456789abcdef0123456789abcdef >conftest.i
 cat conftest.i conftest.i >conftest2.i
 : ${lt_DD:=$DD}
@@ -15456,10 +16270,15 @@ if test -z "$lt_DD"; then
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_prog in dd; do
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_prog in dd
+   do
     for ac_exec_ext in '' $ac_executable_extensions; do
-      ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext"
+      ac_path_lt_DD="$as_dir$ac_prog$ac_exec_ext"
       as_fn_executable_p "$ac_path_lt_DD" || continue
 if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
   cmp -s conftest.i conftest.out \
@@ -15479,15 +16298,16 @@ fi
 
 rm -f conftest.i conftest2.i conftest.out
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
-$as_echo "$ac_cv_path_lt_DD" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
+printf "%s\n" "$ac_cv_path_lt_DD" >&6; }
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
-$as_echo_n "checking how to truncate binary pipes... " >&6; }
-if ${lt_cv_truncate_bin+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
+printf %s "checking how to truncate binary pipes... " >&6; }
+if test ${lt_cv_truncate_bin+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   printf 0123456789abcdef0123456789abcdef >conftest.i
 cat conftest.i conftest.i >conftest2.i
 lt_cv_truncate_bin=
@@ -15498,8 +16318,8 @@ fi
 rm -f conftest.i conftest2.i conftest.out
 test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
-$as_echo "$lt_cv_truncate_bin" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
+printf "%s\n" "$lt_cv_truncate_bin" >&6; }
 
 
 
@@ -15522,7 +16342,8 @@ func_cc_basename ()
 }
 
 # Check whether --enable-libtool-lock was given.
-if test "${enable_libtool_lock+set}" = set; then :
+if test ${enable_libtool_lock+y}
+then :
   enableval=$enable_libtool_lock;
 fi
 
@@ -15538,9 +16359,9 @@ ia64-*-hpux*)
   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-    case `/usr/bin/file conftest.$ac_objext` in
+    case `$FILECMD conftest.$ac_objext` in
       *ELF-32*)
 	HPUX_IA64_MODE=32
 	;;
@@ -15558,10 +16379,10 @@ ia64-*-hpux*)
   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
     if test yes = "$lt_cv_prog_gnu_ld"; then
-      case `/usr/bin/file conftest.$ac_objext` in
+      case `$FILECMD conftest.$ac_objext` in
 	*32-bit*)
 	  LD="${LD-ld} -melf32bsmip"
 	  ;;
@@ -15573,7 +16394,7 @@ ia64-*-hpux*)
 	;;
       esac
     else
-      case `/usr/bin/file conftest.$ac_objext` in
+      case `$FILECMD conftest.$ac_objext` in
 	*32-bit*)
 	  LD="${LD-ld} -32"
 	  ;;
@@ -15596,10 +16417,10 @@ mips64*-*linux*)
   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
     emul=elf
-    case `/usr/bin/file conftest.$ac_objext` in
+    case `$FILECMD conftest.$ac_objext` in
       *32-bit*)
 	emul="${emul}32"
 	;;
@@ -15607,7 +16428,7 @@ mips64*-*linux*)
 	emul="${emul}64"
 	;;
     esac
-    case `/usr/bin/file conftest.$ac_objext` in
+    case `$FILECMD conftest.$ac_objext` in
       *MSB*)
 	emul="${emul}btsmip"
 	;;
@@ -15615,7 +16436,7 @@ mips64*-*linux*)
 	emul="${emul}ltsmip"
 	;;
     esac
-    case `/usr/bin/file conftest.$ac_objext` in
+    case `$FILECMD conftest.$ac_objext` in
       *N32*)
 	emul="${emul}n32"
 	;;
@@ -15637,16 +16458,16 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-    case `/usr/bin/file conftest.o` in
+    case `$FILECMD conftest.o` in
       *32-bit*)
 	case $host in
 	  x86_64-*kfreebsd*-gnu)
 	    LD="${LD-ld} -m elf_i386_fbsd"
 	    ;;
 	  x86_64-*linux*)
-	    case `/usr/bin/file conftest.o` in
+	    case `$FILECMD conftest.o` in
 	      *x86-64*)
 		LD="${LD-ld} -m elf32_x86_64"
 		;;
@@ -15677,10 +16498,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
 	  x86_64-*linux*)
 	    LD="${LD-ld} -m elf_x86_64"
 	    ;;
-	  powerpcle-*linux*|powerpc64le-*linux*)
+	  powerpcle-*linux*)
 	    LD="${LD-ld} -m elf64lppc"
 	    ;;
-	  powerpc-*linux*|powerpc64-*linux*)
+	  powerpc-*linux*)
 	    LD="${LD-ld} -m elf64ppc"
 	    ;;
 	  s390*-*linux*|s390*-*tpf*)
@@ -15700,11 +16521,12 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
   SAVE_CFLAGS=$CFLAGS
   CFLAGS="$CFLAGS -belf"
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
-$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
-if ${lt_cv_cc_needs_belf+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
+printf %s "checking whether the C compiler needs -belf... " >&6; }
+if test ${lt_cv_cc_needs_belf+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -15715,19 +16537,20 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 /* end confdefs.h.  */
 
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   lt_cv_cc_needs_belf=yes
-else
+else $as_nop
   lt_cv_cc_needs_belf=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
      ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
@@ -15736,8 +16559,8 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
-$as_echo "$lt_cv_cc_needs_belf" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
+printf "%s\n" "$lt_cv_cc_needs_belf" >&6; }
   if test yes != "$lt_cv_cc_needs_belf"; then
     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
     CFLAGS=$SAVE_CFLAGS
@@ -15750,9 +16573,9 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; }
   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-    case `/usr/bin/file conftest.o` in
+    case `$FILECMD conftest.o` in
     *64-bit*)
       case $lt_cv_prog_gnu_ld in
       yes*)
@@ -15787,11 +16610,12 @@ need_locks=$enable_libtool_lock
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
 set dummy ${ac_tool_prefix}mt; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_MANIFEST_TOOL+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$MANIFEST_TOOL"; then
   ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
 else
@@ -15799,11 +16623,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -15814,11 +16642,11 @@ fi
 fi
 MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
 if test -n "$MANIFEST_TOOL"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
-$as_echo "$MANIFEST_TOOL" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
+printf "%s\n" "$MANIFEST_TOOL" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
@@ -15827,11 +16655,12 @@ if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
   ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
   # Extract the first word of "mt", so it can be a program name with args.
 set dummy mt; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_MANIFEST_TOOL+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$ac_ct_MANIFEST_TOOL"; then
   ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
 else
@@ -15839,11 +16668,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -15854,11 +16687,11 @@ fi
 fi
 ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
 if test -n "$ac_ct_MANIFEST_TOOL"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
-$as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
+printf "%s\n" "$ac_ct_MANIFEST_TOOL" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
   if test "x$ac_ct_MANIFEST_TOOL" = x; then
@@ -15866,8 +16699,8 @@ fi
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
     MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
@@ -15877,11 +16710,12 @@ else
 fi
 
 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
-$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
-if ${lt_cv_path_mainfest_tool+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
+printf %s "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
+if test ${lt_cv_path_mainfest_tool+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   lt_cv_path_mainfest_tool=no
   echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
   $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
@@ -15891,8 +16725,8 @@ else
   fi
   rm -f conftest*
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
-$as_echo "$lt_cv_path_mainfest_tool" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
+printf "%s\n" "$lt_cv_path_mainfest_tool" >&6; }
 if test yes != "$lt_cv_path_mainfest_tool"; then
   MANIFEST_TOOL=:
 fi
@@ -15907,11 +16741,12 @@ fi
     if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
 set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_DSYMUTIL+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_DSYMUTIL+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$DSYMUTIL"; then
   ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
 else
@@ -15919,11 +16754,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -15934,11 +16773,11 @@ fi
 fi
 DSYMUTIL=$ac_cv_prog_DSYMUTIL
 if test -n "$DSYMUTIL"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
-$as_echo "$DSYMUTIL" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
+printf "%s\n" "$DSYMUTIL" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
@@ -15947,11 +16786,12 @@ if test -z "$ac_cv_prog_DSYMUTIL"; then
   ac_ct_DSYMUTIL=$DSYMUTIL
   # Extract the first word of "dsymutil", so it can be a program name with args.
 set dummy dsymutil; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_DSYMUTIL+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$ac_ct_DSYMUTIL"; then
   ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
 else
@@ -15959,11 +16799,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -15974,11 +16818,11 @@ fi
 fi
 ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
 if test -n "$ac_ct_DSYMUTIL"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
-$as_echo "$ac_ct_DSYMUTIL" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
+printf "%s\n" "$ac_ct_DSYMUTIL" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
   if test "x$ac_ct_DSYMUTIL" = x; then
@@ -15986,8 +16830,8 @@ fi
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
     DSYMUTIL=$ac_ct_DSYMUTIL
@@ -15999,11 +16843,12 @@ fi
     if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
 set dummy ${ac_tool_prefix}nmedit; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_NMEDIT+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_NMEDIT+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$NMEDIT"; then
   ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
 else
@@ -16011,11 +16856,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -16026,11 +16875,11 @@ fi
 fi
 NMEDIT=$ac_cv_prog_NMEDIT
 if test -n "$NMEDIT"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
-$as_echo "$NMEDIT" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
+printf "%s\n" "$NMEDIT" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
@@ -16039,11 +16888,12 @@ if test -z "$ac_cv_prog_NMEDIT"; then
   ac_ct_NMEDIT=$NMEDIT
   # Extract the first word of "nmedit", so it can be a program name with args.
 set dummy nmedit; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_NMEDIT+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$ac_ct_NMEDIT"; then
   ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
 else
@@ -16051,11 +16901,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_NMEDIT="nmedit"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -16066,11 +16920,11 @@ fi
 fi
 ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
 if test -n "$ac_ct_NMEDIT"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
-$as_echo "$ac_ct_NMEDIT" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
+printf "%s\n" "$ac_ct_NMEDIT" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
   if test "x$ac_ct_NMEDIT" = x; then
@@ -16078,8 +16932,8 @@ fi
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
     NMEDIT=$ac_ct_NMEDIT
@@ -16091,11 +16945,12 @@ fi
     if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
 set dummy ${ac_tool_prefix}lipo; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_LIPO+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_LIPO+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$LIPO"; then
   ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
 else
@@ -16103,11 +16958,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -16118,11 +16977,11 @@ fi
 fi
 LIPO=$ac_cv_prog_LIPO
 if test -n "$LIPO"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
-$as_echo "$LIPO" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
+printf "%s\n" "$LIPO" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
@@ -16131,11 +16990,12 @@ if test -z "$ac_cv_prog_LIPO"; then
   ac_ct_LIPO=$LIPO
   # Extract the first word of "lipo", so it can be a program name with args.
 set dummy lipo; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_LIPO+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$ac_ct_LIPO"; then
   ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
 else
@@ -16143,11 +17003,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_LIPO="lipo"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -16158,11 +17022,11 @@ fi
 fi
 ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
 if test -n "$ac_ct_LIPO"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
-$as_echo "$ac_ct_LIPO" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
+printf "%s\n" "$ac_ct_LIPO" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
   if test "x$ac_ct_LIPO" = x; then
@@ -16170,8 +17034,8 @@ fi
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
     LIPO=$ac_ct_LIPO
@@ -16183,11 +17047,12 @@ fi
     if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
 set dummy ${ac_tool_prefix}otool; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_OTOOL+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_OTOOL+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$OTOOL"; then
   ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
 else
@@ -16195,11 +17060,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -16210,11 +17079,11 @@ fi
 fi
 OTOOL=$ac_cv_prog_OTOOL
 if test -n "$OTOOL"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
-$as_echo "$OTOOL" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
+printf "%s\n" "$OTOOL" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
@@ -16223,11 +17092,12 @@ if test -z "$ac_cv_prog_OTOOL"; then
   ac_ct_OTOOL=$OTOOL
   # Extract the first word of "otool", so it can be a program name with args.
 set dummy otool; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_OTOOL+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$ac_ct_OTOOL"; then
   ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
 else
@@ -16235,11 +17105,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_OTOOL="otool"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -16250,11 +17124,11 @@ fi
 fi
 ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
 if test -n "$ac_ct_OTOOL"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
-$as_echo "$ac_ct_OTOOL" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
+printf "%s\n" "$ac_ct_OTOOL" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
   if test "x$ac_ct_OTOOL" = x; then
@@ -16262,8 +17136,8 @@ fi
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
     OTOOL=$ac_ct_OTOOL
@@ -16275,11 +17149,12 @@ fi
     if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
 set dummy ${ac_tool_prefix}otool64; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_OTOOL64+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_OTOOL64+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$OTOOL64"; then
   ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
 else
@@ -16287,11 +17162,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -16302,11 +17181,11 @@ fi
 fi
 OTOOL64=$ac_cv_prog_OTOOL64
 if test -n "$OTOOL64"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
-$as_echo "$OTOOL64" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
+printf "%s\n" "$OTOOL64" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
@@ -16315,11 +17194,12 @@ if test -z "$ac_cv_prog_OTOOL64"; then
   ac_ct_OTOOL64=$OTOOL64
   # Extract the first word of "otool64", so it can be a program name with args.
 set dummy otool64; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_OTOOL64+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$ac_ct_OTOOL64"; then
   ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
 else
@@ -16327,11 +17207,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_OTOOL64="otool64"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -16342,11 +17226,11 @@ fi
 fi
 ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
 if test -n "$ac_ct_OTOOL64"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
-$as_echo "$ac_ct_OTOOL64" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
+printf "%s\n" "$ac_ct_OTOOL64" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
   if test "x$ac_ct_OTOOL64" = x; then
@@ -16354,8 +17238,8 @@ fi
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
     OTOOL64=$ac_ct_OTOOL64
@@ -16390,11 +17274,12 @@ fi
 
 
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
-$as_echo_n "checking for -single_module linker flag... " >&6; }
-if ${lt_cv_apple_cc_single_mod+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
+printf %s "checking for -single_module linker flag... " >&6; }
+if test ${lt_cv_apple_cc_single_mod+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   lt_cv_apple_cc_single_mod=no
       if test -z "$LT_MULTI_MODULE"; then
 	# By default we will add the -single_module flag. You can override
@@ -16423,14 +17308,15 @@ else
 	rm -f conftest.*
       fi
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
-$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
+printf "%s\n" "$lt_cv_apple_cc_single_mod" >&6; }
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
-$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
-if ${lt_cv_ld_exported_symbols_list+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
+printf %s "checking for -exported_symbols_list linker flag... " >&6; }
+if test ${lt_cv_ld_exported_symbols_list+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   lt_cv_ld_exported_symbols_list=no
       save_LDFLAGS=$LDFLAGS
       echo "_main" > conftest.sym
@@ -16439,39 +17325,41 @@ else
 /* end confdefs.h.  */
 
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   lt_cv_ld_exported_symbols_list=yes
-else
+else $as_nop
   lt_cv_ld_exported_symbols_list=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 	LDFLAGS=$save_LDFLAGS
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
-$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
+printf "%s\n" "$lt_cv_ld_exported_symbols_list" >&6; }
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
-$as_echo_n "checking for -force_load linker flag... " >&6; }
-if ${lt_cv_ld_force_load+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
+printf %s "checking for -force_load linker flag... " >&6; }
+if test ${lt_cv_ld_force_load+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   lt_cv_ld_force_load=no
       cat > conftest.c << _LT_EOF
 int forced_loaded() { return 2;}
 _LT_EOF
       echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
       $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
-      echo "$AR cru libconftest.a conftest.o" >&5
-      $AR cru libconftest.a conftest.o 2>&5
+      echo "$AR $AR_FLAGS libconftest.a conftest.o" >&5
+      $AR $AR_FLAGS libconftest.a conftest.o 2>&5
       echo "$RANLIB libconftest.a" >&5
       $RANLIB libconftest.a 2>&5
       cat > conftest.c << _LT_EOF
@@ -16491,24 +17379,19 @@ _LT_EOF
         rm -rf conftest.dSYM
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
-$as_echo "$lt_cv_ld_force_load" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
+printf "%s\n" "$lt_cv_ld_force_load" >&6; }
     case $host_os in
     rhapsody* | darwin1.[012])
       _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
     darwin1.*)
       _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
-    darwin*) # darwin 5.x on
-      # if running on 10.5 or later, the deployment target defaults
-      # to the OS version, if on x86, and 10.4, the deployment
-      # target defaults to 10.4. Don't you love it?
-      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
-	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
-	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
-	10.[012][,.]*)
-	  _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
-	10.*)
-	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
+    darwin*)
+      case $MACOSX_DEPLOYMENT_TARGET,$host in
+        10.[012],*|,*powerpc*-darwin[5-8]*)
+          _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
+        *)
+          _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
       esac
     ;;
   esac
@@ -16563,26 +17446,22 @@ func_munge_path_list ()
     esac
 }
 
-for ac_header in dlfcn.h
-do :
-  ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
+ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
 "
-if test "x$ac_cv_header_dlfcn_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_DLFCN_H 1
-_ACEOF
+if test "x$ac_cv_header_dlfcn_h" = xyes
+then :
+  printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h
 
 fi
 
-done
-
 
 
 
 
 # Set options
 # Check whether --enable-static was given.
-if test "${enable_static+set}" = set; then :
+if test ${enable_static+y}
+then :
   enableval=$enable_static; p=${PACKAGE-default}
     case $enableval in
     yes) enable_static=yes ;;
@@ -16600,7 +17479,7 @@ if test "${enable_static+set}" = set; then :
       IFS=$lt_save_ifs
       ;;
     esac
-else
+else $as_nop
   enable_static=no
 fi
 
@@ -16617,11 +17496,12 @@ case $host in
   if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
 set dummy ${ac_tool_prefix}as; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_AS+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_AS+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$AS"; then
   ac_cv_prog_AS="$AS" # Let the user override the test.
 else
@@ -16629,11 +17509,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_AS="${ac_tool_prefix}as"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -16644,11 +17528,11 @@ fi
 fi
 AS=$ac_cv_prog_AS
 if test -n "$AS"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
-$as_echo "$AS" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
+printf "%s\n" "$AS" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
@@ -16657,11 +17541,12 @@ if test -z "$ac_cv_prog_AS"; then
   ac_ct_AS=$AS
   # Extract the first word of "as", so it can be a program name with args.
 set dummy as; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_AS+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_AS+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$ac_ct_AS"; then
   ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
 else
@@ -16669,11 +17554,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_AS="as"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -16684,11 +17573,11 @@ fi
 fi
 ac_ct_AS=$ac_cv_prog_ac_ct_AS
 if test -n "$ac_ct_AS"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5
-$as_echo "$ac_ct_AS" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5
+printf "%s\n" "$ac_ct_AS" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
   if test "x$ac_ct_AS" = x; then
@@ -16696,8 +17585,8 @@ fi
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
     AS=$ac_ct_AS
@@ -16709,11 +17598,12 @@ fi
   if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_DLLTOOL+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_DLLTOOL+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$DLLTOOL"; then
   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
 else
@@ -16721,11 +17611,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -16736,11 +17630,11 @@ fi
 fi
 DLLTOOL=$ac_cv_prog_DLLTOOL
 if test -n "$DLLTOOL"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
-$as_echo "$DLLTOOL" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
+printf "%s\n" "$DLLTOOL" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
@@ -16749,11 +17643,12 @@ if test -z "$ac_cv_prog_DLLTOOL"; then
   ac_ct_DLLTOOL=$DLLTOOL
   # Extract the first word of "dlltool", so it can be a program name with args.
 set dummy dlltool; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_DLLTOOL+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$ac_ct_DLLTOOL"; then
   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
 else
@@ -16761,11 +17656,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -16776,11 +17675,11 @@ fi
 fi
 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
 if test -n "$ac_ct_DLLTOOL"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
-$as_echo "$ac_ct_DLLTOOL" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
+printf "%s\n" "$ac_ct_DLLTOOL" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
   if test "x$ac_ct_DLLTOOL" = x; then
@@ -16788,8 +17687,8 @@ fi
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
     DLLTOOL=$ac_ct_DLLTOOL
@@ -16801,11 +17700,12 @@ fi
   if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
 set dummy ${ac_tool_prefix}objdump; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_OBJDUMP+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_OBJDUMP+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$OBJDUMP"; then
   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
 else
@@ -16813,11 +17713,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -16828,11 +17732,11 @@ fi
 fi
 OBJDUMP=$ac_cv_prog_OBJDUMP
 if test -n "$OBJDUMP"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
-$as_echo "$OBJDUMP" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
+printf "%s\n" "$OBJDUMP" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
@@ -16841,11 +17745,12 @@ if test -z "$ac_cv_prog_OBJDUMP"; then
   ac_ct_OBJDUMP=$OBJDUMP
   # Extract the first word of "objdump", so it can be a program name with args.
 set dummy objdump; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_OBJDUMP+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   if test -n "$ac_ct_OBJDUMP"; then
   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
 else
@@ -16853,11 +17758,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_OBJDUMP="objdump"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -16868,11 +17777,11 @@ fi
 fi
 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
 if test -n "$ac_ct_OBJDUMP"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
-$as_echo "$ac_ct_OBJDUMP" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
+printf "%s\n" "$ac_ct_OBJDUMP" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
   if test "x$ac_ct_OBJDUMP" = x; then
@@ -16880,8 +17789,8 @@ fi
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
     OBJDUMP=$ac_ct_OBJDUMP
@@ -16918,7 +17827,8 @@ test -z "$OBJDUMP" && OBJDUMP=objdump
 
 
             # Check whether --enable-shared was given.
-if test "${enable_shared+set}" = set; then :
+if test ${enable_shared+y}
+then :
   enableval=$enable_shared; p=${PACKAGE-default}
     case $enableval in
     yes) enable_shared=yes ;;
@@ -16936,7 +17846,7 @@ if test "${enable_shared+set}" = set; then :
       IFS=$lt_save_ifs
       ;;
     esac
-else
+else $as_nop
   enable_shared=yes
 fi
 
@@ -16951,7 +17861,8 @@ fi
 
 
 # Check whether --with-pic was given.
-if test "${with_pic+set}" = set; then :
+if test ${with_pic+y}
+then :
   withval=$with_pic; lt_p=${PACKAGE-default}
     case $withval in
     yes|no) pic_mode=$withval ;;
@@ -16968,7 +17879,7 @@ if test "${with_pic+set}" = set; then :
       IFS=$lt_save_ifs
       ;;
     esac
-else
+else $as_nop
   pic_mode=default
 fi
 
@@ -16980,7 +17891,8 @@ fi
 
 
   # Check whether --enable-fast-install was given.
-if test "${enable_fast_install+set}" = set; then :
+if test ${enable_fast_install+y}
+then :
   enableval=$enable_fast_install; p=${PACKAGE-default}
     case $enableval in
     yes) enable_fast_install=yes ;;
@@ -16998,7 +17910,7 @@ if test "${enable_fast_install+set}" = set; then :
       IFS=$lt_save_ifs
       ;;
     esac
-else
+else $as_nop
   enable_fast_install=yes
 fi
 
@@ -17012,11 +17924,12 @@ fi
   shared_archive_member_spec=
 case $host,$enable_shared in
 power*-*-aix[5-9]*,yes)
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
-$as_echo_n "checking which variant of shared library versioning to provide... " >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
+printf %s "checking which variant of shared library versioning to provide... " >&6; }
 
 # Check whether --with-aix-soname was given.
-if test "${with_aix_soname+set}" = set; then :
+if test ${with_aix_soname+y}
+then :
   withval=$with_aix_soname; case $withval in
     aix|svr4|both)
       ;;
@@ -17025,18 +17938,19 @@ if test "${with_aix_soname+set}" = set; then :
       ;;
     esac
     lt_cv_with_aix_soname=$with_aix_soname
-else
-  if ${lt_cv_with_aix_soname+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+else $as_nop
+  if test ${lt_cv_with_aix_soname+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   lt_cv_with_aix_soname=aix
 fi
 
     with_aix_soname=$lt_cv_with_aix_soname
 fi
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
-$as_echo "$with_aix_soname" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
+printf "%s\n" "$with_aix_soname" >&6; }
   if test aix != "$with_aix_soname"; then
     # For the AIX way of multilib, we name the shared archive member
     # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
@@ -17118,11 +18032,12 @@ if test -n "${ZSH_VERSION+set}"; then
    setopt NO_GLOB_SUBST
 fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
-$as_echo_n "checking for objdir... " >&6; }
-if ${lt_cv_objdir+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
+printf %s "checking for objdir... " >&6; }
+if test ${lt_cv_objdir+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   rm -f .libs 2>/dev/null
 mkdir .libs 2>/dev/null
 if test -d .libs; then
@@ -17133,17 +18048,15 @@ else
 fi
 rmdir .libs 2>/dev/null
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
-$as_echo "$lt_cv_objdir" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
+printf "%s\n" "$lt_cv_objdir" >&6; }
 objdir=$lt_cv_objdir
 
 
 
 
 
-cat >>confdefs.h <<_ACEOF
-#define LT_OBJDIR "$lt_cv_objdir/"
-_ACEOF
+printf "%s\n" "#define LT_OBJDIR \"$lt_cv_objdir/\"" >>confdefs.h
 
 
 
@@ -17164,8 +18077,8 @@ esac
 ofile=libtool
 can_build_shared=yes
 
-# All known linkers require a '.a' archive for static linking (except MSVC,
-# which needs '.lib').
+# All known linkers require a '.a' archive for static linking (except MSVC and
+# ICC, which need '.lib').
 libext=a
 
 with_gnu_ld=$lt_cv_prog_gnu_ld
@@ -17189,11 +18102,12 @@ test -z "$MAGIC_CMD" && MAGIC_CMD=file
 case $deplibs_check_method in
 file_magic*)
   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
-$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
-if ${lt_cv_path_MAGIC_CMD+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
+printf %s "checking for ${ac_tool_prefix}file... " >&6; }
+if test ${lt_cv_path_MAGIC_CMD+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   case $MAGIC_CMD in
 [\\/*] |  ?:[\\/]*)
   lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
@@ -17242,11 +18156,11 @@ fi
 
 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
 if test -n "$MAGIC_CMD"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
-$as_echo "$MAGIC_CMD" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
+printf "%s\n" "$MAGIC_CMD" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
@@ -17255,11 +18169,12 @@ fi
 
 if test -z "$lt_cv_path_MAGIC_CMD"; then
   if test -n "$ac_tool_prefix"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
-$as_echo_n "checking for file... " >&6; }
-if ${lt_cv_path_MAGIC_CMD+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for file" >&5
+printf %s "checking for file... " >&6; }
+if test ${lt_cv_path_MAGIC_CMD+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   case $MAGIC_CMD in
 [\\/*] |  ?:[\\/]*)
   lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
@@ -17308,11 +18223,11 @@ fi
 
 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
 if test -n "$MAGIC_CMD"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
-$as_echo "$MAGIC_CMD" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
+printf "%s\n" "$MAGIC_CMD" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
@@ -17397,11 +18312,12 @@ if test yes = "$GCC"; then
     lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
   esac
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
-$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
-if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+printf %s "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
+if test ${lt_cv_prog_compiler_rtti_exceptions+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   lt_cv_prog_compiler_rtti_exceptions=no
    ac_outfile=conftest.$ac_objext
    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
@@ -17432,8 +18348,8 @@ else
    $RM conftest*
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
-$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+printf "%s\n" "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
 
 if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
     lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
@@ -17674,7 +18590,7 @@ lt_prog_compiler_static=
 	lt_prog_compiler_static='-qstaticlink'
 	;;
       *)
-	case `$CC -V 2>&1 | sed 5q` in
+	case `$CC -V 2>&1 | $SED 5q` in
 	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
 	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
 	  lt_prog_compiler_pic='-KPIC'
@@ -17790,26 +18706,28 @@ case $host_os in
     ;;
 esac
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
-$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
-if ${lt_cv_prog_compiler_pic+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+printf %s "checking for $compiler option to produce PIC... " >&6; }
+if test ${lt_cv_prog_compiler_pic+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
-$as_echo "$lt_cv_prog_compiler_pic" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
+printf "%s\n" "$lt_cv_prog_compiler_pic" >&6; }
 lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
 
 #
 # Check to make sure the PIC flag actually works.
 #
 if test -n "$lt_prog_compiler_pic"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
-$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
-if ${lt_cv_prog_compiler_pic_works+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
+printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
+if test ${lt_cv_prog_compiler_pic_works+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   lt_cv_prog_compiler_pic_works=no
    ac_outfile=conftest.$ac_objext
    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
@@ -17840,8 +18758,8 @@ else
    $RM conftest*
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
-$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
+printf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; }
 
 if test yes = "$lt_cv_prog_compiler_pic_works"; then
     case $lt_prog_compiler_pic in
@@ -17869,11 +18787,12 @@ fi
 # Check to make sure the static flag actually works.
 #
 wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
-$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
-if ${lt_cv_prog_compiler_static_works+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
+if test ${lt_cv_prog_compiler_static_works+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   lt_cv_prog_compiler_static_works=no
    save_LDFLAGS=$LDFLAGS
    LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
@@ -17897,8 +18816,8 @@ else
    LDFLAGS=$save_LDFLAGS
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
-$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
+printf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; }
 
 if test yes = "$lt_cv_prog_compiler_static_works"; then
     :
@@ -17912,11 +18831,12 @@ fi
 
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
-$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
-if ${lt_cv_prog_compiler_c_o+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test ${lt_cv_prog_compiler_c_o+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   lt_cv_prog_compiler_c_o=no
    $RM -r conftest 2>/dev/null
    mkdir conftest
@@ -17959,19 +18879,20 @@ else
    $RM conftest*
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
-$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
+printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; }
 
 
 
 
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
-$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
-if ${lt_cv_prog_compiler_c_o+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test ${lt_cv_prog_compiler_c_o+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   lt_cv_prog_compiler_c_o=no
    $RM -r conftest 2>/dev/null
    mkdir conftest
@@ -18014,8 +18935,8 @@ else
    $RM conftest*
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
-$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
+printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; }
 
 
 
@@ -18023,19 +18944,19 @@ $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
 hard_links=nottested
 if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
   # do not overwrite the value of need_locks provided by the user
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
-$as_echo_n "checking if we can lock with hard links... " >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
+printf %s "checking if we can lock with hard links... " >&6; }
   hard_links=yes
   $RM conftest*
   ln conftest.a conftest.b 2>/dev/null && hard_links=no
   touch conftest.a
   ln conftest.a conftest.b 2>&5 || hard_links=no
   ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
-$as_echo "$hard_links" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
+printf "%s\n" "$hard_links" >&6; }
   if test no = "$hard_links"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
-$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
+printf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
     need_locks=warn
   fi
 else
@@ -18047,8 +18968,8 @@ fi
 
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
-$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
 
   runpath_var=
   allow_undefined_flag=
@@ -18092,15 +19013,15 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
 
   case $host_os in
   cygwin* | mingw* | pw32* | cegcc*)
-    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
     # When not using gcc, we currently assume that we are using
-    # Microsoft Visual C++.
+    # Microsoft Visual C++ or Intel C++ Compiler.
     if test yes != "$GCC"; then
       with_gnu_ld=no
     fi
     ;;
   interix*)
-    # we just hope/assume this is gcc and not c89 (= MSVC++)
+    # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC)
     with_gnu_ld=yes
     ;;
   openbsd* | bitrig*)
@@ -18152,7 +19073,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
       whole_archive_flag_spec=
     fi
     supports_anon_versioning=no
-    case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
+    case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
       *GNU\ gold*) supports_anon_versioning=yes ;;
       *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
@@ -18264,6 +19185,7 @@ _LT_EOF
 	emximp -o $lib $output_objdir/$libname.def'
       old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
       enable_shared_with_static_runtimes=yes
+      file_list_spec='@'
       ;;
 
     interix[3-9]*)
@@ -18278,7 +19200,7 @@ _LT_EOF
       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
       archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-      archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      archive_expsym_cmds='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
       ;;
 
     gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
@@ -18321,7 +19243,7 @@ _LT_EOF
 	  compiler_needs_object=yes
 	  ;;
 	esac
-	case `$CC -V 2>&1 | sed 5q` in
+	case `$CC -V 2>&1 | $SED 5q` in
 	*Sun\ C*)			# Sun C 5.9
 	  whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
 	  compiler_needs_object=yes
@@ -18333,7 +19255,7 @@ _LT_EOF
 
         if test yes = "$supports_anon_versioning"; then
           archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
-            cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+            cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
             echo "local: *; };" >> $output_objdir/$libname.ver~
             $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
         fi
@@ -18349,7 +19271,7 @@ _LT_EOF
 	  archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
 	  if test yes = "$supports_anon_versioning"; then
 	    archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
-              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+              cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
               echo "local: *; };" >> $output_objdir/$libname.ver~
               $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
 	  fi
@@ -18481,7 +19403,7 @@ _LT_EOF
 	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
 	  export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
 	else
-	  export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
+	  export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
 	fi
 	aix_use_runtimelinking=no
 
@@ -18603,21 +19525,23 @@ _LT_EOF
         if test set = "${lt_cv_aix_libpath+set}"; then
   aix_libpath=$lt_cv_aix_libpath
 else
-  if ${lt_cv_aix_libpath_+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+  if test ${lt_cv_aix_libpath_+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
 
   lt_aix_libpath_sed='
       /Import File Strings/,/^$/ {
@@ -18632,7 +19556,7 @@ if ac_fn_c_try_link "$LINENO"; then :
     lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
   fi
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
   if test -z "$lt_cv_aix_libpath_"; then
     lt_cv_aix_libpath_=/usr/lib:/lib
@@ -18656,21 +19580,23 @@ fi
 	 if test set = "${lt_cv_aix_libpath+set}"; then
   aix_libpath=$lt_cv_aix_libpath
 else
-  if ${lt_cv_aix_libpath_+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+  if test ${lt_cv_aix_libpath_+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
 
   lt_aix_libpath_sed='
       /Import File Strings/,/^$/ {
@@ -18685,7 +19611,7 @@ if ac_fn_c_try_link "$LINENO"; then :
     lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
   fi
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
   if test -z "$lt_cv_aix_libpath_"; then
     lt_cv_aix_libpath_=/usr/lib:/lib
@@ -18748,12 +19674,12 @@ fi
 
     cygwin* | mingw* | pw32* | cegcc*)
       # When not using gcc, we currently assume that we are using
-      # Microsoft Visual C++.
+      # Microsoft Visual C++ or Intel C++ Compiler.
       # hardcode_libdir_flag_spec is actually meaningless, as there is
       # no search path for DLLs.
       case $cc_basename in
-      cl*)
-	# Native MSVC
+      cl* | icl*)
+	# Native MSVC or ICC
 	hardcode_libdir_flag_spec=' '
 	allow_undefined_flag=unsupported
 	always_export_symbols=yes
@@ -18794,7 +19720,7 @@ fi
           fi'
 	;;
       *)
-	# Assume MSVC wrapper
+	# Assume MSVC and ICC wrapper
 	hardcode_libdir_flag_spec=' '
 	allow_undefined_flag=unsupported
 	# Tell ltmain to make .lib files, not .a files.
@@ -18835,8 +19761,8 @@ fi
     output_verbose_link_cmd=func_echo_all
     archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
     module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
-    archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
-    module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
+    archive_expsym_cmds="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
+    module_expsym_cmds="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
 
   else
   ld_shlibs=no
@@ -18870,7 +19796,7 @@ fi
       ;;
 
     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
-    freebsd* | dragonfly*)
+    freebsd* | dragonfly* | midnightbsd*)
       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
       hardcode_libdir_flag_spec='-R$libdir'
       hardcode_direct=yes
@@ -18936,11 +19862,12 @@ fi
 
 	  # Older versions of the 11.00 compiler do not understand -b yet
 	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
-	  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
-$as_echo_n "checking if $CC understands -b... " >&6; }
-if ${lt_cv_prog_compiler__b+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
+printf %s "checking if $CC understands -b... " >&6; }
+if test ${lt_cv_prog_compiler__b+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   lt_cv_prog_compiler__b=no
    save_LDFLAGS=$LDFLAGS
    LDFLAGS="$LDFLAGS -b"
@@ -18964,8 +19891,8 @@ else
    LDFLAGS=$save_LDFLAGS
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
-$as_echo "$lt_cv_prog_compiler__b" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
+printf "%s\n" "$lt_cv_prog_compiler__b" >&6; }
 
 if test yes = "$lt_cv_prog_compiler__b"; then
     archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
@@ -19005,28 +19932,30 @@ fi
 	# work, assume that -exports_file does not work either and
 	# implicitly export all symbols.
 	# This should be the same for all languages, so no per-tag cache variable.
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
-$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
-if ${lt_cv_irix_exported_symbol+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
+printf %s "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
+if test ${lt_cv_irix_exported_symbol+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   save_LDFLAGS=$LDFLAGS
 	   LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
 	   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int foo (void) { return 0; }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
   lt_cv_irix_exported_symbol=yes
-else
+else $as_nop
   lt_cv_irix_exported_symbol=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
            LDFLAGS=$save_LDFLAGS
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
-$as_echo "$lt_cv_irix_exported_symbol" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
+printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; }
 	if test yes = "$lt_cv_irix_exported_symbol"; then
           archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
 	fi
@@ -19118,6 +20047,7 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
 	emximp -o $lib $output_objdir/$libname.def'
       old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
       enable_shared_with_static_runtimes=yes
+      file_list_spec='@'
       ;;
 
     osf3*)
@@ -19306,8 +20236,8 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
     fi
   fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
-$as_echo "$ld_shlibs" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
+printf "%s\n" "$ld_shlibs" >&6; }
 test no = "$ld_shlibs" && can_build_shared=no
 
 with_gnu_ld=$with_gnu_ld
@@ -19343,18 +20273,19 @@ x|xyes)
       # Test whether the compiler implicitly links with -lc since on some
       # systems, -lgcc has to come before -lc. If gcc already passes -lc
       # to ld, don't add -lc before -lgcc.
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
-$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
-if ${lt_cv_archive_cmds_need_lc+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
+printf %s "checking whether -lc should be explicitly linked in... " >&6; }
+if test ${lt_cv_archive_cmds_need_lc+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   $RM conftest*
 	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
 
 	if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; } 2>conftest.err; then
 	  soname=conftest
 	  lib=conftest
@@ -19372,7 +20303,7 @@ else
 	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
   (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }
 	  then
 	    lt_cv_archive_cmds_need_lc=no
@@ -19386,8 +20317,8 @@ else
 	$RM conftest*
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
-$as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
+printf "%s\n" "$lt_cv_archive_cmds_need_lc" >&6; }
       archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
       ;;
     esac
@@ -19546,8 +20477,8 @@ esac
 
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
-$as_echo_n "checking dynamic linker characteristics... " >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
+printf %s "checking dynamic linker characteristics... " >&6; }
 
 if test yes = "$GCC"; then
   case $host_os in
@@ -19809,7 +20740,7 @@ cygwin* | mingw* | pw32* | cegcc*)
     case $host_os in
     cygwin*)
       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+      soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
 
       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
       ;;
@@ -19819,14 +20750,14 @@ cygwin* | mingw* | pw32* | cegcc*)
       ;;
     pw32*)
       # pw32 DLLs use 'pw' prefix rather than 'lib'
-      library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+      library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
       ;;
     esac
     dynamic_linker='Win32 ld.exe'
     ;;
 
-  *,cl*)
-    # Native MSVC
+  *,cl* | *,icl*)
+    # Native MSVC or ICC
     libname_spec='$name'
     soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
     library_names_spec='$libname.dll.lib'
@@ -19845,7 +20776,7 @@ cygwin* | mingw* | pw32* | cegcc*)
       done
       IFS=$lt_save_ifs
       # Convert to MSYS style.
-      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
+      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
       ;;
     cygwin*)
       # Convert to unix form, then to dos form, then back to unix form
@@ -19879,1290 +20810,522 @@ cygwin* | mingw* | pw32* | cegcc*)
        $RM \$dlpath'
     shlibpath_overrides_runpath=yes
     dynamic_linker='Win32 link.exe'
-    ;;
-
-  *)
-    # Assume MSVC wrapper
-    library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
-    dynamic_linker='Win32 ld.exe'
-    ;;
-  esac
-  # FIXME: first we should search . and the directory the executable is in
-  shlibpath_var=PATH
-  ;;
-
-darwin* | rhapsody*)
-  dynamic_linker="$host_os dyld"
-  version_type=darwin
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='$libname$release$versuffix$shared_ext $libname$release$major$shared_ext $libname$shared_ext'
-  soname_spec='$libname$release$major$shared_ext'
-  shlibpath_overrides_runpath=yes
-  shlibpath_var=DYLD_LIBRARY_PATH
-  shrext_cmds='`test .$module = .yes && echo .bundle || echo .dylib`'
-
-  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
-  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
-  ;;
-
-dgux*)
-  version_type=linux # correct to gnu/linux during the next big refactor
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
-  soname_spec='$libname$release$shared_ext$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-freebsd* | dragonfly*)
-  # DragonFly does not have aout.  When/if they implement a new
-  # versioning mechanism, adjust this.
-  if test -x /usr/bin/objformat; then
-    objformat=`/usr/bin/objformat`
-  else
-    case $host_os in
-    freebsd[23].*) objformat=aout ;;
-    *) objformat=elf ;;
-    esac
-  fi
-  # Handle Gentoo/FreeBSD as it was Linux
-  case $host_vendor in
-    gentoo)
-      version_type=linux ;;
-    *)
-      version_type=freebsd-$objformat ;;
-  esac
-
-  case $version_type in
-    freebsd-elf*)
-      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
-      soname_spec='$libname$release$shared_ext$major'
-      need_version=no
-      need_lib_prefix=no
-      ;;
-    freebsd-*)
-      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
-      need_version=yes
-      ;;
-    linux)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-      soname_spec='${libname}${release}${shared_ext}$major'
-      need_lib_prefix=no
-      need_version=no
-      ;;
-  esac
-  shlibpath_var=LD_LIBRARY_PATH
-  case $host_os in
-  freebsd2.*)
-    shlibpath_overrides_runpath=yes
-    ;;
-  freebsd3.[01]* | freebsdelf3.[01]*)
-    shlibpath_overrides_runpath=yes
-    hardcode_into_libs=yes
-    ;;
-  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
-  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
-    shlibpath_overrides_runpath=no
-    hardcode_into_libs=yes
-    ;;
-  *) # from 4.6 on, and DragonFly
-    shlibpath_overrides_runpath=yes
-    hardcode_into_libs=yes
-    ;;
-  esac
-  ;;
-
-haiku*)
-  version_type=linux # correct to gnu/linux during the next big refactor
-  need_lib_prefix=no
-  need_version=no
-  dynamic_linker="$host_os runtime_loader"
-  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
-  soname_spec='$libname$release$shared_ext$major'
-  shlibpath_var=LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
-  hardcode_into_libs=yes
-  ;;
-
-hpux9* | hpux10* | hpux11*)
-  # Give a soname corresponding to the major version so that dld.sl refuses to
-  # link against other versions.
-  version_type=sunos
-  need_lib_prefix=no
-  need_version=no
-  case $host_cpu in
-  ia64*)
-    shrext_cmds='.so'
-    hardcode_into_libs=yes
-    dynamic_linker="$host_os dld.so"
-    shlibpath_var=LD_LIBRARY_PATH
-    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
-    soname_spec='$libname$release$shared_ext$major'
-    if test 32 = "$HPUX_IA64_MODE"; then
-      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
-      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
-    else
-      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
-      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
-    fi
-    ;;
-  hppa*64*)
-    shrext_cmds='.sl'
-    hardcode_into_libs=yes
-    dynamic_linker="$host_os dld.sl"
-    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
-    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
-    soname_spec='$libname$release$shared_ext$major'
-    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
-    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
-    ;;
-  *)
-    shrext_cmds='.sl'
-    dynamic_linker="$host_os dld.sl"
-    shlibpath_var=SHLIB_PATH
-    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
-    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
-    soname_spec='$libname$release$shared_ext$major'
-    ;;
-  esac
-  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
-  postinstall_cmds='chmod 555 $lib'
-  # or fails outright, so override atomically:
-  install_override_mode=555
-  ;;
-
-interix[3-9]*)
-  version_type=linux # correct to gnu/linux during the next big refactor
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
-  soname_spec='$libname$release$shared_ext$major'
-  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  ;;
-
-irix5* | irix6* | nonstopux*)
-  case $host_os in
-    nonstopux*) version_type=nonstopux ;;
-    *)
-	if test yes = "$lt_cv_prog_gnu_ld"; then
-		version_type=linux # correct to gnu/linux during the next big refactor
-	else
-		version_type=irix
-	fi ;;
-  esac
-  need_lib_prefix=no
-  need_version=no
-  soname_spec='$libname$release$shared_ext$major'
-  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
-  case $host_os in
-  irix5* | nonstopux*)
-    libsuff= shlibsuff=
-    ;;
-  *)
-    case $LD in # libtool.m4 will add one of these switches to LD
-    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
-      libsuff= shlibsuff= libmagic=32-bit;;
-    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
-      libsuff=32 shlibsuff=N32 libmagic=N32;;
-    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
-      libsuff=64 shlibsuff=64 libmagic=64-bit;;
-    *) libsuff= shlibsuff= libmagic=never-match;;
-    esac
-    ;;
-  esac
-  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
-  shlibpath_overrides_runpath=no
-  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
-  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
-  hardcode_into_libs=yes
-  ;;
-
-# No shared lib support for Linux oldld, aout, or coff.
-linux*oldld* | linux*aout* | linux*coff*)
-  dynamic_linker=no
-  ;;
-
-linux*android*)
-  version_type=none # Android doesn't support versioned libraries.
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='$libname$release$shared_ext'
-  soname_spec='$libname$release$shared_ext'
-  finish_cmds=
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-
-  # This implies no fast_install, which is unacceptable.
-  # Some rework will be needed to allow for fast_install
-  # before this can be enabled.
-  hardcode_into_libs=yes
-
-  dynamic_linker='Android linker'
-  # Don't embed -rpath directories since the linker doesn't support them.
-  hardcode_libdir_flag_spec='-L$libdir'
-  ;;
-
-# This must be glibc/ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
-  version_type=linux # correct to gnu/linux during the next big refactor
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
-  soname_spec='$libname$release$shared_ext$major'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-
-  # Some binutils ld are patched to set DT_RUNPATH
-  if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  lt_cv_shlibpath_overrides_runpath=no
-    save_LDFLAGS=$LDFLAGS
-    save_libdir=$libdir
-    eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
-	 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
-  lt_cv_shlibpath_overrides_runpath=yes
-fi
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-    LDFLAGS=$save_LDFLAGS
-    libdir=$save_libdir
-
-fi
-
-  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
-
-  # This implies no fast_install, which is unacceptable.
-  # Some rework will be needed to allow for fast_install
-  # before this can be enabled.
-  hardcode_into_libs=yes
-
-  # Ideally, we could use ldconfig to report *all* directores which are
-  # searched for libraries, however this is still not possible.  Aside from not
-  # being certain /sbin/ldconfig is available, command
-  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
-  # even though it is searched at run-time.  Try to do the best guess by
-  # appending ld.so.conf contents (and includes) to the search path.
-  if test -f /etc/ld.so.conf; then
-    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
-    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
-  fi
-
-  # We used to test for /lib/ld.so.1 and disable shared libraries on
-  # powerpc, because MkLinux only supported shared libraries with the
-  # GNU dynamic linker.  Since this was broken with cross compilers,
-  # most powerpc-linux boxes support dynamic linking these days and
-  # people can always --disable-shared, the test was removed, and we
-  # assume the GNU/Linux dynamic linker is in use.
-  dynamic_linker='GNU/Linux ld.so'
-  ;;
-
-netbsd*)
-  version_type=sunos
-  need_lib_prefix=no
-  need_version=no
-  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
-    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
-    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-    dynamic_linker='NetBSD (a.out) ld.so'
-  else
-    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
-    soname_spec='$libname$release$shared_ext$major'
-    dynamic_linker='NetBSD ld.elf_so'
-  fi
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  hardcode_into_libs=yes
-  ;;
-
-newsos6)
-  version_type=linux # correct to gnu/linux during the next big refactor
-  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  ;;
-
-*nto* | *qnx*)
-  version_type=qnx
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
-  soname_spec='$libname$release$shared_ext$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='ldqnx.so'
-  ;;
-
-openbsd* | bitrig*)
-  version_type=sunos
-  sys_lib_dlsearch_path_spec=/usr/lib
-  need_lib_prefix=no
-  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
-    need_version=no
-  else
-    need_version=yes
-  fi
-  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  ;;
-
-os2*)
-  libname_spec='$name'
-  version_type=windows
-  shrext_cmds=.dll
-  need_version=no
-  need_lib_prefix=no
-  # OS/2 can only load a DLL with a base name of 8 characters or less.
-  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
-    v=$($ECHO $release$versuffix | tr -d .-);
-    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
-    $ECHO $n$v`$shared_ext'
-  library_names_spec='${libname}_dll.$libext'
-  dynamic_linker='OS/2 ld.exe'
-  shlibpath_var=BEGINLIBPATH
-  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
-  postinstall_cmds='base_file=`basename \$file`~
-    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
-    dldir=$destdir/`dirname \$dlpath`~
-    test -d \$dldir || mkdir -p \$dldir~
-    $install_prog $dir/$dlname \$dldir/$dlname~
-    chmod a+x \$dldir/$dlname~
-    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
-      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
-    fi'
-  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
-    dlpath=$dir/\$dldll~
-    $RM \$dlpath'
-  ;;
-
-osf3* | osf4* | osf5*)
-  version_type=osf
-  need_lib_prefix=no
-  need_version=no
-  soname_spec='$libname$release$shared_ext$major'
-  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
-  shlibpath_var=LD_LIBRARY_PATH
-  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
-  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
-  ;;
-
-rdos*)
-  dynamic_linker=no
-  ;;
-
-solaris*)
-  version_type=linux # correct to gnu/linux during the next big refactor
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
-  soname_spec='$libname$release$shared_ext$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  hardcode_into_libs=yes
-  # ldd complains unless libraries are executable
-  postinstall_cmds='chmod +x $lib'
-  ;;
-
-sunos4*)
-  version_type=sunos
-  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
-  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  if test yes = "$with_gnu_ld"; then
-    need_lib_prefix=no
-  fi
-  need_version=yes
-  ;;
-
-sysv4 | sysv4.3*)
-  version_type=linux # correct to gnu/linux during the next big refactor
-  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
-  soname_spec='$libname$release$shared_ext$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  case $host_vendor in
-    sni)
-      shlibpath_overrides_runpath=no
-      need_lib_prefix=no
-      runpath_var=LD_RUN_PATH
-      ;;
-    siemens)
-      need_lib_prefix=no
-      ;;
-    motorola)
-      need_lib_prefix=no
-      need_version=no
-      shlibpath_overrides_runpath=no
-      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
-      ;;
-  esac
-  ;;
-
-sysv4*MP*)
-  if test -d /usr/nec; then
-    version_type=linux # correct to gnu/linux during the next big refactor
-    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
-    soname_spec='$libname$shared_ext.$major'
-    shlibpath_var=LD_LIBRARY_PATH
-  fi
-  ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
-  version_type=sco
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
-  soname_spec='$libname$release$shared_ext$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  hardcode_into_libs=yes
-  if test yes = "$with_gnu_ld"; then
-    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
-  else
-    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
-    case $host_os in
-      sco3.2v5*)
-        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
-	;;
-    esac
-  fi
-  sys_lib_dlsearch_path_spec='/usr/lib'
-  ;;
-
-tpf*)
-  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
-  version_type=linux # correct to gnu/linux during the next big refactor
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  ;;
-
-uts4*)
-  version_type=linux # correct to gnu/linux during the next big refactor
-  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
-  soname_spec='$libname$release$shared_ext$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-*)
-  dynamic_linker=no
-  ;;
-esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
-$as_echo "$dynamic_linker" >&6; }
-test no = "$dynamic_linker" && can_build_shared=no
-
-variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test yes = "$GCC"; then
-  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
-fi
-
-if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
-  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
-fi
-
-if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
-  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
-fi
-
-# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
-configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
-
-# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
-func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
-
-# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
-configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
-$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
-hardcode_action=
-if test -n "$hardcode_libdir_flag_spec" ||
-   test -n "$runpath_var" ||
-   test yes = "$hardcode_automatic"; then
-
-  # We can hardcode non-existent directories.
-  if test no != "$hardcode_direct" &&
-     # If the only mechanism to avoid hardcoding is shlibpath_var, we
-     # have to relink, otherwise we might link with an installed library
-     # when we should be linking with a yet-to-be-installed one
-     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
-     test no != "$hardcode_minus_L"; then
-    # Linking always hardcodes the temporary library directory.
-    hardcode_action=relink
-  else
-    # We can link without hardcoding, and we can hardcode nonexisting dirs.
-    hardcode_action=immediate
-  fi
-else
-  # We cannot hardcode anything, or else we can only hardcode existing
-  # directories.
-  hardcode_action=unsupported
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
-$as_echo "$hardcode_action" >&6; }
-
-if test relink = "$hardcode_action" ||
-   test yes = "$inherit_rpath"; then
-  # Fast installation is not supported
-  enable_fast_install=no
-elif test yes = "$shlibpath_overrides_runpath" ||
-     test no = "$enable_shared"; then
-  # Fast installation is not necessary
-  enable_fast_install=needless
-fi
-
-
-
-
-
-
-  if test yes != "$enable_dlopen"; then
-  enable_dlopen=unknown
-  enable_dlopen_self=unknown
-  enable_dlopen_self_static=unknown
-else
-  lt_cv_dlopen=no
-  lt_cv_dlopen_libs=
-
-  case $host_os in
-  beos*)
-    lt_cv_dlopen=load_add_on
-    lt_cv_dlopen_libs=
-    lt_cv_dlopen_self=yes
-    ;;
-
-  mingw* | pw32* | cegcc*)
-    lt_cv_dlopen=LoadLibrary
-    lt_cv_dlopen_libs=
-    ;;
-
-  cygwin*)
-    lt_cv_dlopen=dlopen
-    lt_cv_dlopen_libs=
-    ;;
-
-  darwin*)
-    # if libdl is installed we need to link against it
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
-$as_echo_n "checking for dlopen in -ldl... " >&6; }
-if ${ac_cv_lib_dl_dlopen+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldl  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlopen ();
-int
-main ()
-{
-return dlopen ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_dl_dlopen=yes
-else
-  ac_cv_lib_dl_dlopen=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
-$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
-if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
-  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
-else
-
-    lt_cv_dlopen=dyld
-    lt_cv_dlopen_libs=
-    lt_cv_dlopen_self=yes
-
-fi
-
-    ;;
-
-  tpf*)
-    # Don't try to run any link tests for TPF.  We know it's impossible
-    # because TPF is a cross-compiler, and we know how we open DSOs.
-    lt_cv_dlopen=dlopen
-    lt_cv_dlopen_libs=
-    lt_cv_dlopen_self=no
-    ;;
-
-  *)
-    ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
-if test "x$ac_cv_func_shl_load" = xyes; then :
-  lt_cv_dlopen=shl_load
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
-$as_echo_n "checking for shl_load in -ldld... " >&6; }
-if ${ac_cv_lib_dld_shl_load+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldld  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char shl_load ();
-int
-main ()
-{
-return shl_load ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_dld_shl_load=yes
-else
-  ac_cv_lib_dld_shl_load=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
-$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
-if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
-  lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
-else
-  ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
-if test "x$ac_cv_func_dlopen" = xyes; then :
-  lt_cv_dlopen=dlopen
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
-$as_echo_n "checking for dlopen in -ldl... " >&6; }
-if ${ac_cv_lib_dl_dlopen+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldl  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlopen ();
-int
-main ()
-{
-return dlopen ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_dl_dlopen=yes
-else
-  ac_cv_lib_dl_dlopen=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
-$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
-if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
-  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
-$as_echo_n "checking for dlopen in -lsvld... " >&6; }
-if ${ac_cv_lib_svld_dlopen+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsvld  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlopen ();
-int
-main ()
-{
-return dlopen ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_svld_dlopen=yes
-else
-  ac_cv_lib_svld_dlopen=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
-$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
-if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
-  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
-$as_echo_n "checking for dld_link in -ldld... " >&6; }
-if ${ac_cv_lib_dld_dld_link+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldld  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dld_link ();
-int
-main ()
-{
-return dld_link ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_dld_dld_link=yes
-else
-  ac_cv_lib_dld_dld_link=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
-$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
-if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
-  lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
-fi
-
-
-fi
-
-
-fi
-
-
-fi
-
-
-fi
-
-
-fi
-
-    ;;
-  esac
-
-  if test no = "$lt_cv_dlopen"; then
-    enable_dlopen=no
-  else
-    enable_dlopen=yes
-  fi
-
-  case $lt_cv_dlopen in
-  dlopen)
-    save_CPPFLAGS=$CPPFLAGS
-    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
-
-    save_LDFLAGS=$LDFLAGS
-    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
-
-    save_LIBS=$LIBS
-    LIBS="$lt_cv_dlopen_libs $LIBS"
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
-$as_echo_n "checking whether a program can dlopen itself... " >&6; }
-if ${lt_cv_dlopen_self+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  	  if test yes = "$cross_compiling"; then :
-  lt_cv_dlopen_self=cross
-else
-  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
-  lt_status=$lt_dlunknown
-  cat > conftest.$ac_ext <<_LT_EOF
-#line $LINENO "configure"
-#include "confdefs.h"
-
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
-
-#ifdef RTLD_GLOBAL
-#  define LT_DLGLOBAL		RTLD_GLOBAL
-#else
-#  ifdef DL_GLOBAL
-#    define LT_DLGLOBAL		DL_GLOBAL
-#  else
-#    define LT_DLGLOBAL		0
-#  endif
-#endif
-
-/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
-   find out it does not work in some platform. */
-#ifndef LT_DLLAZY_OR_NOW
-#  ifdef RTLD_LAZY
-#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
-#  else
-#    ifdef DL_LAZY
-#      define LT_DLLAZY_OR_NOW		DL_LAZY
-#    else
-#      ifdef RTLD_NOW
-#        define LT_DLLAZY_OR_NOW	RTLD_NOW
-#      else
-#        ifdef DL_NOW
-#          define LT_DLLAZY_OR_NOW	DL_NOW
-#        else
-#          define LT_DLLAZY_OR_NOW	0
-#        endif
-#      endif
-#    endif
-#  endif
-#endif
-
-/* When -fvisibility=hidden is used, assume the code has been annotated
-   correspondingly for the symbols needed.  */
-#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
-int fnord () __attribute__((visibility("default")));
-#endif
-
-int fnord () { return 42; }
-int main ()
-{
-  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-  int status = $lt_dlunknown;
-
-  if (self)
-    {
-      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
-      else
-        {
-	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
-          else puts (dlerror ());
-	}
-      /* dlclose (self); */
-    }
-  else
-    puts (dlerror ());
-
-  return status;
-}
-_LT_EOF
-  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
-    (./conftest; exit; ) >&5 2>/dev/null
-    lt_status=$?
-    case x$lt_status in
-      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
-      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
-      x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
-    esac
-  else :
-    # compilation failed
-    lt_cv_dlopen_self=no
-  fi
-fi
-rm -fr conftest*
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
-$as_echo "$lt_cv_dlopen_self" >&6; }
-
-    if test yes = "$lt_cv_dlopen_self"; then
-      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
-$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
-if ${lt_cv_dlopen_self_static+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  	  if test yes = "$cross_compiling"; then :
-  lt_cv_dlopen_self_static=cross
-else
-  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
-  lt_status=$lt_dlunknown
-  cat > conftest.$ac_ext <<_LT_EOF
-#line $LINENO "configure"
-#include "confdefs.h"
-
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
-
-#ifdef RTLD_GLOBAL
-#  define LT_DLGLOBAL		RTLD_GLOBAL
-#else
-#  ifdef DL_GLOBAL
-#    define LT_DLGLOBAL		DL_GLOBAL
-#  else
-#    define LT_DLGLOBAL		0
-#  endif
-#endif
-
-/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
-   find out it does not work in some platform. */
-#ifndef LT_DLLAZY_OR_NOW
-#  ifdef RTLD_LAZY
-#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
-#  else
-#    ifdef DL_LAZY
-#      define LT_DLLAZY_OR_NOW		DL_LAZY
-#    else
-#      ifdef RTLD_NOW
-#        define LT_DLLAZY_OR_NOW	RTLD_NOW
-#      else
-#        ifdef DL_NOW
-#          define LT_DLLAZY_OR_NOW	DL_NOW
-#        else
-#          define LT_DLLAZY_OR_NOW	0
-#        endif
-#      endif
-#    endif
-#  endif
-#endif
+    ;;
 
-/* When -fvisibility=hidden is used, assume the code has been annotated
-   correspondingly for the symbols needed.  */
-#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
-int fnord () __attribute__((visibility("default")));
-#endif
+  *)
+    # Assume MSVC and ICC wrapper
+    library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
+    dynamic_linker='Win32 ld.exe'
+    ;;
+  esac
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
 
-int fnord () { return 42; }
-int main ()
-{
-  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-  int status = $lt_dlunknown;
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
+  soname_spec='$libname$release$major$shared_ext'
+  shlibpath_overrides_runpath=yes
+  shlibpath_var=DYLD_LIBRARY_PATH
+  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
 
-  if (self)
-    {
-      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
-      else
-        {
-	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
-          else puts (dlerror ());
-	}
-      /* dlclose (self); */
-    }
-  else
-    puts (dlerror ());
+  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
 
-  return status;
-}
-_LT_EOF
-  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
-    (./conftest; exit; ) >&5 2>/dev/null
-    lt_status=$?
-    case x$lt_status in
-      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
-      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
-      x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
+dgux*)
+  version_type=linux # correct to gnu/linux during the next big refactor
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+freebsd* | dragonfly* | midnightbsd*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  if test -x /usr/bin/objformat; then
+    objformat=`/usr/bin/objformat`
+  else
+    case $host_os in
+    freebsd[23].*) objformat=aout ;;
+    *) objformat=elf ;;
     esac
-  else :
-    # compilation failed
-    lt_cv_dlopen_self_static=no
   fi
-fi
-rm -fr conftest*
+  version_type=freebsd-$objformat
+  case $version_type in
+    freebsd-elf*)
+      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+      soname_spec='$libname$release$shared_ext$major'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2.*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  freebsd3.[01]* | freebsdelf3.[01]*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  *) # from 4.6 on, and DragonFly
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
 
+haiku*)
+  version_type=linux # correct to gnu/linux during the next big refactor
+  need_lib_prefix=no
+  need_version=no
+  dynamic_linker="$host_os runtime_loader"
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
+  shlibpath_var=LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
+  hardcode_into_libs=yes
+  ;;
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
-$as_echo "$lt_cv_dlopen_self_static" >&6; }
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  case $host_cpu in
+  ia64*)
+    shrext_cmds='.so'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.so"
+    shlibpath_var=LD_LIBRARY_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+    soname_spec='$libname$release$shared_ext$major'
+    if test 32 = "$HPUX_IA64_MODE"; then
+      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
+    else
+      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
     fi
-
-    CPPFLAGS=$save_CPPFLAGS
-    LDFLAGS=$save_LDFLAGS
-    LIBS=$save_LIBS
+    ;;
+  hppa*64*)
+    shrext_cmds='.sl'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+    soname_spec='$libname$release$shared_ext$major'
+    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+  *)
+    shrext_cmds='.sl'
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+    soname_spec='$libname$release$shared_ext$major'
     ;;
   esac
+  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
+  postinstall_cmds='chmod 555 $lib'
+  # or fails outright, so override atomically:
+  install_override_mode=555
+  ;;
 
-  case $lt_cv_dlopen_self in
-  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
-  *) enable_dlopen_self=unknown ;;
-  esac
+interix[3-9]*)
+  version_type=linux # correct to gnu/linux during the next big refactor
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
+  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
 
-  case $lt_cv_dlopen_self_static in
-  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
-  *) enable_dlopen_self_static=unknown ;;
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+	if test yes = "$lt_cv_prog_gnu_ld"; then
+		version_type=linux # correct to gnu/linux during the next big refactor
+	else
+		version_type=irix
+	fi ;;
   esac
-fi
-
-
-
-
-
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='$libname$release$shared_ext$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
+  case $host_os in
+  irix5* | nonstopux*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
+  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
+  hardcode_into_libs=yes
+  ;;
 
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
 
+linux*android*)
+  version_type=none # Android doesn't support versioned libraries.
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='$libname$release$shared_ext'
+  soname_spec='$libname$release$shared_ext'
+  finish_cmds=
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
 
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
 
+  dynamic_linker='Android linker'
+  # Don't embed -rpath directories since the linker doesn't support them.
+  hardcode_libdir_flag_spec='-L$libdir'
+  ;;
 
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+  version_type=linux # correct to gnu/linux during the next big refactor
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
 
+  # Some binutils ld are patched to set DT_RUNPATH
+  if test ${lt_cv_shlibpath_overrides_runpath+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  lt_cv_shlibpath_overrides_runpath=no
+    save_LDFLAGS=$LDFLAGS
+    save_libdir=$libdir
+    eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
+	 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+int
+main (void)
+{
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null
+then :
+  lt_cv_shlibpath_overrides_runpath=yes
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+    LDFLAGS=$save_LDFLAGS
+    libdir=$save_libdir
 
+fi
 
+  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
 
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
 
-striplib=
-old_striplib=
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
-$as_echo_n "checking whether stripping libraries is possible... " >&6; }
-if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
-  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
-  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
-# FIXME - insert some real tests, host_os isn't really good enough
-  case $host_os in
-  darwin*)
-    if test -n "$STRIP"; then
-      striplib="$STRIP -x"
-      old_striplib="$STRIP -S"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-    else
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-    fi
-    ;;
-  *)
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-    ;;
-  esac
-fi
+  # Add ABI-specific directories to the system library path.
+  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
 
+  # Ideally, we could use ldconfig to report *all* directores which are
+  # searched for libraries, however this is still not possible.  Aside from not
+  # being certain /sbin/ldconfig is available, command
+  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
+  # even though it is searched at run-time.  Try to do the best guess by
+  # appending ld.so.conf contents (and includes) to the search path.
+  if test -f /etc/ld.so.conf; then
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
+  fi
 
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
 
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+    soname_spec='$libname$release$shared_ext$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
 
+newsos6)
+  version_type=linux # correct to gnu/linux during the next big refactor
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
 
+*nto* | *qnx*)
+  version_type=qnx
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='ldqnx.so'
+  ;;
 
+openbsd* | bitrig*)
+  version_type=sunos
+  sys_lib_dlsearch_path_spec=/usr/lib
+  need_lib_prefix=no
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+    need_version=no
+  else
+    need_version=yes
+  fi
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
 
+os2*)
+  libname_spec='$name'
+  version_type=windows
+  shrext_cmds=.dll
+  need_version=no
+  need_lib_prefix=no
+  # OS/2 can only load a DLL with a base name of 8 characters or less.
+  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
+    v=$($ECHO $release$versuffix | tr -d .-);
+    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
+    $ECHO $n$v`$shared_ext'
+  library_names_spec='${libname}_dll.$libext'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=BEGINLIBPATH
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+  postinstall_cmds='base_file=`basename \$file`~
+    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
+    dldir=$destdir/`dirname \$dlpath`~
+    test -d \$dldir || mkdir -p \$dldir~
+    $install_prog $dir/$dlname \$dldir/$dlname~
+    chmod a+x \$dldir/$dlname~
+    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+    fi'
+  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
+    dlpath=$dir/\$dldll~
+    $RM \$dlpath'
+  ;;
 
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='$libname$release$shared_ext$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+  ;;
 
+rdos*)
+  dynamic_linker=no
+  ;;
 
+solaris*)
+  version_type=linux # correct to gnu/linux during the next big refactor
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
 
+sunos4*)
+  version_type=sunos
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test yes = "$with_gnu_ld"; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
 
-  # Report what library types will actually be built
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
-$as_echo_n "checking if libtool supports shared libraries... " >&6; }
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
-$as_echo "$can_build_shared" >&6; }
+sysv4 | sysv4.3*)
+  version_type=linux # correct to gnu/linux during the next big refactor
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_vendor in
+    sni)
+      shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      runpath_var=LD_RUN_PATH
+      ;;
+    siemens)
+      need_lib_prefix=no
+      ;;
+    motorola)
+      need_lib_prefix=no
+      need_version=no
+      shlibpath_overrides_runpath=no
+      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+      ;;
+  esac
+  ;;
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
-$as_echo_n "checking whether to build shared libraries... " >&6; }
-  test no = "$can_build_shared" && enable_shared=no
+sysv4*MP*)
+  if test -d /usr/nec; then
+    version_type=linux # correct to gnu/linux during the next big refactor
+    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
+    soname_spec='$libname$shared_ext.$major'
+    shlibpath_var=LD_LIBRARY_PATH
+  fi
+  ;;
 
-  # On AIX, shared libraries and static libraries use the same namespace, and
-  # are all built from PIC.
-  case $host_os in
-  aix3*)
-    test yes = "$enable_shared" && enable_static=no
-    if test -n "$RANLIB"; then
-      archive_cmds="$archive_cmds~\$RANLIB \$lib"
-      postinstall_cmds='$RANLIB $lib'
-    fi
-    ;;
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  version_type=sco
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  if test yes = "$with_gnu_ld"; then
+    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+  else
+    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+    case $host_os in
+      sco3.2v5*)
+        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+	;;
+    esac
+  fi
+  sys_lib_dlsearch_path_spec='/usr/lib'
+  ;;
 
-  aix[4-9]*)
-    if test ia64 != "$host_cpu"; then
-      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
-      yes,aix,yes) ;;			# shared object as lib.so file only
-      yes,svr4,*) ;;			# shared object as lib.so archive member only
-      yes,*) enable_static=no ;;	# shared object in lib.a archive as well
-      esac
-    fi
-    ;;
-  esac
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
-$as_echo "$enable_shared" >&6; }
+tpf*)
+  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
+  version_type=linux # correct to gnu/linux during the next big refactor
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
-$as_echo_n "checking whether to build static libraries... " >&6; }
-  # Make sure either enable_shared or enable_static is yes.
-  test yes = "$enable_shared" || enable_static=yes
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
-$as_echo "$enable_static" >&6; }
+uts4*)
+  version_type=linux # correct to gnu/linux during the next big refactor
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
 
+*)
+  dynamic_linker=no
+  ;;
+esac
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
+printf "%s\n" "$dynamic_linker" >&6; }
+test no = "$dynamic_linker" && can_build_shared=no
 
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test yes = "$GCC"; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
 
+if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
+  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
+fi
 
+if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
+  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
 fi
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-CC=$lt_save_CC
+# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
+configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
+
+# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
+func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
+
+# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
+configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
 
 
 
@@ -21178,12 +21341,10 @@ CC=$lt_save_CC
 
 
 
-        ac_config_commands="$ac_config_commands libtool"
 
 
 
 
-# Only expand once:
 
 
 
@@ -21193,5298 +21354,4959 @@ CC=$lt_save_CC
 
 
 
-if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
-	if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
-set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_PKG_CONFIG+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $PKG_CONFIG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
 
-  ;;
-esac
-fi
-PKG_CONFIG=$ac_cv_path_PKG_CONFIG
-if test -n "$PKG_CONFIG"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
-$as_echo "$PKG_CONFIG" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
 
 
-fi
-if test -z "$ac_cv_path_PKG_CONFIG"; then
-  ac_pt_PKG_CONFIG=$PKG_CONFIG
-  # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $ac_pt_PKG_CONFIG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
 
-  ;;
-esac
-fi
-ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
-if test -n "$ac_pt_PKG_CONFIG"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
-$as_echo "$ac_pt_PKG_CONFIG" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
 
-  if test "x$ac_pt_PKG_CONFIG" = x; then
-    PKG_CONFIG=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    PKG_CONFIG=$ac_pt_PKG_CONFIG
-  fi
-else
-  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
-fi
 
-fi
-if test -n "$PKG_CONFIG"; then
-	_pkg_min_version=0.9.0
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
-$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
-	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-	else
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-		PKG_CONFIG=""
-	fi
-fi
-for ac_prog in flex lex
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_LEX+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$LEX"; then
-  ac_cv_prog_LEX="$LEX" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_LEX="$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
 
-fi
-fi
-LEX=$ac_cv_prog_LEX
-if test -n "$LEX"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
-$as_echo "$LEX" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
 
 
-  test -n "$LEX" && break
-done
-test -n "$LEX" || LEX=":"
 
-if test "x$LEX" != "x:"; then
-  cat >conftest.l <<_ACEOF
-%%
-a { ECHO; }
-b { REJECT; }
-c { yymore (); }
-d { yyless (1); }
-e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument.  */
-    yyless ((input () != 0)); }
-f { unput (yytext[0]); }
-. { BEGIN INITIAL; }
-%%
-#ifdef YYTEXT_POINTER
-extern char *yytext;
-#endif
-int
-main (void)
-{
-  return ! yylex () + ! yywrap ();
-}
-_ACEOF
-{ { ac_try="$LEX conftest.l"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$LEX conftest.l") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5
-$as_echo_n "checking lex output file root... " >&6; }
-if ${ac_cv_prog_lex_root+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
 
-if test -f lex.yy.c; then
-  ac_cv_prog_lex_root=lex.yy
-elif test -f lexyy.c; then
-  ac_cv_prog_lex_root=lexyy
-else
-  as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
-$as_echo "$ac_cv_prog_lex_root" >&6; }
-LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
 
-if test -z "${LEXLIB+set}"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5
-$as_echo_n "checking lex library... " >&6; }
-if ${ac_cv_lib_lex+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
 
-    ac_save_LIBS=$LIBS
-    ac_cv_lib_lex='none needed'
-    for ac_lib in '' -lfl -ll; do
-      LIBS="$ac_lib $ac_save_LIBS"
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-`cat $LEX_OUTPUT_ROOT.c`
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_lex=$ac_lib
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-      test "$ac_cv_lib_lex" != 'none needed' && break
-    done
-    LIBS=$ac_save_LIBS
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5
-$as_echo "$ac_cv_lib_lex" >&6; }
-  test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex
-fi
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
-$as_echo_n "checking whether yytext is a pointer... " >&6; }
-if ${ac_cv_prog_lex_yytext_pointer+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  # POSIX says lex can declare yytext either as a pointer or an array; the
-# default is implementation-dependent.  Figure out which it is, since
-# not all implementations provide the %pointer and %array declarations.
-ac_cv_prog_lex_yytext_pointer=no
-ac_save_LIBS=$LIBS
-LIBS="$LEXLIB $ac_save_LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-  #define YYTEXT_POINTER 1
-`cat $LEX_OUTPUT_ROOT.c`
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_prog_lex_yytext_pointer=yes
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_save_LIBS
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5
-$as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; }
-if test $ac_cv_prog_lex_yytext_pointer = yes; then
 
-$as_echo "#define YYTEXT_POINTER 1" >>confdefs.h
 
-fi
-rm -f conftest.l $LEX_OUTPUT_ROOT.c
 
-fi
-for ac_prog in 'bison -y' byacc
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_YACC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$YACC"; then
-  ac_cv_prog_YACC="$YACC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_YACC="$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
 
-fi
-fi
-YACC=$ac_cv_prog_YACC
-if test -n "$YACC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
-$as_echo "$YACC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
 
 
-  test -n "$YACC" && break
-done
-test -n "$YACC" || YACC="yacc"
 
-# Check whether --enable-largefile was given.
-if test "${enable_largefile+set}" = set; then :
-  enableval=$enable_largefile;
-fi
 
-if test "$enable_largefile" != no; then
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
-$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
-if ${ac_cv_sys_largefile_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_sys_largefile_CC=no
-     if test "$GCC" != yes; then
-       ac_save_CC=$CC
-       while :; do
-	 # IRIX 6.2 and later do not support large files by default,
-	 # so use the C compiler's -n32 option if that helps.
-	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
-    We can't simply define LARGE_OFF_T to be 9223372036854775807,
-    since some C++ compilers masquerading as C compilers
-    incorrectly reject 9223372036854775807.  */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
-  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
-		       && LARGE_OFF_T % 2147483647 == 1)
-		      ? 1 : -1];
-int
-main ()
-{
 
-  ;
-  return 0;
-}
-_ACEOF
-	 if ac_fn_c_try_compile "$LINENO"; then :
-  break
-fi
-rm -f core conftest.err conftest.$ac_objext
-	 CC="$CC -n32"
-	 if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_sys_largefile_CC=' -n32'; break
-fi
-rm -f core conftest.err conftest.$ac_objext
-	 break
-       done
-       CC=$ac_save_CC
-       rm -f conftest.$ac_ext
-    fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
-$as_echo "$ac_cv_sys_largefile_CC" >&6; }
-  if test "$ac_cv_sys_largefile_CC" != no; then
-    CC=$CC$ac_cv_sys_largefile_CC
-  fi
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
-$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
-if ${ac_cv_sys_file_offset_bits+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  while :; do
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
-    We can't simply define LARGE_OFF_T to be 9223372036854775807,
-    since some C++ compilers masquerading as C compilers
-    incorrectly reject 9223372036854775807.  */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
-  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
-		       && LARGE_OFF_T % 2147483647 == 1)
-		      ? 1 : -1];
-int
-main ()
-{
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_sys_file_offset_bits=no; break
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#define _FILE_OFFSET_BITS 64
-#include <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
-    We can't simply define LARGE_OFF_T to be 9223372036854775807,
-    since some C++ compilers masquerading as C compilers
-    incorrectly reject 9223372036854775807.  */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
-  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
-		       && LARGE_OFF_T % 2147483647 == 1)
-		      ? 1 : -1];
-int
-main ()
-{
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_sys_file_offset_bits=64; break
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  ac_cv_sys_file_offset_bits=unknown
-  break
-done
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
-$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
-case $ac_cv_sys_file_offset_bits in #(
-  no | unknown) ;;
-  *)
-cat >>confdefs.h <<_ACEOF
-#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
-_ACEOF
-;;
-esac
-rm -rf conftest*
-  if test $ac_cv_sys_file_offset_bits = unknown; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
-$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
-if ${ac_cv_sys_large_files+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  while :; do
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
-    We can't simply define LARGE_OFF_T to be 9223372036854775807,
-    since some C++ compilers masquerading as C compilers
-    incorrectly reject 9223372036854775807.  */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
-  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
-		       && LARGE_OFF_T % 2147483647 == 1)
-		      ? 1 : -1];
-int
-main ()
-{
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_sys_large_files=no; break
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#define _LARGE_FILES 1
-#include <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
-    We can't simply define LARGE_OFF_T to be 9223372036854775807,
-    since some C++ compilers masquerading as C compilers
-    incorrectly reject 9223372036854775807.  */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
-  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
-		       && LARGE_OFF_T % 2147483647 == 1)
-		      ? 1 : -1];
-int
-main ()
-{
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_sys_large_files=1; break
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  ac_cv_sys_large_files=unknown
-  break
-done
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
-$as_echo "$ac_cv_sys_large_files" >&6; }
-case $ac_cv_sys_large_files in #(
-  no | unknown) ;;
-  *)
-cat >>confdefs.h <<_ACEOF
-#define _LARGE_FILES $ac_cv_sys_large_files
-_ACEOF
-;;
-esac
-rm -rf conftest*
-  fi
 
 
-fi
 
 
 
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}cpp", so it can be a program name with args.
-set dummy ${ac_tool_prefix}cpp; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_RAWCPP+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $RAWCPP in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_RAWCPP="$RAWCPP" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_dummy="$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib"
-for as_dir in $as_dummy
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_RAWCPP="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
 
-  ;;
-esac
-fi
-RAWCPP=$ac_cv_path_RAWCPP
-if test -n "$RAWCPP"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RAWCPP" >&5
-$as_echo "$RAWCPP" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
 
 
-fi
-if test -z "$ac_cv_path_RAWCPP"; then
-  ac_pt_RAWCPP=$RAWCPP
-  # Extract the first word of "cpp", so it can be a program name with args.
-set dummy cpp; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_ac_pt_RAWCPP+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $ac_pt_RAWCPP in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_ac_pt_RAWCPP="$ac_pt_RAWCPP" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_dummy="$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib"
-for as_dir in $as_dummy
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_ac_pt_RAWCPP="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
 
-  ;;
-esac
-fi
-ac_pt_RAWCPP=$ac_cv_path_ac_pt_RAWCPP
-if test -n "$ac_pt_RAWCPP"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_RAWCPP" >&5
-$as_echo "$ac_pt_RAWCPP" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
 
-  if test "x$ac_pt_RAWCPP" = x; then
-    RAWCPP="${CPP}"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    RAWCPP=$ac_pt_RAWCPP
-  fi
-else
-  RAWCPP="$ac_cv_path_RAWCPP"
-fi
 
 
-# Check for flag to avoid builtin definitions - assumes unix is predefined,
-# which is not the best choice for supporting other OS'es, but covers most
-# of the ones we need for now.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $RAWCPP requires -undef" >&5
-$as_echo_n "checking if $RAWCPP requires -undef... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-Does cpp redefine unix ?
-_ACEOF
-if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-else
-	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
-		RAWCPPFLAGS=-undef
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-	# under Cygwin unix is still defined even with -undef
-	elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
-		RAWCPPFLAGS="-undef -ansi"
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, with -ansi" >&5
-$as_echo "yes, with -ansi" >&6; }
-	else
-		as_fn_error $? "${RAWCPP} defines unix with or without -undef.  I don't know what to do." "$LINENO" 5
-	fi
-fi
-rm -f conftest.$ac_ext
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $RAWCPP requires -traditional" >&5
-$as_echo_n "checking if $RAWCPP requires -traditional... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-Does cpp preserve   "whitespace"?
-_ACEOF
-if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-else
-	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
-		TRADITIONALCPPFLAGS="-traditional"
-		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-	else
-		as_fn_error $? "${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do." "$LINENO" 5
-	fi
-fi
-rm -f conftest.$ac_ext
 
 
 
 
-# Quoted so that make will expand $(CWARNFLAGS) in makefiles to allow
-# easier overrides at build time.
-XSERVER_CFLAGS='$(CWARNFLAGS)'
 
-if  test "x$GCC" = xyes ; then
-    XSERVER_CFLAGS="$XSERVER_CFLAGS -fno-strict-aliasing"
-fi
 
 
-# Check whether --with-dtrace was given.
-if test "${with_dtrace+set}" = set; then :
-  withval=$with_dtrace; WDTRACE=$withval
-else
-  WDTRACE=auto
-fi
 
-if test "x$WDTRACE" = "xyes" -o "x$WDTRACE" = "xauto" ; then
-	# Extract the first word of "dtrace", so it can be a program name with args.
-set dummy dtrace; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_DTRACE+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $DTRACE in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_dummy="$PATH:/usr/sbin"
-for as_dir in $as_dummy
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
 
-  test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not_found"
-  ;;
-esac
-fi
-DTRACE=$ac_cv_path_DTRACE
-if test -n "$DTRACE"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
-$as_echo "$DTRACE" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
 
 
-	if test "x$DTRACE" = "xnot_found" ; then
-		if test "x$WDTRACE" = "xyes" ; then
-			{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "dtrace requested but not found
-See \`config.log' for more details" "$LINENO" 5; }
-		fi
-		WDTRACE="no"
-	else
-		ac_fn_c_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
-if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
-  HAS_SDT_H="yes"
-else
-  HAS_SDT_H="no"
-fi
 
 
-		if test "x$WDTRACE" = "xauto" -a "x$HAS_SDT_H" = "xno" ; then
-			WDTRACE="no"
-		fi
-	fi
-fi
-if test "x$WDTRACE" != "xno" ; then
 
-$as_echo "#define XSERVER_DTRACE 1" >>confdefs.h
 
 
-# Solaris/OpenSolaris require dtrace -G to build dtrace probe information into
-# object files, and require linking with those as relocatable objects, not .a
-# archives. MacOS X handles all this in the normal compiler toolchain, and on
-# some releases (like Tiger), will error out on dtrace -G.  For now, other
-# platforms with Dtrace ports are assumed to support -G (the FreeBSD and Linux
-# ports appear to, based on my web searches, but have not yet been tested).
-	case $host_os in
-		darwin*)	SPECIAL_DTRACE_OBJECTS=no ;;
-		*)		SPECIAL_DTRACE_OBJECTS=yes ;;
-	esac
-fi
- if test "x$WDTRACE" != "xno"; then
-  XSERVER_DTRACE_TRUE=
-  XSERVER_DTRACE_FALSE='#'
+
+
+
+
+
+
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
+printf %s "checking how to hardcode library paths into programs... " >&6; }
+hardcode_action=
+if test -n "$hardcode_libdir_flag_spec" ||
+   test -n "$runpath_var" ||
+   test yes = "$hardcode_automatic"; then
+
+  # We can hardcode non-existent directories.
+  if test no != "$hardcode_direct" &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
+     test no != "$hardcode_minus_L"; then
+    # Linking always hardcodes the temporary library directory.
+    hardcode_action=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    hardcode_action=immediate
+  fi
 else
-  XSERVER_DTRACE_TRUE='#'
-  XSERVER_DTRACE_FALSE=
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  hardcode_action=unsupported
 fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
+printf "%s\n" "$hardcode_action" >&6; }
 
- if test "x$SPECIAL_DTRACE_OBJECTS" = "xyes"; then
-  SPECIAL_DTRACE_OBJECTS_TRUE=
-  SPECIAL_DTRACE_OBJECTS_FALSE='#'
-else
-  SPECIAL_DTRACE_OBJECTS_TRUE='#'
-  SPECIAL_DTRACE_OBJECTS_FALSE=
+if test relink = "$hardcode_action" ||
+   test yes = "$inherit_rpath"; then
+  # Fast installation is not supported
+  enable_fast_install=no
+elif test yes = "$shlibpath_overrides_runpath" ||
+     test no = "$enable_shared"; then
+  # Fast installation is not necessary
+  enable_fast_install=needless
 fi
 
 
-ac_header_dirent=no
-for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
-  as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
-$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
-if eval \${$as_ac_Header+:} false; then :
-  $as_echo_n "(cached) " >&6
+
+
+
+
+  if test yes != "$enable_dlopen"; then
+  enable_dlopen=unknown
+  enable_dlopen_self=unknown
+  enable_dlopen_self_static=unknown
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  lt_cv_dlopen=no
+  lt_cv_dlopen_libs=
+
+  case $host_os in
+  beos*)
+    lt_cv_dlopen=load_add_on
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+    ;;
+
+  mingw* | pw32* | cegcc*)
+    lt_cv_dlopen=LoadLibrary
+    lt_cv_dlopen_libs=
+    ;;
+
+  cygwin*)
+    lt_cv_dlopen=dlopen
+    lt_cv_dlopen_libs=
+    ;;
+
+  darwin*)
+    # if libdl is installed we need to link against it
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+printf %s "checking for dlopen in -ldl... " >&6; }
+if test ${ac_cv_lib_dl_dlopen+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <sys/types.h>
-#include <$ac_hdr>
 
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+char dlopen ();
 int
-main ()
+main (void)
 {
-if ((DIR *) 0)
-return 0;
+return dlopen ();
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  eval "$as_ac_Header=yes"
-else
-  eval "$as_ac_Header=no"
+if ac_fn_c_try_link "$LINENO"
+then :
+  ac_cv_lib_dl_dlopen=yes
+else $as_nop
+  ac_cv_lib_dl_dlopen=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 fi
-eval ac_res=\$$as_ac_Header
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
-_ACEOF
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = xyes
+then :
+  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
+else $as_nop
+
+    lt_cv_dlopen=dyld
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
 
-ac_header_dirent=$ac_hdr; break
 fi
 
-done
-# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
-if test $ac_header_dirent = dirent.h; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
-$as_echo_n "checking for library containing opendir... " >&6; }
-if ${ac_cv_search_opendir+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_func_search_save_LIBS=$LIBS
+    ;;
+
+  tpf*)
+    # Don't try to run any link tests for TPF.  We know it's impossible
+    # because TPF is a cross-compiler, and we know how we open DSOs.
+    lt_cv_dlopen=dlopen
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=no
+    ;;
+
+  *)
+    ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
+if test "x$ac_cv_func_shl_load" = xyes
+then :
+  lt_cv_dlopen=shl_load
+else $as_nop
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
+printf %s "checking for shl_load in -ldld... " >&6; }
+if test ${ac_cv_lib_dld_shl_load+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld  $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 /* Override any GCC internal prototype to avoid an error.
    Use char because int might match the return type of a GCC
    builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char opendir ();
+char shl_load ();
 int
-main ()
+main (void)
 {
-return opendir ();
+return shl_load ();
   ;
   return 0;
 }
 _ACEOF
-for ac_lib in '' dir; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_search_opendir=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext
-  if ${ac_cv_search_opendir+:} false; then :
-  break
-fi
-done
-if ${ac_cv_search_opendir+:} false; then :
-
-else
-  ac_cv_search_opendir=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
+if ac_fn_c_try_link "$LINENO"
+then :
+  ac_cv_lib_dld_shl_load=yes
+else $as_nop
+  ac_cv_lib_dld_shl_load=no
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
-$as_echo "$ac_cv_search_opendir" >&6; }
-ac_res=$ac_cv_search_opendir
-if test "$ac_res" != no; then :
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 fi
-
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
-$as_echo_n "checking for library containing opendir... " >&6; }
-if ${ac_cv_search_opendir+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_func_search_save_LIBS=$LIBS
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
+printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; }
+if test "x$ac_cv_lib_dld_shl_load" = xyes
+then :
+  lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
+else $as_nop
+  ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
+if test "x$ac_cv_func_dlopen" = xyes
+then :
+  lt_cv_dlopen=dlopen
+else $as_nop
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+printf %s "checking for dlopen in -ldl... " >&6; }
+if test ${ac_cv_lib_dl_dlopen+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 /* Override any GCC internal prototype to avoid an error.
    Use char because int might match the return type of a GCC
    builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char opendir ();
+char dlopen ();
 int
-main ()
+main (void)
 {
-return opendir ();
+return dlopen ();
   ;
   return 0;
 }
 _ACEOF
-for ac_lib in '' x; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_search_opendir=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext
-  if ${ac_cv_search_opendir+:} false; then :
-  break
-fi
-done
-if ${ac_cv_search_opendir+:} false; then :
-
-else
-  ac_cv_search_opendir=no
+if ac_fn_c_try_link "$LINENO"
+then :
+  ac_cv_lib_dl_dlopen=yes
+else $as_nop
+  ac_cv_lib_dl_dlopen=no
 fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
-$as_echo "$ac_cv_search_opendir" >&6; }
-ac_res=$ac_cv_search_opendir
-if test "$ac_res" != no; then :
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = xyes
+then :
+  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
+else $as_nop
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
+printf %s "checking for dlopen in -lsvld... " >&6; }
+if test ${ac_cv_lib_svld_dlopen+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsvld  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+char dlopen ();
+int
+main (void)
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+  ac_cv_lib_svld_dlopen=yes
+else $as_nop
+  ac_cv_lib_svld_dlopen=no
 fi
-
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
-if ${ac_cv_header_stdc+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
+printf "%s\n" "$ac_cv_lib_svld_dlopen" >&6; }
+if test "x$ac_cv_lib_svld_dlopen" = xyes
+then :
+  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
+else $as_nop
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
+printf %s "checking for dld_link in -ldld... " >&6; }
+if test ${ac_cv_lib_dld_dld_link+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
 
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+char dld_link ();
 int
-main ()
+main (void)
 {
-
+return dld_link ();
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_header_stdc=yes
-else
-  ac_cv_header_stdc=no
+if ac_fn_c_try_link "$LINENO"
+then :
+  ac_cv_lib_dld_dld_link=yes
+else $as_nop
+  ac_cv_lib_dld_dld_link=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
+printf "%s\n" "$ac_cv_lib_dld_dld_link" >&6; }
+if test "x$ac_cv_lib_dld_dld_link" = xyes
+then :
+  lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
-  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <string.h>
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "memchr" >/dev/null 2>&1; then :
 
-else
-  ac_cv_header_stdc=no
 fi
-rm -f conftest*
+
 
 fi
 
-if test $ac_cv_header_stdc = yes; then
-  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdlib.h>
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "free" >/dev/null 2>&1; then :
+fi
+
 
-else
-  ac_cv_header_stdc=no
 fi
-rm -f conftest*
+
 
 fi
 
-if test $ac_cv_header_stdc = yes; then
-  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-  if test "$cross_compiling" = yes; then :
-  :
+    ;;
+  esac
+
+  if test no = "$lt_cv_dlopen"; then
+    enable_dlopen=no
+  else
+    enable_dlopen=yes
+  fi
+
+  case $lt_cv_dlopen in
+  dlopen)
+    save_CPPFLAGS=$CPPFLAGS
+    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+    save_LDFLAGS=$LDFLAGS
+    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+    save_LIBS=$LIBS
+    LIBS="$lt_cv_dlopen_libs $LIBS"
+
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
+printf %s "checking whether a program can dlopen itself... " >&6; }
+if test ${lt_cv_dlopen_self+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  	  if test yes = "$cross_compiling"; then :
+  lt_cv_dlopen_self=cross
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <ctype.h>
-#include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
-		   (('a' <= (c) && (c) <= 'i') \
-		     || ('j' <= (c) && (c) <= 'r') \
-		     || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<_LT_EOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
 #endif
 
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
-  int i;
-  for (i = 0; i < 256; i++)
-    if (XOR (islower (i), ISLOWER (i))
-	|| toupper (i) != TOUPPER (i))
-      return 2;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+#include <stdio.h>
 
-else
-  ac_cv_header_stdc=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
+#ifdef RTLD_GLOBAL
+#  define LT_DLGLOBAL		RTLD_GLOBAL
+#else
+#  ifdef DL_GLOBAL
+#    define LT_DLGLOBAL		DL_GLOBAL
+#  else
+#    define LT_DLGLOBAL		0
+#  endif
+#endif
 
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+   find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+#  ifdef RTLD_LAZY
+#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
+#  else
+#    ifdef DL_LAZY
+#      define LT_DLLAZY_OR_NOW		DL_LAZY
+#    else
+#      ifdef RTLD_NOW
+#        define LT_DLLAZY_OR_NOW	RTLD_NOW
+#      else
+#        ifdef DL_NOW
+#          define LT_DLLAZY_OR_NOW	DL_NOW
+#        else
+#          define LT_DLLAZY_OR_NOW	0
+#        endif
+#      endif
+#    endif
+#  endif
+#endif
 
-$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+/* When -fvisibility=hidden is used, assume the code has been annotated
+   correspondingly for the symbols needed.  */
+#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+int fnord () __attribute__((visibility("default")));
+#endif
 
-fi
+int fnord () { return 42; }
+int main ()
+{
+  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+  int status = $lt_dlunknown;
 
-for ac_header in fcntl.h stdlib.h string.h unistd.h dlfcn.h stropts.h \
- fnmatch.h sys/mkdev.h sys/sysmacros.h sys/utsname.h
-do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+  if (self)
+    {
+      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
+      else
+        {
+	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
+          else puts (dlerror ());
+	}
+      /* dlclose (self); */
+    }
+  else
+    puts (dlerror ());
 
+  return status;
+}
+_LT_EOF
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
+    (./conftest; exit; ) >&5 2>/dev/null
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
+      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
+      x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
+    esac
+  else :
+    # compilation failed
+    lt_cv_dlopen_self=no
+  fi
 fi
+rm -fr conftest*
 
-done
 
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
+printf "%s\n" "$lt_cv_dlopen_self" >&6; }
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
-$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
-if ${ac_cv_c_const+:} false; then :
-  $as_echo_n "(cached) " >&6
+    if test yes = "$lt_cv_dlopen_self"; then
+      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
+printf %s "checking whether a statically linked program can dlopen itself... " >&6; }
+if test ${lt_cv_dlopen_self_static+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  	  if test yes = "$cross_compiling"; then :
+  lt_cv_dlopen_self_static=cross
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<_LT_EOF
+#line $LINENO "configure"
+#include "confdefs.h"
 
-int
-main ()
-{
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
 
-#ifndef __cplusplus
-  /* Ultrix mips cc rejects this sort of thing.  */
-  typedef int charset[2];
-  const charset cs = { 0, 0 };
-  /* SunOS 4.1.1 cc rejects this.  */
-  char const *const *pcpcc;
-  char **ppc;
-  /* NEC SVR4.0.2 mips cc rejects this.  */
-  struct point {int x, y;};
-  static struct point const zero = {0,0};
-  /* AIX XL C 1.02.0.0 rejects this.
-     It does not let you subtract one const X* pointer from another in
-     an arm of an if-expression whose if-part is not a constant
-     expression */
-  const char *g = "string";
-  pcpcc = &g + (g ? g-g : 0);
-  /* HPUX 7.0 cc rejects these. */
-  ++pcpcc;
-  ppc = (char**) pcpcc;
-  pcpcc = (char const *const *) ppc;
-  { /* SCO 3.2v4 cc rejects this sort of thing.  */
-    char tx;
-    char *t = &tx;
-    char const *s = 0 ? (char *) 0 : (char const *) 0;
+#include <stdio.h>
 
-    *t++ = 0;
-    if (s) return 0;
-  }
-  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
-    int x[] = {25, 17};
-    const int *foo = &x[0];
-    ++foo;
-  }
-  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
-    typedef const int *iptr;
-    iptr p = 0;
-    ++p;
-  }
-  { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
-       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
-    struct s { int j; const int *ap[3]; } bx;
-    struct s *b = &bx; b->j = 5;
-  }
-  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
-    const int foo = 10;
-    if (!foo) return 0;
-  }
-  return !cs[0] && !zero.x;
+#ifdef RTLD_GLOBAL
+#  define LT_DLGLOBAL		RTLD_GLOBAL
+#else
+#  ifdef DL_GLOBAL
+#    define LT_DLGLOBAL		DL_GLOBAL
+#  else
+#    define LT_DLGLOBAL		0
+#  endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+   find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+#  ifdef RTLD_LAZY
+#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
+#  else
+#    ifdef DL_LAZY
+#      define LT_DLLAZY_OR_NOW		DL_LAZY
+#    else
+#      ifdef RTLD_NOW
+#        define LT_DLLAZY_OR_NOW	RTLD_NOW
+#      else
+#        ifdef DL_NOW
+#          define LT_DLLAZY_OR_NOW	DL_NOW
+#        else
+#          define LT_DLLAZY_OR_NOW	0
+#        endif
+#      endif
+#    endif
+#  endif
 #endif
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_c_const=yes
-else
-  ac_cv_c_const=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
-$as_echo "$ac_cv_c_const" >&6; }
-if test $ac_cv_c_const = no; then
+/* When -fvisibility=hidden is used, assume the code has been annotated
+   correspondingly for the symbols needed.  */
+#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+int fnord () __attribute__((visibility("default")));
+#endif
+
+int fnord () { return 42; }
+int main ()
+{
+  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+  int status = $lt_dlunknown;
 
-$as_echo "#define const /**/" >>confdefs.h
+  if (self)
+    {
+      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
+      else
+        {
+	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
+          else puts (dlerror ());
+	}
+      /* dlclose (self); */
+    }
+  else
+    puts (dlerror ());
 
+  return status;
+}
+_LT_EOF
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
+    (./conftest; exit; ) >&5 2>/dev/null
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
+      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
+      x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
+    esac
+  else :
+    # compilation failed
+    lt_cv_dlopen_self_static=no
+  fi
 fi
+rm -fr conftest*
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeof syntax and keyword spelling" >&5
-$as_echo_n "checking for typeof syntax and keyword spelling... " >&6; }
-if ${ac_cv_c_typeof+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_c_typeof=no
-     for ac_kw in typeof __typeof__ no; do
-       test $ac_kw = no && break
-       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
+printf "%s\n" "$lt_cv_dlopen_self_static" >&6; }
+    fi
 
-int
-main ()
-{
+    CPPFLAGS=$save_CPPFLAGS
+    LDFLAGS=$save_LDFLAGS
+    LIBS=$save_LIBS
+    ;;
+  esac
 
-	   int value;
-	   typedef struct {
-		   char a [1
-			   + ! (($ac_kw (value))
-				(($ac_kw (value)) 0 < ($ac_kw (value)) -1
-				 ? ($ac_kw (value)) - 1
-				 : ~ (~ ($ac_kw (value)) 0
-				      << sizeof ($ac_kw (value)))))]; }
-	      ac__typeof_type_;
-	   return
-	     (! ((void) ((ac__typeof_type_ *) 0), 0));
+  case $lt_cv_dlopen_self in
+  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+  *) enable_dlopen_self=unknown ;;
+  esac
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_c_typeof=$ac_kw
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-       test $ac_cv_c_typeof != no && break
-     done
+  case $lt_cv_dlopen_self_static in
+  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+  *) enable_dlopen_self_static=unknown ;;
+  esac
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_typeof" >&5
-$as_echo "$ac_cv_c_typeof" >&6; }
-  if test $ac_cv_c_typeof != no; then
 
-$as_echo "#define HAVE_TYPEOF 1" >>confdefs.h
 
-    if test $ac_cv_c_typeof != typeof; then
 
-cat >>confdefs.h <<_ACEOF
-#define typeof $ac_cv_c_typeof
-_ACEOF
 
-    fi
-  fi
 
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
-$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
-if ${ac_cv_c_bigendian+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_c_bigendian=unknown
-    # See if we're dealing with a universal compiler.
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#ifndef __APPLE_CC__
-	       not a universal capable compiler
-	     #endif
-	     typedef int dummy;
 
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
 
-	# Check for potential -arch flags.  It is not universal unless
-	# there are at least two -arch flags with different values.
-	ac_arch=
-	ac_prev=
-	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
-	 if test -n "$ac_prev"; then
-	   case $ac_word in
-	     i?86 | x86_64 | ppc | ppc64)
-	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
-		 ac_arch=$ac_word
-	       else
-		 ac_cv_c_bigendian=universal
-		 break
-	       fi
-	       ;;
-	   esac
-	   ac_prev=
-	 elif test "x$ac_word" = "x-arch"; then
-	   ac_prev=arch
-	 fi
-       done
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-    if test $ac_cv_c_bigendian = unknown; then
-      # See if sys/param.h defines the BYTE_ORDER macro.
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/types.h>
-	     #include <sys/param.h>
 
-int
-main ()
-{
-#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
-		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
-		     && LITTLE_ENDIAN)
-	      bogus endian macros
-	     #endif
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  # It does; now see whether it defined to BIG_ENDIAN or not.
-	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/types.h>
-		#include <sys/param.h>
 
-int
-main ()
-{
-#if BYTE_ORDER != BIG_ENDIAN
-		 not big endian
-		#endif
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_c_bigendian=yes
-else
-  ac_cv_c_bigendian=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-    fi
-    if test $ac_cv_c_bigendian = unknown; then
-      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <limits.h>
 
-int
-main ()
-{
-#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
-	      bogus endian macros
-	     #endif
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  # It does; now see whether it defined to _BIG_ENDIAN or not.
-	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <limits.h>
 
-int
-main ()
-{
-#ifndef _BIG_ENDIAN
-		 not big endian
-		#endif
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_c_bigendian=yes
-else
-  ac_cv_c_bigendian=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-    fi
-    if test $ac_cv_c_bigendian = unknown; then
-      # Compile a test program.
-      if test "$cross_compiling" = yes; then :
-  # Try to guess by grepping values from an object file.
-	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-short int ascii_mm[] =
-		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
-		short int ascii_ii[] =
-		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
-		int use_ascii (int i) {
-		  return ascii_mm[i] + ascii_ii[i];
-		}
-		short int ebcdic_ii[] =
-		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
-		short int ebcdic_mm[] =
-		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
-		int use_ebcdic (int i) {
-		  return ebcdic_mm[i] + ebcdic_ii[i];
-		}
-		extern int foo;
 
-int
-main ()
-{
-return use_ascii (foo) == use_ebcdic (foo);
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
-	      ac_cv_c_bigendian=yes
-	    fi
-	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
-	      if test "$ac_cv_c_bigendian" = unknown; then
-		ac_cv_c_bigendian=no
-	      else
-		# finding both strings is unlikely to happen, but who knows?
-		ac_cv_c_bigendian=unknown
-	      fi
-	    fi
+
+striplib=
+old_striplib=
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
+printf %s "checking whether stripping libraries is possible... " >&6; }
+if test -z "$STRIP"; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+else
+  if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+    old_striplib="$STRIP --strip-debug"
+    striplib="$STRIP --strip-unneeded"
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+  else
+    case $host_os in
+    darwin*)
+      # FIXME - insert some real tests, host_os isn't really good enough
+      striplib="$STRIP -x"
+      old_striplib="$STRIP -S"
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+      ;;
+    freebsd*)
+      if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then
+        old_striplib="$STRIP --strip-debug"
+        striplib="$STRIP --strip-unneeded"
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+      else
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+      fi
+      ;;
+    *)
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+      ;;
+    esac
+  fi
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
 
-	     /* Are we little or big endian?  From Harbison&Steele.  */
-	     union
-	     {
-	       long int l;
-	       char c[sizeof (long int)];
-	     } u;
-	     u.l = 1;
-	     return u.c[sizeof (long int) - 1] == 1;
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  ac_cv_c_bigendian=no
-else
-  ac_cv_c_bigendian=yes
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
 
-    fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
-$as_echo "$ac_cv_c_bigendian" >&6; }
- case $ac_cv_c_bigendian in #(
-   yes)
 
-$as_echo "#define X_BYTE_ORDER X_BIG_ENDIAN" >>confdefs.h
-;; #(
-   no)
 
-$as_echo "#define X_BYTE_ORDER X_LITTLE_ENDIAN" >>confdefs.h
- ;; #(
-   universal)
 
-$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
 
-     ;; #(
-   *)
-     as_fn_error $? "unknown endianness
- presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
- esac
 
 
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
-$as_echo_n "checking size of unsigned long... " >&6; }
-if ${ac_cv_sizeof_unsigned_long+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long"        "$ac_includes_default"; then :
 
-else
-  if test "$ac_cv_type_unsigned_long" = yes; then
-     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (unsigned long)
-See \`config.log' for more details" "$LINENO" 5; }
-   else
-     ac_cv_sizeof_unsigned_long=0
-   fi
-fi
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
-$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
 
+  # Report what library types will actually be built
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
+printf %s "checking if libtool supports shared libraries... " >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
+printf "%s\n" "$can_build_shared" >&6; }
 
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
+printf %s "checking whether to build shared libraries... " >&6; }
+  test no = "$can_build_shared" && enable_shared=no
 
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
-_ACEOF
+  # On AIX, shared libraries and static libraries use the same namespace, and
+  # are all built from PIC.
+  case $host_os in
+  aix3*)
+    test yes = "$enable_shared" && enable_static=no
+    if test -n "$RANLIB"; then
+      archive_cmds="$archive_cmds~\$RANLIB \$lib"
+      postinstall_cmds='$RANLIB $lib'
+    fi
+    ;;
+
+  aix[4-9]*)
+    if test ia64 != "$host_cpu"; then
+      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
+      yes,aix,yes) ;;			# shared object as lib.so file only
+      yes,svr4,*) ;;			# shared object as lib.so archive member only
+      yes,*) enable_static=no ;;	# shared object in lib.a archive as well
+      esac
+    fi
+    ;;
+  esac
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
+printf "%s\n" "$enable_shared" >&6; }
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
+printf %s "checking whether to build static libraries... " >&6; }
+  # Make sure either enable_shared or enable_static is yes.
+  test yes = "$enable_shared" || enable_static=yes
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
+printf "%s\n" "$enable_static" >&6; }
 
 
-if test "$ac_cv_sizeof_unsigned_long" = 8; then
 
-$as_echo "#define _XSERVER64 1" >>confdefs.h
 
 fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
-if test "x$ac_cv_type_pid_t" = xyes; then :
+CC=$lt_save_CC
 
-else
 
-cat >>confdefs.h <<_ACEOF
-#define pid_t int
-_ACEOF
 
-fi
 
 
-ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
-if test "x$ac_cv_func_dlopen" = xyes; then :
 
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
-$as_echo_n "checking for dlopen in -ldl... " >&6; }
-if ${ac_cv_lib_dl_dlopen+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldl  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlopen ();
-int
-main ()
-{
-return dlopen ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_dl_dlopen=yes
-else
-  ac_cv_lib_dl_dlopen=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
-$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
-if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
-  DLOPEN_LIBS="-ldl"
-fi
 
-fi
 
 
 
-for ac_func in backtrace geteuid getuid issetugid getresuid \
-	getdtablesize getifaddrs getpeereid getpeerucred getprogname getzoneid \
-	mmap posix_fallocate seteuid shmctl64 strncasecmp vasprintf vsnprintf \
-	walkcontext setitimer poll epoll_create1 mkostemp memfd_create isastream
-do :
-  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
 
-fi
-done
 
 
-ac_fn_c_check_func "$LINENO" "reallocarray" "ac_cv_func_reallocarray"
-if test "x$ac_cv_func_reallocarray" = xyes; then :
-  $as_echo "#define HAVE_REALLOCARRAY 1" >>confdefs.h
 
-else
-  case " $LIBOBJS " in
-  *" reallocarray.$ac_objext "* ) ;;
-  *) LIBOBJS="$LIBOBJS reallocarray.$ac_objext"
- ;;
-esac
+        ac_config_commands="$ac_config_commands libtool"
 
-fi
 
-ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
-if test "x$ac_cv_func_strcasecmp" = xyes; then :
-  $as_echo "#define HAVE_STRCASECMP 1" >>confdefs.h
 
-else
-  case " $LIBOBJS " in
-  *" strcasecmp.$ac_objext "* ) ;;
-  *) LIBOBJS="$LIBOBJS strcasecmp.$ac_objext"
- ;;
-esac
 
-fi
+# Only expand once:
 
-ac_fn_c_check_func "$LINENO" "strcasestr" "ac_cv_func_strcasestr"
-if test "x$ac_cv_func_strcasestr" = xyes; then :
-  $as_echo "#define HAVE_STRCASESTR 1" >>confdefs.h
 
-else
-  case " $LIBOBJS " in
-  *" strcasestr.$ac_objext "* ) ;;
-  *) LIBOBJS="$LIBOBJS strcasestr.$ac_objext"
- ;;
-esac
 
-fi
 
-ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
-if test "x$ac_cv_func_strlcat" = xyes; then :
-  $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
 
-else
-  case " $LIBOBJS " in
-  *" strlcat.$ac_objext "* ) ;;
-  *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
- ;;
-esac
 
-fi
 
-ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
-if test "x$ac_cv_func_strlcpy" = xyes; then :
-  $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
 
-else
-  case " $LIBOBJS " in
-  *" strlcpy.$ac_objext "* ) ;;
-  *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
- ;;
-esac
 
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+	if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_PKG_CONFIG+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  case $PKG_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+printf "%s\n" "$PKG_CONFIG" >&6; }
+else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
-ac_fn_c_check_func "$LINENO" "strndup" "ac_cv_func_strndup"
-if test "x$ac_cv_func_strndup" = xyes; then :
-  $as_echo "#define HAVE_STRNDUP 1" >>confdefs.h
 
-else
-  case " $LIBOBJS " in
-  *" strndup.$ac_objext "* ) ;;
-  *) LIBOBJS="$LIBOBJS strndup.$ac_objext"
- ;;
-esac
+fi
+if test -z "$ac_cv_path_PKG_CONFIG"; then
+  ac_pt_PKG_CONFIG=$PKG_CONFIG
+  # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_ac_pt_PKG_CONFIG+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  case $ac_pt_PKG_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
+  ;;
+esac
+fi
+ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
+if test -n "$ac_pt_PKG_CONFIG"; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
+printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; }
+else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
-ac_fn_c_check_func "$LINENO" "timingsafe_memcmp" "ac_cv_func_timingsafe_memcmp"
-if test "x$ac_cv_func_timingsafe_memcmp" = xyes; then :
-  $as_echo "#define HAVE_TIMINGSAFE_MEMCMP 1" >>confdefs.h
+  if test "x$ac_pt_PKG_CONFIG" = x; then
+    PKG_CONFIG=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    PKG_CONFIG=$ac_pt_PKG_CONFIG
+  fi
+else
+  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
+fi
 
+fi
+if test -n "$PKG_CONFIG"; then
+	_pkg_min_version=0.9.0
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
+printf %s "checking pkg-config is at least version $_pkg_min_version... " >&6; }
+	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+	else
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+		PKG_CONFIG=""
+	fi
+fi
+for ac_prog in flex lex
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_LEX+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if test -n "$LEX"; then
+  ac_cv_prog_LEX="$LEX" # Let the user override the test.
 else
-  case " $LIBOBJS " in
-  *" timingsafe_memcmp.$ac_objext "* ) ;;
-  *) LIBOBJS="$LIBOBJS timingsafe_memcmp.$ac_objext"
- ;;
-esac
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_prog_LEX="$ac_prog"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
 fi
-
-
- if test "x$ac_cv_func_poll" = "xyes"; then
-  POLL_TRUE=
-  POLL_FALSE='#'
+fi
+LEX=$ac_cv_prog_LEX
+if test -n "$LEX"; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
+printf "%s\n" "$LEX" >&6; }
 else
-  POLL_TRUE='#'
-  POLL_FALSE=
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for arc4random_buf in -lbsd" >&5
-$as_echo_n "checking for arc4random_buf in -lbsd... " >&6; }
-if ${ac_cv_lib_bsd_arc4random_buf+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lbsd  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+  test -n "$LEX" && break
+done
+test -n "$LEX" || LEX=":"
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
+  if test "x$LEX" != "x:"; then
+    cat >conftest.l <<_ACEOF
+%{
 #ifdef __cplusplus
 extern "C"
 #endif
-char arc4random_buf ();
+int yywrap(void);
+%}
+%%
+a { ECHO; }
+b { REJECT; }
+c { yymore (); }
+d { yyless (1); }
+e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument.  */
+#ifdef __cplusplus
+    yyless ((yyinput () != 0));
+#else
+    yyless ((input () != 0));
+#endif
+  }
+f { unput (yytext[0]); }
+. { BEGIN INITIAL; }
+%%
+#ifdef YYTEXT_POINTER
+extern char *yytext;
+#endif
 int
-main ()
+yywrap (void)
 {
-return arc4random_buf ();
-  ;
-  return 0;
+  return 1;
+}
+int
+main (void)
+{
+  return ! yylex ();
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_bsd_arc4random_buf=yes
-else
-  ac_cv_lib_bsd_arc4random_buf=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_arc4random_buf" >&5
-$as_echo "$ac_cv_lib_bsd_arc4random_buf" >&6; }
-if test "x$ac_cv_lib_bsd_arc4random_buf" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBBSD 1
-_ACEOF
-
-  LIBS="-lbsd $LIBS"
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lex output file root" >&5
+printf %s "checking for lex output file root... " >&6; }
+if test ${ac_cv_prog_lex_root+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
 
+ac_cv_prog_lex_root=unknown
+{ { ac_try="$LEX conftest.l"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+  (eval "$LEX conftest.l") 2>&5
+  ac_status=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } &&
+if test -f lex.yy.c; then
+  ac_cv_prog_lex_root=lex.yy
+elif test -f lexyy.c; then
+  ac_cv_prog_lex_root=lexyy
 fi
-
-for ac_func in arc4random_buf
-do :
-  ac_fn_c_check_func "$LINENO" "arc4random_buf" "ac_cv_func_arc4random_buf"
-if test "x$ac_cv_func_arc4random_buf" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_ARC4RANDOM_BUF 1
-_ACEOF
-
 fi
-done
-
-
-ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
-"
-if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
+printf "%s\n" "$ac_cv_prog_lex_root" >&6; }
+if test "$ac_cv_prog_lex_root" = unknown
+then :
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot find output from $LEX; giving up on $LEX" >&5
+printf "%s\n" "$as_me: WARNING: cannot find output from $LEX; giving up on $LEX" >&2;}
+   LEX=: LEXLIB=
 fi
+LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
-_ACEOF
+if test ${LEXLIB+y}
+then :
 
+else $as_nop
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SO_PEERCRED in sys/socket.h" >&5
-$as_echo_n "checking for SO_PEERCRED in sys/socket.h... " >&6; }
-if ${xorg_cv_sys_have_so_peercred+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lex library" >&5
+printf %s "checking for lex library... " >&6; }
+if test ${ac_cv_lib_lex+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
 
-#include <sys/types.h>
-#include <sys/socket.h>
-#ifdef SO_PEERCRED
-yes_have_so_peercred
-#endif
+    ac_save_LIBS="$LIBS"
+    ac_found=false
+    for ac_cv_lib_lex in 'none needed' -lfl -ll 'not found'; do
+      case $ac_cv_lib_lex in #(
+  'none needed') :
+     ;; #(
+  'not found') :
+    break ;; #(
+  *) :
+    LIBS="$ac_cv_lib_lex $ac_save_LIBS" ;; #(
+  *) :
+     ;;
+esac
 
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+`cat $LEX_OUTPUT_ROOT.c`
 _ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "yes_have_so_peercred" >/dev/null 2>&1; then :
-  xorg_cv_sys_have_so_peercred=yes
-else
-  xorg_cv_sys_have_so_peercred=no
-fi
-rm -f conftest*
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_sys_have_so_peercred" >&5
-$as_echo "$xorg_cv_sys_have_so_peercred" >&6; }
-
-if test "x$ac_cv_func_getpeereid" = xno && test "x$ac_cv_func_getpeerucred" = xno && test "x$xorg_cv_sys_have_so_peercred" = xno ; then
-
-$as_echo "#define NO_LOCAL_CLIENT_CRED 1" >>confdefs.h
-
+if ac_fn_c_try_link "$LINENO"
+then :
+  ac_found=:
 fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5
-$as_echo_n "checking for sqrt in -lm... " >&6; }
-if ${ac_cv_lib_m_sqrt+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lm  $LIBS"
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+      if $ac_found; then
+        break
+      fi
+    done
+    LIBS="$ac_save_LIBS"
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5
+printf "%s\n" "$ac_cv_lib_lex" >&6; }
+  if test "$ac_cv_lib_lex" = 'not found'
+then :
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: required lex library not found; giving up on $LEX" >&5
+printf "%s\n" "$as_me: WARNING: required lex library not found; giving up on $LEX" >&2;}
+	 LEX=: LEXLIB=
+elif test "$ac_cv_lib_lex" = 'none needed'
+then :
+  LEXLIB=''
+else $as_nop
+  LEXLIB=$ac_cv_lib_lex
+fi
+  ac_save_LIBS="$LIBS"
+      LIBS=
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing yywrap" >&5
+printf %s "checking for library containing yywrap... " >&6; }
+if test ${ac_cv_search_yywrap+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_func_search_save_LIBS=$LIBS
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 /* Override any GCC internal prototype to avoid an error.
    Use char because int might match the return type of a GCC
    builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char sqrt ();
+char yywrap ();
 int
-main ()
+main (void)
 {
-return sqrt ();
+return yywrap ();
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_m_sqrt=yes
-else
-  ac_cv_lib_m_sqrt=no
+for ac_lib in '' fl l
+do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"
+then :
+  ac_cv_search_yywrap=$ac_res
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext
+  if test ${ac_cv_search_yywrap+y}
+then :
+  break
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5
-$as_echo "$ac_cv_lib_m_sqrt" >&6; }
-if test "x$ac_cv_lib_m_sqrt" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBM 1
-_ACEOF
+done
+if test ${ac_cv_search_yywrap+y}
+then :
 
-  LIBS="-lm $LIBS"
+else $as_nop
+  ac_cv_search_yywrap=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_yywrap" >&5
+printf "%s\n" "$ac_cv_search_yywrap" >&6; }
+ac_res=$ac_cv_search_yywrap
+if test "$ac_res" != no
+then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+  LEXLIB="$LIBS"
+fi
 
+      LIBS="$ac_save_LIBS"
 fi
 
-for ac_func in cbrt
-do :
-  ac_fn_c_check_func "$LINENO" "cbrt" "ac_cv_func_cbrt"
-if test "x$ac_cv_func_cbrt" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_CBRT 1
-_ACEOF
 
-fi
-done
+if test "$LEX" != :
+then :
 
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
+printf %s "checking whether yytext is a pointer... " >&6; }
+if test ${ac_cv_prog_lex_yytext_pointer+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  # POSIX says lex can declare yytext either as a pointer or an array; the
+# default is implementation-dependent.  Figure out which it is, since
+# not all implementations provide the %pointer and %array declarations.
+ac_cv_prog_lex_yytext_pointer=no
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-for ac_header in linux/agpgart.h sys/agpio.h sys/agpgart.h
-do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+  #define YYTEXT_POINTER 1
+`cat $LEX_OUTPUT_ROOT.c`
 _ACEOF
- AGP=yes
+if ac_fn_c_try_compile "$LINENO"
+then :
+  ac_cv_prog_lex_yytext_pointer=yes
 fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 
-done
-
- if test "x$AGP" = xyes; then
-  AGP_TRUE=
-  AGP_FALSE='#'
-else
-  AGP_TRUE='#'
-  AGP_FALSE=
 fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5
+printf "%s\n" "$ac_cv_prog_lex_yytext_pointer" >&6; }
+if test $ac_cv_prog_lex_yytext_pointer = yes; then
 
+printf "%s\n" "#define YYTEXT_POINTER 1" >>confdefs.h
 
-for ac_header in linux/fb.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "linux/fb.h" "ac_cv_header_linux_fb_h" "$ac_includes_default"
-if test "x$ac_cv_header_linux_fb_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LINUX_FB_H 1
-_ACEOF
- FBDEV=yes
 fi
 
-done
-
- if test "x$FBDEV" = xyes; then
-  FBDEVHW_TRUE=
-  FBDEVHW_FALSE='#'
-else
-  FBDEVHW_TRUE='#'
-  FBDEVHW_FALSE=
 fi
+rm -f conftest.l $LEX_OUTPUT_ROOT.c
 
+fi
+for ac_prog in 'bison -y' byacc
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_YACC+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if test -n "$YACC"; then
+  ac_cv_prog_YACC="$YACC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_prog_YACC="$ac_prog"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
-for ac_header in sys/linker.h
-do :
-  ac_fn_c_check_header_compile "$LINENO" "sys/linker.h" "ac_cv_header_sys_linker_h" "#include <sys/param.h>
-"
-if test "x$ac_cv_header_sys_linker_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_SYS_LINKER_H 1
-_ACEOF
- ac_cv_sys_linker_h=yes
+fi
+fi
+YACC=$ac_cv_prog_YACC
+if test -n "$YACC"; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
+printf "%s\n" "$YACC" >&6; }
 else
-  ac_cv_sys_linker_h=no
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
+
+  test -n "$YACC" && break
 done
+test -n "$YACC" || YACC="yacc"
 
- if test "x$ac_cv_sys_linker_h" = xyes; then
-  FREEBSD_KLDLOAD_TRUE=
-  FREEBSD_KLDLOAD_FALSE='#'
-else
-  FREEBSD_KLDLOAD_TRUE='#'
-  FREEBSD_KLDLOAD_FALSE=
+# Check whether --enable-largefile was given.
+if test ${enable_largefile+y}
+then :
+  enableval=$enable_largefile;
 fi
 
+if test "$enable_largefile" != no; then
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSV IPC" >&5
-$as_echo_n "checking for SYSV IPC... " >&6; }
-if ${ac_cv_sysv_ipc+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
+printf %s "checking for special C compiler options needed for large files... " >&6; }
+if test ${ac_cv_sys_largefile_CC+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_cv_sys_largefile_CC=no
+     if test "$GCC" != yes; then
+       ac_save_CC=$CC
+       while :; do
+	 # IRIX 6.2 and later do not support large files by default,
+	 # so use the C compiler's -n32 option if that helps.
+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
 #include <sys/types.h>
-#include <sys/ipc.h>
-#include <sys/shm.h>
-#include <sys/stat.h>
-
+ /* Check that off_t can represent 2**63 - 1 correctly.
+    We can't simply define LARGE_OFF_T to be 9223372036854775807,
+    since some C++ compilers masquerading as C compilers
+    incorrectly reject 9223372036854775807.  */
+#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
+  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+		       && LARGE_OFF_T % 2147483647 == 1)
+		      ? 1 : -1];
 int
-main ()
+main (void)
 {
 
-{
-    int id;
-    id = shmget(IPC_PRIVATE, 512, S_IRUSR | S_IWUSR);
-    if (id < 0) return -1;
-    return shmctl(id, IPC_RMID, 0);
-}
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_sysv_ipc=yes
-else
-  ac_cv_sysv_ipc=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sysv_ipc" >&5
-$as_echo "$ac_cv_sysv_ipc" >&6; }
-if test "x$ac_cv_sysv_ipc" = xyes; then
-
-$as_echo "#define HAVE_SYSV_IPC 1" >>confdefs.h
-
+	 if ac_fn_c_try_compile "$LINENO"
+then :
+  break
 fi
-
-if test -c /dev/xf86 ; then
-
-$as_echo "#define HAS_APERTURE_DRV 1" >>confdefs.h
-
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+	 CC="$CC -n32"
+	 if ac_fn_c_try_compile "$LINENO"
+then :
+  ac_cv_sys_largefile_CC=' -n32'; break
 fi
-
-ac_fn_c_check_header_mongrel "$LINENO" "machine/apmvar.h" "ac_cv_header_machine_apmvar_h" "$ac_includes_default"
-if test "x$ac_cv_header_machine_apmvar_h" = xyes; then :
-
-	ac_fn_c_check_header_mongrel "$LINENO" "sys/event.h" "ac_cv_header_sys_event_h" "$ac_includes_default"
-if test "x$ac_cv_header_sys_event_h" = xyes; then :
-  ac_cv_BSD_KQUEUE_APM=yes
-else
-  ac_cv_BSD_APM=yes
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+	 break
+       done
+       CC=$ac_save_CC
+       rm -f conftest.$ac_ext
+    fi
 fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
+printf "%s\n" "$ac_cv_sys_largefile_CC" >&6; }
+  if test "$ac_cv_sys_largefile_CC" != no; then
+    CC=$CC$ac_cv_sys_largefile_CC
+  fi
 
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
+printf %s "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
+if test ${ac_cv_sys_file_offset_bits+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  while :; do
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+    We can't simply define LARGE_OFF_T to be 9223372036854775807,
+    since some C++ compilers masquerading as C compilers
+    incorrectly reject 9223372036854775807.  */
+#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
+  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+		       && LARGE_OFF_T % 2147483647 == 1)
+		      ? 1 : -1];
+int
+main (void)
+{
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  ac_cv_sys_file_offset_bits=no; break
 fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#define _FILE_OFFSET_BITS 64
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+    We can't simply define LARGE_OFF_T to be 9223372036854775807,
+    since some C++ compilers masquerading as C compilers
+    incorrectly reject 9223372036854775807.  */
+#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
+  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+		       && LARGE_OFF_T % 2147483647 == 1)
+		      ? 1 : -1];
+int
+main (void)
+{
 
-
-
- if test "x$ac_cv_BSD_APM" = xyes; then
-  BSD_APM_TRUE=
-  BSD_APM_FALSE='#'
-else
-  BSD_APM_TRUE='#'
-  BSD_APM_FALSE=
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  ac_cv_sys_file_offset_bits=64; break
 fi
-
- if test "x$ac_cv_BSD_KQUEUE_APM" = xyes; then
-  BSD_KQUEUE_APM_TRUE=
-  BSD_KQUEUE_APM_FALSE='#'
-else
-  BSD_KQUEUE_APM_TRUE='#'
-  BSD_KQUEUE_APM_FALSE=
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+  ac_cv_sys_file_offset_bits=unknown
+  break
+done
 fi
-
-
-ac_fn_c_check_header_mongrel "$LINENO" "execinfo.h" "ac_cv_header_execinfo_h" "$ac_includes_default"
-if test "x$ac_cv_header_execinfo_h" = xyes; then :
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for backtrace in -lc" >&5
-$as_echo_n "checking for backtrace in -lc... " >&6; }
-if ${ac_cv_lib_c_backtrace+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lc  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
+printf "%s\n" "$ac_cv_sys_file_offset_bits" >&6; }
+case $ac_cv_sys_file_offset_bits in #(
+  no | unknown) ;;
+  *)
+printf "%s\n" "#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits" >>confdefs.h
+;;
+esac
+rm -rf conftest*
+  if test $ac_cv_sys_file_offset_bits = unknown; then
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
+printf %s "checking for _LARGE_FILES value needed for large files... " >&6; }
+if test ${ac_cv_sys_large_files+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  while :; do
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char backtrace ();
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+    We can't simply define LARGE_OFF_T to be 9223372036854775807,
+    since some C++ compilers masquerading as C compilers
+    incorrectly reject 9223372036854775807.  */
+#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
+  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+		       && LARGE_OFF_T % 2147483647 == 1)
+		      ? 1 : -1];
 int
-main ()
+main (void)
 {
-return backtrace ();
+
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_c_backtrace=yes
-else
-  ac_cv_lib_c_backtrace=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+if ac_fn_c_try_compile "$LINENO"
+then :
+  ac_cv_sys_large_files=no; break
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_backtrace" >&5
-$as_echo "$ac_cv_lib_c_backtrace" >&6; }
-if test "x$ac_cv_lib_c_backtrace" = xyes; then :
-
-
-$as_echo "#define HAVE_BACKTRACE 1" >>confdefs.h
-
-
-$as_echo "#define HAVE_EXECINFO_H 1" >>confdefs.h
-
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#define _LARGE_FILES 1
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+    We can't simply define LARGE_OFF_T to be 9223372036854775807,
+    since some C++ compilers masquerading as C compilers
+    incorrectly reject 9223372036854775807.  */
+#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
+  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+		       && LARGE_OFF_T % 2147483647 == 1)
+		      ? 1 : -1];
+int
+main (void)
+{
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  ac_cv_sys_large_files=1; break
 fi
-
-
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+  ac_cv_sys_large_files=unknown
+  break
+done
 fi
-
-
-
-DEFAULT_INT10="x86emu"
-
-
-case $host_cpu in
-  alpha*)
-	ALPHA_VIDEO=yes
-	case $host_os in
-	        *freebsd*)	SYS_LIBS=-lio ;;
-		*netbsd*)
-$as_echo "#define USE_ALPHA_PIO 1" >>confdefs.h
- ;;
-	esac
-	GLX_ARCH_DEFINES="-D__GLX_ALIGN64 -mieee"
-	;;
-  arm*)
-	ARM_VIDEO=yes
-	DEFAULT_INT10="stub"
-	;;
-  i*86)
-	I386_VIDEO=yes
-	case $host_os in
-		*freebsd*)	$as_echo "#define USE_DEV_IO 1" >>confdefs.h
- ;;
-		*dragonfly*)	$as_echo "#define USE_DEV_IO 1" >>confdefs.h
- ;;
-		*netbsd*)	$as_echo "#define USE_I386_IOPL 1" >>confdefs.h
-
-				SYS_LIBS=-li386
-				;;
-		*openbsd*)	$as_echo "#define USE_I386_IOPL 1" >>confdefs.h
-
-				SYS_LIBS=-li386
-				;;
-	esac
-        ;;
-  powerpc*)
-	PPC_VIDEO=yes
-	case $host_os in
-		*freebsd*)	DEFAULT_INT10=stub ;;
-	esac
-	;;
-  sparc*)
-	SPARC64_VIDEO=yes
-	BSD_ARCH_SOURCES="sparc64_video.c ioperm_noop.c"
-	GLX_ARCH_DEFINES="-D__GLX_ALIGN64"
-	;;
-  x86_64*|amd64*)
-	I386_VIDEO=yes
-	case $host_os in
-		*freebsd*)
-$as_echo "#define USE_DEV_IO 1" >>confdefs.h
- ;;
-		*dragonfly*)
-$as_echo "#define USE_DEV_IO 1" >>confdefs.h
- ;;
-		*netbsd*)
-$as_echo "#define USE_I386_IOPL 1" >>confdefs.h
-
-				SYS_LIBS=-lx86_64
-				;;
-		*openbsd*)
-$as_echo "#define USE_AMD64_IOPL 1" >>confdefs.h
-
-				SYS_LIBS=-lamd64
-				;;
-	esac
-	GLX_ARCH_DEFINES="-D__GLX_ALIGN64"
-	;;
-  ia64*)
-  	GLX_ARCH_DEFINES="-D__GLX_ALIGN64"
-	;;
-  s390*)
-  	GLX_ARCH_DEFINES="-D__GLX_ALIGN64"
-	;;
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
+printf "%s\n" "$ac_cv_sys_large_files" >&6; }
+case $ac_cv_sys_large_files in #(
+  no | unknown) ;;
+  *)
+printf "%s\n" "#define _LARGE_FILES $ac_cv_sys_large_files" >>confdefs.h
+;;
 esac
-
-
- if test "x$ALPHA_VIDEO" = xyes; then
-  ALPHA_VIDEO_TRUE=
-  ALPHA_VIDEO_FALSE='#'
-else
-  ALPHA_VIDEO_TRUE='#'
-  ALPHA_VIDEO_FALSE=
-fi
-
- if test "x$ARM_VIDEO" = xyes; then
-  ARM_VIDEO_TRUE=
-  ARM_VIDEO_FALSE='#'
-else
-  ARM_VIDEO_TRUE='#'
-  ARM_VIDEO_FALSE=
+rm -rf conftest*
+  fi
 fi
 
- if test "x$I386_VIDEO" = xyes; then
-  I386_VIDEO_TRUE=
-  I386_VIDEO_FALSE='#'
-else
-  I386_VIDEO_TRUE='#'
-  I386_VIDEO_FALSE=
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+printf %s "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
 fi
+if test -z "$CPP"; then
+  if test ${ac_cv_prog_CPP+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+      # Double quotes because $CC needs to be expanded
+    for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
+    do
+      ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <limits.h>
+		     Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"
+then :
 
- if test "x$PPC_VIDEO" = xyes; then
-  PPC_VIDEO_TRUE=
-  PPC_VIDEO_FALSE='#'
-else
-  PPC_VIDEO_TRUE='#'
-  PPC_VIDEO_FALSE=
+else $as_nop
+  # Broken: fails on valid input.
+continue
 fi
+rm -f conftest.err conftest.i conftest.$ac_ext
 
- if test "x$SPARC64_VIDEO" = xyes; then
-  SPARC64_VIDEO_TRUE=
-  SPARC64_VIDEO_FALSE='#'
-else
-  SPARC64_VIDEO_TRUE='#'
-  SPARC64_VIDEO_FALSE=
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"
+then :
+  # Broken: success on invalid input.
+continue
+else $as_nop
+  # Passes both tests.
+ac_preproc_ok=:
+break
 fi
+rm -f conftest.err conftest.i conftest.$ac_ext
 
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok
+then :
+  break
+fi
 
-DRI=no
-case $host_os in
-  *freebsd* | *dragonfly*)
-	case $host_os in
-		kfreebsd*-gnu) ;;
-		*)
-$as_echo "#define CSRG_BASED 1" >>confdefs.h
- ;;
-	esac
-
-$as_echo "#define PCCONS_SUPPORT 1" >>confdefs.h
-
-
-$as_echo "#define PCVT_SUPPORT 1" >>confdefs.h
-
-
-$as_echo "#define SYSCONS_SUPPORT 1" >>confdefs.h
-
-	DRI=yes
-	;;
-  *netbsd*)
-
-$as_echo "#define CSRG_BASED 1" >>confdefs.h
-
-
-$as_echo "#define PCCONS_SUPPORT 1" >>confdefs.h
-
-
-$as_echo "#define PCVT_SUPPORT 1" >>confdefs.h
-
+    done
+    ac_cv_prog_CPP=$CPP
 
-$as_echo "#define WSCONS_SUPPORT 1" >>confdefs.h
+fi
+  CPP=$ac_cv_prog_CPP
+else
+  ac_cv_prog_CPP=$CPP
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+printf "%s\n" "$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <limits.h>
+		     Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"
+then :
 
-	DRI=yes
-	;;
-  *openbsd*)
+else $as_nop
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
 
-$as_echo "#define CSRG_BASED 1" >>confdefs.h
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"
+then :
+  # Broken: success on invalid input.
+continue
+else $as_nop
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
 
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok
+then :
 
-$as_echo "#define PCVT_SUPPORT 1" >>confdefs.h
+else $as_nop
+  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
+fi
 
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-$as_echo "#define WSCONS_SUPPORT 1" >>confdefs.h
 
-	;;
-  *linux*)
-	DRI=yes
-	;;
-  *solaris*)
-	DRI=yes
-	;;
-  darwin*)
 
-$as_echo "#define CSRG_BASED 1" >>confdefs.h
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}cpp", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cpp; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_RAWCPP+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  case $RAWCPP in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_RAWCPP="$RAWCPP" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_dummy="$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib"
+for as_dir in $as_dummy
+do
+  IFS=$as_save_IFS
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_path_RAWCPP="$as_dir$ac_word$ac_exec_ext"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
-	;;
-  cygwin*|mingw*)
-	CFLAGS="$CFLAGS -DFD_SETSIZE=512"
-	;;
+  ;;
 esac
-
-PVMAJOR=`echo $PACKAGE_VERSION | cut -d . -f 1`
-PVS=`echo $PACKAGE_VERSION | cut -d . -f 4 | cut -d - -f 1`
-if test "x$PVS" = "x"; then
-	PVS="0"
+fi
+RAWCPP=$ac_cv_path_RAWCPP
+if test -n "$RAWCPP"; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RAWCPP" >&5
+printf "%s\n" "$RAWCPP" >&6; }
+else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
-VENDOR_RELEASE="((($PVMAJOR) * 10000000) + (($PVM) * 100000) + (($PVP) * 1000) + $PVS)"
-VENDOR_MAN_VERSION="Version ${PACKAGE_VERSION}"
-
-VENDOR_NAME="The X.Org Foundation"
-VENDOR_NAME_SHORT="X.Org"
-VENDOR_WEB="http://wiki.x.org"
 
-# Check whether --enable-werror was given.
-if test "${enable_werror+set}" = set; then :
-  enableval=$enable_werror; as_fn_error $? "--enable-werror has been replaced by --enable-strict-compilation" "$LINENO" 5
 fi
+if test -z "$ac_cv_path_RAWCPP"; then
+  ac_pt_RAWCPP=$RAWCPP
+  # Extract the first word of "cpp", so it can be a program name with args.
+set dummy cpp; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_ac_pt_RAWCPP+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  case $ac_pt_RAWCPP in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ac_pt_RAWCPP="$ac_pt_RAWCPP" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_dummy="$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib"
+for as_dir in $as_dummy
+do
+  IFS=$as_save_IFS
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_path_ac_pt_RAWCPP="$as_dir$ac_word$ac_exec_ext"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
+  ;;
+esac
+fi
+ac_pt_RAWCPP=$ac_cv_path_ac_pt_RAWCPP
+if test -n "$ac_pt_RAWCPP"; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_RAWCPP" >&5
+printf "%s\n" "$ac_pt_RAWCPP" >&6; }
+else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
 
-# Check whether --enable-debug was given.
-if test "${enable_debug+set}" = set; then :
-  enableval=$enable_debug; DEBUGGING=$enableval
+  if test "x$ac_pt_RAWCPP" = x; then
+    RAWCPP="${CPP}"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    RAWCPP=$ac_pt_RAWCPP
+  fi
 else
-  DEBUGGING=no
+  RAWCPP="$ac_cv_path_RAWCPP"
 fi
 
 
-# Check whether --with-int10 was given.
-if test "${with_int10+set}" = set; then :
-  withval=$with_int10; INT10="$withval"
+# Check for flag to avoid builtin definitions - assumes unix is predefined,
+# which is not the best choice for supporting other OS'es, but covers most
+# of the ones we need for now.
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $RAWCPP requires -undef" >&5
+printf %s "checking if $RAWCPP requires -undef... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+Does cpp redefine unix ?
+_ACEOF
+if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 else
-  INT10="$DEFAULT_INT10"
+	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
+		RAWCPPFLAGS=-undef
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+	# under Cygwin unix is still defined even with -undef
+	elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
+		RAWCPPFLAGS="-undef -ansi"
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, with -ansi" >&5
+printf "%s\n" "yes, with -ansi" >&6; }
+	else
+		as_fn_error $? "${RAWCPP} defines unix with or without -undef.  I don't know what to do." "$LINENO" 5
+	fi
 fi
+rm -f conftest.$ac_ext
 
-
-# Check whether --with-vendor-name was given.
-if test "${with_vendor_name+set}" = set; then :
-  withval=$with_vendor_name;  VENDOR_NAME="$withval"
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $RAWCPP requires -traditional" >&5
+printf %s "checking if $RAWCPP requires -traditional... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+Does cpp preserve   "whitespace"?
+_ACEOF
+if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+else
+	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
+		TRADITIONALCPPFLAGS="-traditional"
+		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+	else
+		as_fn_error $? "${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do." "$LINENO" 5
+	fi
 fi
+rm -f conftest.$ac_ext
 
 
-# Check whether --with-vendor-name-short was given.
-if test "${with_vendor_name_short+set}" = set; then :
-  withval=$with_vendor_name_short;  VENDOR_NAME_SHORT="$withval"
-fi
-
 
-# Check whether --with-vendor-web was given.
-if test "${with_vendor_web+set}" = set; then :
-  withval=$with_vendor_web;  VENDOR_WEB="$withval"
-fi
 
+# Quoted so that make will expand $(CWARNFLAGS) in makefiles to allow
+# easier overrides at build time.
+XSERVER_CFLAGS='$(CWARNFLAGS)'
 
-# Check whether --with-module-dir was given.
-if test "${with_module_dir+set}" = set; then :
-  withval=$with_module_dir;  moduledir="$withval"
-else
-   moduledir="${libdir}/xorg/modules"
+if  test "x$GCC" = xyes ; then
+    XSERVER_CFLAGS="$XSERVER_CFLAGS -fno-strict-aliasing"
 fi
 
 
-# Check whether --with-log-dir was given.
-if test "${with_log_dir+set}" = set; then :
-  withval=$with_log_dir;  logdir="$withval"
-else
-   logdir="$localstatedir/log"
+# Check whether --with-dtrace was given.
+if test ${with_dtrace+y}
+then :
+  withval=$with_dtrace; WDTRACE=$withval
+else $as_nop
+  WDTRACE=auto
 fi
 
+if test "x$WDTRACE" = "xyes" -o "x$WDTRACE" = "xauto" ; then
+	# Extract the first word of "dtrace", so it can be a program name with args.
+set dummy dtrace; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_DTRACE+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  case $DTRACE in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_dummy="$PATH:/usr/sbin"
+for as_dir in $as_dummy
+do
+  IFS=$as_save_IFS
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_path_DTRACE="$as_dir$ac_word$ac_exec_ext"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
-# Check whether --with-builder-addr was given.
-if test "${with_builder_addr+set}" = set; then :
-  withval=$with_builder_addr;  BUILDERADDR="$withval"
-else
-   BUILDERADDR="xorg@lists.freedesktop.org"
+  test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not_found"
+  ;;
+esac
 fi
-
-
-# Check whether --with-os-name was given.
-if test "${with_os_name+set}" = set; then :
-  withval=$with_os_name;  OSNAME="$withval"
+DTRACE=$ac_cv_path_DTRACE
+if test -n "$DTRACE"; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
+printf "%s\n" "$DTRACE" >&6; }
 else
-   OSNAME=`uname -srm`
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
-# Check whether --with-os-vendor was given.
-if test "${with_os_vendor+set}" = set; then :
-  withval=$with_os_vendor;  OSVENDOR="$withval"
-else
-   OSVENDOR=""
+	if test "x$DTRACE" = "xnot_found" ; then
+		if test "x$WDTRACE" = "xyes" ; then
+			{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "dtrace requested but not found
+See \`config.log' for more details" "$LINENO" 5; }
+		fi
+		WDTRACE="no"
+	else
+		ac_fn_c_check_header_compile "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_sdt_h" = xyes
+then :
+  HAS_SDT_H="yes"
+else $as_nop
+  HAS_SDT_H="no"
 fi
 
+		if test "x$WDTRACE" = "xauto" -a "x$HAS_SDT_H" = "xno" ; then
+			WDTRACE="no"
+		fi
+	fi
+fi
+if test "x$WDTRACE" != "xno" ; then
 
-# Check whether --with-builderstring was given.
-if test "${with_builderstring+set}" = set; then :
-  withval=$with_builderstring;  BUILDERSTRING="$withval"
+printf "%s\n" "#define XSERVER_DTRACE 1" >>confdefs.h
 
-fi
 
-# Check whether --enable-listen-tcp was given.
-if test "${enable_listen_tcp+set}" = set; then :
-  enableval=$enable_listen_tcp; LISTEN_TCP=$enableval
-else
-  LISTEN_TCP=no
+# Solaris/OpenSolaris require dtrace -G to build dtrace probe information into
+# object files, and require linking with those as relocatable objects, not .a
+# archives. MacOS X handles all this in the normal compiler toolchain, and on
+# some releases (like Tiger), will error out on dtrace -G.  For now, other
+# platforms with Dtrace ports are assumed to support -G (the FreeBSD and Linux
+# ports appear to, based on my web searches, but have not yet been tested).
+	case $host_os in
+		darwin*)	SPECIAL_DTRACE_OBJECTS=no ;;
+		*)		SPECIAL_DTRACE_OBJECTS=yes ;;
+	esac
 fi
-
-# Check whether --enable-listen-unix was given.
-if test "${enable_listen_unix+set}" = set; then :
-  enableval=$enable_listen_unix; LISTEN_UNIX=$enableval
+ if test "x$WDTRACE" != "xno"; then
+  XSERVER_DTRACE_TRUE=
+  XSERVER_DTRACE_FALSE='#'
 else
-  LISTEN_UNIX=yes
+  XSERVER_DTRACE_TRUE='#'
+  XSERVER_DTRACE_FALSE=
 fi
 
-
-# Check whether --enable-listen-local was given.
-if test "${enable_listen_local+set}" = set; then :
-  enableval=$enable_listen_local; LISTEN_LOCAL=$enableval
+ if test "x$SPECIAL_DTRACE_OBJECTS" = "xyes"; then
+  SPECIAL_DTRACE_OBJECTS_TRUE=
+  SPECIAL_DTRACE_OBJECTS_FALSE='#'
 else
-  LISTEN_LOCAL=yes
+  SPECIAL_DTRACE_OBJECTS_TRUE='#'
+  SPECIAL_DTRACE_OBJECTS_FALSE=
 fi
 
 
-case $host_os in
-    linux*)
-        FALLBACK_INPUT_DRIVER="libinput"
-        ;;
-    *)
-        FALLBACK_INPUT_DRIVER=""
-        ;;
-esac
+ac_header_dirent=no
+for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
+  as_ac_Header=`printf "%s\n" "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
+printf %s "checking for $ac_hdr that defines DIR... " >&6; }
+if eval test \${$as_ac_Header+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <$ac_hdr>
 
-# Check whether --with-fallback-input-driver was given.
-if test "${with_fallback_input_driver+set}" = set; then :
-  withval=$with_fallback_input_driver;  FALLBACK_INPUT_DRIVER=$withval
+int
+main (void)
+{
+if ((DIR *) 0)
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  eval "$as_ac_Header=yes"
+else $as_nop
+  eval "$as_ac_Header=no"
 fi
-
-if test "x$FALLBACK_INPUT_DRIVER" = "xno"; then
-    FALLBACK_INPUT_DRIVER=""
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fallback input driver" >&5
-$as_echo_n "checking for fallback input driver... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $FALLBACK_INPUT_DRIVER" >&5
-$as_echo "$FALLBACK_INPUT_DRIVER" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define FALLBACK_INPUT_DRIVER "$FALLBACK_INPUT_DRIVER"
+eval ac_res=\$$as_ac_Header
+	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Header"\" = x"yes"
+then :
+  cat >>confdefs.h <<_ACEOF
+#define `printf "%s\n" "HAVE_$ac_hdr" | $as_tr_cpp` 1
 _ACEOF
 
-
-
-
-
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for root directory for font files" >&5
-$as_echo_n "checking for root directory for font files... " >&6; }
-
-# Check whether --with-fontrootdir was given.
-if test "${with_fontrootdir+set}" = set; then :
-  withval=$with_fontrootdir; FONTROOTDIR="$withval"
+ac_header_dirent=$ac_hdr; break
 fi
 
-	# if --with-fontrootdir not specified...
-	if test "x${FONTROOTDIR}" = "x"; then
-		FONTROOTDIR=`$PKG_CONFIG --variable=fontrootdir fontutil`
-	fi
-	# ...and if pkg-config didn't find fontdir in fontutil.pc...
-	if test "x${FONTROOTDIR}" = "x"; then
-		FONTROOTDIR="${datadir}/fonts/X11"
-	fi
-
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${FONTROOTDIR}" >&5
-$as_echo "${FONTROOTDIR}" >&6; }
-
-
-
-
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for directory for misc files" >&5
-$as_echo_n "checking for directory for misc files... " >&6; }
+done
+# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
+if test $ac_header_dirent = dirent.h; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
+printf %s "checking for library containing opendir... " >&6; }
+if test ${ac_cv_search_opendir+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-# Check whether --with-fontmiscdir was given.
-if test "${with_fontmiscdir+set}" = set; then :
-  withval=$with_fontmiscdir; FONTMISCDIR="${withval}"
-else
-  FONTMISCDIR='${FONTROOTDIR}/misc'
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+char opendir ();
+int
+main (void)
+{
+return opendir ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' dir
+do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"
+then :
+  ac_cv_search_opendir=$ac_res
 fi
-
-
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${FONTMISCDIR}" >&5
-$as_echo "${FONTMISCDIR}" >&6; }
-
-
-
-
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for directory for OTF files" >&5
-$as_echo_n "checking for directory for OTF files... " >&6; }
-
-# Check whether --with-fontotfdir was given.
-if test "${with_fontotfdir+set}" = set; then :
-  withval=$with_fontotfdir; FONTOTFDIR="${withval}"
-else
-  FONTOTFDIR='${FONTROOTDIR}/OTF'
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext
+  if test ${ac_cv_search_opendir+y}
+then :
+  break
 fi
+done
+if test ${ac_cv_search_opendir+y}
+then :
 
+else $as_nop
+  ac_cv_search_opendir=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
+printf "%s\n" "$ac_cv_search_opendir" >&6; }
+ac_res=$ac_cv_search_opendir
+if test "$ac_res" != no
+then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${FONTOTFDIR}" >&5
-$as_echo "${FONTOTFDIR}" >&6; }
-
-
-
-
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for directory for TTF files" >&5
-$as_echo_n "checking for directory for TTF files... " >&6; }
+fi
 
-# Check whether --with-fontttfdir was given.
-if test "${with_fontttfdir+set}" = set; then :
-  withval=$with_fontttfdir; FONTTTFDIR="${withval}"
 else
-  FONTTTFDIR='${FONTROOTDIR}/TTF'
-fi
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
+printf %s "checking for library containing opendir... " >&6; }
+if test ${ac_cv_search_opendir+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+char opendir ();
+int
+main (void)
+{
+return opendir ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' x
+do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"
+then :
+  ac_cv_search_opendir=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext
+  if test ${ac_cv_search_opendir+y}
+then :
+  break
+fi
+done
+if test ${ac_cv_search_opendir+y}
+then :
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${FONTTTFDIR}" >&5
-$as_echo "${FONTTTFDIR}" >&6; }
+else $as_nop
+  ac_cv_search_opendir=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
+printf "%s\n" "$ac_cv_search_opendir" >&6; }
+ac_res=$ac_cv_search_opendir
+if test "$ac_res" != no
+then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
 
+fi
 
+fi
 
+# Autoupdate added the next two lines to ensure that your configure
+# script's behavior did not change.  They are probably safe to remove.
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for directory for Type1 files" >&5
-$as_echo_n "checking for directory for Type1 files... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+printf %s "checking for egrep... " >&6; }
+if test ${ac_cv_path_EGREP+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+   then ac_cv_path_EGREP="$GREP -E"
+   else
+     if test -z "$EGREP"; then
+  ac_path_EGREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_prog in egrep
+   do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
+      as_fn_executable_p "$ac_path_EGREP" || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+  # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+  ac_count=0
+  printf %s 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    printf "%s\n" 'EGREP' >> "conftest.nl"
+    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_EGREP="$ac_path_EGREP"
+      ac_path_EGREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
 
-# Check whether --with-fonttype1dir was given.
-if test "${with_fonttype1dir+set}" = set; then :
-  withval=$with_fonttype1dir; FONTTYPE1DIR="${withval}"
+      $ac_path_EGREP_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_EGREP"; then
+    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
 else
-  FONTTYPE1DIR='${FONTROOTDIR}/Type1'
+  ac_cv_path_EGREP=$EGREP
 fi
 
+   fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+printf "%s\n" "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${FONTTYPE1DIR}" >&5
-$as_echo "${FONTTYPE1DIR}" >&6; }
 
 
+ac_fn_c_check_header_compile "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default"
+if test "x$ac_cv_header_fcntl_h" = xyes
+then :
+  printf "%s\n" "#define HAVE_FCNTL_H 1" >>confdefs.h
 
+fi
+ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdlib_h" = xyes
+then :
+  printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for directory for 75dpi files" >&5
-$as_echo_n "checking for directory for 75dpi files... " >&6; }
+fi
+ac_fn_c_check_header_compile "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default"
+if test "x$ac_cv_header_string_h" = xyes
+then :
+  printf "%s\n" "#define HAVE_STRING_H 1" >>confdefs.h
 
-# Check whether --with-font75dpidir was given.
-if test "${with_font75dpidir+set}" = set; then :
-  withval=$with_font75dpidir; FONT75DPIDIR="${withval}"
-else
-  FONT75DPIDIR='${FONTROOTDIR}/75dpi'
 fi
+ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
+if test "x$ac_cv_header_unistd_h" = xyes
+then :
+  printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h
 
+fi
+ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
+if test "x$ac_cv_header_dlfcn_h" = xyes
+then :
+  printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${FONT75DPIDIR}" >&5
-$as_echo "${FONT75DPIDIR}" >&6; }
+fi
+ac_fn_c_check_header_compile "$LINENO" "stropts.h" "ac_cv_header_stropts_h" "$ac_includes_default"
+if test "x$ac_cv_header_stropts_h" = xyes
+then :
+  printf "%s\n" "#define HAVE_STROPTS_H 1" >>confdefs.h
 
+fi
+ac_fn_c_check_header_compile "$LINENO" "fnmatch.h" "ac_cv_header_fnmatch_h" "$ac_includes_default"
+if test "x$ac_cv_header_fnmatch_h" = xyes
+then :
+  printf "%s\n" "#define HAVE_FNMATCH_H 1" >>confdefs.h
 
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_mkdev_h" = xyes
+then :
+  printf "%s\n" "#define HAVE_SYS_MKDEV_H 1" >>confdefs.h
 
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_sysmacros_h" = xyes
+then :
+  printf "%s\n" "#define HAVE_SYS_SYSMACROS_H 1" >>confdefs.h
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for directory for 100dpi files" >&5
-$as_echo_n "checking for directory for 100dpi files... " >&6; }
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/utsname.h" "ac_cv_header_sys_utsname_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_utsname_h" = xyes
+then :
+  printf "%s\n" "#define HAVE_SYS_UTSNAME_H 1" >>confdefs.h
 
-# Check whether --with-font100dpidir was given.
-if test "${with_font100dpidir+set}" = set; then :
-  withval=$with_font100dpidir; FONT100DPIDIR="${withval}"
-else
-  FONT100DPIDIR='${FONTROOTDIR}/100dpi'
 fi
 
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${FONT100DPIDIR}" >&5
-$as_echo "${FONT100DPIDIR}" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
+printf %s "checking for an ANSI C-conforming const... " >&6; }
+if test ${ac_cv_c_const+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+int
+main (void)
+{
 
-DEFAULT_FONT_PATH="${FONTMISCDIR}/,${FONTTTFDIR}/,${FONTOTFDIR}/,${FONTTYPE1DIR}/,${FONT100DPIDIR}/,${FONT75DPIDIR}/"
-case $host_os in
-    darwin*) DEFAULT_FONT_PATH="${DEFAULT_FONT_PATH},/Library/Fonts,/System/Library/Fonts" ;;
-esac
+#ifndef __cplusplus
+  /* Ultrix mips cc rejects this sort of thing.  */
+  typedef int charset[2];
+  const charset cs = { 0, 0 };
+  /* SunOS 4.1.1 cc rejects this.  */
+  char const *const *pcpcc;
+  char **ppc;
+  /* NEC SVR4.0.2 mips cc rejects this.  */
+  struct point {int x, y;};
+  static struct point const zero = {0,0};
+  /* IBM XL C 1.02.0.0 rejects this.
+     It does not let you subtract one const X* pointer from another in
+     an arm of an if-expression whose if-part is not a constant
+     expression */
+  const char *g = "string";
+  pcpcc = &g + (g ? g-g : 0);
+  /* HPUX 7.0 cc rejects these. */
+  ++pcpcc;
+  ppc = (char**) pcpcc;
+  pcpcc = (char const *const *) ppc;
+  { /* SCO 3.2v4 cc rejects this sort of thing.  */
+    char tx;
+    char *t = &tx;
+    char const *s = 0 ? (char *) 0 : (char const *) 0;
 
+    *t++ = 0;
+    if (s) return 0;
+  }
+  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
+    int x[] = {25, 17};
+    const int *foo = &x[0];
+    ++foo;
+  }
+  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+    typedef const int *iptr;
+    iptr p = 0;
+    ++p;
+  }
+  { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying
+       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+    struct s { int j; const int *ap[3]; } bx;
+    struct s *b = &bx; b->j = 5;
+  }
+  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+    const int foo = 10;
+    if (!foo) return 0;
+  }
+  return !cs[0] && !zero.x;
+#endif
 
-# Check whether --with-default-font-path was given.
-if test "${with_default_font_path+set}" = set; then :
-  withval=$with_default_font_path;  FONTPATH="$withval"
-else
-   FONTPATH="${DEFAULT_FONT_PATH}"
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  ac_cv_c_const=yes
+else $as_nop
+  ac_cv_c_const=no
 fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default font path" >&5
-$as_echo_n "checking for default font path... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $FONTPATH" >&5
-$as_echo "$FONTPATH" >&6; }
-
-
-# Check whether --with-xkb-path was given.
-if test "${with_xkb_path+set}" = set; then :
-  withval=$with_xkb_path;  XKBPATH="$withval"
-else
-   XKBPATH="auto"
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
+printf "%s\n" "$ac_cv_c_const" >&6; }
+if test $ac_cv_c_const = no; then
 
+printf "%s\n" "#define const /**/" >>confdefs.h
 
-# Check whether --with-xkb-output was given.
-if test "${with_xkb_output+set}" = set; then :
-  withval=$with_xkb_output;  XKBOUTPUT="$withval"
-else
-   XKBOUTPUT="compiled"
 fi
 
 
-# Check whether --with-default-xkb-rules was given.
-if test "${with_default_xkb_rules+set}" = set; then :
-  withval=$with_default_xkb_rules;  XKB_DFLT_RULES="$withval"
-else
-   XKB_DFLT_RULES=""
-fi
-
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for typeof syntax and keyword spelling" >&5
+printf %s "checking for typeof syntax and keyword spelling... " >&6; }
+if test ${ac_cv_c_typeof+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_cv_c_typeof=no
+     for ac_kw in typeof __typeof__ no; do
+       test $ac_kw = no && break
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-# Check whether --with-default-xkb-model was given.
-if test "${with_default_xkb_model+set}" = set; then :
-  withval=$with_default_xkb_model;  XKB_DFLT_MODEL="$withval"
-else
-   XKB_DFLT_MODEL="pc105"
-fi
+int
+main (void)
+{
 
+	   int value;
+	   typedef struct {
+		   char a [1
+			   + ! (($ac_kw (value))
+				(($ac_kw (value)) 0 < ($ac_kw (value)) -1
+				 ? ($ac_kw (value)) - 1
+				 : ~ (~ ($ac_kw (value)) 0
+				      << sizeof ($ac_kw (value)))))]; }
+	      ac__typeof_type_;
+	   return
+	     (! ((void) ((ac__typeof_type_ *) 0), 0));
 
-# Check whether --with-default-xkb-layout was given.
-if test "${with_default_xkb_layout+set}" = set; then :
-  withval=$with_default_xkb_layout;  XKB_DFLT_LAYOUT="$withval"
-else
-   XKB_DFLT_LAYOUT="us"
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  ac_cv_c_typeof=$ac_kw
 fi
-
-
-# Check whether --with-default-xkb-variant was given.
-if test "${with_default_xkb_variant+set}" = set; then :
-  withval=$with_default_xkb_variant;  XKB_DFLT_VARIANT="$withval"
-else
-   XKB_DFLT_VARIANT=""
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+       test $ac_cv_c_typeof != no && break
+     done
 fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_typeof" >&5
+printf "%s\n" "$ac_cv_c_typeof" >&6; }
+  if test $ac_cv_c_typeof != no; then
 
+printf "%s\n" "#define HAVE_TYPEOF 1" >>confdefs.h
 
-# Check whether --with-default-xkb-options was given.
-if test "${with_default_xkb_options+set}" = set; then :
-  withval=$with_default_xkb_options;  XKB_DFLT_OPTIONS="$withval"
-else
-   XKB_DFLT_OPTIONS=""
-fi
+    if test $ac_cv_c_typeof != typeof; then
 
+printf "%s\n" "#define typeof $ac_cv_c_typeof" >>confdefs.h
 
-# Check whether --with-serverconfig-path was given.
-if test "${with_serverconfig_path+set}" = set; then :
-  withval=$with_serverconfig_path;  SERVERCONFIG="$withval"
-else
-   SERVERCONFIG="${libdir}/xorg"
-fi
+    fi
+  fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
+printf %s "checking whether byte ordering is bigendian... " >&6; }
+if test ${ac_cv_c_bigendian+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_cv_c_bigendian=unknown
+    # See if we're dealing with a universal compiler.
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifndef __APPLE_CC__
+	       not a universal capable compiler
+	     #endif
+	     typedef int dummy;
 
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
 
-# Check whether --with-apple-applications-dir was given.
-if test "${with_apple_applications_dir+set}" = set; then :
-  withval=$with_apple_applications_dir;  APPLE_APPLICATIONS_DIR="${withval}"
-else
-   APPLE_APPLICATIONS_DIR="/Applications/Utilities"
+	# Check for potential -arch flags.  It is not universal unless
+	# there are at least two -arch flags with different values.
+	ac_arch=
+	ac_prev=
+	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
+	 if test -n "$ac_prev"; then
+	   case $ac_word in
+	     i?86 | x86_64 | ppc | ppc64)
+	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
+		 ac_arch=$ac_word
+	       else
+		 ac_cv_c_bigendian=universal
+		 break
+	       fi
+	       ;;
+	   esac
+	   ac_prev=
+	 elif test "x$ac_word" = "x-arch"; then
+	   ac_prev=arch
+	 fi
+       done
 fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+    if test $ac_cv_c_bigendian = unknown; then
+      # See if sys/param.h defines the BYTE_ORDER macro.
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+	     #include <sys/param.h>
+
+int
+main (void)
+{
+#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
+		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
+		     && LITTLE_ENDIAN)
+	      bogus endian macros
+	     #endif
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  # It does; now see whether it defined to BIG_ENDIAN or not.
+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+		#include <sys/param.h>
 
+int
+main (void)
+{
+#if BYTE_ORDER != BIG_ENDIAN
+		 not big endian
+		#endif
 
-# Check whether --with-apple-application-name was given.
-if test "${with_apple_application_name+set}" = set; then :
-  withval=$with_apple_application_name;  APPLE_APPLICATION_NAME="${withval}"
-else
-   APPLE_APPLICATION_NAME="X11"
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  ac_cv_c_bigendian=yes
+else $as_nop
+  ac_cv_c_bigendian=no
 fi
-
-
-
-# Check whether --with-bundle-id-prefix was given.
-if test "${with_bundle_id_prefix+set}" = set; then :
-  withval=$with_bundle_id_prefix;  BUNDLE_ID_PREFIX="${withval}"
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+    fi
+    if test $ac_cv_c_bigendian = unknown; then
+      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <limits.h>
 
+int
+main (void)
+{
+#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
+	      bogus endian macros
+	     #endif
 
-
-cat >>confdefs.h <<_ACEOF
-#define BUNDLE_ID_PREFIX "$BUNDLE_ID_PREFIX"
+  ;
+  return 0;
+}
 _ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  # It does; now see whether it defined to _BIG_ENDIAN or not.
+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <limits.h>
 
+int
+main (void)
+{
+#ifndef _BIG_ENDIAN
+		 not big endian
+		#endif
 
-
-# Check whether --with-bundle-version was given.
-if test "${with_bundle_version+set}" = set; then :
-  withval=$with_bundle_version;  BUNDLE_VERSION="${withval}"
-else
-   BUNDLE_VERSION="1.20.11"
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  ac_cv_c_bigendian=yes
+else $as_nop
+  ac_cv_c_bigendian=no
 fi
-
-
-
-# Check whether --with-bundle-version-string was given.
-if test "${with_bundle_version_string+set}" = set; then :
-  withval=$with_bundle_version_string;  BUNDLE_VERSION_STRING="${withval}"
-else
-   BUNDLE_VERSION_STRING="${PACKAGE_VERSION}"
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+    fi
+    if test $ac_cv_c_bigendian = unknown; then
+      # Compile a test program.
+      if test "$cross_compiling" = yes
+then :
+  # Try to guess by grepping values from an object file.
+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+unsigned short int ascii_mm[] =
+		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+		unsigned short int ascii_ii[] =
+		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+		int use_ascii (int i) {
+		  return ascii_mm[i] + ascii_ii[i];
+		}
+		unsigned short int ebcdic_ii[] =
+		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+		unsigned short int ebcdic_mm[] =
+		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+		int use_ebcdic (int i) {
+		  return ebcdic_mm[i] + ebcdic_ii[i];
+		}
+		extern int foo;
 
-
-# Check whether --enable-sparkle was given.
-if test "${enable_sparkle+set}" = set; then :
-  enableval=$enable_sparkle;  XQUARTZ_SPARKLE="${enableval}"
-else
-   XQUARTZ_SPARKLE="no"
+int
+main (void)
+{
+return use_ascii (foo) == use_ebcdic (foo);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
+	      ac_cv_c_bigendian=yes
+	    fi
+	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+	      if test "$ac_cv_c_bigendian" = unknown; then
+		ac_cv_c_bigendian=no
+	      else
+		# finding both strings is unlikely to happen, but who knows?
+		ac_cv_c_bigendian=unknown
+	      fi
+	    fi
 fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main (void)
+{
 
+	     /* Are we little or big endian?  From Harbison&Steele.  */
+	     union
+	     {
+	       long int l;
+	       char c[sizeof (long int)];
+	     } u;
+	     u.l = 1;
+	     return u.c[sizeof (long int) - 1] == 1;
 
-
-# Check whether --with-sparkle-feed-url was given.
-if test "${with_sparkle_feed_url+set}" = set; then :
-  withval=$with_sparkle_feed_url;  XQUARTZ_SPARKLE_FEED_URL="${withval}"
-else
-   XQUARTZ_SPARKLE_FEED_URL="https://www.xquartz.org/releases/sparkle/release.xml"
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  ac_cv_c_bigendian=no
+else $as_nop
+  ac_cv_c_bigendian=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-
-# Check whether --enable-visibility was given.
-if test "${enable_visibility+set}" = set; then :
-  enableval=$enable_visibility; SYMBOL_VISIBILITY=$enableval
-else
-  SYMBOL_VISIBILITY=auto
+    fi
 fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
+printf "%s\n" "$ac_cv_c_bigendian" >&6; }
+ case $ac_cv_c_bigendian in #(
+   yes)
 
+printf "%s\n" "#define X_BYTE_ORDER X_BIG_ENDIAN" >>confdefs.h
+;; #(
+   no)
 
+printf "%s\n" "#define X_BYTE_ORDER X_LITTLE_ENDIAN" >>confdefs.h
+ ;; #(
+   universal)
 
-# Check whether --with-khronos-spec-dir was given.
-if test "${with_khronos_spec_dir+set}" = set; then :
-  withval=$with_khronos_spec_dir; KHRONOS_SPEC_DIR="${withval}"
-else
-  KHRONOS_SPEC_DIR=auto
-fi
+printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
 
+     ;; #(
+   *)
+     as_fn_error $? "unknown endianness
+ presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
+ esac
 
-# Check whether --enable-composite was given.
-if test "${enable_composite+set}" = set; then :
-  enableval=$enable_composite; COMPOSITE=$enableval
-else
-  COMPOSITE=yes
-fi
 
-# Check whether --enable-mitshm was given.
-if test "${enable_mitshm+set}" = set; then :
-  enableval=$enable_mitshm; MITSHM=$enableval
-else
-  MITSHM=auto
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
+printf %s "checking size of unsigned long... " >&6; }
+if test ${ac_cv_sizeof_unsigned_long+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long"        "$ac_includes_default"
+then :
+
+else $as_nop
+  if test "$ac_cv_type_unsigned_long" = yes; then
+     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (unsigned long)
+See \`config.log' for more details" "$LINENO" 5; }
+   else
+     ac_cv_sizeof_unsigned_long=0
+   fi
 fi
 
-# Check whether --enable-xres was given.
-if test "${enable_xres+set}" = set; then :
-  enableval=$enable_xres; RES=$enableval
-else
-  RES=yes
 fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
+printf "%s\n" "$ac_cv_sizeof_unsigned_long" >&6; }
 
-# Check whether --enable-record was given.
-if test "${enable_record+set}" = set; then :
-  enableval=$enable_record; RECORD=$enableval
-else
-  RECORD=yes
-fi
 
-# Check whether --enable-xv was given.
-if test "${enable_xv+set}" = set; then :
-  enableval=$enable_xv; XV=$enableval
-else
-  XV=yes
-fi
 
-# Check whether --enable-xvmc was given.
-if test "${enable_xvmc+set}" = set; then :
-  enableval=$enable_xvmc; XVMC=$enableval
-else
-  XVMC=yes
-fi
+printf "%s\n" "#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long" >>confdefs.h
 
-# Check whether --enable-dga was given.
-if test "${enable_dga+set}" = set; then :
-  enableval=$enable_dga; DGA=$enableval
-else
-  DGA=auto
-fi
 
-# Check whether --enable-screensaver was given.
-if test "${enable_screensaver+set}" = set; then :
-  enableval=$enable_screensaver; SCREENSAVER=$enableval
-else
-  SCREENSAVER=yes
-fi
+if test "$ac_cv_sizeof_unsigned_long" = 8; then
 
-# Check whether --enable-xdmcp was given.
-if test "${enable_xdmcp+set}" = set; then :
-  enableval=$enable_xdmcp; XDMCP=$enableval
-else
-  XDMCP=auto
-fi
+printf "%s\n" "#define _XSERVER64 1" >>confdefs.h
 
-# Check whether --enable-xdm-auth-1 was given.
-if test "${enable_xdm_auth_1+set}" = set; then :
-  enableval=$enable_xdm_auth_1; XDMAUTH=$enableval
-else
-  XDMAUTH=auto
 fi
 
-# Check whether --enable-glx was given.
-if test "${enable_glx+set}" = set; then :
-  enableval=$enable_glx; GLX=$enableval
-else
-  GLX=yes
-fi
 
-# Check whether --enable-dri was given.
-if test "${enable_dri+set}" = set; then :
-  enableval=$enable_dri; DRI=$enableval
-fi
+  ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
+"
+if test "x$ac_cv_type_pid_t" = xyes
+then :
 
-# Check whether --enable-dri2 was given.
-if test "${enable_dri2+set}" = set; then :
-  enableval=$enable_dri2; DRI2=$enableval
-else
-  DRI2=auto
-fi
+else $as_nop
+                                          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-# Check whether --enable-dri3 was given.
-if test "${enable_dri3+set}" = set; then :
-  enableval=$enable_dri3; DRI3=$enableval
-else
-  DRI3=auto
+          #if defined _WIN64 && !defined __CYGWIN__
+          LLP64
+          #endif
+
+int
+main (void)
+{
+
+  ;
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  ac_pid_type='int'
+else $as_nop
+  ac_pid_type='__int64'
 fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 
-# Check whether --enable-present was given.
-if test "${enable_present+set}" = set; then :
-  enableval=$enable_present; PRESENT=$enableval
-else
-  PRESENT=yes
-fi
+printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h
 
-# Check whether --enable-xinerama was given.
-if test "${enable_xinerama+set}" = set; then :
-  enableval=$enable_xinerama; XINERAMA=$enableval
-else
-  XINERAMA=yes
-fi
 
-# Check whether --enable-xf86vidmode was given.
-if test "${enable_xf86vidmode+set}" = set; then :
-  enableval=$enable_xf86vidmode; XF86VIDMODE=$enableval
-else
-  XF86VIDMODE=auto
 fi
 
-# Check whether --enable-xace was given.
-if test "${enable_xace+set}" = set; then :
-  enableval=$enable_xace; XACE=$enableval
-else
-  XACE=yes
-fi
 
-# Check whether --enable-xselinux was given.
-if test "${enable_xselinux+set}" = set; then :
-  enableval=$enable_xselinux; XSELINUX=$enableval
-else
-  XSELINUX=no
-fi
 
-# Check whether --enable-xcsecurity was given.
-if test "${enable_xcsecurity+set}" = set; then :
-  enableval=$enable_xcsecurity; XCSECURITY=$enableval
-else
-  XCSECURITY=no
-fi
+ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
+if test "x$ac_cv_func_dlopen" = xyes
+then :
+
+else $as_nop
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+printf %s "checking for dlopen in -ldl... " >&6; }
+if test ${ac_cv_lib_dl_dlopen+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-# Check whether --enable-dbe was given.
-if test "${enable_dbe+set}" = set; then :
-  enableval=$enable_dbe; DBE=$enableval
-else
-  DBE=yes
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+char dlopen ();
+int
+main (void)
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+  ac_cv_lib_dl_dlopen=yes
+else $as_nop
+  ac_cv_lib_dl_dlopen=no
 fi
-
-# Check whether --enable-xf86bigfont was given.
-if test "${enable_xf86bigfont+set}" = set; then :
-  enableval=$enable_xf86bigfont; XF86BIGFONT=$enableval
-else
-  XF86BIGFONT=no
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 fi
-
-# Check whether --enable-dpms was given.
-if test "${enable_dpms+set}" = set; then :
-  enableval=$enable_dpms; DPMSExtension=$enableval
-else
-  DPMSExtension=yes
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = xyes
+then :
+  DLOPEN_LIBS="-ldl"
 fi
 
-# Check whether --enable-config-udev was given.
-if test "${enable_config_udev+set}" = set; then :
-  enableval=$enable_config_udev; CONFIG_UDEV=$enableval
-else
-  CONFIG_UDEV=auto
 fi
 
-# Check whether --enable-config-udev-kms was given.
-if test "${enable_config_udev_kms+set}" = set; then :
-  enableval=$enable_config_udev_kms; CONFIG_UDEV_KMS=$enableval
-else
-  CONFIG_UDEV_KMS=auto
-fi
 
-# Check whether --enable-config-hal was given.
-if test "${enable_config_hal+set}" = set; then :
-  enableval=$enable_config_hal; CONFIG_HAL=$enableval
-else
-  CONFIG_HAL=auto
-fi
 
-# Check whether --enable-config-wscons was given.
-if test "${enable_config_wscons+set}" = set; then :
-  enableval=$enable_config_wscons; CONFIG_WSCONS=$enableval
-else
-  CONFIG_WSCONS=auto
-fi
+ac_fn_c_check_func "$LINENO" "backtrace" "ac_cv_func_backtrace"
+if test "x$ac_cv_func_backtrace" = xyes
+then :
+  printf "%s\n" "#define HAVE_BACKTRACE 1" >>confdefs.h
 
-# Check whether --enable-xfree86-utils was given.
-if test "${enable_xfree86_utils+set}" = set; then :
-  enableval=$enable_xfree86_utils; XF86UTILS=$enableval
-else
-  XF86UTILS=yes
 fi
+ac_fn_c_check_func "$LINENO" "geteuid" "ac_cv_func_geteuid"
+if test "x$ac_cv_func_geteuid" = xyes
+then :
+  printf "%s\n" "#define HAVE_GETEUID 1" >>confdefs.h
 
-# Check whether --enable-vgahw was given.
-if test "${enable_vgahw+set}" = set; then :
-  enableval=$enable_vgahw; VGAHW=$enableval
-else
-  VGAHW=yes
 fi
+ac_fn_c_check_func "$LINENO" "getuid" "ac_cv_func_getuid"
+if test "x$ac_cv_func_getuid" = xyes
+then :
+  printf "%s\n" "#define HAVE_GETUID 1" >>confdefs.h
 
-# Check whether --enable-vbe was given.
-if test "${enable_vbe+set}" = set; then :
-  enableval=$enable_vbe; VBE=$enableval
-else
-  VBE=yes
 fi
+ac_fn_c_check_func "$LINENO" "issetugid" "ac_cv_func_issetugid"
+if test "x$ac_cv_func_issetugid" = xyes
+then :
+  printf "%s\n" "#define HAVE_ISSETUGID 1" >>confdefs.h
 
-# Check whether --enable-int10-module was given.
-if test "${enable_int10_module+set}" = set; then :
-  enableval=$enable_int10_module; INT10MODULE=$enableval
-else
-  INT10MODULE=yes
 fi
+ac_fn_c_check_func "$LINENO" "getresuid" "ac_cv_func_getresuid"
+if test "x$ac_cv_func_getresuid" = xyes
+then :
+  printf "%s\n" "#define HAVE_GETRESUID 1" >>confdefs.h
 
-# Check whether --enable-windowswm was given.
-if test "${enable_windowswm+set}" = set; then :
-  enableval=$enable_windowswm; WINDOWSWM=$enableval
-else
-  WINDOWSWM=no
 fi
+ac_fn_c_check_func "$LINENO" "getdtablesize" "ac_cv_func_getdtablesize"
+if test "x$ac_cv_func_getdtablesize" = xyes
+then :
+  printf "%s\n" "#define HAVE_GETDTABLESIZE 1" >>confdefs.h
 
-# Check whether --enable-windowsdri was given.
-if test "${enable_windowsdri+set}" = set; then :
-  enableval=$enable_windowsdri; WINDOWSDRI=$enableval
-else
-  WINDOWSDRI=auto
 fi
+ac_fn_c_check_func "$LINENO" "getifaddrs" "ac_cv_func_getifaddrs"
+if test "x$ac_cv_func_getifaddrs" = xyes
+then :
+  printf "%s\n" "#define HAVE_GETIFADDRS 1" >>confdefs.h
 
-# Check whether --enable-libdrm was given.
-if test "${enable_libdrm+set}" = set; then :
-  enableval=$enable_libdrm; DRM=$enableval
-else
-  DRM=yes
 fi
+ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
+if test "x$ac_cv_func_getpeereid" = xyes
+then :
+  printf "%s\n" "#define HAVE_GETPEEREID 1" >>confdefs.h
 
-# Check whether --enable-clientids was given.
-if test "${enable_clientids+set}" = set; then :
-  enableval=$enable_clientids; CLIENTIDS=$enableval
-else
-  CLIENTIDS=yes
 fi
+ac_fn_c_check_func "$LINENO" "getpeerucred" "ac_cv_func_getpeerucred"
+if test "x$ac_cv_func_getpeerucred" = xyes
+then :
+  printf "%s\n" "#define HAVE_GETPEERUCRED 1" >>confdefs.h
 
-# Check whether --enable-pciaccess was given.
-if test "${enable_pciaccess+set}" = set; then :
-  enableval=$enable_pciaccess; PCI=$enableval
-else
-  PCI=yes
 fi
+ac_fn_c_check_func "$LINENO" "getprogname" "ac_cv_func_getprogname"
+if test "x$ac_cv_func_getprogname" = xyes
+then :
+  printf "%s\n" "#define HAVE_GETPROGNAME 1" >>confdefs.h
 
-# Check whether --enable-linux_acpi was given.
-if test "${enable_linux_acpi+set}" = set; then :
-  enableval=$enable_linux_acpi; enable_linux_acpi=$enableval
-else
-  enable_linux_acpi=yes
 fi
+ac_fn_c_check_func "$LINENO" "getzoneid" "ac_cv_func_getzoneid"
+if test "x$ac_cv_func_getzoneid" = xyes
+then :
+  printf "%s\n" "#define HAVE_GETZONEID 1" >>confdefs.h
 
-# Check whether --enable-linux_apm was given.
-if test "${enable_linux_apm+set}" = set; then :
-  enableval=$enable_linux_apm; enable_linux_apm=$enableval
-else
-  enable_linux_apm=yes
 fi
+ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
+if test "x$ac_cv_func_mmap" = xyes
+then :
+  printf "%s\n" "#define HAVE_MMAP 1" >>confdefs.h
 
-# Check whether --enable-systemd-logind was given.
-if test "${enable_systemd_logind+set}" = set; then :
-  enableval=$enable_systemd_logind; SYSTEMD_LOGIND=$enableval
-else
-  SYSTEMD_LOGIND=auto
 fi
+ac_fn_c_check_func "$LINENO" "posix_fallocate" "ac_cv_func_posix_fallocate"
+if test "x$ac_cv_func_posix_fallocate" = xyes
+then :
+  printf "%s\n" "#define HAVE_POSIX_FALLOCATE 1" >>confdefs.h
 
-# Check whether --enable-suid-wrapper was given.
-if test "${enable_suid_wrapper+set}" = set; then :
-  enableval=$enable_suid_wrapper; SUID_WRAPPER=$enableval
-else
-  SUID_WRAPPER=no
 fi
+ac_fn_c_check_func "$LINENO" "seteuid" "ac_cv_func_seteuid"
+if test "x$ac_cv_func_seteuid" = xyes
+then :
+  printf "%s\n" "#define HAVE_SETEUID 1" >>confdefs.h
 
-
-# Check whether --enable-xorg was given.
-if test "${enable_xorg+set}" = set; then :
-  enableval=$enable_xorg; XORG=$enableval
-else
-  XORG=auto
 fi
+ac_fn_c_check_func "$LINENO" "shmctl64" "ac_cv_func_shmctl64"
+if test "x$ac_cv_func_shmctl64" = xyes
+then :
+  printf "%s\n" "#define HAVE_SHMCTL64 1" >>confdefs.h
 
-# Check whether --enable-dmx was given.
-if test "${enable_dmx+set}" = set; then :
-  enableval=$enable_dmx; DMX=$enableval
-else
-  DMX=no
 fi
+ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp"
+if test "x$ac_cv_func_strncasecmp" = xyes
+then :
+  printf "%s\n" "#define HAVE_STRNCASECMP 1" >>confdefs.h
 
-# Check whether --enable-xvfb was given.
-if test "${enable_xvfb+set}" = set; then :
-  enableval=$enable_xvfb; XVFB=$enableval
-else
-  XVFB=yes
 fi
+ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf"
+if test "x$ac_cv_func_vasprintf" = xyes
+then :
+  printf "%s\n" "#define HAVE_VASPRINTF 1" >>confdefs.h
 
-# Check whether --enable-xnest was given.
-if test "${enable_xnest+set}" = set; then :
-  enableval=$enable_xnest; XNEST=$enableval
-else
-  XNEST=auto
 fi
+ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
+if test "x$ac_cv_func_vsnprintf" = xyes
+then :
+  printf "%s\n" "#define HAVE_VSNPRINTF 1" >>confdefs.h
 
-# Check whether --enable-xquartz was given.
-if test "${enable_xquartz+set}" = set; then :
-  enableval=$enable_xquartz; XQUARTZ=$enableval
-else
-  XQUARTZ=auto
 fi
+ac_fn_c_check_func "$LINENO" "walkcontext" "ac_cv_func_walkcontext"
+if test "x$ac_cv_func_walkcontext" = xyes
+then :
+  printf "%s\n" "#define HAVE_WALKCONTEXT 1" >>confdefs.h
 
-# Check whether --enable-xwayland was given.
-if test "${enable_xwayland+set}" = set; then :
-  enableval=$enable_xwayland; XWAYLAND=$enableval
-else
-  XWAYLAND=auto
 fi
+ac_fn_c_check_func "$LINENO" "setitimer" "ac_cv_func_setitimer"
+if test "x$ac_cv_func_setitimer" = xyes
+then :
+  printf "%s\n" "#define HAVE_SETITIMER 1" >>confdefs.h
 
-# Check whether --enable-xwayland-eglstream was given.
-if test "${enable_xwayland_eglstream+set}" = set; then :
-  enableval=$enable_xwayland_eglstream; XWAYLAND_EGLSTREAM=$enableval
-else
-  XWAYLAND_EGLSTREAM=no
 fi
+ac_fn_c_check_func "$LINENO" "poll" "ac_cv_func_poll"
+if test "x$ac_cv_func_poll" = xyes
+then :
+  printf "%s\n" "#define HAVE_POLL 1" >>confdefs.h
 
-# Check whether --enable-standalone-xpbproxy was given.
-if test "${enable_standalone_xpbproxy+set}" = set; then :
-  enableval=$enable_standalone_xpbproxy; STANDALONE_XPBPROXY=$enableval
-else
-  STANDALONE_XPBPROXY=no
 fi
+ac_fn_c_check_func "$LINENO" "epoll_create1" "ac_cv_func_epoll_create1"
+if test "x$ac_cv_func_epoll_create1" = xyes
+then :
+  printf "%s\n" "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
 
-# Check whether --enable-xwin was given.
-if test "${enable_xwin+set}" = set; then :
-  enableval=$enable_xwin; XWIN=$enableval
-else
-  XWIN=auto
 fi
+ac_fn_c_check_func "$LINENO" "mkostemp" "ac_cv_func_mkostemp"
+if test "x$ac_cv_func_mkostemp" = xyes
+then :
+  printf "%s\n" "#define HAVE_MKOSTEMP 1" >>confdefs.h
 
-# Check whether --enable-glamor was given.
-if test "${enable_glamor+set}" = set; then :
-  enableval=$enable_glamor; GLAMOR=$enableval
-else
-  GLAMOR=auto
 fi
+ac_fn_c_check_func "$LINENO" "memfd_create" "ac_cv_func_memfd_create"
+if test "x$ac_cv_func_memfd_create" = xyes
+then :
+  printf "%s\n" "#define HAVE_MEMFD_CREATE 1" >>confdefs.h
 
-# Check whether --enable-kdrive was given.
-if test "${enable_kdrive+set}" = set; then :
-  enableval=$enable_kdrive; KDRIVE=$enableval
-else
-  KDRIVE=no
 fi
+ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
+if test "x$ac_cv_func_sigprocmask" = xyes
+then :
+  printf "%s\n" "#define HAVE_SIGPROCMASK 1" >>confdefs.h
 
-# Check whether --enable-xephyr was given.
-if test "${enable_xephyr+set}" = set; then :
-  enableval=$enable_xephyr; XEPHYR=$enableval
-else
-  XEPHYR=auto
 fi
+ac_fn_c_check_func "$LINENO" "isastream" "ac_cv_func_isastream"
+if test "x$ac_cv_func_isastream" = xyes
+then :
+  printf "%s\n" "#define HAVE_ISASTREAM 1" >>confdefs.h
 
-# Check whether --enable-libunwind was given.
-if test "${enable_libunwind+set}" = set; then :
-  enableval=$enable_libunwind; LIBUNWIND="$enableval"
-else
-  LIBUNWIND="auto"
 fi
 
-# Check whether --enable-xshmfence was given.
-if test "${enable_xshmfence+set}" = set; then :
-  enableval=$enable_xshmfence; XSHMFENCE="$enableval"
-else
-  XSHMFENCE="auto"
-fi
 
+ac_fn_c_check_func "$LINENO" "reallocarray" "ac_cv_func_reallocarray"
+if test "x$ac_cv_func_reallocarray" = xyes
+then :
+  printf "%s\n" "#define HAVE_REALLOCARRAY 1" >>confdefs.h
 
+else $as_nop
+  case " $LIBOBJS " in
+  *" reallocarray.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS reallocarray.$ac_objext"
+ ;;
+esac
 
-# Check whether --enable-install-setuid was given.
-if test "${enable_install_setuid+set}" = set; then :
-  enableval=$enable_install_setuid; SETUID=$enableval
-else
-  SETUID=auto
 fi
+ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
+if test "x$ac_cv_func_strcasecmp" = xyes
+then :
+  printf "%s\n" "#define HAVE_STRCASECMP 1" >>confdefs.h
+
+else $as_nop
+  case " $LIBOBJS " in
+  *" strcasecmp.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS strcasecmp.$ac_objext"
+ ;;
+esac
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if we can install the Xorg server as root" >&5
-$as_echo_n "checking to see if we can install the Xorg server as root... " >&6; }
-if test "x$SETUID" = "xauto" ; then
-	case $host_os in
-	    cygwin*)		SETUID="no"  ;;
-	    mingw*)		SETUID="no"  ;;
-	    darwin*)		SETUID="no"  ;;
-	    *)
-	   	case $host_cpu in
-		    sparc)	SETUID="no"  ;;
-		    *)		SETUID="yes" ;;
-		esac
-	esac
-	if test "x$SETUID" = xyes; then
-		touch testfile
-		chown root testfile > /dev/null 2>&1 || SETUID="no"
-		rm -f testfile
-	fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETUID" >&5
-$as_echo "$SETUID" >&6; }
- if test "x$SETUID" = "xyes"; then
-  INSTALL_SETUID_TRUE=
-  INSTALL_SETUID_FALSE='#'
-else
-  INSTALL_SETUID_TRUE='#'
-  INSTALL_SETUID_FALSE=
 fi
+ac_fn_c_check_func "$LINENO" "strcasestr" "ac_cv_func_strcasestr"
+if test "x$ac_cv_func_strcasestr" = xyes
+then :
+  printf "%s\n" "#define HAVE_STRCASESTR 1" >>confdefs.h
+
+else $as_nop
+  case " $LIBOBJS " in
+  *" strcasestr.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS strcasestr.$ac_objext"
+ ;;
+esac
 
+fi
+ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
+if test "x$ac_cv_func_strlcat" = xyes
+then :
+  printf "%s\n" "#define HAVE_STRLCAT 1" >>confdefs.h
 
+else $as_nop
+  case " $LIBOBJS " in
+  *" strlcat.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
+ ;;
+esac
 
+fi
+ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
+if test "x$ac_cv_func_strlcpy" = xyes
+then :
+  printf "%s\n" "#define HAVE_STRLCPY 1" >>confdefs.h
 
-# Transport selection macro from xtrans.m4
+else $as_nop
+  case " $LIBOBJS " in
+  *" strlcpy.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
+ ;;
+esac
 
+fi
+ac_fn_c_check_func "$LINENO" "strndup" "ac_cv_func_strndup"
+if test "x$ac_cv_func_strndup" = xyes
+then :
+  printf "%s\n" "#define HAVE_STRNDUP 1" >>confdefs.h
+
+else $as_nop
+  case " $LIBOBJS " in
+  *" strndup.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS strndup.$ac_objext"
+ ;;
+esac
 
- case $host_os in
-	mingw*)	unixdef="no"   ;;
-	*)	unixdef="yes"  ;;
- esac
- # Check whether --enable-unix-transport was given.
-if test "${enable_unix_transport+set}" = set; then :
-  enableval=$enable_unix_transport; UNIXCONN=$enableval
-else
-  UNIXCONN=$unixdef
 fi
+ac_fn_c_check_func "$LINENO" "timingsafe_memcmp" "ac_cv_func_timingsafe_memcmp"
+if test "x$ac_cv_func_timingsafe_memcmp" = xyes
+then :
+  printf "%s\n" "#define HAVE_TIMINGSAFE_MEMCMP 1" >>confdefs.h
 
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Xtrans should support UNIX socket connections" >&5
-$as_echo_n "checking if Xtrans should support UNIX socket connections... " >&6; }
- if test "$UNIXCONN" = "yes"; then
+else $as_nop
+  case " $LIBOBJS " in
+  *" timingsafe_memcmp.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS timingsafe_memcmp.$ac_objext"
+ ;;
+esac
 
-$as_echo "#define UNIXCONN 1" >>confdefs.h
+fi
 
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIXCONN" >&5
-$as_echo "$UNIXCONN" >&6; }
- # Check whether --enable-tcp-transport was given.
-if test "${enable_tcp_transport+set}" = set; then :
-  enableval=$enable_tcp_transport; TCPCONN=$enableval
+ if test "x$ac_cv_func_poll" = "xyes"; then
+  POLL_TRUE=
+  POLL_FALSE='#'
 else
-  TCPCONN=yes
+  POLL_TRUE='#'
+  POLL_FALSE=
 fi
 
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Xtrans should support TCP socket connections" >&5
-$as_echo_n "checking if Xtrans should support TCP socket connections... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCPCONN" >&5
-$as_echo "$TCPCONN" >&6; }
- if test "$TCPCONN" = "yes"; then
-
-$as_echo "#define TCPCONN 1" >>confdefs.h
 
-
- # SVR4 hides these in libraries other than libc
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
-$as_echo_n "checking for library containing socket... " >&6; }
-if ${ac_cv_search_socket+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_func_search_save_LIBS=$LIBS
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for arc4random_buf in -lbsd" >&5
+printf %s "checking for arc4random_buf in -lbsd... " >&6; }
+if test ${ac_cv_lib_bsd_arc4random_buf+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lbsd  $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 /* Override any GCC internal prototype to avoid an error.
    Use char because int might match the return type of a GCC
    builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char socket ();
+char arc4random_buf ();
 int
-main ()
+main (void)
 {
-return socket ();
+return arc4random_buf ();
   ;
   return 0;
 }
 _ACEOF
-for ac_lib in '' socket; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_search_socket=$ac_res
+if ac_fn_c_try_link "$LINENO"
+then :
+  ac_cv_lib_bsd_arc4random_buf=yes
+else $as_nop
+  ac_cv_lib_bsd_arc4random_buf=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext
-  if ${ac_cv_search_socket+:} false; then :
-  break
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 fi
-done
-if ${ac_cv_search_socket+:} false; then :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_arc4random_buf" >&5
+printf "%s\n" "$ac_cv_lib_bsd_arc4random_buf" >&6; }
+if test "x$ac_cv_lib_bsd_arc4random_buf" = xyes
+then :
+  printf "%s\n" "#define HAVE_LIBBSD 1" >>confdefs.h
+
+  LIBS="-lbsd $LIBS"
 
-else
-  ac_cv_search_socket=no
 fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
+
+ac_fn_c_check_func "$LINENO" "arc4random_buf" "ac_cv_func_arc4random_buf"
+if test "x$ac_cv_func_arc4random_buf" = xyes
+then :
+  printf "%s\n" "#define HAVE_ARC4RANDOM_BUF 1" >>confdefs.h
+
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
-$as_echo "$ac_cv_search_socket" >&6; }
-ac_res=$ac_cv_search_socket
-if test "$ac_res" != no; then :
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
 
+
+ac_fn_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes
+then :
+  ac_have_decl=1
+else $as_nop
+  ac_have_decl=0
 fi
+printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl" >>confdefs.h
 
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
-$as_echo_n "checking for library containing gethostbyname... " >&6; }
-if ${ac_cv_search_gethostbyname+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SO_PEERCRED in sys/socket.h" >&5
+printf %s "checking for SO_PEERCRED in sys/socket.h... " >&6; }
+if test ${xorg_cv_sys_have_so_peercred+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
+#include <sys/types.h>
+#include <sys/socket.h>
+#ifdef SO_PEERCRED
+yes_have_so_peercred
 #endif
-char gethostbyname ();
-int
-main ()
-{
-return gethostbyname ();
-  ;
-  return 0;
-}
+
 _ACEOF
-for ac_lib in '' nsl; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_search_gethostbyname=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext
-  if ${ac_cv_search_gethostbyname+:} false; then :
-  break
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "yes_have_so_peercred" >/dev/null 2>&1
+then :
+  xorg_cv_sys_have_so_peercred=yes
+else $as_nop
+  xorg_cv_sys_have_so_peercred=no
 fi
-done
-if ${ac_cv_search_gethostbyname+:} false; then :
+rm -rf conftest*
 
-else
-  ac_cv_search_gethostbyname=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
-$as_echo "$ac_cv_search_gethostbyname" >&6; }
-ac_res=$ac_cv_search_gethostbyname
-if test "$ac_res" != no; then :
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_sys_have_so_peercred" >&5
+printf "%s\n" "$xorg_cv_sys_have_so_peercred" >&6; }
+
+if test "x$ac_cv_func_getpeereid" = xno && test "x$ac_cv_func_getpeerucred" = xno && test "x$xorg_cv_sys_have_so_peercred" = xno ; then
+
+printf "%s\n" "#define NO_LOCAL_CLIENT_CRED 1" >>confdefs.h
 
 fi
 
- if test "$ac_cv_search_socket$ac_cv_search_gethostbyname" = "nono"; then
-   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lws2_32" >&5
-$as_echo_n "checking for main in -lws2_32... " >&6; }
-if ${ac_cv_lib_ws2_32_main+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5
+printf %s "checking for sqrt in -lm... " >&6; }
+if test ${ac_cv_lib_m_sqrt+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lws2_32  $LIBS"
+LIBS="-lm  $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+char sqrt ();
 int
-main ()
+main (void)
 {
-return main ();
+return sqrt ();
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_ws2_32_main=yes
-else
-  ac_cv_lib_ws2_32_main=no
+if ac_fn_c_try_link "$LINENO"
+then :
+  ac_cv_lib_m_sqrt=yes
+else $as_nop
+  ac_cv_lib_m_sqrt=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ws2_32_main" >&5
-$as_echo "$ac_cv_lib_ws2_32_main" >&6; }
-if test "x$ac_cv_lib_ws2_32_main" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBWS2_32 1
-_ACEOF
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5
+printf "%s\n" "$ac_cv_lib_m_sqrt" >&6; }
+if test "x$ac_cv_lib_m_sqrt" = xyes
+then :
+  printf "%s\n" "#define HAVE_LIBM 1" >>confdefs.h
 
-  LIBS="-lws2_32 $LIBS"
+  LIBS="-lm $LIBS"
 
 fi
 
- fi
-
- # Needs to come after above checks for libsocket & libnsl for SVR4 systems
- # Check whether --enable-ipv6 was given.
-if test "${enable_ipv6+set}" = set; then :
-  enableval=$enable_ipv6; IPV6CONN=$enableval
-else
-  ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
-if test "x$ac_cv_func_getaddrinfo" = xyes; then :
-  IPV6CONN=yes
-else
-  IPV6CONN=no
-fi
+ac_fn_c_check_func "$LINENO" "cbrt" "ac_cv_func_cbrt"
+if test "x$ac_cv_func_cbrt" = xyes
+then :
+  printf "%s\n" "#define HAVE_CBRT 1" >>confdefs.h
 
 fi
 
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if IPv6 support should be built" >&5
-$as_echo_n "checking if IPv6 support should be built... " >&6; }
- if test "$IPV6CONN" = "yes"; then
-
-$as_echo "#define IPv6 1" >>confdefs.h
-
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $IPV6CONN" >&5
-$as_echo "$IPV6CONN" >&6; }
-
- # 4.3BSD-Reno added a new member to struct sockaddr_in
- ac_fn_c_check_member "$LINENO" "struct sockaddr_in" "sin_len" "ac_cv_member_struct_sockaddr_in_sin_len" "
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-
-"
-if test "x$ac_cv_member_struct_sockaddr_in_sin_len" = xyes; then :
-
-$as_echo "#define BSD44SOCKETS 1" >>confdefs.h
 
+# Check whether --enable-agp was given.
+if test ${enable_agp+y}
+then :
+  enableval=$enable_agp; AGP=$enableval
+else $as_nop
+  AGP=auto
 fi
 
-
- # POSIX.1g changed the type of pointer passed to getsockname/getpeername/etc.
- ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
-$ac_includes_default
-#include <sys/socket.h>
-"
-if test "x$ac_cv_type_socklen_t" = xyes; then :
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_SOCKLEN_T 1
+if test "x$AGP" = "xauto" ; then
+           for ac_header in linux/agpgart.h sys/agpio.h sys/agpgart.h
+do :
+  as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"
+then :
+  cat >>confdefs.h <<_ACEOF
+#define `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
-
-
+ AGP=yes
 fi
 
-
- # XPG4v2/UNIX95 added msg_control - check to see if we need to define
- # _XOPEN_SOURCE to get it (such as on Solaris)
- ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_control" "ac_cv_member_struct_msghdr_msg_control" "
-$ac_includes_default
-#include <sys/socket.h>
-
-"
-if test "x$ac_cv_member_struct_msghdr_msg_control" = xyes; then :
-
+done
+fi
+ if test "x$AGP" = xyes; then
+  AGP_TRUE=
+  AGP_FALSE='#'
+else
+  AGP_TRUE='#'
+  AGP_FALSE=
 fi
 
- # First try for Solaris in C99 compliant mode, which requires XPG6/UNIX03
- if test "x$ac_cv_member_struct_msghdr_msg_control" = xno; then
-     unset ac_cv_member_struct_msghdr_msg_control
-     { $as_echo "$as_me:${as_lineno-$LINENO}: trying again with _XOPEN_SOURCE=600" >&5
-$as_echo "$as_me: trying again with _XOPEN_SOURCE=600" >&6;}
-     ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_control" "ac_cv_member_struct_msghdr_msg_control" "
-#define _XOPEN_SOURCE 600
-$ac_includes_default
-#include <sys/socket.h>
-
-"
-if test "x$ac_cv_member_struct_msghdr_msg_control" = xyes; then :
-
-$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
 
+       for ac_header in linux/fb.h
+do :
+  ac_fn_c_check_header_compile "$LINENO" "linux/fb.h" "ac_cv_header_linux_fb_h" "$ac_includes_default"
+if test "x$ac_cv_header_linux_fb_h" = xyes
+then :
+  printf "%s\n" "#define HAVE_LINUX_FB_H 1" >>confdefs.h
+ FBDEV=yes
+fi
 
+done
+ if test "x$FBDEV" = xyes; then
+  FBDEVHW_TRUE=
+  FBDEVHW_FALSE='#'
+else
+  FBDEVHW_TRUE='#'
+  FBDEVHW_FALSE=
 fi
 
- fi
- # If that didn't work, fall back to XPG5/UNIX98 with C89
- if test "x$ac_cv_member_struct_msghdr_msg_control" = xno; then
-     unset ac_cv_member_struct_msghdr_msg_control
-     { $as_echo "$as_me:${as_lineno-$LINENO}: trying again with _XOPEN_SOURCE=500" >&5
-$as_echo "$as_me: trying again with _XOPEN_SOURCE=500" >&6;}
-     ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_control" "ac_cv_member_struct_msghdr_msg_control" "
-#define _XOPEN_SOURCE 500
-$ac_includes_default
-#include <sys/socket.h>
 
+       for ac_header in sys/linker.h
+do :
+  ac_fn_c_check_header_compile "$LINENO" "sys/linker.h" "ac_cv_header_sys_linker_h" "#include <sys/param.h>
 "
-if test "x$ac_cv_member_struct_msghdr_msg_control" = xyes; then :
-
-$as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
-
-
+if test "x$ac_cv_header_sys_linker_h" = xyes
+then :
+  printf "%s\n" "#define HAVE_SYS_LINKER_H 1" >>confdefs.h
+ ac_cv_sys_linker_h=yes
+else $as_nop
+  ac_cv_sys_linker_h=no
 fi
 
- fi
-
-
-
- fi
- case $host_os in
-	solaris*|sco*|sysv4*)	localdef="yes" ;;
-	*)			localdef="no"  ;;
- esac
- # Check whether --enable-local-transport was given.
-if test "${enable_local_transport+set}" = set; then :
-  enableval=$enable_local_transport; LOCALCONN=$enableval
+done
+ if test "x$ac_cv_sys_linker_h" = xyes; then
+  FREEBSD_KLDLOAD_TRUE=
+  FREEBSD_KLDLOAD_FALSE='#'
 else
-  LOCALCONN=$localdef
+  FREEBSD_KLDLOAD_TRUE='#'
+  FREEBSD_KLDLOAD_FALSE=
 fi
 
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Xtrans should support os-specific local connections" >&5
-$as_echo_n "checking if Xtrans should support os-specific local connections... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LOCALCONN" >&5
-$as_echo "$LOCALCONN" >&6; }
- if test "$LOCALCONN" = "yes"; then
 
-$as_echo "#define LOCALCONN 1" >>confdefs.h
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SYSV IPC" >&5
+printf %s "checking for SYSV IPC... " >&6; }
+if test ${ac_cv_sysv_ipc+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <sys/types.h>
+#include <sys/ipc.h>
+#include <sys/shm.h>
+#include <sys/stat.h>
 
- fi
+int
+main (void)
+{
 
- # Other functions Xtrans may need
- for ac_func in strcasecmp strlcpy
-do :
-  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+{
+    int id;
+    id = shmget(IPC_PRIVATE, 512, S_IRUSR | S_IWUSR);
+    if (id < 0) return -1;
+    return shmctl(id, IPC_RMID, 0);
+}
+  ;
+  return 0;
+}
 _ACEOF
-
+if ac_fn_c_try_link "$LINENO"
+then :
+  ac_cv_sysv_ipc=yes
+else $as_nop
+  ac_cv_sysv_ipc=no
 fi
-done
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sysv_ipc" >&5
+printf "%s\n" "$ac_cv_sysv_ipc" >&6; }
+if test "x$ac_cv_sysv_ipc" = xyes; then
 
+printf "%s\n" "#define HAVE_SYSV_IPC 1" >>confdefs.h
 
+fi
 
+if test -c /dev/xf86 ; then
 
-# Secure RPC detection macro from xtrans.m4
+printf "%s\n" "#define HAS_APERTURE_DRV 1" >>confdefs.h
 
- # Check whether --enable-secure-rpc was given.
-if test "${enable_secure_rpc+set}" = set; then :
-  enableval=$enable_secure_rpc; SECURE_RPC=$enableval
-else
-  SECURE_RPC="try"
 fi
 
+ac_fn_c_check_header_compile "$LINENO" "execinfo.h" "ac_cv_header_execinfo_h" "$ac_includes_default"
+if test "x$ac_cv_header_execinfo_h" = xyes
+then :
 
- if test "x$SECURE_RPC" = "xyes" -o "x$SECURE_RPC" = "xtry" ; then
-	FOUND_SECURE_RPC="no"
-	for ac_func in authdes_seccreate authdes_create
-do :
-  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
- FOUND_SECURE_RPC="yes"
-fi
-done
-
-	if test "x$FOUND_SECURE_RPC" = "xno" ; then
-		if test "x$SECURE_RPC" = "xyes" ; then
-	as_fn_error $? "Secure RPC requested, but required functions not found" "$LINENO" 5
-		fi
-		SECURE_RPC="no"
-	else
-				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getsecretkey" >&5
-$as_echo_n "checking for library containing getsecretkey... " >&6; }
-if ${ac_cv_search_getsecretkey+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_func_search_save_LIBS=$LIBS
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for backtrace in -lc" >&5
+printf %s "checking for backtrace in -lc... " >&6; }
+if test ${ac_cv_lib_c_backtrace+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lc  $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 /* Override any GCC internal prototype to avoid an error.
    Use char because int might match the return type of a GCC
    builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char getsecretkey ();
+char backtrace ();
 int
-main ()
+main (void)
 {
-return getsecretkey ();
+return backtrace ();
   ;
   return 0;
 }
 _ACEOF
-for ac_lib in '' rpcsvc; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_search_getsecretkey=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext
-  if ${ac_cv_search_getsecretkey+:} false; then :
-  break
-fi
-done
-if ${ac_cv_search_getsecretkey+:} false; then :
-
-else
-  ac_cv_search_getsecretkey=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
+if ac_fn_c_try_link "$LINENO"
+then :
+  ac_cv_lib_c_backtrace=yes
+else $as_nop
+  ac_cv_lib_c_backtrace=no
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getsecretkey" >&5
-$as_echo "$ac_cv_search_getsecretkey" >&6; }
-ac_res=$ac_cv_search_getsecretkey
-if test "$ac_res" != no; then :
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_backtrace" >&5
+printf "%s\n" "$ac_cv_lib_c_backtrace" >&6; }
+if test "x$ac_cv_lib_c_backtrace" = xyes
+then :
 
-		SECURE_RPC="yes"
-	fi
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Secure RPC authentication (\"SUN-DES-1\") should be supported" >&5
-$as_echo_n "checking if Secure RPC authentication (\"SUN-DES-1\") should be supported... " >&6; }
- if test "x$SECURE_RPC" = "xyes" ; then
-
-$as_echo "#define SECURE_RPC 1" >>confdefs.h
-
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SECURE_RPC" >&5
-$as_echo "$SECURE_RPC" >&6; }
 
- if test "x$SECURE_RPC" = xyes; then
-  SECURE_RPC_TRUE=
-  SECURE_RPC_FALSE='#'
-else
-  SECURE_RPC_TRUE='#'
-  SECURE_RPC_FALSE=
-fi
+printf "%s\n" "#define HAVE_BACKTRACE 1" >>confdefs.h
 
 
- if test "x$INT10" = xvm86; then
-  INT10_VM86_TRUE=
-  INT10_VM86_FALSE='#'
-else
-  INT10_VM86_TRUE='#'
-  INT10_VM86_FALSE=
-fi
+printf "%s\n" "#define HAVE_EXECINFO_H 1" >>confdefs.h
 
- if test "x$INT10" = xx86emu; then
-  INT10_X86EMU_TRUE=
-  INT10_X86EMU_FALSE='#'
-else
-  INT10_X86EMU_TRUE='#'
-  INT10_X86EMU_FALSE=
-fi
 
- if test "x$INT10" = xstub; then
-  INT10_STUB_TRUE=
-  INT10_STUB_FALSE='#'
-else
-  INT10_STUB_TRUE='#'
-  INT10_STUB_FALSE=
 fi
 
 
-case $host_os in
-	cygwin* | mingw*)
-		CONFIG_HAL=no
-		CONFIG_UDEV=no
-		CONFIG_UDEV_KMS=no
-		DGA=no
-		DRM=no
-		DRI2=no
-		DRI3=no
-		INT10MODULE=no
-		PCI=no
-		VGAHW=no
-		VBE=no
-		XF86UTILS=no
-		XF86VIDMODE=no
-		XSELINUX=no
-		SYMBOL_VISIBILITY=no
-		;;
-	darwin*)
-		PCI=no
-		INT10MODULE=no
-		VGAHW=no
-		VBE=no
-		DRM=no
-		DRI2=no
-		DRI3=no
-
-		if test x$XQUARTZ = xauto; then
-			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Xquartz" >&5
-$as_echo_n "checking whether to build Xquartz... " >&6; }
-if ${xorg_cv_Carbon_framework+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-		 		save_LDFLAGS=$LDFLAGS
-				LDFLAGS="$LDFLAGS -framework Carbon"
-				cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-char FSFindFolder(); int main() { FSFindFolder(); return 0;}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  xorg_cv_Carbon_framework=yes
-else
-  xorg_cv_Carbon_framework=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-			        LDFLAGS=$save_LDFLAGS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_Carbon_framework" >&5
-$as_echo "$xorg_cv_Carbon_framework" >&6; }
 
-			if test "X$xorg_cv_Carbon_framework" = Xyes; then
-				XQUARTZ=yes
-			else
-				XQUARTZ=no
-			fi
-		fi
 
-		if test "x$XQUARTZ" = xyes ; then
-			XQUARTZ=yes
-			XVFB=no
-			XNEST=no
-			XWAYLAND=no
+DEFAULT_INT10="x86emu"
 
-			COMPOSITE=no
-			DGA=no
-			DPMSExtension=no
-			XF86VIDMODE=no
-		fi
-		;;
-	gnu*)
-		DRM=no
-		DRI2=no
-		DRI3=no
-		;;
-	*) XQUARTZ=no ;;
-esac
 
-XEXT_INC='-I$(top_srcdir)/Xext'
-XEXT_LIB='$(top_builddir)/Xext/libXext.la'
+case $host_cpu in
+  alpha*)
+	ALPHA_VIDEO=yes
+	case $host_os in
+	        *freebsd*)	SYS_LIBS=-lio ;;
+		*netbsd*)
+printf "%s\n" "#define USE_ALPHA_PIO 1" >>confdefs.h
+ ;;
+	esac
+	GLX_ARCH_DEFINES="-D__GLX_ALIGN64 -mieee"
+	;;
+  arm*)
+	ARM_VIDEO=yes
+	DEFAULT_INT10="stub"
+	;;
+  i*86)
+	I386_VIDEO=yes
+	case $host_os in
+		*freebsd*)	printf "%s\n" "#define USE_DEV_IO 1" >>confdefs.h
+ ;;
+		*dragonfly*)	printf "%s\n" "#define USE_DEV_IO 1" >>confdefs.h
+ ;;
+		*netbsd*)	printf "%s\n" "#define USE_I386_IOPL 1" >>confdefs.h
 
-VIDEOPROTO="videoproto"
-COMPOSITEPROTO="compositeproto >= 0.4"
-RECORDPROTO="recordproto >= 1.13.99.1"
-SCRNSAVERPROTO="scrnsaverproto >= 1.1"
-RESOURCEPROTO="resourceproto >= 1.2.0"
-DRIPROTO="xf86driproto >= 2.1.0"
-DRI2PROTO="dri2proto >= 2.8"
-DRI3PROTO="dri3proto >= 1.2"
-XINERAMAPROTO="xineramaproto"
-BIGFONTPROTO="xf86bigfontproto >= 1.2.0"
-DGAPROTO="xf86dgaproto >= 2.0.99.1"
-GLPROTO="glproto >= 1.4.17"
-DMXPROTO="dmxproto >= 2.2.99.1"
-VIDMODEPROTO="xf86vidmodeproto >= 2.2.99.1"
-WINDOWSWMPROTO="windowswmproto"
-APPLEWMPROTO="applewmproto >= 1.4"
-LIBXSHMFENCE="xshmfence >= 1.1"
+				SYS_LIBS=-li386
+				;;
+		*openbsd*)	printf "%s\n" "#define USE_I386_IOPL 1" >>confdefs.h
 
-XPROTO="xproto >= 7.0.31"
-RANDRPROTO="randrproto >= 1.6.0"
-RENDERPROTO="renderproto >= 0.11"
-XEXTPROTO="xextproto >= 7.2.99.901"
-INPUTPROTO="inputproto >= 2.3"
-KBPROTO="kbproto >= 1.0.3"
-FONTSPROTO="fontsproto >= 2.1.3"
-FIXESPROTO="fixesproto >= 5.0"
-DAMAGEPROTO="damageproto >= 1.1"
-XCMISCPROTO="xcmiscproto >= 1.2.0"
-BIGREQSPROTO="bigreqsproto >= 1.1.0"
-XTRANS="xtrans >= 1.3.5"
-PRESENTPROTO="presentproto >= 1.1"
+				SYS_LIBS=-li386
+				;;
+	esac
+        ;;
+  powerpc*)
+	PPC_VIDEO=yes
+	case $host_os in
+		*freebsd*)	DEFAULT_INT10=stub ;;
+	esac
+	;;
+  sparc*)
+	SPARC64_VIDEO=yes
+	BSD_ARCH_SOURCES="sparc64_video.c ioperm_noop.c"
+	GLX_ARCH_DEFINES="-D__GLX_ALIGN64"
+	;;
+  x86_64*|amd64*)
+	I386_VIDEO=yes
+	case $host_os in
+		*freebsd*)
+printf "%s\n" "#define USE_DEV_IO 1" >>confdefs.h
+ ;;
+		*dragonfly*)
+printf "%s\n" "#define USE_DEV_IO 1" >>confdefs.h
+ ;;
+		*netbsd*)
+printf "%s\n" "#define USE_I386_IOPL 1" >>confdefs.h
 
-LIBAPPLEWM="applewm >= 1.4"
-LIBDMX="dmx >= 1.0.99.1"
-LIBDRI="dri >= 7.8.0"
-LIBDRM="libdrm >= 2.4.89"
-LIBEGL="egl"
-LIBGBM="gbm >= 10.2.0"
-LIBGL="gl >= 1.2"
-LIBXEXT="xext >= 1.0.99.4"
-LIBXFONT="xfont2 >= 2.0.0"
-LIBXI="xi >= 1.2.99.1"
-LIBXTST="xtst >= 1.0.99.2"
-LIBPCIACCESS="pciaccess >= 0.12.901"
-LIBUDEV="libudev >= 143"
-LIBSELINUX="libselinux >= 2.0.86"
-LIBDBUS="dbus-1 >= 1.0"
-LIBPIXMAN="pixman-1 >= 0.27.2"
+				SYS_LIBS=-lx86_64
+				;;
+		*openbsd*)
+printf "%s\n" "#define USE_AMD64_IOPL 1" >>confdefs.h
 
+				SYS_LIBS=-lamd64
+				;;
+	esac
+	GLX_ARCH_DEFINES="-D__GLX_ALIGN64"
+	;;
+  ia64*)
+  	GLX_ARCH_DEFINES="-D__GLX_ALIGN64"
+	;;
+  s390*)
+  	GLX_ARCH_DEFINES="-D__GLX_ALIGN64"
+	;;
+esac
 
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PIXMAN" >&5
-$as_echo_n "checking for PIXMAN... " >&6; }
 
-if test -n "$PIXMAN_CFLAGS"; then
-    pkg_cv_PIXMAN_CFLAGS="$PIXMAN_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBPIXMAN\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$LIBPIXMAN") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_PIXMAN_CFLAGS=`$PKG_CONFIG --cflags "$LIBPIXMAN" 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
+ if test "x$ALPHA_VIDEO" = xyes; then
+  ALPHA_VIDEO_TRUE=
+  ALPHA_VIDEO_FALSE='#'
 else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
+  ALPHA_VIDEO_TRUE='#'
+  ALPHA_VIDEO_FALSE=
 fi
-if test -n "$PIXMAN_LIBS"; then
-    pkg_cv_PIXMAN_LIBS="$PIXMAN_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBPIXMAN\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$LIBPIXMAN") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_PIXMAN_LIBS=`$PKG_CONFIG --libs "$LIBPIXMAN" 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
+
+ if test "x$ARM_VIDEO" = xyes; then
+  ARM_VIDEO_TRUE=
+  ARM_VIDEO_FALSE='#'
 else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
+  ARM_VIDEO_TRUE='#'
+  ARM_VIDEO_FALSE=
 fi
 
-
-
-if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
+ if test "x$I386_VIDEO" = xyes; then
+  I386_VIDEO_TRUE=
+  I386_VIDEO_FALSE='#'
 else
-        _pkg_short_errors_supported=no
+  I386_VIDEO_TRUE='#'
+  I386_VIDEO_FALSE=
 fi
-        if test $_pkg_short_errors_supported = yes; then
-	        PIXMAN_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$LIBPIXMAN" 2>&1`
-        else
-	        PIXMAN_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$LIBPIXMAN" 2>&1`
-        fi
-	# Put the nasty error message in config.log where it belongs
-	echo "$PIXMAN_PKG_ERRORS" >&5
-
-	as_fn_error $? "Package requirements ($LIBPIXMAN) were not met:
-
-$PIXMAN_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-Alternatively, you may set the environment variables PIXMAN_CFLAGS
-and PIXMAN_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details." "$LINENO" 5
-elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-Alternatively, you may set the environment variables PIXMAN_CFLAGS
-and PIXMAN_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
 
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details" "$LINENO" 5; }
+ if test "x$PPC_VIDEO" = xyes; then
+  PPC_VIDEO_TRUE=
+  PPC_VIDEO_FALSE='#'
 else
-	PIXMAN_CFLAGS=$pkg_cv_PIXMAN_CFLAGS
-	PIXMAN_LIBS=$pkg_cv_PIXMAN_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
+  PPC_VIDEO_TRUE='#'
+  PPC_VIDEO_FALSE=
 fi
-REQUIRED_LIBS="$REQUIRED_LIBS $LIBPIXMAN $LIBXFONT xau"
-
-SDK_REQUIRED_MODULES="$XPROTO $RANDRPROTO $RENDERPROTO $XEXTPROTO $INPUTPROTO $KBPROTO $FONTSPROTO $LIBPIXMAN"
-# Make SDK_REQUIRED_MODULES available for inclusion in xorg-server.pc
 
-
-ac_fn_c_check_decl "$LINENO" "PTHREAD_MUTEX_RECURSIVE" "ac_cv_have_decl_PTHREAD_MUTEX_RECURSIVE" "#include <pthread.h>
-"
-if test "x$ac_cv_have_decl_PTHREAD_MUTEX_RECURSIVE" = xyes; then :
-  HAVE_RECURSIVE_MUTEX=yes
+ if test "x$SPARC64_VIDEO" = xyes; then
+  SPARC64_VIDEO_TRUE=
+  SPARC64_VIDEO_FALSE='#'
 else
-  HAVE_RECURSIVE_MUTEX=no
+  SPARC64_VIDEO_TRUE='#'
+  SPARC64_VIDEO_FALSE=
 fi
 
 
-THREAD_DEFAULT=no
+DRI=no
+case $host_os in
+  *freebsd* | *dragonfly*)
+	case $host_os in
+		kfreebsd*-gnu) ;;
+		*)
+printf "%s\n" "#define CSRG_BASED 1" >>confdefs.h
+ ;;
+	esac
 
-if test "x$HAVE_RECURSIVE_MUTEX" = "xyes" ; then
-	THREAD_DEFAULT=yes
-fi
+printf "%s\n" "#define PCCONS_SUPPORT 1" >>confdefs.h
 
-# Check whether --enable-input-thread was given.
-if test "${enable_input_thread+set}" = set; then :
-  enableval=$enable_input_thread; INPUTTHREAD=$enableval
-else
-  INPUTTHREAD=$THREAD_DEFAULT
-fi
 
+printf "%s\n" "#define PCVT_SUPPORT 1" >>confdefs.h
 
-if test "x$INPUTTHREAD" = "xyes" ; then
 
+printf "%s\n" "#define SYSCONS_SUPPORT 1" >>confdefs.h
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+	DRI=yes
+	;;
+  *netbsd*)
 
-ax_pthread_ok=no
+printf "%s\n" "#define CSRG_BASED 1" >>confdefs.h
 
-# We used to check for pthread.h first, but this fails if pthread.h
-# requires special compiler flags (e.g. on True64 or Sequent).
-# It gets checked for in the link test anyway.
 
-# First of all, check if the user has set any of the PTHREAD_LIBS,
-# etcetera environment variables, and if threads linking works using
-# them:
-if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
-        save_CFLAGS="$CFLAGS"
-        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-        save_LIBS="$LIBS"
-        LIBS="$PTHREAD_LIBS $LIBS"
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
-$as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+printf "%s\n" "#define PCCONS_SUPPORT 1" >>confdefs.h
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char pthread_join ();
-int
-main ()
-{
-return pthread_join ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ax_pthread_ok=yes
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
-$as_echo "$ax_pthread_ok" >&6; }
-        if test x"$ax_pthread_ok" = xno; then
-                PTHREAD_LIBS=""
-                PTHREAD_CFLAGS=""
-        fi
-        LIBS="$save_LIBS"
-        CFLAGS="$save_CFLAGS"
-fi
 
-# We must check for the threads library under a number of different
-# names; the ordering is very important because some systems
-# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
-# libraries is broken (non-POSIX).
+printf "%s\n" "#define PCVT_SUPPORT 1" >>confdefs.h
 
-# Create a list of thread flags to try.  Items starting with a "-" are
-# C compiler flags, and other items are library names, except for "none"
-# which indicates that we try without any flags at all, and "pthread-config"
-# which is a program returning the flags for the Pth emulation library.
 
-ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
+printf "%s\n" "#define WSCONS_SUPPORT 1" >>confdefs.h
 
-# The ordering *is* (sometimes) important.  Some notes on the
-# individual items follow:
+	DRI=yes
+	;;
+  *openbsd*)
 
-# pthreads: AIX (must check this before -lpthread)
-# none: in case threads are in libc; should be tried before -Kthread and
-#       other compiler flags to prevent continual compiler warnings
-# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
-# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
-# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
-# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
-# -pthreads: Solaris/gcc
-# -mthreads: Mingw32/gcc, Lynx/gcc
-# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
-#      doesn't hurt to check since this sometimes defines pthreads too;
-#      also defines -D_REENTRANT)
-#      ... -mt is also the pthreads flag for HP/aCC
-# pthread: Linux, etcetera
-# --thread-safe: KAI C++
-# pthread-config: use pthread-config program (for GNU Pth library)
+printf "%s\n" "#define CSRG_BASED 1" >>confdefs.h
 
-case ${host_os} in
-        solaris*)
 
-        # On Solaris (at least, for some versions), libc contains stubbed
-        # (non-functional) versions of the pthreads routines, so link-based
-        # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
-        # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
-        # a function called by this macro, so we could check for that, but
-        # who knows whether they'll stub that too in a future libc.)  So,
-        # we'll just look for -pthreads and -lpthread first:
+printf "%s\n" "#define PCVT_SUPPORT 1" >>confdefs.h
 
-        ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
-        ;;
 
-        darwin*)
-        ax_pthread_flags="-pthread $ax_pthread_flags"
-        ;;
-	netbsd*)
-	# use libc stubs, don't link against libpthread, to allow
-	# dynamic loading
-	ax_pthread_flags=""
+printf "%s\n" "#define WSCONS_SUPPORT 1" >>confdefs.h
+
 	;;
-esac
+  *linux*)
+	DRI=yes
+	;;
+  *solaris*)
+	DRI=yes
+	;;
+  darwin*)
 
-# Clang doesn't consider unrecognized options an error unless we specify
-# -Werror. We throw in some extra Clang-specific options to ensure that
-# this doesn't happen for GCC, which also accepts -Werror.
+printf "%s\n" "#define CSRG_BASED 1" >>confdefs.h
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler needs -Werror to reject unknown flags" >&5
-$as_echo_n "checking if compiler needs -Werror to reject unknown flags... " >&6; }
-save_CFLAGS="$CFLAGS"
-ax_pthread_extra_flags="-Werror"
-CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wunknown-warning-option -Wsizeof-array-argument"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-int foo(void);
-int
-main ()
-{
-foo()
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
-  ax_pthread_extra_flags=
-                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+	;;
+  cygwin*|mingw*)
+	CFLAGS="$CFLAGS -DFD_SETSIZE=512"
+	;;
+esac
+
+PVMAJOR=`echo $PACKAGE_VERSION | cut -d . -f 1`
+
+VENDOR_RELEASE="((10000000) + (($PVMAJOR) * 100000) + (($PVM) * 1000) + $PVP)"
+VENDOR_MAN_VERSION="Version ${PACKAGE_VERSION}"
+
+VENDOR_NAME="The X.Org Foundation"
+VENDOR_NAME_SHORT="X.Org"
+VENDOR_WEB="http://wiki.x.org"
+
+# Check whether --enable-werror was given.
+if test ${enable_werror+y}
+then :
+  enableval=$enable_werror; as_fn_error $? "--enable-werror has been replaced by --enable-strict-compilation" "$LINENO" 5
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-CFLAGS="$save_CFLAGS"
 
-if test x"$ax_pthread_ok" = xno; then
-for flag in $ax_pthread_flags; do
 
-        case $flag in
-                none)
-                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
-$as_echo_n "checking whether pthreads work without any flags... " >&6; }
-                ;;
+# Check whether --enable-debug was given.
+if test ${enable_debug+y}
+then :
+  enableval=$enable_debug; DEBUGGING=$enableval
+else $as_nop
+  DEBUGGING=no
+fi
 
-                -*)
-                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
-$as_echo_n "checking whether pthreads work with $flag... " >&6; }
-                PTHREAD_CFLAGS="$flag"
-                ;;
 
-                pthread-config)
-                # Extract the first word of "pthread-config", so it can be a program name with args.
-set dummy pthread-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ax_pthread_config+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ax_pthread_config"; then
-  ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ax_pthread_config="yes"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
+# Check whether --with-int10 was given.
+if test ${with_int10+y}
+then :
+  withval=$with_int10; INT10="$withval"
+else $as_nop
+  INT10="$DEFAULT_INT10"
+fi
 
-  test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
+
+# Check whether --with-vendor-name was given.
+if test ${with_vendor_name+y}
+then :
+  withval=$with_vendor_name;  VENDOR_NAME="$withval"
 fi
+
+
+# Check whether --with-vendor-name-short was given.
+if test ${with_vendor_name_short+y}
+then :
+  withval=$with_vendor_name_short;  VENDOR_NAME_SHORT="$withval"
 fi
-ax_pthread_config=$ac_cv_prog_ax_pthread_config
-if test -n "$ax_pthread_config"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
-$as_echo "$ax_pthread_config" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+
+
+# Check whether --with-vendor-web was given.
+if test ${with_vendor_web+y}
+then :
+  withval=$with_vendor_web;  VENDOR_WEB="$withval"
 fi
 
 
-                if test x"$ax_pthread_config" = xno; then continue; fi
-                PTHREAD_CFLAGS="`pthread-config --cflags`"
-                PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
-                ;;
+# Check whether --with-module-dir was given.
+if test ${with_module_dir+y}
+then :
+  withval=$with_module_dir;  moduledir="$withval"
+else $as_nop
+   moduledir="${libdir}/xorg/modules"
+fi
 
-                *)
-                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
-$as_echo_n "checking for the pthreads library -l$flag... " >&6; }
-                PTHREAD_LIBS="-l$flag"
-                ;;
-        esac
 
-        save_LIBS="$LIBS"
-        save_CFLAGS="$CFLAGS"
-        LIBS="$PTHREAD_LIBS $LIBS"
-        CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
+# Check whether --with-log-dir was given.
+if test ${with_log_dir+y}
+then :
+  withval=$with_log_dir;  logdir="$withval"
+else $as_nop
+   logdir="$localstatedir/log"
+fi
 
-        # Check for various functions.  We must include pthread.h,
-        # since some functions may be macros.  (On the Sequent, we
-        # need a special flag -Kthread to make this header compile.)
-        # We check for pthread_join because it is in -lpthread on IRIX
-        # while pthread_create is in libc.  We check for pthread_attr_init
-        # due to DEC craziness with -lpthreads.  We check for
-        # pthread_cleanup_push because it is one of the few pthread
-        # functions on Solaris that doesn't have a non-functional libc stub.
-        # We try pthread_create on general principles.
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <pthread.h>
-                        static void routine(void *a) { a = 0; }
-                        static void *start_routine(void *a) { return a; }
-int
-main ()
-{
-pthread_t th; pthread_attr_t attr;
-                        pthread_create(&th, 0, start_routine, 0);
-                        pthread_join(th, 0);
-                        pthread_attr_init(&attr);
-                        pthread_cleanup_push(routine, 0);
-                        pthread_cleanup_pop(0) /* ; */
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ax_pthread_ok=yes
+
+# Check whether --with-builder-addr was given.
+if test ${with_builder_addr+y}
+then :
+  withval=$with_builder_addr;  BUILDERADDR="$withval"
+else $as_nop
+   BUILDERADDR="xorg@lists.freedesktop.org"
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
 
-        LIBS="$save_LIBS"
-        CFLAGS="$save_CFLAGS"
 
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
-$as_echo "$ax_pthread_ok" >&6; }
-        if test "x$ax_pthread_ok" = xyes; then
-                break;
-        fi
+# Check whether --with-builderstring was given.
+if test ${with_builderstring+y}
+then :
+  withval=$with_builderstring;  BUILDERSTRING="$withval"
 
-        PTHREAD_LIBS=""
-        PTHREAD_CFLAGS=""
-done
 fi
 
-# Various other checks:
-if test "x$ax_pthread_ok" = xyes; then
-        save_LIBS="$LIBS"
-        LIBS="$PTHREAD_LIBS $LIBS"
-        save_CFLAGS="$CFLAGS"
-        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+# Check whether --enable-listen-tcp was given.
+if test ${enable_listen_tcp+y}
+then :
+  enableval=$enable_listen_tcp; LISTEN_TCP=$enableval
+else $as_nop
+  LISTEN_TCP=no
+fi
 
-        # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
-$as_echo_n "checking for joinable pthread attribute... " >&6; }
-        attr_name=unknown
-        for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
-            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <pthread.h>
-int
-main ()
-{
-int attr = $attr; return attr /* ; */
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  attr_name=$attr; break
+# Check whether --enable-listen-unix was given.
+if test ${enable_listen_unix+y}
+then :
+  enableval=$enable_listen_unix; LISTEN_UNIX=$enableval
+else $as_nop
+  LISTEN_UNIX=yes
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-        done
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5
-$as_echo "$attr_name" >&6; }
-        if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
 
-cat >>confdefs.h <<_ACEOF
-#define PTHREAD_CREATE_JOINABLE $attr_name
-_ACEOF
 
-        fi
+# Check whether --enable-listen-local was given.
+if test ${enable_listen_local+y}
+then :
+  enableval=$enable_listen_local; LISTEN_LOCAL=$enableval
+else $as_nop
+  LISTEN_LOCAL=yes
+fi
 
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
-$as_echo_n "checking if more special flags are required for pthreads... " >&6; }
-        flag=no
-        case ${host_os} in
-            aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";;
-            osf* | hpux*) flag="-D_REENTRANT";;
-            solaris*)
-            if test "$GCC" = "yes"; then
-                flag="-D_REENTRANT"
-            else
-                # TODO: What about Clang on Solaris?
-                flag="-mt -D_REENTRANT"
-            fi
-            ;;
-        esac
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag" >&5
-$as_echo "$flag" >&6; }
-        if test "x$flag" != xno; then
-            PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
-        fi
 
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
-$as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
-if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+case $host_os in
+    linux*)
+        FALLBACK_INPUT_DRIVER="libinput"
+        ;;
+    *)
+        FALLBACK_INPUT_DRIVER=""
+        ;;
+esac
 
-                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <pthread.h>
-int
-main ()
-{
-int i = PTHREAD_PRIO_INHERIT;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ax_cv_PTHREAD_PRIO_INHERIT=yes
-else
-  ax_cv_PTHREAD_PRIO_INHERIT=no
+# Check whether --with-fallback-input-driver was given.
+if test ${with_fallback_input_driver+y}
+then :
+  withval=$with_fallback_input_driver;  FALLBACK_INPUT_DRIVER=$withval
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
 
+if test "x$FALLBACK_INPUT_DRIVER" = "xno"; then
+    FALLBACK_INPUT_DRIVER=""
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
-$as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
-        if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fallback input driver" >&5
+printf %s "checking for fallback input driver... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FALLBACK_INPUT_DRIVER" >&5
+printf "%s\n" "$FALLBACK_INPUT_DRIVER" >&6; }
+
+printf "%s\n" "#define FALLBACK_INPUT_DRIVER \"$FALLBACK_INPUT_DRIVER\"" >>confdefs.h
+
+
+
 
-$as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
 
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for root directory for font files" >&5
+printf %s "checking for root directory for font files... " >&6; }
+
+# Check whether --with-fontrootdir was given.
+if test ${with_fontrootdir+y}
+then :
+  withval=$with_fontrootdir; FONTROOTDIR="$withval"
 fi
 
-        LIBS="$save_LIBS"
-        CFLAGS="$save_CFLAGS"
+	# if --with-fontrootdir not specified...
+	if test "x${FONTROOTDIR}" = "x"; then
+		FONTROOTDIR=`$PKG_CONFIG --variable=fontrootdir fontutil`
+	fi
+	# ...and if pkg-config didn't find fontdir in fontutil.pc...
+	if test "x${FONTROOTDIR}" = "x"; then
+		FONTROOTDIR="${datadir}/fonts/X11"
+	fi
 
-        # More AIX lossage: compile with *_r variant
-        if test "x$GCC" != xyes; then
-            case $host_os in
-                aix*)
-                case "x/$CC" in #(
-  x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
-    #handle absolute path differently from PATH based program lookup
-                   case "x$CC" in #(
-  x/*) :
-    if as_fn_executable_p ${CC}_r; then :
-  PTHREAD_CC="${CC}_r"
-fi ;; #(
-  *) :
-    for ac_prog in ${CC}_r
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_PTHREAD_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$PTHREAD_CC"; then
-  ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_PTHREAD_CC="$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${FONTROOTDIR}" >&5
+printf "%s\n" "${FONTROOTDIR}" >&6; }
+
+
+
+
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for directory for misc files" >&5
+printf %s "checking for directory for misc files... " >&6; }
 
-fi
-fi
-PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
-if test -n "$PTHREAD_CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
-$as_echo "$PTHREAD_CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+# Check whether --with-fontmiscdir was given.
+if test ${with_fontmiscdir+y}
+then :
+  withval=$with_fontmiscdir; FONTMISCDIR="${withval}"
+else $as_nop
+  FONTMISCDIR='${FONTROOTDIR}/misc'
 fi
 
 
-  test -n "$PTHREAD_CC" && break
-done
-test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
- ;;
-esac ;; #(
-  *) :
-     ;;
-esac
-                ;;
-            esac
-        fi
-fi
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${FONTMISCDIR}" >&5
+printf "%s\n" "${FONTMISCDIR}" >&6; }
+
 
-test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
 
 
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for directory for OTF files" >&5
+printf %s "checking for directory for OTF files... " >&6; }
 
+# Check whether --with-fontotfdir was given.
+if test ${with_fontotfdir+y}
+then :
+  withval=$with_fontotfdir; FONTOTFDIR="${withval}"
+else $as_nop
+  FONTOTFDIR='${FONTROOTDIR}/OTF'
+fi
 
 
-# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
-if test x"$ax_pthread_ok" = xyes; then
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${FONTOTFDIR}" >&5
+printf "%s\n" "${FONTOTFDIR}" >&6; }
 
-$as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
 
-        :
-else
-        ax_pthread_ok=no
-        as_fn_error $? "threaded input requested but no pthread support has been found" "$LINENO" 5
+
+
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for directory for TTF files" >&5
+printf %s "checking for directory for TTF files... " >&6; }
+
+# Check whether --with-fontttfdir was given.
+if test ${with_fontttfdir+y}
+then :
+  withval=$with_fontttfdir; FONTTTFDIR="${withval}"
+else $as_nop
+  FONTTTFDIR='${FONTROOTDIR}/TTF'
 fi
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
-    SYS_LIBS="$SYS_LIBS $PTHREAD_LIBS"
-    CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${FONTTTFDIR}" >&5
+printf "%s\n" "${FONTTTFDIR}" >&6; }
 
-$as_echo "#define INPUTTHREAD 1" >>confdefs.h
 
 
-    save_LIBS="$LIBS"
-    LIBS="$LIBS $SYS_LIBS"
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_setname_np(const char*)" >&5
-$as_echo_n "checking for pthread_setname_np(const char*)... " >&6; }
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <pthread.h>
-int
-main ()
-{
-pthread_setname_np("example")
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_PTHREAD_SETNAME_NP_WITHOUT_TID 1" >>confdefs.h
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for directory for Type1 files" >&5
+printf %s "checking for directory for Type1 files... " >&6; }
 
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+# Check whether --with-fonttype1dir was given.
+if test ${with_fonttype1dir+y}
+then :
+  withval=$with_fonttype1dir; FONTTYPE1DIR="${withval}"
+else $as_nop
+  FONTTYPE1DIR='${FONTROOTDIR}/Type1'
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_setname_np(pthread_t, const char*)" >&5
-$as_echo_n "checking for pthread_setname_np(pthread_t, const char*)... " >&6; }
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <pthread.h>
-int
-main ()
-{
-pthread_setname_np(pthread_self(), "example")
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_PTHREAD_SETNAME_NP_WITH_TID 1" >>confdefs.h
 
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-    LIBS="$save_LIBS"
-fi
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${FONTTYPE1DIR}" >&5
+printf "%s\n" "${FONTTYPE1DIR}" >&6; }
 
-REQUIRED_MODULES="$FIXESPROTO $DAMAGEPROTO $XCMISCPROTO $XTRANS $BIGREQSPROTO $SDK_REQUIRED_MODULES"
 
-LIBSYSTEMD="libsystemd >= 209"
 
-# Check whether --with-systemd-daemon was given.
-if test "${with_systemd_daemon+set}" = set; then :
-  withval=$with_systemd_daemon; WITH_SYSTEMD_DAEMON=$withval
-else
-  WITH_SYSTEMD_DAEMON=auto
+
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for directory for 75dpi files" >&5
+printf %s "checking for directory for 75dpi files... " >&6; }
+
+# Check whether --with-font75dpidir was given.
+if test ${with_font75dpidir+y}
+then :
+  withval=$with_font75dpidir; FONT75DPIDIR="${withval}"
+else $as_nop
+  FONT75DPIDIR='${FONTROOTDIR}/75dpi'
 fi
 
-if test "x$WITH_SYSTEMD_DAEMON" = "xyes" -o "x$WITH_SYSTEMD_DAEMON" = "xauto" ; then
 
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD_DAEMON" >&5
-$as_echo_n "checking for SYSTEMD_DAEMON... " >&6; }
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${FONT75DPIDIR}" >&5
+printf "%s\n" "${FONT75DPIDIR}" >&6; }
 
-if test -n "$SYSTEMD_DAEMON_CFLAGS"; then
-    pkg_cv_SYSTEMD_DAEMON_CFLAGS="$SYSTEMD_DAEMON_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBSYSTEMD\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$LIBSYSTEMD") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_SYSTEMD_DAEMON_CFLAGS=`$PKG_CONFIG --cflags "$LIBSYSTEMD" 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-if test -n "$SYSTEMD_DAEMON_LIBS"; then
-    pkg_cv_SYSTEMD_DAEMON_LIBS="$SYSTEMD_DAEMON_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBSYSTEMD\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$LIBSYSTEMD") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_SYSTEMD_DAEMON_LIBS=`$PKG_CONFIG --libs "$LIBSYSTEMD" 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
 
 
 
-if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for directory for 100dpi files" >&5
+printf %s "checking for directory for 100dpi files... " >&6; }
 
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
+# Check whether --with-font100dpidir was given.
+if test ${with_font100dpidir+y}
+then :
+  withval=$with_font100dpidir; FONT100DPIDIR="${withval}"
+else $as_nop
+  FONT100DPIDIR='${FONTROOTDIR}/100dpi'
 fi
-        if test $_pkg_short_errors_supported = yes; then
-	        SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$LIBSYSTEMD" 2>&1`
-        else
-	        SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$LIBSYSTEMD" 2>&1`
-        fi
-	# Put the nasty error message in config.log where it belongs
-	echo "$SYSTEMD_DAEMON_PKG_ERRORS" >&5
 
 
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD_DAEMON" >&5
-$as_echo_n "checking for SYSTEMD_DAEMON... " >&6; }
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${FONT100DPIDIR}" >&5
+printf "%s\n" "${FONT100DPIDIR}" >&6; }
 
-if test -n "$SYSTEMD_DAEMON_CFLAGS"; then
-    pkg_cv_SYSTEMD_DAEMON_CFLAGS="$SYSTEMD_DAEMON_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_SYSTEMD_DAEMON_CFLAGS=`$PKG_CONFIG --cflags "libsystemd-daemon" 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-if test -n "$SYSTEMD_DAEMON_LIBS"; then
-    pkg_cv_SYSTEMD_DAEMON_LIBS="$SYSTEMD_DAEMON_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_SYSTEMD_DAEMON_LIBS=`$PKG_CONFIG --libs "libsystemd-daemon" 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
+
+DEFAULT_FONT_PATH="${FONTMISCDIR}/,${FONTTTFDIR}/,${FONTOTFDIR}/,${FONTTYPE1DIR}/,${FONT100DPIDIR}/,${FONT75DPIDIR}/"
+case $host_os in
+    darwin*) DEFAULT_FONT_PATH="${DEFAULT_FONT_PATH},/Library/Fonts,/System/Library/Fonts" ;;
+esac
+
+
+# Check whether --with-default-font-path was given.
+if test ${with_default_font_path+y}
+then :
+  withval=$with_default_font_path;  FONTPATH="$withval"
+else $as_nop
+   FONTPATH="${DEFAULT_FONT_PATH}"
 fi
- else
-    pkg_failed=untried
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for default font path" >&5
+printf %s "checking for default font path... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FONTPATH" >&5
+printf "%s\n" "$FONTPATH" >&6; }
+
+
+# Check whether --with-xkb-path was given.
+if test ${with_xkb_path+y}
+then :
+  withval=$with_xkb_path;  XKBPATH="$withval"
+else $as_nop
+   XKBPATH="auto"
 fi
 
 
+# Check whether --with-xkb-output was given.
+if test ${with_xkb_output+y}
+then :
+  withval=$with_xkb_output;  XKBOUTPUT="$withval"
+else $as_nop
+   XKBOUTPUT="compiled"
+fi
 
-if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
 
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
+# Check whether --with-default-xkb-rules was given.
+if test ${with_default_xkb_rules+y}
+then :
+  withval=$with_default_xkb_rules;  XKB_DFLT_RULES="$withval"
+else $as_nop
+   XKB_DFLT_RULES=""
 fi
-        if test $_pkg_short_errors_supported = yes; then
-	        SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd-daemon" 2>&1`
-        else
-	        SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd-daemon" 2>&1`
-        fi
-	# Put the nasty error message in config.log where it belongs
-	echo "$SYSTEMD_DAEMON_PKG_ERRORS" >&5
 
-	HAVE_SYSTEMD_DAEMON=no
-elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-	HAVE_SYSTEMD_DAEMON=no
-else
-	SYSTEMD_DAEMON_CFLAGS=$pkg_cv_SYSTEMD_DAEMON_CFLAGS
-	SYSTEMD_DAEMON_LIBS=$pkg_cv_SYSTEMD_DAEMON_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-	HAVE_SYSTEMD_DAEMON=yes;
-					      LIBSYSTEMD_DAEMON=libsystemd-daemon
+
+# Check whether --with-default-xkb-model was given.
+if test ${with_default_xkb_model+y}
+then :
+  withval=$with_default_xkb_model;  XKB_DFLT_MODEL="$withval"
+else $as_nop
+   XKB_DFLT_MODEL="pc105"
 fi
-elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
 
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD_DAEMON" >&5
-$as_echo_n "checking for SYSTEMD_DAEMON... " >&6; }
 
-if test -n "$SYSTEMD_DAEMON_CFLAGS"; then
-    pkg_cv_SYSTEMD_DAEMON_CFLAGS="$SYSTEMD_DAEMON_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_SYSTEMD_DAEMON_CFLAGS=`$PKG_CONFIG --cflags "libsystemd-daemon" 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
+# Check whether --with-default-xkb-layout was given.
+if test ${with_default_xkb_layout+y}
+then :
+  withval=$with_default_xkb_layout;  XKB_DFLT_LAYOUT="$withval"
+else $as_nop
+   XKB_DFLT_LAYOUT="us"
 fi
- else
-    pkg_failed=untried
+
+
+# Check whether --with-default-xkb-variant was given.
+if test ${with_default_xkb_variant+y}
+then :
+  withval=$with_default_xkb_variant;  XKB_DFLT_VARIANT="$withval"
+else $as_nop
+   XKB_DFLT_VARIANT=""
 fi
-if test -n "$SYSTEMD_DAEMON_LIBS"; then
-    pkg_cv_SYSTEMD_DAEMON_LIBS="$SYSTEMD_DAEMON_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_SYSTEMD_DAEMON_LIBS=`$PKG_CONFIG --libs "libsystemd-daemon" 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
+
+
+# Check whether --with-default-xkb-options was given.
+if test ${with_default_xkb_options+y}
+then :
+  withval=$with_default_xkb_options;  XKB_DFLT_OPTIONS="$withval"
+else $as_nop
+   XKB_DFLT_OPTIONS=""
 fi
- else
-    pkg_failed=untried
+
+
+# Check whether --with-serverconfig-path was given.
+if test ${with_serverconfig_path+y}
+then :
+  withval=$with_serverconfig_path;  SERVERCONFIG="$withval"
+else $as_nop
+   SERVERCONFIG="${libdir}/xorg"
 fi
 
 
+# Check whether --with-apple-applications-dir was given.
+if test ${with_apple_applications_dir+y}
+then :
+  withval=$with_apple_applications_dir;  APPLE_APPLICATIONS_DIR="${withval}"
+else $as_nop
+   APPLE_APPLICATIONS_DIR="/Applications/Utilities"
+fi
 
-if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
 
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi
-        if test $_pkg_short_errors_supported = yes; then
-	        SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd-daemon" 2>&1`
-        else
-	        SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd-daemon" 2>&1`
-        fi
-	# Put the nasty error message in config.log where it belongs
-	echo "$SYSTEMD_DAEMON_PKG_ERRORS" >&5
 
-	HAVE_SYSTEMD_DAEMON=no
-elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-	HAVE_SYSTEMD_DAEMON=no
-else
-	SYSTEMD_DAEMON_CFLAGS=$pkg_cv_SYSTEMD_DAEMON_CFLAGS
-	SYSTEMD_DAEMON_LIBS=$pkg_cv_SYSTEMD_DAEMON_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-	HAVE_SYSTEMD_DAEMON=yes;
-					      LIBSYSTEMD_DAEMON=libsystemd-daemon
-fi
-else
-	SYSTEMD_DAEMON_CFLAGS=$pkg_cv_SYSTEMD_DAEMON_CFLAGS
-	SYSTEMD_DAEMON_LIBS=$pkg_cv_SYSTEMD_DAEMON_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-	HAVE_SYSTEMD_DAEMON=yes;
-			   LIBSYSTEMD_DAEMON="$LIBSYSTEMD"
+# Check whether --with-apple-application-name was given.
+if test ${with_apple_application_name+y}
+then :
+  withval=$with_apple_application_name;  APPLE_APPLICATION_NAME="${withval}"
+else $as_nop
+   APPLE_APPLICATION_NAME="X11"
 fi
-	if test "x$HAVE_SYSTEMD_DAEMON" = xyes; then
 
-$as_echo "#define HAVE_SYSTEMD_DAEMON 1" >>confdefs.h
 
-		REQUIRED_LIBS="$REQUIRED_LIBS $LIBSYSTEMD_DAEMON"
-	elif test "x$WITH_SYSTEMD_DAEMON" = xyes; then
-		as_fn_error $? "systemd support requested but no library has been found" "$LINENO" 5
-	fi
-fi
- if test "x$HAVE_SYSTEMD_DAEMON" = "xyes"; then
-  HAVE_SYSTEMD_DAEMON_TRUE=
-  HAVE_SYSTEMD_DAEMON_FALSE='#'
-else
-  HAVE_SYSTEMD_DAEMON_TRUE='#'
-  HAVE_SYSTEMD_DAEMON_FALSE=
+
+# Check whether --with-bundle-id-prefix was given.
+if test ${with_bundle_id_prefix+y}
+then :
+  withval=$with_bundle_id_prefix;  BUNDLE_ID_PREFIX="${withval}"
 fi
 
 
-if test "x$CONFIG_UDEV" = xyes && test "x$CONFIG_HAL" = xyes; then
-	as_fn_error $? "Hotplugging through both libudev and hal not allowed" "$LINENO" 5
-fi
 
+printf "%s\n" "#define BUNDLE_ID_PREFIX \"$BUNDLE_ID_PREFIX\"" >>confdefs.h
 
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UDEV" >&5
-$as_echo_n "checking for UDEV... " >&6; }
 
-if test -n "$UDEV_CFLAGS"; then
-    pkg_cv_UDEV_CFLAGS="$UDEV_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBUDEV\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$LIBUDEV") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_UDEV_CFLAGS=`$PKG_CONFIG --cflags "$LIBUDEV" 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-if test -n "$UDEV_LIBS"; then
-    pkg_cv_UDEV_LIBS="$UDEV_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBUDEV\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$LIBUDEV") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_UDEV_LIBS=`$PKG_CONFIG --libs "$LIBUDEV" 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
+
+# Check whether --with-bundle-version was given.
+if test ${with_bundle_version+y}
+then :
+  withval=$with_bundle_version;  BUNDLE_VERSION="${withval}"
+else $as_nop
+   BUNDLE_VERSION="21.1.7"
 fi
 
 
 
-if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+# Check whether --with-bundle-version-string was given.
+if test ${with_bundle_version_string+y}
+then :
+  withval=$with_bundle_version_string;  BUNDLE_VERSION_STRING="${withval}"
+else $as_nop
+   BUNDLE_VERSION_STRING="${PACKAGE_VERSION}"
+fi
 
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
+
+# Check whether --enable-sparkle was given.
+if test ${enable_sparkle+y}
+then :
+  enableval=$enable_sparkle;  XQUARTZ_SPARKLE="${enableval}"
+else $as_nop
+   XQUARTZ_SPARKLE="no"
 fi
-        if test $_pkg_short_errors_supported = yes; then
-	        UDEV_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$LIBUDEV" 2>&1`
-        else
-	        UDEV_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$LIBUDEV" 2>&1`
-        fi
-	# Put the nasty error message in config.log where it belongs
-	echo "$UDEV_PKG_ERRORS" >&5
 
-	HAVE_LIBUDEV=no
-elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-	HAVE_LIBUDEV=no
-else
-	UDEV_CFLAGS=$pkg_cv_UDEV_CFLAGS
-	UDEV_LIBS=$pkg_cv_UDEV_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-	HAVE_LIBUDEV=yes
+
+
+# Check whether --with-sparkle-feed-url was given.
+if test ${with_sparkle_feed_url+y}
+then :
+  withval=$with_sparkle_feed_url;  XQUARTZ_SPARKLE_FEED_URL="${withval}"
+else $as_nop
+   XQUARTZ_SPARKLE_FEED_URL="https://www.xquartz.org/releases/sparkle/release.xml"
 fi
-if test "x$CONFIG_UDEV" = xauto; then
-	CONFIG_UDEV="$HAVE_LIBUDEV"
 
-$as_echo "#define HAVE_LIBUDEV 1" >>confdefs.h
 
+# Check whether --enable-visibility was given.
+if test ${enable_visibility+y}
+then :
+  enableval=$enable_visibility; SYMBOL_VISIBILITY=$enableval
+else $as_nop
+  SYMBOL_VISIBILITY=auto
 fi
- if test "x$CONFIG_UDEV" = xyes; then
-  CONFIG_UDEV_TRUE=
-  CONFIG_UDEV_FALSE='#'
-else
-  CONFIG_UDEV_TRUE='#'
-  CONFIG_UDEV_FALSE=
+
+
+
+# Check whether --with-khronos-spec-dir was given.
+if test ${with_khronos_spec_dir+y}
+then :
+  withval=$with_khronos_spec_dir; KHRONOS_SPEC_DIR="${withval}"
+else $as_nop
+  KHRONOS_SPEC_DIR=auto
 fi
 
-if test "x$CONFIG_UDEV" = xyes; then
-	CONFIG_HAL=no
-	if test "x$CONFIG_UDEV_KMS" = xauto; then
-		CONFIG_UDEV_KMS="$HAVE_LIBUDEV"
-	fi
-	if ! test "x$HAVE_LIBUDEV" = xyes; then
-		as_fn_error $? "udev configuration API requested, but libudev is not installed" "$LINENO" 5
-	fi
 
-$as_echo "#define CONFIG_UDEV 1" >>confdefs.h
+# Check whether --enable-composite was given.
+if test ${enable_composite+y}
+then :
+  enableval=$enable_composite; COMPOSITE=$enableval
+else $as_nop
+  COMPOSITE=yes
+fi
 
-	if test "x$CONFIG_UDEV_KMS" = xyes; then
+# Check whether --enable-mitshm was given.
+if test ${enable_mitshm+y}
+then :
+  enableval=$enable_mitshm; MITSHM=$enableval
+else $as_nop
+  MITSHM=auto
+fi
 
-$as_echo "#define CONFIG_UDEV_KMS 1" >>confdefs.h
+# Check whether --enable-xres was given.
+if test ${enable_xres+y}
+then :
+  enableval=$enable_xres; RES=$enableval
+else $as_nop
+  RES=yes
+fi
 
-	fi
-	SAVE_LIBS=$LIBS
-	SAVE_CFLAGS=$CFLAGS
-	CFLAGS="$CFLAGS $UDEV_CFLAGS"
-	LIBS=$UDEV_LIBS
-	for ac_func in udev_monitor_filter_add_match_tag
-do :
-  ac_fn_c_check_func "$LINENO" "udev_monitor_filter_add_match_tag" "ac_cv_func_udev_monitor_filter_add_match_tag"
-if test "x$ac_cv_func_udev_monitor_filter_add_match_tag" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_UDEV_MONITOR_FILTER_ADD_MATCH_TAG 1
-_ACEOF
+# Check whether --enable-record was given.
+if test ${enable_record+y}
+then :
+  enableval=$enable_record; RECORD=$enableval
+else $as_nop
+  RECORD=yes
+fi
 
+# Check whether --enable-xv was given.
+if test ${enable_xv+y}
+then :
+  enableval=$enable_xv; XV=$enableval
+else $as_nop
+  XV=yes
 fi
-done
 
-	for ac_func in udev_enumerate_add_match_tag
-do :
-  ac_fn_c_check_func "$LINENO" "udev_enumerate_add_match_tag" "ac_cv_func_udev_enumerate_add_match_tag"
-if test "x$ac_cv_func_udev_enumerate_add_match_tag" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_UDEV_ENUMERATE_ADD_MATCH_TAG 1
-_ACEOF
+# Check whether --enable-xvmc was given.
+if test ${enable_xvmc+y}
+then :
+  enableval=$enable_xvmc; XVMC=$enableval
+else $as_nop
+  XVMC=yes
+fi
 
+# Check whether --enable-dga was given.
+if test ${enable_dga+y}
+then :
+  enableval=$enable_dga; DGA=$enableval
+else $as_nop
+  DGA=auto
 fi
-done
 
-	LIBS=$SAVE_LIBS
-	CFLAGS=$SAVE_CFLAGS
+# Check whether --enable-screensaver was given.
+if test ${enable_screensaver+y}
+then :
+  enableval=$enable_screensaver; SCREENSAVER=$enableval
+else $as_nop
+  SCREENSAVER=yes
 fi
- if test "x$CONFIG_UDEV_KMS" = xyes; then
-  CONFIG_UDEV_KMS_TRUE=
-  CONFIG_UDEV_KMS_FALSE='#'
-else
-  CONFIG_UDEV_KMS_TRUE='#'
-  CONFIG_UDEV_KMS_FALSE=
+
+# Check whether --enable-xdmcp was given.
+if test ${enable_xdmcp+y}
+then :
+  enableval=$enable_xdmcp; XDMCP=$enableval
+else $as_nop
+  XDMCP=auto
 fi
 
+# Check whether --enable-xdm-auth-1 was given.
+if test ${enable_xdm_auth_1+y}
+then :
+  enableval=$enable_xdm_auth_1; XDMAUTH=$enableval
+else $as_nop
+  XDMAUTH=auto
+fi
 
+# Check whether --enable-glx was given.
+if test ${enable_glx+y}
+then :
+  enableval=$enable_glx; GLX=$enableval
+else $as_nop
+  GLX=yes
+fi
 
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBUS" >&5
-$as_echo_n "checking for DBUS... " >&6; }
+# Check whether --enable-dri was given.
+if test ${enable_dri+y}
+then :
+  enableval=$enable_dri; DRI=$enableval
+fi
 
-if test -n "$DBUS_CFLAGS"; then
-    pkg_cv_DBUS_CFLAGS="$DBUS_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBDBUS\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$LIBDBUS") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_DBUS_CFLAGS=`$PKG_CONFIG --cflags "$LIBDBUS" 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
+# Check whether --enable-dri2 was given.
+if test ${enable_dri2+y}
+then :
+  enableval=$enable_dri2; DRI2=$enableval
+else $as_nop
+  DRI2=auto
 fi
- else
-    pkg_failed=untried
+
+# Check whether --enable-dri3 was given.
+if test ${enable_dri3+y}
+then :
+  enableval=$enable_dri3; DRI3=$enableval
+else $as_nop
+  DRI3=auto
 fi
-if test -n "$DBUS_LIBS"; then
-    pkg_cv_DBUS_LIBS="$DBUS_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBDBUS\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$LIBDBUS") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_DBUS_LIBS=`$PKG_CONFIG --libs "$LIBDBUS" 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
+
+# Check whether --enable-present was given.
+if test ${enable_present+y}
+then :
+  enableval=$enable_present; PRESENT=$enableval
+else $as_nop
+  PRESENT=yes
 fi
- else
-    pkg_failed=untried
+
+# Check whether --enable-xinerama was given.
+if test ${enable_xinerama+y}
+then :
+  enableval=$enable_xinerama; XINERAMA=$enableval
+else $as_nop
+  XINERAMA=yes
+fi
+
+# Check whether --enable-xf86vidmode was given.
+if test ${enable_xf86vidmode+y}
+then :
+  enableval=$enable_xf86vidmode; XF86VIDMODE=$enableval
+else $as_nop
+  XF86VIDMODE=auto
 fi
 
+# Check whether --enable-xace was given.
+if test ${enable_xace+y}
+then :
+  enableval=$enable_xace; XACE=$enableval
+else $as_nop
+  XACE=yes
+fi
 
+# Check whether --enable-xselinux was given.
+if test ${enable_xselinux+y}
+then :
+  enableval=$enable_xselinux; XSELINUX=$enableval
+else $as_nop
+  XSELINUX=no
+fi
 
-if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+# Check whether --enable-xcsecurity was given.
+if test ${enable_xcsecurity+y}
+then :
+  enableval=$enable_xcsecurity; XCSECURITY=$enableval
+else $as_nop
+  XCSECURITY=no
+fi
 
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
+# Check whether --enable-dbe was given.
+if test ${enable_dbe+y}
+then :
+  enableval=$enable_dbe; DBE=$enableval
+else $as_nop
+  DBE=yes
 fi
-        if test $_pkg_short_errors_supported = yes; then
-	        DBUS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$LIBDBUS" 2>&1`
-        else
-	        DBUS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$LIBDBUS" 2>&1`
-        fi
-	# Put the nasty error message in config.log where it belongs
-	echo "$DBUS_PKG_ERRORS" >&5
 
-	HAVE_DBUS=no
-elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-	HAVE_DBUS=no
-else
-	DBUS_CFLAGS=$pkg_cv_DBUS_CFLAGS
-	DBUS_LIBS=$pkg_cv_DBUS_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-	HAVE_DBUS=yes
+# Check whether --enable-xf86bigfont was given.
+if test ${enable_xf86bigfont+y}
+then :
+  enableval=$enable_xf86bigfont; XF86BIGFONT=$enableval
+else $as_nop
+  XF86BIGFONT=no
 fi
-if test "x$HAVE_DBUS" = xyes; then
 
-$as_echo "#define HAVE_DBUS 1" >>confdefs.h
+# Check whether --enable-dpms was given.
+if test ${enable_dpms+y}
+then :
+  enableval=$enable_dpms; DPMSExtension=$enableval
+else $as_nop
+  DPMSExtension=yes
+fi
 
+# Check whether --enable-config-udev was given.
+if test ${enable_config_udev+y}
+then :
+  enableval=$enable_config_udev; CONFIG_UDEV=$enableval
+else $as_nop
+  CONFIG_UDEV=auto
 fi
- if test "x$HAVE_DBUS" = xyes; then
-  HAVE_DBUS_TRUE=
-  HAVE_DBUS_FALSE='#'
-else
-  HAVE_DBUS_TRUE='#'
-  HAVE_DBUS_FALSE=
+
+# Check whether --enable-config-udev-kms was given.
+if test ${enable_config_udev_kms+y}
+then :
+  enableval=$enable_config_udev_kms; CONFIG_UDEV_KMS=$enableval
+else $as_nop
+  CONFIG_UDEV_KMS=auto
 fi
 
+# Check whether --enable-config-hal was given.
+if test ${enable_config_hal+y}
+then :
+  enableval=$enable_config_hal; CONFIG_HAL=$enableval
+else $as_nop
+  CONFIG_HAL=auto
+fi
 
+# Check whether --enable-config-wscons was given.
+if test ${enable_config_wscons+y}
+then :
+  enableval=$enable_config_wscons; CONFIG_WSCONS=$enableval
+else $as_nop
+  CONFIG_WSCONS=auto
+fi
 
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for HAL" >&5
-$as_echo_n "checking for HAL... " >&6; }
+# Check whether --enable-xfree86-utils was given.
+if test ${enable_xfree86_utils+y}
+then :
+  enableval=$enable_xfree86_utils; XF86UTILS=$enableval
+else $as_nop
+  XF86UTILS=yes
+fi
 
-if test -n "$HAL_CFLAGS"; then
-    pkg_cv_HAL_CFLAGS="$HAL_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"hal\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "hal") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_HAL_CFLAGS=`$PKG_CONFIG --cflags "hal" 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
+# Check whether --enable-vgahw was given.
+if test ${enable_vgahw+y}
+then :
+  enableval=$enable_vgahw; VGAHW=$enableval
+else $as_nop
+  VGAHW=yes
 fi
- else
-    pkg_failed=untried
+
+# Check whether --enable-int10-module was given.
+if test ${enable_int10_module+y}
+then :
+  enableval=$enable_int10_module; INT10MODULE=$enableval
+else $as_nop
+  INT10MODULE=yes
 fi
-if test -n "$HAL_LIBS"; then
-    pkg_cv_HAL_LIBS="$HAL_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"hal\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "hal") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_HAL_LIBS=`$PKG_CONFIG --libs "hal" 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
+
+# Check whether --enable-windowsdri was given.
+if test ${enable_windowsdri+y}
+then :
+  enableval=$enable_windowsdri; WINDOWSDRI=$enableval
+else $as_nop
+  WINDOWSDRI=auto
 fi
- else
-    pkg_failed=untried
+
+# Check whether --enable-libdrm was given.
+if test ${enable_libdrm+y}
+then :
+  enableval=$enable_libdrm; DRM=$enableval
+else $as_nop
+  DRM=yes
 fi
 
+# Check whether --enable-clientids was given.
+if test ${enable_clientids+y}
+then :
+  enableval=$enable_clientids; CLIENTIDS=$enableval
+else $as_nop
+  CLIENTIDS=yes
+fi
 
+# Check whether --enable-pciaccess was given.
+if test ${enable_pciaccess+y}
+then :
+  enableval=$enable_pciaccess; PCI=$enableval
+else $as_nop
+  PCI=yes
+fi
 
-if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+# Check whether --enable-linux_acpi was given.
+if test ${enable_linux_acpi+y}
+then :
+  enableval=$enable_linux_acpi; enable_linux_acpi=$enableval
+else $as_nop
+  enable_linux_acpi=yes
+fi
 
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
+# Check whether --enable-linux_apm was given.
+if test ${enable_linux_apm+y}
+then :
+  enableval=$enable_linux_apm; enable_linux_apm=$enableval
+else $as_nop
+  enable_linux_apm=yes
 fi
-        if test $_pkg_short_errors_supported = yes; then
-	        HAL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "hal" 2>&1`
-        else
-	        HAL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "hal" 2>&1`
-        fi
-	# Put the nasty error message in config.log where it belongs
-	echo "$HAL_PKG_ERRORS" >&5
 
-	HAVE_HAL=no
-elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-	HAVE_HAL=no
-else
-	HAL_CFLAGS=$pkg_cv_HAL_CFLAGS
-	HAL_LIBS=$pkg_cv_HAL_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-	HAVE_HAL=yes
+# Check whether --enable-systemd-logind was given.
+if test ${enable_systemd_logind+y}
+then :
+  enableval=$enable_systemd_logind; SYSTEMD_LOGIND=$enableval
+else $as_nop
+  SYSTEMD_LOGIND=auto
 fi
-if test "x$CONFIG_HAL" = xauto; then
-	CONFIG_HAL="$HAVE_HAL"
+
+# Check whether --enable-suid-wrapper was given.
+if test ${enable_suid_wrapper+y}
+then :
+  enableval=$enable_suid_wrapper; SUID_WRAPPER=$enableval
+else $as_nop
+  SUID_WRAPPER=no
 fi
-if test "x$CONFIG_HAL" = xyes; then
-	if ! test "x$HAVE_HAL" = xyes; then
-		as_fn_error $? "HAL hotplug API requested, but HAL is not installed." "$LINENO" 5
-	fi
 
 
-$as_echo "#define CONFIG_HAL 1" >>confdefs.h
+# Check whether --enable-xorg was given.
+if test ${enable_xorg+y}
+then :
+  enableval=$enable_xorg; XORG=$enableval
+else $as_nop
+  XORG=auto
+fi
 
-	NEED_DBUS="yes"
+# Check whether --enable-xvfb was given.
+if test ${enable_xvfb+y}
+then :
+  enableval=$enable_xvfb; XVFB=$enableval
+else $as_nop
+  XVFB=yes
 fi
- if test "x$CONFIG_HAL" = xyes; then
-  CONFIG_HAL_TRUE=
-  CONFIG_HAL_FALSE='#'
-else
-  CONFIG_HAL_TRUE='#'
-  CONFIG_HAL_FALSE=
+
+# Check whether --enable-xnest was given.
+if test ${enable_xnest+y}
+then :
+  enableval=$enable_xnest; XNEST=$enableval
+else $as_nop
+  XNEST=auto
 fi
 
+# Check whether --enable-xquartz was given.
+if test ${enable_xquartz+y}
+then :
+  enableval=$enable_xquartz; XQUARTZ=$enableval
+else $as_nop
+  XQUARTZ=auto
+fi
 
-if test "x$SYSTEMD_LOGIND" = xauto; then
-        if test "x$HAVE_DBUS" = xyes -a "x$CONFIG_UDEV" = xyes ; then
-                SYSTEMD_LOGIND=yes
-        else
-                SYSTEMD_LOGIND=no
-        fi
+# Check whether --enable-standalone-xpbproxy was given.
+if test ${enable_standalone_xpbproxy+y}
+then :
+  enableval=$enable_standalone_xpbproxy; STANDALONE_XPBPROXY=$enableval
+else $as_nop
+  STANDALONE_XPBPROXY=no
 fi
-if test "x$SYSTEMD_LOGIND" = xyes; then
-        if ! test "x$HAVE_DBUS" = xyes; then
-                as_fn_error $? "systemd-logind requested, but D-Bus is not installed." "$LINENO" 5
-        fi
-        if ! test "x$CONFIG_UDEV" = xyes ; then
-                as_fn_error $? "systemd-logind is only supported in combination with udev configuration." "$LINENO" 5
-        fi
 
+# Check whether --enable-xwin was given.
+if test ${enable_xwin+y}
+then :
+  enableval=$enable_xwin; XWIN=$enableval
+else $as_nop
+  XWIN=auto
+fi
 
-$as_echo "#define SYSTEMD_LOGIND 1" >>confdefs.h
+# Check whether --enable-glamor was given.
+if test ${enable_glamor+y}
+then :
+  enableval=$enable_glamor; GLAMOR=$enableval
+else $as_nop
+  GLAMOR=auto
+fi
 
-        NEED_DBUS="yes"
+# Check whether --enable-xf86-input-inputtest was given.
+if test ${enable_xf86_input_inputtest+y}
+then :
+  enableval=$enable_xf86_input_inputtest; XORG_DRIVER_INPUT_INPUTTEST=$enableval
+else $as_nop
+  XORG_DRIVER_INPUT_INPUTTEST=yes
 fi
- if test "x$SYSTEMD_LOGIND" = xyes; then
-  SYSTEMD_LOGIND_TRUE=
-  SYSTEMD_LOGIND_FALSE='#'
-else
-  SYSTEMD_LOGIND_TRUE='#'
-  SYSTEMD_LOGIND_FALSE=
+
+# Check whether --enable-kdrive was given.
+if test ${enable_kdrive+y}
+then :
+  enableval=$enable_kdrive; KDRIVE=$enableval
+else $as_nop
+  KDRIVE=no
 fi
 
+# Check whether --enable-xephyr was given.
+if test ${enable_xephyr+y}
+then :
+  enableval=$enable_xephyr; XEPHYR=$enableval
+else $as_nop
+  XEPHYR=auto
+fi
 
-if test "x$SUID_WRAPPER" = xyes; then
+# Check whether --enable-libunwind was given.
+if test ${enable_libunwind+y}
+then :
+  enableval=$enable_libunwind; LIBUNWIND="$enableval"
+else $as_nop
+  LIBUNWIND="auto"
+fi
 
-  prefix_NONE=
-  exec_prefix_NONE=
-  test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
-  test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
-  eval ac_define_dir="\"$libexecdir\""
-  eval ac_define_dir="\"$ac_define_dir\""
-  SUID_WRAPPER_DIR="$ac_define_dir"
+# Check whether --enable-xshmfence was given.
+if test ${enable_xshmfence+y}
+then :
+  enableval=$enable_xshmfence; XSHMFENCE="$enableval"
+else $as_nop
+  XSHMFENCE="auto"
+fi
 
 
-cat >>confdefs.h <<_ACEOF
-#define SUID_WRAPPER_DIR "$ac_define_dir"
-_ACEOF
 
-  test "$prefix_NONE" && prefix=NONE
-  test "$exec_prefix_NONE" && exec_prefix=NONE
+# Check whether --enable-install-setuid was given.
+if test ${enable_install_setuid+y}
+then :
+  enableval=$enable_install_setuid; SETUID=$enableval
+else $as_nop
+  SETUID=auto
+fi
 
-        SETUID="no"
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking to see if we can install the Xorg server as root" >&5
+printf %s "checking to see if we can install the Xorg server as root... " >&6; }
+if test "x$SETUID" = "xauto" ; then
+	case $host_os in
+	    cygwin*)		SETUID="no"  ;;
+	    mingw*)		SETUID="no"  ;;
+	    darwin*)		SETUID="no"  ;;
+	    *)
+	   	case $host_cpu in
+		    sparc)	SETUID="no"  ;;
+		    *)		SETUID="yes" ;;
+		esac
+	esac
+	if test "x$SETUID" = xyes; then
+		touch testfile
+		chown root testfile > /dev/null 2>&1 || SETUID="no"
+		rm -f testfile
+	fi
 fi
- if test "x$SUID_WRAPPER" = xyes; then
-  SUID_WRAPPER_TRUE=
-  SUID_WRAPPER_FALSE='#'
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SETUID" >&5
+printf "%s\n" "$SETUID" >&6; }
+ if test "x$SETUID" = "xyes"; then
+  INSTALL_SETUID_TRUE=
+  INSTALL_SETUID_FALSE='#'
 else
-  SUID_WRAPPER_TRUE='#'
-  SUID_WRAPPER_FALSE=
+  INSTALL_SETUID_TRUE='#'
+  INSTALL_SETUID_FALSE=
 fi
 
 
-if test "x$NEED_DBUS" = xyes; then
 
-$as_echo "#define NEED_DBUS 1" >>confdefs.h
 
-fi
- if test "x$NEED_DBUS" = xyes; then
-  NEED_DBUS_TRUE=
-  NEED_DBUS_FALSE='#'
-else
-  NEED_DBUS_TRUE='#'
-  NEED_DBUS_FALSE=
-fi
+# Transport selection macro from xtrans.m4
 
 
-if test "x$CONFIG_WSCONS" = xauto; then
-	case $host_os in
-		*openbsd*)
-			CONFIG_WSCONS=yes;
-			;;
-		*)
-			CONFIG_WSCONS=no;
-			;;
-	esac
-fi
- if test "x$CONFIG_WSCONS" = xyes; then
-  CONFIG_WSCONS_TRUE=
-  CONFIG_WSCONS_FALSE='#'
-else
-  CONFIG_WSCONS_TRUE='#'
-  CONFIG_WSCONS_FALSE=
+ case $host_os in
+	mingw*)	unixdef="no"   ;;
+	*)	unixdef="yes"  ;;
+ esac
+ # Check whether --enable-unix-transport was given.
+if test ${enable_unix_transport+y}
+then :
+  enableval=$enable_unix_transport; UNIXCONN=$enableval
+else $as_nop
+  UNIXCONN=$unixdef
 fi
 
-if test "x$CONFIG_WSCONS" = xyes; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if Xtrans should support UNIX socket connections" >&5
+printf %s "checking if Xtrans should support UNIX socket connections... " >&6; }
+ if test "$UNIXCONN" = "yes"; then
 
-$as_echo "#define CONFIG_WSCONS 1" >>confdefs.h
+printf "%s\n" "#define UNIXCONN 1" >>confdefs.h
 
+ fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $UNIXCONN" >&5
+printf "%s\n" "$UNIXCONN" >&6; }
+ # Check whether --enable-tcp-transport was given.
+if test ${enable_tcp_transport+y}
+then :
+  enableval=$enable_tcp_transport; TCPCONN=$enableval
+else $as_nop
+  TCPCONN=yes
 fi
 
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if Xtrans should support TCP socket connections" >&5
+printf %s "checking if Xtrans should support TCP socket connections... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $TCPCONN" >&5
+printf "%s\n" "$TCPCONN" >&6; }
+ if test "$TCPCONN" = "yes"; then
+
+printf "%s\n" "#define TCPCONN 1" >>confdefs.h
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc..." >&5
-$as_echo_n "checking for glibc...... " >&6; }
+
+ # SVR4 hides these in libraries other than libc
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
+printf %s "checking for library containing socket... " >&6; }
+if test ${ac_cv_search_socket+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_func_search_save_LIBS=$LIBS
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-#include <features.h>
-#ifndef __GLIBC__
-#error
-#endif
-
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+char socket ();
+int
+main (void)
+{
+return socket ();
+  ;
+  return 0;
+}
 _ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-  glibc=yes
-else
-  glibc=no
+for ac_lib in '' socket
+do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"
+then :
+  ac_cv_search_socket=$ac_res
 fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibc" >&5
-$as_echo "$glibc" >&6; }
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext
+  if test ${ac_cv_search_socket+y}
+then :
+  break
+fi
+done
+if test ${ac_cv_search_socket+y}
+then :
 
-for ac_func in clock_gettime
-do :
-  ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
-if test "x$ac_cv_func_clock_gettime" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_CLOCK_GETTIME 1
-_ACEOF
- have_clock_gettime=yes
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
-$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
-if ${ac_cv_lib_rt_clock_gettime+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lrt  $LIBS"
+else $as_nop
+  ac_cv_search_socket=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
+printf "%s\n" "$ac_cv_search_socket" >&6; }
+ac_res=$ac_cv_search_socket
+if test "$ac_res" != no
+then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
+printf %s "checking for library containing gethostbyname... " >&6; }
+if test ${ac_cv_search_gethostbyname+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_func_search_save_LIBS=$LIBS
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 /* Override any GCC internal prototype to avoid an error.
    Use char because int might match the return type of a GCC
    builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char clock_gettime ();
+char gethostbyname ();
 int
-main ()
+main (void)
 {
-return clock_gettime ();
+return gethostbyname ();
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_rt_clock_gettime=yes
-else
-  ac_cv_lib_rt_clock_gettime=no
+for ac_lib in '' nsl
+do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"
+then :
+  ac_cv_search_gethostbyname=$ac_res
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext
+  if test ${ac_cv_search_gethostbyname+y}
+then :
+  break
+fi
+done
+if test ${ac_cv_search_gethostbyname+y}
+then :
+
+else $as_nop
+  ac_cv_search_gethostbyname=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
+printf "%s\n" "$ac_cv_search_gethostbyname" >&6; }
+ac_res=$ac_cv_search_gethostbyname
+if test "$ac_res" != no
+then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+ if test "$ac_cv_search_socket$ac_cv_search_gethostbyname" = "nono"; then
+   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for main in -lws2_32" >&5
+printf %s "checking for main in -lws2_32... " >&6; }
+if test ${ac_cv_lib_ws2_32_main+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lws2_32  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+int
+main (void)
+{
+return main ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+  ac_cv_lib_ws2_32_main=yes
+else $as_nop
+  ac_cv_lib_ws2_32_main=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
-$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
-if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
-  have_clock_gettime=-lrt
-else
-  have_clock_gettime=no
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ws2_32_main" >&5
+printf "%s\n" "$ac_cv_lib_ws2_32_main" >&6; }
+if test "x$ac_cv_lib_ws2_32_main" = xyes
+then :
+  printf "%s\n" "#define HAVE_LIBWS2_32 1" >>confdefs.h
+
+  LIBS="-lws2_32 $LIBS"
+
 fi
 
+ fi
+
+ # Needs to come after above checks for libsocket & libnsl for SVR4 systems
+ # Check whether --enable-ipv6 was given.
+if test ${enable_ipv6+y}
+then :
+  enableval=$enable_ipv6; IPV6CONN=$enableval
+else $as_nop
+  ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
+if test "x$ac_cv_func_getaddrinfo" = xyes
+then :
+  IPV6CONN=yes
+else $as_nop
+  IPV6CONN=no
 fi
-done
 
+fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a useful monotonic clock ..." >&5
-$as_echo_n "checking for a useful monotonic clock ...... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if IPv6 support should be built" >&5
+printf %s "checking if IPv6 support should be built... " >&6; }
+ if test "$IPV6CONN" = "yes"; then
 
-if ! test "x$have_clock_gettime" = xno; then
-    if ! test "x$have_clock_gettime" = xyes; then
-        CLOCK_LIBS="$have_clock_gettime"
-    else
-        CLOCK_LIBS=""
-    fi
+printf "%s\n" "#define IPv6 1" >>confdefs.h
 
-    LIBS_SAVE="$LIBS"
-    LIBS="$CLOCK_LIBS"
-    CPPFLAGS_SAVE="$CPPFLAGS"
+ fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $IPV6CONN" >&5
+printf "%s\n" "$IPV6CONN" >&6; }
 
-    if test x"$glibc" = xyes; then
-        CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE=200112L"
-    fi
+ # 4.3BSD-Reno added a new member to struct sockaddr_in
+ ac_fn_c_check_member "$LINENO" "struct sockaddr_in" "sin_len" "ac_cv_member_struct_sockaddr_in_sin_len" "
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
 
-    if test "$cross_compiling" = yes; then :
-  MONOTONIC_CLOCK="cross compiling"
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+"
+if test "x$ac_cv_member_struct_sockaddr_in_sin_len" = xyes
+then :
 
-#include <time.h>
+printf "%s\n" "#define BSD44SOCKETS 1" >>confdefs.h
 
-int main(int argc, char *argv[]) {
-    struct timespec tp;
+fi
+
+
+ # POSIX.1g changed the type of pointer passed to getsockname/getpeername/etc.
+ ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
+$ac_includes_default
+#include <sys/socket.h>
+"
+if test "x$ac_cv_type_socklen_t" = xyes
+then :
+
+printf "%s\n" "#define HAVE_SOCKLEN_T 1" >>confdefs.h
 
-    if (clock_gettime(CLOCK_MONOTONIC, &tp) == 0)
-        return 0;
-    else
-        return 1;
-}
 
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  MONOTONIC_CLOCK=yes
-else
-  MONOTONIC_CLOCK=no
 fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+
+ # XPG4v2/UNIX95 added msg_control - check to see if we need to define
+ # _XOPEN_SOURCE to get it (such as on Solaris)
+ ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_control" "ac_cv_member_struct_msghdr_msg_control" "
+$ac_includes_default
+#include <sys/socket.h>
+
+"
+if test "x$ac_cv_member_struct_msghdr_msg_control" = xyes
+then :
+
+fi
+
+ # First try for Solaris in C99 compliant mode, which requires XPG6/UNIX03
+ if test "x$ac_cv_member_struct_msghdr_msg_control" = xno; then
+     unset ac_cv_member_struct_msghdr_msg_control
+     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying again with _XOPEN_SOURCE=600" >&5
+printf "%s\n" "$as_me: trying again with _XOPEN_SOURCE=600" >&6;}
+     ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_control" "ac_cv_member_struct_msghdr_msg_control" "
+#define _XOPEN_SOURCE 600
+$ac_includes_default
+#include <sys/socket.h>
+
+"
+if test "x$ac_cv_member_struct_msghdr_msg_control" = xyes
+then :
+
+printf "%s\n" "#define _XOPEN_SOURCE 600" >>confdefs.h
+
+
 fi
 
+ fi
+ # If that didn't work, fall back to XPG5/UNIX98 with C89
+ if test "x$ac_cv_member_struct_msghdr_msg_control" = xno; then
+     unset ac_cv_member_struct_msghdr_msg_control
+     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying again with _XOPEN_SOURCE=500" >&5
+printf "%s\n" "$as_me: trying again with _XOPEN_SOURCE=500" >&6;}
+     ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_control" "ac_cv_member_struct_msghdr_msg_control" "
+#define _XOPEN_SOURCE 500
+$ac_includes_default
+#include <sys/socket.h>
 
-    if test "$MONOTONIC_CLOCK" = "cross compiling"; then
-        ac_fn_c_check_decl "$LINENO" "CLOCK_MONOTONIC" "ac_cv_have_decl_CLOCK_MONOTONIC" "#include <time.h>
 "
-if test "x$ac_cv_have_decl_CLOCK_MONOTONIC" = xyes; then :
-  MONOTONIC_CLOCK="guessing yes"
-else
-  MONOTONIC_CLOCK=no
-fi
+if test "x$ac_cv_member_struct_msghdr_msg_control" = xyes
+then :
 
-    fi
+printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h
 
-    LIBS="$LIBS_SAVE"
-    CPPFLAGS="$CPPFLAGS_SAVE"
-else
-    MONOTONIC_CLOCK=no
-fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MONOTONIC_CLOCK" >&5
-$as_echo "$MONOTONIC_CLOCK" >&6; }
-if test "$MONOTONIC_CLOCK" = "guessing yes"; then
-	MONOTONIC_CLOCK=yes
 fi
 
-if test "x$MONOTONIC_CLOCK" = xyes; then
+ fi
 
-$as_echo "#define MONOTONIC_CLOCK 1" >>confdefs.h
 
-    LIBS="$LIBS $CLOCK_LIBS"
-fi
 
- if test "x$XV" = xyes; then
-  XV_TRUE=
-  XV_FALSE='#'
-else
-  XV_TRUE='#'
-  XV_FALSE=
+ fi
+ case $host_os in
+	solaris*|sco*|sysv4*)	localdef="yes" ;;
+	*)			localdef="no"  ;;
+ esac
+ # Check whether --enable-local-transport was given.
+if test ${enable_local_transport+y}
+then :
+  enableval=$enable_local_transport; LOCALCONN=$enableval
+else $as_nop
+  LOCALCONN=$localdef
 fi
 
-if test "x$XV" = xyes; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if Xtrans should support os-specific local connections" >&5
+printf %s "checking if Xtrans should support os-specific local connections... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LOCALCONN" >&5
+printf "%s\n" "$LOCALCONN" >&6; }
+ if test "$LOCALCONN" = "yes"; then
 
-$as_echo "#define XV 1" >>confdefs.h
+printf "%s\n" "#define LOCALCONN 1" >>confdefs.h
 
+ fi
 
-$as_echo "#define XvExtension 1" >>confdefs.h
+ # Other functions Xtrans may need
+ ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
+if test "x$ac_cv_func_strcasecmp" = xyes
+then :
+  printf "%s\n" "#define HAVE_STRCASECMP 1" >>confdefs.h
 
-	REQUIRED_MODULES="$REQUIRED_MODULES $VIDEOPROTO"
-	SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $VIDEOPROTO"
-else
-	XVMC=no
 fi
+ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
+if test "x$ac_cv_func_strlcpy" = xyes
+then :
+  printf "%s\n" "#define HAVE_STRLCPY 1" >>confdefs.h
 
- if test "x$XVMC" = xyes; then
-  XVMC_TRUE=
-  XVMC_FALSE='#'
-else
-  XVMC_TRUE='#'
-  XVMC_FALSE=
 fi
 
-if test "x$XVMC" = xyes; then
 
-$as_echo "#define XvMCExtension 1" >>confdefs.h
 
-fi
 
- if test "x$COMPOSITE" = xyes; then
-  COMPOSITE_TRUE=
-  COMPOSITE_FALSE='#'
-else
-  COMPOSITE_TRUE='#'
-  COMPOSITE_FALSE=
+# Secure RPC detection macro from xtrans.m4
+
+ # Check whether --enable-secure-rpc was given.
+if test ${enable_secure_rpc+y}
+then :
+  enableval=$enable_secure_rpc; SECURE_RPC=$enableval
+else $as_nop
+  SECURE_RPC="try"
 fi
 
-if test "x$COMPOSITE" = xyes; then
 
-$as_echo "#define COMPOSITE 1" >>confdefs.h
+ if test "x$SECURE_RPC" = "xyes" -o "x$SECURE_RPC" = "xtry" ; then
+	FOUND_SECURE_RPC="no"
 
-	REQUIRED_MODULES="$REQUIRED_MODULES $COMPOSITEPROTO"
-	COMPOSITE_LIB='$(top_builddir)/composite/libcomposite.la'
-	COMPOSITE_INC='-I$(top_srcdir)/composite'
+  for ac_func in authdes_seccreate authdes_create
+do :
+  as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"
+then :
+  cat >>confdefs.h <<_ACEOF
+#define `printf "%s\n" "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+ FOUND_SECURE_RPC="yes"
 fi
 
-if test "x$MITSHM" = xauto; then
-	MITSHM="$ac_cv_sysv_ipc"
+done
+	if test "x$FOUND_SECURE_RPC" = "xno" ; then
+		if test "x$SECURE_RPC" = "xyes" ; then
+	as_fn_error $? "Secure RPC requested, but required functions not found" "$LINENO" 5
+		fi
+		SECURE_RPC="no"
+	else
+				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing getsecretkey" >&5
+printf %s "checking for library containing getsecretkey... " >&6; }
+if test ${ac_cv_search_getsecretkey+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+char getsecretkey ();
+int
+main (void)
+{
+return getsecretkey ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' rpcsvc
+do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"
+then :
+  ac_cv_search_getsecretkey=$ac_res
 fi
- if test "x$MITSHM" = xyes; then
-  MITSHM_TRUE=
-  MITSHM_FALSE='#'
-else
-  MITSHM_TRUE='#'
-  MITSHM_FALSE=
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext
+  if test ${ac_cv_search_getsecretkey+y}
+then :
+  break
 fi
+done
+if test ${ac_cv_search_getsecretkey+y}
+then :
 
-if test "x$MITSHM" = xyes; then
-
-$as_echo "#define MITSHM 1" >>confdefs.h
-
-
-$as_echo "#define HAS_SHM 1" >>confdefs.h
-
+else $as_nop
+  ac_cv_search_getsecretkey=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
 fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getsecretkey" >&5
+printf "%s\n" "$ac_cv_search_getsecretkey" >&6; }
+ac_res=$ac_cv_search_getsecretkey
+if test "$ac_res" != no
+then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
 
- if test "x$RECORD" = xyes; then
-  RECORD_TRUE=
-  RECORD_FALSE='#'
-else
-  RECORD_TRUE='#'
-  RECORD_FALSE=
 fi
 
-if test "x$RECORD" = xyes; then
+		SECURE_RPC="yes"
+	fi
+ fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if Secure RPC authentication (\"SUN-DES-1\") should be supported" >&5
+printf %s "checking if Secure RPC authentication (\"SUN-DES-1\") should be supported... " >&6; }
+ if test "x$SECURE_RPC" = "xyes" ; then
 
-$as_echo "#define XRECORD 1" >>confdefs.h
+printf "%s\n" "#define SECURE_RPC 1" >>confdefs.h
 
-	REQUIRED_MODULES="$REQUIRED_MODULES $RECORDPROTO"
-	RECORD_LIB='$(top_builddir)/record/librecord.la'
-fi
+ fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SECURE_RPC" >&5
+printf "%s\n" "$SECURE_RPC" >&6; }
 
- if test "x$SCREENSAVER" = xyes; then
-  SCREENSAVER_TRUE=
-  SCREENSAVER_FALSE='#'
+ if test "x$SECURE_RPC" = xyes; then
+  SECURE_RPC_TRUE=
+  SECURE_RPC_FALSE='#'
 else
-  SCREENSAVER_TRUE='#'
-  SCREENSAVER_FALSE=
+  SECURE_RPC_TRUE='#'
+  SECURE_RPC_FALSE=
 fi
 
-if test "x$SCREENSAVER" = xyes; then
-
-$as_echo "#define SCREENSAVER 1" >>confdefs.h
 
-	REQUIRED_MODULES="$REQUIRED_MODULES $SCRNSAVERPROTO"
-	SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $SCRNSAVERPROTO"
+ if test "x$INT10" = xvm86; then
+  INT10_VM86_TRUE=
+  INT10_VM86_FALSE='#'
+else
+  INT10_VM86_TRUE='#'
+  INT10_VM86_FALSE=
 fi
 
-HASHTABLE=no
- if test "x$RES" = xyes; then
-  RES_TRUE=
-  RES_FALSE='#'
+ if test "x$INT10" = xx86emu; then
+  INT10_X86EMU_TRUE=
+  INT10_X86EMU_FALSE='#'
 else
-  RES_TRUE='#'
-  RES_FALSE=
+  INT10_X86EMU_TRUE='#'
+  INT10_X86EMU_FALSE=
 fi
 
-if test "x$RES" = xyes; then
-
-$as_echo "#define RES 1" >>confdefs.h
-
-	HASHTABLE=yes
-	REQUIRED_MODULES="$REQUIRED_MODULES $RESOURCEPROTO"
-	SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $RESOURCEPROTO"
+ if test "x$INT10" = xstub; then
+  INT10_STUB_TRUE=
+  INT10_STUB_FALSE='#'
+else
+  INT10_STUB_TRUE='#'
+  INT10_STUB_FALSE=
 fi
 
-if test "x$LISTEN_TCP" = xyes; then
-
-$as_echo "#define LISTEN_TCP 1" >>confdefs.h
 
-fi
-if test "x$LISTEN_UNIX" = xyes; then
+case $host_os in
+	cygwin* | mingw*)
+		CONFIG_HAL=no
+		CONFIG_UDEV=no
+		CONFIG_UDEV_KMS=no
+		DGA=no
+		DRM=no
+		DRI2=no
+		DRI3=no
+		INT10MODULE=no
+		PCI=no
+		VGAHW=no
+		XF86UTILS=no
+		XF86VIDMODE=no
+		XSELINUX=no
+		SYMBOL_VISIBILITY=no
+		;;
+	darwin*)
+		PCI=no
+		INT10MODULE=no
+		VGAHW=no
+		DRM=no
+		DRI2=no
+		DRI3=no
 
-$as_echo "#define LISTEN_UNIX 1" >>confdefs.h
+		if test x$XQUARTZ = xauto; then
+			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build Xquartz" >&5
+printf %s "checking whether to build Xquartz... " >&6; }
+if test ${xorg_cv_Carbon_framework+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
 
+		 		save_LDFLAGS=$LDFLAGS
+				LDFLAGS="$LDFLAGS -framework Carbon"
+				cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+char FSFindFolder(); int main() { FSFindFolder(); return 0;}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+  xorg_cv_Carbon_framework=yes
+else $as_nop
+  xorg_cv_Carbon_framework=no
 fi
-if test "x$LISTEN_LOCAL" = xyes; then
-
-$as_echo "#define LISTEN_LOCAL 1" >>confdefs.h
-
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+			        LDFLAGS=$save_LDFLAGS
 fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_Carbon_framework" >&5
+printf "%s\n" "$xorg_cv_Carbon_framework" >&6; }
 
-# The XRes extension may support client ID tracking only if it has
-# been specifically enabled. Client ID tracking is implicitly not
-# supported if XRes extension is disabled.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to track client ids" >&5
-$as_echo_n "checking whether to track client ids... " >&6; }
-if test "x$RES" = xyes && test "x$CLIENTIDS" = xyes; then
-
-$as_echo "#define CLIENTIDS 1" >>confdefs.h
+			if test "X$xorg_cv_Carbon_framework" = Xyes; then
+				XQUARTZ=yes
+			else
+				XQUARTZ=no
+			fi
+		fi
 
-else
-	CLIENTIDS=no
-fi
-if test "x$CLIENTIDS" = xyes; then
-	case $host_os in
-	openbsd*)
-		SYS_LIBS="$SYS_LIBS -lkvm"
-	;;
-	esac
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLIENTIDS" >&5
-$as_echo "$CLIENTIDS" >&6; }
- if test "x$CLIENTIDS" = xyes; then
-  CLIENTIDS_TRUE=
-  CLIENTIDS_FALSE='#'
-else
-  CLIENTIDS_TRUE='#'
-  CLIENTIDS_FALSE=
-fi
+		if test "x$XQUARTZ" = xyes ; then
+			XQUARTZ=yes
+			XVFB=no
+			XNEST=no
 
+			DGA=no
+			DPMSExtension=no
+			XF86VIDMODE=no
+		fi
+		;;
+	gnu*)
+		DRM=no
+		DRI2=no
+		DRI3=no
+		;;
+	*) XQUARTZ=no ;;
+esac
 
- if test "x$DRI" = xyes; then
-  DRI_TRUE=
-  DRI_FALSE='#'
-else
-  DRI_TRUE='#'
-  DRI_FALSE=
-fi
+XEXT_INC='-I$(top_srcdir)/Xext'
+XEXT_LIB='$(top_builddir)/Xext/libXext.la'
 
-if test "x$DRI" = xyes; then
+VIDEOPROTO="videoproto"
+COMPOSITEPROTO="compositeproto >= 0.4"
+RECORDPROTO="recordproto >= 1.13.99.1"
+SCRNSAVERPROTO="scrnsaverproto >= 1.1"
+RESOURCEPROTO="resourceproto >= 1.2.0"
+DRIPROTO="xf86driproto >= 2.1.0"
+DRI2PROTO="dri2proto >= 2.8"
+DRI3PROTO="dri3proto >= 1.2"
+XINERAMAPROTO="xineramaproto"
+BIGFONTPROTO="xf86bigfontproto >= 1.2.0"
+DGAPROTO="xf86dgaproto >= 2.0.99.1"
+GLPROTO="glproto >= 1.4.17"
+VIDMODEPROTO="xf86vidmodeproto >= 2.2.99.1"
+APPLEWMPROTO="applewmproto >= 1.4"
+LIBXSHMFENCE="xshmfence >= 1.1"
 
-$as_echo "#define XF86DRI 1" >>confdefs.h
+XPROTO="xproto >= 7.0.31"
+RANDRPROTO="randrproto >= 1.6.0"
+RENDERPROTO="renderproto >= 0.11"
+XEXTPROTO="xextproto >= 7.2.99.901"
+INPUTPROTO="inputproto >= 2.3.99.1"
+KBPROTO="kbproto >= 1.0.3"
+FONTSPROTO="fontsproto >= 2.1.3"
+FIXESPROTO="fixesproto >= 6.0"
+DAMAGEPROTO="damageproto >= 1.1"
+XCMISCPROTO="xcmiscproto >= 1.2.0"
+BIGREQSPROTO="bigreqsproto >= 1.1.0"
+XTRANS="xtrans >= 1.3.5"
+PRESENTPROTO="presentproto >= 1.2"
 
-	REQUIRED_MODULES="$REQUIRED_MODULES $DRIPROTO $GLPROTO $LIBDRI"
-	SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $DRIPROTO $GLPROTO $LIBDRI"
-fi
+LIBAPPLEWM="applewm >= 1.4"
+LIBDRI="dri >= 7.8.0"
+LIBDRM="libdrm >= 2.4.89"
+LIBEGL="egl"
+LIBGBM="gbm >= 10.2.0"
+LIBGL="gl >= 1.2"
+LIBXEXT="xext >= 1.0.99.4"
+LIBXFONT="xfont2 >= 2.0.0"
+LIBXI="xi >= 1.2.99.1"
+LIBXTST="xtst >= 1.0.99.2"
+LIBPCIACCESS="pciaccess >= 0.12.901"
+LIBUDEV="libudev >= 143"
+LIBSELINUX="libselinux >= 2.0.86"
+LIBDBUS="dbus-1 >= 1.0"
+LIBPIXMAN="pixman-1 >= 0.27.2"
+LIBXCVT="libxcvt"
 
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DRI2PROTO" >&5
-$as_echo_n "checking for DRI2PROTO... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PIXMAN" >&5
+printf %s "checking for PIXMAN... " >&6; }
 
-if test -n "$DRI2PROTO_CFLAGS"; then
-    pkg_cv_DRI2PROTO_CFLAGS="$DRI2PROTO_CFLAGS"
+if test -n "$PIXMAN_CFLAGS"; then
+    pkg_cv_PIXMAN_CFLAGS="$PIXMAN_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$DRI2PROTO\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$DRI2PROTO") 2>&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBPIXMAN\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$LIBPIXMAN") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_DRI2PROTO_CFLAGS=`$PKG_CONFIG --cflags "$DRI2PROTO" 2>/dev/null`
+  pkg_cv_PIXMAN_CFLAGS=`$PKG_CONFIG --cflags "$LIBPIXMAN" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -26492,16 +26314,16 @@ fi
  else
     pkg_failed=untried
 fi
-if test -n "$DRI2PROTO_LIBS"; then
-    pkg_cv_DRI2PROTO_LIBS="$DRI2PROTO_LIBS"
+if test -n "$PIXMAN_LIBS"; then
+    pkg_cv_PIXMAN_LIBS="$PIXMAN_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$DRI2PROTO\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$DRI2PROTO") 2>&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBPIXMAN\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$LIBPIXMAN") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_DRI2PROTO_LIBS=`$PKG_CONFIG --libs "$DRI2PROTO" 2>/dev/null`
+  pkg_cv_PIXMAN_LIBS=`$PKG_CONFIG --libs "$LIBPIXMAN" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -26513,8 +26335,8 @@ fi
 
 
 if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -26522,468 +26344,632 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        DRI2PROTO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$DRI2PROTO" 2>&1`
+	        PIXMAN_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$LIBPIXMAN" 2>&1`
         else
-	        DRI2PROTO_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$DRI2PROTO" 2>&1`
+	        PIXMAN_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$LIBPIXMAN" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
-	echo "$DRI2PROTO_PKG_ERRORS" >&5
+	echo "$PIXMAN_PKG_ERRORS" >&5
 
-	HAVE_DRI2PROTO=no
+	as_fn_error $? "Package requirements ($LIBPIXMAN) were not met:
+
+$PIXMAN_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables PIXMAN_CFLAGS
+and PIXMAN_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details." "$LINENO" 5
 elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-	HAVE_DRI2PROTO=no
-else
-	DRI2PROTO_CFLAGS=$pkg_cv_DRI2PROTO_CFLAGS
-	DRI2PROTO_LIBS=$pkg_cv_DRI2PROTO_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-	HAVE_DRI2PROTO=yes
-fi
-case "$DRI2,$HAVE_DRI2PROTO" in
-	yes,no)
-		as_fn_error $? "DRI2 requested, but dri2proto not found." "$LINENO" 5
-		;;
-	yes,yes | auto,yes)
+     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
 
-$as_echo "#define DRI2 1" >>confdefs.h
+Alternatively, you may set the environment variables PIXMAN_CFLAGS
+and PIXMAN_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
 
-		DRI2=yes
-		LIBGL="gl >= 1.2"
-		SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $DRI2PROTO"
-		;;
-esac
- if test "x$DRI2" = xyes; then
-  DRI2_TRUE=
-  DRI2_FALSE='#'
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details" "$LINENO" 5; }
 else
-  DRI2_TRUE='#'
-  DRI2_FALSE=
+	PIXMAN_CFLAGS=$pkg_cv_PIXMAN_CFLAGS
+	PIXMAN_LIBS=$pkg_cv_PIXMAN_LIBS
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+
 fi
+REQUIRED_LIBS="$REQUIRED_LIBS $LIBPIXMAN $LIBXFONT xau"
 
+SDK_REQUIRED_MODULES="$XPROTO $RANDRPROTO $RENDERPROTO $XEXTPROTO $INPUTPROTO $KBPROTO $FONTSPROTO $LIBPIXMAN $LIBXCVT"
+# Make SDK_REQUIRED_MODULES available for inclusion in xorg-server.pc
 
-# Check whether --enable-xtrans-send-fds was given.
-if test "${enable_xtrans_send_fds+set}" = set; then :
-  enableval=$enable_xtrans_send_fds; XTRANS_SEND_FDS=$enableval
-else
-  XTRANS_SEND_FDS=auto
+
+ac_fn_check_decl "$LINENO" "PTHREAD_MUTEX_RECURSIVE" "ac_cv_have_decl_PTHREAD_MUTEX_RECURSIVE" "#include <pthread.h>
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_PTHREAD_MUTEX_RECURSIVE" = xyes
+then :
+  HAVE_RECURSIVE_MUTEX=yes
+else $as_nop
+  HAVE_RECURSIVE_MUTEX=no
 fi
 
+THREAD_DEFAULT=no
 
-case "x$XTRANS_SEND_FDS" in
-xauto)
-	case "$host_os" in
-	linux*|solaris*|freebsd*|dragonfly*|openbsd*)
-		XTRANS_SEND_FDS=yes
-		;;
+if test "x$HAVE_RECURSIVE_MUTEX" = "xyes" ; then
+	THREAD_DEFAULT=yes
+fi
+
+case $host_os in
+	mingw*) THREAD_DEFAULT=no  ;;
 	*)
-		XTRANS_SEND_FDS=no
-		;;
-	esac
 esac
 
-case "x$XTRANS_SEND_FDS" in
-xyes)
+# Check whether --enable-input-thread was given.
+if test ${enable_input_thread+y}
+then :
+  enableval=$enable_input_thread; INPUTTHREAD=$enableval
+else $as_nop
+  INPUTTHREAD=$THREAD_DEFAULT
+fi
 
-$as_echo "#define XTRANS_SEND_FDS 1" >>confdefs.h
 
-	;;
-esac
+if test "x$INPUTTHREAD" = "xyes" ; then
 
-case "$DRI3,$XTRANS_SEND_FDS" in
-	yes,yes | auto,yes)
-		;;
-	yes,no)
-		as_fn_error $? "DRI3 requested, but xtrans fd passing support not found." "$LINENO" 5
-		DRI3=no
-		;;
-	no,*)
-		;;
-	*)
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: DRI3 disabled because xtrans fd passing support not found." >&5
-$as_echo "$as_me: DRI3 disabled because xtrans fd passing support not found." >&6;}
-		DRI3=no
-		;;
-esac
 
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DRI3PROTO" >&5
-$as_echo_n "checking for DRI3PROTO... " >&6; }
+ax_pthread_ok=no
 
-if test -n "$DRI3PROTO_CFLAGS"; then
-    pkg_cv_DRI3PROTO_CFLAGS="$DRI3PROTO_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$DRI3PROTO\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$DRI3PROTO") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_DRI3PROTO_CFLAGS=`$PKG_CONFIG --cflags "$DRI3PROTO" 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-if test -n "$DRI3PROTO_LIBS"; then
-    pkg_cv_DRI3PROTO_LIBS="$DRI3PROTO_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$DRI3PROTO\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$DRI3PROTO") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_DRI3PROTO_LIBS=`$PKG_CONFIG --libs "$DRI3PROTO" 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
+# We used to check for pthread.h first, but this fails if pthread.h
+# requires special compiler flags (e.g. on True64 or Sequent).
+# It gets checked for in the link test anyway.
+
+# First of all, check if the user has set any of the PTHREAD_LIBS,
+# etcetera environment variables, and if threads linking works using
+# them:
+if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
+        save_CFLAGS="$CFLAGS"
+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+        save_LIBS="$LIBS"
+        LIBS="$PTHREAD_LIBS $LIBS"
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
+printf %s "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+char pthread_join ();
+int
+main (void)
+{
+return pthread_join ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+  ax_pthread_ok=yes
 fi
- else
-    pkg_failed=untried
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
+printf "%s\n" "$ax_pthread_ok" >&6; }
+        if test x"$ax_pthread_ok" = xno; then
+                PTHREAD_LIBS=""
+                PTHREAD_CFLAGS=""
+        fi
+        LIBS="$save_LIBS"
+        CFLAGS="$save_CFLAGS"
 fi
 
+# We must check for the threads library under a number of different
+# names; the ordering is very important because some systems
+# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
+# libraries is broken (non-POSIX).
+
+# Create a list of thread flags to try.  Items starting with a "-" are
+# C compiler flags, and other items are library names, except for "none"
+# which indicates that we try without any flags at all, and "pthread-config"
+# which is a program returning the flags for the Pth emulation library.
+
+ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
+
+# The ordering *is* (sometimes) important.  Some notes on the
+# individual items follow:
 
+# pthreads: AIX (must check this before -lpthread)
+# none: in case threads are in libc; should be tried before -Kthread and
+#       other compiler flags to prevent continual compiler warnings
+# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
+# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
+# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
+# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
+# -pthreads: Solaris/gcc
+# -mthreads: Mingw32/gcc, Lynx/gcc
+# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
+#      doesn't hurt to check since this sometimes defines pthreads too;
+#      also defines -D_REENTRANT)
+#      ... -mt is also the pthreads flag for HP/aCC
+# pthread: Linux, etcetera
+# --thread-safe: KAI C++
+# pthread-config: use pthread-config program (for GNU Pth library)
 
-if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+case ${host_os} in
+        solaris*)
 
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi
-        if test $_pkg_short_errors_supported = yes; then
-	        DRI3PROTO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$DRI3PROTO" 2>&1`
-        else
-	        DRI3PROTO_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$DRI3PROTO" 2>&1`
-        fi
-	# Put the nasty error message in config.log where it belongs
-	echo "$DRI3PROTO_PKG_ERRORS" >&5
+        # On Solaris (at least, for some versions), libc contains stubbed
+        # (non-functional) versions of the pthreads routines, so link-based
+        # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
+        # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
+        # a function called by this macro, so we could check for that, but
+        # who knows whether they'll stub that too in a future libc.)  So,
+        # we'll just look for -pthreads and -lpthread first:
 
-	HAVE_DRI3PROTO=no
-elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-	HAVE_DRI3PROTO=no
-else
-	DRI3PROTO_CFLAGS=$pkg_cv_DRI3PROTO_CFLAGS
-	DRI3PROTO_LIBS=$pkg_cv_DRI3PROTO_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-	HAVE_DRI3PROTO=yes
-fi
+        ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
+        ;;
 
-case "$DRI3,$HAVE_DRI3PROTO" in
-	yes,yes | auto,yes)
-		REQUIRED_MODULES="$REQUIRED_MODULES dri3proto"
-		;;
-	yes,no)
-		as_fn_error $? "DRI3 requested, but dri3proto not found." "$LINENO" 5
-		DRI3=no
-		;;
-	no,*)
-		;;
-	*)
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: DRI3 disabled because dri3proto not found." >&5
-$as_echo "$as_me: DRI3 disabled because dri3proto not found." >&6;}
-		DRI3=no
-		;;
+        darwin*)
+        ax_pthread_flags="-pthread $ax_pthread_flags"
+        ;;
+	netbsd*)
+	# use libc stubs, don't link against libpthread, to allow
+	# dynamic loading
+	ax_pthread_flags=""
+	;;
 esac
 
-for ac_func in sigaction
-do :
-  ac_fn_c_check_func "$LINENO" "sigaction" "ac_cv_func_sigaction"
-if test "x$ac_cv_func_sigaction" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_SIGACTION 1
-_ACEOF
+# Clang doesn't consider unrecognized options an error unless we specify
+# -Werror. We throw in some extra Clang-specific options to ensure that
+# this doesn't happen for GCC, which also accepts -Werror.
 
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler needs -Werror to reject unknown flags" >&5
+printf %s "checking if compiler needs -Werror to reject unknown flags... " >&6; }
+save_CFLAGS="$CFLAGS"
+ax_pthread_extra_flags="-Werror"
+CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wunknown-warning-option -Wsizeof-array-argument"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+int foo(void);
+int
+main (void)
+{
+foo()
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+else $as_nop
+  ax_pthread_extra_flags=
+                   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
-done
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+CFLAGS="$save_CFLAGS"
 
+if test x"$ax_pthread_ok" = xno; then
+for flag in $ax_pthread_flags; do
 
-BUSFAULT=no
+        case $flag in
+                none)
+                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
+printf %s "checking whether pthreads work without any flags... " >&6; }
+                ;;
 
-case x"$ac_cv_func_sigaction" in
-	xyes)
+                -*)
+                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
+printf %s "checking whether pthreads work with $flag... " >&6; }
+                PTHREAD_CFLAGS="$flag"
+                ;;
 
-$as_echo "#define HAVE_SIGACTION 1" >>confdefs.h
+                pthread-config)
+                # Extract the first word of "pthread-config", so it can be a program name with args.
+set dummy pthread-config; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ax_pthread_config+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if test -n "$ax_pthread_config"; then
+  ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ax_pthread_config="yes"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
-		BUSFAULT=yes
-		;;
-esac
+  test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
+fi
+fi
+ax_pthread_config=$ac_cv_prog_ax_pthread_config
+if test -n "$ax_pthread_config"; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
+printf "%s\n" "$ax_pthread_config" >&6; }
+else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
 
-case x"$BUSFAULT" in
-	xyes)
 
-$as_echo "#define BUSFAULT 1" >>confdefs.h
+                if test x"$ax_pthread_config" = xno; then continue; fi
+                PTHREAD_CFLAGS="`pthread-config --cflags`"
+                PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
+                ;;
 
-		;;
-esac
+                *)
+                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
+printf %s "checking for the pthreads library -l$flag... " >&6; }
+                PTHREAD_LIBS="-l$flag"
+                ;;
+        esac
 
- if test x"$BUSFAULT" = xyes; then
-  BUSFAULT_TRUE=
-  BUSFAULT_FALSE='#'
-else
-  BUSFAULT_TRUE='#'
-  BUSFAULT_FALSE=
+        save_LIBS="$LIBS"
+        save_CFLAGS="$CFLAGS"
+        LIBS="$PTHREAD_LIBS $LIBS"
+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
+
+        # Check for various functions.  We must include pthread.h,
+        # since some functions may be macros.  (On the Sequent, we
+        # need a special flag -Kthread to make this header compile.)
+        # We check for pthread_join because it is in -lpthread on IRIX
+        # while pthread_create is in libc.  We check for pthread_attr_init
+        # due to DEC craziness with -lpthreads.  We check for
+        # pthread_cleanup_push because it is one of the few pthread
+        # functions on Solaris that doesn't have a non-functional libc stub.
+        # We try pthread_create on general principles.
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <pthread.h>
+                        static void routine(void *a) { a = 0; }
+                        static void *start_routine(void *a) { return a; }
+int
+main (void)
+{
+pthread_t th; pthread_attr_t attr;
+                        pthread_create(&th, 0, start_routine, 0);
+                        pthread_join(th, 0);
+                        pthread_attr_init(&attr);
+                        pthread_cleanup_push(routine, 0);
+                        pthread_cleanup_pop(0) /* ; */
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+  ax_pthread_ok=yes
 fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
 
+        LIBS="$save_LIBS"
+        CFLAGS="$save_CFLAGS"
 
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
+printf "%s\n" "$ax_pthread_ok" >&6; }
+        if test "x$ax_pthread_ok" = xyes; then
+                break;
+        fi
 
+        PTHREAD_LIBS=""
+        PTHREAD_CFLAGS=""
+done
+fi
 
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSHMFENCE" >&5
-$as_echo_n "checking for XSHMFENCE... " >&6; }
+# Various other checks:
+if test "x$ax_pthread_ok" = xyes; then
+        save_LIBS="$LIBS"
+        LIBS="$PTHREAD_LIBS $LIBS"
+        save_CFLAGS="$CFLAGS"
+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
 
-if test -n "$XSHMFENCE_CFLAGS"; then
-    pkg_cv_XSHMFENCE_CFLAGS="$XSHMFENCE_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBXSHMFENCE\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$LIBXSHMFENCE") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_XSHMFENCE_CFLAGS=`$PKG_CONFIG --cflags "$LIBXSHMFENCE" 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-if test -n "$XSHMFENCE_LIBS"; then
-    pkg_cv_XSHMFENCE_LIBS="$XSHMFENCE_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBXSHMFENCE\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$LIBXSHMFENCE") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_XSHMFENCE_LIBS=`$PKG_CONFIG --libs "$LIBXSHMFENCE" 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
+        # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
+printf %s "checking for joinable pthread attribute... " >&6; }
+        attr_name=unknown
+        for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
+            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <pthread.h>
+int
+main (void)
+{
+int attr = $attr; return attr /* ; */
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+  attr_name=$attr; break
 fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+        done
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5
+printf "%s\n" "$attr_name" >&6; }
+        if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
+
+printf "%s\n" "#define PTHREAD_CREATE_JOINABLE $attr_name" >>confdefs.h
 
+        fi
 
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
+printf %s "checking if more special flags are required for pthreads... " >&6; }
+        flag=no
+        case ${host_os} in
+            aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";;
+            osf* | hpux*) flag="-D_REENTRANT";;
+            solaris*)
+            if test "$GCC" = "yes"; then
+                flag="-D_REENTRANT"
+            else
+                # TODO: What about Clang on Solaris?
+                flag="-mt -D_REENTRANT"
+            fi
+            ;;
+        esac
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $flag" >&5
+printf "%s\n" "$flag" >&6; }
+        if test "x$flag" != xno; then
+            PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
+        fi
 
-if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
+printf %s "checking for PTHREAD_PRIO_INHERIT... " >&6; }
+if test ${ax_cv_PTHREAD_PRIO_INHERIT+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
 
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
+                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <pthread.h>
+int
+main (void)
+{
+int i = PTHREAD_PRIO_INHERIT;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+  ax_cv_PTHREAD_PRIO_INHERIT=yes
+else $as_nop
+  ax_cv_PTHREAD_PRIO_INHERIT=no
 fi
-        if test $_pkg_short_errors_supported = yes; then
-	        XSHMFENCE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$LIBXSHMFENCE" 2>&1`
-        else
-	        XSHMFENCE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$LIBXSHMFENCE" 2>&1`
-        fi
-	# Put the nasty error message in config.log where it belongs
-	echo "$XSHMFENCE_PKG_ERRORS" >&5
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
 
-	HAVE_XSHMFENCE=no
-elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-	HAVE_XSHMFENCE=no
-else
-	XSHMFENCE_CFLAGS=$pkg_cv_XSHMFENCE_CFLAGS
-	XSHMFENCE_LIBS=$pkg_cv_XSHMFENCE_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-	HAVE_XSHMFENCE=yes
 fi
-if test "x$XSHMFENCE" = "xauto"; then
-    XSHMFENCE="$HAVE_XSHMFENCE"
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
+printf "%s\n" "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
+        if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"
+then :
+
+printf "%s\n" "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
+
 fi
 
-if test "x$XSHMFENCE" = "xyes"; then
-    if test "x$HAVE_XSHMFENCE" != "xyes"; then
-        as_fn_error $? "xshmfence requested but not installed." "$LINENO" 5
-    fi
+        LIBS="$save_LIBS"
+        CFLAGS="$save_CFLAGS"
 
-$as_echo "#define HAVE_XSHMFENCE 1" >>confdefs.h
+        # More AIX lossage: compile with *_r variant
+        if test "x$GCC" != xyes; then
+            case $host_os in
+                aix*)
+                case "x/$CC" in #(
+  x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
+    #handle absolute path differently from PATH based program lookup
+                   case "x$CC" in #(
+  x/*) :
+    if as_fn_executable_p ${CC}_r
+then :
+  PTHREAD_CC="${CC}_r"
+fi ;; #(
+  *) :
+    for ac_prog in ${CC}_r
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_PTHREAD_CC+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if test -n "$PTHREAD_CC"; then
+  ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_prog_PTHREAD_CC="$ac_prog"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
-    REQUIRED_LIBS="$REQUIRED_LIBS $LIBXSHMFENCE"
 fi
-
- if test "x$XSHMFENCE" = xyes; then
-  XSHMFENCE_TRUE=
-  XSHMFENCE_FALSE='#'
+fi
+PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
+if test -n "$PTHREAD_CC"; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
+printf "%s\n" "$PTHREAD_CC" >&6; }
 else
-  XSHMFENCE_TRUE='#'
-  XSHMFENCE_FALSE=
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 fi
 
 
-case "$DRI3,$XSHMFENCE" in
-	yes,yes | auto,yes)
-		;;
-	yes,no)
-		as_fn_error $? "DRI3 requested, but xshmfence not found." "$LINENO" 5
-		DRI3=no
-		;;
-	no,*)
-		;;
-	*)
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: DRI3 disabled because xshmfence not found." >&5
-$as_echo "$as_me: DRI3 disabled because xshmfence not found." >&6;}
-		DRI3=no
-		;;
+  test -n "$PTHREAD_CC" && break
+done
+test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
+ ;;
+esac ;; #(
+  *) :
+     ;;
 esac
+                ;;
+            esac
+        fi
+fi
 
-case x"$DRI3" in
-	xyes|xauto)
-		DRI3=yes
-
-$as_echo "#define DRI3 1" >>confdefs.h
-
-		DRI3_LIB='$(top_builddir)/dri3/libdri3.la'
-		SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $DRI3PROTO"
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: DRI3 enabled" >&5
-$as_echo "$as_me: DRI3 enabled" >&6;};
-		;;
-esac
+test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
 
- if test "x$DRI3" = xyes; then
-  DRI3_TRUE=
-  DRI3_FALSE='#'
-else
-  DRI3_TRUE='#'
-  DRI3_FALSE=
-fi
 
 
-if test "x$DRI" = xyes || test "x$DRI2" = xyes || test "x$DRI3" = xyes || test "x$CONFIG_UDEV_KMS" = xyes || test "x$XORG" = xyes; then
-	if test "x$DRM" = xyes; then
 
-$as_echo "#define WITH_LIBDRM 1" >>confdefs.h
 
+# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+if test x"$ax_pthread_ok" = xyes; then
 
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBDRM" >&5
-$as_echo_n "checking for LIBDRM... " >&6; }
+printf "%s\n" "#define HAVE_PTHREAD 1" >>confdefs.h
 
-if test -n "$LIBDRM_CFLAGS"; then
-    pkg_cv_LIBDRM_CFLAGS="$LIBDRM_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBDRM\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$LIBDRM") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_LIBDRM_CFLAGS=`$PKG_CONFIG --cflags "$LIBDRM" 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-if test -n "$LIBDRM_LIBS"; then
-    pkg_cv_LIBDRM_LIBS="$LIBDRM_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBDRM\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$LIBDRM") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_LIBDRM_LIBS=`$PKG_CONFIG --libs "$LIBDRM" 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
+        :
 else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
+        ax_pthread_ok=no
+        as_fn_error $? "threaded input requested but no pthread support has been found" "$LINENO" 5
 fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
+    SYS_LIBS="$SYS_LIBS $PTHREAD_LIBS"
+    CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
 
-if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+printf "%s\n" "#define INPUTTHREAD 1" >>confdefs.h
 
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi
-        if test $_pkg_short_errors_supported = yes; then
-	        LIBDRM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$LIBDRM" 2>&1`
-        else
-	        LIBDRM_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$LIBDRM" 2>&1`
-        fi
-	# Put the nasty error message in config.log where it belongs
-	echo "$LIBDRM_PKG_ERRORS" >&5
 
-	as_fn_error $? "Package requirements ($LIBDRM) were not met:
+    save_LIBS="$LIBS"
+    LIBS="$LIBS $SYS_LIBS"
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_setname_np(const char*)" >&5
+printf %s "checking for pthread_setname_np(const char*)... " >&6; }
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <pthread.h>
+int
+main (void)
+{
+pthread_setname_np("example")
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
 
-$LIBDRM_PKG_ERRORS
+printf "%s\n" "#define HAVE_PTHREAD_SETNAME_NP_WITHOUT_TID 1" >>confdefs.h
 
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
+else $as_nop
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_setname_np(pthread_t, const char*)" >&5
+printf %s "checking for pthread_setname_np(pthread_t, const char*)... " >&6; }
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <pthread.h>
+int
+main (void)
+{
+pthread_setname_np(pthread_self(), "example")
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
 
-Alternatively, you may set the environment variables LIBDRM_CFLAGS
-and LIBDRM_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details." "$LINENO" 5
-elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
+printf "%s\n" "#define HAVE_PTHREAD_SETNAME_NP_WITH_TID 1" >>confdefs.h
 
-Alternatively, you may set the environment variables LIBDRM_CFLAGS
-and LIBDRM_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
+else $as_nop
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+    LIBS="$save_LIBS"
+fi
 
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details" "$LINENO" 5; }
-else
-	LIBDRM_CFLAGS=$pkg_cv_LIBDRM_CFLAGS
-	LIBDRM_LIBS=$pkg_cv_LIBDRM_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+REQUIRED_MODULES="$FIXESPROTO $DAMAGEPROTO $XCMISCPROTO $XTRANS $BIGREQSPROTO $SDK_REQUIRED_MODULES"
 
-fi
-	fi
+LIBSYSTEMD="libsystemd >= 209"
+
+# Check whether --with-systemd-daemon was given.
+if test ${with_systemd_daemon+y}
+then :
+  withval=$with_systemd_daemon; WITH_SYSTEMD_DAEMON=$withval
+else $as_nop
+  WITH_SYSTEMD_DAEMON=auto
 fi
 
-if test "x$GLX" = xyes; then
+if test "x$WITH_SYSTEMD_DAEMON" = "xyes" -o "x$WITH_SYSTEMD_DAEMON" = "xauto" ; then
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XLIB" >&5
-$as_echo_n "checking for XLIB... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD_DAEMON" >&5
+printf %s "checking for SYSTEMD_DAEMON... " >&6; }
 
-if test -n "$XLIB_CFLAGS"; then
-    pkg_cv_XLIB_CFLAGS="$XLIB_CFLAGS"
+if test -n "$SYSTEMD_DAEMON_CFLAGS"; then
+    pkg_cv_SYSTEMD_DAEMON_CFLAGS="$SYSTEMD_DAEMON_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "x11") 2>&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBSYSTEMD\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$LIBSYSTEMD") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_XLIB_CFLAGS=`$PKG_CONFIG --cflags "x11" 2>/dev/null`
+  pkg_cv_SYSTEMD_DAEMON_CFLAGS=`$PKG_CONFIG --cflags "$LIBSYSTEMD" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -26991,16 +26977,16 @@ fi
  else
     pkg_failed=untried
 fi
-if test -n "$XLIB_LIBS"; then
-    pkg_cv_XLIB_LIBS="$XLIB_LIBS"
+if test -n "$SYSTEMD_DAEMON_LIBS"; then
+    pkg_cv_SYSTEMD_DAEMON_LIBS="$SYSTEMD_DAEMON_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "x11") 2>&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBSYSTEMD\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$LIBSYSTEMD") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_XLIB_LIBS=`$PKG_CONFIG --libs "x11" 2>/dev/null`
+  pkg_cv_SYSTEMD_DAEMON_LIBS=`$PKG_CONFIG --libs "$LIBSYSTEMD" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -27012,8 +26998,8 @@ fi
 
 
 if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -27021,60 +27007,28 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        XLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "x11" 2>&1`
+	        SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$LIBSYSTEMD" 2>&1`
         else
-	        XLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "x11" 2>&1`
+	        SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$LIBSYSTEMD" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
-	echo "$XLIB_PKG_ERRORS" >&5
-
-	as_fn_error $? "Package requirements (x11) were not met:
-
-$XLIB_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-Alternatively, you may set the environment variables XLIB_CFLAGS
-and XLIB_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details." "$LINENO" 5
-elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-Alternatively, you may set the environment variables XLIB_CFLAGS
-and XLIB_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details" "$LINENO" 5; }
-else
-	XLIB_CFLAGS=$pkg_cv_XLIB_CFLAGS
-	XLIB_LIBS=$pkg_cv_XLIB_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+	echo "$SYSTEMD_DAEMON_PKG_ERRORS" >&5
 
-fi
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GL" >&5
-$as_echo_n "checking for GL... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD_DAEMON" >&5
+printf %s "checking for SYSTEMD_DAEMON... " >&6; }
 
-if test -n "$GL_CFLAGS"; then
-    pkg_cv_GL_CFLAGS="$GL_CFLAGS"
+if test -n "$SYSTEMD_DAEMON_CFLAGS"; then
+    pkg_cv_SYSTEMD_DAEMON_CFLAGS="$SYSTEMD_DAEMON_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$GLPROTO \$LIBGL\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$GLPROTO $LIBGL") 2>&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_GL_CFLAGS=`$PKG_CONFIG --cflags "$GLPROTO $LIBGL" 2>/dev/null`
+  pkg_cv_SYSTEMD_DAEMON_CFLAGS=`$PKG_CONFIG --cflags "libsystemd-daemon" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -27082,16 +27036,16 @@ fi
  else
     pkg_failed=untried
 fi
-if test -n "$GL_LIBS"; then
-    pkg_cv_GL_LIBS="$GL_LIBS"
+if test -n "$SYSTEMD_DAEMON_LIBS"; then
+    pkg_cv_SYSTEMD_DAEMON_LIBS="$SYSTEMD_DAEMON_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$GLPROTO \$LIBGL\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$GLPROTO $LIBGL") 2>&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_GL_LIBS=`$PKG_CONFIG --libs "$GLPROTO $LIBGL" 2>/dev/null`
+  pkg_cv_SYSTEMD_DAEMON_LIBS=`$PKG_CONFIG --libs "libsystemd-daemon" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -27103,8 +27057,8 @@ fi
 
 
 if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -27112,215 +27066,146 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        GL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$GLPROTO $LIBGL" 2>&1`
+	        SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd-daemon" 2>&1`
         else
-	        GL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$GLPROTO $LIBGL" 2>&1`
+	        SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd-daemon" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
-	echo "$GL_PKG_ERRORS" >&5
-
-	as_fn_error $? "Package requirements ($GLPROTO $LIBGL) were not met:
-
-$GL_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
+	echo "$SYSTEMD_DAEMON_PKG_ERRORS" >&5
 
-Alternatively, you may set the environment variables GL_CFLAGS
-and GL_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details." "$LINENO" 5
+	HAVE_SYSTEMD_DAEMON=no
 elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-Alternatively, you may set the environment variables GL_CFLAGS
-and GL_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details" "$LINENO" 5; }
+     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+	HAVE_SYSTEMD_DAEMON=no
 else
-	GL_CFLAGS=$pkg_cv_GL_CFLAGS
-	GL_LIBS=$pkg_cv_GL_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
+	SYSTEMD_DAEMON_CFLAGS=$pkg_cv_SYSTEMD_DAEMON_CFLAGS
+	SYSTEMD_DAEMON_LIBS=$pkg_cv_SYSTEMD_DAEMON_LIBS
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+	HAVE_SYSTEMD_DAEMON=yes;
+					      LIBSYSTEMD_DAEMON=libsystemd-daemon
 fi
+elif test $pkg_failed = untried; then
+     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 
+pkg_failed=no
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD_DAEMON" >&5
+printf %s "checking for SYSTEMD_DAEMON... " >&6; }
 
-$as_echo "#define GLXEXT 1" >>confdefs.h
-
-	HASHTABLE=yes
-	GLX_LIBS='$(top_builddir)/glx/libglx.la $(top_builddir)/glx/libglxvnd.la'
-	GLX_SYS_LIBS="$GLX_SYS_LIBS $GL_LIBS"
+if test -n "$SYSTEMD_DAEMON_CFLAGS"; then
+    pkg_cv_SYSTEMD_DAEMON_CFLAGS="$SYSTEMD_DAEMON_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5
+  ac_status=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_SYSTEMD_DAEMON_CFLAGS=`$PKG_CONFIG --cflags "libsystemd-daemon" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
 else
-        GLX=no
+  pkg_failed=yes
 fi
- if test "x$GLX" = xyes; then
-  GLX_TRUE=
-  GLX_FALSE='#'
-else
-  GLX_TRUE='#'
-  GLX_FALSE=
+ else
+    pkg_failed=untried
 fi
-
-
- if test "x$HASHTABLE" = xyes; then
-  HASHTABLE_TRUE=
-  HASHTABLE_FALSE='#'
+if test -n "$SYSTEMD_DAEMON_LIBS"; then
+    pkg_cv_SYSTEMD_DAEMON_LIBS="$SYSTEMD_DAEMON_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5
+  ac_status=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_SYSTEMD_DAEMON_LIBS=`$PKG_CONFIG --libs "libsystemd-daemon" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
 else
-  HASHTABLE_TRUE='#'
-  HASHTABLE_FALSE=
+  pkg_failed=yes
 fi
-
-
-
-
-
- if test "x$PRESENT" = xyes; then
-  PRESENT_TRUE=
-  PRESENT_FALSE='#'
-else
-  PRESENT_TRUE='#'
-  PRESENT_FALSE=
+ else
+    pkg_failed=untried
 fi
 
-if test "x$PRESENT" = xyes; then
 
-$as_echo "#define PRESENT 1" >>confdefs.h
 
-	REQUIRED_MODULES="$REQUIRED_MODULES $PRESENTPROTO"
-	SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $PRESENTPROTO"
-	PRESENT_INC='-I$(top_srcdir)/present'
-	PRESENT_LIB='$(top_builddir)/present/libpresent.la'
-fi
+if test $pkg_failed = yes; then
+   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 
- if test "x$XINERAMA" = xyes; then
-  XINERAMA_TRUE=
-  XINERAMA_FALSE='#'
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
 else
-  XINERAMA_TRUE='#'
-  XINERAMA_FALSE=
-fi
-
-if test "x$XINERAMA" = xyes; then
-
-$as_echo "#define XINERAMA 1" >>confdefs.h
-
-
-$as_echo "#define PANORAMIX 1" >>confdefs.h
-
-	REQUIRED_MODULES="$REQUIRED_MODULES $XINERAMAPROTO"
-	SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $XINERAMAPROTO"
+        _pkg_short_errors_supported=no
 fi
+        if test $_pkg_short_errors_supported = yes; then
+	        SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd-daemon" 2>&1`
+        else
+	        SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd-daemon" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$SYSTEMD_DAEMON_PKG_ERRORS" >&5
 
- if test "x$XACE" = xyes; then
-  XACE_TRUE=
-  XACE_FALSE='#'
+	HAVE_SYSTEMD_DAEMON=no
+elif test $pkg_failed = untried; then
+     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+	HAVE_SYSTEMD_DAEMON=no
 else
-  XACE_TRUE='#'
-  XACE_FALSE=
-fi
-
-if test "x$XACE" = xyes; then
-
-$as_echo "#define XACE 1" >>confdefs.h
-
+	SYSTEMD_DAEMON_CFLAGS=$pkg_cv_SYSTEMD_DAEMON_CFLAGS
+	SYSTEMD_DAEMON_LIBS=$pkg_cv_SYSTEMD_DAEMON_LIBS
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+	HAVE_SYSTEMD_DAEMON=yes;
+					      LIBSYSTEMD_DAEMON=libsystemd-daemon
 fi
-
- if test "x$XSELINUX" = xyes; then
-  XSELINUX_TRUE=
-  XSELINUX_FALSE='#'
 else
-  XSELINUX_TRUE='#'
-  XSELINUX_FALSE=
+	SYSTEMD_DAEMON_CFLAGS=$pkg_cv_SYSTEMD_DAEMON_CFLAGS
+	SYSTEMD_DAEMON_LIBS=$pkg_cv_SYSTEMD_DAEMON_LIBS
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+	HAVE_SYSTEMD_DAEMON=yes;
+			   LIBSYSTEMD_DAEMON="$LIBSYSTEMD"
 fi
+	if test "x$HAVE_SYSTEMD_DAEMON" = xyes; then
 
-if test "x$XSELINUX" = xyes; then
-	if test "x$XACE" != xyes; then
-		as_fn_error $? "cannot build SELinux extension without X-ACE" "$LINENO" 5
-	fi
-	for ac_header in libaudit.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "libaudit.h" "ac_cv_header_libaudit_h" "$ac_includes_default"
-if test "x$ac_cv_header_libaudit_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBAUDIT_H 1
-_ACEOF
+printf "%s\n" "#define HAVE_SYSTEMD_DAEMON 1" >>confdefs.h
 
-else
-  as_fn_error $? "SELinux extension requires audit system headers" "$LINENO" 5
+		REQUIRED_LIBS="$REQUIRED_LIBS $LIBSYSTEMD_DAEMON"
+	elif test "x$WITH_SYSTEMD_DAEMON" = xyes; then
+		as_fn_error $? "systemd support requested but no library has been found" "$LINENO" 5
+	fi
 fi
-
-done
-
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for audit_open in -laudit" >&5
-$as_echo_n "checking for audit_open in -laudit... " >&6; }
-if ${ac_cv_lib_audit_audit_open+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-laudit  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char audit_open ();
-int
-main ()
-{
-return audit_open ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_audit_audit_open=yes
+ if test "x$HAVE_SYSTEMD_DAEMON" = "xyes"; then
+  HAVE_SYSTEMD_DAEMON_TRUE=
+  HAVE_SYSTEMD_DAEMON_FALSE='#'
 else
-  ac_cv_lib_audit_audit_open=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_audit_audit_open" >&5
-$as_echo "$ac_cv_lib_audit_audit_open" >&6; }
-if test "x$ac_cv_lib_audit_audit_open" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBAUDIT 1
-_ACEOF
+  HAVE_SYSTEMD_DAEMON_TRUE='#'
+  HAVE_SYSTEMD_DAEMON_FALSE=
+fi
 
-  LIBS="-laudit $LIBS"
 
-else
-  as_fn_error $? "SELinux extension requires audit system library" "$LINENO" 5
+if test "x$CONFIG_UDEV" = xyes && test "x$CONFIG_HAL" = xyes; then
+	as_fn_error $? "Hotplugging through both libudev and hal not allowed" "$LINENO" 5
 fi
 
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SELINUX" >&5
-$as_echo_n "checking for SELINUX... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for UDEV" >&5
+printf %s "checking for UDEV... " >&6; }
 
-if test -n "$SELINUX_CFLAGS"; then
-    pkg_cv_SELINUX_CFLAGS="$SELINUX_CFLAGS"
+if test -n "$UDEV_CFLAGS"; then
+    pkg_cv_UDEV_CFLAGS="$UDEV_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBSELINUX\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$LIBSELINUX") 2>&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBUDEV\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$LIBUDEV") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_SELINUX_CFLAGS=`$PKG_CONFIG --cflags "$LIBSELINUX" 2>/dev/null`
+  pkg_cv_UDEV_CFLAGS=`$PKG_CONFIG --cflags "$LIBUDEV" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -27328,16 +27213,16 @@ fi
  else
     pkg_failed=untried
 fi
-if test -n "$SELINUX_LIBS"; then
-    pkg_cv_SELINUX_LIBS="$SELINUX_LIBS"
+if test -n "$UDEV_LIBS"; then
+    pkg_cv_UDEV_LIBS="$UDEV_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBSELINUX\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$LIBSELINUX") 2>&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBUDEV\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$LIBUDEV") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_SELINUX_LIBS=`$PKG_CONFIG --libs "$LIBSELINUX" 2>/dev/null`
+  pkg_cv_UDEV_LIBS=`$PKG_CONFIG --libs "$LIBUDEV" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -27349,8 +27234,8 @@ fi
 
 
 if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -27358,764 +27243,1109 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        SELINUX_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$LIBSELINUX" 2>&1`
+	        UDEV_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$LIBUDEV" 2>&1`
         else
-	        SELINUX_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$LIBSELINUX" 2>&1`
+	        UDEV_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$LIBUDEV" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
-	echo "$SELINUX_PKG_ERRORS" >&5
-
-	as_fn_error $? "Package requirements ($LIBSELINUX) were not met:
-
-$SELINUX_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
+	echo "$UDEV_PKG_ERRORS" >&5
 
-Alternatively, you may set the environment variables SELINUX_CFLAGS
-and SELINUX_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details." "$LINENO" 5
+	HAVE_LIBUDEV=no
 elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-Alternatively, you may set the environment variables SELINUX_CFLAGS
-and SELINUX_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details" "$LINENO" 5; }
+     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+	HAVE_LIBUDEV=no
 else
-	SELINUX_CFLAGS=$pkg_cv_SELINUX_CFLAGS
-	SELINUX_LIBS=$pkg_cv_SELINUX_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
+	UDEV_CFLAGS=$pkg_cv_UDEV_CFLAGS
+	UDEV_LIBS=$pkg_cv_UDEV_LIBS
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+	HAVE_LIBUDEV=yes
 fi
-	SELINUX_LIBS="$SELINUX_LIBS -laudit"
-
-$as_echo "#define XSELINUX 1" >>confdefs.h
-
+if test "x$CONFIG_UDEV" = xauto; then
+	CONFIG_UDEV="$HAVE_LIBUDEV"
 fi
-
- if test "x$XCSECURITY" = xyes; then
-  XCSECURITY_TRUE=
-  XCSECURITY_FALSE='#'
+ if test "x$CONFIG_UDEV" = xyes; then
+  CONFIG_UDEV_TRUE=
+  CONFIG_UDEV_FALSE='#'
 else
-  XCSECURITY_TRUE='#'
-  XCSECURITY_FALSE=
+  CONFIG_UDEV_TRUE='#'
+  CONFIG_UDEV_FALSE=
 fi
 
-if test "x$XCSECURITY" = xyes; then
-	if test "x$XACE" != xyes; then
-		as_fn_error $? "cannot build Security extension without X-ACE" "$LINENO" 5
+if test "x$CONFIG_UDEV" = xyes; then
+	CONFIG_HAL=no
+	if test "x$CONFIG_UDEV_KMS" = xauto; then
+		CONFIG_UDEV_KMS="$HAVE_LIBUDEV"
+	fi
+	if ! test "x$HAVE_LIBUDEV" = xyes; then
+		as_fn_error $? "udev configuration API requested, but libudev is not installed" "$LINENO" 5
 	fi
 
-$as_echo "#define XCSECURITY 1" >>confdefs.h
+printf "%s\n" "#define CONFIG_UDEV 1" >>confdefs.h
 
-fi
+	if test "x$CONFIG_UDEV_KMS" = xyes; then
 
- if test "x$DBE" = xyes; then
-  DBE_TRUE=
-  DBE_FALSE='#'
-else
-  DBE_TRUE='#'
-  DBE_FALSE=
-fi
+printf "%s\n" "#define CONFIG_UDEV_KMS 1" >>confdefs.h
 
-if test "x$DBE" = xyes; then
+	fi
+	SAVE_LIBS=$LIBS
+	SAVE_CFLAGS=$CFLAGS
+	CFLAGS="$CFLAGS $UDEV_CFLAGS"
+	LIBS=$UDEV_LIBS
+	ac_fn_c_check_func "$LINENO" "udev_monitor_filter_add_match_tag" "ac_cv_func_udev_monitor_filter_add_match_tag"
+if test "x$ac_cv_func_udev_monitor_filter_add_match_tag" = xyes
+then :
+  printf "%s\n" "#define HAVE_UDEV_MONITOR_FILTER_ADD_MATCH_TAG 1" >>confdefs.h
 
-$as_echo "#define DBE 1" >>confdefs.h
+fi
+
+	ac_fn_c_check_func "$LINENO" "udev_enumerate_add_match_tag" "ac_cv_func_udev_enumerate_add_match_tag"
+if test "x$ac_cv_func_udev_enumerate_add_match_tag" = xyes
+then :
+  printf "%s\n" "#define HAVE_UDEV_ENUMERATE_ADD_MATCH_TAG 1" >>confdefs.h
 
-	DBE_LIB='$(top_builddir)/dbe/libdbe.la'
-	DBE_INC='-I$(top_srcdir)/dbe'
 fi
 
- if test "x$XF86BIGFONT" = xyes; then
-  XF86BIGFONT_TRUE=
-  XF86BIGFONT_FALSE='#'
+	LIBS=$SAVE_LIBS
+	CFLAGS=$SAVE_CFLAGS
+fi
+ if test "x$CONFIG_UDEV_KMS" = xyes; then
+  CONFIG_UDEV_KMS_TRUE=
+  CONFIG_UDEV_KMS_FALSE='#'
 else
-  XF86BIGFONT_TRUE='#'
-  XF86BIGFONT_FALSE=
+  CONFIG_UDEV_KMS_TRUE='#'
+  CONFIG_UDEV_KMS_FALSE=
 fi
 
-if test "x$XF86BIGFONT" = xyes; then
 
-$as_echo "#define XF86BIGFONT 1" >>confdefs.h
 
-	REQUIRED_MODULES="$REQUIRED_MODULES $BIGFONTPROTO"
-	SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $BIGFONTPROTO"
-fi
+pkg_failed=no
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for DBUS" >&5
+printf %s "checking for DBUS... " >&6; }
 
- if test "x$DPMSExtension" = xyes; then
-  DPMSExtension_TRUE=
-  DPMSExtension_FALSE='#'
+if test -n "$DBUS_CFLAGS"; then
+    pkg_cv_DBUS_CFLAGS="$DBUS_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBDBUS\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$LIBDBUS") 2>&5
+  ac_status=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_DBUS_CFLAGS=`$PKG_CONFIG --cflags "$LIBDBUS" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
 else
-  DPMSExtension_TRUE='#'
-  DPMSExtension_FALSE=
+  pkg_failed=yes
 fi
-
-if test "x$DPMSExtension" = xyes; then
-
-$as_echo "#define DPMSExtension 1" >>confdefs.h
-
+ else
+    pkg_failed=untried
+fi
+if test -n "$DBUS_LIBS"; then
+    pkg_cv_DBUS_LIBS="$DBUS_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBDBUS\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$LIBDBUS") 2>&5
+  ac_status=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_DBUS_LIBS=`$PKG_CONFIG --libs "$LIBDBUS" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
 fi
 
 
-$as_echo "#define RENDER 1" >>confdefs.h
 
-RENDER_LIB='$(top_builddir)/render/librender.la'
-RENDER_INC='-I$(top_srcdir)/render'
+if test $pkg_failed = yes; then
+   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+	        DBUS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$LIBDBUS" 2>&1`
+        else
+	        DBUS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$LIBDBUS" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$DBUS_PKG_ERRORS" >&5
 
-$as_echo "#define RANDR 1" >>confdefs.h
+	HAVE_DBUS=no
+elif test $pkg_failed = untried; then
+     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+	HAVE_DBUS=no
+else
+	DBUS_CFLAGS=$pkg_cv_DBUS_CFLAGS
+	DBUS_LIBS=$pkg_cv_DBUS_LIBS
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+	HAVE_DBUS=yes
+fi
+if test "x$HAVE_DBUS" = xyes; then
 
-RANDR_LIB='$(top_builddir)/randr/librandr.la'
-RANDR_INC='-I$(top_srcdir)/randr'
+printf "%s\n" "#define HAVE_DBUS 1" >>confdefs.h
 
+fi
+ if test "x$HAVE_DBUS" = xyes; then
+  HAVE_DBUS_TRUE=
+  HAVE_DBUS_FALSE='#'
+else
+  HAVE_DBUS_TRUE='#'
+  HAVE_DBUS_FALSE=
+fi
 
-$as_echo "#define XFIXES 1" >>confdefs.h
 
-FIXES_LIB='$(top_builddir)/xfixes/libxfixes.la'
-FIXES_INC='-I$(top_srcdir)/xfixes'
 
+pkg_failed=no
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for HAL" >&5
+printf %s "checking for HAL... " >&6; }
 
-$as_echo "#define DAMAGE 1" >>confdefs.h
+if test -n "$HAL_CFLAGS"; then
+    pkg_cv_HAL_CFLAGS="$HAL_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"hal\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "hal") 2>&5
+  ac_status=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_HAL_CFLAGS=`$PKG_CONFIG --cflags "hal" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$HAL_LIBS"; then
+    pkg_cv_HAL_LIBS="$HAL_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"hal\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "hal") 2>&5
+  ac_status=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_HAL_LIBS=`$PKG_CONFIG --libs "hal" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
 
-DAMAGE_LIB='$(top_builddir)/damageext/libdamageext.la'
-DAMAGE_INC='-I$(top_srcdir)/damageext'
-MIEXT_DAMAGE_LIB='$(top_builddir)/miext/damage/libdamage.la'
-MIEXT_DAMAGE_INC='-I$(top_srcdir)/miext/damage'
 
-# XINPUT extension is integral part of the server
 
-$as_echo "#define XINPUT 1" >>confdefs.h
+if test $pkg_failed = yes; then
+   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 
-XI_LIB='$(top_builddir)/Xi/libXi.la'
-XI_INC='-I$(top_srcdir)/Xi'
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+	        HAL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "hal" 2>&1`
+        else
+	        HAL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "hal" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$HAL_PKG_ERRORS" >&5
 
- if test "x$XF86UTILS" = xyes; then
-  XF86UTILS_TRUE=
-  XF86UTILS_FALSE='#'
+	HAVE_HAL=no
+elif test $pkg_failed = untried; then
+     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+	HAVE_HAL=no
 else
-  XF86UTILS_TRUE='#'
-  XF86UTILS_FALSE=
+	HAL_CFLAGS=$pkg_cv_HAL_CFLAGS
+	HAL_LIBS=$pkg_cv_HAL_LIBS
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+	HAVE_HAL=yes
+fi
+if test "x$CONFIG_HAL" = xauto; then
+	CONFIG_HAL="$HAVE_HAL"
 fi
+if test "x$CONFIG_HAL" = xyes; then
+	if ! test "x$HAVE_HAL" = xyes; then
+		as_fn_error $? "HAL hotplug API requested, but HAL is not installed." "$LINENO" 5
+	fi
 
- if test "x$VGAHW" = xyes; then
-  VGAHW_TRUE=
-  VGAHW_FALSE='#'
-else
-  VGAHW_TRUE='#'
-  VGAHW_FALSE=
-fi
 
- if test "x$VBE" = xyes; then
-  VBE_TRUE=
-  VBE_FALSE='#'
-else
-  VBE_TRUE='#'
-  VBE_FALSE=
-fi
+printf "%s\n" "#define CONFIG_HAL 1" >>confdefs.h
 
- if test "x$INT10MODULE" = xyes; then
-  INT10MODULE_TRUE=
-  INT10MODULE_FALSE='#'
+	NEED_DBUS="yes"
+fi
+ if test "x$CONFIG_HAL" = xyes; then
+  CONFIG_HAL_TRUE=
+  CONFIG_HAL_FALSE='#'
 else
-  INT10MODULE_TRUE='#'
-  INT10MODULE_FALSE=
+  CONFIG_HAL_TRUE='#'
+  CONFIG_HAL_FALSE=
 fi
 
 
+if test "x$SYSTEMD_LOGIND" = xauto; then
+        if test "x$HAVE_DBUS" = xyes -a "x$CONFIG_UDEV" = xyes ; then
+                SYSTEMD_LOGIND=yes
+        else
+                SYSTEMD_LOGIND=no
+        fi
+fi
+if test "x$SYSTEMD_LOGIND" = xyes; then
+        if ! test "x$HAVE_DBUS" = xyes; then
+                as_fn_error $? "systemd-logind requested, but D-Bus is not installed." "$LINENO" 5
+        fi
+        if ! test "x$CONFIG_UDEV" = xyes ; then
+                as_fn_error $? "systemd-logind is only supported in combination with udev configuration." "$LINENO" 5
+        fi
 
-$as_echo "#define SHAPE 1" >>confdefs.h
 
+printf "%s\n" "#define SYSTEMD_LOGIND 1" >>confdefs.h
 
-if test "x$XKBPATH" = "xauto"; then
-    XKBPATH=$(pkg-config --variable datadir xkbcomp || echo ${datadir})/X11/xkb
+        NEED_DBUS="yes"
+fi
+ if test "x$SYSTEMD_LOGIND" = xyes; then
+  SYSTEMD_LOGIND_TRUE=
+  SYSTEMD_LOGIND_FALSE='#'
+else
+  SYSTEMD_LOGIND_TRUE='#'
+  SYSTEMD_LOGIND_FALSE=
 fi
 
 
+if test "x$SUID_WRAPPER" = xyes; then
+
   prefix_NONE=
   exec_prefix_NONE=
   test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
   test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
-  eval ac_define_dir="\"$XKBPATH\""
+  eval ac_define_dir="\"$libexecdir\""
   eval ac_define_dir="\"$ac_define_dir\""
-  XKB_BASE_DIRECTORY="$ac_define_dir"
+  SUID_WRAPPER_DIR="$ac_define_dir"
 
 
-cat >>confdefs.h <<_ACEOF
-#define XKB_BASE_DIRECTORY "$ac_define_dir"
-_ACEOF
+printf "%s\n" "#define SUID_WRAPPER_DIR \"$ac_define_dir\"" >>confdefs.h
 
   test "$prefix_NONE" && prefix=NONE
   test "$exec_prefix_NONE" && exec_prefix=NONE
 
-
-# Check whether --with-xkb-bin-directory was given.
-if test "${with_xkb_bin_directory+set}" = set; then :
-  withval=$with_xkb_bin_directory; XKB_BIN_DIRECTORY="$withval"
+        SETUID="no"
+fi
+ if test "x$SUID_WRAPPER" = xyes; then
+  SUID_WRAPPER_TRUE=
+  SUID_WRAPPER_FALSE='#'
 else
-  XKB_BIN_DIRECTORY="auto"
+  SUID_WRAPPER_TRUE='#'
+  SUID_WRAPPER_FALSE=
 fi
 
 
-if test "x$XKB_BIN_DIRECTORY" = "xauto"; then
-    XKB_BIN_DIRECTORY=$(pkg-config --variable bindir xkbcomp || echo ${bindir})
-fi
+if test "x$NEED_DBUS" = xyes; then
 
+printf "%s\n" "#define NEED_DBUS 1" >>confdefs.h
 
-  prefix_NONE=
-  exec_prefix_NONE=
-  test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
-  test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
-  eval ac_define_dir="\"$XKB_BIN_DIRECTORY\""
-  eval ac_define_dir="\"$ac_define_dir\""
-  XKB_BIN_DIRECTORY="$ac_define_dir"
+fi
+ if test "x$NEED_DBUS" = xyes; then
+  NEED_DBUS_TRUE=
+  NEED_DBUS_FALSE='#'
+else
+  NEED_DBUS_TRUE='#'
+  NEED_DBUS_FALSE=
+fi
 
 
-cat >>confdefs.h <<_ACEOF
-#define XKB_BIN_DIRECTORY "$ac_define_dir"
-_ACEOF
+if test "x$CONFIG_WSCONS" = xauto; then
+	case $host_os in
+		*openbsd*)
+			CONFIG_WSCONS=yes;
+			;;
+		*)
+			CONFIG_WSCONS=no;
+			;;
+	esac
+fi
+ if test "x$CONFIG_WSCONS" = xyes; then
+  CONFIG_WSCONS_TRUE=
+  CONFIG_WSCONS_FALSE='#'
+else
+  CONFIG_WSCONS_TRUE='#'
+  CONFIG_WSCONS_FALSE=
+fi
 
-  test "$prefix_NONE" && prefix=NONE
-  test "$exec_prefix_NONE" && exec_prefix=NONE
+if test "x$CONFIG_WSCONS" = xyes; then
 
+printf "%s\n" "#define CONFIG_WSCONS 1" >>confdefs.h
 
-XKBOUTPUT_FIRSTCHAR=`echo $XKBOUTPUT | cut -b 1`
-if [ x$XKBOUTPUT_FIRSTCHAR != x/ -a x$XKBOUTPUT_FIRSTCHAR != 'x$' ] ; then
-   XKBOUTPUT="$XKB_BASE_DIRECTORY/$XKBOUTPUT"
 fi
 
 
-XKBOUTPUT=`echo $XKBOUTPUT/ | $SED 's|/*$|/|'`
-XKB_COMPILED_DIR=`echo $XKBOUTPUT | $SED 's|/*$||'`
-
-  prefix_NONE=
-  exec_prefix_NONE=
-  test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
-  test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
-  eval ac_define_dir="\"$XKBOUTPUT\""
-  eval ac_define_dir="\"$ac_define_dir\""
-  XKM_OUTPUT_DIR="$ac_define_dir"
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for glibc..." >&5
+printf %s "checking for glibc...... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+#include <features.h>
+#ifndef __GLIBC__
+#error
+#endif
 
-cat >>confdefs.h <<_ACEOF
-#define XKM_OUTPUT_DIR "$ac_define_dir"
 _ACEOF
-
-  test "$prefix_NONE" && prefix=NONE
-  test "$exec_prefix_NONE" && exec_prefix=NONE
-
-
-
-if test "x$XKB_DFLT_RULES" = x; then
-    case $host_os in
-    linux*)
-                XKB_DFLT_RULES="evdev"
-        ;;
-    *)
-        XKB_DFLT_RULES="base"
-        ;;
-    esac
+if ac_fn_c_try_cpp "$LINENO"
+then :
+  glibc=yes
+else $as_nop
+  glibc=no
 fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $glibc" >&5
+printf "%s\n" "$glibc" >&6; }
 
-cat >>confdefs.h <<_ACEOF
-#define XKB_DFLT_RULES "$XKB_DFLT_RULES"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define XKB_DFLT_MODEL "$XKB_DFLT_MODEL"
-_ACEOF
 
+  for ac_func in clock_gettime
+do :
+  ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
+if test "x$ac_cv_func_clock_gettime" = xyes
+then :
+  printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
+ have_clock_gettime=yes
+else $as_nop
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
+printf %s "checking for clock_gettime in -lrt... " >&6; }
+if test ${ac_cv_lib_rt_clock_gettime+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lrt  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-cat >>confdefs.h <<_ACEOF
-#define XKB_DFLT_LAYOUT "$XKB_DFLT_LAYOUT"
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+char clock_gettime ();
+int
+main (void)
+{
+return clock_gettime ();
+  ;
+  return 0;
+}
 _ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+  ac_cv_lib_rt_clock_gettime=yes
+else $as_nop
+  ac_cv_lib_rt_clock_gettime=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
+printf "%s\n" "$ac_cv_lib_rt_clock_gettime" >&6; }
+if test "x$ac_cv_lib_rt_clock_gettime" = xyes
+then :
+  have_clock_gettime=-lrt
+else $as_nop
+  have_clock_gettime=no
+fi
 
+fi
 
-cat >>confdefs.h <<_ACEOF
-#define XKB_DFLT_VARIANT "$XKB_DFLT_VARIANT"
-_ACEOF
-
+done
 
-cat >>confdefs.h <<_ACEOF
-#define XKB_DFLT_OPTIONS "$XKB_DFLT_OPTIONS"
-_ACEOF
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a useful monotonic clock ..." >&5
+printf %s "checking for a useful monotonic clock ...... " >&6; }
 
+if ! test "x$have_clock_gettime" = xno; then
+    if ! test "x$have_clock_gettime" = xyes; then
+        CLOCK_LIBS="$have_clock_gettime"
+    else
+        CLOCK_LIBS=""
+    fi
 
+    LIBS_SAVE="$LIBS"
+    LIBS="$CLOCK_LIBS"
+    CPPFLAGS_SAVE="$CPPFLAGS"
 
+    if test x"$glibc" = xyes; then
+        CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE=200112L"
+    fi
 
+    if test "$cross_compiling" = yes
+then :
+  MONOTONIC_CLOCK="cross compiling"
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+#include <time.h>
 
+int main(int argc, char *argv[]) {
+    struct timespec tp;
 
-XKB_LIB='$(top_builddir)/xkb/libxkb.la'
-XKB_STUB_LIB='$(top_builddir)/xkb/libxkbstubs.la'
-REQUIRED_MODULES="$REQUIRED_MODULES xkbfile"
+    if (clock_gettime(CLOCK_MONOTONIC, &tp) == 0)
+        return 0;
+    else
+        return 1;
+}
 
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  MONOTONIC_CLOCK=yes
+else $as_nop
+  MONOTONIC_CLOCK=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
 
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XDMCP" >&5
-$as_echo_n "checking for XDMCP... " >&6; }
 
-if test -n "$XDMCP_CFLAGS"; then
-    pkg_cv_XDMCP_CFLAGS="$XDMCP_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xdmcp\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "xdmcp") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_XDMCP_CFLAGS=`$PKG_CONFIG --cflags "xdmcp" 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
+    if test "$MONOTONIC_CLOCK" = "cross compiling"; then
+        ac_fn_check_decl "$LINENO" "CLOCK_MONOTONIC" "ac_cv_have_decl_CLOCK_MONOTONIC" "#include <time.h>
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_CLOCK_MONOTONIC" = xyes
+then :
+  MONOTONIC_CLOCK="guessing yes"
+else $as_nop
+  MONOTONIC_CLOCK=no
 fi
-if test -n "$XDMCP_LIBS"; then
-    pkg_cv_XDMCP_LIBS="$XDMCP_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xdmcp\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "xdmcp") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_XDMCP_LIBS=`$PKG_CONFIG --libs "xdmcp" 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
+    fi
+
+    LIBS="$LIBS_SAVE"
+    CPPFLAGS="$CPPFLAGS_SAVE"
 else
-  pkg_failed=yes
+    MONOTONIC_CLOCK=no
 fi
- else
-    pkg_failed=untried
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MONOTONIC_CLOCK" >&5
+printf "%s\n" "$MONOTONIC_CLOCK" >&6; }
+if test "$MONOTONIC_CLOCK" = "guessing yes"; then
+	MONOTONIC_CLOCK=yes
 fi
 
+if test "x$MONOTONIC_CLOCK" = xyes; then
 
+printf "%s\n" "#define MONOTONIC_CLOCK 1" >>confdefs.h
 
-if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+    LIBS="$LIBS $CLOCK_LIBS"
+fi
 
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
+ if test "x$XV" = xyes; then
+  XV_TRUE=
+  XV_FALSE='#'
 else
-        _pkg_short_errors_supported=no
+  XV_TRUE='#'
+  XV_FALSE=
 fi
-        if test $_pkg_short_errors_supported = yes; then
-	        XDMCP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "xdmcp" 2>&1`
-        else
-	        XDMCP_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "xdmcp" 2>&1`
-        fi
-	# Put the nasty error message in config.log where it belongs
-	echo "$XDMCP_PKG_ERRORS" >&5
 
-	have_libxdmcp="no"
-elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-	have_libxdmcp="no"
+if test "x$XV" = xyes; then
+
+printf "%s\n" "#define XV 1" >>confdefs.h
+
+
+printf "%s\n" "#define XvExtension 1" >>confdefs.h
+
+	REQUIRED_MODULES="$REQUIRED_MODULES $VIDEOPROTO"
+	SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $VIDEOPROTO"
 else
-	XDMCP_CFLAGS=$pkg_cv_XDMCP_CFLAGS
-	XDMCP_LIBS=$pkg_cv_XDMCP_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-	have_libxdmcp="yes"
+	XVMC=no
 fi
-if test "x$XDMCP" = xauto; then
-	if test "x$have_libxdmcp" = xyes; then
-		XDMCP=yes
-	else
-		XDMCP=no
-	fi
+
+ if test "x$XVMC" = xyes; then
+  XVMC_TRUE=
+  XVMC_FALSE='#'
+else
+  XVMC_TRUE='#'
+  XVMC_FALSE=
 fi
-if test "x$XDMAUTH" = xauto; then
-	if test "x$have_libxdmcp" = xyes; then
-		XDMAUTH=yes
-	else
-		XDMAUTH=no
-	fi
+
+if test "x$XVMC" = xyes; then
+
+printf "%s\n" "#define XvMCExtension 1" >>confdefs.h
+
 fi
 
- if test "x$XDMCP" = xyes; then
-  XDMCP_TRUE=
-  XDMCP_FALSE='#'
+ if test "x$COMPOSITE" = xyes; then
+  COMPOSITE_TRUE=
+  COMPOSITE_FALSE='#'
 else
-  XDMCP_TRUE='#'
-  XDMCP_FALSE=
+  COMPOSITE_TRUE='#'
+  COMPOSITE_FALSE=
 fi
 
-if test "x$XDMCP" = xyes; then
+if test "x$COMPOSITE" = xyes; then
 
-$as_echo "#define XDMCP 1" >>confdefs.h
+printf "%s\n" "#define COMPOSITE 1" >>confdefs.h
 
-	REQUIRED_LIBS="$REQUIRED_LIBS xdmcp"
-	XDMCP_MODULES="xdmcp"
+	REQUIRED_MODULES="$REQUIRED_MODULES $COMPOSITEPROTO"
+	COMPOSITE_LIB='$(top_builddir)/composite/libcomposite.la'
+	COMPOSITE_INC='-I$(top_srcdir)/composite'
 fi
 
- if test "x$XDMAUTH" = xyes; then
-  XDMAUTH_TRUE=
-  XDMAUTH_FALSE='#'
+if test "x$MITSHM" = xauto; then
+	MITSHM="$ac_cv_sysv_ipc"
+fi
+ if test "x$MITSHM" = xyes; then
+  MITSHM_TRUE=
+  MITSHM_FALSE='#'
 else
-  XDMAUTH_TRUE='#'
-  XDMAUTH_FALSE=
+  MITSHM_TRUE='#'
+  MITSHM_FALSE=
 fi
 
-if test "x$XDMAUTH" = xyes; then
+if test "x$MITSHM" = xyes; then
 
-$as_echo "#define HASXDMAUTH 1" >>confdefs.h
+printf "%s\n" "#define MITSHM 1" >>confdefs.h
+
+
+printf "%s\n" "#define HAS_SHM 1" >>confdefs.h
 
-	if ! test "x$XDMCP" = xyes; then
-		REQUIRED_LIBS="$REQUIRED_LIBS xdmcp"
-		XDMCP_MODULES="xdmcp"
-	fi
 fi
 
-if test "x$XF86VIDMODE" = xauto; then
-	if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$VIDMODEPROTO\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$VIDMODEPROTO") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  XF86VIDMODE=yes
+ if test "x$RECORD" = xyes; then
+  RECORD_TRUE=
+  RECORD_FALSE='#'
 else
-  XF86VIDMODE=no
-fi
+  RECORD_TRUE='#'
+  RECORD_FALSE=
 fi
-if test "x$XF86VIDMODE" = xyes; then
 
-$as_echo "#define XF86VIDMODE 1" >>confdefs.h
+if test "x$RECORD" = xyes; then
+
+printf "%s\n" "#define XRECORD 1" >>confdefs.h
 
+	REQUIRED_MODULES="$REQUIRED_MODULES $RECORDPROTO"
+	RECORD_LIB='$(top_builddir)/record/librecord.la'
 fi
- if test "x$XF86VIDMODE" = xyes; then
-  XF86VIDMODE_TRUE=
-  XF86VIDMODE_FALSE='#'
+
+ if test "x$SCREENSAVER" = xyes; then
+  SCREENSAVER_TRUE=
+  SCREENSAVER_FALSE='#'
 else
-  XF86VIDMODE_TRUE='#'
-  XF86VIDMODE_FALSE=
+  SCREENSAVER_TRUE='#'
+  SCREENSAVER_FALSE=
 fi
 
+if test "x$SCREENSAVER" = xyes; then
 
+printf "%s\n" "#define SCREENSAVER 1" >>confdefs.h
 
-  prefix_NONE=
-  exec_prefix_NONE=
-  test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
-  test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
-  eval ac_define_dir="\"$FONTPATH\""
-  eval ac_define_dir="\"$ac_define_dir\""
-  COMPILEDDEFAULTFONTPATH="$ac_define_dir"
+	REQUIRED_MODULES="$REQUIRED_MODULES $SCRNSAVERPROTO"
+	SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $SCRNSAVERPROTO"
+fi
 
+HASHTABLE=no
+ if test "x$RES" = xyes; then
+  RES_TRUE=
+  RES_FALSE='#'
+else
+  RES_TRUE='#'
+  RES_FALSE=
+fi
 
-cat >>confdefs.h <<_ACEOF
-#define COMPILEDDEFAULTFONTPATH "$ac_define_dir"
-_ACEOF
+if test "x$RES" = xyes; then
 
-  test "$prefix_NONE" && prefix=NONE
-  test "$exec_prefix_NONE" && exec_prefix=NONE
+printf "%s\n" "#define RES 1" >>confdefs.h
 
+	HASHTABLE=yes
+	REQUIRED_MODULES="$REQUIRED_MODULES $RESOURCEPROTO"
+	SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $RESOURCEPROTO"
+fi
 
-  prefix_NONE=
-  exec_prefix_NONE=
-  test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
-  test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
-  eval ac_define_dir="\"$SERVERCONFIG\""
-  eval ac_define_dir="\"$ac_define_dir\""
-  SERVER_MISC_CONFIG_PATH="$ac_define_dir"
+if test "x$LISTEN_TCP" = xyes; then
 
+printf "%s\n" "#define LISTEN_TCP 1" >>confdefs.h
 
-cat >>confdefs.h <<_ACEOF
-#define SERVER_MISC_CONFIG_PATH "$ac_define_dir"
-_ACEOF
+fi
+if test "x$LISTEN_UNIX" = xyes; then
 
-  test "$prefix_NONE" && prefix=NONE
-  test "$exec_prefix_NONE" && exec_prefix=NONE
+printf "%s\n" "#define LISTEN_UNIX 1" >>confdefs.h
 
+fi
+if test "x$LISTEN_LOCAL" = xyes; then
 
-  prefix_NONE=
-  exec_prefix_NONE=
-  test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
-  test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
-  eval ac_define_dir="\"$FONTROOTDIR\""
-  eval ac_define_dir="\"$ac_define_dir\""
-  BASE_FONT_PATH="$ac_define_dir"
+printf "%s\n" "#define LISTEN_LOCAL 1" >>confdefs.h
 
+fi
 
-cat >>confdefs.h <<_ACEOF
-#define BASE_FONT_PATH "$ac_define_dir"
-_ACEOF
+# The XRes extension may support client ID tracking only if it has
+# been specifically enabled. Client ID tracking is implicitly not
+# supported if XRes extension is disabled.
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to track client ids" >&5
+printf %s "checking whether to track client ids... " >&6; }
+if test "x$RES" = xyes && test "x$CLIENTIDS" = xyes; then
 
-  test "$prefix_NONE" && prefix=NONE
-  test "$exec_prefix_NONE" && exec_prefix=NONE
+printf "%s\n" "#define CLIENTIDS 1" >>confdefs.h
 
-dridriverdir=`$PKG_CONFIG --variable=dridriverdir dri`
+else
+	CLIENTIDS=no
+fi
+if test "x$CLIENTIDS" = xyes; then
+	case $host_os in
+	openbsd*)
+		SYS_LIBS="$SYS_LIBS -lkvm"
+	;;
+	esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CLIENTIDS" >&5
+printf "%s\n" "$CLIENTIDS" >&6; }
+ if test "x$CLIENTIDS" = xyes; then
+  CLIENTIDS_TRUE=
+  CLIENTIDS_FALSE='#'
+else
+  CLIENTIDS_TRUE='#'
+  CLIENTIDS_FALSE=
+fi
 
-  prefix_NONE=
-  exec_prefix_NONE=
-  test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
-  test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
-  eval ac_define_dir="\"$dridriverdir\""
-  eval ac_define_dir="\"$ac_define_dir\""
-  DRI_DRIVER_PATH="$ac_define_dir"
 
+ if test "x$DRI" = xyes; then
+  DRI_TRUE=
+  DRI_FALSE='#'
+else
+  DRI_TRUE='#'
+  DRI_FALSE=
+fi
+
+if test "x$DRI" = xyes; then
 
-cat >>confdefs.h <<_ACEOF
-#define DRI_DRIVER_PATH "$ac_define_dir"
-_ACEOF
+printf "%s\n" "#define XF86DRI 1" >>confdefs.h
 
-  test "$prefix_NONE" && prefix=NONE
-  test "$exec_prefix_NONE" && exec_prefix=NONE
+	REQUIRED_MODULES="$REQUIRED_MODULES $DRIPROTO $GLPROTO $LIBDRI"
+	SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $DRIPROTO $GLPROTO $LIBDRI"
+fi
+
+
+pkg_failed=no
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for DRI2PROTO" >&5
+printf %s "checking for DRI2PROTO... " >&6; }
 
+if test -n "$DRI2PROTO_CFLAGS"; then
+    pkg_cv_DRI2PROTO_CFLAGS="$DRI2PROTO_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$DRI2PROTO\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$DRI2PROTO") 2>&5
+  ac_status=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_DRI2PROTO_CFLAGS=`$PKG_CONFIG --cflags "$DRI2PROTO" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$DRI2PROTO_LIBS"; then
+    pkg_cv_DRI2PROTO_LIBS="$DRI2PROTO_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$DRI2PROTO\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$DRI2PROTO") 2>&5
+  ac_status=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_DRI2PROTO_LIBS=`$PKG_CONFIG --libs "$DRI2PROTO" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
 
-cat >>confdefs.h <<_ACEOF
-#define XVENDORNAME "$VENDOR_NAME"
-_ACEOF
 
 
-cat >>confdefs.h <<_ACEOF
-#define XVENDORNAMESHORT "$VENDOR_NAME_SHORT"
-_ACEOF
+if test $pkg_failed = yes; then
+   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+	        DRI2PROTO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$DRI2PROTO" 2>&1`
+        else
+	        DRI2PROTO_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$DRI2PROTO" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$DRI2PROTO_PKG_ERRORS" >&5
 
-cat >>confdefs.h <<_ACEOF
-#define XORG_MAN_VERSION "$VENDOR_MAN_VERSION"
-_ACEOF
+	HAVE_DRI2PROTO=no
+elif test $pkg_failed = untried; then
+     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+	HAVE_DRI2PROTO=no
+else
+	DRI2PROTO_CFLAGS=$pkg_cv_DRI2PROTO_CFLAGS
+	DRI2PROTO_LIBS=$pkg_cv_DRI2PROTO_LIBS
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+	HAVE_DRI2PROTO=yes
+fi
+case "$DRI2,$HAVE_DRI2PROTO" in
+	yes,no)
+		as_fn_error $? "DRI2 requested, but dri2proto not found." "$LINENO" 5
+		;;
+	yes,yes | auto,yes)
 
+printf "%s\n" "#define DRI2 1" >>confdefs.h
 
-cat >>confdefs.h <<_ACEOF
-#define BUILDERADDR "$BUILDERADDR"
-_ACEOF
+		DRI2=yes
+		LIBGL="gl >= 1.2"
+		SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $DRI2PROTO"
+		;;
+esac
+ if test "x$DRI2" = xyes; then
+  DRI2_TRUE=
+  DRI2_FALSE='#'
+else
+  DRI2_TRUE='#'
+  DRI2_FALSE=
+fi
 
 
-if test -z "$OSNAME"; then
-    OSNAME="UNKNOWN"
+# Check whether --enable-xtrans-send-fds was given.
+if test ${enable_xtrans_send_fds+y}
+then :
+  enableval=$enable_xtrans_send_fds; XTRANS_SEND_FDS=$enableval
+else $as_nop
+  XTRANS_SEND_FDS=auto
 fi
 
 
-cat >>confdefs.h <<_ACEOF
-#define OSNAME "$OSNAME"
-_ACEOF
+case "x$XTRANS_SEND_FDS" in
+xauto)
+	case "$host_os" in
+	linux*|solaris*|freebsd*|dragonfly*|openbsd*)
+		XTRANS_SEND_FDS=yes
+		;;
+	*)
+		XTRANS_SEND_FDS=no
+		;;
+	esac
+esac
 
+case "x$XTRANS_SEND_FDS" in
+xyes)
 
-cat >>confdefs.h <<_ACEOF
-#define OSVENDOR "$OSVENDOR"
-_ACEOF
+printf "%s\n" "#define XTRANS_SEND_FDS 1" >>confdefs.h
 
+	;;
+esac
 
-cat >>confdefs.h <<_ACEOF
-#define BUILDERSTRING "$BUILDERSTRING"
-_ACEOF
+case "$DRI3,$XTRANS_SEND_FDS" in
+	yes,yes | auto,yes)
+		;;
+	yes,no)
+		as_fn_error $? "DRI3 requested, but xtrans fd passing support not found." "$LINENO" 5
+		DRI3=no
+		;;
+	no,*)
+		;;
+	*)
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: DRI3 disabled because xtrans fd passing support not found." >&5
+printf "%s\n" "$as_me: DRI3 disabled because xtrans fd passing support not found." >&6;}
+		DRI3=no
+		;;
+esac
 
 
+pkg_failed=no
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for DRI3PROTO" >&5
+printf %s "checking for DRI3PROTO... " >&6; }
 
+if test -n "$DRI3PROTO_CFLAGS"; then
+    pkg_cv_DRI3PROTO_CFLAGS="$DRI3PROTO_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$DRI3PROTO\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$DRI3PROTO") 2>&5
+  ac_status=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_DRI3PROTO_CFLAGS=`$PKG_CONFIG --cflags "$DRI3PROTO" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$DRI3PROTO_LIBS"; then
+    pkg_cv_DRI3PROTO_LIBS="$DRI3PROTO_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$DRI3PROTO\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$DRI3PROTO") 2>&5
+  ac_status=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_DRI3PROTO_LIBS=`$PKG_CONFIG --libs "$DRI3PROTO" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
 
-cat >>confdefs.h <<_ACEOF
-#define VENDOR_NAME "$VENDOR_NAME"
-_ACEOF
 
 
-cat >>confdefs.h <<_ACEOF
-#define VENDOR_NAME_SHORT "$VENDOR_NAME_SHORT"
-_ACEOF
+if test $pkg_failed = yes; then
+   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+	        DRI3PROTO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$DRI3PROTO" 2>&1`
+        else
+	        DRI3PROTO_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$DRI3PROTO" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$DRI3PROTO_PKG_ERRORS" >&5
 
-cat >>confdefs.h <<_ACEOF
-#define VENDOR_RELEASE $VENDOR_RELEASE
-_ACEOF
+	HAVE_DRI3PROTO=no
+elif test $pkg_failed = untried; then
+     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+	HAVE_DRI3PROTO=no
+else
+	DRI3PROTO_CFLAGS=$pkg_cv_DRI3PROTO_CFLAGS
+	DRI3PROTO_LIBS=$pkg_cv_DRI3PROTO_LIBS
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+	HAVE_DRI3PROTO=yes
+fi
 
+case "$DRI3,$HAVE_DRI3PROTO" in
+	yes,yes | auto,yes)
+		REQUIRED_MODULES="$REQUIRED_MODULES dri3proto"
+		;;
+	yes,no)
+		as_fn_error $? "DRI3 requested, but dri3proto not found." "$LINENO" 5
+		DRI3=no
+		;;
+	no,*)
+		;;
+	*)
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: DRI3 disabled because dri3proto not found." >&5
+printf "%s\n" "$as_me: DRI3 disabled because dri3proto not found." >&6;}
+		DRI3=no
+		;;
+esac
 
-cat >>confdefs.h <<_ACEOF
-#define VENDOR_MAN_VERSION "$VENDOR_MAN_VERSION"
-_ACEOF
+ac_fn_c_check_func "$LINENO" "sigaction" "ac_cv_func_sigaction"
+if test "x$ac_cv_func_sigaction" = xyes
+then :
+  printf "%s\n" "#define HAVE_SIGACTION 1" >>confdefs.h
 
+fi
 
-if test "x$DEBUGGING" = xyes; then
 
-$as_echo "#define DEBUG 1" >>confdefs.h
+BUSFAULT=no
 
-fi
- if test "x$DEBUGGING" = xyes; then
-  DEBUG_TRUE=
-  DEBUG_FALSE='#'
-else
-  DEBUG_TRUE='#'
-  DEBUG_FALSE=
-fi
+case x"$ac_cv_func_sigaction" in
+	xyes)
 
+printf "%s\n" "#define HAVE_SIGACTION 1" >>confdefs.h
 
+		BUSFAULT=yes
+		;;
+esac
 
-$as_echo "#define XTEST 1" >>confdefs.h
+case x"$BUSFAULT" in
+	xyes)
 
+printf "%s\n" "#define BUSFAULT 1" >>confdefs.h
 
-$as_echo "#define XSYNC 1" >>confdefs.h
+		;;
+esac
 
+ if test x"$BUSFAULT" = xyes; then
+  BUSFAULT_TRUE=
+  BUSFAULT_FALSE='#'
+else
+  BUSFAULT_TRUE='#'
+  BUSFAULT_FALSE=
+fi
 
-$as_echo "#define XCMISC 1" >>confdefs.h
 
 
-$as_echo "#define BIGREQS 1" >>confdefs.h
 
+pkg_failed=no
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XSHMFENCE" >&5
+printf %s "checking for XSHMFENCE... " >&6; }
 
-if test "x$SPECIAL_DTRACE_OBJECTS" = "xyes" ; then
-  DIX_LIB='$(top_builddir)/dix/dix.O'
-  OS_LIB='$(top_builddir)/os/os.O $(SHA1_LIBS) $(DLOPEN_LIBS) $(LIBUNWIND_LIBS)'
+if test -n "$XSHMFENCE_CFLAGS"; then
+    pkg_cv_XSHMFENCE_CFLAGS="$XSHMFENCE_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBXSHMFENCE\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$LIBXSHMFENCE") 2>&5
+  ac_status=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_XSHMFENCE_CFLAGS=`$PKG_CONFIG --cflags "$LIBXSHMFENCE" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
 else
-  DIX_LIB='$(top_builddir)/dix/libdix.la'
-  OS_LIB='$(top_builddir)/os/libos.la'
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$XSHMFENCE_LIBS"; then
+    pkg_cv_XSHMFENCE_LIBS="$XSHMFENCE_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBXSHMFENCE\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$LIBXSHMFENCE") 2>&5
+  ac_status=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_XSHMFENCE_LIBS=`$PKG_CONFIG --libs "$LIBXSHMFENCE" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
 fi
 
 
 
-MAIN_LIB='$(top_builddir)/dix/libmain.la'
-
-
-MI_LIB='$(top_builddir)/mi/libmi.la'
-MI_EXT_LIB='$(top_builddir)/mi/libmiext.la'
-MI_INC='-I$(top_srcdir)/mi'
-FB_LIB='$(top_builddir)/fb/libfb.la'
-FB_INC='-I$(top_srcdir)/fb'
-MIEXT_SHADOW_INC='-I$(top_srcdir)/miext/shadow'
-MIEXT_SHADOW_LIB='$(top_builddir)/miext/shadow/libshadow.la'
-MIEXT_SYNC_INC='-I$(top_srcdir)/miext/sync'
-MIEXT_SYNC_LIB='$(top_builddir)/miext/sync/libsync.la'
-CORE_INCS='-I$(top_srcdir)/include -I$(top_builddir)/include'
+if test $pkg_failed = yes; then
+   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 
-# SHA1 hashing
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+	        XSHMFENCE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$LIBXSHMFENCE" 2>&1`
+        else
+	        XSHMFENCE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$LIBXSHMFENCE" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$XSHMFENCE_PKG_ERRORS" >&5
 
-# Check whether --with-sha1 was given.
-if test "${with_sha1+set}" = set; then :
-  withval=$with_sha1;
+	HAVE_XSHMFENCE=no
+elif test $pkg_failed = untried; then
+     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+	HAVE_XSHMFENCE=no
+else
+	XSHMFENCE_CFLAGS=$pkg_cv_XSHMFENCE_CFLAGS
+	XSHMFENCE_LIBS=$pkg_cv_XSHMFENCE_LIBS
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+	HAVE_XSHMFENCE=yes
 fi
-
-ac_fn_c_check_func "$LINENO" "SHA1Init" "ac_cv_func_SHA1Init"
-if test "x$ac_cv_func_SHA1Init" = xyes; then :
-  HAVE_SHA1_IN_LIBC=yes
+if test "x$XSHMFENCE" = "xauto"; then
+    XSHMFENCE="$HAVE_XSHMFENCE"
 fi
 
-if test "x$with_sha1" = x && test "x$HAVE_SHA1_IN_LIBC" = xyes; then
-	with_sha1=libc
-fi
-if test "x$with_sha1" = xlibc && test "x$HAVE_SHA1_IN_LIBC" != xyes; then
-	as_fn_error $? "libc requested but not found" "$LINENO" 5
-fi
-if test "x$with_sha1" = xlibc; then
+if test "x$XSHMFENCE" = "xyes"; then
+    if test "x$HAVE_XSHMFENCE" != "xyes"; then
+        as_fn_error $? "xshmfence requested but not installed." "$LINENO" 5
+    fi
 
-$as_echo "#define HAVE_SHA1_IN_LIBC 1" >>confdefs.h
+printf "%s\n" "#define HAVE_XSHMFENCE 1" >>confdefs.h
 
-	SHA1_LIBS=""
-fi
-ac_fn_c_check_func "$LINENO" "CC_SHA1_Init" "ac_cv_func_CC_SHA1_Init"
-if test "x$ac_cv_func_CC_SHA1_Init" = xyes; then :
-  HAVE_SHA1_IN_COMMONCRYPTO=yes
+    REQUIRED_LIBS="$REQUIRED_LIBS $LIBXSHMFENCE"
 fi
 
-if test "x$with_sha1" = x && test "x$HAVE_SHA1_IN_COMMONCRYPTO" = xyes; then
-	with_sha1=CommonCrypto
-fi
-if test "x$with_sha1" = xCommonCrypto && test "x$HAVE_SHA1_IN_COMMONCRYPTO" != xyes; then
-	as_fn_error $? "CommonCrypto requested but not found" "$LINENO" 5
+ if test "x$XSHMFENCE" = xyes; then
+  XSHMFENCE_TRUE=
+  XSHMFENCE_FALSE='#'
+else
+  XSHMFENCE_TRUE='#'
+  XSHMFENCE_FALSE=
 fi
-if test "x$with_sha1" = xCommonCrypto; then
 
-$as_echo "#define HAVE_SHA1_IN_COMMONCRYPTO 1" >>confdefs.h
-
-	SHA1_LIBS=""
-fi
-ac_fn_c_check_header_compile "$LINENO" "wincrypt.h" "ac_cv_header_wincrypt_h" "#include <windows.h>
-"
-if test "x$ac_cv_header_wincrypt_h" = xyes; then :
-  HAVE_SHA1_IN_CRYPTOAPI=yes
-fi
 
+case "$DRI3,$XSHMFENCE" in
+	yes,yes | auto,yes)
+		;;
+	yes,no)
+		as_fn_error $? "DRI3 requested, but xshmfence not found." "$LINENO" 5
+		DRI3=no
+		;;
+	no,*)
+		;;
+	*)
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: DRI3 disabled because xshmfence not found." >&5
+printf "%s\n" "$as_me: DRI3 disabled because xshmfence not found." >&6;}
+		DRI3=no
+		;;
+esac
 
-if test "x$with_sha1" = x && test "x$HAVE_SHA1_IN_CRYPTOAPI" = xyes; then
-	with_sha1=CryptoAPI
-fi
-if test "x$with_sha1" = xCryptoAPI && test "x$HAVE_SHA1_IN_CRYPTOAPI" != xyes; then
-	as_fn_error $? "CryptoAPI requested but not found" "$LINENO" 5
-fi
-if test "x$with_sha1" = xCryptoAPI; then
+case x"$DRI3" in
+	xyes|xauto)
+		DRI3=yes
 
-$as_echo "#define HAVE_SHA1_IN_CRYPTOAPI 1" >>confdefs.h
+printf "%s\n" "#define DRI3 1" >>confdefs.h
 
-	SHA1_LIBS=""
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SHA1Init in -lmd" >&5
-$as_echo_n "checking for SHA1Init in -lmd... " >&6; }
-if ${ac_cv_lib_md_SHA1Init+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lmd  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+		DRI3_LIB='$(top_builddir)/dri3/libdri3.la'
+		SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $DRI3PROTO"
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: DRI3 enabled" >&5
+printf "%s\n" "$as_me: DRI3 enabled" >&6;};
+		;;
+esac
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char SHA1Init ();
-int
-main ()
-{
-return SHA1Init ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_md_SHA1Init=yes
+ if test "x$DRI3" = xyes; then
+  DRI3_TRUE=
+  DRI3_FALSE='#'
 else
-  ac_cv_lib_md_SHA1Init=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_md_SHA1Init" >&5
-$as_echo "$ac_cv_lib_md_SHA1Init" >&6; }
-if test "x$ac_cv_lib_md_SHA1Init" = xyes; then :
-  HAVE_LIBMD=yes
+  DRI3_TRUE='#'
+  DRI3_FALSE=
 fi
 
-if test "x$with_sha1" = x && test "x$HAVE_LIBMD" = xyes; then
-	with_sha1=libmd
-fi
-if test "x$with_sha1" = xlibmd && test "x$HAVE_LIBMD" != xyes; then
-	as_fn_error $? "libmd requested but not found" "$LINENO" 5
-fi
-if test "x$with_sha1" = xlibmd; then
 
-$as_echo "#define HAVE_SHA1_IN_LIBMD 1" >>confdefs.h
+if test "x$DRI" = xyes || test "x$DRI2" = xyes || test "x$DRI3" = xyes || test "x$CONFIG_UDEV_KMS" = xyes || test "x$XORG" = xyes; then
+	if test "x$DRM" = xyes; then
+
+printf "%s\n" "#define WITH_LIBDRM 1" >>confdefs.h
 
-	SHA1_LIBS=-lmd
-fi
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBSHA1" >&5
-$as_echo_n "checking for LIBSHA1... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LIBDRM" >&5
+printf %s "checking for LIBDRM... " >&6; }
 
-if test -n "$LIBSHA1_CFLAGS"; then
-    pkg_cv_LIBSHA1_CFLAGS="$LIBSHA1_CFLAGS"
+if test -n "$LIBDRM_CFLAGS"; then
+    pkg_cv_LIBDRM_CFLAGS="$LIBDRM_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsha1\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "libsha1") 2>&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBDRM\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$LIBDRM") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_LIBSHA1_CFLAGS=`$PKG_CONFIG --cflags "libsha1" 2>/dev/null`
+  pkg_cv_LIBDRM_CFLAGS=`$PKG_CONFIG --cflags "$LIBDRM" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -28123,16 +28353,16 @@ fi
  else
     pkg_failed=untried
 fi
-if test -n "$LIBSHA1_LIBS"; then
-    pkg_cv_LIBSHA1_LIBS="$LIBSHA1_LIBS"
+if test -n "$LIBDRM_LIBS"; then
+    pkg_cv_LIBDRM_LIBS="$LIBDRM_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsha1\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "libsha1") 2>&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBDRM\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$LIBDRM") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_LIBSHA1_LIBS=`$PKG_CONFIG --libs "libsha1" 2>/dev/null`
+  pkg_cv_LIBDRM_LIBS=`$PKG_CONFIG --libs "$LIBDRM" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -28144,8 +28374,8 @@ fi
 
 
 if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -28153,197 +28383,155 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        LIBSHA1_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsha1" 2>&1`
+	        LIBDRM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$LIBDRM" 2>&1`
         else
-	        LIBSHA1_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsha1" 2>&1`
+	        LIBDRM_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$LIBDRM" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
-	echo "$LIBSHA1_PKG_ERRORS" >&5
+	echo "$LIBDRM_PKG_ERRORS" >&5
 
-	HAVE_LIBSHA1=no
-elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-	HAVE_LIBSHA1=no
-else
-	LIBSHA1_CFLAGS=$pkg_cv_LIBSHA1_CFLAGS
-	LIBSHA1_LIBS=$pkg_cv_LIBSHA1_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-	HAVE_LIBSHA1=yes
-fi
-if test "x$with_sha1" = x && test "x$HAVE_LIBSHA1" = xyes; then
-   with_sha1=libsha1
-fi
-if test "x$with_sha1" = xlibsha1 && test "x$HAVE_LIBSHA1" != xyes; then
-	as_fn_error $? "libsha1 requested but not found" "$LINENO" 5
-fi
-if test "x$with_sha1" = xlibsha1; then
+	as_fn_error $? "Package requirements ($LIBDRM) were not met:
 
-$as_echo "#define HAVE_SHA1_IN_LIBSHA1 1" >>confdefs.h
+$LIBDRM_PKG_ERRORS
 
-	SHA1_LIBS=-lsha1
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nettle_sha1_init in -lnettle" >&5
-$as_echo_n "checking for nettle_sha1_init in -lnettle... " >&6; }
-if ${ac_cv_lib_nettle_nettle_sha1_init+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lnettle  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char nettle_sha1_init ();
-int
-main ()
-{
-return nettle_sha1_init ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_nettle_nettle_sha1_init=yes
+Alternatively, you may set the environment variables LIBDRM_CFLAGS
+and LIBDRM_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details." "$LINENO" 5
+elif test $pkg_failed = untried; then
+     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables LIBDRM_CFLAGS
+and LIBDRM_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details" "$LINENO" 5; }
 else
-  ac_cv_lib_nettle_nettle_sha1_init=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nettle_nettle_sha1_init" >&5
-$as_echo "$ac_cv_lib_nettle_nettle_sha1_init" >&6; }
-if test "x$ac_cv_lib_nettle_nettle_sha1_init" = xyes; then :
-  HAVE_LIBNETTLE=yes
-fi
+	LIBDRM_CFLAGS=$pkg_cv_LIBDRM_CFLAGS
+	LIBDRM_LIBS=$pkg_cv_LIBDRM_LIBS
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
 
-if test "x$with_sha1" = x && test "x$HAVE_LIBNETTLE" = xyes; then
-	with_sha1=libnettle
 fi
-if test "x$with_sha1" = xlibnettle && test "x$HAVE_LIBNETTLE" != xyes; then
-	as_fn_error $? "libnettle requested but not found" "$LINENO" 5
+	fi
 fi
-if test "x$with_sha1" = xlibnettle; then
 
-$as_echo "#define HAVE_SHA1_IN_LIBNETTLE 1" >>confdefs.h
+if test "x$GLX" = xyes; then
 
-	SHA1_LIBS=-lnettle
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcry_md_open in -lgcrypt" >&5
-$as_echo_n "checking for gcry_md_open in -lgcrypt... " >&6; }
-if ${ac_cv_lib_gcrypt_gcry_md_open+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lgcrypt  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+pkg_failed=no
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XLIB" >&5
+printf %s "checking for XLIB... " >&6; }
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char gcry_md_open ();
-int
-main ()
-{
-return gcry_md_open ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_gcrypt_gcry_md_open=yes
+if test -n "$XLIB_CFLAGS"; then
+    pkg_cv_XLIB_CFLAGS="$XLIB_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "x11") 2>&5
+  ac_status=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_XLIB_CFLAGS=`$PKG_CONFIG --cflags "x11" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
 else
-  ac_cv_lib_gcrypt_gcry_md_open=no
+  pkg_failed=yes
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+ else
+    pkg_failed=untried
+fi
+if test -n "$XLIB_LIBS"; then
+    pkg_cv_XLIB_LIBS="$XLIB_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "x11") 2>&5
+  ac_status=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_XLIB_LIBS=`$PKG_CONFIG --libs "x11" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gcrypt_gcry_md_open" >&5
-$as_echo "$ac_cv_lib_gcrypt_gcry_md_open" >&6; }
-if test "x$ac_cv_lib_gcrypt_gcry_md_open" = xyes; then :
-  HAVE_LIBGCRYPT=yes
+ else
+    pkg_failed=untried
 fi
 
-if test "x$with_sha1" = x && test "x$HAVE_LIBGCRYPT" = xyes; then
-	with_sha1=libgcrypt
-fi
-if test "x$with_sha1" = xlibgcrypt && test "x$HAVE_LIBGCRYPT" != xyes; then
-	as_fn_error $? "libgcrypt requested but not found" "$LINENO" 5
-fi
-if test "x$with_sha1" = xlibgcrypt; then
 
-$as_echo "#define HAVE_SHA1_IN_LIBGCRYPT 1" >>confdefs.h
 
-	SHA1_LIBS=-lgcrypt
-fi
-# We don't need all of the OpenSSL libraries, just libcrypto
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SHA1_Init in -lcrypto" >&5
-$as_echo_n "checking for SHA1_Init in -lcrypto... " >&6; }
-if ${ac_cv_lib_crypto_SHA1_Init+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lcrypto  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+if test $pkg_failed = yes; then
+   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char SHA1_Init ();
-int
-main ()
-{
-return SHA1_Init ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_crypto_SHA1_Init=yes
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
 else
-  ac_cv_lib_crypto_SHA1_Init=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_SHA1_Init" >&5
-$as_echo "$ac_cv_lib_crypto_SHA1_Init" >&6; }
-if test "x$ac_cv_lib_crypto_SHA1_Init" = xyes; then :
-  HAVE_LIBCRYPTO=yes
+        _pkg_short_errors_supported=no
 fi
+        if test $_pkg_short_errors_supported = yes; then
+	        XLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "x11" 2>&1`
+        else
+	        XLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "x11" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$XLIB_PKG_ERRORS" >&5
+
+	as_fn_error $? "Package requirements (x11) were not met:
+
+$XLIB_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables XLIB_CFLAGS
+and XLIB_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details." "$LINENO" 5
+elif test $pkg_failed = untried; then
+     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables XLIB_CFLAGS
+and XLIB_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details" "$LINENO" 5; }
+else
+	XLIB_CFLAGS=$pkg_cv_XLIB_CFLAGS
+	XLIB_LIBS=$pkg_cv_XLIB_LIBS
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
 
+fi
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OPENSSL" >&5
-$as_echo_n "checking for OPENSSL... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GL" >&5
+printf %s "checking for GL... " >&6; }
 
-if test -n "$OPENSSL_CFLAGS"; then
-    pkg_cv_OPENSSL_CFLAGS="$OPENSSL_CFLAGS"
+if test -n "$GL_CFLAGS"; then
+    pkg_cv_GL_CFLAGS="$GL_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "openssl") 2>&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$GLPROTO \$LIBGL\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$GLPROTO $LIBGL") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_OPENSSL_CFLAGS=`$PKG_CONFIG --cflags "openssl" 2>/dev/null`
+  pkg_cv_GL_CFLAGS=`$PKG_CONFIG --cflags "$GLPROTO $LIBGL" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -28351,16 +28539,16 @@ fi
  else
     pkg_failed=untried
 fi
-if test -n "$OPENSSL_LIBS"; then
-    pkg_cv_OPENSSL_LIBS="$OPENSSL_LIBS"
+if test -n "$GL_LIBS"; then
+    pkg_cv_GL_LIBS="$GL_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "openssl") 2>&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$GLPROTO \$LIBGL\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$GLPROTO $LIBGL") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_OPENSSL_LIBS=`$PKG_CONFIG --libs "openssl" 2>/dev/null`
+  pkg_cv_GL_LIBS=`$PKG_CONFIG --libs "$GLPROTO $LIBGL" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -28372,8 +28560,8 @@ fi
 
 
 if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -28381,67 +28569,211 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        OPENSSL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "openssl" 2>&1`
+	        GL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$GLPROTO $LIBGL" 2>&1`
         else
-	        OPENSSL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "openssl" 2>&1`
+	        GL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$GLPROTO $LIBGL" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
-	echo "$OPENSSL_PKG_ERRORS" >&5
+	echo "$GL_PKG_ERRORS" >&5
 
-	HAVE_OPENSSL_PKC=no
+	as_fn_error $? "Package requirements ($GLPROTO $LIBGL) were not met:
+
+$GL_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables GL_CFLAGS
+and GL_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details." "$LINENO" 5
 elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-	HAVE_OPENSSL_PKC=no
+     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables GL_CFLAGS
+and GL_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details" "$LINENO" 5; }
 else
-	OPENSSL_CFLAGS=$pkg_cv_OPENSSL_CFLAGS
-	OPENSSL_LIBS=$pkg_cv_OPENSSL_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-	HAVE_OPENSSL_PKC=yes
+	GL_CFLAGS=$pkg_cv_GL_CFLAGS
+	GL_LIBS=$pkg_cv_GL_LIBS
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+
 fi
-if test "x$HAVE_LIBCRYPTO" = xyes || test "x$HAVE_OPENSSL_PKC" = xyes; then
-	if test "x$with_sha1" = x; then
-		with_sha1=libcrypto
-	fi
+
+
+printf "%s\n" "#define GLXEXT 1" >>confdefs.h
+
+	HASHTABLE=yes
+	GLX_LIBS='$(top_builddir)/glx/libglx.la $(top_builddir)/glx/libglxvnd.la'
+	GLX_SYS_LIBS="$GLX_SYS_LIBS $GL_LIBS"
 else
-	if test "x$with_sha1" = xlibcrypto; then
-		as_fn_error $? "OpenSSL libcrypto requested but not found" "$LINENO" 5
-	fi
+        GLX=no
 fi
-if test "x$with_sha1" = xlibcrypto; then
-	if test "x$HAVE_LIBCRYPTO" = xyes; then
-		SHA1_LIBS=-lcrypto
-	else
-		SHA1_LIBS="$OPENSSL_LIBS"
-		SHA1_CFLAGS="$OPENSSL_CFLAGS"
+ if test "x$GLX" = xyes; then
+  GLX_TRUE=
+  GLX_FALSE='#'
+else
+  GLX_TRUE='#'
+  GLX_FALSE=
+fi
+
+
+ if test "x$HASHTABLE" = xyes; then
+  HASHTABLE_TRUE=
+  HASHTABLE_FALSE='#'
+else
+  HASHTABLE_TRUE='#'
+  HASHTABLE_FALSE=
+fi
+
+
+
+
+
+ if test "x$PRESENT" = xyes; then
+  PRESENT_TRUE=
+  PRESENT_FALSE='#'
+else
+  PRESENT_TRUE='#'
+  PRESENT_FALSE=
+fi
+
+if test "x$PRESENT" = xyes; then
+
+printf "%s\n" "#define PRESENT 1" >>confdefs.h
+
+	REQUIRED_MODULES="$REQUIRED_MODULES $PRESENTPROTO"
+	SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $PRESENTPROTO"
+	PRESENT_INC='-I$(top_srcdir)/present'
+	PRESENT_LIB='$(top_builddir)/present/libpresent.la'
+fi
+
+ if test "x$XINERAMA" = xyes; then
+  XINERAMA_TRUE=
+  XINERAMA_FALSE='#'
+else
+  XINERAMA_TRUE='#'
+  XINERAMA_FALSE=
+fi
+
+if test "x$XINERAMA" = xyes; then
+
+printf "%s\n" "#define XINERAMA 1" >>confdefs.h
+
+
+printf "%s\n" "#define PANORAMIX 1" >>confdefs.h
+
+	REQUIRED_MODULES="$REQUIRED_MODULES $XINERAMAPROTO"
+	SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $XINERAMAPROTO"
+fi
+
+ if test "x$XACE" = xyes; then
+  XACE_TRUE=
+  XACE_FALSE='#'
+else
+  XACE_TRUE='#'
+  XACE_FALSE=
+fi
+
+if test "x$XACE" = xyes; then
+
+printf "%s\n" "#define XACE 1" >>confdefs.h
+
+fi
+
+ if test "x$XSELINUX" = xyes; then
+  XSELINUX_TRUE=
+  XSELINUX_FALSE='#'
+else
+  XSELINUX_TRUE='#'
+  XSELINUX_FALSE=
+fi
+
+if test "x$XSELINUX" = xyes; then
+	if test "x$XACE" != xyes; then
+		as_fn_error $? "cannot build SELinux extension without X-ACE" "$LINENO" 5
 	fi
+	       for ac_header in libaudit.h
+do :
+  ac_fn_c_check_header_compile "$LINENO" "libaudit.h" "ac_cv_header_libaudit_h" "$ac_includes_default"
+if test "x$ac_cv_header_libaudit_h" = xyes
+then :
+  printf "%s\n" "#define HAVE_LIBAUDIT_H 1" >>confdefs.h
+
+else $as_nop
+  as_fn_error $? "SELinux extension requires audit system headers" "$LINENO" 5
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SHA1 implementation" >&5
-$as_echo_n "checking for SHA1 implementation... " >&6; }
-if test "x$with_sha1" = x; then
-	as_fn_error $? "No suitable SHA1 implementation found" "$LINENO" 5
+
+done
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for audit_open in -laudit" >&5
+printf %s "checking for audit_open in -laudit... " >&6; }
+if test ${ac_cv_lib_audit_audit_open+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-laudit  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+char audit_open ();
+int
+main (void)
+{
+return audit_open ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+  ac_cv_lib_audit_audit_open=yes
+else $as_nop
+  ac_cv_lib_audit_audit_open=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sha1" >&5
-$as_echo "$with_sha1" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_audit_audit_open" >&5
+printf "%s\n" "$ac_cv_lib_audit_audit_open" >&6; }
+if test "x$ac_cv_lib_audit_audit_open" = xyes
+then :
+  printf "%s\n" "#define HAVE_LIBAUDIT 1" >>confdefs.h
 
+  LIBS="-laudit $LIBS"
 
+else $as_nop
+  as_fn_error $? "SELinux extension requires audit system library" "$LINENO" 5
+fi
 
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSERVERCFLAGS" >&5
-$as_echo_n "checking for XSERVERCFLAGS... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SELINUX" >&5
+printf %s "checking for SELINUX... " >&6; }
 
-if test -n "$XSERVERCFLAGS_CFLAGS"; then
-    pkg_cv_XSERVERCFLAGS_CFLAGS="$XSERVERCFLAGS_CFLAGS"
+if test -n "$SELINUX_CFLAGS"; then
+    pkg_cv_SELINUX_CFLAGS="$SELINUX_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$REQUIRED_MODULES \$REQUIRED_LIBS\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$REQUIRED_MODULES $REQUIRED_LIBS") 2>&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBSELINUX\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$LIBSELINUX") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_XSERVERCFLAGS_CFLAGS=`$PKG_CONFIG --cflags "$REQUIRED_MODULES $REQUIRED_LIBS" 2>/dev/null`
+  pkg_cv_SELINUX_CFLAGS=`$PKG_CONFIG --cflags "$LIBSELINUX" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -28449,16 +28781,16 @@ fi
  else
     pkg_failed=untried
 fi
-if test -n "$XSERVERCFLAGS_LIBS"; then
-    pkg_cv_XSERVERCFLAGS_LIBS="$XSERVERCFLAGS_LIBS"
+if test -n "$SELINUX_LIBS"; then
+    pkg_cv_SELINUX_LIBS="$SELINUX_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$REQUIRED_MODULES \$REQUIRED_LIBS\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$REQUIRED_MODULES $REQUIRED_LIBS") 2>&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBSELINUX\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$LIBSELINUX") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_XSERVERCFLAGS_LIBS=`$PKG_CONFIG --libs "$REQUIRED_MODULES $REQUIRED_LIBS" 2>/dev/null`
+  pkg_cv_SELINUX_LIBS=`$PKG_CONFIG --libs "$LIBSELINUX" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -28470,8 +28802,8 @@ fi
 
 
 if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -28479,60 +28811,303 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        XSERVERCFLAGS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$REQUIRED_MODULES $REQUIRED_LIBS" 2>&1`
+	        SELINUX_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$LIBSELINUX" 2>&1`
         else
-	        XSERVERCFLAGS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$REQUIRED_MODULES $REQUIRED_LIBS" 2>&1`
+	        SELINUX_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$LIBSELINUX" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
-	echo "$XSERVERCFLAGS_PKG_ERRORS" >&5
+	echo "$SELINUX_PKG_ERRORS" >&5
+
+	as_fn_error $? "Package requirements ($LIBSELINUX) were not met:
+
+$SELINUX_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables SELINUX_CFLAGS
+and SELINUX_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details." "$LINENO" 5
+elif test $pkg_failed = untried; then
+     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables SELINUX_CFLAGS
+and SELINUX_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details" "$LINENO" 5; }
+else
+	SELINUX_CFLAGS=$pkg_cv_SELINUX_CFLAGS
+	SELINUX_LIBS=$pkg_cv_SELINUX_LIBS
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+
+fi
+	SELINUX_LIBS="$SELINUX_LIBS -laudit"
+
+printf "%s\n" "#define XSELINUX 1" >>confdefs.h
+
+fi
+
+ if test "x$XCSECURITY" = xyes; then
+  XCSECURITY_TRUE=
+  XCSECURITY_FALSE='#'
+else
+  XCSECURITY_TRUE='#'
+  XCSECURITY_FALSE=
+fi
+
+if test "x$XCSECURITY" = xyes; then
+	if test "x$XACE" != xyes; then
+		as_fn_error $? "cannot build Security extension without X-ACE" "$LINENO" 5
+	fi
+
+printf "%s\n" "#define XCSECURITY 1" >>confdefs.h
+
+fi
+
+ if test "x$DBE" = xyes; then
+  DBE_TRUE=
+  DBE_FALSE='#'
+else
+  DBE_TRUE='#'
+  DBE_FALSE=
+fi
+
+if test "x$DBE" = xyes; then
+
+printf "%s\n" "#define DBE 1" >>confdefs.h
+
+	DBE_LIB='$(top_builddir)/dbe/libdbe.la'
+	DBE_INC='-I$(top_srcdir)/dbe'
+fi
+
+ if test "x$XF86BIGFONT" = xyes; then
+  XF86BIGFONT_TRUE=
+  XF86BIGFONT_FALSE='#'
+else
+  XF86BIGFONT_TRUE='#'
+  XF86BIGFONT_FALSE=
+fi
+
+if test "x$XF86BIGFONT" = xyes; then
+
+printf "%s\n" "#define XF86BIGFONT 1" >>confdefs.h
+
+	REQUIRED_MODULES="$REQUIRED_MODULES $BIGFONTPROTO"
+	SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $BIGFONTPROTO"
+fi
+
+ if test "x$DPMSExtension" = xyes; then
+  DPMSExtension_TRUE=
+  DPMSExtension_FALSE='#'
+else
+  DPMSExtension_TRUE='#'
+  DPMSExtension_FALSE=
+fi
+
+if test "x$DPMSExtension" = xyes; then
+
+printf "%s\n" "#define DPMSExtension 1" >>confdefs.h
+
+fi
+
+
+printf "%s\n" "#define RENDER 1" >>confdefs.h
+
+RENDER_LIB='$(top_builddir)/render/librender.la'
+RENDER_INC='-I$(top_srcdir)/render'
+
+
+printf "%s\n" "#define RANDR 1" >>confdefs.h
+
+RANDR_LIB='$(top_builddir)/randr/librandr.la'
+RANDR_INC='-I$(top_srcdir)/randr'
+
+
+printf "%s\n" "#define XFIXES 1" >>confdefs.h
+
+FIXES_LIB='$(top_builddir)/xfixes/libxfixes.la'
+FIXES_INC='-I$(top_srcdir)/xfixes'
+
+
+printf "%s\n" "#define DAMAGE 1" >>confdefs.h
+
+DAMAGE_LIB='$(top_builddir)/damageext/libdamageext.la'
+DAMAGE_INC='-I$(top_srcdir)/damageext'
+MIEXT_DAMAGE_LIB='$(top_builddir)/miext/damage/libdamage.la'
+MIEXT_DAMAGE_INC='-I$(top_srcdir)/miext/damage'
+
+# XINPUT extension is integral part of the server
+
+printf "%s\n" "#define XINPUT 1" >>confdefs.h
+
+XI_LIB='$(top_builddir)/Xi/libXi.la'
+XI_INC='-I$(top_srcdir)/Xi'
+
+ if test "x$XF86UTILS" = xyes; then
+  XF86UTILS_TRUE=
+  XF86UTILS_FALSE='#'
+else
+  XF86UTILS_TRUE='#'
+  XF86UTILS_FALSE=
+fi
+
+ if test "x$VGAHW" = xyes; then
+  VGAHW_TRUE=
+  VGAHW_FALSE='#'
+else
+  VGAHW_TRUE='#'
+  VGAHW_FALSE=
+fi
+
+ if test "x$INT10MODULE" = xyes; then
+  INT10MODULE_TRUE=
+  INT10MODULE_FALSE='#'
+else
+  INT10MODULE_TRUE='#'
+  INT10MODULE_FALSE=
+fi
+
+
+
+printf "%s\n" "#define SHAPE 1" >>confdefs.h
+
+
+if test "x$XKBPATH" = "xauto"; then
+    XKBPATH=$(pkg-config --variable datadir xkbcomp || echo ${datadir})/X11/xkb
+fi
+
+
+  prefix_NONE=
+  exec_prefix_NONE=
+  test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
+  test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
+  eval ac_define_dir="\"$XKBPATH\""
+  eval ac_define_dir="\"$ac_define_dir\""
+  XKB_BASE_DIRECTORY="$ac_define_dir"
+
+
+printf "%s\n" "#define XKB_BASE_DIRECTORY \"$ac_define_dir\"" >>confdefs.h
+
+  test "$prefix_NONE" && prefix=NONE
+  test "$exec_prefix_NONE" && exec_prefix=NONE
+
+
+# Check whether --with-xkb-bin-directory was given.
+if test ${with_xkb_bin_directory+y}
+then :
+  withval=$with_xkb_bin_directory; XKB_BIN_DIRECTORY="$withval"
+else $as_nop
+  XKB_BIN_DIRECTORY="auto"
+fi
+
+
+if test "x$XKB_BIN_DIRECTORY" = "xauto"; then
+    XKB_BIN_DIRECTORY=$(pkg-config --variable bindir xkbcomp)
+    if test -z $XKB_BIN_DIRECTORY; then
+        XKB_BIN_DIRECTORY="$bindir"
+    fi
+fi
+
+
+  prefix_NONE=
+  exec_prefix_NONE=
+  test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
+  test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
+  eval ac_define_dir="\"$XKB_BIN_DIRECTORY\""
+  eval ac_define_dir="\"$ac_define_dir\""
+  XKB_BIN_DIRECTORY="$ac_define_dir"
+
+
+printf "%s\n" "#define XKB_BIN_DIRECTORY \"$ac_define_dir\"" >>confdefs.h
+
+  test "$prefix_NONE" && prefix=NONE
+  test "$exec_prefix_NONE" && exec_prefix=NONE
+
+
+XKBOUTPUT_FIRSTCHAR=`echo $XKBOUTPUT | cut -b 1`
+if [ x$XKBOUTPUT_FIRSTCHAR != x/ -a x$XKBOUTPUT_FIRSTCHAR != 'x$' ] ; then
+   XKBOUTPUT="$XKB_BASE_DIRECTORY/$XKBOUTPUT"
+fi
+
+
+XKBOUTPUT=`echo $XKBOUTPUT/ | $SED 's|/*$|/|'`
+XKB_COMPILED_DIR=`echo $XKBOUTPUT | $SED 's|/*$||'`
+
+  prefix_NONE=
+  exec_prefix_NONE=
+  test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
+  test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
+  eval ac_define_dir="\"$XKBOUTPUT\""
+  eval ac_define_dir="\"$ac_define_dir\""
+  XKM_OUTPUT_DIR="$ac_define_dir"
+
+
+printf "%s\n" "#define XKM_OUTPUT_DIR \"$ac_define_dir\"" >>confdefs.h
+
+  test "$prefix_NONE" && prefix=NONE
+  test "$exec_prefix_NONE" && exec_prefix=NONE
+
+
+
+if test "x$XKB_DFLT_RULES" = x; then
+    case $host_os in
+    linux*)
+                XKB_DFLT_RULES="evdev"
+        ;;
+    *)
+        XKB_DFLT_RULES="base"
+        ;;
+    esac
+fi
+
+printf "%s\n" "#define XKB_DFLT_RULES \"$XKB_DFLT_RULES\"" >>confdefs.h
+
+
+printf "%s\n" "#define XKB_DFLT_MODEL \"$XKB_DFLT_MODEL\"" >>confdefs.h
+
+
+printf "%s\n" "#define XKB_DFLT_LAYOUT \"$XKB_DFLT_LAYOUT\"" >>confdefs.h
+
+
+printf "%s\n" "#define XKB_DFLT_VARIANT \"$XKB_DFLT_VARIANT\"" >>confdefs.h
+
 
-	as_fn_error $? "Package requirements ($REQUIRED_MODULES $REQUIRED_LIBS) were not met:
+printf "%s\n" "#define XKB_DFLT_OPTIONS \"$XKB_DFLT_OPTIONS\"" >>confdefs.h
 
-$XSERVERCFLAGS_PKG_ERRORS
 
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
 
-Alternatively, you may set the environment variables XSERVERCFLAGS_CFLAGS
-and XSERVERCFLAGS_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details." "$LINENO" 5
-elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
 
-Alternatively, you may set the environment variables XSERVERCFLAGS_CFLAGS
-and XSERVERCFLAGS_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
 
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details" "$LINENO" 5; }
-else
-	XSERVERCFLAGS_CFLAGS=$pkg_cv_XSERVERCFLAGS_CFLAGS
-	XSERVERCFLAGS_LIBS=$pkg_cv_XSERVERCFLAGS_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
 
-fi
+
+XKB_LIB='$(top_builddir)/xkb/libxkb.la'
+XKB_STUB_LIB='$(top_builddir)/xkb/libxkbstubs.la'
+REQUIRED_MODULES="$REQUIRED_MODULES xkbfile"
+
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSERVERLIBS" >&5
-$as_echo_n "checking for XSERVERLIBS... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XDMCP" >&5
+printf %s "checking for XDMCP... " >&6; }
 
-if test -n "$XSERVERLIBS_CFLAGS"; then
-    pkg_cv_XSERVERLIBS_CFLAGS="$XSERVERLIBS_CFLAGS"
+if test -n "$XDMCP_CFLAGS"; then
+    pkg_cv_XDMCP_CFLAGS="$XDMCP_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$REQUIRED_LIBS\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$REQUIRED_LIBS") 2>&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xdmcp\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "xdmcp") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_XSERVERLIBS_CFLAGS=`$PKG_CONFIG --cflags "$REQUIRED_LIBS" 2>/dev/null`
+  pkg_cv_XDMCP_CFLAGS=`$PKG_CONFIG --cflags "xdmcp" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -28540,16 +29115,16 @@ fi
  else
     pkg_failed=untried
 fi
-if test -n "$XSERVERLIBS_LIBS"; then
-    pkg_cv_XSERVERLIBS_LIBS="$XSERVERLIBS_LIBS"
+if test -n "$XDMCP_LIBS"; then
+    pkg_cv_XDMCP_LIBS="$XDMCP_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$REQUIRED_LIBS\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$REQUIRED_LIBS") 2>&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xdmcp\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "xdmcp") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_XSERVERLIBS_LIBS=`$PKG_CONFIG --libs "$REQUIRED_LIBS" 2>/dev/null`
+  pkg_cv_XDMCP_LIBS=`$PKG_CONFIG --libs "xdmcp" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -28561,8 +29136,8 @@ fi
 
 
 if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -28570,494 +29145,373 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        XSERVERLIBS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$REQUIRED_LIBS" 2>&1`
+	        XDMCP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "xdmcp" 2>&1`
         else
-	        XSERVERLIBS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$REQUIRED_LIBS" 2>&1`
+	        XDMCP_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "xdmcp" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
-	echo "$XSERVERLIBS_PKG_ERRORS" >&5
+	echo "$XDMCP_PKG_ERRORS" >&5
 
-	as_fn_error $? "Package requirements ($REQUIRED_LIBS) were not met:
+	have_libxdmcp="no"
+elif test $pkg_failed = untried; then
+     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+	have_libxdmcp="no"
+else
+	XDMCP_CFLAGS=$pkg_cv_XDMCP_CFLAGS
+	XDMCP_LIBS=$pkg_cv_XDMCP_LIBS
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+	have_libxdmcp="yes"
+fi
+if test "x$XDMCP" = xauto; then
+	if test "x$have_libxdmcp" = xyes; then
+		XDMCP=yes
+	else
+		XDMCP=no
+	fi
+fi
+if test "x$XDMAUTH" = xauto; then
+	if test "x$have_libxdmcp" = xyes; then
+		XDMAUTH=yes
+	else
+		XDMAUTH=no
+	fi
+fi
 
-$XSERVERLIBS_PKG_ERRORS
+ if test "x$XDMCP" = xyes; then
+  XDMCP_TRUE=
+  XDMCP_FALSE='#'
+else
+  XDMCP_TRUE='#'
+  XDMCP_FALSE=
+fi
 
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
+if test "x$XDMCP" = xyes; then
 
-Alternatively, you may set the environment variables XSERVERLIBS_CFLAGS
-and XSERVERLIBS_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details." "$LINENO" 5
-elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
+printf "%s\n" "#define XDMCP 1" >>confdefs.h
 
-Alternatively, you may set the environment variables XSERVERLIBS_CFLAGS
-and XSERVERLIBS_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
+	REQUIRED_LIBS="$REQUIRED_LIBS xdmcp"
+	XDMCP_MODULES="xdmcp"
+fi
 
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details" "$LINENO" 5; }
+ if test "x$XDMAUTH" = xyes; then
+  XDMAUTH_TRUE=
+  XDMAUTH_FALSE='#'
 else
-	XSERVERLIBS_CFLAGS=$pkg_cv_XSERVERLIBS_CFLAGS
-	XSERVERLIBS_LIBS=$pkg_cv_XSERVERLIBS_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
+  XDMAUTH_TRUE='#'
+  XDMAUTH_FALSE=
 fi
 
+if test "x$XDMAUTH" = xyes; then
 
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBUNWIND" >&5
-$as_echo_n "checking for LIBUNWIND... " >&6; }
+printf "%s\n" "#define HASXDMAUTH 1" >>confdefs.h
 
-if test -n "$LIBUNWIND_CFLAGS"; then
-    pkg_cv_LIBUNWIND_CFLAGS="$LIBUNWIND_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libunwind\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "libunwind") 2>&5
+	if ! test "x$XDMCP" = xyes; then
+		REQUIRED_LIBS="$REQUIRED_LIBS xdmcp"
+		XDMCP_MODULES="xdmcp"
+	fi
+fi
+
+if test "x$XF86VIDMODE" = xauto; then
+	if test -n "$PKG_CONFIG" && \
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$VIDMODEPROTO\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$VIDMODEPROTO") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_LIBUNWIND_CFLAGS=`$PKG_CONFIG --cflags "libunwind" 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
+  XF86VIDMODE=yes
 else
-  pkg_failed=yes
+  XF86VIDMODE=no
 fi
- else
-    pkg_failed=untried
 fi
-if test -n "$LIBUNWIND_LIBS"; then
-    pkg_cv_LIBUNWIND_LIBS="$LIBUNWIND_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libunwind\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "libunwind") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_LIBUNWIND_LIBS=`$PKG_CONFIG --libs "libunwind" 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
+if test "x$XF86VIDMODE" = xyes; then
+
+printf "%s\n" "#define XF86VIDMODE 1" >>confdefs.h
+
 fi
- else
-    pkg_failed=untried
+ if test "x$XF86VIDMODE" = xyes; then
+  XF86VIDMODE_TRUE=
+  XF86VIDMODE_FALSE='#'
+else
+  XF86VIDMODE_TRUE='#'
+  XF86VIDMODE_FALSE=
 fi
 
 
 
-if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  prefix_NONE=
+  exec_prefix_NONE=
+  test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
+  test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
+  eval ac_define_dir="\"$FONTPATH\""
+  eval ac_define_dir="\"$ac_define_dir\""
+  COMPILEDDEFAULTFONTPATH="$ac_define_dir"
 
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi
-        if test $_pkg_short_errors_supported = yes; then
-	        LIBUNWIND_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libunwind" 2>&1`
-        else
-	        LIBUNWIND_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libunwind" 2>&1`
-        fi
-	# Put the nasty error message in config.log where it belongs
-	echo "$LIBUNWIND_PKG_ERRORS" >&5
 
-	HAVE_LIBUNWIND=no
-elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-	HAVE_LIBUNWIND=no
-else
-	LIBUNWIND_CFLAGS=$pkg_cv_LIBUNWIND_CFLAGS
-	LIBUNWIND_LIBS=$pkg_cv_LIBUNWIND_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-	HAVE_LIBUNWIND=yes
-fi
-if test "x$LIBUNWIND" = "xauto"; then
-    LIBUNWIND="$HAVE_LIBUNWIND"
-fi
+printf "%s\n" "#define COMPILEDDEFAULTFONTPATH \"$ac_define_dir\"" >>confdefs.h
 
-if test "x$LIBUNWIND" = "xyes"; then
-    if test "x$HAVE_LIBUNWIND" != "xyes"; then
-        as_fn_error $? "libunwind requested but not installed." "$LINENO" 5
-    fi
+  test "$prefix_NONE" && prefix=NONE
+  test "$exec_prefix_NONE" && exec_prefix=NONE
 
-$as_echo "#define HAVE_LIBUNWIND 1" >>confdefs.h
 
-fi
+  prefix_NONE=
+  exec_prefix_NONE=
+  test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
+  test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
+  eval ac_define_dir="\"$SERVERCONFIG\""
+  eval ac_define_dir="\"$ac_define_dir\""
+  SERVER_MISC_CONFIG_PATH="$ac_define_dir"
 
- if test "x$LIBUNWIND" = xyes; then
-  HAVE_LIBUNWIND_TRUE=
-  HAVE_LIBUNWIND_FALSE='#'
-else
-  HAVE_LIBUNWIND_TRUE='#'
-  HAVE_LIBUNWIND_FALSE=
-fi
 
+printf "%s\n" "#define SERVER_MISC_CONFIG_PATH \"$ac_define_dir\"" >>confdefs.h
 
-# Autotools has some unfortunate issues with library handling.  In order to
-# get a server to rebuild when a dependency in the tree is changed, it must
-# be listed in SERVERNAME_DEPENDENCIES.  However, no system libraries may be
-# listed there, or some versions of autotools will break (especially if a -L
-# is required to find the library).  So, we keep two sets of libraries
-# detected: NAMESPACE_LIBS for in-tree libraries to be linked against, which
-# will go into the _DEPENDENCIES and _LDADD of the server, and
-# NAMESPACE_SYS_LIBS which will go into only the _LDADD.  The
-# NAMESPACEMODULES_LIBS detected from pkgconfig should always go in
-# NAMESPACE_SYS_LIBS.
-#
-# XSERVER_LIBS is the set of in-tree libraries which all servers require.
-# XSERVER_SYS_LIBS is the set of out-of-tree libraries which all servers
-# require.
-#
-XSERVER_CFLAGS="${XSERVER_CFLAGS} ${XSERVERCFLAGS_CFLAGS}"
-XSERVER_LIBS="$DIX_LIB $MI_LIB $OS_LIB"
-XSERVER_SYS_LIBS="${XSERVERLIBS_LIBS} ${SYS_LIBS} ${LIBS}"
+  test "$prefix_NONE" && prefix=NONE
+  test "$exec_prefix_NONE" && exec_prefix=NONE
 
 
+  prefix_NONE=
+  exec_prefix_NONE=
+  test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
+  test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
+  eval ac_define_dir="\"$FONTROOTDIR\""
+  eval ac_define_dir="\"$ac_define_dir\""
+  BASE_FONT_PATH="$ac_define_dir"
 
-UTILS_SYS_LIBS="${SYS_LIBS}"
 
+printf "%s\n" "#define BASE_FONT_PATH \"$ac_define_dir\"" >>confdefs.h
 
-# The Xorg binary needs to export symbols so that they can be used from modules
-# Some platforms require extra flags to do this.   libtool should set the
-# necessary flags for each platform when -export-dynamic is passed to it.
-LD_EXPORT_SYMBOLS_FLAG="-export-dynamic"
-LD_NO_UNDEFINED_FLAG=
-XORG_DRIVER_LIBS=
-case "$host_os" in
-    cygwin*)
-	LD_EXPORT_SYMBOLS_FLAG="-Wl,--export-all,--out-implib,lib\$@.a"
-	LD_NO_UNDEFINED_FLAG="-no-undefined -Wl,\$(top_builddir)/hw/xfree86/libXorg.exe.a"
-	XORG_DRIVER_LIBS="-lXorg.exe -L\${moduledir} -lshadow -lfb -no-undefined"
-	CYGWIN=yes
-	;;
-    solaris*)
-	# We use AC_LINK_IFELSE to generate a temporary program conftest$EXEEXT
-	# that we can link against for testing if the system linker is new
-	# enough to support -z parent=<program> for verifying loadable modules
-	# are only calling functions defined in either the loading program or
-	# the libraries they're linked with.
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-int main(int argc, char **argv) { return 0; }
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  mv conftest$EXEEXT conftest.parent
-	     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -Wl,-z,parent=conftest.parent -G" >&5
-$as_echo_n "checking whether the linker accepts -Wl,-z,parent=conftest.parent -G... " >&6; }
-if ${xorg_cv_linker_flags__Wl__z_parent_conftest_parent__G+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+  test "$prefix_NONE" && prefix=NONE
+  test "$exec_prefix_NONE" && exec_prefix=NONE
 
-      ax_save_FLAGS=$LDFLAGS
-      LDFLAGS="-Wl,-z,parent=conftest.parent -G"
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-extern int main(int argc, char **argv);
-			int call_main(void) { return main(0, (void *)0); }
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  xorg_cv_linker_flags__Wl__z_parent_conftest_parent__G=yes
-else
-  xorg_cv_linker_flags__Wl__z_parent_conftest_parent__G=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-      LDFLAGS=$ax_save_FLAGS
-fi
+dridriverdir=`$PKG_CONFIG --variable=dridriverdir dri`
 
-eval xorg_check_linker_flags=$xorg_cv_linker_flags__Wl__z_parent_conftest_parent__G
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_check_linker_flags" >&5
-$as_echo "$xorg_check_linker_flags" >&6; }
-if test "x$xorg_check_linker_flags" = xyes; then
-	LD_NO_UNDEFINED_FLAG="-Wl,-z,defs -Wl,-z,parent=\$(top_builddir)/hw/xfree86/Xorg"
-# Not set yet, since this gets exported in xorg-server.pc to all the drivers,
-# and they're not all fixed to build correctly with it yet.
-#		 XORG_DRIVER_LIBS="-Wl,-z,defs -Wl,-z,parent=${bindir}/Xorg"
+  prefix_NONE=
+  exec_prefix_NONE=
+  test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
+  test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
+  eval ac_define_dir="\"$dridriverdir\""
+  eval ac_define_dir="\"$ac_define_dir\""
+  DRI_DRIVER_PATH="$ac_define_dir"
 
-else
-	:
-fi
 
-	     rm -f conftest.parent
+printf "%s\n" "#define DRI_DRIVER_PATH \"$ac_define_dir\"" >>confdefs.h
 
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-	;;
-esac
+  test "$prefix_NONE" && prefix=NONE
+  test "$exec_prefix_NONE" && exec_prefix=NONE
 
 
+printf "%s\n" "#define XVENDORNAME \"$VENDOR_NAME\"" >>confdefs.h
 
- if test x"$CYGWIN" = xyes; then
-  CYGWIN_TRUE=
-  CYGWIN_FALSE='#'
-else
-  CYGWIN_TRUE='#'
-  CYGWIN_FALSE=
-fi
 
- if test x"$LD_NO_UNDEFINED_FLAG" != x; then
-  NO_UNDEFINED_TRUE=
-  NO_UNDEFINED_FALSE='#'
-else
-  NO_UNDEFINED_TRUE='#'
-  NO_UNDEFINED_FALSE=
-fi
+printf "%s\n" "#define XVENDORNAMESHORT \"$VENDOR_NAME_SHORT\"" >>confdefs.h
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if SVR4 needs to be defined" >&5
-$as_echo_n "checking if SVR4 needs to be defined... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+printf "%s\n" "#define XORG_MAN_VERSION \"$VENDOR_MAN_VERSION\"" >>confdefs.h
 
-#if defined(SVR4) || defined(__svr4__) || defined(__SVR4)
- I_AM_SVR4
-#endif
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "I_AM_SVR4" >/dev/null 2>&1; then :
+printf "%s\n" "#define BUILDERADDR \"$BUILDERADDR\"" >>confdefs.h
 
 
-$as_echo "#define SVR4 1" >>confdefs.h
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-rm -f conftest*
+printf "%s\n" "#define BUILDERSTRING \"$BUILDERSTRING\"" >>confdefs.h
 
 
-XSERVER_CFLAGS="$XSERVER_CFLAGS $CORE_INCS $XEXT_INC $COMPOSITE_INC $DAMAGE_INC $FIXES_INC $XI_INC $MI_INC $MIEXT_SYNC_INC $MIEXT_SHADOW_INC $MIEXT_LAYER_INC $MIEXT_DAMAGE_INC $RENDER_INC $RANDR_INC $FB_INC $DBE_INC $PRESENT_INC"
 
 
+printf "%s\n" "#define VENDOR_NAME \"$VENDOR_NAME\"" >>confdefs.h
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Xvfb DDX" >&5
-$as_echo_n "checking whether to build Xvfb DDX... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $XVFB" >&5
-$as_echo "$XVFB" >&6; }
- if test "x$XVFB" = xyes; then
-  XVFB_TRUE=
-  XVFB_FALSE='#'
-else
-  XVFB_TRUE='#'
-  XVFB_FALSE=
-fi
 
+printf "%s\n" "#define VENDOR_NAME_SHORT \"$VENDOR_NAME_SHORT\"" >>confdefs.h
 
-if test "x$XVFB" = xyes; then
-	XVFB_LIBS="$FB_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $DRI3_LIB $PRESENT_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB"
-	XVFB_SYS_LIBS="$XVFBMODULES_LIBS $GLX_SYS_LIBS"
 
+printf "%s\n" "#define VENDOR_RELEASE $VENDOR_RELEASE" >>confdefs.h
 
-fi
 
+printf "%s\n" "#define VENDOR_MAN_VERSION \"$VENDOR_MAN_VERSION\"" >>confdefs.h
 
 
+if test "x$DEBUGGING" = xyes; then
 
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XNESTMODULES" >&5
-$as_echo_n "checking for XNESTMODULES... " >&6; }
+printf "%s\n" "#define DEBUG 1" >>confdefs.h
 
-if test -n "$XNESTMODULES_CFLAGS"; then
-    pkg_cv_XNESTMODULES_CFLAGS="$XNESTMODULES_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBXEXT x11 xau \$XDMCP_MODULES\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$LIBXEXT x11 xau $XDMCP_MODULES") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_XNESTMODULES_CFLAGS=`$PKG_CONFIG --cflags "$LIBXEXT x11 xau $XDMCP_MODULES" 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
 fi
-if test -n "$XNESTMODULES_LIBS"; then
-    pkg_cv_XNESTMODULES_LIBS="$XNESTMODULES_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBXEXT x11 xau \$XDMCP_MODULES\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$LIBXEXT x11 xau $XDMCP_MODULES") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_XNESTMODULES_LIBS=`$PKG_CONFIG --libs "$LIBXEXT x11 xau $XDMCP_MODULES" 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
+ if test "x$DEBUGGING" = xyes; then
+  DEBUG_TRUE=
+  DEBUG_FALSE='#'
 else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
+  DEBUG_TRUE='#'
+  DEBUG_FALSE=
 fi
 
 
 
-if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+printf "%s\n" "#define XTEST 1" >>confdefs.h
 
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi
-        if test $_pkg_short_errors_supported = yes; then
-	        XNESTMODULES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$LIBXEXT x11 xau $XDMCP_MODULES" 2>&1`
-        else
-	        XNESTMODULES_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$LIBXEXT x11 xau $XDMCP_MODULES" 2>&1`
-        fi
-	# Put the nasty error message in config.log where it belongs
-	echo "$XNESTMODULES_PKG_ERRORS" >&5
 
-	have_xnest=no
-elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-	have_xnest=no
+printf "%s\n" "#define XSYNC 1" >>confdefs.h
+
+
+printf "%s\n" "#define XCMISC 1" >>confdefs.h
+
+
+printf "%s\n" "#define BIGREQS 1" >>confdefs.h
+
+
+if test "x$SPECIAL_DTRACE_OBJECTS" = "xyes" ; then
+  DIX_LIB='$(top_builddir)/dix/dix.O'
+  OS_LIB='$(top_builddir)/os/os.O $(SHA1_LIBS) $(DLOPEN_LIBS) $(LIBUNWIND_LIBS)'
 else
-	XNESTMODULES_CFLAGS=$pkg_cv_XNESTMODULES_CFLAGS
-	XNESTMODULES_LIBS=$pkg_cv_XNESTMODULES_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-	have_xnest=yes
+  DIX_LIB='$(top_builddir)/dix/libdix.la'
+  OS_LIB='$(top_builddir)/os/libos.la'
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Xnest DDX" >&5
-$as_echo_n "checking whether to build Xnest DDX... " >&6; }
-if test "x$XNEST" = xauto; then
-	XNEST="$have_xnest"
+
+
+
+MAIN_LIB='$(top_builddir)/dix/libmain.la'
+
+
+MI_LIB='$(top_builddir)/mi/libmi.la'
+MI_EXT_LIB='$(top_builddir)/mi/libmiext.la'
+MI_INC='-I$(top_srcdir)/mi'
+FB_LIB='$(top_builddir)/fb/libfb.la'
+FB_INC='-I$(top_srcdir)/fb'
+MIEXT_SHADOW_INC='-I$(top_srcdir)/miext/shadow'
+MIEXT_SHADOW_LIB='$(top_builddir)/miext/shadow/libshadow.la'
+MIEXT_SYNC_INC='-I$(top_srcdir)/miext/sync'
+MIEXT_SYNC_LIB='$(top_builddir)/miext/sync/libsync.la'
+CORE_INCS='-I$(top_srcdir)/include -I$(top_builddir)/include'
+
+# SHA1 hashing
+
+# Check whether --with-sha1 was given.
+if test ${with_sha1+y}
+then :
+  withval=$with_sha1;
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $XNEST" >&5
-$as_echo "$XNEST" >&6; }
- if test "x$XNEST" = xyes; then
-  XNEST_TRUE=
-  XNEST_FALSE='#'
-else
-  XNEST_TRUE='#'
-  XNEST_FALSE=
+
+ac_fn_c_check_func "$LINENO" "SHA1Init" "ac_cv_func_SHA1Init"
+if test "x$ac_cv_func_SHA1Init" = xyes
+then :
+  HAVE_SHA1_IN_LIBC=yes
 fi
 
+if test "x$with_sha1" = x && test "x$HAVE_SHA1_IN_LIBC" = xyes; then
+	with_sha1=libc
+fi
+if test "x$with_sha1" = xlibc && test "x$HAVE_SHA1_IN_LIBC" != xyes; then
+	as_fn_error $? "libc requested but not found" "$LINENO" 5
+fi
+if test "x$with_sha1" = xlibc; then
 
-if test "x$XNEST" = xyes; then
-	if test "x$have_xnest" = xno; then
-		as_fn_error $? "Xnest build explicitly requested, but required modules not found." "$LINENO" 5
-	fi
-	XNEST_LIBS="$FB_LIB $FIXES_LIB $MI_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $DAMAGE_LIB  $DRI3_LIB $PRESENT_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $RENDER_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $MAIN_LIB $DIX_LIB $OS_LIB"
-	XNEST_SYS_LIBS="$XNESTMODULES_LIBS $GLX_SYS_LIBS"
+printf "%s\n" "#define HAVE_SHA1_IN_LIBC 1" >>confdefs.h
 
+	SHA1_LIBS=""
+fi
+ac_fn_c_check_func "$LINENO" "CC_SHA1_Init" "ac_cv_func_CC_SHA1_Init"
+if test "x$ac_cv_func_CC_SHA1_Init" = xyes
+then :
+  HAVE_SHA1_IN_COMMONCRYPTO=yes
+fi
 
+if test "x$with_sha1" = x && test "x$HAVE_SHA1_IN_COMMONCRYPTO" = xyes; then
+	with_sha1=CommonCrypto
+fi
+if test "x$with_sha1" = xCommonCrypto && test "x$HAVE_SHA1_IN_COMMONCRYPTO" != xyes; then
+	as_fn_error $? "CommonCrypto requested but not found" "$LINENO" 5
 fi
+if test "x$with_sha1" = xCommonCrypto; then
 
+printf "%s\n" "#define HAVE_SHA1_IN_COMMONCRYPTO 1" >>confdefs.h
 
+	SHA1_LIBS=""
+fi
+ac_fn_c_check_header_compile "$LINENO" "wincrypt.h" "ac_cv_header_wincrypt_h" "#include <windows.h>
+"
+if test "x$ac_cv_header_wincrypt_h" = xyes
+then :
+  HAVE_SHA1_IN_CRYPTOAPI=yes
+fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Xorg DDX" >&5
-$as_echo_n "checking whether to build Xorg DDX... " >&6; }
-if test "x$XORG" = xauto; then
-	XORG="yes"
-	case $host_os in
-		cygwin*) XORG="no" ;;
-		mingw*)  XORG="no" ;;
-		darwin*) XORG="no" ;;
-	esac
+if test "x$with_sha1" = x && test "x$HAVE_SHA1_IN_CRYPTOAPI" = xyes; then
+	with_sha1=CryptoAPI
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $XORG" >&5
-$as_echo "$XORG" >&6; }
+if test "x$with_sha1" = xCryptoAPI && test "x$HAVE_SHA1_IN_CRYPTOAPI" != xyes; then
+	as_fn_error $? "CryptoAPI requested but not found" "$LINENO" 5
+fi
+if test "x$with_sha1" = xCryptoAPI; then
 
-if test "x$XORG" = xyes; then
-	XORG_DDXINCS='-I$(top_srcdir)/hw/xfree86 -I$(top_srcdir)/hw/xfree86/include -I$(top_srcdir)/hw/xfree86/common'
-	XORG_OSINCS='-I$(top_srcdir)/hw/xfree86/os-support -I$(top_srcdir)/hw/xfree86/os-support/bus -I$(top_srcdir)/os'
-	XORG_INCS="$XORG_DDXINCS $XORG_OSINCS"
-	XORG_CFLAGS="$XORGSERVER_CFLAGS -DHAVE_XORG_CONFIG_H"
-	XORG_LIBS="$COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $DRI3_LIB $PRESENT_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $XI_LIB $XKB_LIB"
+printf "%s\n" "#define HAVE_SHA1_IN_CRYPTOAPI 1" >>confdefs.h
 
-			symbol_visibility=
-	have_visibility=disabled
-	if test x$SYMBOL_VISIBILITY != xno; then
-	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for symbol visibility support" >&5
-$as_echo_n "checking for symbol visibility support... " >&6; }
-	    if test x$GCC = xyes; then
-		VISIBILITY_CFLAGS="-fvisibility=hidden"
-	    else
-		if test x$SUNCC = xyes; then
-		    VISIBILITY_CFLAGS="-xldscope=hidden"
-		else
-		    have_visibility=no
-		fi
-	    fi
-	    if test x$have_visibility != xno; then
-		save_CFLAGS="$CFLAGS"
-		proto_inc=`$PKG_CONFIG --cflags xproto`
-		CFLAGS="$CFLAGS $VISIBILITY_CFLAGS $proto_inc"
-		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+	SHA1_LIBS=""
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SHA1Init in -lmd" >&5
+printf %s "checking for SHA1Init in -lmd... " >&6; }
+if test ${ac_cv_lib_md_SHA1Init+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lmd  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-		    #include <X11/Xfuncproto.h>
-		     extern _X_HIDDEN int hidden_int;
-		     extern _X_EXPORT int public_int;
-		     extern _X_HIDDEN int hidden_int_func(void);
-		     extern _X_EXPORT int public_int_func(void);
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+char SHA1Init ();
 int
-main ()
+main (void)
 {
-
+return SHA1Init ();
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  have_visibility=yes
-else
-  have_visibility=no
+if ac_fn_c_try_link "$LINENO"
+then :
+  ac_cv_lib_md_SHA1Init=yes
+else $as_nop
+  ac_cv_lib_md_SHA1Init=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_md_SHA1Init" >&5
+printf "%s\n" "$ac_cv_lib_md_SHA1Init" >&6; }
+if test "x$ac_cv_lib_md_SHA1Init" = xyes
+then :
+  HAVE_LIBMD=yes
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-		CFLAGS=$save_CFLAGS
-	    fi
-	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_visibility" >&5
-$as_echo "$have_visibility" >&6; }
-	    if test x$have_visibility != xno; then
-		symbol_visibility=$VISIBILITY_CFLAGS
-		XORG_CFLAGS="$XORG_CFLAGS $VISIBILITY_CFLAGS"
-		XSERVER_CFLAGS="$XSERVER_CFLAGS $VISIBILITY_CFLAGS"
-	    fi
-	fi
 
+if test "x$with_sha1" = x && test "x$HAVE_LIBMD" = xyes; then
+	with_sha1=libmd
+fi
+if test "x$with_sha1" = xlibmd && test "x$HAVE_LIBMD" != xyes; then
+	as_fn_error $? "libmd requested but not found" "$LINENO" 5
+fi
+if test "x$with_sha1" = xlibmd; then
 
-				xorg_bus_bsdpci=no
-	xorg_bus_sparc=no
+printf "%s\n" "#define HAVE_SHA1_IN_LIBMD 1" >>confdefs.h
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Xorg PCI functions" >&5
-$as_echo_n "checking whether to build Xorg PCI functions... " >&6; }
-	if test "x$PCI" = xyes; then
+	SHA1_LIBS=-lmd
+fi
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PCIACCESS" >&5
-$as_echo_n "checking for PCIACCESS... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LIBSHA1" >&5
+printf %s "checking for LIBSHA1... " >&6; }
 
-if test -n "$PCIACCESS_CFLAGS"; then
-    pkg_cv_PCIACCESS_CFLAGS="$PCIACCESS_CFLAGS"
+if test -n "$LIBSHA1_CFLAGS"; then
+    pkg_cv_LIBSHA1_CFLAGS="$LIBSHA1_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBPCIACCESS\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$LIBPCIACCESS") 2>&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsha1\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "libsha1") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_PCIACCESS_CFLAGS=`$PKG_CONFIG --cflags "$LIBPCIACCESS" 2>/dev/null`
+  pkg_cv_LIBSHA1_CFLAGS=`$PKG_CONFIG --cflags "libsha1" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -29065,16 +29519,16 @@ fi
  else
     pkg_failed=untried
 fi
-if test -n "$PCIACCESS_LIBS"; then
-    pkg_cv_PCIACCESS_LIBS="$PCIACCESS_LIBS"
+if test -n "$LIBSHA1_LIBS"; then
+    pkg_cv_LIBSHA1_LIBS="$LIBSHA1_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBPCIACCESS\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$LIBPCIACCESS") 2>&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsha1\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "libsha1") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_PCIACCESS_LIBS=`$PKG_CONFIG --libs "$LIBPCIACCESS" 2>/dev/null`
+  pkg_cv_LIBSHA1_LIBS=`$PKG_CONFIG --libs "libsha1" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -29086,8 +29540,8 @@ fi
 
 
 if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -29095,241 +29549,197 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        PCIACCESS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$LIBPCIACCESS" 2>&1`
+	        LIBSHA1_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsha1" 2>&1`
         else
-	        PCIACCESS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$LIBPCIACCESS" 2>&1`
+	        LIBSHA1_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsha1" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
-	echo "$PCIACCESS_PKG_ERRORS" >&5
-
-	as_fn_error $? "Package requirements ($LIBPCIACCESS) were not met:
-
-$PCIACCESS_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
+	echo "$LIBSHA1_PKG_ERRORS" >&5
 
-Alternatively, you may set the environment variables PCIACCESS_CFLAGS
-and PCIACCESS_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details." "$LINENO" 5
+	HAVE_LIBSHA1=no
 elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-Alternatively, you may set the environment variables PCIACCESS_CFLAGS
-and PCIACCESS_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details" "$LINENO" 5; }
+     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+	HAVE_LIBSHA1=no
 else
-	PCIACCESS_CFLAGS=$pkg_cv_PCIACCESS_CFLAGS
-	PCIACCESS_LIBS=$pkg_cv_PCIACCESS_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
+	LIBSHA1_CFLAGS=$pkg_cv_LIBSHA1_CFLAGS
+	LIBSHA1_LIBS=$pkg_cv_LIBSHA1_LIBS
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+	HAVE_LIBSHA1=yes
 fi
-		SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $LIBPCIACCESS"
-		XORG_SYS_LIBS="$XORG_SYS_LIBS $PCIACCESS_LIBS $LIBDRM_LIBS"
-		XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS $LIBDRM_CFLAGS"
-
-
-$as_echo "#define XSERVER_LIBPCIACCESS 1" >>confdefs.h
-
-
-  prefix_NONE=
-  exec_prefix_NONE=
-  test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
-  test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
-  eval ac_define_dir="\"$PCI_TXT_IDS_DIR\""
-  eval ac_define_dir="\"$ac_define_dir\""
-  PCI_TXT_IDS_PATH="$ac_define_dir"
-
-
-cat >>confdefs.h <<_ACEOF
-#define PCI_TXT_IDS_PATH "$ac_define_dir"
-_ACEOF
-
-  test "$prefix_NONE" && prefix=NONE
-  test "$exec_prefix_NONE" && exec_prefix=NONE
-
-		case $host_os in
-		  gnu* | freebsd* | kfreebsd*-gnu | netbsd* | openbsd* | solaris* | dragonfly*)
-			xorg_bus_bsdpci="yes"
-			;;
-		esac
-		case $host_cpu in
-		  sparc*)
-			xorg_bus_sparc="yes"
-			;;
-		esac
-	else
-		if test "x$CONFIG_UDEV_KMS" = xyes; then
-			as_fn_error $? "Platform device enumeration requires libpciaccess" "$LINENO" 5
-		fi
-		if test "x$INT10MODULE" = xyes && test "x$INT10" != xstub; then
-			as_fn_error $? "Cannot build int10 without libpciaccess" "$LINENO" 5
-		fi
-	fi
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PCI" >&5
-$as_echo "$PCI" >&6; }
-
-	if test "x$CONFIG_UDEV_KMS" = xyes; then
+if test "x$with_sha1" = x && test "x$HAVE_LIBSHA1" = xyes; then
+   with_sha1=libsha1
+fi
+if test "x$with_sha1" = xlibsha1 && test "x$HAVE_LIBSHA1" != xyes; then
+	as_fn_error $? "libsha1 requested but not found" "$LINENO" 5
+fi
+if test "x$with_sha1" = xlibsha1; then
 
-$as_echo "#define XSERVER_PLATFORM_BUS 1" >>confdefs.h
+printf "%s\n" "#define HAVE_SHA1_IN_LIBSHA1 1" >>confdefs.h
 
-	fi
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSERVER_PLATFORM_BUS" >&5
-$as_echo "$XSERVER_PLATFORM_BUS" >&6; }
+	SHA1_LIBS=-lsha1
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nettle_sha1_init in -lnettle" >&5
+printf %s "checking for nettle_sha1_init in -lnettle... " >&6; }
+if test ${ac_cv_lib_nettle_nettle_sha1_init+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lnettle  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-	case $host_os in
-	  linux*)
-		XORG_OS_SUBDIR="linux"
-		linux_acpi="no"
-		case $host_cpu in
-		  i*86|amd64*|x86_64*|ia64*)
-			linux_acpi=$enable_linux_acpi
-			;;
-		  *)
-			;;
-		esac
-				for ac_header in linux/apm_bios.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "linux/apm_bios.h" "ac_cv_header_linux_apm_bios_h" "$ac_includes_default"
-if test "x$ac_cv_header_linux_apm_bios_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LINUX_APM_BIOS_H 1
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+char nettle_sha1_init ();
+int
+main (void)
+{
+return nettle_sha1_init ();
+  ;
+  return 0;
+}
 _ACEOF
- linux_apm=$enable_linux_apm
+if ac_fn_c_try_link "$LINENO"
+then :
+  ac_cv_lib_nettle_nettle_sha1_init=yes
+else $as_nop
+  ac_cv_lib_nettle_nettle_sha1_init=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nettle_nettle_sha1_init" >&5
+printf "%s\n" "$ac_cv_lib_nettle_nettle_sha1_init" >&6; }
+if test "x$ac_cv_lib_nettle_nettle_sha1_init" = xyes
+then :
+  HAVE_LIBNETTLE=yes
 fi
 
-done
-
-		if test "x$linux_apm" = xyes -o "x$linux_acpi" = xyes; then
-
-$as_echo "#define XF86PM 1" >>confdefs.h
+if test "x$with_sha1" = x && test "x$HAVE_LIBNETTLE" = xyes; then
+	with_sha1=libnettle
+fi
+if test "x$with_sha1" = xlibnettle && test "x$HAVE_LIBNETTLE" != xyes; then
+	as_fn_error $? "libnettle requested but not found" "$LINENO" 5
+fi
+if test "x$with_sha1" = xlibnettle; then
 
-		fi
-		;;
-	  freebsd* | kfreebsd*-gnu | dragonfly*)
-		XORG_OS_SUBDIR="bsd"
-		;;
-	  netbsd*)
-		XORG_OS_SUBDIR="bsd"
-		;;
-	  openbsd*)
-		if test "x$ac_cv_BSD_APM" = xyes \
-			-o "x$ac_cv_BSD_KQUEUE_APM" = xyes; then
-			XORG_CFLAGS="$XORG_CFLAGS -DXF86PM"
-		fi
-		XORG_OS_SUBDIR="bsd"
-		;;
-	  solaris*)
-		XORG_OS_SUBDIR="solaris"
-		XORG_CFLAGS="$XORG_CFLAGS -DXF86PM"
-		for ac_header in sys/kd.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "sys/kd.h" "ac_cv_header_sys_kd_h" "$ac_includes_default"
-if test "x$ac_cv_header_sys_kd_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_SYS_KD_H 1
-_ACEOF
+printf "%s\n" "#define HAVE_SHA1_IN_LIBNETTLE 1" >>confdefs.h
 
+	SHA1_LIBS=-lnettle
 fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gcry_md_open in -lgcrypt" >&5
+printf %s "checking for gcry_md_open in -lgcrypt... " >&6; }
+if test ${ac_cv_lib_gcrypt_gcry_md_open+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgcrypt  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-done
-
-		for ac_header in sys/vt.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "sys/vt.h" "ac_cv_header_sys_vt_h" "$ac_includes_default"
-if test "x$ac_cv_header_sys_vt_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_SYS_VT_H 1
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+char gcry_md_open ();
+int
+main (void)
+{
+return gcry_md_open ();
+  ;
+  return 0;
+}
 _ACEOF
- solaris_vt=yes
-else
-  solaris_vt=no
+if ac_fn_c_try_link "$LINENO"
+then :
+  ac_cv_lib_gcrypt_gcry_md_open=yes
+else $as_nop
+  ac_cv_lib_gcrypt_gcry_md_open=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gcrypt_gcry_md_open" >&5
+printf "%s\n" "$ac_cv_lib_gcrypt_gcry_md_open" >&6; }
+if test "x$ac_cv_lib_gcrypt_gcry_md_open" = xyes
+then :
+  HAVE_LIBGCRYPT=yes
 fi
 
-done
-
-		# Check for minimum supported release
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris version" >&5
-$as_echo_n "checking Solaris version... " >&6; }
-	        OS_MINOR=`echo ${host_os}|$SED -e 's/^.*solaris2\.//' -e s'/\..*$//'`
-		if test "${OS_MINOR}" -ge 7 ; then
-	        	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Solaris ${OS_MINOR}" >&5
-$as_echo "Solaris ${OS_MINOR}" >&6; }
-		else
-			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Solaris \`echo ${host_os}|$SED -e 's/^.*solaris//\`" >&5
-$as_echo "Solaris \`echo ${host_os}|$SED -e 's/^.*solaris//\`" >&6; }
-		fi
-		if test "${OS_MINOR}" -lt 8 ; then
-			as_fn_error $? "This release no longer supports Solaris versions older than Solaris 8." "$LINENO" 5
-		fi
-		ac_fn_c_check_decl "$LINENO" "_LP64" "ac_cv_have_decl__LP64" "$ac_includes_default"
-if test "x$ac_cv_have_decl__LP64" = xyes; then :
-  SOLARIS_64="yes"
-else
-  SOLARIS_64="no"
+if test "x$with_sha1" = x && test "x$HAVE_LIBGCRYPT" = xyes; then
+	with_sha1=libgcrypt
+fi
+if test "x$with_sha1" = xlibgcrypt && test "x$HAVE_LIBGCRYPT" != xyes; then
+	as_fn_error $? "libgcrypt requested but not found" "$LINENO" 5
 fi
+if test "x$with_sha1" = xlibgcrypt; then
 
+printf "%s\n" "#define HAVE_SHA1_IN_LIBGCRYPT 1" >>confdefs.h
 
-		case $host_cpu in
-		  sparc*)
-			SOLARIS_INOUT_ARCH="sparcv8plus"
-			;;
-		  i*86|x86_64*)
-			if test x$SOLARIS_64 = xyes ; then
-				SOLARIS_INOUT_ARCH="amd64"
-			else
-				SOLARIS_INOUT_ARCH="ia32"
-			fi
-			;;
-		  *)
-			as_fn_error $? "Unsupported Solaris platform. Only SPARC & x86 \
-			are supported on Solaris in this release.   If you are \
-			interested in porting Xorg to your platform, please email \
-			xorg@lists.freedesktop.org." "$LINENO" 5 ;;
-		esac
+	SHA1_LIBS=-lgcrypt
+fi
+# We don't need all of the OpenSSL libraries, just libcrypto
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SHA1_Init in -lcrypto" >&5
+printf %s "checking for SHA1_Init in -lcrypto... " >&6; }
+if test ${ac_cv_lib_crypto_SHA1_Init+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcrypto  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-		;;
-	  gnu*)
-		XORG_OS_SUBDIR="hurd"
-		;;
-	  cygwin*)
-		XORG_OS_SUBDIR="stub"
-		;;
-	  *)
-		XORG_OS_SUBDIR="stub"
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: Your OS is unknown. If you are interested in porting Xorg to your platform,
-please email xorg@lists.freedesktop.org." >&5
-$as_echo "$as_me: Your OS is unknown. If you are interested in porting Xorg to your platform,
-please email xorg@lists.freedesktop.org." >&6;}
-		;;
-	esac
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+char SHA1_Init ();
+int
+main (void)
+{
+return SHA1_Init ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+  ac_cv_lib_crypto_SHA1_Init=yes
+else $as_nop
+  ac_cv_lib_crypto_SHA1_Init=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_SHA1_Init" >&5
+printf "%s\n" "$ac_cv_lib_crypto_SHA1_Init" >&6; }
+if test "x$ac_cv_lib_crypto_SHA1_Init" = xyes
+then :
+  HAVE_LIBCRYPTO=yes
+fi
 
-	if test "x$DGA" = xauto; then
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGA" >&5
-$as_echo_n "checking for DGA... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for OPENSSL" >&5
+printf %s "checking for OPENSSL... " >&6; }
 
-if test -n "$DGA_CFLAGS"; then
-    pkg_cv_DGA_CFLAGS="$DGA_CFLAGS"
+if test -n "$OPENSSL_CFLAGS"; then
+    pkg_cv_OPENSSL_CFLAGS="$OPENSSL_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$DGAPROTO\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$DGAPROTO") 2>&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "openssl") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_DGA_CFLAGS=`$PKG_CONFIG --cflags "$DGAPROTO" 2>/dev/null`
+  pkg_cv_OPENSSL_CFLAGS=`$PKG_CONFIG --cflags "openssl" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -29337,16 +29747,16 @@ fi
  else
     pkg_failed=untried
 fi
-if test -n "$DGA_LIBS"; then
-    pkg_cv_DGA_LIBS="$DGA_LIBS"
+if test -n "$OPENSSL_LIBS"; then
+    pkg_cv_OPENSSL_LIBS="$OPENSSL_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$DGAPROTO\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$DGAPROTO") 2>&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "openssl") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_DGA_LIBS=`$PKG_CONFIG --libs "$DGAPROTO" 2>/dev/null`
+  pkg_cv_OPENSSL_LIBS=`$PKG_CONFIG --libs "openssl" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -29358,8 +29768,8 @@ fi
 
 
 if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -29367,43 +29777,67 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        DGA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$DGAPROTO" 2>&1`
+	        OPENSSL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "openssl" 2>&1`
         else
-	        DGA_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$DGAPROTO" 2>&1`
+	        OPENSSL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "openssl" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
-	echo "$DGA_PKG_ERRORS" >&5
+	echo "$OPENSSL_PKG_ERRORS" >&5
 
-	DGA=no
+	HAVE_OPENSSL_PKC=no
 elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-	DGA=no
+     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+	HAVE_OPENSSL_PKC=no
 else
-	DGA_CFLAGS=$pkg_cv_DGA_CFLAGS
-	DGA_LIBS=$pkg_cv_DGA_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-	DGA=yes
+	OPENSSL_CFLAGS=$pkg_cv_OPENSSL_CFLAGS
+	OPENSSL_LIBS=$pkg_cv_OPENSSL_LIBS
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+	HAVE_OPENSSL_PKC=yes
 fi
+if test "x$HAVE_LIBCRYPTO" = xyes || test "x$HAVE_OPENSSL_PKC" = xyes; then
+	if test "x$with_sha1" = x; then
+		with_sha1=libcrypto
 	fi
-	if test "x$DGA" = xyes; then
-		XORG_MODULES="$XORG_MODULES $DGAPROTO"
+else
+	if test "x$with_sha1" = xlibcrypto; then
+		as_fn_error $? "OpenSSL libcrypto requested but not found" "$LINENO" 5
+	fi
+fi
+if test "x$with_sha1" = xlibcrypto; then
+	if test "x$HAVE_LIBCRYPTO" = xyes; then
+		SHA1_LIBS=-lcrypto
+	else
+		SHA1_LIBS="$OPENSSL_LIBS"
+		SHA1_CFLAGS="$OPENSSL_CFLAGS"
+	fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SHA1 implementation" >&5
+printf %s "checking for SHA1 implementation... " >&6; }
+if test "x$with_sha1" = x; then
+	as_fn_error $? "No suitable SHA1 implementation found" "$LINENO" 5
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_sha1" >&5
+printf "%s\n" "$with_sha1" >&6; }
+
+
+
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGA" >&5
-$as_echo_n "checking for DGA... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XSERVERCFLAGS" >&5
+printf %s "checking for XSERVERCFLAGS... " >&6; }
 
-if test -n "$DGA_CFLAGS"; then
-    pkg_cv_DGA_CFLAGS="$DGA_CFLAGS"
+if test -n "$XSERVERCFLAGS_CFLAGS"; then
+    pkg_cv_XSERVERCFLAGS_CFLAGS="$XSERVERCFLAGS_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$DGAPROTO\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$DGAPROTO") 2>&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$REQUIRED_MODULES \$REQUIRED_LIBS\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$REQUIRED_MODULES $REQUIRED_LIBS") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_DGA_CFLAGS=`$PKG_CONFIG --cflags "$DGAPROTO" 2>/dev/null`
+  pkg_cv_XSERVERCFLAGS_CFLAGS=`$PKG_CONFIG --cflags "$REQUIRED_MODULES $REQUIRED_LIBS" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -29411,16 +29845,16 @@ fi
  else
     pkg_failed=untried
 fi
-if test -n "$DGA_LIBS"; then
-    pkg_cv_DGA_LIBS="$DGA_LIBS"
+if test -n "$XSERVERCFLAGS_LIBS"; then
+    pkg_cv_XSERVERCFLAGS_LIBS="$XSERVERCFLAGS_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$DGAPROTO\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$DGAPROTO") 2>&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$REQUIRED_MODULES \$REQUIRED_LIBS\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$REQUIRED_MODULES $REQUIRED_LIBS") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_DGA_LIBS=`$PKG_CONFIG --libs "$DGAPROTO" 2>/dev/null`
+  pkg_cv_XSERVERCFLAGS_LIBS=`$PKG_CONFIG --libs "$REQUIRED_MODULES $REQUIRED_LIBS" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -29432,8 +29866,8 @@ fi
 
 
 if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -29441,73 +29875,60 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        DGA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$DGAPROTO" 2>&1`
+	        XSERVERCFLAGS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$REQUIRED_MODULES $REQUIRED_LIBS" 2>&1`
         else
-	        DGA_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$DGAPROTO" 2>&1`
+	        XSERVERCFLAGS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$REQUIRED_MODULES $REQUIRED_LIBS" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
-	echo "$DGA_PKG_ERRORS" >&5
+	echo "$XSERVERCFLAGS_PKG_ERRORS" >&5
 
-	as_fn_error $? "Package requirements ($DGAPROTO) were not met:
+	as_fn_error $? "Package requirements ($REQUIRED_MODULES $REQUIRED_LIBS) were not met:
 
-$DGA_PKG_ERRORS
+$XSERVERCFLAGS_PKG_ERRORS
 
 Consider adjusting the PKG_CONFIG_PATH environment variable if you
 installed software in a non-standard prefix.
 
-Alternatively, you may set the environment variables DGA_CFLAGS
-and DGA_LIBS to avoid the need to call pkg-config.
+Alternatively, you may set the environment variables XSERVERCFLAGS_CFLAGS
+and XSERVERCFLAGS_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details." "$LINENO" 5
 elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
 is in your PATH or set the PKG_CONFIG environment variable to the full
 path to pkg-config.
 
-Alternatively, you may set the environment variables DGA_CFLAGS
-and DGA_LIBS to avoid the need to call pkg-config.
+Alternatively, you may set the environment variables XSERVERCFLAGS_CFLAGS
+and XSERVERCFLAGS_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details.
 
 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
 See \`config.log' for more details" "$LINENO" 5; }
 else
-	DGA_CFLAGS=$pkg_cv_DGA_CFLAGS
-	DGA_LIBS=$pkg_cv_DGA_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+	XSERVERCFLAGS_CFLAGS=$pkg_cv_XSERVERCFLAGS_CFLAGS
+	XSERVERCFLAGS_LIBS=$pkg_cv_XSERVERCFLAGS_LIBS
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
 
 fi
 
-$as_echo "#define DGA 1" >>confdefs.h
-
-
-$as_echo "#define XFreeXDGA 1" >>confdefs.h
-
-	fi
-
-	if test "x$XF86VIDMODE" = xyes; then
-		XORG_MODULES="$XORG_MODULES $VIDMODEPROTO"
-	fi
-
-	if test -n "$XORG_MODULES"; then
-
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XORG_MODULES" >&5
-$as_echo_n "checking for XORG_MODULES... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XSERVERLIBS" >&5
+printf %s "checking for XSERVERLIBS... " >&6; }
 
-if test -n "$XORG_MODULES_CFLAGS"; then
-    pkg_cv_XORG_MODULES_CFLAGS="$XORG_MODULES_CFLAGS"
+if test -n "$XSERVERLIBS_CFLAGS"; then
+    pkg_cv_XSERVERLIBS_CFLAGS="$XSERVERLIBS_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$XORG_MODULES\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$XORG_MODULES") 2>&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$REQUIRED_LIBS\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$REQUIRED_LIBS") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_XORG_MODULES_CFLAGS=`$PKG_CONFIG --cflags "$XORG_MODULES" 2>/dev/null`
+  pkg_cv_XSERVERLIBS_CFLAGS=`$PKG_CONFIG --cflags "$REQUIRED_LIBS" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -29515,422 +29936,464 @@ fi
  else
     pkg_failed=untried
 fi
-if test -n "$XORG_MODULES_LIBS"; then
-    pkg_cv_XORG_MODULES_LIBS="$XORG_MODULES_LIBS"
+if test -n "$XSERVERLIBS_LIBS"; then
+    pkg_cv_XSERVERLIBS_LIBS="$XSERVERLIBS_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$XORG_MODULES\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$XORG_MODULES") 2>&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$REQUIRED_LIBS\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$REQUIRED_LIBS") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_XORG_MODULES_LIBS=`$PKG_CONFIG --libs "$XORG_MODULES" 2>/dev/null`
+  pkg_cv_XSERVERLIBS_LIBS=`$PKG_CONFIG --libs "$REQUIRED_LIBS" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-
-
-
-if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi
-        if test $_pkg_short_errors_supported = yes; then
-	        XORG_MODULES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$XORG_MODULES" 2>&1`
-        else
-	        XORG_MODULES_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$XORG_MODULES" 2>&1`
-        fi
-	# Put the nasty error message in config.log where it belongs
-	echo "$XORG_MODULES_PKG_ERRORS" >&5
-
-	as_fn_error $? "Package requirements ($XORG_MODULES) were not met:
-
-$XORG_MODULES_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-Alternatively, you may set the environment variables XORG_MODULES_CFLAGS
-and XORG_MODULES_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details." "$LINENO" 5
-elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-Alternatively, you may set the environment variables XORG_MODULES_CFLAGS
-and XORG_MODULES_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details" "$LINENO" 5; }
-else
-	XORG_MODULES_CFLAGS=$pkg_cv_XORG_MODULES_CFLAGS
-	XORG_MODULES_LIBS=$pkg_cv_XORG_MODULES_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-fi
-	        XORG_CFLAGS="$XORG_CFLAGS $XORG_MODULES_CFLAGS"
-	        XORG_SYS_LIBS="$XORG_SYS_LIBS $XORG_MODULES_LIBS"
-	fi
-
-	if test "x$DRM" = xyes; then
-		XORG_DRIVER_MODESETTING=yes
-	fi
-
-
-
-
-
-
-
-		XF86CONFIGFILE="xorg.conf"
-	XF86CONFIGDIR="xorg.conf.d"
-
-	CONFIGFILE="$sysconfdir/$XF86CONFIGFILE"
-	LOGPREFIX="Xorg."
-	XDG_DATA_HOME=".local/share"
-	XDG_DATA_HOME_LOGDIR="xorg"
-
-$as_echo "#define XORG_SERVER 1" >>confdefs.h
-
-
-$as_echo "#define XORGSERVER 1" >>confdefs.h
-
-
-$as_echo "#define XFree86Server 1" >>confdefs.h
-
-
-cat >>confdefs.h <<_ACEOF
-#define XORG_VERSION_CURRENT $VENDOR_RELEASE
-_ACEOF
-
-
-$as_echo "#define NEED_XF86_TYPES 1" >>confdefs.h
-
-
-$as_echo "#define NEED_XF86_PROTOTYPES 1" >>confdefs.h
-
-
-$as_echo "#define __XSERVERNAME__ \"Xorg\"" >>confdefs.h
-
-
-  prefix_NONE=
-  exec_prefix_NONE=
-  test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
-  test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
-  eval ac_define_dir="\"$XF86CONFIGFILE\""
-  eval ac_define_dir="\"$ac_define_dir\""
-  XCONFIGFILE="$ac_define_dir"
-
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
 
-cat >>confdefs.h <<_ACEOF
-#define XCONFIGFILE "$ac_define_dir"
-_ACEOF
 
-  test "$prefix_NONE" && prefix=NONE
-  test "$exec_prefix_NONE" && exec_prefix=NONE
 
+if test $pkg_failed = yes; then
+   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 
-  prefix_NONE=
-  exec_prefix_NONE=
-  test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
-  test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
-  eval ac_define_dir="\"$XF86CONFIGFILE\""
-  eval ac_define_dir="\"$ac_define_dir\""
-  XF86CONFIGFILE="$ac_define_dir"
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+	        XSERVERLIBS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$REQUIRED_LIBS" 2>&1`
+        else
+	        XSERVERLIBS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$REQUIRED_LIBS" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$XSERVERLIBS_PKG_ERRORS" >&5
 
+	as_fn_error $? "Package requirements ($REQUIRED_LIBS) were not met:
 
-cat >>confdefs.h <<_ACEOF
-#define XF86CONFIGFILE "$ac_define_dir"
-_ACEOF
+$XSERVERLIBS_PKG_ERRORS
 
-  test "$prefix_NONE" && prefix=NONE
-  test "$exec_prefix_NONE" && exec_prefix=NONE
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
 
+Alternatively, you may set the environment variables XSERVERLIBS_CFLAGS
+and XSERVERLIBS_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details." "$LINENO" 5
+elif test $pkg_failed = untried; then
+     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
 
-  prefix_NONE=
-  exec_prefix_NONE=
-  test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
-  test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
-  eval ac_define_dir="\"$XF86CONFIGDIR\""
-  eval ac_define_dir="\"$ac_define_dir\""
-  XCONFIGDIR="$ac_define_dir"
+Alternatively, you may set the environment variables XSERVERLIBS_CFLAGS
+and XSERVERLIBS_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
 
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details" "$LINENO" 5; }
+else
+	XSERVERLIBS_CFLAGS=$pkg_cv_XSERVERLIBS_CFLAGS
+	XSERVERLIBS_LIBS=$pkg_cv_XSERVERLIBS_LIBS
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
 
-cat >>confdefs.h <<_ACEOF
-#define XCONFIGDIR "$ac_define_dir"
-_ACEOF
+fi
 
-  test "$prefix_NONE" && prefix=NONE
-  test "$exec_prefix_NONE" && exec_prefix=NONE
 
+pkg_failed=no
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LIBUNWIND" >&5
+printf %s "checking for LIBUNWIND... " >&6; }
 
-  prefix_NONE=
-  exec_prefix_NONE=
-  test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
-  test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
-  eval ac_define_dir="\"$moduledir\""
-  eval ac_define_dir="\"$ac_define_dir\""
-  DEFAULT_MODULE_PATH="$ac_define_dir"
+if test -n "$LIBUNWIND_CFLAGS"; then
+    pkg_cv_LIBUNWIND_CFLAGS="$LIBUNWIND_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libunwind\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "libunwind") 2>&5
+  ac_status=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_LIBUNWIND_CFLAGS=`$PKG_CONFIG --cflags "libunwind" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$LIBUNWIND_LIBS"; then
+    pkg_cv_LIBUNWIND_LIBS="$LIBUNWIND_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libunwind\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "libunwind") 2>&5
+  ac_status=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_LIBUNWIND_LIBS=`$PKG_CONFIG --libs "libunwind" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
 
 
-cat >>confdefs.h <<_ACEOF
-#define DEFAULT_MODULE_PATH "$ac_define_dir"
-_ACEOF
 
-  test "$prefix_NONE" && prefix=NONE
-  test "$exec_prefix_NONE" && exec_prefix=NONE
+if test $pkg_failed = yes; then
+   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+	        LIBUNWIND_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libunwind" 2>&1`
+        else
+	        LIBUNWIND_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libunwind" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$LIBUNWIND_PKG_ERRORS" >&5
 
-  prefix_NONE=
-  exec_prefix_NONE=
-  test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
-  test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
-  eval ac_define_dir="\"$libdir\""
-  eval ac_define_dir="\"$ac_define_dir\""
-  DEFAULT_LIBRARY_PATH="$ac_define_dir"
+	HAVE_LIBUNWIND=no
+elif test $pkg_failed = untried; then
+     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+	HAVE_LIBUNWIND=no
+else
+	LIBUNWIND_CFLAGS=$pkg_cv_LIBUNWIND_CFLAGS
+	LIBUNWIND_LIBS=$pkg_cv_LIBUNWIND_LIBS
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+	HAVE_LIBUNWIND=yes
+fi
+if test "x$LIBUNWIND" = "xauto"; then
+    LIBUNWIND="$HAVE_LIBUNWIND"
+fi
 
+if test "x$LIBUNWIND" = "xyes"; then
+    if test "x$HAVE_LIBUNWIND" != "xyes"; then
+        as_fn_error $? "libunwind requested but not installed." "$LINENO" 5
+    fi
 
-cat >>confdefs.h <<_ACEOF
-#define DEFAULT_LIBRARY_PATH "$ac_define_dir"
-_ACEOF
+printf "%s\n" "#define HAVE_LIBUNWIND 1" >>confdefs.h
 
-  test "$prefix_NONE" && prefix=NONE
-  test "$exec_prefix_NONE" && exec_prefix=NONE
+fi
 
+ if test "x$LIBUNWIND" = xyes; then
+  HAVE_LIBUNWIND_TRUE=
+  HAVE_LIBUNWIND_FALSE='#'
+else
+  HAVE_LIBUNWIND_TRUE='#'
+  HAVE_LIBUNWIND_FALSE=
+fi
 
-  prefix_NONE=
-  exec_prefix_NONE=
-  test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
-  test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
-  eval ac_define_dir="\"$logdir\""
-  eval ac_define_dir="\"$ac_define_dir\""
-  DEFAULT_LOGDIR="$ac_define_dir"
 
+# Autotools has some unfortunate issues with library handling.  In order to
+# get a server to rebuild when a dependency in the tree is changed, it must
+# be listed in SERVERNAME_DEPENDENCIES.  However, no system libraries may be
+# listed there, or some versions of autotools will break (especially if a -L
+# is required to find the library).  So, we keep two sets of libraries
+# detected: NAMESPACE_LIBS for in-tree libraries to be linked against, which
+# will go into the _DEPENDENCIES and _LDADD of the server, and
+# NAMESPACE_SYS_LIBS which will go into only the _LDADD.  The
+# NAMESPACEMODULES_LIBS detected from pkgconfig should always go in
+# NAMESPACE_SYS_LIBS.
+#
+# XSERVER_LIBS is the set of in-tree libraries which all servers require.
+# XSERVER_SYS_LIBS is the set of out-of-tree libraries which all servers
+# require.
+#
+XSERVER_CFLAGS="${XSERVER_CFLAGS} ${XSERVERCFLAGS_CFLAGS}"
+XSERVER_LIBS="$DIX_LIB $MI_LIB $OS_LIB"
+XSERVER_SYS_LIBS="${XSERVERLIBS_LIBS} ${SYS_LIBS} ${LIBS}"
 
-cat >>confdefs.h <<_ACEOF
-#define DEFAULT_LOGDIR "$ac_define_dir"
-_ACEOF
 
-  test "$prefix_NONE" && prefix=NONE
-  test "$exec_prefix_NONE" && exec_prefix=NONE
 
+UTILS_SYS_LIBS="${SYS_LIBS}"
 
-  prefix_NONE=
-  exec_prefix_NONE=
-  test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
-  test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
-  eval ac_define_dir="\"$LOGPREFIX\""
-  eval ac_define_dir="\"$ac_define_dir\""
-  DEFAULT_LOGPREFIX="$ac_define_dir"
 
+# The Xorg binary needs to export symbols so that they can be used from modules
+# Some platforms require extra flags to do this.   libtool should set the
+# necessary flags for each platform when -export-dynamic is passed to it.
+LD_EXPORT_SYMBOLS_FLAG="-export-dynamic"
+LD_NO_UNDEFINED_FLAG=
+XORG_DRIVER_LIBS=
+case "$host_os" in
+    cygwin*)
+	LD_EXPORT_SYMBOLS_FLAG="-Wl,--export-all,--out-implib,lib\$@.a"
+	LD_NO_UNDEFINED_FLAG="-no-undefined -Wl,\$(top_builddir)/hw/xfree86/libXorg.exe.a"
+	XORG_DRIVER_LIBS="-lXorg.exe -L\${moduledir} -lshadow -lfb -no-undefined"
+	CYGWIN=yes
+	;;
+    solaris*)
+	# We use AC_LINK_IFELSE to generate a temporary program conftest$EXEEXT
+	# that we can link against for testing if the system linker is new
+	# enough to support -z parent=<program> for verifying loadable modules
+	# are only calling functions defined in either the loading program or
+	# the libraries they're linked with.
+	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+int main(int argc, char **argv) { return 0; }
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+  mv conftest$EXEEXT conftest.parent
+	     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -Wl,-z,parent=conftest.parent -G" >&5
+printf %s "checking whether the linker accepts -Wl,-z,parent=conftest.parent -G... " >&6; }
+if test ${xorg_cv_linker_flags__Wl__z_parent_conftest_parent__G+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
 
-cat >>confdefs.h <<_ACEOF
-#define DEFAULT_LOGPREFIX "$ac_define_dir"
+      ax_save_FLAGS=$LDFLAGS
+      LDFLAGS="-Wl,-z,parent=conftest.parent -G"
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+extern int main(int argc, char **argv);
+			int call_main(void) { return main(0, (void *)0); }
 _ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+  xorg_cv_linker_flags__Wl__z_parent_conftest_parent__G=yes
+else $as_nop
+  xorg_cv_linker_flags__Wl__z_parent_conftest_parent__G=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+      LDFLAGS=$ax_save_FLAGS
+fi
 
-  test "$prefix_NONE" && prefix=NONE
-  test "$exec_prefix_NONE" && exec_prefix=NONE
+eval xorg_check_linker_flags=$xorg_cv_linker_flags__Wl__z_parent_conftest_parent__G
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_check_linker_flags" >&5
+printf "%s\n" "$xorg_check_linker_flags" >&6; }
+if test "x$xorg_check_linker_flags" = xyes; then
+	LD_NO_UNDEFINED_FLAG="-Wl,-z,defs -Wl,-z,parent=\$(top_builddir)/hw/xfree86/Xorg"
+# Not set yet, since this gets exported in xorg-server.pc to all the drivers,
+# and they're not all fixed to build correctly with it yet.
+#		 XORG_DRIVER_LIBS="-Wl,-z,defs -Wl,-z,parent=${bindir}/Xorg"
 
+else
+	:
+fi
 
-  prefix_NONE=
-  exec_prefix_NONE=
-  test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
-  test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
-  eval ac_define_dir="\"$XDG_DATA_HOME\""
-  eval ac_define_dir="\"$ac_define_dir\""
-  DEFAULT_XDG_DATA_HOME="$ac_define_dir"
+	     rm -f conftest.parent
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+	;;
+esac
 
 
-cat >>confdefs.h <<_ACEOF
-#define DEFAULT_XDG_DATA_HOME "$ac_define_dir"
-_ACEOF
 
-  test "$prefix_NONE" && prefix=NONE
-  test "$exec_prefix_NONE" && exec_prefix=NONE
+ if test x"$CYGWIN" = xyes; then
+  CYGWIN_TRUE=
+  CYGWIN_FALSE='#'
+else
+  CYGWIN_TRUE='#'
+  CYGWIN_FALSE=
+fi
+
+ if test x"$LD_NO_UNDEFINED_FLAG" != x; then
+  NO_UNDEFINED_TRUE=
+  NO_UNDEFINED_FALSE='#'
+else
+  NO_UNDEFINED_TRUE='#'
+  NO_UNDEFINED_FALSE=
+fi
 
 
-  prefix_NONE=
-  exec_prefix_NONE=
-  test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
-  test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
-  eval ac_define_dir="\"$XDG_DATA_HOME_LOGDIR\""
-  eval ac_define_dir="\"$ac_define_dir\""
-  DEFAULT_XDG_DATA_HOME_LOGDIR="$ac_define_dir"
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if SVR4 needs to be defined" >&5
+printf %s "checking if SVR4 needs to be defined... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+#if defined(SVR4) || defined(__svr4__) || defined(__SVR4)
+ I_AM_SVR4
+#endif
 
-cat >>confdefs.h <<_ACEOF
-#define DEFAULT_XDG_DATA_HOME_LOGDIR "$ac_define_dir"
 _ACEOF
-
-  test "$prefix_NONE" && prefix=NONE
-  test "$exec_prefix_NONE" && exec_prefix=NONE
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "I_AM_SVR4" >/dev/null 2>&1
+then :
 
 
-cat >>confdefs.h <<_ACEOF
-#define __VENDORDWEBSUPPORT__ "$VENDOR_WEB"
-_ACEOF
+printf "%s\n" "#define SVR4 1" >>confdefs.h
 
-	if test "x$VGAHW" = xyes; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+else $as_nop
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+rm -rf conftest*
 
-$as_echo "#define WITH_VGAHW 1" >>confdefs.h
 
-	fi
+XSERVER_CFLAGS="$XSERVER_CFLAGS $CORE_INCS $XEXT_INC $COMPOSITE_INC $DAMAGE_INC $FIXES_INC $XI_INC $MI_INC $MIEXT_SYNC_INC $MIEXT_SHADOW_INC $MIEXT_LAYER_INC $MIEXT_DAMAGE_INC $RENDER_INC $RANDR_INC $FB_INC $DBE_INC $PRESENT_INC"
 
-	driverdir="$moduledir/drivers"
 
 
-	sdkdir="$includedir/xorg"
-	extdir="$includedir/X11/extensions"
-	sysconfigdir="$datadir/X11/$XF86CONFIGDIR"
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build Xvfb DDX" >&5
+printf %s "checking whether to build Xvfb DDX... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XVFB" >&5
+printf "%s\n" "$XVFB" >&6; }
+ if test "x$XVFB" = xyes; then
+  XVFB_TRUE=
+  XVFB_FALSE='#'
+else
+  XVFB_TRUE='#'
+  XVFB_FALSE=
+fi
 
 
+if test "x$XVFB" = xyes; then
+	XVFB_LIBS="$FB_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $DRI3_LIB $PRESENT_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB"
+	XVFB_SYS_LIBS="$XVFBMODULES_LIBS $GLX_SYS_LIBS"
 
 
+fi
 
-	# stuff the ABI versions into the pc file too
-	extract_abi() {
-	    grep ^.define.*${1}_VERSION ${srcdir}/hw/xfree86/common/xf86Module.h | tr '(),' '  .' | awk '{ print $4$5 }'
-	}
-	abi_ansic=`extract_abi ANSIC`
-	abi_videodrv=`extract_abi VIDEODRV`
-	abi_xinput=`extract_abi XINPUT`
-	abi_extension=`extract_abi EXTENSION`
 
 
 
+pkg_failed=no
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XNESTMODULES" >&5
+printf %s "checking for XNESTMODULES... " >&6; }
 
-fi
- if test "x$XORG" = xyes; then
-  XORG_TRUE=
-  XORG_FALSE='#'
+if test -n "$XNESTMODULES_CFLAGS"; then
+    pkg_cv_XNESTMODULES_CFLAGS="$XNESTMODULES_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBXEXT x11 xau \$XDMCP_MODULES\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$LIBXEXT x11 xau $XDMCP_MODULES") 2>&5
+  ac_status=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_XNESTMODULES_CFLAGS=`$PKG_CONFIG --cflags "$LIBXEXT x11 xau $XDMCP_MODULES" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
 else
-  XORG_TRUE='#'
-  XORG_FALSE=
+  pkg_failed=yes
 fi
-
- if test "x$PCI" = xyes; then
-  XORG_BUS_PCI_TRUE=
-  XORG_BUS_PCI_FALSE='#'
-else
-  XORG_BUS_PCI_TRUE='#'
-  XORG_BUS_PCI_FALSE=
+ else
+    pkg_failed=untried
 fi
-
- if test "x$xorg_bus_bsdpci" = xyes; then
-  XORG_BUS_BSDPCI_TRUE=
-  XORG_BUS_BSDPCI_FALSE='#'
+if test -n "$XNESTMODULES_LIBS"; then
+    pkg_cv_XNESTMODULES_LIBS="$XNESTMODULES_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBXEXT x11 xau \$XDMCP_MODULES\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$LIBXEXT x11 xau $XDMCP_MODULES") 2>&5
+  ac_status=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_XNESTMODULES_LIBS=`$PKG_CONFIG --libs "$LIBXEXT x11 xau $XDMCP_MODULES" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
 else
-  XORG_BUS_BSDPCI_TRUE='#'
-  XORG_BUS_BSDPCI_FALSE=
+  pkg_failed=yes
 fi
-
- if test "x$xorg_bus_sparc" = xyes; then
-  XORG_BUS_SPARC_TRUE=
-  XORG_BUS_SPARC_FALSE='#'
-else
-  XORG_BUS_SPARC_TRUE='#'
-  XORG_BUS_SPARC_FALSE=
+ else
+    pkg_failed=untried
 fi
 
- if test "x$linux_acpi" = xyes; then
-  LNXACPI_TRUE=
-  LNXACPI_FALSE='#'
-else
-  LNXACPI_TRUE='#'
-  LNXACPI_FALSE=
-fi
 
- if test "x$linux_apm" = xyes; then
-  LNXAPM_TRUE=
-  LNXAPM_FALSE='#'
-else
-  LNXAPM_TRUE='#'
-  LNXAPM_FALSE=
-fi
 
- if test "x$solaris_vt" = xyes; then
-  SOLARIS_VT_TRUE=
-  SOLARIS_VT_FALSE='#'
-else
-  SOLARIS_VT_TRUE='#'
-  SOLARIS_VT_FALSE=
-fi
+if test $pkg_failed = yes; then
+   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 
- if test "x$DGA" = xyes; then
-  DGA_TRUE=
-  DGA_FALSE='#'
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
 else
-  DGA_TRUE='#'
-  DGA_FALSE=
+        _pkg_short_errors_supported=no
 fi
+        if test $_pkg_short_errors_supported = yes; then
+	        XNESTMODULES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$LIBXEXT x11 xau $XDMCP_MODULES" 2>&1`
+        else
+	        XNESTMODULES_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$LIBXEXT x11 xau $XDMCP_MODULES" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$XNESTMODULES_PKG_ERRORS" >&5
 
- if test "x$CONFIG_UDEV_KMS" = xyes; then
-  XORG_BUS_PLATFORM_TRUE=
-  XORG_BUS_PLATFORM_FALSE='#'
+	have_xnest=no
+elif test $pkg_failed = untried; then
+     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+	have_xnest=no
 else
-  XORG_BUS_PLATFORM_TRUE='#'
-  XORG_BUS_PLATFORM_FALSE=
+	XNESTMODULES_CFLAGS=$pkg_cv_XNESTMODULES_CFLAGS
+	XNESTMODULES_LIBS=$pkg_cv_XNESTMODULES_LIBS
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+	have_xnest=yes
 fi
-
- if test "x$XORG_DRIVER_MODESETTING" = xyes; then
-  XORG_DRIVER_MODESETTING_TRUE=
-  XORG_DRIVER_MODESETTING_FALSE='#'
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build Xnest DDX" >&5
+printf %s "checking whether to build Xnest DDX... " >&6; }
+if test "x$XNEST" = xauto; then
+	XNEST="$have_xnest"
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XNEST" >&5
+printf "%s\n" "$XNEST" >&6; }
+ if test "x$XNEST" = xyes; then
+  XNEST_TRUE=
+  XNEST_FALSE='#'
 else
-  XORG_DRIVER_MODESETTING_TRUE='#'
-  XORG_DRIVER_MODESETTING_FALSE=
+  XNEST_TRUE='#'
+  XNEST_FALSE=
 fi
 
 
-if test "x$GLAMOR" = xauto; then
-	if echo "$XORG" "$XEPHYR" "$XWAYLAND" | grep -q yes ; then
-		GLAMOR=yes
+if test "x$XNEST" = xyes; then
+	if test "x$have_xnest" = xno; then
+		as_fn_error $? "Xnest build explicitly requested, but required modules not found." "$LINENO" 5
 	fi
-fi
+	XNEST_LIBS="$FB_LIB $FIXES_LIB $MI_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $DAMAGE_LIB  $DRI3_LIB $PRESENT_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $RENDER_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $MAIN_LIB $DIX_LIB $OS_LIB"
+	XNEST_SYS_LIBS="$XNESTMODULES_LIBS $GLX_SYS_LIBS"
+
 
- if test "x$GLAMOR" = xyes; then
-  GLAMOR_TRUE=
-  GLAMOR_FALSE='#'
-else
-  GLAMOR_TRUE='#'
-  GLAMOR_FALSE=
 fi
 
 
-if test "x$GLAMOR" = xyes; then
 
-$as_echo "#define GLAMOR 1" >>confdefs.h
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build Xorg DDX" >&5
+printf %s "checking whether to build Xorg DDX... " >&6; }
+if test "x$XORG" = xauto; then
+	XORG="yes"
+	case $host_os in
+		cygwin*) XORG="no" ;;
+		mingw*)  XORG="no" ;;
+		darwin*) XORG="no" ;;
+	esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XORG" >&5
+printf "%s\n" "$XORG" >&6; }
 
+if test "x$XORG" = xyes; then
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLAMOR" >&5
-$as_echo_n "checking for GLAMOR... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LIBXCVT" >&5
+printf %s "checking for LIBXCVT... " >&6; }
 
-if test -n "$GLAMOR_CFLAGS"; then
-    pkg_cv_GLAMOR_CFLAGS="$GLAMOR_CFLAGS"
+if test -n "$LIBXCVT_CFLAGS"; then
+    pkg_cv_LIBXCVT_CFLAGS="$LIBXCVT_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"epoxy\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "epoxy") 2>&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBXCVT\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$LIBXCVT") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_GLAMOR_CFLAGS=`$PKG_CONFIG --cflags "epoxy" 2>/dev/null`
+  pkg_cv_LIBXCVT_CFLAGS=`$PKG_CONFIG --cflags "$LIBXCVT" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -29938,16 +30401,16 @@ fi
  else
     pkg_failed=untried
 fi
-if test -n "$GLAMOR_LIBS"; then
-    pkg_cv_GLAMOR_LIBS="$GLAMOR_LIBS"
+if test -n "$LIBXCVT_LIBS"; then
+    pkg_cv_LIBXCVT_LIBS="$LIBXCVT_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"epoxy\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "epoxy") 2>&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBXCVT\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$LIBXCVT") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_GLAMOR_LIBS=`$PKG_CONFIG --libs "epoxy" 2>/dev/null`
+  pkg_cv_LIBXCVT_LIBS=`$PKG_CONFIG --libs "$LIBXCVT" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -29959,8 +30422,8 @@ fi
 
 
 if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -29968,83 +30431,127 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        GLAMOR_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "epoxy" 2>&1`
+	        LIBXCVT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$LIBXCVT" 2>&1`
         else
-	        GLAMOR_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "epoxy" 2>&1`
+	        LIBXCVT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$LIBXCVT" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
-	echo "$GLAMOR_PKG_ERRORS" >&5
+	echo "$LIBXCVT_PKG_ERRORS" >&5
 
-	as_fn_error $? "Package requirements (epoxy) were not met:
+	as_fn_error $? "Package requirements ($LIBXCVT) were not met:
 
-$GLAMOR_PKG_ERRORS
+$LIBXCVT_PKG_ERRORS
 
 Consider adjusting the PKG_CONFIG_PATH environment variable if you
 installed software in a non-standard prefix.
 
-Alternatively, you may set the environment variables GLAMOR_CFLAGS
-and GLAMOR_LIBS to avoid the need to call pkg-config.
+Alternatively, you may set the environment variables LIBXCVT_CFLAGS
+and LIBXCVT_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details." "$LINENO" 5
 elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
 is in your PATH or set the PKG_CONFIG environment variable to the full
 path to pkg-config.
 
-Alternatively, you may set the environment variables GLAMOR_CFLAGS
-and GLAMOR_LIBS to avoid the need to call pkg-config.
+Alternatively, you may set the environment variables LIBXCVT_CFLAGS
+and LIBXCVT_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details.
 
 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
 See \`config.log' for more details" "$LINENO" 5; }
 else
-	GLAMOR_CFLAGS=$pkg_cv_GLAMOR_CFLAGS
-	GLAMOR_LIBS=$pkg_cv_GLAMOR_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+	LIBXCVT_CFLAGS=$pkg_cv_LIBXCVT_CFLAGS
+	LIBXCVT_LIBS=$pkg_cv_LIBXCVT_LIBS
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
 
 fi
 
-	if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"epoxy >= 1.4.4\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "epoxy >= 1.4.4") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
+	XORG_DDXINCS='-I$(top_srcdir)/hw/xfree86 -I$(top_srcdir)/hw/xfree86/include -I$(top_srcdir)/hw/xfree86/common'
+	XORG_OSINCS='-I$(top_srcdir)/hw/xfree86/os-support -I$(top_srcdir)/hw/xfree86/os-support/bus -I$(top_srcdir)/os'
+	XORG_INCS="$XORG_DDXINCS $XORG_OSINCS"
+	XORG_CFLAGS="$XORGSERVER_CFLAGS $LIBXCVT_CFLAGS -DHAVE_XORG_CONFIG_H"
+	XORG_LIBS="$COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $DRI3_LIB $PRESENT_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $XI_LIB $XKB_LIB"
+	XORG_SYS_LIBS="$XORG_SYS_LIBS $LIBXCVT_LIBS"
+
+			symbol_visibility=
+	have_visibility=disabled
+	if test x$SYMBOL_VISIBILITY != xno; then
+	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for symbol visibility support" >&5
+printf %s "checking for symbol visibility support... " >&6; }
+	    if test x$GCC = xyes; then
+		VISIBILITY_CFLAGS="-fvisibility=hidden"
+	    else
+		if test x$SUNCC = xyes; then
+		    VISIBILITY_CFLAGS="-xldscope=hidden"
+		else
+		    have_visibility=no
+		fi
+	    fi
+	    if test x$have_visibility != xno; then
+		save_CFLAGS="$CFLAGS"
+		proto_inc=`$PKG_CONFIG --cflags xproto`
+		CFLAGS="$CFLAGS $VISIBILITY_CFLAGS $proto_inc"
+		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-$as_echo "#define GLAMOR_HAS_EGL_QUERY_DMABUF 1" >>confdefs.h
+		    #include <X11/Xfuncproto.h>
+		     extern _X_HIDDEN int hidden_int;
+		     extern _X_EXPORT int public_int;
+		     extern _X_HIDDEN int hidden_int_func(void);
+		     extern _X_EXPORT int public_int_func(void);
+int
+main (void)
+{
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  have_visibility=yes
+else $as_nop
+  have_visibility=no
 fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+		CFLAGS=$save_CFLAGS
+	    fi
+	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_visibility" >&5
+printf "%s\n" "$have_visibility" >&6; }
+	    if test x$have_visibility != xno; then
+		symbol_visibility=$VISIBILITY_CFLAGS
+		XORG_CFLAGS="$XORG_CFLAGS $VISIBILITY_CFLAGS"
+		XSERVER_CFLAGS="$XSERVER_CFLAGS $VISIBILITY_CFLAGS"
+	    fi
+	fi
 
-	if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"epoxy >= 1.5.4\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "epoxy >= 1.5.4") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-
-$as_echo "#define GLAMOR_HAS_EGL_QUERY_DRIVER 1" >>confdefs.h
 
-fi
+				xorg_bus_bsdpci=no
+	xorg_bus_sparc=no
 
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build Xorg PCI functions" >&5
+printf %s "checking whether to build Xorg PCI functions... " >&6; }
+	if test "x$PCI" = xyes; then
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GBM" >&5
-$as_echo_n "checking for GBM... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PCIACCESS" >&5
+printf %s "checking for PCIACCESS... " >&6; }
 
-if test -n "$GBM_CFLAGS"; then
-    pkg_cv_GBM_CFLAGS="$GBM_CFLAGS"
+if test -n "$PCIACCESS_CFLAGS"; then
+    pkg_cv_PCIACCESS_CFLAGS="$PCIACCESS_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\"\$LIBGBM\"\""; } >&5
-  ($PKG_CONFIG --exists --print-errors ""$LIBGBM"") 2>&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBPCIACCESS\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$LIBPCIACCESS") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_GBM_CFLAGS=`$PKG_CONFIG --cflags ""$LIBGBM"" 2>/dev/null`
+  pkg_cv_PCIACCESS_CFLAGS=`$PKG_CONFIG --cflags "$LIBPCIACCESS" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -30052,16 +30559,16 @@ fi
  else
     pkg_failed=untried
 fi
-if test -n "$GBM_LIBS"; then
-    pkg_cv_GBM_LIBS="$GBM_LIBS"
+if test -n "$PCIACCESS_LIBS"; then
+    pkg_cv_PCIACCESS_LIBS="$PCIACCESS_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\"\$LIBGBM\"\""; } >&5
-  ($PKG_CONFIG --exists --print-errors ""$LIBGBM"") 2>&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBPCIACCESS\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$LIBPCIACCESS") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_GBM_LIBS=`$PKG_CONFIG --libs ""$LIBGBM"" 2>/dev/null`
+  pkg_cv_PCIACCESS_LIBS=`$PKG_CONFIG --libs "$LIBPCIACCESS" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -30073,8 +30580,8 @@ fi
 
 
 if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -30082,317 +30589,220 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        GBM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs ""$LIBGBM"" 2>&1`
+	        PCIACCESS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$LIBPCIACCESS" 2>&1`
         else
-	        GBM_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs ""$LIBGBM"" 2>&1`
+	        PCIACCESS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$LIBPCIACCESS" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
-	echo "$GBM_PKG_ERRORS" >&5
-
-	GBM=no
-elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-	GBM=no
-else
-	GBM_CFLAGS=$pkg_cv_GBM_CFLAGS
-	GBM_LIBS=$pkg_cv_GBM_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-	GBM=yes
-fi
-	if test "x$GBM" = xyes; then
-
-$as_echo "#define GLAMOR_HAS_GBM 1" >>confdefs.h
+	echo "$PCIACCESS_PKG_ERRORS" >&5
 
-		ac_fn_c_check_decl "$LINENO" "GBM_BO_USE_LINEAR" "ac_cv_have_decl_GBM_BO_USE_LINEAR" "#include <stdlib.h>
-			 #include <gbm.h>
-"
-if test "x$ac_cv_have_decl_GBM_BO_USE_LINEAR" = xyes; then :
+	as_fn_error $? "Package requirements ($LIBPCIACCESS) were not met:
 
-$as_echo "#define GLAMOR_HAS_GBM_LINEAR 1" >>confdefs.h
+$PCIACCESS_PKG_ERRORS
 
-fi
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
 
-				if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gbm >= 17.1.0\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "gbm >= 17.1.0") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
+Alternatively, you may set the environment variables PCIACCESS_CFLAGS
+and PCIACCESS_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details." "$LINENO" 5
+elif test $pkg_failed = untried; then
+     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
 
-$as_echo "#define GBM_BO_WITH_MODIFIERS 1" >>confdefs.h
+Alternatively, you may set the environment variables PCIACCESS_CFLAGS
+and PCIACCESS_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
 
-fi
-	else
-		if test "x$XORG" = xyes; then
-			as_fn_error $? "Glamor for Xorg requires $LIBGBM" "$LINENO" 5
-		fi
-	fi
-fi
- if test "x$GBM" = xyes; then
-  GLAMOR_EGL_TRUE=
-  GLAMOR_EGL_FALSE='#'
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details" "$LINENO" 5; }
 else
-  GLAMOR_EGL_TRUE='#'
-  GLAMOR_EGL_FALSE=
-fi
+	PCIACCESS_CFLAGS=$pkg_cv_PCIACCESS_CFLAGS
+	PCIACCESS_LIBS=$pkg_cv_PCIACCESS_LIBS
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
 
+fi
+		SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $LIBPCIACCESS"
+		XORG_SYS_LIBS="$XORG_SYS_LIBS $PCIACCESS_LIBS $LIBDRM_LIBS"
+		XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS $LIBDRM_CFLAGS"
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build XWin DDX" >&5
-$as_echo_n "checking whether to build XWin DDX... " >&6; }
-if test "x$XWIN" = xauto; then
-	case $host_os in
-		cygwin*) XWIN="yes" ;;
-		mingw*) XWIN="yes" ;;
-		*) XWIN="no" ;;
-	esac
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $XWIN" >&5
-$as_echo "$XWIN" >&6; }
+printf "%s\n" "#define XSERVER_LIBPCIACCESS 1" >>confdefs.h
 
-if test "x$XWIN" = xyes; then
 
   prefix_NONE=
   exec_prefix_NONE=
   test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
   test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
-  eval ac_define_dir="\"$logdir\""
+  eval ac_define_dir="\"$PCI_TXT_IDS_DIR\""
   eval ac_define_dir="\"$ac_define_dir\""
-  DEFAULT_LOGDIR="$ac_define_dir"
+  PCI_TXT_IDS_PATH="$ac_define_dir"
 
 
-cat >>confdefs.h <<_ACEOF
-#define DEFAULT_LOGDIR "$ac_define_dir"
-_ACEOF
+printf "%s\n" "#define PCI_TXT_IDS_PATH \"$ac_define_dir\"" >>confdefs.h
 
   test "$prefix_NONE" && prefix=NONE
   test "$exec_prefix_NONE" && exec_prefix=NONE
 
+		case $host_os in
+		  gnu* | freebsd* | kfreebsd*-gnu | netbsd* | openbsd* | solaris* | dragonfly*)
+			xorg_bus_bsdpci="yes"
+			;;
+		esac
+		case $host_cpu in
+		  sparc*)
+			xorg_bus_sparc="yes"
+			;;
+		esac
+	else
+		if test "x$CONFIG_UDEV_KMS" = xyes; then
+			as_fn_error $? "Platform device enumeration requires libpciaccess" "$LINENO" 5
+		fi
+		if test "x$INT10MODULE" = xyes && test "x$INT10" != xstub; then
+			as_fn_error $? "Cannot build int10 without libpciaccess" "$LINENO" 5
+		fi
+	fi
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PCI" >&5
+printf "%s\n" "$PCI" >&6; }
 
-cat >>confdefs.h <<_ACEOF
-#define XORG_VERSION_CURRENT $VENDOR_RELEASE
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define __VENDORDWEBSUPPORT__ "$VENDOR_WEB"
-_ACEOF
-
-	if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
-set dummy ${ac_tool_prefix}windres; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_WINDRES+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$WINDRES"; then
-  ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-WINDRES=$ac_cv_prog_WINDRES
-if test -n "$WINDRES"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
-$as_echo "$WINDRES" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_WINDRES"; then
-  ac_ct_WINDRES=$WINDRES
-  # Extract the first word of "windres", so it can be a program name with args.
-set dummy windres; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_WINDRES"; then
-  ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_WINDRES="windres"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
-if test -n "$ac_ct_WINDRES"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
-$as_echo "$ac_ct_WINDRES" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_ct_WINDRES" = x; then
-    WINDRES=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    WINDRES=$ac_ct_WINDRES
-  fi
-else
-  WINDRES="$ac_cv_prog_WINDRES"
-fi
-
-
-
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XWINMODULES" >&5
-$as_echo_n "checking for XWINMODULES... " >&6; }
-
-if test -n "$XWINMODULES_CFLAGS"; then
-    pkg_cv_XWINMODULES_CFLAGS="$XWINMODULES_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11 xdmcp xau xfixes x11-xcb xcb-aux xcb-image xcb-ewmh xcb-icccm\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "x11 xdmcp xau xfixes x11-xcb xcb-aux xcb-image xcb-ewmh xcb-icccm") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_XWINMODULES_CFLAGS=`$PKG_CONFIG --cflags "x11 xdmcp xau xfixes x11-xcb xcb-aux xcb-image xcb-ewmh xcb-icccm" 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-if test -n "$XWINMODULES_LIBS"; then
-    pkg_cv_XWINMODULES_LIBS="$XWINMODULES_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11 xdmcp xau xfixes x11-xcb xcb-aux xcb-image xcb-ewmh xcb-icccm\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "x11 xdmcp xau xfixes x11-xcb xcb-aux xcb-image xcb-ewmh xcb-icccm") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_XWINMODULES_LIBS=`$PKG_CONFIG --libs "x11 xdmcp xau xfixes x11-xcb xcb-aux xcb-image xcb-ewmh xcb-icccm" 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-
-
+	if test "x$CONFIG_UDEV_KMS" = xyes; then
 
-if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+printf "%s\n" "#define XSERVER_PLATFORM_BUS 1" >>confdefs.h
 
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi
-        if test $_pkg_short_errors_supported = yes; then
-	        XWINMODULES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "x11 xdmcp xau xfixes x11-xcb xcb-aux xcb-image xcb-ewmh xcb-icccm" 2>&1`
-        else
-	        XWINMODULES_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "x11 xdmcp xau xfixes x11-xcb xcb-aux xcb-image xcb-ewmh xcb-icccm" 2>&1`
-        fi
-	# Put the nasty error message in config.log where it belongs
-	echo "$XWINMODULES_PKG_ERRORS" >&5
+	fi
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XSERVER_PLATFORM_BUS" >&5
+printf "%s\n" "$XSERVER_PLATFORM_BUS" >&6; }
 
-	as_fn_error $? "Package requirements (x11 xdmcp xau xfixes x11-xcb xcb-aux xcb-image xcb-ewmh xcb-icccm) were not met:
+	case $host_os in
+	  linux*)
+		XORG_OS_SUBDIR="linux"
+		linux_acpi="no"
+		case $host_cpu in
+		  i*86|amd64*|x86_64*|ia64*)
+			linux_acpi=$enable_linux_acpi
+			;;
+		  *)
+			;;
+		esac
+				       for ac_header in linux/apm_bios.h
+do :
+  ac_fn_c_check_header_compile "$LINENO" "linux/apm_bios.h" "ac_cv_header_linux_apm_bios_h" "$ac_includes_default"
+if test "x$ac_cv_header_linux_apm_bios_h" = xyes
+then :
+  printf "%s\n" "#define HAVE_LINUX_APM_BIOS_H 1" >>confdefs.h
+ linux_apm=$enable_linux_apm
+fi
 
-$XWINMODULES_PKG_ERRORS
+done
+		;;
+	  freebsd* | kfreebsd*-gnu | dragonfly*)
+		XORG_OS_SUBDIR="bsd"
+		;;
+	  netbsd*)
+		XORG_OS_SUBDIR="bsd"
+		;;
+	  openbsd*)
+		XORG_OS_SUBDIR="bsd"
+		;;
+	  solaris*)
+		XORG_OS_SUBDIR="solaris"
+		ac_fn_c_check_header_compile "$LINENO" "sys/kd.h" "ac_cv_header_sys_kd_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_kd_h" = xyes
+then :
+  printf "%s\n" "#define HAVE_SYS_KD_H 1" >>confdefs.h
 
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
+fi
 
-Alternatively, you may set the environment variables XWINMODULES_CFLAGS
-and XWINMODULES_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details." "$LINENO" 5
-elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
+		       for ac_header in sys/vt.h
+do :
+  ac_fn_c_check_header_compile "$LINENO" "sys/vt.h" "ac_cv_header_sys_vt_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_vt_h" = xyes
+then :
+  printf "%s\n" "#define HAVE_SYS_VT_H 1" >>confdefs.h
+ solaris_vt=yes
+else $as_nop
+  solaris_vt=no
+fi
 
-Alternatively, you may set the environment variables XWINMODULES_CFLAGS
-and XWINMODULES_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
+done
+		# Check for minimum supported release
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Solaris version" >&5
+printf %s "checking Solaris version... " >&6; }
+	        OS_MINOR=`echo ${host_os}|$SED -e 's/^.*solaris2\.//' -e s'/\..*$//'`
+		if test "${OS_MINOR}" -ge 7 ; then
+	        	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Solaris ${OS_MINOR}" >&5
+printf "%s\n" "Solaris ${OS_MINOR}" >&6; }
+		else
+			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Solaris \`echo ${host_os}|$SED -e 's/^.*solaris//\`" >&5
+printf "%s\n" "Solaris \`echo ${host_os}|$SED -e 's/^.*solaris//\`" >&6; }
+		fi
+		if test "${OS_MINOR}" -lt 8 ; then
+			as_fn_error $? "This release no longer supports Solaris versions older than Solaris 8." "$LINENO" 5
+		fi
+		ac_fn_check_decl "$LINENO" "_LP64" "ac_cv_have_decl__LP64" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl__LP64" = xyes
+then :
+  SOLARIS_64="yes"
+else $as_nop
+  SOLARIS_64="no"
+fi
 
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details" "$LINENO" 5; }
-else
-	XWINMODULES_CFLAGS=$pkg_cv_XWINMODULES_CFLAGS
-	XWINMODULES_LIBS=$pkg_cv_XWINMODULES_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+		case $host_cpu in
+		  sparc*)
+			SOLARIS_INOUT_ARCH="sparcv8plus"
+			;;
+		  i*86|x86_64*)
+			if test x$SOLARIS_64 = xyes ; then
+				SOLARIS_INOUT_ARCH="amd64"
+			else
+				SOLARIS_INOUT_ARCH="ia32"
+			fi
+			;;
+		  *)
+			as_fn_error $? "Unsupported Solaris platform. Only SPARC & x86 \
+			are supported on Solaris in this release.   If you are \
+			interested in porting Xorg to your platform, please email \
+			xorg@lists.freedesktop.org." "$LINENO" 5 ;;
+		esac
 
-fi
+		;;
+	  gnu*)
+		XORG_OS_SUBDIR="hurd"
+		;;
+	  cygwin*)
+		XORG_OS_SUBDIR="stub"
+		;;
+	  *)
+		XORG_OS_SUBDIR="stub"
+		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Your OS is unknown. If you are interested in porting Xorg to your platform,
+please email xorg@lists.freedesktop.org." >&5
+printf "%s\n" "$as_me: Your OS is unknown. If you are interested in porting Xorg to your platform,
+please email xorg@lists.freedesktop.org." >&6;}
+		;;
+	esac
 
-	if test "x$WINDOWSWM" = xauto; then
-		if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$WINDOWSWMPROTO\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$WINDOWSWMPROTO") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  WINDOWSWM=yes
-else
-  WINDOWSWM=no
-fi
-	fi
-	if test "x$WINDOWSWM" = xyes ; then
+	if test "x$DGA" = xauto; then
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for WINDOWSWM" >&5
-$as_echo_n "checking for WINDOWSWM... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for DGA" >&5
+printf %s "checking for DGA... " >&6; }
 
-if test -n "$WINDOWSWM_CFLAGS"; then
-    pkg_cv_WINDOWSWM_CFLAGS="$WINDOWSWM_CFLAGS"
+if test -n "$DGA_CFLAGS"; then
+    pkg_cv_DGA_CFLAGS="$DGA_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$WINDOWSWMPROTO\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$WINDOWSWMPROTO") 2>&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$DGAPROTO\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$DGAPROTO") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_WINDOWSWM_CFLAGS=`$PKG_CONFIG --cflags "$WINDOWSWMPROTO" 2>/dev/null`
+  pkg_cv_DGA_CFLAGS=`$PKG_CONFIG --cflags "$DGAPROTO" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -30400,16 +30810,16 @@ fi
  else
     pkg_failed=untried
 fi
-if test -n "$WINDOWSWM_LIBS"; then
-    pkg_cv_WINDOWSWM_LIBS="$WINDOWSWM_LIBS"
+if test -n "$DGA_LIBS"; then
+    pkg_cv_DGA_LIBS="$DGA_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$WINDOWSWMPROTO\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$WINDOWSWMPROTO") 2>&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$DGAPROTO\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$DGAPROTO") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_WINDOWSWM_LIBS=`$PKG_CONFIG --libs "$WINDOWSWMPROTO" 2>/dev/null`
+  pkg_cv_DGA_LIBS=`$PKG_CONFIG --libs "$DGAPROTO" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -30421,8 +30831,8 @@ fi
 
 
 if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -30430,79 +30840,43 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        WINDOWSWM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$WINDOWSWMPROTO" 2>&1`
+	        DGA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$DGAPROTO" 2>&1`
         else
-	        WINDOWSWM_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$WINDOWSWMPROTO" 2>&1`
+	        DGA_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$DGAPROTO" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
-	echo "$WINDOWSWM_PKG_ERRORS" >&5
-
-	as_fn_error $? "Package requirements ($WINDOWSWMPROTO) were not met:
-
-$WINDOWSWM_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
+	echo "$DGA_PKG_ERRORS" >&5
 
-Alternatively, you may set the environment variables WINDOWSWM_CFLAGS
-and WINDOWSWM_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details." "$LINENO" 5
+	DGA=no
 elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-Alternatively, you may set the environment variables WINDOWSWM_CFLAGS
-and WINDOWSWM_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details" "$LINENO" 5; }
-else
-	WINDOWSWM_CFLAGS=$pkg_cv_WINDOWSWM_CFLAGS
-	WINDOWSWM_LIBS=$pkg_cv_WINDOWSWM_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-fi
-		XWINMODULES_CFLAGS="$XWINMODULES_CFLAGS $WINDOWSWM_CFLAGS"
-
-$as_echo "#define ROOTLESS 1" >>confdefs.h
-
-	fi
-
-	if test "x$WINDOWSDRI" = xauto; then
-		if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"windowsdriproto\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "windowsdriproto") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  WINDOWSDRI=yes
+     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+	DGA=no
 else
-  WINDOWSDRI=no
+	DGA_CFLAGS=$pkg_cv_DGA_CFLAGS
+	DGA_LIBS=$pkg_cv_DGA_LIBS
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+	DGA=yes
 fi
 	fi
-	if test "x$WINDOWSDRI" = xyes ; then
+	if test "x$DGA" = xyes; then
+		XORG_MODULES="$XORG_MODULES $DGAPROTO"
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for WINDOWSDRI" >&5
-$as_echo_n "checking for WINDOWSDRI... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for DGA" >&5
+printf %s "checking for DGA... " >&6; }
 
-if test -n "$WINDOWSDRI_CFLAGS"; then
-    pkg_cv_WINDOWSDRI_CFLAGS="$WINDOWSDRI_CFLAGS"
+if test -n "$DGA_CFLAGS"; then
+    pkg_cv_DGA_CFLAGS="$DGA_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"windowsdriproto\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "windowsdriproto") 2>&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$DGAPROTO\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$DGAPROTO") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_WINDOWSDRI_CFLAGS=`$PKG_CONFIG --cflags "windowsdriproto" 2>/dev/null`
+  pkg_cv_DGA_CFLAGS=`$PKG_CONFIG --cflags "$DGAPROTO" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -30510,16 +30884,16 @@ fi
  else
     pkg_failed=untried
 fi
-if test -n "$WINDOWSDRI_LIBS"; then
-    pkg_cv_WINDOWSDRI_LIBS="$WINDOWSDRI_LIBS"
+if test -n "$DGA_LIBS"; then
+    pkg_cv_DGA_LIBS="$DGA_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"windowsdriproto\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "windowsdriproto") 2>&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$DGAPROTO\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$DGAPROTO") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_WINDOWSDRI_LIBS=`$PKG_CONFIG --libs "windowsdriproto" 2>/dev/null`
+  pkg_cv_DGA_LIBS=`$PKG_CONFIG --libs "$DGAPROTO" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -30531,8 +30905,8 @@ fi
 
 
 if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -30540,156 +30914,73 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        WINDOWSDRI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "windowsdriproto" 2>&1`
+	        DGA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$DGAPROTO" 2>&1`
         else
-	        WINDOWSDRI_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "windowsdriproto" 2>&1`
+	        DGA_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$DGAPROTO" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
-	echo "$WINDOWSDRI_PKG_ERRORS" >&5
+	echo "$DGA_PKG_ERRORS" >&5
 
-	as_fn_error $? "Package requirements (windowsdriproto) were not met:
+	as_fn_error $? "Package requirements ($DGAPROTO) were not met:
 
-$WINDOWSDRI_PKG_ERRORS
+$DGA_PKG_ERRORS
 
 Consider adjusting the PKG_CONFIG_PATH environment variable if you
 installed software in a non-standard prefix.
 
-Alternatively, you may set the environment variables WINDOWSDRI_CFLAGS
-and WINDOWSDRI_LIBS to avoid the need to call pkg-config.
+Alternatively, you may set the environment variables DGA_CFLAGS
+and DGA_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details." "$LINENO" 5
 elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
 is in your PATH or set the PKG_CONFIG environment variable to the full
 path to pkg-config.
 
-Alternatively, you may set the environment variables WINDOWSDRI_CFLAGS
-and WINDOWSDRI_LIBS to avoid the need to call pkg-config.
+Alternatively, you may set the environment variables DGA_CFLAGS
+and DGA_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details.
 
 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
 See \`config.log' for more details" "$LINENO" 5; }
 else
-	WINDOWSDRI_CFLAGS=$pkg_cv_WINDOWSDRI_CFLAGS
-	WINDOWSDRI_LIBS=$pkg_cv_WINDOWSDRI_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+	DGA_CFLAGS=$pkg_cv_DGA_CFLAGS
+	DGA_LIBS=$pkg_cv_DGA_LIBS
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
 
 fi
-	fi
-
-	case $host_os in
-		cygwin*)
-			XWIN_SERVER_NAME=XWin
-
-$as_echo "#define HAS_DEVWINDOWS 1" >>confdefs.h
-
-			;;
-		mingw*)
-			XWIN_SERVER_NAME=Xming
-
-$as_echo "#define RELOCATE_PROJECTROOT 1" >>confdefs.h
-
-
-$as_echo "#define HAS_WINSOCK 1" >>confdefs.h
-
-			XWIN_SYS_LIBS="-lpthread -lws2_32"
-			;;
-	esac
-
-	XWIN_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $RANDR_LIB $RENDER_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $DAMAGE_LIB $PRESENT_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $OS_LIB"
-	XWIN_SYS_LIBS="$XWIN_SYS_LIBS $XWINMODULES_LIBS"
-
-
-
-
-	if test "x$DEBUGGING" = xyes; then
-
-$as_echo "#define CYGDEBUG 1" >>confdefs.h
 
+printf "%s\n" "#define DGA 1" >>confdefs.h
 
-$as_echo "#define CYGWINDOWING_DEBUG 1" >>confdefs.h
 
-
-$as_echo "#define CYGMULTIWINDOW_DEBUG 1" >>confdefs.h
+printf "%s\n" "#define XFreeXDGA 1" >>confdefs.h
 
 	fi
 
+	if test "x$XF86VIDMODE" = xyes; then
+		XORG_MODULES="$XORG_MODULES $VIDMODEPROTO"
+	fi
 
-$as_echo "#define DDXOSVERRORF 1" >>confdefs.h
-
-
-$as_echo "#define DDXBEFORERESET 1" >>confdefs.h
-
-
-	if test "x$XWIN" = xyes && test "x$GLX" = xyes ; then
-           # Extract the first word of "python3", so it can be a program name with args.
-set dummy python3; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_PYTHON3+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$PYTHON3"; then
-  ac_cv_prog_PYTHON3="$PYTHON3" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_PYTHON3="python3"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-PYTHON3=$ac_cv_prog_PYTHON3
-if test -n "$PYTHON3"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON3" >&5
-$as_echo "$PYTHON3" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-           if test -z "$PYTHON3"; then
-                as_fn_error $? "python3 not found" "$LINENO" 5
-           fi
-           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python module lxml" >&5
-$as_echo_n "checking for python module lxml... " >&6; }
-           $PYTHON3 -c "import lxml;"
-           if test $? -ne 0 ; then
-                as_fn_error $? "not found" "$LINENO" 5
-           fi
-           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-           if test "x$KHRONOS_SPEC_DIR" = "xauto" ; then
+	if test -n "$XORG_MODULES"; then
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for KHRONOS_OPENGL_REGISTRY" >&5
-$as_echo_n "checking for KHRONOS_OPENGL_REGISTRY... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XORG_MODULES" >&5
+printf %s "checking for XORG_MODULES... " >&6; }
 
-if test -n "$KHRONOS_OPENGL_REGISTRY_CFLAGS"; then
-    pkg_cv_KHRONOS_OPENGL_REGISTRY_CFLAGS="$KHRONOS_OPENGL_REGISTRY_CFLAGS"
+if test -n "$XORG_MODULES_CFLAGS"; then
+    pkg_cv_XORG_MODULES_CFLAGS="$XORG_MODULES_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"khronos-opengl-registry\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "khronos-opengl-registry") 2>&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$XORG_MODULES\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$XORG_MODULES") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_KHRONOS_OPENGL_REGISTRY_CFLAGS=`$PKG_CONFIG --cflags "khronos-opengl-registry" 2>/dev/null`
+  pkg_cv_XORG_MODULES_CFLAGS=`$PKG_CONFIG --cflags "$XORG_MODULES" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -30697,16 +30988,16 @@ fi
  else
     pkg_failed=untried
 fi
-if test -n "$KHRONOS_OPENGL_REGISTRY_LIBS"; then
-    pkg_cv_KHRONOS_OPENGL_REGISTRY_LIBS="$KHRONOS_OPENGL_REGISTRY_LIBS"
+if test -n "$XORG_MODULES_LIBS"; then
+    pkg_cv_XORG_MODULES_LIBS="$XORG_MODULES_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"khronos-opengl-registry\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "khronos-opengl-registry") 2>&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$XORG_MODULES\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$XORG_MODULES") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_KHRONOS_OPENGL_REGISTRY_LIBS=`$PKG_CONFIG --libs "khronos-opengl-registry" 2>/dev/null`
+  pkg_cv_XORG_MODULES_LIBS=`$PKG_CONFIG --libs "$XORG_MODULES" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -30718,8 +31009,8 @@ fi
 
 
 if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -30727,614 +31018,377 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        KHRONOS_OPENGL_REGISTRY_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "khronos-opengl-registry" 2>&1`
+	        XORG_MODULES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$XORG_MODULES" 2>&1`
         else
-	        KHRONOS_OPENGL_REGISTRY_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "khronos-opengl-registry" 2>&1`
+	        XORG_MODULES_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$XORG_MODULES" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
-	echo "$KHRONOS_OPENGL_REGISTRY_PKG_ERRORS" >&5
+	echo "$XORG_MODULES_PKG_ERRORS" >&5
 
-	as_fn_error $? "Package requirements (khronos-opengl-registry) were not met:
+	as_fn_error $? "Package requirements ($XORG_MODULES) were not met:
 
-$KHRONOS_OPENGL_REGISTRY_PKG_ERRORS
+$XORG_MODULES_PKG_ERRORS
 
 Consider adjusting the PKG_CONFIG_PATH environment variable if you
 installed software in a non-standard prefix.
 
-Alternatively, you may set the environment variables KHRONOS_OPENGL_REGISTRY_CFLAGS
-and KHRONOS_OPENGL_REGISTRY_LIBS to avoid the need to call pkg-config.
+Alternatively, you may set the environment variables XORG_MODULES_CFLAGS
+and XORG_MODULES_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details." "$LINENO" 5
 elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
 is in your PATH or set the PKG_CONFIG environment variable to the full
 path to pkg-config.
 
-Alternatively, you may set the environment variables KHRONOS_OPENGL_REGISTRY_CFLAGS
-and KHRONOS_OPENGL_REGISTRY_LIBS to avoid the need to call pkg-config.
+Alternatively, you may set the environment variables XORG_MODULES_CFLAGS
+and XORG_MODULES_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details.
 
 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
 See \`config.log' for more details" "$LINENO" 5; }
 else
-	KHRONOS_OPENGL_REGISTRY_CFLAGS=$pkg_cv_KHRONOS_OPENGL_REGISTRY_CFLAGS
-	KHRONOS_OPENGL_REGISTRY_LIBS=$pkg_cv_KHRONOS_OPENGL_REGISTRY_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+	XORG_MODULES_CFLAGS=$pkg_cv_XORG_MODULES_CFLAGS
+	XORG_MODULES_LIBS=$pkg_cv_XORG_MODULES_LIBS
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
 
 fi
-		KHRONOS_SPEC_DIR=`pkg-config khronos-opengl-registry --variable=specdir`
-           fi
+	        XORG_CFLAGS="$XORG_CFLAGS $XORG_MODULES_CFLAGS"
+	        XORG_SYS_LIBS="$XORG_SYS_LIBS $XORG_MODULES_LIBS"
+	fi
 
+	if test "x$DRM" = xyes -a "x$DRI2" = xyes; then
+		XORG_DRIVER_MODESETTING=yes
 	fi
 
-fi
- if test "x$XWIN" = xyes; then
-  XWIN_TRUE=
-  XWIN_FALSE='#'
-else
-  XWIN_TRUE='#'
-  XWIN_FALSE=
-fi
 
- if test "x$XWIN" = xyes && test "x$WINDOWSWM" = xyes; then
-  XWIN_MULTIWINDOWEXTWM_TRUE=
-  XWIN_MULTIWINDOWEXTWM_FALSE='#'
-else
-  XWIN_MULTIWINDOWEXTWM_TRUE='#'
-  XWIN_MULTIWINDOWEXTWM_FALSE=
-fi
 
- if test "x$XWIN" = xyes && test "x$GLX" = xyes; then
-  XWIN_GLX_WINDOWS_TRUE=
-  XWIN_GLX_WINDOWS_FALSE='#'
-else
-  XWIN_GLX_WINDOWS_TRUE='#'
-  XWIN_GLX_WINDOWS_FALSE=
-fi
 
- if test "x$XWIN" = xyes && test "x$WINDOWSDRI" = xyes; then
-  XWIN_WINDOWS_DRI_TRUE=
-  XWIN_WINDOWS_DRI_FALSE='#'
-else
-  XWIN_WINDOWS_DRI_TRUE='#'
-  XWIN_WINDOWS_DRI_FALSE=
-fi
 
 
-if test "x$XQUARTZ" = xyes; then
 
-$as_echo "#define XQUARTZ 1" >>confdefs.h
+		XF86CONFIGFILE="xorg.conf"
+	XF86CONFIGDIR="xorg.conf.d"
 
+	LOGPREFIX="Xorg."
+	XDG_DATA_HOME=".local/share"
+	XDG_DATA_HOME_LOGDIR="xorg"
 
-$as_echo "#define ROOTLESS 1" >>confdefs.h
+printf "%s\n" "#define XORG_SERVER 1" >>confdefs.h
 
 
-	XQUARTZ_LIBS="$FB_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB $PRESENT_LIB"
+printf "%s\n" "#define XORGSERVER 1" >>confdefs.h
 
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for xp_init in -lXplugin" >&5
-$as_echo_n "checking for xp_init in -lXplugin... " >&6; }
-if ${ac_cv_lib_Xplugin_xp_init+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lXplugin  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+printf "%s\n" "#define XFree86Server 1" >>confdefs.h
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char xp_init ();
-int
-main ()
-{
-return xp_init ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_Xplugin_xp_init=yes
-else
-  ac_cv_lib_Xplugin_xp_init=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xplugin_xp_init" >&5
-$as_echo "$ac_cv_lib_Xplugin_xp_init" >&6; }
-if test "x$ac_cv_lib_Xplugin_xp_init" = xyes; then :
-  :
-fi
 
+printf "%s\n" "#define XORG_VERSION_CURRENT $VENDOR_RELEASE" >>confdefs.h
 
-	CFLAGS="${CFLAGS} -DROOTLESS_WORKAROUND -DROOTLESS_SAFEALPHA -DNO_ALLOCA"
 
+printf "%s\n" "#define NEED_XF86_TYPES 1" >>confdefs.h
 
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XPBPROXY" >&5
-$as_echo_n "checking for XPBPROXY... " >&6; }
 
-if test -n "$XPBPROXY_CFLAGS"; then
-    pkg_cv_XPBPROXY_CFLAGS="$XPBPROXY_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$APPLEWMPROTO \$LIBAPPLEWM xfixes x11\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$APPLEWMPROTO $LIBAPPLEWM xfixes x11") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_XPBPROXY_CFLAGS=`$PKG_CONFIG --cflags "$APPLEWMPROTO $LIBAPPLEWM xfixes x11" 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-if test -n "$XPBPROXY_LIBS"; then
-    pkg_cv_XPBPROXY_LIBS="$XPBPROXY_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$APPLEWMPROTO \$LIBAPPLEWM xfixes x11\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$APPLEWMPROTO $LIBAPPLEWM xfixes x11") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_XPBPROXY_LIBS=`$PKG_CONFIG --libs "$APPLEWMPROTO $LIBAPPLEWM xfixes x11" 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
+printf "%s\n" "#define NEED_XF86_PROTOTYPES 1" >>confdefs.h
 
 
+printf "%s\n" "#define __XSERVERNAME__ \"Xorg\"" >>confdefs.h
 
-if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
 
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi
-        if test $_pkg_short_errors_supported = yes; then
-	        XPBPROXY_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$APPLEWMPROTO $LIBAPPLEWM xfixes x11" 2>&1`
-        else
-	        XPBPROXY_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$APPLEWMPROTO $LIBAPPLEWM xfixes x11" 2>&1`
-        fi
-	# Put the nasty error message in config.log where it belongs
-	echo "$XPBPROXY_PKG_ERRORS" >&5
+  prefix_NONE=
+  exec_prefix_NONE=
+  test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
+  test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
+  eval ac_define_dir="\"$XF86CONFIGFILE\""
+  eval ac_define_dir="\"$ac_define_dir\""
+  XCONFIGFILE="$ac_define_dir"
 
-	as_fn_error $? "Package requirements ($APPLEWMPROTO $LIBAPPLEWM xfixes x11) were not met:
 
-$XPBPROXY_PKG_ERRORS
+printf "%s\n" "#define XCONFIGFILE \"$ac_define_dir\"" >>confdefs.h
 
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
+  test "$prefix_NONE" && prefix=NONE
+  test "$exec_prefix_NONE" && exec_prefix=NONE
 
-Alternatively, you may set the environment variables XPBPROXY_CFLAGS
-and XPBPROXY_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details." "$LINENO" 5
-elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
 
-Alternatively, you may set the environment variables XPBPROXY_CFLAGS
-and XPBPROXY_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
+  prefix_NONE=
+  exec_prefix_NONE=
+  test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
+  test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
+  eval ac_define_dir="\"$XF86CONFIGFILE\""
+  eval ac_define_dir="\"$ac_define_dir\""
+  XF86CONFIGFILE="$ac_define_dir"
 
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details" "$LINENO" 5; }
-else
-	XPBPROXY_CFLAGS=$pkg_cv_XPBPROXY_CFLAGS
-	XPBPROXY_LIBS=$pkg_cv_XPBPROXY_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
 
-fi
+printf "%s\n" "#define XF86CONFIGFILE \"$ac_define_dir\"" >>confdefs.h
 
-        if test "x$XQUARTZ_SPARKLE" = xyes ; then
+  test "$prefix_NONE" && prefix=NONE
+  test "$exec_prefix_NONE" && exec_prefix=NONE
 
-$as_echo "#define XQUARTZ_SPARKLE 1" >>confdefs.h
 
-        fi
+  prefix_NONE=
+  exec_prefix_NONE=
+  test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
+  test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
+  eval ac_define_dir="\"$XF86CONFIGDIR\""
+  eval ac_define_dir="\"$ac_define_dir\""
+  XCONFIGDIR="$ac_define_dir"
 
-	if test "x$STANDALONE_XPBPROXY" = xyes ; then
 
-$as_echo "#define STANDALONE_XPBPROXY 1" >>confdefs.h
+printf "%s\n" "#define XCONFIGDIR \"$ac_define_dir\"" >>confdefs.h
 
-	fi
-fi
+  test "$prefix_NONE" && prefix=NONE
+  test "$exec_prefix_NONE" && exec_prefix=NONE
 
- if test "x$XQUARTZ" = xyes -o "x$XWIN" = xyes ; then
-  PSEUDORAMIX_TRUE=
-  PSEUDORAMIX_FALSE='#'
-else
-  PSEUDORAMIX_TRUE='#'
-  PSEUDORAMIX_FALSE=
-fi
+
+  prefix_NONE=
+  exec_prefix_NONE=
+  test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
+  test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
+  eval ac_define_dir="\"$moduledir\""
+  eval ac_define_dir="\"$ac_define_dir\""
+  DEFAULT_MODULE_PATH="$ac_define_dir"
+
+
+printf "%s\n" "#define DEFAULT_MODULE_PATH \"$ac_define_dir\"" >>confdefs.h
+
+  test "$prefix_NONE" && prefix=NONE
+  test "$exec_prefix_NONE" && exec_prefix=NONE
+
+
+  prefix_NONE=
+  exec_prefix_NONE=
+  test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
+  test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
+  eval ac_define_dir="\"$libdir\""
+  eval ac_define_dir="\"$ac_define_dir\""
+  DEFAULT_LIBRARY_PATH="$ac_define_dir"
+
+
+printf "%s\n" "#define DEFAULT_LIBRARY_PATH \"$ac_define_dir\"" >>confdefs.h
+
+  test "$prefix_NONE" && prefix=NONE
+  test "$exec_prefix_NONE" && exec_prefix=NONE
+
+
+  prefix_NONE=
+  exec_prefix_NONE=
+  test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
+  test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
+  eval ac_define_dir="\"$logdir\""
+  eval ac_define_dir="\"$ac_define_dir\""
+  DEFAULT_LOGDIR="$ac_define_dir"
+
+
+printf "%s\n" "#define DEFAULT_LOGDIR \"$ac_define_dir\"" >>confdefs.h
+
+  test "$prefix_NONE" && prefix=NONE
+  test "$exec_prefix_NONE" && exec_prefix=NONE
+
+
+  prefix_NONE=
+  exec_prefix_NONE=
+  test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
+  test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
+  eval ac_define_dir="\"$LOGPREFIX\""
+  eval ac_define_dir="\"$ac_define_dir\""
+  DEFAULT_LOGPREFIX="$ac_define_dir"
+
+
+printf "%s\n" "#define DEFAULT_LOGPREFIX \"$ac_define_dir\"" >>confdefs.h
+
+  test "$prefix_NONE" && prefix=NONE
+  test "$exec_prefix_NONE" && exec_prefix=NONE
+
+
+  prefix_NONE=
+  exec_prefix_NONE=
+  test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
+  test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
+  eval ac_define_dir="\"$XDG_DATA_HOME\""
+  eval ac_define_dir="\"$ac_define_dir\""
+  DEFAULT_XDG_DATA_HOME="$ac_define_dir"
 
 
-# Support for objc in autotools is minimal and not documented.
-OBJC='$(CC)'
-OBJCLD='$(CCLD)'
-OBJCLINK='$(LINK)'
-OBJCFLAGS='$(CFLAGS)'
+printf "%s\n" "#define DEFAULT_XDG_DATA_HOME \"$ac_define_dir\"" >>confdefs.h
 
+  test "$prefix_NONE" && prefix=NONE
+  test "$exec_prefix_NONE" && exec_prefix=NONE
 
 
+  prefix_NONE=
+  exec_prefix_NONE=
+  test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
+  test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
+  eval ac_define_dir="\"$XDG_DATA_HOME_LOGDIR\""
+  eval ac_define_dir="\"$ac_define_dir\""
+  DEFAULT_XDG_DATA_HOME_LOGDIR="$ac_define_dir"
 
-# internal, undocumented automake func follows :(
 
-depcc="$OBJC" am_compiler_list='gcc3 gcc'
+printf "%s\n" "#define DEFAULT_XDG_DATA_HOME_LOGDIR \"$ac_define_dir\"" >>confdefs.h
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
-$as_echo_n "checking dependency style of $depcc... " >&6; }
-if ${am_cv_OBJC_dependencies_compiler_type+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
-  # We make a subdir and do the tests there.  Otherwise we can end up
-  # making bogus files that we don't know about and never remove.  For
-  # instance it was reported that on HP-UX the gcc test will end up
-  # making a dummy file named 'D' -- because '-MD' means "put the output
-  # in D".
-  rm -rf conftest.dir
-  mkdir conftest.dir
-  # Copy depcomp to subdir because otherwise we won't find it if we're
-  # using a relative directory.
-  cp "$am_depcomp" conftest.dir
-  cd conftest.dir
-  # We will build objects and dependencies in a subdirectory because
-  # it helps to detect inapplicable dependency modes.  For instance
-  # both Tru64's cc and ICC support -MD to output dependencies as a
-  # side effect of compilation, but ICC will put the dependencies in
-  # the current directory while Tru64 will put them in the object
-  # directory.
-  mkdir sub
+  test "$prefix_NONE" && prefix=NONE
+  test "$exec_prefix_NONE" && exec_prefix=NONE
 
-  am_cv_OBJC_dependencies_compiler_type=none
-  if test "$am_compiler_list" = ""; then
-     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
-  fi
-  am__universal=false
 
+printf "%s\n" "#define __VENDORDWEBSUPPORT__ \"$VENDOR_WEB\"" >>confdefs.h
 
-  for depmode in $am_compiler_list; do
-    # Setup a source with many dependencies, because some compilers
-    # like to wrap large dependency lists on column 80 (with \), and
-    # we should not choose a depcomp mode which is confused by this.
-    #
-    # We need to recreate these files for each test, as the compiler may
-    # overwrite some of them when testing with obscure command lines.
-    # This happens at least with the AIX C compiler.
-    : > sub/conftest.c
-    for i in 1 2 3 4 5 6; do
-      echo '#include "conftst'$i'.h"' >> sub/conftest.c
-      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
-      # Solaris 10 /bin/sh.
-      echo '/* dummy */' > sub/conftst$i.h
-    done
-    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+	if test "x$VGAHW" = xyes; then
 
-    # We check with '-c' and '-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle '-M -o', and we need to detect this.  Also, some Intel
-    # versions had trouble with output in subdirs.
-    am__obj=sub/conftest.${OBJEXT-o}
-    am__minus_obj="-o $am__obj"
-    case $depmode in
-    gcc)
-      # This depmode causes a compiler race in universal mode.
-      test "$am__universal" = false || continue
-      ;;
-    nosideeffect)
-      # After this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested.
-      if test "x$enable_dependency_tracking" = xyes; then
-	continue
-      else
-	break
-      fi
-      ;;
-    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
-      # This compiler won't grok '-c -o', but also, the minuso test has
-      # not run yet.  These depmodes are late enough in the game, and
-      # so weak that their functioning should not be impacted.
-      am__obj=conftest.${OBJEXT-o}
-      am__minus_obj=
-      ;;
-    none) break ;;
-    esac
-    if depmode=$depmode \
-       source=sub/conftest.c object=$am__obj \
-       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
-         >/dev/null 2>conftest.err &&
-       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
-       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
-      # icc doesn't choke on unknown options, it will just issue warnings
-      # or remarks (even with -Werror).  So we grep stderr for any message
-      # that says an option was ignored or not supported.
-      # When given -MP, icc 7.0 and 7.1 complain thusly:
-      #   icc: Command line warning: ignoring option '-M'; no argument required
-      # The diagnosis changed in icc 8.0:
-      #   icc: Command line remark: option '-MP' not supported
-      if (grep 'ignoring option' conftest.err ||
-          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
-        am_cv_OBJC_dependencies_compiler_type=$depmode
-        break
-      fi
-    fi
-  done
+printf "%s\n" "#define WITH_VGAHW 1" >>confdefs.h
 
-  cd ..
-  rm -rf conftest.dir
-else
-  am_cv_OBJC_dependencies_compiler_type=none
-fi
+	fi
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_OBJC_dependencies_compiler_type" >&5
-$as_echo "$am_cv_OBJC_dependencies_compiler_type" >&6; }
-OBJCDEPMODE=depmode=$am_cv_OBJC_dependencies_compiler_type
+	driverdir="$moduledir/drivers"
 
- if
-  test "x$enable_dependency_tracking" != xno \
-  && test "$am_cv_OBJC_dependencies_compiler_type" = gcc3; then
-  am__fastdepOBJC_TRUE=
-  am__fastdepOBJC_FALSE='#'
-else
-  am__fastdepOBJC_TRUE='#'
-  am__fastdepOBJC_FALSE=
-fi
 
+	sdkdir="$includedir/xorg"
+	extdir="$includedir/X11/extensions"
+	sysconfigdir="$datadir/X11/$XF86CONFIGDIR"
 
- if test "x$XQUARTZ" = xyes; then
-  XQUARTZ_TRUE=
-  XQUARTZ_FALSE='#'
-else
-  XQUARTZ_TRUE='#'
-  XQUARTZ_FALSE=
-fi
 
- if test "x$XQUARTZ_SPARKLE" != "xno"; then
-  XQUARTZ_SPARKLE_TRUE=
-  XQUARTZ_SPARKLE_FALSE='#'
-else
-  XQUARTZ_SPARKLE_TRUE='#'
-  XQUARTZ_SPARKLE_FALSE=
-fi
 
- if test "x$STANDALONE_XPBPROXY" = xyes; then
-  STANDALONE_XPBPROXY_TRUE=
-  STANDALONE_XPBPROXY_FALSE='#'
-else
-  STANDALONE_XPBPROXY_TRUE='#'
-  STANDALONE_XPBPROXY_FALSE=
-fi
+
+
+	# stuff the ABI versions into the pc file too
+	extract_abi() {
+	    grep ^.define.*${1}_VERSION ${srcdir}/hw/xfree86/common/xf86Module.h | tr '(),' '  .' | awk '{ print $4$5 }'
+	}
+	abi_ansic=`extract_abi ANSIC`
+	abi_videodrv=`extract_abi VIDEODRV`
+	abi_xinput=`extract_abi XINPUT`
+	abi_extension=`extract_abi EXTENSION`
 
 
 
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DMXMODULES" >&5
-$as_echo_n "checking for DMXMODULES... " >&6; }
 
-if test -n "$DMXMODULES_CFLAGS"; then
-    pkg_cv_DMXMODULES_CFLAGS="$DMXMODULES_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xmuu \$LIBXEXT x11 >= 1.6 xrender xfixes \$LIBXI \$DMXPROTO xau \$XDMCP_MODULES\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "xmuu $LIBXEXT x11 >= 1.6 xrender xfixes $LIBXI $DMXPROTO xau $XDMCP_MODULES") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_DMXMODULES_CFLAGS=`$PKG_CONFIG --cflags "xmuu $LIBXEXT x11 >= 1.6 xrender xfixes $LIBXI $DMXPROTO xau $XDMCP_MODULES" 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
 fi
- else
-    pkg_failed=untried
-fi
-if test -n "$DMXMODULES_LIBS"; then
-    pkg_cv_DMXMODULES_LIBS="$DMXMODULES_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xmuu \$LIBXEXT x11 >= 1.6 xrender xfixes \$LIBXI \$DMXPROTO xau \$XDMCP_MODULES\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "xmuu $LIBXEXT x11 >= 1.6 xrender xfixes $LIBXI $DMXPROTO xau $XDMCP_MODULES") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_DMXMODULES_LIBS=`$PKG_CONFIG --libs "xmuu $LIBXEXT x11 >= 1.6 xrender xfixes $LIBXI $DMXPROTO xau $XDMCP_MODULES" 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
+ if test "x$XORG" = xyes; then
+  XORG_TRUE=
+  XORG_FALSE='#'
 else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
+  XORG_TRUE='#'
+  XORG_FALSE=
 fi
 
-
-
-if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
+ if test "x$PCI" = xyes; then
+  XORG_BUS_PCI_TRUE=
+  XORG_BUS_PCI_FALSE='#'
 else
-        _pkg_short_errors_supported=no
+  XORG_BUS_PCI_TRUE='#'
+  XORG_BUS_PCI_FALSE=
 fi
-        if test $_pkg_short_errors_supported = yes; then
-	        DMXMODULES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "xmuu $LIBXEXT x11 >= 1.6 xrender xfixes $LIBXI $DMXPROTO xau $XDMCP_MODULES" 2>&1`
-        else
-	        DMXMODULES_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "xmuu $LIBXEXT x11 >= 1.6 xrender xfixes $LIBXI $DMXPROTO xau $XDMCP_MODULES" 2>&1`
-        fi
-	# Put the nasty error message in config.log where it belongs
-	echo "$DMXMODULES_PKG_ERRORS" >&5
 
-	have_dmx=no
-elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-	have_dmx=no
+ if test "x$xorg_bus_bsdpci" = xyes; then
+  XORG_BUS_BSDPCI_TRUE=
+  XORG_BUS_BSDPCI_FALSE='#'
 else
-	DMXMODULES_CFLAGS=$pkg_cv_DMXMODULES_CFLAGS
-	DMXMODULES_LIBS=$pkg_cv_DMXMODULES_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XDMXCONFIG_DEP" >&5
-$as_echo_n "checking for XDMXCONFIG_DEP... " >&6; }
+  XORG_BUS_BSDPCI_TRUE='#'
+  XORG_BUS_BSDPCI_FALSE=
+fi
 
-if test -n "$XDMXCONFIG_DEP_CFLAGS"; then
-    pkg_cv_XDMXCONFIG_DEP_CFLAGS="$XDMXCONFIG_DEP_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xaw7 xmu xt xpm x11\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "xaw7 xmu xt xpm x11") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_XDMXCONFIG_DEP_CFLAGS=`$PKG_CONFIG --cflags "xaw7 xmu xt xpm x11" 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
+ if test "x$xorg_bus_sparc" = xyes; then
+  XORG_BUS_SPARC_TRUE=
+  XORG_BUS_SPARC_FALSE='#'
 else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
+  XORG_BUS_SPARC_TRUE='#'
+  XORG_BUS_SPARC_FALSE=
 fi
-if test -n "$XDMXCONFIG_DEP_LIBS"; then
-    pkg_cv_XDMXCONFIG_DEP_LIBS="$XDMXCONFIG_DEP_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xaw7 xmu xt xpm x11\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "xaw7 xmu xt xpm x11") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_XDMXCONFIG_DEP_LIBS=`$PKG_CONFIG --libs "xaw7 xmu xt xpm x11" 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
+
+ if test "x$linux_acpi" = xyes; then
+  LNXACPI_TRUE=
+  LNXACPI_FALSE='#'
 else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
+  LNXACPI_TRUE='#'
+  LNXACPI_FALSE=
 fi
 
+ if test "x$linux_apm" = xyes; then
+  LNXAPM_TRUE=
+  LNXAPM_FALSE='#'
+else
+  LNXAPM_TRUE='#'
+  LNXAPM_FALSE=
+fi
 
-
-if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
+ if test "x$solaris_vt" = xyes; then
+  SOLARIS_VT_TRUE=
+  SOLARIS_VT_FALSE='#'
 else
-        _pkg_short_errors_supported=no
+  SOLARIS_VT_TRUE='#'
+  SOLARIS_VT_FALSE=
 fi
-        if test $_pkg_short_errors_supported = yes; then
-	        XDMXCONFIG_DEP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "xaw7 xmu xt xpm x11" 2>&1`
-        else
-	        XDMXCONFIG_DEP_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "xaw7 xmu xt xpm x11" 2>&1`
-        fi
-	# Put the nasty error message in config.log where it belongs
-	echo "$XDMXCONFIG_DEP_PKG_ERRORS" >&5
 
-	have_dmx=no
-elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-	have_dmx=no
+ if test "x$DGA" = xyes; then
+  DGA_TRUE=
+  DGA_FALSE='#'
 else
-	XDMXCONFIG_DEP_CFLAGS=$pkg_cv_XDMXCONFIG_DEP_CFLAGS
-	XDMXCONFIG_DEP_LIBS=$pkg_cv_XDMXCONFIG_DEP_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-	have_dmx=yes
+  DGA_TRUE='#'
+  DGA_FALSE=
 fi
+
+ if test "x$CONFIG_UDEV_KMS" = xyes; then
+  XORG_BUS_PLATFORM_TRUE=
+  XORG_BUS_PLATFORM_FALSE='#'
+else
+  XORG_BUS_PLATFORM_TRUE='#'
+  XORG_BUS_PLATFORM_FALSE=
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Xdmx DDX" >&5
-$as_echo_n "checking whether to build Xdmx DDX... " >&6; }
-if test "x$DMX" = xauto; then
-	DMX="$have_dmx"
-	case $host_os in
-		cygwin*) DMX="no" ;;
-		mingw*)  DMX="no" ;;
-		darwin*) DMX="no" ;;
-	esac
+
+ if test "x$XORG_DRIVER_MODESETTING" = xyes; then
+  XORG_DRIVER_MODESETTING_TRUE=
+  XORG_DRIVER_MODESETTING_FALSE='#'
+else
+  XORG_DRIVER_MODESETTING_TRUE='#'
+  XORG_DRIVER_MODESETTING_FALSE=
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DMX" >&5
-$as_echo "$DMX" >&6; }
- if test "x$DMX" = xyes; then
-  DMX_TRUE=
-  DMX_FALSE='#'
+
+ if test "x$XORG_DRIVER_INPUT_INPUTTEST" = xyes; then
+  XORG_DRIVER_INPUT_INPUTTEST_TRUE=
+  XORG_DRIVER_INPUT_INPUTTEST_FALSE='#'
 else
-  DMX_TRUE='#'
-  DMX_FALSE=
+  XORG_DRIVER_INPUT_INPUTTEST_TRUE='#'
+  XORG_DRIVER_INPUT_INPUTTEST_FALSE=
 fi
 
 
-if test "x$DMX" = xyes; then
-	if test "x$have_dmx" = xno; then
-		as_fn_error $? "Xdmx build explicitly requested, but required
-		              modules not found." "$LINENO" 5
+if test "x$GLAMOR" = xauto; then
+	if echo "$XORG" "$XEPHYR" | grep -q yes ; then
+		GLAMOR=yes
 	fi
-	DMX_INCLUDES="$XEXT_INC $RENDER_INC $RECORD_INC"
-	XDMX_CFLAGS="$DMXMODULES_CFLAGS"
-	XDMX_LIBS="$FB_LIB $MI_LIB $XEXT_LIB $RENDER_LIB $RECORD_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $DRI3_LIB $PRESENT_LIB $MIEXT_SYNC_LIB $MIEXT_SHADOW_LIB $MIEXT_DAMAGE_LIB $COMPOSITE_LIB $DAMAGE_LIB $MAIN_LIB $DIX_LIB $RANDR_LIB $CONFIG_LIB $OS_LIB $FIXES_LIB"
-	XDMX_SYS_LIBS="$DMXMODULES_LIBS"
-
-
-
+fi
 
-	ac_fn_c_check_header_mongrel "$LINENO" "linux/input.h" "ac_cv_header_linux_input_h" "$ac_includes_default"
-if test "x$ac_cv_header_linux_input_h" = xyes; then :
-  DMX_BUILD_USB="yes"
+ if test "x$GLAMOR" = xyes; then
+  GLAMOR_TRUE=
+  GLAMOR_FALSE='#'
 else
-  DMX_BUILD_USB="no"
+  GLAMOR_TRUE='#'
+  GLAMOR_FALSE=
 fi
 
 
+if test "x$GLAMOR" = xyes; then
 
+printf "%s\n" "#define GLAMOR 1" >>confdefs.h
 
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DMXEXAMPLES_DEP" >&5
-$as_echo_n "checking for DMXEXAMPLES_DEP... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GLAMOR" >&5
+printf %s "checking for GLAMOR... " >&6; }
 
-if test -n "$DMXEXAMPLES_DEP_CFLAGS"; then
-    pkg_cv_DMXEXAMPLES_DEP_CFLAGS="$DMXEXAMPLES_DEP_CFLAGS"
+if test -n "$GLAMOR_CFLAGS"; then
+    pkg_cv_GLAMOR_CFLAGS="$GLAMOR_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBDMX \$LIBXEXT x11\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$LIBDMX $LIBXEXT x11") 2>&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"epoxy\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "epoxy") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_DMXEXAMPLES_DEP_CFLAGS=`$PKG_CONFIG --cflags "$LIBDMX $LIBXEXT x11" 2>/dev/null`
+  pkg_cv_GLAMOR_CFLAGS=`$PKG_CONFIG --cflags "epoxy" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -31342,16 +31396,16 @@ fi
  else
     pkg_failed=untried
 fi
-if test -n "$DMXEXAMPLES_DEP_LIBS"; then
-    pkg_cv_DMXEXAMPLES_DEP_LIBS="$DMXEXAMPLES_DEP_LIBS"
+if test -n "$GLAMOR_LIBS"; then
+    pkg_cv_GLAMOR_LIBS="$GLAMOR_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBDMX \$LIBXEXT x11\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$LIBDMX $LIBXEXT x11") 2>&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"epoxy\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "epoxy") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_DMXEXAMPLES_DEP_LIBS=`$PKG_CONFIG --libs "$LIBDMX $LIBXEXT x11" 2>/dev/null`
+  pkg_cv_GLAMOR_LIBS=`$PKG_CONFIG --libs "epoxy" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -31363,8 +31417,8 @@ fi
 
 
 if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -31372,61 +31426,83 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        DMXEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$LIBDMX $LIBXEXT x11" 2>&1`
+	        GLAMOR_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "epoxy" 2>&1`
         else
-	        DMXEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$LIBDMX $LIBXEXT x11" 2>&1`
+	        GLAMOR_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "epoxy" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
-	echo "$DMXEXAMPLES_DEP_PKG_ERRORS" >&5
+	echo "$GLAMOR_PKG_ERRORS" >&5
 
-	as_fn_error $? "Package requirements ($LIBDMX $LIBXEXT x11) were not met:
+	as_fn_error $? "Package requirements (epoxy) were not met:
 
-$DMXEXAMPLES_DEP_PKG_ERRORS
+$GLAMOR_PKG_ERRORS
 
 Consider adjusting the PKG_CONFIG_PATH environment variable if you
 installed software in a non-standard prefix.
 
-Alternatively, you may set the environment variables DMXEXAMPLES_DEP_CFLAGS
-and DMXEXAMPLES_DEP_LIBS to avoid the need to call pkg-config.
+Alternatively, you may set the environment variables GLAMOR_CFLAGS
+and GLAMOR_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details." "$LINENO" 5
 elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
 is in your PATH or set the PKG_CONFIG environment variable to the full
 path to pkg-config.
 
-Alternatively, you may set the environment variables DMXEXAMPLES_DEP_CFLAGS
-and DMXEXAMPLES_DEP_LIBS to avoid the need to call pkg-config.
+Alternatively, you may set the environment variables GLAMOR_CFLAGS
+and GLAMOR_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details.
 
 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
 See \`config.log' for more details" "$LINENO" 5; }
 else
-	DMXEXAMPLES_DEP_CFLAGS=$pkg_cv_DMXEXAMPLES_DEP_CFLAGS
-	DMXEXAMPLES_DEP_LIBS=$pkg_cv_DMXEXAMPLES_DEP_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+	GLAMOR_CFLAGS=$pkg_cv_GLAMOR_CFLAGS
+	GLAMOR_LIBS=$pkg_cv_GLAMOR_LIBS
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+
+fi
+
+	if test -n "$PKG_CONFIG" && \
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"epoxy >= 1.4.4\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "epoxy >= 1.4.4") 2>&5
+  ac_status=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+
+printf "%s\n" "#define GLAMOR_HAS_EGL_QUERY_DMABUF 1" >>confdefs.h
+
+fi
+
+	if test -n "$PKG_CONFIG" && \
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"epoxy >= 1.5.4\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "epoxy >= 1.5.4") 2>&5
+  ac_status=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+
+printf "%s\n" "#define GLAMOR_HAS_EGL_QUERY_DRIVER 1" >>confdefs.h
 
 fi
 
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DMXXMUEXAMPLES_DEP" >&5
-$as_echo_n "checking for DMXXMUEXAMPLES_DEP... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GBM" >&5
+printf %s "checking for GBM... " >&6; }
 
-if test -n "$DMXXMUEXAMPLES_DEP_CFLAGS"; then
-    pkg_cv_DMXXMUEXAMPLES_DEP_CFLAGS="$DMXXMUEXAMPLES_DEP_CFLAGS"
+if test -n "$GBM_CFLAGS"; then
+    pkg_cv_GBM_CFLAGS="$GBM_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBDMX xmu \$LIBXEXT x11\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$LIBDMX xmu $LIBXEXT x11") 2>&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\"\$LIBGBM\"\""; } >&5
+  ($PKG_CONFIG --exists --print-errors ""$LIBGBM"") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_DMXXMUEXAMPLES_DEP_CFLAGS=`$PKG_CONFIG --cflags "$LIBDMX xmu $LIBXEXT x11" 2>/dev/null`
+  pkg_cv_GBM_CFLAGS=`$PKG_CONFIG --cflags ""$LIBGBM"" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -31434,16 +31510,16 @@ fi
  else
     pkg_failed=untried
 fi
-if test -n "$DMXXMUEXAMPLES_DEP_LIBS"; then
-    pkg_cv_DMXXMUEXAMPLES_DEP_LIBS="$DMXXMUEXAMPLES_DEP_LIBS"
+if test -n "$GBM_LIBS"; then
+    pkg_cv_GBM_LIBS="$GBM_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBDMX xmu \$LIBXEXT x11\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$LIBDMX xmu $LIBXEXT x11") 2>&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\"\$LIBGBM\"\""; } >&5
+  ($PKG_CONFIG --exists --print-errors ""$LIBGBM"") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_DMXXMUEXAMPLES_DEP_LIBS=`$PKG_CONFIG --libs "$LIBDMX xmu $LIBXEXT x11" 2>/dev/null`
+  pkg_cv_GBM_LIBS=`$PKG_CONFIG --libs ""$LIBGBM"" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -31455,8 +31531,8 @@ fi
 
 
 if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -31464,153 +31540,216 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        DMXXMUEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$LIBDMX xmu $LIBXEXT x11" 2>&1`
+	        GBM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs ""$LIBGBM"" 2>&1`
         else
-	        DMXXMUEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$LIBDMX xmu $LIBXEXT x11" 2>&1`
+	        GBM_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs ""$LIBGBM"" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
-	echo "$DMXXMUEXAMPLES_DEP_PKG_ERRORS" >&5
-
-	as_fn_error $? "Package requirements ($LIBDMX xmu $LIBXEXT x11) were not met:
-
-$DMXXMUEXAMPLES_DEP_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
+	echo "$GBM_PKG_ERRORS" >&5
 
-Alternatively, you may set the environment variables DMXXMUEXAMPLES_DEP_CFLAGS
-and DMXXMUEXAMPLES_DEP_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details." "$LINENO" 5
+	GBM=no
 elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-Alternatively, you may set the environment variables DMXXMUEXAMPLES_DEP_CFLAGS
-and DMXXMUEXAMPLES_DEP_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details" "$LINENO" 5; }
+     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+	GBM=no
 else
-	DMXXMUEXAMPLES_DEP_CFLAGS=$pkg_cv_DMXXMUEXAMPLES_DEP_CFLAGS
-	DMXXMUEXAMPLES_DEP_LIBS=$pkg_cv_DMXXMUEXAMPLES_DEP_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
+	GBM_CFLAGS=$pkg_cv_GBM_CFLAGS
+	GBM_LIBS=$pkg_cv_GBM_LIBS
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+	GBM=yes
 fi
+	if test "x$GBM" = xyes; then
 
+printf "%s\n" "#define GLAMOR_HAS_GBM 1" >>confdefs.h
 
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DMXXIEXAMPLES_DEP" >&5
-$as_echo_n "checking for DMXXIEXAMPLES_DEP... " >&6; }
+		ac_fn_check_decl "$LINENO" "GBM_BO_USE_LINEAR" "ac_cv_have_decl_GBM_BO_USE_LINEAR" "#include <stdlib.h>
+			 #include <gbm.h>
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_GBM_BO_USE_LINEAR" = xyes
+then :
 
-if test -n "$DMXXIEXAMPLES_DEP_CFLAGS"; then
-    pkg_cv_DMXXIEXAMPLES_DEP_CFLAGS="$DMXXIEXAMPLES_DEP_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBDMX \$LIBXI \$LIBXEXT x11\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$LIBDMX $LIBXI $LIBXEXT x11") 2>&5
+printf "%s\n" "#define GLAMOR_HAS_GBM_LINEAR 1" >>confdefs.h
+
+fi
+				if test -n "$PKG_CONFIG" && \
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gbm >= 17.1.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "gbm >= 17.1.0") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_DMXXIEXAMPLES_DEP_CFLAGS=`$PKG_CONFIG --cflags "$LIBDMX $LIBXI $LIBXEXT x11" 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
+
+printf "%s\n" "#define GBM_BO_WITH_MODIFIERS 1" >>confdefs.h
+
 fi
- else
-    pkg_failed=untried
+	else
+		if test "x$XORG" = xyes; then
+			as_fn_error $? "Glamor for Xorg requires $LIBGBM" "$LINENO" 5
+		fi
+	fi
 fi
-if test -n "$DMXXIEXAMPLES_DEP_LIBS"; then
-    pkg_cv_DMXXIEXAMPLES_DEP_LIBS="$DMXXIEXAMPLES_DEP_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBDMX \$LIBXI \$LIBXEXT x11\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$LIBDMX $LIBXI $LIBXEXT x11") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_DMXXIEXAMPLES_DEP_LIBS=`$PKG_CONFIG --libs "$LIBDMX $LIBXI $LIBXEXT x11" 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
+ if test "x$GBM" = xyes; then
+  GLAMOR_EGL_TRUE=
+  GLAMOR_EGL_FALSE='#'
 else
-  pkg_failed=yes
+  GLAMOR_EGL_TRUE='#'
+  GLAMOR_EGL_FALSE=
 fi
- else
-    pkg_failed=untried
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build XWin DDX" >&5
+printf %s "checking whether to build XWin DDX... " >&6; }
+if test "x$XWIN" = xauto; then
+	case $host_os in
+		cygwin*) XWIN="yes" ;;
+		mingw*) XWIN="yes" ;;
+		*) XWIN="no" ;;
+	esac
 fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XWIN" >&5
+printf "%s\n" "$XWIN" >&6; }
 
+if test "x$XWIN" = xyes; then
 
+  prefix_NONE=
+  exec_prefix_NONE=
+  test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
+  test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
+  eval ac_define_dir="\"$logdir\""
+  eval ac_define_dir="\"$ac_define_dir\""
+  DEFAULT_LOGDIR="$ac_define_dir"
 
-if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
 
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi
-        if test $_pkg_short_errors_supported = yes; then
-	        DMXXIEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$LIBDMX $LIBXI $LIBXEXT x11" 2>&1`
-        else
-	        DMXXIEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$LIBDMX $LIBXI $LIBXEXT x11" 2>&1`
-        fi
-	# Put the nasty error message in config.log where it belongs
-	echo "$DMXXIEXAMPLES_DEP_PKG_ERRORS" >&5
+printf "%s\n" "#define DEFAULT_LOGDIR \"$ac_define_dir\"" >>confdefs.h
 
-	as_fn_error $? "Package requirements ($LIBDMX $LIBXI $LIBXEXT x11) were not met:
+  test "$prefix_NONE" && prefix=NONE
+  test "$exec_prefix_NONE" && exec_prefix=NONE
 
-$DMXXIEXAMPLES_DEP_PKG_ERRORS
 
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
+printf "%s\n" "#define XORG_VERSION_CURRENT $VENDOR_RELEASE" >>confdefs.h
 
-Alternatively, you may set the environment variables DMXXIEXAMPLES_DEP_CFLAGS
-and DMXXIEXAMPLES_DEP_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details." "$LINENO" 5
-elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
 
-Alternatively, you may set the environment variables DMXXIEXAMPLES_DEP_CFLAGS
-and DMXXIEXAMPLES_DEP_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
+printf "%s\n" "#define __VENDORDWEBSUPPORT__ \"$VENDOR_WEB\"" >>confdefs.h
 
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details" "$LINENO" 5; }
+	if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
+set dummy ${ac_tool_prefix}windres; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_WINDRES+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if test -n "$WINDRES"; then
+  ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
 else
-	DMXXIEXAMPLES_DEP_CFLAGS=$pkg_cv_DMXXIEXAMPLES_DEP_CFLAGS
-	DMXXIEXAMPLES_DEP_LIBS=$pkg_cv_DMXXIEXAMPLES_DEP_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+WINDRES=$ac_cv_prog_WINDRES
+if test -n "$WINDRES"; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
+printf "%s\n" "$WINDRES" >&6; }
+else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_WINDRES"; then
+  ac_ct_WINDRES=$WINDRES
+  # Extract the first word of "windres", so it can be a program name with args.
+set dummy windres; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_WINDRES+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if test -n "$ac_ct_WINDRES"; then
+  ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_WINDRES="windres"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
+if test -n "$ac_ct_WINDRES"; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
+printf "%s\n" "$ac_ct_WINDRES" >&6; }
+else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
 
+  if test "x$ac_ct_WINDRES" = x; then
+    WINDRES=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    WINDRES=$ac_ct_WINDRES
+  fi
+else
+  WINDRES="$ac_cv_prog_WINDRES"
 fi
 
 
+
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XTSTEXAMPLES_DEP" >&5
-$as_echo_n "checking for XTSTEXAMPLES_DEP... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XWINMODULES" >&5
+printf %s "checking for XWINMODULES... " >&6; }
 
-if test -n "$XTSTEXAMPLES_DEP_CFLAGS"; then
-    pkg_cv_XTSTEXAMPLES_DEP_CFLAGS="$XTSTEXAMPLES_DEP_CFLAGS"
+if test -n "$XWINMODULES_CFLAGS"; then
+    pkg_cv_XWINMODULES_CFLAGS="$XWINMODULES_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBXTST \$LIBXEXT x11\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$LIBXTST $LIBXEXT x11") 2>&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xcb-aux xcb-composite xcb-image xcb-ewmh xcb-icccm xcb-xfixes\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "xcb-aux xcb-composite xcb-image xcb-ewmh xcb-icccm xcb-xfixes") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_XTSTEXAMPLES_DEP_CFLAGS=`$PKG_CONFIG --cflags "$LIBXTST $LIBXEXT x11" 2>/dev/null`
+  pkg_cv_XWINMODULES_CFLAGS=`$PKG_CONFIG --cflags "xcb-aux xcb-composite xcb-image xcb-ewmh xcb-icccm xcb-xfixes" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -31618,16 +31757,16 @@ fi
  else
     pkg_failed=untried
 fi
-if test -n "$XTSTEXAMPLES_DEP_LIBS"; then
-    pkg_cv_XTSTEXAMPLES_DEP_LIBS="$XTSTEXAMPLES_DEP_LIBS"
+if test -n "$XWINMODULES_LIBS"; then
+    pkg_cv_XWINMODULES_LIBS="$XWINMODULES_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBXTST \$LIBXEXT x11\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$LIBXTST $LIBXEXT x11") 2>&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xcb-aux xcb-composite xcb-image xcb-ewmh xcb-icccm xcb-xfixes\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "xcb-aux xcb-composite xcb-image xcb-ewmh xcb-icccm xcb-xfixes") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_XTSTEXAMPLES_DEP_LIBS=`$PKG_CONFIG --libs "$LIBXTST $LIBXEXT x11" 2>/dev/null`
+  pkg_cv_XWINMODULES_LIBS=`$PKG_CONFIG --libs "xcb-aux xcb-composite xcb-image xcb-ewmh xcb-icccm xcb-xfixes" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -31639,8 +31778,8 @@ fi
 
 
 if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -31648,61 +31787,74 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        XTSTEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$LIBXTST $LIBXEXT x11" 2>&1`
+	        XWINMODULES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "xcb-aux xcb-composite xcb-image xcb-ewmh xcb-icccm xcb-xfixes" 2>&1`
         else
-	        XTSTEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$LIBXTST $LIBXEXT x11" 2>&1`
+	        XWINMODULES_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "xcb-aux xcb-composite xcb-image xcb-ewmh xcb-icccm xcb-xfixes" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
-	echo "$XTSTEXAMPLES_DEP_PKG_ERRORS" >&5
+	echo "$XWINMODULES_PKG_ERRORS" >&5
 
-	as_fn_error $? "Package requirements ($LIBXTST $LIBXEXT x11) were not met:
+	as_fn_error $? "Package requirements (xcb-aux xcb-composite xcb-image xcb-ewmh xcb-icccm xcb-xfixes) were not met:
 
-$XTSTEXAMPLES_DEP_PKG_ERRORS
+$XWINMODULES_PKG_ERRORS
 
 Consider adjusting the PKG_CONFIG_PATH environment variable if you
 installed software in a non-standard prefix.
 
-Alternatively, you may set the environment variables XTSTEXAMPLES_DEP_CFLAGS
-and XTSTEXAMPLES_DEP_LIBS to avoid the need to call pkg-config.
+Alternatively, you may set the environment variables XWINMODULES_CFLAGS
+and XWINMODULES_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details." "$LINENO" 5
 elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
 is in your PATH or set the PKG_CONFIG environment variable to the full
 path to pkg-config.
 
-Alternatively, you may set the environment variables XTSTEXAMPLES_DEP_CFLAGS
-and XTSTEXAMPLES_DEP_LIBS to avoid the need to call pkg-config.
+Alternatively, you may set the environment variables XWINMODULES_CFLAGS
+and XWINMODULES_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details.
 
 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
 See \`config.log' for more details" "$LINENO" 5; }
 else
-	XTSTEXAMPLES_DEP_CFLAGS=$pkg_cv_XTSTEXAMPLES_DEP_CFLAGS
-	XTSTEXAMPLES_DEP_LIBS=$pkg_cv_XTSTEXAMPLES_DEP_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+	XWINMODULES_CFLAGS=$pkg_cv_XWINMODULES_CFLAGS
+	XWINMODULES_LIBS=$pkg_cv_XWINMODULES_LIBS
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
 
 fi
 
+	if test "x$WINDOWSDRI" = xauto; then
+		if test -n "$PKG_CONFIG" && \
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"windowsdriproto\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "windowsdriproto") 2>&5
+  ac_status=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  WINDOWSDRI=yes
+else
+  WINDOWSDRI=no
+fi
+	fi
+	if test "x$WINDOWSDRI" = xyes ; then
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRESEXAMPLES_DEP" >&5
-$as_echo_n "checking for XRESEXAMPLES_DEP... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for WINDOWSDRI" >&5
+printf %s "checking for WINDOWSDRI... " >&6; }
 
-if test -n "$XRESEXAMPLES_DEP_CFLAGS"; then
-    pkg_cv_XRESEXAMPLES_DEP_CFLAGS="$XRESEXAMPLES_DEP_CFLAGS"
+if test -n "$WINDOWSDRI_CFLAGS"; then
+    pkg_cv_WINDOWSDRI_CFLAGS="$WINDOWSDRI_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xres \$LIBXEXT x11\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "xres $LIBXEXT x11") 2>&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"windowsdriproto\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "windowsdriproto") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_XRESEXAMPLES_DEP_CFLAGS=`$PKG_CONFIG --cflags "xres $LIBXEXT x11" 2>/dev/null`
+  pkg_cv_WINDOWSDRI_CFLAGS=`$PKG_CONFIG --cflags "windowsdriproto" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -31710,16 +31862,16 @@ fi
  else
     pkg_failed=untried
 fi
-if test -n "$XRESEXAMPLES_DEP_LIBS"; then
-    pkg_cv_XRESEXAMPLES_DEP_LIBS="$XRESEXAMPLES_DEP_LIBS"
+if test -n "$WINDOWSDRI_LIBS"; then
+    pkg_cv_WINDOWSDRI_LIBS="$WINDOWSDRI_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xres \$LIBXEXT x11\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "xres $LIBXEXT x11") 2>&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"windowsdriproto\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "windowsdriproto") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_XRESEXAMPLES_DEP_LIBS=`$PKG_CONFIG --libs "xres $LIBXEXT x11" 2>/dev/null`
+  pkg_cv_WINDOWSDRI_LIBS=`$PKG_CONFIG --libs "windowsdriproto" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -31731,8 +31883,8 @@ fi
 
 
 if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -31740,61 +31892,161 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        XRESEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "xres $LIBXEXT x11" 2>&1`
+	        WINDOWSDRI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "windowsdriproto" 2>&1`
         else
-	        XRESEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "xres $LIBXEXT x11" 2>&1`
+	        WINDOWSDRI_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "windowsdriproto" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
-	echo "$XRESEXAMPLES_DEP_PKG_ERRORS" >&5
+	echo "$WINDOWSDRI_PKG_ERRORS" >&5
 
-	as_fn_error $? "Package requirements (xres $LIBXEXT x11) were not met:
+	as_fn_error $? "Package requirements (windowsdriproto) were not met:
 
-$XRESEXAMPLES_DEP_PKG_ERRORS
+$WINDOWSDRI_PKG_ERRORS
 
 Consider adjusting the PKG_CONFIG_PATH environment variable if you
 installed software in a non-standard prefix.
 
-Alternatively, you may set the environment variables XRESEXAMPLES_DEP_CFLAGS
-and XRESEXAMPLES_DEP_LIBS to avoid the need to call pkg-config.
+Alternatively, you may set the environment variables WINDOWSDRI_CFLAGS
+and WINDOWSDRI_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details." "$LINENO" 5
 elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
 is in your PATH or set the PKG_CONFIG environment variable to the full
 path to pkg-config.
 
-Alternatively, you may set the environment variables XRESEXAMPLES_DEP_CFLAGS
-and XRESEXAMPLES_DEP_LIBS to avoid the need to call pkg-config.
+Alternatively, you may set the environment variables WINDOWSDRI_CFLAGS
+and WINDOWSDRI_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details.
 
 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
 See \`config.log' for more details" "$LINENO" 5; }
 else
-	XRESEXAMPLES_DEP_CFLAGS=$pkg_cv_XRESEXAMPLES_DEP_CFLAGS
-	XRESEXAMPLES_DEP_LIBS=$pkg_cv_XRESEXAMPLES_DEP_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+	WINDOWSDRI_CFLAGS=$pkg_cv_WINDOWSDRI_CFLAGS
+	WINDOWSDRI_LIBS=$pkg_cv_WINDOWSDRI_LIBS
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+
+fi
+	fi
+
+	case $host_os in
+		cygwin*)
+			XWIN_SERVER_NAME=XWin
+
+printf "%s\n" "#define HAS_DEVWINDOWS 1" >>confdefs.h
+
+			;;
+		mingw*)
+			XWIN_SERVER_NAME=Xming
+
+printf "%s\n" "#define RELOCATE_PROJECTROOT 1" >>confdefs.h
+
+
+printf "%s\n" "#define HAS_WINSOCK 1" >>confdefs.h
+
+			XWIN_SYS_LIBS="-lpthread -lws2_32"
+			;;
+	esac
+
+	XWIN_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $RANDR_LIB $RENDER_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $DAMAGE_LIB $PRESENT_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $OS_LIB"
+	XWIN_SYS_LIBS="$XWIN_SYS_LIBS $XWINMODULES_LIBS"
+
+
+
+
+	if test "x$DEBUGGING" = xyes; then
+
+printf "%s\n" "#define CYGDEBUG 1" >>confdefs.h
+
+
+printf "%s\n" "#define CYGWINDOWING_DEBUG 1" >>confdefs.h
+
+
+printf "%s\n" "#define CYGMULTIWINDOW_DEBUG 1" >>confdefs.h
+
+	fi
+
+
+printf "%s\n" "#define DDXOSVERRORF 1" >>confdefs.h
+
+
+printf "%s\n" "#define DDXBEFORERESET 1" >>confdefs.h
+
+
+	if test "x$XWIN" = xyes && test "x$GLX" = xyes ; then
+           # Extract the first word of "python3", so it can be a program name with args.
+set dummy python3; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_PYTHON3+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if test -n "$PYTHON3"; then
+  ac_cv_prog_PYTHON3="$PYTHON3" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_prog_PYTHON3="python3"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
 fi
+fi
+PYTHON3=$ac_cv_prog_PYTHON3
+if test -n "$PYTHON3"; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON3" >&5
+printf "%s\n" "$PYTHON3" >&6; }
+else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
 
+           if test -z "$PYTHON3"; then
+                as_fn_error $? "python3 not found" "$LINENO" 5
+           fi
+           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for python module lxml" >&5
+printf %s "checking for python module lxml... " >&6; }
+           $PYTHON3 -c "import lxml;"
+           if test $? -ne 0 ; then
+                as_fn_error $? "not found" "$LINENO" 5
+           fi
+           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+           if test "x$KHRONOS_SPEC_DIR" = "xauto" ; then
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X11EXAMPLES_DEP" >&5
-$as_echo_n "checking for X11EXAMPLES_DEP... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for KHRONOS_OPENGL_REGISTRY" >&5
+printf %s "checking for KHRONOS_OPENGL_REGISTRY... " >&6; }
 
-if test -n "$X11EXAMPLES_DEP_CFLAGS"; then
-    pkg_cv_X11EXAMPLES_DEP_CFLAGS="$X11EXAMPLES_DEP_CFLAGS"
+if test -n "$KHRONOS_OPENGL_REGISTRY_CFLAGS"; then
+    pkg_cv_KHRONOS_OPENGL_REGISTRY_CFLAGS="$KHRONOS_OPENGL_REGISTRY_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBXEXT x11\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$LIBXEXT x11") 2>&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"khronos-opengl-registry\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "khronos-opengl-registry") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_X11EXAMPLES_DEP_CFLAGS=`$PKG_CONFIG --cflags "$LIBXEXT x11" 2>/dev/null`
+  pkg_cv_KHRONOS_OPENGL_REGISTRY_CFLAGS=`$PKG_CONFIG --cflags "khronos-opengl-registry" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -31802,16 +32054,16 @@ fi
  else
     pkg_failed=untried
 fi
-if test -n "$X11EXAMPLES_DEP_LIBS"; then
-    pkg_cv_X11EXAMPLES_DEP_LIBS="$X11EXAMPLES_DEP_LIBS"
+if test -n "$KHRONOS_OPENGL_REGISTRY_LIBS"; then
+    pkg_cv_KHRONOS_OPENGL_REGISTRY_LIBS="$KHRONOS_OPENGL_REGISTRY_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBXEXT x11\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$LIBXEXT x11") 2>&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"khronos-opengl-registry\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "khronos-opengl-registry") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_X11EXAMPLES_DEP_LIBS=`$PKG_CONFIG --libs "$LIBXEXT x11" 2>/dev/null`
+  pkg_cv_KHRONOS_OPENGL_REGISTRY_LIBS=`$PKG_CONFIG --libs "khronos-opengl-registry" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -31823,8 +32075,8 @@ fi
 
 
 if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -31832,170 +32084,145 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        X11EXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$LIBXEXT x11" 2>&1`
+	        KHRONOS_OPENGL_REGISTRY_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "khronos-opengl-registry" 2>&1`
         else
-	        X11EXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$LIBXEXT x11" 2>&1`
+	        KHRONOS_OPENGL_REGISTRY_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "khronos-opengl-registry" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
-	echo "$X11EXAMPLES_DEP_PKG_ERRORS" >&5
+	echo "$KHRONOS_OPENGL_REGISTRY_PKG_ERRORS" >&5
 
-	as_fn_error $? "Package requirements ($LIBXEXT x11) were not met:
+	as_fn_error $? "Package requirements (khronos-opengl-registry) were not met:
 
-$X11EXAMPLES_DEP_PKG_ERRORS
+$KHRONOS_OPENGL_REGISTRY_PKG_ERRORS
 
 Consider adjusting the PKG_CONFIG_PATH environment variable if you
 installed software in a non-standard prefix.
 
-Alternatively, you may set the environment variables X11EXAMPLES_DEP_CFLAGS
-and X11EXAMPLES_DEP_LIBS to avoid the need to call pkg-config.
+Alternatively, you may set the environment variables KHRONOS_OPENGL_REGISTRY_CFLAGS
+and KHRONOS_OPENGL_REGISTRY_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details." "$LINENO" 5
 elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
 is in your PATH or set the PKG_CONFIG environment variable to the full
 path to pkg-config.
 
-Alternatively, you may set the environment variables X11EXAMPLES_DEP_CFLAGS
-and X11EXAMPLES_DEP_LIBS to avoid the need to call pkg-config.
+Alternatively, you may set the environment variables KHRONOS_OPENGL_REGISTRY_CFLAGS
+and KHRONOS_OPENGL_REGISTRY_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details.
 
 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
 See \`config.log' for more details" "$LINENO" 5; }
 else
-	X11EXAMPLES_DEP_CFLAGS=$pkg_cv_X11EXAMPLES_DEP_CFLAGS
-	X11EXAMPLES_DEP_LIBS=$pkg_cv_X11EXAMPLES_DEP_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+	KHRONOS_OPENGL_REGISTRY_CFLAGS=$pkg_cv_KHRONOS_OPENGL_REGISTRY_CFLAGS
+	KHRONOS_OPENGL_REGISTRY_LIBS=$pkg_cv_KHRONOS_OPENGL_REGISTRY_LIBS
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
 
 fi
+		KHRONOS_SPEC_DIR=`pkg-config khronos-opengl-registry --variable=specdir`
+           fi
 
+	fi
 
 fi
- if test "x$DMX_BUILD_USB" = xyes; then
-  DMX_BUILD_USB_TRUE=
-  DMX_BUILD_USB_FALSE='#'
+ if test "x$XWIN" = xyes; then
+  XWIN_TRUE=
+  XWIN_FALSE='#'
 else
-  DMX_BUILD_USB_TRUE='#'
-  DMX_BUILD_USB_FALSE=
+  XWIN_TRUE='#'
+  XWIN_FALSE=
 fi
 
+ if test "x$XWIN" = xyes && test "x$GLX" = xyes; then
+  XWIN_GLX_WINDOWS_TRUE=
+  XWIN_GLX_WINDOWS_FALSE='#'
+else
+  XWIN_GLX_WINDOWS_TRUE='#'
+  XWIN_GLX_WINDOWS_FALSE=
+fi
 
-
-XEPHYR_LIBS=
-XEPHYR_INCS=
-
- if test x$KDRIVE = xyes; then
-  KDRIVE_TRUE=
-  KDRIVE_FALSE='#'
+ if test "x$XWIN" = xyes && test "x$WINDOWSDRI" = xyes; then
+  XWIN_WINDOWS_DRI_TRUE=
+  XWIN_WINDOWS_DRI_FALSE='#'
 else
-  KDRIVE_TRUE='#'
-  KDRIVE_FALSE=
+  XWIN_WINDOWS_DRI_TRUE='#'
+  XWIN_WINDOWS_DRI_FALSE=
 fi
 
 
-if test "$KDRIVE" = yes; then
-    XEPHYR_REQUIRED_LIBS="xau xdmcp xcb xcb-shape xcb-render xcb-renderutil xcb-aux xcb-image xcb-icccm xcb-shm >= 1.9.3 xcb-keysyms xcb-randr xcb-xkb"
-    if test "x$XV" = xyes; then
-        XEPHYR_REQUIRED_LIBS="$XEPHYR_REQUIRED_LIBS xcb-xv"
-    fi
-    if test "x$DRI" = xyes && test "x$GLX" = xyes; then
-        XEPHYR_REQUIRED_LIBS="$XEPHYR_REQUIRED_LIBS $LIBDRM xcb-glx xcb-xf86dri > 1.6"
-    fi
-    if test "x$GLAMOR" = xyes; then
-        XEPHYR_REQUIRED_LIBS="$XEPHYR_REQUIRED_LIBS x11-xcb"
-    fi
+if test "x$XQUARTZ" = xyes; then
 
-    if test "x$XEPHYR" = xauto; then
+printf "%s\n" "#define XQUARTZ 1" >>confdefs.h
 
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XEPHYR" >&5
-$as_echo_n "checking for XEPHYR... " >&6; }
 
-if test -n "$XEPHYR_CFLAGS"; then
-    pkg_cv_XEPHYR_CFLAGS="$XEPHYR_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$XEPHYR_REQUIRED_LIBS\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$XEPHYR_REQUIRED_LIBS") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_XEPHYR_CFLAGS=`$PKG_CONFIG --cflags "$XEPHYR_REQUIRED_LIBS" 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-if test -n "$XEPHYR_LIBS"; then
-    pkg_cv_XEPHYR_LIBS="$XEPHYR_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$XEPHYR_REQUIRED_LIBS\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$XEPHYR_REQUIRED_LIBS") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_XEPHYR_LIBS=`$PKG_CONFIG --libs "$XEPHYR_REQUIRED_LIBS" 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
+printf "%s\n" "#define ROOTLESS 1" >>confdefs.h
 
 
+	XQUARTZ_LIBS="$COMPOSITE_LIB $FB_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB $PRESENT_LIB"
 
-if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
 
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi
-        if test $_pkg_short_errors_supported = yes; then
-	        XEPHYR_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$XEPHYR_REQUIRED_LIBS" 2>&1`
-        else
-	        XEPHYR_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$XEPHYR_REQUIRED_LIBS" 2>&1`
-        fi
-	# Put the nasty error message in config.log where it belongs
-	echo "$XEPHYR_PKG_ERRORS" >&5
+	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for xp_init in -lXplugin" >&5
+printf %s "checking for xp_init in -lXplugin... " >&6; }
+if test ${ac_cv_lib_Xplugin_xp_init+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lXplugin  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-	XEPHYR="no"
-elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-	XEPHYR="no"
-else
-	XEPHYR_CFLAGS=$pkg_cv_XEPHYR_CFLAGS
-	XEPHYR_LIBS=$pkg_cv_XEPHYR_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-	XEPHYR="yes"
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+char xp_init ();
+int
+main (void)
+{
+return xp_init ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+  ac_cv_lib_Xplugin_xp_init=yes
+else $as_nop
+  ac_cv_lib_Xplugin_xp_init=no
 fi
-    elif test "x$XEPHYR" = xyes ; then
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xplugin_xp_init" >&5
+printf "%s\n" "$ac_cv_lib_Xplugin_xp_init" >&6; }
+if test "x$ac_cv_lib_Xplugin_xp_init" = xyes
+then :
+  :
+fi
+
+
+	CFLAGS="${CFLAGS} -DROOTLESS_WORKAROUND -DROOTLESS_SAFEALPHA -DNO_ALLOCA"
+
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XEPHYR" >&5
-$as_echo_n "checking for XEPHYR... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XPBPROXY" >&5
+printf %s "checking for XPBPROXY... " >&6; }
 
-if test -n "$XEPHYR_CFLAGS"; then
-    pkg_cv_XEPHYR_CFLAGS="$XEPHYR_CFLAGS"
+if test -n "$XPBPROXY_CFLAGS"; then
+    pkg_cv_XPBPROXY_CFLAGS="$XPBPROXY_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$XEPHYR_REQUIRED_LIBS\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$XEPHYR_REQUIRED_LIBS") 2>&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$APPLEWMPROTO \$LIBAPPLEWM xfixes x11\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$APPLEWMPROTO $LIBAPPLEWM xfixes x11") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_XEPHYR_CFLAGS=`$PKG_CONFIG --cflags "$XEPHYR_REQUIRED_LIBS" 2>/dev/null`
+  pkg_cv_XPBPROXY_CFLAGS=`$PKG_CONFIG --cflags "$APPLEWMPROTO $LIBAPPLEWM xfixes x11" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -32003,16 +32230,16 @@ fi
  else
     pkg_failed=untried
 fi
-if test -n "$XEPHYR_LIBS"; then
-    pkg_cv_XEPHYR_LIBS="$XEPHYR_LIBS"
+if test -n "$XPBPROXY_LIBS"; then
+    pkg_cv_XPBPROXY_LIBS="$XPBPROXY_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$XEPHYR_REQUIRED_LIBS\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$XEPHYR_REQUIRED_LIBS") 2>&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$APPLEWMPROTO \$LIBAPPLEWM xfixes x11\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$APPLEWMPROTO $LIBAPPLEWM xfixes x11") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_XEPHYR_LIBS=`$PKG_CONFIG --libs "$XEPHYR_REQUIRED_LIBS" 2>/dev/null`
+  pkg_cv_XPBPROXY_LIBS=`$PKG_CONFIG --libs "$APPLEWMPROTO $LIBAPPLEWM xfixes x11" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -32024,8 +32251,8 @@ fi
 
 
 if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -32033,248 +32260,272 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        XEPHYR_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$XEPHYR_REQUIRED_LIBS" 2>&1`
+	        XPBPROXY_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$APPLEWMPROTO $LIBAPPLEWM xfixes x11" 2>&1`
         else
-	        XEPHYR_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$XEPHYR_REQUIRED_LIBS" 2>&1`
+	        XPBPROXY_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$APPLEWMPROTO $LIBAPPLEWM xfixes x11" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
-	echo "$XEPHYR_PKG_ERRORS" >&5
+	echo "$XPBPROXY_PKG_ERRORS" >&5
 
-	as_fn_error $? "Package requirements ($XEPHYR_REQUIRED_LIBS) were not met:
+	as_fn_error $? "Package requirements ($APPLEWMPROTO $LIBAPPLEWM xfixes x11) were not met:
 
-$XEPHYR_PKG_ERRORS
+$XPBPROXY_PKG_ERRORS
 
 Consider adjusting the PKG_CONFIG_PATH environment variable if you
 installed software in a non-standard prefix.
 
-Alternatively, you may set the environment variables XEPHYR_CFLAGS
-and XEPHYR_LIBS to avoid the need to call pkg-config.
+Alternatively, you may set the environment variables XPBPROXY_CFLAGS
+and XPBPROXY_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details." "$LINENO" 5
 elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
 is in your PATH or set the PKG_CONFIG environment variable to the full
 path to pkg-config.
 
-Alternatively, you may set the environment variables XEPHYR_CFLAGS
-and XEPHYR_LIBS to avoid the need to call pkg-config.
+Alternatively, you may set the environment variables XPBPROXY_CFLAGS
+and XPBPROXY_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details.
 
 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
 See \`config.log' for more details" "$LINENO" 5; }
 else
-	XEPHYR_CFLAGS=$pkg_cv_XEPHYR_CFLAGS
-	XEPHYR_LIBS=$pkg_cv_XEPHYR_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+	XPBPROXY_CFLAGS=$pkg_cv_XPBPROXY_CFLAGS
+	XPBPROXY_LIBS=$pkg_cv_XPBPROXY_LIBS
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
 
 fi
-    fi
 
-    # Xephyr needs nanosleep() which is in librt on Solaris
-    ac_fn_c_check_func "$LINENO" "nanosleep" "ac_cv_func_nanosleep"
-if test "x$ac_cv_func_nanosleep" = xyes; then :
+        if test "x$XQUARTZ_SPARKLE" = xyes ; then
 
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nanosleep in -lrt" >&5
-$as_echo_n "checking for nanosleep in -lrt... " >&6; }
-if ${ac_cv_lib_rt_nanosleep+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lrt  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+printf "%s\n" "#define XQUARTZ_SPARKLE 1" >>confdefs.h
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char nanosleep ();
-int
-main ()
-{
-return nanosleep ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_rt_nanosleep=yes
-else
-  ac_cv_lib_rt_nanosleep=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_nanosleep" >&5
-$as_echo "$ac_cv_lib_rt_nanosleep" >&6; }
-if test "x$ac_cv_lib_rt_nanosleep" = xyes; then :
-  XEPHYR_LIBS="$XEPHYR_LIBS -lrt"
-fi
+        fi
+
+	if test "x$STANDALONE_XPBPROXY" = xyes ; then
 
+printf "%s\n" "#define STANDALONE_XPBPROXY 1" >>confdefs.h
+
+	fi
 fi
 
+ if test "x$XQUARTZ" = xyes -o "x$XWIN" = xyes ; then
+  PSEUDORAMIX_TRUE=
+  PSEUDORAMIX_FALSE='#'
+else
+  PSEUDORAMIX_TRUE='#'
+  PSEUDORAMIX_FALSE=
+fi
 
-    # damage shadow extension glx (NOTYET) fb mi
-    KDRIVE_INC='-I$(top_srcdir)/hw/kdrive/src'
-    KDRIVE_PURE_INCS="$KDRIVE_INC $MIEXT_SYNC_INC $MIEXT_DAMAGE_INC $MIEXT_SHADOW_INC $XEXT_INC $FB_INC $MI_INC"
-    KDRIVE_OS_INC='-I$(top_srcdir)/hw/kdrive/linux'
-    KDRIVE_INCS="$KDRIVE_PURE_INCS $KDRIVE_OS_INC"
 
-    KDRIVE_CFLAGS="$XSERVER_CFLAGS"
+# Support for objc in autotools is minimal and not documented.
+OBJC='$(CC)'
+OBJCLD='$(CCLD)'
+OBJCLINK='$(LINK)'
+OBJCFLAGS='$(CFLAGS)'
 
-    KDRIVE_PURE_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $DRI3_LIB $PRESENT_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $OS_LIB"
-    KDRIVE_LIB='$(top_builddir)/hw/kdrive/src/libkdrive.la'
-    KDRIVE_MAIN_LIB="$MAIN_LIB"
-    KDRIVE_LOCAL_LIBS="$DIX_LIB $KDRIVE_LIB"
-    KDRIVE_LOCAL_LIBS="$KDRIVE_LOCAL_LIBS $FB_LIB $MI_LIB $KDRIVE_PURE_LIBS"
-    KDRIVE_LOCAL_LIBS="$KDRIVE_LOCAL_LIBS $KDRIVE_OS_LIB"
-    KDRIVE_LIBS="$KDRIVE_LOCAL_LIBS $XSERVER_SYS_LIBS $GLX_SYS_LIBS $DLOPEN_LIBS"
 
 
 
-fi
+# internal, undocumented automake func follows :(
 
+depcc="$OBJC" am_compiler_list='gcc3 gcc'
 
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+printf %s "checking dependency style of $depcc... " >&6; }
+if test ${am_cv_OBJC_dependencies_compiler_type+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named 'D' -- because '-MD' means "put the output
+  # in D".
+  rm -rf conftest.dir
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
 
+  am_cv_OBJC_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  am__universal=false
 
 
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+      # Solaris 10 /bin/sh.
+      echo '/* dummy */' > sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
+    # We check with '-c' and '-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle '-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs.
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
+    case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
+    nosideeffect)
+      # After this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested.
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+      # This compiler won't grok '-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
+    none) break ;;
+    esac
+    if depmode=$depmode \
+       source=sub/conftest.c object=$am__obj \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_OBJC_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
 
- if test "x$KDRIVE" = xyes && test "x$XEPHYR" = xyes; then
-  XEPHYR_TRUE=
-  XEPHYR_FALSE='#'
+  cd ..
+  rm -rf conftest.dir
 else
-  XEPHYR_TRUE='#'
-  XEPHYR_FALSE=
+  am_cv_OBJC_dependencies_compiler_type=none
 fi
 
-
-
-XWAYLANDMODULES="wayland-client >= 1.3.0 wayland-protocols >= 1.10 $LIBDRM epoxy"
-if test "x$XF86VIDMODE" = xyes; then
-	XWAYLANDMODULES="$XWAYLANDMODULES $VIDMODEPROTO"
 fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_OBJC_dependencies_compiler_type" >&5
+printf "%s\n" "$am_cv_OBJC_dependencies_compiler_type" >&6; }
+OBJCDEPMODE=depmode=$am_cv_OBJC_dependencies_compiler_type
 
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XWAYLANDMODULES" >&5
-$as_echo_n "checking for XWAYLANDMODULES... " >&6; }
-
-if test -n "$XWAYLANDMODULES_CFLAGS"; then
-    pkg_cv_XWAYLANDMODULES_CFLAGS="$XWAYLANDMODULES_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$XWAYLANDMODULES\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$XWAYLANDMODULES") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_XWAYLANDMODULES_CFLAGS=`$PKG_CONFIG --cflags "$XWAYLANDMODULES" 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-if test -n "$XWAYLANDMODULES_LIBS"; then
-    pkg_cv_XWAYLANDMODULES_LIBS="$XWAYLANDMODULES_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$XWAYLANDMODULES\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$XWAYLANDMODULES") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_XWAYLANDMODULES_LIBS=`$PKG_CONFIG --libs "$XWAYLANDMODULES" 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
+ if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_OBJC_dependencies_compiler_type" = gcc3; then
+  am__fastdepOBJC_TRUE=
+  am__fastdepOBJC_FALSE='#'
 else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
+  am__fastdepOBJC_TRUE='#'
+  am__fastdepOBJC_FALSE=
 fi
 
 
-
-if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
+ if test "x$XQUARTZ" = xyes; then
+  XQUARTZ_TRUE=
+  XQUARTZ_FALSE='#'
 else
-        _pkg_short_errors_supported=no
+  XQUARTZ_TRUE='#'
+  XQUARTZ_FALSE=
 fi
-        if test $_pkg_short_errors_supported = yes; then
-	        XWAYLANDMODULES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$XWAYLANDMODULES" 2>&1`
-        else
-	        XWAYLANDMODULES_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$XWAYLANDMODULES" 2>&1`
-        fi
-	# Put the nasty error message in config.log where it belongs
-	echo "$XWAYLANDMODULES_PKG_ERRORS" >&5
 
-	have_xwayland=no
-elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-	have_xwayland=no
+ if test "x$XQUARTZ_SPARKLE" != "xno"; then
+  XQUARTZ_SPARKLE_TRUE=
+  XQUARTZ_SPARKLE_FALSE='#'
 else
-	XWAYLANDMODULES_CFLAGS=$pkg_cv_XWAYLANDMODULES_CFLAGS
-	XWAYLANDMODULES_LIBS=$pkg_cv_XWAYLANDMODULES_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-	have_xwayland=yes
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Xwayland DDX" >&5
-$as_echo_n "checking whether to build Xwayland DDX... " >&6; }
-if test "x$XWAYLAND" = xauto; then
-   XWAYLAND="$have_xwayland"
+  XQUARTZ_SPARKLE_TRUE='#'
+  XQUARTZ_SPARKLE_FALSE=
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $XWAYLAND" >&5
-$as_echo "$XWAYLAND" >&6; }
- if test "x$XWAYLAND" = xyes; then
-  XWAYLAND_TRUE=
-  XWAYLAND_FALSE='#'
+
+ if test "x$STANDALONE_XPBPROXY" = xyes; then
+  STANDALONE_XPBPROXY_TRUE=
+  STANDALONE_XPBPROXY_FALSE='#'
 else
-  XWAYLAND_TRUE='#'
-  XWAYLAND_FALSE=
+  STANDALONE_XPBPROXY_TRUE='#'
+  STANDALONE_XPBPROXY_FALSE=
 fi
 
 
-if test "x$XWAYLAND" = xyes; then
-	if test "x$have_xwayland" = xno; then
-		as_fn_error $? "Xwayland build explicitly requested, but required modules not found." "$LINENO" 5
-	fi
 
-	if test "x$GLAMOR" = xyes && test "x$GBM" = xyes; then
+XEPHYR_LIBS=
+XEPHYR_INCS=
+
+ if test x$KDRIVE = xyes; then
+  KDRIVE_TRUE=
+  KDRIVE_FALSE='#'
+else
+  KDRIVE_TRUE='#'
+  KDRIVE_FALSE=
+fi
 
-$as_echo "#define XWL_HAS_GLAMOR 1" >>confdefs.h
 
-	fi
+if test "$KDRIVE" = yes; then
+    XEPHYR_REQUIRED_LIBS="xau xdmcp xcb xcb-shape xcb-render xcb-renderutil xcb-aux xcb-image xcb-icccm xcb-shm >= 1.9.3 xcb-keysyms xcb-randr xcb-xkb"
+    if test "x$XV" = xyes; then
+        XEPHYR_REQUIRED_LIBS="$XEPHYR_REQUIRED_LIBS xcb-xv"
+    fi
+    if test "x$DRI" = xyes && test "x$GLX" = xyes; then
+        XEPHYR_REQUIRED_LIBS="$XEPHYR_REQUIRED_LIBS $LIBDRM xcb-glx xcb-xf86dri > 1.6"
+    fi
+    if test "x$GLAMOR" = xyes; then
+        XEPHYR_REQUIRED_LIBS="$XEPHYR_REQUIRED_LIBS x11-xcb"
+    fi
 
+    if test "x$XEPHYR" = xauto; then
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAYLAND_EGLSTREAM" >&5
-$as_echo_n "checking for WAYLAND_EGLSTREAM... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XEPHYR" >&5
+printf %s "checking for XEPHYR... " >&6; }
 
-if test -n "$WAYLAND_EGLSTREAM_CFLAGS"; then
-    pkg_cv_WAYLAND_EGLSTREAM_CFLAGS="$WAYLAND_EGLSTREAM_CFLAGS"
+if test -n "$XEPHYR_CFLAGS"; then
+    pkg_cv_XEPHYR_CFLAGS="$XEPHYR_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"wayland-eglstream-protocols >= 1.0.2\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "wayland-eglstream-protocols >= 1.0.2") 2>&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$XEPHYR_REQUIRED_LIBS\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$XEPHYR_REQUIRED_LIBS") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_WAYLAND_EGLSTREAM_CFLAGS=`$PKG_CONFIG --cflags "wayland-eglstream-protocols >= 1.0.2" 2>/dev/null`
+  pkg_cv_XEPHYR_CFLAGS=`$PKG_CONFIG --cflags "$XEPHYR_REQUIRED_LIBS" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -32282,16 +32533,16 @@ fi
  else
     pkg_failed=untried
 fi
-if test -n "$WAYLAND_EGLSTREAM_LIBS"; then
-    pkg_cv_WAYLAND_EGLSTREAM_LIBS="$WAYLAND_EGLSTREAM_LIBS"
+if test -n "$XEPHYR_LIBS"; then
+    pkg_cv_XEPHYR_LIBS="$XEPHYR_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"wayland-eglstream-protocols >= 1.0.2\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "wayland-eglstream-protocols >= 1.0.2") 2>&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$XEPHYR_REQUIRED_LIBS\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$XEPHYR_REQUIRED_LIBS") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_WAYLAND_EGLSTREAM_LIBS=`$PKG_CONFIG --libs "wayland-eglstream-protocols >= 1.0.2" 2>/dev/null`
+  pkg_cv_XEPHYR_LIBS=`$PKG_CONFIG --libs "$XEPHYR_REQUIRED_LIBS" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -32303,8 +32554,8 @@ fi
 
 
 if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -32312,113 +32563,41 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        WAYLAND_EGLSTREAM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "wayland-eglstream-protocols >= 1.0.2" 2>&1`
+	        XEPHYR_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$XEPHYR_REQUIRED_LIBS" 2>&1`
         else
-	        WAYLAND_EGLSTREAM_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "wayland-eglstream-protocols >= 1.0.2" 2>&1`
+	        XEPHYR_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$XEPHYR_REQUIRED_LIBS" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
-	echo "$WAYLAND_EGLSTREAM_PKG_ERRORS" >&5
+	echo "$XEPHYR_PKG_ERRORS" >&5
 
-	have_wl_eglstream=no
+	XEPHYR="no"
 elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-	have_wl_eglstream=no
-else
-	WAYLAND_EGLSTREAM_CFLAGS=$pkg_cv_WAYLAND_EGLSTREAM_CFLAGS
-	WAYLAND_EGLSTREAM_LIBS=$pkg_cv_WAYLAND_EGLSTREAM_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-	have_wl_eglstream=yes
-fi
-
-	if test "x$XWAYLAND_EGLSTREAM" = xauto; then
-		if test "x$have_wl_eglstream" = xyes && test "x$GLAMOR" = xyes; then
-			XWAYLAND_EGLSTREAM=yes
-		fi
-	fi
-
-	if test "x$XWAYLAND_EGLSTREAM" = xyes; then
-		if test "x$GLAMOR" != xyes; then
-			as_fn_error $? "Xwayland eglstream support explicitly requested, but required modules not found." "$LINENO" 5
-		fi
-
-		if test "x$have_wl_eglstream" = xno; then
-			as_fn_error $? "Xwayland eglstream support requires wayland-eglstream-protocols >= 1.0.2" "$LINENO" 5
-		fi
-
-		WAYLAND_EGLSTREAM_DATADIR=`$PKG_CONFIG --variable=pkgdatadir wayland-eglstream-protocols`
-
-
-$as_echo "#define XWL_HAS_EGLSTREAM 1" >>confdefs.h
-
-	fi
-
-	XWAYLAND_LIBS="$FB_LIB $FIXES_LIB $MI_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $DRI3_LIB $PRESENT_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $MAIN_LIB $DIX_LIB $OS_LIB"
-	XWAYLAND_SYS_LIBS="$XWAYLANDMODULES_LIBS $GLX_SYS_LIBS"
-
-
-
-	if test "x$MONOTONIC_CLOCK" != xyes; then
-		as_fn_error $? "Xwayland requires CLOCK_MONOTONIC support." "$LINENO" 5
-	fi
-
-	# Extract the first word of "wayland-scanner", so it can be a program name with args.
-set dummy wayland-scanner; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_WAYLAND_SCANNER+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $WAYLAND_SCANNER in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_WAYLAND_SCANNER="$WAYLAND_SCANNER" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_WAYLAND_SCANNER="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-WAYLAND_SCANNER=$ac_cv_path_WAYLAND_SCANNER
-if test -n "$WAYLAND_SCANNER"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WAYLAND_SCANNER" >&5
-$as_echo "$WAYLAND_SCANNER" >&6; }
+     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+	XEPHYR="no"
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+	XEPHYR_CFLAGS=$pkg_cv_XEPHYR_CFLAGS
+	XEPHYR_LIBS=$pkg_cv_XEPHYR_LIBS
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+	XEPHYR="yes"
 fi
-
-
-	if test "x$WAYLAND_SCANNER" = x; then
+    elif test "x$XEPHYR" = xyes ; then
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAYLAND_SCANNER" >&5
-$as_echo_n "checking for WAYLAND_SCANNER... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XEPHYR" >&5
+printf %s "checking for XEPHYR... " >&6; }
 
-if test -n "$WAYLAND_SCANNER_CFLAGS"; then
-    pkg_cv_WAYLAND_SCANNER_CFLAGS="$WAYLAND_SCANNER_CFLAGS"
+if test -n "$XEPHYR_CFLAGS"; then
+    pkg_cv_XEPHYR_CFLAGS="$XEPHYR_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"wayland-scanner\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "wayland-scanner") 2>&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$XEPHYR_REQUIRED_LIBS\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$XEPHYR_REQUIRED_LIBS") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_WAYLAND_SCANNER_CFLAGS=`$PKG_CONFIG --cflags "wayland-scanner" 2>/dev/null`
+  pkg_cv_XEPHYR_CFLAGS=`$PKG_CONFIG --cflags "$XEPHYR_REQUIRED_LIBS" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -32426,16 +32605,16 @@ fi
  else
     pkg_failed=untried
 fi
-if test -n "$WAYLAND_SCANNER_LIBS"; then
-    pkg_cv_WAYLAND_SCANNER_LIBS="$WAYLAND_SCANNER_LIBS"
+if test -n "$XEPHYR_LIBS"; then
+    pkg_cv_XEPHYR_LIBS="$XEPHYR_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"wayland-scanner\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "wayland-scanner") 2>&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$XEPHYR_REQUIRED_LIBS\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$XEPHYR_REQUIRED_LIBS") 2>&5
   ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_WAYLAND_SCANNER_LIBS=`$PKG_CONFIG --libs "wayland-scanner" 2>/dev/null`
+  pkg_cv_XEPHYR_LIBS=`$PKG_CONFIG --libs "$XEPHYR_REQUIRED_LIBS" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -32447,8 +32626,8 @@ fi
 
 
 if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -32456,133 +32635,128 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        WAYLAND_SCANNER_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "wayland-scanner" 2>&1`
+	        XEPHYR_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$XEPHYR_REQUIRED_LIBS" 2>&1`
         else
-	        WAYLAND_SCANNER_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "wayland-scanner" 2>&1`
+	        XEPHYR_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$XEPHYR_REQUIRED_LIBS" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
-	echo "$WAYLAND_SCANNER_PKG_ERRORS" >&5
+	echo "$XEPHYR_PKG_ERRORS" >&5
 
-	as_fn_error $? "Package requirements (wayland-scanner) were not met:
+	as_fn_error $? "Package requirements ($XEPHYR_REQUIRED_LIBS) were not met:
 
-$WAYLAND_SCANNER_PKG_ERRORS
+$XEPHYR_PKG_ERRORS
 
 Consider adjusting the PKG_CONFIG_PATH environment variable if you
 installed software in a non-standard prefix.
 
-Alternatively, you may set the environment variables WAYLAND_SCANNER_CFLAGS
-and WAYLAND_SCANNER_LIBS to avoid the need to call pkg-config.
+Alternatively, you may set the environment variables XEPHYR_CFLAGS
+and XEPHYR_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details." "$LINENO" 5
 elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
 is in your PATH or set the PKG_CONFIG environment variable to the full
 path to pkg-config.
 
-Alternatively, you may set the environment variables WAYLAND_SCANNER_CFLAGS
-and WAYLAND_SCANNER_LIBS to avoid the need to call pkg-config.
+Alternatively, you may set the environment variables XEPHYR_CFLAGS
+and XEPHYR_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details.
 
 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
 See \`config.log' for more details" "$LINENO" 5; }
 else
-	WAYLAND_SCANNER_CFLAGS=$pkg_cv_WAYLAND_SCANNER_CFLAGS
-	WAYLAND_SCANNER_LIBS=$pkg_cv_WAYLAND_SCANNER_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+	XEPHYR_CFLAGS=$pkg_cv_XEPHYR_CFLAGS
+	XEPHYR_LIBS=$pkg_cv_XEPHYR_LIBS
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
 
 fi
-		WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`
-
-	fi
-
+    fi
 
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAYLAND_SCANNER" >&5
-$as_echo_n "checking for WAYLAND_SCANNER... " >&6; }
+    # Xephyr needs nanosleep() which is in librt on Solaris
+    ac_fn_c_check_func "$LINENO" "nanosleep" "ac_cv_func_nanosleep"
+if test "x$ac_cv_func_nanosleep" = xyes
+then :
+
+else $as_nop
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nanosleep in -lrt" >&5
+printf %s "checking for nanosleep in -lrt... " >&6; }
+if test ${ac_cv_lib_rt_nanosleep+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lrt  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-if test -n "$WAYLAND_SCANNER_CFLAGS"; then
-    pkg_cv_WAYLAND_SCANNER_CFLAGS="$WAYLAND_SCANNER_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"wayland-scanner >= 1.14.91\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "wayland-scanner >= 1.14.91") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_WAYLAND_SCANNER_CFLAGS=`$PKG_CONFIG --cflags "wayland-scanner >= 1.14.91" 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+char nanosleep ();
+int
+main (void)
+{
+return nanosleep ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+  ac_cv_lib_rt_nanosleep=yes
+else $as_nop
+  ac_cv_lib_rt_nanosleep=no
 fi
- else
-    pkg_failed=untried
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 fi
-if test -n "$WAYLAND_SCANNER_LIBS"; then
-    pkg_cv_WAYLAND_SCANNER_LIBS="$WAYLAND_SCANNER_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"wayland-scanner >= 1.14.91\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "wayland-scanner >= 1.14.91") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_WAYLAND_SCANNER_LIBS=`$PKG_CONFIG --libs "wayland-scanner >= 1.14.91" 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_nanosleep" >&5
+printf "%s\n" "$ac_cv_lib_rt_nanosleep" >&6; }
+if test "x$ac_cv_lib_rt_nanosleep" = xyes
+then :
+  XEPHYR_LIBS="$XEPHYR_LIBS -lrt"
 fi
- else
-    pkg_failed=untried
+
 fi
 
 
+    # damage shadow extension glx (NOTYET) fb mi
+    KDRIVE_INC='-I$(top_srcdir)/hw/kdrive/src'
+    KDRIVE_PURE_INCS="$KDRIVE_INC $MIEXT_SYNC_INC $MIEXT_DAMAGE_INC $MIEXT_SHADOW_INC $XEXT_INC $FB_INC $MI_INC"
+    KDRIVE_OS_INC='-I$(top_srcdir)/hw/kdrive/linux'
+    KDRIVE_INCS="$KDRIVE_PURE_INCS $KDRIVE_OS_INC"
+
+    KDRIVE_CFLAGS="$XSERVER_CFLAGS"
+
+    KDRIVE_PURE_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $DRI3_LIB $PRESENT_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $OS_LIB"
+    KDRIVE_LIB='$(top_builddir)/hw/kdrive/src/libkdrive.la'
+    KDRIVE_MAIN_LIB="$MAIN_LIB"
+    KDRIVE_LOCAL_LIBS="$DIX_LIB $KDRIVE_LIB"
+    KDRIVE_LOCAL_LIBS="$KDRIVE_LOCAL_LIBS $FB_LIB $MI_LIB $KDRIVE_PURE_LIBS"
+    KDRIVE_LOCAL_LIBS="$KDRIVE_LOCAL_LIBS $KDRIVE_OS_LIB"
+    KDRIVE_LIBS="$KDRIVE_LOCAL_LIBS $XSERVER_SYS_LIBS $GLX_SYS_LIBS $DLOPEN_LIBS"
+
 
-if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
 
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
 fi
-        if test $_pkg_short_errors_supported = yes; then
-	        WAYLAND_SCANNER_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "wayland-scanner >= 1.14.91" 2>&1`
-        else
-	        WAYLAND_SCANNER_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "wayland-scanner >= 1.14.91" 2>&1`
-        fi
-	# Put the nasty error message in config.log where it belongs
-	echo "$WAYLAND_SCANNER_PKG_ERRORS" >&5
 
-	SCANNER_ARG='code'
 
-elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-	SCANNER_ARG='code'
 
-else
-	WAYLAND_SCANNER_CFLAGS=$pkg_cv_WAYLAND_SCANNER_CFLAGS
-	WAYLAND_SCANNER_LIBS=$pkg_cv_WAYLAND_SCANNER_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-	SCANNER_ARG='private-code'
 
-fi
 
-	WAYLAND_PROTOCOLS_DATADIR=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`
 
-fi
- if test "x$XWAYLAND_EGLSTREAM" = "xyes"; then
-  XWAYLAND_EGLSTREAM_TRUE=
-  XWAYLAND_EGLSTREAM_FALSE='#'
+
+ if test "x$KDRIVE" = xyes && test "x$XEPHYR" = xyes; then
+  XEPHYR_TRUE=
+  XEPHYR_FALSE='#'
 else
-  XWAYLAND_EGLSTREAM_TRUE='#'
-  XWAYLAND_EGLSTREAM_FALSE=
+  XEPHYR_TRUE='#'
+  XEPHYR_FALSE=
 fi
 
 
@@ -32597,19 +32771,20 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #endif
 
 int
-main ()
+main (void)
 {
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
 
-$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
+printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h
 
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 
 
   prefix_NONE=
@@ -32621,9 +32796,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   PROJECTROOT="$ac_define_dir"
 
 
-cat >>confdefs.h <<_ACEOF
-#define PROJECTROOT "$ac_define_dir"
-_ACEOF
+printf "%s\n" "#define PROJECTROOT \"$ac_define_dir\"" >>confdefs.h
 
   test "$prefix_NONE" && prefix=NONE
   test "$exec_prefix_NONE" && exec_prefix=NONE
@@ -32638,25 +32811,13 @@ _ACEOF
   SYSCONFDIR="$ac_define_dir"
 
 
-cat >>confdefs.h <<_ACEOF
-#define SYSCONFDIR "$ac_define_dir"
-_ACEOF
+printf "%s\n" "#define SYSCONFDIR \"$ac_define_dir\"" >>confdefs.h
 
   test "$prefix_NONE" && prefix=NONE
   test "$exec_prefix_NONE" && exec_prefix=NONE
 
 
 
-DATE_FMT="%Y%m%d"
-TIME_FMT="1%H%M%S"
-BUILD_DATE="`date "+$DATE_FMT"`"
-BUILD_TIME="`date "+$TIME_FMT"`"
-if test "x$SOURCE_DATE_EPOCH" != "x"; then
-	BUILD_DATE="`date -u -d "@$SOURCE_DATE_EPOCH" "+$DATE_FMT" 2>/dev/null || date -u -r "$SOURCE_DATE_EPOCH" "+$DATE_FMT" 2>/dev/null || date -u "+$DATE_FMT"`"
-	BUILD_TIME="`date -u -d "@$SOURCE_DATE_EPOCH" "+$TIME_FMT" 2>/dev/null || date -u -r "$SOURCE_DATE_EPOCH" "+$TIME_FMT" 2>/dev/null || date -u "+$TIME_FMT"`"
-fi
-
-
 
 DIX_CFLAGS="-DHAVE_DIX_CONFIG_H $XSERVER_CFLAGS"
 
@@ -32670,19 +32831,19 @@ ac_config_commands="$ac_config_commands sdksyms"
 
 
 if test "x$CONFIG_HAL" = xno && test "x$CONFIG_UDEV" = xno; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING:
              ***********************************************
              Neither HAL nor udev backend will be enabled.
              Input device hotplugging will not be available!
              ***********************************************" >&5
-$as_echo "$as_me: WARNING:
+printf "%s\n" "$as_me: WARNING:
              ***********************************************
              Neither HAL nor udev backend will be enabled.
              Input device hotplugging will not be available!
              ***********************************************" >&2;}
 fi
 
-ac_config_files="$ac_config_files Makefile glx/Makefile include/Makefile composite/Makefile damageext/Makefile dbe/Makefile dix/Makefile doc/Makefile doc/dtrace/Makefile man/Makefile fb/Makefile glamor/Makefile record/Makefile config/Makefile mi/Makefile miext/Makefile miext/sync/Makefile miext/damage/Makefile miext/shadow/Makefile miext/rootless/Makefile os/Makefile pseudoramiX/Makefile randr/Makefile render/Makefile xkb/Makefile Xext/Makefile Xi/Makefile xfixes/Makefile exa/Makefile dri3/Makefile present/Makefile hw/Makefile hw/xfree86/Makefile hw/xfree86/Xorg.sh hw/xfree86/common/Makefile hw/xfree86/common/xf86Build.h hw/xfree86/ddc/Makefile hw/xfree86/dixmods/Makefile hw/xfree86/doc/Makefile hw/xfree86/dri/Makefile hw/xfree86/dri2/Makefile hw/xfree86/dri2/pci_ids/Makefile hw/xfree86/drivers/Makefile hw/xfree86/drivers/modesetting/Makefile hw/xfree86/exa/Makefile hw/xfree86/exa/man/Makefile hw/xfree86/fbdevhw/Makefile hw/xfree86/fbdevhw/man/Makefile hw/xfree86/glamor_egl/Makefile hw/xfree86/i2c/Makefile hw/xfree86/int10/Makefile hw/xfree86/loader/Makefile hw/xfree86/man/Makefile hw/xfree86/modes/Makefile hw/xfree86/os-support/Makefile hw/xfree86/os-support/bsd/Makefile hw/xfree86/os-support/bus/Makefile hw/xfree86/os-support/hurd/Makefile hw/xfree86/os-support/misc/Makefile hw/xfree86/os-support/linux/Makefile hw/xfree86/os-support/solaris/Makefile hw/xfree86/os-support/stub/Makefile hw/xfree86/parser/Makefile hw/xfree86/ramdac/Makefile hw/xfree86/shadowfb/Makefile hw/xfree86/vbe/Makefile hw/xfree86/vgahw/Makefile hw/xfree86/x86emu/Makefile hw/xfree86/xkb/Makefile hw/xfree86/utils/Makefile hw/xfree86/utils/man/Makefile hw/xfree86/utils/cvt/Makefile hw/xfree86/utils/gtf/Makefile hw/dmx/config/Makefile hw/dmx/config/man/Makefile hw/dmx/doc/Makefile hw/dmx/doxygen/doxygen.conf hw/dmx/doxygen/Makefile hw/dmx/examples/Makefile hw/dmx/input/Makefile hw/dmx/glxProxy/Makefile hw/dmx/Makefile hw/dmx/man/Makefile hw/vfb/Makefile hw/vfb/man/Makefile hw/xnest/Makefile hw/xnest/man/Makefile hw/xwin/Makefile hw/xwin/dri/Makefile hw/xwin/glx/Makefile hw/xwin/man/Makefile hw/xwin/winclipboard/Makefile hw/xquartz/Makefile hw/xquartz/GL/Makefile hw/xquartz/bundle/Makefile hw/xquartz/man/Makefile hw/xquartz/mach-startup/Makefile hw/xquartz/pbproxy/Makefile hw/xquartz/xpr/Makefile hw/kdrive/Makefile hw/kdrive/ephyr/Makefile hw/kdrive/ephyr/man/Makefile hw/kdrive/src/Makefile hw/xwayland/Makefile test/Makefile xserver.ent xorg-server.pc"
+ac_config_files="$ac_config_files Makefile glx/Makefile include/Makefile composite/Makefile damageext/Makefile dbe/Makefile dix/Makefile doc/Makefile doc/dtrace/Makefile man/Makefile fb/Makefile glamor/Makefile record/Makefile config/Makefile mi/Makefile miext/Makefile miext/sync/Makefile miext/damage/Makefile miext/shadow/Makefile miext/rootless/Makefile os/Makefile pseudoramiX/Makefile randr/Makefile render/Makefile xkb/Makefile Xext/Makefile Xi/Makefile xfixes/Makefile exa/Makefile dri3/Makefile present/Makefile hw/Makefile hw/xfree86/Makefile hw/xfree86/Xorg.sh hw/xfree86/common/Makefile hw/xfree86/ddc/Makefile hw/xfree86/dixmods/Makefile hw/xfree86/doc/Makefile hw/xfree86/dri/Makefile hw/xfree86/dri2/Makefile hw/xfree86/dri2/pci_ids/Makefile hw/xfree86/drivers/Makefile hw/xfree86/drivers/inputtest/Makefile hw/xfree86/drivers/modesetting/Makefile hw/xfree86/exa/Makefile hw/xfree86/exa/man/Makefile hw/xfree86/fbdevhw/Makefile hw/xfree86/fbdevhw/man/Makefile hw/xfree86/glamor_egl/Makefile hw/xfree86/i2c/Makefile hw/xfree86/int10/Makefile hw/xfree86/loader/Makefile hw/xfree86/man/Makefile hw/xfree86/modes/Makefile hw/xfree86/os-support/Makefile hw/xfree86/os-support/bsd/Makefile hw/xfree86/os-support/bus/Makefile hw/xfree86/os-support/hurd/Makefile hw/xfree86/os-support/misc/Makefile hw/xfree86/os-support/linux/Makefile hw/xfree86/os-support/solaris/Makefile hw/xfree86/os-support/stub/Makefile hw/xfree86/parser/Makefile hw/xfree86/ramdac/Makefile hw/xfree86/shadowfb/Makefile hw/xfree86/vgahw/Makefile hw/xfree86/x86emu/Makefile hw/xfree86/xkb/Makefile hw/xfree86/utils/Makefile hw/xfree86/utils/man/Makefile hw/xfree86/utils/gtf/Makefile hw/vfb/Makefile hw/vfb/man/Makefile hw/xnest/Makefile hw/xnest/man/Makefile hw/xwin/Makefile hw/xwin/dri/Makefile hw/xwin/glx/Makefile hw/xwin/man/Makefile hw/xwin/winclipboard/Makefile hw/xquartz/Makefile hw/xquartz/GL/Makefile hw/xquartz/bundle/Makefile hw/xquartz/man/Makefile hw/xquartz/mach-startup/Makefile hw/xquartz/pbproxy/Makefile hw/xquartz/xpr/Makefile hw/kdrive/Makefile hw/kdrive/ephyr/Makefile hw/kdrive/ephyr/man/Makefile hw/kdrive/src/Makefile test/Makefile xserver.ent xorg-server.pc"
 
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -32711,8 +32872,8 @@ _ACEOF
     case $ac_val in #(
     *${as_nl}*)
       case $ac_var in #(
-      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+      *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
       esac
       case $ac_var in #(
       _ | IFS | as_nl) ;; #(
@@ -32742,15 +32903,15 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
      /^ac_cv_env_/b end
      t clear
      :clear
-     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
      t end
      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
      :end' >>confcache
 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
   if test -w "$cache_file"; then
     if test "x$cache_file" != "x/dev/null"; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
-$as_echo "$as_me: updating cache $cache_file" >&6;}
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
       if test ! -f "$cache_file" || test -h "$cache_file"; then
 	cat confcache >"$cache_file"
       else
@@ -32764,8 +32925,8 @@ $as_echo "$as_me: updating cache $cache_file" >&6;}
       fi
     fi
   else
-    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
-$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
   fi
 fi
 rm -f confcache
@@ -32782,7 +32943,7 @@ U=
 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
   # 1. Remove the extension, and $U if already installed.
   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
-  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+  ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
   #    will be set to the directory where LIBOBJS objects are built.
   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
@@ -32793,14 +32954,14 @@ LIBOBJS=$ac_libobjs
 LTLIBOBJS=$ac_ltlibobjs
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
-$as_echo_n "checking that generated files are newer than configure... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
+printf %s "checking that generated files are newer than configure... " >&6; }
    if test -n "$am_sleep_pid"; then
      # Hide warnings about reused PIDs.
      wait $am_sleep_pid 2>/dev/null
    fi
-   { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
-$as_echo "done" >&6; }
+   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5
+printf "%s\n" "done" >&6; }
  if test -n "$EXEEXT"; then
   am__EXEEXT_TRUE=
   am__EXEEXT_FALSE='#'
@@ -32890,14 +33051,6 @@ if test -z "${FREEBSD_KLDLOAD_TRUE}" && test -z "${FREEBSD_KLDLOAD_FALSE}"; then
   as_fn_error $? "conditional \"FREEBSD_KLDLOAD\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
-if test -z "${BSD_APM_TRUE}" && test -z "${BSD_APM_FALSE}"; then
-  as_fn_error $? "conditional \"BSD_APM\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BSD_KQUEUE_APM_TRUE}" && test -z "${BSD_KQUEUE_APM_FALSE}"; then
-  as_fn_error $? "conditional \"BSD_KQUEUE_APM\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
 if test -z "${ALPHA_VIDEO_TRUE}" && test -z "${ALPHA_VIDEO_FALSE}"; then
   as_fn_error $? "conditional \"ALPHA_VIDEO\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -33074,10 +33227,6 @@ if test -z "${VGAHW_TRUE}" && test -z "${VGAHW_FALSE}"; then
   as_fn_error $? "conditional \"VGAHW\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
-if test -z "${VBE_TRUE}" && test -z "${VBE_FALSE}"; then
-  as_fn_error $? "conditional \"VBE\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
 if test -z "${INT10MODULE_TRUE}" && test -z "${INT10MODULE_FALSE}"; then
   as_fn_error $? "conditional \"INT10MODULE\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -33158,6 +33307,10 @@ if test -z "${XORG_DRIVER_MODESETTING_TRUE}" && test -z "${XORG_DRIVER_MODESETTI
   as_fn_error $? "conditional \"XORG_DRIVER_MODESETTING\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${XORG_DRIVER_INPUT_INPUTTEST_TRUE}" && test -z "${XORG_DRIVER_INPUT_INPUTTEST_FALSE}"; then
+  as_fn_error $? "conditional \"XORG_DRIVER_INPUT_INPUTTEST\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${GLAMOR_TRUE}" && test -z "${GLAMOR_FALSE}"; then
   as_fn_error $? "conditional \"GLAMOR\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -33170,10 +33323,6 @@ if test -z "${XWIN_TRUE}" && test -z "${XWIN_FALSE}"; then
   as_fn_error $? "conditional \"XWIN\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
-if test -z "${XWIN_MULTIWINDOWEXTWM_TRUE}" && test -z "${XWIN_MULTIWINDOWEXTWM_FALSE}"; then
-  as_fn_error $? "conditional \"XWIN_MULTIWINDOWEXTWM\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
 if test -z "${XWIN_GLX_WINDOWS_TRUE}" && test -z "${XWIN_GLX_WINDOWS_FALSE}"; then
   as_fn_error $? "conditional \"XWIN_GLX_WINDOWS\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -33202,14 +33351,6 @@ if test -z "${STANDALONE_XPBPROXY_TRUE}" && test -z "${STANDALONE_XPBPROXY_FALSE
   as_fn_error $? "conditional \"STANDALONE_XPBPROXY\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
-if test -z "${DMX_TRUE}" && test -z "${DMX_FALSE}"; then
-  as_fn_error $? "conditional \"DMX\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${DMX_BUILD_USB_TRUE}" && test -z "${DMX_BUILD_USB_FALSE}"; then
-  as_fn_error $? "conditional \"DMX_BUILD_USB\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
 if test -z "${KDRIVE_TRUE}" && test -z "${KDRIVE_FALSE}"; then
   as_fn_error $? "conditional \"KDRIVE\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -33218,21 +33359,13 @@ if test -z "${XEPHYR_TRUE}" && test -z "${XEPHYR_FALSE}"; then
   as_fn_error $? "conditional \"XEPHYR\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
-if test -z "${XWAYLAND_TRUE}" && test -z "${XWAYLAND_FALSE}"; then
-  as_fn_error $? "conditional \"XWAYLAND\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${XWAYLAND_EGLSTREAM_TRUE}" && test -z "${XWAYLAND_EGLSTREAM_FALSE}"; then
-  as_fn_error $? "conditional \"XWAYLAND_EGLSTREAM\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
 
 : "${CONFIG_STATUS=./config.status}"
 ac_write_fail=0
 ac_clean_files_save=$ac_clean_files
 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
-$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
 as_write_fail=0
 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
 #! $SHELL
@@ -33255,14 +33388,16 @@ cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
 
 # Be more Bourne compatible
 DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+as_nop=:
+if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
+then :
   emulate sh
   NULLCMD=:
   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
   # is contrary to our usage.  Disable this feature.
   alias -g '${1+"$@"}'='"$@"'
   setopt NO_GLOB_SUBST
-else
+else $as_nop
   case `(set -o) 2>/dev/null` in #(
   *posix*) :
     set -o posix ;; #(
@@ -33272,46 +33407,46 @@ esac
 fi
 
 
+
+# Reset variables that may have inherited troublesome values from
+# the environment.
+
+# IFS needs to be set, to space, tab, and newline, in precisely that order.
+# (If _AS_PATH_WALK were called with IFS unset, it would have the
+# side effect of setting IFS to empty, thus disabling word splitting.)
+# Quoting is to prevent editors from complaining about space-tab.
 as_nl='
 '
 export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
-    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
-  as_echo='print -r --'
-  as_echo_n='print -rn --'
-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
-  as_echo='printf %s\n'
-  as_echo_n='printf %s'
-else
-  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
-    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
-    as_echo_n='/usr/ucb/echo -n'
-  else
-    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
-    as_echo_n_body='eval
-      arg=$1;
-      case $arg in #(
-      *"$as_nl"*)
-	expr "X$arg" : "X\\(.*\\)$as_nl";
-	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
-      esac;
-      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
-    '
-    export as_echo_n_body
-    as_echo_n='sh -c $as_echo_n_body as_echo'
-  fi
-  export as_echo_body
-  as_echo='sh -c $as_echo_body as_echo'
-fi
+IFS=" ""	$as_nl"
+
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# Ensure predictable behavior from utilities with locale-dependent output.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# We cannot yet rely on "unset" to work, but we need these variables
+# to be unset--not just set to an empty or harmless value--now, to
+# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh).  This construct
+# also avoids known problems related to "unset" and subshell syntax
+# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
+for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
+do eval test \${$as_var+y} \
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+
+# Ensure that fds 0, 1, and 2 are open.
+if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
+if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
+if (exec 3>&2)            ; then :; else exec 2>/dev/null; fi
 
 # The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
+if ${PATH_SEPARATOR+false} :; then
   PATH_SEPARATOR=:
   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
@@ -33320,13 +33455,6 @@ if test "${PATH_SEPARATOR+set}" != set; then
 fi
 
 
-# IFS
-# We need space, tab and new line, in precisely that order.  Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" ""	$as_nl"
-
 # Find who we are.  Look in the path if we contain no directory separator.
 as_myself=
 case $0 in #((
@@ -33335,8 +33463,12 @@ case $0 in #((
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    test -r "$as_dir$0" && as_myself=$as_dir$0 && break
   done
 IFS=$as_save_IFS
 
@@ -33348,30 +33480,10 @@ if test "x$as_myself" = x; then
   as_myself=$0
 fi
 if test ! -f "$as_myself"; then
-  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
   exit 1
 fi
 
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there.  '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
-  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
 
 # as_fn_error STATUS ERROR [LINENO LOG_FD]
@@ -33384,13 +33496,14 @@ as_fn_error ()
   as_status=$1; test $as_status -eq 0 && as_status=1
   if test "$4"; then
     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
   fi
-  $as_echo "$as_me: error: $2" >&2
+  printf "%s\n" "$as_me: error: $2" >&2
   as_fn_exit $as_status
 } # as_fn_error
 
 
+
 # as_fn_set_status STATUS
 # -----------------------
 # Set $? to STATUS, without forking.
@@ -33417,18 +33530,20 @@ as_fn_unset ()
   { eval $1=; unset $1;}
 }
 as_unset=as_fn_unset
+
 # as_fn_append VAR VALUE
 # ----------------------
 # Append the text in VALUE to the end of the definition contained in VAR. Take
 # advantage of any shell optimizations that allow amortized linear growth over
 # repeated appends, instead of the typical quadratic growth present in naive
 # implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
+then :
   eval 'as_fn_append ()
   {
     eval $1+=\$2
   }'
-else
+else $as_nop
   as_fn_append ()
   {
     eval $1=\$$1\$2
@@ -33440,12 +33555,13 @@ fi # as_fn_append
 # Perform arithmetic evaluation on the ARGs, and store the result in the
 # global $as_val. Take advantage of shells that can avoid forks. The arguments
 # must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
+then :
   eval 'as_fn_arith ()
   {
     as_val=$(( $* ))
   }'
-else
+else $as_nop
   as_fn_arith ()
   {
     as_val=`expr "$@" || test $? -eq 1`
@@ -33476,7 +33592,7 @@ as_me=`$as_basename -- "$0" ||
 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
 	 X"$0" : 'X\(//\)$' \| \
 	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
+printf "%s\n" X/"$0" |
     sed '/^.*\/\([^/][^/]*\)\/*$/{
 	    s//\1/
 	    q
@@ -33498,6 +33614,10 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS
 as_cr_digits='0123456789'
 as_cr_alnum=$as_cr_Letters$as_cr_digits
 
+
+# Determine whether it's possible to make 'echo' print without a newline.
+# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
+# for compatibility with existing Makefiles.
 ECHO_C= ECHO_N= ECHO_T=
 case `echo -n x` in #(((((
 -n*)
@@ -33511,6 +33631,12 @@ case `echo -n x` in #(((((
   ECHO_N='-n';;
 esac
 
+# For backward compatibility with old third-party macros, we provide
+# the shell variables $as_echo and $as_echo_n.  New code should use
+# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
+as_echo='printf %s\n'
+as_echo_n='printf %s'
+
 rm -f conf$$ conf$$.exe conf$$.file
 if test -d conf$$.dir; then
   rm -f conf$$.dir/conf$$.file
@@ -33552,7 +33678,7 @@ as_fn_mkdir_p ()
     as_dirs=
     while :; do
       case $as_dir in #(
-      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
       *) as_qdir=$as_dir;;
       esac
       as_dirs="'$as_qdir' $as_dirs"
@@ -33561,7 +33687,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 	 X"$as_dir" : 'X\(//\)[^/]' \| \
 	 X"$as_dir" : 'X\(//\)$' \| \
 	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
+printf "%s\n" X"$as_dir" |
     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
 	    s//\1/
 	    q
@@ -33623,8 +33749,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by xorg-server $as_me 1.20.11, which was
-generated by GNU Autoconf 2.69.  Invocation command line was
+This file was extended by xorg-server $as_me 21.1.7, which was
+generated by GNU Autoconf 2.71.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -33686,14 +33812,16 @@ $config_commands
 Report bugs to <https://gitlab.freedesktop.org/xorg/xserver/issues>."
 
 _ACEOF
+ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
+ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_config='$ac_cs_config_escaped'
 ac_cs_version="\\
-xorg-server config.status 1.20.11
-configured by $0, generated by GNU Autoconf 2.69,
+xorg-server config.status 21.1.7
+configured by $0, generated by GNU Autoconf 2.71,
   with options \\"\$ac_cs_config\\"
 
-Copyright (C) 2012 Free Software Foundation, Inc.
+Copyright (C) 2021 Free Software Foundation, Inc.
 This config.status script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it."
 
@@ -33733,15 +33861,15 @@ do
   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
     ac_cs_recheck=: ;;
   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
-    $as_echo "$ac_cs_version"; exit ;;
+    printf "%s\n" "$ac_cs_version"; exit ;;
   --config | --confi | --conf | --con | --co | --c )
-    $as_echo "$ac_cs_config"; exit ;;
+    printf "%s\n" "$ac_cs_config"; exit ;;
   --debug | --debu | --deb | --de | --d | -d )
     debug=: ;;
   --file | --fil | --fi | --f )
     $ac_shift
     case $ac_optarg in
-    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
     '') as_fn_error $? "missing file argument" ;;
     esac
     as_fn_append CONFIG_FILES " '$ac_optarg'"
@@ -33749,7 +33877,7 @@ do
   --header | --heade | --head | --hea )
     $ac_shift
     case $ac_optarg in
-    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
     esac
     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
     ac_need_defaults=false;;
@@ -33758,7 +33886,7 @@ do
     as_fn_error $? "ambiguous option: \`$1'
 Try \`$0 --help' for more information.";;
   --help | --hel | -h )
-    $as_echo "$ac_cs_usage"; exit ;;
+    printf "%s\n" "$ac_cs_usage"; exit ;;
   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
   | -silent | --silent | --silen | --sile | --sil | --si | --s)
     ac_cs_silent=: ;;
@@ -33786,7 +33914,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 if \$ac_cs_recheck; then
   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
   shift
-  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+  \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
   CONFIG_SHELL='$SHELL'
   export CONFIG_SHELL
   exec "\$@"
@@ -33800,7 +33928,7 @@ exec 5>>config.log
   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
 ## Running $as_me. ##
 _ASBOX
-  $as_echo "$ac_log"
+  printf "%s\n" "$ac_log"
 } >&5
 
 _ACEOF
@@ -33855,12 +33983,14 @@ lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_q
 lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
 reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
 reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
+FILECMD='`$ECHO "$FILECMD" | $SED "$delay_single_quote_subst"`'
 deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
 file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
 file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
 want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
 sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
 AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
+lt_ar_flags='`$ECHO "$lt_ar_flags" | $SED "$delay_single_quote_subst"`'
 AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
 archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
 STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
@@ -33984,13 +34114,13 @@ LN_S \
 lt_SP2NL \
 lt_NL2SP \
 reload_flag \
+FILECMD \
 deplibs_check_method \
 file_magic_cmd \
 file_magic_glob \
 want_nocaseglob \
 sharedlib_from_linklib_cmd \
 AR \
-AR_FLAGS \
 archiver_list_spec \
 STRIP \
 RANLIB \
@@ -34110,7 +34240,6 @@ do
     "include/xorg-config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/xorg-config.h" ;;
     "include/xkb-config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/xkb-config.h" ;;
     "include/xwin-config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/xwin-config.h" ;;
-    "include/xwayland-config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/xwayland-config.h" ;;
     "include/version-config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/version-config.h" ;;
     "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
     "sdksyms") CONFIG_COMMANDS="$CONFIG_COMMANDS sdksyms" ;;
@@ -34149,7 +34278,6 @@ do
     "hw/xfree86/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/Makefile" ;;
     "hw/xfree86/Xorg.sh") CONFIG_FILES="$CONFIG_FILES hw/xfree86/Xorg.sh" ;;
     "hw/xfree86/common/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/common/Makefile" ;;
-    "hw/xfree86/common/xf86Build.h") CONFIG_FILES="$CONFIG_FILES hw/xfree86/common/xf86Build.h" ;;
     "hw/xfree86/ddc/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/ddc/Makefile" ;;
     "hw/xfree86/dixmods/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/dixmods/Makefile" ;;
     "hw/xfree86/doc/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/doc/Makefile" ;;
@@ -34157,6 +34285,7 @@ do
     "hw/xfree86/dri2/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/dri2/Makefile" ;;
     "hw/xfree86/dri2/pci_ids/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/dri2/pci_ids/Makefile" ;;
     "hw/xfree86/drivers/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/drivers/Makefile" ;;
+    "hw/xfree86/drivers/inputtest/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/drivers/inputtest/Makefile" ;;
     "hw/xfree86/drivers/modesetting/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/drivers/modesetting/Makefile" ;;
     "hw/xfree86/exa/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/exa/Makefile" ;;
     "hw/xfree86/exa/man/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/exa/man/Makefile" ;;
@@ -34179,24 +34308,12 @@ do
     "hw/xfree86/parser/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/parser/Makefile" ;;
     "hw/xfree86/ramdac/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/ramdac/Makefile" ;;
     "hw/xfree86/shadowfb/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/shadowfb/Makefile" ;;
-    "hw/xfree86/vbe/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/vbe/Makefile" ;;
     "hw/xfree86/vgahw/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/vgahw/Makefile" ;;
     "hw/xfree86/x86emu/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/x86emu/Makefile" ;;
     "hw/xfree86/xkb/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/xkb/Makefile" ;;
     "hw/xfree86/utils/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/utils/Makefile" ;;
     "hw/xfree86/utils/man/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/utils/man/Makefile" ;;
-    "hw/xfree86/utils/cvt/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/utils/cvt/Makefile" ;;
     "hw/xfree86/utils/gtf/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/utils/gtf/Makefile" ;;
-    "hw/dmx/config/Makefile") CONFIG_FILES="$CONFIG_FILES hw/dmx/config/Makefile" ;;
-    "hw/dmx/config/man/Makefile") CONFIG_FILES="$CONFIG_FILES hw/dmx/config/man/Makefile" ;;
-    "hw/dmx/doc/Makefile") CONFIG_FILES="$CONFIG_FILES hw/dmx/doc/Makefile" ;;
-    "hw/dmx/doxygen/doxygen.conf") CONFIG_FILES="$CONFIG_FILES hw/dmx/doxygen/doxygen.conf" ;;
-    "hw/dmx/doxygen/Makefile") CONFIG_FILES="$CONFIG_FILES hw/dmx/doxygen/Makefile" ;;
-    "hw/dmx/examples/Makefile") CONFIG_FILES="$CONFIG_FILES hw/dmx/examples/Makefile" ;;
-    "hw/dmx/input/Makefile") CONFIG_FILES="$CONFIG_FILES hw/dmx/input/Makefile" ;;
-    "hw/dmx/glxProxy/Makefile") CONFIG_FILES="$CONFIG_FILES hw/dmx/glxProxy/Makefile" ;;
-    "hw/dmx/Makefile") CONFIG_FILES="$CONFIG_FILES hw/dmx/Makefile" ;;
-    "hw/dmx/man/Makefile") CONFIG_FILES="$CONFIG_FILES hw/dmx/man/Makefile" ;;
     "hw/vfb/Makefile") CONFIG_FILES="$CONFIG_FILES hw/vfb/Makefile" ;;
     "hw/vfb/man/Makefile") CONFIG_FILES="$CONFIG_FILES hw/vfb/man/Makefile" ;;
     "hw/xnest/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xnest/Makefile" ;;
@@ -34217,7 +34334,6 @@ do
     "hw/kdrive/ephyr/Makefile") CONFIG_FILES="$CONFIG_FILES hw/kdrive/ephyr/Makefile" ;;
     "hw/kdrive/ephyr/man/Makefile") CONFIG_FILES="$CONFIG_FILES hw/kdrive/ephyr/man/Makefile" ;;
     "hw/kdrive/src/Makefile") CONFIG_FILES="$CONFIG_FILES hw/kdrive/src/Makefile" ;;
-    "hw/xwayland/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xwayland/Makefile" ;;
     "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;;
     "xserver.ent") CONFIG_FILES="$CONFIG_FILES xserver.ent" ;;
     "xorg-server.pc") CONFIG_FILES="$CONFIG_FILES xorg-server.pc" ;;
@@ -34232,9 +34348,9 @@ done
 # We use the long form for the default assignment because of an extremely
 # bizarre bug on SunOS 4.1.3.
 if $ac_need_defaults; then
-  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
-  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
-  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+  test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
+  test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
+  test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands
 fi
 
 # Have a temporary directory for convenience.  Make it in the build tree
@@ -34570,7 +34686,7 @@ do
 	   esac ||
 	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
       esac
-      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+      case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
       as_fn_append ac_file_inputs " '$ac_f'"
     done
 
@@ -34578,17 +34694,17 @@ do
     # use $as_me), people would be surprised to read:
     #    /* config.h.  Generated by config.status.  */
     configure_input='Generated from '`
-	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+	  printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
 	`' by configure.'
     if test x"$ac_file" != x-; then
       configure_input="$ac_file.  $configure_input"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
-$as_echo "$as_me: creating $ac_file" >&6;}
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+printf "%s\n" "$as_me: creating $ac_file" >&6;}
     fi
     # Neutralize special characters interpreted by sed in replacement strings.
     case $configure_input in #(
     *\&* | *\|* | *\\* )
-       ac_sed_conf_input=`$as_echo "$configure_input" |
+       ac_sed_conf_input=`printf "%s\n" "$configure_input" |
        sed 's/[\\\\&|]/\\\\&/g'`;; #(
     *) ac_sed_conf_input=$configure_input;;
     esac
@@ -34605,7 +34721,7 @@ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 	 X"$ac_file" : 'X\(//\)[^/]' \| \
 	 X"$ac_file" : 'X\(//\)$' \| \
 	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$ac_file" |
+printf "%s\n" X"$ac_file" |
     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
 	    s//\1/
 	    q
@@ -34629,9 +34745,9 @@ $as_echo X"$ac_file" |
 case "$ac_dir" in
 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
 *)
-  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+  ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
   # A ".." for each directory in $ac_dir_suffix.
-  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+  ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
   case $ac_top_builddir_sub in
   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
@@ -34693,8 +34809,8 @@ ac_sed_dataroot='
 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
 *datarootdir*) ac_datarootdir_seen=yes;;
 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
-$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
   ac_datarootdir_hack='
@@ -34738,9 +34854,9 @@ test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
   { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
       "$ac_tmp/out"`; test -z "$ac_out"; } &&
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
 which seems to be undefined.  Please make sure it is defined" >&5
-$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
 which seems to be undefined.  Please make sure it is defined" >&2;}
 
   rm -f "$ac_tmp/stdin"
@@ -34756,20 +34872,20 @@ which seems to be undefined.  Please make sure it is defined" >&2;}
   #
   if test x"$ac_file" != x-; then
     {
-      $as_echo "/* $configure_input  */" \
+      printf "%s\n" "/* $configure_input  */" >&1 \
       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
     } >"$ac_tmp/config.h" \
       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
-$as_echo "$as_me: $ac_file is unchanged" >&6;}
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
+printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
     else
       rm -f "$ac_file"
       mv "$ac_tmp/config.h" "$ac_file" \
 	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
     fi
   else
-    $as_echo "/* $configure_input  */" \
+    printf "%s\n" "/* $configure_input  */" >&1 \
       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
       || as_fn_error $? "could not create -" "$LINENO" 5
   fi
@@ -34789,7 +34905,7 @@ $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 	 X"$_am_arg" : 'X\(//\)[^/]' \| \
 	 X"$_am_arg" : 'X\(//\)$' \| \
 	 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$_am_arg" |
+printf "%s\n" X"$_am_arg" |
     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
 	    s//\1/
 	    q
@@ -34809,8 +34925,8 @@ $as_echo X"$_am_arg" |
 	  s/.*/./; q'`/stamp-h$_am_stamp_count
  ;;
 
-  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
-$as_echo "$as_me: executing $ac_file commands" >&6;}
+  :C)  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+printf "%s\n" "$as_me: executing $ac_file commands" >&6;}
  ;;
   esac
 
@@ -34836,7 +34952,7 @@ esac
   for am_mf
   do
     # Strip MF so we end up with the name of the file.
-    am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'`
+    am_mf=`printf "%s\n" "$am_mf" | sed -e 's/:.*$//'`
     # Check whether this is an Automake generated Makefile which includes
     # dependency-tracking related rules and includes.
     # Grep'ing the whole file directly is not great: AIX grep has a line
@@ -34848,7 +34964,7 @@ $as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 	 X"$am_mf" : 'X\(//\)[^/]' \| \
 	 X"$am_mf" : 'X\(//\)$' \| \
 	 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$am_mf" |
+printf "%s\n" X"$am_mf" |
     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
 	    s//\1/
 	    q
@@ -34870,7 +34986,7 @@ $as_echo X"$am_mf" |
 $as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \
 	 X"$am_mf" : 'X\(//\)$' \| \
 	 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$am_mf" |
+printf "%s\n" X/"$am_mf" |
     sed '/^.*\/\([^/][^/]*\)\/*$/{
 	    s//\1/
 	    q
@@ -34895,8 +35011,8 @@ $as_echo X/"$am_mf" |
    (exit $ac_status); } || am_rc=$?
   done
   if test $am_rc -ne 0; then
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "Something went wrong bootstrapping makefile fragments
     for automatic dependency tracking.  If GNU make was not used, consider
     re-running the configure script with MAKE=\"gmake\" (or whatever is
@@ -35056,6 +35172,9 @@ to_host_file_cmd=$lt_cv_to_host_file_cmd
 # convert \$build files to toolchain format.
 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
 
+# A file(cmd) program that detects file types.
+FILECMD=$lt_FILECMD
+
 # Method to check whether dependent libraries are shared objects.
 deplibs_check_method=$lt_deplibs_check_method
 
@@ -35074,8 +35193,11 @@ sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
 # The archiver.
 AR=$lt_AR
 
+# Flags to create an archive (by configure).
+lt_ar_flags=$lt_ar_flags
+
 # Flags to create an archive.
-AR_FLAGS=$lt_AR_FLAGS
+AR_FLAGS=\${ARFLAGS-"\$lt_ar_flags"}
 
 # How to feed a file listing to the archiver.
 archiver_list_spec=$lt_archiver_list_spec
@@ -35443,6 +35565,7 @@ _LT_EOF
   esac
 
 
+
 ltmain=$ac_aux_dir/ltmain.sh
 
 
@@ -35450,7 +35573,7 @@ ltmain=$ac_aux_dir/ltmain.sh
   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
   # text mode, it properly converts lines to CR/LF.  This bash problem
   # is reportedly fixed, but why not run on old versions too?
-  sed '$q' "$ltmain" >> "$cfgfile" \
+  $SED '$q' "$ltmain" >> "$cfgfile" \
      || (rm -f "$cfgfile"; exit 1)
 
    mv -f "$cfgfile" "$ofile" ||
@@ -35493,7 +35616,8 @@ if test "$no_create" != yes; then
   $ac_cs_success || as_fn_exit 1
 fi
 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
-$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
 fi
 
+
diff --git a/configure.ac b/configure.ac
index 7ba6d05..0c899ea 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,12 +26,12 @@ dnl
 dnl Process this file with autoconf to create configure.
 
 AC_PREREQ(2.60)
-AC_INIT([xorg-server], 1.20.11, [https://gitlab.freedesktop.org/xorg/xserver/issues], xorg-server)
-RELEASE_DATE="2021-04-13"
-RELEASE_NAME="Arroz con Pollo"
+AC_INIT([xorg-server], 21.1.7, [https://gitlab.freedesktop.org/xorg/xserver/issues], xorg-server)
+RELEASE_DATE="2023-02-07"
+RELEASE_NAME="Caramel Ice Cream"
 AC_CONFIG_SRCDIR([Makefile.am])
 AC_CONFIG_MACRO_DIR([m4])
-AM_INIT_AUTOMAKE([foreign dist-bzip2])
+AM_INIT_AUTOMAKE([foreign dist-xz])
 AC_USE_SYSTEM_EXTENSIONS
 
 # Require xorg-macros minimum of 1.14 for XORG_COMPILER_BRAND in XORG_DEFAULT_OPTIONS
@@ -67,8 +67,6 @@ dnl xkb-config.h covers XKB for the Xorg and Xnest DDXs.
 AC_CONFIG_HEADERS(include/xkb-config.h)
 dnl xwin-config.h covers the XWin DDX.
 AC_CONFIG_HEADERS(include/xwin-config.h)
-dnl xwayland-config.h covers Xwayland.
-AC_CONFIG_HEADERS(include/xwayland-config.h)
 dnl version-config.h covers the version numbers so they can be bumped without
 dnl forcing an entire recompile.x
 AC_CONFIG_HEADERS(include/version-config.h)
@@ -159,7 +157,8 @@ dnl Checks for library functions.
 AC_CHECK_FUNCS([backtrace geteuid getuid issetugid getresuid \
 	getdtablesize getifaddrs getpeereid getpeerucred getprogname getzoneid \
 	mmap posix_fallocate seteuid shmctl64 strncasecmp vasprintf vsnprintf \
-	walkcontext setitimer poll epoll_create1 mkostemp memfd_create isastream])
+	walkcontext setitimer poll epoll_create1 mkostemp memfd_create \
+	sigprocmask isastream])
 AC_CONFIG_LIBOBJ_DIR([os])
 AC_REPLACE_FUNCS([reallocarray strcasecmp strcasestr strlcat strlcpy strndup\
 	timingsafe_memcmp])
@@ -188,12 +187,17 @@ if test "x$ac_cv_func_getpeereid" = xno && test "x$ac_cv_func_getpeerucred" = xn
 	AC_DEFINE([NO_LOCAL_CLIENT_CRED], 1, [Define to 1 if no local socket credentials interface exists])
 fi
 
-dnl Find the math libary, then check for cbrt function in it.
+dnl Find the math library, then check for cbrt function in it.
 AC_CHECK_LIB(m, sqrt)
 AC_CHECK_FUNCS([cbrt])
 
 dnl AGPGART headers
-AC_CHECK_HEADERS([linux/agpgart.h sys/agpio.h sys/agpgart.h], AGP=yes)
+AC_ARG_ENABLE(agp, AS_HELP_STRING([--enable-agp],
+				  [Enable AGP support (default: auto)]),
+			          [AGP=$enableval], [AGP=auto])
+if test "x$AGP" = "xauto" ; then
+    AC_CHECK_HEADERS([linux/agpgart.h sys/agpio.h sys/agpgart.h], AGP=yes)
+fi
 AM_CONDITIONAL(AGP, [test "x$AGP" = xyes])
 
 dnl fbdev header
@@ -231,15 +235,6 @@ dnl OpenBSD /dev/xf86 aperture driver
 if test -c /dev/xf86 ; then
 	AC_DEFINE(HAS_APERTURE_DRV, 1, [System has /dev/xf86 aperture driver])
 fi
-
-dnl BSD APM support 
-AC_CHECK_HEADER([machine/apmvar.h],[
-	AC_CHECK_HEADER([sys/event.h],
-		ac_cv_BSD_KQUEUE_APM=yes,
-		ac_cv_BSD_APM=yes)])
-
-AM_CONDITIONAL(BSD_APM, [test "x$ac_cv_BSD_APM" = xyes])
-AM_CONDITIONAL(BSD_KQUEUE_APM, [test "x$ac_cv_BSD_KQUEUE_APM" = xyes])
 	
 dnl glibc backtrace support check
 AC_CHECK_HEADER([execinfo.h],[
@@ -366,12 +361,10 @@ esac
 dnl augment XORG_RELEASE_VERSION for our snapshot number and to expose the
 dnl major number
 PVMAJOR=`echo $PACKAGE_VERSION | cut -d . -f 1`
-PVS=`echo $PACKAGE_VERSION | cut -d . -f 4 | cut -d - -f 1`
-if test "x$PVS" = "x"; then
-	PVS="0"
-fi
 
-VENDOR_RELEASE="((($PVMAJOR) * 10000000) + (($PVM) * 100000) + (($PVP) * 1000) + $PVS)"
+dnl Convert to the old-style 1.x.y version scheme used up to 1.20.x for
+dnl backwards compatibility
+VENDOR_RELEASE="((10000000) + (($PVMAJOR) * 100000) + (($PVM) * 1000) + $PVP)"
 VENDOR_MAN_VERSION="Version ${PACKAGE_VERSION}"
 
 VENDOR_NAME="The X.Org Foundation"
@@ -410,12 +403,6 @@ AC_ARG_WITH(builder-addr,    AS_HELP_STRING([--with-builder-addr=ADDRESS],
 				  [Builder address (default: xorg@lists.freedesktop.org)]),
 				[ BUILDERADDR="$withval" ],
 				[ BUILDERADDR="xorg@lists.freedesktop.org" ])
-AC_ARG_WITH(os-name,         AS_HELP_STRING([--with-os-name=OSNAME], [Name of OS (default: output of "uname -srm")]),
-				[ OSNAME="$withval" ],
-				[ OSNAME=`uname -srm` ])
-AC_ARG_WITH(os-vendor,       AS_HELP_STRING([--with-os-vendor=OSVENDOR], [Name of OS vendor]),
-				[ OSVENDOR="$withval" ],
-				[ OSVENDOR="" ])
 AC_ARG_WITH(builderstring,   AS_HELP_STRING([--with-builderstring=BUILDERSTRING], [Additional builder string]),
 				[ BUILDERSTRING="$withval" ]
 				[ ])
@@ -571,9 +558,7 @@ AC_ARG_ENABLE(config-hal,     AS_HELP_STRING([--disable-config-hal], [Build HAL
 AC_ARG_ENABLE(config-wscons,  AS_HELP_STRING([--enable-config-wscons], [Build wscons config support (default: auto)]), [CONFIG_WSCONS=$enableval], [CONFIG_WSCONS=auto])
 AC_ARG_ENABLE(xfree86-utils,     AS_HELP_STRING([--enable-xfree86-utils], [Build xfree86 DDX utilities (default: enabled)]), [XF86UTILS=$enableval], [XF86UTILS=yes])
 AC_ARG_ENABLE(vgahw,          AS_HELP_STRING([--enable-vgahw], [Build Xorg with vga access (default: enabled)]), [VGAHW=$enableval], [VGAHW=yes])
-AC_ARG_ENABLE(vbe,            AS_HELP_STRING([--enable-vbe], [Build Xorg with VBE module (default: enabled)]), [VBE=$enableval], [VBE=yes])
 AC_ARG_ENABLE(int10-module,     AS_HELP_STRING([--enable-int10-module], [Build Xorg with int10 module (default: enabled)]), [INT10MODULE=$enableval], [INT10MODULE=yes])
-AC_ARG_ENABLE(windowswm,      AS_HELP_STRING([--enable-windowswm], [Build XWin with WindowsWM extension (default: no)]), [WINDOWSWM=$enableval], [WINDOWSWM=no])
 AC_ARG_ENABLE(windowsdri,     AS_HELP_STRING([--enable-windowsdri], [Build XWin with WindowsDRI extension (default: auto)]), [WINDOWSDRI=$enableval], [WINDOWSDRI=auto])
 AC_ARG_ENABLE(libdrm,         AS_HELP_STRING([--enable-libdrm], [Build Xorg with libdrm support (default: enabled)]), [DRM=$enableval],[DRM=yes])
 AC_ARG_ENABLE(clientids,      AS_HELP_STRING([--disable-clientids], [Build Xorg with client ID tracking (default: enabled)]), [CLIENTIDS=$enableval], [CLIENTIDS=yes])
@@ -585,15 +570,13 @@ AC_ARG_ENABLE(suid-wrapper, AS_HELP_STRING([--enable-suid-wrapper], [Build suid-
 
 dnl DDXes.
 AC_ARG_ENABLE(xorg,    	      AS_HELP_STRING([--enable-xorg], [Build Xorg server (default: auto)]), [XORG=$enableval], [XORG=auto])
-AC_ARG_ENABLE(dmx,    	      AS_HELP_STRING([--enable-dmx], [Build DMX server (default: no)]), [DMX=$enableval], [DMX=no])
 AC_ARG_ENABLE(xvfb,    	      AS_HELP_STRING([--enable-xvfb], [Build Xvfb server (default: yes)]), [XVFB=$enableval], [XVFB=yes])
 AC_ARG_ENABLE(xnest,   	      AS_HELP_STRING([--enable-xnest], [Build Xnest server (default: auto)]), [XNEST=$enableval], [XNEST=auto])
 AC_ARG_ENABLE(xquartz,        AS_HELP_STRING([--enable-xquartz], [Build Xquartz server for OS-X (default: auto)]), [XQUARTZ=$enableval], [XQUARTZ=auto])
-AC_ARG_ENABLE(xwayland,       AS_HELP_STRING([--enable-xwayland], [Build Xwayland server (default: auto)]), [XWAYLAND=$enableval], [XWAYLAND=auto])
-AC_ARG_ENABLE(xwayland-eglstream, AS_HELP_STRING([--enable-xwayland-eglstream], [Build Xwayland eglstream support (default: no)]), [XWAYLAND_EGLSTREAM=$enableval], [XWAYLAND_EGLSTREAM=no])
 AC_ARG_ENABLE(standalone-xpbproxy, AS_HELP_STRING([--enable-standalone-xpbproxy], [Build a standalone xpbproxy (in addition to the one integrated into Xquartz as a separate thread) (default: no)]), [STANDALONE_XPBPROXY=$enableval], [STANDALONE_XPBPROXY=no])
 AC_ARG_ENABLE(xwin,    	      AS_HELP_STRING([--enable-xwin], [Build XWin server (default: auto)]), [XWIN=$enableval], [XWIN=auto])
 AC_ARG_ENABLE(glamor,         AS_HELP_STRING([--enable-glamor], [Build glamor dix module (default: auto)]), [GLAMOR=$enableval], [GLAMOR=auto])
+AC_ARG_ENABLE(xf86-input-inputtest, AS_HELP_STRING([--enable-xf86-input-inputtest], [Build Xorg test input driver (default: yes)]), [XORG_DRIVER_INPUT_INPUTTEST=$enableval], [XORG_DRIVER_INPUT_INPUTTEST=yes])
 dnl kdrive and its subsystems
 AC_ARG_ENABLE(kdrive,         AS_HELP_STRING([--enable-kdrive], [Build kdrive servers (default: no)]), [KDRIVE=$enableval], [KDRIVE=no])
 AC_ARG_ENABLE(xephyr,         AS_HELP_STRING([--enable-xephyr], [Build the kdrive Xephyr server (default: auto)]), [XEPHYR=$enableval], [XEPHYR=auto])
@@ -663,7 +646,6 @@ case $host_os in
 		INT10MODULE=no
 		PCI=no
 		VGAHW=no
-		VBE=no
 		XF86UTILS=no
 		XF86VIDMODE=no
 		XSELINUX=no
@@ -673,7 +655,6 @@ case $host_os in
 		PCI=no
 		INT10MODULE=no
 		VGAHW=no
-		VBE=no
 		DRM=no
 		DRI2=no
 		DRI3=no
@@ -698,9 +679,7 @@ case $host_os in
 			XQUARTZ=yes
 			XVFB=no
 			XNEST=no
-			XWAYLAND=no
 
-			COMPOSITE=no
 			DGA=no
 			DPMSExtension=no
 			XF86VIDMODE=no
@@ -733,9 +712,7 @@ XINERAMAPROTO="xineramaproto"
 BIGFONTPROTO="xf86bigfontproto >= 1.2.0"
 DGAPROTO="xf86dgaproto >= 2.0.99.1"
 GLPROTO="glproto >= 1.4.17"
-DMXPROTO="dmxproto >= 2.2.99.1"
 VIDMODEPROTO="xf86vidmodeproto >= 2.2.99.1"
-WINDOWSWMPROTO="windowswmproto"
 APPLEWMPROTO="applewmproto >= 1.4"
 LIBXSHMFENCE="xshmfence >= 1.1"
 
@@ -744,19 +721,18 @@ XPROTO="xproto >= 7.0.31"
 RANDRPROTO="randrproto >= 1.6.0"
 RENDERPROTO="renderproto >= 0.11"
 XEXTPROTO="xextproto >= 7.2.99.901"
-INPUTPROTO="inputproto >= 2.3"
+INPUTPROTO="inputproto >= 2.3.99.1"
 KBPROTO="kbproto >= 1.0.3"
 FONTSPROTO="fontsproto >= 2.1.3"
-FIXESPROTO="fixesproto >= 5.0"
+FIXESPROTO="fixesproto >= 6.0"
 DAMAGEPROTO="damageproto >= 1.1"
 XCMISCPROTO="xcmiscproto >= 1.2.0"
 BIGREQSPROTO="bigreqsproto >= 1.1.0"
 XTRANS="xtrans >= 1.3.5"
-PRESENTPROTO="presentproto >= 1.1"
+PRESENTPROTO="presentproto >= 1.2"
 
 dnl List of libraries that require a specific version
 LIBAPPLEWM="applewm >= 1.4"
-LIBDMX="dmx >= 1.0.99.1"
 LIBDRI="dri >= 7.8.0"
 LIBDRM="libdrm >= 2.4.89"
 LIBEGL="egl"
@@ -771,6 +747,7 @@ LIBUDEV="libudev >= 143"
 LIBSELINUX="libselinux >= 2.0.86"
 LIBDBUS="dbus-1 >= 1.0"
 LIBPIXMAN="pixman-1 >= 0.27.2"
+LIBXCVT="libxcvt"
 
 dnl Pixman is always required, but we separate it out so we can link
 dnl specific modules against it
@@ -778,7 +755,7 @@ PKG_CHECK_MODULES(PIXMAN, $LIBPIXMAN)
 REQUIRED_LIBS="$REQUIRED_LIBS $LIBPIXMAN $LIBXFONT xau"
 
 dnl Core modules for most extensions, et al.
-SDK_REQUIRED_MODULES="$XPROTO $RANDRPROTO $RENDERPROTO $XEXTPROTO $INPUTPROTO $KBPROTO $FONTSPROTO $LIBPIXMAN"
+SDK_REQUIRED_MODULES="$XPROTO $RANDRPROTO $RENDERPROTO $XEXTPROTO $INPUTPROTO $KBPROTO $FONTSPROTO $LIBPIXMAN $LIBXCVT"
 # Make SDK_REQUIRED_MODULES available for inclusion in xorg-server.pc
 AC_SUBST(SDK_REQUIRED_MODULES)
 
@@ -790,6 +767,11 @@ if test "x$HAVE_RECURSIVE_MUTEX" = "xyes" ; then
 	THREAD_DEFAULT=yes
 fi
 
+case $host_os in
+	mingw*) THREAD_DEFAULT=no  ;;
+	*)
+esac
+
 AC_ARG_ENABLE(input-thread, AS_HELP_STRING([--enable-input-thread],
 	     [Enable input threads]),
 	     [INPUTTHREAD=$enableval], [INPUTTHREAD=$THREAD_DEFAULT])
@@ -855,7 +837,6 @@ fi
 PKG_CHECK_MODULES(UDEV, $LIBUDEV, [HAVE_LIBUDEV=yes], [HAVE_LIBUDEV=no])
 if test "x$CONFIG_UDEV" = xauto; then
 	CONFIG_UDEV="$HAVE_LIBUDEV"
-	AC_DEFINE(HAVE_LIBUDEV, 1, [Define to 1 if libudev is available.])
 fi
 AM_CONDITIONAL(CONFIG_UDEV, [test "x$CONFIG_UDEV" = xyes])
 if test "x$CONFIG_UDEV" = xyes; then
@@ -1347,7 +1328,6 @@ XI_INC='-I$(top_srcdir)/Xi'
 
 AM_CONDITIONAL(XF86UTILS, test "x$XF86UTILS" = xyes)
 AM_CONDITIONAL(VGAHW, test "x$VGAHW" = xyes)
-AM_CONDITIONAL(VBE, test "x$VBE" = xyes)
 AM_CONDITIONAL(INT10MODULE, test "x$INT10MODULE" = xyes)
 
 AC_DEFINE(SHAPE, 1, [Support SHAPE extension])
@@ -1363,7 +1343,10 @@ AC_ARG_WITH(xkb-bin-directory,
 				[XKB_BIN_DIRECTORY="auto"])
 
 if test "x$XKB_BIN_DIRECTORY" = "xauto"; then
-    XKB_BIN_DIRECTORY=$(pkg-config --variable bindir xkbcomp || echo ${bindir})
+    XKB_BIN_DIRECTORY=$(pkg-config --variable bindir xkbcomp)
+    if test -z $XKB_BIN_DIRECTORY; then
+        XKB_BIN_DIRECTORY="$bindir"
+    fi
 fi
 
 AC_DEFINE_DIR(XKB_BIN_DIRECTORY, XKB_BIN_DIRECTORY, [Path to XKB bin dir])
@@ -1458,12 +1441,6 @@ AC_DEFINE_UNQUOTED(XVENDORNAMESHORT, ["$VENDOR_NAME_SHORT"], [Short vendor name]
 AC_DEFINE_UNQUOTED(XORG_MAN_VERSION, ["$VENDOR_MAN_VERSION"], [Vendor man version])
 AC_DEFINE_UNQUOTED(BUILDERADDR, ["$BUILDERADDR"], [Builder address])
 
-if test -z "$OSNAME"; then
-    OSNAME="UNKNOWN"
-fi
-
-AC_DEFINE_UNQUOTED(OSNAME, ["$OSNAME"], [Operating System Name])
-AC_DEFINE_UNQUOTED(OSVENDOR, ["$OSVENDOR"], [Operating System Vendor])
 AC_DEFINE_UNQUOTED(BUILDERSTRING, ["$BUILDERSTRING"], [Builder string])
 
 AC_SUBST([VENDOR_NAME_SHORT])
@@ -1771,11 +1748,14 @@ fi
 AC_MSG_RESULT([$XORG])
 
 if test "x$XORG" = xyes; then
+	PKG_CHECK_MODULES([LIBXCVT], $LIBXCVT)
+
 	XORG_DDXINCS='-I$(top_srcdir)/hw/xfree86 -I$(top_srcdir)/hw/xfree86/include -I$(top_srcdir)/hw/xfree86/common'
 	XORG_OSINCS='-I$(top_srcdir)/hw/xfree86/os-support -I$(top_srcdir)/hw/xfree86/os-support/bus -I$(top_srcdir)/os'
 	XORG_INCS="$XORG_DDXINCS $XORG_OSINCS"
-	XORG_CFLAGS="$XORGSERVER_CFLAGS -DHAVE_XORG_CONFIG_H"
+	XORG_CFLAGS="$XORGSERVER_CFLAGS $LIBXCVT_CFLAGS -DHAVE_XORG_CONFIG_H"
 	XORG_LIBS="$COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $DRI3_LIB $PRESENT_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $XI_LIB $XKB_LIB"
+	XORG_SYS_LIBS="$XORG_SYS_LIBS $LIBXCVT_LIBS"
 
 	dnl ==================================================================
 	dnl symbol visibility
@@ -1874,9 +1854,6 @@ if test "x$XORG" = xyes; then
 		esac
 		dnl APM header
 		AC_CHECK_HEADERS([linux/apm_bios.h], [linux_apm=$enable_linux_apm])
-		if test "x$linux_apm" = xyes -o "x$linux_acpi" = xyes; then
-			AC_DEFINE(XF86PM, 1, [Support APM/ACPI power management in the server])
-		fi
 		;;
 	  freebsd* | kfreebsd*-gnu | dragonfly*)
 		XORG_OS_SUBDIR="bsd"
@@ -1885,15 +1862,10 @@ if test "x$XORG" = xyes; then
 		XORG_OS_SUBDIR="bsd"
 		;;
 	  openbsd*)
-		if test "x$ac_cv_BSD_APM" = xyes \
-			-o "x$ac_cv_BSD_KQUEUE_APM" = xyes; then
-			XORG_CFLAGS="$XORG_CFLAGS -DXF86PM"
-		fi
 		XORG_OS_SUBDIR="bsd"
 		;;
 	  solaris*)
 		XORG_OS_SUBDIR="solaris"
-		XORG_CFLAGS="$XORG_CFLAGS -DXF86PM"
 		AC_CHECK_HEADERS([sys/kd.h])
 		AC_CHECK_HEADERS([sys/vt.h], [solaris_vt=yes], [solaris_vt=no])
 		# Check for minimum supported release
@@ -1963,7 +1935,7 @@ if test "x$XORG" = xyes; then
 	        XORG_SYS_LIBS="$XORG_SYS_LIBS $XORG_MODULES_LIBS"
 	fi
 
-	if test "x$DRM" = xyes; then
+	if test "x$DRM" = xyes -a "x$DRI2" = xyes; then
 		XORG_DRIVER_MODESETTING=yes
 	fi
 
@@ -1977,7 +1949,6 @@ if test "x$XORG" = xyes; then
 	XF86CONFIGFILE="xorg.conf"
 	XF86CONFIGDIR="xorg.conf.d"
 	AC_SUBST(XF86CONFIGDIR)
-	CONFIGFILE="$sysconfdir/$XF86CONFIGFILE"
 	LOGPREFIX="Xorg."
 	XDG_DATA_HOME=".local/share"
 	XDG_DATA_HOME_LOGDIR="xorg"
@@ -2036,10 +2007,11 @@ AM_CONDITIONAL([SOLARIS_VT], [test "x$solaris_vt" = xyes])
 AM_CONDITIONAL([DGA], [test "x$DGA" = xyes])
 AM_CONDITIONAL([XORG_BUS_PLATFORM], [test "x$CONFIG_UDEV_KMS" = xyes])
 AM_CONDITIONAL([XORG_DRIVER_MODESETTING], [test "x$XORG_DRIVER_MODESETTING" = xyes])
+AM_CONDITIONAL([XORG_DRIVER_INPUT_INPUTTEST], [test "x$XORG_DRIVER_INPUT_INPUTTEST" = xyes])
 
 dnl glamor
 if test "x$GLAMOR" = xauto; then
-	if echo "$XORG" "$XEPHYR" "$XWAYLAND" | grep -q yes ; then
+	if echo "$XORG" "$XEPHYR" | grep -q yes ; then
 		GLAMOR=yes
 	fi
 fi
@@ -2096,16 +2068,7 @@ if test "x$XWIN" = xyes; then
 	AC_DEFINE_UNQUOTED(__VENDORDWEBSUPPORT__, ["$VENDOR_WEB"], [Vendor web address for support])
 	AC_CHECK_TOOL(WINDRES, windres)
 
-	PKG_CHECK_MODULES([XWINMODULES],[x11 xdmcp xau xfixes x11-xcb xcb-aux xcb-image xcb-ewmh xcb-icccm])
-
-	if test "x$WINDOWSWM" = xauto; then
-		PKG_CHECK_EXISTS($WINDOWSWMPROTO, [WINDOWSWM=yes], [WINDOWSWM=no])
-	fi
-	if test "x$WINDOWSWM" = xyes ; then
-		PKG_CHECK_MODULES(WINDOWSWM, $WINDOWSWMPROTO)
-		XWINMODULES_CFLAGS="$XWINMODULES_CFLAGS $WINDOWSWM_CFLAGS"
-		AC_DEFINE(ROOTLESS,1,[Build Rootless code])
-	fi
+	PKG_CHECK_MODULES([XWINMODULES],[xcb-aux xcb-composite xcb-image xcb-ewmh xcb-icccm xcb-xfixes])
 
 	if test "x$WINDOWSDRI" = xauto; then
 		PKG_CHECK_EXISTS([windowsdriproto], [WINDOWSDRI=yes], [WINDOWSDRI=no])
@@ -2163,7 +2126,6 @@ dnl XWin requires OpenGL spec files in order to generate wrapper code for native
 
 fi
 AM_CONDITIONAL(XWIN, [test "x$XWIN" = xyes])
-AM_CONDITIONAL(XWIN_MULTIWINDOWEXTWM, [test "x$XWIN" = xyes && test "x$WINDOWSWM" = xyes])
 AM_CONDITIONAL(XWIN_GLX_WINDOWS, [test "x$XWIN" = xyes && test "x$GLX" = xyes])
 AM_CONDITIONAL(XWIN_WINDOWS_DRI, [test "x$XWIN" = xyes && test "x$WINDOWSDRI" = xyes])
 
@@ -2172,7 +2134,7 @@ if test "x$XQUARTZ" = xyes; then
 	AC_DEFINE(XQUARTZ,1,[Have Quartz])
 	AC_DEFINE(ROOTLESS,1,[Build Rootless code])
 
-	XQUARTZ_LIBS="$FB_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB $PRESENT_LIB"
+	XQUARTZ_LIBS="$COMPOSITE_LIB $FB_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB $PRESENT_LIB"
 	AC_SUBST([XQUARTZ_LIBS])
 
 	AC_CHECK_LIB([Xplugin],[xp_init],[:])
@@ -2207,62 +2169,6 @@ AM_CONDITIONAL(XQUARTZ, [test "x$XQUARTZ" = xyes])
 AM_CONDITIONAL(XQUARTZ_SPARKLE, [test "x$XQUARTZ_SPARKLE" != "xno"])
 AM_CONDITIONAL(STANDALONE_XPBPROXY, [test "x$STANDALONE_XPBPROXY" = xyes])
 
-dnl DMX DDX
-PKG_CHECK_MODULES(
-	[DMXMODULES],
-	[xmuu $LIBXEXT x11 >= 1.6 xrender xfixes $LIBXI $DMXPROTO xau $XDMCP_MODULES],
-	[PKG_CHECK_MODULES(
-		[XDMXCONFIG_DEP],
-		[xaw7 xmu xt xpm x11],
-		[have_dmx=yes],
-		[have_dmx=no])],
-	[have_dmx=no])
-AC_MSG_CHECKING([whether to build Xdmx DDX])
-if test "x$DMX" = xauto; then
-	DMX="$have_dmx"
-	case $host_os in
-		cygwin*) DMX="no" ;;
-		mingw*)  DMX="no" ;;
-		darwin*) DMX="no" ;;
-	esac
-fi
-AC_MSG_RESULT([$DMX])
-AM_CONDITIONAL(DMX, [test "x$DMX" = xyes])
-
-if test "x$DMX" = xyes; then
-	if test "x$have_dmx" = xno; then
-		AC_MSG_ERROR([Xdmx build explicitly requested, but required
-		              modules not found.])
-	fi
-	DMX_INCLUDES="$XEXT_INC $RENDER_INC $RECORD_INC"
-	XDMX_CFLAGS="$DMXMODULES_CFLAGS"
-	XDMX_LIBS="$FB_LIB $MI_LIB $XEXT_LIB $RENDER_LIB $RECORD_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $DRI3_LIB $PRESENT_LIB $MIEXT_SYNC_LIB $MIEXT_SHADOW_LIB $MIEXT_DAMAGE_LIB $COMPOSITE_LIB $DAMAGE_LIB $MAIN_LIB $DIX_LIB $RANDR_LIB $CONFIG_LIB $OS_LIB $FIXES_LIB"
-	XDMX_SYS_LIBS="$DMXMODULES_LIBS"
-	AC_SUBST([XDMX_CFLAGS])
-	AC_SUBST([XDMX_LIBS])
-	AC_SUBST([XDMX_SYS_LIBS])
-
-dnl USB sources in DMX require <linux/input.h>
-	AC_CHECK_HEADER([linux/input.h], DMX_BUILD_USB="yes",
-			DMX_BUILD_USB="no")
-	AC_SUBST(XDMXCONFIG_DEP_CFLAGS)
-	AC_SUBST(XDMXCONFIG_DEP_LIBS)
-	PKG_CHECK_MODULES([DMXEXAMPLES_DEP], [$LIBDMX $LIBXEXT x11])
-	AC_SUBST(DMXEXAMPLES_DEP_LIBS)
-	PKG_CHECK_MODULES([DMXXMUEXAMPLES_DEP], [$LIBDMX xmu $LIBXEXT x11])
-	AC_SUBST(DMXXMUEXAMPLES_DEP_LIBS)
-	PKG_CHECK_MODULES([DMXXIEXAMPLES_DEP], [$LIBDMX $LIBXI $LIBXEXT x11])
-	AC_SUBST(DMXXIEXAMPLES_DEP_LIBS)
-	PKG_CHECK_MODULES([XTSTEXAMPLES_DEP], [$LIBXTST $LIBXEXT x11])
-	AC_SUBST(XTSTEXAMPLES_DEP_LIBS)
-	PKG_CHECK_MODULES([XRESEXAMPLES_DEP], [xres $LIBXEXT x11])
-	AC_SUBST(XRESEXAMPLES_DEP_LIBS)
-	PKG_CHECK_MODULES([X11EXAMPLES_DEP], [$LIBXEXT x11])
-	AC_SUBST(X11EXAMPLES_DEP_LIBS)
-
-fi
-AM_CONDITIONAL([DMX_BUILD_USB], [test "x$DMX_BUILD_USB" = xyes])
-
 dnl kdrive DDX
 
 XEPHYR_LIBS=
@@ -2320,75 +2226,6 @@ AC_SUBST([KDRIVE_LOCAL_LIBS])
 AC_SUBST([KDRIVE_LIBS])
 AM_CONDITIONAL(XEPHYR, [test "x$KDRIVE" = xyes && test "x$XEPHYR" = xyes])
 
-dnl Xwayland DDX
-
-XWAYLANDMODULES="wayland-client >= 1.3.0 wayland-protocols >= 1.10 $LIBDRM epoxy"
-if test "x$XF86VIDMODE" = xyes; then
-	XWAYLANDMODULES="$XWAYLANDMODULES $VIDMODEPROTO"
-fi
-PKG_CHECK_MODULES(XWAYLANDMODULES, [$XWAYLANDMODULES], [have_xwayland=yes], [have_xwayland=no])
-AC_MSG_CHECKING([whether to build Xwayland DDX])
-if test "x$XWAYLAND" = xauto; then
-   XWAYLAND="$have_xwayland"
-fi
-AC_MSG_RESULT([$XWAYLAND])
-AM_CONDITIONAL(XWAYLAND, [test "x$XWAYLAND" = xyes])
-
-if test "x$XWAYLAND" = xyes; then
-	if test "x$have_xwayland" = xno; then
-		AC_MSG_ERROR([Xwayland build explicitly requested, but required modules not found.])
-	fi
-
-	if test "x$GLAMOR" = xyes && test "x$GBM" = xyes; then
-		AC_DEFINE(XWL_HAS_GLAMOR, 1,
-			  [Build xwayland with glamor support])
-	fi
-
-	PKG_CHECK_MODULES(WAYLAND_EGLSTREAM, [wayland-eglstream-protocols >= 1.0.2], [have_wl_eglstream=yes], [have_wl_eglstream=no])
-
-	if test "x$XWAYLAND_EGLSTREAM" = xauto; then
-		if test "x$have_wl_eglstream" = xyes && test "x$GLAMOR" = xyes; then
-			XWAYLAND_EGLSTREAM=yes
-		fi
-	fi
-
-	if test "x$XWAYLAND_EGLSTREAM" = xyes; then
-		if test "x$GLAMOR" != xyes; then
-			AC_MSG_ERROR([Xwayland eglstream support explicitly requested, but required modules not found.])
-		fi
-
-		if test "x$have_wl_eglstream" = xno; then
-			AC_MSG_ERROR([Xwayland eglstream support requires wayland-eglstream-protocols >= 1.0.2])
-		fi
-
-		AC_SUBST(WAYLAND_EGLSTREAM_DATADIR, `$PKG_CONFIG --variable=pkgdatadir wayland-eglstream-protocols`)
-		AC_DEFINE(XWL_HAS_EGLSTREAM, 1,
-			  [Build xwayland with eglstream support])
-	fi
-
-	XWAYLAND_LIBS="$FB_LIB $FIXES_LIB $MI_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $DRI3_LIB $PRESENT_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $MAIN_LIB $DIX_LIB $OS_LIB"
-	XWAYLAND_SYS_LIBS="$XWAYLANDMODULES_LIBS $GLX_SYS_LIBS"
-	AC_SUBST([XWAYLAND_LIBS])
-	AC_SUBST([XWAYLAND_SYS_LIBS])
-
-	if test "x$MONOTONIC_CLOCK" != xyes; then
-		AC_MSG_ERROR([Xwayland requires CLOCK_MONOTONIC support.])
-	fi
-
-	AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner])
-	if test "x$WAYLAND_SCANNER" = x; then
-		PKG_CHECK_MODULES(WAYLAND_SCANNER, [wayland-scanner])
-		AC_SUBST(WAYLAND_SCANNER, `$PKG_CONFIG --variable=wayland_scanner wayland-scanner`)
-	fi
-
-        PKG_CHECK_MODULES(WAYLAND_SCANNER, [wayland-scanner >= 1.14.91],
-                          AC_SUBST(SCANNER_ARG, 'private-code'),
-                          AC_SUBST(SCANNER_ARG, 'code'))
-
-	AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, `$PKG_CONFIG --variable=pkgdatadir wayland-protocols`)
-fi
-AM_CONDITIONAL(XWAYLAND_EGLSTREAM, [test "x$XWAYLAND_EGLSTREAM" = "xyes"])
-
 
 dnl and the rest of these are generic, so they're in config.h
 dnl 
@@ -2408,16 +2245,6 @@ AC_DEFINE_DIR(PROJECTROOT, prefix, [Overall prefix])
 AC_DEFINE_DIR(SYSCONFDIR, sysconfdir, [sysconfdir])
 
 AC_SUBST([RELEASE_DATE])
-DATE_FMT="%Y%m%d"
-TIME_FMT="1%H%M%S"
-BUILD_DATE="`date "+$DATE_FMT"`"
-BUILD_TIME="`date "+$TIME_FMT"`"
-if test "x$SOURCE_DATE_EPOCH" != "x"; then
-	BUILD_DATE="`date -u -d "@$SOURCE_DATE_EPOCH" "+$DATE_FMT" 2>/dev/null || date -u -r "$SOURCE_DATE_EPOCH" "+$DATE_FMT" 2>/dev/null || date -u "+$DATE_FMT"`"
-	BUILD_TIME="`date -u -d "@$SOURCE_DATE_EPOCH" "+$TIME_FMT" 2>/dev/null || date -u -r "$SOURCE_DATE_EPOCH" "+$TIME_FMT" 2>/dev/null || date -u "+$TIME_FMT"`"
-fi
-AC_SUBST([BUILD_DATE])
-AC_SUBST([BUILD_TIME])
 
 DIX_CFLAGS="-DHAVE_DIX_CONFIG_H $XSERVER_CFLAGS"
 
@@ -2473,7 +2300,6 @@ hw/Makefile
 hw/xfree86/Makefile
 hw/xfree86/Xorg.sh
 hw/xfree86/common/Makefile
-hw/xfree86/common/xf86Build.h
 hw/xfree86/ddc/Makefile
 hw/xfree86/dixmods/Makefile
 hw/xfree86/doc/Makefile
@@ -2481,6 +2307,7 @@ hw/xfree86/dri/Makefile
 hw/xfree86/dri2/Makefile
 hw/xfree86/dri2/pci_ids/Makefile
 hw/xfree86/drivers/Makefile
+hw/xfree86/drivers/inputtest/Makefile
 hw/xfree86/drivers/modesetting/Makefile
 hw/xfree86/exa/Makefile
 hw/xfree86/exa/man/Makefile
@@ -2503,24 +2330,12 @@ hw/xfree86/os-support/stub/Makefile
 hw/xfree86/parser/Makefile
 hw/xfree86/ramdac/Makefile
 hw/xfree86/shadowfb/Makefile
-hw/xfree86/vbe/Makefile
 hw/xfree86/vgahw/Makefile
 hw/xfree86/x86emu/Makefile
 hw/xfree86/xkb/Makefile
 hw/xfree86/utils/Makefile
 hw/xfree86/utils/man/Makefile
-hw/xfree86/utils/cvt/Makefile
 hw/xfree86/utils/gtf/Makefile
-hw/dmx/config/Makefile
-hw/dmx/config/man/Makefile
-hw/dmx/doc/Makefile
-hw/dmx/doxygen/doxygen.conf
-hw/dmx/doxygen/Makefile
-hw/dmx/examples/Makefile
-hw/dmx/input/Makefile
-hw/dmx/glxProxy/Makefile
-hw/dmx/Makefile
-hw/dmx/man/Makefile
 hw/vfb/Makefile
 hw/vfb/man/Makefile
 hw/xnest/Makefile
@@ -2541,7 +2356,6 @@ hw/kdrive/Makefile
 hw/kdrive/ephyr/Makefile
 hw/kdrive/ephyr/man/Makefile
 hw/kdrive/src/Makefile
-hw/xwayland/Makefile
 test/Makefile
 xserver.ent
 xorg-server.pc
diff --git a/damageext/Makefile.in b/damageext/Makefile.in
index 6775c0f..9c35f5c 100644
--- a/damageext/Makefile.in
+++ b/damageext/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -105,7 +105,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -176,8 +175,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
@@ -197,8 +194,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -212,6 +207,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -230,14 +227,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -254,8 +243,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -311,6 +302,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -363,7 +356,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -387,29 +379,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -447,8 +423,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -459,14 +433,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -685,7 +653,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/damageext/damageext.c b/damageext/damageext.c
index ce490cb..c8194da 100644
--- a/damageext/damageext.c
+++ b/damageext/damageext.c
@@ -561,7 +561,11 @@ static int _X_COLD
 SProcDamageDispatch(ClientPtr client)
 {
     REQUEST(xDamageReq);
-    if (stuff->damageReqType >= XDamageNumberRequests)
+    DamageClientPtr pDamageClient = GetDamageClient(client);
+
+    if (pDamageClient->major_version >= ARRAY_SIZE(version_requests))
+        return BadRequest;
+    if (stuff->damageReqType > version_requests[pDamageClient->major_version])
         return BadRequest;
     return (*SProcDamageVector[stuff->damageReqType]) (client);
 }
diff --git a/dbe/Makefile.in b/dbe/Makefile.in
index 121651c..0b542c8 100644
--- a/dbe/Makefile.in
+++ b/dbe/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -107,7 +107,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -208,8 +207,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
@@ -229,8 +226,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -244,6 +239,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -262,14 +259,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -286,8 +275,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -343,6 +334,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -395,7 +388,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -419,29 +411,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -479,8 +455,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -491,14 +465,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -741,7 +709,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/dbe/dbe.c b/dbe/dbe.c
index 292a223..cdab3e9 100644
--- a/dbe/dbe.c
+++ b/dbe/dbe.c
@@ -1127,7 +1127,7 @@ DbeSetupBackgroundPainter(WindowPtr pWin, GCPtr pGC)
  *     DbeExtensionInit().
  *
  *     To make resource deletion simple, we do not do anything in this function
- *     and leave all resource deleteion to DbeWindowPrivDelete(), which will
+ *     and leave all resource deletion to DbeWindowPrivDelete(), which will
  *     eventually be called or already has been called.  Deletion functions are
  *     not guaranteed to be called in any particular order.
  *
@@ -1183,7 +1183,7 @@ DbeWindowPrivDelete(void *pDbeWinPriv, XID id)
     }
     else {
         /* We are removing the last ID in the array, in which case, the
-         * assignement below is all that we need to do.
+         * assignment below is all that we need to do.
          */
     }
     pDbeWindowPriv->IDs[pDbeWindowPriv->nBufferIDs - 1] = DBE_FREE_ID_ELEMENT;
diff --git a/dbe/dbestruct.h b/dbe/dbestruct.h
index fe2ef0a..ce99fbe 100644
--- a/dbe/dbestruct.h
+++ b/dbe/dbestruct.h
@@ -171,7 +171,7 @@ typedef struct _DbeWindowPrivRec {
 
 typedef struct _DbeScreenPrivRec {
     /* Wrapped functions
-     * It is the responsibilty of the DDX layer to wrap PositionWindow().
+     * It is the responsibility of the DDX layer to wrap PositionWindow().
      * DbeExtensionInit wraps DestroyWindow().
      */
     PositionWindowProcPtr PositionWindow;
diff --git a/dbe/meson.build b/dbe/meson.build
index 76a2d3f..2aa595a 100644
--- a/dbe/meson.build
+++ b/dbe/meson.build
@@ -13,4 +13,6 @@ libxserver_dbe = static_library('libxserver_dbe',
 	dependencies: common_dep,
 )
 
-install_data(hdrs_dbe, install_dir: xorgsdkdir)
+if build_xorg
+    install_data(hdrs_dbe, install_dir: xorgsdkdir)
+endif
diff --git a/depcomp b/depcomp
index 6b39162..715e343 100755
--- a/depcomp
+++ b/depcomp
@@ -3,7 +3,7 @@
 
 scriptversion=2018-03-07.03; # UTC
 
-# Copyright (C) 1999-2020 Free Software Foundation, Inc.
+# Copyright (C) 1999-2021 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/dix/Makefile.am b/dix/Makefile.am
index b96da08..e1498cd 100644
--- a/dix/Makefile.am
+++ b/dix/Makefile.am
@@ -23,6 +23,7 @@ libdix_la_SOURCES = 	\
 	extension.c	\
 	gc.c		\
 	getevents.c	\
+	gestures.c	\
 	globals.c	\
 	glyphcurs.c	\
 	grabs.c		\
@@ -42,26 +43,16 @@ libdix_la_SOURCES = 	\
 	touch.c		\
 	window.c
 
-EXTRA_DIST = buildatoms BuiltInAtoms Xserver.d Xserver-dtrace.h.in
+EXTRA_DIST = buildatoms BuiltInAtoms
 
 # Install list of protocol names
 miscconfigdir = $(SERVER_MISC_CONFIG_PATH)
 dist_miscconfig_DATA = protocol.txt
 
-if XSERVER_DTRACE
-# Generate dtrace header file for C sources to include
-BUILT_SOURCES = Xserver-dtrace.h
-
-Xserver-dtrace.h: $(srcdir)/Xserver.d
-	$(AM_V_GEN)$(DTRACE) -C -h -o $@ -s $(srcdir)/Xserver.d \
-		|| cp Xserver-dtrace.h.in $@
-
-endif
-
 if SPECIAL_DTRACE_OBJECTS
 # Generate dtrace object code for probes in libdix
-dtrace-dix.o: $(top_srcdir)/dix/Xserver.d libdix.la
-	$(AM_V_GEN)$(DTRACE) -G -C -o $@ -s $(top_srcdir)/dix/Xserver.d $(am_libdix_la_OBJECTS:%.lo=.libs/%.o)
+dtrace-dix.o: $(top_srcdir)/include/Xserver.d libdix.la
+	$(AM_V_GEN)$(DTRACE) -G -C -o $@ -s $(top_srcdir)/include/Xserver.d $(am_libdix_la_OBJECTS:%.lo=.libs/%.o)
 
 noinst_PROGRAMS = dix.O
 
@@ -69,5 +60,3 @@ dix_O_SOURCES =
 dix.O: dtrace-dix.o libdix.la
 	$(AM_V_GEN)ld -r -o $@ $(am_libdix_la_OBJECTS:%.lo=.libs/%.o)
 endif
-
-CLEANFILES = Xserver-dtrace.h
diff --git a/dix/Makefile.in b/dix/Makefile.in
index 559bca0..4dc79a3 100644
--- a/dix/Makefile.in
+++ b/dix/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -109,7 +109,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -119,10 +118,10 @@ libdix_la_LIBADD =
 am_libdix_la_OBJECTS = atom.lo colormap.lo cursor.lo devices.lo \
 	dispatch.lo dixfonts.lo main.lo dixutils.lo enterleave.lo \
 	events.lo eventconvert.lo extension.lo gc.lo getevents.lo \
-	globals.lo glyphcurs.lo grabs.lo initatoms.lo inpututils.lo \
-	pixmap.lo privates.lo property.lo ptrveloc.lo region.lo \
-	registry.lo resource.lo selection.lo swaprep.lo swapreq.lo \
-	tables.lo touch.lo window.lo
+	gestures.lo globals.lo glyphcurs.lo grabs.lo initatoms.lo \
+	inpututils.lo pixmap.lo privates.lo property.lo ptrveloc.lo \
+	region.lo registry.lo resource.lo selection.lo swaprep.lo \
+	swapreq.lo tables.lo touch.lo window.lo
 libdix_la_OBJECTS = $(am_libdix_la_OBJECTS)
 AM_V_lt = $(am__v_lt_@AM_V@)
 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
@@ -155,17 +154,17 @@ am__depfiles_remade = ./$(DEPDIR)/atom.Plo ./$(DEPDIR)/colormap.Plo \
 	./$(DEPDIR)/dixutils.Plo ./$(DEPDIR)/enterleave.Plo \
 	./$(DEPDIR)/eventconvert.Plo ./$(DEPDIR)/events.Plo \
 	./$(DEPDIR)/extension.Plo ./$(DEPDIR)/gc.Plo \
-	./$(DEPDIR)/getevents.Plo ./$(DEPDIR)/globals.Plo \
-	./$(DEPDIR)/glyphcurs.Plo ./$(DEPDIR)/grabs.Plo \
-	./$(DEPDIR)/initatoms.Plo ./$(DEPDIR)/inpututils.Plo \
-	./$(DEPDIR)/main.Plo ./$(DEPDIR)/pixmap.Plo \
-	./$(DEPDIR)/privates.Plo ./$(DEPDIR)/property.Plo \
-	./$(DEPDIR)/ptrveloc.Plo ./$(DEPDIR)/region.Plo \
-	./$(DEPDIR)/registry.Plo ./$(DEPDIR)/resource.Plo \
-	./$(DEPDIR)/selection.Plo ./$(DEPDIR)/stubmain.Plo \
-	./$(DEPDIR)/swaprep.Plo ./$(DEPDIR)/swapreq.Plo \
-	./$(DEPDIR)/tables.Plo ./$(DEPDIR)/touch.Plo \
-	./$(DEPDIR)/window.Plo
+	./$(DEPDIR)/gestures.Plo ./$(DEPDIR)/getevents.Plo \
+	./$(DEPDIR)/globals.Plo ./$(DEPDIR)/glyphcurs.Plo \
+	./$(DEPDIR)/grabs.Plo ./$(DEPDIR)/initatoms.Plo \
+	./$(DEPDIR)/inpututils.Plo ./$(DEPDIR)/main.Plo \
+	./$(DEPDIR)/pixmap.Plo ./$(DEPDIR)/privates.Plo \
+	./$(DEPDIR)/property.Plo ./$(DEPDIR)/ptrveloc.Plo \
+	./$(DEPDIR)/region.Plo ./$(DEPDIR)/registry.Plo \
+	./$(DEPDIR)/resource.Plo ./$(DEPDIR)/selection.Plo \
+	./$(DEPDIR)/stubmain.Plo ./$(DEPDIR)/swaprep.Plo \
+	./$(DEPDIR)/swapreq.Plo ./$(DEPDIR)/tables.Plo \
+	./$(DEPDIR)/touch.Plo ./$(DEPDIR)/window.Plo
 am__mv = mv -f
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@@ -239,8 +238,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
@@ -260,8 +257,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -275,6 +270,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -293,14 +290,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -317,8 +306,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -374,6 +365,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -426,7 +419,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -450,29 +442,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -510,8 +486,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -522,14 +496,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -625,6 +593,7 @@ libdix_la_SOURCES = \
 	extension.c	\
 	gc.c		\
 	getevents.c	\
+	gestures.c	\
 	globals.c	\
 	glyphcurs.c	\
 	grabs.c		\
@@ -644,18 +613,13 @@ libdix_la_SOURCES = \
 	touch.c		\
 	window.c
 
-EXTRA_DIST = buildatoms BuiltInAtoms Xserver.d Xserver-dtrace.h.in
+EXTRA_DIST = buildatoms BuiltInAtoms
 
 # Install list of protocol names
 miscconfigdir = $(SERVER_MISC_CONFIG_PATH)
 dist_miscconfig_DATA = protocol.txt
-
-# Generate dtrace header file for C sources to include
-@XSERVER_DTRACE_TRUE@BUILT_SOURCES = Xserver-dtrace.h
 @SPECIAL_DTRACE_OBJECTS_TRUE@dix_O_SOURCES = 
-CLEANFILES = Xserver-dtrace.h
-all: $(BUILT_SOURCES)
-	$(MAKE) $(AM_MAKEFLAGS) all-am
+all: all-am
 
 .SUFFIXES:
 .SUFFIXES: .c .lo .o .obj
@@ -737,6 +701,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/events.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/extension.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gc.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gestures.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getevents.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/globals.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glyphcurs.Plo@am__quote@ # am--include-marker
@@ -864,7 +829,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
@@ -899,15 +863,13 @@ distdir-am: $(DISTFILES)
 	  fi; \
 	done
 check-am: all-am
-check: $(BUILT_SOURCES)
-	$(MAKE) $(AM_MAKEFLAGS) check-am
+check: check-am
 all-am: Makefile $(PROGRAMS) $(LTLIBRARIES) $(DATA)
 installdirs:
 	for dir in "$(DESTDIR)$(miscconfigdir)"; do \
 	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
 	done
-install: $(BUILT_SOURCES)
-	$(MAKE) $(AM_MAKEFLAGS) install-am
+install: install-am
 install-exec: install-exec-am
 install-data: install-data-am
 uninstall: uninstall-am
@@ -929,7 +891,6 @@ install-strip:
 mostlyclean-generic:
 
 clean-generic:
-	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
 
 distclean-generic:
 	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
@@ -938,7 +899,6 @@ distclean-generic:
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
 	@echo "it deletes files that may require special tools to rebuild."
-	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
 clean: clean-am
 
 clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
@@ -957,6 +917,7 @@ distclean: distclean-am
 	-rm -f ./$(DEPDIR)/events.Plo
 	-rm -f ./$(DEPDIR)/extension.Plo
 	-rm -f ./$(DEPDIR)/gc.Plo
+	-rm -f ./$(DEPDIR)/gestures.Plo
 	-rm -f ./$(DEPDIR)/getevents.Plo
 	-rm -f ./$(DEPDIR)/globals.Plo
 	-rm -f ./$(DEPDIR)/glyphcurs.Plo
@@ -1035,6 +996,7 @@ maintainer-clean: maintainer-clean-am
 	-rm -f ./$(DEPDIR)/events.Plo
 	-rm -f ./$(DEPDIR)/extension.Plo
 	-rm -f ./$(DEPDIR)/gc.Plo
+	-rm -f ./$(DEPDIR)/gestures.Plo
 	-rm -f ./$(DEPDIR)/getevents.Plo
 	-rm -f ./$(DEPDIR)/globals.Plo
 	-rm -f ./$(DEPDIR)/glyphcurs.Plo
@@ -1074,7 +1036,7 @@ ps-am:
 
 uninstall-am: uninstall-dist_miscconfigDATA
 
-.MAKE: all check install install-am install-strip
+.MAKE: install-am install-strip
 
 .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
 	clean-generic clean-libtool clean-noinstLTLIBRARIES \
@@ -1095,13 +1057,9 @@ uninstall-am: uninstall-dist_miscconfigDATA
 .PRECIOUS: Makefile
 
 
-@XSERVER_DTRACE_TRUE@Xserver-dtrace.h: $(srcdir)/Xserver.d
-@XSERVER_DTRACE_TRUE@	$(AM_V_GEN)$(DTRACE) -C -h -o $@ -s $(srcdir)/Xserver.d \
-@XSERVER_DTRACE_TRUE@		|| cp Xserver-dtrace.h.in $@
-
 # Generate dtrace object code for probes in libdix
-@SPECIAL_DTRACE_OBJECTS_TRUE@dtrace-dix.o: $(top_srcdir)/dix/Xserver.d libdix.la
-@SPECIAL_DTRACE_OBJECTS_TRUE@	$(AM_V_GEN)$(DTRACE) -G -C -o $@ -s $(top_srcdir)/dix/Xserver.d $(am_libdix_la_OBJECTS:%.lo=.libs/%.o)
+@SPECIAL_DTRACE_OBJECTS_TRUE@dtrace-dix.o: $(top_srcdir)/include/Xserver.d libdix.la
+@SPECIAL_DTRACE_OBJECTS_TRUE@	$(AM_V_GEN)$(DTRACE) -G -C -o $@ -s $(top_srcdir)/include/Xserver.d $(am_libdix_la_OBJECTS:%.lo=.libs/%.o)
 @SPECIAL_DTRACE_OBJECTS_TRUE@dix.O: dtrace-dix.o libdix.la
 @SPECIAL_DTRACE_OBJECTS_TRUE@	$(AM_V_GEN)ld -r -o $@ $(am_libdix_la_OBJECTS:%.lo=.libs/%.o)
 
diff --git a/dix/Xserver-dtrace.h.in b/dix/Xserver-dtrace.h.in
deleted file mode 100644
index 60ebbcd..0000000
--- a/dix/Xserver-dtrace.h.in
+++ /dev/null
@@ -1,99 +0,0 @@
-/* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */ 
-
-/*
- * Generated by dtrace(1M), and then modified for backwards compatibility
- * with older versions of dtrace.   Used if dtrace -h fails.
- * (Since _ENABLED support was added after dtrace -h, this  assumes if 
- *  dtrace -h fails, _ENABLED will too.)
- */
-
-#ifndef	_XSERVER_DTRACE_H
-#define	_XSERVER_DTRACE_H
-
-#include <unistd.h>
-
-#ifdef	__cplusplus
-extern "C" {
-#endif
-
-#if _DTRACE_VERSION
-
-#define	XSERVER_CLIENT_AUTH(arg0, arg1, arg2, arg3) \
-	__dtrace_Xserver___client__auth(arg0, arg1, arg2, arg3)
-#define	XSERVER_CLIENT_CONNECT(arg0, arg1) \
-	__dtrace_Xserver___client__connect(arg0, arg1)
-#define	XSERVER_CLIENT_DISCONNECT(arg0) \
-	__dtrace_Xserver___client__disconnect(arg0)
-#define	XSERVER_REQUEST_DONE(arg0, arg1, arg2, arg3, arg4) \
-	__dtrace_Xserver___request__done(arg0, arg1, arg2, arg3, arg4)
-#define	XSERVER_REQUEST_START(arg0, arg1, arg2, arg3, arg4) \
-	__dtrace_Xserver___request__start(arg0, arg1, arg2, arg3, arg4)
-#define	XSERVER_RESOURCE_ALLOC(arg0, arg1, arg2, arg3) \
-	__dtrace_Xserver___resource__alloc(arg0, arg1, arg2, arg3)
-#define	XSERVER_RESOURCE_FREE(arg0, arg1, arg2, arg3) \
-	__dtrace_Xserver___resource__free(arg0, arg1, arg2, arg3)
-#define	XSERVER_SEND_EVENT(arg0, arg1, arg2) \
-	__dtrace_Xserver___send__event(arg0, arg1, arg2)
-#define	XSERVER_INPUT_EVENT(arg0, arg1, arg2, arg3, arg4, arg5, arg6) \
-	__dtrace_Xserver___input__event(arg0, arg1, arg2, arg3, arg4, arg5, arg6)
-
-extern void __dtrace_Xserver___client__auth(int, string, pid_t, zoneid_t);
-extern void __dtrace_Xserver___client__connect(int, int);
-extern void __dtrace_Xserver___client__disconnect(int);
-extern void __dtrace_Xserver___request__done(string, uint8_t, uint32_t, int, int);
-extern void __dtrace_Xserver___request__start(string, uint8_t, uint16_t, int, void *);
-extern void __dtrace_Xserver___resource__alloc(uint32_t, uint32_t, void *, string);
-extern void __dtrace_Xserver___resource__free(uint32_t, uint32_t, void *, string);
-extern void __dtrace_Xserver___send__event(int, uint8_t, void *);
-extern void __dtrace_Xserver___input__event(int, uint16_t, uint32_t, uint32_t, int8_t, uint8_t *, double *);
-
-
-#else
-
-#define	XSERVER_CLIENT_AUTH(arg0, arg1, arg2, arg3)
-#define	XSERVER_CLIENT_CONNECT(arg0, arg1)
-#define	XSERVER_CLIENT_DISCONNECT(arg0)
-#define	XSERVER_REQUEST_DONE(arg0, arg1, arg2, arg3, arg4)
-#define	XSERVER_REQUEST_START(arg0, arg1, arg2, arg3, arg4)
-#define	XSERVER_RESOURCE_ALLOC(arg0, arg1, arg2, arg3)
-#define	XSERVER_RESOURCE_FREE(arg0, arg1, arg2, arg3)
-#define	XSERVER_SEND_EVENT(arg0, arg1, arg2)
-#define	XSERVER_INPUT_EVENT(arg0, arg1, arg2, arg3, arg4, arg5, arg6)
-
-#endif
-
-#define	XSERVER_CLIENT_AUTH_ENABLED() (1)
-#define	XSERVER_CLIENT_CONNECT_ENABLED() (1)
-#define	XSERVER_CLIENT_DISCONNECT_ENABLED() (1)
-#define	XSERVER_REQUEST_DONE_ENABLED() (1)
-#define	XSERVER_REQUEST_START_ENABLED() (1)
-#define	XSERVER_RESOURCE_ALLOC_ENABLED() (1)
-#define	XSERVER_RESOURCE_FREE_ENABLED() (1)
-#define	XSERVER_SEND_EVENT_ENABLED() (1)
-#define	XSERVER_INPUT_EVENT_ENABLED() (1)
-
-#ifdef	__cplusplus
-}
-#endif
-
-#endif	/* _XSERVER_DTRACE_H */
diff --git a/dix/colormap.c b/dix/colormap.c
index 12a85b2..7a00d14 100644
--- a/dix/colormap.c
+++ b/dix/colormap.c
@@ -1095,7 +1095,7 @@ AllocColor(ColormapPtr pmap,
 
 /*
  * FakeAllocColor -- fake an AllocColor request by
- * returning a free pixel if availible, otherwise returning
+ * returning a free pixel if available, otherwise returning
  * the closest matching pixel.  This is used by the mi
  * software sprite code to recolor cursors.  A nice side-effect
  * is that this routine will never return failure.
@@ -2510,7 +2510,7 @@ _colormap_find_resource(void *value, XID id, void *cdata)
 }
 
 /* something has realloced the visuals, instead of breaking
-   ABI fix it up here - glx and compsite did this wrong */
+   ABI fix it up here - glx and composite did this wrong */
 Bool
 ResizeVisualArray(ScreenPtr pScreen, int new_visual_count, DepthPtr depth)
 {
diff --git a/dix/cursor.c b/dix/cursor.c
index 25d6767..a9ad344 100644
--- a/dix/cursor.c
+++ b/dix/cursor.c
@@ -494,6 +494,7 @@ CreateRootCursor(char *unused1, unsigned int unused2)
     FontPtr cursorfont;
     int err;
     XID fontID;
+    const char defaultCursorFont[] = "cursor";
 
     fontID = FakeClientID(0);
     err = OpenFont(serverClient, fontID, FontLoadAll | FontOpenSync,
diff --git a/dix/devices.c b/dix/devices.c
index 00c4539..5bf956e 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -59,7 +59,6 @@ SOFTWARE.
 #include "cursorstr.h"
 #include "dixstruct.h"
 #include "ptrveloc.h"
-#include "site.h"
 #include "xkbsrv.h"
 #include "privates.h"
 #include "xace.h"
@@ -268,9 +267,6 @@ AddInputDevice(ClientPtr client, DeviceProc deviceProc, Bool autoStart)
         return NULL;
     }
 
-    if (!dev)
-        return (DeviceIntPtr) NULL;
-
     dev->last.scroll = NULL;
     dev->last.touches = NULL;
     dev->id = devid;
@@ -285,7 +281,7 @@ AddInputDevice(ClientPtr client, DeviceProc deviceProc, Bool autoStart)
     dev->deviceGrab.grabTime = currentTime;
     dev->deviceGrab.ActivateGrab = ActivateKeyboardGrab;
     dev->deviceGrab.DeactivateGrab = DeactivateKeyboardGrab;
-    dev->deviceGrab.sync.event = calloc(1, sizeof(DeviceEvent));
+    dev->deviceGrab.sync.event = calloc(1, sizeof(InternalEvent));
 
     XkbSetExtension(dev, ProcessKeyboardEvent);
 
@@ -462,6 +458,7 @@ DisableDevice(DeviceIntPtr dev, BOOL sendevent)
         return FALSE;
 
     TouchEndPhysicallyActiveTouches(dev);
+    GestureEndActiveGestures(dev);
     ReleaseButtonsAndKeys(dev);
     SyncRemoveDeviceIdleTime(dev->idle_counter);
     dev->idle_counter = NULL;
@@ -1674,6 +1671,32 @@ InitTouchClassDeviceStruct(DeviceIntPtr device, unsigned int max_touches,
     return FALSE;
 }
 
+/**
+ * Sets up gesture capabilities on @device.
+ *
+ * @max_touches The maximum number of simultaneous touches, or 0 for unlimited.
+ */
+Bool
+InitGestureClassDeviceStruct(DeviceIntPtr device, unsigned int max_touches)
+{
+    GestureClassPtr g;
+
+    BUG_RETURN_VAL(device == NULL, FALSE);
+    BUG_RETURN_VAL(device->gesture != NULL, FALSE);
+
+    g = calloc(1, sizeof(*g));
+    if (!g)
+        return FALSE;
+
+    g->sourceid = device->id;
+    g->max_touches = max_touches;
+    GestureInitGestureInfo(&g->gesture);
+
+    device->gesture = g;
+
+    return TRUE;
+}
+
 /*
  * Check if the given buffer contains elements between low (inclusive) and
  * high (inclusive) only.
@@ -2261,6 +2284,9 @@ ProcChangePointerControl(ClientPtr client)
     REQUEST(xChangePointerControlReq);
     REQUEST_SIZE_MATCH(xChangePointerControlReq);
 
+    /* If the device has no PtrFeedbackPtr, the xserver has a bug */
+    BUG_RETURN_VAL (!mouse->ptrfeed, BadImplementation);
+
     ctrl = mouse->ptrfeed->ctrl;
     if ((stuff->doAccel != xTrue) && (stuff->doAccel != xFalse)) {
         client->errorValue = stuff->doAccel;
@@ -2815,3 +2841,26 @@ valuator_set_mode(DeviceIntPtr dev, int axis, int mode)
             dev->valuator->axes[i].mode = mode;
     }
 }
+
+void
+DeliverDeviceClassesChangedEvent(int sourceid, Time time)
+{
+    DeviceIntPtr dev;
+    int num_events = 0;
+    InternalEvent dcce;
+
+    dixLookupDevice(&dev, sourceid, serverClient, DixWriteAccess);
+
+    if (!dev)
+        return;
+
+    /* UpdateFromMaster generates at most one event */
+    UpdateFromMaster(&dcce, dev, DEVCHANGE_POINTER_EVENT, &num_events);
+    BUG_WARN(num_events > 1);
+
+    if (num_events) {
+        dcce.any.time = time;
+        /* FIXME: This doesn't do anything */
+        dev->public.processInputProc(&dcce, dev);
+    }
+}
diff --git a/dix/dispatch.c b/dix/dispatch.c
index a33bfaa..4602961 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -127,8 +127,8 @@ int ProcInitialConnection();
 #include "xace.h"
 #include "inputstr.h"
 #include "xkbsrv.h"
-#include "site.h"
 #include "client.h"
+#include "xfixesint.h"
 
 #ifdef XSERVER_DTRACE
 #include "registry.h"
@@ -148,6 +148,7 @@ xConnSetupPrefix connSetupPrefix;
 PaddingInfo PixmapWidthPaddingInfo[33];
 
 static ClientPtr grabClient;
+static ClientPtr currentClient; /* Client for the request currently being dispatched */
 
 #define GrabNone 0
 #define GrabActive 1
@@ -164,6 +165,7 @@ static int nextFreeClientID;    /* always MIN free client ID */
 static int nClients;            /* number of authorized clients */
 
 CallbackListPtr ClientStateCallback;
+OsTimerPtr dispatchExceptionTimer;
 
 /* dispatchException & isItTimeToYield must be declared volatile since they
  * are modified by signal handlers - otherwise optimizer may assume it doesn't
@@ -176,6 +178,23 @@ volatile char isItTimeToYield;
 #define SAME_SCREENS(a, b) (\
     (a.pScreen == b.pScreen))
 
+ClientPtr
+GetCurrentClient(void)
+{
+    if (in_input_thread()) {
+        static Bool warned;
+
+        if (!warned) {
+            ErrorF("[dix] Error GetCurrentClient called from input-thread\n");
+            warned = TRUE;
+        }
+
+        return NULL;
+    }
+
+    return currentClient;
+}
+
 void
 SetInputCheck(HWEventQueuePtr c0, HWEventQueuePtr c1)
 {
@@ -382,6 +401,58 @@ SmartScheduleClient(void)
     return best;
 }
 
+static CARD32
+DispatchExceptionCallback(OsTimerPtr timer, CARD32 time, void *arg)
+{
+    dispatchException |= dispatchExceptionAtReset;
+
+    /* Don't re-arm the timer */
+    return 0;
+}
+
+static void
+CancelDispatchExceptionTimer(void)
+{
+    TimerFree(dispatchExceptionTimer);
+    dispatchExceptionTimer = NULL;
+}
+
+static void
+SetDispatchExceptionTimer(void)
+{
+    /* The timer delay is only for terminate, not reset */
+    if (!(dispatchExceptionAtReset & DE_TERMINATE)) {
+        dispatchException |= dispatchExceptionAtReset;
+        return;
+    }
+
+    CancelDispatchExceptionTimer();
+
+    if (terminateDelay == 0)
+        dispatchException |= dispatchExceptionAtReset;
+    else
+        dispatchExceptionTimer = TimerSet(dispatchExceptionTimer,
+                                          0, terminateDelay * 1000 /* msec */,
+                                          &DispatchExceptionCallback,
+                                          NULL);
+}
+
+static Bool
+ShouldDisconnectRemainingClients(void)
+{
+    int i;
+
+    for (i = 1; i < currentMaxClients; i++) {
+        if (clients[i]) {
+            if (!XFixesShouldDisconnectClient(clients[i]))
+                return FALSE;
+        }
+    }
+
+    /* All remaining clients can be safely ignored */
+    return TRUE;
+}
+
 void
 EnableLimitedSchedulingLatency(void)
 {
@@ -474,9 +545,12 @@ Dispatch(void)
                     result = BadLength;
                 else {
                     result = XaceHookDispatch(client, client->majorOp);
-                    if (result == Success)
+                    if (result == Success) {
+                        currentClient = client;
                         result =
                             (*client->requestVector[client->majorOp]) (client);
+                        currentClient = NULL;
+                    }
                 }
                 if (!SmartScheduleSignalEnable)
                     SmartScheduleTime = GetTimeInMillis();
@@ -515,7 +589,6 @@ Dispatch(void)
 }
 
 static int VendorRelease = VENDOR_RELEASE;
-static const char *VendorString = VENDOR_NAME;
 
 void
 SetVendorRelease(int release)
@@ -523,12 +596,6 @@ SetVendorRelease(int release)
     VendorRelease = release;
 }
 
-void
-SetVendorString(const char *vendor)
-{
-    VendorString = vendor;
-}
-
 Bool
 CreateConnectionBlock(void)
 {
@@ -540,6 +607,7 @@ CreateConnectionBlock(void)
     unsigned long vid;
     int i, j, k, lenofblock, sizesofar = 0;
     char *pBuf;
+    const char VendorString[] = VENDOR_NAME;
 
     memset(&setup, 0, sizeof(xConnSetup));
     /* Leave off the ridBase and ridMask, these must be sent with
@@ -3405,6 +3473,7 @@ ProcNoOperation(ClientPtr client)
  *********************/
 
 char dispatchExceptionAtReset = DE_RESET;
+int terminateDelay = 0;
 
 void
 CloseDownClient(ClientPtr client)
@@ -3461,7 +3530,7 @@ CloseDownClient(ClientPtr client)
 
     if (really_close_down) {
         if (client->clientState == ClientStateRunning && nClients == 0)
-            dispatchException |= dispatchExceptionAtReset;
+            SetDispatchExceptionTimer();
 
         client->clientState = ClientStateGone;
         if (ClientStateCallback) {
@@ -3473,6 +3542,7 @@ CloseDownClient(ClientPtr client)
             CallCallbacks((&ClientStateCallback), (void *) &clientinfo);
         }
         TouchListenerGone(client->clientAsMask);
+        GestureListenerGone(client->clientAsMask);
         FreeClientResources(client);
         /* Disable client ID tracking. This must be done after
          * ClientStateCallback. */
@@ -3489,6 +3559,9 @@ CloseDownClient(ClientPtr client)
         while (!clients[currentMaxClients - 1])
             currentMaxClients--;
     }
+
+    if (ShouldDisconnectRemainingClients())
+        SetDispatchExceptionTimer();
 }
 
 static void
@@ -3690,6 +3763,7 @@ SendConnSetup(ClientPtr client, const char *reason)
         clientinfo.setup = (xConnSetup *) lConnectionInfo;
         CallCallbacks((&ClientStateCallback), (void *) &clientinfo);
     }
+    CancelDispatchExceptionTimer();
     return Success;
 }
 
@@ -3846,11 +3920,11 @@ static int init_screen(ScreenPtr pScreen, int i, Bool gpu)
     pScreen->CreateScreenResources = 0;
 
     xorg_list_init(&pScreen->pixmap_dirty_list);
-    xorg_list_init(&pScreen->slave_list);
+    xorg_list_init(&pScreen->secondary_list);
 
     /*
      * This loop gets run once for every Screen that gets added,
-     * but thats ok.  If the ddx layer initializes the formats
+     * but that's ok.  If the ddx layer initializes the formats
      * one at a time calling AddScreen() after each, then each
      * iteration will make it a little more accurate.  Worst case
      * we do this loop N * numPixmapFormats where N is # of screens.
@@ -4014,54 +4088,54 @@ void
 AttachUnboundGPU(ScreenPtr pScreen, ScreenPtr new)
 {
     assert(new->isGPU);
-    assert(!new->current_master);
-    xorg_list_add(&new->slave_head, &pScreen->slave_list);
-    new->current_master = pScreen;
+    assert(!new->current_primary);
+    xorg_list_add(&new->secondary_head, &pScreen->secondary_list);
+    new->current_primary = pScreen;
 }
 
 void
-DetachUnboundGPU(ScreenPtr slave)
+DetachUnboundGPU(ScreenPtr secondary)
 {
-    assert(slave->isGPU);
-    assert(!slave->is_output_slave);
-    assert(!slave->is_offload_slave);
-    xorg_list_del(&slave->slave_head);
-    slave->current_master = NULL;
+    assert(secondary->isGPU);
+    assert(!secondary->is_output_secondary);
+    assert(!secondary->is_offload_secondary);
+    xorg_list_del(&secondary->secondary_head);
+    secondary->current_primary = NULL;
 }
 
 void
 AttachOutputGPU(ScreenPtr pScreen, ScreenPtr new)
 {
     assert(new->isGPU);
-    assert(!new->is_output_slave);
-    assert(new->current_master == pScreen);
-    new->is_output_slave = TRUE;
-    new->current_master->output_slaves++;
+    assert(!new->is_output_secondary);
+    assert(new->current_primary == pScreen);
+    new->is_output_secondary = TRUE;
+    new->current_primary->output_secondarys++;
 }
 
 void
-DetachOutputGPU(ScreenPtr slave)
+DetachOutputGPU(ScreenPtr secondary)
 {
-    assert(slave->isGPU);
-    assert(slave->is_output_slave);
-    slave->current_master->output_slaves--;
-    slave->is_output_slave = FALSE;
+    assert(secondary->isGPU);
+    assert(secondary->is_output_secondary);
+    secondary->current_primary->output_secondarys--;
+    secondary->is_output_secondary = FALSE;
 }
 
 void
 AttachOffloadGPU(ScreenPtr pScreen, ScreenPtr new)
 {
     assert(new->isGPU);
-    assert(!new->is_offload_slave);
-    assert(new->current_master == pScreen);
-    new->is_offload_slave = TRUE;
+    assert(!new->is_offload_secondary);
+    assert(new->current_primary == pScreen);
+    new->is_offload_secondary = TRUE;
 }
 
 void
-DetachOffloadGPU(ScreenPtr slave)
+DetachOffloadGPU(ScreenPtr secondary)
 {
-    assert(slave->isGPU);
-    assert(slave->is_offload_slave);
-    slave->is_offload_slave = FALSE;
+    assert(secondary->isGPU);
+    assert(secondary->is_offload_secondary);
+    secondary->is_offload_secondary = FALSE;
 }
 
diff --git a/dix/dixfonts.c b/dix/dixfonts.c
index 0ea8678..58a385f 100644
--- a/dix/dixfonts.c
+++ b/dix/dixfonts.c
@@ -1108,7 +1108,7 @@ doPolyText(ClientPtr client, PTclosurePtr c)
         if (ClientIsAsleep(client)) {
             /* Client has died, but we cannot bail out right now.  We
                need to clean up after the work we did when going to
-               sleep.  Setting the drawable poiner to 0 makes this
+               sleep.  Setting the drawable pointer to 0 makes this
                happen without any attempts to render or perform other
                unnecessary activities.  */
             c->pDraw = (DrawablePtr) 0;
diff --git a/dix/enterleave.c b/dix/enterleave.c
index a2f625b..033ddc2 100644
--- a/dix/enterleave.c
+++ b/dix/enterleave.c
@@ -56,7 +56,7 @@
  *
  * For a full description of the focus in/out model from a window's
  * perspective, see
- * http://lists.freedesktop.org/archives/xorg/2008-December/041740.html
+ * https://lists.freedesktop.org/archives/xorg/2008-December/041684.html
  *
  * Additional notes:
  * - The core protocol spec says that "In a LeaveNotify event, if a child of the
@@ -130,7 +130,7 @@ PointerWin(DeviceIntPtr dev)
 
 /**
  * Search for the first window below 'win' that has a pointer directly within
- * it's boundaries (excluding boundaries of its own descendants).
+ * its boundaries (excluding boundaries of its own descendants).
  *
  * @return The child window that has the pointer within its boundaries or
  *         NULL.
@@ -150,7 +150,7 @@ FirstPointerChild(WindowPtr win)
 
 /**
  * Search for the first window below 'win' that has a focus directly within
- * it's boundaries (excluding boundaries of its own descendants).
+ * its boundaries (excluding boundaries of its own descendants).
  *
  * @return The child window that has the pointer within its boundaries or
  *         NULL.
diff --git a/dix/eventconvert.c b/dix/eventconvert.c
index 4a07b6b..53b8c79 100644
--- a/dix/eventconvert.c
+++ b/dix/eventconvert.c
@@ -59,6 +59,8 @@ static int eventToDeviceEvent(DeviceEvent *ev, xEvent **xi);
 static int eventToRawEvent(RawDeviceEvent *ev, xEvent **xi);
 static int eventToBarrierEvent(BarrierEvent *ev, xEvent **xi);
 static int eventToTouchOwnershipEvent(TouchOwnershipEvent *ev, xEvent **xi);
+static int eventToGestureSwipeEvent(GestureEvent *ev, xEvent **xi);
+static int eventToGesturePinchEvent(GestureEvent *ev, xEvent **xi);
 
 /* Do not use, read comments below */
 BOOL EventIsKeyRepeat(xEvent *event);
@@ -163,6 +165,12 @@ EventToCore(InternalEvent *event, xEvent **core_out, int *count_out)
     case ET_TouchOwnership:
     case ET_BarrierHit:
     case ET_BarrierLeave:
+    case ET_GesturePinchBegin:
+    case ET_GesturePinchUpdate:
+    case ET_GesturePinchEnd:
+    case ET_GestureSwipeBegin:
+    case ET_GestureSwipeUpdate:
+    case ET_GestureSwipeEnd:
         ret = BadMatch;
         break;
     default:
@@ -221,6 +229,12 @@ EventToXI(InternalEvent *ev, xEvent **xi, int *count)
     case ET_TouchOwnership:
     case ET_BarrierHit:
     case ET_BarrierLeave:
+    case ET_GesturePinchBegin:
+    case ET_GesturePinchUpdate:
+    case ET_GesturePinchEnd:
+    case ET_GestureSwipeBegin:
+    case ET_GestureSwipeUpdate:
+    case ET_GestureSwipeEnd:
         *count = 0;
         *xi = NULL;
         return BadMatch;
@@ -285,6 +299,14 @@ EventToXI2(InternalEvent *ev, xEvent **xi)
     case ET_BarrierHit:
     case ET_BarrierLeave:
         return eventToBarrierEvent(&ev->barrier_event, xi);
+    case ET_GesturePinchBegin:
+    case ET_GesturePinchUpdate:
+    case ET_GesturePinchEnd:
+        return eventToGesturePinchEvent(&ev->gesture_event, xi);
+    case ET_GestureSwipeBegin:
+    case ET_GestureSwipeUpdate:
+    case ET_GestureSwipeEnd:
+        return eventToGestureSwipeEvent(&ev->gesture_event, xi);
     default:
         break;
     }
@@ -816,6 +838,88 @@ eventToBarrierEvent(BarrierEvent *ev, xEvent **xi)
     return Success;
 }
 
+int
+eventToGesturePinchEvent(GestureEvent *ev, xEvent **xi)
+{
+    int len = sizeof(xXIGesturePinchEvent);
+    xXIGesturePinchEvent *xpe;
+
+    *xi = calloc(1, len);
+    xpe = (xXIGesturePinchEvent *) * xi;
+    xpe->type = GenericEvent;
+    xpe->extension = IReqCode;
+    xpe->evtype = GetXI2Type(ev->type);
+    xpe->time = ev->time;
+    xpe->length = bytes_to_int32(len - sizeof(xEvent));
+    xpe->detail = ev->num_touches;
+
+    xpe->root = ev->root;
+    xpe->deviceid = ev->deviceid;
+    xpe->sourceid = ev->sourceid;
+    xpe->root_x = double_to_fp1616(ev->root_x);
+    xpe->root_y = double_to_fp1616(ev->root_y);
+    xpe->flags |= (ev->flags & GESTURE_CANCELLED) ? XIGesturePinchEventCancelled : 0;
+
+    xpe->delta_x = double_to_fp1616(ev->delta_x);
+    xpe->delta_y = double_to_fp1616(ev->delta_y);
+    xpe->delta_unaccel_x = double_to_fp1616(ev->delta_unaccel_x);
+    xpe->delta_unaccel_y = double_to_fp1616(ev->delta_unaccel_y);
+    xpe->scale = double_to_fp1616(ev->scale);
+    xpe->delta_angle = double_to_fp1616(ev->delta_angle);
+
+    xpe->mods.base_mods = ev->mods.base;
+    xpe->mods.latched_mods = ev->mods.latched;
+    xpe->mods.locked_mods = ev->mods.locked;
+    xpe->mods.effective_mods = ev->mods.effective;
+
+    xpe->group.base_group = ev->group.base;
+    xpe->group.latched_group = ev->group.latched;
+    xpe->group.locked_group = ev->group.locked;
+    xpe->group.effective_group = ev->group.effective;
+
+    return Success;
+}
+
+int
+eventToGestureSwipeEvent(GestureEvent *ev, xEvent **xi)
+{
+    int len = sizeof(xXIGestureSwipeEvent);
+    xXIGestureSwipeEvent *xde;
+
+    *xi = calloc(1, len);
+    xde = (xXIGestureSwipeEvent *) * xi;
+    xde->type = GenericEvent;
+    xde->extension = IReqCode;
+    xde->evtype = GetXI2Type(ev->type);
+    xde->time = ev->time;
+    xde->length = bytes_to_int32(len - sizeof(xEvent));
+    xde->detail = ev->num_touches;
+
+    xde->root = ev->root;
+    xde->deviceid = ev->deviceid;
+    xde->sourceid = ev->sourceid;
+    xde->root_x = double_to_fp1616(ev->root_x);
+    xde->root_y = double_to_fp1616(ev->root_y);
+    xde->flags |= (ev->flags & GESTURE_CANCELLED) ? XIGestureSwipeEventCancelled : 0;
+
+    xde->delta_x = double_to_fp1616(ev->delta_x);
+    xde->delta_y = double_to_fp1616(ev->delta_y);
+    xde->delta_unaccel_x = double_to_fp1616(ev->delta_unaccel_x);
+    xde->delta_unaccel_y = double_to_fp1616(ev->delta_unaccel_y);
+
+    xde->mods.base_mods = ev->mods.base;
+    xde->mods.latched_mods = ev->mods.latched;
+    xde->mods.locked_mods = ev->mods.locked;
+    xde->mods.effective_mods = ev->mods.effective;
+
+    xde->group.base_group = ev->group.base;
+    xde->group.latched_group = ev->group.latched;
+    xde->group.locked_group = ev->group.locked;
+    xde->group.effective_group = ev->group.effective;
+
+    return Success;
+}
+
 /**
  * Return the corresponding core type for the given event or 0 if no core
  * equivalent exists.
@@ -969,8 +1073,68 @@ GetXI2Type(enum EventType type)
     case ET_BarrierLeave:
         xi2type = XI_BarrierLeave;
         break;
+    case ET_GesturePinchBegin:
+        xi2type = XI_GesturePinchBegin;
+        break;
+    case ET_GesturePinchUpdate:
+        xi2type = XI_GesturePinchUpdate;
+        break;
+    case ET_GesturePinchEnd:
+        xi2type = XI_GesturePinchEnd;
+        break;
+    case ET_GestureSwipeBegin:
+        xi2type = XI_GestureSwipeBegin;
+        break;
+    case ET_GestureSwipeUpdate:
+        xi2type = XI_GestureSwipeUpdate;
+        break;
+    case ET_GestureSwipeEnd:
+        xi2type = XI_GestureSwipeEnd;
+        break;
     default:
         break;
     }
     return xi2type;
 }
+
+/**
+ * Converts a gesture type to corresponding Gesture{Pinch,Swipe}Begin.
+ * Returns 0 if the input type is not a gesture.
+ */
+enum EventType
+GestureTypeToBegin(enum EventType type)
+{
+    switch (type) {
+    case ET_GesturePinchBegin:
+    case ET_GesturePinchUpdate:
+    case ET_GesturePinchEnd:
+        return ET_GesturePinchBegin;
+    case ET_GestureSwipeBegin:
+    case ET_GestureSwipeUpdate:
+    case ET_GestureSwipeEnd:
+        return ET_GestureSwipeBegin;
+    default:
+        return 0;
+    }
+}
+
+/**
+ * Converts a gesture type to corresponding Gesture{Pinch,Swipe}End.
+ * Returns 0 if the input type is not a gesture.
+ */
+enum EventType
+GestureTypeToEnd(enum EventType type)
+{
+    switch (type) {
+    case ET_GesturePinchBegin:
+    case ET_GesturePinchUpdate:
+    case ET_GesturePinchEnd:
+        return ET_GesturePinchEnd;
+    case ET_GestureSwipeBegin:
+    case ET_GestureSwipeUpdate:
+    case ET_GestureSwipeEnd:
+        return ET_GestureSwipeEnd;
+    default:
+        return 0;
+    }
+}
diff --git a/dix/events.c b/dix/events.c
index 427b891..86f5357 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -467,6 +467,20 @@ WindowXI2MaskIsset(DeviceIntPtr dev, WindowPtr win, xEvent *ev)
     return xi2mask_isset(inputMasks->xi2mask, dev, evtype);
 }
 
+/**
+ * When processing events we operate on InternalEvent pointers. They may actually refer to a
+ * an instance of DeviceEvent, GestureEvent or any other event that comprises the InternalEvent
+ * union. This works well in practice because we always look into event type before doing anything,
+ * except in the case of copying the event. Any copying of InternalEvent should use this function
+ * instead of doing *dst_event = *src_event whenever it's not clear whether source event actually
+ * points to full InternalEvent instance.
+ */
+void
+CopyPartialInternalEvent(InternalEvent* dst_event, const InternalEvent* src_event)
+{
+    memcpy(dst_event, src_event, src_event->any.length);
+}
+
 Mask
 GetEventMask(DeviceIntPtr dev, xEvent *event, InputClients * other)
 {
@@ -1191,7 +1205,7 @@ EnqueueEvent(InternalEvent *ev, DeviceIntPtr device)
         }
     }
 
-    eventlen = event->length;
+    eventlen = sizeof(InternalEvent);
 
     qe = malloc(sizeof(QdEventRec) + eventlen);
     if (!qe)
@@ -1201,7 +1215,7 @@ EnqueueEvent(InternalEvent *ev, DeviceIntPtr device)
     qe->pScreen = pSprite->hotPhys.pScreen;
     qe->months = currentTime.months;
     qe->event = (InternalEvent *) (qe + 1);
-    memcpy(qe->event, event, eventlen);
+    CopyPartialInternalEvent(qe->event, (InternalEvent *)event);
     xorg_list_append(&qe->next, &syncEvents.pending);
 }
 
@@ -1304,7 +1318,6 @@ static void
 ComputeFreezes(void)
 {
     DeviceIntPtr replayDev = syncEvents.replayDev;
-    WindowPtr w;
     GrabPtr grab;
     DeviceIntPtr dev;
 
@@ -1316,26 +1329,38 @@ ComputeFreezes(void)
         return;
     syncEvents.playingEvents = TRUE;
     if (replayDev) {
-        DeviceEvent *event = replayDev->deviceGrab.sync.event;
+        InternalEvent *event = replayDev->deviceGrab.sync.event;
 
         syncEvents.replayDev = (DeviceIntPtr) NULL;
 
-        w = XYToWindow(replayDev->spriteInfo->sprite,
-                       event->root_x, event->root_y);
-        if (!CheckDeviceGrabs(replayDev, event, syncEvents.replayWin)) {
-            if (IsTouchEvent((InternalEvent *) event)) {
+        if (!CheckDeviceGrabs(replayDev, event,
+                              syncEvents.replayWin)) {
+            if (IsTouchEvent(event)) {
                 TouchPointInfoPtr ti =
-                    TouchFindByClientID(replayDev, event->touchid);
+                    TouchFindByClientID(replayDev, event->device_event.touchid);
                 BUG_WARN(!ti);
 
                 TouchListenerAcceptReject(replayDev, ti, 0, XIRejectTouch);
             }
-            else if (replayDev->focus &&
-                     !IsPointerEvent((InternalEvent *) event))
-                DeliverFocusedEvent(replayDev, (InternalEvent *) event, w);
-            else
-                DeliverDeviceEvents(w, (InternalEvent *) event, NullGrab,
-                                    NullWindow, replayDev);
+            else if (IsGestureEvent(event)) {
+                GestureInfoPtr gi =
+                    GestureFindActiveByEventType(replayDev, event->any.type);
+                if (gi) {
+                    GestureEmitGestureEndToOwner(replayDev, gi);
+                    GestureEndGesture(gi);
+                }
+                ProcessGestureEvent(event, replayDev);
+            }
+            else {
+                WindowPtr w = XYToWindow(replayDev->spriteInfo->sprite,
+                                         event->device_event.root_x,
+                                         event->device_event.root_y);
+                if (replayDev->focus && !IsPointerEvent(event))
+                    DeliverFocusedEvent(replayDev, event, w);
+                else
+                    DeliverDeviceEvents(w, event, NullGrab,
+                                        NullWindow, replayDev);
+            }
         }
     }
     for (dev = inputInfo.devices; dev; dev = dev->next) {
@@ -1478,16 +1503,25 @@ UpdateTouchesForGrab(DeviceIntPtr mouse)
 
         if (ti->active &&
             CLIENT_BITS(listener->listener) == grab->resource) {
+            if (grab->grabtype == CORE || grab->grabtype == XI ||
+                !xi2mask_isset(grab->xi2mask, mouse, XI_TouchBegin)) {
+                /*  Note that the grab will override any current listeners and if these listeners
+                    already received touch events then this is the place to send touch end event
+                    to complete the touch sequence.
+
+                    Unfortunately GTK3 menu widget implementation relies on not getting touch end
+                    event, so we can't fix the current behavior.
+                */
+                listener->type = TOUCH_LISTENER_POINTER_GRAB;
+            } else {
+                listener->type = TOUCH_LISTENER_GRAB;
+            }
+
             listener->listener = grab->resource;
             listener->level = grab->grabtype;
-            listener->state = LISTENER_IS_OWNER;
             listener->window = grab->window;
+            listener->state = TOUCH_LISTENER_IS_OWNER;
 
-            if (grab->grabtype == CORE || grab->grabtype == XI ||
-                !xi2mask_isset(grab->xi2mask, mouse, XI_TouchBegin))
-                listener->type = LISTENER_POINTER_GRAB;
-            else
-                listener->type = LISTENER_GRAB;
             if (listener->grab)
                 FreeGrab(listener->grab);
             listener->grab = AllocGrab(grab);
@@ -1495,6 +1529,46 @@ UpdateTouchesForGrab(DeviceIntPtr mouse)
     }
 }
 
+/**
+ * Update gesture records when an explicit grab is activated. Any gestures owned
+ * by the grabbing client are updated so the listener state reflects the new
+ * grab.
+ */
+static void
+UpdateGesturesForGrab(DeviceIntPtr mouse)
+{
+    if (!mouse->gesture || mouse->deviceGrab.fromPassiveGrab)
+        return;
+
+    GestureInfoPtr gi = &mouse->gesture->gesture;
+    GestureListener *listener = &gi->listener;
+    GrabPtr grab = mouse->deviceGrab.grab;
+
+    if (gi->active && CLIENT_BITS(listener->listener) == grab->resource) {
+        if (grab->grabtype == CORE || grab->grabtype == XI ||
+            !xi2mask_isset(grab->xi2mask, mouse, GetXI2Type(gi->type))) {
+
+            if (listener->type == GESTURE_LISTENER_REGULAR) {
+                /* if the listener already got any events relating to the gesture, we must send
+                   a gesture end because the grab overrides the previous listener and won't
+                   itself send any gesture events.
+                */
+                GestureEmitGestureEndToOwner(mouse, gi);
+            }
+            listener->type = GESTURE_LISTENER_NONGESTURE_GRAB;
+        } else {
+            listener->type = GESTURE_LISTENER_GRAB;
+        }
+
+        listener->listener = grab->resource;
+        listener->window = grab->window;
+
+        if (listener->grab)
+            FreeGrab(listener->grab);
+        listener->grab = AllocGrab(grab);
+    }
+}
+
 /**
  * Activate a pointer grab on the given device. A pointer grab will cause all
  * core pointer events of this device to be delivered to the grabbing client only.
@@ -1508,7 +1582,7 @@ UpdateTouchesForGrab(DeviceIntPtr mouse)
  * @param mouse The device to grab.
  * @param grab The grab structure, needs to be setup.
  * @param autoGrab True if the grab was caused by a button down event and not
- * explicitely by a client.
+ * explicitly by a client.
  */
 void
 ActivatePointerGrab(DeviceIntPtr mouse, GrabPtr grab,
@@ -1545,6 +1619,7 @@ ActivatePointerGrab(DeviceIntPtr mouse, GrabPtr grab,
     grabinfo->implicitGrab = autoGrab & ImplicitGrabMask;
     PostNewCursor(mouse);
     UpdateTouchesForGrab(mouse);
+    UpdateGesturesForGrab(mouse);
     CheckGrabForSyncs(mouse, (Bool) grab->pointerMode,
                       (Bool) grab->keyboardMode);
     if (oldgrab)
@@ -1577,13 +1652,13 @@ DeactivatePointerGrab(DeviceIntPtr mouse)
                emulate a ButtonRelease here. So pretend the listener
                already has the end event */
             if (grab->grabtype == CORE || grab->grabtype == XI ||
-                    !xi2mask_isset(mouse->deviceGrab.grab->xi2mask, mouse, XI_TouchBegin)) {
+                    !xi2mask_isset(grab->xi2mask, mouse, XI_TouchBegin)) {
                 mode = XIAcceptTouch;
                 /* NOTE: we set the state here, but
                  * ProcessTouchOwnershipEvent() will still call
                  * TouchEmitTouchEnd for this listener. The other half of
                  * this hack is in DeliverTouchEndEvent */
-                ti->listeners[0].state = LISTENER_HAS_END;
+                ti->listeners[0].state = TOUCH_LISTENER_HAS_END;
             }
             TouchListenerAcceptReject(mouse, ti, 0, mode);
         }
@@ -1600,6 +1675,16 @@ DeactivatePointerGrab(DeviceIntPtr mouse)
         if (dev->deviceGrab.sync.other == grab)
             dev->deviceGrab.sync.other = NullGrab;
     }
+
+    /* in case of explicit gesture grab, send end event to the grab client */
+    if (!wasPassive && mouse->gesture) {
+        GestureInfoPtr gi = &mouse->gesture->gesture;
+        if (gi->active && GestureResourceIsOwner(gi, grab_resource)) {
+            GestureEmitGestureEndToOwner(mouse, gi);
+            GestureEndGesture(gi);
+        }
+    }
+
     DoEnterLeaveEvents(mouse, mouse->id, grab->window,
                        mouse->spriteInfo->sprite->win, NotifyUngrab);
     if (grab->confineTo)
@@ -1813,8 +1898,8 @@ AllowSome(ClientPtr client, TimeStamp time, DeviceIntPtr thisDev, int newState)
      * anything else is accept.
      */
     if (newState != NOT_GRABBED /* Replay */ &&
-        IsTouchEvent((InternalEvent*)grabinfo->sync.event)) {
-        TouchAcceptAndEnd(thisDev, grabinfo->sync.event->touchid);
+        IsTouchEvent(grabinfo->sync.event)) {
+        TouchAcceptAndEnd(thisDev, grabinfo->sync.event->device_event.touchid);
     }
 }
 
@@ -2502,6 +2587,73 @@ FindChildForEvent(SpritePtr pSprite, WindowPtr event)
     return child;
 }
 
+static void
+FixUpXI2DeviceEventFromWindow(SpritePtr pSprite, int evtype,
+                              xXIDeviceEvent *event, WindowPtr pWin, Window child)
+{
+    event->root = RootWindow(pSprite)->drawable.id;
+    event->event = pWin->drawable.id;
+
+    if (evtype == XI_TouchOwnership) {
+        event->child = child;
+        return;
+    }
+
+    if (pSprite->hot.pScreen == pWin->drawable.pScreen) {
+        event->event_x = event->root_x - double_to_fp1616(pWin->drawable.x);
+        event->event_y = event->root_y - double_to_fp1616(pWin->drawable.y);
+        event->child = child;
+    }
+    else {
+        event->event_x = 0;
+        event->event_y = 0;
+        event->child = None;
+    }
+
+    if (event->evtype == XI_Enter || event->evtype == XI_Leave ||
+        event->evtype == XI_FocusIn || event->evtype == XI_FocusOut)
+        ((xXIEnterEvent *) event)->same_screen =
+            (pSprite->hot.pScreen == pWin->drawable.pScreen);
+}
+
+static void
+FixUpXI2PinchEventFromWindow(SpritePtr pSprite, xXIGesturePinchEvent *event,
+                             WindowPtr pWin, Window child)
+{
+    event->root = RootWindow(pSprite)->drawable.id;
+    event->event = pWin->drawable.id;
+
+    if (pSprite->hot.pScreen == pWin->drawable.pScreen) {
+        event->event_x = event->root_x - double_to_fp1616(pWin->drawable.x);
+        event->event_y = event->root_y - double_to_fp1616(pWin->drawable.y);
+        event->child = child;
+    }
+    else {
+        event->event_x = 0;
+        event->event_y = 0;
+        event->child = None;
+    }
+}
+
+static void
+FixUpXI2SwipeEventFromWindow(SpritePtr pSprite, xXIGestureSwipeEvent *event,
+                             WindowPtr pWin, Window child)
+{
+    event->root = RootWindow(pSprite)->drawable.id;
+    event->event = pWin->drawable.id;
+
+    if (pSprite->hot.pScreen == pWin->drawable.pScreen) {
+        event->event_x = event->root_x - double_to_fp1616(pWin->drawable.x);
+        event->event_y = event->root_y - double_to_fp1616(pWin->drawable.y);
+        event->child = child;
+    }
+    else {
+        event->event_x = 0;
+        event->event_y = 0;
+        event->child = None;
+    }
+}
+
 /**
  * Adjust event fields to comply with the window properties.
  *
@@ -2520,8 +2672,6 @@ FixUpEventFromWindow(SpritePtr pSprite,
         child = FindChildForEvent(pSprite, pWin);
 
     if ((evtype = xi2_get_type(xE))) {
-        xXIDeviceEvent *event = (xXIDeviceEvent *) xE;
-
         switch (evtype) {
         case XI_RawKeyPress:
         case XI_RawKeyRelease:
@@ -2537,34 +2687,23 @@ FixUpEventFromWindow(SpritePtr pSprite,
         case XI_BarrierHit:
         case XI_BarrierLeave:
             return;
+        case XI_GesturePinchBegin:
+        case XI_GesturePinchUpdate:
+        case XI_GesturePinchEnd:
+            FixUpXI2PinchEventFromWindow(pSprite,
+                                         (xXIGesturePinchEvent*) xE, pWin, child);
+            break;
+        case XI_GestureSwipeBegin:
+        case XI_GestureSwipeUpdate:
+        case XI_GestureSwipeEnd:
+            FixUpXI2SwipeEventFromWindow(pSprite,
+                                         (xXIGestureSwipeEvent*) xE, pWin, child);
+            break;
         default:
+            FixUpXI2DeviceEventFromWindow(pSprite, evtype,
+                                          (xXIDeviceEvent*) xE, pWin, child);
             break;
         }
-
-        event->root = RootWindow(pSprite)->drawable.id;
-        event->event = pWin->drawable.id;
-
-        if (evtype == XI_TouchOwnership) {
-            event->child = child;
-            return;
-        }
-
-        if (pSprite->hot.pScreen == pWin->drawable.pScreen) {
-            event->event_x = event->root_x - double_to_fp1616(pWin->drawable.x);
-            event->event_y = event->root_y - double_to_fp1616(pWin->drawable.y);
-            event->child = child;
-        }
-        else {
-            event->event_x = 0;
-            event->event_y = 0;
-            event->child = None;
-        }
-
-        if (event->evtype == XI_Enter || event->evtype == XI_Leave ||
-            event->evtype == XI_FocusIn || event->evtype == XI_FocusOut)
-            ((xXIEnterEvent *) event)->same_screen =
-                (pSprite->hot.pScreen == pWin->drawable.pScreen);
-
     }
     else {
         XE_KBPTR.root = RootWindow(pSprite)->drawable.id;
@@ -2764,7 +2903,7 @@ DeliverDeviceEvents(WindowPtr pWin, InternalEvent *event, GrabPtr grab,
 }
 
 /**
- * Deliver event to a window and it's immediate parent. Used for most window
+ * Deliver event to a window and its immediate parent. Used for most window
  * events (CreateNotify, ConfigureNotify, etc.). Not useful for events that
  * propagate up the tree or extension events
  *
@@ -2899,7 +3038,7 @@ BOOL
 ActivateFocusInGrab(DeviceIntPtr dev, WindowPtr old, WindowPtr win)
 {
     BOOL rc = FALSE;
-    DeviceEvent event;
+    InternalEvent event;
 
     if (dev->deviceGrab.grab) {
         if (!dev->deviceGrab.fromPassiveGrab ||
@@ -2914,16 +3053,16 @@ ActivateFocusInGrab(DeviceIntPtr dev, WindowPtr old, WindowPtr win)
     if (win == NoneWin || win == PointerRootWin)
         return FALSE;
 
-    event = (DeviceEvent) {
-        .header = ET_Internal,
-        .type = ET_FocusIn,
-        .length = sizeof(DeviceEvent),
-        .time = GetTimeInMillis(),
-        .deviceid = dev->id,
-        .sourceid = dev->id,
-        .detail.button = 0
+    event = (InternalEvent) {
+        .device_event.header = ET_Internal,
+        .device_event.type = ET_FocusIn,
+        .device_event.length = sizeof(DeviceEvent),
+        .device_event.time = GetTimeInMillis(),
+        .device_event.deviceid = dev->id,
+        .device_event.sourceid = dev->id,
+        .device_event.detail.button = 0
     };
-    rc = (CheckPassiveGrabsOnWindow(win, dev, (InternalEvent *) &event, FALSE,
+    rc = (CheckPassiveGrabsOnWindow(win, dev, &event, FALSE,
                                     TRUE) != NULL);
     if (rc)
         DoEnterLeaveEvents(dev, dev->id, old, win, XINotifyPassiveGrab);
@@ -2940,7 +3079,7 @@ static BOOL
 ActivateEnterGrab(DeviceIntPtr dev, WindowPtr old, WindowPtr win)
 {
     BOOL rc = FALSE;
-    DeviceEvent event;
+    InternalEvent event;
 
     if (dev->deviceGrab.grab) {
         if (!dev->deviceGrab.fromPassiveGrab ||
@@ -2952,16 +3091,16 @@ ActivateEnterGrab(DeviceIntPtr dev, WindowPtr old, WindowPtr win)
         (*dev->deviceGrab.DeactivateGrab) (dev);
     }
 
-    event = (DeviceEvent) {
-        .header = ET_Internal,
-        .type = ET_Enter,
-        .length = sizeof(DeviceEvent),
-        .time = GetTimeInMillis(),
-        .deviceid = dev->id,
-        .sourceid = dev->id,
-        .detail.button = 0
+    event = (InternalEvent) {
+        .device_event.header = ET_Internal,
+        .device_event.type = ET_Enter,
+        .device_event.length = sizeof(DeviceEvent),
+        .device_event.time = GetTimeInMillis(),
+        .device_event.deviceid = dev->id,
+        .device_event.sourceid = dev->id,
+        .device_event.detail.button = 0
     };
-    rc = (CheckPassiveGrabsOnWindow(win, dev, (InternalEvent *) &event, FALSE,
+    rc = (CheckPassiveGrabsOnWindow(win, dev, &event, FALSE,
                                     TRUE) != NULL);
     if (rc)
         DoEnterLeaveEvents(dev, dev->id, old, win, XINotifyPassiveGrab);
@@ -3663,7 +3802,6 @@ ActivatePassiveGrab(DeviceIntPtr device, GrabPtr grab, InternalEvent *event,
                     InternalEvent *real_event)
 {
     SpritePtr pSprite = device->spriteInfo->sprite;
-    GrabInfoPtr grabinfo = &device->deviceGrab;
     xEvent *xE = NULL;
     int count;
     int rc;
@@ -3713,8 +3851,7 @@ ActivatePassiveGrab(DeviceIntPtr device, GrabPtr grab, InternalEvent *event,
         }
     }
 
-    (*grabinfo->ActivateGrab) (device, grab,
-                               ClientTimeToServerTime(event->any.time), TRUE);
+    ActivateGrabNoDelivery(device, grab, event, real_event);
 
     if (xE) {
         FixUpEventFromWindow(pSprite, xE, grab->window, None, TRUE);
@@ -3725,14 +3862,31 @@ ActivatePassiveGrab(DeviceIntPtr device, GrabPtr grab, InternalEvent *event,
                         GetEventFilter(device, xE), grab);
     }
 
-    if (grabinfo->sync.state == FROZEN_NO_EVENT)
-        grabinfo->sync.state = FROZEN_WITH_EVENT;
-    *grabinfo->sync.event = real_event->device_event;
-
     free(xE);
     return TRUE;
 }
 
+/**
+ * Activates a grab without event delivery.
+ *
+ * @param device The device of the event to check.
+ * @param grab The grab to check.
+ * @param event The current device event.
+ * @param real_event The original event, in case of touch emulation. The
+ * real event is the one stored in the sync queue.
+ */
+void ActivateGrabNoDelivery(DeviceIntPtr dev, GrabPtr grab,
+                            InternalEvent *event, InternalEvent *real_event)
+{
+    GrabInfoPtr grabinfo = &dev->deviceGrab;
+    (*grabinfo->ActivateGrab) (dev, grab,
+                               ClientTimeToServerTime(event->any.time), TRUE);
+
+    if (grabinfo->sync.state == FROZEN_NO_EVENT)
+        grabinfo->sync.state = FROZEN_WITH_EVENT;
+    CopyPartialInternalEvent(grabinfo->sync.event, real_event);
+}
+
 static BOOL
 CoreGrabInterferes(DeviceIntPtr device, GrabPtr grab)
 {
@@ -3977,7 +4131,7 @@ CheckPassiveGrabsOnWindow(WindowPtr pWin,
  *
  * If the event is a keyboard event, the ancestors of the focus window are
  * traced down and tried to see if they have any passive grabs to be
- * activated.  If the focus window itself is reached and it's descendants
+ * activated.  If the focus window itself is reached and its descendants
  * contain the pointer, the ancestors of the window that the pointer is in
  * are then traced down starting at the focus window, otherwise no grabs are
  * activated.
@@ -3998,14 +4152,15 @@ CheckPassiveGrabsOnWindow(WindowPtr pWin,
 */
 
 Bool
-CheckDeviceGrabs(DeviceIntPtr device, DeviceEvent *event, WindowPtr ancestor)
+CheckDeviceGrabs(DeviceIntPtr device, InternalEvent *ievent, WindowPtr ancestor)
 {
     int i;
     WindowPtr pWin = NULL;
     FocusClassPtr focus =
-        IsPointerEvent((InternalEvent *) event) ? NULL : device->focus;
+        IsPointerEvent(ievent) ? NULL : device->focus;
     BOOL sendCore = (IsMaster(device) && device->coreEvents);
     Bool ret = FALSE;
+    DeviceEvent *event = &ievent->device_event;
 
     if (event->type != ET_ButtonPress && event->type != ET_KeyPress)
         return FALSE;
@@ -4028,7 +4183,7 @@ CheckDeviceGrabs(DeviceIntPtr device, DeviceEvent *event, WindowPtr ancestor)
     if (focus) {
         for (; i < focus->traceGood; i++) {
             pWin = focus->trace[i];
-            if (CheckPassiveGrabsOnWindow(pWin, device, (InternalEvent *) event,
+            if (CheckPassiveGrabsOnWindow(pWin, device, ievent,
                                           sendCore, TRUE)) {
                 ret = TRUE;
                 goto out;
@@ -4043,7 +4198,7 @@ CheckDeviceGrabs(DeviceIntPtr device, DeviceEvent *event, WindowPtr ancestor)
 
     for (; i < device->spriteInfo->sprite->spriteTraceGood; i++) {
         pWin = device->spriteInfo->sprite->spriteTrace[i];
-        if (CheckPassiveGrabsOnWindow(pWin, device, (InternalEvent *) event,
+        if (CheckPassiveGrabsOnWindow(pWin, device, ievent,
                                       sendCore, TRUE)) {
             ret = TRUE;
             goto out;
@@ -4235,7 +4390,6 @@ DeliverGrabbedEvent(InternalEvent *event, DeviceIntPtr thisDev,
     GrabPtr grab;
     GrabInfoPtr grabinfo;
     int deliveries = 0;
-    DeviceIntPtr dev;
     SpritePtr pSprite = thisDev->spriteInfo->sprite;
     BOOL sendCore = FALSE;
 
@@ -4283,30 +4437,40 @@ DeliverGrabbedEvent(InternalEvent *event, DeviceIntPtr thisDev,
          event->any.type == ET_KeyRelease ||
          event->any.type == ET_ButtonPress ||
          event->any.type == ET_ButtonRelease)) {
-        switch (grabinfo->sync.state) {
-        case FREEZE_BOTH_NEXT_EVENT:
-            dev = GetPairedDevice(thisDev);
-            if (dev) {
-                FreezeThaw(dev, TRUE);
-                if ((dev->deviceGrab.sync.state == FREEZE_BOTH_NEXT_EVENT) &&
-                    (CLIENT_BITS(grab->resource) ==
-                     CLIENT_BITS(dev->deviceGrab.grab->resource)))
-                    dev->deviceGrab.sync.state = FROZEN_NO_EVENT;
-                else
-                    dev->deviceGrab.sync.other = grab;
-            }
-            /* fall through */
-        case FREEZE_NEXT_EVENT:
-            grabinfo->sync.state = FROZEN_WITH_EVENT;
-            FreezeThaw(thisDev, TRUE);
-            *grabinfo->sync.event = event->device_event;
-            break;
-        }
+        FreezeThisEventIfNeededForSyncGrab(thisDev, event);
     }
 
     return deliveries;
 }
 
+void
+FreezeThisEventIfNeededForSyncGrab(DeviceIntPtr thisDev, InternalEvent *event)
+{
+    GrabInfoPtr grabinfo = &thisDev->deviceGrab;
+    GrabPtr grab = grabinfo->grab;
+    DeviceIntPtr dev;
+
+    switch (grabinfo->sync.state) {
+    case FREEZE_BOTH_NEXT_EVENT:
+        dev = GetPairedDevice(thisDev);
+        if (dev) {
+            FreezeThaw(dev, TRUE);
+            if ((dev->deviceGrab.sync.state == FREEZE_BOTH_NEXT_EVENT) &&
+                (CLIENT_BITS(grab->resource) ==
+                 CLIENT_BITS(dev->deviceGrab.grab->resource)))
+                dev->deviceGrab.sync.state = FROZEN_NO_EVENT;
+            else
+                dev->deviceGrab.sync.other = grab;
+        }
+        /* fall through */
+    case FREEZE_NEXT_EVENT:
+        grabinfo->sync.state = FROZEN_WITH_EVENT;
+        FreezeThaw(thisDev, TRUE);
+        CopyPartialInternalEvent(grabinfo->sync.event, event);
+        break;
+    }
+}
+
 /* This function is used to set the key pressed or key released state -
    this is only used when the pressing of keys does not cause
    the device's processInputProc to be called, as in for example Mouse Keys.
@@ -5398,7 +5562,7 @@ ProcSendEvent(ClientPtr client)
             return Success;
 
         /* If the input focus is PointerRootWin, send the event to where
-           the pointer is if possible, then perhaps propogate up to root. */
+           the pointer is if possible, then perhaps propagate up to root. */
         if (inputFocus == PointerRootWin)
             inputFocus = GetCurrentRootWindow(dev);
 
diff --git a/dix/gestures.c b/dix/gestures.c
new file mode 100644
index 0000000..593a4a6
--- /dev/null
+++ b/dix/gestures.c
@@ -0,0 +1,362 @@
+/*
+ * Copyright © 2011 Collabra Ltd.
+ * Copyright © 2011 Red Hat, Inc.
+ * Copyright © 2020 Povilas Kanapickas  <povilas@radix.lt>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include "inputstr.h"
+#include "scrnintstr.h"
+#include "dixgrabs.h"
+
+#include "eventstr.h"
+#include "exevents.h"
+#include "exglobals.h"
+#include "inpututils.h"
+#include "eventconvert.h"
+#include "windowstr.h"
+#include "mi.h"
+
+#define GESTURE_HISTORY_SIZE 100
+
+Bool
+GestureInitGestureInfo(GestureInfoPtr gi)
+{
+    memset(gi, 0, sizeof(*gi));
+
+    gi->sprite.spriteTrace = calloc(32, sizeof(*gi->sprite.spriteTrace));
+    if (!gi->sprite.spriteTrace) {
+        return FALSE;
+    }
+    gi->sprite.spriteTraceSize = 32;
+    gi->sprite.spriteTrace[0] = screenInfo.screens[0]->root;
+    gi->sprite.hot.pScreen = screenInfo.screens[0];
+    gi->sprite.hotPhys.pScreen = screenInfo.screens[0];
+
+    return TRUE;
+}
+
+/**
+ * Given an event type returns the associated gesture event info.
+ */
+GestureInfoPtr
+GestureFindActiveByEventType(DeviceIntPtr dev, int type)
+{
+    GestureClassPtr g = dev->gesture;
+    enum EventType type_to_expect = GestureTypeToBegin(type);
+
+    if (!g || type_to_expect == 0 || !g->gesture.active ||
+        g->gesture.type != type_to_expect) {
+        return NULL;
+    }
+
+    return &g->gesture;
+}
+
+/**
+ * Sets up gesture info for a new gesture. Returns NULL on failure.
+ */
+GestureInfoPtr
+GestureBeginGesture(DeviceIntPtr dev, InternalEvent *ev)
+{
+    GestureClassPtr g = dev->gesture;
+    enum EventType gesture_type = GestureTypeToBegin(ev->any.type);
+
+    /* Note that we ignore begin events when an existing gesture is active */
+    if (!g || gesture_type == 0 || g->gesture.active)
+        return NULL;
+
+    g->gesture.type = gesture_type;
+
+    if (!GestureBuildSprite(dev, &g->gesture))
+        return NULL;
+
+    g->gesture.active = TRUE;
+    g->gesture.num_touches = ev->gesture_event.num_touches;
+    g->gesture.sourceid = ev->gesture_event.sourceid;
+    g->gesture.has_listener = FALSE;
+    return &g->gesture;
+}
+
+/**
+ * Releases a gesture: this must only be called after all events
+ * related to that gesture have been sent and finalised.
+ */
+void
+GestureEndGesture(GestureInfoPtr gi)
+{
+    if (gi->has_listener) {
+        if (gi->listener.grab) {
+            FreeGrab(gi->listener.grab);
+            gi->listener.grab = NULL;
+        }
+        gi->listener.listener = 0;
+        gi->has_listener = FALSE;
+    }
+
+    gi->active = FALSE;
+    gi->num_touches = 0;
+    gi->sprite.spriteTraceGood = 0;
+}
+
+/**
+ * Ensure a window trace is present in gi->sprite, constructing one for
+ * Gesture{Pinch,Swipe}Begin events.
+ */
+Bool
+GestureBuildSprite(DeviceIntPtr sourcedev, GestureInfoPtr gi)
+{
+    SpritePtr sprite = &gi->sprite;
+
+    if (!sourcedev->spriteInfo->sprite)
+        return FALSE;
+
+    if (!CopySprite(sourcedev->spriteInfo->sprite, sprite))
+        return FALSE;
+
+    if (sprite->spriteTraceGood <= 0)
+        return FALSE;
+
+    return TRUE;
+}
+
+/**
+ * @returns TRUE if the specified grab or selection is the current owner of
+ * the gesture sequence.
+ */
+Bool
+GestureResourceIsOwner(GestureInfoPtr gi, XID resource)
+{
+    return (gi->listener.listener == resource);
+}
+
+void
+GestureAddListener(GestureInfoPtr gi, XID resource, int resource_type,
+                   enum GestureListenerType type, WindowPtr window, const GrabPtr grab)
+{
+    GrabPtr g = NULL;
+
+    BUG_RETURN(gi->has_listener);
+
+    /* We need a copy of the grab, not the grab itself since that may be deleted by
+     * a UngrabButton request and leaves us with a dangling pointer */
+    if (grab)
+        g = AllocGrab(grab);
+
+    gi->listener.listener = resource;
+    gi->listener.resource_type = resource_type;
+    gi->listener.type = type;
+    gi->listener.window = window;
+    gi->listener.grab = g;
+    gi->has_listener = TRUE;
+}
+
+static void
+GestureAddGrabListener(DeviceIntPtr dev, GestureInfoPtr gi, GrabPtr grab)
+{
+    enum GestureListenerType type;
+
+    /* FIXME: owner_events */
+
+    if (grab->grabtype == XI2) {
+        if (xi2mask_isset(grab->xi2mask, dev, XI_GesturePinchBegin) ||
+            xi2mask_isset(grab->xi2mask, dev, XI_GestureSwipeBegin)) {
+            type = GESTURE_LISTENER_GRAB;
+        } else
+            type = GESTURE_LISTENER_NONGESTURE_GRAB;
+    }
+    else if (grab->grabtype == XI || grab->grabtype == CORE) {
+        type = GESTURE_LISTENER_NONGESTURE_GRAB;
+    }
+    else {
+        BUG_RETURN_MSG(1, "Unsupported grab type\n");
+    }
+
+    /* grab listeners are always RT_NONE since we keep the grab pointer */
+    GestureAddListener(gi, grab->resource, RT_NONE, type, grab->window, grab);
+}
+
+/**
+ * Add one listener if there is a grab on the given window.
+ */
+static void
+GestureAddPassiveGrabListener(DeviceIntPtr dev, GestureInfoPtr gi, WindowPtr win, InternalEvent *ev)
+{
+    Bool activate = FALSE;
+    Bool check_core = FALSE;
+
+    GrabPtr grab = CheckPassiveGrabsOnWindow(win, dev, ev, check_core,
+                                             activate);
+    if (!grab)
+        return;
+
+    /* We'll deliver later in gesture-specific code */
+    ActivateGrabNoDelivery(dev, grab, ev, ev);
+    GestureAddGrabListener(dev, gi, grab);
+}
+
+static void
+GestureAddRegularListener(DeviceIntPtr dev, GestureInfoPtr gi, WindowPtr win, InternalEvent *ev)
+{
+    InputClients *iclients = NULL;
+    OtherInputMasks *inputMasks = NULL;
+    uint16_t evtype = GetXI2Type(ev->any.type);
+    int mask;
+
+    mask = EventIsDeliverable(dev, ev->any.type, win);
+    if (!mask)
+        return;
+
+    inputMasks = wOtherInputMasks(win);
+
+    if (mask & EVENT_XI2_MASK) {
+        nt_list_for_each_entry(iclients, inputMasks->inputClients, next) {
+            if (!xi2mask_isset(iclients->xi2mask, dev, evtype))
+                continue;
+
+            GestureAddListener(gi, iclients->resource, RT_INPUTCLIENT,
+                               GESTURE_LISTENER_REGULAR, win, NULL);
+            return;
+        }
+    }
+}
+
+void
+GestureSetupListener(DeviceIntPtr dev, GestureInfoPtr gi, InternalEvent *ev)
+{
+    int i;
+    SpritePtr sprite = &gi->sprite;
+    WindowPtr win;
+
+    /* Any current grab will consume all gesture events */
+    if (dev->deviceGrab.grab) {
+        GestureAddGrabListener(dev, gi, dev->deviceGrab.grab);
+        return;
+    }
+
+    /* Find passive grab that would be activated by this event, if any. If we're handling
+     * ReplayDevice then the search starts from the descendant of the grab window, otherwise
+     * the search starts at the root window. The search ends at deepest child window. */
+    i = 0;
+    if (syncEvents.playingEvents) {
+        while (i < dev->spriteInfo->sprite->spriteTraceGood) {
+            if (dev->spriteInfo->sprite->spriteTrace[i++] == syncEvents.replayWin)
+                break;
+        }
+    }
+
+    for (; i < sprite->spriteTraceGood; i++) {
+        win = sprite->spriteTrace[i];
+        GestureAddPassiveGrabListener(dev, gi, win, ev);
+        if (gi->has_listener)
+            return;
+    }
+
+    /* Find the first client with an applicable event selection,
+     * going from deepest child window back up to the root window. */
+    for (i = sprite->spriteTraceGood - 1; i >= 0; i--) {
+        win = sprite->spriteTrace[i];
+        GestureAddRegularListener(dev, gi, win, ev);
+        if (gi->has_listener)
+            return;
+    }
+}
+
+/* As gesture grabs don't turn into active grabs with their own resources, we
+ * need to walk all the gestures and remove this grab from listener */
+void
+GestureListenerGone(XID resource)
+{
+    GestureInfoPtr gi;
+    DeviceIntPtr dev;
+    InternalEvent *events = InitEventList(GetMaximumEventsNum());
+
+    if (!events)
+        FatalError("GestureListenerGone: couldn't allocate events\n");
+
+    for (dev = inputInfo.devices; dev; dev = dev->next) {
+        if (!dev->gesture)
+            continue;
+
+        gi = &dev->gesture->gesture;
+        if (!gi->active)
+            continue;
+
+        if (CLIENT_BITS(gi->listener.listener) == resource)
+            GestureEndGesture(gi);
+    }
+
+    FreeEventList(events, GetMaximumEventsNum());
+}
+
+/**
+ * End physically active gestures for a device.
+ */
+void
+GestureEndActiveGestures(DeviceIntPtr dev)
+{
+    GestureClassPtr g = dev->gesture;
+    InternalEvent *eventlist;
+
+    if (!g)
+        return;
+
+    eventlist = InitEventList(GetMaximumEventsNum());
+
+    input_lock();
+    mieqProcessInputEvents();
+    if (g->gesture.active) {
+        int j;
+        int type = GetXI2Type(GestureTypeToEnd(g->gesture.type));
+        int nevents = GetGestureEvents(eventlist, dev, type, g->gesture.num_touches,
+                                       0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
+
+        for (j = 0; j < nevents; j++)
+            mieqProcessDeviceEvent(dev, eventlist + j, NULL);
+    }
+    input_unlock();
+
+    FreeEventList(eventlist, GetMaximumEventsNum());
+}
+
+/**
+ * Generate and deliver a Gesture{Pinch,Swipe}End event to the owner.
+ *
+ * @param dev The device to deliver the event for.
+ * @param gi The gesture record to deliver the event for.
+ */
+void
+GestureEmitGestureEndToOwner(DeviceIntPtr dev, GestureInfoPtr gi)
+{
+    InternalEvent event;
+    /* We're not processing a gesture end for a frozen device */
+    if (dev->deviceGrab.sync.frozen)
+        return;
+
+    DeliverDeviceClassesChangedEvent(gi->sourceid, GetTimeInMillis());
+    InitGestureEvent(&event, dev, GetTimeInMillis(), GestureTypeToEnd(gi->type),
+                     0, 0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
+    DeliverGestureEventToOwner(dev, gi, &event);
+}
diff --git a/dix/getevents.c b/dix/getevents.c
index f83dac7..32bafe2 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -1071,7 +1071,7 @@ GetKeyboardEvents(InternalEvent *events, DeviceIntPtr pDev, int type,
     RawDeviceEvent *raw;
     enum DeviceEventSource source_type = EVENT_SOURCE_NORMAL;
 
-#if XSERVER_DTRACE
+#ifdef XSERVER_DTRACE
     if (XSERVER_INPUT_EVENT_ENABLED()) {
         XSERVER_INPUT_EVENT(pDev->id, type, key_code, 0, 0,
                             NULL, NULL);
@@ -1328,7 +1328,7 @@ QueuePointerEvents(DeviceIntPtr device, int type,
  * rescaled to match Sx/Sy for [n..m]. In the simplest example, x of (m/2-1)
  * is the last coordinate on the first screen and must be rescaled for the
  * event to be m. XI2 clients that do their own coordinate mapping would
- * otherwise interpret the position of the device elsewere to the cursor.
+ * otherwise interpret the position of the device elsewhere to the cursor.
  * However, this scaling leads to losses:
  * if we have two ScreenRecs we scale from e.g. [0..44704]  (Wacom I4) to
  * [0..2048[. that gives us 2047.954 as desktop coord, or the per-screen
@@ -1343,7 +1343,7 @@ fill_pointer_events(InternalEvent *events, DeviceIntPtr pDev, int type,
                     int buttons, CARD32 ms, int flags,
                     const ValuatorMask *mask_in)
 {
-    int num_events = 1;
+    int num_events = 0;
     DeviceEvent *event;
     RawDeviceEvent *raw = NULL;
     double screenx = 0.0, screeny = 0.0;        /* desktop coordinate system */
@@ -1386,6 +1386,10 @@ fill_pointer_events(InternalEvent *events, DeviceIntPtr pDev, int type,
         num_events++;
 
         init_raw(pDev, raw, ms, type, buttons);
+
+        if (flags & POINTER_EMULATED)
+            raw->flags = XIPointerEmulated;
+
         set_raw_valuators(raw, &mask, TRUE, raw->valuators.data_raw);
     }
 
@@ -1446,7 +1450,7 @@ fill_pointer_events(InternalEvent *events, DeviceIntPtr pDev, int type,
 
     storeLastValuators(pDev, &mask, 0, 1, devx, devy);
 
-    /* Update the MD's co-ordinates, which are always in desktop space. */
+    /* Update the MD's coordinates, which are always in desktop space. */
     if (!IsMaster(pDev) && !IsFloating(pDev)) {
         DeviceIntPtr master = GetMaster(pDev, MASTER_POINTER);
 
@@ -1454,35 +1458,36 @@ fill_pointer_events(InternalEvent *events, DeviceIntPtr pDev, int type,
         master->last.valuators[1] = screeny;
     }
 
-    event = &events->device_event;
-    init_device_event(event, pDev, ms, EVENT_SOURCE_NORMAL);
+    if ((flags & POINTER_RAWONLY) == 0) {
+        num_events++;
 
-    if (type == MotionNotify) {
-        event->type = ET_Motion;
-        event->detail.button = 0;
-    }
-    else {
-        if (type == ButtonPress) {
-            event->type = ET_ButtonPress;
-            set_button_down(pDev, buttons, BUTTON_POSTED);
+        event = &events->device_event;
+        init_device_event(event, pDev, ms, EVENT_SOURCE_NORMAL);
+
+        if (type == MotionNotify) {
+            event->type = ET_Motion;
+            event->detail.button = 0;
         }
-        else if (type == ButtonRelease) {
-            event->type = ET_ButtonRelease;
-            set_button_up(pDev, buttons, BUTTON_POSTED);
+        else {
+            if (type == ButtonPress) {
+                event->type = ET_ButtonPress;
+                set_button_down(pDev, buttons, BUTTON_POSTED);
+            }
+            else if (type == ButtonRelease) {
+                event->type = ET_ButtonRelease;
+                set_button_up(pDev, buttons, BUTTON_POSTED);
+            }
+            event->detail.button = buttons;
         }
-        event->detail.button = buttons;
-    }
 
-    /* root_x and root_y must be in per-screen co-ordinates */
-    event_set_root_coordinates(event, screenx - scr->x, screeny - scr->y);
+        /* root_x and root_y must be in per-screen coordinates */
+        event_set_root_coordinates(event, screenx - scr->x, screeny - scr->y);
 
-    if (flags & POINTER_EMULATED) {
-        if (raw)
-            raw->flags = XIPointerEmulated;
-        event->flags = XIPointerEmulated;
-    }
+        if (flags & POINTER_EMULATED)
+            event->flags = XIPointerEmulated;
 
-    set_valuators(pDev, event, &mask);
+        set_valuators(pDev, event, &mask);
+    }
 
     return num_events;
 }
@@ -1615,7 +1620,7 @@ GetPointerEvents(InternalEvent *events, DeviceIntPtr pDev, int type,
     int i;
     int realtype = type;
 
-#if XSERVER_DTRACE
+#ifdef XSERVER_DTRACE
     if (XSERVER_INPUT_EVENT_ENABLED()) {
         XSERVER_INPUT_EVENT(pDev->id, type, buttons, flags,
                             mask_in ? mask_in->last_bit + 1 : 0,
@@ -1755,7 +1760,7 @@ GetProximityEvents(InternalEvent *events, DeviceIntPtr pDev, int type,
     DeviceEvent *event;
     ValuatorMask mask;
 
-#if XSERVER_DTRACE
+#ifdef XSERVER_DTRACE
     if (XSERVER_INPUT_EVENT_ENABLED()) {
         XSERVER_INPUT_EVENT(pDev->id, type, 0, 0,
                             mask_in ? mask_in->last_bit + 1 : 0,
@@ -1869,7 +1874,7 @@ int
 GetTouchEvents(InternalEvent *events, DeviceIntPtr dev, uint32_t ddx_touchid,
                uint16_t type, uint32_t flags, const ValuatorMask *mask_in)
 {
-    ScreenPtr scr = dev->spriteInfo->sprite->hotPhys.pScreen;
+    ScreenPtr scr;
     TouchClassPtr t = dev->touch;
     ValuatorClassPtr v = dev->valuator;
     DeviceEvent *event;
@@ -1885,7 +1890,7 @@ GetTouchEvents(InternalEvent *events, DeviceIntPtr dev, uint32_t ddx_touchid,
     Bool emulate_pointer = FALSE;
     int client_id = 0;
 
-#if XSERVER_DTRACE
+#ifdef XSERVER_DTRACE
     if (XSERVER_INPUT_EVENT_ENABLED()) {
         XSERVER_INPUT_EVENT(dev->id, type, ddx_touchid, flags,
                             mask_in ? mask_in->last_bit + 1 : 0,
@@ -1931,7 +1936,7 @@ GetTouchEvents(InternalEvent *events, DeviceIntPtr dev, uint32_t ddx_touchid,
     switch (type) {
     case XI_TouchBegin:
         event->type = ET_TouchBegin;
-        /* If we're starting a touch, we must have x & y co-ordinates. */
+        /* If we're starting a touch, we must have x & y coordinates. */
         if (!mask_in ||
             !valuator_mask_isset(mask_in, 0) ||
             !valuator_mask_isset(mask_in, 1)) {
@@ -1957,7 +1962,7 @@ GetTouchEvents(InternalEvent *events, DeviceIntPtr dev, uint32_t ddx_touchid,
         return 0;
     }
 
-    /* Get our screen event co-ordinates (root_x/root_y/event_x/event_y):
+    /* Get our screen event coordinates (root_x/root_y/event_x/event_y):
      * these come from the touchpoint in Absolute mode, or the sprite in
      * Relative. */
     if (t->mode == XIDirectTouch) {
@@ -1984,6 +1989,8 @@ GetTouchEvents(InternalEvent *events, DeviceIntPtr dev, uint32_t ddx_touchid,
     if (need_rawevent)
         set_raw_valuators(raw, &mask, FALSE, raw->valuators.data);
 
+    scr = dev->spriteInfo->sprite->hotPhys.pScreen;
+
     /* Indirect device touch coordinates are not used for cursor positioning.
      * They are merely informational, and are provided in device coordinates.
      * The device sprite is used for positioning instead, and it is already
@@ -2003,7 +2010,7 @@ GetTouchEvents(InternalEvent *events, DeviceIntPtr dev, uint32_t ddx_touchid,
     if (emulate_pointer)
         storeLastValuators(dev, &mask, 0, 1, devx, devy);
 
-    /* Update the MD's co-ordinates, which are always in desktop space. */
+    /* Update the MD's coordinates, which are always in desktop space. */
     if (emulate_pointer && !IsMaster(dev) && !IsFloating(dev)) {
 	    DeviceIntPtr master = GetMaster(dev, MASTER_POINTER);
 
@@ -2094,3 +2101,139 @@ PostSyntheticMotion(DeviceIntPtr pDev,
     /* FIXME: MD/SD considerations? */
     (*pDev->public.processInputProc) ((InternalEvent *) &ev, pDev);
 }
+
+void
+InitGestureEvent(InternalEvent *ievent, DeviceIntPtr dev, CARD32 ms,
+                 int type, uint16_t num_touches, uint32_t flags,
+                 double delta_x, double delta_y,
+                 double delta_unaccel_x, double delta_unaccel_y,
+                 double scale, double delta_angle)
+{
+    ScreenPtr scr = dev->spriteInfo->sprite->hotPhys.pScreen;
+    GestureEvent *event = &ievent->gesture_event;
+    double screenx = 0.0, screeny = 0.0;        /* desktop coordinate system */
+
+    init_gesture_event(event, dev, ms);
+
+    screenx = dev->spriteInfo->sprite->hotPhys.x;
+    screeny = dev->spriteInfo->sprite->hotPhys.y;
+
+    event->type = type;
+    event->root = scr->root->drawable.id;
+    event->root_x = screenx - scr->x;
+    event->root_y = screeny - scr->y;
+    event->num_touches = num_touches;
+    event->flags = flags;
+
+    event->delta_x = delta_x;
+    event->delta_y = delta_y;
+    event->delta_unaccel_x = delta_unaccel_x;
+    event->delta_unaccel_y = delta_unaccel_y;
+    event->scale = scale;
+    event->delta_angle = delta_angle;
+}
+
+/**
+ * Get events for a pinch or swipe gesture.
+ *
+ * events is not NULL-terminated; the return value is the number of events.
+ * The DDX is responsible for allocating the event structure in the first
+ * place via GetMaximumEventsNum(), and for freeing it.
+ *
+ * @param[out] events The list of events generated
+ * @param dev The device to generate the events for
+ * @param type XI_Gesture{Pinch,Swipe}{Begin,Update,End}
+ * @prama num_touches The number of touches in the gesture
+ * @param flags Event flags
+ * @param delta_x,delta_y accelerated relative motion delta
+ * @param delta_unaccel_x,delta_unaccel_y unaccelerated relative motion delta
+ * @param scale (valid only to pinch events) absolute scale of a pinch gesture
+ * @param delta_angle (valid only to pinch events) the ange delta in degrees between the last and
+ *        the current pinch event.
+ */
+int
+GetGestureEvents(InternalEvent *events, DeviceIntPtr dev,
+                 uint16_t type, uint16_t num_touches, uint32_t flags,
+                 double delta_x, double delta_y,
+                 double delta_unaccel_x, double delta_unaccel_y,
+                 double scale, double delta_angle)
+
+{
+    GestureClassPtr g = dev->gesture;
+    CARD32 ms = GetTimeInMillis();
+    enum EventType evtype;
+    int num_events = 0;
+    uint32_t evflags = 0;
+
+    if (!dev->enabled || !g)
+        return 0;
+
+    if (!IsMaster(dev))
+        events = UpdateFromMaster(events, dev, DEVCHANGE_POINTER_EVENT,
+                                  &num_events);
+
+    switch (type) {
+    case XI_GesturePinchBegin:
+        evtype = ET_GesturePinchBegin;
+        break;
+    case XI_GesturePinchUpdate:
+        evtype = ET_GesturePinchUpdate;
+        break;
+    case XI_GesturePinchEnd:
+        evtype = ET_GesturePinchEnd;
+        if (flags & XIGesturePinchEventCancelled)
+            evflags |= GESTURE_CANCELLED;
+        break;
+    case XI_GestureSwipeBegin:
+        evtype = ET_GestureSwipeBegin;
+        break;
+    case XI_GestureSwipeUpdate:
+        evtype = ET_GestureSwipeUpdate;
+        break;
+    case XI_GestureSwipeEnd:
+        evtype = ET_GestureSwipeEnd;
+        if (flags & XIGestureSwipeEventCancelled)
+            evflags |= GESTURE_CANCELLED;
+        break;
+    default:
+        return 0;
+    }
+
+    InitGestureEvent(events, dev, ms, evtype, num_touches, evflags,
+                     delta_x, delta_y, delta_unaccel_x, delta_unaccel_y,
+                     scale, delta_angle);
+    num_events++;
+
+    return num_events;
+}
+
+void
+QueueGesturePinchEvents(DeviceIntPtr dev, uint16_t type,
+                        uint16_t num_touches, uint32_t flags,
+                        double delta_x, double delta_y,
+                        double delta_unaccel_x,
+                        double delta_unaccel_y,
+                        double scale, double delta_angle)
+{
+    int nevents;
+    nevents = GetGestureEvents(InputEventList, dev, type, num_touches, flags,
+                               delta_x, delta_y,
+                               delta_unaccel_x, delta_unaccel_y,
+                               scale, delta_angle);
+    queueEventList(dev, InputEventList, nevents);
+}
+
+void
+QueueGestureSwipeEvents(DeviceIntPtr dev, uint16_t type,
+                        uint16_t num_touches, uint32_t flags,
+                        double delta_x, double delta_y,
+                        double delta_unaccel_x,
+                        double delta_unaccel_y)
+{
+    int nevents;
+    nevents = GetGestureEvents(InputEventList, dev, type, num_touches, flags,
+                               delta_x, delta_y,
+                               delta_unaccel_x, delta_unaccel_y,
+                               0.0, 0.0);
+    queueEventList(dev, InputEventList, nevents);
+}
diff --git a/dix/globals.c b/dix/globals.c
index acd5c44..4b8b52e 100644
--- a/dix/globals.c
+++ b/dix/globals.c
@@ -55,7 +55,6 @@ SOFTWARE.
 #include "scrnintstr.h"
 #include "input.h"
 #include "dixfont.h"
-#include "site.h"
 #include "dixstruct.h"
 #include "os.h"
 
@@ -93,18 +92,17 @@ CARD32 ScreenSaverInterval;
 int ScreenSaverBlanking;
 int ScreenSaverAllowExposures;
 
-CARD32 defaultScreenSaverTime = DEFAULT_SCREEN_SAVER_TIME;
-CARD32 defaultScreenSaverInterval = DEFAULT_SCREEN_SAVER_INTERVAL;
-int defaultScreenSaverBlanking = DEFAULT_SCREEN_SAVER_BLANKING;
-int defaultScreenSaverAllowExposures = DEFAULT_SCREEN_SAVER_EXPOSURES;
+/* default time of 10 minutes */
+CARD32 defaultScreenSaverTime = (10 * (60 * 1000));
+CARD32 defaultScreenSaverInterval = (10 * (60 * 1000));
+int defaultScreenSaverBlanking = PreferBlanking;
+int defaultScreenSaverAllowExposures = AllowExposures;
 
 #ifdef SCREENSAVER
 Bool screenSaverSuspended = FALSE;
 #endif
 
 const char *defaultFontPath = COMPILEDDEFAULTFONTPATH;
-const char *defaultTextFont = COMPILEDDEFAULTFONT;
-const char *defaultCursorFont = COMPILEDCURSORFONT;
 FontPtr defaultFont;            /* not declared in dix.h to avoid including font.h in
                                    every compilation of dix code */
 CursorPtr rootCursor;
@@ -120,5 +118,3 @@ const char *display;
 int displayfd = -1;
 Bool explicit_display = FALSE;
 char *ConnectionInfo;
-
-CARD32 TimeOutValue = DEFAULT_TIMEOUT * MILLI_PER_SECOND;
diff --git a/dix/grabs.c b/dix/grabs.c
index 2a307a2..53ba1d6 100644
--- a/dix/grabs.c
+++ b/dix/grabs.c
@@ -716,3 +716,10 @@ GrabIsKeyboardGrab(GrabPtr grab)
     return (grab->type == KeyPress ||
             grab->type == DeviceKeyPress || grab->type == XI_KeyPress);
 }
+
+Bool
+GrabIsGestureGrab(GrabPtr grab)
+{
+    return (grab->type == XI_GesturePinchBegin ||
+            grab->type == XI_GestureSwipeBegin);
+}
diff --git a/dix/inpututils.c b/dix/inpututils.c
index c51c835..9026f65 100644
--- a/dix/inpututils.c
+++ b/dix/inpututils.c
@@ -124,10 +124,10 @@ ApplyPointerMapping(DeviceIntPtr dev, CARD8 *map, int len, ClientPtr client)
     return Success;
 }
 
-/* Check if a modifier map change is okay with the device.
- * Returns -1 for BadValue, as it collides with MappingBusy; this particular
- * caveat can be removed with LegalModifier, as we have no other reason to
- * set MappingFailed.  Sigh. */
+/* Check if a modifier map change is okay with the device. Negative return
+ * values mean BadValue, positive values mean Mapping{Busy,Failed}, 0 is
+ * Success / MappingSuccess.
+ */
 static int
 check_modmap_change(ClientPtr client, DeviceIntPtr dev, KeyCode *modmap)
 {
@@ -153,12 +153,6 @@ check_modmap_change(ClientPtr client, DeviceIntPtr dev, KeyCode *modmap)
             return -1;
         }
 
-        /* Make sure the mapping is okay with the DDX. */
-        if (!LegalModifier(i, dev)) {
-            client->errorValue = i;
-            return MappingFailed;
-        }
-
         /* None of the new modifiers may be down while we change the
          * map. */
         if (key_is_down(dev, i, KEY_POSTED | KEY_PROCESSED)) {
@@ -752,6 +746,21 @@ init_device_event(DeviceEvent *event, DeviceIntPtr dev, Time ms,
     event->source_type = source_type;
 }
 
+/**
+ * Initializes the given gesture event to zero (or default values),
+ * for the given device.
+ */
+void
+init_gesture_event(GestureEvent *event, DeviceIntPtr dev, Time ms)
+{
+    memset(event, 0, sizeof(GestureEvent));
+    event->header = ET_Internal;
+    event->length = sizeof(GestureEvent);
+    event->time = ms;
+    event->deviceid = dev->id;
+    event->sourceid = dev->id;
+}
+
 int
 event_get_corestate(DeviceIntPtr mouse, DeviceIntPtr kbd)
 {
@@ -800,6 +809,24 @@ event_set_state(DeviceIntPtr mouse, DeviceIntPtr kbd, DeviceEvent *event)
     }
 }
 
+void
+event_set_state_gesture(DeviceIntPtr kbd, GestureEvent *event)
+{
+    if (kbd && kbd->key) {
+        XkbStatePtr state= &kbd->key->xkbInfo->state;
+
+        event->mods.base = state->base_mods;
+        event->mods.latched = state->latched_mods;
+        event->mods.locked = state->locked_mods;
+        event->mods.effective = state->mods;
+
+        event->group.base = state->base_group;
+        event->group.latched = state->latched_group;
+        event->group.locked = state->locked_group;
+        event->group.effective = state->group;
+    }
+}
+
 /**
  * Return the event filter mask for the given device and the given core or
  * XI1 protocol type.
@@ -1226,3 +1253,28 @@ xi2mask_get_one_mask(const XI2Mask *mask, int deviceid)
 
     return mask->masks[deviceid];
 }
+
+/**
+ * Copies a sprite data from src to dst sprites.
+ *
+ * Returns FALSE on error.
+ */
+Bool
+CopySprite(SpritePtr src, SpritePtr dst)
+{
+    WindowPtr *trace;
+    if (src->spriteTraceGood > dst->spriteTraceSize) {
+        trace = reallocarray(dst->spriteTrace,
+                             src->spriteTraceSize, sizeof(*trace));
+        if (!trace) {
+            dst->spriteTraceGood = 0;
+            return FALSE;
+        }
+        dst->spriteTrace = trace;
+        dst->spriteTraceSize = src->spriteTraceGood;
+    }
+    memcpy(dst->spriteTrace, src->spriteTrace,
+           src->spriteTraceGood * sizeof(*trace));
+    dst->spriteTraceGood = src->spriteTraceGood;
+    return TRUE;
+}
diff --git a/dix/main.c b/dix/main.c
index b228d9c..bfc8add 100644
--- a/dix/main.c
+++ b/dix/main.c
@@ -100,7 +100,6 @@ Equipment Corporation.
 #include "opaque.h"
 #include "servermd.h"
 #include "hotplug.h"
-#include "site.h"
 #include "dixfont.h"
 #include "extnsionst.h"
 #include "privates.h"
@@ -136,8 +135,6 @@ dix_main(int argc, char *argv[], char *envp[])
 
     CheckUserAuthorization();
 
-    InitConnectionLimits();
-
     ProcessCommandLine(argc, argv);
 
     alwaysCheckForInput[0] = 0;
@@ -226,13 +223,12 @@ dix_main(int argc, char *argv[], char *envp[])
             ErrorF("[dix] failed to set default font path '%s'",
                    defaultFontPath);
         }
-        if (!SetDefaultFont(defaultTextFont)) {
-            FatalError("could not open default font '%s'", defaultTextFont);
+        if (!SetDefaultFont("fixed")) {
+            FatalError("could not open default font");
         }
 
         if (!(rootCursor = CreateRootCursor(NULL, 0))) {
-            FatalError("could not open default cursor font '%s'",
-                       defaultCursorFont);
+            FatalError("could not open default cursor font");
         }
 
 #ifdef PANORAMIX
diff --git a/dix/meson.build b/dix/meson.build
index 0ed4f82..fbbcf86 100644
--- a/dix/meson.build
+++ b/dix/meson.build
@@ -12,6 +12,7 @@ srcs_dix = [
     'eventconvert.c',
     'extension.c',
     'gc.c',
+    'gestures.c',
     'getevents.c',
     'globals.c',
     'glyphcurs.c',
@@ -33,10 +34,22 @@ srcs_dix = [
     'window.c',
 ]
 
+dtrace_src = []
+if with_dtrace
+    dtrace_object = generator(dtrace,
+        output: '@BASENAME@.o',
+        arguments: ['-G', '-s', '@INPUT@', '-o', '@OUTPUT@']
+    )
+
+    dtrace_src += dtrace_object.process(dtrace_tmpl)
+endif
+
+dtrace_dep = declare_dependency(sources: [dtrace_src, dtrace_hdr])
+
 libxserver_dix = static_library('libxserver_dix',
     srcs_dix,
     include_directories: inc,
-    dependencies: common_dep,
+    dependencies: [ dtrace_dep, common_dep, ]
 )
 
 libxserver_main = static_library('libxserver_main',
diff --git a/dix/pixmap.c b/dix/pixmap.c
index 061bd42..5a0146b 100644
--- a/dix/pixmap.c
+++ b/dix/pixmap.c
@@ -40,7 +40,6 @@ from The Open Group.
 #include "dixstruct.h"
 #include "gcstruct.h"
 #include "servermd.h"
-#include "site.h"
 #include "X11/extensions/render.h"
 #include "picturestr.h"
 #include "randrstr.h"
@@ -133,40 +132,40 @@ FreePixmap(PixmapPtr pPixmap)
     free(pPixmap);
 }
 
-void PixmapUnshareSlavePixmap(PixmapPtr slave_pixmap)
+void PixmapUnshareSecondaryPixmap(PixmapPtr secondary_pixmap)
 {
      int ihandle = -1;
-     ScreenPtr pScreen = slave_pixmap->drawable.pScreen;
-     pScreen->SetSharedPixmapBacking(slave_pixmap, ((void *)(long)ihandle));
+     ScreenPtr pScreen = secondary_pixmap->drawable.pScreen;
+     pScreen->SetSharedPixmapBacking(secondary_pixmap, ((void *)(long)ihandle));
 }
 
-PixmapPtr PixmapShareToSlave(PixmapPtr pixmap, ScreenPtr slave)
+PixmapPtr PixmapShareToSecondary(PixmapPtr pixmap, ScreenPtr secondary)
 {
     PixmapPtr spix;
     int ret;
     void *handle;
-    ScreenPtr master = pixmap->drawable.pScreen;
+    ScreenPtr primary = pixmap->drawable.pScreen;
     int depth = pixmap->drawable.depth;
 
-    ret = master->SharePixmapBacking(pixmap, slave, &handle);
+    ret = primary->SharePixmapBacking(pixmap, secondary, &handle);
     if (ret == FALSE)
         return NULL;
 
-    spix = slave->CreatePixmap(slave, 0, 0, depth,
+    spix = secondary->CreatePixmap(secondary, 0, 0, depth,
                                CREATE_PIXMAP_USAGE_SHARED);
-    slave->ModifyPixmapHeader(spix, pixmap->drawable.width,
-                              pixmap->drawable.height, depth, 0,
-                              pixmap->devKind, NULL);
+    secondary->ModifyPixmapHeader(spix, pixmap->drawable.width,
+                                  pixmap->drawable.height, depth, 0,
+                                  pixmap->devKind, NULL);
 
-    /* have the slave pixmap take a reference on the master pixmap
+    /* have the secondary pixmap take a reference on the primary pixmap
        later we destroy them both at the same time */
     pixmap->refcnt++;
 
-    spix->master_pixmap = pixmap;
+    spix->primary_pixmap = pixmap;
 
-    ret = slave->SetSharedPixmapBacking(spix, handle);
+    ret = secondary->SetSharedPixmapBacking(spix, handle);
     if (ret == FALSE) {
-        slave->DestroyPixmap(spix);
+        secondary->DestroyPixmap(spix);
         return NULL;
     }
 
@@ -183,7 +182,7 @@ PixmapDirtyDamageDestroy(DamagePtr damage, void *closure)
 
 Bool
 PixmapStartDirtyTracking(DrawablePtr src,
-                         PixmapPtr slave_dst,
+                         PixmapPtr secondary_dst,
                          int x, int y, int dst_x, int dst_y,
                          Rotation rotation)
 {
@@ -198,7 +197,7 @@ PixmapStartDirtyTracking(DrawablePtr src,
         return FALSE;
 
     dirty_update->src = src;
-    dirty_update->slave_dst = slave_dst;
+    dirty_update->secondary_dst = secondary_dst;
     dirty_update->x = x;
     dirty_update->y = y;
     dirty_update->dst_x = dst_x;
@@ -210,8 +209,8 @@ PixmapStartDirtyTracking(DrawablePtr src,
 
     if (rotation != RR_Rotate_0) {
         RRTransformCompute(x, y,
-                           slave_dst->drawable.width,
-                           slave_dst->drawable.height,
+                           secondary_dst->drawable.width,
+                           secondary_dst->drawable.height,
                            rotation,
                            NULL,
                            &dirty_update->transform,
@@ -230,11 +229,11 @@ PixmapStartDirtyTracking(DrawablePtr src,
     box.y1 = dirty_update->y;
     if (dirty_update->rotation == RR_Rotate_90 ||
         dirty_update->rotation == RR_Rotate_270) {
-        box.x2 = dirty_update->x + slave_dst->drawable.height;
-        box.y2 = dirty_update->y + slave_dst->drawable.width;
+        box.x2 = dirty_update->x + secondary_dst->drawable.height;
+        box.y2 = dirty_update->y + secondary_dst->drawable.width;
     } else {
-        box.x2 = dirty_update->x + slave_dst->drawable.width;
-        box.y2 = dirty_update->y + slave_dst->drawable.height;
+        box.x2 = dirty_update->x + secondary_dst->drawable.width;
+        box.y2 = dirty_update->y + secondary_dst->drawable.height;
     }
     RegionInit(&dstregion, &box, 1);
     damageregion = DamageRegion(dirty_update->damage);
@@ -247,13 +246,13 @@ PixmapStartDirtyTracking(DrawablePtr src,
 }
 
 Bool
-PixmapStopDirtyTracking(DrawablePtr src, PixmapPtr slave_dst)
+PixmapStopDirtyTracking(DrawablePtr src, PixmapPtr secondary_dst)
 {
     ScreenPtr screen = src->pScreen;
     PixmapDirtyUpdatePtr ent, safe;
 
     xorg_list_for_each_entry_safe(ent, safe, &screen->pixmap_dirty_list, ent) {
-        if (ent->src == src && ent->slave_dst == slave_dst) {
+        if (ent->src == src && ent->secondary_dst == secondary_dst) {
             if (ent->damage)
                 DamageDestroy(ent->damage);
             xorg_list_del(&ent->ent);
@@ -373,9 +372,9 @@ Bool PixmapSyncDirtyHelper(PixmapDirtyUpdatePtr dirty)
     RegionRec pixregion;
     BoxRec box;
 
-    dst = dirty->slave_dst->master_pixmap;
+    dst = dirty->secondary_dst->primary_pixmap;
     if (!dst)
-        dst = dirty->slave_dst;
+        dst = dirty->secondary_dst;
 
     box.x1 = 0;
     box.y1 = 0;
diff --git a/dix/privates.c b/dix/privates.c
index 9ca80f0..71a72fb 100644
--- a/dix/privates.c
+++ b/dix/privates.c
@@ -155,14 +155,13 @@ dixMovePrivates(PrivatePtr *privates, int new_offset, unsigned bytes)
 static Bool
 fixupOneScreen(ScreenPtr pScreen, FixupFunc fixup, unsigned bytes)
 {
-    intptr_t        dist;
-    char            *old;
+    uintptr_t       old;
     char            *new;
     DevPrivateKey   *keyp, key;
     DevPrivateType  type;
     int             size;
 
-    old = (char *) pScreen->devPrivates;
+    old = (uintptr_t) pScreen->devPrivates;
     size = global_keys[PRIVATE_SCREEN].offset;
     if (!fixup (&pScreen->devPrivates, size, bytes))
         return FALSE;
@@ -182,9 +181,7 @@ fixupOneScreen(ScreenPtr pScreen, FixupFunc fixup, unsigned bytes)
     if (fixup == dixMovePrivates)
         new += bytes;
 
-    dist = new - old;
-
-    if (dist) {
+    if ((uintptr_t) new != old) {
         for (type = PRIVATE_XSELINUX; type < PRIVATE_LAST; type++)
 
             /* Walk the privates list, being careful as the
@@ -199,10 +196,11 @@ fixupOneScreen(ScreenPtr pScreen, FixupFunc fixup, unsigned bytes)
                  * is contained within the allocation. Privates
                  * stored elsewhere will be left alone
                  */
-                if (old <= (char *) key && (char *) key < old + size)
+                if (old <= (uintptr_t) key && (uintptr_t) key < old + size)
                 {
-                    /* Compute new location of key */
-                    key = (DevPrivateKey) ((char *) key + dist);
+                    /* Compute new location of key (deriving from the new
+                     * allocation to avoid UB) */
+                    key = (DevPrivateKey) (new + ((uintptr_t) key - old));
 
                     /* Patch the list */
                     *keyp = key;
@@ -447,7 +445,8 @@ _dixInitPrivates(PrivatePtr *privates, void *addr, DevPrivateType type)
     if (global_keys[type].offset == 0)
         addr = 0;
     *privates = addr;
-    memset(addr, '\0', global_keys[type].offset);
+    if (addr)
+        memset(addr, '\0', global_keys[type].offset);
 }
 
 /*
@@ -476,7 +475,8 @@ _dixAllocateObjectWithPrivates(unsigned baseSize, unsigned clear,
     PrivatePtr privates;
     PrivatePtr *devPrivates;
 
-    assert(type > PRIVATE_SCREEN && type < PRIVATE_LAST);
+    assert(type > PRIVATE_SCREEN);
+    assert(type < PRIVATE_LAST);
     assert(!screen_specific_private[type]);
 
     /* round up so that void * is aligned */
@@ -505,7 +505,8 @@ dixAllocatePrivates(PrivatePtr *privates, DevPrivateType type)
     unsigned size;
     PrivatePtr p;
 
-    assert(type > PRIVATE_XSELINUX && type < PRIVATE_LAST);
+    assert(type > PRIVATE_XSELINUX);
+    assert(type < PRIVATE_LAST);
     assert(!screen_specific_private[type]);
 
     size = global_keys[type].offset;
@@ -554,7 +555,8 @@ dixFreePrivates(PrivatePtr privates, DevPrivateType type)
 extern _X_EXPORT int
 dixPrivatesSize(DevPrivateType type)
 {
-    assert(type >= PRIVATE_SCREEN && type < PRIVATE_LAST);
+    assert(type >= PRIVATE_SCREEN);
+    assert(type < PRIVATE_LAST);
     assert (!screen_specific_private[type]);
 
     return global_keys[type].offset;
@@ -680,7 +682,8 @@ _dixInitScreenPrivates(ScreenPtr pScreen, PrivatePtr *privates, void *addr, DevP
     if (privates_size == 0)
         addr = 0;
     *privates = addr;
-    memset(addr, '\0', privates_size);
+    if (addr)
+        memset(addr, '\0', privates_size);
 }
 
 void *
@@ -696,7 +699,8 @@ _dixAllocateScreenObjectWithPrivates(ScreenPtr pScreen,
     PrivatePtr *devPrivates;
     int privates_size;
 
-    assert(type > PRIVATE_SCREEN && type < PRIVATE_LAST);
+    assert(type > PRIVATE_SCREEN);
+    assert(type < PRIVATE_LAST);
     assert (screen_specific_private[type]);
 
     if (pScreen)
@@ -722,7 +726,8 @@ _dixAllocateScreenObjectWithPrivates(ScreenPtr pScreen,
 int
 dixScreenSpecificPrivatesSize(ScreenPtr pScreen, DevPrivateType type)
 {
-    assert(type >= PRIVATE_SCREEN && type < PRIVATE_LAST);
+    assert(type >= PRIVATE_SCREEN);
+    assert(type < PRIVATE_LAST);
 
     if (screen_specific_private[type])
         return pScreen->screenSpecificPrivates[type].offset;
diff --git a/dix/property.c b/dix/property.c
index ff1d669..acce94b 100644
--- a/dix/property.c
+++ b/dix/property.c
@@ -205,7 +205,8 @@ ProcChangeProperty(ClientPtr client)
     WindowPtr pWin;
     char format, mode;
     unsigned long len;
-    int sizeInBytes, totalSize, err;
+    int sizeInBytes, err;
+    uint64_t totalSize;
 
     REQUEST(xChangePropertyReq);
 
@@ -253,7 +254,7 @@ ProcChangeProperty(ClientPtr client)
 int
 dixChangeWindowProperty(ClientPtr pClient, WindowPtr pWin, Atom property,
                         Atom type, int format, int mode, unsigned long len,
-                        void *value, Bool sendevent)
+                        const void *value, Bool sendevent)
 {
     PropertyPtr pProp;
     PropertyRec savedProp;
diff --git a/dix/ptrveloc.c b/dix/ptrveloc.c
index ff39d7b..632971e 100644
--- a/dix/ptrveloc.c
+++ b/dix/ptrveloc.c
@@ -97,7 +97,7 @@ InitVelocityData(DeviceVelocityPtr vel)
 {
     memset(vel, 0, sizeof(DeviceVelocityRec));
 
-    vel->corr_mul = 10.0;       /* dots per 10 milisecond should be usable */
+    vel->corr_mul = 10.0;       /* dots per 10 millisecond should be usable */
     vel->const_acceleration = 1.0;      /* no acceleration/deceleration  */
     vel->reset_time = 300;
     vel->use_softening = 1;
@@ -519,7 +519,7 @@ DoGetDirection(int dx, int dy)
 
 /* cache DoGetDirection().
  * To avoid excessive use of direction calculation, cache the values for
- * [-5..5] for both x/y. Anything outside of that is calcualted on the fly.
+ * [-5..5] for both x/y. Anything outside of that is calculated on the fly.
  *
  * @return A bitmask for N, NE, S, SE, etc. indicating the directions for
  * this movement.
@@ -597,7 +597,7 @@ CalcTracker(const MotionTracker * tracker, int cur_t)
 /* find the most plausible velocity. That is, the most distant
  * (in time) tracker which isn't too old, the movement vector was
  * in the same octant, and where the velocity is within an
- * acceptable range to the inital velocity.
+ * acceptable range to the initial velocity.
  *
  * @return The tracker's velocity or 0 if the above conditions are unmet
  */
diff --git a/dix/region.c b/dix/region.c
index fd73139..49d823c 100644
--- a/dix/region.c
+++ b/dix/region.c
@@ -901,7 +901,8 @@ RegionUnionO(RegionPtr pReg,
     int x2;
 
     assert(y1 < y2);
-    assert(r1 != r1End && r2 != r2End);
+    assert(r1 != r1End);
+    assert(r2 != r2End);
 
     pNextRect = RegionTop(pReg);
 
@@ -1113,7 +1114,7 @@ QuickSortRects(BoxRec rects[], int numRects)
  *
  * Side Effects:
  *      The passed-in ``region'' may be modified.
- *	pOverlap set to TRUE if any retangles overlapped, else FALSE;
+ *	pOverlap set to TRUE if any rectangles overlapped, else FALSE;
  *
  * Strategy:
  *      Step 1. Sort the rectangles into ascending order with primary key y1
@@ -1122,7 +1123,7 @@ QuickSortRects(BoxRec rects[], int numRects)
  *      Step 2. Split the rectangles into the minimum number of proper y-x
  *		banded regions.  This may require horizontally merging
  *		rectangles, and vertically coalescing bands.  With any luck,
- *		this step in an identity tranformation (ala the Box widget),
+ *		this step in an identity transformation (ala the Box widget),
  *		or a coalescing into 1 box (ala Menus).
  *
  *	Step 3. Merge the separate regions down to a single region by calling
diff --git a/dix/resource.c b/dix/resource.c
index b6ef99f..055e693 100644
--- a/dix/resource.c
+++ b/dix/resource.c
@@ -620,7 +620,15 @@ ilog2(int val)
 unsigned int
 ResourceClientBits(void)
 {
-    return (ilog2(LimitClients));
+    static unsigned int cache_ilog2 = 0;
+    static unsigned int cache_limit = 0;
+
+    if (LimitClients != cache_limit) {
+        cache_limit = LimitClients;
+        cache_ilog2 = ilog2(LimitClients);
+    }
+
+    return cache_ilog2;
 }
 
 /*****************
@@ -666,7 +674,7 @@ InitClientResources(ClientPtr client)
 }
 
 int
-HashResourceID(XID id, int numBits)
+HashResourceID(XID id, unsigned int numBits)
 {
     static XID mask;
 
@@ -674,7 +682,7 @@ HashResourceID(XID id, int numBits)
         mask = RESOURCE_ID_MASK;
     id &= mask;
     if (numBits < 9)
-        return (id ^ (id >> numBits) ^ (id >> (numBits<<1))) & ~((~0) << numBits);
+        return (id ^ (id >> numBits) ^ (id >> (numBits<<1))) & ~((~0U) << numBits);
     return (id ^ (id >> numBits)) & ~((~0) << numBits);
 }
 
diff --git a/dix/swaprep.c b/dix/swaprep.c
index 08344d7..d785b2e 100644
--- a/dix/swaprep.c
+++ b/dix/swaprep.c
@@ -118,7 +118,7 @@ CopySwap32Write(ClientPtr pClient, int size, CARD32 *pbuf)
         nbytes = (toLast - to) << 2;
         while (to < toLast) {
             /* can't write "cpswapl(*from++, *to++)" because cpswapl is a macro
-               that evaulates its args more than once */
+               that evaluates its args more than once */
             cpswapl(*from, *to);
             from++;
             to++;
@@ -165,7 +165,7 @@ CopySwap16Write(ClientPtr pClient, int size, short *pbuf)
         nbytes = (toLast - to) << 1;
         while (to < toLast) {
             /* can't write "cpswaps(*from++, *to++)" because cpswaps is a macro
-               that evaulates its args more than once */
+               that evaluates its args more than once */
             cpswaps(*from, *to);
             from++;
             to++;
diff --git a/dix/touch.c b/dix/touch.c
index 37902bd..d0d286f 100644
--- a/dix/touch.c
+++ b/dix/touch.c
@@ -42,9 +42,11 @@
 
 #define TOUCH_HISTORY_SIZE 100
 
+Bool touchEmulatePointer = TRUE;
+
 /**
  * Some documentation about touch points:
- * The driver submits touch events with it's own (unique) touch point ID.
+ * The driver submits touch events with its own (unique) touch point ID.
  * The driver may re-use those IDs, the DDX doesn't care. It just passes on
  * the data to the DIX. In the server, the driver's ID is referred to as the
  * DDX id anyway.
@@ -63,7 +65,7 @@
 
 /**
  * Check which devices need a bigger touch event queue and grow their
- * last.touches by half it's current size.
+ * last.touches by half its current size.
  *
  * @param client Always the serverClient
  * @param closure Always NULL
@@ -142,7 +144,7 @@ TouchBeginDDXTouch(DeviceIntPtr dev, uint32_t ddx_id)
     if (!t)
         return NULL;
 
-    emulate_pointer = (t->mode == XIDirectTouch);
+    emulate_pointer = touchEmulatePointer && (t->mode == XIDirectTouch);
 
     /* Look for another active touchpoint with the same DDX ID. DDX
      * touchpoints must be unique. */
@@ -447,7 +449,7 @@ TouchEventHistoryReplay(TouchPointInfoPtr ti, DeviceIntPtr dev, XID resource)
     if (!ti->history)
         return;
 
-    TouchDeliverDeviceClassesChangedEvent(ti, ti->history[0].time, resource);
+    DeliverDeviceClassesChangedEvent(ti->sourceid, ti->history[0].time);
 
     for (i = 0; i < ti->history_elements; i++) {
         DeviceEvent *ev = &ti->history[i];
@@ -471,36 +473,11 @@ TouchEventHistoryReplay(TouchPointInfoPtr ti, DeviceIntPtr dev, XID resource)
     }
 }
 
-void
-TouchDeliverDeviceClassesChangedEvent(TouchPointInfoPtr ti, Time time,
-                                      XID resource)
-{
-    DeviceIntPtr dev;
-    int num_events = 0;
-    InternalEvent dcce;
-
-    dixLookupDevice(&dev, ti->sourceid, serverClient, DixWriteAccess);
-
-    if (!dev)
-        return;
-
-    /* UpdateFromMaster generates at most one event */
-    UpdateFromMaster(&dcce, dev, DEVCHANGE_POINTER_EVENT, &num_events);
-    BUG_WARN(num_events > 1);
-
-    if (num_events) {
-        dcce.any.time = time;
-        /* FIXME: This doesn't do anything */
-        dev->public.processInputProc(&dcce, dev);
-    }
-}
-
 Bool
 TouchBuildDependentSpriteTrace(DeviceIntPtr dev, SpritePtr sprite)
 {
     int i;
     TouchClassPtr t = dev->touch;
-    WindowPtr *trace;
     SpritePtr srcsprite;
 
     /* All touches should have the same sprite trace, so find and reuse an
@@ -516,21 +493,7 @@ TouchBuildDependentSpriteTrace(DeviceIntPtr dev, SpritePtr sprite)
     else
         return FALSE;
 
-    if (srcsprite->spriteTraceGood > sprite->spriteTraceSize) {
-        trace = reallocarray(sprite->spriteTrace,
-                             srcsprite->spriteTraceSize, sizeof(*trace));
-        if (!trace) {
-            sprite->spriteTraceGood = 0;
-            return FALSE;
-        }
-        sprite->spriteTrace = trace;
-        sprite->spriteTraceSize = srcsprite->spriteTraceGood;
-    }
-    memcpy(sprite->spriteTrace, srcsprite->spriteTrace,
-           srcsprite->spriteTraceGood * sizeof(*trace));
-    sprite->spriteTraceGood = srcsprite->spriteTraceGood;
-
-    return TRUE;
+    return CopySprite(srcsprite, sprite);
 }
 
 /**
@@ -578,7 +541,7 @@ TouchBuildSprite(DeviceIntPtr sourcedev, TouchPointInfoPtr ti,
  * @param[in] button_event The respective button event (if any)
  *
  * @returns The number of converted events.
- * @retval 0 An error occured
+ * @retval 0 An error occurred
  * @retval 1 only the motion event is valid
  * @retval 2 motion and button event are valid
  */
@@ -721,7 +684,7 @@ TouchRemoveListener(TouchPointInfoPtr ti, XID resource)
             ti->listeners[j] = ti->listeners[j + 1];
         ti->num_listeners--;
         ti->listeners[ti->num_listeners].listener = 0;
-        ti->listeners[ti->num_listeners].state = LISTENER_AWAITING_BEGIN;
+        ti->listeners[ti->num_listeners].state = TOUCH_LISTENER_AWAITING_BEGIN;
 
         return TRUE;
     }
@@ -732,7 +695,7 @@ static void
 TouchAddGrabListener(DeviceIntPtr dev, TouchPointInfoPtr ti,
                      InternalEvent *ev, GrabPtr grab)
 {
-    enum TouchListenerType type = LISTENER_GRAB;
+    enum TouchListenerType type = TOUCH_LISTENER_GRAB;
 
     /* FIXME: owner_events */
 
@@ -740,16 +703,16 @@ TouchAddGrabListener(DeviceIntPtr dev, TouchPointInfoPtr ti,
         if (!xi2mask_isset(grab->xi2mask, dev, XI_TouchOwnership))
             TouchEventHistoryAllocate(ti);
         if (!xi2mask_isset(grab->xi2mask, dev, XI_TouchBegin))
-            type = LISTENER_POINTER_GRAB;
+            type = TOUCH_LISTENER_POINTER_GRAB;
     }
     else if (grab->grabtype == XI || grab->grabtype == CORE) {
         TouchEventHistoryAllocate(ti);
-        type = LISTENER_POINTER_GRAB;
+        type = TOUCH_LISTENER_POINTER_GRAB;
     }
 
     /* grab listeners are always RT_NONE since we keep the grab pointer */
     TouchAddListener(ti, grab->resource, RT_NONE, grab->grabtype,
-                     type, LISTENER_AWAITING_BEGIN, grab->window, grab);
+                     type, TOUCH_LISTENER_AWAITING_BEGIN, grab->window, grab);
 }
 
 /**
@@ -777,7 +740,7 @@ TouchAddRegularListener(DeviceIntPtr dev, TouchPointInfoPtr ti,
     InputClients *iclients = NULL;
     OtherInputMasks *inputMasks = NULL;
     uint16_t evtype = 0;        /* may be event type or emulated event type */
-    enum TouchListenerType type = LISTENER_REGULAR;
+    enum TouchListenerType type = TOUCH_LISTENER_REGULAR;
     int mask;
 
     evtype = GetXI2Type(ev->any.type);
@@ -788,7 +751,7 @@ TouchAddRegularListener(DeviceIntPtr dev, TouchPointInfoPtr ti,
         mask = EventIsDeliverable(dev, TouchGetPointerEventType(ev), win);
         if (mask) {
             evtype = GetXI2Type(TouchGetPointerEventType(ev));
-            type = LISTENER_POINTER_REGULAR;
+            type = TOUCH_LISTENER_POINTER_REGULAR;
         }
     }
     if (!mask)
@@ -805,7 +768,7 @@ TouchAddRegularListener(DeviceIntPtr dev, TouchPointInfoPtr ti,
                 TouchEventHistoryAllocate(ti);
 
             TouchAddListener(ti, iclients->resource, RT_INPUTCLIENT, XI2,
-                             type, LISTENER_AWAITING_BEGIN, win, NULL);
+                             type, TOUCH_LISTENER_AWAITING_BEGIN, win, NULL);
             return TRUE;
         }
     }
@@ -820,7 +783,8 @@ TouchAddRegularListener(DeviceIntPtr dev, TouchPointInfoPtr ti,
 
             TouchEventHistoryAllocate(ti);
             TouchAddListener(ti, iclients->resource, RT_INPUTCLIENT, XI,
-                             LISTENER_POINTER_REGULAR, LISTENER_AWAITING_BEGIN,
+                             TOUCH_LISTENER_POINTER_REGULAR,
+                             TOUCH_LISTENER_AWAITING_BEGIN,
                              win, NULL);
             return TRUE;
         }
@@ -835,7 +799,8 @@ TouchAddRegularListener(DeviceIntPtr dev, TouchPointInfoPtr ti,
         if (IsMaster(dev) && (win->eventMask & core_filter)) {
             TouchEventHistoryAllocate(ti);
             TouchAddListener(ti, win->drawable.id, RT_WINDOW, CORE,
-                             LISTENER_POINTER_REGULAR, LISTENER_AWAITING_BEGIN,
+                             TOUCH_LISTENER_POINTER_REGULAR,
+                             TOUCH_LISTENER_AWAITING_BEGIN,
                              win, NULL);
             return TRUE;
         }
@@ -847,7 +812,7 @@ TouchAddRegularListener(DeviceIntPtr dev, TouchPointInfoPtr ti,
 
             TouchEventHistoryAllocate(ti);
             TouchAddListener(ti, oclients->resource, RT_OTHERCLIENT, CORE,
-                             type, LISTENER_AWAITING_BEGIN, win, NULL);
+                             type, TOUCH_LISTENER_AWAITING_BEGIN, win, NULL);
             return TRUE;
         }
     }
@@ -914,7 +879,7 @@ TouchRemovePointerGrab(DeviceIntPtr dev)
 {
     TouchPointInfoPtr ti;
     GrabPtr grab;
-    DeviceEvent *ev;
+    InternalEvent *ev;
 
     if (!dev->touch)
         return;
@@ -924,10 +889,10 @@ TouchRemovePointerGrab(DeviceIntPtr dev)
         return;
 
     ev = dev->deviceGrab.sync.event;
-    if (!IsTouchEvent((InternalEvent *) ev))
+    if (!IsTouchEvent(ev))
         return;
 
-    ti = TouchFindByClientID(dev, ev->touchid);
+    ti = TouchFindByClientID(dev, ev->device_event.touchid);
     if (!ti)
         return;
 
@@ -989,7 +954,7 @@ TouchListenerAcceptReject(DeviceIntPtr dev, TouchPointInfoPtr ti, int listener,
         if (mode == XIRejectTouch)
             TouchRejected(dev, ti, ti->listeners[listener].listener, NULL);
         else
-            ti->listeners[listener].state = LISTENER_EARLY_ACCEPT;
+            ti->listeners[listener].state = TOUCH_LISTENER_EARLY_ACCEPT;
 
         return Success;
     }
@@ -1088,7 +1053,7 @@ TouchEmitTouchEnd(DeviceIntPtr dev, TouchPointInfoPtr ti, int flags, XID resourc
     flags |= TOUCH_CLIENT_ID;
     if (ti->emulate_pointer)
         flags |= TOUCH_POINTER_EMULATED;
-    TouchDeliverDeviceClassesChangedEvent(ti, GetTimeInMillis(), resource);
+    DeliverDeviceClassesChangedEvent(ti->sourceid, GetTimeInMillis());
     GetDixTouchEnd(&event, dev, ti, flags);
     DeliverTouchEvents(dev, ti, &event, resource);
     if (ti->num_grabs == 0)
diff --git a/dix/window.c b/dix/window.c
index 8789a5e..cd917f0 100644
--- a/dix/window.c
+++ b/dix/window.c
@@ -468,9 +468,6 @@ WalkTree(ScreenPtr pScreen, VisitWindowProcPtr func, void *data)
     return (TraverseTree(pScreen->root, func, data));
 }
 
-/* hack for forcing backing store on all windows */
-int defaultBackingStore = NotUseful;
-
 /* hack to force no backing store */
 Bool disableBackingStore = FALSE;
 Bool enableBackingStore = FALSE;
@@ -487,7 +484,6 @@ SetWindowToDefaults(WindowPtr pWin)
     pWin->cursorIsNone = TRUE;
 
     pWin->backingStore = NotUseful;
-    pWin->backStorage = 0;
 
     pWin->mapped = FALSE;       /* off */
     pWin->realized = FALSE;     /* off */
@@ -502,7 +498,6 @@ SetWindowToDefaults(WindowPtr pWin)
     pWin->eventMask = 0;
     pWin->deliverableEvents = 0;
     pWin->dontPropagate = 0;
-    pWin->forcedBS = FALSE;
     pWin->redirectDraw = RedirectDrawNone;
     pWin->forcedBG = FALSE;
     pWin->unhittable = FALSE;
@@ -693,8 +688,7 @@ InitRootWindow(WindowPtr pWin)
         backFlag |= CWBackPixel;
     }
 
-    pWin->backingStore = defaultBackingStore;
-    pWin->forcedBS = (defaultBackingStore != NotUseful);
+    pWin->backingStore = NotUseful;
     /* We SHOULD check for an error value here XXX */
     (*pScreen->ChangeWindowAttributes) (pWin, backFlag);
 
@@ -943,13 +937,6 @@ CreateWindow(Window wid, WindowPtr pParent, int x, int y, unsigned w,
         DeleteWindow(pWin, None);
         return NullWindow;
     }
-    if (!(vmask & CWBackingStore) && (defaultBackingStore != NotUseful)) {
-        XID value = defaultBackingStore;
-
-        (void) ChangeWindowAttributes(pWin, CWBackingStore, &value,
-                                      wClient(pWin));
-        pWin->forcedBS = TRUE;
-    }
 
     if (SubSend(pParent)) {
         xEvent event = {
@@ -1340,8 +1327,13 @@ ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client)
                 client->errorValue = val;
                 goto PatchUp;
             }
+            /* if we're not actually changing the window's state, hide
+             * CWBackingStore from vmaskCopy so it doesn't get passed to
+             * ->ChangeWindowAttributes below
+             */
+            if (pWin->backingStore == val)
+                continue;
             pWin->backingStore = val;
-            pWin->forcedBS = FALSE;
             break;
         case CWBackingPlanes:
             if (pWin->optional || ((CARD32) *pVlist != (CARD32) ~0L)) {
@@ -1610,10 +1602,7 @@ GetWindowAttributes(WindowPtr pWin, ClientPtr client,
     wa->type = X_Reply;
     wa->bitGravity = pWin->bitGravity;
     wa->winGravity = pWin->winGravity;
-    if (pWin->forcedBS && pWin->backingStore != Always)
-        wa->backingStore = NotUseful;
-    else
-        wa->backingStore = pWin->backingStore;
+    wa->backingStore = pWin->backingStore;
     wa->length = bytes_to_int32(sizeof(xGetWindowAttributesReply) -
                                 sizeof(xGenericReply));
     wa->sequenceNumber = client->sequence;
@@ -2285,8 +2274,8 @@ ConfigureWindow(WindowPtr pWin, Mask mask, XID *vlist, ClientPtr client)
     if (!pParent)
         return Success;
 
-    /* Figure out if the window should be moved.  Doesnt
-       make the changes to the window if event sent */
+    /* Figure out if the window should be moved.  Doesn't
+       make the changes to the window if event sent. */
 
     if (mask & CWStackMode)
         pSib = WhereDoIGoInTheStack(pWin, pSib, pParent->drawable.x + x,
@@ -2558,7 +2547,7 @@ ReparentWindow(WindowPtr pWin, WindowPtr pParent,
     if (pWin->prevSib)
         pWin->prevSib->nextSib = pWin->nextSib;
 
-    /* insert at begining of pParent */
+    /* insert at beginning of pParent */
     pWin->parent = pParent;
     pPrev = RealChildHead(pParent);
     if (pPrev) {
@@ -2872,13 +2861,11 @@ UnmapWindow(WindowPtr pWin, Bool fromConfigure)
     pWin->mapped = FALSE;
     if (wasRealized)
         UnrealizeTree(pWin, fromConfigure);
-    if (wasViewable) {
-        if (!fromConfigure) {
-            (*pScreen->ValidateTree) (pLayerWin->parent, pWin, VTUnmap);
-            (*pScreen->HandleExposures) (pLayerWin->parent);
-            if (pScreen->PostValidateTree)
-                (*pScreen->PostValidateTree) (pLayerWin->parent, pWin, VTUnmap);
-        }
+    if (wasViewable && !fromConfigure) {
+        (*pScreen->ValidateTree) (pLayerWin->parent, pWin, VTUnmap);
+        (*pScreen->HandleExposures) (pLayerWin->parent);
+        if (pScreen->PostValidateTree)
+            (*pScreen->PostValidateTree) (pLayerWin->parent, pWin, VTUnmap);
     }
     if (wasRealized && !fromConfigure) {
         WindowsRestructured();
@@ -2925,31 +2912,28 @@ UnmapSubwindows(WindowPtr pWin)
                 UnrealizeTree(pChild, FALSE);
         }
     }
-    if (wasViewable) {
-        if (anyMarked) {
-            if (pLayerWin->parent == pWin)
-                (*pScreen->MarkWindow) (pWin);
-            else {
-                WindowPtr ptmp;
+    if (wasViewable && anyMarked) {
+        if (pLayerWin->parent == pWin)
+            (*pScreen->MarkWindow) (pWin);
+        else {
+            WindowPtr ptmp;
 
-                (*pScreen->MarkOverlappedWindows) (pWin, pLayerWin, NULL);
-                (*pScreen->MarkWindow) (pLayerWin->parent);
+            (*pScreen->MarkOverlappedWindows) (pWin, pLayerWin, NULL);
+            (*pScreen->MarkWindow) (pLayerWin->parent);
 
-                /* Windows between pWin and pLayerWin may not have been marked */
-                ptmp = pWin;
+            /* Windows between pWin and pLayerWin may not have been marked */
+            ptmp = pWin;
 
-                while (ptmp != pLayerWin->parent) {
-                    (*pScreen->MarkWindow) (ptmp);
-                    ptmp = ptmp->parent;
-                }
-                pHead = pWin->firstChild;
+            while (ptmp != pLayerWin->parent) {
+                (*pScreen->MarkWindow) (ptmp);
+                ptmp = ptmp->parent;
             }
-            (*pScreen->ValidateTree) (pLayerWin->parent, pHead, VTUnmap);
-            (*pScreen->HandleExposures) (pLayerWin->parent);
-            if (pScreen->PostValidateTree)
-                (*pScreen->PostValidateTree) (pLayerWin->parent, pHead,
-                                              VTUnmap);
+            pHead = pWin->firstChild;
         }
+        (*pScreen->ValidateTree) (pLayerWin->parent, pHead, VTUnmap);
+        (*pScreen->HandleExposures) (pLayerWin->parent);
+        if (pScreen->PostValidateTree)
+            (*pScreen->PostValidateTree) (pLayerWin->parent, pHead, VTUnmap);
     }
     if (wasRealized) {
         WindowsRestructured();
@@ -3110,6 +3094,7 @@ int
 dixSaveScreens(ClientPtr client, int on, int mode)
 {
     int rc, i, what, type;
+    XID vlist[2];
 
     if (on == SCREEN_SAVER_FORCER) {
         if (mode == ScreenSaverReset)
@@ -3162,14 +3147,11 @@ dixSaveScreens(ClientPtr client, int on, int mode)
                  * for the root window, so PaintWindow works
                  */
                 screenIsSaved = SCREEN_SAVER_OFF;
-                (*pWin->drawable.pScreen->MoveWindow) (pWin,
-                                                       (short) (-
-                                                                (rand() %
-                                                                 RANDOM_WIDTH)),
-                                                       (short) (-
-                                                                (rand() %
-                                                                 RANDOM_WIDTH)),
-                                                       pWin->nextSib, VTMove);
+
+                vlist[0] = -(rand() % RANDOM_WIDTH);
+                vlist[1] = -(rand() % RANDOM_WIDTH);
+                ConfigureWindow(pWin, CWX | CWY, vlist, client);
+
                 screenIsSaved = SCREEN_SAVER_ON;
             }
             /*
diff --git a/doc/Makefile.in b/doc/Makefile.in
index 508ae13..ed179ac 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -125,7 +125,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -183,8 +182,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 DIST_SUBDIRS = $(SUBDIRS)
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/devbook.am
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -230,8 +227,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -245,6 +240,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -263,14 +260,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -287,8 +276,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -344,6 +335,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -396,7 +389,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -420,29 +412,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -480,8 +456,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -492,14 +466,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -739,7 +707,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/doc/Xserver-spec.xml b/doc/Xserver-spec.xml
index 0ac2224..15ecb0f 100644
--- a/doc/Xserver-spec.xml
+++ b/doc/Xserver-spec.xml
@@ -1238,7 +1238,7 @@ clients are drawing into their windows simultaneously.
 If it allows one client to run until its request
 queue is empty by ignoring isItTimeToYield, the client's queue may
 in fact never empty and other clients will be blocked out.
-On the other hand, if it switchs between different clients too quickly,
+On the other hand, if it switches between different clients too quickly,
 performance may suffer due to too much switching between contexts.
 For example, if a graphics processor needs to be set up with drawing modes
 before drawing, and two different clients are drawing with
@@ -1316,7 +1316,7 @@ should be terminated with a newline.
 </para>
 <para>
 After printing the message arguments, FatalError() must be implemented
-such that the server will call AbortDDX() to give the ddx layer
+such that the server will call ddxGiveUp(EXIT_ERR_ABORT) to give the ddx layer
 a chance to reset the hardware, and then
 terminate the server; it must not return.
 </para>
@@ -1782,18 +1782,6 @@ maintains the client's changes to it.
 The X protocol defines standard names to indicate the symbol(s)
 printed on each keycap. (See X11/keysym.h)
 </para>
-<para>
-Legal modifier keys must generate both up and down transitions.  When
-a client tries to change a modifier key (for instance, to make "A" the
-"Control" key), DIX calls the following routine, which should return
-TRUE if the key can be used as a modifier on the given device:
-<blockquote><programlisting>
-
-	Bool LegalModifier(key, pDev)
-	    unsigned int key;
-	    DevicePtr pDev;
-</programlisting></blockquote>
-</para>
 </section>
 </section>
 <section>
@@ -4636,7 +4624,7 @@ GC mode-dependent components: fgPixel (for fillStyle Solid); tile, patOrg
 (for fillStyle Tile); stipple, patOrg, fgPixel (for fillStyle Stipple);
 and stipple, patOrg, fgPixel and bgPixel (for fillStyle OpaqueStipple).</para>
 <para>
-PushPixels applys the foreground color, tile, or stipple from the pGC
+PushPixels applies the foreground color, tile, or stipple from the pGC
 through a stencil onto pDrawable.  pBitMap points to a stencil (of
 which we use an area dx wide by dy high), which is oriented over the
 drawable at xOrg, yOrg.  Where there is a 1 bit in the bitmap, the
@@ -4653,15 +4641,14 @@ An Example implementation is miPushPixels() in Xserver/mi/mipushpxl.c.</para>
   <title>Shutdown Procedures</title>
 <para>
 <blockquote><programlisting>
-	void AbortDDX(enum ExitCode error)
 	void ddxGiveUp(enum ExitCode error)
 </programlisting></blockquote>
 Some hardware may require special work to be done before the server
 exits so that it is not left in an intermediate state.  As explained
-in the OS layer, FatalError() will call AbortDDX() just before
+in the OS layer, FatalError() will call ddxGiveUp() just before
 terminating the server.  In addition, ddxGiveUp() will be called just
-before terminating the server on a "clean" death.  What AbortDDX() and
-ddxGiveUP do is left unspecified, only that stubs must exist in the
+before terminating the server on a "clean" death.  What
+ddxGiveUp does is left unspecified, only that it must exist in the
 ddx layer.  It is up to local implementors as to what they should
 accomplish before termination.</para>
 <section>
@@ -4923,7 +4910,6 @@ mi and fb implementations.</para>
 	    </thead>
 	    <tbody>
 <row><entry><function>ALLOCATE_LOCAL</function></entry><entry><literal>os</literal></entry><entry><para></para></entry></row>
-<row><entry><function>AbortDDX</function></entry><entry><literal>hd</literal></entry><entry><para></para></entry></row>
 <row><entry><function>AddCallback</function></entry><entry><literal>dix</literal></entry><entry><para></para></entry></row>
 <row><entry><function>AddEnabledDevice</function></entry><entry><literal>os</literal></entry><entry><para></para></entry></row>
 <row><entry><function>AddInputDevice</function></entry><entry><literal>dix</literal></entry><entry><para></para></entry></row>
@@ -5000,7 +4986,6 @@ mi and fb implementations.</para>
 <row><entry><function>InstallColormap</function></entry><entry><literal>ddx</literal></entry><entry><para>Screen</para></entry></row>
 <row><entry><function>Intersect</function></entry><entry><literal>mi</literal></entry><entry><para>Screen</para></entry></row>
 <row><entry><function>Inverse</function></entry><entry><literal>mi</literal></entry><entry><para>Screen</para></entry></row>
-<row><entry><function>LegalModifier</function></entry><entry><literal>hd</literal></entry><entry><para></para></entry></row>
 <row><entry><function>LineHelper</function></entry><entry><literal>mi</literal></entry><entry><para>GC op</para></entry></row>
 <row><entry><function>ListInstalledColormaps</function></entry><entry><literal>ddx</literal></entry><entry><para>Screen</para></entry></row>
 <row><entry><function>LookupKeyboardDevice</function></entry><entry><literal>dix</literal></entry><entry><para></para></entry></row>
diff --git a/doc/dtrace/Makefile.in b/doc/dtrace/Makefile.in
index c89316f..d0bdb98 100644
--- a/doc/dtrace/Makefile.in
+++ b/doc/dtrace/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -128,7 +128,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -201,8 +200,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -216,6 +213,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -234,14 +233,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -258,8 +249,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -315,6 +308,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -367,7 +362,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -391,29 +385,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -451,8 +429,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -463,14 +439,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -695,7 +665,6 @@ ctags CTAGS:
 
 cscope cscopelist:
 
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/doc/dtrace/Xserver-DTrace.xml b/doc/dtrace/Xserver-DTrace.xml
index ee594ac..6ff8cae 100644
--- a/doc/dtrace/Xserver-DTrace.xml
+++ b/doc/dtrace/Xserver-DTrace.xml
@@ -58,7 +58,7 @@ DEALINGS IN THE SOFTWARE.
     </para>
 
     <para>
-      The provider was integrated into the X.Org git master repository
+      The provider was integrated into the X.Org code base
       with Solaris 10 &amp; OpenSolaris support for the Xserver 1.4 release,
       released in 2007 with X11R7.3.   Support for DTrace on MacOS X
       was added in Xserver 1.7.
diff --git a/doc/dtrace/meson.build b/doc/dtrace/meson.build
new file mode 100644
index 0000000..09b6069
--- /dev/null
+++ b/doc/dtrace/meson.build
@@ -0,0 +1,64 @@
+
+if build_docs
+    basename = 'Xserver-DTrace'
+
+    input_xml = basename + '.xml'
+
+    custom_target(
+        basename + '.html',
+        output: basename + '.html',
+        input: [input_xml],
+        command: [xmlto] + docs_xmlto_search_flags + [
+            '-x',  join_paths(doc_stylesheet_srcdir, 'xorg-xhtml.xsl'),
+            '--stringparam', 'target.database.document=' + join_paths(doc_sgml_path, 'X11/dbs/masterdb.html.xml'),
+            '--stringparam', 'current.docid=' + basename,
+            '-o', meson.current_build_dir(),
+            'xhtml-nochunks', '@INPUT0@'],
+        build_by_default: true,
+        install: true,
+        install_dir: join_paths(get_option('datadir'), 'doc/xorg-server'),
+    )
+
+    if build_docs_pdf
+        foreach format : ['ps', 'pdf']
+            output_fn = basename + '.' + format
+            custom_target(
+                output_fn,
+                output: output_fn,
+                input: [input_xml],
+                command: [xmlto] + docs_xmlto_search_flags + [
+                    '-x',  join_paths(doc_stylesheet_srcdir, 'xorg-fo.xsl'),
+                    '--stringparam', 'img.src.path=' + meson.current_build_dir(),
+                    '--stringparam', 'target.database.document=' + join_paths(doc_sgml_path, 'X11/dbs/masterdb.pdf.xml'),
+                    '--stringparam', 'current.docid=' + basename,
+                    '-o', meson.current_build_dir(),
+                    '--with-fop', format, '@INPUT0@'],
+                build_by_default: true,
+                install: true,
+                install_dir: join_paths(get_option('datadir'), 'doc/xorg-server'),
+            )
+        endforeach
+    endif
+
+    foreach format_data : [['html', 'xorg-xhtml.xsl'], ['pdf', 'xorg-fo.xsl']]
+        format = format_data[0]
+        stylesheet = format_data[1]
+        output_fn = basename + '.' + format + '.db'
+        custom_target(
+            output_fn,
+            output: output_fn,
+            input: [input_xml],
+            command: [xsltproc] + docs_xslt_search_flags + [
+                '--stringparam', 'targets.filename', output_fn,
+                '--stringparam', 'collect.xref.targets', 'only',
+                '--stringparam', 'olink.base.uri', basename + '.' + format,
+                '--nonet',
+                '--output', join_paths(meson.current_build_dir(), output_fn),
+                '--xinclude', join_paths(doc_stylesheet_srcdir, stylesheet),
+                '@INPUT0@'],
+            build_by_default: true,
+            install: true,
+            install_dir: join_paths(get_option('datadir'), 'doc/xorg-server'),
+        )
+    endforeach
+endif
diff --git a/doc/meson.build b/doc/meson.build
new file mode 100644
index 0000000..5a4faa9
--- /dev/null
+++ b/doc/meson.build
@@ -0,0 +1,39 @@
+
+if build_docs_devel
+    foreach basename : ['Xserver-spec', 'Xinput']
+
+        input_xml = basename + '.xml'
+
+        custom_target(
+            basename + '.html',
+            output: basename + '.html',
+            input: [input_xml],
+            command: [xmlto] + docs_xmlto_search_flags + [
+                '-x',  join_paths(doc_stylesheet_srcdir, 'xorg-xhtml.xsl'),
+                '-o', meson.current_build_dir(),
+                'xhtml-nochunks', '@INPUT0@'],
+            build_by_default: true,
+            install: false,
+        )
+
+        if build_docs_pdf
+            foreach format : ['ps', 'pdf']
+                output_fn = basename + '.' + format
+                custom_target(
+                    output_fn,
+                    output: output_fn,
+                    input: [input_xml],
+                    command: [xmlto] + docs_xmlto_search_flags + [
+                        '-x',  join_paths(doc_stylesheet_srcdir, 'xorg-fo.xsl'),
+                        '--stringparam', 'img.src.path=' + meson.current_build_dir(),
+                        '-o', meson.current_build_dir(),
+                        '--with-fop', format, '@INPUT0@'],
+                    build_by_default: true,
+                    install: false,
+                )
+            endforeach
+        endif
+    endforeach
+endif
+
+subdir('dtrace')
diff --git a/dri3/Makefile.am b/dri3/Makefile.am
index e47a734..32b694f 100644
--- a/dri3/Makefile.am
+++ b/dri3/Makefile.am
@@ -1,7 +1,7 @@
 noinst_LTLIBRARIES = libdri3.la
 AM_CFLAGS = \
-	-DHAVE_XORG_CONFIG_H \
-	@DIX_CFLAGS@ @XORG_CFLAGS@
+	@DIX_CFLAGS@ \
+	@LIBDRM_CFLAGS@
 
 libdri3_la_SOURCES = \
 	dri3.h \
diff --git a/dri3/Makefile.in b/dri3/Makefile.in
index ed55231..8c40c55 100644
--- a/dri3/Makefile.in
+++ b/dri3/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -106,7 +106,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -207,8 +206,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
@@ -228,8 +225,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -243,6 +238,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -261,14 +258,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -285,8 +274,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -342,6 +333,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -394,7 +387,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -418,29 +410,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -478,8 +454,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -490,14 +464,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -572,8 +540,8 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 noinst_LTLIBRARIES = libdri3.la
 AM_CFLAGS = \
-	-DHAVE_XORG_CONFIG_H \
-	@DIX_CFLAGS@ @XORG_CFLAGS@
+	@DIX_CFLAGS@ \
+	@LIBDRM_CFLAGS@
 
 libdri3_la_SOURCES = \
 	dri3.h \
@@ -746,7 +714,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/dri3/dri3.c b/dri3/dri3.c
index ba32fac..1912529 100644
--- a/dri3/dri3.c
+++ b/dri3/dri3.c
@@ -20,10 +20,6 @@
  * OF THIS SOFTWARE.
  */
 
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
 #include "dri3_priv.h"
 
 #include <drm_fourcc.h>
diff --git a/dri3/dri3_priv.h b/dri3/dri3_priv.h
index b087a95..f319d17 100644
--- a/dri3/dri3_priv.h
+++ b/dri3/dri3_priv.h
@@ -23,6 +23,7 @@
 #ifndef _DRI3PRIV_H_
 #define _DRI3PRIV_H_
 
+#include "dix-config.h"
 #include <X11/X.h>
 #include "scrnintstr.h"
 #include "misc.h"
diff --git a/dri3/dri3_request.c b/dri3/dri3_request.c
index 958877e..6871689 100644
--- a/dri3/dri3_request.c
+++ b/dri3/dri3_request.c
@@ -20,10 +20,6 @@
  * OF THIS SOFTWARE.
  */
 
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
 #include "dri3_priv.h"
 #include <syncsrv.h>
 #include <unistd.h>
diff --git a/dri3/dri3_screen.c b/dri3/dri3_screen.c
index b982597..3c7e5bf 100644
--- a/dri3/dri3_screen.c
+++ b/dri3/dri3_screen.c
@@ -20,10 +20,6 @@
  * OF THIS SOFTWARE.
  */
 
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
 #include "dri3_priv.h"
 #include <syncsdk.h>
 #include <misync.h>
diff --git a/dri3/meson.build b/dri3/meson.build
index 48ce0d9..91bd68d 100644
--- a/dri3/meson.build
+++ b/dri3/meson.build
@@ -14,8 +14,9 @@ if build_dri3
         srcs_dri3,
         include_directories: inc,
         dependencies: [ common_dep, libdrm_dep ],
-        c_args: '-DHAVE_XORG_CONFIG_H'
         )
 endif
 
-install_data(hdrs_dri3, install_dir: xorgsdkdir)
+if build_xorg
+    install_data(hdrs_dri3, install_dir: xorgsdkdir)
+endif
diff --git a/exa/Makefile.in b/exa/Makefile.in
index 8ed1267..3d77560 100644
--- a/exa/Makefile.in
+++ b/exa/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -107,7 +107,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -216,8 +215,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
@@ -237,8 +234,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -252,6 +247,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -270,14 +267,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -294,8 +283,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -351,6 +342,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -403,7 +396,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -427,29 +419,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -487,8 +463,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -499,14 +473,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -769,7 +737,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/exa/exa.c b/exa/exa.c
index d6ff197..b168758 100644
--- a/exa/exa.c
+++ b/exa/exa.c
@@ -497,7 +497,7 @@ static void
 exaValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable)
 {
     /* fbValidateGC will do direct access to pixmaps if the tiling has changed.
-     * Do a few smart things so fbValidateGC can do it's work.
+     * Do a few smart things so fbValidateGC can do its work.
      */
 
     ScreenPtr pScreen = pDrawable->pScreen;
diff --git a/exa/exa.h b/exa/exa.h
index 949ea3a..fba06ca 100644
--- a/exa/exa.h
+++ b/exa/exa.h
@@ -140,7 +140,7 @@ typedef struct _ExaDriver {
     /**
      * The flags field is bitfield of boolean values controlling EXA's behavior.
      *
-     * The flags in clude EXA_OFFSCREEN_PIXMAPS, EXA_OFFSCREEN_ALIGN_POT, and
+     * The flags include EXA_OFFSCREEN_PIXMAPS, EXA_OFFSCREEN_ALIGN_POT, and
      * EXA_TWO_BITBLT_DIRECTIONS.
      */
     int flags;
@@ -694,7 +694,7 @@ typedef struct _ExaDriver {
                             int depth, int usage_hint, int bitsPerPixel,
                             int *new_fb_pitch);
     /** @} */
-    Bool (*SharePixmapBacking)(PixmapPtr pPixmap, ScreenPtr slave, void **handle_p);
+    Bool (*SharePixmapBacking)(PixmapPtr pPixmap, ScreenPtr secondary, void **handle_p);
 
     Bool (*SetSharedPixmapBacking)(PixmapPtr pPixmap, void *handle);
 
diff --git a/exa/exa_accel.c b/exa/exa_accel.c
index 41fcb12..e632331 100644
--- a/exa/exa_accel.c
+++ b/exa/exa_accel.c
@@ -738,7 +738,7 @@ exaPolySegment(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment * pSeg)
         }
     }
 
-    prect = xallocarray(nseg, sizeof(xRectangle));
+    prect = xallocarray((unsigned int)nseg, sizeof(xRectangle));
     for (i = 0; i < nseg; i++) {
         if (pSeg[i].x1 < pSeg[i].x2) {
             prect[i].x = pSeg[i].x1;
diff --git a/exa/exa_mixed.c b/exa/exa_mixed.c
index f618a1e..1e67ec2 100644
--- a/exa/exa_mixed.c
+++ b/exa/exa_mixed.c
@@ -297,7 +297,7 @@ exaPixmapHasGpuCopy_mixed(PixmapPtr pPixmap)
 }
 
 Bool
-exaSharePixmapBacking_mixed(PixmapPtr pPixmap, ScreenPtr slave, void **handle_p)
+exaSharePixmapBacking_mixed(PixmapPtr pPixmap, ScreenPtr secondary, void **handle_p)
 {
     ScreenPtr pScreen = pPixmap->drawable.pScreen;
     ExaScreenPriv(pScreen);
@@ -306,7 +306,7 @@ exaSharePixmapBacking_mixed(PixmapPtr pPixmap, ScreenPtr slave, void **handle_p)
     exaMoveInPixmap(pPixmap);
     /* get the driver to give us a handle */
     if (pExaScr->info->SharePixmapBacking)
-        ret = pExaScr->info->SharePixmapBacking(pPixmap, slave, handle_p);
+        ret = pExaScr->info->SharePixmapBacking(pPixmap, secondary, handle_p);
 
     return ret;
 }
diff --git a/exa/exa_offscreen.c b/exa/exa_offscreen.c
index e287348..c77e362 100644
--- a/exa/exa_offscreen.c
+++ b/exa/exa_offscreen.c
@@ -48,8 +48,8 @@ ExaOffscreenValidate(ScreenPtr pScreen)
     assert(pExaScr->info->offScreenAreas->base_offset ==
            pExaScr->info->offScreenBase);
     for (area = pExaScr->info->offScreenAreas; area; area = area->next) {
-        assert(area->offset >= area->base_offset &&
-               area->offset < (area->base_offset + area->size));
+        assert(area->offset >= area->base_offset);
+        assert(area->offset < (area->base_offset + area->size));
         if (prev)
             assert(prev->base_offset + prev->size == area->base_offset);
         prev = area;
@@ -150,7 +150,7 @@ exaFindAreaToEvict(ExaScreenPrivPtr pExaScr, int size, int align)
  * @param privdata private data for the save callback.
  *
  * Allocates offscreen memory from the device associated with pScreen.  size
- * and align deteremine where and how large the allocated area is, and locked
+ * and align determine where and how large the allocated area is, and locked
  * will mark whether it should be held in card memory.  privdata may be any
  * pointer for the save callback when the area is removed.
  *
@@ -230,7 +230,8 @@ exaOffscreenAlloc(ScreenPtr pScreen, int size, int align,
          * Now get the system to merge the other needed areas together
          */
         while (area->size < real_size) {
-            assert(area->next && area->next->state == ExaOffscreenRemovable);
+            assert(area->next);
+            assert(area->next->state == ExaOffscreenRemovable);
             (void) ExaOffscreenKickOut(pScreen, area->next);
         }
     }
@@ -568,8 +569,8 @@ ExaOffscreenDefragment(ScreenPtr pScreen)
         area->base_offset = prev->base_offset;
         area->offset = area->base_offset;
         prev->offset += pExaDstPix->fb_ptr - pExaSrcPix->fb_ptr;
-        assert(prev->offset >= pExaScr->info->offScreenBase &&
-               prev->offset < pExaScr->info->memorySize);
+        assert(prev->offset >= pExaScr->info->offScreenBase);
+        assert(prev->offset < pExaScr->info->memorySize);
         prev->base_offset = prev->offset;
         if (area->next)
             prev->size = area->next->base_offset - prev->base_offset;
diff --git a/exa/exa_priv.h b/exa/exa_priv.h
index 912e214..4468487 100644
--- a/exa/exa_priv.h
+++ b/exa/exa_priv.h
@@ -119,7 +119,7 @@ typedef struct {
     /* Hash table mapping from glyph sha1 to position in the glyph; we use
      * open addressing with a hash table size determined based on size and large
      * enough so that we always have a good amount of free space, so we can
-     * use linear probing. (Linear probing is preferrable to double hashing
+     * use linear probing. (Linear probing is preferable to double hashing
      * here because it allows us to easily remove entries.)
      */
     int *hashEntries;
@@ -130,7 +130,7 @@ typedef struct {
 
     PicturePtr picture;         /* Where the glyphs of the cache are stored */
     int yOffset;                /* y location within the picture where the cache starts */
-    int columns;                /* Number of columns the glyphs are layed out in */
+    int columns;                /* Number of columns the glyphs are laid out in */
     int evictionPosition;       /* Next random position to evict a glyph */
 } ExaGlyphCacheRec, *ExaGlyphCachePtr;
 
@@ -658,7 +658,7 @@ void
 Bool
 exaSetSharedPixmapBacking_mixed(PixmapPtr pPixmap, void *handle);
 Bool
-exaSharePixmapBacking_mixed(PixmapPtr pPixmap, ScreenPtr slave, void **handle_p);
+exaSharePixmapBacking_mixed(PixmapPtr pPixmap, ScreenPtr secondary, void **handle_p);
 
 /* exa_render.c */
 Bool
diff --git a/exa/exa_unaccel.c b/exa/exa_unaccel.c
index 73eada9..ed1401a 100644
--- a/exa/exa_unaccel.c
+++ b/exa/exa_unaccel.c
@@ -459,11 +459,9 @@ ExaSrcValidate(DrawablePtr pDrawable,
     RegionUnion(dst, dst, &reg);
     RegionUninit(&reg);
 
-    if (pExaScr->SavedSourceValidate) {
-        swap(pExaScr, pScreen, SourceValidate);
-        pScreen->SourceValidate(pDrawable, x, y, width, height, subWindowMode);
-        swap(pExaScr, pScreen, SourceValidate);
-    }
+    swap(pExaScr, pScreen, SourceValidate);
+    pScreen->SourceValidate(pDrawable, x, y, width, height, subWindowMode);
+    swap(pExaScr, pScreen, SourceValidate);
 }
 
 static Bool
diff --git a/fb/Makefile.in b/fb/Makefile.in
index cefc46b..e1f6b1c 100644
--- a/fb/Makefile.in
+++ b/fb/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -107,7 +107,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -289,8 +288,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
@@ -310,8 +307,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -325,6 +320,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -343,14 +340,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -367,8 +356,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -424,6 +415,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -476,7 +469,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -500,29 +492,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -560,8 +536,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -572,14 +546,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -1289,7 +1257,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/fb/fbbltone.c b/fb/fbbltone.c
index 811bbc5..7eac85b 100644
--- a/fb/fbbltone.c
+++ b/fb/fbbltone.c
@@ -227,7 +227,7 @@ fbBltOne(FbStip * src, FbStride srcStride,      /* FbStip units per scanline */
      */
     dstS = dstX / dstBpp;
     /*
-     * Compute shift constants for effective alignement
+     * Compute shift constants for effective alignment
      */
     if (srcX >= dstS) {
         leftShift = srcX - dstS;
diff --git a/fb/fbcmap_mi.c b/fb/fbcmap_mi.c
index 7b6a2c6..d9976ce 100644
--- a/fb/fbcmap_mi.c
+++ b/fb/fbcmap_mi.c
@@ -101,7 +101,7 @@ fbSetVisualTypesAndMasks(int depth, int visuals, int bitsPerRGB,
 
 /*
  * Given a list of formats for a screen, create a list
- * of visuals and depths for the screen which coorespond to
+ * of visuals and depths for the screen which correspond to
  * the set which can be used with this version of fb.
  */
 Bool
diff --git a/fb/fbpixmap.c b/fb/fbpixmap.c
index a524200..af5d7be 100644
--- a/fb/fbpixmap.c
+++ b/fb/fbpixmap.c
@@ -68,7 +68,7 @@ fbCreatePixmap(ScreenPtr pScreen, int width, int height, int depth,
     pPixmap->devKind = paddedWidth;
     pPixmap->refcnt = 1;
     pPixmap->devPrivate.ptr = (void *) ((char *) pPixmap + base + adjust);
-    pPixmap->master_pixmap = NULL;
+    pPixmap->primary_pixmap = NULL;
 
 #ifdef FB_DEBUG
     pPixmap->devPrivate.ptr =
diff --git a/fb/meson.build b/fb/meson.build
index 477ab04..1d8d259 100644
--- a/fb/meson.build
+++ b/fb/meson.build
@@ -54,4 +54,6 @@ libxserver_wfb = static_library('libxserver_wfb',
 	build_by_default: false,
 )
 
-install_data(hdrs_fb, install_dir: xorgsdkdir)
+if build_xorg
+    install_data(hdrs_fb, install_dir: xorgsdkdir)
+endif
diff --git a/glamor/Makefile.in b/glamor/Makefile.in
index b2f185c..53d51ef 100644
--- a/glamor/Makefile.in
+++ b/glamor/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -109,7 +109,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -261,8 +260,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
@@ -282,8 +279,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -297,6 +292,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -315,14 +312,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -339,8 +328,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -396,6 +387,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -448,7 +441,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -472,29 +464,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -532,8 +508,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -544,14 +518,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -845,7 +813,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/glamor/glamor.c b/glamor/glamor.c
index abefef6..da2ea94 100644
--- a/glamor/glamor.c
+++ b/glamor/glamor.c
@@ -99,14 +99,13 @@ glamor_set_pixmap_type(PixmapPtr pixmap, glamor_pixmap_type_t type)
     glamor_init_pixmap_private_small(pixmap, pixmap_priv);
 }
 
-_X_EXPORT void
+_X_EXPORT Bool
 glamor_set_pixmap_texture(PixmapPtr pixmap, unsigned int tex)
 {
     ScreenPtr screen = pixmap->drawable.pScreen;
     glamor_pixmap_private *pixmap_priv;
     glamor_screen_private *glamor_priv;
     glamor_pixmap_fbo *fbo;
-    GLenum format;
 
     glamor_priv = glamor_get_screen_private(screen);
     pixmap_priv = glamor_get_pixmap_private(pixmap);
@@ -116,16 +115,18 @@ glamor_set_pixmap_texture(PixmapPtr pixmap, unsigned int tex)
         glamor_destroy_fbo(glamor_priv, fbo);
     }
 
-    format = gl_iformat_for_pixmap(pixmap);
-    fbo = glamor_create_fbo_from_tex(glamor_priv, pixmap->drawable.width,
-                                     pixmap->drawable.height, format, tex, 0);
+    fbo = glamor_create_fbo_from_tex(glamor_priv, pixmap,
+                                     pixmap->drawable.width,
+                                     pixmap->drawable.height, tex, 0);
 
     if (fbo == NULL) {
         ErrorF("XXX fail to create fbo.\n");
-        return;
+        return FALSE;
     }
 
     glamor_pixmap_attach_fbo(pixmap, fbo);
+
+    return TRUE;
 }
 
 _X_EXPORT void
@@ -134,13 +135,15 @@ glamor_clear_pixmap(PixmapPtr pixmap)
     ScreenPtr screen = pixmap->drawable.pScreen;
     glamor_screen_private *glamor_priv;
     glamor_pixmap_private *pixmap_priv;
+    const struct glamor_format *pixmap_format;
 
     glamor_priv = glamor_get_screen_private(screen);
     pixmap_priv = glamor_get_pixmap_private(pixmap);
+    pixmap_format = glamor_format_for_pixmap(pixmap);
 
     assert(pixmap_priv->fbo != NULL);
 
-    glamor_pixmap_clear_fbo(glamor_priv, pixmap_priv->fbo);
+    glamor_pixmap_clear_fbo(glamor_priv, pixmap_priv->fbo, pixmap_format);
 }
 
 uint32_t
@@ -184,8 +187,7 @@ glamor_bind_texture(glamor_screen_private *glamor_priv, GLenum texture,
     /* Is the operand a GL_RED fbo?
      */
 
-    if (glamor_fbo_red_is_alpha(glamor_priv, fbo)) {
-
+    if (fbo->is_red) {
         /* If destination is also GL_RED, then preserve the bits in
          * the R channel */
 
@@ -205,7 +207,6 @@ glamor_create_pixmap(ScreenPtr screen, int w, int h, int depth,
     glamor_screen_private *glamor_priv = glamor_get_screen_private(screen);
     glamor_pixmap_fbo *fbo = NULL;
     int pitch;
-    GLenum format;
 
     if (w > 32767 || h > 32767)
         return NullPixmap;
@@ -215,14 +216,14 @@ glamor_create_pixmap(ScreenPtr screen, int w, int h, int depth,
              w <= glamor_priv->glyph_max_dim &&
              h <= glamor_priv->glyph_max_dim)
          || (w == 0 && h == 0)
-         || !glamor_check_pixmap_fbo_depth(depth)))
+         || !glamor_priv->formats[depth].rendering_supported))
         return fbCreatePixmap(screen, w, h, depth, usage);
     else
         pixmap = fbCreatePixmap(screen, 0, 0, depth, usage);
 
     pixmap_priv = glamor_get_pixmap_private(pixmap);
 
-    format = gl_iformat_for_pixmap(pixmap);
+    pixmap_priv->is_cbcr = (usage == GLAMOR_CREATE_FORMAT_CBCR);
 
     pitch = (((w * pixmap->drawable.bitsPerPixel + 7) / 8) + 3) & ~3;
     screen->ModifyPixmapHeader(pixmap, w, h, 0, 0, pitch, NULL);
@@ -237,12 +238,12 @@ glamor_create_pixmap(ScreenPtr screen, int w, int h, int depth,
         glamor_check_fbo_size(glamor_priv, w, h))
     {
         glamor_init_pixmap_private_small(pixmap, pixmap_priv);
-        fbo = glamor_create_fbo(glamor_priv, w, h, format, usage);
+        fbo = glamor_create_fbo(glamor_priv, pixmap, w, h, usage);
     } else {
         int tile_size = glamor_priv->max_fbo_size;
         DEBUGF("Create LARGE pixmap %p width %d height %d, tile size %d\n",
                pixmap, w, h, tile_size);
-        fbo = glamor_create_fbo_array(glamor_priv, w, h, format, usage,
+        fbo = glamor_create_fbo_array(glamor_priv, pixmap, usage,
                                       tile_size, tile_size, pixmap_priv);
     }
 
@@ -413,6 +414,7 @@ glamor_debug_output_callback(GLenum source,
 
     LogMessageVerb(X_ERROR, 0, "glamor%d: GL error: %*s\n",
                screen->myNum, length, message);
+    xorg_backtrace();
 }
 
 /**
@@ -422,7 +424,8 @@ glamor_debug_output_callback(GLenum source,
 static void
 glamor_setup_debug_output(ScreenPtr screen)
 {
-    if (!epoxy_has_gl_extension("GL_ARB_debug_output"))
+    if (!epoxy_has_gl_extension("GL_KHR_debug") &&
+        !epoxy_has_gl_extension("GL_ARB_debug_output"))
         return;
 
     glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS);
@@ -443,6 +446,172 @@ glamor_setup_debug_output(ScreenPtr screen)
         glEnable(GL_DEBUG_OUTPUT);
 }
 
+const struct glamor_format *
+glamor_format_for_pixmap(PixmapPtr pixmap)
+{
+    ScreenPtr pScreen = pixmap->drawable.pScreen;
+    glamor_screen_private *glamor_priv = glamor_get_screen_private(pScreen);
+    glamor_pixmap_private *pixmap_priv = glamor_get_pixmap_private(pixmap);
+
+    if (pixmap_priv->is_cbcr)
+        return &glamor_priv->cbcr_format;
+    else
+        return &glamor_priv->formats[pixmap->drawable.depth];
+}
+
+static void
+glamor_add_format(ScreenPtr screen, int depth, CARD32 render_format,
+                  GLenum internalformat, GLenum format, GLenum type,
+                  Bool rendering_supported)
+{
+    glamor_screen_private *glamor_priv = glamor_get_screen_private(screen);
+    struct glamor_format *f = &glamor_priv->formats[depth];
+
+    /* If we're trying to run on GLES, make sure that we get the read
+     * formats that we're expecting, since glamor_transfer relies on
+     * them matching to get data back out.  To avoid this limitation, we
+     * would need to have a more general glReadPixels() path in
+     * glamor_transfer that re-encoded the bits to the pixel format that
+     * we intended after.
+     *
+     * Note that we can't just create a pixmap because we're in
+     * screeninit.
+     */
+    if (rendering_supported && glamor_priv->is_gles) {
+        unsigned fbo, tex;
+        int read_format, read_type;
+        GLenum status;
+
+        glGenTextures(1, &tex);
+        glBindTexture(GL_TEXTURE_2D, tex);
+        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+        glTexImage2D(GL_TEXTURE_2D, 0, internalformat, 1, 1, 0,
+                     format, type, NULL);
+
+        glGenFramebuffers(1, &fbo);
+        glBindFramebuffer(GL_FRAMEBUFFER, fbo);
+        glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
+                               GL_TEXTURE_2D, tex, 0);
+        status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
+        if (status != GL_FRAMEBUFFER_COMPLETE) {
+            ErrorF("glamor: Test fbo for depth %d incomplete.  "
+                   "Falling back to software.\n", depth);
+            glDeleteTextures(1, &tex);
+            glDeleteFramebuffers(1, &fbo);
+            return;
+        }
+
+        glGetIntegerv(GL_IMPLEMENTATION_COLOR_READ_FORMAT, &read_format);
+        glGetIntegerv(GL_IMPLEMENTATION_COLOR_READ_TYPE, &read_type);
+
+        glDeleteTextures(1, &tex);
+        glDeleteFramebuffers(1, &fbo);
+
+        if (format != read_format || type != read_type) {
+            ErrorF("glamor: Implementation returned 0x%x/0x%x read format/type "
+                   "for depth %d, expected 0x%x/0x%x.  "
+                   "Falling back to software.\n",
+                   read_format, read_type, depth, format, type);
+            return;
+        }
+    }
+
+    f->depth = depth;
+    f->render_format = render_format;
+    f->internalformat = internalformat;
+    f->format = format;
+    f->type = type;
+    f->rendering_supported = rendering_supported;
+}
+
+/* Set up the GL format/types that glamor will use for the various depths
+ *
+ * X11's pixel data doesn't have channels, but to store our data in GL
+ * we have to pick some sort of format to move X11 pixel data in and
+ * out with in glamor_transfer.c.  For X11 core operations, other than
+ * GL logic ops (non-GXcopy GC ops) what the driver chooses internally
+ * doesn't matter as long as it doesn't drop any bits (we expect them
+ * to generally expand, if anything).  For Render, we can expect
+ * clients to tend to render with PictFormats matching our channel
+ * layouts here since ultimately X11 pixels tend to end up on the
+ * screen.  The render implementation will fall back to fb if the
+ * channels don't match.
+ *
+ * Note that these formats don't affect what glamor_egl.c or
+ * Xwayland's EGL layer choose for surfaces exposed through DRI or
+ * scanout.  For now, those layers need to match what we're choosing
+ * here, or channels will end up swizzled around.  Similarly, the
+ * driver's visual masks also need to match what we're doing here.
+ */
+static void
+glamor_setup_formats(ScreenPtr screen)
+{
+    glamor_screen_private *glamor_priv = glamor_get_screen_private(screen);
+
+    /* Prefer r8 textures since they're required by GLES3 and core,
+     * only falling back to a8 if we can't do them.
+     */
+    if (glamor_priv->is_gles || epoxy_has_gl_extension("GL_ARB_texture_rg")) {
+        glamor_add_format(screen, 1, PICT_a1,
+                          GL_R8, GL_RED, GL_UNSIGNED_BYTE, FALSE);
+        glamor_add_format(screen, 8, PICT_a8,
+                          GL_R8, GL_RED, GL_UNSIGNED_BYTE, TRUE);
+    } else {
+        glamor_add_format(screen, 1, PICT_a1,
+                          GL_ALPHA, GL_ALPHA, GL_UNSIGNED_BYTE, FALSE);
+        glamor_add_format(screen, 8, PICT_a8,
+                          GL_ALPHA, GL_ALPHA, GL_UNSIGNED_BYTE, TRUE);
+    }
+
+    if (glamor_priv->is_gles) {
+        /* For 15bpp, GLES supports format/type RGBA/5551, rather than
+         * bgra/1555_rev.  GL_EXT_bgra lets the impl say the color
+         * read format/type is bgra/1555 even if we had to create it
+         * with rgba/5551, with Mesa does.  That means we can't use
+         * the same format/type for TexSubImage and readpixels.
+         *
+         * Instead, just store 16 bits using the trusted 565 path, and
+         * disable render accel for now.
+         */
+        glamor_add_format(screen, 15, PICT_x1r5g5b5,
+                          GL_RGB5_A1, GL_RGBA, GL_UNSIGNED_SHORT_5_5_5_1, TRUE);
+    } else {
+        glamor_add_format(screen, 15, PICT_x1r5g5b5,
+                          GL_RGBA, GL_BGRA, GL_UNSIGNED_SHORT_1_5_5_5_REV, TRUE);
+    }
+
+    glamor_add_format(screen, 16, PICT_r5g6b5,
+                      GL_RGB, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, TRUE);
+
+    if (glamor_priv->is_gles) {
+        assert(X_BYTE_ORDER == X_LITTLE_ENDIAN);
+        glamor_add_format(screen, 24, PICT_x8b8g8r8,
+                          GL_RGBA8, GL_RGBA, GL_UNSIGNED_BYTE, TRUE);
+        glamor_add_format(screen, 32, PICT_a8b8g8r8,
+                          GL_RGBA8, GL_RGBA, GL_UNSIGNED_BYTE, TRUE);
+    } else {
+        glamor_add_format(screen, 24, PICT_x8r8g8b8,
+                          GL_RGBA, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, TRUE);
+        glamor_add_format(screen, 32, PICT_a8r8g8b8,
+                          GL_RGBA, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, TRUE);
+    }
+
+    if (glamor_priv->is_gles) {
+        glamor_add_format(screen, 30, PICT_x2b10g10r10,
+                          GL_RGB10_A2, GL_RGBA, GL_UNSIGNED_INT_2_10_10_10_REV, TRUE);
+    } else {
+        glamor_add_format(screen, 30, PICT_x2r10g10b10,
+                          GL_RGB10_A2, GL_BGRA, GL_UNSIGNED_INT_2_10_10_10_REV, TRUE);
+    }
+
+    glamor_priv->cbcr_format.depth = 16;
+    glamor_priv->cbcr_format.internalformat = GL_RG8;
+    glamor_priv->cbcr_format.format = GL_RG;
+    glamor_priv->cbcr_format.type = GL_UNSIGNED_BYTE;
+    glamor_priv->cbcr_format.rendering_supported = TRUE;
+}
+
 /** Set up glamor for an already-configured GL context. */
 Bool
 glamor_init(ScreenPtr screen, unsigned int flags)
@@ -508,10 +677,8 @@ glamor_init(ScreenPtr screen, unsigned int flags)
 
     glamor_make_current(glamor_priv);
 
-    if (epoxy_is_desktop_gl())
-        glamor_priv->gl_flavor = GLAMOR_GL_DESKTOP;
-    else
-        glamor_priv->gl_flavor = GLAMOR_GL_ES2;
+    if (!epoxy_is_desktop_gl())
+        glamor_priv->is_gles = TRUE;
 
     gl_version = epoxy_gl_version();
 
@@ -543,7 +710,7 @@ glamor_init(ScreenPtr screen, unsigned int flags)
     }
     glamor_priv->glsl_version = glsl_major * 100 + glsl_minor;
 
-    if (glamor_priv->gl_flavor == GLAMOR_GL_ES2) {
+    if (glamor_priv->is_gles) {
         /* Force us back to the base version of our programs on an ES
          * context, anyway.  Basically glamor only uses desktop 1.20
          * or 1.30 currently.  1.30's new features are also present in
@@ -567,7 +734,7 @@ glamor_init(ScreenPtr screen, unsigned int flags)
      * have support for it, with most of the ones lacking it being on
      * Windows with Intel 4-series (G45) graphics or older.
      */
-    if (glamor_priv->gl_flavor == GLAMOR_GL_DESKTOP) {
+    if (!glamor_priv->is_gles) {
         if (gl_version < 21) {
             ErrorF("Require OpenGL version 2.1 or later.\n");
             goto fail;
@@ -586,7 +753,7 @@ glamor_init(ScreenPtr screen, unsigned int flags)
          * have instanced arrays, but this is not always the case.
          * etnaviv offers GLSL 140 with OpenGL 2.1.
          */
-        if (glamor_priv->glsl_version >= 130 &&
+        if (glamor_glsl_has_ints(glamor_priv) &&
             !epoxy_has_gl_extension("GL_ARB_instanced_arrays"))
                 glamor_priv->glsl_version = 120;
     } else {
@@ -612,8 +779,12 @@ glamor_init(ScreenPtr screen, unsigned int flags)
         goto fail;
     }
 
+    if (!glamor_priv->is_gles && glamor_priv->glsl_version == 120 &&
+        epoxy_has_gl_extension("GL_ARB_instanced_arrays"))
+        glamor_priv->use_gpu_shader4 = epoxy_has_gl_extension("GL_EXT_gpu_shader4");
+
     glamor_priv->has_rw_pbo = FALSE;
-    if (glamor_priv->gl_flavor == GLAMOR_GL_DESKTOP)
+    if (!glamor_priv->is_gles)
         glamor_priv->has_rw_pbo = TRUE;
 
     glamor_priv->has_khr_debug = epoxy_has_gl_extension("GL_KHR_debug");
@@ -631,22 +802,25 @@ glamor_init(ScreenPtr screen, unsigned int flags)
     glamor_priv->has_nv_texture_barrier =
         epoxy_has_gl_extension("GL_NV_texture_barrier");
     glamor_priv->has_unpack_subimage =
-        glamor_priv->gl_flavor == GLAMOR_GL_DESKTOP ||
+        !glamor_priv->is_gles ||
         epoxy_gl_version() >= 30 ||
         epoxy_has_gl_extension("GL_EXT_unpack_subimage");
     glamor_priv->has_pack_subimage =
-        glamor_priv->gl_flavor == GLAMOR_GL_DESKTOP ||
+        !glamor_priv->is_gles ||
         epoxy_gl_version() >= 30 ||
         epoxy_has_gl_extension("GL_NV_pack_subimage");
     glamor_priv->has_dual_blend =
-        glamor_priv->glsl_version >= 130 &&
+        glamor_glsl_has_ints(glamor_priv) &&
         epoxy_has_gl_extension("GL_ARB_blend_func_extended");
+    glamor_priv->has_clear_texture =
+        epoxy_gl_version() >= 44 ||
+        epoxy_has_gl_extension("GL_ARB_clear_texture");
 
     glamor_priv->can_copyplane = (gl_version >= 30);
 
     glamor_setup_debug_output(screen);
 
-    glamor_priv->use_quads = (glamor_priv->gl_flavor == GLAMOR_GL_DESKTOP) &&
+    glamor_priv->use_quads = !glamor_priv->is_gles &&
                              !glamor_priv->is_core_profile;
 
     /* Driver-specific hack: Avoid using GL_QUADS on VC4, where
@@ -654,7 +828,8 @@ glamor_init(ScreenPtr screen, unsigned int flags)
      * cached IB.
      */
     if (strstr((char *)glGetString(GL_VENDOR), "Broadcom") &&
-        strstr((char *)glGetString(GL_RENDERER), "VC4"))
+        (strstr((char *)glGetString(GL_RENDERER), "VC4") ||
+         strstr((char *)glGetString(GL_RENDERER), "V3D")))
         glamor_priv->use_quads = FALSE;
 
     glGetIntegerv(GL_MAX_RENDERBUFFER_SIZE, &glamor_priv->max_fbo_size);
@@ -668,13 +843,9 @@ glamor_init(ScreenPtr screen, unsigned int flags)
 
     glamor_priv->has_texture_swizzle =
         (epoxy_has_gl_extension("GL_ARB_texture_swizzle") ||
-         (glamor_priv->gl_flavor != GLAMOR_GL_DESKTOP && gl_version >= 30));
+         (glamor_priv->is_gles && gl_version >= 30));
 
-    glamor_priv->one_channel_format = GL_ALPHA;
-    if (epoxy_has_gl_extension("GL_ARB_texture_rg") &&
-        glamor_priv->has_texture_swizzle) {
-        glamor_priv->one_channel_format = GL_RED;
-    }
+    glamor_setup_formats(screen);
 
     glamor_set_debug_level(&glamor_debug_level);
 
@@ -859,8 +1030,7 @@ _glamor_fds_from_pixmap(ScreenPtr screen, PixmapPtr pixmap, int *fds,
     switch (pixmap_priv->type) {
     case GLAMOR_TEXTURE_DRM:
     case GLAMOR_TEXTURE_ONLY:
-        if (!glamor_pixmap_ensure_fbo(pixmap, pixmap->drawable.depth == 30 ?
-                                      GL_RGB10_A2 : GL_RGBA, 0))
+        if (!glamor_pixmap_ensure_fbo(pixmap, 0))
             return 0;
 
         if (modifier) {
@@ -915,7 +1085,7 @@ glamor_shareable_fd_from_pixmap(ScreenPtr screen,
     int ret;
 
     /*
-     * The actual difference between a sharable and non sharable buffer
+     * The actual difference between a shareable and non-shareable buffer
      * is decided 4 call levels deep in glamor_make_pixmap_exportable()
      * based on pixmap->usage_hint == CREATE_PIXMAP_USAGE_SHARED
      * 2 of those calls are also exported API, so we cannot just add a flag.
@@ -936,8 +1106,7 @@ glamor_name_from_pixmap(PixmapPtr pixmap, CARD16 *stride, CARD32 *size)
     switch (pixmap_priv->type) {
     case GLAMOR_TEXTURE_DRM:
     case GLAMOR_TEXTURE_ONLY:
-        if (!glamor_pixmap_ensure_fbo(pixmap, pixmap->drawable.depth == 30 ?
-                                      GL_RGB10_A2 : GL_RGBA, 0))
+        if (!glamor_pixmap_ensure_fbo(pixmap, 0))
             return -1;
         return glamor_egl_fd_name_from_pixmap(pixmap->drawable.pScreen,
                                               pixmap, stride, size);
diff --git a/glamor/glamor.h b/glamor/glamor.h
index be04bf8..3115747 100644
--- a/glamor/glamor.h
+++ b/glamor/glamor.h
@@ -110,7 +110,7 @@ extern _X_EXPORT Bool glamor_close_screen(ScreenPtr screen);
 
 extern _X_EXPORT uint32_t glamor_get_pixmap_texture(PixmapPtr pixmap);
 
-extern _X_EXPORT void glamor_set_pixmap_texture(PixmapPtr pixmap,
+extern _X_EXPORT Bool glamor_set_pixmap_texture(PixmapPtr pixmap,
                                                 unsigned int tex);
 
 extern _X_EXPORT void glamor_set_pixmap_type(PixmapPtr pixmap,
@@ -129,6 +129,7 @@ extern _X_EXPORT Bool glamor_destroy_pixmap(PixmapPtr pixmap);
 #define GLAMOR_CREATE_FBO_NO_FBO        0x103
 #define GLAMOR_CREATE_NO_LARGE          0x105
 #define GLAMOR_CREATE_PIXMAP_NO_TEXTURE 0x106
+#define GLAMOR_CREATE_FORMAT_CBCR       0x107
 
 /* @glamor_egl_exchange_buffers: Exchange the underlying buffers(KHR image,fbo).
  *
@@ -343,7 +344,7 @@ extern _X_EXPORT void glamor_set_drawable_modifiers_func(ScreenPtr screen,
  * @scrn: Current screen info pointer.
  * @fd:   Current drm fd.
  *
- * This function creates and intialize EGL contexts.
+ * This function creates and initializes EGL contexts.
  * Should be called from DDX's preInit function.
  * Return TRUE if success, otherwise return FALSE.
  * */
diff --git a/glamor/glamor_composite_glyphs.c b/glamor/glamor_composite_glyphs.c
index b651274..147e3bb 100644
--- a/glamor/glamor_composite_glyphs.c
+++ b/glamor/glamor_composite_glyphs.c
@@ -208,11 +208,6 @@ static const glamor_facet glamor_facet_composite_glyphs_120 = {
     .locations = glamor_program_location_atlas,
 };
 
-static inline Bool
-glamor_glyph_use_130(glamor_screen_private *glamor_priv) {
-    return glamor_priv->glsl_version >= 130;
-}
-
 static Bool
 glamor_glyphs_init_facet(ScreenPtr screen)
 {
@@ -274,7 +269,7 @@ glamor_glyphs_flush(CARD8 op, PicturePtr src, PicturePtr dst,
                           box->y2 - box->y1);
                 box++;
 
-                if (glamor_glyph_use_130(glamor_priv))
+                if (glamor_glsl_has_ints(glamor_priv))
                     glDrawArraysInstanced(GL_TRIANGLE_STRIP, 0, 4, nglyph);
                 else
                     glamor_glDrawArrays_GL_QUADS(glamor_priv, nglyph);
@@ -287,7 +282,7 @@ glamor_glyphs_flush(CARD8 op, PicturePtr src, PicturePtr dst,
 
     glDisable(GL_SCISSOR_TEST);
 
-    if (glamor_glyph_use_130(glamor_priv)) {
+    if (glamor_glsl_has_ints(glamor_priv)) {
         glVertexAttribDivisor(GLAMOR_VERTEX_SOURCE, 0);
         glVertexAttribDivisor(GLAMOR_VERTEX_POS, 0);
     }
@@ -305,7 +300,7 @@ glamor_glyph_start(ScreenPtr screen, int count)
 
     /* Set up the vertex buffers for the font and destination */
 
-    if (glamor_glyph_use_130(glamor_priv)) {
+    if (glamor_glsl_has_ints(glamor_priv)) {
         v = glamor_get_vbo_space(screen, count * (6 * sizeof (GLshort)), &vbo_offset);
 
         glEnableVertexAttribArray(GLAMOR_VERTEX_POS);
@@ -439,7 +434,7 @@ glamor_composite_glyphs(CARD8 op,
                     /* First glyph in the current atlas?
                      */
                     if (_X_UNLIKELY(glyphs_queued == 0)) {
-                        if (glamor_glyph_use_130(glamor_priv))
+                        if (glamor_glsl_has_ints(glamor_priv))
                             prog = glamor_setup_program_render(op, src, glyph_pict, dst,
                                                                glyphs_program,
                                                                &glamor_facet_composite_glyphs_130,
@@ -458,7 +453,7 @@ glamor_composite_glyphs(CARD8 op,
                      */
 
                     glyphs_queued++;
-                    if (_X_LIKELY(glamor_glyph_use_130(glamor_priv))) {
+                    if (_X_LIKELY(glamor_glsl_has_ints(glamor_priv))) {
                         v[0] = x - glyph->info.x;
                         v[1] = y - glyph->info.y;
                         v[2] = glyph_draw->width;
diff --git a/glamor/glamor_egl.c b/glamor/glamor_egl.c
index 4120c2e..6e0fc65 100644
--- a/glamor/glamor_egl.c
+++ b/glamor/glamor_egl.c
@@ -233,7 +233,7 @@ glamor_egl_create_textured_pixmap_from_gbm_bo(PixmapPtr pixmap,
     glamor_make_current(glamor_priv);
 
     image = eglCreateImageKHR(glamor_egl->display,
-                              glamor_egl->context,
+                              EGL_NO_CONTEXT,
                               EGL_NATIVE_PIXMAP_KHR, bo, NULL);
     if (image == EGL_NO_IMAGE_KHR) {
         glamor_set_pixmap_type(pixmap, GLAMOR_DRM_ONLY);
@@ -280,18 +280,30 @@ glamor_make_pixmap_exportable(PixmapPtr pixmap, Bool modifiers_ok)
         (modifiers_ok || !pixmap_priv->used_modifiers))
         return TRUE;
 
-    if (pixmap->drawable.bitsPerPixel != 32) {
+    switch (pixmap->drawable.depth) {
+    case 30:
+        format = GBM_FORMAT_ARGB2101010;
+        break;
+    case 32:
+    case 24:
+        format = GBM_FORMAT_ARGB8888;
+        break;
+    case 16:
+        format = GBM_FORMAT_RGB565;
+        break;
+    case 15:
+        format = GBM_FORMAT_ARGB1555;
+        break;
+    case 8:
+        format = GBM_FORMAT_R8;
+        break;
+    default:
         xf86DrvMsg(scrn->scrnIndex, X_ERROR,
-                   "Failed to make %dbpp pixmap exportable\n",
-                   pixmap->drawable.bitsPerPixel);
+                   "Failed to make %d depth, %dbpp pixmap exportable\n",
+                   pixmap->drawable.depth, pixmap->drawable.bitsPerPixel);
         return FALSE;
     }
 
-    if (pixmap->drawable.depth == 30)
-	format = GBM_FORMAT_ARGB2101010;
-    else
-        format = GBM_FORMAT_ARGB8888;
-
 #ifdef GBM_BO_WITH_MODIFIERS
     if (modifiers_ok && glamor_egl->dmabuf_capable) {
         uint32_t num_modifiers;
@@ -921,6 +933,8 @@ glamor_egl_init(ScrnInfoPtr scrn, int fd)
 {
     struct glamor_egl_screen_private *glamor_egl;
     const GLubyte *renderer;
+    EGLConfig egl_config;
+    int n;
 
     glamor_egl = calloc(sizeof(*glamor_egl), 1);
     if (glamor_egl == NULL)
@@ -988,6 +1002,22 @@ glamor_egl_init(ScrnInfoPtr scrn, int fd)
                                                    config_attribs);
     }
 
+    if (glamor_egl->context != EGL_NO_CONTEXT) {
+        if (!eglMakeCurrent(glamor_egl->display,
+                            EGL_NO_SURFACE, EGL_NO_SURFACE, glamor_egl->context)) {
+            xf86DrvMsg(scrn->scrnIndex, X_ERROR,
+                       "Failed to make GL context current\n");
+            goto error;
+        }
+
+        if (epoxy_gl_version() < 21) {
+            xf86DrvMsg(scrn->scrnIndex, X_INFO,
+                       "glamor: Ignoring GL < 2.1, falling back to GLES.\n");
+            eglDestroyContext(glamor_egl->display, glamor_egl->context);
+            glamor_egl->context = EGL_NO_CONTEXT;
+        }
+    }
+
     if (glamor_egl->context == EGL_NO_CONTEXT) {
         static const EGLint config_attribs[] = {
             EGL_CONTEXT_CLIENT_VERSION, 2,
@@ -999,21 +1029,28 @@ glamor_egl_init(ScrnInfoPtr scrn, int fd)
             goto error;
         }
 
+        if (!eglChooseConfig(glamor_egl->display, NULL, &egl_config, 1, &n)) {
+            xf86DrvMsg(scrn->scrnIndex, X_ERROR,
+                       "glamor: No acceptable EGL configs found\n");
+            goto error;
+        }
+
         glamor_egl->context = eglCreateContext(glamor_egl->display,
-                                               NULL, EGL_NO_CONTEXT,
+                                               egl_config, EGL_NO_CONTEXT,
                                                config_attribs);
-    }
-    if (glamor_egl->context == EGL_NO_CONTEXT) {
-        xf86DrvMsg(scrn->scrnIndex, X_ERROR,
-                   "glamor: Failed to create GL or GLES2 contexts\n");
-        goto error;
-    }
 
-    if (!eglMakeCurrent(glamor_egl->display,
-                        EGL_NO_SURFACE, EGL_NO_SURFACE, glamor_egl->context)) {
-        xf86DrvMsg(scrn->scrnIndex, X_ERROR,
-                   "Failed to make EGL context current\n");
-        goto error;
+        if (glamor_egl->context == EGL_NO_CONTEXT) {
+            xf86DrvMsg(scrn->scrnIndex, X_ERROR,
+                       "glamor: Failed to create GL or GLES2 contexts\n");
+            goto error;
+        }
+
+        if (!eglMakeCurrent(glamor_egl->display,
+                            EGL_NO_SURFACE, EGL_NO_SURFACE, glamor_egl->context)) {
+            xf86DrvMsg(scrn->scrnIndex, X_ERROR,
+                       "Failed to make GLES2 context current\n");
+            goto error;
+        }
     }
 
     renderer = glGetString(GL_RENDERER);
@@ -1023,9 +1060,14 @@ glamor_egl_init(ScrnInfoPtr scrn, int fd)
         goto error;
     }
     if (strstr((const char *)renderer, "llvmpipe")) {
-        xf86DrvMsg(scrn->scrnIndex, X_INFO,
-                   "Refusing to try glamor on llvmpipe\n");
-        goto error;
+        if (scrn->confScreen->num_gpu_devices)
+            xf86DrvMsg(scrn->scrnIndex, X_INFO,
+                       "Allowing glamor on llvmpipe for PRIME\n");
+        else {
+            xf86DrvMsg(scrn->scrnIndex, X_INFO,
+                       "Refusing to try glamor on llvmpipe\n");
+            goto error;
+        }
     }
 
     /*
@@ -1048,9 +1090,9 @@ glamor_egl_init(ScrnInfoPtr scrn, int fd)
                                 "EGL_EXT_image_dma_buf_import") &&
         epoxy_has_egl_extension(glamor_egl->display,
                                 "EGL_EXT_image_dma_buf_import_modifiers")) {
-       if (xf86Info.debug != NULL)
-           glamor_egl->dmabuf_capable = !!strstr(xf86Info.debug,
-                                                "dmabuf_capable");
+        if (xf86Info.debug != NULL)
+            glamor_egl->dmabuf_capable = !!strstr(xf86Info.debug,
+                                                  "dmabuf_capable");
         else
             glamor_egl->dmabuf_capable = FALSE;
     }
diff --git a/glamor/glamor_fbo.c b/glamor/glamor_fbo.c
index f939a6c..e045d24 100644
--- a/glamor/glamor_fbo.c
+++ b/glamor/glamor_fbo.c
@@ -95,8 +95,9 @@ glamor_pixmap_ensure_fb(glamor_screen_private *glamor_priv,
 
 glamor_pixmap_fbo *
 glamor_create_fbo_from_tex(glamor_screen_private *glamor_priv,
-                           int w, int h, GLenum format, GLint tex, int flag)
+                           PixmapPtr pixmap, int w, int h, GLint tex, int flag)
 {
+    const struct glamor_format *f = glamor_format_for_pixmap(pixmap);
     glamor_pixmap_fbo *fbo;
 
     fbo = calloc(1, sizeof(*fbo));
@@ -106,7 +107,7 @@ glamor_create_fbo_from_tex(glamor_screen_private *glamor_priv,
     fbo->tex = tex;
     fbo->width = w;
     fbo->height = h;
-    fbo->format = format;
+    fbo->is_red = f->format == GL_RED;
 
     if (flag != GLAMOR_CREATE_FBO_NO_FBO) {
         if (glamor_pixmap_ensure_fb(glamor_priv, fbo) != 0) {
@@ -120,23 +121,21 @@ glamor_create_fbo_from_tex(glamor_screen_private *glamor_priv,
 
 static int
 _glamor_create_tex(glamor_screen_private *glamor_priv,
-                   int w, int h, GLenum format)
+                   PixmapPtr pixmap, int w, int h)
 {
+    const struct glamor_format *f = glamor_format_for_pixmap(pixmap);
     unsigned int tex;
-    GLenum iformat = format;
 
-    if (format == GL_RGB10_A2)
-        format = GL_RGBA;
     glamor_make_current(glamor_priv);
     glGenTextures(1, &tex);
     glBindTexture(GL_TEXTURE_2D, tex);
     glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
     glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
-    if (format == glamor_priv->one_channel_format && format == GL_RED)
+    if (f->format == GL_RED)
         glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_A, GL_RED);
     glamor_priv->suppress_gl_out_of_memory_logging = true;
-    glTexImage2D(GL_TEXTURE_2D, 0, iformat, w, h, 0,
-                 format, GL_UNSIGNED_BYTE, NULL);
+    glTexImage2D(GL_TEXTURE_2D, 0, f->internalformat, w, h, 0,
+                 f->format, f->type, NULL);
     glamor_priv->suppress_gl_out_of_memory_logging = false;
 
     if (glGetError() == GL_OUT_OF_MEMORY) {
@@ -156,14 +155,15 @@ _glamor_create_tex(glamor_screen_private *glamor_priv,
 
 glamor_pixmap_fbo *
 glamor_create_fbo(glamor_screen_private *glamor_priv,
-                  int w, int h, GLenum format, int flag)
+                  PixmapPtr pixmap, int w, int h, int flag)
 {
-    GLint tex = _glamor_create_tex(glamor_priv, w, h, format);
+    GLint tex = _glamor_create_tex(glamor_priv, pixmap, w, h);
 
     if (!tex) /* Texture creation failed due to GL_OUT_OF_MEMORY */
         return NULL;
 
-    return glamor_create_fbo_from_tex(glamor_priv, w, h, format, tex, flag);
+    return glamor_create_fbo_from_tex(glamor_priv, pixmap, w, h,
+                                      tex, flag);
 }
 
 /**
@@ -172,10 +172,12 @@ glamor_create_fbo(glamor_screen_private *glamor_priv,
  */
 glamor_pixmap_fbo *
 glamor_create_fbo_array(glamor_screen_private *glamor_priv,
-                         int w, int h, GLenum format, int flag,
+                        PixmapPtr pixmap, int flag,
                          int block_w, int block_h,
                          glamor_pixmap_private *priv)
 {
+    int w = pixmap->drawable.width;
+    int h = pixmap->drawable.height;
     int block_wcnt;
     int block_hcnt;
     glamor_pixmap_fbo **fbo_array;
@@ -215,8 +217,8 @@ glamor_create_fbo_array(glamor_screen_private *glamor_priv,
                 box_array[i * block_wcnt + j].x2 - box_array[i * block_wcnt +
                                                              j].x1;
             fbo_array[i * block_wcnt + j] = glamor_create_fbo(glamor_priv,
+                                                              pixmap,
                                                               fbo_w, fbo_h,
-                                                              format,
                                                               GLAMOR_CREATE_PIXMAP_FIXUP);
             if (fbo_array[i * block_wcnt + j] == NULL)
                 goto cleanup;
@@ -240,15 +242,22 @@ glamor_create_fbo_array(glamor_screen_private *glamor_priv,
 }
 
 void
-glamor_pixmap_clear_fbo(glamor_screen_private *glamor_priv, glamor_pixmap_fbo *fbo)
+glamor_pixmap_clear_fbo(glamor_screen_private *glamor_priv, glamor_pixmap_fbo *fbo,
+                        const struct glamor_format *pixmap_format)
 {
     glamor_make_current(glamor_priv);
 
     assert(fbo->fb != 0 && fbo->tex != 0);
 
-    glamor_set_destination_pixmap_fbo(glamor_priv, fbo, 0, 0, fbo->width, fbo->height);
-    glClearColor(0.0, 0.0, 0.0, 0.0);
-    glClear(GL_COLOR_BUFFER_BIT);
+    if (glamor_priv->has_clear_texture) {
+        glClearTexImage(fbo->tex, 0, pixmap_format->format, pixmap_format->type, NULL);
+    }
+    else {
+        glamor_set_destination_pixmap_fbo(glamor_priv, fbo, 0, 0, fbo->width, fbo->height);
+
+        glClearColor(0.0, 0.0, 0.0, 0.0);
+        glClear(GL_COLOR_BUFFER_BIT);
+    }
 }
 
 glamor_pixmap_fbo *
@@ -314,7 +323,7 @@ glamor_pixmap_destroy_fbo(PixmapPtr pixmap)
 }
 
 Bool
-glamor_pixmap_ensure_fbo(PixmapPtr pixmap, GLenum format, int flag)
+glamor_pixmap_ensure_fbo(PixmapPtr pixmap, int flag)
 {
     glamor_screen_private *glamor_priv;
     glamor_pixmap_private *pixmap_priv;
@@ -324,8 +333,8 @@ glamor_pixmap_ensure_fbo(PixmapPtr pixmap, GLenum format, int flag)
     pixmap_priv = glamor_get_pixmap_private(pixmap);
     if (pixmap_priv->fbo == NULL) {
 
-        fbo = glamor_create_fbo(glamor_priv, pixmap->drawable.width,
-                                pixmap->drawable.height, format, flag);
+        fbo = glamor_create_fbo(glamor_priv, pixmap, pixmap->drawable.width,
+                                pixmap->drawable.height, flag);
         if (fbo == NULL)
             return FALSE;
 
@@ -335,8 +344,8 @@ glamor_pixmap_ensure_fbo(PixmapPtr pixmap, GLenum format, int flag)
         /* We do have a fbo, but it may lack of fb or tex. */
         if (!pixmap_priv->fbo->tex)
             pixmap_priv->fbo->tex =
-                _glamor_create_tex(glamor_priv, pixmap->drawable.width,
-                                   pixmap->drawable.height, format);
+                _glamor_create_tex(glamor_priv, pixmap, pixmap->drawable.width,
+                                   pixmap->drawable.height);
 
         if (flag != GLAMOR_CREATE_FBO_NO_FBO && pixmap_priv->fbo->fb == 0)
             if (glamor_pixmap_ensure_fb(glamor_priv, pixmap_priv->fbo) != 0)
diff --git a/glamor/glamor_font.c b/glamor/glamor_font.c
index 9199a35..c60fa78 100644
--- a/glamor/glamor_font.c
+++ b/glamor/glamor_font.c
@@ -47,7 +47,7 @@ glamor_font_get(ScreenPtr screen, FontPtr font)
     unsigned long       count;
     char                *bits;
 
-    if (glamor_priv->glsl_version < 130)
+    if (!glamor_glsl_has_ints(glamor_priv))
         return NULL;
 
     privates = FontGetPrivate(font, glamor_font_private_index);
@@ -210,7 +210,7 @@ glamor_font_init(ScreenPtr screen)
 {
     glamor_screen_private *glamor_priv = glamor_get_screen_private(screen);
 
-    if (glamor_priv->glsl_version < 130)
+    if (!glamor_glsl_has_ints(glamor_priv))
         return TRUE;
 
     if (glamor_font_generation != serverGeneration) {
diff --git a/glamor/glamor_gradient.c b/glamor/glamor_gradient.c
index eef0788..7e5d5cc 100644
--- a/glamor/glamor_gradient.c
+++ b/glamor/glamor_gradient.c
@@ -204,7 +204,7 @@ _glamor_create_radial_gradient_program(ScreenPtr screen, int stops_count,
      *     Refer to pixman radial gradient.
      *
      *     The problem is given the two circles of c1 and c2 with the radius of r1 and
-     *     r1, we need to caculate the t, which is used to do interpolate with stops,
+     *     r1, we need to calculate the t, which is used to do interpolate with stops,
      *     using the fomula:
      *     length((1-t)*c1 + t*c2 - p) = (1-t)*r1 + t*r2
      *     expand the fomula with xy coond, get the following:
@@ -428,11 +428,11 @@ _glamor_create_linear_gradient_program(ScreenPtr screen, int stops_count,
      *                                      |
      *
      *      step 1: compute the distance of p, pt1 and pt2 in the slope direction.
-     *              Caculate the distance on Y axis first and multiply cos_val to
+     *              Calculate the distance on Y axis first and multiply cos_val to
      *              get the value on slope direction(pd, p1d and p2d represent the
      *              distance of p, pt1, and pt2 respectively).
      *
-     *      step 2: caculate the percentage of (pd - p1d)/(p2d - p1d).
+     *      step 2: calculate the percentage of (pd - p1d)/(p2d - p1d).
      *              If (pd - p1d) > (p2d - p1d) or < 0, then sub or add (p2d - p1d)
      *              to make it in the range of [0, (p2d - p1d)].
      *
diff --git a/glamor/glamor_largepixmap.c b/glamor/glamor_largepixmap.c
index f9adb93..57760f8 100644
--- a/glamor/glamor_largepixmap.c
+++ b/glamor/glamor_largepixmap.c
@@ -744,7 +744,7 @@ glamor_compute_transform_clipped_regions(PixmapPtr pixmap,
 
 /*
  * As transform and repeatpad mode.
- * We may get a clipped result which in multipe regions.
+ * We may get a clipped result which in multiple regions.
  * It's not easy to do a 2nd round clipping just as we do
  * without transform/repeatPad. As it's not easy to reverse
  * the 2nd round clipping result with a transform/repeatPad mode,
diff --git a/glamor/glamor_picture.c b/glamor/glamor_picture.c
index 685d8d6..33b3beb 100644
--- a/glamor/glamor_picture.c
+++ b/glamor/glamor_picture.c
@@ -83,14 +83,14 @@ glamor_get_tex_format_type_from_pictformat(ScreenPtr pScreen,
 
     switch (format) {
     case PICT_a1:
-        *tex_format = glamor_priv->one_channel_format;
+        *tex_format = glamor_priv->formats[1].format;
         *tex_type = GL_UNSIGNED_BYTE;
         *temp_format = PICT_a8;
         break;
 
     case PICT_b8g8r8x8:
     case PICT_b8g8r8a8:
-        if (glamor_priv->gl_flavor == GLAMOR_GL_DESKTOP) {
+        if (!glamor_priv->is_gles) {
             *tex_format = GL_BGRA;
             *tex_type = GL_UNSIGNED_INT_8_8_8_8;
         } else {
@@ -109,7 +109,7 @@ glamor_get_tex_format_type_from_pictformat(ScreenPtr pScreen,
 
     case PICT_x8r8g8b8:
     case PICT_a8r8g8b8:
-        if (glamor_priv->gl_flavor == GLAMOR_GL_DESKTOP) {
+        if (!glamor_priv->is_gles) {
             *tex_format = GL_BGRA;
             *tex_type = GL_UNSIGNED_INT_8_8_8_8_REV;
         } else {
@@ -128,7 +128,7 @@ glamor_get_tex_format_type_from_pictformat(ScreenPtr pScreen,
     case PICT_x8b8g8r8:
     case PICT_a8b8g8r8:
         *tex_format = GL_RGBA;
-        if (glamor_priv->gl_flavor == GLAMOR_GL_DESKTOP) {
+        if (!glamor_priv->is_gles) {
             *tex_type = GL_UNSIGNED_INT_8_8_8_8_REV;
         } else {
             *tex_format = GL_RGBA;
@@ -141,7 +141,7 @@ glamor_get_tex_format_type_from_pictformat(ScreenPtr pScreen,
 
     case PICT_x2r10g10b10:
     case PICT_a2r10g10b10:
-        if (glamor_priv->gl_flavor == GLAMOR_GL_DESKTOP) {
+        if (!glamor_priv->is_gles) {
             *tex_format = GL_BGRA;
             *tex_type = GL_UNSIGNED_INT_2_10_10_10_REV;
         } else {
@@ -151,7 +151,7 @@ glamor_get_tex_format_type_from_pictformat(ScreenPtr pScreen,
 
     case PICT_x2b10g10r10:
     case PICT_a2b10g10r10:
-        if (glamor_priv->gl_flavor == GLAMOR_GL_DESKTOP) {
+        if (!glamor_priv->is_gles) {
             *tex_format = GL_RGBA;
             *tex_type = GL_UNSIGNED_INT_2_10_10_10_REV;
         } else {
@@ -165,7 +165,7 @@ glamor_get_tex_format_type_from_pictformat(ScreenPtr pScreen,
         break;
     case PICT_b5g6r5:
         *tex_format = GL_RGB;
-        if (glamor_priv->gl_flavor == GLAMOR_GL_DESKTOP) {
+        if (!glamor_priv->is_gles) {
             *tex_type = GL_UNSIGNED_SHORT_5_6_5_REV;
         } else {
             *tex_type = GL_UNSIGNED_SHORT_5_6_5;
@@ -177,7 +177,7 @@ glamor_get_tex_format_type_from_pictformat(ScreenPtr pScreen,
     case PICT_x1b5g5r5:
     case PICT_a1b5g5r5:
         *tex_format = GL_RGBA;
-        if (glamor_priv->gl_flavor == GLAMOR_GL_DESKTOP) {
+        if (!glamor_priv->is_gles) {
             *tex_type = GL_UNSIGNED_SHORT_1_5_5_5_REV;
         } else {
             return FALSE;
@@ -186,7 +186,7 @@ glamor_get_tex_format_type_from_pictformat(ScreenPtr pScreen,
 
     case PICT_x1r5g5b5:
     case PICT_a1r5g5b5:
-        if (glamor_priv->gl_flavor == GLAMOR_GL_DESKTOP) {
+        if (!glamor_priv->is_gles) {
             *tex_format = GL_BGRA;
             *tex_type = GL_UNSIGNED_SHORT_1_5_5_5_REV;
         } else {
@@ -195,13 +195,13 @@ glamor_get_tex_format_type_from_pictformat(ScreenPtr pScreen,
         break;
 
     case PICT_a8:
-        *tex_format = glamor_priv->one_channel_format;
+        *tex_format = glamor_priv->formats[8].format;
         *tex_type = GL_UNSIGNED_BYTE;
         break;
 
     case PICT_x4r4g4b4:
     case PICT_a4r4g4b4:
-        if (glamor_priv->gl_flavor == GLAMOR_GL_DESKTOP) {
+        if (!glamor_priv->is_gles) {
             *tex_format = GL_BGRA;
             *tex_type = GL_UNSIGNED_SHORT_4_4_4_4_REV;
         } else {
@@ -213,7 +213,7 @@ glamor_get_tex_format_type_from_pictformat(ScreenPtr pScreen,
 
     case PICT_x4b4g4r4:
     case PICT_a4b4g4r4:
-        if (glamor_priv->gl_flavor == GLAMOR_GL_DESKTOP) {
+        if (!glamor_priv->is_gles) {
             *tex_format = GL_RGBA;
             *tex_type = GL_UNSIGNED_SHORT_4_4_4_4_REV;
         } else {
@@ -286,6 +286,7 @@ glamor_upload_picture_to_texture(PicturePtr picture)
     Bool ret = TRUE;
     Bool needs_swizzle;
     pixman_image_t *converted_image = NULL;
+    const struct glamor_format *f = glamor_format_for_pixmap(pixmap);
 
     assert(glamor_pixmap_is_memory(pixmap));
     assert(!pixmap_priv->fbo);
@@ -335,12 +336,12 @@ glamor_upload_picture_to_texture(PicturePtr picture)
         stride = pixman_image_get_stride(converted_image);
     }
 
-    if (glamor_priv->gl_flavor == GLAMOR_GL_DESKTOP)
-        iformat = gl_iformat_for_pixmap(pixmap);
+    if (!glamor_priv->is_gles)
+        iformat = f->internalformat;
     else
         iformat = format;
 
-    if (!glamor_pixmap_ensure_fbo(pixmap, iformat, GLAMOR_CREATE_FBO_NO_FBO)) {
+    if (!glamor_pixmap_ensure_fbo(pixmap, GLAMOR_CREATE_FBO_NO_FBO)) {
         ret = FALSE;
         goto fail;
     }
diff --git a/glamor/glamor_pixmap.c b/glamor/glamor_pixmap.c
index 166bde5..9aa169c 100644
--- a/glamor/glamor_pixmap.c
+++ b/glamor/glamor_pixmap.c
@@ -124,7 +124,7 @@ glamor_set_alu(ScreenPtr screen, unsigned char alu)
 {
     glamor_screen_private *glamor_priv = glamor_get_screen_private(screen);
 
-    if (glamor_priv->gl_flavor == GLAMOR_GL_ES2) {
+    if (glamor_priv->is_gles) {
         if (alu != GXcopy)
             return FALSE;
         else
diff --git a/glamor/glamor_priv.h b/glamor/glamor_priv.h
index 4353a99..028a6d3 100644
--- a/glamor/glamor_priv.h
+++ b/glamor/glamor_priv.h
@@ -155,13 +155,28 @@ enum gradient_shader {
 struct glamor_screen_private;
 struct glamor_pixmap_private;
 
-enum glamor_gl_flavor {
-    GLAMOR_GL_DESKTOP,          // OPENGL API
-    GLAMOR_GL_ES2               // OPENGL ES2.0 API
-};
-
 #define GLAMOR_COMPOSITE_VBO_VERT_CNT (64*1024)
 
+struct glamor_format {
+    /** X Server's "depth" value */
+    int depth;
+    /** GL internalformat for creating textures of this type */
+    GLenum internalformat;
+    /** GL format transferring pixels in/out of textures of this type. */
+    GLenum format;
+    /** GL type transferring pixels in/out of textures of this type. */
+    GLenum type;
+    /* Render PICT_* matching GL's channel layout for pixels
+     * transferred using format/type.
+     */
+    CARD32 render_format;
+    /**
+     * Whether rendering is supported in GL at all (i.e. without pixel data conversion
+     * just before upload)
+     */
+    Bool rendering_supported;
+};
+
 struct glamor_saved_procs {
     CloseScreenProcPtr close_screen;
     CreateGCProcPtr create_gc;
@@ -185,7 +200,7 @@ struct glamor_saved_procs {
 };
 
 typedef struct glamor_screen_private {
-    enum glamor_gl_flavor gl_flavor;
+    Bool is_gles;
     int glsl_version;
     Bool has_pack_invert;
     Bool has_fbo_blit;
@@ -199,12 +214,20 @@ typedef struct glamor_screen_private {
     Bool has_rw_pbo;
     Bool use_quads;
     Bool has_dual_blend;
+    Bool has_clear_texture;
     Bool has_texture_swizzle;
     Bool is_core_profile;
     Bool can_copyplane;
+    Bool use_gpu_shader4;
     int max_fbo_size;
 
-    GLuint one_channel_format;
+    /**
+     * Stores information about supported formats. Note, that this list contains all
+     * supported pixel formats, including these that are not supported on GL side
+     * directly, but are converted to another format instead.
+     */
+    struct glamor_format formats[33];
+    struct glamor_format cbcr_format;
 
     /* glamor point shader */
     glamor_program point_prog;
@@ -317,8 +340,7 @@ typedef struct glamor_pixmap_fbo {
     GLuint fb; /**< GL FBO name */
     int width; /**< width in pixels */
     int height; /**< height in pixels */
-    GLenum format; /**< GL format used to create the texture. */
-    GLenum type; /**< GL type used to create the texture. */
+    Bool is_red;
 } glamor_pixmap_fbo;
 
 typedef struct glamor_pixmap_clipped_regions {
@@ -380,6 +402,8 @@ typedef struct glamor_pixmap_private {
      * names.
      */
     glamor_pixmap_fbo **fbo_array;
+
+    Bool is_cbcr;
 } glamor_pixmap_private;
 
 extern DevPrivateKeyRec glamor_pixmap_private_key;
@@ -530,16 +554,19 @@ glamor_pixmap_fbo *glamor_pixmap_detach_fbo(glamor_pixmap_private *
                                             pixmap_priv);
 void glamor_pixmap_attach_fbo(PixmapPtr pixmap, glamor_pixmap_fbo *fbo);
 glamor_pixmap_fbo *glamor_create_fbo_from_tex(glamor_screen_private *
-                                              glamor_priv, int w, int h,
-                                              GLenum format, GLint tex,
+                                              glamor_priv, PixmapPtr pixmap,
+                                              int w, int h, GLint tex,
                                               int flag);
-glamor_pixmap_fbo *glamor_create_fbo(glamor_screen_private *glamor_priv, int w,
-                                     int h, GLenum format, int flag);
+glamor_pixmap_fbo *glamor_create_fbo(glamor_screen_private *glamor_priv,
+                                     PixmapPtr pixmap, int w, int h, int flag);
 void glamor_destroy_fbo(glamor_screen_private *glamor_priv,
                         glamor_pixmap_fbo *fbo);
 void glamor_pixmap_destroy_fbo(PixmapPtr pixmap);
 Bool glamor_pixmap_fbo_fixup(ScreenPtr screen, PixmapPtr pixmap);
-void glamor_pixmap_clear_fbo(glamor_screen_private *glamor_priv, glamor_pixmap_fbo *fbo);
+void glamor_pixmap_clear_fbo(glamor_screen_private *glamor_priv, glamor_pixmap_fbo *fbo,
+                             const struct glamor_format *pixmap_format);
+
+const struct glamor_format *glamor_format_for_pixmap(PixmapPtr pixmap);
 
 /* Return whether 'picture' is alpha-only */
 static inline Bool glamor_picture_is_alpha(PicturePtr picture)
@@ -547,21 +574,13 @@ static inline Bool glamor_picture_is_alpha(PicturePtr picture)
     return picture->format == PICT_a1 || picture->format == PICT_a8;
 }
 
-/* Return whether 'fbo' is storing alpha bits in the red channel */
-static inline Bool
-glamor_fbo_red_is_alpha(glamor_screen_private *glamor_priv, glamor_pixmap_fbo *fbo)
-{
-    /* True when the format is GL_RED (that can only happen when our one channel format is GL_RED */
-    return fbo->format == GL_RED;
-}
-
 /* Return whether 'picture' is storing alpha bits in the red channel */
 static inline Bool
 glamor_picture_red_is_alpha(PicturePtr picture)
 {
     /* True when the picture is alpha only and the screen is using GL_RED for alpha pictures */
     return glamor_picture_is_alpha(picture) &&
-        glamor_get_screen_private(picture->pDrawable->pScreen)->one_channel_format == GL_RED;
+        glamor_get_screen_private(picture->pDrawable->pScreen)->formats[8].format == GL_RED;
 }
 
 void glamor_bind_texture(glamor_screen_private *glamor_priv,
@@ -570,7 +589,7 @@ void glamor_bind_texture(glamor_screen_private *glamor_priv,
                          Bool destination_red);
 
 glamor_pixmap_fbo *glamor_create_fbo_array(glamor_screen_private *glamor_priv,
-                                           int w, int h, GLenum format,
+                                           PixmapPtr pixmap,
                                            int flag, int block_w, int block_h,
                                            glamor_pixmap_private *);
 
@@ -680,7 +699,7 @@ glamor_put_vbo_space(ScreenPtr screen);
  * the fbo has valid texture and attach to a valid fb.
  * If the fbo already has a valid glfbo then do nothing.
  */
-Bool glamor_pixmap_ensure_fbo(PixmapPtr pixmap, GLenum format, int flag);
+Bool glamor_pixmap_ensure_fbo(PixmapPtr pixmap, int flag);
 
 glamor_pixmap_clipped_regions *
 glamor_compute_clipped_regions(PixmapPtr pixmap,
@@ -902,7 +921,7 @@ int glamor_xv_put_image(glamor_port_private *port_priv,
                         Bool sync,
                         RegionPtr clipBoxes);
 void glamor_xv_core_init(ScreenPtr screen);
-void glamor_xv_render(glamor_port_private *port_priv);
+void glamor_xv_render(glamor_port_private *port_priv, int id);
 
 #include "glamor_utils.h"
 
diff --git a/glamor/glamor_program.c b/glamor/glamor_program.c
index 830deb3..d8ddb4c 100644
--- a/glamor/glamor_program.c
+++ b/glamor/glamor_program.c
@@ -187,6 +187,7 @@ fs_location_vars(glamor_program_location locations)
 
 static const char vs_template[] =
     "%s"                                /* version */
+    "%s"                                /* exts */
     "%s"                                /* defines */
     "%s"                                /* prim vs_vars */
     "%s"                                /* fill vs_vars */
@@ -199,6 +200,7 @@ static const char vs_template[] =
 
 static const char fs_template[] =
     "%s"                                /* version */
+    "%s"                                /* exts */
     GLAMOR_DEFAULT_PRECISION
     "%s"                                /* defines */
     "%s"                                /* prim fs_vars */
@@ -258,10 +260,11 @@ glamor_build_program(ScreenPtr          screen,
     char                        *fs_vars = NULL;
     char                        *vs_vars = NULL;
 
-    char                        *vs_prog_string;
-    char                        *fs_prog_string;
+    char                        *vs_prog_string = NULL;
+    char                        *fs_prog_string = NULL;
 
     GLint                       fs_prog, vs_prog;
+    Bool                        gpu_shader4 = FALSE;
 
     if (!fill)
         fill = &facet_null_fill;
@@ -270,8 +273,14 @@ glamor_build_program(ScreenPtr          screen,
     flags |= fill->flags;
     version = MAX(version, fill->version);
 
-    if (version > glamor_priv->glsl_version)
-        goto fail;
+    if (version > glamor_priv->glsl_version) {
+        if (version == 130 && !glamor_priv->use_gpu_shader4)
+            goto fail;
+        else {
+            version = 120;
+            gpu_shader4 = TRUE;
+        }
+    }
 
     vs_vars = vs_location_vars(locations);
     fs_vars = fs_location_vars(locations);
@@ -291,6 +300,7 @@ glamor_build_program(ScreenPtr          screen,
     if (asprintf(&vs_prog_string,
                  vs_template,
                  str(version_string),
+                 gpu_shader4 ? "#extension GL_EXT_gpu_shader4 : require\n" : "",
                  str(defines),
                  str(prim->vs_vars),
                  str(fill->vs_vars),
@@ -302,6 +312,7 @@ glamor_build_program(ScreenPtr          screen,
     if (asprintf(&fs_prog_string,
                  fs_template,
                  str(version_string),
+                 gpu_shader4 ? "#extension GL_EXT_gpu_shader4 : require\n#define texelFetch texelFetch2D\n#define uint unsigned int\n" : "",
                  str(defines),
                  str(prim->fs_vars),
                  str(fill->fs_vars),
@@ -372,6 +383,8 @@ fail:
         glDeleteProgram(prog->prog);
         prog->prog = 0;
     }
+    free(vs_prog_string);
+    free(fs_prog_string);
     free(version_string);
     free(fs_vars);
     free(vs_vars);
@@ -459,7 +472,7 @@ glamor_set_blend(CARD8 op, glamor_program_alpha alpha, PicturePtr dst)
         break;
     }
 
-    if (glamor_priv->gl_flavor != GLAMOR_GL_ES2)
+    if (!glamor_priv->is_gles)
         glDisable(GL_COLOR_LOGIC_OP);
 
     if (op == PictOpSrc)
diff --git a/glamor/glamor_rects.c b/glamor/glamor_rects.c
index ae4fe8b..8cdad64 100644
--- a/glamor/glamor_rects.c
+++ b/glamor/glamor_rects.c
@@ -69,7 +69,7 @@ glamor_poly_fill_rect_gl(DrawablePtr drawable,
             glamor_bounds_union_rect(&bounds, &prect[i]);
     }
 
-    if (glamor_priv->glsl_version >= 130) {
+    if (glamor_glsl_has_ints(glamor_priv)) {
         prog = glamor_use_program_fill(pixmap, gc,
                                        &glamor_priv->poly_fill_rect_program,
                                        &glamor_facet_polyfillrect_130);
@@ -151,7 +151,7 @@ glamor_poly_fill_rect_gl(DrawablePtr drawable,
                       scissor.y1 + off_y,
                       scissor.x2 - scissor.x1,
                       scissor.y2 - scissor.y1);
-            if (glamor_priv->glsl_version >= 130)
+            if (glamor_glsl_has_ints(glamor_priv))
                 glDrawArraysInstanced(GL_TRIANGLE_STRIP, 0, 4, nrect);
             else {
                 glamor_glDrawArrays_GL_QUADS(glamor_priv, nrect);
@@ -163,7 +163,7 @@ glamor_poly_fill_rect_gl(DrawablePtr drawable,
 
 bail:
     glDisable(GL_SCISSOR_TEST);
-    if (glamor_priv->glsl_version >= 130) {
+    if (glamor_glsl_has_ints(glamor_priv)) {
         glVertexAttribDivisor(GLAMOR_VERTEX_SOURCE, 0);
         glDisableVertexAttribArray(GLAMOR_VERTEX_SOURCE);
         glVertexAttribDivisor(GLAMOR_VERTEX_POS, 0);
diff --git a/glamor/glamor_render.c b/glamor/glamor_render.c
index d573701..2af65bf 100644
--- a/glamor/glamor_render.c
+++ b/glamor/glamor_render.c
@@ -529,7 +529,7 @@ glamor_set_composite_texture(glamor_screen_private *glamor_priv, int unit,
      * sometimes get zero bits in the R channel, which is harmless.
      */
     glamor_bind_texture(glamor_priv, GL_TEXTURE0 + unit, fbo,
-                        glamor_fbo_red_is_alpha(glamor_priv, dest_priv->fbo));
+                        dest_priv->fbo->is_red);
     repeat_type = picture->repeatType;
     switch (picture->repeatType) {
     case RepeatNone:
@@ -772,23 +772,31 @@ static Bool
 glamor_render_format_is_supported(PicturePtr picture)
 {
     PictFormatShort storage_format;
+    glamor_screen_private *glamor_priv;
+    struct glamor_format *f;
 
     /* Source-only pictures should always work */
     if (!picture->pDrawable)
         return TRUE;
 
-    storage_format = format_for_depth(picture->pDrawable->depth);
+    glamor_priv = glamor_get_screen_private(picture->pDrawable->pScreen);
+    f = &glamor_priv->formats[picture->pDrawable->depth];
+
+    if (!f->rendering_supported)
+        return FALSE;
+
+    storage_format = f->render_format;
 
     switch (picture->format) {
-    case PICT_x2r10g10b10:
+    case PICT_a2r10g10b10:
         return storage_format == PICT_x2r10g10b10;
     case PICT_a8r8g8b8:
     case PICT_x8r8g8b8:
         return storage_format == PICT_a8r8g8b8 || storage_format == PICT_x8r8g8b8;
-    case PICT_a8:
-        return storage_format == PICT_a8;
+    case PICT_a1r5g5b5:
+        return storage_format == PICT_x1r5g5b5;
     default:
-        return FALSE;
+        return picture->format == storage_format;
     }
 }
 
@@ -898,7 +906,7 @@ glamor_composite_choose_shader(CARD8 op,
     }
 
     if (dest_pixmap->drawable.bitsPerPixel <= 8 &&
-        glamor_priv->one_channel_format == GL_RED) {
+        glamor_priv->formats[8].format == GL_RED) {
         key.dest_swizzle = SHADER_DEST_SWIZZLE_ALPHA_TO_RED;
     } else {
         key.dest_swizzle = SHADER_DEST_SWIZZLE_DEFAULT;
@@ -1091,7 +1099,7 @@ glamor_composite_set_shader_blend(glamor_screen_private *glamor_priv,
         }
     }
 
-    if (glamor_priv->gl_flavor != GLAMOR_GL_ES2)
+    if (!glamor_priv->is_gles)
         glDisable(GL_COLOR_LOGIC_OP);
 
     if (op_info->source_blend == GL_ONE && op_info->dest_blend == GL_ZERO) {
diff --git a/glamor/glamor_spans.c b/glamor/glamor_spans.c
index b3c028d..00a019c 100644
--- a/glamor/glamor_spans.c
+++ b/glamor/glamor_spans.c
@@ -64,7 +64,7 @@ glamor_fill_spans_gl(DrawablePtr drawable,
 
     glamor_make_current(glamor_priv);
 
-    if (glamor_priv->glsl_version >= 130) {
+    if (glamor_glsl_has_ints(glamor_priv)) {
         prog = glamor_use_program_fill(pixmap, gc, &glamor_priv->fill_spans_program,
                                        &glamor_facet_fillspans_130);
 
@@ -134,7 +134,7 @@ glamor_fill_spans_gl(DrawablePtr drawable,
                       box->x2 - box->x1,
                       box->y2 - box->y1);
             box++;
-            if (glamor_priv->glsl_version >= 130)
+            if (glamor_glsl_has_ints(glamor_priv))
                 glDrawArraysInstanced(GL_TRIANGLE_STRIP, 0, 4, n);
             else {
                 glamor_glDrawArrays_GL_QUADS(glamor_priv, n);
@@ -146,7 +146,7 @@ glamor_fill_spans_gl(DrawablePtr drawable,
 
 bail:
     glDisable(GL_SCISSOR_TEST);
-    if (glamor_priv->glsl_version >= 130)
+    if (glamor_glsl_has_ints(glamor_priv))
         glVertexAttribDivisor(GLAMOR_VERTEX_POS, 0);
     glDisableVertexAttribArray(GLAMOR_VERTEX_POS);
 
@@ -187,9 +187,8 @@ glamor_get_spans_gl(DrawablePtr drawable, int wmax,
     int box_index;
     int n;
     char *d;
-    GLenum type;
-    GLenum format;
     int off_x, off_y;
+    const struct glamor_format *f = glamor_format_for_pixmap(pixmap);
 
     pixmap_priv = glamor_get_pixmap_private(pixmap);
     if (!GLAMOR_PIXMAP_PRIV_HAS_FBO(pixmap_priv))
@@ -197,8 +196,6 @@ glamor_get_spans_gl(DrawablePtr drawable, int wmax,
 
     glamor_get_drawable_deltas(drawable, pixmap, &off_x, &off_y);
 
-    glamor_format_for_pixmap(pixmap, &format, &type);
-
     glamor_make_current(glamor_priv);
 
     glamor_pixmap_loop(pixmap_priv, box_index) {
@@ -234,7 +231,8 @@ glamor_get_spans_gl(DrawablePtr drawable, int wmax,
             if (y >= box->y2)
                 continue;
 
-            glReadPixels(x1 - box->x1, y - box->y1, x2 - x1, 1, format, type, l);
+            glReadPixels(x1 - box->x1, y - box->y1, x2 - x1, 1,
+                         f->format, f->type, l);
         }
     }
 
@@ -269,11 +267,10 @@ glamor_set_spans_gl(DrawablePtr drawable, GCPtr gc, char *src,
     glamor_screen_private *glamor_priv = glamor_get_screen_private(screen);
     PixmapPtr pixmap = glamor_get_drawable_pixmap(drawable);
     glamor_pixmap_private *pixmap_priv;
+    const struct glamor_format *f = glamor_format_for_pixmap(pixmap);
     int box_index;
     int n;
     char *s;
-    GLenum type;
-    GLenum format;
     int off_x, off_y;
 
     pixmap_priv = glamor_get_pixmap_private(pixmap);
@@ -287,7 +284,6 @@ glamor_set_spans_gl(DrawablePtr drawable, GCPtr gc, char *src,
         goto bail;
 
     glamor_get_drawable_deltas(drawable, pixmap, &off_x, &off_y);
-    glamor_format_for_pixmap(pixmap, &format, &type);
 
     glamor_make_current(glamor_priv);
 
@@ -348,7 +344,7 @@ glamor_set_spans_gl(DrawablePtr drawable, GCPtr gc, char *src,
 
                 glTexSubImage2D(GL_TEXTURE_2D, 0,
                                 x1 - box->x1, y1 - box->y1, x2 - x1, 1,
-                                format, type,
+                                f->format, f->type,
                                 l);
             }
             s += PixmapBytePad(w, drawable->depth);
diff --git a/glamor/glamor_transfer.c b/glamor/glamor_transfer.c
index ebb5101..e706e0f 100644
--- a/glamor/glamor_transfer.c
+++ b/glamor/glamor_transfer.c
@@ -23,38 +23,6 @@
 #include "glamor_priv.h"
 #include "glamor_transfer.h"
 
-/* XXX a kludge for now */
-void
-glamor_format_for_pixmap(PixmapPtr pixmap, GLenum *format, GLenum *type)
-{
-    switch (pixmap->drawable.depth) {
-    case 24:
-    case 32:
-        *format = GL_BGRA;
-        *type = GL_UNSIGNED_INT_8_8_8_8_REV;
-        break;
-    case 30:
-        *format = GL_BGRA;
-        *type = GL_UNSIGNED_INT_2_10_10_10_REV;
-        break;
-    case 16:
-        *format = GL_RGB;
-        *type = GL_UNSIGNED_SHORT_5_6_5;
-        break;
-    case 15:
-        *format = GL_BGRA;
-        *type = GL_UNSIGNED_SHORT_1_5_5_5_REV;
-        break;
-    case 8:
-        *format = glamor_get_screen_private(pixmap->drawable.pScreen)->one_channel_format;
-        *type = GL_UNSIGNED_BYTE;
-        break;
-    default:
-        FatalError("Invalid pixmap depth %d\n", pixmap->drawable.depth);
-        break;
-    }
-}
-
 /*
  * Write a region of bits into a pixmap
  */
@@ -69,10 +37,7 @@ glamor_upload_boxes(PixmapPtr pixmap, BoxPtr in_boxes, int in_nbox,
     glamor_pixmap_private       *priv = glamor_get_pixmap_private(pixmap);
     int                         box_index;
     int                         bytes_per_pixel = pixmap->drawable.bitsPerPixel >> 3;
-    GLenum                      type;
-    GLenum                      format;
-
-    glamor_format_for_pixmap(pixmap, &format, &type);
+    const struct glamor_format *f = glamor_format_for_pixmap(pixmap);
 
     glamor_make_current(glamor_priv);
 
@@ -110,14 +75,14 @@ glamor_upload_boxes(PixmapPtr pixmap, BoxPtr in_boxes, int in_nbox,
                 glTexSubImage2D(GL_TEXTURE_2D, 0,
                                 x1 - box->x1, y1 - box->y1,
                                 x2 - x1, y2 - y1,
-                                format, type,
+                                f->format, f->type,
                                 bits + ofs);
             } else {
                 for (; y1 < y2; y1++, ofs += byte_stride)
                     glTexSubImage2D(GL_TEXTURE_2D, 0,
                                     x1 - box->x1, y1 - box->y1,
                                     x2 - x1, 1,
-                                    format, type,
+                                    f->format, f->type,
                                     bits + ofs);
             }
         }
@@ -172,10 +137,7 @@ glamor_download_boxes(PixmapPtr pixmap, BoxPtr in_boxes, int in_nbox,
     glamor_pixmap_private *priv = glamor_get_pixmap_private(pixmap);
     int box_index;
     int bytes_per_pixel = pixmap->drawable.bitsPerPixel >> 3;
-    GLenum type;
-    GLenum format;
-
-    glamor_format_for_pixmap(pixmap, &format, &type);
+    const struct glamor_format *f = glamor_format_for_pixmap(pixmap);
 
     glamor_make_current(glamor_priv);
 
@@ -210,10 +172,10 @@ glamor_download_boxes(PixmapPtr pixmap, BoxPtr in_boxes, int in_nbox,
 
             if (glamor_priv->has_pack_subimage ||
                 x2 - x1 == byte_stride / bytes_per_pixel) {
-                glReadPixels(x1 - box->x1, y1 - box->y1, x2 - x1, y2 - y1, format, type, bits + ofs);
+                glReadPixels(x1 - box->x1, y1 - box->y1, x2 - x1, y2 - y1, f->format, f->type, bits + ofs);
             } else {
                 for (; y1 < y2; y1++, ofs += byte_stride)
-                    glReadPixels(x1 - box->x1, y1 - box->y1, x2 - x1, 1, format, type, bits + ofs);
+                    glReadPixels(x1 - box->x1, y1 - box->y1, x2 - x1, 1, f->format, f->type, bits + ofs);
             }
         }
     }
diff --git a/glamor/glamor_transfer.h b/glamor/glamor_transfer.h
index de8186a..a6137b3 100644
--- a/glamor/glamor_transfer.h
+++ b/glamor/glamor_transfer.h
@@ -23,9 +23,6 @@
 #ifndef _GLAMOR_TRANSFER_H_
 #define _GLAMOR_TRANSFER_H_
 
-void
-glamor_format_for_pixmap(PixmapPtr pixmap, GLenum *format, GLenum *type);
-
 void
 glamor_upload_boxes(PixmapPtr pixmap, BoxPtr in_boxes, int in_nbox,
                     int dx_src, int dy_src,
diff --git a/glamor/glamor_transform.c b/glamor/glamor_transform.c
index 2d5a634..11a08f7 100644
--- a/glamor/glamor_transform.c
+++ b/glamor/glamor_transform.c
@@ -121,10 +121,9 @@ glamor_set_color_depth(ScreenPtr      pScreen,
 
     glamor_get_rgba_from_pixel(pixel,
                                &color[0], &color[1], &color[2], &color[3],
-                               format_for_depth(depth));
+                               glamor_priv->formats[depth].render_format);
 
-    if ((depth == 1 || depth == 8) &&
-        glamor_priv->one_channel_format == GL_RED)
+    if ((depth <= 8) && glamor_priv->formats[8].format == GL_RED)
       color[0] = color[3];
 
     glUniform4fv(uniform, 1, color);
@@ -159,7 +158,7 @@ glamor_set_solid(PixmapPtr      pixmap,
             return FALSE;
         }
     }
-    glamor_set_color(pixmap, gc->fgPixel, uniform);
+    glamor_set_color(pixmap, pixel, uniform);
 
     return TRUE;
 }
diff --git a/glamor/glamor_utils.h b/glamor/glamor_utils.h
index 0d5674d..93a933e 100644
--- a/glamor/glamor_utils.h
+++ b/glamor/glamor_utils.h
@@ -570,67 +570,8 @@
                                                     && (_w_) <= _glamor_->max_fbo_size  \
                                                     && (_h_) <= _glamor_->max_fbo_size)
 
-/* For 1bpp pixmap, we don't store it as texture. */
-#define glamor_check_pixmap_fbo_depth(_depth_) (			\
-						_depth_ == 8		\
-						|| _depth_ == 15	\
-						|| _depth_ == 16	\
-						|| _depth_ == 24	\
-						|| _depth_ == 30	\
-						|| _depth_ == 32)
-
 #define GLAMOR_PIXMAP_PRIV_HAS_FBO(pixmap_priv)    (pixmap_priv->gl_fbo == GLAMOR_FBO_NORMAL)
 
-/**
- * Borrow from uxa.
- */
-static inline CARD32
-format_for_depth(int depth)
-{
-    switch (depth) {
-    case 1:
-        return PICT_a1;
-    case 4:
-        return PICT_a4;
-    case 8:
-        return PICT_a8;
-    case 15:
-        return PICT_x1r5g5b5;
-    case 16:
-        return PICT_r5g6b5;
-    default:
-    case 24:
-        return PICT_x8r8g8b8;
-    case 30:
-        return PICT_x2r10g10b10;
-    case 32:
-        return PICT_a8r8g8b8;
-    }
-}
-
-static inline GLenum
-gl_iformat_for_pixmap(PixmapPtr pixmap)
-{
-    glamor_screen_private *glamor_priv =
-        glamor_get_screen_private((pixmap)->drawable.pScreen);
-
-    if (glamor_priv->gl_flavor == GLAMOR_GL_DESKTOP &&
-        ((pixmap)->drawable.depth == 1 || (pixmap)->drawable.depth == 8)) {
-        return glamor_priv->one_channel_format;
-    } else if (glamor_priv->gl_flavor == GLAMOR_GL_DESKTOP &&
-               (pixmap)->drawable.depth == 30) {
-        return GL_RGB10_A2;
-    } else {
-        return GL_RGBA;
-    }
-}
-
-static inline CARD32
-format_for_pixmap(PixmapPtr pixmap)
-{
-    return format_for_depth((pixmap)->drawable.depth);
-}
-
 #define REVERT_NONE       		0
 #define REVERT_NORMAL     		1
 #define REVERT_UPLOADING_A1		3
@@ -791,5 +732,9 @@ glamor_glDrawArrays_GL_QUADS(glamor_screen_private *glamor_priv, unsigned count)
     }
 }
 
+static inline Bool
+glamor_glsl_has_ints(glamor_screen_private *glamor_priv) {
+    return glamor_priv->glsl_version >= 130 || glamor_priv->use_gpu_shader4;
+}
 
 #endif
diff --git a/glamor/glamor_vbo.c b/glamor/glamor_vbo.c
index 734189f..000c3e8 100644
--- a/glamor/glamor_vbo.c
+++ b/glamor/glamor_vbo.c
@@ -24,7 +24,7 @@
 /**
  * @file glamor_vbo.c
  *
- * Helpers for managing streamed vertex bufffers used in glamor.
+ * Helpers for managing streamed vertex buffers used in glamor.
  */
 
 #include "glamor_priv.h"
diff --git a/glamor/glamor_xv.c b/glamor/glamor_xv.c
index 62fc4ff..dbb4905 100644
--- a/glamor/glamor_xv.c
+++ b/glamor/glamor_xv.c
@@ -41,7 +41,7 @@
 #include "glamor_transfer.h"
 
 #include <X11/extensions/Xv.h>
-#include "../hw/xfree86/common/fourcc.h"
+#include <fourcc.h>
 /* Reference color space transform data */
 typedef struct tagREF_TRANSFORM {
     float RefLuma;
@@ -59,8 +59,40 @@ typedef struct tagREF_TRANSFORM {
 #define RTFContrast(a)   (1.0 + ((a)*1.0)/1000.0)
 #define RTFHue(a)   (((a)*3.1416)/1000.0)
 
-static const glamor_facet glamor_facet_xv_planar = {
-    .name = "xv_planar",
+static const glamor_facet glamor_facet_xv_planar_2 = {
+    .name = "xv_planar_2",
+
+    .version = 120,
+
+    .source_name = "v_texcoord0",
+    .vs_vars = ("attribute vec2 position;\n"
+                "attribute vec2 v_texcoord0;\n"
+                "varying vec2 tcs;\n"),
+    .vs_exec = (GLAMOR_POS(gl_Position, position)
+                "        tcs = v_texcoord0;\n"),
+
+    .fs_vars = ("uniform sampler2D y_sampler;\n"
+                "uniform sampler2D u_sampler;\n"
+                "uniform vec4 offsetyco;\n"
+                "uniform vec4 ucogamma;\n"
+                "uniform vec4 vco;\n"
+                "varying vec2 tcs;\n"),
+    .fs_exec = (
+                "        float sample;\n"
+                "        vec2 sample_uv;\n"
+                "        vec4 temp1;\n"
+                "        sample = texture2D(y_sampler, tcs).w;\n"
+                "        temp1.xyz = offsetyco.www * vec3(sample) + offsetyco.xyz;\n"
+                "        sample_uv = texture2D(u_sampler, tcs).xy;\n"
+                "        temp1.xyz = ucogamma.xyz * vec3(sample_uv.x) + temp1.xyz;\n"
+                "        temp1.xyz = clamp(vco.xyz * vec3(sample_uv.y) + temp1.xyz, 0.0, 1.0);\n"
+                "        temp1.w = 1.0;\n"
+                "        gl_FragColor = temp1;\n"
+                ),
+};
+
+static const glamor_facet glamor_facet_xv_planar_3 = {
+    .name = "xv_planar_3",
 
     .version = 120,
 
@@ -110,26 +142,50 @@ Atom glamorBrightness, glamorContrast, glamorSaturation, glamorHue,
 XvImageRec glamor_xv_images[] = {
     XVIMAGE_YV12,
     XVIMAGE_I420,
+    XVIMAGE_NV12
 };
 int glamor_xv_num_images = ARRAY_SIZE(glamor_xv_images);
 
 static void
-glamor_init_xv_shader(ScreenPtr screen)
+glamor_init_xv_shader(ScreenPtr screen, int id)
 {
     glamor_screen_private *glamor_priv = glamor_get_screen_private(screen);
     GLint sampler_loc;
+    const glamor_facet *glamor_facet_xv_planar = NULL;
+
+    switch (id) {
+    case FOURCC_YV12:
+    case FOURCC_I420:
+        glamor_facet_xv_planar = &glamor_facet_xv_planar_3;
+        break;
+    case FOURCC_NV12:
+        glamor_facet_xv_planar = &glamor_facet_xv_planar_2;
+        break;
+    default:
+        break;
+    }
 
     glamor_build_program(screen,
                          &glamor_priv->xv_prog,
-                         &glamor_facet_xv_planar, NULL, NULL, NULL);
+                         glamor_facet_xv_planar, NULL, NULL, NULL);
 
     glUseProgram(glamor_priv->xv_prog.prog);
     sampler_loc = glGetUniformLocation(glamor_priv->xv_prog.prog, "y_sampler");
     glUniform1i(sampler_loc, 0);
     sampler_loc = glGetUniformLocation(glamor_priv->xv_prog.prog, "u_sampler");
     glUniform1i(sampler_loc, 1);
-    sampler_loc = glGetUniformLocation(glamor_priv->xv_prog.prog, "v_sampler");
-    glUniform1i(sampler_loc, 2);
+
+    switch (id) {
+    case FOURCC_YV12:
+    case FOURCC_I420:
+        sampler_loc = glGetUniformLocation(glamor_priv->xv_prog.prog, "v_sampler");
+        glUniform1i(sampler_loc, 2);
+        break;
+    case FOURCC_NV12:
+        break;
+    default:
+        break;
+    }
 
 }
 
@@ -227,6 +283,21 @@ glamor_xv_query_image_attributes(int id,
             offsets[2] = size;
         size += tmp;
         break;
+    case FOURCC_NV12:
+        *w = ALIGN(*w, 2);
+        *h = ALIGN(*h, 2);
+        size = ALIGN(*w, 4);
+        if (pitches)
+            pitches[0] = size;
+        size *= *h;
+        if (offsets)
+            offsets[1] = offsets[2] = size;
+        tmp = ALIGN(*w, 4);
+        if (pitches)
+            pitches[1] = pitches[2] = tmp;
+        tmp *= (*h >> 1);
+        size += tmp;
+        break;
     }
     return size;
 }
@@ -240,7 +311,7 @@ static REF_TRANSFORM trans[2] = {
 };
 
 void
-glamor_xv_render(glamor_port_private *port_priv)
+glamor_xv_render(glamor_port_private *port_priv, int id)
 {
     ScreenPtr screen = port_priv->pPixmap->drawable.pScreen;
     glamor_screen_private *glamor_priv = glamor_get_screen_private(screen);
@@ -264,7 +335,7 @@ glamor_xv_render(glamor_port_private *port_priv)
     int dst_box_index;
 
     if (!glamor_priv->xv_prog.prog)
-        glamor_init_xv_shader(screen);
+        glamor_init_xv_shader(screen, id);
 
     cont = RTFContrast(port_priv->contrast);
     bright = RTFBrightness(port_priv->brightness);
@@ -293,6 +364,8 @@ glamor_xv_render(glamor_port_private *port_priv)
                 glamor_get_pixmap_private(port_priv->src_pix[i]);
             pixmap_priv_get_scale(src_pixmap_priv[i], &src_xscale[i],
                                   &src_yscale[i]);
+        } else {
+           src_pixmap_priv[i] = NULL;
         }
     }
     glamor_make_current(glamor_priv);
@@ -319,12 +392,21 @@ glamor_xv_render(glamor_port_private *port_priv)
     glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
     glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
 
-    glActiveTexture(GL_TEXTURE2);
-    glBindTexture(GL_TEXTURE_2D, src_pixmap_priv[2]->fbo->tex);
-    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
-    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
-    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+    switch (id) {
+    case FOURCC_YV12:
+    case FOURCC_I420:
+        glActiveTexture(GL_TEXTURE2);
+        glBindTexture(GL_TEXTURE_2D, src_pixmap_priv[2]->fbo->tex);
+        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+        break;
+    case FOURCC_NV12:
+        break;
+    default:
+        break;
+    }
 
     glEnableVertexAttribArray(GLAMOR_VERTEX_POS);
     glEnableVertexAttribArray(GLAMOR_VERTEX_SOURCE);
@@ -336,7 +418,7 @@ glamor_xv_render(glamor_port_private *port_priv)
     /* Set up a single primitive covering the area being drawn.  We'll
      * clip it to port_priv->clip using GL scissors instead of just
      * emitting a GL_QUAD per box, because this way we hopefully avoid
-     * diagonal tearing between the two trangles used to rasterize a
+     * diagonal tearing between the two triangles used to rasterize a
      * GL_QUAD.
      */
     i = 0;
@@ -417,6 +499,7 @@ glamor_xv_put_image(glamor_port_private *port_priv,
                     RegionPtr clipBoxes)
 {
     ScreenPtr pScreen = pDrawable->pScreen;
+    glamor_screen_private *glamor_priv = glamor_get_screen_private(pScreen);
     int srcPitch, srcPitch2;
     int top, nlines;
     int s2offset, s3offset, tmp;
@@ -425,9 +508,16 @@ glamor_xv_put_image(glamor_port_private *port_priv,
     s2offset = s3offset = srcPitch2 = 0;
 
     if (!port_priv->src_pix[0] ||
-        (width != port_priv->src_pix_w || height != port_priv->src_pix_h)) {
+        (width != port_priv->src_pix_w || height != port_priv->src_pix_h) ||
+        (port_priv->src_pix[2] && id == FOURCC_NV12) ||
+        (!port_priv->src_pix[2] && id != FOURCC_NV12)) {
         int i;
 
+        if (glamor_priv->xv_prog.prog) {
+            glDeleteProgram(glamor_priv->xv_prog.prog);
+            glamor_priv->xv_prog.prog = 0;
+        }
+
         for (i = 0; i < 3; i++)
             if (port_priv->src_pix[i])
                 glamor_destroy_pixmap(port_priv->src_pix[i]);
@@ -435,17 +525,34 @@ glamor_xv_put_image(glamor_port_private *port_priv,
         port_priv->src_pix[0] =
             glamor_create_pixmap(pScreen, width, height, 8,
                                  GLAMOR_CREATE_FBO_NO_FBO);
-        port_priv->src_pix[1] =
-            glamor_create_pixmap(pScreen, width >> 1, height >> 1, 8,
-                                 GLAMOR_CREATE_FBO_NO_FBO);
-        port_priv->src_pix[2] =
-            glamor_create_pixmap(pScreen, width >> 1, height >> 1, 8,
-                                 GLAMOR_CREATE_FBO_NO_FBO);
+
+        switch (id) {
+        case FOURCC_YV12:
+        case FOURCC_I420:
+            port_priv->src_pix[1] =
+                glamor_create_pixmap(pScreen, width >> 1, height >> 1, 8,
+                                     GLAMOR_CREATE_FBO_NO_FBO);
+            port_priv->src_pix[2] =
+                glamor_create_pixmap(pScreen, width >> 1, height >> 1, 8,
+                                     GLAMOR_CREATE_FBO_NO_FBO);
+            if (!port_priv->src_pix[2])
+                return BadAlloc;
+            break;
+        case FOURCC_NV12:
+            port_priv->src_pix[1] =
+                glamor_create_pixmap(pScreen, width >> 1, height >> 1, 16,
+                                     GLAMOR_CREATE_FBO_NO_FBO |
+                                     GLAMOR_CREATE_FORMAT_CBCR);
+            port_priv->src_pix[2] = NULL;
+            break;
+        default:
+            return BadMatch;
+        }
+
         port_priv->src_pix_w = width;
         port_priv->src_pix_h = height;
 
-        if (!port_priv->src_pix[0] || !port_priv->src_pix[1] ||
-            !port_priv->src_pix[2])
+        if (!port_priv->src_pix[0] || !port_priv->src_pix[1])
             return BadAlloc;
     }
 
@@ -489,6 +596,29 @@ glamor_xv_put_image(glamor_port_private *port_priv,
                             0, 0, 0, 0,
                             buf + s3offset, srcPitch2);
         break;
+    case FOURCC_NV12:
+        srcPitch = ALIGN(width, 4);
+        s2offset = srcPitch * height;
+        s2offset += ((top >> 1) * srcPitch);
+
+        full_box.x1 = 0;
+        full_box.y1 = 0;
+        full_box.x2 = width;
+        full_box.y2 = nlines;
+
+        half_box.x1 = 0;
+        half_box.y1 = 0;
+        half_box.x2 = width;
+        half_box.y2 = (nlines + 1) >> 1;
+
+        glamor_upload_boxes(port_priv->src_pix[0], &full_box, 1,
+                            0, 0, 0, 0,
+                            buf + (top * srcPitch), srcPitch);
+
+        glamor_upload_boxes(port_priv->src_pix[1], &half_box, 1,
+                            0, 0, 0, 0,
+                            buf + s2offset, srcPitch);
+        break;
     default:
         return BadMatch;
     }
@@ -511,7 +641,7 @@ glamor_xv_put_image(glamor_port_private *port_priv,
     port_priv->w = width;
     port_priv->h = height;
     port_priv->pDraw = pDrawable;
-    glamor_xv_render(port_priv);
+    glamor_xv_render(port_priv, id);
     return Success;
 }
 
diff --git a/glx/Makefile.in b/glx/Makefile.in
index ff77992..34afc0e 100644
--- a/glx/Makefile.in
+++ b/glx/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -107,7 +107,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -249,8 +248,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
@@ -270,8 +267,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -285,6 +280,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -303,14 +300,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -327,8 +316,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -384,6 +375,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -436,7 +429,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -460,29 +452,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -520,8 +496,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -532,14 +506,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -895,7 +863,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/glx/createcontext.c b/glx/createcontext.c
index 24b02dd..37d14fe 100644
--- a/glx/createcontext.c
+++ b/glx/createcontext.c
@@ -88,9 +88,7 @@ __glXDisp_CreateContextAttribsARB(__GLXclientState * cl, GLbyte * pc)
     int minor_version = 0;
     uint32_t flags = 0;
     uint32_t render_type = GLX_RGBA_TYPE;
-#ifdef GLX_CONTEXT_RELEASE_BEHAVIOR_ARB
     uint32_t flush = GLX_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB;
-#endif
     __GLXcontext *ctx = NULL;
     __GLXcontext *shareCtx = NULL;
     __GLXscreen *glxScreen;
@@ -132,12 +130,16 @@ __glXDisp_CreateContextAttribsARB(__GLXclientState * cl, GLbyte * pc)
      * On the client, the screen comes from the FBConfig, so GLXBadFBConfig
      * should be issued if the screen is nonsense.
      */
-    if (!validGlxScreen(client, req->screen, &glxScreen, &err))
+    if (!validGlxScreen(client, req->screen, &glxScreen, &err)) {
+        client->errorValue = req->fbconfig;
         return __glXError(GLXBadFBConfig);
+    }
 
     if (req->fbconfig) {
-        if (!validGlxFBConfig(client, glxScreen, req->fbconfig, &config, &err))
+        if (!validGlxFBConfig(client, glxScreen, req->fbconfig, &config, &err)) {
+            client->errorValue = req->fbconfig;
             return __glXError(GLXBadFBConfig);
+        }
     }
 
     /* Validate the context with which the new context should share resources.
@@ -201,14 +203,12 @@ __glXDisp_CreateContextAttribsARB(__GLXclientState * cl, GLbyte * pc)
 
             break;
 
-#ifdef GLX_CONTEXT_RELEASE_BEHAVIOR_ARB
         case GLX_CONTEXT_RELEASE_BEHAVIOR_ARB:
             flush = attribs[2 * i + 1];
             if (flush != GLX_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB
                 && flush != GLX_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB)
                 return BadValue;
             break;
-#endif
 
         case GLX_SCREEN:
             /* Only valid for GLX_EXT_no_config_context */
@@ -311,6 +311,7 @@ __glXDisp_CreateContextAttribsARB(__GLXclientState * cl, GLbyte * pc)
      */
     if (!req->isDirect && (major_version > 1 || minor_version > 4
                            || profile == GLX_CONTEXT_ES2_PROFILE_BIT_EXT)) {
+        client->errorValue = req->fbconfig;
         return __glXError(GLXBadFBConfig);
     }
 
@@ -348,9 +349,8 @@ __glXDisp_CreateContextAttribsARB(__GLXclientState * cl, GLbyte * pc)
     ctx->isDirect = req->isDirect;
     ctx->renderMode = GL_RENDER;
     ctx->resetNotificationStrategy = reset;
-#ifdef GLX_CONTEXT_RELEASE_BEHAVIOR_ARB
     ctx->releaseBehavior = flush;
-#endif
+    ctx->renderType = render_type;
 
     /* Add the new context to the various global tables of GLX contexts.
      */
diff --git a/glx/extension_string.c b/glx/extension_string.c
index 354ce06..a5b8c74 100644
--- a/glx/extension_string.c
+++ b/glx/extension_string.c
@@ -31,8 +31,9 @@
  * \author Ian Romanick <idr@us.ibm.com>
  */
 
-#include <string.h>
+#include "dix-config.h"
 #include "extension_string.h"
+#include "opaque.h"
 
 #define SET_BIT(m,b)    (m[ (b) / 8 ] |=  (1U << ((b) % 8)))
 #define CLR_BIT(m,b)    (m[ (b) / 8 ] &= ~(1U << ((b) % 8)))
@@ -85,7 +86,8 @@ static const struct extension_info known_glx_extensions[] = {
     { GLX(EXT_create_context_es2_profile), VER(0,0), N, },
     { GLX(EXT_fbconfig_packed_float),   VER(0,0), N, },
     { GLX(EXT_framebuffer_sRGB),        VER(0,0), N, },
-    { GLX(EXT_import_context),          VER(0,0), Y, },
+    { GLX(EXT_get_drawable_type),       VER(0,0), Y, },
+    { GLX(EXT_import_context),          VER(0,0), N, },
     { GLX(EXT_libglvnd),                VER(0,0), N, },
     { GLX(EXT_no_config_context),       VER(0,0), N, },
     { GLX(EXT_stereo_tree),             VER(0,0), N, },
@@ -177,4 +179,7 @@ __glXInitExtensionEnableBits(unsigned char *enable_bits)
             SET_BIT(enable_bits, known_glx_extensions[i].bit);
         }
     }
+
+    if (enableIndirectGLX)
+        __glXEnableExtension(enable_bits, "GLX_EXT_import_context");
 }
diff --git a/glx/extension_string.h b/glx/extension_string.h
index eab385a..5c8f981 100644
--- a/glx/extension_string.h
+++ b/glx/extension_string.h
@@ -47,6 +47,7 @@ enum {
     EXT_create_context_es_profile_bit,
     EXT_create_context_es2_profile_bit,
     EXT_fbconfig_packed_float_bit,
+    EXT_get_drawable_type_bit,
     EXT_import_context_bit,
     EXT_libglvnd_bit,
     EXT_no_config_context_bit,
diff --git a/glx/glxcmds.c b/glx/glxcmds.c
index 75e4282..fc26a2e 100644
--- a/glx/glxcmds.c
+++ b/glx/glxcmds.c
@@ -241,7 +241,8 @@ __glXdirectContextCreate(__GLXscreen * screen,
 static int
 DoCreateContext(__GLXclientState * cl, GLXContextID gcId,
                 GLXContextID shareList, __GLXconfig * config,
-                __GLXscreen * pGlxScreen, GLboolean isDirect)
+                __GLXscreen * pGlxScreen, GLboolean isDirect,
+                int renderType)
 {
     ClientPtr client = cl->client;
     __GLXcontext *glxc, *shareglxc;
@@ -251,7 +252,7 @@ DoCreateContext(__GLXclientState * cl, GLXContextID gcId,
      ** Find the display list space that we want to share.
      **
      ** NOTE: In a multithreaded X server, we would need to keep a reference
-     ** count for each display list so that if one client detroyed a list that
+     ** count for each display list so that if one client destroyed a list that
      ** another client was using, the list would not really be freed until it
      ** was no longer in use.  Since this sample implementation has no support
      ** for multithreaded servers, we don't do this.
@@ -284,6 +285,15 @@ DoCreateContext(__GLXclientState * cl, GLXContextID gcId,
              */
             isDirect = GL_FALSE;
         }
+
+        /* Core GLX doesn't explicitly require this, but GLX_ARB_create_context
+         * does (see glx/createcontext.c), and it's assumed by our
+         * implementation anyway, so let's be consistent about it.
+         */
+        if (shareglxc->pGlxScreen != pGlxScreen) {
+            client->errorValue = shareglxc->pGlxScreen->pScreen->myNum;
+            return BadMatch;
+        }
     }
 
     /*
@@ -323,6 +333,7 @@ DoCreateContext(__GLXclientState * cl, GLXContextID gcId,
     glxc->idExists = GL_TRUE;
     glxc->isDirect = isDirect;
     glxc->renderMode = GL_RENDER;
+    glxc->renderType = renderType;
 
     /* The GLX_ARB_create_context_robustness spec says:
      *
@@ -372,7 +383,8 @@ __glXDisp_CreateContext(__GLXclientState * cl, GLbyte * pc)
         return err;
 
     return DoCreateContext(cl, req->context, req->shareList,
-                           config, pGlxScreen, req->isDirect);
+                           config, pGlxScreen, req->isDirect,
+                           GLX_RGBA_TYPE);
 }
 
 int
@@ -389,7 +401,8 @@ __glXDisp_CreateNewContext(__GLXclientState * cl, GLbyte * pc)
         return err;
 
     return DoCreateContext(cl, req->context, req->shareList,
-                           config, pGlxScreen, req->isDirect);
+                           config, pGlxScreen, req->isDirect,
+                           req->renderType);
 }
 
 int
@@ -410,7 +423,8 @@ __glXDisp_CreateContextWithConfigSGIX(__GLXclientState * cl, GLbyte * pc)
         return err;
 
     return DoCreateContext(cl, req->context, req->shareList,
-                           config, pGlxScreen, req->isDirect);
+                           config, pGlxScreen, req->isDirect,
+                           req->renderType);
 }
 
 int
@@ -473,8 +487,15 @@ __glXGetDrawable(__GLXcontext * glxc, GLXDrawable drawId, ClientPtr client,
     __GLXscreen *pGlxScreen;
     int rc;
 
-    if (validGlxDrawable(client, drawId, GLX_DRAWABLE_ANY,
-                         DixWriteAccess, &pGlxDraw, &rc)) {
+    rc = dixLookupResourceByType((void **)&pGlxDraw, drawId,
+                                 __glXDrawableRes, client, DixWriteAccess);
+    if (rc == Success &&
+        /* If pGlxDraw->drawId == drawId, drawId is a valid GLX drawable.
+         * Otherwise, if pGlxDraw->type == GLX_DRAWABLE_WINDOW, drawId is
+         * an X window, but the client has already created a GLXWindow
+         * associated with it, so we don't want to create another one. */
+        (pGlxDraw->drawId == drawId ||
+         pGlxDraw->type == GLX_DRAWABLE_WINDOW)) {
         if (glxc != NULL &&
             glxc->config != NULL &&
             glxc->config != pGlxDraw->config) {
@@ -641,10 +662,11 @@ xorgGlxMakeCurrent(ClientPtr client, GLXContextTag tag, XID drawId, XID readId,
             glxc->readPriv = NULL;
             return __glXError(GLXBadContext);
         }
+    }
 
+    glxServer.setContextTagPrivate(client, newContextTag, glxc);
+    if (glxc)
         glxc->currentClient = client;
-        glxServer.setContextTagPrivate(client, newContextTag, glxc);
-    }
 
     if (prevglxc) {
         prevglxc->currentClient = NULL;
@@ -763,7 +785,7 @@ __glXDisp_WaitGL(__GLXclientState * cl, GLbyte * pc)
         glFinish();
     }
 
-    if (glxc && glxc->drawPriv->waitGL)
+    if (glxc && glxc->drawPriv && glxc->drawPriv->waitGL)
         (*glxc->drawPriv->waitGL) (glxc->drawPriv);
 
     return Success;
@@ -787,7 +809,7 @@ __glXDisp_WaitX(__GLXclientState * cl, GLbyte * pc)
             return error;
     }
 
-    if (glxc && glxc->drawPriv->waitX)
+    if (glxc && glxc->drawPriv && glxc->drawPriv->waitX)
         (*glxc->drawPriv->waitX) (glxc->drawPriv);
 
     return Success;
@@ -971,7 +993,6 @@ __glXDisp_GetVisualConfigs(__GLXclientState * cl, GLbyte * pc)
         /* Pad with zeroes, so that attributes count is constant. */
         while (p < GLX_VIS_CONFIG_TOTAL) {
             buf[p++] = 0;
-            buf[p++] = 0;
         }
 
         assert(p == GLX_VIS_CONFIG_TOTAL);
@@ -1659,7 +1680,7 @@ DoQueryContext(__GLXclientState * cl, GLXContextID gcId)
     sendBuf[6] = GLX_FBCONFIG_ID;
     sendBuf[7] = (int) (ctx->config ? ctx->config->fbconfigID : 0);
     sendBuf[8] = GLX_RENDER_TYPE;
-    sendBuf[9] = (int) (ctx->config ? ctx->config->renderType : GLX_DONT_CARE);
+    sendBuf[9] = (int) (ctx->renderType);
 
     if (client->swapped) {
         int length = reply.length;
@@ -1851,7 +1872,7 @@ DoGetDrawableAttributes(__GLXclientState * cl, XID drawId)
     xGLXGetDrawableAttributesReply reply;
     __GLXdrawable *pGlxDraw = NULL;
     DrawablePtr pDraw;
-    CARD32 attributes[18];
+    CARD32 attributes[20];
     int num = 0, error;
 
     if (!validGlxDrawable(client, drawId, GLX_DRAWABLE_ANY,
@@ -1860,7 +1881,7 @@ DoGetDrawableAttributes(__GLXclientState * cl, XID drawId)
         int err = dixLookupWindow((WindowPtr *)&pDraw, drawId, client,
                                   DixGetAttrAccess);
         if (err != Success)
-            return error;
+            return __glXError(GLXBadDrawable);
     }
     if (pGlxDraw)
         pDraw = pGlxDraw->pDraw;
@@ -1888,6 +1909,14 @@ DoGetDrawableAttributes(__GLXclientState * cl, XID drawId)
             ATTRIB(GLX_STEREO_TREE_EXT, 0);
         }
     }
+
+    /* GLX_EXT_get_drawable_type */
+    if (!pGlxDraw || pGlxDraw->type == GLX_DRAWABLE_WINDOW)
+        ATTRIB(GLX_DRAWABLE_TYPE, GLX_WINDOW_BIT);
+    else if (pGlxDraw->type == GLX_DRAWABLE_PIXMAP)
+        ATTRIB(GLX_DRAWABLE_TYPE, GLX_PIXMAP_BIT);
+    else if (pGlxDraw->type == GLX_DRAWABLE_PBUFFER)
+        ATTRIB(GLX_DRAWABLE_TYPE, GLX_PBUFFER_BIT);
 #undef ATTRIB
 
     reply = (xGLXGetDrawableAttributesReply) {
diff --git a/glx/glxcontext.h b/glx/glxcontext.h
index 8f623b4..5dd0ebc 100644
--- a/glx/glxcontext.h
+++ b/glx/glxcontext.h
@@ -104,6 +104,11 @@ struct __GLXcontext {
      */
     GLenum releaseBehavior;
 
+    /**
+     * Context render type
+     */
+    int renderType;
+
     /*
      ** Buffers for feedback and selection.
      */
diff --git a/glx/glxdricommon.c b/glx/glxdricommon.c
index 1baf082..35a5396 100644
--- a/glx/glxdricommon.c
+++ b/glx/glxdricommon.c
@@ -27,6 +27,7 @@
 #include <dix-config.h>
 #endif
 
+#include <ctype.h>
 #include <stdint.h>
 #include <errno.h>
 #include <dlfcn.h>
@@ -114,6 +115,16 @@ render_type_is_pbuffer_only(unsigned renderType)
                             | __DRI_ATTRIB_FLOAT_BIT));
 }
 
+static int
+server_has_depth(int depth)
+{
+    int i;
+    for (i = 0; i < screenInfo.numPixmapFormats; i++)
+        if (screenInfo.formats[i].depth == depth)
+            return 1;
+    return 0;
+}
+
 static __GLXconfig *
 createModeFromConfig(const __DRIcoreExtension * core,
                      const __DRIconfig * driConfig,
@@ -177,6 +188,16 @@ createModeFromConfig(const __DRIcoreExtension * core,
     if (!render_type_is_pbuffer_only(renderType))
         drawableType |= GLX_WINDOW_BIT | GLX_PIXMAP_BIT;
 
+    /* Make sure we don't advertise things the server isn't configured for */
+    if ((drawableType & (GLX_PBUFFER_BIT | GLX_PIXMAP_BIT)) &&
+        !server_has_depth(config->config.rgbBits)) {
+        drawableType &= ~(GLX_PBUFFER_BIT | GLX_PIXMAP_BIT);
+        if (!drawableType) {
+            free(config);
+            return NULL;
+        }
+    }
+
     config->config.next = NULL;
     config->config.visualType = visualType;
     config->config.renderType = renderType;
@@ -322,6 +343,15 @@ glxProbeDriver(const char *driverName,
                  __DRI_DRIVER_GET_EXTENSIONS, driverName) != -1) {
         const __DRIextension **(*get_extensions)(void);
 
+        for (i = 0; i < strlen(get_extensions_name); i++) {
+            /* Replace all non-alphanumeric characters with underscore,
+             * since they are not allowed in C symbol names. That fixes up
+             * symbol name for drivers with '-drm' suffix
+             */
+            if (!isalnum(get_extensions_name[i]))
+                get_extensions_name[i] = '_';
+        }
+
         get_extensions = dlsym(driver, get_extensions_name);
         if (get_extensions)
             extensions = get_extensions();
diff --git a/glx/glxext.h b/glx/glxext.h
index 5ad497e..abaf122 100644
--- a/glx/glxext.h
+++ b/glx/glxext.h
@@ -50,6 +50,11 @@
 #ifndef GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT
 #define GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT   0x20B1
 #endif
+#ifndef GLX_CONTEXT_RELEASE_BEHAVIOR_ARB
+#define GLX_CONTEXT_RELEASE_BEHAVIOR_ARB   0x2097
+#define GLX_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB 0
+#define GLX_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB 0x2098
+#endif
 
 extern void __glXFlushContextCache(void);
 
diff --git a/glx/indirect_dispatch_swap.c b/glx/indirect_dispatch_swap.c
index 7ebcc63..3eeed00 100644
--- a/glx/indirect_dispatch_swap.c
+++ b/glx/indirect_dispatch_swap.c
@@ -81,18 +81,6 @@ bswap_ENUM(const void *src)
     return x.ret;
 }
 
-static GLsync
-bswap_CARD64(const void *src)
-{
-    union {
-        uint64_t dst;
-        GLsync ret;
-    } x;
-
-    x.dst = bswap_64(*(uint64_t *) src);
-    return x.ret;
-}
-
 static GLdouble
 bswap_FLOAT64(const void *src)
 {
diff --git a/glx/indirect_util.c b/glx/indirect_util.c
index dccffa3..ba180b0 100644
--- a/glx/indirect_util.c
+++ b/glx/indirect_util.c
@@ -227,7 +227,7 @@ get_decode_index(const struct __glXDispatchInfo *dispatch_info, unsigned opcode)
         child_index = (opcode & mask) >> next_remain;
         index = tree[index + 1 + child_index];
 
-        /* If the next node is an empty leaf, the opcode is for a non-existant
+        /* If the next node is an empty leaf, the opcode is for a non-existent
          * function.  We're done.
          *
          * If the next node is a non-empty leaf, look up the function pointer
diff --git a/glx/meson.build b/glx/meson.build
index 559b1fe..2ec00ce 100644
--- a/glx/meson.build
+++ b/glx/meson.build
@@ -38,6 +38,7 @@ if build_glx
         dependencies: [
             common_dep,
             dl_dep,
+            dri_dep,
             dependency('glproto', version: '>= 1.4.17'),
             dependency('gl', version: '>= 1.2'),
         ],
@@ -65,7 +66,7 @@ hdrs_vnd = [
     'vndserver.h',
 ]
 
-libglxvnd = ''
+libglxvnd = []
 if build_glx
     libglxvnd = static_library('libglxvnd',
     srcs_vnd,
@@ -78,5 +79,7 @@ if build_glx
         ],
     )
 
-    install_data(hdrs_vnd, install_dir : xorgsdkdir)
+    if build_xorg
+        install_data(hdrs_vnd, install_dir : xorgsdkdir)
+    endif
 endif
diff --git a/glx/vndcmds.c b/glx/vndcmds.c
index 21c6fef..d6d8719 100644
--- a/glx/vndcmds.c
+++ b/glx/vndcmds.c
@@ -92,6 +92,9 @@ static void SetReplyHeader(ClientPtr client, void *replyPtr)
     xGenericReply *rep = (xGenericReply *) replyPtr;
     rep->type = X_Reply;
     rep->sequenceNumber = client->sequence;
+    if (client->swapped) {
+	swaps(&rep->sequenceNumber);
+    }
     rep->length = 0;
 }
 
diff --git a/hw/Makefile.am b/hw/Makefile.am
index 19895dc..1749018 100644
--- a/hw/Makefile.am
+++ b/hw/Makefile.am
@@ -1,7 +1,3 @@
-if DMX
-DMX_SUBDIRS = dmx
-endif
-
 if XORG
 XORG_SUBDIRS = xfree86
 endif
@@ -26,21 +22,15 @@ if XQUARTZ
 XQUARTZ_SUBDIRS = xquartz
 endif
 
-if XWAYLAND
-XWAYLAND_SUBDIRS = xwayland
-endif
-
 SUBDIRS =			\
 	$(XORG_SUBDIRS)		\
 	$(XWIN_SUBDIRS)		\
 	$(XVFB_SUBDIRS)		\
 	$(XNEST_SUBDIRS)	\
-	$(DMX_SUBDIRS)		\
 	$(KDRIVE_SUBDIRS)	\
-	$(XQUARTZ_SUBDIRS)	\
-	$(XWAYLAND_SUBDIRS)
+	$(XQUARTZ_SUBDIRS)
 
-DIST_SUBDIRS = dmx xfree86 vfb xnest xwin xquartz kdrive xwayland
+DIST_SUBDIRS = xfree86 vfb xnest xwin xquartz kdrive
 
 relink:
 	$(AM_V_at)for i in $(SUBDIRS) ; do $(MAKE) -C $$i relink || exit 1 ; done
diff --git a/hw/Makefile.in b/hw/Makefile.in
index f4e811d..08ccc35 100644
--- a/hw/Makefile.in
+++ b/hw/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -104,7 +104,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -160,8 +159,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 am__relativize = \
@@ -206,8 +203,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -221,6 +216,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -239,14 +236,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -263,8 +252,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -320,6 +311,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -372,7 +365,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -396,29 +388,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -456,8 +432,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -468,14 +442,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -548,25 +516,21 @@ target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-@DMX_TRUE@DMX_SUBDIRS = dmx
 @XORG_TRUE@XORG_SUBDIRS = xfree86
 @XVFB_TRUE@XVFB_SUBDIRS = vfb
 @XNEST_TRUE@XNEST_SUBDIRS = xnest
 @XWIN_TRUE@XWIN_SUBDIRS = xwin
 @KDRIVE_TRUE@KDRIVE_SUBDIRS = kdrive
 @XQUARTZ_TRUE@XQUARTZ_SUBDIRS = xquartz
-@XWAYLAND_TRUE@XWAYLAND_SUBDIRS = xwayland
 SUBDIRS = \
 	$(XORG_SUBDIRS)		\
 	$(XWIN_SUBDIRS)		\
 	$(XVFB_SUBDIRS)		\
 	$(XNEST_SUBDIRS)	\
-	$(DMX_SUBDIRS)		\
 	$(KDRIVE_SUBDIRS)	\
-	$(XQUARTZ_SUBDIRS)	\
-	$(XWAYLAND_SUBDIRS)
+	$(XQUARTZ_SUBDIRS)
 
-DIST_SUBDIRS = dmx xfree86 vfb xnest xwin xquartz kdrive xwayland
+DIST_SUBDIRS = xfree86 vfb xnest xwin xquartz kdrive
 all: all-recursive
 
 .SUFFIXES:
@@ -704,7 +668,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/hw/dmx/Makefile.am b/hw/dmx/Makefile.am
deleted file mode 100644
index eef84cb..0000000
--- a/hw/dmx/Makefile.am
+++ /dev/null
@@ -1,86 +0,0 @@
-
-SUBDIRS = input config examples doc doxygen man
-bin_PROGRAMS = Xdmx
-
-if XINERAMA
-PANORAMIX_SRCS = $(top_srcdir)/Xext/panoramiX.c
-endif
-
-if GLX
-SUBDIRS += glxProxy
-GLX_LIBS = glxProxy/libglxproxy.a
-GLX_SRCS = $(PANORAMIX_SRCS) dmx_glxvisuals.c dmx_glxvisuals.h
-GLX_INCS = -I$(top_srcdir)/hw/xfree86/dixmods/extmod
-GLX_DEFS = @GL_CFLAGS@
-endif
-
-AM_CFLAGS = \
-      -DHAVE_DMX_CONFIG_H \
-      $(DIX_CFLAGS) \
-      $(GLX_INCS) \
-      $(GLX_DEFS) \
-      $(DMX_CFLAGS) \
-      @DMXMODULES_CFLAGS@
-
-Xdmx_SOURCES = dmx.c \
-               dmxcb.c \
-               dmxcb.h \
-               dmxclient.h \
-               dmxcmap.c \
-               dmxcmap.h \
-               dmx-config.h \
-               dmxcursor.c \
-               dmxcursor.h \
-               dmxdpms.c \
-               dmxdpms.h \
-               dmxextension.c \
-               dmxextension.h \
-               dmxfont.c \
-               dmxfont.h \
-               dmxgc.c \
-               dmxgc.h \
-               dmxgcops.c \
-               dmxgcops.h \
-               dmx.h \
-               dmxinit.c \
-               dmxinit.h \
-               dmxinput.c \
-               dmxinput.h \
-               dmxlog.c \
-               dmxlog.h \
-               dmxpict.c \
-               dmxpict.h \
-               dmxpixmap.c \
-               dmxpixmap.h \
-               dmxprop.c \
-               dmxprop.h \
-               dmxscrinit.c \
-               dmxscrinit.h \
-               dmxstat.c \
-               dmxstat.h \
-               dmxsync.c \
-               dmxsync.h \
-               dmxvisual.c \
-               dmxvisual.h \
-               dmxwindow.c \
-               dmxwindow.h \
-               $(top_srcdir)/mi/miinitext.c \
-               $(GLX_SRCS) 
-
-
-#if COMPOSITE
-#Xdmx_SOURCES += fakecw.c
-#endif
-
-XDMX_LIBS = \
-	$(GLX_LIBS) \
-	@XDMX_LIBS@ \
-        input/libdmxinput.a \
-        config/libdmxconfig.a
-
-Xdmx_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
-Xdmx_DEPENDENCIES= $(XDMX_LIBS)
-Xdmx_LDADD = $(XDMX_LIBS) $(XDMX_SYS_LIBS) $(XSERVER_SYS_LIBS)
-
-relink:
-	$(AM_V_at)rm -f Xdmx$(EXEEXT) && $(MAKE) Xdmx$(EXEEXT)
diff --git a/hw/dmx/Makefile.in b/hw/dmx/Makefile.in
deleted file mode 100644
index cc26d30..0000000
--- a/hw/dmx/Makefile.in
+++ /dev/null
@@ -1,1206 +0,0 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
-
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-VPATH = @srcdir@
-am__is_gnu_make = { \
-  if test -z '$(MAKELEVEL)'; then \
-    false; \
-  elif test -n '$(MAKE_HOST)'; then \
-    true; \
-  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
-    true; \
-  else \
-    false; \
-  fi; \
-}
-am__make_running_with_option = \
-  case $${target_option-} in \
-      ?) ;; \
-      *) echo "am__make_running_with_option: internal error: invalid" \
-              "target option '$${target_option-}' specified" >&2; \
-         exit 1;; \
-  esac; \
-  has_opt=no; \
-  sane_makeflags=$$MAKEFLAGS; \
-  if $(am__is_gnu_make); then \
-    sane_makeflags=$$MFLAGS; \
-  else \
-    case $$MAKEFLAGS in \
-      *\\[\ \	]*) \
-        bs=\\; \
-        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
-          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
-    esac; \
-  fi; \
-  skip_next=no; \
-  strip_trailopt () \
-  { \
-    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
-  }; \
-  for flg in $$sane_makeflags; do \
-    test $$skip_next = yes && { skip_next=no; continue; }; \
-    case $$flg in \
-      *=*|--*) continue;; \
-        -*I) strip_trailopt 'I'; skip_next=yes;; \
-      -*I?*) strip_trailopt 'I';; \
-        -*O) strip_trailopt 'O'; skip_next=yes;; \
-      -*O?*) strip_trailopt 'O';; \
-        -*l) strip_trailopt 'l'; skip_next=yes;; \
-      -*l?*) strip_trailopt 'l';; \
-      -[dEDm]) skip_next=yes;; \
-      -[JT]) skip_next=yes;; \
-    esac; \
-    case $$flg in \
-      *$$target_option*) has_opt=yes; break;; \
-    esac; \
-  done; \
-  test $$has_opt = yes
-am__make_dryrun = (target_option=n; $(am__make_running_with_option))
-am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-bin_PROGRAMS = Xdmx$(EXEEXT)
-@GLX_TRUE@am__append_1 = glxProxy
-subdir = hw/dmx
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \
-	$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \
-	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
-	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
-	$(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-	$(ACLOCAL_M4)
-DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
-	$(top_builddir)/include/xorg-server.h \
-	$(top_builddir)/include/dix-config.h \
-	$(top_builddir)/include/xorg-config.h \
-	$(top_builddir)/include/xkb-config.h \
-	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
-	$(top_builddir)/include/version-config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-am__installdirs = "$(DESTDIR)$(bindir)"
-PROGRAMS = $(bin_PROGRAMS)
-am__Xdmx_SOURCES_DIST = dmx.c dmxcb.c dmxcb.h dmxclient.h dmxcmap.c \
-	dmxcmap.h dmx-config.h dmxcursor.c dmxcursor.h dmxdpms.c \
-	dmxdpms.h dmxextension.c dmxextension.h dmxfont.c dmxfont.h \
-	dmxgc.c dmxgc.h dmxgcops.c dmxgcops.h dmx.h dmxinit.c \
-	dmxinit.h dmxinput.c dmxinput.h dmxlog.c dmxlog.h dmxpict.c \
-	dmxpict.h dmxpixmap.c dmxpixmap.h dmxprop.c dmxprop.h \
-	dmxscrinit.c dmxscrinit.h dmxstat.c dmxstat.h dmxsync.c \
-	dmxsync.h dmxvisual.c dmxvisual.h dmxwindow.c dmxwindow.h \
-	$(top_srcdir)/mi/miinitext.c $(top_srcdir)/Xext/panoramiX.c \
-	dmx_glxvisuals.c dmx_glxvisuals.h
-@XINERAMA_TRUE@am__objects_1 = panoramiX.$(OBJEXT)
-@GLX_TRUE@am__objects_2 = $(am__objects_1) dmx_glxvisuals.$(OBJEXT)
-am_Xdmx_OBJECTS = dmx.$(OBJEXT) dmxcb.$(OBJEXT) dmxcmap.$(OBJEXT) \
-	dmxcursor.$(OBJEXT) dmxdpms.$(OBJEXT) dmxextension.$(OBJEXT) \
-	dmxfont.$(OBJEXT) dmxgc.$(OBJEXT) dmxgcops.$(OBJEXT) \
-	dmxinit.$(OBJEXT) dmxinput.$(OBJEXT) dmxlog.$(OBJEXT) \
-	dmxpict.$(OBJEXT) dmxpixmap.$(OBJEXT) dmxprop.$(OBJEXT) \
-	dmxscrinit.$(OBJEXT) dmxstat.$(OBJEXT) dmxsync.$(OBJEXT) \
-	dmxvisual.$(OBJEXT) dmxwindow.$(OBJEXT) miinitext.$(OBJEXT) \
-	$(am__objects_2)
-Xdmx_OBJECTS = $(am_Xdmx_OBJECTS)
-am__DEPENDENCIES_1 = $(GLX_LIBS) input/libdmxinput.a \
-	config/libdmxconfig.a
-am__DEPENDENCIES_2 =
-AM_V_lt = $(am__v_lt_@AM_V@)
-am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
-am__v_lt_0 = --silent
-am__v_lt_1 = 
-Xdmx_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-	$(Xdmx_LDFLAGS) $(LDFLAGS) -o $@
-AM_V_P = $(am__v_P_@AM_V@)
-am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
-am__v_P_0 = false
-am__v_P_1 = :
-AM_V_GEN = $(am__v_GEN_@AM_V@)
-am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo "  GEN     " $@;
-am__v_GEN_1 = 
-AM_V_at = $(am__v_at_@AM_V@)
-am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
-am__v_at_0 = @
-am__v_at_1 = 
-DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__maybe_remake_depfiles = depfiles
-am__depfiles_remade = ./$(DEPDIR)/dmx.Po ./$(DEPDIR)/dmx_glxvisuals.Po \
-	./$(DEPDIR)/dmxcb.Po ./$(DEPDIR)/dmxcmap.Po \
-	./$(DEPDIR)/dmxcursor.Po ./$(DEPDIR)/dmxdpms.Po \
-	./$(DEPDIR)/dmxextension.Po ./$(DEPDIR)/dmxfont.Po \
-	./$(DEPDIR)/dmxgc.Po ./$(DEPDIR)/dmxgcops.Po \
-	./$(DEPDIR)/dmxinit.Po ./$(DEPDIR)/dmxinput.Po \
-	./$(DEPDIR)/dmxlog.Po ./$(DEPDIR)/dmxpict.Po \
-	./$(DEPDIR)/dmxpixmap.Po ./$(DEPDIR)/dmxprop.Po \
-	./$(DEPDIR)/dmxscrinit.Po ./$(DEPDIR)/dmxstat.Po \
-	./$(DEPDIR)/dmxsync.Po ./$(DEPDIR)/dmxvisual.Po \
-	./$(DEPDIR)/dmxwindow.Po ./$(DEPDIR)/miinitext.Po \
-	./$(DEPDIR)/panoramiX.Po
-am__mv = mv -f
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
-	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
-	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-	$(AM_CFLAGS) $(CFLAGS)
-AM_V_CC = $(am__v_CC_@AM_V@)
-am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
-am__v_CC_0 = @echo "  CC      " $@;
-am__v_CC_1 = 
-CCLD = $(CC)
-LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-	$(AM_LDFLAGS) $(LDFLAGS) -o $@
-AM_V_CCLD = $(am__v_CCLD_@AM_V@)
-am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
-am__v_CCLD_0 = @echo "  CCLD    " $@;
-am__v_CCLD_1 = 
-SOURCES = $(Xdmx_SOURCES)
-DIST_SOURCES = $(am__Xdmx_SOURCES_DIST)
-RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
-	ctags-recursive dvi-recursive html-recursive info-recursive \
-	install-data-recursive install-dvi-recursive \
-	install-exec-recursive install-html-recursive \
-	install-info-recursive install-pdf-recursive \
-	install-ps-recursive install-recursive installcheck-recursive \
-	installdirs-recursive pdf-recursive ps-recursive \
-	tags-recursive uninstall-recursive
-am__can_run_installinfo = \
-  case $$AM_UPDATE_INFO_DIR in \
-    n|no|NO) false;; \
-    *) (install-info --version) >/dev/null 2>&1;; \
-  esac
-RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
-  distclean-recursive maintainer-clean-recursive
-am__recursive_targets = \
-  $(RECURSIVE_TARGETS) \
-  $(RECURSIVE_CLEAN_TARGETS) \
-  $(am__extra_recursive_targets)
-AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
-	distdir distdir-am
-am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
-# Read a list of newline-separated strings from the standard input,
-# and print each of them once, without duplicates.  Input order is
-# *not* preserved.
-am__uniquify_input = $(AWK) '\
-  BEGIN { nonempty = 0; } \
-  { items[$$0] = 1; nonempty = 1; } \
-  END { if (nonempty) { for (i in items) print i; }; } \
-'
-# Make sure the list of sources is unique.  This is necessary because,
-# e.g., the same source file might be shared among _SOURCES variables
-# for different programs/libraries.
-am__define_uniq_tagged_files = \
-  list='$(am__tagged_files)'; \
-  unique=`for i in $$list; do \
-    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-  done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
-DIST_SUBDIRS = input config examples doc doxygen man glxProxy
-am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-am__relativize = \
-  dir0=`pwd`; \
-  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
-  sed_rest='s,^[^/]*/*,,'; \
-  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
-  sed_butlast='s,/*[^/]*$$,,'; \
-  while test -n "$$dir1"; do \
-    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
-    if test "$$first" != "."; then \
-      if test "$$first" = ".."; then \
-        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
-        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
-      else \
-        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
-        if test "$$first2" = "$$first"; then \
-          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
-        else \
-          dir2="../$$dir2"; \
-        fi; \
-        dir0="$$dir0"/"$$first"; \
-      fi; \
-    fi; \
-    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
-  done; \
-  reldir="$$dir2"
-ACLOCAL = @ACLOCAL@
-ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
-ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
-AMTAR = @AMTAR@
-AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
-APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@
-APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@
-APP_MAN_DIR = @APP_MAN_DIR@
-APP_MAN_SUFFIX = @APP_MAN_SUFFIX@
-AR = @AR@
-AS = @AS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-BASE_CFLAGS = @BASE_CFLAGS@
-BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
-BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
-BUNDLE_VERSION = @BUNDLE_VERSION@
-BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
-CC = @CC@
-CCAS = @CCAS@
-CCASDEPMODE = @CCASDEPMODE@
-CCASFLAGS = @CCASFLAGS@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CHANGELOG_CMD = @CHANGELOG_CMD@
-COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CWARNFLAGS = @CWARNFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DBUS_CFLAGS = @DBUS_CFLAGS@
-DBUS_LIBS = @DBUS_LIBS@
-DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@
-DEFAULT_LOGDIR = @DEFAULT_LOGDIR@
-DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@
-DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@
-DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@
-DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DGA_CFLAGS = @DGA_CFLAGS@
-DGA_LIBS = @DGA_LIBS@
-DIX_CFLAGS = @DIX_CFLAGS@
-DIX_LIB = @DIX_LIB@
-DLLTOOL = @DLLTOOL@
-DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
-DOT = @DOT@
-DOXYGEN = @DOXYGEN@
-DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
-DRI2PROTO_LIBS = @DRI2PROTO_LIBS@
-DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@
-DRI3PROTO_LIBS = @DRI3PROTO_LIBS@
-DRIVER_MAN_DIR = @DRIVER_MAN_DIR@
-DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
-DRI_DRIVER_PATH = @DRI_DRIVER_PATH@
-DSYMUTIL = @DSYMUTIL@
-DTRACE = @DTRACE@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-FILE_MAN_DIR = @FILE_MAN_DIR@
-FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
-FONT100DPIDIR = @FONT100DPIDIR@
-FONT75DPIDIR = @FONT75DPIDIR@
-FONTMISCDIR = @FONTMISCDIR@
-FONTOTFDIR = @FONTOTFDIR@
-FONTROOTDIR = @FONTROOTDIR@
-FONTTTFDIR = @FONTTTFDIR@
-FONTTYPE1DIR = @FONTTYPE1DIR@
-FOP = @FOP@
-GBM_CFLAGS = @GBM_CFLAGS@
-GBM_LIBS = @GBM_LIBS@
-GLAMOR_CFLAGS = @GLAMOR_CFLAGS@
-GLAMOR_LIBS = @GLAMOR_LIBS@
-GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@
-GLX_DEFINES = @GLX_DEFINES@
-GLX_SYS_LIBS = @GLX_SYS_LIBS@
-GL_CFLAGS = @GL_CFLAGS@
-GL_LIBS = @GL_LIBS@
-GREP = @GREP@
-HAL_CFLAGS = @HAL_CFLAGS@
-HAL_LIBS = @HAL_LIBS@
-HAVE_DOT = @HAVE_DOT@
-INSTALL = @INSTALL@
-INSTALL_CMD = @INSTALL_CMD@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-KDRIVE_CFLAGS = @KDRIVE_CFLAGS@
-KDRIVE_INCS = @KDRIVE_INCS@
-KDRIVE_LIBS = @KDRIVE_LIBS@
-KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@
-KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@
-KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@
-KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@
-KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@
-KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@
-KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@
-LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@
-LEX = @LEX@
-LEXLIB = @LEXLIB@
-LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
-LIBDRM_CFLAGS = @LIBDRM_CFLAGS@
-LIBDRM_LIBS = @LIBDRM_LIBS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@
-LIBSHA1_LIBS = @LIBSHA1_LIBS@
-LIBTOOL = @LIBTOOL@
-LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
-LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
-LIB_MAN_DIR = @LIB_MAN_DIR@
-LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
-MAIN_LIB = @MAIN_LIB@
-MAKEINFO = @MAKEINFO@
-MANIFEST_TOOL = @MANIFEST_TOOL@
-MAN_SUBSTS = @MAN_SUBSTS@
-MISC_MAN_DIR = @MISC_MAN_DIR@
-MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
-MKDIR_P = @MKDIR_P@
-NM = @NM@
-NMEDIT = @NMEDIT@
-OBJC = @OBJC@
-OBJCCLD = @OBJCCLD@
-OBJCDEPMODE = @OBJCDEPMODE@
-OBJCFLAGS = @OBJCFLAGS@
-OBJCLINK = @OBJCLINK@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
-OPENSSL_LIBS = @OPENSSL_LIBS@
-OS_LIB = @OS_LIB@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@
-PCIACCESS_LIBS = @PCIACCESS_LIBS@
-PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@
-PIXMAN_CFLAGS = @PIXMAN_CFLAGS@
-PIXMAN_LIBS = @PIXMAN_LIBS@
-PKG_CONFIG = @PKG_CONFIG@
-PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
-PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
-PROJECTROOT = @PROJECTROOT@
-PTHREAD_CC = @PTHREAD_CC@
-PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
-PTHREAD_LIBS = @PTHREAD_LIBS@
-PYTHON3 = @PYTHON3@
-RANLIB = @RANLIB@
-RAWCPP = @RAWCPP@
-RAWCPPFLAGS = @RAWCPPFLAGS@
-RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
-SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
-SED = @SED@
-SELINUX_CFLAGS = @SELINUX_CFLAGS@
-SELINUX_LIBS = @SELINUX_LIBS@
-SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@
-SET_MAKE = @SET_MAKE@
-SHA1_CFLAGS = @SHA1_CFLAGS@
-SHA1_LIBS = @SHA1_LIBS@
-SHELL = @SHELL@
-SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@
-STRICT_CFLAGS = @STRICT_CFLAGS@
-STRIP = @STRIP@
-STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@
-SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@
-SYSCONFDIR = @SYSCONFDIR@
-SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@
-SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@
-TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@
-UDEV_CFLAGS = @UDEV_CFLAGS@
-UDEV_LIBS = @UDEV_LIBS@
-UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
-VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
-VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
-WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
-WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
-WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
-XCONFIGDIR = @XCONFIGDIR@
-XCONFIGFILE = @XCONFIGFILE@
-XDMCP_CFLAGS = @XDMCP_CFLAGS@
-XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-
-#if COMPOSITE
-#Xdmx_SOURCES += fakecw.c
-#endif
-XDMX_LIBS = \
-	$(GLX_LIBS) \
-	@XDMX_LIBS@ \
-        input/libdmxinput.a \
-        config/libdmxconfig.a
-
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
-XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
-XEPHYR_INCS = @XEPHYR_INCS@
-XEPHYR_LIBS = @XEPHYR_LIBS@
-XF86CONFIGDIR = @XF86CONFIGDIR@
-XF86CONFIGFILE = @XF86CONFIGFILE@
-XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@
-XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@
-XKB_COMPILED_DIR = @XKB_COMPILED_DIR@
-XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@
-XKB_DFLT_MODEL = @XKB_DFLT_MODEL@
-XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@
-XKB_DFLT_RULES = @XKB_DFLT_RULES@
-XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@
-XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@
-XLIB_CFLAGS = @XLIB_CFLAGS@
-XLIB_LIBS = @XLIB_LIBS@
-XMLTO = @XMLTO@
-XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@
-XNESTMODULES_LIBS = @XNESTMODULES_LIBS@
-XNEST_LIBS = @XNEST_LIBS@
-XNEST_SYS_LIBS = @XNEST_SYS_LIBS@
-XORG_CFLAGS = @XORG_CFLAGS@
-XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@
-XORG_INCS = @XORG_INCS@
-XORG_LIBS = @XORG_LIBS@
-XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@
-XORG_MAN_PAGE = @XORG_MAN_PAGE@
-XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@
-XORG_MODULES_LIBS = @XORG_MODULES_LIBS@
-XORG_OS_SUBDIR = @XORG_OS_SUBDIR@
-XORG_SGML_PATH = @XORG_SGML_PATH@
-XORG_SYS_LIBS = @XORG_SYS_LIBS@
-XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@
-XPBPROXY_LIBS = @XPBPROXY_LIBS@
-XQUARTZ_LIBS = @XQUARTZ_LIBS@
-XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
-XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
-XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
-XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
-XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
-XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@
-XSERVER_LIBS = @XSERVER_LIBS@
-XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@
-XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
-XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
-XSLTPROC = @XSLTPROC@
-XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
-XVFB_LIBS = @XVFB_LIBS@
-XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
-XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
-XWINMODULES_LIBS = @XWINMODULES_LIBS@
-XWIN_LIBS = @XWIN_LIBS@
-XWIN_SERVER_NAME = @XWIN_SERVER_NAME@
-XWIN_SYS_LIBS = @XWIN_SYS_LIBS@
-YACC = @YACC@
-YFLAGS = @YFLAGS@
-abi_ansic = @abi_ansic@
-abi_extension = @abi_extension@
-abi_videodrv = @abi_videodrv@
-abi_xinput = @abi_xinput@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_AR = @ac_ct_AR@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-ax_pthread_config = @ax_pthread_config@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-driverdir = @driverdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-extdir = @extdir@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-logdir = @logdir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-moduledir = @moduledir@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-runstatedir = @runstatedir@
-sbindir = @sbindir@
-sdkdir = @sdkdir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-symbol_visibility = @symbol_visibility@
-sysconfdir = @sysconfdir@
-sysconfigdir = @sysconfigdir@
-target_alias = @target_alias@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-SUBDIRS = input config examples doc doxygen man $(am__append_1)
-@XINERAMA_TRUE@PANORAMIX_SRCS = $(top_srcdir)/Xext/panoramiX.c
-@GLX_TRUE@GLX_LIBS = glxProxy/libglxproxy.a
-@GLX_TRUE@GLX_SRCS = $(PANORAMIX_SRCS) dmx_glxvisuals.c dmx_glxvisuals.h
-@GLX_TRUE@GLX_INCS = -I$(top_srcdir)/hw/xfree86/dixmods/extmod
-@GLX_TRUE@GLX_DEFS = @GL_CFLAGS@
-AM_CFLAGS = \
-      -DHAVE_DMX_CONFIG_H \
-      $(DIX_CFLAGS) \
-      $(GLX_INCS) \
-      $(GLX_DEFS) \
-      $(DMX_CFLAGS) \
-      @DMXMODULES_CFLAGS@
-
-Xdmx_SOURCES = dmx.c \
-               dmxcb.c \
-               dmxcb.h \
-               dmxclient.h \
-               dmxcmap.c \
-               dmxcmap.h \
-               dmx-config.h \
-               dmxcursor.c \
-               dmxcursor.h \
-               dmxdpms.c \
-               dmxdpms.h \
-               dmxextension.c \
-               dmxextension.h \
-               dmxfont.c \
-               dmxfont.h \
-               dmxgc.c \
-               dmxgc.h \
-               dmxgcops.c \
-               dmxgcops.h \
-               dmx.h \
-               dmxinit.c \
-               dmxinit.h \
-               dmxinput.c \
-               dmxinput.h \
-               dmxlog.c \
-               dmxlog.h \
-               dmxpict.c \
-               dmxpict.h \
-               dmxpixmap.c \
-               dmxpixmap.h \
-               dmxprop.c \
-               dmxprop.h \
-               dmxscrinit.c \
-               dmxscrinit.h \
-               dmxstat.c \
-               dmxstat.h \
-               dmxsync.c \
-               dmxsync.h \
-               dmxvisual.c \
-               dmxvisual.h \
-               dmxwindow.c \
-               dmxwindow.h \
-               $(top_srcdir)/mi/miinitext.c \
-               $(GLX_SRCS) 
-
-Xdmx_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
-Xdmx_DEPENDENCIES = $(XDMX_LIBS)
-Xdmx_LDADD = $(XDMX_LIBS) $(XDMX_SYS_LIBS) $(XSERVER_SYS_LIBS)
-all: all-recursive
-
-.SUFFIXES:
-.SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
-	@for dep in $?; do \
-	  case '$(am__configure_deps)' in \
-	    *$$dep*) \
-	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
-	        && { if test -f $@; then exit 0; else break; fi; }; \
-	      exit 1;; \
-	  esac; \
-	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/dmx/Makefile'; \
-	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --foreign hw/dmx/Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	@case '$?' in \
-	  *config.status*) \
-	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
-	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
-	esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure:  $(am__configure_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-install-binPROGRAMS: $(bin_PROGRAMS)
-	@$(NORMAL_INSTALL)
-	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
-	if test -n "$$list"; then \
-	  echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
-	  $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
-	fi; \
-	for p in $$list; do echo "$$p $$p"; done | \
-	sed 's/$(EXEEXT)$$//' | \
-	while read p p1; do if test -f $$p \
-	 || test -f $$p1 \
-	  ; then echo "$$p"; echo "$$p"; else :; fi; \
-	done | \
-	sed -e 'p;s,.*/,,;n;h' \
-	    -e 's|.*|.|' \
-	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
-	sed 'N;N;N;s,\n, ,g' | \
-	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
-	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
-	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
-	    else { print "f", $$3 "/" $$4, $$1; } } \
-	  END { for (d in files) print "f", d, files[d] }' | \
-	while read type dir files; do \
-	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
-	    test -z "$$files" || { \
-	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
-	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
-	    } \
-	; done
-
-uninstall-binPROGRAMS:
-	@$(NORMAL_UNINSTALL)
-	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
-	files=`for p in $$list; do echo "$$p"; done | \
-	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
-	      -e 's/$$/$(EXEEXT)/' \
-	`; \
-	test -n "$$list" || exit 0; \
-	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
-	cd "$(DESTDIR)$(bindir)" && rm -f $$files
-
-clean-binPROGRAMS:
-	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
-	echo " rm -f" $$list; \
-	rm -f $$list || exit $$?; \
-	test -n "$(EXEEXT)" || exit 0; \
-	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
-	echo " rm -f" $$list; \
-	rm -f $$list
-
-Xdmx$(EXEEXT): $(Xdmx_OBJECTS) $(Xdmx_DEPENDENCIES) $(EXTRA_Xdmx_DEPENDENCIES) 
-	@rm -f Xdmx$(EXEEXT)
-	$(AM_V_CCLD)$(Xdmx_LINK) $(Xdmx_OBJECTS) $(Xdmx_LDADD) $(LIBS)
-
-mostlyclean-compile:
-	-rm -f *.$(OBJEXT)
-
-distclean-compile:
-	-rm -f *.tab.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmx.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmx_glxvisuals.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxcb.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxcmap.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxcursor.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxdpms.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxextension.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxfont.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxgc.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxgcops.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxinit.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxinput.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxlog.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxpict.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxpixmap.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxprop.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxscrinit.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxstat.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxsync.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxvisual.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxwindow.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/miinitext.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/panoramiX.Po@am__quote@ # am--include-marker
-
-$(am__depfiles_remade):
-	@$(MKDIR_P) $(@D)
-	@echo '# dummy' >$@-t && $(am__mv) $@-t $@
-
-am--depfiles: $(am__depfiles_remade)
-
-.c.o:
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
-
-.c.obj:
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
-
-.c.lo:
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
-
-miinitext.o: $(top_srcdir)/mi/miinitext.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT miinitext.o -MD -MP -MF $(DEPDIR)/miinitext.Tpo -c -o miinitext.o `test -f '$(top_srcdir)/mi/miinitext.c' || echo '$(srcdir)/'`$(top_srcdir)/mi/miinitext.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/miinitext.Tpo $(DEPDIR)/miinitext.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$(top_srcdir)/mi/miinitext.c' object='miinitext.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o miinitext.o `test -f '$(top_srcdir)/mi/miinitext.c' || echo '$(srcdir)/'`$(top_srcdir)/mi/miinitext.c
-
-miinitext.obj: $(top_srcdir)/mi/miinitext.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT miinitext.obj -MD -MP -MF $(DEPDIR)/miinitext.Tpo -c -o miinitext.obj `if test -f '$(top_srcdir)/mi/miinitext.c'; then $(CYGPATH_W) '$(top_srcdir)/mi/miinitext.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/mi/miinitext.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/miinitext.Tpo $(DEPDIR)/miinitext.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$(top_srcdir)/mi/miinitext.c' object='miinitext.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o miinitext.obj `if test -f '$(top_srcdir)/mi/miinitext.c'; then $(CYGPATH_W) '$(top_srcdir)/mi/miinitext.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/mi/miinitext.c'; fi`
-
-panoramiX.o: $(top_srcdir)/Xext/panoramiX.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT panoramiX.o -MD -MP -MF $(DEPDIR)/panoramiX.Tpo -c -o panoramiX.o `test -f '$(top_srcdir)/Xext/panoramiX.c' || echo '$(srcdir)/'`$(top_srcdir)/Xext/panoramiX.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/panoramiX.Tpo $(DEPDIR)/panoramiX.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$(top_srcdir)/Xext/panoramiX.c' object='panoramiX.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o panoramiX.o `test -f '$(top_srcdir)/Xext/panoramiX.c' || echo '$(srcdir)/'`$(top_srcdir)/Xext/panoramiX.c
-
-panoramiX.obj: $(top_srcdir)/Xext/panoramiX.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT panoramiX.obj -MD -MP -MF $(DEPDIR)/panoramiX.Tpo -c -o panoramiX.obj `if test -f '$(top_srcdir)/Xext/panoramiX.c'; then $(CYGPATH_W) '$(top_srcdir)/Xext/panoramiX.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/Xext/panoramiX.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/panoramiX.Tpo $(DEPDIR)/panoramiX.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$(top_srcdir)/Xext/panoramiX.c' object='panoramiX.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o panoramiX.obj `if test -f '$(top_srcdir)/Xext/panoramiX.c'; then $(CYGPATH_W) '$(top_srcdir)/Xext/panoramiX.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/Xext/panoramiX.c'; fi`
-
-mostlyclean-libtool:
-	-rm -f *.lo
-
-clean-libtool:
-	-rm -rf .libs _libs
-
-# This directory's subdirectories are mostly independent; you can cd
-# into them and run 'make' without going through this Makefile.
-# To change the values of 'make' variables: instead of editing Makefiles,
-# (1) if the variable is set in 'config.status', edit 'config.status'
-#     (which will cause the Makefiles to be regenerated when you run 'make');
-# (2) otherwise, pass the desired values on the 'make' command line.
-$(am__recursive_targets):
-	@fail=; \
-	if $(am__make_keepgoing); then \
-	  failcom='fail=yes'; \
-	else \
-	  failcom='exit 1'; \
-	fi; \
-	dot_seen=no; \
-	target=`echo $@ | sed s/-recursive//`; \
-	case "$@" in \
-	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
-	  *) list='$(SUBDIRS)' ;; \
-	esac; \
-	for subdir in $$list; do \
-	  echo "Making $$target in $$subdir"; \
-	  if test "$$subdir" = "."; then \
-	    dot_seen=yes; \
-	    local_target="$$target-am"; \
-	  else \
-	    local_target="$$target"; \
-	  fi; \
-	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-	  || eval $$failcom; \
-	done; \
-	if test "$$dot_seen" = "no"; then \
-	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
-	fi; test -z "$$fail"
-
-ID: $(am__tagged_files)
-	$(am__define_uniq_tagged_files); mkid -fID $$unique
-tags: tags-recursive
-TAGS: tags
-
-tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
-	set x; \
-	here=`pwd`; \
-	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
-	  include_option=--etags-include; \
-	  empty_fix=.; \
-	else \
-	  include_option=--include; \
-	  empty_fix=; \
-	fi; \
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  if test "$$subdir" = .; then :; else \
-	    test ! -f $$subdir/TAGS || \
-	      set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
-	  fi; \
-	done; \
-	$(am__define_uniq_tagged_files); \
-	shift; \
-	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
-	  test -n "$$unique" || unique=$$empty_fix; \
-	  if test $$# -gt 0; then \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      "$$@" $$unique; \
-	  else \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      $$unique; \
-	  fi; \
-	fi
-ctags: ctags-recursive
-
-CTAGS: ctags
-ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
-	$(am__define_uniq_tagged_files); \
-	test -z "$(CTAGS_ARGS)$$unique" \
-	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$unique
-
-GTAGS:
-	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && $(am__cd) $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) "$$here"
-cscopelist: cscopelist-recursive
-
-cscopelist-am: $(am__tagged_files)
-	list='$(am__tagged_files)'; \
-	case "$(srcdir)" in \
-	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
-	  *) sdir=$(subdir)/$(srcdir) ;; \
-	esac; \
-	for i in $$list; do \
-	  if test -f "$$i"; then \
-	    echo "$(subdir)/$$i"; \
-	  else \
-	    echo "$$sdir/$$i"; \
-	  fi; \
-	done >> $(top_builddir)/cscope.files
-
-distclean-tags:
-	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(BUILT_SOURCES)
-	$(MAKE) $(AM_MAKEFLAGS) distdir-am
-
-distdir-am: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	list='$(DISTFILES)'; \
-	  dist_files=`for file in $$list; do echo $$file; done | \
-	  sed -e "s|^$$srcdirstrip/||;t" \
-	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
-	case $$dist_files in \
-	  */*) $(MKDIR_P) `echo "$$dist_files" | \
-			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
-			   sort -u` ;; \
-	esac; \
-	for file in $$dist_files; do \
-	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  if test -d $$d/$$file; then \
-	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
-	    if test -d "$(distdir)/$$file"; then \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
-	  else \
-	    test -f "$(distdir)/$$file" \
-	    || cp -p $$d/$$file "$(distdir)/$$file" \
-	    || exit 1; \
-	  fi; \
-	done
-	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
-	  if test "$$subdir" = .; then :; else \
-	    $(am__make_dryrun) \
-	      || test -d "$(distdir)/$$subdir" \
-	      || $(MKDIR_P) "$(distdir)/$$subdir" \
-	      || exit 1; \
-	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
-	    $(am__relativize); \
-	    new_distdir=$$reldir; \
-	    dir1=$$subdir; dir2="$(top_distdir)"; \
-	    $(am__relativize); \
-	    new_top_distdir=$$reldir; \
-	    echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
-	    echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
-	    ($(am__cd) $$subdir && \
-	      $(MAKE) $(AM_MAKEFLAGS) \
-	        top_distdir="$$new_top_distdir" \
-	        distdir="$$new_distdir" \
-		am__remove_distdir=: \
-		am__skip_length_check=: \
-		am__skip_mode_fix=: \
-	        distdir) \
-	      || exit 1; \
-	  fi; \
-	done
-check-am: all-am
-check: check-recursive
-all-am: Makefile $(PROGRAMS)
-installdirs: installdirs-recursive
-installdirs-am:
-	for dir in "$(DESTDIR)$(bindir)"; do \
-	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
-	done
-install: install-recursive
-install-exec: install-exec-recursive
-install-data: install-data-recursive
-uninstall: uninstall-recursive
-
-install-am: all-am
-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-recursive
-install-strip:
-	if test -z '$(STRIP)'; then \
-	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	      install; \
-	else \
-	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
-	fi
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
-	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
-	@echo "This command is intended for maintainers to use"
-	@echo "it deletes files that may require special tools to rebuild."
-clean: clean-recursive
-
-clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-recursive
-		-rm -f ./$(DEPDIR)/dmx.Po
-	-rm -f ./$(DEPDIR)/dmx_glxvisuals.Po
-	-rm -f ./$(DEPDIR)/dmxcb.Po
-	-rm -f ./$(DEPDIR)/dmxcmap.Po
-	-rm -f ./$(DEPDIR)/dmxcursor.Po
-	-rm -f ./$(DEPDIR)/dmxdpms.Po
-	-rm -f ./$(DEPDIR)/dmxextension.Po
-	-rm -f ./$(DEPDIR)/dmxfont.Po
-	-rm -f ./$(DEPDIR)/dmxgc.Po
-	-rm -f ./$(DEPDIR)/dmxgcops.Po
-	-rm -f ./$(DEPDIR)/dmxinit.Po
-	-rm -f ./$(DEPDIR)/dmxinput.Po
-	-rm -f ./$(DEPDIR)/dmxlog.Po
-	-rm -f ./$(DEPDIR)/dmxpict.Po
-	-rm -f ./$(DEPDIR)/dmxpixmap.Po
-	-rm -f ./$(DEPDIR)/dmxprop.Po
-	-rm -f ./$(DEPDIR)/dmxscrinit.Po
-	-rm -f ./$(DEPDIR)/dmxstat.Po
-	-rm -f ./$(DEPDIR)/dmxsync.Po
-	-rm -f ./$(DEPDIR)/dmxvisual.Po
-	-rm -f ./$(DEPDIR)/dmxwindow.Po
-	-rm -f ./$(DEPDIR)/miinitext.Po
-	-rm -f ./$(DEPDIR)/panoramiX.Po
-	-rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
-	distclean-tags
-
-dvi: dvi-recursive
-
-dvi-am:
-
-html: html-recursive
-
-html-am:
-
-info: info-recursive
-
-info-am:
-
-install-data-am:
-
-install-dvi: install-dvi-recursive
-
-install-dvi-am:
-
-install-exec-am: install-binPROGRAMS
-
-install-html: install-html-recursive
-
-install-html-am:
-
-install-info: install-info-recursive
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-recursive
-
-install-pdf-am:
-
-install-ps: install-ps-recursive
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-recursive
-		-rm -f ./$(DEPDIR)/dmx.Po
-	-rm -f ./$(DEPDIR)/dmx_glxvisuals.Po
-	-rm -f ./$(DEPDIR)/dmxcb.Po
-	-rm -f ./$(DEPDIR)/dmxcmap.Po
-	-rm -f ./$(DEPDIR)/dmxcursor.Po
-	-rm -f ./$(DEPDIR)/dmxdpms.Po
-	-rm -f ./$(DEPDIR)/dmxextension.Po
-	-rm -f ./$(DEPDIR)/dmxfont.Po
-	-rm -f ./$(DEPDIR)/dmxgc.Po
-	-rm -f ./$(DEPDIR)/dmxgcops.Po
-	-rm -f ./$(DEPDIR)/dmxinit.Po
-	-rm -f ./$(DEPDIR)/dmxinput.Po
-	-rm -f ./$(DEPDIR)/dmxlog.Po
-	-rm -f ./$(DEPDIR)/dmxpict.Po
-	-rm -f ./$(DEPDIR)/dmxpixmap.Po
-	-rm -f ./$(DEPDIR)/dmxprop.Po
-	-rm -f ./$(DEPDIR)/dmxscrinit.Po
-	-rm -f ./$(DEPDIR)/dmxstat.Po
-	-rm -f ./$(DEPDIR)/dmxsync.Po
-	-rm -f ./$(DEPDIR)/dmxvisual.Po
-	-rm -f ./$(DEPDIR)/dmxwindow.Po
-	-rm -f ./$(DEPDIR)/miinitext.Po
-	-rm -f ./$(DEPDIR)/panoramiX.Po
-	-rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-recursive
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic \
-	mostlyclean-libtool
-
-pdf: pdf-recursive
-
-pdf-am:
-
-ps: ps-recursive
-
-ps-am:
-
-uninstall-am: uninstall-binPROGRAMS
-
-.MAKE: $(am__recursive_targets) install-am install-strip
-
-.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
-	am--depfiles check check-am clean clean-binPROGRAMS \
-	clean-generic clean-libtool cscopelist-am ctags ctags-am \
-	distclean distclean-compile distclean-generic \
-	distclean-libtool distclean-tags distdir dvi dvi-am html \
-	html-am info info-am install install-am install-binPROGRAMS \
-	install-data install-data-am install-dvi install-dvi-am \
-	install-exec install-exec-am install-html install-html-am \
-	install-info install-info-am install-man install-pdf \
-	install-pdf-am install-ps install-ps-am install-strip \
-	installcheck installcheck-am installdirs installdirs-am \
-	maintainer-clean maintainer-clean-generic mostlyclean \
-	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
-	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
-	uninstall-binPROGRAMS
-
-.PRECIOUS: Makefile
-
-
-relink:
-	$(AM_V_at)rm -f Xdmx$(EXEEXT) && $(MAKE) Xdmx$(EXEEXT)
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/hw/dmx/config/Canvas.c b/hw/dmx/config/Canvas.c
deleted file mode 100644
index 3662fe8..0000000
--- a/hw/dmx/config/Canvas.c
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * Copyright 1987, 1998  The Open Group
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation.
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
- * OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name of The Open Group shall not be
- * used in advertising or otherwise to promote the sale, use or other dealings
- * in this Software without prior written authorization from The Open Group.
- */
-
-/*
- * Copyright 2002 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- * This file was originally taken from xc/lib/Xaw/Template.c
- */
-
-#include <X11/IntrinsicP.h>
-#include <X11/StringDefs.h>
-#include "CanvasP.h"
-
-static void
-CanvasInitialize(Widget request, Widget w, ArgList args, Cardinal * num_args)
-{
-}
-
-static void
-CanvasExpose(Widget w, XEvent * event, Region region)
-{
-    CanvasExposeDataRec data;
-
-    data.w = w;
-    data.event = event;
-    data.region = region;
-
-    if (!XtIsRealized(w))
-        return;
-    XtCallCallbacks(w, XtNcanvasExposeCallback, (XtPointer) &data);
-}
-
-static void
-CanvasResize(Widget w)
-{
-    if (!XtIsRealized(w))
-        return;
-    XtCallCallbacks(w, XtNcanvasResizeCallback, (XtPointer) w);
-}
-
-static void
-CanvasAction(Widget w, XEvent * event, String * params, Cardinal * num_params)
-{
-    XtCallCallbacks(w, XtNcallback, (XtPointer) event);
-}
-
-#define offset(field) XtOffsetOf(CanvasRec, canvas.field)
-static XtResource resources[] = {
-    {XtNcallback, XtCCallback, XtRCallback,
-     sizeof(XtCallbackList), offset(input_callback), XtRCallback, NULL}
-    ,
-    {(char *) XtNcanvasExposeCallback, (char *) XtCcanvasExposeCallback, XtRCallback,
-     sizeof(XtCallbackList), offset(expose_callback), XtRCallback, NULL}
-    ,
-    {(char *) XtNcanvasResizeCallback, (char *) XtCcanvasResizeCallback, XtRCallback,
-     sizeof(XtCallbackList), offset(resize_callback), XtRCallback, NULL}
-    ,
-};
-
-#undef offset
-
-static XtActionsRec actions[] = {
-    {(char *) "canvas", CanvasAction},
-};
-
-static char translations[] = "<Key>:    canvas()\n\
-<Motion>:  canvas()\n\
-<BtnDown>: canvas()\n\
-<BtnUp>: canvas()\n\
-";
-
-#define Superclass	(&widgetClassRec)
-CanvasClassRec canvasClassRec = {
-    /* core */
-    {
-     (WidgetClass) Superclass,  /* superclass */
-     (char *) "Canvas",         /* class_name */
-     sizeof(CanvasRec),         /* widget_size */
-     NULL,                      /* class_initialize */
-     NULL,                      /* class_part_initialize */
-     False,                     /* class_inited */
-     CanvasInitialize,          /* initialize */
-     NULL,                      /* initialize_hook */
-     XtInheritRealize,          /* realize */
-     actions,                   /* actions */
-     XtNumber(actions),         /* num_actions */
-     resources,                 /* resources */
-     XtNumber(resources),       /* num_resources */
-     NULLQUARK,                 /* xrm_class */
-     True,                      /* compress_motion */
-     True,                      /* compress_exposure */
-     True,                      /* compress_enterleave */
-     False,                     /* visible_interest */
-     NULL,                      /* destroy */
-     CanvasResize,              /* resize */
-     CanvasExpose,              /* expose */
-     NULL,                      /* set_values */
-     NULL,                      /* set_values_hook */
-     XtInheritSetValuesAlmost,  /* set_values_almost */
-     NULL,                      /* get_values_hook */
-     NULL,                      /* accept_focus */
-     XtVersion,                 /* version */
-     NULL,                      /* callback_private */
-     translations,              /* tm_table */
-     XtInheritQueryGeometry,    /* query_geometry */
-     XtInheritDisplayAccelerator,       /* display_accelerator */
-     NULL,                      /* extension */
-     }
-    ,
-    /* canvas */
-    {
-     NULL,                      /* extension */
-     }
-};
-
-WidgetClass canvasWidgetClass = (WidgetClass) &canvasClassRec;
diff --git a/hw/dmx/config/Canvas.h b/hw/dmx/config/Canvas.h
deleted file mode 100644
index d516faf..0000000
--- a/hw/dmx/config/Canvas.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
-
-Copyright 1987, 1998  The Open Group
-Copyright 2002 Red Hat Inc., Durham, North Carolina.
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-*/
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- * This file was originally taken from xc/lib/Xaw/Template.h
- */
-
-#ifndef _Canvas_h
-#define _Canvas_h
-
-#include <X11/Intrinsic.h>
-
-#define XtNcanvasExposeCallback "canvasExposeCallback"
-#define XtCcanvasExposeCallback "CanvasExposeCallback"
-#define XtNcanvasResizeCallback "canvasResizeCallback"
-#define XtCcanvasResizeCallback "CanvasResizeCallback"
-
-typedef struct _CanvasClassRec *CanvasWidgetClass;
-typedef struct _CanvasRec *CanvasWidget;
-extern WidgetClass canvasWidgetClass;
-
-typedef struct _CanvasExposeDataRec {
-    Widget w;
-    XEvent *event;
-    Region region;
-} CanvasExposeDataRec, *CanvasExposeDataPtr;
-
-#endif                          /* _Canvas_h */
diff --git a/hw/dmx/config/CanvasP.h b/hw/dmx/config/CanvasP.h
deleted file mode 100644
index b1ccf24..0000000
--- a/hw/dmx/config/CanvasP.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
-
-Copyright 1987, 1998  The Open Group
-Copyright 2002 Red Hat Inc., Durham, North Carolina.
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-*/
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- * This file was originally taken from xc/lib/Xaw/TemplateP.h
- */
-
-#ifndef _CanvasP_h
-#define _CanvasP_h
-
-#include "Canvas.h"
-
-/* include superclass private header file */
-#include <X11/CoreP.h>
-
-typedef struct {
-    XtPointer extension;
-} CanvasClassPart;
-
-typedef struct _CanvasClassRec {
-    CoreClassPart core_class;
-    CanvasClassPart canvas_class;
-} CanvasClassRec;
-
-extern CanvasClassRec canvasClassRec;
-
-typedef struct {
-    XtCallbackList input_callback;
-    XtCallbackList expose_callback;
-    XtCallbackList resize_callback;
-} CanvasPart;
-
-typedef struct _CanvasRec {
-    CorePart core;
-    CanvasPart canvas;
-} CanvasRec;
-
-#endif                          /* _CanvasP_h */
diff --git a/hw/dmx/config/Makefile.am b/hw/dmx/config/Makefile.am
deleted file mode 100644
index 06588e7..0000000
--- a/hw/dmx/config/Makefile.am
+++ /dev/null
@@ -1,71 +0,0 @@
-SUBDIRS = man
-
-noinst_LIBRARIES = libdmxconfig.a
-
-LIBSRCS = parser.y \
-          scanner.l \
-          dmxparse.c \
-          dmxparse.h \
-          dmxprint.c \
-          dmxprint.h \
-          dmxcompat.c \
-          dmxcompat.h \
-          dmxconfig.c \
-          dmxconfig.h
-
-parser.h: parser.c
-scanner.c: scanner.l parser.h
-
-BUILT_SOURCES = parser.c parser.h scanner.c
-
-MAINTAINERCLEANFILES = $(BUILT_SOURCES)
-
-libdmxconfig_a_SOURCES = $(LIBSRCS)
-libdmxconfig_a_SOURCES += $(top_srcdir)/os/strlcpy.c
-
-if GLX
-GLX_DEFS = @GL_CFLAGS@
-endif	    
-
-AM_YFLAGS = -d
-AM_CFLAGS = \
-	$(DIX_CFLAGS) \
-	-I$(top_srcdir)/hw/dmx \
-	-DHAVE_DMX_CONFIG_H \
-	-DDMX_LOG_STANDALONE \
-	$(GLX_DEFS) \
-	@DMXMODULES_CFLAGS@
-
-bin_PROGRAMS = xdmxconfig vdltodmx dmxtodmx
-
-xdmxconfig_DEPENDENCIES = libdmxconfig.a
-xdmxconfig_SOURCES = \
-	xdmxconfig.c \
-	$(top_srcdir)/hw/dmx/dmxlog.c \
-	Canvas.c \
-	Canvas.h \
-	CanvasP.h
-xdmxconfig_LDADD = -L. -ldmxconfig @XDMXCONFIG_DEP_LIBS@
-xdmxconfig_CFLAGS = $(AM_CFLAGS) @XDMXCONFIG_DEP_CFLAGS@
-
-vdltodmx_DEPENDENCIES = libdmxconfig.a
-vdltodmx_SOURCES = vdltodmx.c
-vdltodmx_LDADD = -L. -ldmxconfig
-
-dmxtodmx_DEPENDENCIES = libdmxconfig.a
-dmxtodmx_SOURCES = dmxtodmx.c
-dmxtodmx_LDADD = -L. -ldmxconfig
-
-EXTRA_DIST = \
-	test-a.in test-a.out \
-	test-b.in test-b.out \
-	test-c.in test-c.out \
-	test-d.in test-d.out \
-	test-e.in test-e.out \
-	test-f.in test-f.out \
-	test-g.in test-g.out \
-	test-h.in test-h.out \
-	test-i.in test-i.out \
-	test-j.in test-j.out \
-	test-k.in test-k.out \
-	test-l.in test-l.out
diff --git a/hw/dmx/config/Makefile.in b/hw/dmx/config/Makefile.in
deleted file mode 100644
index 0b42c9f..0000000
--- a/hw/dmx/config/Makefile.in
+++ /dev/null
@@ -1,1229 +0,0 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
-
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-
-VPATH = @srcdir@
-am__is_gnu_make = { \
-  if test -z '$(MAKELEVEL)'; then \
-    false; \
-  elif test -n '$(MAKE_HOST)'; then \
-    true; \
-  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
-    true; \
-  else \
-    false; \
-  fi; \
-}
-am__make_running_with_option = \
-  case $${target_option-} in \
-      ?) ;; \
-      *) echo "am__make_running_with_option: internal error: invalid" \
-              "target option '$${target_option-}' specified" >&2; \
-         exit 1;; \
-  esac; \
-  has_opt=no; \
-  sane_makeflags=$$MAKEFLAGS; \
-  if $(am__is_gnu_make); then \
-    sane_makeflags=$$MFLAGS; \
-  else \
-    case $$MAKEFLAGS in \
-      *\\[\ \	]*) \
-        bs=\\; \
-        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
-          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
-    esac; \
-  fi; \
-  skip_next=no; \
-  strip_trailopt () \
-  { \
-    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
-  }; \
-  for flg in $$sane_makeflags; do \
-    test $$skip_next = yes && { skip_next=no; continue; }; \
-    case $$flg in \
-      *=*|--*) continue;; \
-        -*I) strip_trailopt 'I'; skip_next=yes;; \
-      -*I?*) strip_trailopt 'I';; \
-        -*O) strip_trailopt 'O'; skip_next=yes;; \
-      -*O?*) strip_trailopt 'O';; \
-        -*l) strip_trailopt 'l'; skip_next=yes;; \
-      -*l?*) strip_trailopt 'l';; \
-      -[dEDm]) skip_next=yes;; \
-      -[JT]) skip_next=yes;; \
-    esac; \
-    case $$flg in \
-      *$$target_option*) has_opt=yes; break;; \
-    esac; \
-  done; \
-  test $$has_opt = yes
-am__make_dryrun = (target_option=n; $(am__make_running_with_option))
-am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-bin_PROGRAMS = xdmxconfig$(EXEEXT) vdltodmx$(EXEEXT) dmxtodmx$(EXEEXT)
-subdir = hw/dmx/config
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \
-	$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \
-	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
-	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
-	$(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-	$(ACLOCAL_M4)
-DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
-	$(top_builddir)/include/xorg-server.h \
-	$(top_builddir)/include/dix-config.h \
-	$(top_builddir)/include/xorg-config.h \
-	$(top_builddir)/include/xkb-config.h \
-	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
-	$(top_builddir)/include/version-config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-am__installdirs = "$(DESTDIR)$(bindir)"
-PROGRAMS = $(bin_PROGRAMS)
-LIBRARIES = $(noinst_LIBRARIES)
-ARFLAGS = cru
-AM_V_AR = $(am__v_AR_@AM_V@)
-am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@)
-am__v_AR_0 = @echo "  AR      " $@;
-am__v_AR_1 = 
-libdmxconfig_a_AR = $(AR) $(ARFLAGS)
-libdmxconfig_a_LIBADD =
-am__objects_1 = parser.$(OBJEXT) scanner.$(OBJEXT) dmxparse.$(OBJEXT) \
-	dmxprint.$(OBJEXT) dmxcompat.$(OBJEXT) dmxconfig.$(OBJEXT)
-am_libdmxconfig_a_OBJECTS = $(am__objects_1) strlcpy.$(OBJEXT)
-libdmxconfig_a_OBJECTS = $(am_libdmxconfig_a_OBJECTS)
-am_dmxtodmx_OBJECTS = dmxtodmx.$(OBJEXT)
-dmxtodmx_OBJECTS = $(am_dmxtodmx_OBJECTS)
-AM_V_lt = $(am__v_lt_@AM_V@)
-am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
-am__v_lt_0 = --silent
-am__v_lt_1 = 
-am_vdltodmx_OBJECTS = vdltodmx.$(OBJEXT)
-vdltodmx_OBJECTS = $(am_vdltodmx_OBJECTS)
-am_xdmxconfig_OBJECTS = xdmxconfig-xdmxconfig.$(OBJEXT) \
-	xdmxconfig-dmxlog.$(OBJEXT) xdmxconfig-Canvas.$(OBJEXT)
-xdmxconfig_OBJECTS = $(am_xdmxconfig_OBJECTS)
-xdmxconfig_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(xdmxconfig_CFLAGS) \
-	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-AM_V_P = $(am__v_P_@AM_V@)
-am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
-am__v_P_0 = false
-am__v_P_1 = :
-AM_V_GEN = $(am__v_GEN_@AM_V@)
-am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo "  GEN     " $@;
-am__v_GEN_1 = 
-AM_V_at = $(am__v_at_@AM_V@)
-am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
-am__v_at_0 = @
-am__v_at_1 = 
-DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__maybe_remake_depfiles = depfiles
-am__depfiles_remade = ./$(DEPDIR)/dmxcompat.Po \
-	./$(DEPDIR)/dmxconfig.Po ./$(DEPDIR)/dmxparse.Po \
-	./$(DEPDIR)/dmxprint.Po ./$(DEPDIR)/dmxtodmx.Po \
-	./$(DEPDIR)/parser.Po ./$(DEPDIR)/scanner.Po \
-	./$(DEPDIR)/strlcpy.Po ./$(DEPDIR)/vdltodmx.Po \
-	./$(DEPDIR)/xdmxconfig-Canvas.Po \
-	./$(DEPDIR)/xdmxconfig-dmxlog.Po \
-	./$(DEPDIR)/xdmxconfig-xdmxconfig.Po
-am__mv = mv -f
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
-	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
-	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-	$(AM_CFLAGS) $(CFLAGS)
-AM_V_CC = $(am__v_CC_@AM_V@)
-am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
-am__v_CC_0 = @echo "  CC      " $@;
-am__v_CC_1 = 
-CCLD = $(CC)
-LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-	$(AM_LDFLAGS) $(LDFLAGS) -o $@
-AM_V_CCLD = $(am__v_CCLD_@AM_V@)
-am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
-am__v_CCLD_0 = @echo "  CCLD    " $@;
-am__v_CCLD_1 = 
-LEXCOMPILE = $(LEX) $(AM_LFLAGS) $(LFLAGS)
-LTLEXCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \
-	$(LIBTOOLFLAGS) --mode=compile $(LEX) $(AM_LFLAGS) $(LFLAGS)
-AM_V_LEX = $(am__v_LEX_@AM_V@)
-am__v_LEX_ = $(am__v_LEX_@AM_DEFAULT_V@)
-am__v_LEX_0 = @echo "  LEX     " $@;
-am__v_LEX_1 = 
-YLWRAP = $(top_srcdir)/ylwrap
-am__yacc_c2h = sed -e s/cc$$/hh/ -e s/cpp$$/hpp/ -e s/cxx$$/hxx/ \
-		   -e s/c++$$/h++/ -e s/c$$/h/
-YACCCOMPILE = $(YACC) $(AM_YFLAGS) $(YFLAGS)
-LTYACCCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \
-	$(LIBTOOLFLAGS) --mode=compile $(YACC) $(AM_YFLAGS) $(YFLAGS)
-AM_V_YACC = $(am__v_YACC_@AM_V@)
-am__v_YACC_ = $(am__v_YACC_@AM_DEFAULT_V@)
-am__v_YACC_0 = @echo "  YACC    " $@;
-am__v_YACC_1 = 
-SOURCES = $(libdmxconfig_a_SOURCES) $(dmxtodmx_SOURCES) \
-	$(vdltodmx_SOURCES) $(xdmxconfig_SOURCES)
-DIST_SOURCES = $(libdmxconfig_a_SOURCES) $(dmxtodmx_SOURCES) \
-	$(vdltodmx_SOURCES) $(xdmxconfig_SOURCES)
-RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
-	ctags-recursive dvi-recursive html-recursive info-recursive \
-	install-data-recursive install-dvi-recursive \
-	install-exec-recursive install-html-recursive \
-	install-info-recursive install-pdf-recursive \
-	install-ps-recursive install-recursive installcheck-recursive \
-	installdirs-recursive pdf-recursive ps-recursive \
-	tags-recursive uninstall-recursive
-am__can_run_installinfo = \
-  case $$AM_UPDATE_INFO_DIR in \
-    n|no|NO) false;; \
-    *) (install-info --version) >/dev/null 2>&1;; \
-  esac
-RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
-  distclean-recursive maintainer-clean-recursive
-am__recursive_targets = \
-  $(RECURSIVE_TARGETS) \
-  $(RECURSIVE_CLEAN_TARGETS) \
-  $(am__extra_recursive_targets)
-AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
-	distdir distdir-am
-am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
-# Read a list of newline-separated strings from the standard input,
-# and print each of them once, without duplicates.  Input order is
-# *not* preserved.
-am__uniquify_input = $(AWK) '\
-  BEGIN { nonempty = 0; } \
-  { items[$$0] = 1; nonempty = 1; } \
-  END { if (nonempty) { for (i in items) print i; }; } \
-'
-# Make sure the list of sources is unique.  This is necessary because,
-# e.g., the same source file might be shared among _SOURCES variables
-# for different programs/libraries.
-am__define_uniq_tagged_files = \
-  list='$(am__tagged_files)'; \
-  unique=`for i in $$list; do \
-    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-  done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
-DIST_SUBDIRS = $(SUBDIRS)
-am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \
-	$(top_srcdir)/ylwrap TODO parser.c parser.h scanner.c
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-am__relativize = \
-  dir0=`pwd`; \
-  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
-  sed_rest='s,^[^/]*/*,,'; \
-  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
-  sed_butlast='s,/*[^/]*$$,,'; \
-  while test -n "$$dir1"; do \
-    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
-    if test "$$first" != "."; then \
-      if test "$$first" = ".."; then \
-        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
-        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
-      else \
-        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
-        if test "$$first2" = "$$first"; then \
-          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
-        else \
-          dir2="../$$dir2"; \
-        fi; \
-        dir0="$$dir0"/"$$first"; \
-      fi; \
-    fi; \
-    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
-  done; \
-  reldir="$$dir2"
-ACLOCAL = @ACLOCAL@
-ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
-ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
-AMTAR = @AMTAR@
-AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
-APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@
-APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@
-APP_MAN_DIR = @APP_MAN_DIR@
-APP_MAN_SUFFIX = @APP_MAN_SUFFIX@
-AR = @AR@
-AS = @AS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-BASE_CFLAGS = @BASE_CFLAGS@
-BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
-BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
-BUNDLE_VERSION = @BUNDLE_VERSION@
-BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
-CC = @CC@
-CCAS = @CCAS@
-CCASDEPMODE = @CCASDEPMODE@
-CCASFLAGS = @CCASFLAGS@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CHANGELOG_CMD = @CHANGELOG_CMD@
-COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CWARNFLAGS = @CWARNFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DBUS_CFLAGS = @DBUS_CFLAGS@
-DBUS_LIBS = @DBUS_LIBS@
-DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@
-DEFAULT_LOGDIR = @DEFAULT_LOGDIR@
-DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@
-DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@
-DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@
-DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DGA_CFLAGS = @DGA_CFLAGS@
-DGA_LIBS = @DGA_LIBS@
-DIX_CFLAGS = @DIX_CFLAGS@
-DIX_LIB = @DIX_LIB@
-DLLTOOL = @DLLTOOL@
-DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
-DOT = @DOT@
-DOXYGEN = @DOXYGEN@
-DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
-DRI2PROTO_LIBS = @DRI2PROTO_LIBS@
-DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@
-DRI3PROTO_LIBS = @DRI3PROTO_LIBS@
-DRIVER_MAN_DIR = @DRIVER_MAN_DIR@
-DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
-DRI_DRIVER_PATH = @DRI_DRIVER_PATH@
-DSYMUTIL = @DSYMUTIL@
-DTRACE = @DTRACE@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-FILE_MAN_DIR = @FILE_MAN_DIR@
-FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
-FONT100DPIDIR = @FONT100DPIDIR@
-FONT75DPIDIR = @FONT75DPIDIR@
-FONTMISCDIR = @FONTMISCDIR@
-FONTOTFDIR = @FONTOTFDIR@
-FONTROOTDIR = @FONTROOTDIR@
-FONTTTFDIR = @FONTTTFDIR@
-FONTTYPE1DIR = @FONTTYPE1DIR@
-FOP = @FOP@
-GBM_CFLAGS = @GBM_CFLAGS@
-GBM_LIBS = @GBM_LIBS@
-GLAMOR_CFLAGS = @GLAMOR_CFLAGS@
-GLAMOR_LIBS = @GLAMOR_LIBS@
-GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@
-GLX_DEFINES = @GLX_DEFINES@
-GLX_SYS_LIBS = @GLX_SYS_LIBS@
-GL_CFLAGS = @GL_CFLAGS@
-GL_LIBS = @GL_LIBS@
-GREP = @GREP@
-HAL_CFLAGS = @HAL_CFLAGS@
-HAL_LIBS = @HAL_LIBS@
-HAVE_DOT = @HAVE_DOT@
-INSTALL = @INSTALL@
-INSTALL_CMD = @INSTALL_CMD@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-KDRIVE_CFLAGS = @KDRIVE_CFLAGS@
-KDRIVE_INCS = @KDRIVE_INCS@
-KDRIVE_LIBS = @KDRIVE_LIBS@
-KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@
-KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@
-KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@
-KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@
-KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@
-KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@
-KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@
-LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@
-LEX = @LEX@
-LEXLIB = @LEXLIB@
-LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
-LIBDRM_CFLAGS = @LIBDRM_CFLAGS@
-LIBDRM_LIBS = @LIBDRM_LIBS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@
-LIBSHA1_LIBS = @LIBSHA1_LIBS@
-LIBTOOL = @LIBTOOL@
-LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
-LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
-LIB_MAN_DIR = @LIB_MAN_DIR@
-LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
-MAIN_LIB = @MAIN_LIB@
-MAKEINFO = @MAKEINFO@
-MANIFEST_TOOL = @MANIFEST_TOOL@
-MAN_SUBSTS = @MAN_SUBSTS@
-MISC_MAN_DIR = @MISC_MAN_DIR@
-MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
-MKDIR_P = @MKDIR_P@
-NM = @NM@
-NMEDIT = @NMEDIT@
-OBJC = @OBJC@
-OBJCCLD = @OBJCCLD@
-OBJCDEPMODE = @OBJCDEPMODE@
-OBJCFLAGS = @OBJCFLAGS@
-OBJCLINK = @OBJCLINK@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
-OPENSSL_LIBS = @OPENSSL_LIBS@
-OS_LIB = @OS_LIB@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@
-PCIACCESS_LIBS = @PCIACCESS_LIBS@
-PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@
-PIXMAN_CFLAGS = @PIXMAN_CFLAGS@
-PIXMAN_LIBS = @PIXMAN_LIBS@
-PKG_CONFIG = @PKG_CONFIG@
-PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
-PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
-PROJECTROOT = @PROJECTROOT@
-PTHREAD_CC = @PTHREAD_CC@
-PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
-PTHREAD_LIBS = @PTHREAD_LIBS@
-PYTHON3 = @PYTHON3@
-RANLIB = @RANLIB@
-RAWCPP = @RAWCPP@
-RAWCPPFLAGS = @RAWCPPFLAGS@
-RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
-SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
-SED = @SED@
-SELINUX_CFLAGS = @SELINUX_CFLAGS@
-SELINUX_LIBS = @SELINUX_LIBS@
-SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@
-SET_MAKE = @SET_MAKE@
-SHA1_CFLAGS = @SHA1_CFLAGS@
-SHA1_LIBS = @SHA1_LIBS@
-SHELL = @SHELL@
-SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@
-STRICT_CFLAGS = @STRICT_CFLAGS@
-STRIP = @STRIP@
-STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@
-SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@
-SYSCONFDIR = @SYSCONFDIR@
-SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@
-SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@
-TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@
-UDEV_CFLAGS = @UDEV_CFLAGS@
-UDEV_LIBS = @UDEV_LIBS@
-UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
-VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
-VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
-WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
-WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
-WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
-XCONFIGDIR = @XCONFIGDIR@
-XCONFIGFILE = @XCONFIGFILE@
-XDMCP_CFLAGS = @XDMCP_CFLAGS@
-XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
-XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
-XEPHYR_INCS = @XEPHYR_INCS@
-XEPHYR_LIBS = @XEPHYR_LIBS@
-XF86CONFIGDIR = @XF86CONFIGDIR@
-XF86CONFIGFILE = @XF86CONFIGFILE@
-XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@
-XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@
-XKB_COMPILED_DIR = @XKB_COMPILED_DIR@
-XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@
-XKB_DFLT_MODEL = @XKB_DFLT_MODEL@
-XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@
-XKB_DFLT_RULES = @XKB_DFLT_RULES@
-XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@
-XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@
-XLIB_CFLAGS = @XLIB_CFLAGS@
-XLIB_LIBS = @XLIB_LIBS@
-XMLTO = @XMLTO@
-XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@
-XNESTMODULES_LIBS = @XNESTMODULES_LIBS@
-XNEST_LIBS = @XNEST_LIBS@
-XNEST_SYS_LIBS = @XNEST_SYS_LIBS@
-XORG_CFLAGS = @XORG_CFLAGS@
-XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@
-XORG_INCS = @XORG_INCS@
-XORG_LIBS = @XORG_LIBS@
-XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@
-XORG_MAN_PAGE = @XORG_MAN_PAGE@
-XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@
-XORG_MODULES_LIBS = @XORG_MODULES_LIBS@
-XORG_OS_SUBDIR = @XORG_OS_SUBDIR@
-XORG_SGML_PATH = @XORG_SGML_PATH@
-XORG_SYS_LIBS = @XORG_SYS_LIBS@
-XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@
-XPBPROXY_LIBS = @XPBPROXY_LIBS@
-XQUARTZ_LIBS = @XQUARTZ_LIBS@
-XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
-XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
-XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
-XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
-XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
-XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@
-XSERVER_LIBS = @XSERVER_LIBS@
-XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@
-XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
-XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
-XSLTPROC = @XSLTPROC@
-XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
-XVFB_LIBS = @XVFB_LIBS@
-XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
-XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
-XWINMODULES_LIBS = @XWINMODULES_LIBS@
-XWIN_LIBS = @XWIN_LIBS@
-XWIN_SERVER_NAME = @XWIN_SERVER_NAME@
-XWIN_SYS_LIBS = @XWIN_SYS_LIBS@
-YACC = @YACC@
-YFLAGS = @YFLAGS@
-abi_ansic = @abi_ansic@
-abi_extension = @abi_extension@
-abi_videodrv = @abi_videodrv@
-abi_xinput = @abi_xinput@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_AR = @ac_ct_AR@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-ax_pthread_config = @ax_pthread_config@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-driverdir = @driverdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-extdir = @extdir@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-logdir = @logdir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-moduledir = @moduledir@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-runstatedir = @runstatedir@
-sbindir = @sbindir@
-sdkdir = @sdkdir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-symbol_visibility = @symbol_visibility@
-sysconfdir = @sysconfdir@
-sysconfigdir = @sysconfigdir@
-target_alias = @target_alias@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-SUBDIRS = man
-noinst_LIBRARIES = libdmxconfig.a
-LIBSRCS = parser.y \
-          scanner.l \
-          dmxparse.c \
-          dmxparse.h \
-          dmxprint.c \
-          dmxprint.h \
-          dmxcompat.c \
-          dmxcompat.h \
-          dmxconfig.c \
-          dmxconfig.h
-
-BUILT_SOURCES = parser.c parser.h scanner.c
-MAINTAINERCLEANFILES = $(BUILT_SOURCES)
-libdmxconfig_a_SOURCES = $(LIBSRCS) $(top_srcdir)/os/strlcpy.c
-@GLX_TRUE@GLX_DEFS = @GL_CFLAGS@
-AM_YFLAGS = -d
-AM_CFLAGS = \
-	$(DIX_CFLAGS) \
-	-I$(top_srcdir)/hw/dmx \
-	-DHAVE_DMX_CONFIG_H \
-	-DDMX_LOG_STANDALONE \
-	$(GLX_DEFS) \
-	@DMXMODULES_CFLAGS@
-
-xdmxconfig_DEPENDENCIES = libdmxconfig.a
-xdmxconfig_SOURCES = \
-	xdmxconfig.c \
-	$(top_srcdir)/hw/dmx/dmxlog.c \
-	Canvas.c \
-	Canvas.h \
-	CanvasP.h
-
-xdmxconfig_LDADD = -L. -ldmxconfig @XDMXCONFIG_DEP_LIBS@
-xdmxconfig_CFLAGS = $(AM_CFLAGS) @XDMXCONFIG_DEP_CFLAGS@
-vdltodmx_DEPENDENCIES = libdmxconfig.a
-vdltodmx_SOURCES = vdltodmx.c
-vdltodmx_LDADD = -L. -ldmxconfig
-dmxtodmx_DEPENDENCIES = libdmxconfig.a
-dmxtodmx_SOURCES = dmxtodmx.c
-dmxtodmx_LDADD = -L. -ldmxconfig
-EXTRA_DIST = \
-	test-a.in test-a.out \
-	test-b.in test-b.out \
-	test-c.in test-c.out \
-	test-d.in test-d.out \
-	test-e.in test-e.out \
-	test-f.in test-f.out \
-	test-g.in test-g.out \
-	test-h.in test-h.out \
-	test-i.in test-i.out \
-	test-j.in test-j.out \
-	test-k.in test-k.out \
-	test-l.in test-l.out
-
-all: $(BUILT_SOURCES)
-	$(MAKE) $(AM_MAKEFLAGS) all-recursive
-
-.SUFFIXES:
-.SUFFIXES: .c .l .lo .o .obj .y
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
-	@for dep in $?; do \
-	  case '$(am__configure_deps)' in \
-	    *$$dep*) \
-	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
-	        && { if test -f $@; then exit 0; else break; fi; }; \
-	      exit 1;; \
-	  esac; \
-	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/dmx/config/Makefile'; \
-	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --foreign hw/dmx/config/Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	@case '$?' in \
-	  *config.status*) \
-	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
-	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
-	esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure:  $(am__configure_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-install-binPROGRAMS: $(bin_PROGRAMS)
-	@$(NORMAL_INSTALL)
-	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
-	if test -n "$$list"; then \
-	  echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
-	  $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
-	fi; \
-	for p in $$list; do echo "$$p $$p"; done | \
-	sed 's/$(EXEEXT)$$//' | \
-	while read p p1; do if test -f $$p \
-	 || test -f $$p1 \
-	  ; then echo "$$p"; echo "$$p"; else :; fi; \
-	done | \
-	sed -e 'p;s,.*/,,;n;h' \
-	    -e 's|.*|.|' \
-	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
-	sed 'N;N;N;s,\n, ,g' | \
-	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
-	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
-	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
-	    else { print "f", $$3 "/" $$4, $$1; } } \
-	  END { for (d in files) print "f", d, files[d] }' | \
-	while read type dir files; do \
-	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
-	    test -z "$$files" || { \
-	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
-	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
-	    } \
-	; done
-
-uninstall-binPROGRAMS:
-	@$(NORMAL_UNINSTALL)
-	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
-	files=`for p in $$list; do echo "$$p"; done | \
-	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
-	      -e 's/$$/$(EXEEXT)/' \
-	`; \
-	test -n "$$list" || exit 0; \
-	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
-	cd "$(DESTDIR)$(bindir)" && rm -f $$files
-
-clean-binPROGRAMS:
-	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
-	echo " rm -f" $$list; \
-	rm -f $$list || exit $$?; \
-	test -n "$(EXEEXT)" || exit 0; \
-	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
-	echo " rm -f" $$list; \
-	rm -f $$list
-
-clean-noinstLIBRARIES:
-	-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-
-libdmxconfig.a: $(libdmxconfig_a_OBJECTS) $(libdmxconfig_a_DEPENDENCIES) $(EXTRA_libdmxconfig_a_DEPENDENCIES) 
-	$(AM_V_at)-rm -f libdmxconfig.a
-	$(AM_V_AR)$(libdmxconfig_a_AR) libdmxconfig.a $(libdmxconfig_a_OBJECTS) $(libdmxconfig_a_LIBADD)
-	$(AM_V_at)$(RANLIB) libdmxconfig.a
-
-dmxtodmx$(EXEEXT): $(dmxtodmx_OBJECTS) $(dmxtodmx_DEPENDENCIES) $(EXTRA_dmxtodmx_DEPENDENCIES) 
-	@rm -f dmxtodmx$(EXEEXT)
-	$(AM_V_CCLD)$(LINK) $(dmxtodmx_OBJECTS) $(dmxtodmx_LDADD) $(LIBS)
-
-vdltodmx$(EXEEXT): $(vdltodmx_OBJECTS) $(vdltodmx_DEPENDENCIES) $(EXTRA_vdltodmx_DEPENDENCIES) 
-	@rm -f vdltodmx$(EXEEXT)
-	$(AM_V_CCLD)$(LINK) $(vdltodmx_OBJECTS) $(vdltodmx_LDADD) $(LIBS)
-
-xdmxconfig$(EXEEXT): $(xdmxconfig_OBJECTS) $(xdmxconfig_DEPENDENCIES) $(EXTRA_xdmxconfig_DEPENDENCIES) 
-	@rm -f xdmxconfig$(EXEEXT)
-	$(AM_V_CCLD)$(xdmxconfig_LINK) $(xdmxconfig_OBJECTS) $(xdmxconfig_LDADD) $(LIBS)
-
-mostlyclean-compile:
-	-rm -f *.$(OBJEXT)
-
-distclean-compile:
-	-rm -f *.tab.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxcompat.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxconfig.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxparse.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxprint.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxtodmx.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parser.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scanner.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strlcpy.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vdltodmx.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xdmxconfig-Canvas.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xdmxconfig-dmxlog.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xdmxconfig-xdmxconfig.Po@am__quote@ # am--include-marker
-
-$(am__depfiles_remade):
-	@$(MKDIR_P) $(@D)
-	@echo '# dummy' >$@-t && $(am__mv) $@-t $@
-
-am--depfiles: $(am__depfiles_remade)
-
-.c.o:
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
-
-.c.obj:
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
-
-.c.lo:
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
-
-strlcpy.o: $(top_srcdir)/os/strlcpy.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strlcpy.o -MD -MP -MF $(DEPDIR)/strlcpy.Tpo -c -o strlcpy.o `test -f '$(top_srcdir)/os/strlcpy.c' || echo '$(srcdir)/'`$(top_srcdir)/os/strlcpy.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/strlcpy.Tpo $(DEPDIR)/strlcpy.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$(top_srcdir)/os/strlcpy.c' object='strlcpy.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strlcpy.o `test -f '$(top_srcdir)/os/strlcpy.c' || echo '$(srcdir)/'`$(top_srcdir)/os/strlcpy.c
-
-strlcpy.obj: $(top_srcdir)/os/strlcpy.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strlcpy.obj -MD -MP -MF $(DEPDIR)/strlcpy.Tpo -c -o strlcpy.obj `if test -f '$(top_srcdir)/os/strlcpy.c'; then $(CYGPATH_W) '$(top_srcdir)/os/strlcpy.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/os/strlcpy.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/strlcpy.Tpo $(DEPDIR)/strlcpy.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$(top_srcdir)/os/strlcpy.c' object='strlcpy.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strlcpy.obj `if test -f '$(top_srcdir)/os/strlcpy.c'; then $(CYGPATH_W) '$(top_srcdir)/os/strlcpy.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/os/strlcpy.c'; fi`
-
-xdmxconfig-xdmxconfig.o: xdmxconfig.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdmxconfig_CFLAGS) $(CFLAGS) -MT xdmxconfig-xdmxconfig.o -MD -MP -MF $(DEPDIR)/xdmxconfig-xdmxconfig.Tpo -c -o xdmxconfig-xdmxconfig.o `test -f 'xdmxconfig.c' || echo '$(srcdir)/'`xdmxconfig.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/xdmxconfig-xdmxconfig.Tpo $(DEPDIR)/xdmxconfig-xdmxconfig.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='xdmxconfig.c' object='xdmxconfig-xdmxconfig.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdmxconfig_CFLAGS) $(CFLAGS) -c -o xdmxconfig-xdmxconfig.o `test -f 'xdmxconfig.c' || echo '$(srcdir)/'`xdmxconfig.c
-
-xdmxconfig-xdmxconfig.obj: xdmxconfig.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdmxconfig_CFLAGS) $(CFLAGS) -MT xdmxconfig-xdmxconfig.obj -MD -MP -MF $(DEPDIR)/xdmxconfig-xdmxconfig.Tpo -c -o xdmxconfig-xdmxconfig.obj `if test -f 'xdmxconfig.c'; then $(CYGPATH_W) 'xdmxconfig.c'; else $(CYGPATH_W) '$(srcdir)/xdmxconfig.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/xdmxconfig-xdmxconfig.Tpo $(DEPDIR)/xdmxconfig-xdmxconfig.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='xdmxconfig.c' object='xdmxconfig-xdmxconfig.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdmxconfig_CFLAGS) $(CFLAGS) -c -o xdmxconfig-xdmxconfig.obj `if test -f 'xdmxconfig.c'; then $(CYGPATH_W) 'xdmxconfig.c'; else $(CYGPATH_W) '$(srcdir)/xdmxconfig.c'; fi`
-
-xdmxconfig-dmxlog.o: $(top_srcdir)/hw/dmx/dmxlog.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdmxconfig_CFLAGS) $(CFLAGS) -MT xdmxconfig-dmxlog.o -MD -MP -MF $(DEPDIR)/xdmxconfig-dmxlog.Tpo -c -o xdmxconfig-dmxlog.o `test -f '$(top_srcdir)/hw/dmx/dmxlog.c' || echo '$(srcdir)/'`$(top_srcdir)/hw/dmx/dmxlog.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/xdmxconfig-dmxlog.Tpo $(DEPDIR)/xdmxconfig-dmxlog.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$(top_srcdir)/hw/dmx/dmxlog.c' object='xdmxconfig-dmxlog.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdmxconfig_CFLAGS) $(CFLAGS) -c -o xdmxconfig-dmxlog.o `test -f '$(top_srcdir)/hw/dmx/dmxlog.c' || echo '$(srcdir)/'`$(top_srcdir)/hw/dmx/dmxlog.c
-
-xdmxconfig-dmxlog.obj: $(top_srcdir)/hw/dmx/dmxlog.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdmxconfig_CFLAGS) $(CFLAGS) -MT xdmxconfig-dmxlog.obj -MD -MP -MF $(DEPDIR)/xdmxconfig-dmxlog.Tpo -c -o xdmxconfig-dmxlog.obj `if test -f '$(top_srcdir)/hw/dmx/dmxlog.c'; then $(CYGPATH_W) '$(top_srcdir)/hw/dmx/dmxlog.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/hw/dmx/dmxlog.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/xdmxconfig-dmxlog.Tpo $(DEPDIR)/xdmxconfig-dmxlog.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$(top_srcdir)/hw/dmx/dmxlog.c' object='xdmxconfig-dmxlog.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdmxconfig_CFLAGS) $(CFLAGS) -c -o xdmxconfig-dmxlog.obj `if test -f '$(top_srcdir)/hw/dmx/dmxlog.c'; then $(CYGPATH_W) '$(top_srcdir)/hw/dmx/dmxlog.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/hw/dmx/dmxlog.c'; fi`
-
-xdmxconfig-Canvas.o: Canvas.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdmxconfig_CFLAGS) $(CFLAGS) -MT xdmxconfig-Canvas.o -MD -MP -MF $(DEPDIR)/xdmxconfig-Canvas.Tpo -c -o xdmxconfig-Canvas.o `test -f 'Canvas.c' || echo '$(srcdir)/'`Canvas.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/xdmxconfig-Canvas.Tpo $(DEPDIR)/xdmxconfig-Canvas.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Canvas.c' object='xdmxconfig-Canvas.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdmxconfig_CFLAGS) $(CFLAGS) -c -o xdmxconfig-Canvas.o `test -f 'Canvas.c' || echo '$(srcdir)/'`Canvas.c
-
-xdmxconfig-Canvas.obj: Canvas.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdmxconfig_CFLAGS) $(CFLAGS) -MT xdmxconfig-Canvas.obj -MD -MP -MF $(DEPDIR)/xdmxconfig-Canvas.Tpo -c -o xdmxconfig-Canvas.obj `if test -f 'Canvas.c'; then $(CYGPATH_W) 'Canvas.c'; else $(CYGPATH_W) '$(srcdir)/Canvas.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/xdmxconfig-Canvas.Tpo $(DEPDIR)/xdmxconfig-Canvas.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='Canvas.c' object='xdmxconfig-Canvas.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdmxconfig_CFLAGS) $(CFLAGS) -c -o xdmxconfig-Canvas.obj `if test -f 'Canvas.c'; then $(CYGPATH_W) 'Canvas.c'; else $(CYGPATH_W) '$(srcdir)/Canvas.c'; fi`
-
-.l.c:
-	$(AM_V_LEX)$(am__skiplex) $(SHELL) $(YLWRAP) $< $(LEX_OUTPUT_ROOT).c $@ -- $(LEXCOMPILE)
-
-.y.c:
-	$(AM_V_YACC)$(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h `echo $@ | $(am__yacc_c2h)` y.output $*.output -- $(YACCCOMPILE)
-
-mostlyclean-libtool:
-	-rm -f *.lo
-
-clean-libtool:
-	-rm -rf .libs _libs
-
-# This directory's subdirectories are mostly independent; you can cd
-# into them and run 'make' without going through this Makefile.
-# To change the values of 'make' variables: instead of editing Makefiles,
-# (1) if the variable is set in 'config.status', edit 'config.status'
-#     (which will cause the Makefiles to be regenerated when you run 'make');
-# (2) otherwise, pass the desired values on the 'make' command line.
-$(am__recursive_targets):
-	@fail=; \
-	if $(am__make_keepgoing); then \
-	  failcom='fail=yes'; \
-	else \
-	  failcom='exit 1'; \
-	fi; \
-	dot_seen=no; \
-	target=`echo $@ | sed s/-recursive//`; \
-	case "$@" in \
-	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
-	  *) list='$(SUBDIRS)' ;; \
-	esac; \
-	for subdir in $$list; do \
-	  echo "Making $$target in $$subdir"; \
-	  if test "$$subdir" = "."; then \
-	    dot_seen=yes; \
-	    local_target="$$target-am"; \
-	  else \
-	    local_target="$$target"; \
-	  fi; \
-	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-	  || eval $$failcom; \
-	done; \
-	if test "$$dot_seen" = "no"; then \
-	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
-	fi; test -z "$$fail"
-
-ID: $(am__tagged_files)
-	$(am__define_uniq_tagged_files); mkid -fID $$unique
-tags: tags-recursive
-TAGS: tags
-
-tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
-	set x; \
-	here=`pwd`; \
-	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
-	  include_option=--etags-include; \
-	  empty_fix=.; \
-	else \
-	  include_option=--include; \
-	  empty_fix=; \
-	fi; \
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  if test "$$subdir" = .; then :; else \
-	    test ! -f $$subdir/TAGS || \
-	      set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
-	  fi; \
-	done; \
-	$(am__define_uniq_tagged_files); \
-	shift; \
-	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
-	  test -n "$$unique" || unique=$$empty_fix; \
-	  if test $$# -gt 0; then \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      "$$@" $$unique; \
-	  else \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      $$unique; \
-	  fi; \
-	fi
-ctags: ctags-recursive
-
-CTAGS: ctags
-ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
-	$(am__define_uniq_tagged_files); \
-	test -z "$(CTAGS_ARGS)$$unique" \
-	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$unique
-
-GTAGS:
-	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && $(am__cd) $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) "$$here"
-cscopelist: cscopelist-recursive
-
-cscopelist-am: $(am__tagged_files)
-	list='$(am__tagged_files)'; \
-	case "$(srcdir)" in \
-	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
-	  *) sdir=$(subdir)/$(srcdir) ;; \
-	esac; \
-	for i in $$list; do \
-	  if test -f "$$i"; then \
-	    echo "$(subdir)/$$i"; \
-	  else \
-	    echo "$$sdir/$$i"; \
-	  fi; \
-	done >> $(top_builddir)/cscope.files
-
-distclean-tags:
-	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(BUILT_SOURCES)
-	$(MAKE) $(AM_MAKEFLAGS) distdir-am
-
-distdir-am: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	list='$(DISTFILES)'; \
-	  dist_files=`for file in $$list; do echo $$file; done | \
-	  sed -e "s|^$$srcdirstrip/||;t" \
-	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
-	case $$dist_files in \
-	  */*) $(MKDIR_P) `echo "$$dist_files" | \
-			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
-			   sort -u` ;; \
-	esac; \
-	for file in $$dist_files; do \
-	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  if test -d $$d/$$file; then \
-	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
-	    if test -d "$(distdir)/$$file"; then \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
-	  else \
-	    test -f "$(distdir)/$$file" \
-	    || cp -p $$d/$$file "$(distdir)/$$file" \
-	    || exit 1; \
-	  fi; \
-	done
-	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
-	  if test "$$subdir" = .; then :; else \
-	    $(am__make_dryrun) \
-	      || test -d "$(distdir)/$$subdir" \
-	      || $(MKDIR_P) "$(distdir)/$$subdir" \
-	      || exit 1; \
-	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
-	    $(am__relativize); \
-	    new_distdir=$$reldir; \
-	    dir1=$$subdir; dir2="$(top_distdir)"; \
-	    $(am__relativize); \
-	    new_top_distdir=$$reldir; \
-	    echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
-	    echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
-	    ($(am__cd) $$subdir && \
-	      $(MAKE) $(AM_MAKEFLAGS) \
-	        top_distdir="$$new_top_distdir" \
-	        distdir="$$new_distdir" \
-		am__remove_distdir=: \
-		am__skip_length_check=: \
-		am__skip_mode_fix=: \
-	        distdir) \
-	      || exit 1; \
-	  fi; \
-	done
-check-am: all-am
-check: $(BUILT_SOURCES)
-	$(MAKE) $(AM_MAKEFLAGS) check-recursive
-all-am: Makefile $(PROGRAMS) $(LIBRARIES)
-installdirs: installdirs-recursive
-installdirs-am:
-	for dir in "$(DESTDIR)$(bindir)"; do \
-	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
-	done
-install: $(BUILT_SOURCES)
-	$(MAKE) $(AM_MAKEFLAGS) install-recursive
-install-exec: install-exec-recursive
-install-data: install-data-recursive
-uninstall: uninstall-recursive
-
-install-am: all-am
-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-recursive
-install-strip:
-	if test -z '$(STRIP)'; then \
-	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	      install; \
-	else \
-	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
-	fi
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
-	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
-	@echo "This command is intended for maintainers to use"
-	@echo "it deletes files that may require special tools to rebuild."
-	-rm -f parser.c
-	-rm -f parser.h
-	-rm -f scanner.c
-	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
-	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
-clean: clean-recursive
-
-clean-am: clean-binPROGRAMS clean-generic clean-libtool \
-	clean-noinstLIBRARIES mostlyclean-am
-
-distclean: distclean-recursive
-		-rm -f ./$(DEPDIR)/dmxcompat.Po
-	-rm -f ./$(DEPDIR)/dmxconfig.Po
-	-rm -f ./$(DEPDIR)/dmxparse.Po
-	-rm -f ./$(DEPDIR)/dmxprint.Po
-	-rm -f ./$(DEPDIR)/dmxtodmx.Po
-	-rm -f ./$(DEPDIR)/parser.Po
-	-rm -f ./$(DEPDIR)/scanner.Po
-	-rm -f ./$(DEPDIR)/strlcpy.Po
-	-rm -f ./$(DEPDIR)/vdltodmx.Po
-	-rm -f ./$(DEPDIR)/xdmxconfig-Canvas.Po
-	-rm -f ./$(DEPDIR)/xdmxconfig-dmxlog.Po
-	-rm -f ./$(DEPDIR)/xdmxconfig-xdmxconfig.Po
-	-rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
-	distclean-tags
-
-dvi: dvi-recursive
-
-dvi-am:
-
-html: html-recursive
-
-html-am:
-
-info: info-recursive
-
-info-am:
-
-install-data-am:
-
-install-dvi: install-dvi-recursive
-
-install-dvi-am:
-
-install-exec-am: install-binPROGRAMS
-
-install-html: install-html-recursive
-
-install-html-am:
-
-install-info: install-info-recursive
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-recursive
-
-install-pdf-am:
-
-install-ps: install-ps-recursive
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-recursive
-		-rm -f ./$(DEPDIR)/dmxcompat.Po
-	-rm -f ./$(DEPDIR)/dmxconfig.Po
-	-rm -f ./$(DEPDIR)/dmxparse.Po
-	-rm -f ./$(DEPDIR)/dmxprint.Po
-	-rm -f ./$(DEPDIR)/dmxtodmx.Po
-	-rm -f ./$(DEPDIR)/parser.Po
-	-rm -f ./$(DEPDIR)/scanner.Po
-	-rm -f ./$(DEPDIR)/strlcpy.Po
-	-rm -f ./$(DEPDIR)/vdltodmx.Po
-	-rm -f ./$(DEPDIR)/xdmxconfig-Canvas.Po
-	-rm -f ./$(DEPDIR)/xdmxconfig-dmxlog.Po
-	-rm -f ./$(DEPDIR)/xdmxconfig-xdmxconfig.Po
-	-rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-recursive
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic \
-	mostlyclean-libtool
-
-pdf: pdf-recursive
-
-pdf-am:
-
-ps: ps-recursive
-
-ps-am:
-
-uninstall-am: uninstall-binPROGRAMS
-
-.MAKE: $(am__recursive_targets) all check install install-am \
-	install-strip
-
-.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
-	am--depfiles check check-am clean clean-binPROGRAMS \
-	clean-generic clean-libtool clean-noinstLIBRARIES \
-	cscopelist-am ctags ctags-am distclean distclean-compile \
-	distclean-generic distclean-libtool distclean-tags distdir dvi \
-	dvi-am html html-am info info-am install install-am \
-	install-binPROGRAMS install-data install-data-am install-dvi \
-	install-dvi-am install-exec install-exec-am install-html \
-	install-html-am install-info install-info-am install-man \
-	install-pdf install-pdf-am install-ps install-ps-am \
-	install-strip installcheck installcheck-am installdirs \
-	installdirs-am maintainer-clean maintainer-clean-generic \
-	mostlyclean mostlyclean-compile mostlyclean-generic \
-	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
-	uninstall-am uninstall-binPROGRAMS
-
-.PRECIOUS: Makefile
-
-
-parser.h: parser.c
-scanner.c: scanner.l parser.h
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/hw/dmx/config/TODO b/hw/dmx/config/TODO
deleted file mode 100644
index 2998ff4..0000000
--- a/hw/dmx/config/TODO
+++ /dev/null
@@ -1,7 +0,0 @@
-Fri May 31 13:20:17 2002
-
-1) Sanitize values from input boxes.
-
-2) Add canvas colors to cavas widget resources or to command-line options.
-
-3) Add ability to edit option line(s) and wall.
diff --git a/hw/dmx/config/dmxcompat.c b/hw/dmx/config/dmxcompat.c
deleted file mode 100644
index 6d31b53..0000000
--- a/hw/dmx/config/dmxcompat.c
+++ /dev/null
@@ -1,234 +0,0 @@
-/*
- * Copyright 2002 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- */
-
-/** \file
- * This file provides some compatibility support for reading VDL files
- * that are used by xmovie
- * (http://www.llnl.gov/icc/sdd/img/xmovie/xmovie.shtml).
- *
- * This file is not used by the DMX server.
- */
-
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#include "os.h"
-#include "dmxconfig.h"
-#include "dmxparse.h"
-#include "dmxcompat.h"
-#include "parser.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-
-static int
-dmxVDLReadLine(FILE * str, char *buf, int len)
-{
-    if (fgets(buf, len, str))
-        return strlen(buf);
-    return 0;
-}
-
-static int
-dmxVDLCount(const char *buf)
-{
-    return strtol(buf, NULL, 10);
-}
-
-static void
-dmxVDLVirtualEntry(const char *buf, char *name, int *len, int *x, int *y)
-{
-    char *end;
-    const char *s;
-    char *d;
-    int start;
-
-    *x = strtol(buf, &end, 10);
-    *y = strtol(end, &end, 10);
-
-    for (s = end, d = name, start = 1; *s && *s != '['; ++s) {
-        if (start && isspace(*s))
-            continue;
-        *d++ = *s;
-        start = 0;
-    }
-    *d = '\0';
-    while (d > name && isspace(d[-1]))
-        *--d = '\0';            /* remove trailing space */
-    *len = strlen(name);
-}
-
-static void
-dmxVDLDisplayEntry(const char *buf,
-                   char *name, int *len,
-                   int *x, int *y, int *xoff, int *yoff, int *xorig, int *yorig)
-{
-    const char *pt;
-    char *end;
-
-    pt = strchr(buf, ' ');
-    strlcpy(name, buf, 1 + pt - buf);
-    *len = strlen(name);
-
-    *x = strtol(pt, &end, 10);
-    *y = strtol(end, &end, 10);
-    *xorig = strtol(end, &end, 10);
-    *yorig = strtol(end, &end, 10);
-    *xoff = strtol(end, &end, 10);
-    *yoff = strtol(end, NULL, 10);
-}
-
-/** Read from the VDL format \a filename and return a newly allocated \a
- * DMXConfigEntryPtr */
-DMXConfigEntryPtr
-dmxVDLRead(const char *filename)
-{
-    FILE *str;
-    char buf[2048];             /* RATS: Use ok */
-    char *pt;
-    int lineno = 0;
-    DMXConfigEntryPtr entry = NULL;
-    DMXConfigVirtualPtr virtual = NULL;
-    DMXConfigSubPtr sub = NULL;
-    DMXConfigDisplayPtr display = NULL;
-    DMXConfigFullDimPtr fdim = NULL;
-    int dcount = 0;
-    int icount = 0;
-    int x, y, xoff, yoff, xorig, yorig;
-    char name[2048];            /* RATS: Use ok */
-    const char *tmp;
-    int len;
-    enum {
-        simulateFlag,
-        virtualCount,
-        virtualEntry,
-        displayCount,
-        displayEntry,
-        ignoreCount,
-        ignoreEntry
-    } state = simulateFlag;
-
-    if (!filename)
-        str = stdin;
-    else
-        str = fopen(filename, "r");
-    if (!str)
-        return NULL;
-
-    while (dmxVDLReadLine(str, buf, sizeof(buf))) {
-        DMXConfigCommentPtr comment = NULL;
-
-        ++lineno;
-        for (pt = buf; *pt; pt++)
-            if (*pt == '\r' || *pt == '\n') {
-                *pt = '\0';
-                break;
-            }
-        if (buf[0] == '#') {
-            tmp = dmxConfigCopyString(buf + 1, strlen(buf + 1));
-            comment = dmxConfigCreateComment(T_COMMENT, lineno, tmp);
-            entry = dmxConfigAddEntry(entry, dmxConfigComment, comment, NULL);
-            continue;
-        }
-        switch (state) {
-        case simulateFlag:
-            state = virtualCount;
-            break;
-        case virtualCount:
-            state = virtualEntry;
-            break;
-        case virtualEntry:
-            len = sizeof(name);
-            dmxVDLVirtualEntry(buf, name, &len, &x, &y);
-            tmp = dmxConfigCopyString(name, len);
-            virtual = dmxConfigCreateVirtual(NULL,
-                                             dmxConfigCreateString(T_STRING,
-                                                                   lineno,
-                                                                   NULL,
-                                                                   tmp),
-                                             dmxConfigCreatePair(T_DIMENSION,
-                                                                 lineno,
-                                                                 NULL,
-                                                                 x, y, 0, 0),
-                                             NULL, NULL, NULL);
-            state = displayCount;
-            break;
-        case displayCount:
-            dcount = dmxVDLCount(buf);
-            state = displayEntry;
-            break;
-        case displayEntry:
-            dmxVDLDisplayEntry(buf, name, &len, &x, &y, &xoff, &yoff,
-                               &xorig, &yorig);
-            tmp = dmxConfigCopyString(name, len);
-            fdim =
-                dmxConfigCreateFullDim(dmxConfigCreatePartDim
-                                       (dmxConfigCreatePair
-                                        (T_DIMENSION, lineno, NULL, x, y, 0, 0),
-                                        dmxConfigCreatePair(T_OFFSET, lineno,
-                                                            NULL, xoff, yoff,
-                                                            xoff, yoff)), NULL);
-            display =
-                dmxConfigCreateDisplay(NULL,
-                                       dmxConfigCreateString(T_STRING, lineno,
-                                                             NULL, tmp), fdim,
-                                       dmxConfigCreatePair(T_ORIGIN, lineno,
-                                                           NULL, xorig, yorig,
-                                                           0, 0), NULL);
-            sub = dmxConfigAddSub(sub, dmxConfigSubDisplay(display));
-            if (!--dcount) {
-                state = ignoreCount;
-                virtual->subentry = sub;
-                entry = dmxConfigAddEntry(entry,
-                                          dmxConfigVirtual, NULL, virtual);
-                virtual = NULL;
-                sub = NULL;
-            }
-            break;
-        case ignoreCount:
-            icount = dmxVDLCount(buf);
-            state = ignoreEntry;
-            break;
-        case ignoreEntry:
-            if (!--icount)
-                state = virtualEntry;
-            break;
-        }
-    }
-
-    if (str != stdin)
-        fclose(str);
-
-    return entry;
-}
diff --git a/hw/dmx/config/dmxcompat.h b/hw/dmx/config/dmxcompat.h
deleted file mode 100644
index 7188920..0000000
--- a/hw/dmx/config/dmxcompat.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright 2002 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-/** \file
- * Interface to VDL compatibility support.  \see dmxcompat.c
- *
- * This file is not used by the DMX server.
- */
-
-#ifndef _DMXCOMPAT_H_
-#define _DMXCOMPAT_H_
-
-extern DMXConfigEntryPtr dmxVDLRead(const char *filename);
-#endif
diff --git a/hw/dmx/config/dmxconfig.c b/hw/dmx/config/dmxconfig.c
deleted file mode 100644
index 85bc0db..0000000
--- a/hw/dmx/config/dmxconfig.c
+++ /dev/null
@@ -1,561 +0,0 @@
-/*
- * Copyright 2002-2003 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-/** \file
- * Provides interface for reading DMX configuration files and for
- * combining that information with command-line configuration parameters. */
-
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#include "dmx.h"
-#include "dmxinput.h"
-#include "dmxconfig.h"
-#include "dmxparse.h"
-#include "dmxlog.h"
-#include "dmxcb.h"
-#include "dmxstat.h"
-#include "parser.h"
-
-extern int yydebug;
-extern FILE *yyin;
-
-static char *dmxXkbRules;
-static char *dmxXkbModel;
-static char *dmxXkbLayout;
-static char *dmxXkbVariant;
-static char *dmxXkbOptions;
-
-/** Stores lists of configuration information. */
-typedef struct DMXConfigListStruct {
-    const char *name;
-    struct DMXConfigListStruct *next;
-} DMXConfigList, *DMXConfigListPtr;
-
-/** This stucture stores the parsed configuration information. */
-typedef struct DMXConfigCmdStruct {
-    const char *filename;
-    const char *config;
-    DMXConfigList *displays;
-    DMXConfigList *inputs;
-    DMXConfigList *xinputs;
-} DMXConfigCmd, *DMXConfigCmdPtr;
-
-extern DMXConfigEntryPtr dmxConfigEntry;
-static DMXConfigCmd dmxConfigCmd;
-
-static int dmxDisplaysFromCommandLine;
-
-/** Make a note that \a display is the name of an X11 display that
- * should be initialized as a backend (output) display.  Called from
- * #ddxProcessArgument. */
-void
-dmxConfigStoreDisplay(const char *display)
-{
-    DMXConfigListPtr entry = malloc(sizeof(*entry));
-
-    entry->name = strdup(display);
-    entry->next = NULL;
-    if (!dmxConfigCmd.displays)
-        dmxConfigCmd.displays = entry;
-    else {
-        DMXConfigList *pt;
-
-        for (pt = dmxConfigCmd.displays; pt->next; pt = pt->next);
-        if (!pt)
-            dmxLog(dmxFatal, "dmxConfigStoreDisplay: end of list non-NULL\n");
-        pt->next = entry;
-    }
-    ++dmxDisplaysFromCommandLine;
-}
-
-/** Make a note that \a input is the name of an X11 display that should
- * be used for input (either a backend or a console input device). */
-void
-dmxConfigStoreInput(const char *input)
-{
-    DMXConfigListPtr entry = malloc(sizeof(*entry));
-
-    entry->name = strdup(input);
-    entry->next = NULL;
-    if (!dmxConfigCmd.inputs)
-        dmxConfigCmd.inputs = entry;
-    else {
-        DMXConfigList *pt;
-
-        for (pt = dmxConfigCmd.inputs; pt->next; pt = pt->next);
-        if (!pt)
-            dmxLog(dmxFatal, "dmxConfigStoreInput: end of list non-NULL\n");
-        pt->next = entry;
-    }
-}
-
-/** Make a note that \a input is the name of an X11 display that should
- * be used for input from XInput extension devices. */
-void
-dmxConfigStoreXInput(const char *input)
-{
-    DMXConfigListPtr entry = malloc(sizeof(*entry));
-
-    entry->name = strdup(input);
-    entry->next = NULL;
-    if (!dmxConfigCmd.xinputs)
-        dmxConfigCmd.xinputs = entry;
-    else {
-        DMXConfigList *pt;
-
-        for (pt = dmxConfigCmd.xinputs; pt->next; pt = pt->next);
-        if (!pt)
-            dmxLog(dmxFatal, "dmxConfigStoreXInput: end of list non-NULL\n");
-        pt->next = entry;
-    }
-}
-
-/** Make a note that \a file is the configuration file. */
-void
-dmxConfigStoreFile(const char *file)
-{
-    if (dmxConfigCmd.filename)
-        dmxLog(dmxFatal, "Only one -configfile allowed\n");
-    dmxConfigCmd.filename = strdup(file);
-}
-
-/** Make a note that \a config should be used as the configuration for
- * current instantiation of the DMX server. */
-void
-dmxConfigStoreConfig(const char *config)
-{
-    if (dmxConfigCmd.config)
-        dmxLog(dmxFatal, "Only one -config allowed\n");
-    dmxConfigCmd.config = strdup(config);
-}
-
-static int
-dmxConfigReadFile(const char *filename, int debug)
-{
-    FILE *str;
-
-    if (!(str = fopen(filename, "r")))
-        return -1;
-    dmxLog(dmxInfo, "Reading configuration file \"%s\"\n", filename);
-    yyin = str;
-    yydebug = debug;
-    yyparse();
-    fclose(str);
-    return 0;
-}
-
-static const char *
-dmxConfigMatch(const char *target, DMXConfigEntryPtr entry)
-{
-    DMXConfigVirtualPtr v = entry->virtual;
-    const char *name = NULL;
-
-    if (v && v->name)
-        name = v->name;
-
-    if (v && !dmxConfigCmd.config)
-        return v->name ? v->name : "<noname>";
-    if (!name)
-        return NULL;
-    if (!strcmp(name, target))
-        return name;
-    return NULL;
-}
-
-static DMXScreenInfo *
-dmxConfigAddDisplay(const char *name,
-                    int scrnWidth, int scrnHeight,
-                    int scrnX, int scrnY,
-                    int scrnXSign, int scrnYSign,
-                    int rootWidth, int rootHeight,
-                    int rootX, int rootY, int rootXSign, int rootYSign)
-{
-    DMXScreenInfo *dmxScreen;
-
-    if (!(dmxScreens = reallocarray(dmxScreens, dmxNumScreens + 1,
-                                    sizeof(*dmxScreens))))
-        dmxLog(dmxFatal,
-               "dmxConfigAddDisplay: realloc failed for screen %d (%s)\n",
-               dmxNumScreens, name);
-
-    dmxScreen = &dmxScreens[dmxNumScreens];
-    memset(dmxScreen, 0, sizeof(*dmxScreen));
-    dmxScreen->name = name;
-    dmxScreen->index = dmxNumScreens;
-    dmxScreen->scrnWidth = scrnWidth;
-    dmxScreen->scrnHeight = scrnHeight;
-    dmxScreen->scrnX = scrnX;
-    dmxScreen->scrnY = scrnY;
-    dmxScreen->scrnXSign = scrnXSign;
-    dmxScreen->scrnYSign = scrnYSign;
-    dmxScreen->rootWidth = rootWidth;
-    dmxScreen->rootHeight = rootHeight;
-    dmxScreen->rootX = rootX;
-    dmxScreen->rootY = rootY;
-    dmxScreen->stat = dmxStatAlloc();
-    ++dmxNumScreens;
-    return dmxScreen;
-}
-
-DMXInputInfo *
-dmxConfigAddInput(const char *name, int core)
-{
-    DMXInputInfo *dmxInput;
-
-    if (!(dmxInputs = reallocarray(dmxInputs, dmxNumInputs + 1,
-                                   sizeof(*dmxInputs))))
-        dmxLog(dmxFatal,
-               "dmxConfigAddInput: realloc failed for input %d (%s)\n",
-               dmxNumInputs, name);
-
-    dmxInput = &dmxInputs[dmxNumInputs];
-
-    memset(dmxInput, 0, sizeof(*dmxInput));
-    dmxInput->name = name;
-    dmxInput->inputIdx = dmxNumInputs;
-    dmxInput->scrnIdx = -1;
-    dmxInput->core = core;
-    ++dmxNumInputs;
-    return dmxInput;
-}
-
-static void
-dmxConfigCopyFromDisplay(DMXConfigDisplayPtr d)
-{
-    DMXScreenInfo *dmxScreen;
-
-    dmxScreen = dmxConfigAddDisplay(d->name,
-                                    d->scrnWidth, d->scrnHeight,
-                                    d->scrnX, d->scrnY,
-                                    d->scrnXSign, d->scrnYSign,
-                                    d->rootWidth, d->rootHeight,
-                                    d->rootX, d->rootY,
-                                    d->rootXSign, d->rootXSign);
-    dmxScreen->where = PosAbsolute;
-    dmxScreen->whereX = d->rootXOrigin;
-    dmxScreen->whereY = d->rootYOrigin;
-}
-
-static void
-dmxConfigCopyFromWall(DMXConfigWallPtr w)
-{
-    DMXConfigStringPtr pt;
-    DMXScreenInfo *dmxScreen;
-    int edge = dmxNumScreens;
-    int last = dmxNumScreens;
-
-    if (!w->xwall && !w->ywall) {       /* Try to make it square */
-        int count;
-
-        for (pt = w->nameList, count = 0; pt; pt = pt->next)
-            ++count;
-        w->xwall = sqrt(count) + .5;
-    }
-
-    for (pt = w->nameList; pt; pt = pt->next) {
-        dmxScreen = dmxConfigAddDisplay(pt->string, w->width, w->height,
-                                        0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-        if (pt == w->nameList) {        /* Upper left */
-            dmxScreen->where = PosAbsolute;
-            dmxScreen->whereX = 0;
-            dmxScreen->whereY = 0;
-        }
-        else if (w->xwall) {    /* Tile left to right, then top to bottom */
-            if (!((dmxNumScreens - 1) % w->xwall)) {
-                dmxScreen->where = PosBelow;
-                dmxScreen->whereRefScreen = edge;
-                edge = dmxNumScreens - 1;
-            }
-            else {
-                dmxScreen->where = PosRightOf;
-                dmxScreen->whereRefScreen = last;
-            }
-        }
-        else {                  /* Tile top to bottom, then left to right */
-            if (!((dmxNumScreens - 1) % w->ywall)) {
-                dmxScreen->where = PosRightOf;
-                dmxScreen->whereRefScreen = edge;
-                edge = dmxNumScreens - 1;
-            }
-            else {
-                dmxScreen->where = PosBelow;
-                dmxScreen->whereRefScreen = last;
-            }
-
-        }
-        last = dmxNumScreens - 1;
-        if (dmxScreen->where == PosAbsolute)
-            dmxLog(dmxInfo, "Added %s at %d %d\n",
-                   pt->string, dmxScreen->whereX, dmxScreen->whereY);
-        else
-            dmxLog(dmxInfo, "Added %s %s %s\n",
-                   pt->string,
-                   dmxScreen->where == PosBelow ? "below" : "right of",
-                   dmxScreens[dmxScreen->whereRefScreen].name);
-    }
-}
-
-static void
-dmxConfigCopyFromOption(DMXConfigOptionPtr o)
-{
-    DMXConfigStringPtr pt;
-    int argc = 0;
-    char **argv = NULL;
-
-    if (serverGeneration != 1)
-        return;                 /* FIXME: only do once, for now */
-    if (!o || !o->string)
-        return;
-    for (pt = o->option; pt; pt = pt->next) {
-        if (pt->string) {
-            ++argc;
-            argv = reallocarray(argv, argc + 1, sizeof(*argv));
-            argv[argc] = (char *) pt->string;
-        }
-    }
-    argv[0] = NULL;
-    ProcessCommandLine(argc + 1, argv);
-    free(argv);
-}
-
-static void
-dmxConfigCopyFromParam(DMXConfigParamPtr p)
-{
-    const char **argv;
-    int argc;
-
-    if ((argv = dmxConfigLookupParam(p, "xkbrules", &argc)) && argc == 2) {
-        dmxConfigSetXkbRules(argv[1]);
-    }
-    else if ((argv = dmxConfigLookupParam(p, "xkbmodel", &argc))
-             && argc == 2) {
-        dmxConfigSetXkbModel(argv[1]);
-    }
-    else if ((argv = dmxConfigLookupParam(p, "xkblayout", &argc))
-             && argc == 2) {
-        dmxConfigSetXkbLayout(argv[1]);
-    }
-    else if ((argv = dmxConfigLookupParam(p, "xkbvariant", &argc))
-             && argc == 2) {
-        dmxConfigSetXkbVariant(argv[1]);
-    }
-    else if ((argv = dmxConfigLookupParam(p, "xkboptions", &argc))
-             && argc == 2) {
-        dmxConfigSetXkbOptions(argv[1]);
-    }
-}
-
-static void
-dmxConfigCopyData(DMXConfigVirtualPtr v)
-{
-    DMXConfigSubPtr sub;
-
-    if (v->dim)
-        dmxSetWidthHeight(v->dim->x, v->dim->y);
-    else
-        dmxSetWidthHeight(0, 0);
-    for (sub = v->subentry; sub; sub = sub->next) {
-        switch (sub->type) {
-        case dmxConfigDisplay:
-            dmxConfigCopyFromDisplay(sub->display);
-            break;
-        case dmxConfigWall:
-            dmxConfigCopyFromWall(sub->wall);
-            break;
-        case dmxConfigOption:
-            dmxConfigCopyFromOption(sub->option);
-            break;
-        case dmxConfigParam:
-            dmxConfigCopyFromParam(sub->param);
-            break;
-        default:
-            dmxLog(dmxFatal,
-                   "dmxConfigCopyData: not a display, wall, or value\n");
-        }
-    }
-}
-
-static void
-dmxConfigFromCommandLine(void)
-{
-    DMXConfigListPtr pt;
-
-    dmxLog(dmxInfo, "Using configuration from command line\n");
-    for (pt = dmxConfigCmd.displays; pt; pt = pt->next) {
-        DMXScreenInfo *dmxScreen = dmxConfigAddDisplay(pt->name,
-                                                       0, 0, 0, 0, 0, 0,
-                                                       0, 0, 0, 0, 0, 0);
-
-        if (dmxNumScreens == 1) {
-            dmxScreen->where = PosAbsolute;
-            dmxScreen->whereX = 0;
-            dmxScreen->whereY = 0;
-            dmxLog(dmxInfo, "Added %s at %d %d\n",
-                   dmxScreen->name, dmxScreen->whereX, dmxScreen->whereY);
-        }
-        else {
-            dmxScreen->where = PosRightOf;
-            dmxScreen->whereRefScreen = dmxNumScreens - 2;
-            if (dmxScreen->whereRefScreen < 0)
-                dmxScreen->whereRefScreen = 0;
-            dmxLog(dmxInfo, "Added %s %s %s\n",
-                   dmxScreen->name,
-                   dmxScreen->where == PosBelow ? "below" : "right of",
-                   dmxScreens[dmxScreen->whereRefScreen].name);
-        }
-    }
-}
-
-static void
-dmxConfigFromConfigFile(void)
-{
-    DMXConfigEntryPtr pt;
-    const char *name;
-
-    for (pt = dmxConfigEntry; pt; pt = pt->next) {
-        /* FIXME -- if an input is specified, use it */
-        if (pt->type != dmxConfigVirtual)
-            continue;
-        if ((name = dmxConfigMatch(dmxConfigCmd.config, pt))) {
-            dmxLog(dmxInfo, "Using configuration \"%s\"\n", name);
-            dmxConfigCopyData(pt->virtual);
-            return;
-        }
-    }
-    dmxLog(dmxFatal, "Could not find configuration \"%s\" in \"%s\"\n",
-           dmxConfigCmd.config, dmxConfigCmd.filename);
-}
-
-static void
-dmxConfigConfigInputs(void)
-{
-    DMXConfigListPtr pt;
-
-    if (dmxNumInputs)
-        return;
-
-    if (dmxConfigCmd.inputs) {  /* Use command line */
-        for (pt = dmxConfigCmd.inputs; pt; pt = pt->next)
-            dmxConfigAddInput(pt->name, TRUE);
-    }
-    else if (dmxNumScreens) {   /* Use first display */
-        dmxConfigAddInput(dmxScreens[0].name, TRUE);
-    }
-    else {                      /* Use dummy */
-        dmxConfigAddInput("dummy", TRUE);
-    }
-
-    if (dmxConfigCmd.xinputs) { /* Non-core devices from command line */
-        for (pt = dmxConfigCmd.xinputs; pt; pt = pt->next)
-            dmxConfigAddInput(pt->name, FALSE);
-    }
-}
-
-/** Set up the appropriate global variables so that the DMX server will
- * be initialized using the configuration specified in the config file
- * and on the command line. */
-void
-dmxConfigConfigure(void)
-{
-    if (dmxConfigEntry) {
-        dmxConfigFreeEntry(dmxConfigEntry);
-        dmxConfigEntry = NULL;
-    }
-    if (dmxConfigCmd.filename) {
-        if (dmxConfigCmd.displays)
-            dmxLog(dmxWarning,
-                   "Using configuration file \"%s\" instead of command line\n",
-                   dmxConfigCmd.filename);
-        dmxConfigReadFile(dmxConfigCmd.filename, 0);
-        dmxConfigFromConfigFile();
-    }
-    else {
-        if (dmxConfigCmd.config)
-            dmxLog(dmxWarning,
-                   "Configuration name (%s) without configuration file\n",
-                   dmxConfigCmd.config);
-        dmxConfigFromCommandLine();
-    }
-    dmxConfigConfigInputs();
-}
-
-/** This function determines the number of displays we WILL have and
- * sets MAXSCREENS to that value.  This is difficult since the number
- * depends on the command line (which is easy to count) or on the config
- * file, which has to be parsed. */
-void
-dmxConfigSetMaxScreens(void)
-{
-    static int processing = 0;
-
-    if (processing)
-        return;                 /* Prevent reentry via ProcessCommandLine */
-    processing = 1;
-    if (dmxConfigCmd.filename) {
-        if (!dmxNumScreens)
-            dmxConfigConfigure();
-#ifndef MAXSCREENS
-        SetMaxScreens(dmxNumScreens);
-#endif
-    }
-    else
-#ifndef MAXSCREENS
-        SetMaxScreens(dmxDisplaysFromCommandLine);
-#endif
-    processing = 0;
-}
-
-/** This macro is used to generate the following access methods:
- * - dmxConfig{Set,Get}rules
- * - dmxConfig{Set,Get}model
- * - dmxConfig{Set,Get}layout
- * - dmxConfig{Set,Get}variant
- * - dmxConfig{Set,Get}options
- * These methods are used to read and write information about the keyboard. */
-
-#define GEN(param,glob,def)                                                   \
- void dmxConfigSet##glob(const char *param) {                                 \
-     if (dmx##glob) free((void *)dmx##glob);                                  \
-     dmx##glob = strdup(param);                                               \
- }                                                                            \
- char *dmxConfigGet##glob(void) {                                             \
-     return (char *)(dmx##glob ? dmx##glob : def);                            \
- }
-
-GEN(rules, XkbRules, XKB_DFLT_RULES)
-    GEN(model, XkbModel, XKB_DFLT_MODEL)
-    GEN(layout, XkbLayout, XKB_DFLT_LAYOUT)
-    GEN(variant, XkbVariant, XKB_DFLT_VARIANT)
-    GEN(options, XkbOptions, XKB_DFLT_OPTIONS)
diff --git a/hw/dmx/config/dmxconfig.h b/hw/dmx/config/dmxconfig.h
deleted file mode 100644
index deb293c..0000000
--- a/hw/dmx/config/dmxconfig.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright 2002 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-/** \file
- * Interface for DMX configuration file support.  \see dmxconfig.c */
-
-#ifndef _DMXCONFIG_H_
-#define _DMXCONFIG_H_
-
-#include <xkb-config.h>
-
-extern void dmxConfigStoreDisplay(const char *display);
-extern void dmxConfigStoreInput(const char *input);     /* Core devices */
-extern void dmxConfigStoreXInput(const char *input);    /* Non-core devices */
-extern void dmxConfigStoreFile(const char *file);
-extern void dmxConfigStoreConfig(const char *config);
-extern void dmxConfigConfigure(void);
-extern void dmxConfigSetMaxScreens(void);
-
-extern void dmxConfigSetXkbRules(const char *rules);
-extern void dmxConfigSetXkbModel(const char *model);
-extern void dmxConfigSetXkbLayout(const char *layout);
-extern void dmxConfigSetXkbVariant(const char *variant);
-extern void dmxConfigSetXkbOptions(const char *options);
-
-extern char *dmxConfigGetXkbRules(void);
-extern char *dmxConfigGetXkbModel(void);
-extern char *dmxConfigGetXkbLayout(void);
-extern char *dmxConfigGetXkbVariant(void);
-extern char *dmxConfigGetXkbOptions(void);
-#endif
diff --git a/hw/dmx/config/dmxparse.c b/hw/dmx/config/dmxparse.c
deleted file mode 100644
index f66143a..0000000
--- a/hw/dmx/config/dmxparse.c
+++ /dev/null
@@ -1,688 +0,0 @@
-/*
- * Copyright 2002 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-/** \file
- *
- * This file provides support routines and helper functions to be used
- * by the DMX configuration file parser.
- *
- * Because the DMX configuration file parsing should be capable of being
- * used in a stand-alone fashion (i.e., independent from the DMX server
- * source tree), no dependencies on other DMX routines are made. */
-
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdarg.h>
-#include "dmxparse.h"
-
-/** A general error logging routine that does not depend on the dmxLog
- * functions. */
-void
-dmxConfigLog(const char *format, ...)
-{
-    va_list args;
-
-    va_start(args, format);
-    vprintf(format, args);      /* RATS: All calls to dmxConfigLog from
-                                 * dmxparse.c and dmxprint.c use a
-                                 * trusted format. */
-    va_end(args);
-}
-
-void *
-dmxConfigAlloc(unsigned long bytes)
-{
-    void *area = calloc(1, bytes);
-
-    if (!area) {
-        dmxConfigLog("dmxConfigAlloc: out of memory\n");
-        return NULL;
-    }
-    return area;
-}
-
-void *
-dmxConfigRealloc(void *orig, unsigned long orig_bytes, unsigned long bytes)
-{
-    unsigned char *area = realloc(orig, bytes);
-
-    if (!area) {
-        dmxConfigLog("dmxConfigRealloc: out of memory\n");
-        return NULL;
-    }
-    memset(area + orig_bytes, 0, bytes - orig_bytes);
-    return area;
-}
-
-const char *
-dmxConfigCopyString(const char *string, int length)
-{
-    char *copy;
-
-    if (!length)
-        length = strlen(string);
-    copy = dmxConfigAlloc(length + 1);
-    if (length)
-        strncpy(copy, string, length);
-    copy[length] = '\0';
-    return copy;
-}
-
-void
-dmxConfigFree(void *area)
-{
-    free(area);
-}
-
-DMXConfigTokenPtr
-dmxConfigCreateToken(int token, int line, const char *comment)
-{
-    DMXConfigTokenPtr pToken = dmxConfigAlloc(sizeof(*pToken));
-
-    pToken->token = token;
-    pToken->line = line;
-    pToken->comment = comment;
-    return pToken;
-}
-
-void
-dmxConfigFreeToken(DMXConfigTokenPtr p)
-{
-    if (!p)
-        return;
-    dmxConfigFree((void *) p->comment);
-    dmxConfigFree(p);
-}
-
-DMXConfigStringPtr
-dmxConfigCreateString(int token, int line,
-                      const char *comment, const char *string)
-{
-    DMXConfigStringPtr pString = dmxConfigAlloc(sizeof(*pString));
-
-    pString->token = token;
-    pString->line = line;
-    pString->comment = comment;
-    pString->string = string;
-    return pString;
-}
-
-void
-dmxConfigFreeString(DMXConfigStringPtr p)
-{
-    DMXConfigStringPtr next;
-
-    if (!p)
-        return;
-    do {
-        next = p->next;
-        dmxConfigFree((void *) p->comment);
-        dmxConfigFree((void *) p->string);
-        dmxConfigFree(p);
-    } while ((p = next));
-}
-
-DMXConfigNumberPtr
-dmxConfigCreateNumber(int token, int line, const char *comment, int number)
-{
-    DMXConfigNumberPtr pNumber = dmxConfigAlloc(sizeof(*pNumber));
-
-    pNumber->token = token;
-    pNumber->line = line;
-    pNumber->comment = comment;
-    pNumber->number = number;
-    return pNumber;
-}
-
-void
-dmxConfigFreeNumber(DMXConfigNumberPtr p)
-{
-    if (!p)
-        return;
-    dmxConfigFree((void *) p->comment);
-    dmxConfigFree(p);
-}
-
-DMXConfigPairPtr
-dmxConfigCreatePair(int token, int line,
-                    const char *comment, int x, int y, int xsign, int ysign)
-{
-    DMXConfigPairPtr pPair = dmxConfigAlloc(sizeof(*pPair));
-
-    pPair->token = token;
-    pPair->line = line;
-    pPair->comment = comment;
-    pPair->x = x;
-    pPair->y = y;
-    pPair->xsign = (xsign < 0) ? -1 : 1;
-    pPair->ysign = (ysign < 0) ? -1 : 1;
-    return pPair;
-}
-
-void
-dmxConfigFreePair(DMXConfigPairPtr p)
-{
-    if (!p)
-        return;
-    dmxConfigFree((void *) p->comment);
-    dmxConfigFree(p);
-}
-
-DMXConfigCommentPtr
-dmxConfigCreateComment(int token, int line, const char *comment)
-{
-    DMXConfigCommentPtr pComment = dmxConfigAlloc(sizeof(*pComment));
-
-    pComment->token = token;
-    pComment->line = line;
-    pComment->comment = comment;
-    return pComment;
-}
-
-void
-dmxConfigFreeComment(DMXConfigCommentPtr p)
-{
-    if (!p)
-        return;
-    dmxConfigFree((void *) p->comment);
-    dmxConfigFree(p);
-}
-
-DMXConfigPartDimPtr
-dmxConfigCreatePartDim(DMXConfigPairPtr pDim, DMXConfigPairPtr pOffset)
-{
-    DMXConfigPartDimPtr pPart = dmxConfigAlloc(sizeof(*pPart));
-
-    pPart->dim = pDim;
-    pPart->offset = pOffset;
-    return pPart;
-}
-
-void
-dmxConfigFreePartDim(DMXConfigPartDimPtr p)
-{
-    if (!p)
-        return;
-    dmxConfigFreePair(p->dim);
-    dmxConfigFreePair(p->offset);
-    dmxConfigFree(p);
-}
-
-DMXConfigFullDimPtr
-dmxConfigCreateFullDim(DMXConfigPartDimPtr pScrn, DMXConfigPartDimPtr pRoot)
-{
-    DMXConfigFullDimPtr pFull = dmxConfigAlloc(sizeof(*pFull));
-
-    pFull->scrn = pScrn;
-    pFull->root = pRoot;
-    return pFull;
-}
-
-void
-dmxConfigFreeFullDim(DMXConfigFullDimPtr p)
-{
-    if (!p)
-        return;
-    dmxConfigFreePartDim(p->scrn);
-    dmxConfigFreePartDim(p->root);
-    dmxConfigFree(p);
-}
-
-DMXConfigDisplayPtr
-dmxConfigCreateDisplay(DMXConfigTokenPtr pStart,
-                       DMXConfigStringPtr pName,
-                       DMXConfigFullDimPtr pDim,
-                       DMXConfigPairPtr pOrigin, DMXConfigTokenPtr pEnd)
-{
-    DMXConfigDisplayPtr pDisplay = dmxConfigAlloc(sizeof(*pDisplay));
-
-    pDisplay->start = pStart;
-    pDisplay->dname = pName;
-    pDisplay->dim = pDim;
-    pDisplay->origin = pOrigin;
-    pDisplay->end = pEnd;
-
-    pDisplay->name = pName ? pName->string : NULL;
-    pDisplay->rootXOrigin = pOrigin ? pOrigin->x : 0;
-    pDisplay->rootYOrigin = pOrigin ? pOrigin->y : 0;
-
-    if (pDim && pDim->scrn && pDim->scrn->dim) {
-        pDisplay->scrnWidth = pDim->scrn->dim->x;
-        pDisplay->scrnHeight = pDim->scrn->dim->y;
-    }
-    if (pDim && pDim->scrn && pDim->scrn->offset) {
-        pDisplay->scrnX = pDim->scrn->offset->x;
-        pDisplay->scrnY = pDim->scrn->offset->y;
-        pDisplay->scrnXSign = pDim->scrn->offset->xsign;
-        pDisplay->scrnYSign = pDim->scrn->offset->ysign;
-    }
-
-    if (pDim && pDim->root) {
-        if (pDim->root->dim) {
-            pDisplay->rootWidth = pDim->root->dim->x;
-            pDisplay->rootHeight = pDim->root->dim->y;
-        }
-        if (pDim->root->offset) {
-            pDisplay->rootX = pDim->root->offset->x;
-            pDisplay->rootY = pDim->root->offset->y;
-            pDisplay->rootXSign = pDim->root->offset->xsign;
-            pDisplay->rootYSign = pDim->root->offset->ysign;
-        }
-    }
-    else {                      /* If no root specification, copy width
-                                 * and height from scrn -- leave offset
-                                 * as zero, since it is relative to
-                                 * scrn. */
-        pDisplay->rootWidth = pDisplay->scrnWidth;
-        pDisplay->rootHeight = pDisplay->scrnHeight;
-    }
-
-    return pDisplay;
-}
-
-void
-dmxConfigFreeDisplay(DMXConfigDisplayPtr p)
-{
-    if (!p)
-        return;
-    dmxConfigFreeToken(p->start);
-    dmxConfigFreeString(p->dname);
-    dmxConfigFreeFullDim(p->dim);
-    dmxConfigFreeToken(p->end);
-    dmxConfigFree(p);
-}
-
-DMXConfigWallPtr
-dmxConfigCreateWall(DMXConfigTokenPtr pStart,
-                    DMXConfigPairPtr pWallDim,
-                    DMXConfigPairPtr pDisplayDim,
-                    DMXConfigStringPtr pNameList, DMXConfigTokenPtr pEnd)
-{
-    DMXConfigWallPtr pWall = dmxConfigAlloc(sizeof(*pWall));
-
-    pWall->start = pStart;
-    pWall->wallDim = pWallDim;
-    pWall->displayDim = pDisplayDim;
-    pWall->nameList = pNameList;
-    pWall->end = pEnd;
-
-    pWall->width = pDisplayDim ? pDisplayDim->x : 0;
-    pWall->height = pDisplayDim ? pDisplayDim->y : 0;
-    pWall->xwall = pWallDim ? pWallDim->x : 0;
-    pWall->ywall = pWallDim ? pWallDim->y : 0;
-
-    return pWall;
-}
-
-void
-dmxConfigFreeWall(DMXConfigWallPtr p)
-{
-    if (!p)
-        return;
-    dmxConfigFreeToken(p->start);
-    dmxConfigFreePair(p->wallDim);
-    dmxConfigFreePair(p->displayDim);
-    dmxConfigFreeString(p->nameList);
-    dmxConfigFreeToken(p->end);
-    dmxConfigFree(p);
-}
-
-DMXConfigOptionPtr
-dmxConfigCreateOption(DMXConfigTokenPtr pStart,
-                      DMXConfigStringPtr pOption, DMXConfigTokenPtr pEnd)
-{
-    int length = 0;
-    int offset = 0;
-    DMXConfigStringPtr p;
-    DMXConfigOptionPtr option = dmxConfigAlloc(sizeof(*option));
-
-    for (p = pOption; p; p = p->next) {
-        if (p->string)
-            length += strlen(p->string) + 1;
-    }
-
-    option->string = dmxConfigAlloc(length + 1);
-
-    for (p = pOption; p; p = p->next) {
-        if (p->string) {
-            int len = strlen(p->string);
-
-            memcpy(option->string + offset, p->string, len);
-            offset += len;
-            if (p->next)
-                option->string[offset++] = ' ';
-        }
-    }
-    option->string[offset] = '\0';
-
-    option->start = pStart;
-    option->option = pOption;
-    option->end = pEnd;
-
-    return option;
-}
-
-void
-dmxConfigFreeOption(DMXConfigOptionPtr p)
-{
-    if (!p)
-        return;
-    free(p->string);
-    dmxConfigFreeToken(p->start);
-    dmxConfigFreeString(p->option);
-    dmxConfigFreeToken(p->end);
-    dmxConfigFree(p);
-}
-
-const char **
-dmxConfigLookupParam(DMXConfigParamPtr p, const char *key, int *argc)
-{
-    DMXConfigParamPtr pt;
-
-    for (pt = p; pt; pt = pt->next) {
-        if (pt->argv && !strcasecmp(pt->argv[0], key)) {
-            *argc = pt->argc;
-            return pt->argv;
-        }
-    }
-    *argc = 0;
-    return NULL;
-}
-
-DMXConfigParamPtr
-dmxConfigCreateParam(DMXConfigTokenPtr pStart,
-                     DMXConfigTokenPtr pOpen,
-                     DMXConfigStringPtr pParam,
-                     DMXConfigTokenPtr pClose, DMXConfigTokenPtr pEnd)
-{
-    DMXConfigParamPtr param = dmxConfigAlloc(sizeof(*param));
-    DMXConfigStringPtr pt;
-
-    param->argc = 0;
-    param->argv = NULL;
-    for (pt = pParam; pt; pt = pt->next) {
-        if (pt->string) {
-            param->argv = realloc(param->argv,
-                                  (param->argc + 2) * sizeof(*param->argv));
-            param->argv[param->argc] = pt->string;
-            ++param->argc;
-        }
-    }
-    if (param->argv)
-        param->argv[param->argc] = NULL;
-
-    param->start = pStart;
-    param->open = pOpen;
-    param->param = pParam;
-    param->close = pClose;
-    param->end = pEnd;
-
-    return param;
-}
-
-void
-dmxConfigFreeParam(DMXConfigParamPtr p)
-{
-    DMXConfigParamPtr next;
-
-    if (!p)
-        return;
-    do {
-        next = p->next;
-        dmxConfigFreeToken(p->start);
-        dmxConfigFreeToken(p->open);
-        dmxConfigFreeString(p->param);
-        dmxConfigFreeToken(p->close);
-        dmxConfigFreeToken(p->end);
-        dmxConfigFree(p->argv);
-        dmxConfigFree(p);
-    } while ((p = next));
-}
-
-DMXConfigSubPtr
-dmxConfigCreateSub(DMXConfigType type,
-                   DMXConfigCommentPtr comment,
-                   DMXConfigDisplayPtr display,
-                   DMXConfigWallPtr wall,
-                   DMXConfigOptionPtr option, DMXConfigParamPtr param)
-{
-    DMXConfigSubPtr pSub = dmxConfigAlloc(sizeof(*pSub));
-
-    pSub->type = type;
-    switch (type) {
-    case dmxConfigComment:
-        pSub->comment = comment;
-        break;
-    case dmxConfigDisplay:
-        pSub->display = display;
-        break;
-    case dmxConfigWall:
-        pSub->wall = wall;
-        break;
-    case dmxConfigOption:
-        pSub->option = option;
-        break;
-    case dmxConfigParam:
-        pSub->param = param;
-        break;
-    default:
-        dmxConfigLog("Type %d not supported in subentry\n", type);
-        break;
-    }
-    return pSub;
-}
-
-void
-dmxConfigFreeSub(DMXConfigSubPtr sub)
-{
-    DMXConfigSubPtr pt;
-
-    for (pt = sub; pt; pt = pt->next) {
-        switch (pt->type) {
-        case dmxConfigComment:
-            dmxConfigFreeComment(pt->comment);
-            break;
-        case dmxConfigDisplay:
-            dmxConfigFreeDisplay(pt->display);
-            break;
-        case dmxConfigWall:
-            dmxConfigFreeWall(pt->wall);
-            break;
-        case dmxConfigOption:
-            dmxConfigFreeOption(pt->option);
-            break;
-        case dmxConfigParam:
-            dmxConfigFreeParam(pt->param);
-            break;
-        default:
-            dmxConfigLog("Type %d not supported in subentry\n", pt->type);
-            break;
-        }
-    }
-    dmxConfigFree(sub);
-}
-
-DMXConfigSubPtr
-dmxConfigSubComment(DMXConfigCommentPtr comment)
-{
-    return dmxConfigCreateSub(dmxConfigComment, comment, NULL, NULL, NULL,
-                              NULL);
-}
-
-DMXConfigSubPtr
-dmxConfigSubDisplay(DMXConfigDisplayPtr display)
-{
-    return dmxConfigCreateSub(dmxConfigDisplay, NULL, display, NULL, NULL,
-                              NULL);
-}
-
-DMXConfigSubPtr
-dmxConfigSubWall(DMXConfigWallPtr wall)
-{
-    return dmxConfigCreateSub(dmxConfigWall, NULL, NULL, wall, NULL, NULL);
-}
-
-DMXConfigSubPtr
-dmxConfigSubOption(DMXConfigOptionPtr option)
-{
-    return dmxConfigCreateSub(dmxConfigOption, NULL, NULL, NULL, option, NULL);
-}
-
-DMXConfigSubPtr
-dmxConfigSubParam(DMXConfigParamPtr param)
-{
-    return dmxConfigCreateSub(dmxConfigParam, NULL, NULL, NULL, NULL, param);
-}
-
-extern DMXConfigSubPtr
-dmxConfigAddSub(DMXConfigSubPtr head, DMXConfigSubPtr sub)
-{
-    DMXConfigSubPtr pt;
-
-    if (!head)
-        return sub;
-    for (pt = head; pt->next; pt = pt->next);
-    pt->next = sub;
-    return head;
-}
-
-DMXConfigVirtualPtr
-dmxConfigCreateVirtual(DMXConfigTokenPtr pStart,
-                       DMXConfigStringPtr pName,
-                       DMXConfigPairPtr pDim,
-                       DMXConfigTokenPtr pOpen,
-                       DMXConfigSubPtr pSubentry, DMXConfigTokenPtr pClose)
-{
-    DMXConfigVirtualPtr pVirtual = dmxConfigAlloc(sizeof(*pVirtual));
-
-    pVirtual->start = pStart;
-    pVirtual->vname = pName;
-    pVirtual->dim = pDim;
-    pVirtual->open = pOpen;
-    pVirtual->subentry = pSubentry;
-    pVirtual->close = pClose;
-
-    pVirtual->name = pName ? pName->string : NULL;
-    pVirtual->width = pDim ? pDim->x : 0;
-    pVirtual->height = pDim ? pDim->y : 0;
-
-    return pVirtual;
-}
-
-void
-dmxConfigFreeVirtual(DMXConfigVirtualPtr virtual)
-{
-    dmxConfigFreeToken(virtual->start);
-    dmxConfigFreeString(virtual->vname);
-    dmxConfigFreePair(virtual->dim);
-    dmxConfigFreeToken(virtual->open);
-    dmxConfigFreeSub(virtual->subentry);
-    dmxConfigFreeToken(virtual->close);
-    dmxConfigFree(virtual);
-}
-
-DMXConfigEntryPtr
-dmxConfigCreateEntry(DMXConfigType type,
-                     DMXConfigCommentPtr comment, DMXConfigVirtualPtr virtual)
-{
-    DMXConfigEntryPtr pEntry = dmxConfigAlloc(sizeof(*pEntry));
-
-    pEntry->type = type;
-    switch (type) {
-    case dmxConfigComment:
-        pEntry->comment = comment;
-        break;
-    case dmxConfigVirtual:
-        pEntry->virtual = virtual;
-        break;
-    default:
-        dmxConfigLog("Type %d not supported in entry\n", type);
-        break;
-    }
-    return pEntry;
-}
-
-void
-dmxConfigFreeEntry(DMXConfigEntryPtr entry)
-{
-    DMXConfigEntryPtr pt;
-
-    for (pt = entry; pt; pt = pt->next) {
-        switch (pt->type) {
-        case dmxConfigComment:
-            dmxConfigFreeComment(pt->comment);
-            break;
-        case dmxConfigVirtual:
-            dmxConfigFreeVirtual(pt->virtual);
-            break;
-        default:
-            dmxConfigLog("Type %d not supported in entry\n", pt->type);
-            break;
-        }
-    }
-    dmxConfigFree(entry);
-}
-
-DMXConfigEntryPtr
-dmxConfigAddEntry(DMXConfigEntryPtr head,
-                  DMXConfigType type,
-                  DMXConfigCommentPtr comment, DMXConfigVirtualPtr virtual)
-{
-    DMXConfigEntryPtr child = dmxConfigCreateEntry(type, comment, virtual);
-    DMXConfigEntryPtr pt;
-
-    if (!head)
-        return child;
-
-    for (pt = head; pt->next; pt = pt->next);
-    pt->next = child;
-
-    return head;
-}
-
-DMXConfigEntryPtr
-dmxConfigEntryComment(DMXConfigCommentPtr comment)
-{
-    return dmxConfigCreateEntry(dmxConfigComment, comment, NULL);
-}
-
-DMXConfigEntryPtr
-dmxConfigEntryVirtual(DMXConfigVirtualPtr virtual)
-{
-    return dmxConfigCreateEntry(dmxConfigVirtual, NULL, virtual);
-}
diff --git a/hw/dmx/config/dmxparse.h b/hw/dmx/config/dmxparse.h
deleted file mode 100644
index a64b36f..0000000
--- a/hw/dmx/config/dmxparse.h
+++ /dev/null
@@ -1,291 +0,0 @@
-/*
- * Copyright 2002 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-/** \file
- * Interface to DMX configuration file parser.  \see dmxparse.c */
-
-#ifndef _DMXPARSE_H_
-#define _DMXPARSE_H_
-
-#include <stdio.h>              /* For FILE */
-#include <X11/Xfuncproto.h>     /* For _X_ATTRIBUTE_PRINTF */
-
-/** Stores tokens not stored in other structures (e.g., keywords and ;) */
-typedef struct _DMXConfigToken {
-    int token;
-    int line;
-    const char *comment;
-} DMXConfigToken, *DMXConfigTokenPtr;
-
-/** Stores parsed strings. */
-typedef struct _DMXConfigString {
-    int token;
-    int line;
-    const char *comment;
-    const char *string;
-    struct _DMXConfigString *next;
-} DMXConfigString, *DMXConfigStringPtr;
-
-/** Stores parsed numbers. */
-typedef struct _DMXConfigNumber {
-    int token;
-    int line;
-    const char *comment;
-    int number;
-} DMXConfigNumber, *DMXConfigNumberPtr;
-
-/** Stores parsed pairs (e.g., x y) */
-typedef struct _DMXConfigPair {
-    int token;
-    int line;
-    const char *comment;
-    int x;
-    int y;
-    int xsign;
-    int ysign;
-} DMXConfigPair, *DMXConfigPairPtr;
-
-/** Stores parsed comments not stored with a token. */
-typedef struct _DMXConfigComment {
-    int token;
-    int line;
-    const char *comment;
-} DMXConfigComment, *DMXConfigCommentPtr;
-
-typedef enum {
-    dmxConfigComment,
-    dmxConfigVirtual,
-    dmxConfigDisplay,
-    dmxConfigWall,
-    dmxConfigOption,
-    dmxConfigParam
-} DMXConfigType;
-
-/** Stores a geometry specification. */
-typedef struct _DMXConfigPartDim {
-    DMXConfigPairPtr dim;
-    DMXConfigPairPtr offset;
-} DMXConfigPartDim, *DMXConfigPartDimPtr;
-
-/** Stores a pair of geometry specifications. */
-typedef struct _DMXConfigFullDim {
-    DMXConfigPartDimPtr scrn;
-    DMXConfigPartDimPtr root;
-} DMXConfigFullDim, *DMXConfigFullDimPtr;
-
-/** Stores parsed display information. */
-typedef struct _DMXConfigDisplay {
-    /* Summary information */
-    const char *name;
-    /* Screen Window Geometry */
-    int scrnWidth, scrnHeight;
-    int scrnX, scrnY;
-    int scrnXSign, scrnYSign;
-    /* Root Window Geometry */
-    int rootWidth, rootHeight;
-    int rootX, rootY;
-    int rootXSign, rootYSign;
-    /* Origin in global space */
-    int rootXOrigin, rootYOrigin;
-
-    /* Raw configuration information */
-    DMXConfigTokenPtr start;
-    DMXConfigStringPtr dname;
-    DMXConfigFullDimPtr dim;
-    DMXConfigPairPtr origin;
-    DMXConfigTokenPtr end;
-} DMXConfigDisplay, *DMXConfigDisplayPtr;
-
-/** Stores parsed wall information. */
-typedef struct _DMXConfigWall {
-    /* Summary information */
-    int width, height;          /* dimensions of displays */
-    int xwall, ywall;           /* dimensions of wall, in tiles */
-
-    /* Raw configuration informaiton */
-    DMXConfigTokenPtr start;
-    DMXConfigPairPtr wallDim;
-    DMXConfigPairPtr displayDim;
-    DMXConfigStringPtr nameList;
-    DMXConfigTokenPtr end;
-} DMXConfigWall, *DMXConfigWallPtr;
-
-/** Stores parsed option information. */
-typedef struct _DMXConfigOption {
-    /* Summary information */
-    char *string;
-
-    /* Raw configuration informaiton */
-    DMXConfigTokenPtr start;
-    DMXConfigStringPtr option;
-    DMXConfigTokenPtr end;
-} DMXConfigOption, *DMXConfigOptionPtr;
-
-/** Stores parsed param information. */
-typedef struct _DMXConfigParam {
-    int argc;
-    const char **argv;
-
-    DMXConfigTokenPtr start;
-    DMXConfigTokenPtr open;
-    DMXConfigStringPtr param;
-    DMXConfigTokenPtr close;
-    DMXConfigTokenPtr end;      /* Either open/close OR end */
-    struct _DMXConfigParam *next;
-} DMXConfigParam, *DMXConfigParamPtr;
-
-/** Stores options under an entry (subentry). */
-typedef struct _DMXConfigSub {
-    DMXConfigType type;
-    DMXConfigCommentPtr comment;
-    DMXConfigDisplayPtr display;
-    DMXConfigWallPtr wall;
-    DMXConfigOptionPtr option;
-    DMXConfigParamPtr param;
-    struct _DMXConfigSub *next;
-} DMXConfigSub, *DMXConfigSubPtr;
-
-/** Stores parsed virtual information. */
-typedef struct _DMXConfigVirtual {
-    /* Summary information */
-    const char *name;
-    int width, height;
-
-    /* Raw configuration information */
-    DMXConfigTokenPtr start;
-    DMXConfigStringPtr vname;
-    DMXConfigPairPtr dim;
-    DMXConfigTokenPtr open;
-    DMXConfigSubPtr subentry;
-    DMXConfigTokenPtr close;
-} DMXConfigVirtual, *DMXConfigVirtualPtr;
-
-/** Heads entry storage. */
-typedef struct _DMXConfigEntry {
-    DMXConfigType type;
-    DMXConfigCommentPtr comment;
-    DMXConfigVirtualPtr virtual;
-    struct _DMXConfigEntry *next;
-} DMXConfigEntry, *DMXConfigEntryPtr;
-
-extern DMXConfigEntryPtr dmxConfigEntry;
-
-extern void yyerror(const char *message);
-
-extern void dmxConfigLog(const char *format, ...) _X_ATTRIBUTE_PRINTF(1,0);
-extern void *dmxConfigAlloc(unsigned long bytes);
-extern void *dmxConfigRealloc(void *orig,
-                              unsigned long orig_bytes, unsigned long bytes);
-extern const char *dmxConfigCopyString(const char *string, int length);
-extern void dmxConfigFree(void *area);
-extern DMXConfigTokenPtr dmxConfigCreateToken(int token, int line,
-                                              const char *comment);
-extern void dmxConfigFreeToken(DMXConfigTokenPtr p);
-extern DMXConfigStringPtr dmxConfigCreateString(int token, int line,
-                                                const char *comment,
-                                                const char *string);
-extern void dmxConfigFreeString(DMXConfigStringPtr p);
-extern DMXConfigNumberPtr dmxConfigCreateNumber(int token, int line,
-                                                const char *comment,
-                                                int number);
-extern void dmxConfigFreeNumber(DMXConfigNumberPtr p);
-extern DMXConfigPairPtr dmxConfigCreatePair(int token, int line,
-                                            const char *comment,
-                                            int x, int y, int xsign, int ysign);
-extern void dmxConfigFreePair(DMXConfigPairPtr p);
-extern DMXConfigCommentPtr dmxConfigCreateComment(int token, int line,
-                                                  const char *comment);
-extern void dmxConfigFreeComment(DMXConfigCommentPtr p);
-extern DMXConfigPartDimPtr dmxConfigCreatePartDim(DMXConfigPairPtr pDim,
-                                                  DMXConfigPairPtr pOffset);
-extern void dmxConfigFreePartDim(DMXConfigPartDimPtr p);
-extern DMXConfigFullDimPtr dmxConfigCreateFullDim(DMXConfigPartDimPtr pScrn,
-                                                  DMXConfigPartDimPtr pRoot);
-extern void dmxConfigFreeFullDim(DMXConfigFullDimPtr p);
-extern DMXConfigDisplayPtr dmxConfigCreateDisplay(DMXConfigTokenPtr pStart,
-                                                  DMXConfigStringPtr pName,
-                                                  DMXConfigFullDimPtr pDim,
-                                                  DMXConfigPairPtr pOrigin,
-                                                  DMXConfigTokenPtr pEnd);
-extern void dmxConfigFreeDisplay(DMXConfigDisplayPtr p);
-extern DMXConfigWallPtr dmxConfigCreateWall(DMXConfigTokenPtr pStart,
-                                            DMXConfigPairPtr pWallDim,
-                                            DMXConfigPairPtr pDisplayDim,
-                                            DMXConfigStringPtr pNameList,
-                                            DMXConfigTokenPtr pEnd);
-extern void dmxConfigFreeWall(DMXConfigWallPtr p);
-extern DMXConfigOptionPtr dmxConfigCreateOption(DMXConfigTokenPtr pStart,
-                                                DMXConfigStringPtr pOption,
-                                                DMXConfigTokenPtr pEnd);
-extern void dmxConfigFreeOption(DMXConfigOptionPtr p);
-extern DMXConfigParamPtr dmxConfigCreateParam(DMXConfigTokenPtr pStart,
-                                              DMXConfigTokenPtr pOpen,
-                                              DMXConfigStringPtr pParam,
-                                              DMXConfigTokenPtr pClose,
-                                              DMXConfigTokenPtr pEnd);
-extern void dmxConfigFreeParam(DMXConfigParamPtr p);
-extern const char **dmxConfigLookupParam(DMXConfigParamPtr p,
-                                         const char *key, int *argc);
-extern DMXConfigSubPtr dmxConfigCreateSub(DMXConfigType type,
-                                          DMXConfigCommentPtr comment,
-                                          DMXConfigDisplayPtr display,
-                                          DMXConfigWallPtr wall,
-                                          DMXConfigOptionPtr option,
-                                          DMXConfigParamPtr param);
-extern void dmxConfigFreeSub(DMXConfigSubPtr sub);
-extern DMXConfigSubPtr dmxConfigSubComment(DMXConfigCommentPtr comment);
-extern DMXConfigSubPtr dmxConfigSubDisplay(DMXConfigDisplayPtr display);
-extern DMXConfigSubPtr dmxConfigSubWall(DMXConfigWallPtr wall);
-extern DMXConfigSubPtr dmxConfigSubOption(DMXConfigOptionPtr option);
-extern DMXConfigSubPtr dmxConfigSubParam(DMXConfigParamPtr param);
-extern DMXConfigSubPtr dmxConfigAddSub(DMXConfigSubPtr head,
-                                       DMXConfigSubPtr sub);
-extern DMXConfigVirtualPtr dmxConfigCreateVirtual(DMXConfigTokenPtr pStart,
-                                                  DMXConfigStringPtr pName,
-                                                  DMXConfigPairPtr pDim,
-                                                  DMXConfigTokenPtr pOpen,
-                                                  DMXConfigSubPtr pSubentry,
-                                                  DMXConfigTokenPtr pClose);
-extern void dmxConfigFreeVirtual(DMXConfigVirtualPtr virtual);
-extern DMXConfigEntryPtr dmxConfigCreateEntry(DMXConfigType type,
-                                              DMXConfigCommentPtr comment,
-                                              DMXConfigVirtualPtr virtual);
-extern void dmxConfigFreeEntry(DMXConfigEntryPtr entry);
-extern DMXConfigEntryPtr dmxConfigAddEntry(DMXConfigEntryPtr head,
-                                           DMXConfigType type,
-                                           DMXConfigCommentPtr comment,
-                                           DMXConfigVirtualPtr virtual);
-extern DMXConfigEntryPtr dmxConfigEntryComment(DMXConfigCommentPtr comment);
-extern DMXConfigEntryPtr dmxConfigEntryVirtual(DMXConfigVirtualPtr virtual);
-
-#endif
diff --git a/hw/dmx/config/dmxprint.c b/hw/dmx/config/dmxprint.c
deleted file mode 100644
index c80e830..0000000
--- a/hw/dmx/config/dmxprint.c
+++ /dev/null
@@ -1,532 +0,0 @@
-/*
- * Copyright 2002 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-/** \file
- *
- * This file provides support routines and helper functions to be used
- * to pretty-print DMX configurations.
- *
- * Because the DMX configuration file parsing should be capable of being
- * used in a stand-alone fashion (i.e., independent from the DMX server
- * source tree), no dependencies on other DMX routines are made. */
-
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#include "dmxconfig.h"
-#include "dmxparse.h"
-#include "dmxprint.h"
-#include "parser.h"
-#include <stdio.h>
-#include <stdarg.h>
-#include <ctype.h>
-
-static FILE *str = NULL;
-static int indent = 0;
-static int pos = 0;
-
-/** Stack of indentation information used for pretty-printing
- * configuration information. */
-static struct stack {
-    int base;
-    int comment;
-    int step;
-    struct stack *next;
-} *stack, initialStack = {
-0, 0, 4, NULL};
-
-static void
-dmxConfigIndent(void)
-{
-    int i;
-
-    if (indent < 0)
-        indent = 0;
-    if (indent > 40)
-        indent = 40;
-    for (i = 0; i < indent; i++)
-        fprintf(str, " ");
-}
-
-static void
-dmxConfigNewline(void)
-{
-    if (pos)
-        fprintf(str, "\n");
-    pos = 0;
-}
-
-static void
-dmxConfigPushState(int base, int comment, int step)
-{
-    struct stack *new = dmxConfigAlloc(sizeof(*new));
-
-    new->base = base;
-    new->comment = comment;
-    new->step = step;
-    new->next = stack;
-    stack = new;
-    indent = base;
-    dmxConfigNewline();
-}
-
-static void
-dmxConfigPushComment(void)
-{
-    if (stack)
-        indent = stack->comment;
-}
-
-static void
-dmxConfigPushStep(void)
-{
-    if (stack)
-        indent = stack->step;
-}
-
-static void
-dmxConfigPopState(void)
-{
-    struct stack *old = stack;
-
-    if (!stack)
-        return;
-    indent = old->base;
-    stack = old->next;
-    if (!stack)
-        dmxConfigLog("Stack underflow\n");
-    dmxConfigFree(old);
-    dmxConfigNewline();
-}
-
-static void _X_ATTRIBUTE_PRINTF(4, 5)
-dmxConfigOutput(int addSpace, int doNewline, const char *comment,
-                const char *format, ...)
-{
-    va_list args;
-
-    if (!pos)
-        dmxConfigIndent();
-    else if (addSpace)
-        fprintf(str, " ");
-
-    if (format) {
-        va_start(args, format);
-        /* RATS: This hasn't been audited -- it
-         * could probably result in a buffer
-         * overflow. */
-        pos += vfprintf(str, format, args);     /* assumes no newlines! */
-        va_end(args);
-    }
-
-    if (comment) {
-        if (pos)
-            fprintf(str, " ");
-        pos += fprintf(str, "#%s", comment);
-        dmxConfigNewline();
-        dmxConfigPushComment();
-    }
-    else if (doNewline)
-        dmxConfigNewline();
-}
-
-static void
-dmxConfigPrintComment(DMXConfigCommentPtr p)
-{
-    dmxConfigOutput(1, 1, p->comment, NULL);
-}
-
-static void
-dmxConfigPrintTokenFlag(DMXConfigTokenPtr p, int flag)
-{
-    if (!p)
-        return;
-    switch (p->token) {
-    case T_VIRTUAL:
-        dmxConfigPushState(0, 4, 4);
-        dmxConfigOutput(0, 0, p->comment, "virtual");
-        break;
-    case T_DISPLAY:
-        dmxConfigPushState(4, 12, 16);
-        dmxConfigOutput(0, 0, p->comment, "display");
-        break;
-    case T_WALL:
-        dmxConfigPushState(4, 12, 16);
-        dmxConfigOutput(0, 0, p->comment, "wall");
-        break;
-    case T_OPTION:
-        dmxConfigPushState(4, 12, 16);
-        dmxConfigOutput(0, 0, p->comment, "option");
-        break;
-    case T_PARAM:
-        dmxConfigPushState(4, 8, 12);
-        dmxConfigOutput(0, 0, p->comment, "param");
-        break;
-    case ';':
-        dmxConfigOutput(0, 1, p->comment, ";");
-        if (flag)
-            dmxConfigPopState();
-        break;
-    case '{':
-        dmxConfigOutput(1, 1, p->comment, "{");
-        dmxConfigPushStep();
-        break;
-    case '}':
-        if (flag)
-            dmxConfigPopState();
-        dmxConfigOutput(0, 1, p->comment, "}");
-        break;
-    case '/':
-        dmxConfigOutput(1, 0, NULL, "/");
-        break;
-    default:
-        dmxConfigLog("unknown token %d on line %d\n", p->token, p->line);
-    }
-}
-
-static void
-dmxConfigPrintToken(DMXConfigTokenPtr p)
-{
-    dmxConfigPrintTokenFlag(p, 1);
-}
-
-static void
-dmxConfigPrintTokenNopop(DMXConfigTokenPtr p)
-{
-    dmxConfigPrintTokenFlag(p, 0);
-}
-
-static int
-dmxConfigPrintQuotedString(const char *s)
-{
-    const char *pt;
-
-    if (!s || !s[0])
-        return 1;               /* Quote empty string */
-    for (pt = s; *pt; ++pt)
-        if (isspace(*pt))
-            return 1;
-    return 0;
-}
-
-static void
-dmxConfigPrintString(DMXConfigStringPtr p, int quote)
-{
-    DMXConfigStringPtr pt;
-
-    if (!p)
-        return;
-    for (pt = p; pt; pt = pt->next) {
-        if (quote && dmxConfigPrintQuotedString(pt->string)) {
-            dmxConfigOutput(1, 0, pt->comment, "\"%s\"",
-                            pt->string ? pt->string : "");
-        }
-        else
-            dmxConfigOutput(1, 0, pt->comment, "%s",
-                            pt->string ? pt->string : "");
-    }
-}
-
-static int
-dmxConfigPrintPair(DMXConfigPairPtr p, int addSpace)
-{
-    if (!p)
-        return 0;
-    if (p->token == T_OFFSET) {
-        if (!p->comment && !p->x && !p->y && p->xsign >= 0 && p->ysign >= 0)
-            return 0;
-        dmxConfigOutput(addSpace, 0, p->comment, "%c%d%c%d",
-                        p->xsign < 0 ? '-' : '+', p->x,
-                        p->ysign < 0 ? '-' : '+', p->y);
-    }
-    else {
-        if (!p->comment && !p->x && !p->y)
-            return 0;
-        dmxConfigOutput(addSpace, 0, p->comment, "%s%dx%d",
-                        (p->token == T_ORIGIN) ? "@" : "", p->x, p->y);
-    }
-    return 1;
-}
-
-static void
-dmxConfigPrintDisplay(DMXConfigDisplayPtr p)
-{
-    DMXConfigToken dummyStart = { T_DISPLAY, 0, NULL };
-    DMXConfigToken dummyEnd = { ';', 0, NULL };
-    DMXConfigToken dummySep = { '/', 0, NULL };
-    DMXConfigString dummyName = { T_STRING, 0, NULL, NULL, NULL };
-    DMXConfigPair dummySDim = { T_DIMENSION, 0, NULL, 0, 0, 0, 0 };
-    DMXConfigPair dummySOffset = { T_OFFSET, 0, NULL, 0, 0, 0, 0 };
-    DMXConfigPair dummyRDim = { T_DIMENSION, 0, NULL, 0, 0, 0, 0 };
-    DMXConfigPair dummyROffset = { T_OFFSET, 0, NULL, 0, 0, 0, 0 };
-    DMXConfigPair dummyOrigin = { T_ORIGIN, 0, NULL, 0, 0, 0, 0 };
-    int output;
-
-    if (p->dname)
-        p->dname->string = p->name;
-    else
-        dummyName.string = p->name;
-
-    if (p->dim && p->dim->scrn && p->dim->scrn->dim) {
-        p->dim->scrn->dim->x = p->scrnWidth;
-        p->dim->scrn->dim->y = p->scrnHeight;
-    }
-    else {
-        dummySDim.x = p->scrnWidth;
-        dummySDim.y = p->scrnHeight;
-    }
-
-    if (p->dim && p->dim->scrn && p->dim->scrn->offset) {
-        p->dim->scrn->offset->x = p->scrnX;
-        p->dim->scrn->offset->y = p->scrnY;
-    }
-    else {
-        dummySOffset.x = p->scrnX;
-        dummySOffset.y = p->scrnY;
-    }
-
-    if (p->dim && p->dim->root && p->dim->root->dim) {
-        p->dim->root->dim->x = p->rootWidth;
-        p->dim->root->dim->y = p->rootHeight;
-    }
-    else {
-        dummyRDim.x = p->rootWidth;
-        dummyRDim.y = p->rootHeight;
-    }
-
-    if (p->dim && p->dim->root && p->dim->root->offset) {
-        p->dim->root->offset->x = p->rootX;
-        p->dim->root->offset->y = p->rootY;
-    }
-    else {
-        dummyROffset.x = p->rootX;
-        dummyROffset.y = p->rootY;
-    }
-
-    if (p->origin) {
-        p->origin->x = p->rootXOrigin, p->origin->y = p->rootYOrigin;
-        p->origin->xsign = p->rootXSign, p->origin->ysign = p->rootYSign;
-    }
-    else {
-        dummyOrigin.x = p->rootXOrigin, dummyOrigin.y = p->rootYOrigin;
-        dummyOrigin.xsign = p->rootXSign, dummyOrigin.ysign = p->rootYSign;
-    }
-
-    dmxConfigPrintToken(p->start ? p->start : &dummyStart);
-    dmxConfigPrintString(p->dname ? p->dname : &dummyName, 1);
-
-    if (p->dim && p->dim->scrn && p->dim->scrn->dim)
-        output = dmxConfigPrintPair(p->dim->scrn->dim, 1);
-    else
-        output = dmxConfigPrintPair(&dummySDim, 1);
-    if (p->dim && p->dim->scrn && p->dim->scrn->offset)
-        dmxConfigPrintPair(p->dim->scrn->offset, !output);
-    else
-        dmxConfigPrintPair(&dummySOffset, !output);
-
-    if (p->scrnWidth != p->rootWidth
-        || p->scrnHeight != p->rootHeight || p->rootX || p->rootY) {
-        dmxConfigPrintToken(&dummySep);
-        if (p->dim && p->dim->root && p->dim->root->dim)
-            output = dmxConfigPrintPair(p->dim->root->dim, 1);
-        else
-            output = dmxConfigPrintPair(&dummyRDim, 1);
-        if (p->dim && p->dim->root && p->dim->root->offset)
-            dmxConfigPrintPair(p->dim->root->offset, !output);
-        else
-            dmxConfigPrintPair(&dummyROffset, !output);
-    }
-
-    dmxConfigPrintPair(p->origin ? p->origin : &dummyOrigin, 1);
-    dmxConfigPrintToken(p->end ? p->end : &dummyEnd);
-}
-
-static void
-dmxConfigPrintWall(DMXConfigWallPtr p)
-{
-    dmxConfigPrintToken(p->start);
-    dmxConfigPrintPair(p->wallDim, 1);
-    dmxConfigPrintPair(p->displayDim, 1);
-    dmxConfigPrintString(p->nameList, 1);
-    dmxConfigPrintToken(p->end);
-}
-
-static void
-dmxConfigPrintOption(DMXConfigOptionPtr p)
-{
-    DMXConfigToken dummyStart = { T_OPTION, 0, NULL };
-    DMXConfigString dummyOption = { T_STRING, 0, NULL, NULL, NULL };
-    DMXConfigToken dummyEnd = { ';', 0, NULL };
-
-    dummyOption.string = p->string;
-
-    dmxConfigPrintToken(p->start ? p->start : &dummyStart);
-    dmxConfigPrintString(&dummyOption, 0);
-    dmxConfigPrintToken(p->end ? p->end : &dummyEnd);
-}
-
-static void
-dmxConfigPrintParam(DMXConfigParamPtr p)
-{
-    if (!p)
-        return;
-    if (p->start) {
-        if (p->open && p->close) {
-            dmxConfigPrintToken(p->start);
-            dmxConfigPrintToken(p->open);
-            dmxConfigPrintParam(p->next);
-            dmxConfigPrintToken(p->close);
-        }
-        else if (p->end && p->param) {
-            dmxConfigPrintToken(p->start);
-            dmxConfigPrintString(p->param, 1);
-            dmxConfigPrintToken(p->end);
-        }
-        else
-            dmxConfigLog("dmxConfigPrintParam: cannot handle format (a)\n");
-    }
-    else if (p->end && p->param) {
-        dmxConfigPrintString(p->param, 1);
-        dmxConfigPrintTokenNopop(p->end);
-        dmxConfigPrintParam(p->next);
-    }
-    else
-        dmxConfigLog("dmxConfigPrintParam: cannot handle format (b)\n");
-}
-
-static void
-dmxConfigPrintSub(DMXConfigSubPtr p)
-{
-    DMXConfigSubPtr pt;
-
-    if (!p)
-        return;
-    for (pt = p; pt; pt = pt->next) {
-        switch (pt->type) {
-        case dmxConfigComment:
-            dmxConfigPrintComment(pt->comment);
-            break;
-        case dmxConfigDisplay:
-            dmxConfigPrintDisplay(pt->display);
-            break;
-        case dmxConfigWall:
-            dmxConfigPrintWall(pt->wall);
-            break;
-        case dmxConfigOption:
-            dmxConfigPrintOption(pt->option);
-            break;
-        case dmxConfigParam:
-            dmxConfigPrintParam(pt->param);
-            break;
-        default:
-            dmxConfigLog("dmxConfigPrintSub:"
-                         " cannot handle type %d in subentry\n", pt->type);
-        }
-    }
-}
-
-static void
-dmxConfigPrintVirtual(DMXConfigVirtualPtr p)
-{
-    DMXConfigToken dummyStart = { T_VIRTUAL, 0, NULL };
-    DMXConfigToken dummyOpen = { '{', 0, NULL };
-    DMXConfigToken dummyClose = { '}', 0, NULL };
-    DMXConfigString dummyName = { T_STRING, 0, NULL, NULL, NULL };
-    DMXConfigPair dummyDim = { T_DIMENSION, 0, NULL, 0, 0 };
-
-    if (p->vname)
-        p->vname->string = p->name;
-    else
-        dummyName.string = p->name;
-
-    if (p->dim)
-        p->dim->x = p->width, p->dim->y = p->height;
-    else
-        dummyDim.x = p->width, dummyDim.y = p->height;
-
-    dmxConfigPrintToken(p->start ? p->start : &dummyStart);
-    dmxConfigPrintString(p->vname ? p->vname : &dummyName, 1);
-    dmxConfigPrintPair(p->dim ? p->dim : &dummyDim, 1);
-    dmxConfigPrintToken(p->open ? p->open : &dummyOpen);
-    dmxConfigPrintSub(p->subentry);
-    dmxConfigPrintToken(p->close ? p->close : &dummyClose);
-}
-
-/** The configuration information in \a entry will be pretty-printed to
- * the \a stream.  If \a stream is NULL, then stdout will be used. */
-void
-dmxConfigPrint(FILE * stream, DMXConfigEntryPtr entry)
-{
-    DMXConfigEntryPtr pt;
-
-    if (!stream)
-        str = stdout;
-    else
-        str = stream;
-
-    stack = &initialStack;
-
-    for (pt = entry; pt; pt = pt->next) {
-        switch (pt->type) {
-        case dmxConfigComment:
-            dmxConfigPrintComment(pt->comment);
-            break;
-        case dmxConfigVirtual:
-            dmxConfigPrintVirtual(pt->virtual);
-            break;
-        default:
-            dmxConfigLog("dmxConfigPrint: cannot handle type %d in entry\n",
-                         pt->type);
-        }
-    }
-    if (pos)
-        dmxConfigNewline();
-}
-
-/** The configuration information in \a p will be pretty-printed to the
- * \a stream.  If \a stream is NULL, then stdout will be used. */
-void
-dmxConfigVirtualPrint(FILE * stream, DMXConfigVirtualPtr p)
-{
-    if (!stream)
-        str = stdout;
-    else
-        str = stream;
-
-    stack = &initialStack;
-
-    dmxConfigPrintVirtual(p);
-    if (pos)
-        dmxConfigNewline();
-}
diff --git a/hw/dmx/config/dmxprint.h b/hw/dmx/config/dmxprint.h
deleted file mode 100644
index d77bafc..0000000
--- a/hw/dmx/config/dmxprint.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright 2002 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-/** \file
- * Interface to DMX configuration file pretty-printer.  \see dmxprint.c */
-
-#ifndef _DMXPRINT_H_
-#define _DMXPRINT_H_
-
-void dmxConfigPrint(FILE * str, DMXConfigEntryPtr entry);
-void dmxConfigVirtualPrint(FILE * str, DMXConfigVirtualPtr p);
-
-#endif
diff --git a/hw/dmx/config/dmxtodmx.c b/hw/dmx/config/dmxtodmx.c
deleted file mode 100644
index 5a1a0b4..0000000
--- a/hw/dmx/config/dmxtodmx.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright 2002 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- * This is a simple filter for testing.
- */
-
-#include "dmxconfig.h"
-#include "dmxparse.h"
-#include "dmxprint.h"
-#include "dmxcompat.h"
-
-extern int yyparse(void);
-extern int yydebug;
-extern FILE *yyin;
-
-int
-main(int argc, char **argv)
-{
-    yydebug = 0;
-    yyparse();
-    dmxConfigPrint(stdout, dmxConfigEntry);
-    return 0;
-}
diff --git a/hw/dmx/config/man/Makefile.am b/hw/dmx/config/man/Makefile.am
deleted file mode 100644
index 9bb62a4..0000000
--- a/hw/dmx/config/man/Makefile.am
+++ /dev/null
@@ -1,2 +0,0 @@
-include $(top_srcdir)/manpages.am
-appman_PRE = xdmxconfig.man vdltodmx.man dmxtodmx.man
diff --git a/hw/dmx/config/man/Makefile.in b/hw/dmx/config/man/Makefile.in
deleted file mode 100644
index 7b9cb9a..0000000
--- a/hw/dmx/config/man/Makefile.in
+++ /dev/null
@@ -1,848 +0,0 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
-
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-VPATH = @srcdir@
-am__is_gnu_make = { \
-  if test -z '$(MAKELEVEL)'; then \
-    false; \
-  elif test -n '$(MAKE_HOST)'; then \
-    true; \
-  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
-    true; \
-  else \
-    false; \
-  fi; \
-}
-am__make_running_with_option = \
-  case $${target_option-} in \
-      ?) ;; \
-      *) echo "am__make_running_with_option: internal error: invalid" \
-              "target option '$${target_option-}' specified" >&2; \
-         exit 1;; \
-  esac; \
-  has_opt=no; \
-  sane_makeflags=$$MAKEFLAGS; \
-  if $(am__is_gnu_make); then \
-    sane_makeflags=$$MFLAGS; \
-  else \
-    case $$MAKEFLAGS in \
-      *\\[\ \	]*) \
-        bs=\\; \
-        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
-          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
-    esac; \
-  fi; \
-  skip_next=no; \
-  strip_trailopt () \
-  { \
-    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
-  }; \
-  for flg in $$sane_makeflags; do \
-    test $$skip_next = yes && { skip_next=no; continue; }; \
-    case $$flg in \
-      *=*|--*) continue;; \
-        -*I) strip_trailopt 'I'; skip_next=yes;; \
-      -*I?*) strip_trailopt 'I';; \
-        -*O) strip_trailopt 'O'; skip_next=yes;; \
-      -*O?*) strip_trailopt 'O';; \
-        -*l) strip_trailopt 'l'; skip_next=yes;; \
-      -*l?*) strip_trailopt 'l';; \
-      -[dEDm]) skip_next=yes;; \
-      -[JT]) skip_next=yes;; \
-    esac; \
-    case $$flg in \
-      *$$target_option*) has_opt=yes; break;; \
-    esac; \
-  done; \
-  test $$has_opt = yes
-am__make_dryrun = (target_option=n; $(am__make_running_with_option))
-am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-subdir = hw/dmx/config/man
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \
-	$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \
-	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
-	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
-	$(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-	$(ACLOCAL_M4)
-DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
-	$(top_builddir)/include/xorg-server.h \
-	$(top_builddir)/include/dix-config.h \
-	$(top_builddir)/include/xorg-config.h \
-	$(top_builddir)/include/xkb-config.h \
-	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
-	$(top_builddir)/include/version-config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-AM_V_P = $(am__v_P_@AM_V@)
-am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
-am__v_P_0 = false
-am__v_P_1 = :
-AM_V_GEN = $(am__v_GEN_@AM_V@)
-am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo "  GEN     " $@;
-am__v_GEN_1 = 
-AM_V_at = $(am__v_at_@AM_V@)
-am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
-am__v_at_0 = @
-am__v_at_1 = 
-SOURCES =
-DIST_SOURCES =
-am__can_run_installinfo = \
-  case $$AM_UPDATE_INFO_DIR in \
-    n|no|NO) false;; \
-    *) (install-info --version) >/dev/null 2>&1;; \
-  esac
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
-    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
-    *) f=$$p;; \
-  esac;
-am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
-am__install_max = 40
-am__nobase_strip_setup = \
-  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
-am__nobase_strip = \
-  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
-am__nobase_list = $(am__nobase_strip_setup); \
-  for p in $$list; do echo "$$p $$p"; done | \
-  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
-  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
-    if (++n[$$2] == $(am__install_max)) \
-      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
-    END { for (dir in files) print dir, files[dir] }'
-am__base_list = \
-  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
-  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-am__uninstall_files_from_dir = { \
-  test -z "$$files" \
-    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
-    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
-         $(am__cd) "$$dir" && rm -f $$files; }; \
-  }
-am__installdirs = "$(DESTDIR)$(appmandir)" "$(DESTDIR)$(drivermandir)" \
-	"$(DESTDIR)$(filemandir)"
-DATA = $(appman_DATA) $(driverman_DATA) $(fileman_DATA)
-am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
-am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/manpages.am
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
-ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
-AMTAR = @AMTAR@
-AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
-APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@
-APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@
-APP_MAN_DIR = @APP_MAN_DIR@
-APP_MAN_SUFFIX = @APP_MAN_SUFFIX@
-AR = @AR@
-AS = @AS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-BASE_CFLAGS = @BASE_CFLAGS@
-BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
-BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
-BUNDLE_VERSION = @BUNDLE_VERSION@
-BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
-CC = @CC@
-CCAS = @CCAS@
-CCASDEPMODE = @CCASDEPMODE@
-CCASFLAGS = @CCASFLAGS@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CHANGELOG_CMD = @CHANGELOG_CMD@
-COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CWARNFLAGS = @CWARNFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DBUS_CFLAGS = @DBUS_CFLAGS@
-DBUS_LIBS = @DBUS_LIBS@
-DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@
-DEFAULT_LOGDIR = @DEFAULT_LOGDIR@
-DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@
-DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@
-DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@
-DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DGA_CFLAGS = @DGA_CFLAGS@
-DGA_LIBS = @DGA_LIBS@
-DIX_CFLAGS = @DIX_CFLAGS@
-DIX_LIB = @DIX_LIB@
-DLLTOOL = @DLLTOOL@
-DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
-DOT = @DOT@
-DOXYGEN = @DOXYGEN@
-DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
-DRI2PROTO_LIBS = @DRI2PROTO_LIBS@
-DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@
-DRI3PROTO_LIBS = @DRI3PROTO_LIBS@
-DRIVER_MAN_DIR = @DRIVER_MAN_DIR@
-DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
-DRI_DRIVER_PATH = @DRI_DRIVER_PATH@
-DSYMUTIL = @DSYMUTIL@
-DTRACE = @DTRACE@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-FILE_MAN_DIR = @FILE_MAN_DIR@
-FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
-FONT100DPIDIR = @FONT100DPIDIR@
-FONT75DPIDIR = @FONT75DPIDIR@
-FONTMISCDIR = @FONTMISCDIR@
-FONTOTFDIR = @FONTOTFDIR@
-FONTROOTDIR = @FONTROOTDIR@
-FONTTTFDIR = @FONTTTFDIR@
-FONTTYPE1DIR = @FONTTYPE1DIR@
-FOP = @FOP@
-GBM_CFLAGS = @GBM_CFLAGS@
-GBM_LIBS = @GBM_LIBS@
-GLAMOR_CFLAGS = @GLAMOR_CFLAGS@
-GLAMOR_LIBS = @GLAMOR_LIBS@
-GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@
-GLX_DEFINES = @GLX_DEFINES@
-GLX_SYS_LIBS = @GLX_SYS_LIBS@
-GL_CFLAGS = @GL_CFLAGS@
-GL_LIBS = @GL_LIBS@
-GREP = @GREP@
-HAL_CFLAGS = @HAL_CFLAGS@
-HAL_LIBS = @HAL_LIBS@
-HAVE_DOT = @HAVE_DOT@
-INSTALL = @INSTALL@
-INSTALL_CMD = @INSTALL_CMD@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-KDRIVE_CFLAGS = @KDRIVE_CFLAGS@
-KDRIVE_INCS = @KDRIVE_INCS@
-KDRIVE_LIBS = @KDRIVE_LIBS@
-KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@
-KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@
-KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@
-KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@
-KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@
-KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@
-KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@
-LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@
-LEX = @LEX@
-LEXLIB = @LEXLIB@
-LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
-LIBDRM_CFLAGS = @LIBDRM_CFLAGS@
-LIBDRM_LIBS = @LIBDRM_LIBS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@
-LIBSHA1_LIBS = @LIBSHA1_LIBS@
-LIBTOOL = @LIBTOOL@
-LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
-LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
-LIB_MAN_DIR = @LIB_MAN_DIR@
-LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
-MAIN_LIB = @MAIN_LIB@
-MAKEINFO = @MAKEINFO@
-MANIFEST_TOOL = @MANIFEST_TOOL@
-
-# xorg-macros.m4 has these bracketed by double underscores, but meson
-# wants ats.
-
-# Add server specific man pages string substitution from XORG_MANPAGE_SECTIONS
-# 's|/,|/, |g' will add a space to help font path formatting
-MAN_SUBSTS = @MAN_SUBSTS@ -e 's|@vendorversion@|"$(PACKAGE_STRING)" \
-	"$(XORG_MAN_PAGE)"|' -e 's|@xorgversion@|"$(PACKAGE_STRING)" \
-	"$(XORG_MAN_PAGE)"|' -e 's|@xservername@|Xorg|g' -e \
-	's|@xconfigfile@|xorg.conf|g' -e 's|@projectroot@|$(prefix)|g' \
-	-e 's|@apploaddir@|$(appdefaultdir)|g' -e \
-	's|@appmansuffix@|$(APP_MAN_SUFFIX)|g' -e \
-	's|@drivermansuffix@|$(DRIVER_MAN_SUFFIX)|g' -e \
-	's|@adminmansuffix@|$(ADMIN_MAN_SUFFIX)|g' -e \
-	's|@libmansuffix@|$(LIB_MAN_SUFFIX)|g' -e \
-	's|@miscmansuffix@|$(MISC_MAN_SUFFIX)|g' -e \
-	's|@filemansuffix@|$(FILE_MAN_SUFFIX)|g' -e \
-	's|[@]logdir[@]|$(logdir)|g' -e 's|[@]datadir[@]|$(datadir)|g' \
-	-e 's|[@]mandir[@]|$(mandir)|g' -e \
-	's|[@]sysconfdir[@]|$(sysconfdir)|g' -e \
-	's|[@]xconfigdir[@]|$(XCONFIGDIR)|g' -e \
-	's|[@]xkbdir[@]|$(XKB_BASE_DIRECTORY)|g' -e \
-	's|[@]XKB_DFLT_RULES[@]|$(XKB_DFLT_RULES)|g' -e \
-	's|[@]XKB_DFLT_MODEL[@]|$(XKB_DFLT_MODEL)|g' -e \
-	's|[@]XKB_DFLT_LAYOUT[@]|$(XKB_DFLT_LAYOUT)|g' -e \
-	's|[@]XKB_DFLT_VARIANT[@]|$(XKB_DFLT_VARIANT)|g' -e \
-	's|[@]XKB_DFLT_OPTIONS[@]|$(XKB_DFLT_OPTIONS)|g' -e \
-	's|[@]bundle_id_prefix[@]|$(BUNDLE_ID_PREFIX)|g' -e \
-	's|[@]modulepath[@]|$(DEFAULT_MODULE_PATH)|g' -e \
-	's|[@]suid_wrapper_dir[@]|$(SUID_WRAPPER_DIR)|g' -e \
-	's|[@]default_font_path[@]|$(COMPILEDDEFAULTFONTPATH)|g' -e \
-	'\|$(COMPILEDDEFAULTFONTPATH)| s|/,|/, |g'
-MISC_MAN_DIR = @MISC_MAN_DIR@
-MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
-MKDIR_P = @MKDIR_P@
-NM = @NM@
-NMEDIT = @NMEDIT@
-OBJC = @OBJC@
-OBJCCLD = @OBJCCLD@
-OBJCDEPMODE = @OBJCDEPMODE@
-OBJCFLAGS = @OBJCFLAGS@
-OBJCLINK = @OBJCLINK@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
-OPENSSL_LIBS = @OPENSSL_LIBS@
-OS_LIB = @OS_LIB@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@
-PCIACCESS_LIBS = @PCIACCESS_LIBS@
-PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@
-PIXMAN_CFLAGS = @PIXMAN_CFLAGS@
-PIXMAN_LIBS = @PIXMAN_LIBS@
-PKG_CONFIG = @PKG_CONFIG@
-PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
-PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
-PROJECTROOT = @PROJECTROOT@
-PTHREAD_CC = @PTHREAD_CC@
-PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
-PTHREAD_LIBS = @PTHREAD_LIBS@
-PYTHON3 = @PYTHON3@
-RANLIB = @RANLIB@
-RAWCPP = @RAWCPP@
-RAWCPPFLAGS = @RAWCPPFLAGS@
-RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
-SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
-SED = @SED@
-SELINUX_CFLAGS = @SELINUX_CFLAGS@
-SELINUX_LIBS = @SELINUX_LIBS@
-SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@
-SET_MAKE = @SET_MAKE@
-SHA1_CFLAGS = @SHA1_CFLAGS@
-SHA1_LIBS = @SHA1_LIBS@
-SHELL = @SHELL@
-SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@
-STRICT_CFLAGS = @STRICT_CFLAGS@
-STRIP = @STRIP@
-STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@
-SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@
-SYSCONFDIR = @SYSCONFDIR@
-SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@
-SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@
-TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@
-UDEV_CFLAGS = @UDEV_CFLAGS@
-UDEV_LIBS = @UDEV_LIBS@
-UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
-VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
-VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
-WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
-WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
-WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
-XCONFIGDIR = @XCONFIGDIR@
-XCONFIGFILE = @XCONFIGFILE@
-XDMCP_CFLAGS = @XDMCP_CFLAGS@
-XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
-XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
-XEPHYR_INCS = @XEPHYR_INCS@
-XEPHYR_LIBS = @XEPHYR_LIBS@
-XF86CONFIGDIR = @XF86CONFIGDIR@
-XF86CONFIGFILE = @XF86CONFIGFILE@
-XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@
-XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@
-XKB_COMPILED_DIR = @XKB_COMPILED_DIR@
-XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@
-XKB_DFLT_MODEL = @XKB_DFLT_MODEL@
-XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@
-XKB_DFLT_RULES = @XKB_DFLT_RULES@
-XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@
-XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@
-XLIB_CFLAGS = @XLIB_CFLAGS@
-XLIB_LIBS = @XLIB_LIBS@
-XMLTO = @XMLTO@
-XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@
-XNESTMODULES_LIBS = @XNESTMODULES_LIBS@
-XNEST_LIBS = @XNEST_LIBS@
-XNEST_SYS_LIBS = @XNEST_SYS_LIBS@
-XORG_CFLAGS = @XORG_CFLAGS@
-XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@
-XORG_INCS = @XORG_INCS@
-XORG_LIBS = @XORG_LIBS@
-XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@
-XORG_MAN_PAGE = @XORG_MAN_PAGE@
-XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@
-XORG_MODULES_LIBS = @XORG_MODULES_LIBS@
-XORG_OS_SUBDIR = @XORG_OS_SUBDIR@
-XORG_SGML_PATH = @XORG_SGML_PATH@
-XORG_SYS_LIBS = @XORG_SYS_LIBS@
-XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@
-XPBPROXY_LIBS = @XPBPROXY_LIBS@
-XQUARTZ_LIBS = @XQUARTZ_LIBS@
-XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
-XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
-XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
-XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
-XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
-XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@
-XSERVER_LIBS = @XSERVER_LIBS@
-XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@
-XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
-XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
-XSLTPROC = @XSLTPROC@
-XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
-XVFB_LIBS = @XVFB_LIBS@
-XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
-XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
-XWINMODULES_LIBS = @XWINMODULES_LIBS@
-XWIN_LIBS = @XWIN_LIBS@
-XWIN_SERVER_NAME = @XWIN_SERVER_NAME@
-XWIN_SYS_LIBS = @XWIN_SYS_LIBS@
-YACC = @YACC@
-YFLAGS = @YFLAGS@
-abi_ansic = @abi_ansic@
-abi_extension = @abi_extension@
-abi_videodrv = @abi_videodrv@
-abi_xinput = @abi_xinput@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_AR = @ac_ct_AR@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-ax_pthread_config = @ax_pthread_config@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-driverdir = @driverdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-extdir = @extdir@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-logdir = @logdir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-moduledir = @moduledir@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-runstatedir = @runstatedir@
-sbindir = @sbindir@
-sdkdir = @sdkdir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-symbol_visibility = @symbol_visibility@
-sysconfdir = @sysconfdir@
-sysconfigdir = @sysconfigdir@
-target_alias = @target_alias@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-appmandir = $(APP_MAN_DIR)
-#appman_PRE = list of application man page files set by calling Makefile.am
-appman_DATA = $(appman_PRE:man=$(APP_MAN_SUFFIX))
-drivermandir = $(DRIVER_MAN_DIR)
-#driverman_PRE = list of driver man page files set by calling Makefile.am
-driverman_DATA = $(driverman_PRE:man=$(DRIVER_MAN_SUFFIX))
-filemandir = $(FILE_MAN_DIR)
-#fileman_PRE = list of file man page files set by calling Makefile.am
-fileman_DATA = $(fileman_PRE:man=$(FILE_MAN_SUFFIX))
-
-# The calling Makefile should only contain man page targets
-# Otherwise the following three global variables may conflict
-EXTRA_DIST = $(appman_PRE) $(driverman_PRE) $(fileman_PRE)
-CLEANFILES = $(appman_DATA) $(driverman_DATA) $(fileman_DATA)
-SUFFIXES = .$(APP_MAN_SUFFIX) .$(DRIVER_MAN_SUFFIX) .$(FILE_MAN_SUFFIX) .man
-appman_PRE = xdmxconfig.man vdltodmx.man dmxtodmx.man
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .$(APP_MAN_SUFFIX) .$(DRIVER_MAN_SUFFIX) .$(FILE_MAN_SUFFIX) .man
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(top_srcdir)/manpages.am $(am__configure_deps)
-	@for dep in $?; do \
-	  case '$(am__configure_deps)' in \
-	    *$$dep*) \
-	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
-	        && { if test -f $@; then exit 0; else break; fi; }; \
-	      exit 1;; \
-	  esac; \
-	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/dmx/config/man/Makefile'; \
-	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --foreign hw/dmx/config/man/Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	@case '$?' in \
-	  *config.status*) \
-	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
-	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
-	esac;
-$(top_srcdir)/manpages.am $(am__empty):
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure:  $(am__configure_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-
-mostlyclean-libtool:
-	-rm -f *.lo
-
-clean-libtool:
-	-rm -rf .libs _libs
-install-appmanDATA: $(appman_DATA)
-	@$(NORMAL_INSTALL)
-	@list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \
-	if test -n "$$list"; then \
-	  echo " $(MKDIR_P) '$(DESTDIR)$(appmandir)'"; \
-	  $(MKDIR_P) "$(DESTDIR)$(appmandir)" || exit 1; \
-	fi; \
-	for p in $$list; do \
-	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-	  echo "$$d$$p"; \
-	done | $(am__base_list) | \
-	while read files; do \
-	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(appmandir)'"; \
-	  $(INSTALL_DATA) $$files "$(DESTDIR)$(appmandir)" || exit $$?; \
-	done
-
-uninstall-appmanDATA:
-	@$(NORMAL_UNINSTALL)
-	@list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \
-	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-	dir='$(DESTDIR)$(appmandir)'; $(am__uninstall_files_from_dir)
-install-drivermanDATA: $(driverman_DATA)
-	@$(NORMAL_INSTALL)
-	@list='$(driverman_DATA)'; test -n "$(drivermandir)" || list=; \
-	if test -n "$$list"; then \
-	  echo " $(MKDIR_P) '$(DESTDIR)$(drivermandir)'"; \
-	  $(MKDIR_P) "$(DESTDIR)$(drivermandir)" || exit 1; \
-	fi; \
-	for p in $$list; do \
-	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-	  echo "$$d$$p"; \
-	done | $(am__base_list) | \
-	while read files; do \
-	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(drivermandir)'"; \
-	  $(INSTALL_DATA) $$files "$(DESTDIR)$(drivermandir)" || exit $$?; \
-	done
-
-uninstall-drivermanDATA:
-	@$(NORMAL_UNINSTALL)
-	@list='$(driverman_DATA)'; test -n "$(drivermandir)" || list=; \
-	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-	dir='$(DESTDIR)$(drivermandir)'; $(am__uninstall_files_from_dir)
-install-filemanDATA: $(fileman_DATA)
-	@$(NORMAL_INSTALL)
-	@list='$(fileman_DATA)'; test -n "$(filemandir)" || list=; \
-	if test -n "$$list"; then \
-	  echo " $(MKDIR_P) '$(DESTDIR)$(filemandir)'"; \
-	  $(MKDIR_P) "$(DESTDIR)$(filemandir)" || exit 1; \
-	fi; \
-	for p in $$list; do \
-	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-	  echo "$$d$$p"; \
-	done | $(am__base_list) | \
-	while read files; do \
-	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(filemandir)'"; \
-	  $(INSTALL_DATA) $$files "$(DESTDIR)$(filemandir)" || exit $$?; \
-	done
-
-uninstall-filemanDATA:
-	@$(NORMAL_UNINSTALL)
-	@list='$(fileman_DATA)'; test -n "$(filemandir)" || list=; \
-	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-	dir='$(DESTDIR)$(filemandir)'; $(am__uninstall_files_from_dir)
-tags TAGS:
-
-ctags CTAGS:
-
-cscope cscopelist:
-
-
-distdir: $(BUILT_SOURCES)
-	$(MAKE) $(AM_MAKEFLAGS) distdir-am
-
-distdir-am: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	list='$(DISTFILES)'; \
-	  dist_files=`for file in $$list; do echo $$file; done | \
-	  sed -e "s|^$$srcdirstrip/||;t" \
-	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
-	case $$dist_files in \
-	  */*) $(MKDIR_P) `echo "$$dist_files" | \
-			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
-			   sort -u` ;; \
-	esac; \
-	for file in $$dist_files; do \
-	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  if test -d $$d/$$file; then \
-	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
-	    if test -d "$(distdir)/$$file"; then \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
-	  else \
-	    test -f "$(distdir)/$$file" \
-	    || cp -p $$d/$$file "$(distdir)/$$file" \
-	    || exit 1; \
-	  fi; \
-	done
-check-am: all-am
-check: check-am
-all-am: Makefile $(DATA)
-installdirs:
-	for dir in "$(DESTDIR)$(appmandir)" "$(DESTDIR)$(drivermandir)" "$(DESTDIR)$(filemandir)"; do \
-	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
-	done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
-	if test -z '$(STRIP)'; then \
-	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	      install; \
-	else \
-	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
-	fi
-mostlyclean-generic:
-
-clean-generic:
-	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean-generic:
-	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
-	@echo "This command is intended for maintainers to use"
-	@echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-am
-	-rm -f Makefile
-distclean-am: clean-am distclean-generic
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am: install-appmanDATA install-drivermanDATA \
-	install-filemanDATA
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am:
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
-	-rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-appmanDATA uninstall-drivermanDATA \
-	uninstall-filemanDATA
-
-.MAKE: install-am install-strip
-
-.PHONY: all all-am check check-am clean clean-generic clean-libtool \
-	cscopelist-am ctags-am distclean distclean-generic \
-	distclean-libtool distdir dvi dvi-am html html-am info info-am \
-	install install-am install-appmanDATA install-data \
-	install-data-am install-drivermanDATA install-dvi \
-	install-dvi-am install-exec install-exec-am \
-	install-filemanDATA install-html install-html-am install-info \
-	install-info-am install-man install-pdf install-pdf-am \
-	install-ps install-ps-am install-strip installcheck \
-	installcheck-am installdirs maintainer-clean \
-	maintainer-clean-generic mostlyclean mostlyclean-generic \
-	mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \
-	uninstall-am uninstall-appmanDATA uninstall-drivermanDATA \
-	uninstall-filemanDATA
-
-.PRECIOUS: Makefile
-
-
-.man.$(APP_MAN_SUFFIX):
-	$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
-.man.$(DRIVER_MAN_SUFFIX):
-	$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
-.man.$(FILE_MAN_SUFFIX):
-	$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/hw/dmx/config/man/dmxtodmx.man b/hw/dmx/config/man/dmxtodmx.man
deleted file mode 100644
index e939487..0000000
--- a/hw/dmx/config/man/dmxtodmx.man
+++ /dev/null
@@ -1,41 +0,0 @@
-.\" $XFree86$
-.\" Copyright 2002 Red Hat Inc., Durham, North Carolina.
-.\" All Rights Reserved.
-.\"
-.\" Permission is hereby granted, free of charge, to any person obtaining
-.\" a copy of this software and associated documentation files (the
-.\" "Software"), to deal in the Software without restriction, including
-.\" without limitation on the rights to use, copy, modify, merge,
-.\" publish, distribute, sublicense, and/or sell copies of the Software,
-.\" and to permit persons to whom the Software is furnished to do so,
-.\" subject to the following conditions:
-.\"
-.\" The above copyright notice and this permission notice (including the
-.\" next paragraph) shall be included in all copies or substantial
-.\" portions of the Software.
-.\"
-.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-.\" NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
-.\" BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-.\" ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-.\" CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-.\" SOFTWARE.
-.\"
-.\" Authors:
-.\"   Rickard E. (Rik) Faith <faith@redhat.com>
-.\"
-.TH dmxtodmx 1 @vendorversion@
-.SH NAME
-dmxtodmx - dmx configuration file parser and printer
-.SH SYNOPSIS
-.B dmxtodmx
-.SH DESCRIPTION
-.I dmxtodmx
-reads the standard input, parsing a configuration file for the
-.I Xdmx
-distributed multi-head X server.  After a successful parse, the file is
-pretty-printed to standard output.
-.SH "SEE ALSO"
-Xdmx(1), vdltodmx(1), xdmxconfig(1)
diff --git a/hw/dmx/config/man/vdltodmx.man b/hw/dmx/config/man/vdltodmx.man
deleted file mode 100644
index aa5b424..0000000
--- a/hw/dmx/config/man/vdltodmx.man
+++ /dev/null
@@ -1,95 +0,0 @@
-.\" $XFree86$
-.\" Copyright 2002 Red Hat Inc., Durham, North Carolina.
-.\" All Rights Reserved.
-.\"
-.\" Permission is hereby granted, free of charge, to any person obtaining
-.\" a copy of this software and associated documentation files (the
-.\" "Software"), to deal in the Software without restriction, including
-.\" without limitation on the rights to use, copy, modify, merge,
-.\" publish, distribute, sublicense, and/or sell copies of the Software,
-.\" and to permit persons to whom the Software is furnished to do so,
-.\" subject to the following conditions:
-.\"
-.\" The above copyright notice and this permission notice (including the
-.\" next paragraph) shall be included in all copies or substantial
-.\" portions of the Software.
-.\"
-.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-.\" NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
-.\" BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-.\" ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-.\" CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-.\" SOFTWARE.
-.\"
-.\" Authors:
-.\"   Rickard E. (Rik) Faith <faith@redhat.com>
-.\"
-.TH vdltodmx 1 @vendorversion@
-.SH NAME
-vdltodmx - dmx configuration file parser and printer
-.SH SYNOPSIS
-.B vdltodmx
-.I infile
-.I outfile
-.SH DESCRIPTION
-.I vdltodmx
-reads the input file, which should be in VDL configuration file format.
-After a successful parse, a file in Xdmx configuration file format is
-written to the output file.
-.P
-The VDL file format is used with
-.IR xmovie ,
-which is available from
-http://www.llnl.gov/icc/lc/img/xmovie/xmovie.html
-.SH EXAMPLE
-Given the following VDL-format file:
-.RS
-.nf
-0
-2
-#
-#
-2560 2048 Left two-thirds [restrict=*:2]
-2
-:2.1 1280 2048   0    0 0 0
-:2.2 1280 2048   1280 0 0 0
-4
-1280 1024 0      0
-1280 1024 0      1024
-1280 1024 1280   0
-1280 1024 1280   1024
-#
-2560 2048 Right two-thirds [restrict=*:2]
-2
-:2.2 1280 2048   0   0 0 0
-:2.3 1280 2048   1280 0 0 0
-4
-1280 1024 1280    0
-1280 1024 1280    1024
-1280 1024 2560 0
-1280 1024 2560 1024
-.fi
-.RE
-the following DMX-format file will be produced:
-.RS
-.nf
-#
-#
-virtual "Left two-thirds" 2560x2048 {
-    display :2.1 1280x2048;
-    display :2.2 1280x2048 @1280x0;
-}
-#
-virtual "Right two-thirds" 2560x2048 {
-    display :2.2 1280x2048;
-    display :2.3 1280x2048 @1280x0;
-}
-.fi
-.RE
-.SH BUGS
-If the VDL file is not in the expected format, the program will probably
-dump core.
-.SH "SEE ALSO"
-Xdmx(1), xdmxconfig(1), vdl(3), xmovie(1)
diff --git a/hw/dmx/config/man/xdmxconfig.man b/hw/dmx/config/man/xdmxconfig.man
deleted file mode 100644
index 45b6b9b..0000000
--- a/hw/dmx/config/man/xdmxconfig.man
+++ /dev/null
@@ -1,63 +0,0 @@
-.\" $XFree86$
-.\" Copyright 2002 Red Hat Inc., Durham, North Carolina.
-.\" All Rights Reserved.
-.\"
-.\" Permission is hereby granted, free of charge, to any person obtaining
-.\" a copy of this software and associated documentation files (the
-.\" "Software"), to deal in the Software without restriction, including
-.\" without limitation on the rights to use, copy, modify, merge,
-.\" publish, distribute, sublicense, and/or sell copies of the Software,
-.\" and to permit persons to whom the Software is furnished to do so,
-.\" subject to the following conditions:
-.\"
-.\" The above copyright notice and this permission notice (including the
-.\" next paragraph) shall be included in all copies or substantial
-.\" portions of the Software.
-.\"
-.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-.\" NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
-.\" BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-.\" ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-.\" CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-.\" SOFTWARE.
-.\"
-.\" Authors:
-.\"   Rickard E. (Rik) Faith <faith@redhat.com>
-.\"
-.TH xdmxconfig 1 @vendorversion@
-.SH NAME
-xdmxconfig - a graphical configuration tool for Xdmx configuration files
-.SH SYNOPSIS
-.B xdmxconfig
-[filename]
-.SH DESCRIPTION
-.I xdmxconfig
-reads, edits, and writes configuration files for the Xdmx server.  The
-grammar for the configuration file is specified in the Xdmx(1) manual
-page.
-.PP
-To start from scratch, create a "New Global" and specify the name and
-overall dimensions for the configuration.  Then use "New Display" to
-enter more displays.
-.PP
-If there is more than one configuration, the configuration name button
-will bring up a selection menu.
-.PP
-In the right-hand pannel, the left mouse button will move the
-highlighted display at "tool resolution"; the middle mouse button will
-move the highlighted display by a single pixel (at "wall resolution");
-and the right mouse button will bring up a menu allowing the highlighted
-display to be edited or deleted.  The arrow keys will also move the
-highlighted display by a single pixel.
-.SH BUGS
-Currently, entries with the
-.B wall
-keyword are not editable, but will be preserved in the new output file.
-The tool will quit when requested by the user, even if a configuration
-file has not been written out (i.e., without warning).  The menu
-interaction should be improved (menu entries that don't currently work
-should be greyed-out, for example).  The Help button does not work.
-.SH "SEE ALSO"
-Xdmx(1), vdltodmx(1)
diff --git a/hw/dmx/config/meson.build b/hw/dmx/config/meson.build
deleted file mode 100644
index 39b41c2..0000000
--- a/hw/dmx/config/meson.build
+++ /dev/null
@@ -1,82 +0,0 @@
-flex = find_program('flex')
-bison = find_program('bison')
-
-lgen = generator(
-    flex,
-    output : '@PLAINNAME@.yy.c',
-    arguments : ['-o', '@OUTPUT@', '@INPUT@']
-)
-lfiles = lgen.process('scanner.l')
-
-pgen = generator(
-    bison,
-    output : ['@BASENAME@.c', '@BASENAME@.h'],
-    arguments : ['@INPUT@', '--defines=@OUTPUT1@', '--output=@OUTPUT0@']
-)
-pfiles = pgen.process('parser.y')
-
-srcs_dmx_config = [
-    'dmxparse.c',
-    'dmxprint.c',
-    'dmxcompat.c',
-    'dmxconfig.c',
-    pfiles,
-    lfiles,
-]
-
-dmx_inc = [
-    inc,
-    include_directories('../')
-]
-
-dmx_c_args = [
-    '-DHAVE_DMX_CONFIG_H',
-    '-DDMX_LOG_STANDALONE',
-]
-
-dmx_config = static_library('dmx_config',
-    srcs_dmx_config,
-    include_directories: dmx_inc,
-    dependencies: common_dep,
-    link_with: libxlibc,
-    c_args: dmx_c_args,
-)
-
-executable('xdmxconfig',
-    [
-        'xdmxconfig.c',
-        '../dmxlog.c',
-        'Canvas.c',
-    ],
-    include_directories: [
-        inc,
-        include_directories('../')
-    ],
-    dependencies: [
-        common_dep,
-        dependency('xaw7'),
-        dependency('xmu'),
-        dependency('xt'),
-        dependency('xpm'),
-        dependency('x11'),
-    ],
-    link_with: dmx_config,
-    c_args: dmx_c_args,
-    install: true,
-)
-
-executable('vdltodmx',
-    'vdltodmx.c',
-    include_directories: dmx_inc,
-    link_with: dmx_config,
-    c_args: dmx_c_args,
-    install: true,
-)
-
-executable('dmxtodmx',
-    'dmxtodmx.c',
-    include_directories: dmx_inc,
-    link_with: dmx_config,
-    c_args: dmx_c_args,
-    install: true,
-)
diff --git a/hw/dmx/config/parser.c b/hw/dmx/config/parser.c
deleted file mode 100644
index 07e0144..0000000
--- a/hw/dmx/config/parser.c
+++ /dev/null
@@ -1,1724 +0,0 @@
-/* A Bison parser, made by GNU Bison 3.7.3.  */
-
-/* Bison implementation for Yacc-like parsers in C
-
-   Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation,
-   Inc.
-
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation, either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-/* As a special exception, you may create a larger work that contains
-   part or all of the Bison parser skeleton and distribute that work
-   under terms of your choice, so long as that work isn't itself a
-   parser generator using the skeleton or a modified version thereof
-   as a parser skeleton.  Alternatively, if you modify or redistribute
-   the parser skeleton itself, you may (at your option) remove this
-   special exception, which will cause the skeleton and the resulting
-   Bison output files to be licensed under the GNU General Public
-   License without this special exception.
-
-   This special exception was added by the Free Software Foundation in
-   version 2.2 of Bison.  */
-
-/* C LALR(1) parser skeleton written by Richard Stallman, by
-   simplifying the original so-called "semantic" parser.  */
-
-/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
-   especially those whose name start with YY_ or yy_.  They are
-   private implementation details that can be changed or removed.  */
-
-/* All symbols defined below should begin with yy or YY, to avoid
-   infringing on user name space.  This should be done even for local
-   variables, as they might otherwise be expanded by user macros.
-   There are some unavoidable exceptions within include files to
-   define necessary library symbols; they are noted "INFRINGES ON
-   USER NAME SPACE" below.  */
-
-/* Identify Bison output.  */
-#define YYBISON 1
-
-/* Bison version.  */
-#define YYBISON_VERSION "3.7.3"
-
-/* Skeleton name.  */
-#define YYSKELETON_NAME "yacc.c"
-
-/* Pure parsers.  */
-#define YYPURE 0
-
-/* Push parsers.  */
-#define YYPUSH 0
-
-/* Pull parsers.  */
-#define YYPULL 1
-
-
-
-
-/* First part of user prologue.  */
-#line 35 "parser.y"
-
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#include "dmxparse.h"
-#include <string.h>
-#include <stdlib.h>
-#define YYDEBUG 1
-#define YYERROR_VERBOSE
-#define YY_USE_PROTOS
-
-extern int yylex(void);
-DMXConfigEntryPtr dmxConfigEntry = NULL;
-#define APPEND(type, h, t)                 \
-{                                          \
-    type pt;                               \
-    for (pt = h; pt->next; pt = pt->next); \
-    pt->next = t;                          \
-}
-
-#line 93 "parser.c"
-
-# ifndef YY_CAST
-#  ifdef __cplusplus
-#   define YY_CAST(Type, Val) static_cast<Type> (Val)
-#   define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
-#  else
-#   define YY_CAST(Type, Val) ((Type) (Val))
-#   define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
-#  endif
-# endif
-# ifndef YY_NULLPTR
-#  if defined __cplusplus
-#   if 201103L <= __cplusplus
-#    define YY_NULLPTR nullptr
-#   else
-#    define YY_NULLPTR 0
-#   endif
-#  else
-#   define YY_NULLPTR ((void*)0)
-#  endif
-# endif
-
-/* Use api.header.include to #include this header
-   instead of duplicating it here.  */
-#ifndef YY_YY_PARSER_H_INCLUDED
-# define YY_YY_PARSER_H_INCLUDED
-/* Debug traces.  */
-#ifndef YYDEBUG
-# define YYDEBUG 0
-#endif
-#if YYDEBUG
-extern int yydebug;
-#endif
-
-/* Token kinds.  */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
-  enum yytokentype
-  {
-    YYEMPTY = -2,
-    YYEOF = 0,                     /* "end of file"  */
-    YYerror = 256,                 /* error  */
-    YYUNDEF = 257,                 /* "invalid token"  */
-    T_VIRTUAL = 258,               /* T_VIRTUAL  */
-    T_DISPLAY = 259,               /* T_DISPLAY  */
-    T_WALL = 260,                  /* T_WALL  */
-    T_OPTION = 261,                /* T_OPTION  */
-    T_PARAM = 262,                 /* T_PARAM  */
-    T_STRING = 263,                /* T_STRING  */
-    T_DIMENSION = 264,             /* T_DIMENSION  */
-    T_OFFSET = 265,                /* T_OFFSET  */
-    T_ORIGIN = 266,                /* T_ORIGIN  */
-    T_COMMENT = 267,               /* T_COMMENT  */
-    T_LINE_COMMENT = 268           /* T_LINE_COMMENT  */
-  };
-  typedef enum yytokentype yytoken_kind_t;
-#endif
-/* Token kinds.  */
-#define YYEOF 0
-#define YYerror 256
-#define YYUNDEF 257
-#define T_VIRTUAL 258
-#define T_DISPLAY 259
-#define T_WALL 260
-#define T_OPTION 261
-#define T_PARAM 262
-#define T_STRING 263
-#define T_DIMENSION 264
-#define T_OFFSET 265
-#define T_ORIGIN 266
-#define T_COMMENT 267
-#define T_LINE_COMMENT 268
-
-/* Value type.  */
-#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-union YYSTYPE
-{
-#line 57 "parser.y"
-
-    DMXConfigTokenPtr      token;
-    DMXConfigStringPtr     string;
-    DMXConfigNumberPtr     number;
-    DMXConfigPairPtr       pair;
-    DMXConfigFullDimPtr    fdim;
-    DMXConfigPartDimPtr    pdim;
-    DMXConfigDisplayPtr    display;
-    DMXConfigWallPtr       wall;
-    DMXConfigOptionPtr     option;
-    DMXConfigParamPtr      param;
-    DMXConfigCommentPtr    comment;
-    DMXConfigSubPtr        subentry;
-    DMXConfigVirtualPtr    virtual;
-    DMXConfigEntryPtr      entry;
-
-#line 188 "parser.c"
-
-};
-typedef union YYSTYPE YYSTYPE;
-# define YYSTYPE_IS_TRIVIAL 1
-# define YYSTYPE_IS_DECLARED 1
-#endif
-
-
-extern YYSTYPE yylval;
-
-int yyparse (void);
-
-#endif /* !YY_YY_PARSER_H_INCLUDED  */
-/* Symbol kind.  */
-enum yysymbol_kind_t
-{
-  YYSYMBOL_YYEMPTY = -2,
-  YYSYMBOL_YYEOF = 0,                      /* "end of file"  */
-  YYSYMBOL_YYerror = 1,                    /* error  */
-  YYSYMBOL_YYUNDEF = 2,                    /* "invalid token"  */
-  YYSYMBOL_3_ = 3,                         /* '{'  */
-  YYSYMBOL_4_ = 4,                         /* '}'  */
-  YYSYMBOL_5_ = 5,                         /* ';'  */
-  YYSYMBOL_6_ = 6,                         /* '/'  */
-  YYSYMBOL_T_VIRTUAL = 7,                  /* T_VIRTUAL  */
-  YYSYMBOL_T_DISPLAY = 8,                  /* T_DISPLAY  */
-  YYSYMBOL_T_WALL = 9,                     /* T_WALL  */
-  YYSYMBOL_T_OPTION = 10,                  /* T_OPTION  */
-  YYSYMBOL_T_PARAM = 11,                   /* T_PARAM  */
-  YYSYMBOL_T_STRING = 12,                  /* T_STRING  */
-  YYSYMBOL_T_DIMENSION = 13,               /* T_DIMENSION  */
-  YYSYMBOL_T_OFFSET = 14,                  /* T_OFFSET  */
-  YYSYMBOL_T_ORIGIN = 15,                  /* T_ORIGIN  */
-  YYSYMBOL_T_COMMENT = 16,                 /* T_COMMENT  */
-  YYSYMBOL_T_LINE_COMMENT = 17,            /* T_LINE_COMMENT  */
-  YYSYMBOL_YYACCEPT = 18,                  /* $accept  */
-  YYSYMBOL_Program = 19,                   /* Program  */
-  YYSYMBOL_EntryList = 20,                 /* EntryList  */
-  YYSYMBOL_Entry = 21,                     /* Entry  */
-  YYSYMBOL_Virtual = 22,                   /* Virtual  */
-  YYSYMBOL_SubList = 23,                   /* SubList  */
-  YYSYMBOL_Sub = 24,                       /* Sub  */
-  YYSYMBOL_OptionEntry = 25,               /* OptionEntry  */
-  YYSYMBOL_ParamEntry = 26,                /* ParamEntry  */
-  YYSYMBOL_ParamList = 27,                 /* ParamList  */
-  YYSYMBOL_Param = 28,                     /* Param  */
-  YYSYMBOL_PartialDim = 29,                /* PartialDim  */
-  YYSYMBOL_FullDim = 30,                   /* FullDim  */
-  YYSYMBOL_DisplayEntry = 31,              /* DisplayEntry  */
-  YYSYMBOL_WallEntry = 32,                 /* WallEntry  */
-  YYSYMBOL_Display = 33,                   /* Display  */
-  YYSYMBOL_Name = 34,                      /* Name  */
-  YYSYMBOL_Dimension = 35,                 /* Dimension  */
-  YYSYMBOL_Offset = 36,                    /* Offset  */
-  YYSYMBOL_Origin = 37,                    /* Origin  */
-  YYSYMBOL_Terminal = 38,                  /* Terminal  */
-  YYSYMBOL_Open = 39,                      /* Open  */
-  YYSYMBOL_Close = 40,                     /* Close  */
-  YYSYMBOL_Wall = 41,                      /* Wall  */
-  YYSYMBOL_NameList = 42                   /* NameList  */
-};
-typedef enum yysymbol_kind_t yysymbol_kind_t;
-
-
-
-
-#ifdef short
-# undef short
-#endif
-
-/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
-   <limits.h> and (if available) <stdint.h> are included
-   so that the code can choose integer types of a good width.  */
-
-#ifndef __PTRDIFF_MAX__
-# include <limits.h> /* INFRINGES ON USER NAME SPACE */
-# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
-#  include <stdint.h> /* INFRINGES ON USER NAME SPACE */
-#  define YY_STDINT_H
-# endif
-#endif
-
-/* Narrow types that promote to a signed type and that can represent a
-   signed or unsigned integer of at least N bits.  In tables they can
-   save space and decrease cache pressure.  Promoting to a signed type
-   helps avoid bugs in integer arithmetic.  */
-
-#ifdef __INT_LEAST8_MAX__
-typedef __INT_LEAST8_TYPE__ yytype_int8;
-#elif defined YY_STDINT_H
-typedef int_least8_t yytype_int8;
-#else
-typedef signed char yytype_int8;
-#endif
-
-#ifdef __INT_LEAST16_MAX__
-typedef __INT_LEAST16_TYPE__ yytype_int16;
-#elif defined YY_STDINT_H
-typedef int_least16_t yytype_int16;
-#else
-typedef short yytype_int16;
-#endif
-
-#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
-typedef __UINT_LEAST8_TYPE__ yytype_uint8;
-#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
-       && UINT_LEAST8_MAX <= INT_MAX)
-typedef uint_least8_t yytype_uint8;
-#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
-typedef unsigned char yytype_uint8;
-#else
-typedef short yytype_uint8;
-#endif
-
-#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
-typedef __UINT_LEAST16_TYPE__ yytype_uint16;
-#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
-       && UINT_LEAST16_MAX <= INT_MAX)
-typedef uint_least16_t yytype_uint16;
-#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
-typedef unsigned short yytype_uint16;
-#else
-typedef int yytype_uint16;
-#endif
-
-#ifndef YYPTRDIFF_T
-# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
-#  define YYPTRDIFF_T __PTRDIFF_TYPE__
-#  define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
-# elif defined PTRDIFF_MAX
-#  ifndef ptrdiff_t
-#   include <stddef.h> /* INFRINGES ON USER NAME SPACE */
-#  endif
-#  define YYPTRDIFF_T ptrdiff_t
-#  define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
-# else
-#  define YYPTRDIFF_T long
-#  define YYPTRDIFF_MAXIMUM LONG_MAX
-# endif
-#endif
-
-#ifndef YYSIZE_T
-# ifdef __SIZE_TYPE__
-#  define YYSIZE_T __SIZE_TYPE__
-# elif defined size_t
-#  define YYSIZE_T size_t
-# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
-#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
-#  define YYSIZE_T size_t
-# else
-#  define YYSIZE_T unsigned
-# endif
-#endif
-
-#define YYSIZE_MAXIMUM                                  \
-  YY_CAST (YYPTRDIFF_T,                                 \
-           (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1)  \
-            ? YYPTRDIFF_MAXIMUM                         \
-            : YY_CAST (YYSIZE_T, -1)))
-
-#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
-
-
-/* Stored state numbers (used for stacks). */
-typedef yytype_int8 yy_state_t;
-
-/* State numbers in computations.  */
-typedef int yy_state_fast_t;
-
-#ifndef YY_
-# if defined YYENABLE_NLS && YYENABLE_NLS
-#  if ENABLE_NLS
-#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
-#   define YY_(Msgid) dgettext ("bison-runtime", Msgid)
-#  endif
-# endif
-# ifndef YY_
-#  define YY_(Msgid) Msgid
-# endif
-#endif
-
-
-#ifndef YY_ATTRIBUTE_PURE
-# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
-#  define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
-# else
-#  define YY_ATTRIBUTE_PURE
-# endif
-#endif
-
-#ifndef YY_ATTRIBUTE_UNUSED
-# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
-#  define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
-# else
-#  define YY_ATTRIBUTE_UNUSED
-# endif
-#endif
-
-/* Suppress unused-variable warnings by "using" E.  */
-#if ! defined lint || defined __GNUC__
-# define YYUSE(E) ((void) (E))
-#else
-# define YYUSE(E) /* empty */
-#endif
-
-#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
-/* Suppress an incorrect diagnostic about yylval being uninitialized.  */
-# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN                            \
-    _Pragma ("GCC diagnostic push")                                     \
-    _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")              \
-    _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
-# define YY_IGNORE_MAYBE_UNINITIALIZED_END      \
-    _Pragma ("GCC diagnostic pop")
-#else
-# define YY_INITIAL_VALUE(Value) Value
-#endif
-#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
-# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
-# define YY_IGNORE_MAYBE_UNINITIALIZED_END
-#endif
-#ifndef YY_INITIAL_VALUE
-# define YY_INITIAL_VALUE(Value) /* Nothing. */
-#endif
-
-#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
-# define YY_IGNORE_USELESS_CAST_BEGIN                          \
-    _Pragma ("GCC diagnostic push")                            \
-    _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
-# define YY_IGNORE_USELESS_CAST_END            \
-    _Pragma ("GCC diagnostic pop")
-#endif
-#ifndef YY_IGNORE_USELESS_CAST_BEGIN
-# define YY_IGNORE_USELESS_CAST_BEGIN
-# define YY_IGNORE_USELESS_CAST_END
-#endif
-
-
-#define YY_ASSERT(E) ((void) (0 && (E)))
-
-#if !defined yyoverflow
-
-/* The parser invokes alloca or malloc; define the necessary symbols.  */
-
-# ifdef YYSTACK_USE_ALLOCA
-#  if YYSTACK_USE_ALLOCA
-#   ifdef __GNUC__
-#    define YYSTACK_ALLOC __builtin_alloca
-#   elif defined __BUILTIN_VA_ARG_INCR
-#    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
-#   elif defined _AIX
-#    define YYSTACK_ALLOC __alloca
-#   elif defined _MSC_VER
-#    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
-#    define alloca _alloca
-#   else
-#    define YYSTACK_ALLOC alloca
-#    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
-#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-      /* Use EXIT_SUCCESS as a witness for stdlib.h.  */
-#     ifndef EXIT_SUCCESS
-#      define EXIT_SUCCESS 0
-#     endif
-#    endif
-#   endif
-#  endif
-# endif
-
-# ifdef YYSTACK_ALLOC
-   /* Pacify GCC's 'empty if-body' warning.  */
-#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
-#  ifndef YYSTACK_ALLOC_MAXIMUM
-    /* The OS might guarantee only one guard page at the bottom of the stack,
-       and a page size can be as small as 4096 bytes.  So we cannot safely
-       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
-       to allow for a few compiler-allocated temporary stack slots.  */
-#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
-#  endif
-# else
-#  define YYSTACK_ALLOC YYMALLOC
-#  define YYSTACK_FREE YYFREE
-#  ifndef YYSTACK_ALLOC_MAXIMUM
-#   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
-#  endif
-#  if (defined __cplusplus && ! defined EXIT_SUCCESS \
-       && ! ((defined YYMALLOC || defined malloc) \
-             && (defined YYFREE || defined free)))
-#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-#   ifndef EXIT_SUCCESS
-#    define EXIT_SUCCESS 0
-#   endif
-#  endif
-#  ifndef YYMALLOC
-#   define YYMALLOC malloc
-#   if ! defined malloc && ! defined EXIT_SUCCESS
-void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
-#   endif
-#  endif
-#  ifndef YYFREE
-#   define YYFREE free
-#   if ! defined free && ! defined EXIT_SUCCESS
-void free (void *); /* INFRINGES ON USER NAME SPACE */
-#   endif
-#  endif
-# endif
-#endif /* !defined yyoverflow */
-
-#if (! defined yyoverflow \
-     && (! defined __cplusplus \
-         || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
-
-/* A type that is properly aligned for any stack member.  */
-union yyalloc
-{
-  yy_state_t yyss_alloc;
-  YYSTYPE yyvs_alloc;
-};
-
-/* The size of the maximum gap between one aligned stack and the next.  */
-# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
-
-/* The size of an array large to enough to hold all stacks, each with
-   N elements.  */
-# define YYSTACK_BYTES(N) \
-     ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
-      + YYSTACK_GAP_MAXIMUM)
-
-# define YYCOPY_NEEDED 1
-
-/* Relocate STACK from its old location to the new one.  The
-   local variables YYSIZE and YYSTACKSIZE give the old and new number of
-   elements in the stack, and YYPTR gives the new location of the
-   stack.  Advance YYPTR to a properly aligned location for the next
-   stack.  */
-# define YYSTACK_RELOCATE(Stack_alloc, Stack)                           \
-    do                                                                  \
-      {                                                                 \
-        YYPTRDIFF_T yynewbytes;                                         \
-        YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
-        Stack = &yyptr->Stack_alloc;                                    \
-        yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
-        yyptr += yynewbytes / YYSIZEOF (*yyptr);                        \
-      }                                                                 \
-    while (0)
-
-#endif
-
-#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
-/* Copy COUNT objects from SRC to DST.  The source and destination do
-   not overlap.  */
-# ifndef YYCOPY
-#  if defined __GNUC__ && 1 < __GNUC__
-#   define YYCOPY(Dst, Src, Count) \
-      __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
-#  else
-#   define YYCOPY(Dst, Src, Count)              \
-      do                                        \
-        {                                       \
-          YYPTRDIFF_T yyi;                      \
-          for (yyi = 0; yyi < (Count); yyi++)   \
-            (Dst)[yyi] = (Src)[yyi];            \
-        }                                       \
-      while (0)
-#  endif
-# endif
-#endif /* !YYCOPY_NEEDED */
-
-/* YYFINAL -- State number of the termination state.  */
-#define YYFINAL  13
-/* YYLAST -- Last index in YYTABLE.  */
-#define YYLAST   106
-
-/* YYNTOKENS -- Number of terminals.  */
-#define YYNTOKENS  18
-/* YYNNTS -- Number of nonterminals.  */
-#define YYNNTS  25
-/* YYNRULES -- Number of rules.  */
-#define YYNRULES  59
-/* YYNSTATES -- Number of states.  */
-#define YYNSTATES  95
-
-/* YYMAXUTOK -- Last valid token kind.  */
-#define YYMAXUTOK   268
-
-
-/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
-   as returned by yylex, with out-of-bounds checking.  */
-#define YYTRANSLATE(YYX)                                \
-  (0 <= (YYX) && (YYX) <= YYMAXUTOK                     \
-   ? YY_CAST (yysymbol_kind_t, yytranslate[YYX])        \
-   : YYSYMBOL_YYUNDEF)
-
-/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
-   as returned by yylex.  */
-static const yytype_int8 yytranslate[] =
-{
-       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     6,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     5,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     3,     2,     4,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     1,     2,     7,     8,
-       9,    10,    11,    12,    13,    14,    15,    16,    17
-};
-
-#if YYDEBUG
-  /* YYRLINE[YYN] -- Source line where rule number YYN was defined.  */
-static const yytype_uint8 yyrline[] =
-{
-       0,    96,    96,    99,   100,   103,   104,   107,   109,   111,
-     113,   117,   118,   121,   122,   123,   124,   125,   128,   132,
-     134,   140,   141,   144,   148,   150,   152,   156,   158,   160,
-     164,   166,   168,   171,   173,   175,   177,   181,   183,   185,
-     189,   190,   193,   194,   197,   198,   201,   202,   205,   206,
-     209,   210,   213,   214,   217,   218,   221,   222,   225,   226
-};
-#endif
-
-/** Accessing symbol of state STATE.  */
-#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
-
-#if YYDEBUG || 0
-/* The user-facing name of the symbol whose (internal) number is
-   YYSYMBOL.  No bounds checking.  */
-static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
-
-/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
-   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
-static const char *const yytname[] =
-{
-  "\"end of file\"", "error", "\"invalid token\"", "'{'", "'}'", "';'",
-  "'/'", "T_VIRTUAL", "T_DISPLAY", "T_WALL", "T_OPTION", "T_PARAM",
-  "T_STRING", "T_DIMENSION", "T_OFFSET", "T_ORIGIN", "T_COMMENT",
-  "T_LINE_COMMENT", "$accept", "Program", "EntryList", "Entry", "Virtual",
-  "SubList", "Sub", "OptionEntry", "ParamEntry", "ParamList", "Param",
-  "PartialDim", "FullDim", "DisplayEntry", "WallEntry", "Display", "Name",
-  "Dimension", "Offset", "Origin", "Terminal", "Open", "Close", "Wall",
-  "NameList", YY_NULLPTR
-};
-
-static const char *
-yysymbol_name (yysymbol_kind_t yysymbol)
-{
-  return yytname[yysymbol];
-}
-#endif
-
-#ifdef YYPRINT
-/* YYTOKNUM[NUM] -- (External) token number corresponding to the
-   (internal) symbol number NUM (which must be that of a token).  */
-static const yytype_int16 yytoknum[] =
-{
-       0,   256,   257,   123,   125,    59,    47,   258,   259,   260,
-     261,   262,   263,   264,   265,   266,   267,   268
-};
-#endif
-
-#define YYPACT_NINF (-32)
-
-#define yypact_value_is_default(Yyn) \
-  ((Yyn) == YYPACT_NINF)
-
-#define YYTABLE_NINF (-1)
-
-#define yytable_value_is_error(Yyn) \
-  0
-
-  /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
-     STATE-NUM.  */
-static const yytype_int8 yypact[] =
-{
-      -3,    41,   -32,    22,    -3,   -32,   -32,    12,    35,    46,
-       5,    62,    75,   -32,   -32,   -32,   -32,   -32,    62,    75,
-      75,    51,    54,    59,    18,   -32,    65,   -32,   -32,   -32,
-     -32,   -32,    88,    37,    75,    65,    65,   -32,   -32,   -32,
-      86,    59,    86,    61,   -32,   -32,    79,    -4,    80,    28,
-      31,    74,    67,   -32,   -32,    37,    86,    65,   -32,   -32,
-     -32,   -32,    56,   -32,    86,   -32,   -32,   -32,   -32,   -32,
-      -4,    81,    94,   -32,    31,    94,   -32,   -32,    59,    86,
-     -32,   -32,   -32,   -32,   -32,   -32,   -32,   -32,    94,   -32,
-     -32,    86,   -32,   -32,   -32
-};
-
-  /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
-     Performed when YYTABLE does not specify something else to do.  Zero
-     means the default is an error.  */
-static const yytype_int8 yydefact[] =
-{
-       0,     0,     6,     0,     2,     3,     5,    52,    42,    44,
-       0,     0,     0,     1,     4,    53,    43,    45,     0,     0,
-       0,    40,    56,     0,     0,    13,     0,    11,    16,    17,
-      14,    15,     0,     0,     0,     0,     0,    41,    57,    58,
-       0,     0,     0,    54,    12,     7,    50,     0,    46,    29,
-       0,     0,    25,    26,    36,     0,     0,     0,     9,     8,
-      59,    18,     0,    21,     0,    19,    55,    51,    28,    47,
-       0,    48,     0,    34,     0,     0,    35,    24,     0,     0,
-      39,    10,    22,    20,    23,    27,    49,    31,     0,    33,
-      32,     0,    38,    30,    37
-};
-
-  /* YYPGOTO[NTERM-NUM].  */
-static const yytype_int8 yypgoto[] =
-{
-     -32,   -32,   -32,    99,   -32,     6,   -19,   -32,   -32,   -32,
-      42,   -28,    55,   -32,   -32,   -32,    -1,     2,    53,   -31,
-     -27,    48,   -30,   -32,   -22
-};
-
-  /* YYDEFGOTO[NTERM-NUM].  */
-static const yytype_int8 yydefgoto[] =
-{
-      -1,     3,     4,     5,     6,    26,    27,    28,    29,    62,
-      63,    49,    50,    30,    31,    32,    39,    52,    53,    72,
-      54,    12,    45,    33,    64
-};
-
-  /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM.  If
-     positive, shift that token.  If negative, reduce the rule whose
-     number is the opposite.  If YYTABLE_NINF, syntax error.  */
-static const yytype_int8 yytable[] =
-{
-      10,    40,    42,    11,     1,    58,    59,    44,     7,     9,
-      48,    56,    18,    61,     2,    65,    44,    44,     9,    68,
-      75,     7,    13,    73,    76,    35,    36,    81,    15,    80,
-       8,    51,    83,    79,    70,    55,    46,    84,    44,    60,
-      57,    60,    85,    88,     7,    87,    71,    89,    90,     8,
-       9,    16,    92,     8,     9,    60,    91,    78,    19,    20,
-      43,    93,    17,    60,    94,     7,    34,    37,     8,    43,
-      38,     8,    41,    21,    22,    23,    24,    66,    60,    46,
-      47,    48,    25,    21,    22,    23,    24,     9,    48,    71,
-      60,    46,    25,    46,    47,    67,    69,    86,     8,    46,
-       8,     9,    48,    14,    82,    77,    74
-};
-
-static const yytype_int8 yycheck[] =
-{
-       1,    23,    24,     1,     7,    35,    36,    26,     3,    13,
-      14,    33,    10,    40,    17,    42,    35,    36,    13,    47,
-      51,     3,     0,    50,    51,    19,    20,    57,    16,    56,
-      12,    32,    62,    55,     6,    33,     5,    64,    57,    40,
-      34,    42,    70,    74,     3,    72,    15,    74,    75,    12,
-      13,    16,    79,    12,    13,    56,    78,    55,    10,    11,
-       4,    88,    16,    64,    91,     3,    18,    16,    12,     4,
-      16,    12,    24,     8,     9,    10,    11,    16,    79,     5,
-       6,    14,    17,     8,     9,    10,    11,    13,    14,    15,
-      91,     5,    17,     5,     6,    16,    16,    16,    12,     5,
-      12,    13,    14,     4,    62,    52,    51
-};
-
-  /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
-     symbol of state STATE-NUM.  */
-static const yytype_int8 yystos[] =
-{
-       0,     7,    17,    19,    20,    21,    22,     3,    12,    13,
-      34,    35,    39,     0,    21,    16,    16,    16,    35,    39,
-      39,     8,     9,    10,    11,    17,    23,    24,    25,    26,
-      31,    32,    33,    41,    39,    23,    23,    16,    16,    34,
-      42,    39,    42,     4,    24,    40,     5,     6,    14,    29,
-      30,    34,    35,    36,    38,    35,    42,    23,    40,    40,
-      34,    38,    27,    28,    42,    38,    16,    16,    29,    16,
-       6,    15,    37,    38,    30,    37,    38,    36,    35,    42,
-      38,    40,    28,    40,    38,    29,    16,    38,    37,    38,
-      38,    42,    38,    38,    38
-};
-
-  /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
-static const yytype_int8 yyr1[] =
-{
-       0,    18,    19,    20,    20,    21,    21,    22,    22,    22,
-      22,    23,    23,    24,    24,    24,    24,    24,    25,    26,
-      26,    27,    27,    28,    29,    29,    29,    30,    30,    30,
-      31,    31,    31,    31,    31,    31,    31,    32,    32,    32,
-      33,    33,    34,    34,    35,    35,    36,    36,    37,    37,
-      38,    38,    39,    39,    40,    40,    41,    41,    42,    42
-};
-
-  /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN.  */
-static const yytype_int8 yyr2[] =
-{
-       0,     2,     1,     1,     2,     1,     1,     4,     5,     5,
-       6,     1,     2,     1,     1,     1,     1,     1,     3,     3,
-       4,     1,     2,     2,     2,     1,     1,     3,     2,     1,
-       5,     4,     4,     4,     3,     3,     2,     5,     4,     3,
-       1,     2,     1,     2,     1,     2,     1,     2,     1,     2,
-       1,     2,     1,     2,     1,     2,     1,     2,     1,     2
-};
-
-
-enum { YYENOMEM = -2 };
-
-#define yyerrok         (yyerrstatus = 0)
-#define yyclearin       (yychar = YYEMPTY)
-
-#define YYACCEPT        goto yyacceptlab
-#define YYABORT         goto yyabortlab
-#define YYERROR         goto yyerrorlab
-
-
-#define YYRECOVERING()  (!!yyerrstatus)
-
-#define YYBACKUP(Token, Value)                                    \
-  do                                                              \
-    if (yychar == YYEMPTY)                                        \
-      {                                                           \
-        yychar = (Token);                                         \
-        yylval = (Value);                                         \
-        YYPOPSTACK (yylen);                                       \
-        yystate = *yyssp;                                         \
-        goto yybackup;                                            \
-      }                                                           \
-    else                                                          \
-      {                                                           \
-        yyerror (YY_("syntax error: cannot back up")); \
-        YYERROR;                                                  \
-      }                                                           \
-  while (0)
-
-/* Backward compatibility with an undocumented macro.
-   Use YYerror or YYUNDEF. */
-#define YYERRCODE YYUNDEF
-
-
-/* Enable debugging if requested.  */
-#if YYDEBUG
-
-# ifndef YYFPRINTF
-#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
-#  define YYFPRINTF fprintf
-# endif
-
-# define YYDPRINTF(Args)                        \
-do {                                            \
-  if (yydebug)                                  \
-    YYFPRINTF Args;                             \
-} while (0)
-
-/* This macro is provided for backward compatibility. */
-# ifndef YY_LOCATION_PRINT
-#  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
-# endif
-
-
-# define YY_SYMBOL_PRINT(Title, Kind, Value, Location)                    \
-do {                                                                      \
-  if (yydebug)                                                            \
-    {                                                                     \
-      YYFPRINTF (stderr, "%s ", Title);                                   \
-      yy_symbol_print (stderr,                                            \
-                  Kind, Value); \
-      YYFPRINTF (stderr, "\n");                                           \
-    }                                                                     \
-} while (0)
-
-
-/*-----------------------------------.
-| Print this symbol's value on YYO.  |
-`-----------------------------------*/
-
-static void
-yy_symbol_value_print (FILE *yyo,
-                       yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
-{
-  FILE *yyoutput = yyo;
-  YYUSE (yyoutput);
-  if (!yyvaluep)
-    return;
-# ifdef YYPRINT
-  if (yykind < YYNTOKENS)
-    YYPRINT (yyo, yytoknum[yykind], *yyvaluep);
-# endif
-  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
-  YYUSE (yykind);
-  YY_IGNORE_MAYBE_UNINITIALIZED_END
-}
-
-
-/*---------------------------.
-| Print this symbol on YYO.  |
-`---------------------------*/
-
-static void
-yy_symbol_print (FILE *yyo,
-                 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
-{
-  YYFPRINTF (yyo, "%s %s (",
-             yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
-
-  yy_symbol_value_print (yyo, yykind, yyvaluep);
-  YYFPRINTF (yyo, ")");
-}
-
-/*------------------------------------------------------------------.
-| yy_stack_print -- Print the state stack from its BOTTOM up to its |
-| TOP (included).                                                   |
-`------------------------------------------------------------------*/
-
-static void
-yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
-{
-  YYFPRINTF (stderr, "Stack now");
-  for (; yybottom <= yytop; yybottom++)
-    {
-      int yybot = *yybottom;
-      YYFPRINTF (stderr, " %d", yybot);
-    }
-  YYFPRINTF (stderr, "\n");
-}
-
-# define YY_STACK_PRINT(Bottom, Top)                            \
-do {                                                            \
-  if (yydebug)                                                  \
-    yy_stack_print ((Bottom), (Top));                           \
-} while (0)
-
-
-/*------------------------------------------------.
-| Report that the YYRULE is going to be reduced.  |
-`------------------------------------------------*/
-
-static void
-yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp,
-                 int yyrule)
-{
-  int yylno = yyrline[yyrule];
-  int yynrhs = yyr2[yyrule];
-  int yyi;
-  YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
-             yyrule - 1, yylno);
-  /* The symbols being reduced.  */
-  for (yyi = 0; yyi < yynrhs; yyi++)
-    {
-      YYFPRINTF (stderr, "   $%d = ", yyi + 1);
-      yy_symbol_print (stderr,
-                       YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
-                       &yyvsp[(yyi + 1) - (yynrhs)]);
-      YYFPRINTF (stderr, "\n");
-    }
-}
-
-# define YY_REDUCE_PRINT(Rule)          \
-do {                                    \
-  if (yydebug)                          \
-    yy_reduce_print (yyssp, yyvsp, Rule); \
-} while (0)
-
-/* Nonzero means print parse trace.  It is left uninitialized so that
-   multiple parsers can coexist.  */
-int yydebug;
-#else /* !YYDEBUG */
-# define YYDPRINTF(Args) ((void) 0)
-# define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
-# define YY_STACK_PRINT(Bottom, Top)
-# define YY_REDUCE_PRINT(Rule)
-#endif /* !YYDEBUG */
-
-
-/* YYINITDEPTH -- initial size of the parser's stacks.  */
-#ifndef YYINITDEPTH
-# define YYINITDEPTH 200
-#endif
-
-/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
-   if the built-in stack extension method is used).
-
-   Do not make this value too large; the results are undefined if
-   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
-   evaluated with infinite-precision integer arithmetic.  */
-
-#ifndef YYMAXDEPTH
-# define YYMAXDEPTH 10000
-#endif
-
-
-
-
-
-
-/*-----------------------------------------------.
-| Release the memory associated to this symbol.  |
-`-----------------------------------------------*/
-
-static void
-yydestruct (const char *yymsg,
-            yysymbol_kind_t yykind, YYSTYPE *yyvaluep)
-{
-  YYUSE (yyvaluep);
-  if (!yymsg)
-    yymsg = "Deleting";
-  YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);
-
-  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
-  YYUSE (yykind);
-  YY_IGNORE_MAYBE_UNINITIALIZED_END
-}
-
-
-/* Lookahead token kind.  */
-int yychar;
-
-/* The semantic value of the lookahead symbol.  */
-YYSTYPE yylval;
-/* Number of syntax errors so far.  */
-int yynerrs;
-
-
-
-
-/*----------.
-| yyparse.  |
-`----------*/
-
-int
-yyparse (void)
-{
-    yy_state_fast_t yystate = 0;
-    /* Number of tokens to shift before error messages enabled.  */
-    int yyerrstatus = 0;
-
-    /* Refer to the stacks through separate pointers, to allow yyoverflow
-       to reallocate them elsewhere.  */
-
-    /* Their size.  */
-    YYPTRDIFF_T yystacksize = YYINITDEPTH;
-
-    /* The state stack: array, bottom, top.  */
-    yy_state_t yyssa[YYINITDEPTH];
-    yy_state_t *yyss = yyssa;
-    yy_state_t *yyssp = yyss;
-
-    /* The semantic value stack: array, bottom, top.  */
-    YYSTYPE yyvsa[YYINITDEPTH];
-    YYSTYPE *yyvs = yyvsa;
-    YYSTYPE *yyvsp = yyvs;
-
-  int yyn;
-  /* The return value of yyparse.  */
-  int yyresult;
-  /* Lookahead symbol kind.  */
-  yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
-  /* The variables used to return semantic value and location from the
-     action routines.  */
-  YYSTYPE yyval;
-
-
-
-#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
-
-  /* The number of symbols on the RHS of the reduced rule.
-     Keep to zero when no symbol should be popped.  */
-  int yylen = 0;
-
-  YYDPRINTF ((stderr, "Starting parse\n"));
-
-  yychar = YYEMPTY; /* Cause a token to be read.  */
-  goto yysetstate;
-
-
-/*------------------------------------------------------------.
-| yynewstate -- push a new state, which is found in yystate.  |
-`------------------------------------------------------------*/
-yynewstate:
-  /* In all cases, when you get here, the value and location stacks
-     have just been pushed.  So pushing a state here evens the stacks.  */
-  yyssp++;
-
-
-/*--------------------------------------------------------------------.
-| yysetstate -- set current state (the top of the stack) to yystate.  |
-`--------------------------------------------------------------------*/
-yysetstate:
-  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
-  YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
-  YY_IGNORE_USELESS_CAST_BEGIN
-  *yyssp = YY_CAST (yy_state_t, yystate);
-  YY_IGNORE_USELESS_CAST_END
-  YY_STACK_PRINT (yyss, yyssp);
-
-  if (yyss + yystacksize - 1 <= yyssp)
-#if !defined yyoverflow && !defined YYSTACK_RELOCATE
-    goto yyexhaustedlab;
-#else
-    {
-      /* Get the current used size of the three stacks, in elements.  */
-      YYPTRDIFF_T yysize = yyssp - yyss + 1;
-
-# if defined yyoverflow
-      {
-        /* Give user a chance to reallocate the stack.  Use copies of
-           these so that the &'s don't force the real ones into
-           memory.  */
-        yy_state_t *yyss1 = yyss;
-        YYSTYPE *yyvs1 = yyvs;
-
-        /* Each stack pointer address is followed by the size of the
-           data in use in that stack, in bytes.  This used to be a
-           conditional around just the two extra args, but that might
-           be undefined if yyoverflow is a macro.  */
-        yyoverflow (YY_("memory exhausted"),
-                    &yyss1, yysize * YYSIZEOF (*yyssp),
-                    &yyvs1, yysize * YYSIZEOF (*yyvsp),
-                    &yystacksize);
-        yyss = yyss1;
-        yyvs = yyvs1;
-      }
-# else /* defined YYSTACK_RELOCATE */
-      /* Extend the stack our own way.  */
-      if (YYMAXDEPTH <= yystacksize)
-        goto yyexhaustedlab;
-      yystacksize *= 2;
-      if (YYMAXDEPTH < yystacksize)
-        yystacksize = YYMAXDEPTH;
-
-      {
-        yy_state_t *yyss1 = yyss;
-        union yyalloc *yyptr =
-          YY_CAST (union yyalloc *,
-                   YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
-        if (! yyptr)
-          goto yyexhaustedlab;
-        YYSTACK_RELOCATE (yyss_alloc, yyss);
-        YYSTACK_RELOCATE (yyvs_alloc, yyvs);
-#  undef YYSTACK_RELOCATE
-        if (yyss1 != yyssa)
-          YYSTACK_FREE (yyss1);
-      }
-# endif
-
-      yyssp = yyss + yysize - 1;
-      yyvsp = yyvs + yysize - 1;
-
-      YY_IGNORE_USELESS_CAST_BEGIN
-      YYDPRINTF ((stderr, "Stack size increased to %ld\n",
-                  YY_CAST (long, yystacksize)));
-      YY_IGNORE_USELESS_CAST_END
-
-      if (yyss + yystacksize - 1 <= yyssp)
-        YYABORT;
-    }
-#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
-
-  if (yystate == YYFINAL)
-    YYACCEPT;
-
-  goto yybackup;
-
-
-/*-----------.
-| yybackup.  |
-`-----------*/
-yybackup:
-  /* Do appropriate processing given the current state.  Read a
-     lookahead token if we need one and don't already have one.  */
-
-  /* First try to decide what to do without reference to lookahead token.  */
-  yyn = yypact[yystate];
-  if (yypact_value_is_default (yyn))
-    goto yydefault;
-
-  /* Not known => get a lookahead token if don't already have one.  */
-
-  /* YYCHAR is either empty, or end-of-input, or a valid lookahead.  */
-  if (yychar == YYEMPTY)
-    {
-      YYDPRINTF ((stderr, "Reading a token\n"));
-      yychar = yylex ();
-    }
-
-  if (yychar <= YYEOF)
-    {
-      yychar = YYEOF;
-      yytoken = YYSYMBOL_YYEOF;
-      YYDPRINTF ((stderr, "Now at end of input.\n"));
-    }
-  else if (yychar == YYerror)
-    {
-      /* The scanner already issued an error message, process directly
-         to error recovery.  But do not keep the error token as
-         lookahead, it is too special and may lead us to an endless
-         loop in error recovery. */
-      yychar = YYUNDEF;
-      yytoken = YYSYMBOL_YYerror;
-      goto yyerrlab1;
-    }
-  else
-    {
-      yytoken = YYTRANSLATE (yychar);
-      YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
-    }
-
-  /* If the proper action on seeing token YYTOKEN is to reduce or to
-     detect an error, take that action.  */
-  yyn += yytoken;
-  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
-    goto yydefault;
-  yyn = yytable[yyn];
-  if (yyn <= 0)
-    {
-      if (yytable_value_is_error (yyn))
-        goto yyerrlab;
-      yyn = -yyn;
-      goto yyreduce;
-    }
-
-  /* Count tokens shifted since error; after three, turn off error
-     status.  */
-  if (yyerrstatus)
-    yyerrstatus--;
-
-  /* Shift the lookahead token.  */
-  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
-  yystate = yyn;
-  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
-  *++yyvsp = yylval;
-  YY_IGNORE_MAYBE_UNINITIALIZED_END
-
-  /* Discard the shifted token.  */
-  yychar = YYEMPTY;
-  goto yynewstate;
-
-
-/*-----------------------------------------------------------.
-| yydefault -- do the default action for the current state.  |
-`-----------------------------------------------------------*/
-yydefault:
-  yyn = yydefact[yystate];
-  if (yyn == 0)
-    goto yyerrlab;
-  goto yyreduce;
-
-
-/*-----------------------------.
-| yyreduce -- do a reduction.  |
-`-----------------------------*/
-yyreduce:
-  /* yyn is the number of a rule to reduce with.  */
-  yylen = yyr2[yyn];
-
-  /* If YYLEN is nonzero, implement the default value of the action:
-     '$$ = $1'.
-
-     Otherwise, the following line sets YYVAL to garbage.
-     This behavior is undocumented and Bison
-     users should not rely upon it.  Assigning to YYVAL
-     unconditionally makes the parser a bit smaller, and it avoids a
-     GCC warning that YYVAL may be used uninitialized.  */
-  yyval = yyvsp[1-yylen];
-
-
-  YY_REDUCE_PRINT (yyn);
-  switch (yyn)
-    {
-  case 2: /* Program: EntryList  */
-#line 96 "parser.y"
-                    { dmxConfigEntry = (yyvsp[0].entry); }
-#line 1262 "parser.c"
-    break;
-
-  case 4: /* EntryList: EntryList Entry  */
-#line 100 "parser.y"
-                            { APPEND(DMXConfigEntryPtr,(yyvsp[-1].entry),(yyvsp[0].entry)); (yyval.entry) = (yyvsp[-1].entry); }
-#line 1268 "parser.c"
-    break;
-
-  case 5: /* Entry: Virtual  */
-#line 103 "parser.y"
-                       { (yyval.entry) = dmxConfigEntryVirtual((yyvsp[0].virtual)); }
-#line 1274 "parser.c"
-    break;
-
-  case 6: /* Entry: T_LINE_COMMENT  */
-#line 104 "parser.y"
-                       { (yyval.entry) = dmxConfigEntryComment((yyvsp[0].comment)); }
-#line 1280 "parser.c"
-    break;
-
-  case 7: /* Virtual: T_VIRTUAL Open SubList Close  */
-#line 108 "parser.y"
-          { (yyval.virtual) = dmxConfigCreateVirtual((yyvsp[-3].token), NULL, NULL, (yyvsp[-2].token), (yyvsp[-1].subentry), (yyvsp[0].token)); }
-#line 1286 "parser.c"
-    break;
-
-  case 8: /* Virtual: T_VIRTUAL Dimension Open SubList Close  */
-#line 110 "parser.y"
-          { (yyval.virtual) = dmxConfigCreateVirtual((yyvsp[-4].token), NULL, (yyvsp[-3].pair), (yyvsp[-2].token), (yyvsp[-1].subentry), (yyvsp[0].token)); }
-#line 1292 "parser.c"
-    break;
-
-  case 9: /* Virtual: T_VIRTUAL Name Open SubList Close  */
-#line 112 "parser.y"
-          { (yyval.virtual) = dmxConfigCreateVirtual((yyvsp[-4].token), (yyvsp[-3].string), NULL, (yyvsp[-2].token), (yyvsp[-1].subentry), (yyvsp[0].token)); }
-#line 1298 "parser.c"
-    break;
-
-  case 10: /* Virtual: T_VIRTUAL Name Dimension Open SubList Close  */
-#line 114 "parser.y"
-          { (yyval.virtual) = dmxConfigCreateVirtual((yyvsp[-5].token), (yyvsp[-4].string), (yyvsp[-3].pair), (yyvsp[-2].token), (yyvsp[-1].subentry), (yyvsp[0].token) ); }
-#line 1304 "parser.c"
-    break;
-
-  case 12: /* SubList: SubList Sub  */
-#line 118 "parser.y"
-                      { APPEND(DMXConfigSubPtr,(yyvsp[-1].subentry),(yyvsp[0].subentry)); (yyval.subentry) = (yyvsp[-1].subentry); }
-#line 1310 "parser.c"
-    break;
-
-  case 13: /* Sub: T_LINE_COMMENT  */
-#line 121 "parser.y"
-                     { (yyval.subentry) = dmxConfigSubComment((yyvsp[0].comment)); }
-#line 1316 "parser.c"
-    break;
-
-  case 14: /* Sub: DisplayEntry  */
-#line 122 "parser.y"
-                     { (yyval.subentry) = dmxConfigSubDisplay((yyvsp[0].display)); }
-#line 1322 "parser.c"
-    break;
-
-  case 15: /* Sub: WallEntry  */
-#line 123 "parser.y"
-                     { (yyval.subentry) = dmxConfigSubWall((yyvsp[0].wall)); }
-#line 1328 "parser.c"
-    break;
-
-  case 16: /* Sub: OptionEntry  */
-#line 124 "parser.y"
-                     { (yyval.subentry) = dmxConfigSubOption((yyvsp[0].option)); }
-#line 1334 "parser.c"
-    break;
-
-  case 17: /* Sub: ParamEntry  */
-#line 125 "parser.y"
-                     { (yyval.subentry) = dmxConfigSubParam((yyvsp[0].param)); }
-#line 1340 "parser.c"
-    break;
-
-  case 18: /* OptionEntry: T_OPTION NameList Terminal  */
-#line 129 "parser.y"
-              { (yyval.option) = dmxConfigCreateOption((yyvsp[-2].token), (yyvsp[-1].string), (yyvsp[0].token)); }
-#line 1346 "parser.c"
-    break;
-
-  case 19: /* ParamEntry: T_PARAM NameList Terminal  */
-#line 133 "parser.y"
-             { (yyval.param) = dmxConfigCreateParam((yyvsp[-2].token), NULL, (yyvsp[-1].string), NULL, (yyvsp[0].token)); }
-#line 1352 "parser.c"
-    break;
-
-  case 20: /* ParamEntry: T_PARAM Open ParamList Close  */
-#line 135 "parser.y"
-             { (yyval.param) = dmxConfigCreateParam((yyvsp[-3].token), (yyvsp[-2].token), NULL, (yyvsp[0].token), NULL);
-               (yyval.param)->next = (yyvsp[-1].param);
-             }
-#line 1360 "parser.c"
-    break;
-
-  case 22: /* ParamList: ParamList Param  */
-#line 141 "parser.y"
-                            { APPEND(DMXConfigParamPtr,(yyvsp[-1].param),(yyvsp[0].param)); (yyval.param) = (yyvsp[-1].param); }
-#line 1366 "parser.c"
-    break;
-
-  case 23: /* Param: NameList Terminal  */
-#line 145 "parser.y"
-        { (yyval.param) = dmxConfigCreateParam(NULL, NULL, (yyvsp[-1].string), NULL, (yyvsp[0].token)); }
-#line 1372 "parser.c"
-    break;
-
-  case 24: /* PartialDim: Dimension Offset  */
-#line 149 "parser.y"
-             { (yyval.pdim) = dmxConfigCreatePartDim((yyvsp[-1].pair), (yyvsp[0].pair)); }
-#line 1378 "parser.c"
-    break;
-
-  case 25: /* PartialDim: Dimension  */
-#line 151 "parser.y"
-             { (yyval.pdim) = dmxConfigCreatePartDim((yyvsp[0].pair), NULL); }
-#line 1384 "parser.c"
-    break;
-
-  case 26: /* PartialDim: Offset  */
-#line 153 "parser.y"
-             { (yyval.pdim) = dmxConfigCreatePartDim(NULL, (yyvsp[0].pair)); }
-#line 1390 "parser.c"
-    break;
-
-  case 27: /* FullDim: PartialDim '/' PartialDim  */
-#line 157 "parser.y"
-          { (yyval.fdim) = dmxConfigCreateFullDim((yyvsp[-2].pdim), (yyvsp[0].pdim)); }
-#line 1396 "parser.c"
-    break;
-
-  case 28: /* FullDim: '/' PartialDim  */
-#line 159 "parser.y"
-          { (yyval.fdim) = dmxConfigCreateFullDim(NULL, (yyvsp[0].pdim)); }
-#line 1402 "parser.c"
-    break;
-
-  case 29: /* FullDim: PartialDim  */
-#line 161 "parser.y"
-          { (yyval.fdim) = dmxConfigCreateFullDim((yyvsp[0].pdim), NULL); }
-#line 1408 "parser.c"
-    break;
-
-  case 30: /* DisplayEntry: Display Name FullDim Origin Terminal  */
-#line 165 "parser.y"
-               { (yyval.display) = dmxConfigCreateDisplay((yyvsp[-4].token), (yyvsp[-3].string), (yyvsp[-2].fdim), (yyvsp[-1].pair), (yyvsp[0].token)); }
-#line 1414 "parser.c"
-    break;
-
-  case 31: /* DisplayEntry: Display FullDim Origin Terminal  */
-#line 167 "parser.y"
-               { (yyval.display) = dmxConfigCreateDisplay((yyvsp[-3].token), NULL, (yyvsp[-2].fdim), (yyvsp[-1].pair), (yyvsp[0].token)); }
-#line 1420 "parser.c"
-    break;
-
-  case 32: /* DisplayEntry: Display Name Origin Terminal  */
-#line 169 "parser.y"
-               { (yyval.display) = dmxConfigCreateDisplay((yyvsp[-3].token), (yyvsp[-2].string), NULL, (yyvsp[-1].pair), (yyvsp[0].token)); }
-#line 1426 "parser.c"
-    break;
-
-  case 33: /* DisplayEntry: Display Name FullDim Terminal  */
-#line 172 "parser.y"
-               { (yyval.display) = dmxConfigCreateDisplay((yyvsp[-3].token), (yyvsp[-2].string), (yyvsp[-1].fdim), NULL, (yyvsp[0].token)); }
-#line 1432 "parser.c"
-    break;
-
-  case 34: /* DisplayEntry: Display FullDim Terminal  */
-#line 174 "parser.y"
-               { (yyval.display) = dmxConfigCreateDisplay((yyvsp[-2].token), NULL, (yyvsp[-1].fdim), NULL, (yyvsp[0].token)); }
-#line 1438 "parser.c"
-    break;
-
-  case 35: /* DisplayEntry: Display Name Terminal  */
-#line 176 "parser.y"
-               { (yyval.display) = dmxConfigCreateDisplay((yyvsp[-2].token), (yyvsp[-1].string), NULL, NULL, (yyvsp[0].token)); }
-#line 1444 "parser.c"
-    break;
-
-  case 36: /* DisplayEntry: Display Terminal  */
-#line 178 "parser.y"
-               { (yyval.display) = dmxConfigCreateDisplay((yyvsp[-1].token), NULL, NULL, NULL, (yyvsp[0].token)); }
-#line 1450 "parser.c"
-    break;
-
-  case 37: /* WallEntry: Wall Dimension Dimension NameList Terminal  */
-#line 182 "parser.y"
-            { (yyval.wall) = dmxConfigCreateWall((yyvsp[-4].token), (yyvsp[-3].pair), (yyvsp[-2].pair), (yyvsp[-1].string), (yyvsp[0].token)); }
-#line 1456 "parser.c"
-    break;
-
-  case 38: /* WallEntry: Wall Dimension NameList Terminal  */
-#line 184 "parser.y"
-            { (yyval.wall) = dmxConfigCreateWall((yyvsp[-3].token), (yyvsp[-2].pair), NULL, (yyvsp[-1].string), (yyvsp[0].token)); }
-#line 1462 "parser.c"
-    break;
-
-  case 39: /* WallEntry: Wall NameList Terminal  */
-#line 186 "parser.y"
-            { (yyval.wall) = dmxConfigCreateWall((yyvsp[-2].token), NULL, NULL, (yyvsp[-1].string), (yyvsp[0].token)); }
-#line 1468 "parser.c"
-    break;
-
-  case 41: /* Display: T_DISPLAY T_COMMENT  */
-#line 190 "parser.y"
-                              { (yyval.token) = (yyvsp[-1].token); (yyval.token)->comment = (yyvsp[0].comment)->comment; }
-#line 1474 "parser.c"
-    break;
-
-  case 43: /* Name: T_STRING T_COMMENT  */
-#line 194 "parser.y"
-                          { (yyval.string) = (yyvsp[-1].string); (yyval.string)->comment = (yyvsp[0].comment)->comment; }
-#line 1480 "parser.c"
-    break;
-
-  case 45: /* Dimension: T_DIMENSION T_COMMENT  */
-#line 198 "parser.y"
-                                  { (yyval.pair) = (yyvsp[-1].pair); (yyval.pair)->comment = (yyvsp[0].comment)->comment; }
-#line 1486 "parser.c"
-    break;
-
-  case 47: /* Offset: T_OFFSET T_COMMENT  */
-#line 202 "parser.y"
-                            { (yyval.pair) = (yyvsp[-1].pair); (yyval.pair)->comment = (yyvsp[0].comment)->comment; }
-#line 1492 "parser.c"
-    break;
-
-  case 49: /* Origin: T_ORIGIN T_COMMENT  */
-#line 206 "parser.y"
-                            { (yyval.pair) = (yyvsp[-1].pair); (yyval.pair)->comment = (yyvsp[0].comment)->comment; }
-#line 1498 "parser.c"
-    break;
-
-  case 51: /* Terminal: ';' T_COMMENT  */
-#line 210 "parser.y"
-                         { (yyval.token) = (yyvsp[-1].token); (yyval.token)->comment = (yyvsp[0].comment)->comment; }
-#line 1504 "parser.c"
-    break;
-
-  case 53: /* Open: '{' T_COMMENT  */
-#line 214 "parser.y"
-                     { (yyval.token) = (yyvsp[-1].token); (yyval.token)->comment = (yyvsp[0].comment)->comment; }
-#line 1510 "parser.c"
-    break;
-
-  case 55: /* Close: '}' T_COMMENT  */
-#line 218 "parser.y"
-                      { (yyval.token) = (yyvsp[-1].token); (yyval.token)->comment = (yyvsp[0].comment)->comment; }
-#line 1516 "parser.c"
-    break;
-
-  case 57: /* Wall: T_WALL T_COMMENT  */
-#line 222 "parser.y"
-                        { (yyval.token) = (yyvsp[-1].token); (yyval.token)->comment = (yyvsp[0].comment)->comment; }
-#line 1522 "parser.c"
-    break;
-
-  case 59: /* NameList: NameList Name  */
-#line 226 "parser.y"
-                         { APPEND(DMXConfigStringPtr, (yyvsp[-1].string), (yyvsp[0].string)); (yyval.string) = (yyvsp[-1].string); }
-#line 1528 "parser.c"
-    break;
-
-
-#line 1532 "parser.c"
-
-      default: break;
-    }
-  /* User semantic actions sometimes alter yychar, and that requires
-     that yytoken be updated with the new translation.  We take the
-     approach of translating immediately before every use of yytoken.
-     One alternative is translating here after every semantic action,
-     but that translation would be missed if the semantic action invokes
-     YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
-     if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
-     incorrect destructor might then be invoked immediately.  In the
-     case of YYERROR or YYBACKUP, subsequent parser actions might lead
-     to an incorrect destructor call or verbose syntax error message
-     before the lookahead is translated.  */
-  YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);
-
-  YYPOPSTACK (yylen);
-  yylen = 0;
-
-  *++yyvsp = yyval;
-
-  /* Now 'shift' the result of the reduction.  Determine what state
-     that goes to, based on the state we popped back to and the rule
-     number reduced by.  */
-  {
-    const int yylhs = yyr1[yyn] - YYNTOKENS;
-    const int yyi = yypgoto[yylhs] + *yyssp;
-    yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
-               ? yytable[yyi]
-               : yydefgoto[yylhs]);
-  }
-
-  goto yynewstate;
-
-
-/*--------------------------------------.
-| yyerrlab -- here on detecting error.  |
-`--------------------------------------*/
-yyerrlab:
-  /* Make sure we have latest lookahead translation.  See comments at
-     user semantic actions for why this is necessary.  */
-  yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
-  /* If not already recovering from an error, report this error.  */
-  if (!yyerrstatus)
-    {
-      ++yynerrs;
-      yyerror (YY_("syntax error"));
-    }
-
-  if (yyerrstatus == 3)
-    {
-      /* If just tried and failed to reuse lookahead token after an
-         error, discard it.  */
-
-      if (yychar <= YYEOF)
-        {
-          /* Return failure if at end of input.  */
-          if (yychar == YYEOF)
-            YYABORT;
-        }
-      else
-        {
-          yydestruct ("Error: discarding",
-                      yytoken, &yylval);
-          yychar = YYEMPTY;
-        }
-    }
-
-  /* Else will try to reuse lookahead token after shifting the error
-     token.  */
-  goto yyerrlab1;
-
-
-/*---------------------------------------------------.
-| yyerrorlab -- error raised explicitly by YYERROR.  |
-`---------------------------------------------------*/
-yyerrorlab:
-  /* Pacify compilers when the user code never invokes YYERROR and the
-     label yyerrorlab therefore never appears in user code.  */
-  if (0)
-    YYERROR;
-
-  /* Do not reclaim the symbols of the rule whose action triggered
-     this YYERROR.  */
-  YYPOPSTACK (yylen);
-  yylen = 0;
-  YY_STACK_PRINT (yyss, yyssp);
-  yystate = *yyssp;
-  goto yyerrlab1;
-
-
-/*-------------------------------------------------------------.
-| yyerrlab1 -- common code for both syntax error and YYERROR.  |
-`-------------------------------------------------------------*/
-yyerrlab1:
-  yyerrstatus = 3;      /* Each real token shifted decrements this.  */
-
-  /* Pop stack until we find a state that shifts the error token.  */
-  for (;;)
-    {
-      yyn = yypact[yystate];
-      if (!yypact_value_is_default (yyn))
-        {
-          yyn += YYSYMBOL_YYerror;
-          if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
-            {
-              yyn = yytable[yyn];
-              if (0 < yyn)
-                break;
-            }
-        }
-
-      /* Pop the current state because it cannot handle the error token.  */
-      if (yyssp == yyss)
-        YYABORT;
-
-
-      yydestruct ("Error: popping",
-                  YY_ACCESSING_SYMBOL (yystate), yyvsp);
-      YYPOPSTACK (1);
-      yystate = *yyssp;
-      YY_STACK_PRINT (yyss, yyssp);
-    }
-
-  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
-  *++yyvsp = yylval;
-  YY_IGNORE_MAYBE_UNINITIALIZED_END
-
-
-  /* Shift the error token.  */
-  YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp);
-
-  yystate = yyn;
-  goto yynewstate;
-
-
-/*-------------------------------------.
-| yyacceptlab -- YYACCEPT comes here.  |
-`-------------------------------------*/
-yyacceptlab:
-  yyresult = 0;
-  goto yyreturn;
-
-
-/*-----------------------------------.
-| yyabortlab -- YYABORT comes here.  |
-`-----------------------------------*/
-yyabortlab:
-  yyresult = 1;
-  goto yyreturn;
-
-
-#if !defined yyoverflow
-/*-------------------------------------------------.
-| yyexhaustedlab -- memory exhaustion comes here.  |
-`-------------------------------------------------*/
-yyexhaustedlab:
-  yyerror (YY_("memory exhausted"));
-  yyresult = 2;
-  goto yyreturn;
-#endif
-
-
-/*-------------------------------------------------------.
-| yyreturn -- parsing is finished, clean up and return.  |
-`-------------------------------------------------------*/
-yyreturn:
-  if (yychar != YYEMPTY)
-    {
-      /* Make sure we have latest lookahead translation.  See comments at
-         user semantic actions for why this is necessary.  */
-      yytoken = YYTRANSLATE (yychar);
-      yydestruct ("Cleanup: discarding lookahead",
-                  yytoken, &yylval);
-    }
-  /* Do not reclaim the symbols of the rule whose action triggered
-     this YYABORT or YYACCEPT.  */
-  YYPOPSTACK (yylen);
-  YY_STACK_PRINT (yyss, yyssp);
-  while (yyssp != yyss)
-    {
-      yydestruct ("Cleanup: popping",
-                  YY_ACCESSING_SYMBOL (+*yyssp), yyvsp);
-      YYPOPSTACK (1);
-    }
-#ifndef yyoverflow
-  if (yyss != yyssa)
-    YYSTACK_FREE (yyss);
-#endif
-
-  return yyresult;
-}
-
diff --git a/hw/dmx/config/parser.h b/hw/dmx/config/parser.h
deleted file mode 100644
index 36cdf8b..0000000
--- a/hw/dmx/config/parser.h
+++ /dev/null
@@ -1,121 +0,0 @@
-/* A Bison parser, made by GNU Bison 3.7.3.  */
-
-/* Bison interface for Yacc-like parsers in C
-
-   Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation,
-   Inc.
-
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation, either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-/* As a special exception, you may create a larger work that contains
-   part or all of the Bison parser skeleton and distribute that work
-   under terms of your choice, so long as that work isn't itself a
-   parser generator using the skeleton or a modified version thereof
-   as a parser skeleton.  Alternatively, if you modify or redistribute
-   the parser skeleton itself, you may (at your option) remove this
-   special exception, which will cause the skeleton and the resulting
-   Bison output files to be licensed under the GNU General Public
-   License without this special exception.
-
-   This special exception was added by the Free Software Foundation in
-   version 2.2 of Bison.  */
-
-/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
-   especially those whose name start with YY_ or yy_.  They are
-   private implementation details that can be changed or removed.  */
-
-#ifndef YY_YY_PARSER_H_INCLUDED
-# define YY_YY_PARSER_H_INCLUDED
-/* Debug traces.  */
-#ifndef YYDEBUG
-# define YYDEBUG 0
-#endif
-#if YYDEBUG
-extern int yydebug;
-#endif
-
-/* Token kinds.  */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
-  enum yytokentype
-  {
-    YYEMPTY = -2,
-    YYEOF = 0,                     /* "end of file"  */
-    YYerror = 256,                 /* error  */
-    YYUNDEF = 257,                 /* "invalid token"  */
-    T_VIRTUAL = 258,               /* T_VIRTUAL  */
-    T_DISPLAY = 259,               /* T_DISPLAY  */
-    T_WALL = 260,                  /* T_WALL  */
-    T_OPTION = 261,                /* T_OPTION  */
-    T_PARAM = 262,                 /* T_PARAM  */
-    T_STRING = 263,                /* T_STRING  */
-    T_DIMENSION = 264,             /* T_DIMENSION  */
-    T_OFFSET = 265,                /* T_OFFSET  */
-    T_ORIGIN = 266,                /* T_ORIGIN  */
-    T_COMMENT = 267,               /* T_COMMENT  */
-    T_LINE_COMMENT = 268           /* T_LINE_COMMENT  */
-  };
-  typedef enum yytokentype yytoken_kind_t;
-#endif
-/* Token kinds.  */
-#define YYEOF 0
-#define YYerror 256
-#define YYUNDEF 257
-#define T_VIRTUAL 258
-#define T_DISPLAY 259
-#define T_WALL 260
-#define T_OPTION 261
-#define T_PARAM 262
-#define T_STRING 263
-#define T_DIMENSION 264
-#define T_OFFSET 265
-#define T_ORIGIN 266
-#define T_COMMENT 267
-#define T_LINE_COMMENT 268
-
-/* Value type.  */
-#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-union YYSTYPE
-{
-#line 57 "parser.y"
-
-    DMXConfigTokenPtr      token;
-    DMXConfigStringPtr     string;
-    DMXConfigNumberPtr     number;
-    DMXConfigPairPtr       pair;
-    DMXConfigFullDimPtr    fdim;
-    DMXConfigPartDimPtr    pdim;
-    DMXConfigDisplayPtr    display;
-    DMXConfigWallPtr       wall;
-    DMXConfigOptionPtr     option;
-    DMXConfigParamPtr      param;
-    DMXConfigCommentPtr    comment;
-    DMXConfigSubPtr        subentry;
-    DMXConfigVirtualPtr    virtual;
-    DMXConfigEntryPtr      entry;
-
-#line 109 "parser.h"
-
-};
-typedef union YYSTYPE YYSTYPE;
-# define YYSTYPE_IS_TRIVIAL 1
-# define YYSTYPE_IS_DECLARED 1
-#endif
-
-
-extern YYSTYPE yylval;
-
-int yyparse (void);
-
-#endif /* !YY_YY_PARSER_H_INCLUDED  */
diff --git a/hw/dmx/config/parser.y b/hw/dmx/config/parser.y
deleted file mode 100644
index fa041a1..0000000
--- a/hw/dmx/config/parser.y
+++ /dev/null
@@ -1,227 +0,0 @@
-/* $XFree86$ */
-/*
- * Copyright 2002-2003 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-%{
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#include "dmxparse.h"
-#include <string.h>
-#include <stdlib.h>
-#define YYDEBUG 1
-#define YYERROR_VERBOSE
-#define YY_USE_PROTOS
-
-extern int yylex(void);
-DMXConfigEntryPtr dmxConfigEntry = NULL;
-#define APPEND(type, h, t)                 \
-{                                          \
-    type pt;                               \
-    for (pt = h; pt->next; pt = pt->next); \
-    pt->next = t;                          \
-}
-%}
-
-%union {
-    DMXConfigTokenPtr      token;
-    DMXConfigStringPtr     string;
-    DMXConfigNumberPtr     number;
-    DMXConfigPairPtr       pair;
-    DMXConfigFullDimPtr    fdim;
-    DMXConfigPartDimPtr    pdim;
-    DMXConfigDisplayPtr    display;
-    DMXConfigWallPtr       wall;
-    DMXConfigOptionPtr     option;
-    DMXConfigParamPtr      param;
-    DMXConfigCommentPtr    comment;
-    DMXConfigSubPtr        subentry;
-    DMXConfigVirtualPtr    virtual;
-    DMXConfigEntryPtr      entry;
-}
-
-				/* Terminals */
-%token <token>   '{' '}' ';' '/' T_VIRTUAL T_DISPLAY T_WALL T_OPTION T_PARAM
-%token <string>  T_STRING
-%token <pair>    T_DIMENSION T_OFFSET T_ORIGIN
-%token <comment> T_COMMENT T_LINE_COMMENT
-
-                                /* Non-termials */
-%type  <token>    Display Wall Terminal Open Close
-%type  <string>   NameList Name
-%type  <pair>     Dimension Offset Origin
-%type  <pdim>     PartialDim
-%type  <fdim>     FullDim
-%type  <display>  DisplayEntry
-%type  <option>   OptionEntry
-%type  <param>    ParamEntry ParamList Param
-%type  <subentry> SubList Sub
-%type  <wall>     WallEntry
-%type  <virtual>  Virtual
-%type  <entry>    Program EntryList Entry
-
-%%
-
-Program : EntryList { dmxConfigEntry = $1; }
-        ;
-
-EntryList : Entry
-          | EntryList Entry { APPEND(DMXConfigEntryPtr,$1,$2); $$ = $1; }
-          ;
-
-Entry : Virtual        { $$ = dmxConfigEntryVirtual($1); }
-      | T_LINE_COMMENT { $$ = dmxConfigEntryComment($1); }
-      ;
-
-Virtual : T_VIRTUAL Open SubList Close
-          { $$ = dmxConfigCreateVirtual($1, NULL, NULL, $2, $3, $4); }
-        | T_VIRTUAL Dimension Open SubList Close
-          { $$ = dmxConfigCreateVirtual($1, NULL, $2, $3, $4, $5); }
-        | T_VIRTUAL Name Open SubList Close
-          { $$ = dmxConfigCreateVirtual($1, $2, NULL, $3, $4, $5); }
-        | T_VIRTUAL Name Dimension Open SubList Close
-          { $$ = dmxConfigCreateVirtual($1, $2, $3, $4, $5, $6 ); }
-        ;
-
-SubList : Sub
-        | SubList Sub { APPEND(DMXConfigSubPtr,$1,$2); $$ = $1; }
-        ;
-
-Sub : T_LINE_COMMENT { $$ = dmxConfigSubComment($1); }
-    | DisplayEntry   { $$ = dmxConfigSubDisplay($1); }
-    | WallEntry      { $$ = dmxConfigSubWall($1); }
-    | OptionEntry    { $$ = dmxConfigSubOption($1); }
-    | ParamEntry     { $$ = dmxConfigSubParam($1); }
-    ;
-
-OptionEntry : T_OPTION NameList Terminal
-              { $$ = dmxConfigCreateOption($1, $2, $3); }
-            ;
-
-ParamEntry : T_PARAM NameList Terminal
-             { $$ = dmxConfigCreateParam($1, NULL, $2, NULL, $3); }
-           | T_PARAM Open ParamList Close
-             { $$ = dmxConfigCreateParam($1, $2, NULL, $4, NULL);
-               $$->next = $3;
-             }
-           ;
-
-ParamList : Param
-          | ParamList Param { APPEND(DMXConfigParamPtr,$1,$2); $$ = $1; }
-          ;
-
-Param : NameList Terminal
-        { $$ = dmxConfigCreateParam(NULL, NULL, $1, NULL, $2); }
-      ;
-
-PartialDim : Dimension Offset
-             { $$ = dmxConfigCreatePartDim($1, $2); }
-           | Dimension
-             { $$ = dmxConfigCreatePartDim($1, NULL); }
-           | Offset
-             { $$ = dmxConfigCreatePartDim(NULL, $1); }
-           ;
-
-FullDim : PartialDim '/' PartialDim
-          { $$ = dmxConfigCreateFullDim($1, $3); }
-        | '/' PartialDim
-          { $$ = dmxConfigCreateFullDim(NULL, $2); }
-        | PartialDim
-          { $$ = dmxConfigCreateFullDim($1, NULL); }
-        ;
-
-DisplayEntry : Display Name FullDim Origin Terminal
-               { $$ = dmxConfigCreateDisplay($1, $2, $3, $4, $5); }
-             | Display FullDim Origin Terminal
-               { $$ = dmxConfigCreateDisplay($1, NULL, $2, $3, $4); }
-             | Display Name Origin Terminal
-               { $$ = dmxConfigCreateDisplay($1, $2, NULL, $3, $4); }
-
-             | Display Name FullDim Terminal
-               { $$ = dmxConfigCreateDisplay($1, $2, $3, NULL, $4); }
-             | Display FullDim Terminal
-               { $$ = dmxConfigCreateDisplay($1, NULL, $2, NULL, $3); }
-             | Display Name Terminal
-               { $$ = dmxConfigCreateDisplay($1, $2, NULL, NULL, $3); }
-             | Display Terminal
-               { $$ = dmxConfigCreateDisplay($1, NULL, NULL, NULL, $2); }
-             ;
-
-WallEntry : Wall Dimension Dimension NameList Terminal
-            { $$ = dmxConfigCreateWall($1, $2, $3, $4, $5); }
-          | Wall Dimension NameList Terminal
-            { $$ = dmxConfigCreateWall($1, $2, NULL, $3, $4); }
-          | Wall NameList Terminal
-            { $$ = dmxConfigCreateWall($1, NULL, NULL, $2, $3); }
-          ;
-
-Display : T_DISPLAY
-        | T_DISPLAY T_COMMENT { $$ = $1; $$->comment = $2->comment; }
-        ;
-
-Name : T_STRING
-     | T_STRING T_COMMENT { $$ = $1; $$->comment = $2->comment; }
-     ;
-
-Dimension : T_DIMENSION
-          | T_DIMENSION T_COMMENT { $$ = $1; $$->comment = $2->comment; }
-          ;
-
-Offset : T_OFFSET
-       | T_OFFSET T_COMMENT { $$ = $1; $$->comment = $2->comment; }
-       ;
-
-Origin : T_ORIGIN
-       | T_ORIGIN T_COMMENT { $$ = $1; $$->comment = $2->comment; }
-       ;
-
-Terminal : ';'
-         | ';' T_COMMENT { $$ = $1; $$->comment = $2->comment; }
-         ;
-
-Open : '{'
-     | '{' T_COMMENT { $$ = $1; $$->comment = $2->comment; }
-     ;
-
-Close : '}'
-      | '}' T_COMMENT { $$ = $1; $$->comment = $2->comment; }
-      ;
-
-Wall : T_WALL
-     | T_WALL T_COMMENT { $$ = $1; $$->comment = $2->comment; }
-     ;
-
-NameList : Name
-         | NameList Name { APPEND(DMXConfigStringPtr, $1, $2); $$ = $1; }
-         ;
diff --git a/hw/dmx/config/scanner.c b/hw/dmx/config/scanner.c
deleted file mode 100644
index 3bd193e..0000000
--- a/hw/dmx/config/scanner.c
+++ /dev/null
@@ -1,2039 +0,0 @@
-
-#line 2 "scanner.c"
-
-#define  YY_INT_ALIGNED short int
-
-/* A lexical scanner generated by flex */
-
-#define FLEX_SCANNER
-#define YY_FLEX_MAJOR_VERSION 2
-#define YY_FLEX_MINOR_VERSION 6
-#define YY_FLEX_SUBMINOR_VERSION 4
-#if YY_FLEX_SUBMINOR_VERSION > 0
-#define FLEX_BETA
-#endif
-
-/* First, we deal with  platform-specific or compiler-specific issues. */
-
-/* begin standard C headers. */
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#include <stdlib.h>
-
-/* end standard C headers. */
-
-/* flex integer type definitions */
-
-#ifndef FLEXINT_H
-#define FLEXINT_H
-
-/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
-
-#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
-
-/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
- * if you want the limit (max/min) macros for int types. 
- */
-#ifndef __STDC_LIMIT_MACROS
-#define __STDC_LIMIT_MACROS 1
-#endif
-
-#include <inttypes.h>
-typedef int8_t flex_int8_t;
-typedef uint8_t flex_uint8_t;
-typedef int16_t flex_int16_t;
-typedef uint16_t flex_uint16_t;
-typedef int32_t flex_int32_t;
-typedef uint32_t flex_uint32_t;
-#else
-typedef signed char flex_int8_t;
-typedef short int flex_int16_t;
-typedef int flex_int32_t;
-typedef unsigned char flex_uint8_t; 
-typedef unsigned short int flex_uint16_t;
-typedef unsigned int flex_uint32_t;
-
-/* Limits of integral types. */
-#ifndef INT8_MIN
-#define INT8_MIN               (-128)
-#endif
-#ifndef INT16_MIN
-#define INT16_MIN              (-32767-1)
-#endif
-#ifndef INT32_MIN
-#define INT32_MIN              (-2147483647-1)
-#endif
-#ifndef INT8_MAX
-#define INT8_MAX               (127)
-#endif
-#ifndef INT16_MAX
-#define INT16_MAX              (32767)
-#endif
-#ifndef INT32_MAX
-#define INT32_MAX              (2147483647)
-#endif
-#ifndef UINT8_MAX
-#define UINT8_MAX              (255U)
-#endif
-#ifndef UINT16_MAX
-#define UINT16_MAX             (65535U)
-#endif
-#ifndef UINT32_MAX
-#define UINT32_MAX             (4294967295U)
-#endif
-
-#ifndef SIZE_MAX
-#define SIZE_MAX               (~(size_t)0)
-#endif
-
-#endif /* ! C99 */
-
-#endif /* ! FLEXINT_H */
-
-/* begin standard C++ headers. */
-
-/* TODO: this is always defined, so inline it */
-#define yyconst const
-
-#if defined(__GNUC__) && __GNUC__ >= 3
-#define yynoreturn __attribute__((__noreturn__))
-#else
-#define yynoreturn
-#endif
-
-/* Returned upon end-of-file. */
-#define YY_NULL 0
-
-/* Promotes a possibly negative, possibly signed char to an
- *   integer in range [0..255] for use as an array index.
- */
-#define YY_SC_TO_UI(c) ((YY_CHAR) (c))
-
-/* Enter a start condition.  This macro really ought to take a parameter,
- * but we do it the disgusting crufty way forced on us by the ()-less
- * definition of BEGIN.
- */
-#define BEGIN (yy_start) = 1 + 2 *
-/* Translate the current start state into a value that can be later handed
- * to BEGIN to return to the state.  The YYSTATE alias is for lex
- * compatibility.
- */
-#define YY_START (((yy_start) - 1) / 2)
-#define YYSTATE YY_START
-/* Action number for EOF rule of a given start state. */
-#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
-/* Special action meaning "start processing a new file". */
-#define YY_NEW_FILE yyrestart( yyin  )
-#define YY_END_OF_BUFFER_CHAR 0
-
-/* Size of default input buffer. */
-#ifndef YY_BUF_SIZE
-#ifdef __ia64__
-/* On IA-64, the buffer size is 16k, not 8k.
- * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
- * Ditto for the __ia64__ case accordingly.
- */
-#define YY_BUF_SIZE 32768
-#else
-#define YY_BUF_SIZE 16384
-#endif /* __ia64__ */
-#endif
-
-/* The state buf must be large enough to hold one state per character in the main buffer.
- */
-#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
-
-#ifndef YY_TYPEDEF_YY_BUFFER_STATE
-#define YY_TYPEDEF_YY_BUFFER_STATE
-typedef struct yy_buffer_state *YY_BUFFER_STATE;
-#endif
-
-#ifndef YY_TYPEDEF_YY_SIZE_T
-#define YY_TYPEDEF_YY_SIZE_T
-typedef size_t yy_size_t;
-#endif
-
-extern int yyleng;
-
-extern FILE *yyin, *yyout;
-
-#define EOB_ACT_CONTINUE_SCAN 0
-#define EOB_ACT_END_OF_FILE 1
-#define EOB_ACT_LAST_MATCH 2
-    
-    #define YY_LESS_LINENO(n)
-    #define YY_LINENO_REWIND_TO(ptr)
-    
-/* Return all but the first "n" matched characters back to the input stream. */
-#define yyless(n) \
-	do \
-		{ \
-		/* Undo effects of setting up yytext. */ \
-        int yyless_macro_arg = (n); \
-        YY_LESS_LINENO(yyless_macro_arg);\
-		*yy_cp = (yy_hold_char); \
-		YY_RESTORE_YY_MORE_OFFSET \
-		(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
-		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
-		} \
-	while ( 0 )
-#define unput(c) yyunput( c, (yytext_ptr)  )
-
-#ifndef YY_STRUCT_YY_BUFFER_STATE
-#define YY_STRUCT_YY_BUFFER_STATE
-struct yy_buffer_state
-	{
-	FILE *yy_input_file;
-
-	char *yy_ch_buf;		/* input buffer */
-	char *yy_buf_pos;		/* current position in input buffer */
-
-	/* Size of input buffer in bytes, not including room for EOB
-	 * characters.
-	 */
-	int yy_buf_size;
-
-	/* Number of characters read into yy_ch_buf, not including EOB
-	 * characters.
-	 */
-	int yy_n_chars;
-
-	/* Whether we "own" the buffer - i.e., we know we created it,
-	 * and can realloc() it to grow it, and should free() it to
-	 * delete it.
-	 */
-	int yy_is_our_buffer;
-
-	/* Whether this is an "interactive" input source; if so, and
-	 * if we're using stdio for input, then we want to use getc()
-	 * instead of fread(), to make sure we stop fetching input after
-	 * each newline.
-	 */
-	int yy_is_interactive;
-
-	/* Whether we're considered to be at the beginning of a line.
-	 * If so, '^' rules will be active on the next match, otherwise
-	 * not.
-	 */
-	int yy_at_bol;
-
-    int yy_bs_lineno; /**< The line count. */
-    int yy_bs_column; /**< The column count. */
-
-	/* Whether to try to fill the input buffer when we reach the
-	 * end of it.
-	 */
-	int yy_fill_buffer;
-
-	int yy_buffer_status;
-
-#define YY_BUFFER_NEW 0
-#define YY_BUFFER_NORMAL 1
-	/* When an EOF's been seen but there's still some text to process
-	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
-	 * shouldn't try reading from the input source any more.  We might
-	 * still have a bunch of tokens to match, though, because of
-	 * possible backing-up.
-	 *
-	 * When we actually see the EOF, we change the status to "new"
-	 * (via yyrestart()), so that the user can continue scanning by
-	 * just pointing yyin at a new input file.
-	 */
-#define YY_BUFFER_EOF_PENDING 2
-
-	};
-#endif /* !YY_STRUCT_YY_BUFFER_STATE */
-
-/* Stack of input buffers. */
-static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
-static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
-static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
-
-/* We provide macros for accessing buffer states in case in the
- * future we want to put the buffer states in a more general
- * "scanner state".
- *
- * Returns the top of the stack, or NULL.
- */
-#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
-                          ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
-                          : NULL)
-/* Same as previous macro, but useful when we know that the buffer stack is not
- * NULL or when we need an lvalue. For internal use only.
- */
-#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
-
-/* yy_hold_char holds the character lost when yytext is formed. */
-static char yy_hold_char;
-static int yy_n_chars;		/* number of characters read into yy_ch_buf */
-int yyleng;
-
-/* Points to current character in buffer. */
-static char *yy_c_buf_p = NULL;
-static int yy_init = 0;		/* whether we need to initialize */
-static int yy_start = 0;	/* start state number */
-
-/* Flag which is used to allow yywrap()'s to do buffer switches
- * instead of setting up a fresh yyin.  A bit of a hack ...
- */
-static int yy_did_buffer_switch_on_eof;
-
-void yyrestart ( FILE *input_file  );
-void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer  );
-YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size  );
-void yy_delete_buffer ( YY_BUFFER_STATE b  );
-void yy_flush_buffer ( YY_BUFFER_STATE b  );
-void yypush_buffer_state ( YY_BUFFER_STATE new_buffer  );
-void yypop_buffer_state ( void );
-
-static void yyensure_buffer_stack ( void );
-static void yy_load_buffer_state ( void );
-static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file  );
-#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )
-
-YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size  );
-YY_BUFFER_STATE yy_scan_string ( const char *yy_str  );
-YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len  );
-
-void *yyalloc ( yy_size_t  );
-void *yyrealloc ( void *, yy_size_t  );
-void yyfree ( void *  );
-
-#define yy_new_buffer yy_create_buffer
-#define yy_set_interactive(is_interactive) \
-	{ \
-	if ( ! YY_CURRENT_BUFFER ){ \
-        yyensure_buffer_stack (); \
-		YY_CURRENT_BUFFER_LVALUE =    \
-            yy_create_buffer( yyin, YY_BUF_SIZE ); \
-	} \
-	YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
-	}
-#define yy_set_bol(at_bol) \
-	{ \
-	if ( ! YY_CURRENT_BUFFER ){\
-        yyensure_buffer_stack (); \
-		YY_CURRENT_BUFFER_LVALUE =    \
-            yy_create_buffer( yyin, YY_BUF_SIZE ); \
-	} \
-	YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
-	}
-#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
-
-/* Begin user sect3 */
-typedef flex_uint8_t YY_CHAR;
-
-FILE *yyin = NULL, *yyout = NULL;
-
-typedef int yy_state_type;
-
-extern int yylineno;
-int yylineno = 1;
-
-extern char *yytext;
-#ifdef yytext_ptr
-#undef yytext_ptr
-#endif
-#define yytext_ptr yytext
-
-static yy_state_type yy_get_previous_state ( void );
-static yy_state_type yy_try_NUL_trans ( yy_state_type current_state  );
-static int yy_get_next_buffer ( void );
-static void yynoreturn yy_fatal_error ( const char* msg  );
-
-/* Done after the current pattern has been matched and before the
- * corresponding action - sets up yytext.
- */
-#define YY_DO_BEFORE_ACTION \
-	(yytext_ptr) = yy_bp; \
-	yyleng = (int) (yy_cp - yy_bp); \
-	(yy_hold_char) = *yy_cp; \
-	*yy_cp = '\0'; \
-	(yy_c_buf_p) = yy_cp;
-#define YY_NUM_RULES 20
-#define YY_END_OF_BUFFER 21
-/* This struct is not used in this scanner,
-   but its presence is necessary. */
-struct yy_trans_info
-	{
-	flex_int32_t yy_verify;
-	flex_int32_t yy_nxt;
-	};
-static const flex_int16_t yy_accept[73] =
-    {   0,
-        0,    0,    0,    0,   21,   19,   12,   11,   19,   18,
-       19,   19,   16,   19,   15,   19,   19,   19,   19,   19,
-       19,   13,   14,   17,   12,    0,   10,   18,    9,    9,
-        0,    0,    0,    0,    0,    9,    9,    9,    9,    9,
-       17,    0,    9,    0,    6,    0,    0,    9,    9,    9,
-        9,    9,    0,    0,    7,    8,    9,    9,    9,    9,
-        3,    7,    9,    9,    5,    9,    9,    4,    9,    2,
-        1,    0
-    } ;
-
-static const YY_CHAR yy_ec[256] =
-    {   0,
-        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    2,    1,    4,    5,    1,    1,    1,    1,    1,
-        1,    6,    7,    1,    7,    6,    8,    9,    9,    9,
-        9,    9,    9,    9,    9,    9,    9,    6,   10,    1,
-        1,    1,    1,   11,    6,    6,    6,    6,    6,    6,
-        6,    6,    6,    6,    6,    6,    6,    6,    6,    6,
-        6,    6,    6,    6,    6,    6,    6,    6,    6,    6,
-        1,    1,    1,    1,    6,    1,   12,    6,    6,   13,
-
-        6,    6,    6,    6,   14,    6,    6,   15,   16,   17,
-       18,   19,    6,   20,   21,   22,   23,   24,   25,   26,
-       27,    6,   28,    1,   29,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1
-    } ;
-
-static const YY_CHAR yy_meta[30] =
-    {   0,
-        1,    1,    2,    1,    1,    3,    3,    3,    3,    1,
-        1,    3,    3,    3,    3,    3,    3,    3,    3,    3,
-        3,    3,    3,    3,    3,    3,    3,    1,    1
-    } ;
-
-static const flex_int16_t yy_base[77] =
-    {   0,
-        0,  101,    0,  100,  104,  107,  101,  107,   98,    0,
-        0,   92,    0,   28,  107,   29,   86,   80,   86,   83,
-       84,  107,  107,    0,   93,   90,   89,    0,    0,   32,
-       30,   31,   33,   34,   42,   71,   69,   70,   69,   73,
-        0,   43,   44,   46,   78,   45,   77,   66,   70,   71,
-       60,   66,   50,   56,   70,   67,   58,   52,   53,   44,
-        0,   57,   52,   46,    0,   50,   34,    0,   45,    0,
-        0,  107,   71,   74,   46,   77
-    } ;
-
-static const flex_int16_t yy_def[77] =
-    {   0,
-       72,    1,    1,    1,   72,   72,   72,   72,   73,   74,
-       75,   75,   75,   72,   72,   72,   75,   75,   75,   75,
-       75,   72,   72,   76,   72,   73,   72,   74,   75,   75,
-       72,   72,   72,   72,   72,   75,   75,   75,   75,   75,
-       76,   72,   75,   72,   72,   72,   72,   75,   75,   75,
-       75,   75,   72,   72,   75,   72,   75,   75,   75,   75,
-       75,   72,   75,   75,   75,   75,   75,   75,   75,   75,
-       75,    0,   72,   72,   72,   72
-    } ;
-
-static const flex_int16_t yy_nxt[137] =
-    {   0,
-        6,    7,    8,    9,   10,   11,   12,   13,   14,   15,
-       16,   11,   17,   11,   11,   11,   11,   18,   19,   11,
-       11,   11,   11,   20,   21,   11,   11,   22,   23,   31,
-       34,   31,   31,   42,   44,   34,   32,   35,   43,   32,
-       30,   45,   35,   46,   42,   54,   46,   44,   29,   53,
-       35,   54,   55,   33,   45,   33,   33,   54,   62,   71,
-       70,   69,   68,   67,   62,   62,   66,   47,   65,   64,
-       47,   26,   63,   26,   28,   56,   28,   41,   55,   41,
-       61,   60,   59,   58,   57,   56,   45,   52,   51,   50,
-       49,   48,   26,   27,   25,   40,   39,   38,   37,   36,
-
-       30,   27,   25,   72,   24,   24,    5,   72,   72,   72,
-       72,   72,   72,   72,   72,   72,   72,   72,   72,   72,
-       72,   72,   72,   72,   72,   72,   72,   72,   72,   72,
-       72,   72,   72,   72,   72,   72
-    } ;
-
-static const flex_int16_t yy_chk[137] =
-    {   0,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,   14,
-       16,   31,   32,   30,   33,   34,   14,   16,   30,   32,
-       30,   33,   34,   35,   42,   43,   46,   44,   75,   42,
-       35,   53,   43,   14,   44,   31,   32,   54,   53,   69,
-       67,   66,   64,   63,   54,   62,   60,   35,   59,   58,
-       46,   73,   57,   73,   74,   56,   74,   76,   55,   76,
-       52,   51,   50,   49,   48,   47,   45,   40,   39,   38,
-       37,   36,   27,   26,   25,   21,   20,   19,   18,   17,
-
-       12,    9,    7,    5,    4,    2,   72,   72,   72,   72,
-       72,   72,   72,   72,   72,   72,   72,   72,   72,   72,
-       72,   72,   72,   72,   72,   72,   72,   72,   72,   72,
-       72,   72,   72,   72,   72,   72
-    } ;
-
-static yy_state_type yy_last_accepting_state;
-static char *yy_last_accepting_cpos;
-
-extern int yy_flex_debug;
-int yy_flex_debug = 0;
-
-/* The intent behind this definition is that it'll catch
- * any uses of REJECT which flex missed.
- */
-#define REJECT reject_used_but_not_detected
-#define yymore() yymore_used_but_not_detected
-#define YY_MORE_ADJ 0
-#define YY_RESTORE_YY_MORE_OFFSET
-char *yytext;
-#line 1 "scanner.l"
-/* $XFree86$ */
-/*
- * Copyright 2002 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-#line 36 "scanner.l"
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#include "dmxparse.h"
-#include "parser.h"
-#include "os.h"
-#include <string.h>
-#include <stdlib.h>
-#include <ctype.h>
-static int getdimension(int token, const char *text, int leng);
-static int getstring(int token, const char *text, int leng);
-static int gettoken(int token, const char *text, int leng);
-static int getcomment(int token, const char *text, int leng);
-static int lineno = 1;
-#line 539 "scanner.c"
-
-#line 541 "scanner.c"
-
-#define INITIAL 0
-#define OTHER 1
-
-#ifndef YY_NO_UNISTD_H
-/* Special case for "unistd.h", since it is non-ANSI. We include it way
- * down here because we want the user's section 1 to have been scanned first.
- * The user has a chance to override it with an option.
- */
-#include <unistd.h>
-#endif
-
-#ifndef YY_EXTRA_TYPE
-#define YY_EXTRA_TYPE void *
-#endif
-
-static int yy_init_globals ( void );
-
-/* Accessor methods to globals.
-   These are made visible to non-reentrant scanners for convenience. */
-
-int yylex_destroy ( void );
-
-int yyget_debug ( void );
-
-void yyset_debug ( int debug_flag  );
-
-YY_EXTRA_TYPE yyget_extra ( void );
-
-void yyset_extra ( YY_EXTRA_TYPE user_defined  );
-
-FILE *yyget_in ( void );
-
-void yyset_in  ( FILE * _in_str  );
-
-FILE *yyget_out ( void );
-
-void yyset_out  ( FILE * _out_str  );
-
-			int yyget_leng ( void );
-
-char *yyget_text ( void );
-
-int yyget_lineno ( void );
-
-void yyset_lineno ( int _line_number  );
-
-/* Macros after this point can all be overridden by user definitions in
- * section 1.
- */
-
-#ifndef YY_SKIP_YYWRAP
-#ifdef __cplusplus
-extern "C" int yywrap ( void );
-#else
-extern int yywrap ( void );
-#endif
-#endif
-
-#ifndef YY_NO_UNPUT
-    
-    static void yyunput ( int c, char *buf_ptr  );
-    
-#endif
-
-#ifndef yytext_ptr
-static void yy_flex_strncpy ( char *, const char *, int );
-#endif
-
-#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen ( const char * );
-#endif
-
-#ifndef YY_NO_INPUT
-#ifdef __cplusplus
-static int yyinput ( void );
-#else
-static int input ( void );
-#endif
-
-#endif
-
-/* Amount of stuff to slurp up with each read. */
-#ifndef YY_READ_BUF_SIZE
-#ifdef __ia64__
-/* On IA-64, the buffer size is 16k, not 8k */
-#define YY_READ_BUF_SIZE 16384
-#else
-#define YY_READ_BUF_SIZE 8192
-#endif /* __ia64__ */
-#endif
-
-/* Copy whatever the last rule matched to the standard output. */
-#ifndef ECHO
-/* This used to be an fputs(), but since the string might contain NUL's,
- * we now use fwrite().
- */
-#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
-#endif
-
-/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
- * is returned in "result".
- */
-#ifndef YY_INPUT
-#define YY_INPUT(buf,result,max_size) \
-	if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
-		{ \
-		int c = '*'; \
-		int n; \
-		for ( n = 0; n < max_size && \
-			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
-			buf[n] = (char) c; \
-		if ( c == '\n' ) \
-			buf[n++] = (char) c; \
-		if ( c == EOF && ferror( yyin ) ) \
-			YY_FATAL_ERROR( "input in flex scanner failed" ); \
-		result = n; \
-		} \
-	else \
-		{ \
-		errno=0; \
-		while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
-			{ \
-			if( errno != EINTR) \
-				{ \
-				YY_FATAL_ERROR( "input in flex scanner failed" ); \
-				break; \
-				} \
-			errno=0; \
-			clearerr(yyin); \
-			} \
-		}\
-\
-
-#endif
-
-/* No semi-colon after return; correct usage is to write "yyterminate();" -
- * we don't want an extra ';' after the "return" because that will cause
- * some compilers to complain about unreachable statements.
- */
-#ifndef yyterminate
-#define yyterminate() return YY_NULL
-#endif
-
-/* Number of entries by which start-condition stack grows. */
-#ifndef YY_START_STACK_INCR
-#define YY_START_STACK_INCR 25
-#endif
-
-/* Report a fatal error. */
-#ifndef YY_FATAL_ERROR
-#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
-#endif
-
-/* end tables serialization structures and prototypes */
-
-/* Default declaration of generated scanner - a define so the user can
- * easily add parameters.
- */
-#ifndef YY_DECL
-#define YY_DECL_IS_OURS 1
-
-extern int yylex (void);
-
-#define YY_DECL int yylex (void)
-#endif /* !YY_DECL */
-
-/* Code executed at the beginning of each rule, after yytext and yyleng
- * have been set up.
- */
-#ifndef YY_USER_ACTION
-#define YY_USER_ACTION
-#endif
-
-/* Code executed at the end of each rule. */
-#ifndef YY_BREAK
-#define YY_BREAK /*LINTED*/break;
-#endif
-
-#define YY_RULE_SETUP \
-	if ( yyleng > 0 ) \
-		YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
-				(yytext[yyleng - 1] == '\n'); \
-	YY_USER_ACTION
-
-/** The main scanner function which does all the work.
- */
-YY_DECL
-{
-	yy_state_type yy_current_state;
-	char *yy_cp, *yy_bp;
-	int yy_act;
-    
-	if ( !(yy_init) )
-		{
-		(yy_init) = 1;
-
-#ifdef YY_USER_INIT
-		YY_USER_INIT;
-#endif
-
-		if ( ! (yy_start) )
-			(yy_start) = 1;	/* first start state */
-
-		if ( ! yyin )
-			yyin = stdin;
-
-		if ( ! yyout )
-			yyout = stdout;
-
-		if ( ! YY_CURRENT_BUFFER ) {
-			yyensure_buffer_stack ();
-			YY_CURRENT_BUFFER_LVALUE =
-				yy_create_buffer( yyin, YY_BUF_SIZE );
-		}
-
-		yy_load_buffer_state(  );
-		}
-
-	{
-#line 63 "scanner.l"
-
-#line 764 "scanner.c"
-
-	while ( /*CONSTCOND*/1 )		/* loops until end-of-file is reached */
-		{
-		yy_cp = (yy_c_buf_p);
-
-		/* Support of yytext. */
-		*yy_cp = (yy_hold_char);
-
-		/* yy_bp points to the position in yy_ch_buf of the start of
-		 * the current run.
-		 */
-		yy_bp = yy_cp;
-
-		yy_current_state = (yy_start);
-		yy_current_state += YY_AT_BOL();
-yy_match:
-		do
-			{
-			YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
-			if ( yy_accept[yy_current_state] )
-				{
-				(yy_last_accepting_state) = yy_current_state;
-				(yy_last_accepting_cpos) = yy_cp;
-				}
-			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
-				{
-				yy_current_state = (int) yy_def[yy_current_state];
-				if ( yy_current_state >= 73 )
-					yy_c = yy_meta[yy_c];
-				}
-			yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
-			++yy_cp;
-			}
-		while ( yy_base[yy_current_state] != 107 );
-
-yy_find_action:
-		yy_act = yy_accept[yy_current_state];
-		if ( yy_act == 0 )
-			{ /* have to back up */
-			yy_cp = (yy_last_accepting_cpos);
-			yy_current_state = (yy_last_accepting_state);
-			yy_act = yy_accept[yy_current_state];
-			}
-
-		YY_DO_BEFORE_ACTION;
-
-do_action:	/* This label is used only to access EOF actions. */
-
-		switch ( yy_act )
-	{ /* beginning of action switch */
-			case 0: /* must back up */
-			/* undo the effects of YY_DO_BEFORE_ACTION */
-			*yy_cp = (yy_hold_char);
-			yy_cp = (yy_last_accepting_cpos);
-			yy_current_state = (yy_last_accepting_state);
-			goto yy_find_action;
-
-case 1:
-YY_RULE_SETUP
-#line 64 "scanner.l"
-return gettoken(T_VIRTUAL, yytext, yyleng);
-	YY_BREAK
-case 2:
-YY_RULE_SETUP
-#line 65 "scanner.l"
-return gettoken(T_DISPLAY, yytext, yyleng);
-	YY_BREAK
-case 3:
-YY_RULE_SETUP
-#line 66 "scanner.l"
-return gettoken(T_WALL, yytext, yyleng);
-	YY_BREAK
-case 4:
-YY_RULE_SETUP
-#line 67 "scanner.l"
-return gettoken(T_OPTION, yytext, yyleng);
-	YY_BREAK
-case 5:
-YY_RULE_SETUP
-#line 68 "scanner.l"
-return gettoken(T_PARAM, yytext, yyleng);
-	YY_BREAK
-case 6:
-YY_RULE_SETUP
-#line 69 "scanner.l"
-return getdimension(T_DIMENSION, yytext, yyleng);
-	YY_BREAK
-case 7:
-YY_RULE_SETUP
-#line 70 "scanner.l"
-return getdimension(T_OFFSET, yytext+1, yyleng-1);
-	YY_BREAK
-case 8:
-YY_RULE_SETUP
-#line 71 "scanner.l"
-return getdimension(T_ORIGIN, yytext+1, yyleng-1);
-	YY_BREAK
-case 9:
-YY_RULE_SETUP
-#line 72 "scanner.l"
-return getstring(T_STRING, yytext, yyleng);
-	YY_BREAK
-case 10:
-YY_RULE_SETUP
-#line 73 "scanner.l"
-return getstring(T_STRING, yytext+1, yyleng-2);
-	YY_BREAK
-case 11:
-/* rule 11 can match eol */
-YY_RULE_SETUP
-#line 74 "scanner.l"
-++lineno;
-	YY_BREAK
-case 12:
-YY_RULE_SETUP
-#line 75 "scanner.l"
-
-	YY_BREAK
-case 13:
-YY_RULE_SETUP
-#line 76 "scanner.l"
-return gettoken(yytext[0], yytext, yyleng);
-	YY_BREAK
-case 14:
-YY_RULE_SETUP
-#line 77 "scanner.l"
-return gettoken(yytext[0], yytext, yyleng);
-	YY_BREAK
-case 15:
-YY_RULE_SETUP
-#line 78 "scanner.l"
-return gettoken(yytext[0], yytext, yyleng);
-	YY_BREAK
-case 16:
-YY_RULE_SETUP
-#line 79 "scanner.l"
-return gettoken(yytext[0], yytext, yyleng);
-	YY_BREAK
-case 17:
-YY_RULE_SETUP
-#line 80 "scanner.l"
-return getcomment(T_LINE_COMMENT, yytext, yyleng);
-	YY_BREAK
-case 18:
-YY_RULE_SETUP
-#line 81 "scanner.l"
-return getcomment(T_COMMENT, yytext, yyleng);
-	YY_BREAK
-case 19:
-YY_RULE_SETUP
-#line 82 "scanner.l"
-return getstring(T_STRING, yytext, yyleng);
-	YY_BREAK
-case YY_STATE_EOF(INITIAL):
-case YY_STATE_EOF(OTHER):
-#line 83 "scanner.l"
-return 0;
-	YY_BREAK
-case 20:
-YY_RULE_SETUP
-#line 84 "scanner.l"
-ECHO;
-	YY_BREAK
-#line 928 "scanner.c"
-
-	case YY_END_OF_BUFFER:
-		{
-		/* Amount of text matched not including the EOB char. */
-		int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
-
-		/* Undo the effects of YY_DO_BEFORE_ACTION. */
-		*yy_cp = (yy_hold_char);
-		YY_RESTORE_YY_MORE_OFFSET
-
-		if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
-			{
-			/* We're scanning a new file or input source.  It's
-			 * possible that this happened because the user
-			 * just pointed yyin at a new source and called
-			 * yylex().  If so, then we have to assure
-			 * consistency between YY_CURRENT_BUFFER and our
-			 * globals.  Here is the right place to do so, because
-			 * this is the first action (other than possibly a
-			 * back-up) that will match for the new input source.
-			 */
-			(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
-			YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
-			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
-			}
-
-		/* Note that here we test for yy_c_buf_p "<=" to the position
-		 * of the first EOB in the buffer, since yy_c_buf_p will
-		 * already have been incremented past the NUL character
-		 * (since all states make transitions on EOB to the
-		 * end-of-buffer state).  Contrast this with the test
-		 * in input().
-		 */
-		if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
-			{ /* This was really a NUL. */
-			yy_state_type yy_next_state;
-
-			(yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
-
-			yy_current_state = yy_get_previous_state(  );
-
-			/* Okay, we're now positioned to make the NUL
-			 * transition.  We couldn't have
-			 * yy_get_previous_state() go ahead and do it
-			 * for us because it doesn't know how to deal
-			 * with the possibility of jamming (and we don't
-			 * want to build jamming into it because then it
-			 * will run more slowly).
-			 */
-
-			yy_next_state = yy_try_NUL_trans( yy_current_state );
-
-			yy_bp = (yytext_ptr) + YY_MORE_ADJ;
-
-			if ( yy_next_state )
-				{
-				/* Consume the NUL. */
-				yy_cp = ++(yy_c_buf_p);
-				yy_current_state = yy_next_state;
-				goto yy_match;
-				}
-
-			else
-				{
-				yy_cp = (yy_c_buf_p);
-				goto yy_find_action;
-				}
-			}
-
-		else switch ( yy_get_next_buffer(  ) )
-			{
-			case EOB_ACT_END_OF_FILE:
-				{
-				(yy_did_buffer_switch_on_eof) = 0;
-
-				if ( yywrap(  ) )
-					{
-					/* Note: because we've taken care in
-					 * yy_get_next_buffer() to have set up
-					 * yytext, we can now set up
-					 * yy_c_buf_p so that if some total
-					 * hoser (like flex itself) wants to
-					 * call the scanner after we return the
-					 * YY_NULL, it'll still work - another
-					 * YY_NULL will get returned.
-					 */
-					(yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
-
-					yy_act = YY_STATE_EOF(YY_START);
-					goto do_action;
-					}
-
-				else
-					{
-					if ( ! (yy_did_buffer_switch_on_eof) )
-						YY_NEW_FILE;
-					}
-				break;
-				}
-
-			case EOB_ACT_CONTINUE_SCAN:
-				(yy_c_buf_p) =
-					(yytext_ptr) + yy_amount_of_matched_text;
-
-				yy_current_state = yy_get_previous_state(  );
-
-				yy_cp = (yy_c_buf_p);
-				yy_bp = (yytext_ptr) + YY_MORE_ADJ;
-				goto yy_match;
-
-			case EOB_ACT_LAST_MATCH:
-				(yy_c_buf_p) =
-				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
-
-				yy_current_state = yy_get_previous_state(  );
-
-				yy_cp = (yy_c_buf_p);
-				yy_bp = (yytext_ptr) + YY_MORE_ADJ;
-				goto yy_find_action;
-			}
-		break;
-		}
-
-	default:
-		YY_FATAL_ERROR(
-			"fatal flex scanner internal error--no action found" );
-	} /* end of action switch */
-		} /* end of scanning one token */
-	} /* end of user's declarations */
-} /* end of yylex */
-
-/* yy_get_next_buffer - try to read in a new buffer
- *
- * Returns a code representing an action:
- *	EOB_ACT_LAST_MATCH -
- *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
- *	EOB_ACT_END_OF_FILE - end of file
- */
-static int yy_get_next_buffer (void)
-{
-    	char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
-	char *source = (yytext_ptr);
-	int number_to_move, i;
-	int ret_val;
-
-	if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
-		YY_FATAL_ERROR(
-		"fatal flex scanner internal error--end of buffer missed" );
-
-	if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
-		{ /* Don't try to fill the buffer, so this is an EOF. */
-		if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
-			{
-			/* We matched a single character, the EOB, so
-			 * treat this as a final EOF.
-			 */
-			return EOB_ACT_END_OF_FILE;
-			}
-
-		else
-			{
-			/* We matched some text prior to the EOB, first
-			 * process it.
-			 */
-			return EOB_ACT_LAST_MATCH;
-			}
-		}
-
-	/* Try to read more data. */
-
-	/* First move last chars to start of buffer. */
-	number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
-
-	for ( i = 0; i < number_to_move; ++i )
-		*(dest++) = *(source++);
-
-	if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
-		/* don't do the read, it's not guaranteed to return an EOF,
-		 * just force an EOF
-		 */
-		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
-
-	else
-		{
-			int num_to_read =
-			YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
-
-		while ( num_to_read <= 0 )
-			{ /* Not enough room in the buffer - grow it. */
-
-			/* just a shorter name for the current buffer */
-			YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
-
-			int yy_c_buf_p_offset =
-				(int) ((yy_c_buf_p) - b->yy_ch_buf);
-
-			if ( b->yy_is_our_buffer )
-				{
-				int new_size = b->yy_buf_size * 2;
-
-				if ( new_size <= 0 )
-					b->yy_buf_size += b->yy_buf_size / 8;
-				else
-					b->yy_buf_size *= 2;
-
-				b->yy_ch_buf = (char *)
-					/* Include room in for 2 EOB chars. */
-					yyrealloc( (void *) b->yy_ch_buf,
-							 (yy_size_t) (b->yy_buf_size + 2)  );
-				}
-			else
-				/* Can't grow it, we don't own it. */
-				b->yy_ch_buf = NULL;
-
-			if ( ! b->yy_ch_buf )
-				YY_FATAL_ERROR(
-				"fatal error - scanner input buffer overflow" );
-
-			(yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
-
-			num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
-						number_to_move - 1;
-
-			}
-
-		if ( num_to_read > YY_READ_BUF_SIZE )
-			num_to_read = YY_READ_BUF_SIZE;
-
-		/* Read in more data. */
-		YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
-			(yy_n_chars), num_to_read );
-
-		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
-		}
-
-	if ( (yy_n_chars) == 0 )
-		{
-		if ( number_to_move == YY_MORE_ADJ )
-			{
-			ret_val = EOB_ACT_END_OF_FILE;
-			yyrestart( yyin  );
-			}
-
-		else
-			{
-			ret_val = EOB_ACT_LAST_MATCH;
-			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
-				YY_BUFFER_EOF_PENDING;
-			}
-		}
-
-	else
-		ret_val = EOB_ACT_CONTINUE_SCAN;
-
-	if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
-		/* Extend the array by 50%, plus the number we really need. */
-		int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
-		YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
-			(void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size  );
-		if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
-			YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
-		/* "- 2" to take care of EOB's */
-		YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
-	}
-
-	(yy_n_chars) += number_to_move;
-	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
-	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
-
-	(yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
-
-	return ret_val;
-}
-
-/* yy_get_previous_state - get the state just before the EOB char was reached */
-
-    static yy_state_type yy_get_previous_state (void)
-{
-	yy_state_type yy_current_state;
-	char *yy_cp;
-    
-	yy_current_state = (yy_start);
-	yy_current_state += YY_AT_BOL();
-
-	for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
-		{
-		YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
-		if ( yy_accept[yy_current_state] )
-			{
-			(yy_last_accepting_state) = yy_current_state;
-			(yy_last_accepting_cpos) = yy_cp;
-			}
-		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
-			{
-			yy_current_state = (int) yy_def[yy_current_state];
-			if ( yy_current_state >= 73 )
-				yy_c = yy_meta[yy_c];
-			}
-		yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
-		}
-
-	return yy_current_state;
-}
-
-/* yy_try_NUL_trans - try to make a transition on the NUL character
- *
- * synopsis
- *	next_state = yy_try_NUL_trans( current_state );
- */
-    static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
-{
-	int yy_is_jam;
-    	char *yy_cp = (yy_c_buf_p);
-
-	YY_CHAR yy_c = 1;
-	if ( yy_accept[yy_current_state] )
-		{
-		(yy_last_accepting_state) = yy_current_state;
-		(yy_last_accepting_cpos) = yy_cp;
-		}
-	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
-		{
-		yy_current_state = (int) yy_def[yy_current_state];
-		if ( yy_current_state >= 73 )
-			yy_c = yy_meta[yy_c];
-		}
-	yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
-	yy_is_jam = (yy_current_state == 72);
-
-		return yy_is_jam ? 0 : yy_current_state;
-}
-
-#ifndef YY_NO_UNPUT
-
-    static void yyunput (int c, char * yy_bp )
-{
-	char *yy_cp;
-    
-    yy_cp = (yy_c_buf_p);
-
-	/* undo effects of setting up yytext */
-	*yy_cp = (yy_hold_char);
-
-	if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
-		{ /* need to shift things up to make room */
-		/* +2 for EOB chars. */
-		int number_to_move = (yy_n_chars) + 2;
-		char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
-					YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
-		char *source =
-				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
-
-		while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
-			*--dest = *--source;
-
-		yy_cp += (int) (dest - source);
-		yy_bp += (int) (dest - source);
-		YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
-			(yy_n_chars) = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
-
-		if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
-			YY_FATAL_ERROR( "flex scanner push-back overflow" );
-		}
-
-	*--yy_cp = (char) c;
-
-	(yytext_ptr) = yy_bp;
-	(yy_hold_char) = *yy_cp;
-	(yy_c_buf_p) = yy_cp;
-}
-
-#endif
-
-#ifndef YY_NO_INPUT
-#ifdef __cplusplus
-    static int yyinput (void)
-#else
-    static int input  (void)
-#endif
-
-{
-	int c;
-    
-	*(yy_c_buf_p) = (yy_hold_char);
-
-	if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
-		{
-		/* yy_c_buf_p now points to the character we want to return.
-		 * If this occurs *before* the EOB characters, then it's a
-		 * valid NUL; if not, then we've hit the end of the buffer.
-		 */
-		if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
-			/* This was really a NUL. */
-			*(yy_c_buf_p) = '\0';
-
-		else
-			{ /* need more input */
-			int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
-			++(yy_c_buf_p);
-
-			switch ( yy_get_next_buffer(  ) )
-				{
-				case EOB_ACT_LAST_MATCH:
-					/* This happens because yy_g_n_b()
-					 * sees that we've accumulated a
-					 * token and flags that we need to
-					 * try matching the token before
-					 * proceeding.  But for input(),
-					 * there's no matching to consider.
-					 * So convert the EOB_ACT_LAST_MATCH
-					 * to EOB_ACT_END_OF_FILE.
-					 */
-
-					/* Reset buffer status. */
-					yyrestart( yyin );
-
-					/*FALLTHROUGH*/
-
-				case EOB_ACT_END_OF_FILE:
-					{
-					if ( yywrap(  ) )
-						return 0;
-
-					if ( ! (yy_did_buffer_switch_on_eof) )
-						YY_NEW_FILE;
-#ifdef __cplusplus
-					return yyinput();
-#else
-					return input();
-#endif
-					}
-
-				case EOB_ACT_CONTINUE_SCAN:
-					(yy_c_buf_p) = (yytext_ptr) + offset;
-					break;
-				}
-			}
-		}
-
-	c = *(unsigned char *) (yy_c_buf_p);	/* cast for 8-bit char's */
-	*(yy_c_buf_p) = '\0';	/* preserve yytext */
-	(yy_hold_char) = *++(yy_c_buf_p);
-
-	YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
-
-	return c;
-}
-#endif	/* ifndef YY_NO_INPUT */
-
-/** Immediately switch to a different input stream.
- * @param input_file A readable stream.
- * 
- * @note This function does not reset the start condition to @c INITIAL .
- */
-    void yyrestart  (FILE * input_file )
-{
-    
-	if ( ! YY_CURRENT_BUFFER ){
-        yyensure_buffer_stack ();
-		YY_CURRENT_BUFFER_LVALUE =
-            yy_create_buffer( yyin, YY_BUF_SIZE );
-	}
-
-	yy_init_buffer( YY_CURRENT_BUFFER, input_file );
-	yy_load_buffer_state(  );
-}
-
-/** Switch to a different input buffer.
- * @param new_buffer The new input buffer.
- * 
- */
-    void yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
-{
-    
-	/* TODO. We should be able to replace this entire function body
-	 * with
-	 *		yypop_buffer_state();
-	 *		yypush_buffer_state(new_buffer);
-     */
-	yyensure_buffer_stack ();
-	if ( YY_CURRENT_BUFFER == new_buffer )
-		return;
-
-	if ( YY_CURRENT_BUFFER )
-		{
-		/* Flush out information for old buffer. */
-		*(yy_c_buf_p) = (yy_hold_char);
-		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
-		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
-		}
-
-	YY_CURRENT_BUFFER_LVALUE = new_buffer;
-	yy_load_buffer_state(  );
-
-	/* We don't actually know whether we did this switch during
-	 * EOF (yywrap()) processing, but the only time this flag
-	 * is looked at is after yywrap() is called, so it's safe
-	 * to go ahead and always set it.
-	 */
-	(yy_did_buffer_switch_on_eof) = 1;
-}
-
-static void yy_load_buffer_state  (void)
-{
-    	(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
-	(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
-	yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
-	(yy_hold_char) = *(yy_c_buf_p);
-}
-
-/** Allocate and initialize an input buffer state.
- * @param file A readable stream.
- * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
- * 
- * @return the allocated buffer state.
- */
-    YY_BUFFER_STATE yy_create_buffer  (FILE * file, int  size )
-{
-	YY_BUFFER_STATE b;
-    
-	b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state )  );
-	if ( ! b )
-		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
-
-	b->yy_buf_size = size;
-
-	/* yy_ch_buf has to be 2 characters longer than the size given because
-	 * we need to put in 2 end-of-buffer characters.
-	 */
-	b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2)  );
-	if ( ! b->yy_ch_buf )
-		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
-
-	b->yy_is_our_buffer = 1;
-
-	yy_init_buffer( b, file );
-
-	return b;
-}
-
-/** Destroy the buffer.
- * @param b a buffer created with yy_create_buffer()
- * 
- */
-    void yy_delete_buffer (YY_BUFFER_STATE  b )
-{
-    
-	if ( ! b )
-		return;
-
-	if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
-		YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
-
-	if ( b->yy_is_our_buffer )
-		yyfree( (void *) b->yy_ch_buf  );
-
-	yyfree( (void *) b  );
-}
-
-/* Initializes or reinitializes a buffer.
- * This function is sometimes called more than once on the same buffer,
- * such as during a yyrestart() or at EOF.
- */
-    static void yy_init_buffer  (YY_BUFFER_STATE  b, FILE * file )
-
-{
-	int oerrno = errno;
-    
-	yy_flush_buffer( b );
-
-	b->yy_input_file = file;
-	b->yy_fill_buffer = 1;
-
-    /* If b is the current buffer, then yy_init_buffer was _probably_
-     * called from yyrestart() or through yy_get_next_buffer.
-     * In that case, we don't want to reset the lineno or column.
-     */
-    if (b != YY_CURRENT_BUFFER){
-        b->yy_bs_lineno = 1;
-        b->yy_bs_column = 0;
-    }
-
-        b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
-    
-	errno = oerrno;
-}
-
-/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
- * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
- * 
- */
-    void yy_flush_buffer (YY_BUFFER_STATE  b )
-{
-    	if ( ! b )
-		return;
-
-	b->yy_n_chars = 0;
-
-	/* We always need two end-of-buffer characters.  The first causes
-	 * a transition to the end-of-buffer state.  The second causes
-	 * a jam in that state.
-	 */
-	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
-	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
-
-	b->yy_buf_pos = &b->yy_ch_buf[0];
-
-	b->yy_at_bol = 1;
-	b->yy_buffer_status = YY_BUFFER_NEW;
-
-	if ( b == YY_CURRENT_BUFFER )
-		yy_load_buffer_state(  );
-}
-
-/** Pushes the new state onto the stack. The new state becomes
- *  the current state. This function will allocate the stack
- *  if necessary.
- *  @param new_buffer The new state.
- *  
- */
-void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
-{
-    	if (new_buffer == NULL)
-		return;
-
-	yyensure_buffer_stack();
-
-	/* This block is copied from yy_switch_to_buffer. */
-	if ( YY_CURRENT_BUFFER )
-		{
-		/* Flush out information for old buffer. */
-		*(yy_c_buf_p) = (yy_hold_char);
-		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
-		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
-		}
-
-	/* Only push if top exists. Otherwise, replace top. */
-	if (YY_CURRENT_BUFFER)
-		(yy_buffer_stack_top)++;
-	YY_CURRENT_BUFFER_LVALUE = new_buffer;
-
-	/* copied from yy_switch_to_buffer. */
-	yy_load_buffer_state(  );
-	(yy_did_buffer_switch_on_eof) = 1;
-}
-
-/** Removes and deletes the top of the stack, if present.
- *  The next element becomes the new top.
- *  
- */
-void yypop_buffer_state (void)
-{
-    	if (!YY_CURRENT_BUFFER)
-		return;
-
-	yy_delete_buffer(YY_CURRENT_BUFFER );
-	YY_CURRENT_BUFFER_LVALUE = NULL;
-	if ((yy_buffer_stack_top) > 0)
-		--(yy_buffer_stack_top);
-
-	if (YY_CURRENT_BUFFER) {
-		yy_load_buffer_state(  );
-		(yy_did_buffer_switch_on_eof) = 1;
-	}
-}
-
-/* Allocates the stack if it does not exist.
- *  Guarantees space for at least one push.
- */
-static void yyensure_buffer_stack (void)
-{
-	yy_size_t num_to_alloc;
-    
-	if (!(yy_buffer_stack)) {
-
-		/* First allocation is just for 2 elements, since we don't know if this
-		 * scanner will even need a stack. We use 2 instead of 1 to avoid an
-		 * immediate realloc on the next call.
-         */
-      num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
-		(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
-								(num_to_alloc * sizeof(struct yy_buffer_state*)
-								);
-		if ( ! (yy_buffer_stack) )
-			YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
-
-		memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
-
-		(yy_buffer_stack_max) = num_to_alloc;
-		(yy_buffer_stack_top) = 0;
-		return;
-	}
-
-	if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
-
-		/* Increase the buffer to prepare for a possible push. */
-		yy_size_t grow_size = 8 /* arbitrary grow size */;
-
-		num_to_alloc = (yy_buffer_stack_max) + grow_size;
-		(yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
-								((yy_buffer_stack),
-								num_to_alloc * sizeof(struct yy_buffer_state*)
-								);
-		if ( ! (yy_buffer_stack) )
-			YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
-
-		/* zero only the new slots.*/
-		memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
-		(yy_buffer_stack_max) = num_to_alloc;
-	}
-}
-
-/** Setup the input buffer state to scan directly from a user-specified character buffer.
- * @param base the character buffer
- * @param size the size in bytes of the character buffer
- * 
- * @return the newly allocated buffer state object.
- */
-YY_BUFFER_STATE yy_scan_buffer  (char * base, yy_size_t  size )
-{
-	YY_BUFFER_STATE b;
-    
-	if ( size < 2 ||
-	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
-	     base[size-1] != YY_END_OF_BUFFER_CHAR )
-		/* They forgot to leave room for the EOB's. */
-		return NULL;
-
-	b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state )  );
-	if ( ! b )
-		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
-
-	b->yy_buf_size = (int) (size - 2);	/* "- 2" to take care of EOB's */
-	b->yy_buf_pos = b->yy_ch_buf = base;
-	b->yy_is_our_buffer = 0;
-	b->yy_input_file = NULL;
-	b->yy_n_chars = b->yy_buf_size;
-	b->yy_is_interactive = 0;
-	b->yy_at_bol = 1;
-	b->yy_fill_buffer = 0;
-	b->yy_buffer_status = YY_BUFFER_NEW;
-
-	yy_switch_to_buffer( b  );
-
-	return b;
-}
-
-/** Setup the input buffer state to scan a string. The next call to yylex() will
- * scan from a @e copy of @a str.
- * @param yystr a NUL-terminated string to scan
- * 
- * @return the newly allocated buffer state object.
- * @note If you want to scan bytes that may contain NUL values, then use
- *       yy_scan_bytes() instead.
- */
-YY_BUFFER_STATE yy_scan_string (const char * yystr )
-{
-    
-	return yy_scan_bytes( yystr, (int) strlen(yystr) );
-}
-
-/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
- * scan from a @e copy of @a bytes.
- * @param yybytes the byte buffer to scan
- * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
- * 
- * @return the newly allocated buffer state object.
- */
-YY_BUFFER_STATE yy_scan_bytes  (const char * yybytes, int  _yybytes_len )
-{
-	YY_BUFFER_STATE b;
-	char *buf;
-	yy_size_t n;
-	int i;
-    
-	/* Get memory for full buffer, including space for trailing EOB's. */
-	n = (yy_size_t) (_yybytes_len + 2);
-	buf = (char *) yyalloc( n  );
-	if ( ! buf )
-		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
-
-	for ( i = 0; i < _yybytes_len; ++i )
-		buf[i] = yybytes[i];
-
-	buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
-
-	b = yy_scan_buffer( buf, n );
-	if ( ! b )
-		YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
-
-	/* It's okay to grow etc. this buffer, and we should throw it
-	 * away when we're done.
-	 */
-	b->yy_is_our_buffer = 1;
-
-	return b;
-}
-
-#ifndef YY_EXIT_FAILURE
-#define YY_EXIT_FAILURE 2
-#endif
-
-static void yynoreturn yy_fatal_error (const char* msg )
-{
-			fprintf( stderr, "%s\n", msg );
-	exit( YY_EXIT_FAILURE );
-}
-
-/* Redefine yyless() so it works in section 3 code. */
-
-#undef yyless
-#define yyless(n) \
-	do \
-		{ \
-		/* Undo effects of setting up yytext. */ \
-        int yyless_macro_arg = (n); \
-        YY_LESS_LINENO(yyless_macro_arg);\
-		yytext[yyleng] = (yy_hold_char); \
-		(yy_c_buf_p) = yytext + yyless_macro_arg; \
-		(yy_hold_char) = *(yy_c_buf_p); \
-		*(yy_c_buf_p) = '\0'; \
-		yyleng = yyless_macro_arg; \
-		} \
-	while ( 0 )
-
-/* Accessor  methods (get/set functions) to struct members. */
-
-/** Get the current line number.
- * 
- */
-int yyget_lineno  (void)
-{
-    
-    return yylineno;
-}
-
-/** Get the input stream.
- * 
- */
-FILE *yyget_in  (void)
-{
-        return yyin;
-}
-
-/** Get the output stream.
- * 
- */
-FILE *yyget_out  (void)
-{
-        return yyout;
-}
-
-/** Get the length of the current token.
- * 
- */
-int yyget_leng  (void)
-{
-        return yyleng;
-}
-
-/** Get the current token.
- * 
- */
-
-char *yyget_text  (void)
-{
-        return yytext;
-}
-
-/** Set the current line number.
- * @param _line_number line number
- * 
- */
-void yyset_lineno (int  _line_number )
-{
-    
-    yylineno = _line_number;
-}
-
-/** Set the input stream. This does not discard the current
- * input buffer.
- * @param _in_str A readable stream.
- * 
- * @see yy_switch_to_buffer
- */
-void yyset_in (FILE *  _in_str )
-{
-        yyin = _in_str ;
-}
-
-void yyset_out (FILE *  _out_str )
-{
-        yyout = _out_str ;
-}
-
-int yyget_debug  (void)
-{
-        return yy_flex_debug;
-}
-
-void yyset_debug (int  _bdebug )
-{
-        yy_flex_debug = _bdebug ;
-}
-
-static int yy_init_globals (void)
-{
-        /* Initialization is the same as for the non-reentrant scanner.
-     * This function is called from yylex_destroy(), so don't allocate here.
-     */
-
-    (yy_buffer_stack) = NULL;
-    (yy_buffer_stack_top) = 0;
-    (yy_buffer_stack_max) = 0;
-    (yy_c_buf_p) = NULL;
-    (yy_init) = 0;
-    (yy_start) = 0;
-
-/* Defined in main.c */
-#ifdef YY_STDINIT
-    yyin = stdin;
-    yyout = stdout;
-#else
-    yyin = NULL;
-    yyout = NULL;
-#endif
-
-    /* For future reference: Set errno on error, since we are called by
-     * yylex_init()
-     */
-    return 0;
-}
-
-/* yylex_destroy is for both reentrant and non-reentrant scanners. */
-int yylex_destroy  (void)
-{
-    
-    /* Pop the buffer stack, destroying each element. */
-	while(YY_CURRENT_BUFFER){
-		yy_delete_buffer( YY_CURRENT_BUFFER  );
-		YY_CURRENT_BUFFER_LVALUE = NULL;
-		yypop_buffer_state();
-	}
-
-	/* Destroy the stack itself. */
-	yyfree((yy_buffer_stack) );
-	(yy_buffer_stack) = NULL;
-
-    /* Reset the globals. This is important in a non-reentrant scanner so the next time
-     * yylex() is called, initialization will occur. */
-    yy_init_globals( );
-
-    return 0;
-}
-
-/*
- * Internal utility routines.
- */
-
-#ifndef yytext_ptr
-static void yy_flex_strncpy (char* s1, const char * s2, int n )
-{
-		
-	int i;
-	for ( i = 0; i < n; ++i )
-		s1[i] = s2[i];
-}
-#endif
-
-#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (const char * s )
-{
-	int n;
-	for ( n = 0; s[n]; ++n )
-		;
-
-	return n;
-}
-#endif
-
-void *yyalloc (yy_size_t  size )
-{
-			return malloc(size);
-}
-
-void *yyrealloc  (void * ptr, yy_size_t  size )
-{
-		
-	/* The cast to (char *) in the following accommodates both
-	 * implementations that use char* generic pointers, and those
-	 * that use void* generic pointers.  It works with the latter
-	 * because both ANSI C and C++ allow castless assignment from
-	 * any pointer type to void*, and deal with argument conversions
-	 * as though doing an assignment.
-	 */
-	return realloc(ptr, size);
-}
-
-void yyfree (void * ptr )
-{
-			free( (char *) ptr );	/* see yyrealloc() for (char *) cast */
-}
-
-#define YYTABLES_NAME "yytables"
-
-#line 84 "scanner.l"
-
-int yywrap(void)
-{
-    (void) &yyunput;
-    (void) &input;
-    return 1;
-}
-
-_X_NORETURN void yyerror(const char *message)
-{
-    const char *pt, *end;
-    struct _entry {
-        const char *from;
-        const char *to;
-    } *entry, list[] = {
-        { "T_VIRTUAL",      "\"virtual\"" },
-        { "T_DISPLAY",      "\"display\"" },
-        { "T_WALL",         "\"wall\"" },
-        { "T_OPTION",       "\"option\"" },
-        { "T_PARAM",        "\"param\"" },
-        { "T_DIMENSION",    "dimension (e.g., 2x2 or 1024x768)" },
-        { "T_OFFSET",       "display offset (e.g., +10-10)" },
-        { "T_ORIGIN",       "tile origin (e.g., @1280x1024)" },
-        { "T_STRING",       "string" },
-        { "T_COMMENT",      "comment (e.g., #...)" },
-        { "T_LINE_COMMENT", "comment (e.g., #...)" },
-        { NULL, NULL }
-    };
-    
-    fprintf(stderr, "parse error on line %d at token \"%*.*s\"\n",
-            lineno, (int)yyleng, (int)yyleng, yytext);
-    end = message + strlen(message);
-    for (pt = message; *pt; pt++) {
-        if (pt[0] == 'T' && pt[1] == '_') {
-            const char *next = strchr(pt, ' ');
-            if (!next || !*next) next = strchr(pt, '\0');
-            if (!next) goto bail;
-            --next;
-            if (next-pt == 1 && next[1]
-                && next[2] == '\'' && next[3] == '\'') {
-                fprintf(stderr, "\"%c\"", next[1]);
-                pt += 4;
-                goto cnt;
-            }
-            for (entry = list; entry->from; ++entry) {
-                if (!strncmp(entry->from, pt, strlen(entry->from))) {
-                    fprintf(stderr, "%s", entry->to);
-                    pt = next;
-                    goto cnt;
-                }
-            }
-        } else if (end-pt >= 5 && pt[0] == '\'' && pt[1] == '\'' && pt[3]
-                   && pt[4] == '\'' && pt[5] == '\'') {
-            fprintf(stderr, "\"%c\"", pt[3]);
-            pt += 5;
-        } else if (end-pt >= 3 && pt[0] == '\'' && pt[1] && pt[2] == '\'') {
-            fprintf(stderr, "\"%c\"", pt[1]);
-            pt += 3;
-        }
-      bail:
-        putc(*pt, stderr);
-      cnt:
-        ;
-    }
-    fprintf(stderr, "\n");
-    exit( 1 );
-}
-
-static int getdimension(int token, const char *text, int leng)
-{
-    char *endptr;
-    char *tmp = dmxConfigAlloc(leng+1);
-    int  x, y;
-
-    strlcpy(tmp, text, leng+1);
-    x = strtol(tmp, &endptr, 10);
-    while (*endptr && !isdigit(*endptr)) ++endptr;
-    y = strtol(endptr, NULL, 10);
-    dmxConfigFree(tmp);
-    yylval.pair = dmxConfigCreatePair(token, lineno, NULL, x, y, 1, 1);
-    return token;
-}
-
-static int getstring(int token, const char *text, int leng)
-{
-    yylval.string = dmxConfigCreateString(token, lineno, NULL,
-                                          dmxConfigCopyString(leng ? text : "",
-                                                              leng));
-    return token;
-}
-
-static int gettoken(int token, const char *text, int leng)
-{
-    yylval.token = dmxConfigCreateToken(token, lineno, NULL);
-    return token;
-}
-
-static int getcomment(int token, const char *text, int leng)
-{
-    yylval.comment = dmxConfigCreateComment(token, lineno,
-                                            dmxConfigCopyString(text + 1,
-                                                                leng - 1));
-    return token;
-}
-
diff --git a/hw/dmx/config/scanner.l b/hw/dmx/config/scanner.l
deleted file mode 100644
index 3688fd7..0000000
--- a/hw/dmx/config/scanner.l
+++ /dev/null
@@ -1,187 +0,0 @@
-/* $XFree86$ */
-/*
- * Copyright 2002 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-%{
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#include "dmxparse.h"
-#include "parser.h"
-#include "os.h"
-#include <string.h>
-#include <stdlib.h>
-#include <ctype.h>
-static int getdimension(int token, const char *text, int leng);
-static int getstring(int token, const char *text, int leng);
-static int gettoken(int token, const char *text, int leng);
-static int getcomment(int token, const char *text, int leng);
-static int lineno = 1;
-%}
-%s OTHER
-comment         #.*
-word            ([[:alpha:]_/:\-\+\.\*][[:alnum:]_/:\-\+\.\*]+)
-string          \"(([^\"\n])|\"\")*\"
-badstring       \"(([^\"\n])|\"\")*
-number          [[:digit:]x]+
-dimension       [[:digit:]]+[[:blank:]]*x[[:blank:]]*[[:digit:]]+
-offset          [+-][[:digit:]]+[[:blank:]]*[+-][[:blank:]]*[[:digit:]]+
-origin          @[[:blank:]]*[[:digit:]]+[[:blank:]]*[[:blank:]]*x[[:digit:]]+
-NL              \n
-WS              [[:blank:]]+
-%%              
-virtual         return gettoken(T_VIRTUAL, yytext, yyleng);
-display         return gettoken(T_DISPLAY, yytext, yyleng);
-wall            return gettoken(T_WALL, yytext, yyleng);
-option          return gettoken(T_OPTION, yytext, yyleng);
-param           return gettoken(T_PARAM, yytext, yyleng);
-{dimension}     return getdimension(T_DIMENSION, yytext, yyleng);
-{offset}        return getdimension(T_OFFSET, yytext+1, yyleng-1);
-{origin}        return getdimension(T_ORIGIN, yytext+1, yyleng-1);
-{word}          return getstring(T_STRING, yytext, yyleng);
-{string}        return getstring(T_STRING, yytext+1, yyleng-2);
-{NL}            ++lineno;
-{WS}            
-\{              return gettoken(yytext[0], yytext, yyleng);
-\}              return gettoken(yytext[0], yytext, yyleng);
-\;              return gettoken(yytext[0], yytext, yyleng);
-\/              return gettoken(yytext[0], yytext, yyleng);
-^{comment}      return getcomment(T_LINE_COMMENT, yytext, yyleng);
-{comment}       return getcomment(T_COMMENT, yytext, yyleng);
-.               return getstring(T_STRING, yytext, yyleng);
-<<EOF>>         return 0;
-%%
-int yywrap(void)
-{
-    (void) &yyunput;
-    (void) &input;
-    return 1;
-}
-
-_X_NORETURN void yyerror(const char *message)
-{
-    const char *pt, *end;
-    struct _entry {
-        const char *from;
-        const char *to;
-    } *entry, list[] = {
-        { "T_VIRTUAL",      "\"virtual\"" },
-        { "T_DISPLAY",      "\"display\"" },
-        { "T_WALL",         "\"wall\"" },
-        { "T_OPTION",       "\"option\"" },
-        { "T_PARAM",        "\"param\"" },
-        { "T_DIMENSION",    "dimension (e.g., 2x2 or 1024x768)" },
-        { "T_OFFSET",       "display offset (e.g., +10-10)" },
-        { "T_ORIGIN",       "tile origin (e.g., @1280x1024)" },
-        { "T_STRING",       "string" },
-        { "T_COMMENT",      "comment (e.g., #...)" },
-        { "T_LINE_COMMENT", "comment (e.g., #...)" },
-        { NULL, NULL }
-    };
-    
-    fprintf(stderr, "parse error on line %d at token \"%*.*s\"\n",
-            lineno, (int)yyleng, (int)yyleng, yytext);
-    end = message + strlen(message);
-    for (pt = message; *pt; pt++) {
-        if (pt[0] == 'T' && pt[1] == '_') {
-            const char *next = strchr(pt, ' ');
-            if (!next || !*next) next = strchr(pt, '\0');
-            if (!next) goto bail;
-            --next;
-            if (next-pt == 1 && next[1]
-                && next[2] == '\'' && next[3] == '\'') {
-                fprintf(stderr, "\"%c\"", next[1]);
-                pt += 4;
-                goto cnt;
-            }
-            for (entry = list; entry->from; ++entry) {
-                if (!strncmp(entry->from, pt, strlen(entry->from))) {
-                    fprintf(stderr, "%s", entry->to);
-                    pt = next;
-                    goto cnt;
-                }
-            }
-        } else if (end-pt >= 5 && pt[0] == '\'' && pt[1] == '\'' && pt[3]
-                   && pt[4] == '\'' && pt[5] == '\'') {
-            fprintf(stderr, "\"%c\"", pt[3]);
-            pt += 5;
-        } else if (end-pt >= 3 && pt[0] == '\'' && pt[1] && pt[2] == '\'') {
-            fprintf(stderr, "\"%c\"", pt[1]);
-            pt += 3;
-        }
-      bail:
-        putc(*pt, stderr);
-      cnt:
-        ;
-    }
-    fprintf(stderr, "\n");
-    exit( 1 );
-}
-
-static int getdimension(int token, const char *text, int leng)
-{
-    char *endptr;
-    char *tmp = dmxConfigAlloc(leng+1);
-    int  x, y;
-
-    strlcpy(tmp, text, leng+1);
-    x = strtol(tmp, &endptr, 10);
-    while (*endptr && !isdigit(*endptr)) ++endptr;
-    y = strtol(endptr, NULL, 10);
-    dmxConfigFree(tmp);
-    yylval.pair = dmxConfigCreatePair(token, lineno, NULL, x, y, 1, 1);
-    return token;
-}
-
-static int getstring(int token, const char *text, int leng)
-{
-    yylval.string = dmxConfigCreateString(token, lineno, NULL,
-                                          dmxConfigCopyString(leng ? text : "",
-                                                              leng));
-    return token;
-}
-
-static int gettoken(int token, const char *text, int leng)
-{
-    yylval.token = dmxConfigCreateToken(token, lineno, NULL);
-    return token;
-}
-
-static int getcomment(int token, const char *text, int leng)
-{
-    yylval.comment = dmxConfigCreateComment(token, lineno,
-                                            dmxConfigCopyString(text + 1,
-                                                                leng - 1));
-    return token;
-}
diff --git a/hw/dmx/config/test-a.in b/hw/dmx/config/test-a.in
deleted file mode 100644
index 8276753..0000000
--- a/hw/dmx/config/test-a.in
+++ /dev/null
@@ -1 +0,0 @@
-error
diff --git a/hw/dmx/config/test-a.out b/hw/dmx/config/test-a.out
deleted file mode 100644
index d35b29f..0000000
--- a/hw/dmx/config/test-a.out
+++ /dev/null
@@ -1,2 +0,0 @@
-parse error on line 1 at token "error"
-syntax error, unexpected string expecting "virtual" or comment (e.g., #...)
diff --git a/hw/dmx/config/test-b.in b/hw/dmx/config/test-b.in
deleted file mode 100644
index 308ec1d..0000000
--- a/hw/dmx/config/test-b.in
+++ /dev/null
@@ -1 +0,0 @@
-# comment
diff --git a/hw/dmx/config/test-b.out b/hw/dmx/config/test-b.out
deleted file mode 100644
index 308ec1d..0000000
--- a/hw/dmx/config/test-b.out
+++ /dev/null
@@ -1 +0,0 @@
-# comment
diff --git a/hw/dmx/config/test-c.in b/hw/dmx/config/test-c.in
deleted file mode 100644
index e07ae5b..0000000
--- a/hw/dmx/config/test-c.in
+++ /dev/null
@@ -1 +0,0 @@
-virtual
diff --git a/hw/dmx/config/test-c.out b/hw/dmx/config/test-c.out
deleted file mode 100644
index 7390397..0000000
--- a/hw/dmx/config/test-c.out
+++ /dev/null
@@ -1,2 +0,0 @@
-parse error on line 2 at token " "
-syntax error, unexpected $end, expecting "{" or string or dimension (e.g., 2x2 or 1024x768)
diff --git a/hw/dmx/config/test-d.in b/hw/dmx/config/test-d.in
deleted file mode 100644
index 6827503..0000000
--- a/hw/dmx/config/test-d.in
+++ /dev/null
@@ -1 +0,0 @@
-display
diff --git a/hw/dmx/config/test-d.out b/hw/dmx/config/test-d.out
deleted file mode 100644
index f3219b3..0000000
--- a/hw/dmx/config/test-d.out
+++ /dev/null
@@ -1,2 +0,0 @@
-parse error on line 1 at token "display"
-syntax error, unexpected "display" expecting "virtual" or comment (e.g., #...)
diff --git a/hw/dmx/config/test-e.in b/hw/dmx/config/test-e.in
deleted file mode 100644
index 21dbde9..0000000
--- a/hw/dmx/config/test-e.in
+++ /dev/null
@@ -1 +0,0 @@
-display;
diff --git a/hw/dmx/config/test-e.out b/hw/dmx/config/test-e.out
deleted file mode 100644
index f3219b3..0000000
--- a/hw/dmx/config/test-e.out
+++ /dev/null
@@ -1,2 +0,0 @@
-parse error on line 1 at token "display"
-syntax error, unexpected "display" expecting "virtual" or comment (e.g., #...)
diff --git a/hw/dmx/config/test-f.in b/hw/dmx/config/test-f.in
deleted file mode 100644
index 17f6c63..0000000
--- a/hw/dmx/config/test-f.in
+++ /dev/null
@@ -1,2 +0,0 @@
-virtual {
-}
diff --git a/hw/dmx/config/test-f.out b/hw/dmx/config/test-f.out
deleted file mode 100644
index ba3f441d767f75b551cddc6c713cfca845a112af..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 69
zcmXR&EGkY_NG&SLFH*?QQ^?88OI0vZNGwq($<I#BQ&6f^;wrApD@m+?sL@d<%}cE)
SNKGzDO#w+VII(fmasdEL1Qy5u

diff --git a/hw/dmx/config/test-g.in b/hw/dmx/config/test-g.in
deleted file mode 100644
index 453d812..0000000
--- a/hw/dmx/config/test-g.in
+++ /dev/null
@@ -1,4 +0,0 @@
-virtual a {
-    display d0:0 1280x1024;
-    display d1:0 1280x1024;
-}
diff --git a/hw/dmx/config/test-g.out b/hw/dmx/config/test-g.out
deleted file mode 100644
index 453d812..0000000
--- a/hw/dmx/config/test-g.out
+++ /dev/null
@@ -1,4 +0,0 @@
-virtual a {
-    display d0:0 1280x1024;
-    display d1:0 1280x1024;
-}
diff --git a/hw/dmx/config/test-h.in b/hw/dmx/config/test-h.in
deleted file mode 100644
index 1193d30..0000000
--- a/hw/dmx/config/test-h.in
+++ /dev/null
@@ -1,7 +0,0 @@
-# comment a
-# comment b
-## comment c
-#	<-- tab
-# Next comment is empty
-#
-# Non empty
diff --git a/hw/dmx/config/test-h.out b/hw/dmx/config/test-h.out
deleted file mode 100644
index 1193d30..0000000
--- a/hw/dmx/config/test-h.out
+++ /dev/null
@@ -1,7 +0,0 @@
-# comment a
-# comment b
-## comment c
-#	<-- tab
-# Next comment is empty
-#
-# Non empty
diff --git a/hw/dmx/config/test-i.in b/hw/dmx/config/test-i.in
deleted file mode 100644
index b65967e..0000000
--- a/hw/dmx/config/test-i.in
+++ /dev/null
@@ -1,3 +0,0 @@
-virtual a {
-    param a b; # comment
-}
diff --git a/hw/dmx/config/test-i.out b/hw/dmx/config/test-i.out
deleted file mode 100644
index b65967e..0000000
--- a/hw/dmx/config/test-i.out
+++ /dev/null
@@ -1,3 +0,0 @@
-virtual a {
-    param a b; # comment
-}
diff --git a/hw/dmx/config/test-j.in b/hw/dmx/config/test-j.in
deleted file mode 100644
index cc1cdd0..0000000
--- a/hw/dmx/config/test-j.in
+++ /dev/null
@@ -1,13 +0,0 @@
-virtual a {
-    option aaa # bbb
-           aa cc;
-    param { # comment 1
-        a b;
-        c d;
-        x y z; # comment 2
-    }
-    param e f g h; # comment 3
-    param e f g hlskdjflskdfjsd #comment 4
-     flksdjf sldkfjsldkfjsdlf
-    "lsdkfjsldkfjlsdkjflskdjflsdkjfl" "lkjsdlfjsdlfkjsdlfj";
-}
diff --git a/hw/dmx/config/test-j.out b/hw/dmx/config/test-j.out
deleted file mode 100644
index 9acaa00..0000000
--- a/hw/dmx/config/test-j.out
+++ /dev/null
@@ -1,11 +0,0 @@
-virtual a {
-    option "aaa aa cc";
-    param { # comment 1
-            a b;
-            c d;
-            x y z; # comment 2
-    }
-    param e f g h; # comment 3
-    param e f g hlskdjflskdfjsd #comment 4
-        flksdjf sldkfjsldkfjsdlf lsdkfjsldkfjlsdkjflskdjflsdkjfl lkjsdlfjsdlfkjsdlfj;
-}
diff --git a/hw/dmx/config/test-k.in b/hw/dmx/config/test-k.in
deleted file mode 100644
index 2218d26..0000000
--- a/hw/dmx/config/test-k.in
+++ /dev/null
@@ -1,3 +0,0 @@
-virtual a {
-    option +xinerama -syncbatch 0;
-}
diff --git a/hw/dmx/config/test-k.out b/hw/dmx/config/test-k.out
deleted file mode 100644
index ebd7439..0000000
--- a/hw/dmx/config/test-k.out
+++ /dev/null
@@ -1,3 +0,0 @@
-virtual a {
-    option "+xinerama -syncbatch 0";
-}
diff --git a/hw/dmx/config/test-l.in b/hw/dmx/config/test-l.in
deleted file mode 100644
index 7bf0513..0000000
--- a/hw/dmx/config/test-l.in
+++ /dev/null
@@ -1,12 +0,0 @@
-virtual a {
-    display d0:0 1x2;
-    display d1:0 +3+4;
-    display d2:0 100x200 @1x1;
-    display d3:0 +3+4 @2x2;
-    display d4:0 100x200+3+4 @3x3;
-    display d5:0 / 1x2+3+4;
-    display d6:0 / 1x2;
-    display d7:0 / +3+4;
-    display d8:0 / 1x2+3+4 @4x4;
-    display d9:0 11x22+33+44 / 111x222+333+444 @1000x1100;
-}
diff --git a/hw/dmx/config/test-l.out b/hw/dmx/config/test-l.out
deleted file mode 100644
index 7bf0513..0000000
--- a/hw/dmx/config/test-l.out
+++ /dev/null
@@ -1,12 +0,0 @@
-virtual a {
-    display d0:0 1x2;
-    display d1:0 +3+4;
-    display d2:0 100x200 @1x1;
-    display d3:0 +3+4 @2x2;
-    display d4:0 100x200+3+4 @3x3;
-    display d5:0 / 1x2+3+4;
-    display d6:0 / 1x2;
-    display d7:0 / +3+4;
-    display d8:0 / 1x2+3+4 @4x4;
-    display d9:0 11x22+33+44 / 111x222+333+444 @1000x1100;
-}
diff --git a/hw/dmx/config/vdltodmx.c b/hw/dmx/config/vdltodmx.c
deleted file mode 100644
index 007416b..0000000
--- a/hw/dmx/config/vdltodmx.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright 2002 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-#include "dmxconfig.h"
-#include "dmxparse.h"
-#include "dmxprint.h"
-#include "dmxcompat.h"
-
-int
-main(int argc, char **argv)
-{
-    DMXConfigEntryPtr entry;
-    FILE *str;
-
-    if (argc != 2 && argc != 3) {
-        fprintf(stderr, "Usage: vdltodmx inFile [outFile]\n");
-        return 1;
-    }
-    if (argc == 2) {
-        str = stdout;
-    }
-    else if (!(str = fopen(argv[2], "w"))) {
-        fprintf(stderr, "Cannot open %s for write\n", argv[2]);
-        return 2;
-    }
-    entry = dmxVDLRead(argv[1]);
-    dmxConfigPrint(str, entry);
-    return 0;
-}
diff --git a/hw/dmx/config/xdmxconfig.c b/hw/dmx/config/xdmxconfig.c
deleted file mode 100644
index 05d8396..0000000
--- a/hw/dmx/config/xdmxconfig.c
+++ /dev/null
@@ -1,1232 +0,0 @@
-/*
- * Copyright 2002 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <X11/Intrinsic.h>
-#include <X11/StringDefs.h>
-#include <X11/Xaw/Form.h>
-#include <X11/Xaw/Box.h>
-/* #include <X11/Xaw/Paned.h> */
-#include <X11/Xaw/Command.h>
-#include <X11/Xaw/SimpleMenu.h>
-#include <X11/Xaw/SmeBSB.h>
-#include <X11/Xaw/MenuButton.h>
-#include <X11/Xaw/Viewport.h>
-#include <X11/Xaw/Dialog.h>
-#include <X11/keysym.h>
-#include "Canvas.h"
-
-#include "dmxparse.h"
-#include "dmxprint.h"
-#include "dmxlog.h"
-
-extern int yyparse(void);
-extern int yydebug;
-extern FILE *yyin;
-
-#define DMX_INFO "xdmxconfig v0.9\nCopyright 2002 Red Hat Inc.\n"
-
-#define DMX_MAIN_WIDTH    800
-#define DMX_MAIN_HEIGHT   600
-#define DMX_DATA_WIDTH    200
-#define DMX_DATA_HEIGHT   200
-#define DMX_CANVAS_WIDTH  400
-#define DMX_CANVAS_HEIGHT 500
-
-extern DMXConfigEntryPtr dmxConfigEntry;
-static DMXConfigVirtualPtr dmxConfigCurrent, dmxConfigNewVirtual;
-static DMXConfigDisplayPtr dmxConfigCurrentDisplay, dmxConfigNewDisplay;
-static int dmxConfigGrabbed, dmxConfigGrabbedFine;
-static int dmxConfigGrabbedX, dmxConfigGrabbedY;
-static char *dmxConfigFilename;
-static GC dmxConfigGC, dmxConfigGCRev, dmxConfigGCHL;
-static int dmxConfigGCInit = 0;
-static Dimension dmxConfigWidgetWidth, dmxConfigWidgetHeight;
-static Dimension dmxConfigWallWidth, dmxConfigWallHeight;
-static double dmxConfigScaleX, dmxConfigScaleY;
-static int dmxConfigNotSaved;
-static enum {
-    dmxConfigStateOpen,
-    dmxConfigStateSave
-} dmxConfigState;
-
-/* Global widgets */
-static Widget canvas;
-static Widget cnamebox, cdimbox;
-static Widget openpopup, opendialog;
-static Widget namebox, dimbox, rtbox, origbox;
-static Widget okbutton, buttonpopup;
-static Widget ecbutton, dcbutton;
-static Widget ndbutton0, ndbutton1, edbutton, ddbutton;
-static Widget ecpopup, ecdialog0, ecdialog1;
-static Widget edpopup, eddialog0, eddialog1, eddialog2;
-static Widget aboutpopup, quitpopup;
-
-static void
-dmxConfigCanvasGCs(void)
-{
-    Display *dpy = XtDisplay(canvas);
-    Window win = XtWindow(canvas);
-    XGCValues gcvals;
-    unsigned long mask;
-    Colormap colormap;
-    XColor fg, bg, hl, tmp;
-
-    if (dmxConfigGCInit++)
-        return;
-
-    XtVaGetValues(canvas, XtNcolormap, &colormap, NULL);
-    XAllocNamedColor(XtDisplay(canvas), colormap, "black", &bg, &tmp);
-    XAllocNamedColor(XtDisplay(canvas), colormap, "white", &fg, &tmp);
-    XAllocNamedColor(XtDisplay(canvas), colormap, "red", &hl, &tmp);
-
-    mask = (GCFunction | GCPlaneMask | GCClipMask | GCForeground |
-            GCBackground | GCLineWidth | GCLineStyle | GCCapStyle |
-            GCFillStyle);
-
-    /* FIXME: copy this from widget */
-    gcvals.function = GXcopy;
-    gcvals.plane_mask = AllPlanes;
-    gcvals.clip_mask = None;
-    gcvals.foreground = fg.pixel;
-    gcvals.background = bg.pixel;
-    gcvals.line_width = 0;
-    gcvals.line_style = LineSolid;
-    gcvals.cap_style = CapNotLast;
-    gcvals.fill_style = FillSolid;
-
-    dmxConfigGC = XCreateGC(dpy, win, mask, &gcvals);
-    gcvals.foreground = hl.pixel;
-    dmxConfigGCHL = XCreateGC(dpy, win, mask, &gcvals);
-    gcvals.foreground = bg.pixel;
-    gcvals.background = fg.pixel;
-    dmxConfigGCRev = XCreateGC(dpy, win, mask, &gcvals);
-}
-
-static void
-dmxConfigGetDims(int *maxWidth, int *maxHeight)
-{
-    DMXConfigSubPtr pt;
-    DMXConfigEntryPtr e;
-
-    *maxWidth = dmxConfigWallWidth = 0;
-    *maxHeight = dmxConfigWallHeight = 0;
-    if (!dmxConfigCurrent)
-        return;
-
-    dmxConfigWallWidth = dmxConfigCurrent->width;
-    dmxConfigWallHeight = dmxConfigCurrent->height;
-    if (!dmxConfigWallWidth || !dmxConfigWallHeight) {
-        for (pt = dmxConfigCurrent->subentry; pt; pt = pt->next) {
-            if (pt->type == dmxConfigDisplay) {
-                int x = pt->display->scrnWidth + pt->display->rootXOrigin;
-                int y = pt->display->scrnHeight + pt->display->rootYOrigin;
-
-                if (x > dmxConfigWallWidth)
-                    dmxConfigWallWidth = x;
-                if (y > dmxConfigWallHeight)
-                    dmxConfigWallHeight = y;
-            }
-        }
-    }
-    /* Compute maximums */
-    *maxWidth = *maxHeight = 0;
-    for (e = dmxConfigEntry; e; e = e->next) {
-        if (e->type != dmxConfigVirtual)
-            continue;
-        for (pt = e->virtual->subentry; pt; pt = pt->next) {
-            if (pt->type == dmxConfigDisplay) {
-                int x = pt->display->scrnWidth + pt->display->rootXOrigin;
-                int y = pt->display->scrnHeight + pt->display->rootYOrigin;
-
-                if (x > *maxWidth)
-                    *maxWidth = x;
-                if (y > *maxHeight)
-                    *maxHeight = y;
-            }
-        }
-    }
-    if (dmxConfigWallWidth > *maxWidth)
-        *maxWidth = dmxConfigWallWidth;
-    if (dmxConfigWallHeight > *maxHeight)
-        *maxHeight = dmxConfigWallHeight;
-}
-
-static int
-scalex(int x)
-{
-    return (int) ((x * dmxConfigScaleX) + .5);
-}
-
-static int
-scaley(int y)
-{
-    return (int) ((y * dmxConfigScaleY) + .5);
-}
-
-static int
-unscalex(int x)
-{
-    return (int) ((x / dmxConfigScaleX) + .5);
-}
-
-static int
-unscaley(int y)
-{
-    return (int) ((y / dmxConfigScaleY) + .5);
-}
-
-static void
-dmxConfigDataUpdate(void)
-{
-    /* FIXME: could result in buffer overflows */
-    char cnambuf[512];
-    char cdimbuf[128];
-    char nambuf[512];
-    char dimbuf[128];
-    char rtbuf[128];
-    char offbuf[128];
-    const char *name;
-
-    if (!dmxConfigCurrent) {
-        XtVaSetValues(cnamebox, XtNlabel, "", XtNsensitive, False, NULL);
-        XtVaSetValues(cdimbox, XtNlabel, "", XtNsensitive, False, NULL);
-        XtVaSetValues(ecbutton, XtNsensitive, False, NULL);
-        XtVaSetValues(dcbutton, XtNsensitive, False, NULL);
-        XtVaSetValues(ndbutton0, XtNsensitive, False, NULL);
-        XtVaSetValues(ndbutton1, XtNsensitive, False, NULL);
-    }
-    else {
-        name = dmxConfigCurrent->name;
-        snprintf(cnambuf, sizeof(cnambuf), "%s", name ? name : "");
-        snprintf(cdimbuf, sizeof(cdimbuf), "%dx%d",
-                 dmxConfigWallWidth, dmxConfigWallHeight);
-        XtVaSetValues(cnamebox, XtNlabel, cnambuf, XtNsensitive, True, NULL);
-        XtVaSetValues(cdimbox, XtNlabel, cdimbuf, XtNsensitive, True, NULL);
-        XtVaSetValues(ecbutton, XtNsensitive, True, NULL);
-        XtVaSetValues(dcbutton, XtNsensitive, True, NULL);
-        XtVaSetValues(ndbutton0, XtNsensitive, True, NULL);
-        XtVaSetValues(ndbutton1, XtNsensitive, True, NULL);
-    }
-
-    if (!dmxConfigCurrentDisplay) {
-        XtVaSetValues(namebox, XtNlabel, "", XtNsensitive, False, NULL);
-        XtVaSetValues(dimbox, XtNlabel, "", XtNsensitive, False, NULL);
-        XtVaSetValues(rtbox, XtNlabel, "", XtNsensitive, False, NULL);
-        XtVaSetValues(origbox, XtNlabel, "", XtNsensitive, False, NULL);
-        XtVaSetValues(edbutton, XtNsensitive, False, NULL);
-        XtVaSetValues(ddbutton, XtNsensitive, False, NULL);
-    }
-    else {
-        name = dmxConfigCurrentDisplay->name;
-        snprintf(nambuf, sizeof(nambuf), "%s", name ? name : "");
-        snprintf(dimbuf, sizeof(dimbuf), "%dx%d%c%d%c%d",
-                 dmxConfigCurrentDisplay->scrnWidth,
-                 dmxConfigCurrentDisplay->scrnHeight,
-                 dmxConfigCurrentDisplay->scrnXSign < 0 ? '-' : '+',
-                 dmxConfigCurrentDisplay->scrnX,
-                 dmxConfigCurrentDisplay->scrnYSign < 0 ? '-' : '+',
-                 dmxConfigCurrentDisplay->scrnY);
-        snprintf(rtbuf, sizeof(dimbuf), "%dx%d%c%d%c%d",
-                 dmxConfigCurrentDisplay->rootWidth,
-                 dmxConfigCurrentDisplay->rootHeight,
-                 dmxConfigCurrentDisplay->rootXSign < 0 ? '-' : '+',
-                 dmxConfigCurrentDisplay->rootX,
-                 dmxConfigCurrentDisplay->rootYSign < 0 ? '-' : '+',
-                 dmxConfigCurrentDisplay->rootY);
-        snprintf(offbuf, sizeof(offbuf), "@%dx%d",
-                 dmxConfigCurrentDisplay->rootXOrigin,
-                 dmxConfigCurrentDisplay->rootYOrigin);
-        XtVaSetValues(namebox, XtNlabel, nambuf, XtNsensitive, True, NULL);
-        XtVaSetValues(dimbox, XtNlabel, dimbuf, XtNsensitive, True, NULL);
-        XtVaSetValues(rtbox, XtNlabel, rtbuf, XtNsensitive, True, NULL);
-        XtVaSetValues(origbox, XtNlabel, offbuf, XtNsensitive, True, NULL);
-        XtVaSetValues(edbutton, XtNsensitive, True, NULL);
-        XtVaSetValues(ddbutton, XtNsensitive, True, NULL);
-    }
-}
-
-static void
-dmxConfigCanvasUpdate(void)
-{
-    DMXConfigSubPtr pt;
-    Display *dpy = XtDisplay(canvas);
-    Window win = XtWindow(canvas);
-    GContext gcontext = XGContextFromGC(dmxConfigGC);
-    XFontStruct *fs;
-    int w, h;
-
-    XFillRectangle(dpy, win, dmxConfigGCRev,
-                   0, 0, dmxConfigWidgetWidth, dmxConfigWidgetHeight);
-    dmxConfigDataUpdate();
-    if (!dmxConfigCurrent)
-        return;
-
-    w = scalex(dmxConfigWallWidth);
-    h = scaley(dmxConfigWallHeight);
-    if (w > dmxConfigWidgetWidth - 1)
-        w = dmxConfigWidgetWidth - 1;
-    if (h > dmxConfigWidgetHeight - 1)
-        h = dmxConfigWidgetHeight - 1;
-    XDrawRectangle(dpy, win, dmxConfigGC, 0, 0, w, h);
-    fs = XQueryFont(dpy, gcontext);
-    for (pt = dmxConfigCurrent->subentry; pt; pt = pt->next) {
-        int x, y, len;
-        GC gc;
-
-        if (pt->type != dmxConfigDisplay)
-            continue;
-        gc = (pt->display == dmxConfigCurrentDisplay
-              ? dmxConfigGCHL : dmxConfigGC);
-        x = scalex(pt->display->rootXOrigin);
-        y = scaley(pt->display->rootYOrigin);
-        w = scalex(pt->display->scrnWidth);
-        h = scaley(pt->display->scrnHeight);
-        len = pt->display->name ? strlen(pt->display->name) : 0;
-        if (x > dmxConfigWidgetWidth - 1)
-            x = dmxConfigWidgetWidth - 1;
-        if (y > dmxConfigWidgetHeight - 1)
-            y = dmxConfigWidgetHeight - 1;
-        XDrawRectangle(dpy, win, gc, x, y, w, h);
-        if (fs && len) {
-            int xo = 3, yo = fs->ascent + fs->descent + 2;
-
-            while (len && XTextWidth(fs, pt->display->name, len) >= w - 2 * xo)
-                --len;
-            if (len)
-                XDrawString(dpy, win, gc, x + xo, y + yo, pt->display->name,
-                            len);
-        }
-    }
-    if (fs)
-        XFreeFontInfo(NULL, fs, 0);
-}
-
-static void
-dmxConfigCanvasDraw(Region region)
-{
-    Display *dpy = XtDisplay(canvas);
-    int maxWidth, maxHeight;
-
-    dmxConfigCanvasGCs();
-    if (region) {
-        XSetRegion(dpy, dmxConfigGC, region);
-        XSetRegion(dpy, dmxConfigGCRev, region);
-        XSetRegion(dpy, dmxConfigGCHL, region);
-    }
-    XtVaGetValues(canvas,
-                  XtNwidth, &dmxConfigWidgetWidth,
-                  XtNheight, &dmxConfigWidgetHeight, NULL);
-    dmxConfigGetDims(&maxWidth, &maxHeight);
-    dmxConfigScaleX = (double) dmxConfigWidgetWidth / maxWidth;
-    dmxConfigScaleY = (double) dmxConfigWidgetHeight / maxHeight;
-    if (dmxConfigScaleX > dmxConfigScaleY)
-        dmxConfigScaleX = dmxConfigScaleY;
-    if (dmxConfigScaleY > dmxConfigScaleX)
-        dmxConfigScaleY = dmxConfigScaleX;
-    dmxConfigCanvasUpdate();
-    if (region) {
-        XSetClipMask(dpy, dmxConfigGC, None);
-        XSetClipMask(dpy, dmxConfigGCRev, None);
-        XSetClipMask(dpy, dmxConfigGCHL, None);
-    }
-}
-
-static void
-dmxConfigSelectCallback(Widget w, XtPointer closure, XtPointer callData)
-{
-    dmxConfigCurrent = closure;
-    dmxConfigVirtualPrint(stdout, dmxConfigCurrent);
-    dmxConfigCanvasDraw(NULL);
-}
-
-static void
-dmxConfigCopystrings(void)
-{
-    DMXConfigEntryPtr pt;
-    DMXConfigSubPtr sub;
-
-    if (!dmxConfigCurrent)
-        return;
-
-    /* FIXME: this is all a per-config file
-     * memory leak */
-    for (pt = dmxConfigEntry; pt; pt = pt->next) {
-        if (pt->type == dmxConfigVirtual) {
-            pt->virtual->name = XtNewString(pt->virtual->name
-                                            ? pt->virtual->name : "");
-
-            for (sub = pt->virtual->subentry; sub; sub = sub->next) {
-                if (sub->type != dmxConfigDisplay)
-                    continue;
-                sub->display->name = XtNewString(sub->display->name
-                                                 ? sub->display->name : "");
-            }
-        }
-    }
-}
-
-static void
-dmxConfigGetValueString(char **d, Widget w)
-{
-    const char *tmp = XawDialogGetValueString(w);
-
-    if (*d)
-        XtFree(*d);
-    *d = XtNewString(tmp);
-}
-
-static void
-dmxConfigSetupCnamemenu(void)
-{
-    static Widget cnamemenu = NULL;
-    Widget w;
-    DMXConfigEntryPtr pt;
-
-    if (cnamemenu)
-        XtDestroyWidget(cnamemenu);
-    cnamemenu = NULL;
-
-    if (!dmxConfigCurrent)
-        return;
-    cnamemenu = XtVaCreatePopupShell("cnamemenu", simpleMenuWidgetClass,
-                                     cnamebox, NULL);
-
-    for (pt = dmxConfigEntry; pt; pt = pt->next) {
-        if (pt->type == dmxConfigVirtual) {
-            w = XtVaCreateManagedWidget(pt->virtual->name
-                                        ? pt->virtual->name
-                                        : "",
-                                        smeBSBObjectClass, cnamemenu, NULL);
-            XtAddCallback(w, XtNcallback, dmxConfigSelectCallback, pt->virtual);
-        }
-    }
-}
-
-static void
-dmxConfigReadFile(void)
-{
-    FILE *str;
-    DMXConfigEntryPtr pt;
-
-    if (!(str = fopen(dmxConfigFilename, "r"))) {
-        dmxLog(dmxWarning, "Unable to read configuration file %s\n",
-               dmxConfigFilename);
-        return;
-    }
-    yyin = str;
-    yydebug = 0;
-    yyparse();
-    fclose(str);
-    dmxLog(dmxInfo, "Read configuration file %s\n", dmxConfigFilename);
-
-    for (pt = dmxConfigEntry; pt; pt = pt->next) {
-        if (pt->type == dmxConfigVirtual) {
-            dmxConfigCurrent = pt->virtual;
-            break;
-        }
-    }
-
-    if (XtIsRealized(canvas)) {
-        dmxConfigCopystrings();
-        dmxConfigSetupCnamemenu();
-        dmxConfigCanvasDraw(NULL);
-    }
-    dmxConfigVirtualPrint(stdout, dmxConfigCurrent);
-}
-
-static void
-dmxConfigWriteFile(void)
-{
-    FILE *str;
-
-    if (!(str = fopen(dmxConfigFilename, "w"))) {
-        dmxLog(dmxWarning, "Unable to write configuration file %s\n",
-               dmxConfigFilename);
-        return;
-    }
-    dmxConfigPrint(str, dmxConfigEntry);
-    fclose(str);
-}
-
-static DMXConfigDisplayPtr
-dmxConfigFindDisplay(int x, int y)
-{
-    DMXConfigSubPtr pt;
-
-    if (!dmxConfigCurrent)
-        return NULL;
-    for (pt = dmxConfigCurrent->subentry; pt; pt = pt->next) {
-        DMXConfigDisplayPtr d = pt->display;
-
-        if (pt->type != dmxConfigDisplay)
-            continue;
-        if (x >= scalex(d->rootXOrigin)
-            && x <= scalex(d->rootXOrigin + d->scrnWidth)
-            && y >= scaley(d->rootYOrigin)
-            && y <= scaley(d->rootYOrigin + d->scrnHeight))
-            return d;
-    }
-    return NULL;
-}
-
-static void
-dmxConfigSetPopupPosition(Widget popup)
-{
-    Position x, y;
-    Window t1, t2;
-    int root_x, root_y;
-    int temp_x, temp_y;
-    unsigned int temp;
-
-    XtRealizeWidget(popup);
-    if (!XQueryPointer(XtDisplay(popup), XtWindow(popup), &t1, &t2,
-                       &root_x, &root_y, &temp_x, &temp_y, &temp))
-        root_x = root_y = 0;
-
-    x = root_x - 5;
-    y = root_y - 5;
-    XtVaSetValues(popup, XtNx, x, XtNy, y, NULL);
-}
-
-static void
-dmxConfigPlaceMenu(Widget w, XEvent * event,
-                   String * params, Cardinal * num_params)
-{
-    dmxConfigSetPopupPosition(buttonpopup);
-}
-
-static void
-dmxConfigMove(int deltaX, int deltaY)
-{
-    dmxConfigCurrentDisplay->rootXOrigin += deltaX;
-    dmxConfigCurrentDisplay->rootYOrigin += deltaY;
-    if (dmxConfigCurrentDisplay->rootXOrigin < 0)
-        dmxConfigCurrentDisplay->rootXOrigin = 0;
-    if (dmxConfigCurrentDisplay->rootYOrigin < 0)
-        dmxConfigCurrentDisplay->rootYOrigin = 0;
-    if (dmxConfigWallWidth && dmxConfigWallHeight) {
-        if (dmxConfigCurrentDisplay->rootXOrigin >= dmxConfigWallWidth)
-            dmxConfigCurrentDisplay->rootXOrigin = dmxConfigWallWidth - 1;
-        if (dmxConfigCurrentDisplay->rootYOrigin >= dmxConfigWallHeight)
-            dmxConfigCurrentDisplay->rootYOrigin = dmxConfigWallHeight - 1;
-    }
-    dmxConfigCanvasUpdate();
-    dmxConfigNotSaved = 1;
-}
-
-static void
-dmxConfigCanvasInput(Widget w, XtPointer closure, XtPointer callData)
-{
-    XEvent *e = (XEvent *) callData;
-    DMXConfigDisplayPtr display = NULL;
-
-    switch (e->type) {
-    case ButtonPress:
-        if (e->xbutton.button == Button1) {
-            dmxConfigGrabbed = 1;
-            dmxConfigGrabbedFine = 0;
-            dmxConfigGrabbedX = e->xbutton.x;
-            dmxConfigGrabbedY = e->xbutton.y;
-        }
-        if (e->xbutton.button == Button2) {
-            dmxConfigGrabbed = 1;
-            dmxConfigGrabbedFine = 1;
-            dmxConfigGrabbedX = e->xbutton.x;
-            dmxConfigGrabbedY = e->xbutton.y;
-        }
-        break;
-    case ButtonRelease:
-        if (e->xbutton.button == Button1)
-            dmxConfigGrabbed = 0;
-        if (e->xbutton.button == Button2)
-            dmxConfigGrabbed = 0;
-        break;
-    case MotionNotify:
-        if (dmxConfigGrabbed && dmxConfigCurrentDisplay) {
-            int deltaX = e->xmotion.x - dmxConfigGrabbedX;
-            int deltaY = e->xmotion.y - dmxConfigGrabbedY;
-
-            dmxConfigMove(dmxConfigGrabbedFine ? deltaX : unscalex(deltaX),
-                          dmxConfigGrabbedFine ? deltaY : unscaley(deltaY));
-            dmxConfigGrabbedX = e->xmotion.x;
-            dmxConfigGrabbedY = e->xmotion.y;
-        }
-        else {
-            display = dmxConfigFindDisplay(e->xmotion.x, e->xmotion.y);
-            if (display != dmxConfigCurrentDisplay) {
-                dmxConfigCurrentDisplay = display;
-                dmxConfigCanvasUpdate();
-            }
-        }
-        break;
-    case KeyPress:
-        switch (XLookupKeysym(&e->xkey, 0)) {
-        case XK_Right:
-            dmxConfigMove(1, 0);
-            break;
-        case XK_Left:
-            dmxConfigMove(-1, 0);
-            break;
-        case XK_Down:
-            dmxConfigMove(0, 1);
-            break;
-        case XK_Up:
-            dmxConfigMove(0, -1);
-            break;
-        }
-        break;
-    }
-}
-
-static void
-dmxConfigCanvasResize(Widget w, XtPointer closure, XtPointer callData)
-{
-    dmxConfigCanvasDraw(NULL);
-}
-
-static void
-dmxConfigCanvasExpose(Widget w, XtPointer closure, XtPointer callData)
-{
-    CanvasExposeDataPtr data = (CanvasExposeDataPtr) callData;
-
-    dmxConfigCanvasDraw(data->region);
-}
-
-static void
-dmxConfigOpenCallback(Widget w, XtPointer closure, XtPointer callData)
-{
-    dmxConfigState = dmxConfigStateOpen;
-    XtVaSetValues(okbutton, XtNlabel, "Open", NULL);
-    dmxConfigSetPopupPosition(openpopup);
-    XtPopup(openpopup, XtGrabExclusive);
-}
-
-static void
-dmxConfigSaveCallback(Widget w, XtPointer closure, XtPointer callData)
-{
-    dmxConfigState = dmxConfigStateSave;
-    XtVaSetValues(okbutton, XtNlabel, "Save", NULL);
-    dmxConfigSetPopupPosition(openpopup);
-    XtPopup(openpopup, XtGrabExclusive);
-}
-
-static void
-dmxConfigOkCallback(Widget w, XtPointer closure, XtPointer callData)
-{
-    dmxConfigGetValueString(&dmxConfigFilename, opendialog);
-    XtPopdown(openpopup);
-    if (dmxConfigState == dmxConfigStateOpen)
-        dmxConfigReadFile();
-    else
-        dmxConfigWriteFile();
-    dmxConfigNotSaved = 0;
-}
-
-static void
-dmxConfigCanCallback(Widget w, XtPointer closure, XtPointer callData)
-{
-    XtPopdown(openpopup);
-}
-
-static void
-dmxConfigECCallback(Widget w, XtPointer closure, XtPointer callData)
-{
-    char buf[256];              /* RATS: Only used in snprintf */
-
-    if (!dmxConfigCurrent)
-        return;
-    dmxConfigSetPopupPosition(ecpopup);
-    XtVaSetValues(ecdialog0, XtNvalue,
-                  dmxConfigCurrent->name ? dmxConfigCurrent->name : "", NULL);
-    snprintf(buf, sizeof(buf), "%dx%d",
-             dmxConfigCurrent->width, dmxConfigCurrent->height);
-    XtVaSetValues(ecdialog1, XtNvalue, buf, NULL);
-    XtPopup(ecpopup, XtGrabExclusive);
-}
-
-static void
-dmxConfigNCCallback(Widget w, XtPointer closure, XtPointer callData)
-{
-    int width = 1280 * 2, height = 1024 * 2;
-
-    if (dmxConfigCurrent) {
-        width = dmxConfigCurrent->width;
-        height = dmxConfigCurrent->height;
-    }
-
-    dmxConfigCurrent = dmxConfigCreateVirtual(NULL, NULL, NULL,
-                                              NULL, NULL, NULL);
-    dmxConfigNewVirtual = dmxConfigCurrent;
-    dmxConfigCurrent->width = width;
-    dmxConfigCurrent->height = height;
-    dmxConfigEntry = dmxConfigAddEntry(dmxConfigEntry, dmxConfigVirtual, NULL,
-                                       dmxConfigCurrent);
-    dmxConfigECCallback(w, closure, callData);
-}
-
-static void
-dmxConfigDCCallback(Widget w, XtPointer closure, XtPointer callData)
-{
-    DMXConfigEntryPtr pt;
-
-    if (!dmxConfigEntry)
-        return;
-    if (dmxConfigEntry
-        && dmxConfigEntry->type == dmxConfigVirtual
-        && dmxConfigEntry->virtual == dmxConfigCurrent) {
-        dmxConfigEntry = dmxConfigEntry->next;
-    }
-    else {
-        for (pt = dmxConfigEntry; pt && pt->next; pt = pt->next)
-            if (pt->next->type == dmxConfigVirtual
-                && pt->next->virtual == dmxConfigCurrent) {
-                pt->next = pt->next->next;
-                break;
-            }
-    }
-    dmxConfigFreeVirtual(dmxConfigCurrent);
-    dmxConfigCurrent = NULL;
-    dmxConfigCurrentDisplay = NULL;
-
-    /* Make the first entry current */
-    for (pt = dmxConfigEntry; pt; pt = pt->next) {
-        if (pt->type == dmxConfigVirtual) {
-            dmxConfigCurrent = pt->virtual;
-            break;
-        }
-    }
-
-    dmxConfigSetupCnamemenu();
-    dmxConfigCanvasDraw(NULL);
-}
-
-static void
-dmxConfigECOkCallback(Widget w, XtPointer closure, XtPointer callData)
-{
-    const char *value;
-    char *endpt;
-
-    dmxConfigGetValueString((char **) &dmxConfigCurrent->name, ecdialog0);
-    value = XawDialogGetValueString(ecdialog1);
-    dmxConfigCurrent->width = strtol(value, &endpt, 10);
-    dmxConfigCurrent->height = strtol(endpt + 1, NULL, 10);
-    XtPopdown(ecpopup);
-    dmxConfigCurrentDisplay = NULL;
-    dmxConfigNewVirtual = NULL;
-    dmxConfigSetupCnamemenu();
-    dmxConfigCanvasDraw(NULL);
-    dmxConfigNotSaved = 1;
-}
-
-static void
-dmxConfigECCanCallback(Widget w, XtPointer closure, XtPointer callData)
-{
-    if (dmxConfigNewVirtual)
-        dmxConfigDCCallback(w, closure, callData);
-    dmxConfigNewVirtual = NULL;
-    XtPopdown(ecpopup);
-}
-
-static void
-dmxConfigEDCallback(Widget w, XtPointer closure, XtPointer callData)
-{
-    char buf[256];              /* RATS: Only used in snprintf */
-
-    if (!dmxConfigCurrent || !dmxConfigCurrentDisplay)
-        return;
-    dmxConfigSetPopupPosition(edpopup);
-    XtVaSetValues(eddialog0, XtNvalue,
-                  dmxConfigCurrentDisplay->name
-                  ? dmxConfigCurrentDisplay->name : "", NULL);
-    snprintf(buf, sizeof(buf), "%dx%d%c%d%c%d",
-             dmxConfigCurrentDisplay->scrnWidth,
-             dmxConfigCurrentDisplay->scrnHeight,
-             dmxConfigCurrentDisplay->scrnXSign < 0 ? '-' : '+',
-             dmxConfigCurrentDisplay->scrnY,
-             dmxConfigCurrentDisplay->scrnYSign < 0 ? '-' : '+',
-             dmxConfigCurrentDisplay->scrnY);
-    XtVaSetValues(eddialog1, XtNvalue, buf, NULL);
-    snprintf(buf, sizeof(buf), "@%dx%d",
-             dmxConfigCurrentDisplay->rootXOrigin,
-             dmxConfigCurrentDisplay->rootYOrigin);
-    XtVaSetValues(eddialog2, XtNvalue, buf, NULL);
-    XtPopup(edpopup, XtGrabExclusive);
-}
-
-static void
-dmxConfigNDCallback(Widget w, XtPointer closure, XtPointer callData)
-{
-    int width = 1280, height = 1024;
-
-    if (!dmxConfigCurrent)
-        return;
-    if (dmxConfigCurrentDisplay) {
-        width = dmxConfigCurrentDisplay->scrnWidth;
-        height = dmxConfigCurrentDisplay->scrnHeight;
-    }
-    dmxConfigCurrentDisplay = dmxConfigCreateDisplay(NULL, NULL, NULL,
-                                                     NULL, NULL);
-    dmxConfigNewDisplay = dmxConfigCurrentDisplay;
-    dmxConfigCurrentDisplay->scrnWidth = width;
-    dmxConfigCurrentDisplay->scrnHeight = height;
-
-    dmxConfigCurrent->subentry
-        = dmxConfigAddSub(dmxConfigCurrent->subentry,
-                          dmxConfigSubDisplay(dmxConfigCurrentDisplay));
-    dmxConfigEDCallback(w, closure, callData);
-}
-
-static void
-dmxConfigDDCallback(Widget w, XtPointer closure, XtPointer callData)
-{
-    DMXConfigSubPtr pt;
-
-    if (!dmxConfigCurrent || !dmxConfigCurrentDisplay)
-        return;
-    /* First */
-    if (dmxConfigCurrent->subentry
-        && dmxConfigCurrent->subentry->type == dmxConfigDisplay
-        && dmxConfigCurrent->subentry->display == dmxConfigCurrentDisplay) {
-        dmxConfigCurrent->subentry = dmxConfigCurrent->subentry->next;
-    }
-    else {
-        for (pt = dmxConfigCurrent->subentry; pt && pt->next; pt = pt->next)
-            if (pt->next->type == dmxConfigDisplay
-                && pt->next->display == dmxConfigCurrentDisplay) {
-                pt->next = pt->next->next;
-                break;
-            }
-    }
-    dmxConfigFreeDisplay(dmxConfigCurrentDisplay);
-    dmxConfigCurrentDisplay = NULL;
-    dmxConfigSetupCnamemenu();
-    dmxConfigCanvasDraw(NULL);
-}
-
-static void
-dmxConfigAboutCallback(Widget w, XtPointer closure, XtPointer callData)
-{
-    dmxConfigSetPopupPosition(aboutpopup);
-    XtPopup(aboutpopup, XtGrabExclusive);
-}
-
-static void
-dmxConfigAboutOkCallback(Widget w, XtPointer closure, XtPointer CallData)
-{
-    XtPopdown(aboutpopup);
-}
-
-static void
-dmxConfigQuitCallback(Widget w, XtPointer closure, XtPointer callData)
-{
-    if (dmxConfigNotSaved) {
-        dmxConfigSetPopupPosition(quitpopup);
-        XtPopup(quitpopup, XtGrabExclusive);
-        return;
-    }
-    exit(0);
-}
-
-static void
-dmxConfigQuitOkCallback(Widget w, XtPointer closure, XtPointer callData)
-{
-    XtPopdown(quitpopup);
-    exit(0);
-}
-
-static void
-dmxConfigQuitCanCallback(Widget w, XtPointer closure, XtPointer callData)
-{
-    XtPopdown(quitpopup);
-}
-
-static void
-dmxConfigEDOkCallback(Widget w, XtPointer closure, XtPointer callData)
-{
-    char *value;
-    char *endpt;
-
-    dmxConfigNewDisplay = NULL;
-    dmxConfigGetValueString((char **) &dmxConfigCurrentDisplay->name,
-                            eddialog0);
-    value = XawDialogGetValueString(eddialog1);
-    if (*value == '-' || *value == '+') {
-        dmxConfigCurrentDisplay->scrnWidth = 0;
-        dmxConfigCurrentDisplay->scrnHeight = 0;
-        endpt = value;
-    }
-    else {
-        dmxConfigCurrentDisplay->scrnWidth = strtol(value, &endpt, 10);
-        dmxConfigCurrentDisplay->scrnHeight = strtol(endpt + 1, &endpt, 10);
-    }
-    if (*endpt) {
-        dmxConfigCurrentDisplay->scrnXSign = (*endpt == '-') ? -1 : 1;
-        dmxConfigCurrentDisplay->scrnX = strtol(endpt + 1, &endpt, 10);
-        dmxConfigCurrentDisplay->scrnYSign = (*endpt == '-') ? -1 : 1;
-        dmxConfigCurrentDisplay->scrnY = strtol(endpt + 1, NULL, 10);
-    }
-    if (dmxConfigCurrentDisplay->scrnX < 0)
-        dmxConfigCurrentDisplay->scrnX = -dmxConfigCurrentDisplay->scrnX;
-    if (dmxConfigCurrentDisplay->scrnY < 0)
-        dmxConfigCurrentDisplay->scrnY = -dmxConfigCurrentDisplay->scrnY;
-    value = XawDialogGetValueString(eddialog2);
-    dmxConfigCurrentDisplay->rootXOrigin = strtol(value + 1, &endpt, 10);
-    dmxConfigCurrentDisplay->rootYOrigin = strtol(endpt + 1, NULL, 10);
-    XtPopdown(edpopup);
-    dmxConfigSetupCnamemenu();
-    dmxConfigCanvasDraw(NULL);
-    dmxConfigNotSaved = 1;
-}
-
-static void
-dmxConfigEDCanCallback(Widget w, XtPointer closure, XtPointer callData)
-{
-    if (dmxConfigNewDisplay)
-        dmxConfigDDCallback(w, closure, callData);
-    dmxConfigNewDisplay = NULL;
-    XtPopdown(edpopup);
-}
-
-static void
-dmxConfigOkAction(Widget w, XEvent * event,
-                  String * params, Cardinal * num_params)
-{
-    Widget p = XtParent(w);
-    Widget t;
-
-    if (p == opendialog)
-        dmxConfigOkCallback(w, NULL, NULL);
-
-    if (p == ecdialog0) {
-        t = XtNameToWidget(ecdialog1, "value");
-        XWarpPointer(XtDisplay(t), None, XtWindow(t), 0, 0, 0, 0, 0, 10);
-    }
-    if (p == ecdialog1)
-        dmxConfigECOkCallback(w, NULL, NULL);
-
-    if (p == eddialog0) {
-        t = XtNameToWidget(eddialog1, "value");
-        XWarpPointer(XtDisplay(t), None, XtWindow(t), 0, 0, 0, 0, 0, 10);
-    }
-    if (p == eddialog1) {
-        t = XtNameToWidget(eddialog2, "value");
-        XWarpPointer(XtDisplay(t), None, XtWindow(t), 0, 0, 0, 0, 0, 10);
-    }
-    if (p == eddialog2)
-        dmxConfigEDOkCallback(w, NULL, NULL);
-}
-
-int
-main(int argc, char **argv)
-{
-    XtAppContext appContext;
-    Widget toplevel;
-    Widget parent, menubox, bottombox, databox, canvasbox;
-    Widget filebutton, helpbutton;
-    Widget filemenu, openbutton, savebutton, quitbutton;
-    Widget helpmenu, aboutbutton, aboutbox, aboutok;
-    Widget quitbox, quitok, quitcan;
-    Widget ncbutton;
-    Widget canbutton;
-    Widget ecbox, ecokbutton, eccanbutton;
-    Widget edbox, edokbutton;
-    Widget edcanbutton;
-
-    /* FIXME: add meta-i, ctrl,meta-z,v? */
-    const char *opentrans = "<Key>Return: openOk()\n\
-                                 <Key>Linefeed: openOk()\n\
-                                 Ctrl<Key>M: openOk()\n\
-                                 Ctrl<Key>J: openOk()\n\
-                                 Ctrl<Key>O: noop()\n\
-                                 Ctrl<Key>N: noop()\n\
-                                 Ctrl<Key>P: noop()";
-    const char *canvastrans =
-        "<Btn3Down>: placeMenu() XtMenuPopup(buttonpopup)";
-    XtActionsRec actiontable[] = {
-        {(char *) "openOk", dmxConfigOkAction},
-        {(char *) "placeMenu", dmxConfigPlaceMenu},
-        {(char *) "noop", NULL}
-    };
-
-    dmxConfigFilename = XtNewString((argc >= 2) ? argv[1] : "");
-
-    toplevel = XtVaAppInitialize(&appContext, "XDmxconfig",
-                                 NULL, 0, &argc, argv, NULL, NULL);
-
-    /* Main boxes */
-    parent = XtVaCreateManagedWidget("parent", formWidgetClass, toplevel,
-                                     XtNorientation, XtorientVertical,
-                                     XtNwidth, DMX_MAIN_WIDTH,
-                                     XtNheight, DMX_MAIN_HEIGHT, NULL);
-    menubox = XtVaCreateManagedWidget("menubox", boxWidgetClass, parent,
-                                      XtNborderWidth, 0,
-                                      XtNorientation, XtorientHorizontal,
-                                      XtNtop, XtChainTop, NULL);
-    bottombox = XtVaCreateManagedWidget("bottombox", formWidgetClass, parent,
-                                        XtNborderWidth, 0,
-                                        XtNfromVert, menubox,
-                                        XtNorientation, XtorientHorizontal,
-                                        NULL);
-    databox = XtVaCreateManagedWidget("databox", formWidgetClass,
-                                      bottombox,
-                                      XtNborderWidth, 0,
-                                      XtNhorizDistance, 0,
-                                      XtNwidth, DMX_DATA_WIDTH,
-                                      XtNheight, DMX_DATA_HEIGHT,
-                                      XtNleft, XtChainLeft,
-                                      XtNorientation, XtorientVertical, NULL);
-
-    /* Data */
-    cnamebox = XtVaCreateManagedWidget("cnamebox", menuButtonWidgetClass,
-                                       databox,
-                                       XtNtop, XtChainTop,
-                                       XtNjustify, XtJustifyLeft,
-                                       XtNwidth, DMX_DATA_WIDTH,
-                                       XtNlabel, "",
-                                       XtNmenuName, "cnamemenu", NULL);
-    cdimbox = XtVaCreateManagedWidget("cdimbox", labelWidgetClass,
-                                      databox,
-                                      XtNfromVert, cnamebox,
-                                      XtNjustify, XtJustifyLeft,
-                                      XtNwidth, DMX_DATA_WIDTH,
-                                      XtNlabel, "", NULL);
-    namebox = XtVaCreateManagedWidget("namebox", labelWidgetClass, databox,
-                                      XtNfromVert, cdimbox,
-                                      XtNjustify, XtJustifyLeft,
-                                      XtNwidth, DMX_DATA_WIDTH,
-                                      XtNlabel, "", NULL);
-    dimbox = XtVaCreateManagedWidget("dimbox", labelWidgetClass,
-                                     databox,
-                                     XtNfromVert, namebox,
-                                     XtNjustify, XtJustifyLeft,
-                                     XtNwidth, DMX_DATA_WIDTH,
-                                     XtNlabel, "", NULL);
-    rtbox = XtVaCreateManagedWidget("rtbox", labelWidgetClass,
-                                    databox,
-                                    XtNfromVert, dimbox,
-                                    XtNjustify, XtJustifyLeft,
-                                    XtNwidth, DMX_DATA_WIDTH,
-                                    XtNlabel, "", NULL);
-    origbox = XtVaCreateManagedWidget("origbox", labelWidgetClass,
-                                      databox,
-                                      XtNfromVert, rtbox,
-                                      XtNjustify, XtJustifyLeft,
-                                      XtNwidth, DMX_DATA_WIDTH,
-                                      XtNlabel, "", NULL);
-
-    /* Canvas */
-    canvasbox = XtVaCreateManagedWidget("canvasbox", boxWidgetClass,
-                                        bottombox,
-                                        XtNborderWidth, 0,
-                                        XtNwidth, DMX_CANVAS_WIDTH,
-                                        XtNheight, DMX_CANVAS_HEIGHT,
-                                        XtNfromHoriz, databox, NULL);
-
-    canvas = XtVaCreateManagedWidget("canvas", canvasWidgetClass,
-                                     canvasbox,
-                                     XtNwidth, DMX_CANVAS_WIDTH,
-                                     XtNheight, DMX_CANVAS_HEIGHT, NULL);
-
-    /* Main menu buttons */
-    filebutton = XtVaCreateManagedWidget("File", menuButtonWidgetClass,
-                                         menubox,
-                                         XtNmenuName, "filemenu", NULL);
-    helpbutton = XtVaCreateManagedWidget("Help", menuButtonWidgetClass,
-                                         menubox,
-                                         XtNmenuName, "helpmenu", NULL);
-
-    /* File submenu buttons */
-    filemenu = XtVaCreatePopupShell("filemenu", simpleMenuWidgetClass,
-                                    filebutton, NULL);
-    openbutton = XtVaCreateManagedWidget("Open File", smeBSBObjectClass,
-                                         filemenu, NULL);
-    savebutton = XtVaCreateManagedWidget("Save File", smeBSBObjectClass,
-                                         filemenu, NULL);
-    ncbutton = XtVaCreateManagedWidget("New Global", smeBSBObjectClass,
-                                       filemenu, NULL);
-    ecbutton = XtVaCreateManagedWidget("Edit Global", smeBSBObjectClass,
-                                       filemenu, NULL);
-    dcbutton = XtVaCreateManagedWidget("Delete Global", smeBSBObjectClass,
-                                       filemenu, NULL);
-    ndbutton0 = XtVaCreateManagedWidget("New Display", smeBSBObjectClass,
-                                        filemenu, NULL);
-    quitbutton = XtVaCreateManagedWidget("Quit", smeBSBObjectClass,
-                                         filemenu, NULL);
-
-    /* Help submenu button */
-    helpmenu = XtVaCreatePopupShell("helpmenu", simpleMenuWidgetClass,
-                                    helpbutton, NULL);
-    aboutbutton = XtVaCreateManagedWidget("About", smeBSBObjectClass,
-                                          helpmenu, NULL);
-
-    /* Open popup */
-    openpopup = XtVaCreatePopupShell("openpopup", transientShellWidgetClass,
-                                     toplevel, NULL);
-    opendialog = XtVaCreateManagedWidget("opendialog", dialogWidgetClass,
-                                         openpopup,
-                                         XtNlabel, "Filename: ",
-                                         XtNvalue, dmxConfigFilename, NULL);
-    okbutton = XtVaCreateManagedWidget("Open", commandWidgetClass,
-                                       opendialog, NULL);
-    canbutton = XtVaCreateManagedWidget("Cancel", commandWidgetClass,
-                                        opendialog, NULL);
-
-    /* EC popup */
-    ecpopup = XtVaCreatePopupShell("ecpopup", transientShellWidgetClass,
-                                   toplevel, NULL);
-    ecbox = XtVaCreateManagedWidget("ecbox", boxWidgetClass, ecpopup, NULL);
-    ecdialog0 = XtVaCreateManagedWidget("ecdialog0", dialogWidgetClass,
-                                        ecbox,
-                                        XtNlabel, "Name:              ",
-                                        XtNvalue, "", NULL);
-    ecdialog1 = XtVaCreateManagedWidget("ecdialog1", dialogWidgetClass,
-                                        ecbox,
-                                        XtNlabel, "Dimension:         ",
-                                        XtNvalue, "", NULL);
-    ecokbutton = XtVaCreateManagedWidget("OK", commandWidgetClass, ecbox, NULL);
-    eccanbutton = XtVaCreateManagedWidget("Cancel", commandWidgetClass,
-                                          ecbox, NULL);
-
-    /* ED popup */
-    edpopup = XtVaCreatePopupShell("edpopup", transientShellWidgetClass,
-                                   toplevel, NULL);
-    edbox = XtVaCreateManagedWidget("edbox", boxWidgetClass, edpopup, NULL);
-    eddialog0 = XtVaCreateManagedWidget("eddialog0", dialogWidgetClass,
-                                        edbox,
-                                        XtNlabel, "Display Name:      ",
-                                        XtNvalue, "", NULL);
-    eddialog1 = XtVaCreateManagedWidget("eddialog1", dialogWidgetClass,
-                                        edbox,
-                                        XtNlabel, "Geometry:          ",
-                                        XtNvalue, "", NULL);
-    eddialog2 = XtVaCreateManagedWidget("eddialog2", dialogWidgetClass,
-                                        edbox,
-                                        XtNlabel, "Offset:            ",
-                                        XtNvalue, "", NULL);
-    edokbutton = XtVaCreateManagedWidget("OK", commandWidgetClass, edbox, NULL);
-    edcanbutton = XtVaCreateManagedWidget("Cancel", commandWidgetClass,
-                                          edbox, NULL);
-
-    /* About popup */
-    aboutpopup = XtVaCreatePopupShell("aboutpopup", transientShellWidgetClass,
-                                      toplevel, NULL);
-    aboutbox = XtVaCreateManagedWidget("aboutbox", boxWidgetClass,
-                                       aboutpopup, NULL);
-    XtVaCreateManagedWidget("abouttext", labelWidgetClass,
-                            aboutbox, XtNlabel, DMX_INFO, NULL);
-    aboutok = XtVaCreateManagedWidget("OK", commandWidgetClass, aboutbox, NULL);
-
-    /* Quit popup */
-    quitpopup = XtVaCreatePopupShell("quitpopup", transientShellWidgetClass,
-                                     toplevel, NULL);
-    quitbox = XtVaCreateManagedWidget("quitbox", boxWidgetClass,
-                                      quitpopup, NULL);
-    XtVaCreateManagedWidget("quittext", labelWidgetClass,
-                            quitbox,
-                            XtNlabel,
-                            "Changes to the configuration\n"
-                            "been made that have not yet\n"
-                            "been saved.  Do you want to\n"
-                            "quit without saving?", NULL);
-    quitok = XtVaCreateManagedWidget("Quit WITHOUT Saving",
-                                     commandWidgetClass, quitbox, NULL);
-    quitcan = XtVaCreateManagedWidget("Continue Editing",
-                                      commandWidgetClass, quitbox, NULL);
-
-    /* Button popup */
-    buttonpopup = XtVaCreatePopupShell("buttonpopup", simpleMenuWidgetClass,
-                                       toplevel, NULL);
-    ndbutton1 = XtVaCreateManagedWidget("New Display", smeBSBObjectClass,
-                                        buttonpopup, NULL);
-    edbutton = XtVaCreateManagedWidget("Edit Display", smeBSBObjectClass,
-                                       buttonpopup, NULL);
-    ddbutton = XtVaCreateManagedWidget("Delete Display", smeBSBObjectClass,
-                                       buttonpopup, NULL);
-
-    /* Callbacks */
-    XtAddCallback(openbutton, XtNcallback, dmxConfigOpenCallback, NULL);
-    XtAddCallback(savebutton, XtNcallback, dmxConfigSaveCallback, NULL);
-    XtAddCallback(okbutton, XtNcallback, dmxConfigOkCallback, NULL);
-    XtAddCallback(canbutton, XtNcallback, dmxConfigCanCallback, NULL);
-
-    XtAppAddActions(appContext, actiontable, XtNumber(actiontable));
-    XtOverrideTranslations(canvas, XtParseTranslationTable(canvastrans));
-    XtOverrideTranslations(XtNameToWidget(opendialog, "value"),
-                           XtParseTranslationTable(opentrans));
-    XtOverrideTranslations(XtNameToWidget(ecdialog0, "value"),
-                           XtParseTranslationTable(opentrans));
-    XtOverrideTranslations(XtNameToWidget(ecdialog1, "value"),
-                           XtParseTranslationTable(opentrans));
-    XtOverrideTranslations(XtNameToWidget(eddialog0, "value"),
-                           XtParseTranslationTable(opentrans));
-    XtOverrideTranslations(XtNameToWidget(eddialog1, "value"),
-                           XtParseTranslationTable(opentrans));
-    XtOverrideTranslations(XtNameToWidget(eddialog2, "value"),
-                           XtParseTranslationTable(opentrans));
-
-    XtAddCallback(ncbutton, XtNcallback, dmxConfigNCCallback, NULL);
-    XtAddCallback(ecbutton, XtNcallback, dmxConfigECCallback, NULL);
-    XtAddCallback(ecokbutton, XtNcallback, dmxConfigECOkCallback, NULL);
-    XtAddCallback(eccanbutton, XtNcallback, dmxConfigECCanCallback, NULL);
-    XtAddCallback(dcbutton, XtNcallback, dmxConfigDCCallback, NULL);
-
-    XtAddCallback(ndbutton0, XtNcallback, dmxConfigNDCallback, NULL);
-    XtAddCallback(ndbutton1, XtNcallback, dmxConfigNDCallback, NULL);
-    XtAddCallback(edbutton, XtNcallback, dmxConfigEDCallback, NULL);
-    XtAddCallback(ddbutton, XtNcallback, dmxConfigDDCallback, NULL);
-    XtAddCallback(edokbutton, XtNcallback, dmxConfigEDOkCallback, NULL);
-    XtAddCallback(edcanbutton, XtNcallback, dmxConfigEDCanCallback, NULL);
-
-    XtAddCallback(aboutbutton, XtNcallback, dmxConfigAboutCallback, NULL);
-    XtAddCallback(aboutok, XtNcallback, dmxConfigAboutOkCallback, NULL);
-    XtAddCallback(quitok, XtNcallback, dmxConfigQuitOkCallback, NULL);
-    XtAddCallback(quitcan, XtNcallback, dmxConfigQuitCanCallback, NULL);
-
-    XtAddCallback(quitbutton, XtNcallback, dmxConfigQuitCallback, NULL);
-
-    XtAddCallback(canvas, XtNcallback, dmxConfigCanvasInput, NULL);
-    XtAddCallback(canvas, XtNcanvasExposeCallback, dmxConfigCanvasExpose, NULL);
-    XtAddCallback(canvas, XtNcanvasResizeCallback, dmxConfigCanvasResize, NULL);
-
-    if (dmxConfigFilename)
-        dmxConfigReadFile();
-
-    XtRealizeWidget(toplevel);
-    dmxConfigCopystrings();
-    dmxConfigSetupCnamemenu();
-    XtAppMainLoop(appContext);
-    return 0;
-}
diff --git a/hw/dmx/dmx-config.h b/hw/dmx/dmx-config.h
deleted file mode 100644
index c435ece..0000000
--- a/hw/dmx/dmx-config.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright 2005 Red Hat Inc., Raleigh, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Kevin E. Martin <kem@redhat.com>
- *
- */
-
-/** \file
- * Provide configuration define's and undef's to build Xdmx in X.Org's
- * modular source tree.
- */
-
-#ifndef DMX_CONFIG_H
-#define DMX_CONFIG_H
-
-#include <dix-config.h>
-
-/*
- * Note 1: This is a signed int that is printed as a decimal number.
- *         Since we want to make it human-interpretable, the fields are
- *         defined as:
- *         2147483648
- *         AAbbyymmdd
- *         AA: major version 01-20
- *         bb: minor version 00-99
- *         yy: year          00-99 [See Note 2]
- *         mm: month         01-12
- *         dd: day           01-31
- *
- * Note 2: The default epoch for the year is 2000.
- *         To change the default epoch, change the DMX_VENDOR_RELEASE
- *         macro below, bumb the minor version number, and change
- *         xdpyinfo to key off the major/minor version to determine the
- *         new epoch.  Remember to do this on January 1, 2100 and every
- *         100 years thereafter.
- */
-#define DMX_VENDOR_RELEASE(major,minor,year,month,day) \
-    ((major)     * 100000000) + \
-    ((minor)     *   1000000) + \
-    ((year-2000) *     10000) + \
-    ((month)     *       100) + \
-    ((day)       *         1)
-#define VENDOR_RELEASE  DMX_VENDOR_RELEASE(1,2,2007,4,24)
-#define VENDOR_STRING   "DMX Project"
-
-/* Enable the DMX extension */
-#define DMXEXT
-
-#endif                          /* DMX_CONFIG_H */
diff --git a/hw/dmx/dmx.c b/hw/dmx/dmx.c
deleted file mode 100644
index 4c7808d..0000000
--- a/hw/dmx/dmx.c
+++ /dev/null
@@ -1,1200 +0,0 @@
-/*
- * Copyright 2002-2004 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-/** \file
- * This file implements the server-side part of the DMX protocol. A
- * vector of fucntions is provided at extension initialization time, so
- * most all of the useful functions in this file are declared static and
- * do not appear in the doxygen documentation.
- *
- * Much of the low-level work is done by functions in \a dmxextension.c
- *
- * Please see the Client-to-Server DMX Extension to the X Protocol
- * document for details about the protocol.  */
-
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#include <X11/X.h>
-#include <X11/Xproto.h>
-#include "misc.h"
-#include "os.h"
-#include "dixstruct.h"
-#include "extnsionst.h"
-#include "extinit.h"
-#include "opaque.h"
-
-#include "dmx.h"
-#include "dmxextension.h"
-#include <X11/extensions/dmxproto.h>
-#include <X11/extensions/dmx.h>
-#include "protocol-versions.h"
-
-#ifdef PANORAMIX
-#include "panoramiXsrv.h"
-#endif
-
-static unsigned char DMXCode;
-
-static int
-_DMXXineramaActive(void)
-{
-#ifdef PANORAMIX
-    return !noPanoramiXExtension;
-#else
-    return 0;
-#endif
-}
-
-static void
-dmxSetScreenAttribute(int bit, DMXScreenAttributesPtr attr, CARD32 value)
-{
-    switch (1 << bit) {
-    case DMXScreenWindowWidth:
-        attr->screenWindowWidth = value;
-        break;
-    case DMXScreenWindowHeight:
-        attr->screenWindowHeight = value;
-        break;
-    case DMXScreenWindowXoffset:
-        attr->screenWindowXoffset = value;
-        break;
-    case DMXScreenWindowYoffset:
-        attr->screenWindowYoffset = value;
-        break;
-    case DMXRootWindowWidth:
-        attr->rootWindowWidth = value;
-        break;
-    case DMXRootWindowHeight:
-        attr->rootWindowHeight = value;
-        break;
-    case DMXRootWindowXoffset:
-        attr->rootWindowXoffset = value;
-        break;
-    case DMXRootWindowYoffset:
-        attr->rootWindowYoffset = value;
-        break;
-    case DMXRootWindowXorigin:
-        attr->rootWindowXorigin = value;
-        break;
-    case DMXRootWindowYorigin:
-        attr->rootWindowYorigin = value;
-        break;
-    }
-}
-
-static int
-dmxFetchScreenAttributes(unsigned int mask,
-                         DMXScreenAttributesPtr attr, CARD32 *value_list)
-{
-    int i;
-    CARD32 *value = value_list;
-    int count = 0;
-
-    for (i = 0; i < 32; i++) {
-        if (mask & (1 << i)) {
-            dmxSetScreenAttribute(i, attr, *value);
-            ++value;
-            ++count;
-        }
-    }
-    return count;
-}
-
-static void
-dmxSetDesktopAttribute(int bit, DMXDesktopAttributesPtr attr, CARD32 value)
-{
-    switch (1 << bit) {
-    case DMXDesktopWidth:
-        attr->width = value;
-        break;
-    case DMXDesktopHeight:
-        attr->height = value;
-        break;
-    case DMXDesktopShiftX:
-        attr->shiftX = value;
-        break;
-    case DMXDesktopShiftY:
-        attr->shiftY = value;
-        break;
-    }
-}
-
-static int
-dmxFetchDesktopAttributes(unsigned int mask,
-                          DMXDesktopAttributesPtr attr, CARD32 *value_list)
-{
-    int i;
-    CARD32 *value = value_list;
-    int count = 0;
-
-    for (i = 0; i < 32; i++) {
-        if (mask & (1 << i)) {
-            dmxSetDesktopAttribute(i, attr, *value);
-            ++value;
-            ++count;
-        }
-    }
-    return count;
-}
-
-static void
-dmxSetInputAttribute(int bit, DMXInputAttributesPtr attr, CARD32 value)
-{
-    switch (1 << bit) {
-    case DMXInputType:
-        attr->inputType = value;
-        break;
-    case DMXInputPhysicalScreen:
-        attr->physicalScreen = value;
-        break;
-    case DMXInputSendsCore:
-        attr->sendsCore = ! !value;
-        break;
-    }
-}
-
-static int
-dmxFetchInputAttributes(unsigned int mask,
-                        DMXInputAttributesPtr attr, CARD32 *value_list)
-{
-    int i;
-    CARD32 *value = value_list;
-    int count = 0;
-
-    for (i = 0; i < 32; i++) {
-        if (mask & (1 << i)) {
-            dmxSetInputAttribute(i, attr, *value);
-            ++value;
-            ++count;
-        }
-    }
-    return count;
-}
-
-static int
-ProcDMXQueryVersion(ClientPtr client)
-{
-    xDMXQueryVersionReply rep = {
-        .type = X_Reply,
-        .sequenceNumber = client->sequence,
-        .length = 0,
-        .majorVersion = SERVER_DMX_MAJOR_VERSION,
-        .minorVersion = SERVER_DMX_MINOR_VERSION,
-        .patchVersion = SERVER_DMX_PATCH_VERSION
-    };
-
-    REQUEST_SIZE_MATCH(xDMXQueryVersionReq);
-
-    if (client->swapped) {
-        swaps(&rep.sequenceNumber);
-        swapl(&rep.length);
-        swapl(&rep.majorVersion);
-        swapl(&rep.minorVersion);
-        swapl(&rep.patchVersion);
-    }
-    WriteToClient(client, sizeof(xDMXQueryVersionReply), &rep);
-    return Success;
-}
-
-static int
-ProcDMXSync(ClientPtr client)
-{
-    xDMXSyncReply rep;
-
-    REQUEST_SIZE_MATCH(xDMXSyncReq);
-
-    dmxFlushPendingSyncs();
-
-    rep = (xDMXSyncReply) {
-        .type = X_Reply,
-        .sequenceNumber = client->sequence,
-        .length = 0,
-        .status = 0
-    };
-    if (client->swapped) {
-        swaps(&rep.sequenceNumber);
-        swapl(&rep.length);
-        swapl(&rep.status);
-    }
-    WriteToClient(client, sizeof(xDMXSyncReply), &rep);
-    return Success;
-}
-
-static int
-ProcDMXForceWindowCreation(ClientPtr client)
-{
-    xDMXForceWindowCreationReply rep;
-
-    REQUEST(xDMXForceWindowCreationReq);
-    WindowPtr pWin;
-
-    REQUEST_SIZE_MATCH(xDMXForceWindowCreationReq);
-
-#ifdef PANORAMIX
-    if (!noPanoramiXExtension) {
-        PanoramiXRes *win;
-        int i;
-
-        if (Success != dixLookupResourceByType((void **) &win,
-                                               stuff->window, XRT_WINDOW,
-                                               client, DixReadAccess))
-            return -1;          /* BadWindow */
-
-        FOR_NSCREENS(i) {
-            if (Success != dixLookupWindow(&pWin, win->info[i].id, client,
-                                           DixReadAccess))
-                return -1;      /* BadWindow */
-
-            dmxForceWindowCreation(pWin);
-        }
-        goto doreply;
-    }
-#endif
-
-    if (Success != dixLookupWindow(&pWin, stuff->window, client, DixReadAccess))
-        return -1;              /* BadWindow */
-
-    dmxForceWindowCreation(pWin);
- doreply:
-    dmxFlushPendingSyncs();
-    rep = (xDMXForceWindowCreationReply) {
-        .type = X_Reply,
-        .sequenceNumber = client->sequence,
-        .length = 0,
-        .status = 0
-    };
-    if (client->swapped) {
-        swaps(&rep.sequenceNumber);
-        swapl(&rep.length);
-        swapl(&rep.status);
-    }
-    WriteToClient(client, sizeof(xDMXForceWindowCreationReply), &rep);
-    return Success;
-}
-
-static int
-ProcDMXGetScreenCount(ClientPtr client)
-{
-    xDMXGetScreenCountReply rep;
-
-    REQUEST_SIZE_MATCH(xDMXGetScreenCountReq);
-
-    rep = (xDMXGetScreenCountReply) {
-        .type = X_Reply,
-        .sequenceNumber = client->sequence,
-        .length = 0,
-        .screenCount = dmxGetNumScreens()
-    };
-    if (client->swapped) {
-        swaps(&rep.sequenceNumber);
-        swapl(&rep.length);
-        swapl(&rep.screenCount);
-    }
-    WriteToClient(client, sizeof(xDMXGetScreenCountReply), &rep);
-    return Success;
-}
-
-static int
-ProcDMXGetScreenAttributes(ClientPtr client)
-{
-    REQUEST(xDMXGetScreenAttributesReq);
-    xDMXGetScreenAttributesReply rep;
-    int length;
-    int paddedLength;
-    DMXScreenAttributesRec attr;
-
-    REQUEST_SIZE_MATCH(xDMXGetScreenAttributesReq);
-
-    if (stuff->physicalScreen < 0
-        || stuff->physicalScreen >= dmxGetNumScreens())
-        return BadValue;
-
-    if (!dmxGetScreenAttributes(stuff->physicalScreen, &attr))
-        return BadValue;
-
-    length = attr.displayName ? strlen(attr.displayName) : 0;
-    paddedLength = pad_to_int32(length);
-
-    rep = (xDMXGetScreenAttributesReply) {
-        .type = X_Reply,
-        .sequenceNumber = client->sequence,
-        .length =
-            bytes_to_int32((sizeof(xDMXGetScreenAttributesReply) -
-                            sizeof(xGenericReply))
-                           + paddedLength),
-        .displayNameLength = length,
-        .logicalScreen = attr.logicalScreen,
-        .screenWindowWidth = attr.screenWindowWidth,
-        .screenWindowHeight = attr.screenWindowHeight,
-        .screenWindowXoffset = attr.screenWindowXoffset,
-        .screenWindowYoffset = attr.screenWindowYoffset,
-        .rootWindowWidth = attr.rootWindowWidth,
-        .rootWindowHeight = attr.rootWindowHeight,
-        .rootWindowXoffset = attr.rootWindowXoffset,
-        .rootWindowYoffset = attr.rootWindowYoffset,
-        .rootWindowXorigin = attr.rootWindowXorigin,
-        .rootWindowYorigin = attr.rootWindowYorigin
-    };
-
-    if (client->swapped) {
-        swaps(&rep.sequenceNumber);
-        swapl(&rep.length);
-        swapl(&rep.displayNameLength);
-        swapl(&rep.logicalScreen);
-        swaps(&rep.screenWindowWidth);
-        swaps(&rep.screenWindowHeight);
-        swaps(&rep.screenWindowXoffset);
-        swaps(&rep.screenWindowYoffset);
-        swaps(&rep.rootWindowWidth);
-        swaps(&rep.rootWindowHeight);
-        swaps(&rep.rootWindowXoffset);
-        swaps(&rep.rootWindowYoffset);
-        swaps(&rep.rootWindowXorigin);
-        swaps(&rep.rootWindowYorigin);
-    }
-    WriteToClient(client, sizeof(xDMXGetScreenAttributesReply), &rep);
-    if (length)
-        WriteToClient(client, length, attr.displayName);
-    return Success;
-}
-
-static int
-ProcDMXChangeScreensAttributes(ClientPtr client)
-{
-    REQUEST(xDMXChangeScreensAttributesReq);
-    xDMXChangeScreensAttributesReply rep;
-    int status = DMX_BAD_XINERAMA;
-    unsigned int mask = 0;
-    unsigned int i;
-    CARD32 *screen_list;
-    CARD32 *mask_list;
-    CARD32 *value_list;
-    DMXScreenAttributesPtr attribs;
-    int errorScreen = 0;
-    unsigned int len;
-    int ones = 0;
-
-    REQUEST_AT_LEAST_SIZE(xDMXChangeScreensAttributesReq);
-    len =
-        client->req_len -
-        bytes_to_int32(sizeof(xDMXChangeScreensAttributesReq));
-    if (len < stuff->screenCount + stuff->maskCount)
-        return BadLength;
-
-    screen_list = (CARD32 *) (stuff + 1);
-    mask_list = &screen_list[stuff->screenCount];
-    value_list = &mask_list[stuff->maskCount];
-
-    for (i = 0; i < stuff->maskCount; i++)
-        ones += Ones(mask_list[i]);
-    if (len != stuff->screenCount + stuff->maskCount + ones)
-        return BadLength;
-
-    if (!_DMXXineramaActive())
-        goto noxinerama;
-
-    if (!(attribs = xallocarray(stuff->screenCount, sizeof(*attribs))))
-        return BadAlloc;
-
-    for (i = 0; i < stuff->screenCount; i++) {
-        int count;
-
-        if (i < stuff->maskCount)
-            mask = mask_list[i];
-        dmxGetScreenAttributes(screen_list[i], &attribs[i]);
-        count = dmxFetchScreenAttributes(mask, &attribs[i], value_list);
-        value_list += count;
-    }
-
-#ifdef PANORAMIX
-    status = dmxConfigureScreenWindows(stuff->screenCount,
-                                       screen_list, attribs, &errorScreen);
-#endif
-
-    free(attribs);
-
-    if (status == BadValue)
-        return status;
-
- noxinerama:
-    rep = (xDMXChangeScreensAttributesReply) {
-        .type = X_Reply,
-        .sequenceNumber = client->sequence,
-        .length = 0,
-        .status = status,
-        .errorScreen = errorScreen
-    };
-    if (client->swapped) {
-        swaps(&rep.sequenceNumber);
-        swapl(&rep.length);
-        swapl(&rep.status);
-        swapl(&rep.errorScreen);
-    }
-    WriteToClient(client, sizeof(xDMXChangeScreensAttributesReply), &rep);
-    return Success;
-}
-
-static int
-ProcDMXAddScreen(ClientPtr client)
-{
-    REQUEST(xDMXAddScreenReq);
-    xDMXAddScreenReply rep;
-    int status = 0;
-    CARD32 *value_list;
-    DMXScreenAttributesRec attr;
-    int count;
-    char *name;
-    int len;
-    int paddedLength;
-
-    REQUEST_AT_LEAST_SIZE(xDMXAddScreenReq);
-    paddedLength = pad_to_int32(stuff->displayNameLength);
-    len = client->req_len - bytes_to_int32(sizeof(xDMXAddScreenReq));
-    if (len != Ones(stuff->valueMask) + paddedLength / 4)
-        return BadLength;
-
-    memset(&attr, 0, sizeof(attr));
-    dmxGetScreenAttributes(stuff->physicalScreen, &attr);
-    value_list = (CARD32 *) (stuff + 1);
-    count = dmxFetchScreenAttributes(stuff->valueMask, &attr, value_list);
-
-    if (!(name = malloc(stuff->displayNameLength + 1 + 4)))
-        return BadAlloc;
-    memcpy(name, &value_list[count], stuff->displayNameLength);
-    name[stuff->displayNameLength] = '\0';
-    attr.displayName = name;
-
-    status = dmxAttachScreen(stuff->physicalScreen, &attr);
-
-    free(name);
-
-    rep = (xDMXAddScreenReply) {
-        .type = X_Reply,
-        .sequenceNumber = client->sequence,
-        .length = 0,
-        .status = status,
-        .physicalScreen = stuff->physicalScreen
-    };
-    if (client->swapped) {
-        swaps(&rep.sequenceNumber);
-        swapl(&rep.length);
-        swapl(&rep.status);
-        swapl(&rep.physicalScreen);
-    }
-    WriteToClient(client, sizeof(xDMXAddScreenReply), &rep);
-    return Success;
-}
-
-static int
-ProcDMXRemoveScreen(ClientPtr client)
-{
-    REQUEST(xDMXRemoveScreenReq);
-    xDMXRemoveScreenReply rep;
-    int status = 0;
-
-    REQUEST_SIZE_MATCH(xDMXRemoveScreenReq);
-
-    status = dmxDetachScreen(stuff->physicalScreen);
-
-    rep = (xDMXRemoveScreenReply) {
-        .type = X_Reply,
-        .sequenceNumber = client->sequence,
-        .length = 0,
-        .status = status
-    };
-    if (client->swapped) {
-        swaps(&rep.sequenceNumber);
-        swapl(&rep.length);
-        swapl(&rep.status);
-    }
-    WriteToClient(client, sizeof(xDMXRemoveScreenReply), &rep);
-    return Success;
-}
-
-#ifdef PANORAMIX
-static int
-dmxPopulatePanoramiX(ClientPtr client, Window window,
-                     CARD32 *screens, CARD32 *windows,
-                     xRectangle *pos, xRectangle *vis)
-{
-    WindowPtr pWin;
-    PanoramiXRes *win;
-    int i;
-    int count = 0;
-    DMXWindowAttributesRec attr;
-
-    if (Success != dixLookupResourceByType((void **) &win,
-                                           window, XRT_WINDOW,
-                                           client, DixReadAccess))
-        return -1;              /* BadWindow */
-
-    FOR_NSCREENS(i) {
-        if (Success != dixLookupWindow(&pWin, win->info[i].id, client,
-                                       DixReadAccess))
-            return -1;          /* BadWindow */
-        if (dmxGetWindowAttributes(pWin, &attr)) {
-            screens[count] = attr.screen;
-            windows[count] = attr.window;
-            pos[count] = attr.pos;
-            vis[count] = attr.vis;
-            ++count;            /* Only count existing windows */
-        }
-    }
-    return count;
-}
-#endif
-
-static int
-dmxPopulate(ClientPtr client, Window window, CARD32 *screens,
-            CARD32 *windows, xRectangle *pos, xRectangle *vis)
-{
-    WindowPtr pWin;
-    DMXWindowAttributesRec attr;
-
-#ifdef PANORAMIX
-    if (!noPanoramiXExtension)
-        return dmxPopulatePanoramiX(client, window, screens, windows, pos, vis);
-#endif
-
-    if (Success != dixLookupWindow(&pWin, window, client, DixReadAccess))
-        return -1;              /* BadWindow */
-
-    dmxGetWindowAttributes(pWin, &attr);
-    *screens = attr.screen;
-    *windows = attr.window;
-    *pos = attr.pos;
-    *vis = attr.vis;
-    return 1;
-}
-
-static int
-dmxMaxNumScreens(void)
-{
-#ifdef PANORAMIX
-    if (!noPanoramiXExtension)
-        return PanoramiXNumScreens;
-#endif
-    return 1;
-}
-
-static int
-ProcDMXGetWindowAttributes(ClientPtr client)
-{
-    REQUEST(xDMXGetWindowAttributesReq);
-    xDMXGetWindowAttributesReply rep;
-    int i;
-    CARD32 *screens;
-    CARD32 *windows;
-    xRectangle *pos, *vis;
-    int count = dmxMaxNumScreens();
-
-    REQUEST_SIZE_MATCH(xDMXGetWindowAttributesReq);
-
-    if (!(screens = xallocarray(count, sizeof(*screens))))
-        return BadAlloc;
-    if (!(windows = xallocarray(count, sizeof(*windows)))) {
-        free(screens);
-        return BadAlloc;
-    }
-    if (!(pos = xallocarray(count, sizeof(*pos)))) {
-        free(windows);
-        free(screens);
-        return BadAlloc;
-    }
-    if (!(vis = xallocarray(count, sizeof(*vis)))) {
-        free(pos);
-        free(windows);
-        free(screens);
-        return BadAlloc;
-    }
-
-    if ((count = dmxPopulate(client, stuff->window, screens, windows,
-                             pos, vis)) < 0) {
-        free(vis);
-        free(pos);
-        free(windows);
-        free(screens);
-        return BadWindow;
-    }
-
-    rep = (xDMXGetWindowAttributesReply) {
-        .type = X_Reply,
-        .sequenceNumber = client->sequence,
-        .length = count * 6,
-        .screenCount = count
-    };
-    if (client->swapped) {
-        swaps(&rep.sequenceNumber);
-        swapl(&rep.length);
-        swapl(&rep.screenCount);
-        for (i = 0; i < count; i++) {
-            swapl(&screens[i]);
-            swapl(&windows[i]);
-
-            swaps(&pos[i].x);
-            swaps(&pos[i].y);
-            swaps(&pos[i].width);
-            swaps(&pos[i].height);
-
-            swaps(&vis[i].x);
-            swaps(&vis[i].y);
-            swaps(&vis[i].width);
-            swaps(&vis[i].height);
-        }
-    }
-
-    dmxFlushPendingSyncs();
-
-    WriteToClient(client, sizeof(xDMXGetWindowAttributesReply), &rep);
-    if (count) {
-        WriteToClient(client, count * sizeof(*screens), screens);
-        WriteToClient(client, count * sizeof(*windows), windows);
-        WriteToClient(client, count * sizeof(*pos), pos);
-        WriteToClient(client, count * sizeof(*vis), vis);
-    }
-
-    free(vis);
-    free(pos);
-    free(windows);
-    free(screens);
-
-    return Success;
-}
-
-static int
-ProcDMXGetDesktopAttributes(ClientPtr client)
-{
-    xDMXGetDesktopAttributesReply rep;
-    DMXDesktopAttributesRec attr;
-
-    REQUEST_SIZE_MATCH(xDMXGetDesktopAttributesReq);
-
-    dmxGetDesktopAttributes(&attr);
-
-    rep = (xDMXGetDesktopAttributesReply) {
-        .type = X_Reply,
-        .sequenceNumber = client->sequence,
-        .length = 0,
-        .width = attr.width,
-        .height = attr.height,
-        .shiftX = attr.shiftX,
-        .shiftY = attr.shiftY
-    };
-
-    if (client->swapped) {
-        swaps(&rep.sequenceNumber);
-        swapl(&rep.length);
-        swaps(&rep.width);
-        swaps(&rep.height);
-        swaps(&rep.shiftX);
-        swaps(&rep.shiftY);
-    }
-    WriteToClient(client, sizeof(xDMXGetDesktopAttributesReply), &rep);
-    return Success;
-}
-
-static int
-ProcDMXChangeDesktopAttributes(ClientPtr client)
-{
-    REQUEST(xDMXChangeDesktopAttributesReq);
-    xDMXChangeDesktopAttributesReply rep;
-    int status = DMX_BAD_XINERAMA;
-    CARD32 *value_list;
-    DMXDesktopAttributesRec attr;
-    int len;
-
-    REQUEST_AT_LEAST_SIZE(xDMXChangeDesktopAttributesReq);
-    len = client->req_len - (sizeof(xDMXChangeDesktopAttributesReq) >> 2);
-    if (len != Ones(stuff->valueMask))
-        return BadLength;
-
-    if (!_DMXXineramaActive())
-        goto noxinerama;
-
-    value_list = (CARD32 *) (stuff + 1);
-
-    dmxGetDesktopAttributes(&attr);
-    dmxFetchDesktopAttributes(stuff->valueMask, &attr, value_list);
-
-#ifdef PANORAMIX
-    status = dmxConfigureDesktop(&attr);
-#endif
-    if (status == BadValue)
-        return status;
-
- noxinerama:
-    rep = (xDMXChangeDesktopAttributesReply) {
-        .type = X_Reply,
-        .sequenceNumber = client->sequence,
-        .length = 0,
-        .status = status
-    };
-    if (client->swapped) {
-        swaps(&rep.sequenceNumber);
-        swapl(&rep.length);
-        swapl(&rep.status);
-    }
-    WriteToClient(client, sizeof(xDMXChangeDesktopAttributesReply), &rep);
-    return Success;
-}
-
-static int
-ProcDMXGetInputCount(ClientPtr client)
-{
-    xDMXGetInputCountReply rep;
-
-    REQUEST_SIZE_MATCH(xDMXGetInputCountReq);
-
-    rep = (xDMXGetInputCountReply) {
-        .type = X_Reply,
-        .sequenceNumber = client->sequence,
-        .length = 0,
-        .inputCount = dmxGetInputCount()
-    };
-    if (client->swapped) {
-        swaps(&rep.sequenceNumber);
-        swapl(&rep.length);
-        swapl(&rep.inputCount);
-    }
-    WriteToClient(client, sizeof(xDMXGetInputCountReply), &rep);
-    return Success;
-}
-
-static int
-ProcDMXGetInputAttributes(ClientPtr client)
-{
-    REQUEST(xDMXGetInputAttributesReq);
-    xDMXGetInputAttributesReply rep;
-    int length;
-    int paddedLength;
-    DMXInputAttributesRec attr;
-
-    REQUEST_SIZE_MATCH(xDMXGetInputAttributesReq);
-
-    if (dmxGetInputAttributes(stuff->deviceId, &attr))
-        return BadValue;
-
-    length = attr.name ? strlen(attr.name) : 0;
-    paddedLength = pad_to_int32(length);
-
-    rep = (xDMXGetInputAttributesReply) {
-        .type = X_Reply,
-        .sequenceNumber = client->sequence,
-        .length = bytes_to_int32(paddedLength),
-
-        .inputType = attr.inputType,
-        .physicalScreen = attr.physicalScreen,
-        .physicalId = attr.physicalId,
-        .nameLength = length,
-        .isCore = attr.isCore,
-        .sendsCore = attr.sendsCore,
-        .detached = attr.detached
-    };
-
-    if (client->swapped) {
-        swaps(&rep.sequenceNumber);
-        swapl(&rep.length);
-        swapl(&rep.inputType);
-        swapl(&rep.physicalScreen);
-        swapl(&rep.physicalId);
-        swapl(&rep.nameLength);
-    }
-    WriteToClient(client, sizeof(xDMXGetInputAttributesReply), &rep);
-    if (length)
-        WriteToClient(client, length, attr.name);
-    return Success;
-}
-
-static int
-ProcDMXAddInput(ClientPtr client)
-{
-    REQUEST(xDMXAddInputReq);
-    xDMXAddInputReply rep;
-    int status = 0;
-    CARD32 *value_list;
-    DMXInputAttributesRec attr;
-    int count;
-    char *name;
-    int len;
-    int paddedLength;
-    int id = -1;
-
-    REQUEST_AT_LEAST_SIZE(xDMXAddInputReq);
-    paddedLength = pad_to_int32(stuff->displayNameLength);
-    len = client->req_len - (sizeof(xDMXAddInputReq) >> 2);
-    if (len != Ones(stuff->valueMask) + paddedLength / 4)
-        return BadLength;
-
-    memset(&attr, 0, sizeof(attr));
-    value_list = (CARD32 *) (stuff + 1);
-    count = dmxFetchInputAttributes(stuff->valueMask, &attr, value_list);
-
-    if (!(name = malloc(stuff->displayNameLength + 1 + 4)))
-        return BadAlloc;
-    memcpy(name, &value_list[count], stuff->displayNameLength);
-    name[stuff->displayNameLength] = '\0';
-    attr.name = name;
-
-    status = dmxAddInput(&attr, &id);
-
-    free(name);
-
-    if (status)
-        return status;
-
-    rep = (xDMXAddInputReply) {
-        .type = X_Reply,
-        .sequenceNumber = client->sequence,
-        .length = 0,
-        .status = status,
-        .physicalId = id
-    };
-    if (client->swapped) {
-        swaps(&rep.sequenceNumber);
-        swapl(&rep.length);
-        swapl(&rep.status);
-        swapl(&rep.physicalId);
-    }
-    WriteToClient(client, sizeof(xDMXAddInputReply), &rep);
-    return Success;
-}
-
-static int
-ProcDMXRemoveInput(ClientPtr client)
-{
-    REQUEST(xDMXRemoveInputReq);
-    xDMXRemoveInputReply rep;
-    int status = 0;
-
-    REQUEST_SIZE_MATCH(xDMXRemoveInputReq);
-
-    status = dmxRemoveInput(stuff->physicalId);
-
-    if (status)
-        return status;
-
-    rep = (xDMXRemoveInputReply) {
-        .type = X_Reply,
-        .sequenceNumber = client->sequence,
-        .length = 0,
-        .status = status
-    };
-    if (client->swapped) {
-        swaps(&rep.sequenceNumber);
-        swapl(&rep.length);
-        swapl(&rep.status);
-    }
-    WriteToClient(client, sizeof(xDMXRemoveInputReply), &rep);
-    return Success;
-}
-
-static int
-ProcDMXDispatch(ClientPtr client)
-{
-    REQUEST(xReq);
-
-    switch (stuff->data) {
-    case X_DMXQueryVersion:
-        return ProcDMXQueryVersion(client);
-    case X_DMXSync:
-        return ProcDMXSync(client);
-    case X_DMXForceWindowCreation:
-        return ProcDMXForceWindowCreation(client);
-    case X_DMXGetScreenCount:
-        return ProcDMXGetScreenCount(client);
-    case X_DMXGetScreenAttributes:
-        return ProcDMXGetScreenAttributes(client);
-    case X_DMXChangeScreensAttributes:
-        return ProcDMXChangeScreensAttributes(client);
-    case X_DMXAddScreen:
-        return ProcDMXAddScreen(client);
-    case X_DMXRemoveScreen:
-        return ProcDMXRemoveScreen(client);
-    case X_DMXGetWindowAttributes:
-        return ProcDMXGetWindowAttributes(client);
-    case X_DMXGetDesktopAttributes:
-        return ProcDMXGetDesktopAttributes(client);
-    case X_DMXChangeDesktopAttributes:
-        return ProcDMXChangeDesktopAttributes(client);
-    case X_DMXGetInputCount:
-        return ProcDMXGetInputCount(client);
-    case X_DMXGetInputAttributes:
-        return ProcDMXGetInputAttributes(client);
-    case X_DMXAddInput:
-        return ProcDMXAddInput(client);
-    case X_DMXRemoveInput:
-        return ProcDMXRemoveInput(client);
-
-    case X_DMXGetScreenInformationDEPRECATED:
-    case X_DMXForceWindowCreationDEPRECATED:
-    case X_DMXReconfigureScreenDEPRECATED:
-        return BadImplementation;
-
-    default:
-        return BadRequest;
-    }
-}
-
-static int _X_COLD
-SProcDMXQueryVersion(ClientPtr client)
-{
-    REQUEST(xDMXQueryVersionReq);
-
-    swaps(&stuff->length);
-    REQUEST_SIZE_MATCH(xDMXQueryVersionReq);
-    return ProcDMXQueryVersion(client);
-}
-
-static int _X_COLD
-SProcDMXSync(ClientPtr client)
-{
-    REQUEST(xDMXSyncReq);
-
-    swaps(&stuff->length);
-    REQUEST_SIZE_MATCH(xDMXSyncReq);
-    return ProcDMXSync(client);
-}
-
-static int _X_COLD
-SProcDMXForceWindowCreation(ClientPtr client)
-{
-    REQUEST(xDMXForceWindowCreationReq);
-
-    swaps(&stuff->length);
-    REQUEST_SIZE_MATCH(xDMXForceWindowCreationReq);
-    swapl(&stuff->window);
-    return ProcDMXForceWindowCreation(client);
-}
-
-static int _X_COLD
-SProcDMXGetScreenCount(ClientPtr client)
-{
-    REQUEST(xDMXGetScreenCountReq);
-
-    swaps(&stuff->length);
-    REQUEST_SIZE_MATCH(xDMXGetScreenCountReq);
-    return ProcDMXGetScreenCount(client);
-}
-
-static int _X_COLD
-SProcDMXGetScreenAttributes(ClientPtr client)
-{
-    REQUEST(xDMXGetScreenAttributesReq);
-
-    swaps(&stuff->length);
-    REQUEST_SIZE_MATCH(xDMXGetScreenAttributesReq);
-    swapl(&stuff->physicalScreen);
-    return ProcDMXGetScreenAttributes(client);
-}
-
-static int _X_COLD
-SProcDMXChangeScreensAttributes(ClientPtr client)
-{
-    REQUEST(xDMXChangeScreensAttributesReq);
-
-    swaps(&stuff->length);
-    REQUEST_AT_LEAST_SIZE(xDMXGetScreenAttributesReq);
-    swapl(&stuff->screenCount);
-    swapl(&stuff->maskCount);
-    SwapRestL(stuff);
-    return ProcDMXGetScreenAttributes(client);
-}
-
-static int _X_COLD
-SProcDMXAddScreen(ClientPtr client)
-{
-    int paddedLength;
-
-    REQUEST(xDMXAddScreenReq);
-
-    swaps(&stuff->length);
-    REQUEST_AT_LEAST_SIZE(xDMXAddScreenReq);
-    swapl(&stuff->displayNameLength);
-    swapl(&stuff->valueMask);
-    paddedLength = pad_to_int32(stuff->displayNameLength);
-    SwapLongs((CARD32 *) (stuff + 1), LengthRestL(stuff) - paddedLength / 4);
-    return ProcDMXAddScreen(client);
-}
-
-static int _X_COLD
-SProcDMXRemoveScreen(ClientPtr client)
-{
-    REQUEST(xDMXRemoveScreenReq);
-
-    swaps(&stuff->length);
-    REQUEST_SIZE_MATCH(xDMXRemoveScreenReq);
-    swapl(&stuff->physicalScreen);
-    return ProcDMXRemoveScreen(client);
-}
-
-static int _X_COLD
-SProcDMXGetWindowAttributes(ClientPtr client)
-{
-    REQUEST(xDMXGetWindowAttributesReq);
-
-    swaps(&stuff->length);
-    REQUEST_SIZE_MATCH(xDMXGetWindowAttributesReq);
-    swapl(&stuff->window);
-    return ProcDMXGetWindowAttributes(client);
-}
-
-static int _X_COLD
-SProcDMXGetDesktopAttributes(ClientPtr client)
-{
-    REQUEST(xDMXGetDesktopAttributesReq);
-
-    swaps(&stuff->length);
-    REQUEST_SIZE_MATCH(xDMXGetDesktopAttributesReq);
-    return ProcDMXGetDesktopAttributes(client);
-}
-
-static int _X_COLD
-SProcDMXChangeDesktopAttributes(ClientPtr client)
-{
-    REQUEST(xDMXChangeDesktopAttributesReq);
-
-    swaps(&stuff->length);
-    REQUEST_AT_LEAST_SIZE(xDMXChangeDesktopAttributesReq);
-    swapl(&stuff->valueMask);
-    SwapRestL(stuff);
-    return ProcDMXChangeDesktopAttributes(client);
-}
-
-static int _X_COLD
-SProcDMXGetInputCount(ClientPtr client)
-{
-    REQUEST(xDMXGetInputCountReq);
-
-    swaps(&stuff->length);
-    REQUEST_SIZE_MATCH(xDMXGetInputCountReq);
-    return ProcDMXGetInputCount(client);
-}
-
-static int _X_COLD
-SProcDMXGetInputAttributes(ClientPtr client)
-{
-    REQUEST(xDMXGetInputAttributesReq);
-
-    swaps(&stuff->length);
-    REQUEST_SIZE_MATCH(xDMXGetInputAttributesReq);
-    swapl(&stuff->deviceId);
-    return ProcDMXGetInputAttributes(client);
-}
-
-static int _X_COLD
-SProcDMXAddInput(ClientPtr client)
-{
-    int paddedLength;
-
-    REQUEST(xDMXAddInputReq);
-
-    swaps(&stuff->length);
-    REQUEST_AT_LEAST_SIZE(xDMXAddInputReq);
-    swapl(&stuff->displayNameLength);
-    swapl(&stuff->valueMask);
-    paddedLength = pad_to_int32(stuff->displayNameLength);
-    SwapLongs((CARD32 *) (stuff + 1), LengthRestL(stuff) - paddedLength / 4);
-    return ProcDMXAddInput(client);
-}
-
-static int _X_COLD
-SProcDMXRemoveInput(ClientPtr client)
-{
-    REQUEST(xDMXRemoveInputReq);
-
-    swaps(&stuff->length);
-    REQUEST_SIZE_MATCH(xDMXRemoveInputReq);
-    swapl(&stuff->physicalId);
-    return ProcDMXRemoveInput(client);
-}
-
-static int _X_COLD
-SProcDMXDispatch(ClientPtr client)
-{
-    REQUEST(xReq);
-
-    switch (stuff->data) {
-    case X_DMXQueryVersion:
-        return SProcDMXQueryVersion(client);
-    case X_DMXSync:
-        return SProcDMXSync(client);
-    case X_DMXForceWindowCreation:
-        return SProcDMXForceWindowCreation(client);
-    case X_DMXGetScreenCount:
-        return SProcDMXGetScreenCount(client);
-    case X_DMXGetScreenAttributes:
-        return SProcDMXGetScreenAttributes(client);
-    case X_DMXChangeScreensAttributes:
-        return SProcDMXChangeScreensAttributes(client);
-    case X_DMXAddScreen:
-        return SProcDMXAddScreen(client);
-    case X_DMXRemoveScreen:
-        return SProcDMXRemoveScreen(client);
-    case X_DMXGetWindowAttributes:
-        return SProcDMXGetWindowAttributes(client);
-    case X_DMXGetDesktopAttributes:
-        return SProcDMXGetDesktopAttributes(client);
-    case X_DMXChangeDesktopAttributes:
-        return SProcDMXChangeDesktopAttributes(client);
-    case X_DMXGetInputCount:
-        return SProcDMXGetInputCount(client);
-    case X_DMXGetInputAttributes:
-        return SProcDMXGetInputAttributes(client);
-    case X_DMXAddInput:
-        return SProcDMXAddInput(client);
-    case X_DMXRemoveInput:
-        return SProcDMXRemoveInput(client);
-
-    case X_DMXGetScreenInformationDEPRECATED:
-    case X_DMXForceWindowCreationDEPRECATED:
-    case X_DMXReconfigureScreenDEPRECATED:
-        return BadImplementation;
-
-    default:
-        return BadRequest;
-    }
-}
-
-/** Initialize the extension. */
-void
-DMXExtensionInit(void)
-{
-    ExtensionEntry *extEntry;
-
-    if ((extEntry = AddExtension(DMX_EXTENSION_NAME, 0, 0,
-                                 ProcDMXDispatch, SProcDMXDispatch,
-                                 NULL, StandardMinorOpcode)))
-        DMXCode = extEntry->base;
-}
diff --git a/hw/dmx/dmx.h b/hw/dmx/dmx.h
deleted file mode 100644
index 7242e43..0000000
--- a/hw/dmx/dmx.h
+++ /dev/null
@@ -1,408 +0,0 @@
-/*
- * Copyright 2001-2003 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Kevin E. Martin <kem@redhat.com>
- *   David H. Dawes <dawes@xfree86.org>
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-/** \file
- * Main header file included by all other DMX-related files.
- */
-
-/** \mainpage
- * - <a href="http://dmx.sourceforge.net">DMX Home Page</a>
- * - <a href="http://sourceforge.net/projects/dmx">DMX Project Page (on
- * Source Forge)</a>
- * - <a href="http://dmx.sourceforge.net/dmx.html">Distributed Multihead
- * X design</a>, the design document for DMX
- * - <a href="http://dmx.sourceforge.net/DMXSpec.txt">Client-to-Server
- * DMX Extension to the X Protocol</a>
- */
-
-#ifndef DMX_H
-#define DMX_H
-
-#if HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#include "gcstruct.h"
-
-/* Handle client-side include files in one place. */
-#include "dmxclient.h"
-
-#include "globals.h"
-#include "scrnintstr.h"
-
-#include "picturestr.h"
-
-#ifdef GLXEXT
-#include <GL/glx.h>
-#include <GL/glxint.h>
-#endif
-
-typedef enum {
-    PosNone = -1,
-    PosAbsolute = 0,
-    PosRightOf,
-    PosLeftOf,
-    PosAbove,
-    PosBelow,
-    PosRelative
-} PositionType;
-
-/** Provide the typedef globally, but keep the contents opaque outside
- * of the input routines.  \see dmxinput.h */
-typedef struct _DMXInputInfo DMXInputInfo;
-
-/** Provide the typedef globally, but keep the contents opaque outside
- * of the XSync statistic routines.  \see dmxstat.c */
-typedef struct _DMXStatInfo DMXStatInfo;
-
-/** Global structure containing information about each backend screen. */
-typedef struct _DMXScreenInfo {
-    const char *name;             /**< Name from command line or config file */
-    int index;                    /**< Index into dmxScreens global          */
-
-    /*---------- Back-end X server information ----------*/
-
-    Display *beDisplay;           /**< Back-end X server's display */
-    int beWidth;                  /**< Width of BE display */
-    int beHeight;                 /**< Height of BE display */
-    int beDepth;                  /**< Depth of BE display */
-    int beBPP;                    /**< Bits per pixel of BE display */
-    int beXDPI;                   /**< Horizontal dots per inch of BE */
-    int beYDPI;                   /**< Vertical dots per inch of BE */
-
-    int beNumDepths;              /**< Number of depths on BE server */
-    int *beDepths;                /**< Depths from BE server */
-
-    int beNumPixmapFormats;           /**< Number of pixmap formats on BE */
-    XPixmapFormatValues *bePixmapFormats; /**< Pixmap formats on BE */
-
-    int beNumVisuals;             /**< Number of visuals on BE */
-    XVisualInfo *beVisuals;       /**< Visuals from BE server */
-    int beDefVisualIndex;           /**< Default visual index of BE */
-
-    int beNumDefColormaps;           /**< Number of default colormaps */
-    Colormap *beDefColormaps;     /**< Default colormaps for DMX server */
-
-    Pixel beBlackPixel;           /**< Default black pixel for BE */
-    Pixel beWhitePixel;           /**< Default white pixel for BE */
-
-    /*---------- Screen window information ----------*/
-
-    Window scrnWin;               /**< "Screen" window on backend display */
-    int scrnX;                    /**< X offset of "screen" WRT BE display */
-    int scrnY;                    /**< Y offset of "screen" WRT BE display */
-    int scrnWidth;                /**< Width of "screen" */
-    int scrnHeight;               /**< Height of "screen" */
-    int scrnXSign;                /**< X offset sign of "screen" */
-    int scrnYSign;                /**< Y offset sign of "screen" */
-
-                                  /** Default drawables for "screen" */
-    Drawable scrnDefDrawables[MAXFORMATS];
-
-    struct _DMXScreenInfo *next;  /**< List of "screens" on same display */
-    struct _DMXScreenInfo *over;  /**< List of "screens" that overlap */
-
-    /*---------- Root window information ----------*/
-
-    Window rootWin;               /**< "Root" window on backend display */
-    int rootX;                    /**< X offset of "root" window WRT "screen"*/
-    int rootY;                    /**< Y offset of "root" window WRT "screen"*/
-    int rootWidth;                /**< Width of "root" window */
-    int rootHeight;               /**< Height of "root" window */
-
-    int rootXOrigin;              /**< Global X origin of "root" window */
-    int rootYOrigin;              /**< Global Y origin of "root" window */
-
-    /*---------- Shadow framebuffer information ----------*/
-
-    void *shadow;                 /**< Shadow framebuffer data (if enabled) */
-    XlibGC shadowGC;              /**< Default GC used by shadow FB code */
-    XImage *shadowFBImage;        /**< Screen image used by shadow FB code */
-
-    /*---------- Other related information ----------*/
-
-    int shared;                   /**< Non-zero if another Xdmx is running */
-
-    Bool WMRunningOnBE;
-
-    Cursor noCursor;
-    Cursor curCursor;
-    /* Support for cursors on overlapped
-     * backend displays. */
-    CursorPtr cursor;
-    int cursorVisible;
-    int cursorNotShared;        /* for overlapping screens on a backend */
-
-    PositionType where;             /**< Relative layout information */
-    int whereX;                     /**< Relative layout information */
-    int whereY;                     /**< Relative layout information */
-    int whereRefScreen;             /**< Relative layout information */
-
-    int savedTimeout;               /**< Original screen saver timeout */
-    int dpmsCapable;                /**< Non-zero if backend is DPMS capable */
-    int dpmsEnabled;                /**< Non-zero if DPMS enabled */
-    int dpmsStandby;                /**< Original DPMS standby value  */
-    int dpmsSuspend;                /**< Original DPMS suspend value  */
-    int dpmsOff;                    /**< Original DPMS off value  */
-
-    DMXStatInfo *stat;              /**< Statistics about XSync  */
-    Bool needsSync;                 /**< True if an XSync is pending  */
-
-#ifdef GLXEXT
-                                  /** Visual information for glxProxy */
-    int numGlxVisuals;
-    __GLXvisualConfig *glxVisuals;
-    int glxMajorOpcode;
-    int glxErrorBase;
-
-                                  /** FB config information for glxProxy */
-    __GLXFBConfig *fbconfigs;
-    int numFBConfigs;
-#endif
-
-                                    /** Function pointers to wrapped screen
-				     *  functions */
-    CloseScreenProcPtr CloseScreen;
-    SaveScreenProcPtr SaveScreen;
-
-    CreateGCProcPtr CreateGC;
-
-    CreateWindowProcPtr CreateWindow;
-    DestroyWindowProcPtr DestroyWindow;
-    PositionWindowProcPtr PositionWindow;
-    ChangeWindowAttributesProcPtr ChangeWindowAttributes;
-    RealizeWindowProcPtr RealizeWindow;
-    UnrealizeWindowProcPtr UnrealizeWindow;
-    RestackWindowProcPtr RestackWindow;
-    WindowExposuresProcPtr WindowExposures;
-    CopyWindowProcPtr CopyWindow;
-
-    ResizeWindowProcPtr ResizeWindow;
-    ReparentWindowProcPtr ReparentWindow;
-
-    ChangeBorderWidthProcPtr ChangeBorderWidth;
-
-    GetImageProcPtr GetImage;
-    GetSpansProcPtr GetSpans;
-
-    CreatePixmapProcPtr CreatePixmap;
-    DestroyPixmapProcPtr DestroyPixmap;
-    BitmapToRegionProcPtr BitmapToRegion;
-
-    RealizeFontProcPtr RealizeFont;
-    UnrealizeFontProcPtr UnrealizeFont;
-
-    CreateColormapProcPtr CreateColormap;
-    DestroyColormapProcPtr DestroyColormap;
-    InstallColormapProcPtr InstallColormap;
-    StoreColorsProcPtr StoreColors;
-
-    SetShapeProcPtr SetShape;
-
-    CreatePictureProcPtr CreatePicture;
-    DestroyPictureProcPtr DestroyPicture;
-    ChangePictureClipProcPtr ChangePictureClip;
-    DestroyPictureClipProcPtr DestroyPictureClip;
-
-    ChangePictureProcPtr ChangePicture;
-    ValidatePictureProcPtr ValidatePicture;
-
-    CompositeProcPtr Composite;
-    GlyphsProcPtr Glyphs;
-    CompositeRectsProcPtr CompositeRects;
-
-    InitIndexedProcPtr InitIndexed;
-    CloseIndexedProcPtr CloseIndexed;
-    UpdateIndexedProcPtr UpdateIndexed;
-
-    TrapezoidsProcPtr Trapezoids;
-    TrianglesProcPtr Triangles;
-} DMXScreenInfo;
-
-/* Global variables available to all Xserver/hw/dmx routines. */
-extern int dmxNumScreens;                       /**< Number of dmxScreens */
-extern DMXScreenInfo *dmxScreens;               /**< List of outputs */
-extern XErrorEvent dmxLastErrorEvent;           /**< Last error that
-
-                                                 * occurred */
-extern Bool dmxErrorOccurred;                   /**< True if an error
-
-                                                 * occurred */
-extern Bool dmxOffScreenOpt;                    /**< True if using off
-
-                                                 * screen
-                                                 * optimizations */
-extern Bool dmxSubdividePrimitives;             /**< True if using the
-
-                                                 * primitive subdivision
-                                                 * optimization */
-extern Bool dmxLazyWindowCreation;              /**< True if using the
-
-                                                 * lazy window creation
-                                                 * optimization */
-extern Bool dmxUseXKB;                          /**< True if the XKB
-
-                                                 * extension should be
-                                                 * used with the backend
-                                                 * servers */
-extern int dmxDepth;                            /**< Requested depth if
-
-                                                 * non-zero */
-#ifdef GLXEXT
-extern Bool dmxGLXProxy;                        /**< True if glxProxy
-
-						 * support is enabled */
-extern Bool dmxGLXSwapGroupSupport;             /**< True if glxProxy
-
-						 * support for swap
-						 * groups and barriers
-						 * is enabled */
-extern Bool dmxGLXSyncSwap;                     /**< True if glxProxy
-
-						 * should force an XSync
-						 * request after each
-						 * swap buffers call */
-extern Bool dmxGLXFinishSwap;                   /**< True if glxProxy
-
-						 * should force a
-						 * glFinish request
-						 * after each swap
-						 * buffers call */
-#endif
-extern char *dmxFontPath;                       /**< NULL if no font
-
-						 * path is set on the
-						 * command line;
-						 * otherwise, a string
-						 * of comma separated
-						 * paths built from the
-						 * command line
-						 * specified font
-						 * paths */
-extern Bool dmxIgnoreBadFontPaths;              /**< True if bad font
-
-						 * paths should be
-						 * ignored during server
-						 * init */
-extern Bool dmxAddRemoveScreens;                /**< True if add and
-
-						 * remove screens support
-						 * is enabled */
-
-/** Wrap screen or GC function pointer */
-#define DMX_WRAP(_entry, _newfunc, _saved, _actual)			\
-do {									\
-    (_saved)->_entry  = (_actual)->_entry;				\
-    (_actual)->_entry = (_newfunc);					\
-} while (0)
-
-/** Unwrap screen or GC function pointer */
-#define DMX_UNWRAP(_entry, _saved, _actual)				\
-do {									\
-    (_actual)->_entry = (_saved)->_entry;				\
-} while (0)
-
-/* Define the MAXSCREENSALLOC/FREE macros, when MAXSCREENS patch has not
- * been applied to sources. */
-#ifdef MAXSCREENS
-#define MAXSCREEN_MAKECONSTSTR1(x) #x
-#define MAXSCREEN_MAKECONSTSTR2(x) MAXSCREEN_MAKECONSTSTR1(x)
-
-#define MAXSCREEN_FAILED_TXT "Failed at ["                              \
-   MAXSCREEN_MAKECONSTSTR2(__LINE__) ":" __FILE__ "] to allocate object: "
-
-#define _MAXSCREENSALLOCF(o,size,fatal)                                 \
-    do {                                                                \
-        if (!o) {                                                       \
-            o = calloc((size), sizeof(*(o)));                          \
-            if (!o && fatal) FatalError(MAXSCREEN_FAILED_TXT #o);       \
-        }                                                               \
-    } while (0)
-#define _MAXSCREENSALLOCR(o,size,retval)                                \
-    do {                                                                \
-        if (!o) {                                                       \
-            o = calloc((size), sizeof(*(o)));                          \
-            if (!o) return retval;                                      \
-        }                                                               \
-    } while (0)
-
-#define MAXSCREENSFREE(o)                                               \
-    do {                                                                \
-        free(o);                                                \
-        o = NULL;                                                       \
-    } while (0)
-
-#define MAXSCREENSALLOC(o)              _MAXSCREENSALLOCF(o,MAXSCREENS,  0)
-#define MAXSCREENSALLOC_FATAL(o)        _MAXSCREENSALLOCF(o,MAXSCREENS,  1)
-#define MAXSCREENSALLOC_RETURN(o,r)     _MAXSCREENSALLOCR(o,MAXSCREENS, (r))
-#define MAXSCREENSALLOCPLUSONE(o)       _MAXSCREENSALLOCF(o,MAXSCREENS+1,0)
-#define MAXSCREENSALLOCPLUSONE_FATAL(o) _MAXSCREENSALLOCF(o,MAXSCREENS+1,1)
-#define MAXSCREENSCALLOC(o,m)           _MAXSCREENSALLOCF(o,MAXSCREENS*(m),0)
-#define MAXSCREENSCALLOC_FATAL(o,m)     _MAXSCREENSALLOCF(o,MAXSCREENS*(m),1)
-#endif
-
-extern DevPrivateKeyRec dmxGCPrivateKeyRec;
-
-#define dmxGCPrivateKey (&dmxGCPrivateKeyRec) /**< Private index for GCs       */
-
-extern DevPrivateKeyRec dmxWinPrivateKeyRec;
-
-#define dmxWinPrivateKey (&dmxWinPrivateKeyRec) /**< Private index for Windows   */
-
-extern DevPrivateKeyRec dmxPixPrivateKeyRec;
-
-#define dmxPixPrivateKey (&dmxPixPrivateKeyRec) /**< Private index for Pixmaps   */
-
-extern int dmxFontPrivateIndex;        /**< Private index for Fonts     */
-
-extern DevPrivateKeyRec dmxScreenPrivateKeyRec;
-
-#define dmxScreenPrivateKey (&dmxScreenPrivateKeyRec) /**< Private index for Screens   */
-
-extern DevPrivateKeyRec dmxColormapPrivateKeyRec;
-
-#define dmxColormapPrivateKey (&dmxColormapPrivateKeyRec) /**< Private index for Colormaps */
-
-extern DevPrivateKeyRec dmxPictPrivateKeyRec;
-
-#define dmxPictPrivateKey (&dmxPictPrivateKeyRec) /**< Private index for Picts     */
-
-extern DevPrivateKeyRec dmxGlyphSetPrivateKeyRec;
-
-#define dmxGlyphSetPrivateKey (&dmxGlyphSetPrivateKeyRec) /**< Private index for GlyphSets */
-
-void DMXExtensionInit(void);
-
-#endif                          /* DMX_H */
diff --git a/hw/dmx/dmx_glxvisuals.c b/hw/dmx/dmx_glxvisuals.c
deleted file mode 100644
index b3bd3b7..0000000
--- a/hw/dmx/dmx_glxvisuals.c
+++ /dev/null
@@ -1,615 +0,0 @@
-/*
- * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
- * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice including the dates of first publication and
- * either this permission notice or a reference to
- * http://oss.sgi.com/projects/FreeB/
- * shall be included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of Silicon Graphics, Inc.
- * shall not be used in advertising or otherwise to promote the sale, use or
- * other dealings in this Software without prior written authorization from
- * Silicon Graphics, Inc.
- */
-
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#include "dmx.h"
-#include <GL/glx.h>
-#include <GL/glxproto.h>
-#include <X11/extensions/Xext.h>
-#include <X11/extensions/extutil.h>
-#include <limits.h>
-
-#include "dmx_glxvisuals.h"
-
-__GLXvisualConfig *
-GetGLXVisualConfigs(Display * dpy, int screen, int *nconfigs)
-{
-    xGLXGetVisualConfigsReq *req;
-    xGLXGetVisualConfigsReply reply;
-    __GLXvisualConfig *config, *configs;
-    GLint i, j, nvisuals, nprops;
-    INT32 *props, *p;
-    int majorOpcode, dummy;
-    int num_good_visuals;
-
-    if (!XQueryExtension(dpy, "GLX", &majorOpcode, &dummy, &dummy)) {
-        return NULL;
-    }
-
-    /* Send the glXGetVisualConfigs request */
-    LockDisplay(dpy);
-    GetReq(GLXGetVisualConfigs, req);
-    req->reqType = majorOpcode;
-    req->glxCode = X_GLXGetVisualConfigs;
-    req->screen = screen;
-    if (!_XReply(dpy, (xReply *) &reply, 0, False)) {
-        /* Something is busted. Punt. */
-        UnlockDisplay(dpy);
-        SyncHandle();
-        return NULL;
-    }
-
-    nvisuals = (int) reply.numVisuals;
-    if (!nvisuals) {
-        /* This screen does not support GL rendering */
-        UnlockDisplay(dpy);
-        SyncHandle();
-        return NULL;
-    }
-
-    /* Check number of properties per visual */
-    nprops = (int) reply.numProps;
-    if (nprops < __GLX_MIN_CONFIG_PROPS) {
-        /* Huh?  Not in protocol defined limits.  Punt */
-        UnlockDisplay(dpy);
-        SyncHandle();
-        return NULL;
-    }
-    if (nprops < (INT_MAX / __GLX_SIZE_CARD32))
-        props = Xmalloc(nprops * __GLX_SIZE_CARD32);
-    else
-        props = NULL;
-    if (!props) {
-        UnlockDisplay(dpy);
-        SyncHandle();
-        return NULL;
-    }
-
-    /* Allocate memory for our config structure */
-    if (nvisuals < (INT_MAX / sizeof(__GLXvisualConfig)))
-        config = Xcalloc(nvisuals, sizeof(__GLXvisualConfig));
-    else
-        config = NULL;
-    if (!config) {
-        free(props);
-        UnlockDisplay(dpy);
-        SyncHandle();
-        return NULL;
-    }
-    configs = config;
-    num_good_visuals = 0;
-
-    /* Convert config structure into our format */
-    for (i = 0; i < nvisuals; i++) {
-
-        /* Read config structure */
-        _XRead(dpy, (char *) props, (nprops * __GLX_SIZE_CARD32));
-
-        /* fill in default values */
-        config->visualRating = GLX_NONE_EXT;
-        config->transparentPixel = GLX_NONE_EXT;
-
-        /* Copy in the first set of properties */
-        config->vid = props[0];
-        config->class = props[1];
-
-        config->rgba = (Bool) props[2];
-
-        config->redSize = props[3];
-        config->greenSize = props[4];
-        config->blueSize = props[5];
-        config->alphaSize = props[6];
-
-        config->accumRedSize = props[7];
-        config->accumGreenSize = props[8];
-        config->accumBlueSize = props[9];
-        config->accumAlphaSize = props[10];
-
-        config->doubleBuffer = (Bool) props[11];
-        config->stereo = (Bool) props[12];
-
-        config->bufferSize = props[13];
-        config->depthSize = props[14];
-        config->stencilSize = props[15];
-
-        config->auxBuffers = props[16];
-        config->level = props[17];
-
-        /* Process remaining properties */
-        p = &props[18];
-        for (j = __GLX_MIN_CONFIG_PROPS; j < nprops; j += 2) {
-            int property = *p++;
-            int value = *p++;
-
-            switch (property) {
-            case GLX_SAMPLES_SGIS:
-                config->multiSampleSize = value;
-                break;
-            case GLX_SAMPLE_BUFFERS_SGIS:
-                config->nMultiSampleBuffers = value;
-                break;
-
-            case GLX_TRANSPARENT_TYPE_EXT:
-                config->transparentPixel = value;
-                break;
-            case GLX_TRANSPARENT_INDEX_VALUE_EXT:
-                config->transparentIndex = value;
-                break;
-            case GLX_TRANSPARENT_RED_VALUE_EXT:
-                config->transparentRed = value;
-                break;
-            case GLX_TRANSPARENT_GREEN_VALUE_EXT:
-                config->transparentGreen = value;
-                break;
-            case GLX_TRANSPARENT_BLUE_VALUE_EXT:
-                config->transparentBlue = value;
-                break;
-            case GLX_TRANSPARENT_ALPHA_VALUE_EXT:
-                config->transparentAlpha = value;
-                break;
-
-            case GLX_VISUAL_CAVEAT_EXT:
-                config->visualRating = value;
-                break;
-
-                /* visualSelectGroup is an internal used property */
-            case GLX_VISUAL_SELECT_GROUP_SGIX:
-                config->visualSelectGroup = value;
-                break;
-
-            default:
-                /* Ignore properties we don't recognize */
-                break;
-            }
-        }                       /* for j */
-
-        /*
-           // filter out overlay visuals (dmx does not support overlays)
-         */
-        if (config->level == 0) {
-            config++;
-            num_good_visuals++;
-        }
-
-    }                           /* for i */
-
-    UnlockDisplay(dpy);
-
-    nvisuals = num_good_visuals;
-
-    config = configs;
-    for (i = 0; i < nvisuals; i++) {
-        /* XXX hack to fill-in mask info (need a better way to do this) */
-        {
-            XVisualInfo *vis, template;
-            int n;
-
-            template.screen = screen;
-            template.visualid = config->vid;
-            vis = XGetVisualInfo(dpy, VisualScreenMask | VisualIDMask,
-                                 &template, &n);
-
-            if (vis != NULL) {
-                config->redMask = vis->red_mask;
-                config->greenMask = vis->green_mask;
-                config->blueMask = vis->blue_mask;
-                config->alphaMask = 0;  /* XXX */
-                free(vis);
-            }
-        }
-        config++;
-    }                           /* for i */
-
-    XFree(props);
-    SyncHandle();
-
-    *nconfigs = nvisuals;
-    return configs;
-}
-
-__GLXFBConfig *
-GetGLXFBConfigs(Display * dpy, int glxMajorOpcode, int *nconfigs)
-{
-    xGLXGetFBConfigsReq *req;
-    xGLXGetFBConfigsReply reply;
-    __GLXFBConfig *config, *fbconfigs;
-    GLint i, j, numFBConfigs, numAttribs;
-    INT32 *attrs, *p;
-    int screen = DefaultScreen(dpy);
-    int numValidConfigs = 0;
-
-    /* Send the glXGetFBConfigs request */
-    LockDisplay(dpy);
-    GetReq(GLXGetFBConfigs, req);
-    req->reqType = glxMajorOpcode;
-    req->glxCode = X_GLXGetFBConfigs;
-    req->screen = screen;
-
-    *nconfigs = 0;
-
-    if (!_XReply(dpy, (xReply *) &reply, 0, False)) {
-        /* Something is busted. Punt. */
-        UnlockDisplay(dpy);
-        SyncHandle();
-        return NULL;
-    }
-
-    numFBConfigs = (int) reply.numFBConfigs;
-    if (!numFBConfigs) {
-        /* This screen does not support GL rendering */
-        UnlockDisplay(dpy);
-        SyncHandle();
-        return NULL;
-    }
-
-    numAttribs = (int) reply.numAttribs;
-    if (!numAttribs) {
-        UnlockDisplay(dpy);
-        SyncHandle();
-        return NULL;
-    }
-
-    if (numAttribs < (INT_MAX / (2 * __GLX_SIZE_CARD32)))
-        attrs = Xmalloc(2 * numAttribs * __GLX_SIZE_CARD32);
-    else
-        attrs = NULL;
-    if (!attrs) {
-        UnlockDisplay(dpy);
-        SyncHandle();
-        return NULL;
-    }
-
-    /* Allocate memory for our config structure */
-    if (numFBConfigs < (INT_MAX / sizeof(__GLXFBConfig)))
-        config = Xcalloc(numFBConfigs, sizeof(__GLXFBConfig));
-    else
-        config = NULL;
-    if (!config) {
-        free(attrs);
-        UnlockDisplay(dpy);
-        SyncHandle();
-        return NULL;
-    }
-    fbconfigs = config;
-
-    /* Convert attribute list into our format */
-    for (i = 0; i < numFBConfigs; i++) {
-
-        /* Fill in default properties */
-        config->transparentType = GLX_NONE_EXT;
-        config->visualCaveat = GLX_NONE_EXT;
-        config->minRed = 0.;
-        config->maxRed = 1.;
-        config->minGreen = 0.;
-        config->maxGreen = 1.;
-        config->minBlue = 0.;
-        config->maxBlue = 1.;
-        config->minAlpha = 0.;
-        config->maxAlpha = 1.;
-
-        /* Read attribute list */
-        _XRead(dpy, (char *) attrs, (2 * numAttribs * __GLX_SIZE_CARD32));
-
-        p = attrs;
-        for (j = 0; j < numAttribs; j++) {
-            int attribute = *p++;
-            int value = *p++;
-
-            switch (attribute) {
-                /* core attributes */
-            case GLX_FBCONFIG_ID:
-                config->id = value;
-                break;
-            case GLX_BUFFER_SIZE:
-                config->indexBits = value;
-                break;
-            case GLX_LEVEL:
-                config->level = value;
-                break;
-            case GLX_DOUBLEBUFFER:
-                config->doubleBufferMode = value;
-                break;
-            case GLX_STEREO:
-                config->stereoMode = value;
-                break;
-            case GLX_AUX_BUFFERS:
-                config->maxAuxBuffers = value;
-                break;
-            case GLX_RED_SIZE:
-                config->redBits = value;
-                break;
-            case GLX_GREEN_SIZE:
-                config->greenBits = value;
-                break;
-            case GLX_BLUE_SIZE:
-                config->blueBits = value;
-                break;
-            case GLX_ALPHA_SIZE:
-                config->alphaBits = value;
-                break;
-            case GLX_DEPTH_SIZE:
-                config->depthBits = value;
-                break;
-            case GLX_STENCIL_SIZE:
-                config->stencilBits = value;
-                break;
-            case GLX_ACCUM_RED_SIZE:
-                config->accumRedBits = value;
-                break;
-            case GLX_ACCUM_GREEN_SIZE:
-                config->accumGreenBits = value;
-                break;
-            case GLX_ACCUM_BLUE_SIZE:
-                config->accumBlueBits = value;
-                break;
-            case GLX_ACCUM_ALPHA_SIZE:
-                config->accumAlphaBits = value;
-                break;
-            case GLX_RENDER_TYPE:
-                config->renderType = value;
-                break;
-            case GLX_DRAWABLE_TYPE:
-                config->drawableType = value;
-                break;
-            case GLX_X_VISUAL_TYPE:
-                config->visualType = value;
-                break;
-            case GLX_CONFIG_CAVEAT:
-                config->visualCaveat = value;
-                break;
-            case GLX_TRANSPARENT_TYPE:
-                config->transparentType = value;
-                break;
-            case GLX_TRANSPARENT_INDEX_VALUE:
-                config->transparentIndex = value;
-                break;
-            case GLX_TRANSPARENT_RED_VALUE:
-                config->transparentRed = value;
-                break;
-            case GLX_TRANSPARENT_GREEN_VALUE:
-                config->transparentGreen = value;
-                break;
-            case GLX_TRANSPARENT_BLUE_VALUE:
-                config->transparentBlue = value;
-                break;
-            case GLX_TRANSPARENT_ALPHA_VALUE:
-                config->transparentAlpha = value;
-                break;
-            case GLX_MAX_PBUFFER_WIDTH:
-                config->maxPbufferWidth = value;
-                break;
-            case GLX_MAX_PBUFFER_HEIGHT:
-                config->maxPbufferHeight = value;
-                break;
-            case GLX_MAX_PBUFFER_PIXELS:
-                config->maxPbufferPixels = value;
-                break;
-            case GLX_VISUAL_ID:
-                config->associatedVisualId = value;
-                break;
-
-                /* visualSelectGroup is an internal used property */
-            case GLX_VISUAL_SELECT_GROUP_SGIX:
-                config->visualSelectGroup = value;
-                break;
-
-                /* SGIS_multisample attributes */
-            case GLX_SAMPLES_SGIS:
-                config->multiSampleSize = value;
-                break;
-            case GLX_SAMPLE_BUFFERS_SGIS:
-                config->nMultiSampleBuffers = value;
-                break;
-
-                /* SGIX_pbuffer specific attributes */
-            case GLX_OPTIMAL_PBUFFER_WIDTH_SGIX:
-                config->optimalPbufferWidth = value;
-                break;
-            case GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX:
-                config->optimalPbufferHeight = value;
-                break;
-
-            default:
-                /* Ignore attributes we don't recognize */
-                break;
-            }
-        }                       /* for j */
-
-        /* Fill in derived values */
-        config->screen = screen;
-
-        /* The rgbMode should be true for any mode which has distinguishible
-         * R, G and B components
-         */
-        config->rgbMode = (config->renderType
-                           & (GLX_RGBA_BIT | GLX_RGBA_FLOAT_BIT_ARB
-                              | GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT)) != 0;
-        config->colorIndexMode = !config->rgbMode;
-
-        config->haveAccumBuffer =
-            config->accumRedBits > 0 ||
-            config->accumGreenBits > 0 || config->accumBlueBits > 0;
-        /* Can't have alpha without color */
-
-        config->haveDepthBuffer = config->depthBits > 0;
-        config->haveStencilBuffer = config->stencilBits > 0;
-
-        /* overlay visuals are not valid for now */
-        if (!config->level) {
-            config++;
-            numValidConfigs++;
-        }
-
-    }                           /* for i */
-    UnlockDisplay(dpy);
-
-    config = fbconfigs;
-    for (i = 0; i < numValidConfigs; i++) {
-
-        /* XXX hack to fill-in mask info (need a better way to do this) */
-        if (config->associatedVisualId != 0) {
-            XVisualInfo *vis, template;
-            int n;
-
-            template.screen = screen;
-            template.visualid = config->associatedVisualId;
-            vis = XGetVisualInfo(dpy, VisualScreenMask | VisualIDMask,
-                                 &template, &n);
-
-            if (vis != NULL) {
-                config->redMask = (GLuint) vis->red_mask;
-                config->greenMask = (GLuint) vis->green_mask;
-                config->blueMask = (GLuint) vis->blue_mask;
-                config->alphaMask = 0;  /* XXX */
-                free(vis);
-            }
-        }
-
-        config++;
-    }                           /* for i */
-
-    XFree(attrs);
-    SyncHandle();
-
-    *nconfigs = numValidConfigs;
-    return fbconfigs;
-}
-
-__GLXvisualConfig *
-GetGLXVisualConfigsFromFBConfigs(__GLXFBConfig * fbconfigs, int nfbconfigs,
-                                 XVisualInfo * visuals, int nvisuals,
-                                 __GLXvisualConfig * glxConfigs,
-                                 int nGlxConfigs, int *nconfigs)
-{
-    __GLXvisualConfig *configs = NULL;
-    int i;
-
-    if (!fbconfigs || !nfbconfigs || !nconfigs)
-        return NULL;
-    *nconfigs = 0;
-
-    /* Allocate memory for our config structure */
-    configs = (__GLXvisualConfig *)
-        Xmalloc(nfbconfigs * sizeof(__GLXvisualConfig));
-    if (!configs) {
-        return NULL;
-    }
-    memset(configs, 0, nfbconfigs * sizeof(__GLXvisualConfig));
-
-    for (i = 0; i < nfbconfigs; i++) {
-        __GLXFBConfig *fbcfg = &fbconfigs[i];
-
-        if (fbcfg->associatedVisualId > 0) {
-            __GLXvisualConfig *cfg = configs + (*nconfigs);
-            int j;
-            XVisualInfo *vinfo = NULL;
-
-            for (j = 0; j < nvisuals; j++) {
-                if (visuals[j].visualid == fbcfg->associatedVisualId) {
-                    vinfo = &visuals[j];
-                    break;
-                }
-            }
-            if (!vinfo)
-                continue;
-
-            /* skip 16 bit colormap visuals */
-            if (vinfo->depth == 16 &&
-                vinfo->class != TrueColor && vinfo->class != DirectColor) {
-                continue;
-            }
-
-            (*nconfigs)++;
-
-            /*
-             * if the same visualid exists in the glx configs,
-             * copy the glx attributes from the glx config
-             */
-            for (j = 0; j < nGlxConfigs; j++) {
-                if (glxConfigs[j].vid == vinfo->visualid)
-                    break;
-            }
-            if (j < nGlxConfigs) {
-                memcpy(cfg, &glxConfigs[j], sizeof(__GLXvisualConfig));
-                continue;
-            }
-
-            /*
-             * make glx attributes from the FB config attributes
-             */
-            cfg->vid = fbcfg->associatedVisualId;
-            cfg->class = vinfo->class;
-            cfg->rgba = !(fbcfg->renderType & GLX_COLOR_INDEX_BIT_SGIX);
-            cfg->redSize = fbcfg->redBits;
-            cfg->greenSize = fbcfg->greenBits;
-            cfg->blueSize = fbcfg->blueBits;
-            cfg->alphaSize = fbcfg->alphaBits;
-            cfg->redMask = fbcfg->redMask;
-            cfg->greenMask = fbcfg->greenMask;
-            cfg->blueMask = fbcfg->blueMask;
-            cfg->alphaMask = fbcfg->alphaMask;
-            cfg->accumRedSize = fbcfg->accumRedBits;
-            cfg->accumGreenSize = fbcfg->accumGreenBits;
-            cfg->accumBlueSize = fbcfg->accumBlueBits;
-            cfg->accumAlphaSize = fbcfg->accumAlphaBits;
-            cfg->doubleBuffer = fbcfg->doubleBufferMode;
-            cfg->stereo = fbcfg->stereoMode;
-            if (vinfo->class == TrueColor || vinfo->class == DirectColor) {
-                cfg->bufferSize = (fbcfg->rgbMode ? (fbcfg->redBits +
-                                                     fbcfg->greenBits +
-                                                     fbcfg->blueBits +
-                                                     fbcfg->alphaBits)
-                                   : fbcfg->indexBits);
-            }
-            else {
-                cfg->bufferSize = vinfo->depth;
-            }
-            cfg->depthSize = fbcfg->depthBits;
-            cfg->stencilSize = fbcfg->stencilBits;
-            cfg->auxBuffers = fbcfg->maxAuxBuffers;
-            cfg->level = fbcfg->level;
-            cfg->visualRating = fbcfg->visualCaveat;
-            cfg->transparentPixel = fbcfg->transparentType;
-            cfg->transparentRed = fbcfg->transparentRed;
-            cfg->transparentGreen = fbcfg->transparentGreen;
-            cfg->transparentBlue = fbcfg->transparentBlue;
-            cfg->transparentAlpha = fbcfg->transparentAlpha;
-            cfg->transparentIndex = fbcfg->transparentIndex;
-            cfg->multiSampleSize = fbcfg->multiSampleSize;
-            cfg->nMultiSampleBuffers = fbcfg->nMultiSampleBuffers;
-            cfg->visualSelectGroup = fbcfg->visualSelectGroup;
-        }
-    }
-
-    return configs;
-}
diff --git a/hw/dmx/dmx_glxvisuals.h b/hw/dmx/dmx_glxvisuals.h
deleted file mode 100644
index 54c3b44..0000000
--- a/hw/dmx/dmx_glxvisuals.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
- * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice including the dates of first publication and
- * either this permission notice or a reference to
- * http://oss.sgi.com/projects/FreeB/
- * shall be included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of Silicon Graphics, Inc.
- * shall not be used in advertising or otherwise to promote the sale, use or
- * other dealings in this Software without prior written authorization from
- * Silicon Graphics, Inc.
- */
-
-#ifndef _GLXVISUALS_H
-#define _GLXVISUALS_H
-
-#include <GL/glxint.h>
-
-/** GLX Visual private area. */
-typedef struct {
-    int x_visual_depth;
-    int x_visual_class;
-} dmxGlxVisualPrivate;
-
-__GLXvisualConfig *GetGLXVisualConfigs(Display * dpy,
-                                       int screen, int *nconfigs);
-
-__GLXFBConfig *GetGLXFBConfigs(Display * dpy,
-                               int glxMajorOpcode, int *nconfigs);
-
-__GLXvisualConfig *GetGLXVisualConfigsFromFBConfigs(__GLXFBConfig * fbconfigs,
-                                                    int nfbconfigs,
-                                                    XVisualInfo * visuals,
-                                                    int nvisuals,
-                                                    __GLXvisualConfig
-                                                    * glxConfigs,
-                                                    int nGlxConfigs,
-                                                    int *nconfigs);
-
-#endif
diff --git a/hw/dmx/dmxcb.c b/hw/dmx/dmxcb.c
deleted file mode 100644
index cca5702..0000000
--- a/hw/dmx/dmxcb.c
+++ /dev/null
@@ -1,229 +0,0 @@
-/*
- * Copyright 2001-2004 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-/** \file
- * This code queries and modifies the connection block. */
-
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#include "dmx.h"
-#include "dmxcb.h"
-#include "dmxinput.h"
-#include "dmxlog.h"
-
-extern int connBlockScreenStart;
-
-#ifdef PANORAMIX
-#include "panoramiXsrv.h"
-#endif
-
-int dmxGlobalWidth, dmxGlobalHeight;
-
-/** We may want the wall dimensions to be different from the bounding
- * box dimensions that Xinerama computes, so save those and update them
- * here.
- */
-void
-dmxSetWidthHeight(int width, int height)
-{
-    dmxGlobalWidth = width;
-    dmxGlobalHeight = height;
-}
-
-/** Computes the global bounding box for DMX.  This may be larger than
- * the one computed by Xinerama because of the DMX configuration
- * file. */
-void
-dmxComputeWidthHeight(DMXRecomputeFlag flag)
-{
-    int i;
-    DMXScreenInfo *dmxScreen;
-    int w = 0;
-    int h = 0;
-
-    for (i = 0; i < dmxNumScreens; i++) {
-        /* Don't use root* here because this is
-         * the global bounding box. */
-        dmxScreen = &dmxScreens[i];
-        if (w < dmxScreen->scrnWidth + dmxScreen->rootXOrigin)
-            w = dmxScreen->scrnWidth + dmxScreen->rootXOrigin;
-        if (h < dmxScreen->scrnHeight + dmxScreen->rootYOrigin)
-            h = dmxScreen->scrnHeight + dmxScreen->rootYOrigin;
-    }
-    if (!dmxGlobalWidth && !dmxGlobalHeight) {
-        dmxLog(dmxInfo, "Using %dx%d as global bounding box\n", w, h);
-    }
-    else {
-        switch (flag) {
-        case DMX_NO_RECOMPUTE_BOUNDING_BOX:
-            dmxLog(dmxInfo,
-                   "Using old bounding box (%dx%d) instead of new (%dx%d)\n",
-                   dmxGlobalWidth, dmxGlobalHeight, w, h);
-            w = dmxGlobalWidth;
-            h = dmxGlobalHeight;
-            break;
-        case DMX_RECOMPUTE_BOUNDING_BOX:
-            dmxLog(dmxInfo,
-                   "Using %dx%d as global bounding box, instead of %dx%d\n",
-                   w, h, dmxGlobalWidth, dmxGlobalHeight);
-            break;
-        }
-    }
-
-    dmxGlobalWidth = w;
-    dmxGlobalHeight = h;
-}
-
-/** A callback routine that hooks into Xinerama and provides a
- * convenient place to print summary log information during server
- * startup.  This routine does not modify any values. */
-void
-dmxConnectionBlockCallback(void)
-{
-    xWindowRoot *root = (xWindowRoot *) (ConnectionInfo + connBlockScreenStart);
-    int offset = connBlockScreenStart + sizeof(xWindowRoot);
-    int i;
-    Bool *found = NULL;
-
-    MAXSCREENSALLOC(found);
-    if (!found)
-        dmxLog(dmxFatal, "dmxConnectionBlockCallback: out of memory\n");
-
-    dmxLog(dmxInfo, "===== Start of Summary =====\n");
-#ifdef PANORAMIX
-    if (!noPanoramiXExtension) {
-        if (dmxGlobalWidth && dmxGlobalHeight
-            && (dmxGlobalWidth != PanoramiXPixWidth
-                || dmxGlobalHeight != PanoramiXPixHeight)) {
-            dmxLog(dmxInfo,
-                   "Changing Xinerama dimensions from %d %d to %d %d\n",
-                   PanoramiXPixWidth, PanoramiXPixHeight,
-                   dmxGlobalWidth, dmxGlobalHeight);
-            PanoramiXPixWidth = root->pixWidth = dmxGlobalWidth;
-            PanoramiXPixHeight = root->pixHeight = dmxGlobalHeight;
-        }
-        else {
-            dmxGlobalWidth = PanoramiXPixWidth;
-            dmxGlobalHeight = PanoramiXPixHeight;
-        }
-        dmxLog(dmxInfo, "%d screens configured with Xinerama (%d %d)\n",
-               PanoramiXNumScreens, PanoramiXPixWidth, PanoramiXPixHeight);
-        FOR_NSCREENS(i) found[i] = FALSE;
-    }
-    else {
-#endif
-        /* This never happens because we're
-         * either called from a Xinerama
-         * callback or during reconfiguration
-         * (which only works with Xinerama on).
-         * In any case, be reasonable. */
-        dmxLog(dmxInfo, "%d screens configured (%d %d)\n",
-               screenInfo.numScreens, root->pixWidth, root->pixHeight);
-#ifdef PANORAMIX
-    }
-#endif
-
-    for (i = 0; i < root->nDepths; i++) {
-        xDepth *depth = (xDepth *) (ConnectionInfo + offset);
-        int voffset = offset + sizeof(xDepth);
-        xVisualType *visual = (xVisualType *) (ConnectionInfo + voffset);
-        int j;
-
-        dmxLog(dmxInfo, "%d visuals at depth %d:\n",
-               depth->nVisuals, depth->depth);
-        for (j = 0; j < depth->nVisuals; j++, visual++) {
-            XVisualInfo vi;
-
-            vi.visual = NULL;
-            vi.visualid = visual->visualID;
-            vi.screen = 0;
-            vi.depth = depth->depth;
-            vi.class = visual->class;
-            vi.red_mask = visual->redMask;
-            vi.green_mask = visual->greenMask;
-            vi.blue_mask = visual->blueMask;
-            vi.colormap_size = visual->colormapEntries;
-            vi.bits_per_rgb = visual->bitsPerRGB;
-            dmxLogVisual(NULL, &vi, 0);
-
-#ifdef PANORAMIX
-            if (!noPanoramiXExtension) {
-                int k;
-
-                FOR_NSCREENS(k) {
-                    DMXScreenInfo *dmxScreen = &dmxScreens[k];
-
-                    if (dmxScreen->beDisplay) {
-                        XVisualInfo *pvi =
-                            &dmxScreen->beVisuals[dmxScreen->beDefVisualIndex];
-                        if (pvi->depth == depth->depth &&
-                            pvi->class == visual->class)
-                            found[k] = TRUE;
-                    }
-                    else {
-                        /* Screen #k is detatched, so it always succeeds */
-                        found[k] = TRUE;
-                    }
-                }
-            }
-#endif
-        }
-        offset = voffset + depth->nVisuals * sizeof(xVisualType);
-    }
-
-    dmxInputLogDevices();
-    dmxLog(dmxInfo, "===== End of Summary =====\n");
-
-#ifdef PANORAMIX
-    if (!noPanoramiXExtension) {
-        Bool fatal = FALSE;
-
-        FOR_NSCREENS(i) {
-            fatal |= !found[i];
-            if (!found[i]) {
-                dmxLog(dmxError,
-                       "The default visual for screen #%d does not match "
-                       "any of the\n", i);
-                dmxLog(dmxError,
-                       "consolidated visuals from Xinerama (listed above)\n");
-            }
-        }
-        if (fatal)
-            dmxLog(dmxFatal,
-                   "dmxConnectionBlockCallback: invalid screen(s) found");
-    }
-#endif
-    MAXSCREENSFREE(found);
-}
diff --git a/hw/dmx/dmxcb.h b/hw/dmx/dmxcb.h
deleted file mode 100644
index ca8a256..0000000
--- a/hw/dmx/dmxcb.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright 2001,2002 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-/** \file
- * Header file for connection block functions.  \see dmxcb.c.
- */
-
-#ifndef _DMXCB_H_
-#define _DMXCB_H_
-/** The cursor position, in global coordinates. */
-extern int dmxGlobalWidth, dmxGlobalHeight;
-
-/** #dmxComputeWidthHeight can either recompute the global bounding box
- * or not. */
-typedef enum {
-    DMX_RECOMPUTE_BOUNDING_BOX,
-    DMX_NO_RECOMPUTE_BOUNDING_BOX
-} DMXRecomputeFlag;
-
-extern void dmxSetWidthHeight(int width, int height);
-extern void dmxComputeWidthHeight(DMXRecomputeFlag flag);
-extern void dmxConnectionBlockCallback(void);
-#endif
diff --git a/hw/dmx/dmxclient.h b/hw/dmx/dmxclient.h
deleted file mode 100644
index be8116f..0000000
--- a/hw/dmx/dmxclient.h
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Copyright (c) 1995  X Consortium
- * Copyright 2004 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT, THE X CONSORTIUM,
- * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name of the X Consortium
- * shall not be used in advertising or otherwise to promote the sale,
- * use or other dealings in this Software without prior written
- * authorization from the X Consortium.
- */
-
-/*
- * Derived from hw/xnest/Xnest.h by Rickard E. (Rik) Faith <faith@redhat.com>
- */
-
-/** \file
- * This file includes all client-side include files with proper wrapping.
- */
-
-#ifndef _DMXCLIENT_H_
-#define _DMXCLIENT_H_
-
-#define GC XlibGC
-
-#ifdef _XSERVER64
-#define DMX64
-#undef _XSERVER64
-typedef unsigned long XID64;
-typedef unsigned long Mask64;
-typedef unsigned long Atom64;
-typedef unsigned long VisualID64;
-typedef unsigned long Time64;
-
-#define XID           XID64
-#define Mask          Mask64
-#define Atom          Atom64
-#define VisualID      VisualID64
-#define Time          Time64
-typedef XID Window64;
-typedef XID Drawable64;
-typedef XID Font64;
-typedef XID Pixmap64;
-typedef XID Cursor64;
-typedef XID Colormap64;
-typedef XID GContext64;
-typedef XID KeySym64;
-
-#define Window        Window64
-#define Drawable      Drawable64
-#define Font          Font64
-#define Pixmap        Pixmap64
-#define Cursor        Cursor64
-#define Colormap      Colormap64
-#define GContext      GContext64
-#define KeySym        KeySym64
-#endif
-
-#include <X11/Xlib.h>
-#include <X11/Xlibint.h>        /* For _XExtension */
-#include <X11/X.h>              /* from glxserver.h */
-#include <X11/Xmd.h>            /* from glxserver.h */
-#include <X11/Xproto.h>
-#include <X11/Xutil.h>
-#include <X11/Xatom.h>
-#include <X11/cursorfont.h>
-
-#include <X11/extensions/shape.h>
-
-#include <X11/extensions/Xrender.h>
-#undef PictFormatType
-
-#include <X11/extensions/XKB.h>
-#include "xkbstr.h"
-
-#include <X11/extensions/XI.h>
-
-/* Always include these, since we query them even if we don't export XINPUT. */
-#include <X11/extensions/XInput.h>      /* For XDevice */
-#include <X11/extensions/Xext.h>
-
-#undef GC
-
-#ifdef DMX64
-#define _XSERVER64
-#undef XID
-#undef Mask
-#undef Atom
-#undef VisualID
-#undef Time
-#undef Window
-#undef Drawable
-#undef Font
-#undef Pixmap
-#undef Cursor
-#undef Colormap
-#undef GContext
-#undef KeySym
-#endif
-
-/* Some protocol gets included last, after undefines. */
-#include <X11/XKBlib.h>
-#include <X11/extensions/XKBproto.h>
-#include "xkbstr.h"
-#undef XPointer
-#include <X11/extensions/XIproto.h>
-
-#endif
diff --git a/hw/dmx/dmxcmap.c b/hw/dmx/dmxcmap.c
deleted file mode 100644
index 7a87a98..0000000
--- a/hw/dmx/dmxcmap.c
+++ /dev/null
@@ -1,222 +0,0 @@
-/*
- * Copyright 2001-2004 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Kevin E. Martin <kem@redhat.com>
- *
- */
-
-/** \file
- * Colormap support. */
-
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#include "dmx.h"
-#include "dmxlog.h"
-#include "dmxsync.h"
-#include "dmxcmap.h"
-#include "dmxvisual.h"
-
-#include "micmap.h"
-
-static Bool
-dmxAllocateColormapPrivates(ColormapPtr pColormap)
-{
-    dmxColormapPrivPtr pCmapPriv;
-
-    pCmapPriv = (dmxColormapPrivPtr) malloc(sizeof(*pCmapPriv));
-    if (!pCmapPriv)
-        return FALSE;
-    pCmapPriv->cmap = (Colormap) 0;
-
-    DMX_SET_COLORMAP_PRIV(pColormap, pCmapPriv);
-
-    return TRUE;
-}
-
-/** Create \a pColormap on the back-end server. */
-Bool
-dmxBECreateColormap(ColormapPtr pColormap)
-{
-    ScreenPtr pScreen = pColormap->pScreen;
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    dmxColormapPrivPtr pCmapPriv = DMX_GET_COLORMAP_PRIV(pColormap);
-    VisualPtr pVisual = pColormap->pVisual;
-    Visual *visual = dmxLookupVisual(pScreen, pVisual);
-
-    if (visual) {
-        pCmapPriv->cmap = XCreateColormap(dmxScreen->beDisplay,
-                                          dmxScreen->scrnWin,
-                                          visual,
-                                          (pVisual->class & DynamicClass ?
-                                           AllocAll : AllocNone));
-        return pCmapPriv->cmap != 0;
-    }
-    else {
-        dmxLog(dmxWarning, "dmxBECreateColormap: No visual found\n");
-        return 0;
-    }
-}
-
-/** Create colormap on back-end server associated with \a pColormap's
- *  screen. */
-Bool
-dmxCreateColormap(ColormapPtr pColormap)
-{
-    ScreenPtr pScreen = pColormap->pScreen;
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    Bool ret = TRUE;
-
-    if (!dmxAllocateColormapPrivates(pColormap))
-        return FALSE;
-
-    if (dmxScreen->beDisplay) {
-        if (!dmxBECreateColormap(pColormap))
-            return FALSE;
-    }
-
-    DMX_UNWRAP(CreateColormap, dmxScreen, pScreen);
-    if (pScreen->CreateColormap)
-        ret = pScreen->CreateColormap(pColormap);
-    DMX_WRAP(CreateColormap, dmxCreateColormap, dmxScreen, pScreen);
-
-    return ret;
-}
-
-/** Destroy \a pColormap on the back-end server. */
-Bool
-dmxBEFreeColormap(ColormapPtr pColormap)
-{
-    ScreenPtr pScreen = pColormap->pScreen;
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    dmxColormapPrivPtr pCmapPriv = DMX_GET_COLORMAP_PRIV(pColormap);
-
-    if (pCmapPriv->cmap) {
-        XFreeColormap(dmxScreen->beDisplay, pCmapPriv->cmap);
-        pCmapPriv->cmap = (Colormap) 0;
-        return TRUE;
-    }
-
-    return FALSE;
-}
-
-/** Destroy colormap on back-end server associated with \a pColormap's
- *  screen. */
-void
-dmxDestroyColormap(ColormapPtr pColormap)
-{
-    ScreenPtr pScreen = pColormap->pScreen;
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    dmxColormapPrivPtr pCmapPriv = DMX_GET_COLORMAP_PRIV(pColormap);
-
-    if (dmxScreen->beDisplay)
-        dmxBEFreeColormap(pColormap);
-    free(pCmapPriv);
-    DMX_SET_COLORMAP_PRIV(pColormap, NULL);
-
-    DMX_UNWRAP(DestroyColormap, dmxScreen, pScreen);
-    if (pScreen->DestroyColormap)
-        pScreen->DestroyColormap(pColormap);
-    DMX_WRAP(DestroyColormap, dmxDestroyColormap, dmxScreen, pScreen);
-}
-
-/** Install colormap on back-end server associated with \a pColormap's
- *  screen. */
-void
-dmxInstallColormap(ColormapPtr pColormap)
-{
-    ScreenPtr pScreen = pColormap->pScreen;
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    dmxColormapPrivPtr pCmapPriv = DMX_GET_COLORMAP_PRIV(pColormap);
-
-    DMX_UNWRAP(InstallColormap, dmxScreen, pScreen);
-    if (pScreen->InstallColormap)
-        pScreen->InstallColormap(pColormap);
-    DMX_WRAP(InstallColormap, dmxInstallColormap, dmxScreen, pScreen);
-
-    if (dmxScreen->beDisplay) {
-        XInstallColormap(dmxScreen->beDisplay, pCmapPriv->cmap);
-        dmxSync(dmxScreen, FALSE);
-    }
-}
-
-/** Store colors in \a pColormap on back-end server associated with \a
- *  pColormap's screen. */
-void
-dmxStoreColors(ColormapPtr pColormap, int ndef, xColorItem * pdef)
-{
-    ScreenPtr pScreen = pColormap->pScreen;
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    dmxColormapPrivPtr pCmapPriv = DMX_GET_COLORMAP_PRIV(pColormap);
-
-    if (dmxScreen->beDisplay && (pColormap->pVisual->class & DynamicClass)) {
-        XColor *color = xallocarray(ndef, sizeof(*color));
-        int i;
-
-        if (color) {
-            for (i = 0; i < ndef; i++) {
-                color[i].pixel = pdef[i].pixel;
-                color[i].red = pdef[i].red;
-                color[i].blue = pdef[i].blue;
-                color[i].green = pdef[i].green;
-                color[i].flags = pdef[i].flags;
-                color[i].pad = pdef[i].pad;
-            }
-            XStoreColors(dmxScreen->beDisplay, pCmapPriv->cmap, color, ndef);
-            free(color);
-        }
-        else {                  /* xalloc failed, so fallback */
-            XColor c;
-
-            for (i = 0; i < ndef; i++) {
-                c.pixel = pdef[i].pixel;
-                c.red = pdef[i].red;
-                c.blue = pdef[i].blue;
-                c.green = pdef[i].green;
-                c.flags = pdef[i].flags;
-                c.pad = pdef[i].pad;
-                XStoreColor(dmxScreen->beDisplay, pCmapPriv->cmap, &c);
-            }
-        }
-        dmxSync(dmxScreen, FALSE);
-    }
-
-    DMX_UNWRAP(StoreColors, dmxScreen, pScreen);
-    if (pScreen->StoreColors)
-        pScreen->StoreColors(pColormap, ndef, pdef);
-    DMX_WRAP(StoreColors, dmxStoreColors, dmxScreen, pScreen);
-}
-
-/** Create the DMX server's default colormap. */
-Bool
-dmxCreateDefColormap(ScreenPtr pScreen)
-{
-    return miCreateDefColormap(pScreen);
-}
diff --git a/hw/dmx/dmxcmap.h b/hw/dmx/dmxcmap.h
deleted file mode 100644
index 29318b5..0000000
--- a/hw/dmx/dmxcmap.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright 2002-2004 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Kevin E. Martin <kem@redhat.com>
- *
- */
-
-/** \file
- * Header file for colormap support.  \see dmxcmap.c. */
-
-#ifndef DMXCMAP_H
-#define DMXCMAP_H
-
-#include "colormapst.h"
-
-/** Colormap private area. */
-typedef struct _dmxColormapPriv {
-    Colormap cmap;
-} dmxColormapPrivRec, *dmxColormapPrivPtr;
-
-extern Bool dmxCreateColormap(ColormapPtr pColormap);
-extern void dmxDestroyColormap(ColormapPtr pColormap);
-extern void dmxInstallColormap(ColormapPtr pColormap);
-extern void dmxStoreColors(ColormapPtr pColormap, int ndef, xColorItem * pdef);
-
-extern Bool dmxCreateDefColormap(ScreenPtr pScreen);
-
-extern Bool dmxBECreateColormap(ColormapPtr pColormap);
-extern Bool dmxBEFreeColormap(ColormapPtr pColormap);
-
-/** Set colormap private structure. */
-#define DMX_SET_COLORMAP_PRIV(_pCMap, _pCMapPriv)			\
-    dixSetPrivate(&(_pCMap)->devPrivates, dmxColormapPrivateKey, _pCMapPriv)
-
-/** Get colormap private structure. */
-#define DMX_GET_COLORMAP_PRIV(_pCMap) (dmxColormapPrivPtr)		\
-    dixLookupPrivate(&(_pCMap)->devPrivates, dmxColormapPrivateKey)
-
-#endif                          /* DMXCMAP_H */
diff --git a/hw/dmx/dmxcursor.c b/hw/dmx/dmxcursor.c
deleted file mode 100644
index 0ef800e..0000000
--- a/hw/dmx/dmxcursor.c
+++ /dev/null
@@ -1,1023 +0,0 @@
-/*
- * Copyright 2001-2004 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   David H. Dawes <dawes@xfree86.org>
- *   Kevin E. Martin <kem@redhat.com>
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-/** \file
- * This file contains code than supports cursor movement, including the
- * code that initializes and reinitializes the screen positions and
- * computes screen overlap.
- *
- * "This code is based very closely on the XFree86 equivalent
- * (xfree86/common/xf86Cursor.c)."  --David Dawes.
- *
- * "This code was then extensively re-written, as explained here."
- * --Rik Faith
- *
- * The code in xf86Cursor.c used edge lists to implement the
- * CursorOffScreen function.  The edge list computation was complex
- * (especially in the face of arbitrarily overlapping screens) compared
- * with the speed savings in the CursorOffScreen function.  The new
- * implementation has erred on the side of correctness, readability, and
- * maintainability over efficiency.  For the common (non-edge) case, the
- * dmxCursorOffScreen function does avoid a loop over all the screens.
- * When the cursor has left the screen, all the screens are searched,
- * and the first screen (in dmxScreens order) containing the cursor will
- * be returned.  If run-time profiling shows that this routing is a
- * performance bottle-neck, then an edge list may have to be
- * reimplemented.  An edge list algorithm is O(edges) whereas the new
- * algorithm is O(dmxNumScreens).  Since edges is usually 1-3 and
- * dmxNumScreens may be 30-60 for large backend walls, this trade off
- * may be compelling.
- *
- * The xf86InitOrigins routine uses bit masks during the computation and
- * is therefore limited to the length of a word (e.g., 32 or 64 bits)
- * screens.  Because Xdmx is expected to be used with a large number of
- * backend displays, this limitation was removed.  The new
- * implementation has erred on the side of readability over efficiency,
- * using the dmxSL* routines to manage a screen list instead of a
- * bitmap, and a function call to decrease the length of the main
- * routine.  Both algorithms are of the same order, and both are called
- * only at server generation time, so trading clarity and long-term
- * maintainability for efficiency does not seem justified in this case.
- */
-
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#define DMX_CURSOR_DEBUG 0
-
-#include "dmx.h"
-#include "dmxsync.h"
-#include "dmxcursor.h"
-#include "dmxlog.h"
-#include "dmxprop.h"
-#include "dmxinput.h"
-
-#include "mipointer.h"
-#include "windowstr.h"
-#include "globals.h"
-#include "cursorstr.h"
-#include "dixevents.h"          /* For GetSpriteCursor() */
-#include "inputstr.h"           /* for inputInfo.pointer */
-
-#if DMX_CURSOR_DEBUG
-#define DMXDBG0(f)               dmxLog(dmxDebug,f)
-#define DMXDBG1(f,a)             dmxLog(dmxDebug,f,a)
-#define DMXDBG2(f,a,b)           dmxLog(dmxDebug,f,a,b)
-#define DMXDBG3(f,a,b,c)         dmxLog(dmxDebug,f,a,b,c)
-#define DMXDBG4(f,a,b,c,d)       dmxLog(dmxDebug,f,a,b,c,d)
-#define DMXDBG5(f,a,b,c,d,e)     dmxLog(dmxDebug,f,a,b,c,d,e)
-#define DMXDBG6(f,a,b,c,d,e,g)   dmxLog(dmxDebug,f,a,b,c,d,e,g)
-#define DMXDBG7(f,a,b,c,d,e,g,h) dmxLog(dmxDebug,f,a,b,c,d,e,g,h)
-#else
-#define DMXDBG0(f)
-#define DMXDBG1(f,a)
-#define DMXDBG2(f,a,b)
-#define DMXDBG3(f,a,b,c)
-#define DMXDBG4(f,a,b,c,d)
-#define DMXDBG5(f,a,b,c,d,e)
-#define DMXDBG6(f,a,b,c,d,e,g)
-#define DMXDBG7(f,a,b,c,d,e,g,h)
-#endif
-
-static int dmxCursorDoMultiCursors = 1;
-
-/** Turn off support for displaying multiple cursors on overlapped
-    back-end displays.  See #dmxCursorDoMultiCursors. */
-void
-dmxCursorNoMulti(void)
-{
-    dmxCursorDoMultiCursors = 0;
-}
-
-static Bool
-dmxCursorOffScreen(ScreenPtr *ppScreen, int *x, int *y)
-{
-    DMXScreenInfo *dmxScreen;
-    int i;
-    int localX = *x;
-    int localY = *y;
-    int globalX;
-    int globalY;
-
-    if (screenInfo.numScreens == 1)
-        return FALSE;
-
-    /* On current screen? */
-    dmxScreen = &dmxScreens[(*ppScreen)->myNum];
-    if (localX >= 0
-        && localX < dmxScreen->rootWidth
-        && localY >= 0 && localY < dmxScreen->rootHeight)
-        return FALSE;
-
-    /* Convert to global coordinate space */
-    globalX = dmxScreen->rootXOrigin + localX;
-    globalY = dmxScreen->rootYOrigin + localY;
-
-    /* Is cursor on the current screen?
-     * This efficiently exits this routine
-     * for the most common case. */
-    if (ppScreen && *ppScreen) {
-        dmxScreen = &dmxScreens[(*ppScreen)->myNum];
-        if (globalX >= dmxScreen->rootXOrigin
-            && globalX < dmxScreen->rootXOrigin + dmxScreen->rootWidth
-            && globalY >= dmxScreen->rootYOrigin
-            && globalY < dmxScreen->rootYOrigin + dmxScreen->rootHeight)
-            return FALSE;
-    }
-
-    /* Find first screen cursor is on */
-    for (i = 0; i < dmxNumScreens; i++) {
-        dmxScreen = &dmxScreens[i];
-        if (globalX >= dmxScreen->rootXOrigin
-            && globalX < dmxScreen->rootXOrigin + dmxScreen->rootWidth
-            && globalY >= dmxScreen->rootYOrigin
-            && globalY < dmxScreen->rootYOrigin + dmxScreen->rootHeight) {
-            if (dmxScreen->index == (*ppScreen)->myNum)
-                return FALSE;
-            *ppScreen = screenInfo.screens[dmxScreen->index];
-            *x = globalX - dmxScreen->rootXOrigin;
-            *y = globalY - dmxScreen->rootYOrigin;
-            return TRUE;
-        }
-    }
-    return FALSE;
-}
-
-static void
-dmxCrossScreen(ScreenPtr pScreen, Bool entering)
-{
-}
-
-static void
-dmxWarpCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y)
-{
-    DMXDBG3("dmxWarpCursor(%d,%d,%d)\n", pScreen->myNum, x, y);
-#if 11 /*BP*/
-        /* This call is depracated.  Replace with???? */
-        miPointerWarpCursor(pDev, pScreen, x, y);
-#else
-    pScreen->SetCursorPosition(pDev, pScreen, x, y, FALSE);
-#endif
-}
-
-miPointerScreenFuncRec dmxPointerCursorFuncs = {
-    dmxCursorOffScreen,
-    dmxCrossScreen,
-    dmxWarpCursor,
-};
-
-/** Create a list of screens that we'll manipulate. */
-static int *
-dmxSLCreate(void)
-{
-    int *list = xallocarray(dmxNumScreens, sizeof(*list));
-    int i;
-
-    for (i = 0; i < dmxNumScreens; i++)
-        list[i] = 1;
-    return list;
-}
-
-/** Free list. */
-static void
-dmxSLFree(int *list)
-{
-    free(list);
-}
-
-/** Find next uninitialized entry in list. */
-static int
-dmxSLFindNext(int *list)
-{
-    int i;
-
-    for (i = 0; i < dmxNumScreens; i++)
-        if (list[i])
-            return i;
-    return -1;
-}
-
-/** Make one pass over all the screens and return the number updated. */
-static int
-dmxTryComputeScreenOrigins(int *screensLeft)
-{
-    ScreenPtr pScreen, refScreen;
-    DMXScreenInfo *screen;
-    int i, ref;
-    int changed = 0;
-
-    for (i = 0; i < dmxNumScreens; i++) {
-        if (!screensLeft[i])
-            continue;
-        screen = &dmxScreens[i];
-        pScreen = screenInfo.screens[i];
-        switch (screen->where) {
-        case PosAbsolute:
-            pScreen->x = screen->whereX;
-            pScreen->y = screen->whereY;
-            ++changed, screensLeft[i] = 0;
-            break;
-        case PosRelative:
-            ref = screen->whereRefScreen;
-            if (screensLeft[ref])
-                break;
-            refScreen = screenInfo.screens[ref];
-            pScreen->x = refScreen->x + screen->whereX;
-            pScreen->y = refScreen->y + screen->whereY;
-            ++changed, screensLeft[i] = 0;
-            break;
-        case PosRightOf:
-            ref = screen->whereRefScreen;
-            if (screensLeft[ref])
-                break;
-            refScreen = screenInfo.screens[ref];
-            pScreen->x = refScreen->x + refScreen->width;
-            pScreen->y = refScreen->y;
-            ++changed, screensLeft[i] = 0;
-            break;
-        case PosLeftOf:
-            ref = screen->whereRefScreen;
-            if (screensLeft[ref])
-                break;
-            refScreen = screenInfo.screens[ref];
-            pScreen->x = refScreen->x - pScreen->width;
-            pScreen->y = refScreen->y;
-            ++changed, screensLeft[i] = 0;
-            break;
-        case PosBelow:
-            ref = screen->whereRefScreen;
-            if (screensLeft[ref])
-                break;
-            refScreen = screenInfo.screens[ref];
-            pScreen->x = refScreen->x;
-            pScreen->y = refScreen->y + refScreen->height;
-            ++changed, screensLeft[i] = 0;
-            break;
-        case PosAbove:
-            ref = screen->whereRefScreen;
-            if (screensLeft[ref])
-                break;
-            refScreen = screenInfo.screens[ref];
-            pScreen->x = refScreen->x;
-            pScreen->y = refScreen->y - pScreen->height;
-            ++changed, screensLeft[i] = 0;
-            break;
-        case PosNone:
-            dmxLog(dmxFatal, "No position information for screen %d\n", i);
-        }
-    }
-    return changed;
-}
-
-static void
-dmxComputeScreenOrigins(void)
-{
-    ScreenPtr pScreen;
-    int *screensLeft;
-    int i, ref;
-    int minX, minY;
-
-    /* Compute origins based on
-     * configuration information. */
-    screensLeft = dmxSLCreate();
-    while ((i = dmxSLFindNext(screensLeft)) >= 0) {
-        while (dmxTryComputeScreenOrigins(screensLeft));
-        if ((i = dmxSLFindNext(screensLeft)) >= 0) {
-            /* All of the remaining screens are referencing each other.
-             * Assign a value to one of them and go through again.  This
-             * guarantees that we will eventually terminate.
-             */
-            ref = dmxScreens[i].whereRefScreen;
-            pScreen = screenInfo.screens[ref];
-            pScreen->x = pScreen->y = 0;
-            screensLeft[ref] = 0;
-        }
-    }
-    dmxSLFree(screensLeft);
-
-    /* Justify the topmost and leftmost to
-     * (0,0). */
-    minX = screenInfo.screens[0]->x;
-    minY = screenInfo.screens[0]->y;
-    for (i = 1; i < dmxNumScreens; i++) {       /* Compute minX, minY */
-        if (screenInfo.screens[i]->x < minX)
-            minX = screenInfo.screens[i]->x;
-        if (screenInfo.screens[i]->y < minY)
-            minY = screenInfo.screens[i]->y;
-    }
-    if (minX || minY) {
-        for (i = 0; i < dmxNumScreens; i++) {
-            screenInfo.screens[i]->x -= minX;
-            screenInfo.screens[i]->y -= minY;
-        }
-    }
-
-    update_desktop_dimensions();
-}
-
-/** Recompute origin information in the #dmxScreens list.  This is
- * called from #dmxInitOrigins. */
-void
-dmxReInitOrigins(void)
-{
-    int i;
-
-    if (dmxNumScreens > MAXSCREENS)
-        dmxLog(dmxFatal, "dmxNumScreens = %d > MAXSCREENS = %d\n",
-               dmxNumScreens, MAXSCREENS);
-
-    for (i = 0; i < dmxNumScreens; i++) {
-        DMXScreenInfo *dmxScreen = &dmxScreens[i];
-
-        dmxLogOutput(dmxScreen,
-                     "s=%dx%d%+d%+d r=%dx%d%+d%+d @%d,%d"
-                     " (be=%dx%d depth=%d bpp=%d)\n",
-                     dmxScreen->scrnWidth, dmxScreen->scrnHeight,
-                     dmxScreen->scrnX, dmxScreen->scrnY,
-                     dmxScreen->rootWidth, dmxScreen->rootHeight,
-                     dmxScreen->rootX, dmxScreen->rootY,
-                     dmxScreen->rootXOrigin, dmxScreen->rootYOrigin,
-                     dmxScreen->beWidth, dmxScreen->beHeight,
-                     dmxScreen->beDepth, dmxScreen->beBPP);
-    }
-}
-
-/** Initialize screen origins (and relative position).  This is called
- * for each server generation.  For dynamic reconfiguration, use
- * #dmxReInitOrigins() instead. */
-void
-dmxInitOrigins(void)
-{
-    int i;
-
-    if (dmxNumScreens > MAXSCREENS)
-        dmxLog(dmxFatal, "dmxNumScreens = %d > MAXSCREENS = %d\n",
-               dmxNumScreens, MAXSCREENS);
-
-    for (i = 0; i < dmxNumScreens; i++) {
-        DMXScreenInfo *dmxScreen = &dmxScreens[i];
-
-        dmxLogOutput(dmxScreen,
-                     "(request) s=%dx%d%+d%+d r=%dx%d%+d%+d @%d,%d (%d)"
-                     " (be=%dx%d depth=%d bpp=%d)\n",
-                     dmxScreen->scrnWidth, dmxScreen->scrnHeight,
-                     dmxScreen->scrnX, dmxScreen->scrnY,
-                     dmxScreen->rootWidth, dmxScreen->rootHeight,
-                     dmxScreen->rootX, dmxScreen->rootY,
-                     dmxScreen->whereX, dmxScreen->whereY,
-                     dmxScreen->where,
-                     dmxScreen->beWidth, dmxScreen->beHeight,
-                     dmxScreen->beDepth, dmxScreen->beBPP);
-    }
-
-    dmxComputeScreenOrigins();
-
-    for (i = 0; i < dmxNumScreens; i++) {
-        DMXScreenInfo *dmxScreen = &dmxScreens[i];
-
-        dmxScreen->rootXOrigin = screenInfo.screens[i]->x;
-        dmxScreen->rootYOrigin = screenInfo.screens[i]->y;
-    }
-
-    dmxReInitOrigins();
-}
-
-/** Returns non-zero if the global \a x, \a y coordinate is on the
- * screen window of the \a dmxScreen. */
-int
-dmxOnScreen(int x, int y, DMXScreenInfo * dmxScreen)
-{
-#if DMX_CURSOR_DEBUG > 1
-    dmxLog(dmxDebug,
-           "dmxOnScreen %d %d,%d (r=%dx%d%+d%+d@%d,%d s=%dx%d%+d%+d)\n",
-           dmxScreen->index, x, y,
-           dmxScreen->rootWidth, dmxScreen->rootHeight,
-           dmxScreen->rootX, dmxScreen->rootY,
-           dmxScreen->rootXOrigin, dmxScreen->rootYOrigin,
-           dmxScreen->scrnWidth, dmxScreen->scrnHeight,
-           dmxScreen->scrnX, dmxScreen->scrnY);
-#endif
-    if (x >= dmxScreen->rootXOrigin
-        && x < dmxScreen->rootXOrigin + dmxScreen->rootWidth
-        && y >= dmxScreen->rootYOrigin
-        && y < dmxScreen->rootYOrigin + dmxScreen->rootHeight)
-        return 1;
-    return 0;
-}
-
-/** Returns non-zero if \a a overlaps \a b. */
-static int
-dmxDoesOverlap(DMXScreenInfo * a, DMXScreenInfo * b)
-{
-    if (dmxOnScreen(a->rootXOrigin, a->rootYOrigin, b))
-        return 1;
-
-    if (dmxOnScreen(a->rootXOrigin, a->rootYOrigin + a->scrnWidth, b))
-        return 1;
-
-    if (dmxOnScreen(a->rootXOrigin + a->scrnHeight, a->rootYOrigin, b))
-        return 1;
-
-    if (dmxOnScreen(a->rootXOrigin + a->scrnHeight,
-                    a->rootYOrigin + a->scrnWidth, b))
-        return 1;
-
-    if (dmxOnScreen(b->rootXOrigin, b->rootYOrigin, a))
-        return 1;
-
-    if (dmxOnScreen(b->rootXOrigin, b->rootYOrigin + b->scrnWidth, a))
-        return 1;
-
-    if (dmxOnScreen(b->rootXOrigin + b->scrnHeight, b->rootYOrigin, a))
-        return 1;
-
-    if (dmxOnScreen(b->rootXOrigin + b->scrnHeight,
-                    b->rootYOrigin + b->scrnWidth, a))
-        return 1;
-
-    return 0;
-}
-
-/** Used with \a dmxInterateOverlap to print out a list of screens which
- * overlap each other. */
-static void *
-dmxPrintOverlap(DMXScreenInfo * dmxScreen, void *closure)
-{
-    DMXScreenInfo *a = closure;
-
-    if (dmxScreen != a) {
-        if (dmxScreen->cursorNotShared)
-            dmxLogOutputCont(a, " [%d/%s]", dmxScreen->index, dmxScreen->name);
-        else
-            dmxLogOutputCont(a, " %d/%s", dmxScreen->index, dmxScreen->name);
-    }
-    return NULL;
-}
-
-/** Iterate over the screens which overlap with the \a start screen,
- * calling \a f with the \a closure for each argument.  Often used with
- * #dmxPrintOverlap. */
-static void *
-dmxIterateOverlap(DMXScreenInfo * start,
-                  void *(*f) (DMXScreenInfo * dmxScreen, void *), void *closure)
-{
-    DMXScreenInfo *pt;
-
-    if (!start->over)
-        return f(start, closure);
-
-    for (pt = start->over; /* condition at end of loop */ ; pt = pt->over) {
-        void *retval;
-
-        if ((retval = f(pt, closure)))
-            return retval;
-        if (pt == start)
-            break;
-    }
-    return NULL;
-}
-
-/** Used with #dmxPropertyIterate to determine if screen \a a is the
- * same as the screen \a closure. */
-static void *
-dmxTestSameDisplay(DMXScreenInfo * a, void *closure)
-{
-    DMXScreenInfo *b = closure;
-
-    if (a == b)
-        return a;
-    return NULL;
-}
-
-/** Detects overlapping dmxScreens and creates circular lists.  This
- * uses an O(dmxNumScreens^2) algorithm, but dmxNumScreens is < 100 and
- * the computation only needs to be performed for every server
- * generation or dynamic reconfiguration . */
-void
-dmxInitOverlap(void)
-{
-    int i, j;
-    DMXScreenInfo *a, *b, *pt;
-
-    for (i = 0; i < dmxNumScreens; i++)
-        dmxScreens[i].over = NULL;
-
-    for (i = 0; i < dmxNumScreens; i++) {
-        a = &dmxScreens[i];
-
-        for (j = i + 1; j < dmxNumScreens; j++) {
-            b = &dmxScreens[j];
-            if (b->over)
-                continue;
-
-            if (dmxDoesOverlap(a, b)) {
-                DMXDBG6("%d overlaps %d: a=%p %p b=%p %p\n",
-                        a->index, b->index, a, a->over, b, b->over);
-                b->over = (a->over ? a->over : a);
-                a->over = b;
-            }
-        }
-    }
-
-    for (i = 0; i < dmxNumScreens; i++) {
-        a = &dmxScreens[i];
-
-        if (!a->over)
-            continue;
-
-        /* Flag all pairs that are on same display */
-        for (pt = a->over; pt != a; pt = pt->over) {
-            if (dmxPropertyIterate(a, dmxTestSameDisplay, pt)) {
-                /* The ->over sets contain the transitive set of screens
-                 * that overlap.  For screens that are on the same
-                 * backend display, we only want to exclude pairs of
-                 * screens that mutually overlap on the backend display,
-                 * so we call dmxDoesOverlap, which is stricter than the
-                 * ->over set. */
-                if (!dmxDoesOverlap(a, pt))
-                    continue;
-                a->cursorNotShared = 1;
-                pt->cursorNotShared = 1;
-                dmxLog(dmxInfo,
-                       "Screen %d and %d overlap on %s\n",
-                       a->index, pt->index, a->name);
-            }
-        }
-    }
-
-    for (i = 0; i < dmxNumScreens; i++) {
-        a = &dmxScreens[i];
-
-        if (a->over) {
-            dmxLogOutput(a, "Overlaps");
-            dmxIterateOverlap(a, dmxPrintOverlap, a);
-            dmxLogOutputCont(a, "\n");
-        }
-    }
-}
-
-/** Create \a pCursor on the back-end associated with \a pScreen. */
-void
-dmxBECreateCursor(ScreenPtr pScreen, CursorPtr pCursor)
-{
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    dmxCursorPrivPtr pCursorPriv = DMX_GET_CURSOR_PRIV(pCursor, pScreen);
-    CursorBitsPtr pBits = pCursor->bits;
-    Pixmap src, msk;
-    XColor fg, bg;
-    XImage *img;
-    XlibGC gc = NULL;
-    XGCValues v;
-    unsigned long m;
-    int i;
-
-    if (!pCursorPriv)
-        return;
-
-    m = GCFunction | GCPlaneMask | GCForeground | GCBackground | GCClipMask;
-    v.function = GXcopy;
-    v.plane_mask = AllPlanes;
-    v.foreground = 1L;
-    v.background = 0L;
-    v.clip_mask = None;
-
-    for (i = 0; i < dmxScreen->beNumPixmapFormats; i++) {
-        if (dmxScreen->bePixmapFormats[i].depth == 1) {
-            /* Create GC in the back-end servers */
-            gc = XCreateGC(dmxScreen->beDisplay, dmxScreen->scrnDefDrawables[i],
-                           m, &v);
-            break;
-        }
-    }
-    if (!gc)
-        dmxLog(dmxFatal, "dmxRealizeCursor: gc not initialized\n");
-
-    src = XCreatePixmap(dmxScreen->beDisplay, dmxScreen->scrnWin,
-                        pBits->width, pBits->height, 1);
-    msk = XCreatePixmap(dmxScreen->beDisplay, dmxScreen->scrnWin,
-                        pBits->width, pBits->height, 1);
-
-    img = XCreateImage(dmxScreen->beDisplay,
-                       dmxScreen->beVisuals[dmxScreen->beDefVisualIndex].visual,
-                       1, XYBitmap, 0, (char *) pBits->source,
-                       pBits->width, pBits->height,
-                       BitmapPad(dmxScreen->beDisplay), 0);
-
-    XPutImage(dmxScreen->beDisplay, src, gc, img, 0, 0, 0, 0,
-              pBits->width, pBits->height);
-
-    XFree(img);
-
-    img = XCreateImage(dmxScreen->beDisplay,
-                       dmxScreen->beVisuals[dmxScreen->beDefVisualIndex].visual,
-                       1, XYBitmap, 0, (char *) pBits->mask,
-                       pBits->width, pBits->height,
-                       BitmapPad(dmxScreen->beDisplay), 0);
-
-    XPutImage(dmxScreen->beDisplay, msk, gc, img, 0, 0, 0, 0,
-              pBits->width, pBits->height);
-
-    XFree(img);
-
-    fg.red = pCursor->foreRed;
-    fg.green = pCursor->foreGreen;
-    fg.blue = pCursor->foreBlue;
-
-    bg.red = pCursor->backRed;
-    bg.green = pCursor->backGreen;
-    bg.blue = pCursor->backBlue;
-
-    pCursorPriv->cursor = XCreatePixmapCursor(dmxScreen->beDisplay,
-                                              src, msk,
-                                              &fg, &bg,
-                                              pBits->xhot, pBits->yhot);
-
-    XFreePixmap(dmxScreen->beDisplay, src);
-    XFreePixmap(dmxScreen->beDisplay, msk);
-    XFreeGC(dmxScreen->beDisplay, gc);
-
-    dmxSync(dmxScreen, FALSE);
-}
-
-static Bool
-_dmxRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor)
-{
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    dmxCursorPrivPtr pCursorPriv;
-
-    DMXDBG2("_dmxRealizeCursor(%d,%p)\n", pScreen->myNum, pCursor);
-
-    DMX_SET_CURSOR_PRIV(pCursor, pScreen, malloc(sizeof(*pCursorPriv)));
-    if (!DMX_GET_CURSOR_PRIV(pCursor, pScreen))
-        return FALSE;
-
-    pCursorPriv = DMX_GET_CURSOR_PRIV(pCursor, pScreen);
-    pCursorPriv->cursor = (Cursor) 0;
-
-    if (!dmxScreen->beDisplay)
-        return TRUE;
-
-    dmxBECreateCursor(pScreen, pCursor);
-    return TRUE;
-}
-
-/** Free \a pCursor on the back-end associated with \a pScreen. */
-Bool
-dmxBEFreeCursor(ScreenPtr pScreen, CursorPtr pCursor)
-{
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    dmxCursorPrivPtr pCursorPriv = DMX_GET_CURSOR_PRIV(pCursor, pScreen);
-
-    if (pCursorPriv) {
-        XFreeCursor(dmxScreen->beDisplay, pCursorPriv->cursor);
-        pCursorPriv->cursor = (Cursor) 0;
-        return TRUE;
-    }
-
-    return FALSE;
-}
-
-static Bool
-_dmxUnrealizeCursor(ScreenPtr pScreen, CursorPtr pCursor)
-{
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-
-    DMXDBG2("_dmxUnrealizeCursor(%d,%p)\n", pScreen->myNum, pCursor);
-
-    if (dmxScreen->beDisplay) {
-        if (dmxBEFreeCursor(pScreen, pCursor))
-            free(DMX_GET_CURSOR_PRIV(pCursor, pScreen));
-    }
-    DMX_SET_CURSOR_PRIV(pCursor, pScreen, NULL);
-
-    return TRUE;
-}
-
-static void
-_dmxMoveCursor(ScreenPtr pScreen, int x, int y)
-{
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    int newX = x + dmxScreen->rootX;
-    int newY = y + dmxScreen->rootY;
-
-    if (newX < 0)
-        newX = 0;
-    if (newY < 0)
-        newY = 0;
-
-    DMXDBG5("_dmxMoveCursor(%d,%d,%d) -> %d,%d\n",
-            pScreen->myNum, x, y, newX, newY);
-    if (dmxScreen->beDisplay) {
-        XWarpPointer(dmxScreen->beDisplay, None, dmxScreen->scrnWin,
-                     0, 0, 0, 0, newX, newY);
-        dmxSync(dmxScreen, TRUE);
-    }
-}
-
-static void
-_dmxSetCursor(ScreenPtr pScreen, CursorPtr pCursor, int x, int y)
-{
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-
-    DMXDBG4("_dmxSetCursor(%d,%p,%d,%d)\n", pScreen->myNum, pCursor, x, y);
-
-    if (pCursor) {
-        dmxCursorPrivPtr pCursorPriv = DMX_GET_CURSOR_PRIV(pCursor, pScreen);
-
-        if (pCursorPriv && dmxScreen->curCursor != pCursorPriv->cursor) {
-            if (dmxScreen->beDisplay)
-                XDefineCursor(dmxScreen->beDisplay, dmxScreen->scrnWin,
-                              pCursorPriv->cursor);
-            dmxScreen->cursor = pCursor;
-            dmxScreen->curCursor = pCursorPriv->cursor;
-            dmxScreen->cursorVisible = 1;
-        }
-        _dmxMoveCursor(pScreen, x, y);
-    }
-    else {
-        if (dmxScreen->beDisplay)
-            XDefineCursor(dmxScreen->beDisplay, dmxScreen->scrnWin,
-                          dmxScreen->noCursor);
-        dmxScreen->cursor = NULL;
-        dmxScreen->curCursor = (Cursor) 0;
-        dmxScreen->cursorVisible = 0;
-    }
-    if (dmxScreen->beDisplay)
-        dmxSync(dmxScreen, TRUE);
-}
-
-static Bool
-dmxRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor)
-{
-    DMXScreenInfo *start = &dmxScreens[pScreen->myNum];
-    DMXScreenInfo *pt;
-
-    if (!start->over || !dmxCursorDoMultiCursors || start->cursorNotShared)
-        return _dmxRealizeCursor(pScreen, pCursor);
-
-    for (pt = start->over; /* condition at end of loop */ ; pt = pt->over) {
-        if (pt->cursorNotShared)
-            continue;
-        _dmxRealizeCursor(screenInfo.screens[pt->index], pCursor);
-        if (pt == start)
-            break;
-    }
-    return TRUE;
-}
-
-static Bool
-dmxUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor)
-{
-    DMXScreenInfo *start = &dmxScreens[pScreen->myNum];
-    DMXScreenInfo *pt;
-
-    if (!start->over || !dmxCursorDoMultiCursors || start->cursorNotShared)
-        return _dmxUnrealizeCursor(pScreen, pCursor);
-
-    for (pt = start->over; /* condition at end of loop */ ; pt = pt->over) {
-        if (pt->cursorNotShared)
-            continue;
-        _dmxUnrealizeCursor(screenInfo.screens[pt->index], pCursor);
-        if (pt == start)
-            break;
-    }
-    return TRUE;
-}
-
-static CursorPtr
-dmxFindCursor(DMXScreenInfo * start)
-{
-    DMXScreenInfo *pt;
-
-    if (!start || !start->over)
-        return GetSpriteCursor(inputInfo.pointer);
-    for (pt = start->over; /* condition at end of loop */ ; pt = pt->over) {
-        if (pt->cursor)
-            return pt->cursor;
-        if (pt == start)
-            break;
-    }
-    return GetSpriteCursor(inputInfo.pointer);
-}
-
-/** Move the cursor to coordinates (\a x, \a y)on \a pScreen.  This
- * function is usually called via #dmxPointerSpriteFuncs, except during
- * reconfiguration when the cursor is repositioned to force an update on
- * newley overlapping screens and on screens that no longer overlap.
- *
- * The coords (x,y) are in global coord space.  We'll loop over the
- * back-end screens and see if they contain the global coord.  If so, call
- * _dmxMoveCursor() (XWarpPointer) to position the pointer on that screen.
- */
-void
-dmxMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y)
-{
-    DMXScreenInfo *start = &dmxScreens[pScreen->myNum];
-    DMXScreenInfo *pt;
-
-    DMXDBG3("dmxMoveCursor(%d,%d,%d)\n", pScreen->myNum, x, y);
-
-    if (!start->over || !dmxCursorDoMultiCursors || start->cursorNotShared) {
-        _dmxMoveCursor(pScreen, x, y);
-        return;
-    }
-
-    for (pt = start->over; /* condition at end of loop */ ; pt = pt->over) {
-        if (pt->cursorNotShared)
-            continue;
-        if (dmxOnScreen(x + start->rootXOrigin, y + start->rootYOrigin, pt)) {
-            if ( /* pt != start && */ !pt->cursorVisible) {
-                if (!pt->cursor) {
-                    /* This only happens during
-                     * reconfiguration when a new overlap
-                     * occurs. */
-                    CursorPtr pCursor;
-
-                    if ((pCursor = dmxFindCursor(start)))
-                        _dmxRealizeCursor(screenInfo.screens[pt->index],
-                                          pt->cursor = pCursor);
-
-                }
-                _dmxSetCursor(screenInfo.screens[pt->index],
-                              pt->cursor,
-                              x + start->rootXOrigin - pt->rootXOrigin,
-                              y + start->rootYOrigin - pt->rootYOrigin);
-            }
-            _dmxMoveCursor(screenInfo.screens[pt->index],
-                           x + start->rootXOrigin - pt->rootXOrigin,
-                           y + start->rootYOrigin - pt->rootYOrigin);
-        }
-        else if ( /* pt != start && */ pt->cursorVisible) {
-            _dmxSetCursor(screenInfo.screens[pt->index],
-                          NULL,
-                          x + start->rootXOrigin - pt->rootXOrigin,
-                          y + start->rootYOrigin - pt->rootYOrigin);
-        }
-        if (pt == start)
-            break;
-    }
-}
-
-static void
-dmxSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor, int x,
-             int y)
-{
-    DMXScreenInfo *start = &dmxScreens[pScreen->myNum];
-    DMXScreenInfo *pt;
-    int GX, GY, gx, gy;
-
-    DMXDBG5("dmxSetCursor(%d %p, %p,%d,%d)\n",
-            pScreen->myNum, start, pCursor, x, y);
-
-    /* We do this check here because of two cases:
-     *
-     * 1) if a client calls XWarpPointer()
-     * and Xinerama is not running, we can
-     * have mi's notion of the pointer
-     * position out of phase with DMX's
-     * notion.
-     *
-     * 2) if a down button is held while the
-     * cursor moves outside the root window,
-     * mi's notion of the pointer position
-     * is out of phase with DMX's notion and
-     * the cursor can remain visible when it
-     * shouldn't be. */
-
-    dmxGetGlobalPosition(&GX, &GY);
-    gx = start->rootXOrigin + x;
-    gy = start->rootYOrigin + y;
-    if (x && y && (GX != gx || GY != gy))
-        dmxCoreMotion(NULL, gx, gy, 0, DMX_NO_BLOCK);
-
-    if (!start->over || !dmxCursorDoMultiCursors || start->cursorNotShared) {
-        _dmxSetCursor(pScreen, pCursor, x, y);
-        return;
-    }
-
-    for (pt = start->over; /* condition at end of loop */ ; pt = pt->over) {
-        if (pt->cursorNotShared)
-            continue;
-        if (dmxOnScreen(x + start->rootXOrigin, y + start->rootYOrigin, pt)) {
-            _dmxSetCursor(screenInfo.screens[pt->index], pCursor,
-                          x + start->rootXOrigin - pt->rootXOrigin,
-                          y + start->rootYOrigin - pt->rootYOrigin);
-        }
-        else {
-            _dmxSetCursor(screenInfo.screens[pt->index], NULL,
-                          x + start->rootXOrigin - pt->rootXOrigin,
-                          y + start->rootYOrigin - pt->rootYOrigin);
-        }
-        if (pt == start)
-            break;
-    }
-}
-
-/** This routine is used by the backend input routines to hide the
- * cursor on a screen that is being used for relative input.  \see
- * dmxbackend.c */
-void
-dmxHideCursor(DMXScreenInfo * dmxScreen)
-{
-    int x, y;
-    ScreenPtr pScreen = screenInfo.screens[dmxScreen->index];
-
-    dmxGetGlobalPosition(&x, &y);
-    _dmxSetCursor(pScreen, NULL, x, y);
-}
-
-/** This routine is called during reconfiguration to make sure the
- * cursor is visible. */
-void
-dmxCheckCursor(void)
-{
-    int i;
-    int x, y;
-    ScreenPtr pScreen;
-    DMXScreenInfo *firstScreen;
-
-    dmxGetGlobalPosition(&x, &y);
-    firstScreen = dmxFindFirstScreen(x, y);
-
-    DMXDBG2("dmxCheckCursor %d %d\n", x, y);
-    for (i = 0; i < dmxNumScreens; i++) {
-        DMXScreenInfo *dmxScreen = &dmxScreens[i];
-
-        pScreen = screenInfo.screens[dmxScreen->index];
-
-        if (!dmxOnScreen(x, y, dmxScreen)) {
-            if (firstScreen &&
-                i == miPointerGetScreen(inputInfo.pointer)->myNum)
-                 miPointerSetScreen(inputInfo.pointer, firstScreen->index, x,
-                                    y);
-            _dmxSetCursor(pScreen, NULL, x - dmxScreen->rootXOrigin,
-                          y - dmxScreen->rootYOrigin);
-        }
-        else {
-            if (!dmxScreen->cursor) {
-                CursorPtr pCursor;
-
-                if ((pCursor = dmxFindCursor(dmxScreen))) {
-                    _dmxRealizeCursor(pScreen, dmxScreen->cursor = pCursor);
-                }
-            }
-            _dmxSetCursor(pScreen, dmxScreen->cursor,
-                          x - dmxScreen->rootXOrigin,
-                          y - dmxScreen->rootYOrigin);
-        }
-    }
-    DMXDBG2("   leave dmxCheckCursor %d %d\n", x, y);
-}
-
-static Bool
-dmxDeviceCursorInitialize(DeviceIntPtr pDev, ScreenPtr pScr)
-{
-    return TRUE;
-}
-
-static void
-dmxDeviceCursorCleanup(DeviceIntPtr pDev, ScreenPtr pScr)
-{
-}
-
-miPointerSpriteFuncRec dmxPointerSpriteFuncs = {
-    dmxRealizeCursor,
-    dmxUnrealizeCursor,
-    dmxSetCursor,
-    dmxMoveCursor,
-    dmxDeviceCursorInitialize,
-    dmxDeviceCursorCleanup
-};
diff --git a/hw/dmx/dmxcursor.h b/hw/dmx/dmxcursor.h
deleted file mode 100644
index 2b55b4e..0000000
--- a/hw/dmx/dmxcursor.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright 2001-2004 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   David H. Dawes <dawes@xfree86.org>
- *   Kevin E. Martin <kem@redhat.com>
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-/** \file
- * Interface for cursor support.  \see dmxcursor.c. */
-
-#ifndef DMXCURSOR_H
-#define DMXCURSOR_H
-
-#include "mipointer.h"
-
-/** Cursor private area. */
-typedef struct _dmxCursorPriv {
-    Cursor cursor;
-} dmxCursorPrivRec, *dmxCursorPrivPtr;
-
-/** Cursor functions for mi layer. \see dmxcursor.c \see dmxscrinit.c */
-extern miPointerScreenFuncRec dmxPointerCursorFuncs;
-
-/** Sprite functions for mi layer. \see dmxcursor.c \see dmxscrinit.c */
-extern miPointerSpriteFuncRec dmxPointerSpriteFuncs;
-
-extern void dmxReInitOrigins(void);
-extern void dmxInitOrigins(void);
-extern void dmxInitOverlap(void);
-extern void dmxCursorNoMulti(void);
-extern void dmxMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y);
-extern void dmxCheckCursor(void);
-extern int dmxOnScreen(int x, int y, DMXScreenInfo * dmxScreen);
-extern void dmxHideCursor(DMXScreenInfo * dmxScreen);
-
-extern void dmxBECreateCursor(ScreenPtr pScreen, CursorPtr pCursor);
-extern Bool dmxBEFreeCursor(ScreenPtr pScreen, CursorPtr pCursor);
-
-#define DMX_GET_CURSOR_PRIV(_pCursor, _pScreen) ((dmxCursorPrivPtr) \
-    dixLookupScreenPrivate(&(_pCursor)->devPrivates, CursorScreenKey, _pScreen))
-
-#define DMX_SET_CURSOR_PRIV(_pCursor, _pScreen, v) \
-    dixSetScreenPrivate(&(_pCursor)->devPrivates, CursorScreenKey, _pScreen, v)
-
-#endif                          /* DMXCURSOR_H */
diff --git a/hw/dmx/dmxdpms.c b/hw/dmx/dmxdpms.c
deleted file mode 100644
index 15a2cbd..0000000
--- a/hw/dmx/dmxdpms.c
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- * Copyright 2003-2004 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Author:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-/** \file
- * Provides DPMS support and unifies all DPMS and other screen-saver
- * support in one file.  If -dpms is given on the command line, or the
- * Xdmx server is not compiled with DPMS support, then the DPMS extension
- * does not work for clients, but DPMS on the backends is still disables
- * (and restored at Xdmx server shutdown time).
- */
-
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#include "dmx.h"
-#include "dmxdpms.h"
-#include "dmxlog.h"
-#include "dmxsync.h"
-#ifdef DPMSExtension
-#include "dpmsproc.h"
-#endif
-#include "windowstr.h"          /* For screenIsSaved */
-#include <X11/extensions/dpms.h>
-
-static int
-_dmxDPMSInit(DMXScreenInfo * dmxScreen)
-{
-    int event_base, error_base;
-    int major, minor;
-    CARD16 level, standby, suspend, off;
-    BOOL state;
-    const char *monitor;
-
-#ifdef DPMSExtension
-    if (DPMSDisabledSwitch)
-        return FALSE;
-#endif
-
-    dmxScreen->dpmsCapable = 0;
-
-    if (!dmxScreen->beDisplay) {
-        dmxLogOutput(dmxScreen,
-                     "Cannot determine if DPMS supported (detached screen)\n");
-        return FALSE;
-    }
-
-    if (!DPMSQueryExtension(dmxScreen->beDisplay, &event_base, &error_base)) {
-        dmxLogOutput(dmxScreen, "DPMS not supported\n");
-        return FALSE;
-    }
-    if (!DPMSGetVersion(dmxScreen->beDisplay, &major, &minor)) {
-        dmxLogOutput(dmxScreen, "DPMS not supported\n");
-        return FALSE;
-    }
-    if (!DPMSCapable(dmxScreen->beDisplay)) {
-        dmxLogOutput(dmxScreen, "DPMS %d.%d (not DPMS capable)\n",
-                     major, minor);
-        return FALSE;
-    }
-
-    DPMSInfo(dmxScreen->beDisplay, &level, &state);
-    DPMSGetTimeouts(dmxScreen->beDisplay, &standby, &suspend, &off);
-    DPMSSetTimeouts(dmxScreen->beDisplay, 0, 0, 0);
-    DPMSEnable(dmxScreen->beDisplay);
-    DPMSForceLevel(dmxScreen->beDisplay, DPMSModeOn);
-    dmxScreen->dpmsCapable = 1;
-    dmxScreen->dpmsEnabled = ! !state;
-    dmxScreen->dpmsStandby = standby;
-    dmxScreen->dpmsSuspend = suspend;
-    dmxScreen->dpmsOff = off;
-
-    switch (level) {
-    case DPMSModeOn:
-        monitor = "on";
-        break;
-    case DPMSModeStandby:
-        monitor = "standby";
-        break;
-    case DPMSModeSuspend:
-        monitor = "suspend";
-        break;
-    case DPMSModeOff:
-        monitor = "off";
-        break;
-    default:
-        monitor = "unknown";
-        break;
-    }
-
-    dmxLogOutput(dmxScreen,
-                 "DPMS %d.%d (%s, %s, %d %d %d)\n",
-                 major, minor, monitor, state ? "enabled" : "disabled",
-                 standby, suspend, off);
-    return TRUE;
-}
-
-/** Initialize DPMS support.  We save the current settings and turn off
- * DPMS.  The settings are restored in #dmxDPMSTerm. */
-int
-dmxDPMSInit(DMXScreenInfo * dmxScreen)
-{
-    int interval, preferBlanking, allowExposures;
-
-    /* Turn off DPMS */
-    if (!_dmxDPMSInit(dmxScreen))
-        return FALSE;
-
-    if (!dmxScreen->beDisplay)
-        return FALSE;
-
-    /* Turn off screen saver */
-    XGetScreenSaver(dmxScreen->beDisplay, &dmxScreen->savedTimeout, &interval,
-                    &preferBlanking, &allowExposures);
-    XSetScreenSaver(dmxScreen->beDisplay, 0, interval,
-                    preferBlanking, allowExposures);
-    XResetScreenSaver(dmxScreen->beDisplay);
-    dmxSync(dmxScreen, FALSE);
-    return TRUE;
-}
-
-/** Terminate DPMS support on \a dmxScreen.  We restore the settings
- * saved in #dmxDPMSInit. */
-void
-dmxDPMSTerm(DMXScreenInfo * dmxScreen)
-{
-    int timeout, interval, preferBlanking, allowExposures;
-
-    if (!dmxScreen->beDisplay)
-        return;
-
-    XGetScreenSaver(dmxScreen->beDisplay, &timeout, &interval,
-                    &preferBlanking, &allowExposures);
-    XSetScreenSaver(dmxScreen->beDisplay, dmxScreen->savedTimeout, interval,
-                    preferBlanking, allowExposures);
-    if (dmxScreen->dpmsCapable) {
-        /* Restore saved state */
-        DPMSForceLevel(dmxScreen->beDisplay, DPMSModeOn);
-        DPMSSetTimeouts(dmxScreen->beDisplay, dmxScreen->dpmsStandby,
-                        dmxScreen->dpmsSuspend, dmxScreen->dpmsOff);
-        if (dmxScreen->dpmsEnabled)
-            DPMSEnable(dmxScreen->beDisplay);
-        else
-            DPMSDisable(dmxScreen->beDisplay);
-    }
-    dmxSync(dmxScreen, FALSE);
-}
-
-/** Called when activity is detected so that DPMS power-saving mode can
- * be deactivated. */
-void
-dmxDPMSWakeup(void)
-{
-    if (screenIsSaved == SCREEN_SAVER_ON)
-        dixSaveScreens(serverClient, SCREEN_SAVER_OFF, ScreenSaverReset);
-#ifdef DPMSExtension
-    if (DPMSPowerLevel)
-        DPMSSet(serverClient, 0);
-#endif
-}
-
-#ifdef DPMSExtension
-void
-dmxDPMSBackend(DMXScreenInfo *dmxScreen, int level)
-{
-    if (dmxScreen->beDisplay) {
-        DPMSForceLevel(dmxScreen->beDisplay, level);
-        dmxSync(dmxScreen, FALSE);
-    }
-}
-#endif
diff --git a/hw/dmx/dmxdpms.h b/hw/dmx/dmxdpms.h
deleted file mode 100644
index 8c4fe9d..0000000
--- a/hw/dmx/dmxdpms.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright 2003 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Author:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-/** \file
- * Interface for DPMS extension support.  \see dmxdpms.c */
-
-#ifndef _DMXDPMS_H_
-#define _DMXDPMS_H_
-extern int dmxDPMSInit(DMXScreenInfo * dmxScreen);
-extern void dmxDPMSTerm(DMXScreenInfo * dmxScreen);
-extern void dmxDPMSWakeup(void);        /* Call when input is processed */
-extern void dmxDPMSBackend(DMXScreenInfo *dmxScreen, int level);
-#endif
diff --git a/hw/dmx/dmxextension.c b/hw/dmx/dmxextension.c
deleted file mode 100644
index 4f5ca72..0000000
--- a/hw/dmx/dmxextension.c
+++ /dev/null
@@ -1,1705 +0,0 @@
-/*
- * Copyright 2003-2004 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Author:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *   Kevin E. Martin <kem@redhat.com>
- *
- */
-
-/** \file
- * This file provides the only interface to the X server extension support
- * in programs/Xserver/Xext.  Those programs should only include dmxext.h
- */
-
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#include <stdlib.h>
-
-#include "dmx.h"
-#include "dmxinit.h"
-#include "dmxextension.h"
-#include "dmxwindow.h"
-#include "dmxcb.h"
-#include "dmxcursor.h"
-#include "dmxpixmap.h"
-#include "dmxgc.h"
-#include "dmxfont.h"
-#include "dmxcmap.h"
-#include "dmxpict.h"
-#include "dmxinput.h"
-#include "dmxsync.h"
-#include "dmxscrinit.h"
-#include "input/dmxinputinit.h"
-
-#include "windowstr.h"
-#include "inputstr.h"           /* For DeviceIntRec */
-#include <X11/extensions/dmxproto.h>    /* For DMX_BAD_* */
-#include "cursorstr.h"
-
-/* The default font is declared in dix/globals.c, but is not included in
- * _any_ header files. */
-extern FontPtr defaultFont;
-
-/* Hack to get Present to build (present requires RandR) */
-RESTYPE RRCrtcType;
-
-/** This routine provides information to the DMX protocol extension
- * about a particular screen. */
-Bool
-dmxGetScreenAttributes(int physical, DMXScreenAttributesPtr attr)
-{
-    DMXScreenInfo *dmxScreen;
-
-    if (physical < 0 || physical >= dmxNumScreens)
-        return FALSE;
-
-    dmxScreen = &dmxScreens[physical];
-    attr->displayName = dmxScreen->name;
-#ifdef PANORAMIX
-    attr->logicalScreen = noPanoramiXExtension ? dmxScreen->index : 0;
-#else
-    attr->logicalScreen = dmxScreen->index;
-#endif
-
-    attr->screenWindowWidth = dmxScreen->scrnWidth;
-    attr->screenWindowHeight = dmxScreen->scrnHeight;
-    attr->screenWindowXoffset = dmxScreen->scrnX;
-    attr->screenWindowYoffset = dmxScreen->scrnY;
-
-    attr->rootWindowWidth = dmxScreen->rootWidth;
-    attr->rootWindowHeight = dmxScreen->rootHeight;
-    attr->rootWindowXoffset = dmxScreen->rootX;
-    attr->rootWindowYoffset = dmxScreen->rootY;
-
-    attr->rootWindowXorigin = dmxScreen->rootXOrigin;
-    attr->rootWindowYorigin = dmxScreen->rootYOrigin;
-
-    return TRUE;
-}
-
-/** This routine provides information to the DMX protocol extension
- * about a particular window. */
-Bool
-dmxGetWindowAttributes(WindowPtr pWindow, DMXWindowAttributesPtr attr)
-{
-    dmxWinPrivPtr pWinPriv = DMX_GET_WINDOW_PRIV(pWindow);
-
-    attr->screen = pWindow->drawable.pScreen->myNum;
-    attr->window = pWinPriv->window;
-
-    attr->pos.x = pWindow->drawable.x;
-    attr->pos.y = pWindow->drawable.y;
-    attr->pos.width = pWindow->drawable.width;
-    attr->pos.height = pWindow->drawable.height;
-
-    if (!pWinPriv->window || pWinPriv->offscreen) {
-        attr->vis.x = 0;
-        attr->vis.y = 0;
-        attr->vis.height = 0;
-        attr->vis.width = 0;
-        return pWinPriv->window ? TRUE : FALSE;
-    }
-
-    /* Compute display-relative coordinates */
-    attr->vis.x = pWindow->drawable.x;
-    attr->vis.y = pWindow->drawable.y;
-    attr->vis.width = pWindow->drawable.width;
-    attr->vis.height = pWindow->drawable.height;
-
-    if (attr->pos.x < 0) {
-        attr->vis.x -= attr->pos.x;
-        attr->vis.width = attr->pos.x + attr->pos.width - attr->vis.x;
-    }
-    if (attr->pos.x + attr->pos.width > pWindow->drawable.pScreen->width) {
-        if (attr->pos.x < 0)
-            attr->vis.width = pWindow->drawable.pScreen->width;
-        else
-            attr->vis.width = pWindow->drawable.pScreen->width - attr->pos.x;
-    }
-    if (attr->pos.y < 0) {
-        attr->vis.y -= attr->pos.y;
-        attr->vis.height = attr->pos.y + attr->pos.height - attr->vis.y;
-    }
-    if (attr->pos.y + attr->pos.height > pWindow->drawable.pScreen->height) {
-        if (attr->pos.y < 0)
-            attr->vis.height = pWindow->drawable.pScreen->height;
-        else
-            attr->vis.height = pWindow->drawable.pScreen->height - attr->pos.y;
-    }
-
-    /* Convert to window-relative coordinates */
-    attr->vis.x -= attr->pos.x;
-    attr->vis.y -= attr->pos.y;
-
-    return TRUE;
-}
-
-void
-dmxGetDesktopAttributes(DMXDesktopAttributesPtr attr)
-{
-    attr->width = dmxGlobalWidth;
-    attr->height = dmxGlobalHeight;
-    attr->shiftX = 0;           /* NOTE: The upper left hand corner of */
-    attr->shiftY = 0;           /*       the desktop is always <0,0>. */
-}
-
-/** Return the total number of devices, not just #dmxNumInputs.  The
- * number returned should be the same as that returned by
- * XListInputDevices. */
-int
-dmxGetInputCount(void)
-{
-    int i, total;
-
-    for (total = i = 0; i < dmxNumInputs; i++)
-        total += dmxInputs[i].numDevs;
-    return total;
-}
-
-/** Return information about the device with id = \a deviceId.  This
- * information is primarily for the #ProcDMXGetInputAttributes()
- * function, which does not have access to the appropriate data
- * structure. */
-int
-dmxGetInputAttributes(int deviceId, DMXInputAttributesPtr attr)
-{
-    int i, j;
-    DMXInputInfo *dmxInput;
-
-    if (deviceId < 0)
-        return -1;
-    for (i = 0; i < dmxNumInputs; i++) {
-        dmxInput = &dmxInputs[i];
-        for (j = 0; j < dmxInput->numDevs; j++) {
-            DMXLocalInputInfoPtr dmxLocal = dmxInput->devs[j];
-
-            if (deviceId != dmxLocal->pDevice->id)
-                continue;
-            attr->isCore = ! !dmxLocal->isCore;
-            attr->sendsCore = ! !dmxLocal->sendsCore;
-            attr->detached = ! !dmxInput->detached;
-            attr->physicalScreen = -1;
-            attr->physicalId = -1;
-            attr->name = NULL;
-            switch (dmxLocal->extType) {
-            case DMX_LOCAL_TYPE_LOCAL:
-                attr->inputType = 0;
-                break;
-            case DMX_LOCAL_TYPE_CONSOLE:
-                attr->inputType = 1;
-                attr->name = dmxInput->name;
-                attr->physicalId = dmxLocal->deviceId;
-                break;
-            case DMX_LOCAL_TYPE_BACKEND:
-            case DMX_LOCAL_TYPE_COMMON:
-                attr->inputType = 2;
-                attr->physicalScreen = dmxInput->scrnIdx;
-                attr->name = dmxInput->name;
-                attr->physicalId = dmxLocal->deviceId;
-                break;
-            }
-            return 0;           /* Success */
-        }
-    }
-    return -1;                  /* Failure */
-}
-
-/** Reinitialized the cursor boundaries. */
-static void
-dmxAdjustCursorBoundaries(void)
-{
-    int i;
-
-    dmxReInitOrigins();
-    dmxInitOverlap();
-    dmxComputeWidthHeight(DMX_NO_RECOMPUTE_BOUNDING_BOX);
-    dmxConnectionBlockCallback();
-    for (i = 0; i < dmxNumInputs; i++) {
-        DMXInputInfo *dmxInput = &dmxInputs[i];
-
-        if (!dmxInput->detached)
-            dmxInputReInit(dmxInput);
-    }
-
-    dmxCheckCursor();
-
-    for (i = 0; i < dmxNumInputs; i++) {
-        DMXInputInfo *dmxInput = &dmxInputs[i];
-
-        if (!dmxInput->detached)
-            dmxInputLateReInit(dmxInput);
-    }
-}
-
-/** Add an input with the specified attributes.  If the input is added,
- * the physical id is returned in \a deviceId. */
-int
-dmxAddInput(DMXInputAttributesPtr attr, int *id)
-{
-    int retcode = BadValue;
-
-    if (attr->inputType == 1)   /* console */
-        retcode = dmxInputAttachConsole(attr->name, attr->sendsCore, id);
-    else if (attr->inputType == 2)      /* backend */
-        retcode = dmxInputAttachBackend(attr->physicalScreen,
-                                        attr->sendsCore, id);
-
-    if (retcode == Success) {
-        /* Adjust the cursor boundaries */
-        dmxAdjustCursorBoundaries();
-
-        /* Force completion of the changes */
-        dmxSync(NULL, TRUE);
-    }
-
-    return retcode;
-}
-
-/** Remove the input with physical id \a id. */
-int
-dmxRemoveInput(int id)
-{
-    return dmxInputDetachId(id);
-}
-
-/** Return the value of #dmxNumScreens -- the total number of backend
- * screens in use (these are logical screens and may be larger than the
- * number of backend displays). */
-unsigned long
-dmxGetNumScreens(void)
-{
-    return dmxNumScreens;
-}
-
-/** Make sure that #dmxCreateAndRealizeWindow has been called for \a
- * pWindow. */
-void
-dmxForceWindowCreation(WindowPtr pWindow)
-{
-    dmxWinPrivPtr pWinPriv = DMX_GET_WINDOW_PRIV(pWindow);
-
-    if (!pWinPriv->window)
-        dmxCreateAndRealizeWindow(pWindow, TRUE);
-}
-
-/** Flush pending syncs for all screens. */
-void
-dmxFlushPendingSyncs(void)
-{
-    dmxSync(NULL, TRUE);
-}
-
-/** Update DMX's screen resources to match those of the newly moved
- *  and/or resized "root" window. */
-void
-dmxUpdateScreenResources(ScreenPtr pScreen, int x, int y, int w, int h)
-{
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    WindowPtr pRoot = pScreen->root;
-    WindowPtr pChild;
-    Bool anyMarked = FALSE;
-
-    /* Handle special case where width and/or height are zero */
-    if (w == 0 || h == 0) {
-        w = 1;
-        h = 1;
-    }
-
-    /* Change screen size */
-    pScreen->width = w;
-    pScreen->height = h;
-
-    /* Reset the root window's drawable's size */
-    pRoot->drawable.width = w;
-    pRoot->drawable.height = h;
-
-    /* Set the root window's new winSize and borderSize */
-    pRoot->winSize.extents.x1 = 0;
-    pRoot->winSize.extents.y1 = 0;
-    pRoot->winSize.extents.x2 = w;
-    pRoot->winSize.extents.y2 = h;
-
-    pRoot->borderSize.extents.x1 = 0;
-    pRoot->borderSize.extents.y1 = 0;
-    pRoot->borderSize.extents.x2 = w;
-    pRoot->borderSize.extents.y2 = h;
-
-    /* Recompute this screen's mmWidth & mmHeight */
-    pScreen->mmWidth =
-        (w * 254 + dmxScreen->beXDPI * 5) / (dmxScreen->beXDPI * 10);
-    pScreen->mmHeight =
-        (h * 254 + dmxScreen->beYDPI * 5) / (dmxScreen->beYDPI * 10);
-
-    /* Recompute this screen's window's clip rects as follows: */
-    /*   1. Mark all of root's children's windows */
-    for (pChild = pRoot->firstChild; pChild; pChild = pChild->nextSib)
-        anyMarked |= pScreen->MarkOverlappedWindows(pChild, pChild,
-                                                    (WindowPtr *) NULL);
-
-    /*   2. Set the root window's borderClip */
-    pRoot->borderClip.extents.x1 = 0;
-    pRoot->borderClip.extents.y1 = 0;
-    pRoot->borderClip.extents.x2 = w;
-    pRoot->borderClip.extents.y2 = h;
-
-    /*   3. Set the root window's clipList */
-    if (anyMarked) {
-        /* If any windows have been marked, set the root window's
-         * clipList to be broken since it will be recalculated in
-         * ValidateTree()
-         */
-        RegionBreak(&pRoot->clipList);
-    }
-    else {
-        /* Otherwise, we just set it directly since there are no
-         * windows visible on this screen
-         */
-        pRoot->clipList.extents.x1 = 0;
-        pRoot->clipList.extents.y1 = 0;
-        pRoot->clipList.extents.x2 = w;
-        pRoot->clipList.extents.y2 = h;
-    }
-
-    /*   4. Revalidate all clip rects and generate expose events */
-    if (anyMarked) {
-        pScreen->ValidateTree(pRoot, NULL, VTBroken);
-        pScreen->HandleExposures(pRoot);
-        if (pScreen->PostValidateTree)
-            pScreen->PostValidateTree(pRoot, NULL, VTBroken);
-    }
-}
-
-#ifdef PANORAMIX
-#include "panoramiXsrv.h"
-
-/** Change the "screen" window attributes by resizing the actual window
- *  on the back-end display (if necessary). */
-static void
-dmxConfigureScreenWindow(int idx, int x, int y, int w, int h)
-{
-    DMXScreenInfo *dmxScreen = &dmxScreens[idx];
-    ScreenPtr pScreen = screenInfo.screens[idx];
-
-    /* Resize "screen" window */
-    if (dmxScreen->scrnX != x ||
-        dmxScreen->scrnY != y ||
-        dmxScreen->scrnWidth != w || dmxScreen->scrnHeight != h) {
-        dmxResizeScreenWindow(pScreen, x, y, w, h);
-    }
-
-    /* Change "screen" window values */
-    dmxScreen->scrnX = x;
-    dmxScreen->scrnY = y;
-    dmxScreen->scrnWidth = w;
-    dmxScreen->scrnHeight = h;
-}
-
-/** Change the "root" window position and size by resizing the actual
- *  window on the back-end display (if necessary) and updating all of
- *  DMX's resources by calling #dmxUpdateScreenResources. */
-static void
-dmxConfigureRootWindow(int idx, int x, int y, int w, int h)
-{
-    DMXScreenInfo *dmxScreen = &dmxScreens[idx];
-    WindowPtr pRoot = screenInfo.screens[idx]->root;
-
-    /* NOTE: Either this function or the ones that it calls must handle
-     * the case where w == 0 || h == 0.  Currently, the functions that
-     * this one calls handle that case. */
-
-    /* 1. Resize "root" window */
-    if (dmxScreen->rootX != x ||
-        dmxScreen->rootY != y ||
-        dmxScreen->rootWidth != w || dmxScreen->rootHeight != h) {
-        dmxResizeRootWindow(pRoot, x, y, w, h);
-    }
-
-    /* 2. Update all of the screen's resources associated with this root
-     *    window */
-    if (dmxScreen->rootWidth != w || dmxScreen->rootHeight != h) {
-        dmxUpdateScreenResources(screenInfo.screens[idx], x, y, w, h);
-    }
-
-    /* Change "root" window values */
-    dmxScreen->rootX = x;
-    dmxScreen->rootY = y;
-    dmxScreen->rootWidth = w;
-    dmxScreen->rootHeight = h;
-}
-
-/** Change the "root" window's origin by updating DMX's internal data
- *  structures (dix and Xinerama) to use the new origin and adjust the
- *  positions of windows that overlap this "root" window. */
-static void
-dmxSetRootWindowOrigin(int idx, int x, int y)
-{
-    DMXScreenInfo *dmxScreen = &dmxScreens[idx];
-    ScreenPtr pScreen = screenInfo.screens[idx];
-    WindowPtr pRoot = pScreen->root;
-    WindowPtr pChild;
-    int xoff;
-    int yoff;
-
-    /* Change "root" window's origin */
-    dmxScreen->rootXOrigin = x;
-    dmxScreen->rootYOrigin = y;
-
-    /* Compute offsets here in case <x,y> has been changed above */
-    xoff = x - pScreen->x;
-    yoff = y - pScreen->y;
-
-    /* Adjust the root window's position */
-    pScreen->x = dmxScreen->rootXOrigin;
-    pScreen->y = dmxScreen->rootYOrigin;
-
-    /* Recalculate the Xinerama regions and data structs */
-    XineramaReinitData();
-
-    /* Adjust each of the root window's children */
-    if (!idx)
-        ReinitializeRootWindow(screenInfo.screens[0]->root, xoff, yoff);
-    pChild = pRoot->firstChild;
-    while (pChild) {
-        /* Adjust child window's position */
-        pScreen->MoveWindow(pChild,
-                            pChild->origin.x - wBorderWidth(pChild) - xoff,
-                            pChild->origin.y - wBorderWidth(pChild) - yoff,
-                            pChild->nextSib, VTMove);
-
-        /* Note that the call to MoveWindow will eventually call
-         * dmxPositionWindow which will automatically create a
-         * window if it is now exposed on screen (for lazy window
-         * creation optimization) and it will properly set the
-         * offscreen flag.
-         */
-
-        pChild = pChild->nextSib;
-    }
-}
-
-/** Configure the attributes of each "screen" and "root" window. */
-int
-dmxConfigureScreenWindows(int nscreens,
-                          CARD32 *screens,
-                          DMXScreenAttributesPtr attribs, int *errorScreen)
-{
-    int i;
-
-    for (i = 0; i < nscreens; i++) {
-        DMXScreenAttributesPtr attr = &attribs[i];
-        int idx = screens[i];
-        DMXScreenInfo *dmxScreen = &dmxScreens[idx];
-
-        if (errorScreen)
-            *errorScreen = i;
-
-        if (!dmxScreen->beDisplay)
-            return DMX_BAD_VALUE;
-
-        /* Check for illegal values */
-        if (idx < 0 || idx >= dmxNumScreens)
-            return BadValue;
-
-        /* The "screen" and "root" windows must have valid sizes */
-        if (attr->screenWindowWidth <= 0 || attr->screenWindowHeight <= 0 ||
-            attr->rootWindowWidth < 0 || attr->rootWindowHeight < 0)
-            return DMX_BAD_VALUE;
-
-        /* The "screen" window must fit entirely within the BE display */
-        if (attr->screenWindowXoffset < 0 ||
-            attr->screenWindowYoffset < 0 ||
-            attr->screenWindowXoffset
-            + attr->screenWindowWidth > (unsigned) dmxScreen->beWidth ||
-            attr->screenWindowYoffset
-            + attr->screenWindowHeight > (unsigned) dmxScreen->beHeight)
-            return DMX_BAD_VALUE;
-
-        /* The "root" window must fit entirely within the "screen" window */
-        if (attr->rootWindowXoffset < 0 ||
-            attr->rootWindowYoffset < 0 ||
-            attr->rootWindowXoffset
-            + attr->rootWindowWidth > attr->screenWindowWidth ||
-            attr->rootWindowYoffset
-            + attr->rootWindowHeight > attr->screenWindowHeight)
-            return DMX_BAD_VALUE;
-
-        /* The "root" window must not expose unaddressable coordinates */
-        if (attr->rootWindowXorigin < 0 ||
-            attr->rootWindowYorigin < 0 ||
-            attr->rootWindowXorigin + attr->rootWindowWidth > 32767 ||
-            attr->rootWindowYorigin + attr->rootWindowHeight > 32767)
-            return DMX_BAD_VALUE;
-
-        /* The "root" window must fit within the global bounding box */
-        if (attr->rootWindowXorigin
-            + attr->rootWindowWidth > (unsigned) dmxGlobalWidth ||
-            attr->rootWindowYorigin
-            + attr->rootWindowHeight > (unsigned) dmxGlobalHeight)
-            return DMX_BAD_VALUE;
-
-        /* FIXME: Handle the rest of the illegal value checking */
-    }
-
-    /* No illegal values found */
-    if (errorScreen)
-        *errorScreen = 0;
-
-    for (i = 0; i < nscreens; i++) {
-        DMXScreenAttributesPtr attr = &attribs[i];
-        int idx = screens[i];
-        DMXScreenInfo *dmxScreen = &dmxScreens[idx];
-
-        dmxLog(dmxInfo, "Changing screen #%d attributes "
-               "from %dx%d+%d+%d %dx%d+%d+%d +%d+%d "
-               "to %dx%d+%d+%d %dx%d+%d+%d +%d+%d\n",
-               idx,
-               dmxScreen->scrnWidth, dmxScreen->scrnHeight,
-               dmxScreen->scrnX, dmxScreen->scrnY,
-               dmxScreen->rootWidth, dmxScreen->rootHeight,
-               dmxScreen->rootX, dmxScreen->rootY,
-               dmxScreen->rootXOrigin, dmxScreen->rootYOrigin,
-               attr->screenWindowWidth, attr->screenWindowHeight,
-               attr->screenWindowXoffset, attr->screenWindowYoffset,
-               attr->rootWindowWidth, attr->rootWindowHeight,
-               attr->rootWindowXoffset, attr->rootWindowYoffset,
-               attr->rootWindowXorigin, attr->rootWindowYorigin);
-
-        /* Configure "screen" window */
-        dmxConfigureScreenWindow(idx,
-                                 attr->screenWindowXoffset,
-                                 attr->screenWindowYoffset,
-                                 attr->screenWindowWidth,
-                                 attr->screenWindowHeight);
-
-        /* Configure "root" window */
-        dmxConfigureRootWindow(idx,
-                               attr->rootWindowXoffset,
-                               attr->rootWindowYoffset,
-                               attr->rootWindowWidth, attr->rootWindowHeight);
-
-        /* Set "root" window's origin */
-        dmxSetRootWindowOrigin(idx,
-                               attr->rootWindowXorigin,
-                               attr->rootWindowYorigin);
-    }
-
-    /* Adjust the cursor boundaries */
-    dmxAdjustCursorBoundaries();
-
-    /* Force completion of the changes */
-    dmxSync(NULL, TRUE);
-
-    return Success;
-}
-
-/** Configure the attributes of the global desktop. */
-int
-dmxConfigureDesktop(DMXDesktopAttributesPtr attribs)
-{
-    if (attribs->width <= 0 || attribs->width >= 32767 ||
-        attribs->height <= 0 || attribs->height >= 32767)
-        return DMX_BAD_VALUE;
-
-    /* If the desktop is shrinking, adjust the "root" windows on each
-     * "screen" window to only show the visible desktop.  Also, handle
-     * the special case where the desktop shrinks such that the it no
-     * longer overlaps an portion of a "screen" window. */
-    if (attribs->width < dmxGlobalWidth || attribs->height < dmxGlobalHeight) {
-        int i;
-
-        for (i = 0; i < dmxNumScreens; i++) {
-            DMXScreenInfo *dmxScreen = &dmxScreens[i];
-
-            if (dmxScreen->rootXOrigin
-                + dmxScreen->rootWidth > attribs->width ||
-                dmxScreen->rootYOrigin
-                + dmxScreen->rootHeight > attribs->height) {
-                int w, h;
-
-                if ((w = attribs->width - dmxScreen->rootXOrigin) < 0)
-                    w = 0;
-                if ((h = attribs->height - dmxScreen->rootYOrigin) < 0)
-                    h = 0;
-                if (w > dmxScreen->scrnWidth)
-                    w = dmxScreen->scrnWidth;
-                if (h > dmxScreen->scrnHeight)
-                    h = dmxScreen->scrnHeight;
-                if (w > dmxScreen->rootWidth)
-                    w = dmxScreen->rootWidth;
-                if (h > dmxScreen->rootHeight)
-                    h = dmxScreen->rootHeight;
-                dmxConfigureRootWindow(i,
-                                       dmxScreen->rootX,
-                                       dmxScreen->rootY, w, h);
-            }
-        }
-    }
-
-    /* Set the global width/height */
-    dmxSetWidthHeight(attribs->width, attribs->height);
-
-    /* Handle shift[XY] changes */
-    if (attribs->shiftX || attribs->shiftY) {
-        int i;
-
-        for (i = 0; i < dmxNumScreens; i++) {
-            ScreenPtr pScreen = screenInfo.screens[i];
-            WindowPtr pChild = pScreen->root->firstChild;
-
-            while (pChild) {
-                /* Adjust child window's position */
-                pScreen->MoveWindow(pChild,
-                                    pChild->origin.x - wBorderWidth(pChild)
-                                    - attribs->shiftX,
-                                    pChild->origin.y - wBorderWidth(pChild)
-                                    - attribs->shiftY, pChild->nextSib, VTMove);
-
-                /* Note that the call to MoveWindow will eventually call
-                 * dmxPositionWindow which will automatically create a
-                 * window if it is now exposed on screen (for lazy
-                 * window creation optimization) and it will properly
-                 * set the offscreen flag.
-                 */
-
-                pChild = pChild->nextSib;
-            }
-        }
-    }
-
-    /* Update connection block, Xinerama, etc. -- these appears to
-     * already be handled in dmxConnectionBlockCallback(), which is
-     * called from dmxAdjustCursorBoundaries() [below]. */
-
-    /* Adjust the cursor boundaries */
-    dmxAdjustCursorBoundaries();
-
-    /* Force completion of the changes */
-    dmxSync(NULL, TRUE);
-
-    return Success;
-}
-#endif
-
-/** Create the scratch GCs per depth. */
-static void
-dmxBECreateScratchGCs(int scrnNum)
-{
-    ScreenPtr pScreen = screenInfo.screens[scrnNum];
-    GCPtr *ppGC = pScreen->GCperDepth;
-    int i;
-
-    for (i = 0; i <= pScreen->numDepths; i++)
-        dmxBECreateGC(pScreen, ppGC[i]);
-}
-
-#ifdef PANORAMIX
-static Bool FoundPixImage;
-
-/** Search the Xinerama XRT_PIXMAP resources for the pixmap that needs
- *  to have its image restored.  When it is found, see if there is
- *  another screen with the same image.  If so, copy the pixmap image
- *  from the existing screen to the newly created pixmap. */
-static void
-dmxBERestorePixmapImage(void *value, XID id, RESTYPE type, void *p)
-{
-    if ((type & TypeMask) == (XRT_PIXMAP & TypeMask)) {
-        PixmapPtr pDst = (PixmapPtr) p;
-        int idx = pDst->drawable.pScreen->myNum;
-        PanoramiXRes *pXinPix = (PanoramiXRes *) value;
-        PixmapPtr pPix;
-        int i;
-
-        dixLookupResourceByType((void **) &pPix, pXinPix->info[idx].id,
-                                RT_PIXMAP, NullClient, DixUnknownAccess);
-        if (pPix != pDst)
-            return;             /* Not a match.... Next! */
-
-        FOR_NSCREENS(i) {
-            PixmapPtr pSrc;
-            dmxPixPrivPtr pSrcPriv = NULL;
-
-            if (i == idx)
-                continue;       /* Self replication is bad */
-
-            dixLookupResourceByType((void **) &pSrc, pXinPix->info[i].id,
-                                    RT_PIXMAP, NullClient, DixUnknownAccess);
-            pSrcPriv = DMX_GET_PIXMAP_PRIV(pSrc);
-            if (pSrcPriv->pixmap) {
-                DMXScreenInfo *dmxSrcScreen = &dmxScreens[i];
-                DMXScreenInfo *dmxDstScreen = &dmxScreens[idx];
-                dmxPixPrivPtr pDstPriv = DMX_GET_PIXMAP_PRIV(pDst);
-                XImage *img;
-                int j;
-                XlibGC gc = NULL;
-
-                /* This should never happen, but just in case.... */
-                if (pSrc->drawable.width != pDst->drawable.width ||
-                    pSrc->drawable.height != pDst->drawable.height)
-                    return;
-
-                /* Copy from src pixmap to dst pixmap */
-                img = XGetImage(dmxSrcScreen->beDisplay,
-                                pSrcPriv->pixmap,
-                                0, 0,
-                                pSrc->drawable.width, pSrc->drawable.height,
-                                -1, ZPixmap);
-
-                for (j = 0; j < dmxDstScreen->beNumPixmapFormats; j++) {
-                    if (dmxDstScreen->bePixmapFormats[j].depth == img->depth) {
-                        unsigned long m;
-                        XGCValues v;
-
-                        m = GCFunction | GCPlaneMask | GCClipMask;
-                        v.function = GXcopy;
-                        v.plane_mask = AllPlanes;
-                        v.clip_mask = None;
-
-                        gc = XCreateGC(dmxDstScreen->beDisplay,
-                                       dmxDstScreen->scrnDefDrawables[j],
-                                       m, &v);
-                        break;
-                    }
-                }
-
-                if (gc) {
-                    XPutImage(dmxDstScreen->beDisplay,
-                              pDstPriv->pixmap,
-                              gc, img, 0, 0, 0, 0,
-                              pDst->drawable.width, pDst->drawable.height);
-                    XFreeGC(dmxDstScreen->beDisplay, gc);
-                    FoundPixImage = True;
-                }
-                else {
-                    dmxLog(dmxWarning, "Could not create GC\n");
-                }
-
-                XDestroyImage(img);
-                return;
-            }
-        }
-    }
-}
-#endif
-
-/** Restore the pixmap image either from another screen or from an image
- *  that was saved when the screen was previously detached. */
-static void
-dmxBERestorePixmap(PixmapPtr pPixmap)
-{
-#ifdef PANORAMIX
-    int i;
-
-    /* If Xinerama is not active, there's nothing we can do (see comment
-     * in #else below for more info). */
-    if (noPanoramiXExtension) {
-        dmxLog(dmxWarning, "Cannot restore pixmap image\n");
-        return;
-    }
-
-    FoundPixImage = False;
-    for (i = currentMaxClients; --i >= 0;)
-        if (clients[i])
-            FindAllClientResources(clients[i], dmxBERestorePixmapImage,
-                                   (void *) pPixmap);
-
-    /* No corresponding pixmap image was found on other screens, so we
-     * need to copy it from the saved image when the screen was detached
-     * (if available). */
-    if (!FoundPixImage) {
-        dmxPixPrivPtr pPixPriv = DMX_GET_PIXMAP_PRIV(pPixmap);
-
-        if (pPixPriv->detachedImage) {
-            ScreenPtr pScreen = pPixmap->drawable.pScreen;
-            DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-            XlibGC gc = NULL;
-
-            for (i = 0; i < dmxScreen->beNumPixmapFormats; i++) {
-                if (dmxScreen->bePixmapFormats[i].depth ==
-                    pPixPriv->detachedImage->depth) {
-                    unsigned long m;
-                    XGCValues v;
-
-                    m = GCFunction | GCPlaneMask | GCClipMask;
-                    v.function = GXcopy;
-                    v.plane_mask = AllPlanes;
-                    v.clip_mask = None;
-
-                    gc = XCreateGC(dmxScreen->beDisplay,
-                                   dmxScreen->scrnDefDrawables[i], m, &v);
-                    break;
-                }
-            }
-
-            if (gc) {
-                XPutImage(dmxScreen->beDisplay,
-                          pPixPriv->pixmap,
-                          gc,
-                          pPixPriv->detachedImage,
-                          0, 0, 0, 0,
-                          pPixmap->drawable.width, pPixmap->drawable.height);
-                XFreeGC(dmxScreen->beDisplay, gc);
-            }
-            else {
-                dmxLog(dmxWarning, "Cannot restore pixmap image\n");
-            }
-
-            XDestroyImage(pPixPriv->detachedImage);
-            pPixPriv->detachedImage = NULL;
-        }
-        else {
-            dmxLog(dmxWarning, "Cannot restore pixmap image\n");
-        }
-    }
-#else
-    /* If Xinerama is not enabled, then there is no other copy of the
-     * pixmap image that we can restore.  Saving all pixmap data is not
-     * a feasible option since there is no mechanism for updating pixmap
-     * data when a screen is detached, which means that the data that
-     * was previously saved would most likely be out of date. */
-    dmxLog(dmxWarning, "Cannot restore pixmap image\n");
-    return;
-#endif
-}
-
-/** Create resources on the back-end server.  This function is called
- *  from #dmxAttachScreen() via the dix layer's FindAllResources
- *  function.  It walks all resources, compares them to the screen
- *  number passed in as \a n and calls the appropriate DMX function to
- *  create the associated resource on the back-end server. */
-static void
-dmxBECreateResources(void *value, XID id, RESTYPE type, void *n)
-{
-    int scrnNum = (uintptr_t) n;
-    ScreenPtr pScreen = screenInfo.screens[scrnNum];
-
-    if ((type & TypeMask) == (RT_WINDOW & TypeMask)) {
-        /* Window resources are created below in dmxBECreateWindowTree */
-    }
-    else if ((type & TypeMask) == (RT_PIXMAP & TypeMask)) {
-        PixmapPtr pPix = value;
-
-        if (pPix->drawable.pScreen->myNum == scrnNum) {
-            dmxBECreatePixmap(pPix);
-            dmxBERestorePixmap(pPix);
-        }
-    }
-    else if ((type & TypeMask) == (RT_GC & TypeMask)) {
-        GCPtr pGC = value;
-
-        if (pGC->pScreen->myNum == scrnNum) {
-            /* Create the GC on the back-end server */
-            dmxBECreateGC(pScreen, pGC);
-            /* Create any pixmaps associated with this GC */
-            if (!pGC->tileIsPixel) {
-                dmxBECreatePixmap(pGC->tile.pixmap);
-                dmxBERestorePixmap(pGC->tile.pixmap);
-            }
-            if (pGC->stipple != pScreen->defaultStipple) {
-                dmxBECreatePixmap(pGC->stipple);
-                dmxBERestorePixmap(pGC->stipple);
-            }
-            if (pGC->font != defaultFont) {
-                (void) dmxBELoadFont(pScreen, pGC->font);
-            }
-            /* Update the GC on the back-end server */
-            dmxChangeGC(pGC, -1L);
-        }
-    }
-    else if ((type & TypeMask) == (RT_FONT & TypeMask)) {
-        (void) dmxBELoadFont(pScreen, (FontPtr) value);
-    }
-    else if ((type & TypeMask) == (RT_CURSOR & TypeMask)) {
-        dmxBECreateCursor(pScreen, (CursorPtr) value);
-    }
-    else if ((type & TypeMask) == (RT_COLORMAP & TypeMask)) {
-        ColormapPtr pCmap = value;
-
-        if (pCmap->pScreen->myNum == scrnNum)
-            (void) dmxBECreateColormap((ColormapPtr) value);
-#if 0
-        /* TODO: Recreate Picture and GlyphSet resources */
-    }
-    else if ((type & TypeMask) == (PictureType & TypeMask)) {
-        /* Picture resources are created when windows are created */
-    }
-    else if ((type & TypeMask) == (GlyphSetType & TypeMask)) {
-        dmxBEFreeGlyphSet(pScreen, (GlyphSetPtr) value);
-#endif
-    }
-    else {
-        /* Other resource types??? */
-    }
-}
-
-/** Create window hierachy on back-end server.  The window tree is
- *  created in a special order (bottom most subwindow first) so that the
- *  #dmxCreateNonRootWindow() function does not need to recursively call
- *  itself to create each window's parents.  This is required so that we
- *  have the opportunity to create each window's border and background
- *  pixmaps (where appropriate) before the window is created. */
-static void
-dmxBECreateWindowTree(int idx)
-{
-    DMXScreenInfo *dmxScreen = &dmxScreens[idx];
-    WindowPtr pRoot = screenInfo.screens[idx]->root;
-    dmxWinPrivPtr pWinPriv = DMX_GET_WINDOW_PRIV(pRoot);
-    WindowPtr pWin;
-
-    /* Create the pixmaps associated with the root window */
-    if (!pRoot->borderIsPixel) {
-        dmxBECreatePixmap(pRoot->border.pixmap);
-        dmxBERestorePixmap(pRoot->border.pixmap);
-    }
-    if (pRoot->backgroundState == BackgroundPixmap) {
-        dmxBECreatePixmap(pRoot->background.pixmap);
-        dmxBERestorePixmap(pRoot->background.pixmap);
-    }
-
-    /* Create root window first */
-    dmxScreen->rootWin = pWinPriv->window = dmxCreateRootWindow(pRoot);
-    XMapWindow(dmxScreen->beDisplay, dmxScreen->rootWin);
-
-    pWin = pRoot->lastChild;
-    while (pWin) {
-        pWinPriv = DMX_GET_WINDOW_PRIV(pWin);
-
-        /* Create the pixmaps regardless of whether or not the
-         * window is created or not due to lazy window creation.
-         */
-        if (!pWin->borderIsPixel) {
-            dmxBECreatePixmap(pWin->border.pixmap);
-            dmxBERestorePixmap(pWin->border.pixmap);
-        }
-        if (pWin->backgroundState == BackgroundPixmap) {
-            dmxBECreatePixmap(pWin->background.pixmap);
-            dmxBERestorePixmap(pWin->background.pixmap);
-        }
-
-        /* Reset the window attributes */
-        dmxGetDefaultWindowAttributes(pWin, &pWinPriv->cmap, &pWinPriv->visual);
-
-        /* Create the window */
-        if (pWinPriv->mapped && !pWinPriv->offscreen)
-            dmxCreateAndRealizeWindow(pWin, TRUE);
-
-        /* Next, create the bottom-most child */
-        if (pWin->lastChild) {
-            pWin = pWin->lastChild;
-            continue;
-        }
-
-        /* If the window has no children, move on to the next higher window */
-        while (!pWin->prevSib && (pWin != pRoot))
-            pWin = pWin->parent;
-
-        if (pWin->prevSib) {
-            pWin = pWin->prevSib;
-            continue;
-        }
-
-        /* When we reach the root window, we are finished */
-        if (pWin == pRoot)
-            break;
-    }
-}
-
-/* Refresh screen by generating exposure events for all windows */
-static void
-dmxForceExposures(int idx)
-{
-    ScreenPtr pScreen = screenInfo.screens[idx];
-    WindowPtr pRoot = pScreen->root;
-    Bool anyMarked = FALSE;
-    WindowPtr pChild;
-
-    for (pChild = pRoot->firstChild; pChild; pChild = pChild->nextSib)
-        anyMarked |= pScreen->MarkOverlappedWindows(pChild, pChild,
-                                                    (WindowPtr *) NULL);
-    if (anyMarked) {
-        /* If any windows have been marked, set the root window's
-         * clipList to be broken since it will be recalculated in
-         * ValidateTree()
-         */
-        RegionBreak(&pRoot->clipList);
-        pScreen->ValidateTree(pRoot, NULL, VTBroken);
-        pScreen->HandleExposures(pRoot);
-        if (pScreen->PostValidateTree)
-            pScreen->PostValidateTree(pRoot, NULL, VTBroken);
-    }
-}
-
-/** Compare the new and old screens to see if they are compatible. */
-static Bool
-dmxCompareScreens(DMXScreenInfo * new, DMXScreenInfo * old)
-{
-    int i;
-
-    if (new->beWidth != old->beWidth)
-        return FALSE;
-    if (new->beHeight != old->beHeight)
-        return FALSE;
-    if (new->beDepth != old->beDepth)
-        return FALSE;
-    if (new->beBPP != old->beBPP)
-        return FALSE;
-
-    if (new->beNumDepths != old->beNumDepths)
-        return FALSE;
-    for (i = 0; i < old->beNumDepths; i++)
-        if (new->beDepths[i] != old->beDepths[i])
-            return FALSE;
-
-    if (new->beNumPixmapFormats != old->beNumPixmapFormats)
-        return FALSE;
-    for (i = 0; i < old->beNumPixmapFormats; i++) {
-        if (new->bePixmapFormats[i].depth != old->bePixmapFormats[i].depth)
-            return FALSE;
-        if (new->bePixmapFormats[i].bits_per_pixel !=
-            old->bePixmapFormats[i].bits_per_pixel)
-            return FALSE;
-        if (new->bePixmapFormats[i].scanline_pad !=
-            old->bePixmapFormats[i].scanline_pad)
-            return FALSE;
-    }
-
-    if (new->beNumVisuals != old->beNumVisuals)
-        return FALSE;
-    for (i = 0; i < old->beNumVisuals; i++) {
-        if (new->beVisuals[i].visualid != old->beVisuals[i].visualid)
-            return FALSE;
-        if (new->beVisuals[i].screen != old->beVisuals[i].screen)
-            return FALSE;
-        if (new->beVisuals[i].depth != old->beVisuals[i].depth)
-            return FALSE;
-        if (new->beVisuals[i].class != old->beVisuals[i].class)
-            return FALSE;
-        if (new->beVisuals[i].red_mask != old->beVisuals[i].red_mask)
-            return FALSE;
-        if (new->beVisuals[i].green_mask != old->beVisuals[i].green_mask)
-            return FALSE;
-        if (new->beVisuals[i].blue_mask != old->beVisuals[i].blue_mask)
-            return FALSE;
-        if (new->beVisuals[i].colormap_size != old->beVisuals[i].colormap_size)
-            return FALSE;
-        if (new->beVisuals[i].bits_per_rgb != old->beVisuals[i].bits_per_rgb)
-            return FALSE;
-    }
-
-    if (new->beDefVisualIndex != old->beDefVisualIndex)
-        return FALSE;
-
-    return TRUE;
-}
-
-/** Restore Render's picture */
-static void
-dmxBERestoreRenderPict(void *value, XID id, void *n)
-{
-    PicturePtr pPicture = value;        /* The picture */
-    DrawablePtr pDraw = pPicture->pDrawable;    /* The picture's drawable */
-    int scrnNum = (uintptr_t) n;
-
-    if (pDraw->pScreen->myNum != scrnNum) {
-        /* Picture not on the screen we are restoring */
-        return;
-    }
-
-    if (pDraw->type == DRAWABLE_PIXMAP) {
-        PixmapPtr pPixmap = (PixmapPtr) pDraw;
-
-        /* Create and restore the pixmap drawable */
-        dmxBECreatePixmap(pPixmap);
-        dmxBERestorePixmap(pPixmap);
-    }
-
-    dmxBECreatePicture(pPicture);
-}
-
-/** Restore Render's glyphs */
-static void
-dmxBERestoreRenderGlyph(void *value, XID id, void *n)
-{
-    GlyphSetPtr glyphSet = value;
-    int scrnNum = (uintptr_t) n;
-    dmxGlyphPrivPtr glyphPriv = DMX_GET_GLYPH_PRIV(glyphSet);
-    DMXScreenInfo *dmxScreen = &dmxScreens[scrnNum];
-    GlyphRefPtr table;
-    char *images;
-    Glyph *gids;
-    XGlyphInfo *glyphs;
-    char *pos;
-    int beret;
-    int len_images = 0;
-    int i;
-    int ctr;
-
-    if (glyphPriv->glyphSets[scrnNum]) {
-        /* Only restore glyphs on the screen we are attaching */
-        return;
-    }
-
-    /* First we must create the glyph set on the backend. */
-    if ((beret = dmxBECreateGlyphSet(scrnNum, glyphSet)) != Success) {
-        dmxLog(dmxWarning,
-               "\tdmxBERestoreRenderGlyph failed to create glyphset!\n");
-        return;
-    }
-
-    /* Now for the complex part, restore the glyph data */
-    table = glyphSet->hash.table;
-
-    /* We need to know how much memory to allocate for this part */
-    for (i = 0; i < glyphSet->hash.hashSet->size; i++) {
-        GlyphRefPtr gr = &table[i];
-        GlyphPtr gl = gr->glyph;
-
-        if (!gl || gl == DeletedGlyph)
-            continue;
-        len_images += gl->size - sizeof(gl->info);
-    }
-
-    /* Now allocate the memory we need */
-    images = calloc(len_images, sizeof(char));
-    gids = xallocarray(glyphSet->hash.tableEntries, sizeof(Glyph));
-    glyphs = xallocarray(glyphSet->hash.tableEntries, sizeof(XGlyphInfo));
-
-    pos = images;
-    ctr = 0;
-
-    /* Fill the allocated memory with the proper data */
-    for (i = 0; i < glyphSet->hash.hashSet->size; i++) {
-        GlyphRefPtr gr = &table[i];
-        GlyphPtr gl = gr->glyph;
-
-        if (!gl || gl == DeletedGlyph)
-            continue;
-
-        /* First lets put the data into gids */
-        gids[ctr] = gr->signature;
-
-        /* Next do the glyphs data structures */
-        glyphs[ctr].width = gl->info.width;
-        glyphs[ctr].height = gl->info.height;
-        glyphs[ctr].x = gl->info.x;
-        glyphs[ctr].y = gl->info.y;
-        glyphs[ctr].xOff = gl->info.xOff;
-        glyphs[ctr].yOff = gl->info.yOff;
-
-        /* Copy the images from the DIX's data into the buffer */
-        memcpy(pos, gl + 1, gl->size - sizeof(gl->info));
-        pos += gl->size - sizeof(gl->info);
-        ctr++;
-    }
-
-    /* Now restore the glyph data */
-    XRenderAddGlyphs(dmxScreen->beDisplay, glyphPriv->glyphSets[scrnNum],
-                     gids, glyphs, glyphSet->hash.tableEntries, images,
-                     len_images);
-
-    /* Clean up */
-    free(images);
-    free(gids);
-    free(glyphs);
-}
-
-/** Reattach previously detached back-end screen. */
-int
-dmxAttachScreen(int idx, DMXScreenAttributesPtr attr)
-{
-    ScreenPtr pScreen;
-    DMXScreenInfo *dmxScreen;
-    CARD32 scrnNum = idx;
-    DMXScreenInfo oldDMXScreen;
-    int i;
-
-    /* Return failure if dynamic addition/removal of screens is disabled */
-    if (!dmxAddRemoveScreens) {
-        dmxLog(dmxWarning,
-               "Attempting to add a screen, but the AddRemoveScreen\n");
-        dmxLog(dmxWarning,
-               "extension has not been enabled.  To enable this extension\n");
-        dmxLog(dmxWarning,
-               "add the \"-addremovescreens\" option either to the command\n");
-        dmxLog(dmxWarning, "line or in the configuration file.\n");
-        return 1;
-    }
-
-    /* Cannot add a screen that does not exist */
-    if (idx < 0 || idx >= dmxNumScreens)
-        return 1;
-    pScreen = screenInfo.screens[idx];
-    dmxScreen = &dmxScreens[idx];
-
-    /* Cannot attach to a screen that is already opened */
-    if (dmxScreen->beDisplay) {
-        dmxLog(dmxWarning,
-               "Attempting to add screen #%d but a screen already exists\n",
-               idx);
-        return 1;
-    }
-
-    dmxLogOutput(dmxScreen, "Attaching screen #%d\n", idx);
-
-    /* Save old info */
-    oldDMXScreen = *dmxScreen;
-
-    /* Copy the name to the new screen */
-    dmxScreen->name = strdup(attr->displayName);
-
-    /* Open display and get all of the screen info */
-    if (!dmxOpenDisplay(dmxScreen)) {
-        dmxLog(dmxWarning,
-               "dmxOpenDisplay: Unable to open display %s\n", dmxScreen->name);
-
-        /* Restore the old screen */
-        *dmxScreen = oldDMXScreen;
-        return 1;
-    }
-
-    dmxSetErrorHandler(dmxScreen);
-    dmxCheckForWM(dmxScreen);
-    dmxGetScreenAttribs(dmxScreen);
-
-    if (!dmxGetVisualInfo(dmxScreen)) {
-        dmxLog(dmxWarning, "dmxGetVisualInfo: No matching visuals found\n");
-        XFree(dmxScreen->beVisuals);
-        XCloseDisplay(dmxScreen->beDisplay);
-
-        /* Restore the old screen */
-        *dmxScreen = oldDMXScreen;
-        return 1;
-    }
-
-    dmxGetColormaps(dmxScreen);
-    dmxGetPixmapFormats(dmxScreen);
-
-    /* Verify that the screen to be added has the same info as the
-     * previously added screen. */
-    if (!dmxCompareScreens(dmxScreen, &oldDMXScreen)) {
-        dmxLog(dmxWarning,
-               "New screen data (%s) does not match previously\n",
-               dmxScreen->name);
-        dmxLog(dmxWarning, "attached screen data (%s)\n", oldDMXScreen.name);
-        dmxLog(dmxWarning,
-               "All data must match in order to attach to screen #%d\n", idx);
-        XFree(dmxScreen->beVisuals);
-        XFree(dmxScreen->beDepths);
-        XFree(dmxScreen->bePixmapFormats);
-        XCloseDisplay(dmxScreen->beDisplay);
-
-        /* Restore the old screen */
-        *dmxScreen = oldDMXScreen;
-        return 1;
-    }
-
-    /* Initialize the BE screen resources */
-    dmxBEScreenInit(screenInfo.screens[idx]);
-
-    /* TODO: Handle GLX visual initialization.  GLXProxy needs to be
-     * updated to handle dynamic addition/removal of screens. */
-
-    /* Create default stipple */
-    dmxBECreatePixmap(pScreen->defaultStipple);
-    dmxBERestorePixmap(pScreen->defaultStipple);
-
-    /* Create the scratch GCs */
-    dmxBECreateScratchGCs(idx);
-
-    /* Create the default font */
-    (void) dmxBELoadFont(pScreen, defaultFont);
-
-    /* Create all resources that don't depend on windows */
-    for (i = currentMaxClients; --i >= 0;)
-        if (clients[i])
-            FindAllClientResources(clients[i], dmxBECreateResources,
-                                   (void *) (uintptr_t) idx);
-
-    /* Create window hierarchy (top down) */
-    dmxBECreateWindowTree(idx);
-
-    /* Restore the picture state for RENDER */
-    for (i = currentMaxClients; --i >= 0;)
-        if (clients[i])
-            FindClientResourcesByType(clients[i], PictureType,
-                                      dmxBERestoreRenderPict,
-                                      (void *) (uintptr_t) idx);
-
-    /* Restore the glyph state for RENDER */
-    for (i = currentMaxClients; --i >= 0;)
-        if (clients[i])
-            FindClientResourcesByType(clients[i], GlyphSetType,
-                                      dmxBERestoreRenderGlyph,
-                                      (void *) (uintptr_t) idx);
-
-    /* Refresh screen by generating exposure events for all windows */
-    dmxForceExposures(idx);
-
-    dmxSync(&dmxScreens[idx], TRUE);
-
-    /* We used these to compare the old and new screens.  They are no
-     * longer needed since we have a newly attached screen, so we can
-     * now free the old screen's resources. */
-    XFree(oldDMXScreen.beVisuals);
-    XFree(oldDMXScreen.beDepths);
-    XFree(oldDMXScreen.bePixmapFormats);
-    /* TODO: should oldDMXScreen.name be freed?? */
-
-#ifdef PANORAMIX
-    if (!noPanoramiXExtension)
-        return dmxConfigureScreenWindows(1, &scrnNum, attr, NULL);
-    else
-#endif
-        return 0;               /* Success */
-}
-
-/*
- * Resources that may have state on the BE server and need to be freed:
- *
- * RT_NONE
- * RT_WINDOW
- * RT_PIXMAP
- * RT_GC
- * RT_FONT
- * RT_CURSOR
- * RT_COLORMAP
- * RT_CMAPENTRY
- * RT_OTHERCLIENT
- * RT_PASSIVEGRAB
- * XRT_WINDOW
- * XRT_PIXMAP
- * XRT_GC
- * XRT_COLORMAP
- * XRT_PICTURE
- * PictureType
- * PictFormatType
- * GlyphSetType
- * ClientType
- * EventType
- * RT_INPUTCLIENT
- * XETrapType
- * RTCounter
- * RTAwait
- * RTAlarmClient
- * RT_XKBCLIENT
- * RTContext
- * TagResType
- * StalledResType
- * SecurityAuthorizationResType
- * RTEventClient
- * __glXContextRes
- * __glXClientRes
- * __glXPixmapRes
- * __glXWindowRes
- * __glXPbufferRes
- */
-
-#ifdef PANORAMIX
-/** Search the Xinerama XRT_PIXMAP resources for the pixmap that needs
- *  to have its image saved. */
-static void
-dmxBEFindPixmapImage(void *value, XID id, RESTYPE type, void *p)
-{
-    if ((type & TypeMask) == (XRT_PIXMAP & TypeMask)) {
-        PixmapPtr pDst = (PixmapPtr) p;
-        int idx = pDst->drawable.pScreen->myNum;
-        PanoramiXRes *pXinPix = (PanoramiXRes *) value;
-        PixmapPtr pPix;
-        int i;
-
-        dixLookupResourceByType((void **) &pPix, pXinPix->info[idx].id,
-                                RT_PIXMAP, NullClient, DixUnknownAccess);
-        if (pPix != pDst)
-            return;             /* Not a match.... Next! */
-
-        FOR_NSCREENS(i) {
-            PixmapPtr pSrc;
-            dmxPixPrivPtr pSrcPriv = NULL;
-
-            if (i == idx)
-                continue;       /* Self replication is bad */
-
-            dixLookupResourceByType((void **) &pSrc, pXinPix->info[i].id,
-                                    RT_PIXMAP, NullClient, DixUnknownAccess);
-            pSrcPriv = DMX_GET_PIXMAP_PRIV(pSrc);
-            if (pSrcPriv->pixmap) {
-                FoundPixImage = True;
-                return;
-            }
-        }
-    }
-}
-#endif
-
-/** Save the pixmap image only when there is not another screen with
- *  that pixmap from which the image can be read when the screen is
- *  reattached.  To do this, we first try to find a pixmap on another
- *  screen corresponding to the one we are trying to save.  If we find
- *  one, then we do not need to save the image data since during
- *  reattachment, the image data can be read from that other pixmap.
- *  However, if we do not find one, then we need to save the image data.
- *  The common case for these are for the default stipple and root
- *  tile. */
-static void
-dmxBESavePixmap(PixmapPtr pPixmap)
-{
-#ifdef PANORAMIX
-    int i;
-
-    /* If Xinerama is not active, there's nothing we can do (see comment
-     * in #else below for more info). */
-    if (noPanoramiXExtension)
-        return;
-
-    FoundPixImage = False;
-    for (i = currentMaxClients; --i >= 0;)
-        if (clients[i])
-            FindAllClientResources(clients[i], dmxBEFindPixmapImage,
-                                   (void *) pPixmap);
-
-    /* Save the image only if there is no other screens that have a
-     * pixmap that corresponds to the one we are trying to save. */
-    if (!FoundPixImage) {
-        dmxPixPrivPtr pPixPriv = DMX_GET_PIXMAP_PRIV(pPixmap);
-
-        if (!pPixPriv->detachedImage) {
-            ScreenPtr pScreen = pPixmap->drawable.pScreen;
-            DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-
-            pPixPriv->detachedImage = XGetImage(dmxScreen->beDisplay,
-                                                pPixPriv->pixmap,
-                                                0, 0,
-                                                pPixmap->drawable.width,
-                                                pPixmap->drawable.height,
-                                                -1, ZPixmap);
-            if (!pPixPriv->detachedImage)
-                dmxLog(dmxWarning, "Cannot save pixmap image\n");
-        }
-    }
-#else
-    /* NOTE: The only time there is a pixmap on another screen that
-     * corresponds to the one we are trying to save is when Xinerama is
-     * active.  Otherwise, the pixmap image data is only stored on a
-     * single screen, which means that once it is detached, that data is
-     * lost.  We could save the data here, but then that would require
-     * us to implement the ability for Xdmx to keep the pixmap up to
-     * date while the screen is detached, which is beyond the scope of
-     * the current project. */
-    return;
-#endif
-}
-
-/** Destroy resources on the back-end server.  This function is called
- *  from #dmxDetachScreen() via the dix layer's FindAllResources
- *  function.  It walks all resources, compares them to the screen
- *  number passed in as \a n and calls the appropriate DMX function to
- *  free the associated resource on the back-end server. */
-static void
-dmxBEDestroyResources(void *value, XID id, RESTYPE type, void *n)
-{
-    int scrnNum = (uintptr_t) n;
-    ScreenPtr pScreen = screenInfo.screens[scrnNum];
-
-    if ((type & TypeMask) == (RT_WINDOW & TypeMask)) {
-        /* Window resources are destroyed below in dmxBEDestroyWindowTree */
-    }
-    else if ((type & TypeMask) == (RT_PIXMAP & TypeMask)) {
-        PixmapPtr pPix = value;
-
-        if (pPix->drawable.pScreen->myNum == scrnNum) {
-            dmxBESavePixmap(pPix);
-            dmxBEFreePixmap(pPix);
-        }
-    }
-    else if ((type & TypeMask) == (RT_GC & TypeMask)) {
-        GCPtr pGC = value;
-
-        if (pGC->pScreen->myNum == scrnNum)
-            dmxBEFreeGC(pGC);
-    }
-    else if ((type & TypeMask) == (RT_FONT & TypeMask)) {
-        dmxBEFreeFont(pScreen, (FontPtr) value);
-    }
-    else if ((type & TypeMask) == (RT_CURSOR & TypeMask)) {
-        dmxBEFreeCursor(pScreen, (CursorPtr) value);
-    }
-    else if ((type & TypeMask) == (RT_COLORMAP & TypeMask)) {
-        ColormapPtr pCmap = value;
-
-        if (pCmap->pScreen->myNum == scrnNum)
-            dmxBEFreeColormap((ColormapPtr) value);
-    }
-    else if ((type & TypeMask) == (PictureType & TypeMask)) {
-        PicturePtr pPict = value;
-
-        if (pPict->pDrawable->pScreen->myNum == scrnNum) {
-            /* Free the pixmaps on the backend if needed */
-            if (pPict->pDrawable->type == DRAWABLE_PIXMAP) {
-                PixmapPtr pPixmap = (PixmapPtr) (pPict->pDrawable);
-
-                dmxBESavePixmap(pPixmap);
-                dmxBEFreePixmap(pPixmap);
-            }
-            dmxBEFreePicture((PicturePtr) value);
-        }
-    }
-    else if ((type & TypeMask) == (GlyphSetType & TypeMask)) {
-        dmxBEFreeGlyphSet(pScreen, (GlyphSetPtr) value);
-    }
-    else {
-        /* Other resource types??? */
-    }
-}
-
-/** Destroy the scratch GCs that are created per depth. */
-static void
-dmxBEDestroyScratchGCs(int scrnNum)
-{
-    ScreenPtr pScreen = screenInfo.screens[scrnNum];
-    GCPtr *ppGC = pScreen->GCperDepth;
-    int i;
-
-    for (i = 0; i <= pScreen->numDepths; i++)
-        dmxBEFreeGC(ppGC[i]);
-}
-
-/** Destroy window hierachy on back-end server.  To ensure that all
- *  XDestroyWindow() calls succeed, they must be performed in a bottom
- *  up order so that windows are not destroyed before their children.
- *  XDestroyWindow(), which is called from #dmxBEDestroyWindow(), will
- *  destroy a window as well as all of it's children. */
-static void
-dmxBEDestroyWindowTree(int idx)
-{
-    WindowPtr pWin = screenInfo.screens[idx]->root;
-    WindowPtr pChild = pWin;
-
-    while (1) {
-        if (pChild->firstChild) {
-            pChild = pChild->firstChild;
-            continue;
-        }
-
-        /* Destroy the window */
-        dmxBEDestroyWindow(pChild);
-
-        /* Make sure we destroy the window's border and background
-         * pixmaps if they exist */
-        if (!pChild->borderIsPixel) {
-            dmxBESavePixmap(pChild->border.pixmap);
-            dmxBEFreePixmap(pChild->border.pixmap);
-        }
-        if (pChild->backgroundState == BackgroundPixmap) {
-            dmxBESavePixmap(pChild->background.pixmap);
-            dmxBEFreePixmap(pChild->background.pixmap);
-        }
-
-        while (!pChild->nextSib && (pChild != pWin)) {
-            pChild = pChild->parent;
-            dmxBEDestroyWindow(pChild);
-            if (!pChild->borderIsPixel) {
-                dmxBESavePixmap(pChild->border.pixmap);
-                dmxBEFreePixmap(pChild->border.pixmap);
-            }
-            if (pChild->backgroundState == BackgroundPixmap) {
-                dmxBESavePixmap(pChild->background.pixmap);
-                dmxBEFreePixmap(pChild->background.pixmap);
-            }
-        }
-
-        if (pChild == pWin)
-            break;
-
-        pChild = pChild->nextSib;
-    }
-}
-
-/** Detach back-end screen. */
-int
-dmxDetachScreen(int idx)
-{
-    DMXScreenInfo *dmxScreen = &dmxScreens[idx];
-    int i;
-
-    /* Return failure if dynamic addition/removal of screens is disabled */
-    if (!dmxAddRemoveScreens) {
-        dmxLog(dmxWarning,
-               "Attempting to remove a screen, but the AddRemoveScreen\n");
-        dmxLog(dmxWarning,
-               "extension has not been enabled.  To enable this extension\n");
-        dmxLog(dmxWarning,
-               "add the \"-addremovescreens\" option either to the command\n");
-        dmxLog(dmxWarning, "line or in the configuration file.\n");
-        return 1;
-    }
-
-    /* Cannot remove a screen that does not exist */
-    if (idx < 0 || idx >= dmxNumScreens)
-        return 1;
-
-    /* Cannot detach from a screen that is not opened */
-    if (!dmxScreen->beDisplay) {
-        dmxLog(dmxWarning,
-               "Attempting to remove screen #%d but it has not been opened\n",
-               idx);
-        return 1;
-    }
-
-    dmxLogOutput(dmxScreen, "Detaching screen #%d\n", idx);
-
-    /* Detach input */
-    dmxInputDetachAll(dmxScreen);
-
-    /* Save all relevant state (TODO) */
-
-    /* Free all non-window resources related to this screen */
-    for (i = currentMaxClients; --i >= 0;)
-        if (clients[i])
-            FindAllClientResources(clients[i], dmxBEDestroyResources,
-                                   (void *) (uintptr_t) idx);
-
-    /* Free scratch GCs */
-    dmxBEDestroyScratchGCs(idx);
-
-    /* Free window resources related to this screen */
-    dmxBEDestroyWindowTree(idx);
-
-    /* Free default stipple */
-    dmxBESavePixmap(screenInfo.screens[idx]->defaultStipple);
-    dmxBEFreePixmap(screenInfo.screens[idx]->defaultStipple);
-
-    /* Free the remaining screen resources and close the screen */
-    dmxBECloseScreen(screenInfo.screens[idx]);
-
-    /* Adjust the cursor boundaries (paints detached console window) */
-    dmxAdjustCursorBoundaries();
-
-    return 0;                   /* Success */
-}
diff --git a/hw/dmx/dmxextension.h b/hw/dmx/dmxextension.h
deleted file mode 100644
index 036417b..0000000
--- a/hw/dmx/dmxextension.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Copyright 2003-2004 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Author:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *   Kevin E. Martin <kem@redhat.com>
- *
- */
-
-/** \file
- * Interface for DMX extension support.  These routines are called by
- * function in Xserver/Xext/dmx.c.  \see dmxextension.c */
-
-#ifndef _DMXEXTENSION_H_
-#define _DMXEXTENSION_H_
-
-/** Screen attributes.  Used by #ProcDMXGetScreenAttributes and
- * \a ProcDMXChangeScreensAttributes. */
-typedef struct {
-    const char *displayName;
-    int logicalScreen;
-
-    unsigned int screenWindowWidth;     /* displayName's coordinate system */
-    unsigned int screenWindowHeight;    /* displayName's coordinate system */
-    int screenWindowXoffset;    /* displayName's coordinate system */
-    int screenWindowYoffset;    /* displayName's coordinate system */
-
-    unsigned int rootWindowWidth;       /* screenWindow's coordinate system */
-    unsigned int rootWindowHeight;      /* screenWindow's coordinate system */
-    int rootWindowXoffset;      /* screenWindow's coordinate system */
-    int rootWindowYoffset;      /* screenWindow's coordinate system */
-
-    int rootWindowXorigin;      /* global coordinate system */
-    int rootWindowYorigin;      /* global coordinate system */
-} DMXScreenAttributesRec, *DMXScreenAttributesPtr;
-
-/** Window attributes.  Used by #ProcDMXGetWindowAttributes. */
-typedef struct {
-    int screen;
-    Window window;
-    xRectangle pos;
-    xRectangle vis;
-} DMXWindowAttributesRec, *DMXWindowAttributesPtr;
-
-/** Desktop attributes.  Used by #ProcDMXGetDesktopAttributes and
- * #ProcDMXChangeDesktopAttributes. */
-typedef struct {
-    int width;
-    int height;
-    int shiftX;
-    int shiftY;
-} DMXDesktopAttributesRec, *DMXDesktopAttributesPtr;
-
-/** Input attributes.  Used by #ProcDMXGetInputAttributes. */
-typedef struct {
-    const char *name;
-    int inputType;
-    int physicalScreen;
-    int physicalId;
-    int isCore;
-    int sendsCore;
-    int detached;
-} DMXInputAttributesRec, *DMXInputAttributesPtr;
-
-extern unsigned long dmxGetNumScreens(void);
-extern void dmxForceWindowCreation(WindowPtr pWindow);
-extern void dmxFlushPendingSyncs(void);
-extern Bool dmxGetScreenAttributes(int physical, DMXScreenAttributesPtr attr);
-extern Bool dmxGetWindowAttributes(WindowPtr pWindow,
-                                   DMXWindowAttributesPtr attr);
-extern void dmxGetDesktopAttributes(DMXDesktopAttributesPtr attr);
-extern int dmxGetInputCount(void);
-extern int dmxGetInputAttributes(int deviceId, DMXInputAttributesPtr attr);
-extern int dmxAddInput(DMXInputAttributesPtr attr, int *deviceId);
-extern int dmxRemoveInput(int deviceId);
-
-extern int dmxConfigureScreenWindows(int nscreens,
-                                     CARD32 *screens,
-                                     DMXScreenAttributesPtr attribs,
-                                     int *errorScreen);
-
-extern int dmxConfigureDesktop(DMXDesktopAttributesPtr attribs);
-
-/* dmxUpdateScreenResources exposed for dmxCreateWindow in dmxwindow.c */
-extern void dmxUpdateScreenResources(ScreenPtr pScreen,
-                                     int x, int y, int w, int h);
-
-extern int dmxAttachScreen(int idx, DMXScreenAttributesPtr attr);
-extern int dmxDetachScreen(int idx);
-#endif
diff --git a/hw/dmx/dmxfont.c b/hw/dmx/dmxfont.c
deleted file mode 100644
index addfa6a..0000000
--- a/hw/dmx/dmxfont.c
+++ /dev/null
@@ -1,573 +0,0 @@
-/*
- * Copyright 2001-2004 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Kevin E. Martin <kem@redhat.com>
- *
- */
-
-/** \file
- * This file provides support for fonts. */
-
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#define DMX_FONTPATH_DEBUG 0
-
-#include "dmx.h"
-#include "dmxsync.h"
-#include "dmxfont.h"
-#include "dmxlog.h"
-
-#include <X11/fonts/fontstruct.h>
-#include <X11/fonts/libxfont2.h>
-#include "dixfont.h"
-#include "dixstruct.h"
-
-static int (*dmxSaveProcVector[256]) (ClientPtr);
-static int dmxFontLastError;
-
-static int
-dmxFontErrorHandler(Display * dpy, XErrorEvent * ev)
-{
-    dmxFontLastError = ev->error_code;
-
-    return 0;
-}
-
-static char **
-dmxGetFontPath(int *npaths)
-{
-    char **fp;
-    unsigned char *c, *paths;
-    char *newfp;
-    int len, l, i;
-
-    GetFontPath(serverClient, npaths, &len, &paths);
-
-    newfp = malloc(*npaths + len);
-    c = (unsigned char *) newfp;
-    fp = xallocarray(*npaths, sizeof(*fp));
-
-    memmove(newfp, paths + 1, *npaths + len - 1);
-    l = *paths;
-    for (i = 0; i < *npaths; i++) {
-        fp[i] = (char *) c;
-        c += l;
-        l = *c;
-        *c++ = '\0';
-    }
-
-#if DMX_FONTPATH_DEBUG
-    for (i = 0; i < *npaths; i++)
-        dmxLog(dmxDebug, "FontPath[%d] = %s\n", i, fp[i]);
-#endif
-
-    return fp;
-}
-
-static void
-dmxFreeFontPath(char **fp)
-{
-    free(fp[0]);
-    free(fp);
-}
-
-static Bool
-dmxCheckFontPathElement(DMXScreenInfo * dmxScreen, char *fp)
-{
-    int (*oldErrorHandler) (Display *, XErrorEvent *);
-
-    if (!dmxScreen->beDisplay)
-        return TRUE;
-
-    dmxFontLastError = 0;
-    oldErrorHandler = XSetErrorHandler(dmxFontErrorHandler);
-    XSetFontPath(dmxScreen->beDisplay, &fp, 1);
-    dmxSync(dmxScreen, TRUE);   /* Must complete before removing handler */
-    XSetErrorHandler(oldErrorHandler);
-
-    return dmxFontLastError == 0;
-}
-
-static int
-dmxSetFontPath(DMXScreenInfo * dmxScreen)
-{
-    int (*oldErrorHandler) (Display *, XErrorEvent *);
-    char **fp;
-    int result = Success;
-    int npaths;
-
-    if (!dmxScreen->beDisplay)
-        return result;
-
-    fp = dmxGetFontPath(&npaths);
-    if (!fp)
-        return BadAlloc;
-
-    dmxFontLastError = 0;
-    oldErrorHandler = XSetErrorHandler(dmxFontErrorHandler);
-    XSetFontPath(dmxScreen->beDisplay, fp, npaths);
-    dmxSync(dmxScreen, TRUE);   /* Must complete before removing handler */
-    XSetErrorHandler(oldErrorHandler);
-
-    if (dmxFontLastError) {
-        result = dmxFontLastError;
-        /* We could set *error here to the offending path, but it is
-         * ignored, so we don't bother figuring out which path is bad.
-         * If we do add this support in the future, we'll need to add
-         * error to the function's argument list.
-         */
-    }
-
-    dmxFreeFontPath(fp);
-
-    return result;
-}
-
-static int
-dmxCheckFontPath(DMXScreenInfo * dmxScreen, int *error)
-{
-    char **oldFontPath;
-    int nOldPaths;
-    int result = Success;
-
-    if (!dmxScreen->beDisplay)
-        return result;
-
-    /* Save old font path */
-    oldFontPath = XGetFontPath(dmxScreen->beDisplay, &nOldPaths);
-
-    result = dmxSetFontPath(dmxScreen);
-
-    /* Restore old font path */
-    XSetFontPath(dmxScreen->beDisplay, oldFontPath, nOldPaths);
-    XFreeFontPath(oldFontPath);
-    dmxSync(dmxScreen, FALSE);
-
-    return result;
-}
-
-static int
-dmxProcSetFontPath(ClientPtr client)
-{
-    unsigned char *ptr;
-    unsigned long nbytes, total, n;
-    long nfonts;
-    int i, result;
-    unsigned char *oldFontPath, *tmpFontPath;
-    int nOldPaths;
-    int lenOldPaths;
-
-    REQUEST(xSetFontPathReq);
-
-    REQUEST_AT_LEAST_SIZE(xSetFontPathReq);
-
-    nbytes = (client->req_len << 2) - sizeof(xSetFontPathReq);
-    total = nbytes;
-    ptr = (unsigned char *) &stuff[1];
-    nfonts = stuff->nFonts;
-
-    while (--nfonts >= 0) {
-        if ((total == 0) || (total < (n = (*ptr + 1))))
-            return BadLength;
-        total -= n;
-        ptr += n;
-    }
-    if (total >= 4)
-        return BadLength;
-
-    GetFontPath(serverClient, &nOldPaths, &lenOldPaths, &tmpFontPath);
-    oldFontPath = malloc(nOldPaths + lenOldPaths);
-    memmove(oldFontPath, tmpFontPath, nOldPaths + lenOldPaths);
-
-    result = SetFontPath(client, stuff->nFonts, (unsigned char *) &stuff[1]);
-    if (!result) {
-        int error = 0;
-
-        for (i = 0; i < dmxNumScreens; i++)
-            if ((result = dmxCheckFontPath(&dmxScreens[i], &error)))
-                break;
-
-        if (result) {
-            /* Restore old fontpath in the DMX server */
-            SetFontPath(client, nOldPaths, oldFontPath);
-            client->errorValue = error;
-        }
-    }
-
-    free(oldFontPath);
-    return result;
-}
-
-/** Initialize font support.  In addition to the screen function call
- *  pointers, DMX also hooks in at the ProcVector[] level.  Here the old
- *  ProcVector function pointers are saved and the new ProcVector
- *  function pointers are initialized. */
-void
-dmxInitFonts(void)
-{
-    int i;
-
-    for (i = 0; i < 256; i++)
-        dmxSaveProcVector[i] = ProcVector[i];
-
-    ProcVector[X_SetFontPath] = dmxProcSetFontPath;
-}
-
-/** Reset font support by restoring the original ProcVector function
- *  pointers. */
-void
-dmxResetFonts(void)
-{
-    int i;
-
-    for (i = 0; i < 256; i++)
-        ProcVector[i] = dmxSaveProcVector[i];
-}
-
-/** Load the font, \a pFont, on the back-end server associated with \a
- *  pScreen.  When a font is loaded, the font path on back-end server is
- *  first initialized to that specified on the command line with the
- *  -fontpath options, and then the font is loaded. */
-Bool
-dmxBELoadFont(ScreenPtr pScreen, FontPtr pFont)
-{
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    dmxFontPrivPtr pFontPriv = FontGetPrivate(pFont, dmxFontPrivateIndex);
-    const char *name;
-    char **oldFontPath = NULL;
-    int nOldPaths;
-    Atom name_atom, value_atom;
-    int i;
-
-    /* Make sure we have a font private struct to work with */
-    if (!pFontPriv)
-        return FALSE;
-
-    /* Don't load a font over top of itself */
-    if (pFontPriv->font[pScreen->myNum]) {
-        return TRUE;            /* Already loaded font */
-    }
-
-    /* Save old font path */
-    oldFontPath = XGetFontPath(dmxScreen->beDisplay, &nOldPaths);
-
-    /* Set the font path for the font about to be loaded on the back-end */
-    if (dmxSetFontPath(dmxScreen)) {
-        char **fp;
-        int npaths;
-        Bool *goodfps;
-
-        /* This could fail only when first starting the X server and
-         * loading the default font.  If it fails here, then the default
-         * font path is invalid, no default font path will be set, the
-         * DMX server will fail to load the default font, and it will
-         * exit with an error unless we remove the offending font paths
-         * with the -ignorebadfontpaths command line option.
-         */
-
-        fp = dmxGetFontPath(&npaths);
-        if (!fp) {
-            dmxLog(dmxError, "No default font path set.\n");
-            dmxLog(dmxError,
-                   "Please see the Xdmx man page for information on how to\n");
-            dmxLog(dmxError,
-                   "initialize the DMX server's default font path.\n");
-            XFreeFontPath(oldFontPath);
-            return FALSE;
-        }
-
-        if (!dmxFontPath)
-            dmxLog(dmxWarning, "No default font path is set.\n");
-
-        goodfps = xallocarray(npaths, sizeof(*goodfps));
-
-        dmxLog(dmxError,
-               "The DMX server failed to set the following font paths on "
-               "screen #%d:\n", pScreen->myNum);
-
-        for (i = 0; i < npaths; i++)
-            if (!(goodfps[i] = dmxCheckFontPathElement(dmxScreen, fp[i])))
-                dmxLog(dmxError, "    %s\n", fp[i]);
-
-        if (dmxIgnoreBadFontPaths) {
-            char *newfp;
-            int newnpaths = 0;
-            int len = 0;
-            int j = 0;
-
-            dmxLog(dmxError,
-                   "These font paths will not be used because the "
-                   "\"-ignorebadfontpaths\"\n");
-            dmxLog(dmxError, "option is set.\n");
-
-            for (i = 0; i < npaths; i++)
-                if (goodfps[i]) {
-                    len += strlen(fp[i]) + 1;
-                    newnpaths++;
-                }
-
-            if (!newnpaths) {
-                /* No valid font paths were found */
-                dmxLog(dmxError,
-                       "After removing the font paths above, no valid font "
-                       "paths were\n");
-                dmxLog(dmxError,
-                       "available.  Please check that the font paths set on "
-                       "the command\n");
-                dmxLog(dmxError,
-                       "line or in the configuration file via the "
-                       "\"-fontpath\" option\n");
-                dmxLog(dmxError,
-                       "are valid on all back-end servers.  See the Xdmx man "
-                       "page for\n");
-                dmxLog(dmxError, "more information on font paths.\n");
-                dmxFreeFontPath(fp);
-                XFreeFontPath(oldFontPath);
-                free(goodfps);
-                return FALSE;
-            }
-
-            newfp = xallocarray(len, sizeof(*newfp));
-            for (i = 0; i < npaths; i++) {
-                if (goodfps[i]) {
-                    int n = strlen(fp[i]);
-
-                    newfp[j++] = n;
-                    strncpy(&newfp[j], fp[i], n);
-                    j += n;
-                }
-            }
-
-            if (SetFontPath(serverClient, newnpaths, (unsigned char *) newfp)) {
-                /* Note that this should never happen since all of the
-                 * FPEs were previously valid. */
-                dmxLog(dmxError, "Cannot reset the default font path.\n");
-            }
-        }
-        else if (dmxFontPath) {
-            dmxLog(dmxError,
-                   "Please remove these font paths from the command line "
-                   "or\n");
-            dmxLog(dmxError,
-                   "configuration file, or set the \"-ignorebadfontpaths\" "
-                   "option to\n");
-            dmxLog(dmxError,
-                   "ignore them.  For more information on these options, see "
-                   "the\n");
-            dmxLog(dmxError, "Xdmx man page.\n");
-        }
-        else {
-            dmxLog(dmxError,
-                   "Please specify the font paths that are available on all "
-                   "back-end\n");
-            dmxLog(dmxError,
-                   "servers with the \"-fontpath\" option, or use the "
-                   "\"-ignorebadfontpaths\"\n");
-            dmxLog(dmxError,
-                   "to ignore bad defaults.  For more information on "
-                   "these and other\n");
-            dmxLog(dmxError,
-                   "font-path-related options, see the Xdmx man page.\n");
-        }
-
-        free(goodfps);
-        if (!dmxIgnoreBadFontPaths ||
-            (dmxIgnoreBadFontPaths && dmxSetFontPath(dmxScreen))) {
-            /* We still have errors so return with error */
-            dmxFreeFontPath(fp);
-            XFreeFontPath(oldFontPath);
-            return FALSE;
-        }
-    }
-
-    /* Find requested font on back-end server */
-    name_atom = MakeAtom("FONT", 4, TRUE);
-    value_atom = 0L;
-
-    for (i = 0; i < pFont->info.nprops; i++) {
-        if ((Atom) pFont->info.props[i].name == name_atom) {
-            value_atom = pFont->info.props[i].value;
-            break;
-        }
-    }
-    if (!value_atom)
-        return FALSE;
-
-    name = NameForAtom(value_atom);
-    if (!name)
-        return FALSE;
-
-    pFontPriv->font[pScreen->myNum] =
-        XLoadQueryFont(dmxScreen->beDisplay, name);
-
-    /* Restore old font path */
-    XSetFontPath(dmxScreen->beDisplay, oldFontPath, nOldPaths);
-    XFreeFontPath(oldFontPath);
-    dmxSync(dmxScreen, FALSE);
-
-    if (!pFontPriv->font[pScreen->myNum])
-        return FALSE;
-
-    return TRUE;
-}
-
-/** Realize the font, \a pFont, on the back-end server associated with
- *  \a pScreen. */
-Bool
-dmxRealizeFont(ScreenPtr pScreen, FontPtr pFont)
-{
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    dmxFontPrivPtr pFontPriv;
-
-    if (!(pFontPriv = FontGetPrivate(pFont, dmxFontPrivateIndex))) {
-        xfont2_font_set_private(pFont, dmxFontPrivateIndex, NULL);
-        pFontPriv = malloc(sizeof(dmxFontPrivRec));
-        if (!pFontPriv)
-            return FALSE;
-        pFontPriv->font = NULL;
-        MAXSCREENSALLOC(pFontPriv->font);
-        if (!pFontPriv->font) {
-            free(pFontPriv);
-            return FALSE;
-        }
-        pFontPriv->refcnt = 0;
-    }
-
-    xfont2_font_set_private(pFont, dmxFontPrivateIndex, (void *) pFontPriv);
-
-    if (dmxScreen->beDisplay) {
-        if (!dmxBELoadFont(pScreen, pFont))
-            return FALSE;
-
-        pFontPriv->refcnt++;
-    }
-    else {
-        pFontPriv->font[pScreen->myNum] = NULL;
-    }
-
-    return TRUE;
-}
-
-/** Free \a pFont on the back-end associated with \a pScreen. */
-Bool
-dmxBEFreeFont(ScreenPtr pScreen, FontPtr pFont)
-{
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    dmxFontPrivPtr pFontPriv = FontGetPrivate(pFont, dmxFontPrivateIndex);
-
-    if (pFontPriv && pFontPriv->font[pScreen->myNum]) {
-        XFreeFont(dmxScreen->beDisplay, pFontPriv->font[pScreen->myNum]);
-        pFontPriv->font[pScreen->myNum] = NULL;
-        return TRUE;
-    }
-
-    return FALSE;
-}
-
-/** Unrealize the font, \a pFont, on the back-end server associated with
- *  \a pScreen. */
-Bool
-dmxUnrealizeFont(ScreenPtr pScreen, FontPtr pFont)
-{
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    dmxFontPrivPtr pFontPriv;
-
-    if ((pFontPriv = FontGetPrivate(pFont, dmxFontPrivateIndex))) {
-        /* In case the font failed to load properly */
-        if (!pFontPriv->refcnt) {
-            MAXSCREENSFREE(pFontPriv->font);
-            free(pFontPriv);
-            xfont2_font_set_private(pFont, dmxFontPrivateIndex, NULL);
-        }
-        else if (pFontPriv->font[pScreen->myNum]) {
-            if (dmxScreen->beDisplay)
-                dmxBEFreeFont(pScreen, pFont);
-
-            /* The code below is non-obvious, so here's an explanation...
-             *
-             * When creating the default GC, the server opens up the
-             * default font once for each screen, which in turn calls
-             * the RealizeFont function pointer once for each screen.
-             * During this process both dix's font refcnt and DMX's font
-             * refcnt are incremented once for each screen.
-             *
-             * Later, when shutting down the X server, dix shuts down
-             * each screen in reverse order.  During this shutdown
-             * procedure, each screen's default GC is freed and then
-             * that screen is closed by calling the CloseScreen function
-             * pointer.  screenInfo.numScreens is then decremented after
-             * closing each screen.  This procedure means that the dix's
-             * font refcnt for the font used by the default GC's is
-             * decremented once for each screen # greater than 0.
-             * However, since dix's refcnt for the default font is not
-             * yet 0 for each screen greater than 0, no call to the
-             * UnrealizeFont function pointer is made for those screens.
-             * Then, when screen 0 is being closed, dix's font refcnt
-             * for the default GC's font is finally 0 and the font is
-             * unrealized.  However, since screenInfo.numScreens has
-             * been decremented already down to 1, only one call to
-             * UnrealizeFont is made (for screen 0).  Thus, even though
-             * RealizeFont was called once for each screen,
-             * UnrealizeFont is only called for screen 0.
-             *
-             * This is a bug in dix.
-             *
-             * To avoid the memory leak of pFontPriv for each server
-             * generation, we can also free pFontPriv if the refcnt is
-             * not yet 0 but the # of screens is 1 -- i.e., the case
-             * described in the dix bug above.  This is only a temporary
-             * workaround until the bug in dix is solved.
-             *
-             * The other problem is that the font structure allocated by
-             * XLoadQueryFont() above is not freed for screens > 0.
-             * This problem cannot be worked around here since the back-
-             * end displays for screens > 0 have already been closed by
-             * the time this code is called from dix.
-             *
-             * When the bug in dix described above is fixed, then we can
-             * remove the "|| screenInfo.numScreens == 1" code below and
-             * the memory leaks will be eliminated.
-             */
-            if (--pFontPriv->refcnt == 0
-#if 1
-                /* Remove this code when the dix bug is fixed */
-                || screenInfo.numScreens == 1
-#endif
-                ) {
-                MAXSCREENSFREE(pFontPriv->font);
-                free(pFontPriv);
-                xfont2_font_set_private(pFont, dmxFontPrivateIndex, NULL);
-            }
-        }
-    }
-
-    return TRUE;
-}
diff --git a/hw/dmx/dmxfont.h b/hw/dmx/dmxfont.h
deleted file mode 100644
index 66c6633..0000000
--- a/hw/dmx/dmxfont.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright 2001-2004 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Kevin E. Martin <kem@redhat.com>
- *
- */
-
-/** \file
- * Interface for font-related functions.  \see dmxfont.c */
-
-#ifndef DMXFONT_H
-#define DMXFONT_H
-
-#include <X11/fonts/fontstruct.h>
-
-/** Font private area. */
-typedef struct _dmxFontPriv {
-    int refcnt;
-    XFontStruct **font;
-} dmxFontPrivRec, *dmxFontPrivPtr;
-
-extern void dmxInitFonts(void);
-extern void dmxResetFonts(void);
-
-extern Bool dmxRealizeFont(ScreenPtr pScreen, FontPtr pFont);
-extern Bool dmxUnrealizeFont(ScreenPtr pScreen, FontPtr pFont);
-
-extern Bool dmxBELoadFont(ScreenPtr pScreen, FontPtr pFont);
-extern Bool dmxBEFreeFont(ScreenPtr pScreen, FontPtr pFont);
-
-#endif                          /* DMXFONT_H */
diff --git a/hw/dmx/dmxgc.c b/hw/dmx/dmxgc.c
deleted file mode 100644
index c4789a6..0000000
--- a/hw/dmx/dmxgc.c
+++ /dev/null
@@ -1,446 +0,0 @@
-/*
- * Copyright 2001-2004 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Kevin E. Martin <kem@redhat.com>
- *
- */
-
-/** \file
- * This file provides support for GCs. */
-
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#include "dmx.h"
-#include "dmxsync.h"
-#include "dmxgc.h"
-#include "dmxgcops.h"
-#include "dmxpixmap.h"
-#include "dmxfont.h"
-
-#include "gcstruct.h"
-#include "pixmapstr.h"
-#include "migc.h"
-
-static const GCFuncs dmxGCFuncs = {
-    dmxValidateGC,
-    dmxChangeGC,
-    dmxCopyGC,
-    dmxDestroyGC,
-    dmxChangeClip,
-    dmxDestroyClip,
-    dmxCopyClip,
-};
-
-static const GCOps dmxGCOps = {
-    dmxFillSpans,
-    dmxSetSpans,
-    dmxPutImage,
-    dmxCopyArea,
-    dmxCopyPlane,
-    dmxPolyPoint,
-    dmxPolylines,
-    dmxPolySegment,
-    dmxPolyRectangle,
-    dmxPolyArc,
-    dmxFillPolygon,
-    dmxPolyFillRect,
-    dmxPolyFillArc,
-    dmxPolyText8,
-    dmxPolyText16,
-    dmxImageText8,
-    dmxImageText16,
-    dmxImageGlyphBlt,
-    dmxPolyGlyphBlt,
-    dmxPushPixels
-};
-
-/** Initialize the GC on \a pScreen */
-Bool
-dmxInitGC(ScreenPtr pScreen)
-{
-    if (!dixRegisterPrivateKey
-        (&dmxGCPrivateKeyRec, PRIVATE_GC, sizeof(dmxGCPrivRec)))
-        return FALSE;
-    return TRUE;
-}
-
-/** Create the GC on the back-end server. */
-void
-dmxBECreateGC(ScreenPtr pScreen, GCPtr pGC)
-{
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    dmxGCPrivPtr pGCPriv = DMX_GET_GC_PRIV(pGC);
-    int i;
-
-    for (i = 0; i < dmxScreen->beNumPixmapFormats; i++) {
-        if (pGC->depth == dmxScreen->bePixmapFormats[i].depth) {
-            unsigned long mask;
-            XGCValues gcvals;
-
-            mask = GCGraphicsExposures;
-            gcvals.graphics_exposures = FALSE;
-
-            /* Create GC in the back-end servers */
-            pGCPriv->gc = XCreateGC(dmxScreen->beDisplay,
-                                    dmxScreen->scrnDefDrawables[i],
-                                    mask, &gcvals);
-            break;
-        }
-    }
-}
-
-/** Create a graphics context on the back-end server associated /a pGC's
- *  screen. */
-Bool
-dmxCreateGC(GCPtr pGC)
-{
-    ScreenPtr pScreen = pGC->pScreen;
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    dmxGCPrivPtr pGCPriv = DMX_GET_GC_PRIV(pGC);
-    Bool ret;
-
-    DMX_UNWRAP(CreateGC, dmxScreen, pScreen);
-    if ((ret = pScreen->CreateGC(pGC))) {
-        /* Save the old funcs */
-        pGCPriv->funcs = pGC->funcs;
-        pGCPriv->ops = NULL;
-
-        pGC->funcs = &dmxGCFuncs;
-
-        if (dmxScreen->beDisplay) {
-            dmxBECreateGC(pScreen, pGC);
-        }
-        else {
-            pGCPriv->gc = NULL;
-        }
-
-        /* Check for "magic special case"
-         * 1. see CreateGC in dix/gc.c for more info
-         * 2. see dmxChangeGC for more info
-         */
-        pGCPriv->msc = (!pGC->tileIsPixel && !pGC->tile.pixmap);
-    }
-    DMX_WRAP(CreateGC, dmxCreateGC, dmxScreen, pScreen);
-
-    return ret;
-}
-
-/** Validate a graphics context, \a pGC, locally in the DMX server and
- *  recompute the composite clip, if necessary. */
-void
-dmxValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable)
-{
-    dmxGCPrivPtr pGCPriv = DMX_GET_GC_PRIV(pGC);
-
-    DMX_GC_FUNC_PROLOGUE(pGC);
-#if 0
-    pGC->funcs->ValidateGC(pGC, changes, pDrawable);
-#endif
-
-    if (pDrawable->type == DRAWABLE_WINDOW ||
-        pDrawable->type == DRAWABLE_PIXMAP) {
-        /* Save the old ops, since we're about to change the ops in the
-         * epilogue.
-         */
-        pGCPriv->ops = pGC->ops;
-    }
-    else {
-        pGCPriv->ops = NULL;
-    }
-
-    /* If the client clip is different or moved OR the subwindowMode has
-     * changed OR the window's clip has changed since the last
-     * validation, then we need to recompute the composite clip.
-     */
-    if ((changes & (GCClipXOrigin |
-                    GCClipYOrigin |
-                    GCClipMask |
-                    GCSubwindowMode)) ||
-        (pDrawable->serialNumber !=
-         (pGC->serialNumber & DRAWABLE_SERIAL_BITS))) {
-        miComputeCompositeClip(pGC, pDrawable);
-    }
-
-    DMX_GC_FUNC_EPILOGUE(pGC);
-}
-
-/** Set the values in the graphics context on the back-end server
- *  associated with \a pGC's screen. */
-void
-dmxChangeGC(GCPtr pGC, unsigned long mask)
-{
-    ScreenPtr pScreen = pGC->pScreen;
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    dmxGCPrivPtr pGCPriv = DMX_GET_GC_PRIV(pGC);
-    XGCValues v;
-
-    DMX_GC_FUNC_PROLOGUE(pGC);
-#if 0
-    pGC->funcs->ChangeGC(pGC, mask);
-#endif
-
-    /* Handle "magic special case" from CreateGC */
-    if (pGCPriv->msc) {
-        /* The "magic special case" is used to handle the case where a
-         * foreground pixel is set when the GC is created so that a
-         * "pseudo default-tile" can be created and used in case the
-         * fillstyle was set to FillTiled.  This specific case is tested
-         * in xtest (XCreateGC test #3).  What has happened in dix by
-         * the time it reaches here is (1) the pGC->tile.pixel has been
-         * set to pGC->fgPixel and pGC->tileIsPixel is set, (2) if a
-         * tile has also been set, then pGC->tileIsPixel is unset and
-         * pGC->tile.pixmap is initialized; else, the default tile is
-         * created and pGC->tileIsPixel is unset and pGC->tile.pixmap is
-         * initialized to the "pseudo default-tile".  In either case,
-         * pGC->tile.pixmap is set; however, in the "magic special case"
-         * the mask is not updated to allow us to detect that we should
-         * initialize the GCTile in the back-end server.  Thus, we catch
-         * this case in dmxCreateGC and add GCTile to the mask here.
-         * Are there any cases that I've missed?
-         */
-
-        /* Make sure that the tile.pixmap is set, just in case the user
-         * set GCTile in the mask but forgot to set vals.pixmap
-         */
-        if (pGC->tile.pixmap)
-            mask |= GCTile;
-
-        /* This only happens once when the GC is created */
-        pGCPriv->msc = FALSE;
-    }
-
-    /* Update back-end server's gc */
-    if (mask & GCFunction)
-        v.function = pGC->alu;
-    if (mask & GCPlaneMask)
-        v.plane_mask = pGC->planemask;
-    if (mask & GCForeground)
-        v.foreground = pGC->fgPixel;
-    if (mask & GCBackground)
-        v.background = pGC->bgPixel;
-    if (mask & GCLineWidth)
-        v.line_width = pGC->lineWidth;
-    if (mask & GCLineStyle)
-        v.line_style = pGC->lineStyle;
-    if (mask & GCCapStyle)
-        v.cap_style = pGC->capStyle;
-    if (mask & GCJoinStyle)
-        v.join_style = pGC->joinStyle;
-    if (mask & GCFillStyle)
-        v.fill_style = pGC->fillStyle;
-    if (mask & GCFillRule)
-        v.fill_rule = pGC->fillRule;
-    if (mask & GCTile) {
-        if (pGC->tileIsPixel) {
-            mask &= ~GCTile;
-        }
-        else {
-            dmxPixPrivPtr pPixPriv = DMX_GET_PIXMAP_PRIV(pGC->tile.pixmap);
-
-            v.tile = (Drawable) pPixPriv->pixmap;
-        }
-    }
-    if (mask & GCStipple) {
-        dmxPixPrivPtr pPixPriv = DMX_GET_PIXMAP_PRIV(pGC->stipple);
-
-        v.stipple = (Drawable) pPixPriv->pixmap;
-    }
-    if (mask & GCTileStipXOrigin)
-        v.ts_x_origin = pGC->patOrg.x;
-    if (mask & GCTileStipYOrigin)
-        v.ts_y_origin = pGC->patOrg.y;
-    if (mask & GCFont) {
-        if (dmxScreen->beDisplay) {
-            dmxFontPrivPtr pFontPriv;
-
-            pFontPriv = FontGetPrivate(pGC->font, dmxFontPrivateIndex);
-            v.font = pFontPriv->font[pScreen->myNum]->fid;
-        }
-        else {
-            mask &= ~GCFont;
-        }
-    }
-    if (mask & GCSubwindowMode)
-        v.subwindow_mode = pGC->subWindowMode;
-
-    /* Graphics exposures are not needed on the back-ends since they can
-       be generated on the front-end thereby saving bandwidth. */
-    if (mask & GCGraphicsExposures)
-        mask &= ~GCGraphicsExposures;
-
-    if (mask & GCClipXOrigin)
-        v.clip_x_origin = pGC->clipOrg.x;
-    if (mask & GCClipYOrigin)
-        v.clip_y_origin = pGC->clipOrg.y;
-    if (mask & GCClipMask)
-        mask &= ~GCClipMask;    /* See ChangeClip */
-    if (mask & GCDashOffset)
-        v.dash_offset = pGC->dashOffset;
-    if (mask & GCDashList) {
-        mask &= ~GCDashList;
-        if (dmxScreen->beDisplay)
-            XSetDashes(dmxScreen->beDisplay, pGCPriv->gc,
-                       pGC->dashOffset, (char *) pGC->dash, pGC->numInDashList);
-    }
-    if (mask & GCArcMode)
-        v.arc_mode = pGC->arcMode;
-
-    if (mask && dmxScreen->beDisplay) {
-        XChangeGC(dmxScreen->beDisplay, pGCPriv->gc, mask, &v);
-        dmxSync(dmxScreen, FALSE);
-    }
-
-    DMX_GC_FUNC_EPILOGUE(pGC);
-}
-
-/** Copy \a pGCSrc to \a pGCDst on the back-end server associated with
- *  \a pGCSrc's screen. */
-void
-dmxCopyGC(GCPtr pGCSrc, unsigned long changes, GCPtr pGCDst)
-{
-    ScreenPtr pScreen = pGCSrc->pScreen;
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    dmxGCPrivPtr pGCSrcPriv = DMX_GET_GC_PRIV(pGCSrc);
-    dmxGCPrivPtr pGCDstPriv = DMX_GET_GC_PRIV(pGCDst);
-
-    DMX_GC_FUNC_PROLOGUE(pGCDst);
-    pGCDst->funcs->CopyGC(pGCSrc, changes, pGCDst);
-
-    /* Copy the GC on the back-end server */
-    if (dmxScreen->beDisplay)
-        XCopyGC(dmxScreen->beDisplay, pGCSrcPriv->gc, changes, pGCDstPriv->gc);
-
-    DMX_GC_FUNC_EPILOGUE(pGCDst);
-}
-
-/** Free the \a pGC on the back-end server. */
-Bool
-dmxBEFreeGC(GCPtr pGC)
-{
-    ScreenPtr pScreen = pGC->pScreen;
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    dmxGCPrivPtr pGCPriv = DMX_GET_GC_PRIV(pGC);
-
-    if (pGCPriv->gc) {
-        XFreeGC(dmxScreen->beDisplay, pGCPriv->gc);
-        pGCPriv->gc = NULL;
-        return TRUE;
-    }
-
-    return FALSE;
-}
-
-/** Destroy the graphics context, \a pGC and free the corresponding GC
- *  on the back-end server. */
-void
-dmxDestroyGC(GCPtr pGC)
-{
-    ScreenPtr pScreen = pGC->pScreen;
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-
-    DMX_GC_FUNC_PROLOGUE(pGC);
-
-    /* Free the GC on the back-end server */
-    if (dmxScreen->beDisplay)
-        dmxBEFreeGC(pGC);
-
-    pGC->funcs->DestroyGC(pGC);
-    DMX_GC_FUNC_EPILOGUE(pGC);
-}
-
-/** Change the clip rects for a GC. */
-void
-dmxChangeClip(GCPtr pGC, int type, void *pvalue, int nrects)
-{
-    ScreenPtr pScreen = pGC->pScreen;
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    dmxGCPrivPtr pGCPriv = DMX_GET_GC_PRIV(pGC);
-    XRectangle *pRects;
-    BoxPtr pBox;
-    int i, nRects;
-
-    DMX_GC_FUNC_PROLOGUE(pGC);
-    pGC->funcs->ChangeClip(pGC, type, pvalue, nrects);
-
-    /* Set the client clip on the back-end server */
-    if (!pGC->clientClip) {
-        if (dmxScreen->beDisplay)
-            XSetClipMask(dmxScreen->beDisplay, pGCPriv->gc, None);
-    } else {
-        if (dmxScreen->beDisplay) {
-            nRects = RegionNumRects((RegionPtr) pGC->clientClip);
-            pRects = xallocarray(nRects, sizeof(*pRects));
-            pBox = RegionRects((RegionPtr) pGC->clientClip);
-
-            for (i = 0; i < nRects; i++) {
-                pRects[i].x = pBox[i].x1;
-                pRects[i].y = pBox[i].y1;
-                pRects[i].width = pBox[i].x2 - pBox[i].x1;
-                pRects[i].height = pBox[i].y2 - pBox[i].y1;
-            }
-
-            XSetClipRectangles(dmxScreen->beDisplay, pGCPriv->gc,
-                               pGC->clipOrg.x, pGC->clipOrg.y,
-                               pRects, nRects, Unsorted);
-
-            free(pRects);
-        }
-    }
-
-    DMX_GC_FUNC_EPILOGUE(pGC);
-}
-
-/** Destroy a GC's clip rects. */
-void
-dmxDestroyClip(GCPtr pGC)
-{
-    ScreenPtr pScreen = pGC->pScreen;
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    dmxGCPrivPtr pGCPriv = DMX_GET_GC_PRIV(pGC);
-
-    DMX_GC_FUNC_PROLOGUE(pGC);
-    pGC->funcs->DestroyClip(pGC);
-
-    /* Set the client clip on the back-end server to None */
-    if (dmxScreen->beDisplay)
-        XSetClipMask(dmxScreen->beDisplay, pGCPriv->gc, None);
-
-    DMX_GC_FUNC_EPILOGUE(pGC);
-}
-
-/** Copy a GC's clip rects. */
-void
-dmxCopyClip(GCPtr pGCDst, GCPtr pGCSrc)
-{
-    DMX_GC_FUNC_PROLOGUE(pGCDst);
-    pGCDst->funcs->CopyClip(pGCDst, pGCSrc);
-    DMX_GC_FUNC_EPILOGUE(pGCDst);
-}
diff --git a/hw/dmx/dmxgc.h b/hw/dmx/dmxgc.h
deleted file mode 100644
index c5c6b77..0000000
--- a/hw/dmx/dmxgc.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright 2001-2004 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Kevin E. Martin <kem@redhat.com>
- *
- */
-
-/** \file
- * Interface for GC support.  \see dmxgc.c */
-
-#ifndef DMXGC_H
-#define DMXGC_H
-
-#include "gcstruct.h"
-
-/** GC private area. */
-typedef struct _dmxGCPriv {
-    const GCOps *ops;
-    const GCFuncs *funcs;
-    XlibGC gc;
-    Bool msc;
-} dmxGCPrivRec, *dmxGCPrivPtr;
-
-extern Bool dmxInitGC(ScreenPtr pScreen);
-
-extern Bool dmxCreateGC(GCPtr pGC);
-extern void dmxValidateGC(GCPtr pGC, unsigned long changes,
-                          DrawablePtr pDrawable);
-extern void dmxChangeGC(GCPtr pGC, unsigned long mask);
-extern void dmxCopyGC(GCPtr pGCSrc, unsigned long changes, GCPtr pGCDst);
-extern void dmxDestroyGC(GCPtr pGC);
-extern void dmxChangeClip(GCPtr pGC, int type, void *pvalue, int nrects);
-extern void dmxDestroyClip(GCPtr pGC);
-extern void dmxCopyClip(GCPtr pGCDst, GCPtr pGCSrc);
-
-extern void dmxBECreateGC(ScreenPtr pScreen, GCPtr pGC);
-extern Bool dmxBEFreeGC(GCPtr pGC);
-
-/** Get private. */
-#define DMX_GET_GC_PRIV(_pGC)						\
-    (dmxGCPrivPtr)dixLookupPrivate(&(_pGC)->devPrivates, dmxGCPrivateKey)
-
-#define DMX_GC_FUNC_PROLOGUE(_pGC)					\
-do {									\
-    dmxGCPrivPtr _pGCPriv = DMX_GET_GC_PRIV(_pGC);			\
-    DMX_UNWRAP(funcs, _pGCPriv, (_pGC));				\
-    if (_pGCPriv->ops)							\
-	DMX_UNWRAP(ops, _pGCPriv, (_pGC));				\
-} while (0)
-
-#define DMX_GC_FUNC_EPILOGUE(_pGC)					\
-do {									\
-    dmxGCPrivPtr _pGCPriv = DMX_GET_GC_PRIV(_pGC);			\
-    DMX_WRAP(funcs, &dmxGCFuncs, _pGCPriv, (_pGC));			\
-    if (_pGCPriv->ops)							\
-	DMX_WRAP(ops, &dmxGCOps, _pGCPriv, (_pGC));			\
-} while (0)
-
-#endif                          /* DMXGC_H */
diff --git a/hw/dmx/dmxgcops.c b/hw/dmx/dmxgcops.c
deleted file mode 100644
index 0ebd69a..0000000
--- a/hw/dmx/dmxgcops.c
+++ /dev/null
@@ -1,637 +0,0 @@
-/*
- * Copyright 2001-2004 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Kevin E. Martin <kem@redhat.com>
- *
- */
-
-/** \file
- * This file provides support for GC operations. */
-
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#include "dmx.h"
-#include "dmxsync.h"
-#include "dmxgc.h"
-#include "dmxgcops.h"
-#include "dmxwindow.h"
-#include "dmxpixmap.h"
-
-#include "mi.h"
-#include "gcstruct.h"
-#include "pixmapstr.h"
-#include "dixfontstr.h"
-
-#ifdef PANORAMIX
-#include "panoramiXsrv.h"
-#endif
-
-#define DMX_GCOPS_SET_DRAWABLE(_pDraw, _draw)				\
-do {									\
-    if ((_pDraw)->type == DRAWABLE_WINDOW) {				\
-	dmxWinPrivPtr  pWinPriv =					\
-	    DMX_GET_WINDOW_PRIV((WindowPtr)(_pDraw));			\
-	(_draw) = (Drawable)pWinPriv->window;				\
-    } else {								\
-	dmxPixPrivPtr  pPixPriv =					\
-	    DMX_GET_PIXMAP_PRIV((PixmapPtr)(_pDraw));			\
-	(_draw) = (Drawable)pPixPriv->pixmap;				\
-    }									\
-} while (0)
-
-#define DMX_GCOPS_OFFSCREEN(_pDraw)					\
-    (!dmxScreens[(_pDraw)->pScreen->myNum].beDisplay ||			\
-     (dmxOffScreenOpt &&						\
-      (_pDraw)->type == DRAWABLE_WINDOW &&				\
-      (DMX_GET_WINDOW_PRIV((WindowPtr)(_pDraw))->offscreen ||		\
-       !DMX_GET_WINDOW_PRIV((WindowPtr)(_pDraw))->window)))
-
-/** Fill spans -- this function should never be called. */
-void
-dmxFillSpans(DrawablePtr pDrawable, GCPtr pGC,
-             int nInit, DDXPointPtr pptInit, int *pwidthInit, int fSorted)
-{
-    /* Error -- this should never happen! */
-}
-
-/** Set spans -- this function should never be called. */
-void
-dmxSetSpans(DrawablePtr pDrawable, GCPtr pGC,
-            char *psrc, DDXPointPtr ppt, int *pwidth, int nspans, int fSorted)
-{
-    /* Error -- this should never happen! */
-}
-
-/** Transfer \a pBits image to back-end server associated with \a
- *  pDrawable's screen.  If primitive subdivision optimization is
- *  enabled, then only transfer the sections of \a pBits that are
- *  visible (i.e., not-clipped) to the back-end server. */
-void
-dmxPutImage(DrawablePtr pDrawable, GCPtr pGC,
-            int depth, int x, int y, int w, int h,
-            int leftPad, int format, char *pBits)
-{
-    DMXScreenInfo *dmxScreen = &dmxScreens[pDrawable->pScreen->myNum];
-    dmxGCPrivPtr pGCPriv = DMX_GET_GC_PRIV(pGC);
-    XImage *img;
-
-    if (DMX_GCOPS_OFFSCREEN(pDrawable))
-        return;
-
-    img = XCreateImage(dmxScreen->beDisplay,
-                       dmxScreen->beVisuals[dmxScreen->beDefVisualIndex].visual,
-                       depth, format, leftPad, pBits, w, h,
-                       BitmapPad(dmxScreen->beDisplay),
-                       (format == ZPixmap) ?
-                       PixmapBytePad(w, depth) : BitmapBytePad(w + leftPad));
-
-    if (img) {
-        Drawable draw;
-
-        DMX_GCOPS_SET_DRAWABLE(pDrawable, draw);
-
-        if (dmxSubdividePrimitives && pGC->pCompositeClip) {
-            RegionPtr pSubImages;
-            RegionPtr pClip;
-            BoxRec box;
-            BoxPtr pBox;
-            int nBox;
-
-            box.x1 = x;
-            box.y1 = y;
-            box.x2 = x + w;
-            box.y2 = y + h;
-            pSubImages = RegionCreate(&box, 1);
-
-            pClip = RegionCreate(NullBox, 1);
-            RegionCopy(pClip, pGC->pCompositeClip);
-            RegionTranslate(pClip, -pDrawable->x, -pDrawable->y);
-            RegionIntersect(pSubImages, pSubImages, pClip);
-
-            nBox = RegionNumRects(pSubImages);
-            pBox = RegionRects(pSubImages);
-
-            while (nBox--) {
-                XPutImage(dmxScreen->beDisplay, draw, pGCPriv->gc, img,
-                          pBox->x1 - box.x1,
-                          pBox->y1 - box.y1,
-                          pBox->x1,
-                          pBox->y1, pBox->x2 - pBox->x1, pBox->y2 - pBox->y1);
-                pBox++;
-            }
-            RegionDestroy(pClip);
-            RegionDestroy(pSubImages);
-        }
-        else {
-            XPutImage(dmxScreen->beDisplay, draw, pGCPriv->gc,
-                      img, 0, 0, x, y, w, h);
-        }
-        XFree(img);             /* Use XFree instead of XDestroyImage
-                                 * because pBits is passed in from the
-                                 * caller. */
-
-        dmxSync(dmxScreen, FALSE);
-    }
-    else {
-        /* Error -- this should not happen! */
-    }
-}
-
-/** Copy area from \a pSrc drawable to \a pDst drawable on the back-end
- *  server associated with \a pSrc drawable's screen.  If the offscreen
- *  optimization is enabled, only copy when both \a pSrc and \a pDst are
- *  at least partially visible. */
-RegionPtr
-dmxCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
-            int srcx, int srcy, int w, int h, int dstx, int dsty)
-{
-    DMXScreenInfo *dmxScreen = &dmxScreens[pSrc->pScreen->myNum];
-    dmxGCPrivPtr pGCPriv = DMX_GET_GC_PRIV(pGC);
-    Drawable srcDraw, dstDraw;
-
-    if (DMX_GCOPS_OFFSCREEN(pSrc) || DMX_GCOPS_OFFSCREEN(pDst))
-        return miHandleExposures(pSrc, pDst, pGC, srcx, srcy, w, h,
-                                 dstx, dsty);
-
-    DMX_GCOPS_SET_DRAWABLE(pSrc, srcDraw);
-    DMX_GCOPS_SET_DRAWABLE(pDst, dstDraw);
-
-    XCopyArea(dmxScreen->beDisplay, srcDraw, dstDraw, pGCPriv->gc,
-              srcx, srcy, w, h, dstx, dsty);
-    dmxSync(dmxScreen, FALSE);
-
-    return miHandleExposures(pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty);
-}
-
-/** Copy plane number \a bitPlane from \a pSrc drawable to \a pDst
- *  drawable on the back-end server associated with \a pSrc drawable's
- *  screen.  If the offscreen optimization is enabled, only copy when
- *  both \a pSrc and \a pDst are at least partially visible. */
-RegionPtr
-dmxCopyPlane(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
-             int srcx, int srcy, int width, int height,
-             int dstx, int dsty, unsigned long bitPlane)
-{
-    DMXScreenInfo *dmxScreen = &dmxScreens[pSrc->pScreen->myNum];
-    dmxGCPrivPtr pGCPriv = DMX_GET_GC_PRIV(pGC);
-    Drawable srcDraw, dstDraw;
-
-    if (DMX_GCOPS_OFFSCREEN(pSrc) || DMX_GCOPS_OFFSCREEN(pDst))
-        return miHandleExposures(pSrc, pDst, pGC, srcx, srcy, width, height,
-                                 dstx, dsty);
-
-    DMX_GCOPS_SET_DRAWABLE(pSrc, srcDraw);
-    DMX_GCOPS_SET_DRAWABLE(pDst, dstDraw);
-
-    XCopyPlane(dmxScreen->beDisplay, srcDraw, dstDraw, pGCPriv->gc,
-               srcx, srcy, width, height, dstx, dsty, bitPlane);
-    dmxSync(dmxScreen, FALSE);
-
-    return miHandleExposures(pSrc, pDst, pGC, srcx, srcy, width, height,
-                             dstx, dsty);
-}
-
-/** Render list of points, \a pptInit in \a pDrawable on the back-end
- *  server associated with \a pDrawable's screen.  If the offscreen
- *  optimization is enabled, only draw when \a pDrawable is at least
- *  partially visible. */
-void
-dmxPolyPoint(DrawablePtr pDrawable, GCPtr pGC,
-             int mode, int npt, DDXPointPtr pptInit)
-{
-    DMXScreenInfo *dmxScreen = &dmxScreens[pDrawable->pScreen->myNum];
-    dmxGCPrivPtr pGCPriv = DMX_GET_GC_PRIV(pGC);
-    Drawable draw;
-
-    if (DMX_GCOPS_OFFSCREEN(pDrawable))
-        return;
-
-    DMX_GCOPS_SET_DRAWABLE(pDrawable, draw);
-
-    XDrawPoints(dmxScreen->beDisplay, draw, pGCPriv->gc,
-                (XPoint *) pptInit, npt, mode);
-    dmxSync(dmxScreen, FALSE);
-}
-
-/** Render list of connected lines, \a pptInit in \a pDrawable on the
- *  back-end server associated with \a pDrawable's screen.  If the
- *  offscreen optimization is enabled, only draw when \a pDrawable is at
- *  least partially visible. */
-void
-dmxPolylines(DrawablePtr pDrawable, GCPtr pGC,
-             int mode, int npt, DDXPointPtr pptInit)
-{
-    DMXScreenInfo *dmxScreen = &dmxScreens[pDrawable->pScreen->myNum];
-    dmxGCPrivPtr pGCPriv = DMX_GET_GC_PRIV(pGC);
-    Drawable draw;
-
-    if (DMX_GCOPS_OFFSCREEN(pDrawable))
-        return;
-
-    DMX_GCOPS_SET_DRAWABLE(pDrawable, draw);
-
-    XDrawLines(dmxScreen->beDisplay, draw, pGCPriv->gc,
-               (XPoint *) pptInit, npt, mode);
-    dmxSync(dmxScreen, FALSE);
-}
-
-/** Render list of disjoint segments, \a pSegs in \a pDrawable on the
- *  back-end server associated with \a pDrawable's screen.  If the
- *  offscreen optimization is enabled, only draw when \a pDrawable is at
- *  least partially visible. */
-void
-dmxPolySegment(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment * pSegs)
-{
-    DMXScreenInfo *dmxScreen = &dmxScreens[pDrawable->pScreen->myNum];
-    dmxGCPrivPtr pGCPriv = DMX_GET_GC_PRIV(pGC);
-    Drawable draw;
-
-    if (DMX_GCOPS_OFFSCREEN(pDrawable))
-        return;
-
-    DMX_GCOPS_SET_DRAWABLE(pDrawable, draw);
-
-    XDrawSegments(dmxScreen->beDisplay, draw, pGCPriv->gc,
-                  (XSegment *) pSegs, nseg);
-    dmxSync(dmxScreen, FALSE);
-}
-
-/** Render list of rectangle outlines, \a pRects in \a pDrawable on the
- *  back-end server associated with \a pDrawable's screen.  If the
- *  offscreen optimization is enabled, only draw when \a pDrawable is at
- *  least partially visible. */
-void
-dmxPolyRectangle(DrawablePtr pDrawable, GCPtr pGC,
-                 int nrects, xRectangle *pRects)
-{
-    DMXScreenInfo *dmxScreen = &dmxScreens[pDrawable->pScreen->myNum];
-    dmxGCPrivPtr pGCPriv = DMX_GET_GC_PRIV(pGC);
-    Drawable draw;
-
-    if (DMX_GCOPS_OFFSCREEN(pDrawable))
-        return;
-
-    DMX_GCOPS_SET_DRAWABLE(pDrawable, draw);
-
-    XDrawRectangles(dmxScreen->beDisplay, draw, pGCPriv->gc,
-                    (XRectangle *) pRects, nrects);
-
-    dmxSync(dmxScreen, FALSE);
-}
-
-/** Render list of arc outlines, \a parcs in \a pDrawable on the
- *  back-end server associated with \a pDrawable's screen.  If the
- *  offscreen optimization is enabled, only draw when \a pDrawable is at
- *  least partially visible. */
-void
-dmxPolyArc(DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc * parcs)
-{
-    DMXScreenInfo *dmxScreen = &dmxScreens[pDrawable->pScreen->myNum];
-    dmxGCPrivPtr pGCPriv = DMX_GET_GC_PRIV(pGC);
-    Drawable draw;
-
-    if (DMX_GCOPS_OFFSCREEN(pDrawable))
-        return;
-
-    DMX_GCOPS_SET_DRAWABLE(pDrawable, draw);
-
-    XDrawArcs(dmxScreen->beDisplay, draw, pGCPriv->gc, (XArc *) parcs, narcs);
-    dmxSync(dmxScreen, FALSE);
-}
-
-/** Render a filled polygons in \a pDrawable on the back-end server
- *  associated with \a pDrawable's screen.  If the offscreen
- *  optimization is enabled, only draw when \a pDrawable is at least
- *  partially visible. */
-void
-dmxFillPolygon(DrawablePtr pDrawable, GCPtr pGC,
-               int shape, int mode, int count, DDXPointPtr pPts)
-{
-    DMXScreenInfo *dmxScreen = &dmxScreens[pDrawable->pScreen->myNum];
-    dmxGCPrivPtr pGCPriv = DMX_GET_GC_PRIV(pGC);
-    Drawable draw;
-
-    if (DMX_GCOPS_OFFSCREEN(pDrawable))
-        return;
-
-    DMX_GCOPS_SET_DRAWABLE(pDrawable, draw);
-
-    XFillPolygon(dmxScreen->beDisplay, draw, pGCPriv->gc,
-                 (XPoint *) pPts, count, shape, mode);
-    dmxSync(dmxScreen, FALSE);
-}
-
-/** Render list of filled rectangles, \a prectInit in \a pDrawable on
- *  the back-end server associated with \a pDrawable's screen.  If the
- *  offscreen optimization is enabled, only draw when \a pDrawable is at
- *  least partially visible. */
-void
-dmxPolyFillRect(DrawablePtr pDrawable, GCPtr pGC,
-                int nrectFill, xRectangle *prectInit)
-{
-    DMXScreenInfo *dmxScreen = &dmxScreens[pDrawable->pScreen->myNum];
-    dmxGCPrivPtr pGCPriv = DMX_GET_GC_PRIV(pGC);
-    Drawable draw;
-
-    if (DMX_GCOPS_OFFSCREEN(pDrawable))
-        return;
-
-    DMX_GCOPS_SET_DRAWABLE(pDrawable, draw);
-
-    XFillRectangles(dmxScreen->beDisplay, draw, pGCPriv->gc,
-                    (XRectangle *) prectInit, nrectFill);
-    dmxSync(dmxScreen, FALSE);
-}
-
-/** Render list of filled arcs, \a parcs in \a pDrawable on the back-end
- *  server associated with \a pDrawable's screen.  If the offscreen
- *  optimization is enabled, only draw when \a pDrawable is at least
- *  partially visible. */
-void
-dmxPolyFillArc(DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc * parcs)
-{
-    DMXScreenInfo *dmxScreen = &dmxScreens[pDrawable->pScreen->myNum];
-    dmxGCPrivPtr pGCPriv = DMX_GET_GC_PRIV(pGC);
-    Drawable draw;
-
-    if (DMX_GCOPS_OFFSCREEN(pDrawable))
-        return;
-
-    DMX_GCOPS_SET_DRAWABLE(pDrawable, draw);
-
-    XFillArcs(dmxScreen->beDisplay, draw, pGCPriv->gc, (XArc *) parcs, narcs);
-    dmxSync(dmxScreen, FALSE);
-}
-
-/** Render string of 8-bit \a chars (foreground only) in \a pDrawable on
- *  the back-end server associated with \a pDrawable's screen.  If the
- *  offscreen optimization is enabled, only draw when \a pDrawable is at
- *  least partially visible. */
-int
-dmxPolyText8(DrawablePtr pDrawable, GCPtr pGC,
-             int x, int y, int count, char *chars)
-{
-    DMXScreenInfo *dmxScreen = &dmxScreens[pDrawable->pScreen->myNum];
-    dmxGCPrivPtr pGCPriv = DMX_GET_GC_PRIV(pGC);
-    unsigned long n, i;
-    int w;
-    CharInfoPtr charinfo[255];
-    Drawable draw;
-
-    GetGlyphs(pGC->font, (unsigned long) count, (unsigned char *) chars,
-              Linear8Bit, &n, charinfo);
-
-    /* Calculate text width */
-    w = 0;
-    for (i = 0; i < n; i++)
-        w += charinfo[i]->metrics.characterWidth;
-
-    if (n != 0 && !DMX_GCOPS_OFFSCREEN(pDrawable)) {
-        DMX_GCOPS_SET_DRAWABLE(pDrawable, draw);
-
-        XDrawString(dmxScreen->beDisplay, draw, pGCPriv->gc,
-                    x, y, chars, count);
-        dmxSync(dmxScreen, FALSE);
-    }
-
-    return x + w;
-}
-
-/** Render string of 16-bit \a chars (foreground only) in \a pDrawable
- *  on the back-end server associated with \a pDrawable's screen.  If
- *  the offscreen optimization is enabled, only draw when \a pDrawable
- *  is at least partially visible. */
-int
-dmxPolyText16(DrawablePtr pDrawable, GCPtr pGC,
-              int x, int y, int count, unsigned short *chars)
-{
-    DMXScreenInfo *dmxScreen = &dmxScreens[pDrawable->pScreen->myNum];
-    dmxGCPrivPtr pGCPriv = DMX_GET_GC_PRIV(pGC);
-    unsigned long n, i;
-    int w;
-    CharInfoPtr charinfo[255];
-    Drawable draw;
-
-    GetGlyphs(pGC->font, (unsigned long) count, (unsigned char *) chars,
-              (FONTLASTROW(pGC->font) == 0) ? Linear16Bit : TwoD16Bit,
-              &n, charinfo);
-
-    /* Calculate text width */
-    w = 0;
-    for (i = 0; i < n; i++)
-        w += charinfo[i]->metrics.characterWidth;
-
-    if (n != 0 && !DMX_GCOPS_OFFSCREEN(pDrawable)) {
-        DMX_GCOPS_SET_DRAWABLE(pDrawable, draw);
-
-        XDrawString16(dmxScreen->beDisplay, draw, pGCPriv->gc,
-                      x, y, (XChar2b *) chars, count);
-        dmxSync(dmxScreen, FALSE);
-    }
-
-    return x + w;
-}
-
-/** Render string of 8-bit \a chars (both foreground and background) in
- *  \a pDrawable on the back-end server associated with \a pDrawable's
- *  screen.  If the offscreen optimization is enabled, only draw when \a
- *  pDrawable is at least partially visible. */
-void
-dmxImageText8(DrawablePtr pDrawable, GCPtr pGC,
-              int x, int y, int count, char *chars)
-{
-    DMXScreenInfo *dmxScreen = &dmxScreens[pDrawable->pScreen->myNum];
-    dmxGCPrivPtr pGCPriv = DMX_GET_GC_PRIV(pGC);
-    Drawable draw;
-
-    if (DMX_GCOPS_OFFSCREEN(pDrawable))
-        return;
-
-    DMX_GCOPS_SET_DRAWABLE(pDrawable, draw);
-
-    XDrawImageString(dmxScreen->beDisplay, draw, pGCPriv->gc,
-                     x, y, chars, count);
-    dmxSync(dmxScreen, FALSE);
-}
-
-/** Render string of 16-bit \a chars (both foreground and background) in
- *  \a pDrawable on the back-end server associated with \a pDrawable's
- *  screen.  If the offscreen optimization is enabled, only draw when \a
- *  pDrawable is at least partially visible. */
-void
-dmxImageText16(DrawablePtr pDrawable, GCPtr pGC,
-               int x, int y, int count, unsigned short *chars)
-{
-    DMXScreenInfo *dmxScreen = &dmxScreens[pDrawable->pScreen->myNum];
-    dmxGCPrivPtr pGCPriv = DMX_GET_GC_PRIV(pGC);
-    Drawable draw;
-
-    if (DMX_GCOPS_OFFSCREEN(pDrawable))
-        return;
-
-    DMX_GCOPS_SET_DRAWABLE(pDrawable, draw);
-
-    XDrawImageString16(dmxScreen->beDisplay, draw, pGCPriv->gc,
-                       x, y, (XChar2b *) chars, count);
-    dmxSync(dmxScreen, FALSE);
-}
-
-/** Image Glyph Blt -- this function should never be called. */
-void
-dmxImageGlyphBlt(DrawablePtr pDrawable, GCPtr pGC,
-                 int x, int y, unsigned int nglyph,
-                 CharInfoPtr * ppci, void *pglyphBase)
-{
-    /* Error -- this should never happen! */
-}
-
-/** Poly Glyph Blt -- this function should never be called. */
-void
-dmxPolyGlyphBlt(DrawablePtr pDrawable, GCPtr pGC,
-                int x, int y, unsigned int nglyph,
-                CharInfoPtr * ppci, void *pglyphBase)
-{
-    /* Error -- this should never happen! */
-}
-
-/** Push Pixels -- this function should never be called. */
-void
-dmxPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr pDst,
-              int w, int h, int x, int y)
-{
-    /* Error -- this should never happen! */
-}
-
-/**********************************************************************
- * Miscellaneous drawing commands
- */
-
-/** When Xinerama is active, the client pixmaps are always obtained from
- * screen 0.  When screen 0 is detached, the pixmaps must be obtained
- * from any other screen that is not detached.  Usually, this is screen
- * 1. */
-static DMXScreenInfo *
-dmxFindAlternatePixmap(DrawablePtr pDrawable, XID *draw)
-{
-#ifdef PANORAMIX
-    PanoramiXRes *pXinPix;
-    int i;
-    DMXScreenInfo *dmxScreen;
-
-    if (noPanoramiXExtension)
-        return NULL;
-    if (pDrawable->type != DRAWABLE_PIXMAP)
-        return NULL;
-
-    if (Success != dixLookupResourceByType((void **) &pXinPix,
-                                           pDrawable->id, XRT_PIXMAP,
-                                           NullClient, DixUnknownAccess))
-        return NULL;
-
-    FOR_NSCREENS_FORWARD_SKIP(i) {
-        dmxScreen = &dmxScreens[i];
-        if (dmxScreen->beDisplay) {
-            PixmapPtr pSrc;
-            dmxPixPrivPtr pSrcPriv;
-
-            dixLookupResourceByType((void **) &pSrc, pXinPix->info[i].id,
-                                    RT_PIXMAP, NullClient, DixUnknownAccess);
-            pSrcPriv = DMX_GET_PIXMAP_PRIV(pSrc);
-            if (pSrcPriv->pixmap) {
-                *draw = pSrcPriv->pixmap;
-                return dmxScreen;
-            }
-        }
-    }
-#endif
-    return NULL;
-}
-
-/** Get an image from the back-end server associated with \a pDrawable's
- *  screen.  If \a pDrawable is a window, it must be viewable to get an
- *  image from it.  If it is not viewable, then get the image from the
- *  first ancestor of \a pDrawable that is viewable.  If no viewable
- *  ancestor is found, then simply return without getting an image.  */
-void
-dmxGetImage(DrawablePtr pDrawable, int sx, int sy, int w, int h,
-            unsigned int format, unsigned long planeMask, char *pdstLine)
-{
-    DMXScreenInfo *dmxScreen = &dmxScreens[pDrawable->pScreen->myNum];
-    XImage *img;
-    Drawable draw;
-
-    /* Cannot get image from unviewable window */
-    if (pDrawable->type == DRAWABLE_WINDOW) {
-        WindowPtr pWindow = (WindowPtr) pDrawable;
-
-        if (!pWindow->viewable) {
-            while (!pWindow->viewable && pWindow->parent) {
-                sx += pWindow->origin.x - wBorderWidth(pWindow);
-                sx += pWindow->origin.y - wBorderWidth(pWindow);
-                pWindow = pWindow->parent;
-            }
-            if (!pWindow->viewable) {
-                return;
-            }
-        }
-        DMX_GCOPS_SET_DRAWABLE(&pWindow->drawable, draw);
-        if (DMX_GCOPS_OFFSCREEN(&pWindow->drawable))
-            return;
-    }
-    else {
-        DMX_GCOPS_SET_DRAWABLE(pDrawable, draw);
-        if (DMX_GCOPS_OFFSCREEN(pDrawable)) {
-            /* Try to find the pixmap on a non-detached Xinerama screen */
-            dmxScreen = dmxFindAlternatePixmap(pDrawable, &draw);
-            if (!dmxScreen)
-                return;
-        }
-    }
-
-    img = XGetImage(dmxScreen->beDisplay, draw,
-                    sx, sy, w, h, planeMask, format);
-    if (img) {
-        int len = img->bytes_per_line * img->height;
-
-        memmove(pdstLine, img->data, len);
-        XDestroyImage(img);
-    }
-
-    dmxSync(dmxScreen, FALSE);
-}
-
-/** Get Spans -- this function should never be called. */
-void
-dmxGetSpans(DrawablePtr pDrawable, int wMax,
-            DDXPointPtr ppt, int *pwidth, int nspans, char *pdstStart)
-{
-    /* Error -- this should never happen! */
-}
diff --git a/hw/dmx/dmxgcops.h b/hw/dmx/dmxgcops.h
deleted file mode 100644
index 529b6ff..0000000
--- a/hw/dmx/dmxgcops.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright 2001,2002 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Kevin E. Martin <kem@redhat.com>
- *
- */
-
-/** \file
- * Interface for gcops support.  \see dmxgcops.c */
-
-#ifndef DMXGCOPS_H
-#define DMXGCOPS_H
-
-extern void dmxFillSpans(DrawablePtr pDrawable, GCPtr pGC,
-                         int nInit, DDXPointPtr pptInit, int *pwidthInit,
-                         int fSorted);
-extern void dmxSetSpans(DrawablePtr pDrawable, GCPtr pGC,
-                        char *psrc, DDXPointPtr ppt, int *pwidth, int nspans,
-                        int fSorted);
-extern void dmxPutImage(DrawablePtr pDrawable, GCPtr pGC,
-                        int depth, int x, int y, int w, int h,
-                        int leftPad, int format, char *pBits);
-extern RegionPtr dmxCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
-                             int srcx, int srcy, int w, int h,
-                             int dstx, int dsty);
-extern RegionPtr dmxCopyPlane(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
-                              int srcx, int srcy, int width, int height,
-                              int dstx, int dsty, unsigned long bitPlane);
-extern void dmxPolyPoint(DrawablePtr pDrawable, GCPtr pGC,
-                         int mode, int npt, DDXPointPtr pptInit);
-extern void dmxPolylines(DrawablePtr pDrawable, GCPtr pGC,
-                         int mode, int npt, DDXPointPtr pptInit);
-extern void dmxPolySegment(DrawablePtr pDrawable, GCPtr pGC,
-                           int nseg, xSegment * pSegs);
-extern void dmxPolyRectangle(DrawablePtr pDrawable, GCPtr pGC,
-                             int nrects, xRectangle *pRects);
-extern void dmxPolyArc(DrawablePtr pDrawable, GCPtr pGC,
-                       int narcs, xArc * parcs);
-extern void dmxFillPolygon(DrawablePtr pDrawable, GCPtr pGC,
-                           int shape, int mode, int count, DDXPointPtr pPts);
-extern void dmxPolyFillRect(DrawablePtr pDrawable, GCPtr pGC,
-                            int nrectFill, xRectangle *prectInit);
-extern void dmxPolyFillArc(DrawablePtr pDrawable, GCPtr pGC,
-                           int narcs, xArc * parcs);
-extern int dmxPolyText8(DrawablePtr pDrawable, GCPtr pGC,
-                        int x, int y, int count, char *chars);
-extern int dmxPolyText16(DrawablePtr pDrawable, GCPtr pGC,
-                         int x, int y, int count, unsigned short *chars);
-extern void dmxImageText8(DrawablePtr pDrawable, GCPtr pGC,
-                          int x, int y, int count, char *chars);
-extern void dmxImageText16(DrawablePtr pDrawable, GCPtr pGC,
-                           int x, int y, int count, unsigned short *chars);
-extern void dmxImageGlyphBlt(DrawablePtr pDrawable, GCPtr pGC,
-                             int x, int y, unsigned int nglyph,
-                             CharInfoPtr * ppci, void *pglyphBase);
-extern void dmxPolyGlyphBlt(DrawablePtr pDrawable, GCPtr pGC,
-                            int x, int y, unsigned int nglyph,
-                            CharInfoPtr * ppci, void *pglyphBase);
-extern void dmxPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr pDst,
-                          int w, int h, int x, int y);
-
-extern void dmxGetImage(DrawablePtr pDrawable, int sx, int sy, int w, int h,
-                        unsigned int format, unsigned long planeMask,
-                        char *pdstLine);
-extern void dmxGetSpans(DrawablePtr pDrawable, int wMax,
-                        DDXPointPtr ppt, int *pwidth, int nspans,
-                        char *pdstStart);
-
-#endif                          /* DMXGCOPS_H */
diff --git a/hw/dmx/dmxinit.c b/hw/dmx/dmxinit.c
deleted file mode 100644
index ddb3310..0000000
--- a/hw/dmx/dmxinit.c
+++ /dev/null
@@ -1,1061 +0,0 @@
-/*
- * Copyright 2001-2004 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Kevin E. Martin <kem@redhat.com>
- *   David H. Dawes <dawes@xfree86.org>
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-/** \file
- * Provide expected functions for initialization from the ddx layer and
- * global variables for the DMX server. */
-
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#include "dmx.h"
-#include "dmxinit.h"
-#include "dmxsync.h"
-#include "dmxlog.h"
-#include "dmxinput.h"
-#include "dmxscrinit.h"
-#include "dmxcursor.h"
-#include "dmxfont.h"
-#include "config/dmxconfig.h"
-#include "dmxcb.h"
-#include "dmxprop.h"
-#include "dmxstat.h"
-#include "dmxpict.h"
-
-#include <X11/Xos.h>            /* For gettimeofday */
-#include <X11/Xmu/SysUtil.h>    /* For XmuGetHostname */
-#include "dixstruct.h"
-#ifdef PANORAMIX
-#include "panoramiXsrv.h"
-#endif
-
-#include <signal.h>             /* For SIGQUIT */
-
-#ifdef GLXEXT
-#include <GL/glx.h>
-#include <GL/glxint.h>
-#include "dmx_glxvisuals.h"
-#include "glx_extinit.h"
-#include <X11/extensions/Xext.h>
-#include <X11/extensions/extutil.h>
-#endif                          /* GLXEXT */
-
-#include <X11/extensions/dmxproto.h>
-
-/* Global variables available to all Xserver/hw/dmx routines. */
-int dmxNumScreens;
-DMXScreenInfo *dmxScreens;
-
-int dmxNumInputs;
-DMXInputInfo *dmxInputs;
-
-XErrorEvent dmxLastErrorEvent;
-Bool dmxErrorOccurred = FALSE;
-
-char *dmxFontPath = NULL;
-
-Bool dmxOffScreenOpt = TRUE;
-
-Bool dmxSubdividePrimitives = TRUE;
-
-Bool dmxLazyWindowCreation = TRUE;
-
-Bool dmxUseXKB = TRUE;
-
-int dmxDepth = 0;
-
-#ifndef GLXEXT
-static Bool dmxGLXProxy = FALSE;
-#else
-Bool dmxGLXProxy = TRUE;
-
-Bool dmxGLXSwapGroupSupport = TRUE;
-
-Bool dmxGLXSyncSwap = FALSE;
-
-Bool dmxGLXFinishSwap = FALSE;
-#endif
-
-RESTYPE RRProviderType = 0;
-
-Bool dmxIgnoreBadFontPaths = FALSE;
-
-Bool dmxAddRemoveScreens = FALSE;
-
-/* dmxErrorHandler catches errors that occur when calling one of the
- * back-end servers.  Some of this code is based on _XPrintDefaultError
- * in xc/lib/X11/XlibInt.c */
-static int
-dmxErrorHandler(Display * dpy, XErrorEvent * ev)
-{
-#define DMX_ERROR_BUF_SIZE 256
-    /* RATS: these buffers are only used in
-     * length-limited calls. */
-    char buf[DMX_ERROR_BUF_SIZE];
-    char request[DMX_ERROR_BUF_SIZE];
-    _XExtension *ext = NULL;
-
-    dmxErrorOccurred = TRUE;
-    dmxLastErrorEvent = *ev;
-
-    XGetErrorText(dpy, ev->error_code, buf, sizeof(buf));
-    dmxLog(dmxWarning, "dmxErrorHandler: %s\n", buf);
-
-    /* Find major opcode name */
-    if (ev->request_code < 128) {
-        snprintf(request, sizeof(request), "%d", ev->request_code);
-        XGetErrorDatabaseText(dpy, "XRequest", request, "", buf, sizeof(buf));
-    }
-    else {
-        for (ext = dpy->ext_procs;
-             ext && ext->codes.major_opcode != ev->request_code;
-             ext = ext->next);
-        if (ext)
-            strlcpy(buf, ext->name, sizeof(buf));
-        else
-            buf[0] = '\0';
-    }
-    dmxLog(dmxWarning, "                 Major opcode: %d (%s)\n",
-           ev->request_code, buf);
-
-    /* Find minor opcode name */
-    if (ev->request_code >= 128 && ext) {
-        snprintf(request, sizeof(request), "%d", ev->request_code);
-        snprintf(request, sizeof(request), "%s.%d", ext->name, ev->minor_code);
-        XGetErrorDatabaseText(dpy, "XRequest", request, "", buf, sizeof(buf));
-        dmxLog(dmxWarning, "                 Minor opcode: %d (%s)\n",
-               ev->minor_code, buf);
-    }
-
-    /* Provide value information */
-    switch (ev->error_code) {
-    case BadValue:
-        dmxLog(dmxWarning, "                 Value:        0x%x\n",
-               (unsigned int) ev->resourceid);
-        break;
-    case BadAtom:
-        dmxLog(dmxWarning, "                 AtomID:       0x%x\n",
-               (unsigned int) ev->resourceid);
-        break;
-    default:
-        dmxLog(dmxWarning, "                 ResourceID:   0x%x\n",
-               (unsigned int) ev->resourceid);
-        break;
-    }
-
-    /* Provide serial number information */
-    dmxLog(dmxWarning, "                 Failed serial number:  %d\n",
-           (unsigned int) ev->serial);
-    dmxLog(dmxWarning, "                 Current serial number: %d\n",
-           (unsigned int) dpy->request);
-    return 0;
-}
-
-#ifdef GLXEXT
-static int
-dmxNOPErrorHandler(Display * dpy, XErrorEvent * ev)
-{
-    return 0;
-}
-#endif
-
-Bool
-dmxOpenDisplay(DMXScreenInfo * dmxScreen)
-{
-    if (!(dmxScreen->beDisplay = XOpenDisplay(dmxScreen->name)))
-        return FALSE;
-
-    dmxPropertyDisplay(dmxScreen);
-    return TRUE;
-}
-
-void
-dmxSetErrorHandler(DMXScreenInfo * dmxScreen)
-{
-    XSetErrorHandler(dmxErrorHandler);
-}
-
-static void
-dmxPrintScreenInfo(DMXScreenInfo * dmxScreen)
-{
-    XWindowAttributes attribs;
-    int ndepths = 0, *depths = NULL;
-    int i;
-    Display *dpy = dmxScreen->beDisplay;
-    Screen *s = DefaultScreenOfDisplay(dpy);
-    int scr = DefaultScreen(dpy);
-
-    XGetWindowAttributes(dpy, DefaultRootWindow(dpy), &attribs);
-    if (!(depths = XListDepths(dpy, scr, &ndepths)))
-        ndepths = 0;
-
-    dmxLogOutput(dmxScreen, "Name of display: %s\n", DisplayString(dpy));
-    dmxLogOutput(dmxScreen, "Version number:  %d.%d\n",
-                 ProtocolVersion(dpy), ProtocolRevision(dpy));
-    dmxLogOutput(dmxScreen, "Vendor string:   %s\n", ServerVendor(dpy));
-    if (!strstr(ServerVendor(dpy), "XFree86")) {
-        dmxLogOutput(dmxScreen, "Vendor release:  %d\n", VendorRelease(dpy));
-    }
-    else {
-        /* This code based on xdpyinfo.c */
-        int v = VendorRelease(dpy);
-        int major = -1, minor = -1, patch = -1, subpatch = -1;
-
-        if (v < 336)
-            major = v / 100, minor = (v / 10) % 10, patch = v % 10;
-        else if (v < 3900) {
-            major = v / 1000;
-            minor = (v / 100) % 10;
-            if (((v / 10) % 10) || (v % 10)) {
-                patch = (v / 10) % 10;
-                if (v % 10)
-                    subpatch = v % 10;
-            }
-        }
-        else if (v < 40000000) {
-            major = v / 1000;
-            minor = (v / 10) % 10;
-            if (v % 10)
-                patch = v % 10;
-        }
-        else {
-            major = v / 10000000;
-            minor = (v / 100000) % 100;
-            patch = (v / 1000) % 100;
-            if (v % 1000)
-                subpatch = v % 1000;
-        }
-        dmxLogOutput(dmxScreen, "Vendor release:  %d (XFree86 version: %d.%d",
-                     v, major, minor);
-        if (patch > 0)
-            dmxLogOutputCont(dmxScreen, ".%d", patch);
-        if (subpatch > 0)
-            dmxLogOutputCont(dmxScreen, ".%d", subpatch);
-        dmxLogOutputCont(dmxScreen, ")\n");
-    }
-
-    dmxLogOutput(dmxScreen, "Dimensions:      %dx%d pixels\n",
-                 attribs.width, attribs.height);
-    dmxLogOutput(dmxScreen, "%d depths on screen %d: ", ndepths, scr);
-    for (i = 0; i < ndepths; i++)
-        dmxLogOutputCont(dmxScreen, "%c%d", i ? ',' : ' ', depths[i]);
-    dmxLogOutputCont(dmxScreen, "\n");
-    dmxLogOutput(dmxScreen, "Depth of root window:  %d plane%s (%d)\n",
-                 attribs.depth, attribs.depth == 1 ? "" : "s",
-                 DisplayPlanes(dpy, scr));
-    dmxLogOutput(dmxScreen, "Number of colormaps:   %d min, %d max\n",
-                 MinCmapsOfScreen(s), MaxCmapsOfScreen(s));
-    dmxLogOutput(dmxScreen, "Options: backing-store %s, save-unders %s\n",
-                 (DoesBackingStore(s) == NotUseful) ? "no" :
-                 ((DoesBackingStore(s) == Always) ? "yes" : "when mapped"),
-                 DoesSaveUnders(s) ? "yes" : "no");
-    dmxLogOutput(dmxScreen, "Window Manager running: %s\n",
-                 (dmxScreen->WMRunningOnBE) ? "yes" : "no");
-
-    if (dmxScreen->WMRunningOnBE) {
-        dmxLogOutputWarning(dmxScreen,
-                            "Window manager running "
-                            "-- colormaps not supported\n");
-    }
-    XFree(depths);
-}
-
-void
-dmxGetScreenAttribs(DMXScreenInfo * dmxScreen)
-{
-    XWindowAttributes attribs;
-    Display *dpy = dmxScreen->beDisplay;
-
-#ifdef GLXEXT
-    int dummy;
-#endif
-
-    XGetWindowAttributes(dpy, DefaultRootWindow(dpy), &attribs);
-
-    dmxScreen->beWidth = attribs.width;
-    dmxScreen->beHeight = attribs.height;
-
-    /* Fill in missing geometry information */
-    if (dmxScreen->scrnXSign < 0) {
-        if (dmxScreen->scrnWidth) {
-            dmxScreen->scrnX = (attribs.width - dmxScreen->scrnWidth
-                                - dmxScreen->scrnX);
-        }
-        else {
-            dmxScreen->scrnWidth = attribs.width - dmxScreen->scrnX;
-            dmxScreen->scrnX = 0;
-        }
-    }
-    if (dmxScreen->scrnYSign < 0) {
-        if (dmxScreen->scrnHeight) {
-            dmxScreen->scrnY = (attribs.height - dmxScreen->scrnHeight
-                                - dmxScreen->scrnY);
-        }
-        else {
-            dmxScreen->scrnHeight = attribs.height - dmxScreen->scrnY;
-            dmxScreen->scrnY = 0;
-        }
-    }
-    if (!dmxScreen->scrnWidth)
-        dmxScreen->scrnWidth = attribs.width - dmxScreen->scrnX;
-    if (!dmxScreen->scrnHeight)
-        dmxScreen->scrnHeight = attribs.height - dmxScreen->scrnY;
-
-    if (!dmxScreen->rootWidth)
-        dmxScreen->rootWidth = dmxScreen->scrnWidth;
-    if (!dmxScreen->rootHeight)
-        dmxScreen->rootHeight = dmxScreen->scrnHeight;
-    if (dmxScreen->rootWidth + dmxScreen->rootX > dmxScreen->scrnWidth)
-        dmxScreen->rootWidth = dmxScreen->scrnWidth - dmxScreen->rootX;
-    if (dmxScreen->rootHeight + dmxScreen->rootY > dmxScreen->scrnHeight)
-        dmxScreen->rootHeight = dmxScreen->scrnHeight - dmxScreen->rootY;
-
-    /* FIXME: Get these from the back-end server */
-    dmxScreen->beXDPI = 75;
-    dmxScreen->beYDPI = 75;
-
-    dmxScreen->beDepth = attribs.depth; /* FIXME: verify that this
-                                         * works always.  In
-                                         * particular, this will work
-                                         * well for depth=16, will fail
-                                         * because of colormap issues
-                                         * at depth 8.  More work needs
-                                         * to be done here. */
-
-    if (dmxScreen->beDepth <= 8)
-        dmxScreen->beBPP = 8;
-    else if (dmxScreen->beDepth <= 16)
-        dmxScreen->beBPP = 16;
-    else
-        dmxScreen->beBPP = 32;
-
-#ifdef GLXEXT
-    /* get the majorOpcode for the back-end GLX extension */
-    XQueryExtension(dpy, "GLX", &dmxScreen->glxMajorOpcode,
-                    &dummy, &dmxScreen->glxErrorBase);
-#endif
-
-    dmxPrintScreenInfo(dmxScreen);
-    dmxLogOutput(dmxScreen, "%dx%d+%d+%d on %dx%d at depth=%d, bpp=%d\n",
-                 dmxScreen->scrnWidth, dmxScreen->scrnHeight,
-                 dmxScreen->scrnX, dmxScreen->scrnY,
-                 dmxScreen->beWidth, dmxScreen->beHeight,
-                 dmxScreen->beDepth, dmxScreen->beBPP);
-    if (dmxScreen->beDepth == 8)
-        dmxLogOutputWarning(dmxScreen,
-                            "Support for depth == 8 is not complete\n");
-}
-
-Bool
-dmxGetVisualInfo(DMXScreenInfo * dmxScreen)
-{
-    int i;
-    XVisualInfo visinfo;
-
-    visinfo.screen = DefaultScreen(dmxScreen->beDisplay);
-    dmxScreen->beVisuals = XGetVisualInfo(dmxScreen->beDisplay,
-                                          VisualScreenMask,
-                                          &visinfo, &dmxScreen->beNumVisuals);
-
-    dmxScreen->beDefVisualIndex = -1;
-
-    if (defaultColorVisualClass >= 0 || dmxDepth > 0) {
-        for (i = 0; i < dmxScreen->beNumVisuals; i++)
-            if (defaultColorVisualClass >= 0) {
-                if (dmxScreen->beVisuals[i].class == defaultColorVisualClass) {
-                    if (dmxDepth > 0) {
-                        if (dmxScreen->beVisuals[i].depth == dmxDepth) {
-                            dmxScreen->beDefVisualIndex = i;
-                            break;
-                        }
-                    }
-                    else {
-                        dmxScreen->beDefVisualIndex = i;
-                        break;
-                    }
-                }
-            }
-            else if (dmxScreen->beVisuals[i].depth == dmxDepth) {
-                dmxScreen->beDefVisualIndex = i;
-                break;
-            }
-    }
-    else {
-        visinfo.visualid =
-            XVisualIDFromVisual(DefaultVisual(dmxScreen->beDisplay,
-                                              visinfo.screen));
-
-        for (i = 0; i < dmxScreen->beNumVisuals; i++)
-            if (visinfo.visualid == dmxScreen->beVisuals[i].visualid) {
-                dmxScreen->beDefVisualIndex = i;
-                break;
-            }
-    }
-
-    for (i = 0; i < dmxScreen->beNumVisuals; i++)
-        dmxLogVisual(dmxScreen, &dmxScreen->beVisuals[i],
-                     (i == dmxScreen->beDefVisualIndex));
-
-    return dmxScreen->beDefVisualIndex >= 0;
-}
-
-void
-dmxGetColormaps(DMXScreenInfo * dmxScreen)
-{
-    int i;
-
-    dmxScreen->beNumDefColormaps = dmxScreen->beNumVisuals;
-    dmxScreen->beDefColormaps = xallocarray(dmxScreen->beNumDefColormaps,
-                                       sizeof(*dmxScreen->beDefColormaps));
-
-    for (i = 0; i < dmxScreen->beNumDefColormaps; i++)
-        dmxScreen->beDefColormaps[i] =
-            XCreateColormap(dmxScreen->beDisplay,
-                            DefaultRootWindow(dmxScreen->beDisplay),
-                            dmxScreen->beVisuals[i].visual, AllocNone);
-
-    dmxScreen->beBlackPixel = BlackPixel(dmxScreen->beDisplay,
-                                         DefaultScreen(dmxScreen->beDisplay));
-    dmxScreen->beWhitePixel = WhitePixel(dmxScreen->beDisplay,
-                                         DefaultScreen(dmxScreen->beDisplay));
-}
-
-void
-dmxGetPixmapFormats(DMXScreenInfo * dmxScreen)
-{
-    dmxScreen->beDepths =
-        XListDepths(dmxScreen->beDisplay, DefaultScreen(dmxScreen->beDisplay),
-                    &dmxScreen->beNumDepths);
-
-    dmxScreen->bePixmapFormats =
-        XListPixmapFormats(dmxScreen->beDisplay,
-                           &dmxScreen->beNumPixmapFormats);
-}
-
-static Bool
-dmxSetPixmapFormats(ScreenInfo * pScreenInfo, DMXScreenInfo * dmxScreen)
-{
-    XPixmapFormatValues *bePixmapFormat;
-    PixmapFormatRec *format;
-    int i, j;
-
-    pScreenInfo->imageByteOrder = ImageByteOrder(dmxScreen->beDisplay);
-    pScreenInfo->bitmapScanlineUnit = BitmapUnit(dmxScreen->beDisplay);
-    pScreenInfo->bitmapScanlinePad = BitmapPad(dmxScreen->beDisplay);
-    pScreenInfo->bitmapBitOrder = BitmapBitOrder(dmxScreen->beDisplay);
-
-    pScreenInfo->numPixmapFormats = 0;
-    for (i = 0; i < dmxScreen->beNumPixmapFormats; i++) {
-        bePixmapFormat = &dmxScreen->bePixmapFormats[i];
-        for (j = 0; j < dmxScreen->beNumDepths; j++)
-            if ((bePixmapFormat->depth == 1) ||
-                (bePixmapFormat->depth == dmxScreen->beDepths[j])) {
-                format = &pScreenInfo->formats[pScreenInfo->numPixmapFormats];
-
-                format->depth = bePixmapFormat->depth;
-                format->bitsPerPixel = bePixmapFormat->bits_per_pixel;
-                format->scanlinePad = bePixmapFormat->scanline_pad;
-
-                pScreenInfo->numPixmapFormats++;
-                break;
-            }
-    }
-
-    return TRUE;
-}
-
-void
-dmxCheckForWM(DMXScreenInfo * dmxScreen)
-{
-    Status status;
-    XWindowAttributes xwa;
-
-    status = XGetWindowAttributes(dmxScreen->beDisplay,
-                                  DefaultRootWindow(dmxScreen->beDisplay),
-                                  &xwa);
-    dmxScreen->WMRunningOnBE =
-        (status &&
-         ((xwa.all_event_masks & SubstructureRedirectMask) ||
-          (xwa.all_event_masks & SubstructureNotifyMask)));
-}
-
-/** Initialize the display and collect relevant information about the
- *  display properties */
-static void
-dmxDisplayInit(DMXScreenInfo * dmxScreen)
-{
-    if (!dmxOpenDisplay(dmxScreen))
-        dmxLog(dmxFatal,
-               "dmxOpenDisplay: Unable to open display %s\n", dmxScreen->name);
-
-    dmxSetErrorHandler(dmxScreen);
-    dmxCheckForWM(dmxScreen);
-    dmxGetScreenAttribs(dmxScreen);
-
-    if (!dmxGetVisualInfo(dmxScreen))
-        dmxLog(dmxFatal, "dmxGetVisualInfo: No matching visuals found\n");
-
-    dmxGetColormaps(dmxScreen);
-    dmxGetPixmapFormats(dmxScreen);
-}
-
-static void dmxAddExtensions(void)
-{
-    const ExtensionModule dmxExtensions[] = {
-        { DMXExtensionInit, DMX_EXTENSION_NAME, NULL },
-    };
-
-    LoadExtensionList(dmxExtensions, ARRAY_SIZE(dmxExtensions), TRUE);
-}
-
-/** This routine is called in Xserver/dix/main.c from \a main(). */
-void
-InitOutput(ScreenInfo * pScreenInfo, int argc, char *argv[])
-{
-    int i;
-    static unsigned long dmxGeneration = 0;
-
-    if (dmxGeneration != serverGeneration) {
-        int vendrel = VENDOR_RELEASE;
-        int major, minor, year, month, day;
-
-        dmxGeneration = serverGeneration;
-
-        major = vendrel / 100000000;
-        vendrel -= major * 100000000;
-        minor = vendrel / 1000000;
-        vendrel -= minor * 1000000;
-        year = vendrel / 10000;
-        vendrel -= year * 10000;
-        month = vendrel / 100;
-        vendrel -= month * 100;
-        day = vendrel;
-
-        /* Add other epoch tests here */
-        if (major > 0 && minor > 0)
-            year += 2000;
-
-        dmxLog(dmxInfo, "Generation:         %lu\n", dmxGeneration);
-        dmxLog(dmxInfo, "DMX version:        %d.%d.%02d%02d%02d (%s)\n",
-               major, minor, year, month, day, VENDOR_STRING);
-
-        SetVendorRelease(VENDOR_RELEASE);
-        SetVendorString(VENDOR_STRING);
-
-        dmxLog(dmxInfo, "MAXSCREENS:         %d\n", MAXSCREENS);
-
-        for (i = 0; i < dmxNumScreens; i++) {
-            if (dmxScreens[i].beDisplay)
-                dmxLog(dmxWarning, "Display \"%s\" still open\n",
-                       dmxScreens[i].name);
-            dmxStatFree(dmxScreens[i].stat);
-            dmxScreens[i].stat = NULL;
-        }
-        for (i = 0; i < dmxNumInputs; i++)
-            dmxInputFree(&dmxInputs[i]);
-        free(dmxScreens);
-        free(dmxInputs);
-        dmxScreens = NULL;
-        dmxInputs = NULL;
-        dmxNumScreens = 0;
-        dmxNumInputs = 0;
-    }
-
-    /* Make sure that the command-line arguments are sane. */
-    if (dmxAddRemoveScreens && dmxGLXProxy) {
-        /* Currently it is not possible to support GLX and Render
-         * extensions with dynamic screen addition/removal due to the
-         * state that each extension keeps, which cannot be restored. */
-        dmxLog(dmxWarning,
-               "GLX Proxy and Render extensions do not yet support dynamic\n");
-        dmxLog(dmxWarning,
-               "screen addition and removal.  Please specify -noglxproxy\n");
-        dmxLog(dmxWarning,
-               "and -norender on the command line or in the configuration\n");
-        dmxLog(dmxWarning,
-               "file to disable these two extensions if you wish to use\n");
-        dmxLog(dmxWarning,
-               "the dynamic addition and removal of screens support.\n");
-        dmxLog(dmxFatal,
-               "Dynamic screen addition/removal error (see above).\n");
-    }
-
-    /* ddxProcessArgument has been called at this point, but any data
-     * from the configuration file has not been applied.  Do so, and be
-     * sure we have at least one back-end display. */
-    dmxConfigConfigure();
-    if (!dmxNumScreens)
-        dmxLog(dmxFatal, "InitOutput: no back-end displays found\n");
-    if (!dmxNumInputs)
-        dmxLog(dmxInfo, "InitOutput: no inputs found\n");
-
-    /* Disable lazy window creation optimization if offscreen
-     * optimization is disabled */
-    if (!dmxOffScreenOpt && dmxLazyWindowCreation) {
-        dmxLog(dmxInfo,
-               "InitOutput: Disabling lazy window creation optimization\n");
-        dmxLog(dmxInfo,
-               "            since it requires the offscreen optimization\n");
-        dmxLog(dmxInfo, "            to function properly.\n");
-        dmxLazyWindowCreation = FALSE;
-    }
-
-    /* Open each display and gather information about it. */
-    for (i = 0; i < dmxNumScreens; i++)
-        dmxDisplayInit(&dmxScreens[i]);
-
-#ifdef PANORAMIX
-    /* Register a Xinerama callback which will run from within
-     * PanoramiXCreateConnectionBlock.  We can use the callback to
-     * determine if Xinerama is loaded and to check the visuals
-     * determined by PanoramiXConsolidate. */
-    XineramaRegisterConnectionBlockCallback(dmxConnectionBlockCallback);
-#endif
-
-    /* Since we only have a single screen thus far, we only need to set
-       the pixmap formats to match that screen.  FIXME: this isn't true. */
-    if (!dmxSetPixmapFormats(pScreenInfo, &dmxScreens[0]))
-        return;
-
-    /* Might want to install a signal handler to allow cleaning up after
-     * unexpected signals.  The DIX/OS layer already handles SIGINT and
-     * SIGTERM, so everything is OK for expected signals. --DD
-     *
-     * SIGHUP, SIGINT, and SIGTERM are trapped in os/connection.c
-     * SIGQUIT is another common signal that is sent from the keyboard.
-     * Trap it here, to ensure that the keyboard modifier map and other
-     * state for the input devices are restored. (This makes the
-     * behavior of SIGQUIT somewhat unexpected, since it will be the
-     * same as the behavior of SIGINT.  However, leaving the modifier
-     * map of the input devices empty is even more unexpected.) --RF
-     */
-    OsSignal(SIGQUIT, GiveUp);
-
-#ifdef GLXEXT
-    /* Check if GLX extension exists on all back-end servers */
-    for (i = 0; i < dmxNumScreens; i++)
-        noGlxExtension |= (dmxScreens[i].glxMajorOpcode == 0);
-#endif
-
-    if (serverGeneration == 1)
-        dmxAddExtensions();
-
-    /* Tell dix layer about the backend displays */
-    for (i = 0; i < dmxNumScreens; i++) {
-
-#ifdef GLXEXT
-        if (!noGlxExtension) {
-            /*
-             * Builds GLX configurations from the list of visuals
-             * supported by the back-end server, and give that
-             * configuration list to the glx layer - so that he will
-             * build the visuals accordingly.
-             */
-
-            DMXScreenInfo *dmxScreen = &dmxScreens[i];
-            __GLXvisualConfig *configs = NULL;
-            dmxGlxVisualPrivate **configprivs = NULL;
-            int nconfigs = 0;
-            int (*oldErrorHandler) (Display *, XErrorEvent *);
-
-            /* Catch errors if when using an older GLX w/o FBconfigs */
-            oldErrorHandler = XSetErrorHandler(dmxNOPErrorHandler);
-
-            /* Get FBConfigs of the back-end server */
-            dmxScreen->fbconfigs = GetGLXFBConfigs(dmxScreen->beDisplay,
-                                                   dmxScreen->glxMajorOpcode,
-                                                   &dmxScreen->numFBConfigs);
-
-            XSetErrorHandler(oldErrorHandler);
-
-            dmxScreen->glxVisuals =
-                GetGLXVisualConfigs(dmxScreen->beDisplay,
-                                    DefaultScreen(dmxScreen->beDisplay),
-                                    &dmxScreen->numGlxVisuals);
-
-            if (dmxScreen->fbconfigs) {
-                configs =
-                    GetGLXVisualConfigsFromFBConfigs(dmxScreen->fbconfigs,
-                                                     dmxScreen->numFBConfigs,
-                                                     dmxScreen->beVisuals,
-                                                     dmxScreen->beNumVisuals,
-                                                     dmxScreen->glxVisuals,
-                                                     dmxScreen->numGlxVisuals,
-                                                     &nconfigs);
-            }
-            else {
-                configs = dmxScreen->glxVisuals;
-                nconfigs = dmxScreen->numGlxVisuals;
-            }
-
-            configprivs = xallocarray(nconfigs, sizeof(dmxGlxVisualPrivate *));
-
-            if (configs != NULL && configprivs != NULL) {
-                int j;
-
-                /* Initialize our private info for each visual
-                 * (currently only x_visual_depth and x_visual_class)
-                 */
-                for (j = 0; j < nconfigs; j++) {
-
-                    configprivs[j] = (dmxGlxVisualPrivate *)
-                        malloc(sizeof(dmxGlxVisualPrivate));
-                    configprivs[j]->x_visual_depth = 0;
-                    configprivs[j]->x_visual_class = 0;
-
-                    /* Find the visual depth */
-                    if (configs[j].vid > 0) {
-                        int k;
-
-                        for (k = 0; k < dmxScreen->beNumVisuals; k++) {
-                            if (dmxScreen->beVisuals[k].visualid ==
-                                configs[j].vid) {
-                                configprivs[j]->x_visual_depth =
-                                    dmxScreen->beVisuals[k].depth;
-                                configprivs[j]->x_visual_class =
-                                    dmxScreen->beVisuals[k].class;
-                                break;
-                            }
-                        }
-                    }
-                }
-
-                XFlush(dmxScreen->beDisplay);
-            }
-        }
-#endif                          /* GLXEXT */
-
-        AddScreen(dmxScreenInit, argc, argv);
-    }
-
-    /* Compute origin information. */
-    dmxInitOrigins();
-
-    /* Compute overlap information. */
-    dmxInitOverlap();
-
-    /* Make sure there is a global width/height available */
-    dmxComputeWidthHeight(DMX_NO_RECOMPUTE_BOUNDING_BOX);
-
-    /* FIXME: The following is temporarily placed here.  When the DMX
-     * extension is available, it will be move there.
-     */
-    dmxInitFonts();
-
-    /* Initialize the render extension */
-    if (!noRenderExtension)
-        dmxInitRender();
-
-    /* Initialized things that need timer hooks */
-    dmxStatInit();
-    dmxSyncInit();              /* Calls RegisterBlockAndWakeupHandlers */
-}
-
-/* RATS: Assuming the fp string (which comes from the command-line argv
-         vector) is NULL-terminated, the buffer is large enough for the
-         strcpy. */
-static void
-dmxSetDefaultFontPath(const char *fp)
-{
-    if (dmxFontPath) {
-        int fplen = strlen(fp) + 1;
-        int len = strlen(dmxFontPath);
-
-        dmxFontPath = realloc(dmxFontPath, len + fplen + 1);
-        dmxFontPath[len] = ',';
-        strncpy(&dmxFontPath[len + 1], fp, fplen);
-    }
-    else {
-        dmxFontPath = strdup(fp);
-    }
-
-    defaultFontPath = dmxFontPath;
-}
-
-/** This function is called in Xserver/os/utils.c from \a AbortServer().
- * We must ensure that backend and console state is restored in the
- * event the server shutdown wasn't clean. */
-void
-AbortDDX(enum ExitCode error)
-{
-    int i;
-
-    for (i = 0; i < dmxNumScreens; i++) {
-        DMXScreenInfo *dmxScreen = &dmxScreens[i];
-
-        if (dmxScreen->beDisplay)
-            XCloseDisplay(dmxScreen->beDisplay);
-        dmxScreen->beDisplay = NULL;
-    }
-}
-
-#ifdef DDXBEFORERESET
-void
-ddxBeforeReset(void)
-{
-}
-#endif
-
-/** This function is called in Xserver/dix/main.c from \a main() when
- * dispatchException & DE_TERMINATE (which is the only way to exit the
- * main loop without an interruption. */
-void
-ddxGiveUp(enum ExitCode error)
-{
-    AbortDDX(error);
-}
-
-#if INPUTTHREAD
-/** This function is called in Xserver/os/inputthread.c when starting
-    the input thread. */
-void
-ddxInputThreadInit(void)
-{
-}
-#endif
-
-/** This function is called in Xserver/os/osinit.c from \a OsInit(). */
-void
-OsVendorInit(void)
-{
-}
-
-/** This function is called in Xserver/os/utils.c from \a FatalError()
- * and \a VFatalError().  (Note that setting the function pointer \a
- * OsVendorVErrorFProc will cause \a VErrorF() (which is called by the
- * two routines mentioned here, as well as by others) to use the
- * referenced routine instead of \a vfprintf().) */
-void
-OsVendorFatalError(const char *f, va_list args)
-{
-}
-
-/** Process our command line arguments. */
-int
-ddxProcessArgument(int argc, char *argv[], int i)
-{
-    int retval = 0;
-
-    if (!strcmp(argv[i], "-display")) {
-        if (++i < argc)
-            dmxConfigStoreDisplay(argv[i]);
-        retval = 2;
-    }
-    else if (!strcmp(argv[i], "-inputfrom") || !strcmp(argv[i], "-input")) {
-        if (++i < argc)
-            dmxConfigStoreInput(argv[i]);
-        retval = 2;
-    }
-    else if (!strcmp(argv[i], "-xinputfrom") || !strcmp(argv[i], "-xinput")) {
-        if (++i < argc)
-            dmxConfigStoreXInput(argv[i]);
-        retval = 2;
-    }
-    else if (!strcmp(argv[i], "-noshadowfb")) {
-        retval = 1;
-    }
-    else if (!strcmp(argv[i], "-nomulticursor")) {
-        dmxCursorNoMulti();
-        retval = 1;
-    }
-    else if (!strcmp(argv[i], "-shadowfb")) {
-        retval = 1;
-    }
-    else if (!strcmp(argv[i], "-configfile")) {
-        if (++i < argc)
-            dmxConfigStoreFile(argv[i]);
-        retval = 2;
-    }
-    else if (!strcmp(argv[i], "-config")) {
-        if (++i < argc)
-            dmxConfigStoreConfig(argv[i]);
-        retval = 2;
-    }
-    else if (!strcmp(argv[i], "-fontpath")) {
-        if (++i < argc)
-            dmxSetDefaultFontPath(argv[i]);
-        retval = 2;
-    }
-    else if (!strcmp(argv[i], "-stat")) {
-        if ((i += 2) < argc)
-            dmxStatActivate(argv[i - 1], argv[i]);
-        retval = 3;
-    }
-    else if (!strcmp(argv[i], "-syncbatch")) {
-        if (++i < argc)
-            dmxSyncActivate(argv[i]);
-        retval = 2;
-    }
-    else if (!strcmp(argv[i], "-nooffscreenopt")) {
-        dmxOffScreenOpt = FALSE;
-        retval = 1;
-    }
-    else if (!strcmp(argv[i], "-nosubdivprims")) {
-        dmxSubdividePrimitives = FALSE;
-        retval = 1;
-    }
-    else if (!strcmp(argv[i], "-nowindowopt")) {
-        dmxLazyWindowCreation = FALSE;
-        retval = 1;
-    }
-    else if (!strcmp(argv[i], "-noxkb")) {
-        dmxUseXKB = FALSE;
-        retval = 1;
-    }
-    else if (!strcmp(argv[i], "-depth")) {
-        if (++i < argc)
-            dmxDepth = atoi(argv[i]);
-        retval = 2;
-    }
-    else if (!strcmp(argv[i], "-norender")) {
-        noRenderExtension = TRUE;
-        retval = 1;
-#ifdef GLXEXT
-    }
-    else if (!strcmp(argv[i], "-noglxproxy")) {
-        dmxGLXProxy = FALSE;
-        retval = 1;
-    }
-    else if (!strcmp(argv[i], "-noglxswapgroup")) {
-        dmxGLXSwapGroupSupport = FALSE;
-        retval = 1;
-    }
-    else if (!strcmp(argv[i], "-glxsyncswap")) {
-        dmxGLXSyncSwap = TRUE;
-        retval = 1;
-    }
-    else if (!strcmp(argv[i], "-glxfinishswap")) {
-        dmxGLXFinishSwap = TRUE;
-        retval = 1;
-#endif
-    }
-    else if (!strcmp(argv[i], "-ignorebadfontpaths")) {
-        dmxIgnoreBadFontPaths = TRUE;
-        retval = 1;
-    }
-    else if (!strcmp(argv[i], "-addremovescreens")) {
-        dmxAddRemoveScreens = TRUE;
-        retval = 1;
-    }
-    else if (!strcmp(argv[i], "-param")) {
-        if ((i += 2) < argc) {
-            if (!strcasecmp(argv[i - 1], "xkbrules"))
-                dmxConfigSetXkbRules(argv[i]);
-            else if (!strcasecmp(argv[i - 1], "xkbmodel"))
-                dmxConfigSetXkbModel(argv[i]);
-            else if (!strcasecmp(argv[i - 1], "xkblayout"))
-                dmxConfigSetXkbLayout(argv[i]);
-            else if (!strcasecmp(argv[i - 1], "xkbvariant"))
-                dmxConfigSetXkbVariant(argv[i]);
-            else if (!strcasecmp(argv[i - 1], "xkboptions"))
-                dmxConfigSetXkbOptions(argv[i]);
-            else
-                dmxLog(dmxWarning,
-                       "-param requires: XkbRules, XkbModel, XkbLayout,"
-                       " XkbVariant, or XkbOptions\n");
-        }
-        retval = 3;
-    }
-    if (!serverGeneration)
-        dmxConfigSetMaxScreens();
-    return retval;
-}
-
-/** Provide succinct usage information for the DMX server. */
-void
-ddxUseMsg(void)
-{
-    ErrorF("\n\nDevice Dependent Usage:\n");
-    ErrorF("-display string      Specify the back-end display(s)\n");
-    ErrorF("-input string        Specify input source for core device\n");
-    ErrorF("-xinput string       Specify input source for XInput device\n");
-    ErrorF("-shadowfb            Enable shadow frame buffer\n");
-    ErrorF("-configfile file     Read from a configuration file\n");
-    ErrorF("-config config       Select a specific configuration\n");
-    ErrorF("-nomulticursor       Turn of multiple cursor support\n");
-    ErrorF("-fontpath            Sets the default font path\n");
-    ErrorF("-stat inter scrns    Print out performance statistics\n");
-    ErrorF("-syncbatch inter     Set interval for XSync batching\n");
-    ErrorF("-nooffscreenopt      Disable offscreen optimization\n");
-    ErrorF("-nosubdivprims       Disable primitive subdivision\n");
-    ErrorF("                     optimization\n");
-    ErrorF("-nowindowopt         Disable lazy window creation optimization\n");
-    ErrorF("-noxkb               Disable use of the XKB extension with\n");
-    ErrorF("                     backend displays (cf. -kb).\n");
-    ErrorF("-depth               Specify the default root window depth\n");
-    ErrorF("-norender            Disable RENDER extension support\n");
-#ifdef GLXEXT
-    ErrorF("-noglxproxy          Disable GLX Proxy\n");
-    ErrorF("-noglxswapgroup      Disable swap group and swap barrier\n");
-    ErrorF("                     extensions in GLX proxy\n");
-    ErrorF("-glxsyncswap         Force XSync after swap buffers\n");
-    ErrorF("-glxfinishswap       Force glFinish after swap buffers\n");
-#endif
-    ErrorF
-        ("-ignorebadfontpaths  Ignore bad font paths during initialization\n");
-    ErrorF("-addremovescreens    Enable dynamic screen addition/removal\n");
-    ErrorF("-param ...           Specify configuration parameters (e.g.,\n");
-    ErrorF("                     XkbRules, XkbModel, XkbLayout, etc.)\n");
-    ErrorF("\n");
-    ErrorF("    If the -input string matches a -display string, then input\n"
-           "    is taken from that backend display.  (XInput cannot be taken\n"
-           "    from a backend display.)  Placing \",console\" after the\n"
-           "    display name will force a console window to be opened on\n"
-           "    that display in addition to the backend input.  This is\n"
-           "    useful if the backend window does not cover the whole\n"
-           "    physical display.\n\n");
-
-    ErrorF("    Otherwise, if the -input or -xinput string specifies another\n"
-           "    X display, then a console window will be created on that\n"
-           "    display.  Placing \",windows\" or \",nowindows\" after the\n"
-           "    display name will control the display of window outlines in\n"
-           "    the console.\n\n");
-
-    ErrorF("    -input or -xinput dummy specifies no input.\n");
-    ErrorF("    -input or -xinput local specifies the use of a raw keyboard,\n"
-           "    mouse, or other (extension) device:\n"
-           "        -input local,kbd,ps2 will use a ps2 mouse\n"
-           "        -input local,kbd,ms  will use a serial mouse\n"
-           "        -input local,usb-kbd,usb-mou will use USB devices \n"
-           "        -xinput local,usb-oth will use a non-mouse and\n"
-           "                non-keyboard USB device with XInput\n\n");
-
-    ErrorF("    Special Keys:\n");
-    ErrorF("        Ctrl-Alt-g    Server grab/ungrab (console only)\n");
-    ErrorF("        Ctrl-Alt-f    Fine (1-pixel) mouse mode (console only)\n");
-    ErrorF("        Ctrl-Alt-q    Quit (core devices only)\n");
-    ErrorF("        Ctrl-Alt-F*   Switch to VC (local only)\n");
-}
diff --git a/hw/dmx/dmxinit.h b/hw/dmx/dmxinit.h
deleted file mode 100644
index ce4e2ff..0000000
--- a/hw/dmx/dmxinit.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright 2004 Red Hat Inc., Raleigh, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Kevin E. Martin <kem@redhat.com>
- *
- */
-
-/** \file
- * Interface for initialization.  \see dmxinit.c */
-
-#ifndef DMXINIT_H
-#define DMXINIT_H
-
-#include "scrnintstr.h"
-
-extern Bool dmxOpenDisplay(DMXScreenInfo * dmxScreen);
-extern void dmxSetErrorHandler(DMXScreenInfo * dmxScreen);
-extern void dmxCheckForWM(DMXScreenInfo * dmxScreen);
-extern void dmxGetScreenAttribs(DMXScreenInfo * dmxScreen);
-extern Bool dmxGetVisualInfo(DMXScreenInfo * dmxScreen);
-extern void dmxGetColormaps(DMXScreenInfo * dmxScreen);
-extern void dmxGetPixmapFormats(DMXScreenInfo * dmxScreen);
-
-#endif                          /* DMXINIT_H */
diff --git a/hw/dmx/dmxinput.c b/hw/dmx/dmxinput.c
deleted file mode 100644
index d201034..0000000
--- a/hw/dmx/dmxinput.c
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Copyright 2001,2002 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   David H. Dawes <dawes@xfree86.org>
- *   Kevin E. Martin <kem@redhat.com>
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-/** \file
- * Provide the main entry points for input initialization and processing
- * that arequired by the dix layer.
- */
-
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#include "dmx.h"
-#include "dmxlog.h"
-#include "dmxinput.h"
-
-#include "inputstr.h"
-#include "input.h"
-#include "mi.h"
-
-/** Returns TRUE if the key is a valid modifier.  For PC-class
- * keyboards, all keys can be used as modifiers, so return TRUE
- * always. */
-Bool
-LegalModifier(unsigned int key, DeviceIntPtr pDev)
-{
-    return TRUE;
-}
-
-/** Called from dix/main.c on each server generation to initialize
- * inputs.  All the work is done in dmxInputInit.  \see
- * dmxInputInit() */
-void
-InitInput(int argc, char **argv)
-{
-    int i;
-    DMXInputInfo *dmxInput;
-
-    if (!dmxNumInputs)
-        dmxLog(dmxFatal, "InitInput: no inputs specified\n");
-
-    for (i = 0, dmxInput = &dmxInputs[0]; i < dmxNumInputs; i++, dmxInput++)
-        dmxInputInit(dmxInput);
-
-    mieqInit();
-}
-
-void
-CloseInput(void)
-{
-    mieqFini();
-}
-
-/** Called from dix/dispatch.c in Dispatch() whenever input events
- * require processing.  All the work is done in the lower level
- * routines. */
-void
-ProcessInputEvents(void)
-{
-    int i;
-    DMXInputInfo *dmxInput;
-
-    for (i = 0, dmxInput = &dmxInputs[0]; i < dmxNumInputs; i++, dmxInput++)
-        if (!dmxInput->detached && dmxInput->processInputEvents)
-            dmxInput->processInputEvents(dmxInput);
-}
-
-/** This routine is called from \a dmxwindow.c whenever the layout of
- * windows on the display might have changed.  This information is used
- * by input drivers (currently only the console driver) that provide
- * information about window layout to the user. */
-void
-dmxUpdateWindowInfo(DMXUpdateType type, WindowPtr pWindow)
-{
-    int i;
-    DMXInputInfo *dmxInput;
-
-    for (i = 0, dmxInput = &dmxInputs[0]; i < dmxNumInputs; i++, dmxInput++)
-        if (!dmxInput->detached && dmxInput->updateWindowInfo)
-            dmxInput->updateWindowInfo(dmxInput, type, pWindow);
-}
-
-int
-NewInputDeviceRequest(InputOption *options, InputAttributes * attrs,
-                      DeviceIntPtr *pdev)
-{
-    return BadRequest;
-}
-
-void
-DeleteInputDeviceRequest(DeviceIntPtr pDev)
-{
-}
-
-void
-RemoveInputDeviceTraces(const char *config_info)
-{
-}
diff --git a/hw/dmx/dmxinput.h b/hw/dmx/dmxinput.h
deleted file mode 100644
index 210fd7a..0000000
--- a/hw/dmx/dmxinput.h
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * Copyright 2001,2002 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   David H. Dawes <dawes@xfree86.org>
- *   Kevin E. Martin <kem@redhat.com>
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-/** \file
- * This file provides access to:
- * - global variables available to all hw/dmx routines, and
- * - enumerations and typedefs needed by input routines in hw/dmx (and
- *   hw/dmx/input).
- *
- * The goal is that no files in hw/dmx should include header files from
- * hw/dmx/input -- the interface defined here should be the only
- * interface exported to the hw/dmx layer.  \see input/dmxinputinit.c.
- */
-
-#ifndef DMXINPUT_H
-#define DMXINPUT_H
-
-struct _DMXInputInfo;
-
-/** Reason why window layout was updated. */
-typedef enum {
-    DMX_UPDATE_REALIZE,         /**< Window realized        */
-    DMX_UPDATE_UNREALIZE,       /**< Window unrealized      */
-    DMX_UPDATE_RESTACK,         /**< Stacking order changed */
-    DMX_UPDATE_COPY,            /**< Window copied          */
-    DMX_UPDATE_RESIZE,          /**< Window resized         */
-    DMX_UPDATE_REPARENT         /**< Window reparented      */
-} DMXUpdateType;
-
-typedef void (*ProcessInputEventsProc) (struct _DMXInputInfo *);
-typedef void (*UpdateWindowInfoProc) (struct _DMXInputInfo *,
-                                      DMXUpdateType, WindowPtr);
-
-/** An opaque structure that is only exposed in the dmx/input layer. */
-typedef struct _DMXLocalInputInfo *DMXLocalInputInfoPtr;
-
-/** DMXInputInfo is typedef'd in \a dmx.h so that all routines can have
- * access to the global pointers.  However, the elements are only
- * available to input-related routines. */
-struct _DMXInputInfo {
-    const char *name;              /**< Name of input display or device
-                                    * (from command line or config
-                                    * file)  */
-    Bool freename;                    /**< If true, free name on destroy */
-    Bool detached;                    /**< If true, input screen is detached */
-    int inputIdx;                     /**< Index into #dmxInputs global */
-    int scrnIdx;                      /**< Index into #dmxScreens global */
-    Bool core;                     /**< If True, initialize these
-                                    * devices as devices that send core
-                                    * events */
-    Bool console;                    /**< True if console and backend
-                                      * input share the same backend
-                                      * display  */
-
-    Bool windows;                    /**< True if window outlines are
-                                      * draw in console */
-
-    ProcessInputEventsProc processInputEvents;
-    UpdateWindowInfoProc updateWindowInfo;
-
-    /** True if a VT switch is pending, but has not yet happened. */
-    int vt_switch_pending;
-
-    /** True if a VT switch has happened. */
-    int vt_switched;
-
-    /** Number of devices handled in this _DMXInputInfo structure. */
-    int numDevs;
-
-    /** List of actual input devices.  Each _DMXInputInfo structure can
-     * refer to more than one device.  For example, the keyboard and the
-     * pointer of a backend display; or all of the XInput extension
-     * devices on a backend display. */
-    DMXLocalInputInfoPtr *devs;
-
-    char *keycodes;                    /**< XKB keycodes from command line */
-    char *symbols;                     /**< XKB symbols from command line */
-    char *geometry;                    /**< XKB geometry from command line */
-};
-
-extern int dmxNumInputs;                  /**< Number of #dmxInputs */
-extern DMXInputInfo *dmxInputs;           /**< List of inputs */
-
-extern void dmxInputInit(DMXInputInfo * dmxInput);
-extern void dmxInputReInit(DMXInputInfo * dmxInput);
-extern void dmxInputLateReInit(DMXInputInfo * dmxInput);
-extern void dmxInputFree(DMXInputInfo * dmxInput);
-extern void dmxInputLogDevices(void);
-extern void dmxUpdateWindowInfo(DMXUpdateType type, WindowPtr pWindow);
-
-/* These functions are defined in input/dmxeq.c */
-extern void dmxeqSwitchScreen(DeviceIntPtr pDev, ScreenPtr pScreen,
-                              Bool fromDIX);
-
-/* This type is used in input/dmxevents.c.  Also, these functions are
- * defined in input/dmxevents.c */
-typedef enum {
-    DMX_NO_BLOCK = 0,
-    DMX_BLOCK = 1
-} DMXBlockType;
-
-extern void dmxGetGlobalPosition(int *x, int *y);
-extern DMXScreenInfo *dmxFindFirstScreen(int x, int y);
-extern void dmxCoreMotion(DevicePtr pDev, int x, int y, int delta,
-                          DMXBlockType block);
-
-/* Support for dynamic addition of inputs.  This functions is defined in
- * config/dmxconfig.c */
-extern DMXInputInfo *dmxConfigAddInput(const char *name, int core);
-#endif                          /* DMXINPUT_H */
diff --git a/hw/dmx/dmxlog.c b/hw/dmx/dmxlog.c
deleted file mode 100644
index 3249c48..0000000
--- a/hw/dmx/dmxlog.c
+++ /dev/null
@@ -1,446 +0,0 @@
-/*
- * Copyright 2001 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-/** \file
- * This file encapsulated all of the logging functions that are used by
- * DMX for informational, warning, and error messages. */
-
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#include "dmx.h"
-#include "dmxlog.h"
-#include "dmxinput.h"
-#include <X11/extensions/XI.h>
-#include <X11/extensions/XIproto.h>
-
-static dmxLogLevel dmxCurrentLogLevel = dmxDebug;
-
-/** Set the default level for logging to #dmxLogLevel.  Returns the
- * previous log level. */
-dmxLogLevel
-dmxSetLogLevel(dmxLogLevel newLevel)
-{
-    dmxLogLevel oldLevel = dmxCurrentLogLevel;
-
-    if (newLevel > dmxFatal)
-        newLevel = dmxFatal;
-    dmxCurrentLogLevel = newLevel;
-    return oldLevel;
-}
-
-/** Returns the log level set by #dmxLogLevel. */
-dmxLogLevel
-dmxGetLogLevel(void)
-{
-    return dmxCurrentLogLevel;
-}
-
-#ifdef DMX_LOG_STANDALONE
-/* When using this file as part of a stand-alone (i.e., non-X-Server
- * program, then the ultimate output routines have to be defined.  */
-
-/** Provide an ErrorF function when used stand-alone. */
-void
-ErrorF(const char *format, ...)
-{
-    va_list args;
-
-    va_start(args, format);
-    vfprintf(stderr, format, args);     /* RATS: We assume the format string
-                                         * is trusted, since it is always
-                                         * from a log message in our code. */
-    va_end(args);
-}
-
-/** Provide an VFatalError function when used stand-alone. */
-static void
-VFatalError(const char *format, va_list args) _X_ATTRIBUTE_PRINTF(1, 0) _X_NORETURN;
-static void
-VFatalError(const char *format, va_list args)
-{
-    vfprintf(stderr, format, args);     /* RATS: We assume the format string
-                                         * is trusted, since it is always
-                                         * from a log message in our code. */
-    exit(1);
-}
-
-/** Provide an VErrorF function when used stand-alone. */
-void
-VErrorF(const char *format, va_list args)
-{
-    vfprintf(stderr, format, args);     /* RATS: We assume the format string
-                                         * is trusted, since it is always
-                                         * from a log message in our code. */
-}
-#else
-/** This function was removed between XFree86 4.3.0 and XFree86 4.4.0. */
-extern void AbortServer(void) _X_NORETURN;
-static void
-VFatalError(const char *format, va_list args) _X_ATTRIBUTE_PRINTF(1, 0) _X_NORETURN;
-static void
-VFatalError(const char *format, va_list args)
-{
-    VErrorF(format, args);
-    ErrorF("\n");
-    AbortServer();
- /*NOTREACHED*/}
-#endif
-
-/* Prints a consistent header for each line. */
-static void
-dmxHeader(dmxLogLevel logLevel, DMXInputInfo * dmxInput,
-          DMXScreenInfo * dmxScreen)
-{
-    const char *type = "??";
-
-    switch (logLevel) {
-    case dmxDebug:
-        type = "..";
-        break;
-    case dmxInfo:
-        type = "II";
-        break;
-    case dmxWarning:
-        type = "**";
-        break;
-    case dmxError:
-        type = "!!";
-        break;
-    case dmxFatal:
-        type = "Fatal Error";
-        break;
-    }
-
-    if (dmxInput && dmxScreen) {
-        ErrorF("(%s) dmx[i%d/%s;o%d/%s]: ", type,
-               dmxInput->inputIdx, dmxInput->name,
-               dmxScreen->index, dmxScreen->name);
-    }
-    else if (dmxScreen) {
-        ErrorF("(%s) dmx[o%d/%s]: ", type, dmxScreen->index, dmxScreen->name);
-    }
-    else if (dmxInput) {
-        const char *pt = strchr(dmxInput->name, ',');
-        int len = (pt ? (size_t) (pt - dmxInput->name)
-                   : strlen(dmxInput->name));
-
-        ErrorF("(%s) dmx[i%d/%*.*s]: ", type,
-               dmxInput->inputIdx, len, len, dmxInput->name);
-    }
-    else {
-        ErrorF("(%s) dmx: ", type);
-    }
-}
-
-/* Prints the error message with the appropriate low-level X output
- * routine. */
-static void
-dmxMessage(dmxLogLevel logLevel, const char *format, va_list args) _X_ATTRIBUTE_PRINTF(2, 0);
-static void
-dmxMessage(dmxLogLevel logLevel, const char *format, va_list args)
-{
-    if (logLevel == dmxFatal || logLevel >= dmxCurrentLogLevel) {
-        if (logLevel == dmxFatal)
-            VFatalError(format, args);
-        else
-            VErrorF(format, args);
-    }
-}
-
-/** Log the specified message at the specified \a logLevel.  \a format
- * can be a printf-like format expression. */
-void
-dmxLog(dmxLogLevel logLevel, const char *format, ...)
-{
-    va_list args;
-
-    dmxHeader(logLevel, NULL, NULL);
-    va_start(args, format);
-    dmxMessage(logLevel, format, args);
-    va_end(args);
-}
-
-/** Continue a log message without printing the message prefix. */
-void
-dmxLogCont(dmxLogLevel logLevel, const char *format, ...)
-{
-    va_list args;
-
-    va_start(args, format);
-    dmxMessage(logLevel, format, args);
-    va_end(args);
-}
-
-#ifndef DMX_LOG_STANDALONE
-/** Log an informational message (at level #dmxInfo) related to ouput.
- * The message prefix will contain backend information from \a
- * dmxScreen. */
-void
-dmxLogOutput(DMXScreenInfo * dmxScreen, const char *format, ...)
-{
-    va_list args;
-
-    dmxHeader(dmxInfo, NULL, dmxScreen);
-    va_start(args, format);
-    dmxMessage(dmxInfo, format, args);
-    va_end(args);
-}
-
-/** Continue a message related to output without printing the message
- * prefix. */
-void
-dmxLogOutputCont(DMXScreenInfo * dmxScreen, const char *format, ...)
-{
-    va_list args;
-
-    va_start(args, format);
-    dmxMessage(dmxInfo, format, args);
-    va_end(args);
-}
-
-/** Log a warning message (at level #dmxWarning) related to output.
- * The message prefix will contain backend information from \a
- * dmxScreen. */
-void
-dmxLogOutputWarning(DMXScreenInfo * dmxScreen, const char *format, ...)
-{
-    va_list args;
-
-    dmxHeader(dmxWarning, NULL, dmxScreen);
-    va_start(args, format);
-    dmxMessage(dmxWarning, format, args);
-    va_end(args);
-}
-
-/** Log an informational message (at level #dmxInfo) related to input.
- * The message prefix will contain information from \a dmxInput. */
-void
-dmxLogInput(DMXInputInfo * dmxInput, const char *format, ...)
-{
-    va_list args;
-
-    dmxHeader(dmxInfo, dmxInput, NULL);
-    va_start(args, format);
-    dmxMessage(dmxInfo, format, args);
-    va_end(args);
-}
-
-/** Continue a message related to input without printing the message
- * prefix. */
-void
-dmxLogInputCont(DMXInputInfo * dmxInput, const char *format, ...)
-{
-    va_list args;
-
-    va_start(args, format);
-    dmxMessage(dmxInfo, format, args);
-    va_end(args);
-}
-
-/** Print \a argc messages, each describing an element in \a argv.  This
- * is maingly for debugging purposes. */
-void
-dmxLogArgs(dmxLogLevel logLevel, int argc, char **argv)
-{
-    int i;
-
-    for (i = 0; i < argc; i++)
-        dmxLog(logLevel, "   Arg[%d] = \"%s\"\n", i, argv[i]);
-}
-
-/** Print messages at level #dmxInfo describing the visuals in \a vi. */
-void
-dmxLogVisual(DMXScreenInfo * dmxScreen, XVisualInfo * vi, int defaultVisual)
-{
-    const char *class = "Unknown";
-
-    switch (vi->class) {
-    case StaticGray:
-        class = "StaticGray ";
-        break;
-    case GrayScale:
-        class = "GrayScale  ";
-        break;
-    case StaticColor:
-        class = "StaticColor";
-        break;
-    case PseudoColor:
-        class = "PseudoColor";
-        break;
-    case TrueColor:
-        class = "TrueColor  ";
-        break;
-    case DirectColor:
-        class = "DirectColor";
-        break;
-    }
-#define VisualLogFormat "0x%02lx %s %2db %db/rgb %3d 0x%04lx 0x%04lx 0x%04lx%s\n"
-
-    if (dmxScreen) {
-        dmxLogOutput(dmxScreen,
-                     VisualLogFormat,
-                     vi->visualid, class, vi->depth, vi->bits_per_rgb,
-                     vi->colormap_size,
-                     vi->red_mask, vi->green_mask, vi->blue_mask,
-                     defaultVisual ? " *" : "");
-    }
-    else {
-        dmxLog(dmxInfo,
-               "  " VisualLogFormat,
-               vi->visualid, class, vi->depth, vi->bits_per_rgb,
-               vi->colormap_size,
-               vi->red_mask, vi->green_mask, vi->blue_mask,
-               defaultVisual ? " *" : "");
-    }
-}
-
-/** Translate a (normalized) XInput event \a type into a human-readable
- * string. */
-const char *
-dmxXInputEventName(int type)
-{
-    switch (type) {
-    case XI_DeviceValuator:
-        return "XI_DeviceValuator";
-    case XI_DeviceKeyPress:
-        return "XI_DeviceKeyPress";
-    case XI_DeviceKeyRelease:
-        return "XI_DeviceKeyRelease";
-    case XI_DeviceButtonPress:
-        return "XI_DeviceButtonPress";
-    case XI_DeviceButtonRelease:
-        return "XI_DeviceButtonRelease";
-    case XI_DeviceMotionNotify:
-        return "XI_DeviceMotionNotify";
-    case XI_DeviceFocusIn:
-        return "XI_DeviceFocusIn";
-    case XI_DeviceFocusOut:
-        return "XI_DeviceFocusOut";
-    case XI_ProximityIn:
-        return "XI_ProximityIn";
-    case XI_ProximityOut:
-        return "XI_ProximityOut";
-    case XI_DeviceStateNotify:
-        return "XI_DeviceStateNotify";
-    case XI_DeviceMappingNotify:
-        return "XI_DeviceMappingNotify";
-    case XI_ChangeDeviceNotify:
-        return "XI_ChangeDeviceNotify";
-    case XI_DeviceKeystateNotify:
-        return "XI_DeviceKeystateNotify";
-    case XI_DeviceButtonstateNotify:
-        return "XI_DeviceButtonstateNotify";
-    default:
-        return "unknown";
-    }
-}
-
-#endif
-
-/** Translate an event \a type into a human-readable string. */
-const char *
-dmxEventName(int type)
-{
-    switch (type) {
-    case KeyPress:
-        return "KeyPress";
-    case KeyRelease:
-        return "KeyRelease";
-    case ButtonPress:
-        return "ButtonPress";
-    case ButtonRelease:
-        return "ButtonRelease";
-    case MotionNotify:
-        return "MotionNotify";
-    case EnterNotify:
-        return "EnterNotify";
-    case LeaveNotify:
-        return "LeaveNotify";
-    case FocusIn:
-        return "FocusIn";
-    case FocusOut:
-        return "FocusOut";
-    case KeymapNotify:
-        return "KeymapNotify";
-    case Expose:
-        return "Expose";
-    case GraphicsExpose:
-        return "GraphicsExpose";
-    case NoExpose:
-        return "NoExpose";
-    case VisibilityNotify:
-        return "VisibilityNotify";
-    case CreateNotify:
-        return "CreateNotify";
-    case DestroyNotify:
-        return "DestroyNotify";
-    case UnmapNotify:
-        return "UnmapNotify";
-    case MapNotify:
-        return "MapNotify";
-    case MapRequest:
-        return "MapRequest";
-    case ReparentNotify:
-        return "ReparentNotify";
-    case ConfigureNotify:
-        return "ConfigureNotify";
-    case ConfigureRequest:
-        return "ConfigureRequest";
-    case GravityNotify:
-        return "GravityNotify";
-    case ResizeRequest:
-        return "ResizeRequest";
-    case CirculateNotify:
-        return "CirculateNotify";
-    case CirculateRequest:
-        return "CirculateRequest";
-    case PropertyNotify:
-        return "PropertyNotify";
-    case SelectionClear:
-        return "SelectionClear";
-    case SelectionRequest:
-        return "SelectionRequest";
-    case SelectionNotify:
-        return "SelectionNotify";
-    case ColormapNotify:
-        return "ColormapNotify";
-    case ClientMessage:
-        return "ClientMessage";
-    case MappingNotify:
-        return "MappingNotify";
-    default:
-        return "<unknown>";
-    }
-}
diff --git a/hw/dmx/dmxlog.h b/hw/dmx/dmxlog.h
deleted file mode 100644
index 162484b..0000000
--- a/hw/dmx/dmxlog.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright 2001 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-/** \file
- * This header is included by all files that need to use the DMX logging
- * facilities. */
-
-#ifndef _DMXLOG_H_
-#define _DMXLOG_H_
-
-/** Logging levels -- output is tunable with #dmxSetLogLevel. */
-typedef enum {
-    dmxDebug,                   /**< Usually verbose debugging info */
-    dmxInfo,                    /**< Non-warning information */
-    dmxWarning,                 /**< A warning that may indicate DMX
-                                 * will not function as the user
-                                 * intends. */
-    dmxError,                   /**< A non-fatal error that probably
-                                 * indicates DMX will not function as
-                                 * desired.*/
-    dmxFatal                    /**< A fatal error that will cause DMX
-                                 * to shut down. */
-} dmxLogLevel;
-
-/* Logging functions used by Xserver/hw/dmx routines. */
-extern dmxLogLevel dmxSetLogLevel(dmxLogLevel newLevel);
-extern dmxLogLevel dmxGetLogLevel(void);
-extern void dmxLog(dmxLogLevel logLevel, const char *format,
-                             ...) _X_ATTRIBUTE_PRINTF(2, 3);
-extern void dmxLogCont(dmxLogLevel logLevel, const char *format,
-                             ...) _X_ATTRIBUTE_PRINTF(2, 3);
-extern const char *dmxEventName(int type);
-
-#ifndef DMX_LOG_STANDALONE
-extern void dmxLogOutput(DMXScreenInfo * dmxScreen, const char *format,
-                             ...) _X_ATTRIBUTE_PRINTF(2, 3);
-extern void dmxLogOutputCont(DMXScreenInfo * dmxScreen, const char *format,
-                             ...) _X_ATTRIBUTE_PRINTF(2, 3);
-extern void dmxLogOutputWarning(DMXScreenInfo * dmxScreen, const char *format,
-                             ...) _X_ATTRIBUTE_PRINTF(2, 3);
-extern void dmxLogInput(DMXInputInfo * dmxInput, const char *format,
-                             ...) _X_ATTRIBUTE_PRINTF(2, 3);
-extern void dmxLogInputCont(DMXInputInfo * dmxInput, const char *format,
-                             ...) _X_ATTRIBUTE_PRINTF(2, 3);
-extern void dmxLogArgs(dmxLogLevel logLevel, int argc, char **argv);
-extern void dmxLogVisual(DMXScreenInfo * dmxScreen, XVisualInfo * vi,
-                         int defaultVisual);
-extern const char *dmxXInputEventName(int type);
-#endif
-
-#endif
diff --git a/hw/dmx/dmxpict.c b/hw/dmx/dmxpict.c
deleted file mode 100644
index 63caec9..0000000
--- a/hw/dmx/dmxpict.c
+++ /dev/null
@@ -1,1277 +0,0 @@
-/*
- * Copyright 2001-2004 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Kevin E. Martin <kem@redhat.com>
- *
- */
-
-/** \file
- *  Provide support for the RENDER extension (version 0.8).
- */
-
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#include "dmx.h"
-#include "dmxsync.h"
-#include "dmxpict.h"
-#include "dmxwindow.h"
-#include "dmxpixmap.h"
-
-#include "fb.h"
-#include "pixmapstr.h"
-#include "dixstruct.h"
-
-#include <X11/extensions/render.h>
-#include <X11/extensions/renderproto.h>
-#include <X11/extensions/Xfixes.h>
-#include "picture.h"
-#include "picturestr.h"
-#include "mipict.h"
-#include "fbpict.h"
-
-extern int (*ProcRenderVector[RenderNumberRequests]) (ClientPtr);
-
-static int (*dmxSaveRenderVector[RenderNumberRequests]) (ClientPtr);
-
-static int dmxProcRenderCreateGlyphSet(ClientPtr client);
-static int dmxProcRenderFreeGlyphSet(ClientPtr client);
-static int dmxProcRenderAddGlyphs(ClientPtr client);
-static int dmxProcRenderFreeGlyphs(ClientPtr client);
-static int dmxProcRenderCompositeGlyphs(ClientPtr client);
-static int dmxProcRenderSetPictureTransform(ClientPtr client);
-static int dmxProcRenderSetPictureFilter(ClientPtr client);
-
-#if 0
-/* FIXME: Not (yet) supported */
-static int dmxProcRenderCreateCursor(ClientPtr client);
-static int dmxProcRenderCreateAnimCursor(ClientPtr client);
-#endif
-
-/** Catch errors that might occur when allocating Glyph Sets.  Errors
- *  are saved in dmxGlyphLastError for later handling. */
-static int dmxGlyphLastError;
-static int
-dmxGlyphErrorHandler(Display * dpy, XErrorEvent * ev)
-{
-    dmxGlyphLastError = ev->error_code;
-    return 0;
-}
-
-/** Initialize the Proc Vector for the RENDER extension.  The functions
- *  here cannot be handled by the mi layer RENDER hooks either because
- *  the required information is no longer available when it reaches the
- *  mi layer or no mi layer hooks exist.  This function is called from
- *  InitOutput() since it should be initialized only once per server
- *  generation. */
-void
-dmxInitRender(void)
-{
-    int i;
-
-    for (i = 0; i < RenderNumberRequests; i++)
-        dmxSaveRenderVector[i] = ProcRenderVector[i];
-
-    ProcRenderVector[X_RenderCreateGlyphSet]
-        = dmxProcRenderCreateGlyphSet;
-    ProcRenderVector[X_RenderFreeGlyphSet]
-        = dmxProcRenderFreeGlyphSet;
-    ProcRenderVector[X_RenderAddGlyphs]
-        = dmxProcRenderAddGlyphs;
-    ProcRenderVector[X_RenderFreeGlyphs]
-        = dmxProcRenderFreeGlyphs;
-    ProcRenderVector[X_RenderCompositeGlyphs8]
-        = dmxProcRenderCompositeGlyphs;
-    ProcRenderVector[X_RenderCompositeGlyphs16]
-        = dmxProcRenderCompositeGlyphs;
-    ProcRenderVector[X_RenderCompositeGlyphs32]
-        = dmxProcRenderCompositeGlyphs;
-    ProcRenderVector[X_RenderSetPictureTransform]
-        = dmxProcRenderSetPictureTransform;
-    ProcRenderVector[X_RenderSetPictureFilter]
-        = dmxProcRenderSetPictureFilter;
-}
-
-/** Reset the Proc Vector for the RENDER extension back to the original
- *  functions.  This function is called from dmxCloseScreen() during the
- *  server reset (only for screen #0). */
-void
-dmxResetRender(void)
-{
-    int i;
-
-    for (i = 0; i < RenderNumberRequests; i++)
-        ProcRenderVector[i] = dmxSaveRenderVector[i];
-}
-
-/** Initialize the RENDER extension, allocate the picture privates and
- *  wrap mi function hooks.  If the shadow frame buffer is used, then
- *  call the appropriate fb initialization function. */
-Bool
-dmxPictureInit(ScreenPtr pScreen, PictFormatPtr formats, int nformats)
-{
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    PictureScreenPtr ps;
-
-    if (!miPictureInit(pScreen, formats, nformats))
-        return FALSE;
-
-    if (!dixRegisterPrivateKey
-        (&dmxPictPrivateKeyRec, PRIVATE_PICTURE, sizeof(dmxPictPrivRec)))
-        return FALSE;
-
-    ps = GetPictureScreen(pScreen);
-
-    DMX_WRAP(CreatePicture, dmxCreatePicture, dmxScreen, ps);
-    DMX_WRAP(DestroyPicture, dmxDestroyPicture, dmxScreen, ps);
-
-    DMX_WRAP(ChangePictureClip, dmxChangePictureClip, dmxScreen, ps);
-    DMX_WRAP(DestroyPictureClip, dmxDestroyPictureClip, dmxScreen, ps);
-
-    DMX_WRAP(ChangePicture, dmxChangePicture, dmxScreen, ps);
-    DMX_WRAP(ValidatePicture, dmxValidatePicture, dmxScreen, ps);
-
-    DMX_WRAP(Composite, dmxComposite, dmxScreen, ps);
-    DMX_WRAP(Glyphs, dmxGlyphs, dmxScreen, ps);
-    DMX_WRAP(CompositeRects, dmxCompositeRects, dmxScreen, ps);
-
-    DMX_WRAP(Trapezoids, dmxTrapezoids, dmxScreen, ps);
-    DMX_WRAP(Triangles, dmxTriangles, dmxScreen, ps);
-
-    return TRUE;
-}
-
-/** Find the appropriate format on the requested screen given the
- *  internal format requested.  The list of formats is searched
- *  sequentially as the XRenderFindFormat() function does not always
- *  find the appropriate format when a specific format is requested. */
-static XRenderPictFormat *
-dmxFindFormat(DMXScreenInfo * dmxScreen, PictFormatPtr pFmt)
-{
-    XRenderPictFormat *pFormat = NULL;
-    int i = 0;
-
-    if (!pFmt || !dmxScreen->beDisplay)
-        return pFormat;
-
-    while (1) {
-        pFormat = XRenderFindFormat(dmxScreen->beDisplay, 0, 0, i++);
-        if (!pFormat)
-            break;
-
-        if (pFormat->type != pFmt->type)
-            continue;
-        if (pFormat->depth != pFmt->depth)
-            continue;
-        if (pFormat->direct.red != pFmt->direct.red)
-            continue;
-        if (pFormat->direct.redMask != pFmt->direct.redMask)
-            continue;
-        if (pFormat->direct.green != pFmt->direct.green)
-            continue;
-        if (pFormat->direct.greenMask != pFmt->direct.greenMask)
-            continue;
-        if (pFormat->direct.blue != pFmt->direct.blue)
-            continue;
-        if (pFormat->direct.blueMask != pFmt->direct.blueMask)
-            continue;
-        if (pFormat->direct.alpha != pFmt->direct.alpha)
-            continue;
-        if (pFormat->direct.alphaMask != pFmt->direct.alphaMask)
-            continue;
-
-        /* We have a match! */
-        break;
-    }
-
-    return pFormat;
-}
-
-/** Free \a glyphSet on back-end screen number \a idx. */
-Bool
-dmxBEFreeGlyphSet(ScreenPtr pScreen, GlyphSetPtr glyphSet)
-{
-    dmxGlyphPrivPtr glyphPriv = DMX_GET_GLYPH_PRIV(glyphSet);
-    int idx = pScreen->myNum;
-    DMXScreenInfo *dmxScreen = &dmxScreens[idx];
-
-    if (glyphPriv->glyphSets[idx]) {
-        XRenderFreeGlyphSet(dmxScreen->beDisplay, glyphPriv->glyphSets[idx]);
-        glyphPriv->glyphSets[idx] = (GlyphSet) 0;
-        return TRUE;
-    }
-
-    return FALSE;
-}
-
-/** Create \a glyphSet on the backend screen number \a idx. */
-int
-dmxBECreateGlyphSet(int idx, GlyphSetPtr glyphSet)
-{
-    XRenderPictFormat *pFormat;
-    DMXScreenInfo *dmxScreen = &dmxScreens[idx];
-    dmxGlyphPrivPtr glyphPriv = DMX_GET_GLYPH_PRIV(glyphSet);
-    PictFormatPtr pFmt = glyphSet->format;
-    int (*oldErrorHandler) (Display *, XErrorEvent *);
-
-    pFormat = dmxFindFormat(dmxScreen, pFmt);
-    if (!pFormat) {
-        return BadMatch;
-    }
-
-    dmxGlyphLastError = 0;
-    oldErrorHandler = XSetErrorHandler(dmxGlyphErrorHandler);
-
-    /* Catch when this fails */
-    glyphPriv->glyphSets[idx]
-        = XRenderCreateGlyphSet(dmxScreen->beDisplay, pFormat);
-
-    XSetErrorHandler(oldErrorHandler);
-
-    if (dmxGlyphLastError) {
-        return dmxGlyphLastError;
-    }
-
-    return Success;
-}
-
-/** Create a Glyph Set on each screen.  Save the glyphset ID from each
- *  screen in the Glyph Set's private structure.  Fail if the format
- *  requested is not available or if the Glyph Set cannot be created on
- *  the screen. */
-static int
-dmxProcRenderCreateGlyphSet(ClientPtr client)
-{
-    int ret;
-
-    REQUEST(xRenderCreateGlyphSetReq);
-
-    ret = dmxSaveRenderVector[stuff->renderReqType] (client);
-
-    if (ret == Success) {
-        GlyphSetPtr glyphSet;
-        dmxGlyphPrivPtr glyphPriv;
-        int i;
-
-        /* Look up glyphSet that was just created ???? */
-        /* Store glyphsets from backends in glyphSet->devPrivate ????? */
-        /* Make sure we handle all errors here!! */
-
-        dixLookupResourceByType((void **) &glyphSet,
-                                stuff->gsid, GlyphSetType,
-                                client, DixDestroyAccess);
-
-        glyphPriv = malloc(sizeof(dmxGlyphPrivRec));
-        if (!glyphPriv)
-            return BadAlloc;
-        glyphPriv->glyphSets = NULL;
-        MAXSCREENSALLOC_RETURN(glyphPriv->glyphSets, BadAlloc);
-        DMX_SET_GLYPH_PRIV(glyphSet, glyphPriv);
-
-        for (i = 0; i < dmxNumScreens; i++) {
-            DMXScreenInfo *dmxScreen = &dmxScreens[i];
-            int beret;
-
-            if (!dmxScreen->beDisplay) {
-                glyphPriv->glyphSets[i] = 0;
-                continue;
-            }
-
-            if ((beret = dmxBECreateGlyphSet(i, glyphSet)) != Success) {
-                int j;
-
-                /* Free the glyph sets we've allocated thus far */
-                for (j = 0; j < i; j++)
-                    dmxBEFreeGlyphSet(screenInfo.screens[j], glyphSet);
-
-                /* Free the resource created by render */
-                FreeResource(stuff->gsid, RT_NONE);
-
-                return beret;
-            }
-        }
-    }
-
-    return ret;
-}
-
-/** Free the previously allocated Glyph Sets for each screen. */
-static int
-dmxProcRenderFreeGlyphSet(ClientPtr client)
-{
-    GlyphSetPtr glyphSet;
-
-    REQUEST(xRenderFreeGlyphSetReq);
-
-    REQUEST_SIZE_MATCH(xRenderFreeGlyphSetReq);
-    dixLookupResourceByType((void **) &glyphSet,
-                            stuff->glyphset, GlyphSetType,
-                            client, DixDestroyAccess);
-
-    if (glyphSet && glyphSet->refcnt == 1) {
-        dmxGlyphPrivPtr glyphPriv = DMX_GET_GLYPH_PRIV(glyphSet);
-        int i;
-
-        for (i = 0; i < dmxNumScreens; i++) {
-            DMXScreenInfo *dmxScreen = &dmxScreens[i];
-
-            if (dmxScreen->beDisplay) {
-                if (dmxBEFreeGlyphSet(screenInfo.screens[i], glyphSet))
-                    dmxSync(dmxScreen, FALSE);
-            }
-        }
-
-        MAXSCREENSFREE(glyphPriv->glyphSets);
-        free(glyphPriv);
-        DMX_SET_GLYPH_PRIV(glyphSet, NULL);
-    }
-
-    return dmxSaveRenderVector[stuff->renderReqType] (client);
-}
-
-/** Add glyphs to the Glyph Set on each screen. */
-static int
-dmxProcRenderAddGlyphs(ClientPtr client)
-{
-    int ret;
-
-    REQUEST(xRenderAddGlyphsReq);
-
-    ret = dmxSaveRenderVector[stuff->renderReqType] (client);
-
-    if (ret == Success) {
-        GlyphSetPtr glyphSet;
-        dmxGlyphPrivPtr glyphPriv;
-        int i;
-        int nglyphs;
-        CARD32 *gids;
-        Glyph *gidsCopy;
-        xGlyphInfo *gi;
-        CARD8 *bits;
-        int nbytes;
-
-        dixLookupResourceByType((void **) &glyphSet,
-                                stuff->glyphset, GlyphSetType,
-                                client, DixReadAccess);
-        glyphPriv = DMX_GET_GLYPH_PRIV(glyphSet);
-
-        nglyphs = stuff->nglyphs;
-        gids = (CARD32 *) (stuff + 1);
-        gi = (xGlyphInfo *) (gids + nglyphs);
-        bits = (CARD8 *) (gi + nglyphs);
-        nbytes = ((stuff->length << 2) -
-                  sizeof(xRenderAddGlyphsReq) -
-                  (sizeof(CARD32) + sizeof(xGlyphInfo)) * nglyphs);
-
-        gidsCopy = xallocarray(nglyphs, sizeof(*gidsCopy));
-        for (i = 0; i < nglyphs; i++)
-            gidsCopy[i] = gids[i];
-
-        /* FIXME: Will this ever fail? */
-        for (i = 0; i < dmxNumScreens; i++) {
-            DMXScreenInfo *dmxScreen = &dmxScreens[i];
-
-            if (dmxScreen->beDisplay) {
-                XRenderAddGlyphs(dmxScreen->beDisplay,
-                                 glyphPriv->glyphSets[i],
-                                 gidsCopy,
-                                 (XGlyphInfo *) gi,
-                                 nglyphs, (char *) bits, nbytes);
-                dmxSync(dmxScreen, FALSE);
-            }
-        }
-        free(gidsCopy);
-    }
-
-    return ret;
-}
-
-/** Free glyphs from the Glyph Set for each screen. */
-static int
-dmxProcRenderFreeGlyphs(ClientPtr client)
-{
-    GlyphSetPtr glyphSet;
-
-    REQUEST(xRenderFreeGlyphsReq);
-
-    REQUEST_AT_LEAST_SIZE(xRenderFreeGlyphsReq);
-    dixLookupResourceByType((void **) &glyphSet,
-                            stuff->glyphset, GlyphSetType,
-                            client, DixWriteAccess);
-
-    if (glyphSet) {
-        dmxGlyphPrivPtr glyphPriv = DMX_GET_GLYPH_PRIV(glyphSet);
-        int i;
-        int nglyphs;
-        Glyph *gids;
-
-        nglyphs = ((client->req_len << 2) - sizeof(xRenderFreeGlyphsReq)) >> 2;
-        if (nglyphs) {
-            gids = xallocarray(nglyphs, sizeof(*gids));
-            for (i = 0; i < nglyphs; i++)
-                gids[i] = ((CARD32 *) (stuff + 1))[i];
-
-            for (i = 0; i < dmxNumScreens; i++) {
-                DMXScreenInfo *dmxScreen = &dmxScreens[i];
-
-                if (dmxScreen->beDisplay) {
-                    XRenderFreeGlyphs(dmxScreen->beDisplay,
-                                      glyphPriv->glyphSets[i], gids, nglyphs);
-                    dmxSync(dmxScreen, FALSE);
-                }
-            }
-            free(gids);
-        }
-    }
-
-    return dmxSaveRenderVector[stuff->renderReqType] (client);
-}
-
-/** Composite glyphs on each screen into the requested picture.  If
- *  either the src or dest picture has not been allocated due to lazy
- *  window creation, this request will gracefully return. */
-static int
-dmxProcRenderCompositeGlyphs(ClientPtr client)
-{
-    int ret;
-
-    REQUEST(xRenderCompositeGlyphsReq);
-
-    ret = dmxSaveRenderVector[stuff->renderReqType] (client);
-
-    /* For the following to work with PanoramiX, it assumes that Render
-     * wraps the ProcRenderVector after dmxRenderInit has been called.
-     */
-    if (ret == Success) {
-        PicturePtr pSrc;
-        dmxPictPrivPtr pSrcPriv;
-        PicturePtr pDst;
-        dmxPictPrivPtr pDstPriv;
-        PictFormatPtr pFmt;
-        XRenderPictFormat *pFormat;
-        int size;
-
-        int scrnNum;
-        DMXScreenInfo *dmxScreen;
-
-        CARD8 *buffer;
-        CARD8 *end;
-        int space;
-
-        int nglyph;
-        char *glyphs;
-        char *curGlyph;
-
-        xGlyphElt *elt;
-        int nelt;
-        XGlyphElt8 *elts;
-        XGlyphElt8 *curElt;
-
-        GlyphSetPtr glyphSet;
-        dmxGlyphPrivPtr glyphPriv;
-
-        dixLookupResourceByType((void **) &pSrc,
-                                stuff->src, PictureType, client, DixReadAccess);
-
-        pSrcPriv = DMX_GET_PICT_PRIV(pSrc);
-        if (!pSrcPriv->pict)
-            return ret;
-
-        dixLookupResourceByType((void **) &pDst,
-                                stuff->dst, PictureType,
-                                client, DixWriteAccess);
-
-        pDstPriv = DMX_GET_PICT_PRIV(pDst);
-        if (!pDstPriv->pict)
-            return ret;
-
-        scrnNum = pDst->pDrawable->pScreen->myNum;
-        dmxScreen = &dmxScreens[scrnNum];
-
-        /* Note: If the back-end display has been detached, then it
-         * should not be possible to reach here since the pSrcPriv->pict
-         * and pDstPriv->pict will have already been set to 0.
-         */
-        if (!dmxScreen->beDisplay)
-            return ret;
-
-        if (stuff->maskFormat)
-            dixLookupResourceByType((void **) &pFmt,
-                                    stuff->maskFormat, PictFormatType,
-                                    client, DixReadAccess);
-        else
-            pFmt = NULL;
-
-        pFormat = dmxFindFormat(dmxScreen, pFmt);
-
-        switch (stuff->renderReqType) {
-        case X_RenderCompositeGlyphs8:
-            size = sizeof(CARD8);
-            break;
-        case X_RenderCompositeGlyphs16:
-            size = sizeof(CARD16);
-            break;
-        case X_RenderCompositeGlyphs32:
-            size = sizeof(CARD32);
-            break;
-        default:
-            return BadPictOp;   /* Can't happen */
-        }
-
-        buffer = (CARD8 *) (stuff + 1);
-        end = (CARD8 *) stuff + (stuff->length << 2);
-        nelt = 0;
-        nglyph = 0;
-        while (buffer + sizeof(xGlyphElt) < end) {
-            elt = (xGlyphElt *) buffer;
-            buffer += sizeof(xGlyphElt);
-
-            if (elt->len == 0xff) {
-                buffer += 4;
-            }
-            else {
-                nelt++;
-                nglyph += elt->len;
-                space = size * elt->len;
-                if (space & 3)
-                    space += 4 - (space & 3);
-                buffer += space;
-            }
-        }
-
-        /* The following only works for Render version > 0.2 */
-
-        /* All of the XGlyphElt* structure sizes are identical */
-        elts = xallocarray(nelt, sizeof(XGlyphElt8));
-        if (!elts)
-            return BadAlloc;
-
-        glyphs = xallocarray(nglyph, size);
-        if (!glyphs) {
-            free(elts);
-            return BadAlloc;
-        }
-
-        buffer = (CARD8 *) (stuff + 1);
-        end = (CARD8 *) stuff + (stuff->length << 2);
-        curGlyph = glyphs;
-        curElt = elts;
-
-        dixLookupResourceByType((void **) &glyphSet,
-                                stuff->glyphset, GlyphSetType,
-                                client, DixReadAccess);
-        glyphPriv = DMX_GET_GLYPH_PRIV(glyphSet);
-
-        while (buffer + sizeof(xGlyphElt) < end) {
-            elt = (xGlyphElt *) buffer;
-            buffer += sizeof(xGlyphElt);
-
-            if (elt->len == 0xff) {
-                dixLookupResourceByType((void **) &glyphSet,
-                                        *((CARD32 *) buffer),
-                                        GlyphSetType, client, DixReadAccess);
-                glyphPriv = DMX_GET_GLYPH_PRIV(glyphSet);
-                buffer += 4;
-            }
-            else {
-                curElt->glyphset = glyphPriv->glyphSets[scrnNum];
-                curElt->xOff = elt->deltax;
-                curElt->yOff = elt->deltay;
-                curElt->nchars = elt->len;
-                curElt->chars = curGlyph;
-
-                memcpy(curGlyph, buffer, size * elt->len);
-                curGlyph += size * elt->len;
-
-                curElt++;
-
-                space = size * elt->len;
-                if (space & 3)
-                    space += 4 - (space & 3);
-                buffer += space;
-            }
-        }
-
-        switch (stuff->renderReqType) {
-        case X_RenderCompositeGlyphs8:
-            XRenderCompositeText8(dmxScreen->beDisplay, stuff->op,
-                                  pSrcPriv->pict, pDstPriv->pict,
-                                  pFormat,
-                                  stuff->xSrc, stuff->ySrc, 0, 0, elts, nelt);
-            break;
-        case X_RenderCompositeGlyphs16:
-            XRenderCompositeText16(dmxScreen->beDisplay, stuff->op,
-                                   pSrcPriv->pict, pDstPriv->pict,
-                                   pFormat,
-                                   stuff->xSrc, stuff->ySrc,
-                                   0, 0, (XGlyphElt16 *) elts, nelt);
-            break;
-        case X_RenderCompositeGlyphs32:
-            XRenderCompositeText32(dmxScreen->beDisplay, stuff->op,
-                                   pSrcPriv->pict, pDstPriv->pict,
-                                   pFormat,
-                                   stuff->xSrc, stuff->ySrc,
-                                   0, 0, (XGlyphElt32 *) elts, nelt);
-            break;
-        }
-
-        dmxSync(dmxScreen, FALSE);
-
-        free(elts);
-        free(glyphs);
-    }
-
-    return ret;
-}
-
-/** Set the picture transform on each screen. */
-static int
-dmxProcRenderSetPictureTransform(ClientPtr client)
-{
-    DMXScreenInfo *dmxScreen;
-    PicturePtr pPicture;
-    dmxPictPrivPtr pPictPriv;
-    XTransform xform;
-
-    REQUEST(xRenderSetPictureTransformReq);
-
-    REQUEST_SIZE_MATCH(xRenderSetPictureTransformReq);
-    VERIFY_PICTURE(pPicture, stuff->picture, client, DixWriteAccess);
-
-    /* For the following to work with PanoramiX, it assumes that Render
-     * wraps the ProcRenderVector after dmxRenderInit has been called.
-     */
-    dmxScreen = &dmxScreens[pPicture->pDrawable->pScreen->myNum];
-    pPictPriv = DMX_GET_PICT_PRIV(pPicture);
-
-    if (pPictPriv->pict) {
-        xform.matrix[0][0] = stuff->transform.matrix11;
-        xform.matrix[0][1] = stuff->transform.matrix12;
-        xform.matrix[0][2] = stuff->transform.matrix13;
-        xform.matrix[1][0] = stuff->transform.matrix21;
-        xform.matrix[1][1] = stuff->transform.matrix22;
-        xform.matrix[1][2] = stuff->transform.matrix23;
-        xform.matrix[2][0] = stuff->transform.matrix31;
-        xform.matrix[2][1] = stuff->transform.matrix32;
-        xform.matrix[2][2] = stuff->transform.matrix33;
-
-        XRenderSetPictureTransform(dmxScreen->beDisplay,
-                                   pPictPriv->pict, &xform);
-        dmxSync(dmxScreen, FALSE);
-    }
-
-    return dmxSaveRenderVector[stuff->renderReqType] (client);
-}
-
-/** Set the picture filter on each screen. */
-static int
-dmxProcRenderSetPictureFilter(ClientPtr client)
-{
-    DMXScreenInfo *dmxScreen;
-    PicturePtr pPicture;
-    dmxPictPrivPtr pPictPriv;
-    char *filter;
-    XFixed *params;
-    int nparams;
-
-    REQUEST(xRenderSetPictureFilterReq);
-
-    REQUEST_AT_LEAST_SIZE(xRenderSetPictureFilterReq);
-    VERIFY_PICTURE(pPicture, stuff->picture, client, DixWriteAccess);
-
-    /* For the following to work with PanoramiX, it assumes that Render
-     * wraps the ProcRenderVector after dmxRenderInit has been called.
-     */
-    dmxScreen = &dmxScreens[pPicture->pDrawable->pScreen->myNum];
-    pPictPriv = DMX_GET_PICT_PRIV(pPicture);
-
-    if (pPictPriv->pict) {
-        filter = (char *) (stuff + 1);
-        params = (XFixed *) (filter + ((stuff->nbytes + 3) & ~3));
-        nparams = ((XFixed *) stuff + client->req_len) - params;
-        if (nparams < 0)
-            return BadLength;
-
-        XRenderSetPictureFilter(dmxScreen->beDisplay,
-                                pPictPriv->pict, filter, params, nparams);
-        dmxSync(dmxScreen, FALSE);
-    }
-
-    return dmxSaveRenderVector[stuff->renderReqType] (client);
-}
-
-/** Create a picture on the appropriate screen.  This is the actual
- *  function that creates the picture.  However, if the associated
- *  window has not yet been created due to lazy window creation, then
- *  delay the picture creation until the window is mapped. */
-static Picture
-dmxDoCreatePicture(PicturePtr pPicture)
-{
-    DrawablePtr pDraw = pPicture->pDrawable;
-    ScreenPtr pScreen = pDraw->pScreen;
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    XRenderPictFormat *pFormat;
-    Drawable draw;
-
-    if (pPicture->pDrawable->type == DRAWABLE_WINDOW) {
-        dmxWinPrivPtr pWinPriv = DMX_GET_WINDOW_PRIV((WindowPtr) (pDraw));
-
-        if (!(draw = pWinPriv->window)) {
-            /* Window has not been created yet due to the window
-             * optimization.  Delay picture creation until window is
-             * mapped.
-             */
-            pWinPriv->hasPict = TRUE;
-            return 0;
-        }
-    }
-    else {
-        dmxPixPrivPtr pPixPriv = DMX_GET_PIXMAP_PRIV((PixmapPtr) (pDraw));
-
-        if (!(draw = pPixPriv->pixmap)) {
-            /* FIXME: Zero width/height pixmap?? */
-            return 0;
-        }
-    }
-
-    /* This should not be reached if the back-end display has been
-     * detached because the pWinPriv->window or the pPixPriv->pixmap
-     * will be NULL; however, we add it here for completeness
-     */
-    if (!dmxScreen->beDisplay)
-        return 0;
-
-    pFormat = dmxFindFormat(dmxScreen, pPicture->pFormat);
-
-    return XRenderCreatePicture(dmxScreen->beDisplay, draw, pFormat, 0, 0);
-}
-
-/** Create a list of pictures.  This function is called by
- *  dmxCreateAndRealizeWindow() during the lazy window creation
- *  realization process.  It creates the entire list of pictures that
- *  are associated with the given window. */
-void
-dmxCreatePictureList(WindowPtr pWindow)
-{
-    PicturePtr pPicture = GetPictureWindow(pWindow);
-
-    while (pPicture) {
-        dmxPictPrivPtr pPictPriv = DMX_GET_PICT_PRIV(pPicture);
-
-        /* Create the picture for this window */
-        pPictPriv->pict = dmxDoCreatePicture(pPicture);
-
-        /* ValidatePicture takes care of the state changes */
-
-        pPicture = pPicture->pNext;
-    }
-}
-
-/** Create \a pPicture on the backend. */
-int
-dmxBECreatePicture(PicturePtr pPicture)
-{
-    dmxPictPrivPtr pPictPriv = DMX_GET_PICT_PRIV(pPicture);
-
-    /* Create picutre on BE */
-    pPictPriv->pict = dmxDoCreatePicture(pPicture);
-
-    /* Flush changes to the backend server */
-    dmxValidatePicture(pPicture, (1 << (CPLastBit + 1)) - 1);
-
-    return Success;
-}
-
-/** Create a picture.  This function handles the CreatePicture
- *  unwrapping/wrapping and calls dmxDoCreatePicture to actually create
- *  the picture on the appropriate screen.  */
-int
-dmxCreatePicture(PicturePtr pPicture)
-{
-    ScreenPtr pScreen = pPicture->pDrawable->pScreen;
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    PictureScreenPtr ps = GetPictureScreen(pScreen);
-    dmxPictPrivPtr pPictPriv = DMX_GET_PICT_PRIV(pPicture);
-    int ret = Success;
-
-    DMX_UNWRAP(CreatePicture, dmxScreen, ps);
-#if 1
-    if (ps->CreatePicture)
-        ret = ps->CreatePicture(pPicture);
-#endif
-
-    /* Create picture on back-end server */
-    pPictPriv->pict = dmxDoCreatePicture(pPicture);
-    pPictPriv->savedMask = 0;
-
-    DMX_WRAP(CreatePicture, dmxCreatePicture, dmxScreen, ps);
-
-    return ret;
-}
-
-/** Destroy \a pPicture on the back-end server. */
-Bool
-dmxBEFreePicture(PicturePtr pPicture)
-{
-    ScreenPtr pScreen = pPicture->pDrawable->pScreen;
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    dmxPictPrivPtr pPictPriv = DMX_GET_PICT_PRIV(pPicture);
-
-    if (pPictPriv->pict) {
-        XRenderFreePicture(dmxScreen->beDisplay, pPictPriv->pict);
-        pPictPriv->pict = (Picture) 0;
-        return TRUE;
-    }
-
-    return FALSE;
-}
-
-/** Destroy a list of pictures that are associated with the window that
- *  is being destroyed.  This function is called by #dmxDestroyWindow().
- *  */
-Bool
-dmxDestroyPictureList(WindowPtr pWindow)
-{
-    PicturePtr pPicture = GetPictureWindow(pWindow);
-    Bool ret = FALSE;
-
-    while (pPicture) {
-        ret |= dmxBEFreePicture(pPicture);
-        pPicture = pPicture->pNext;
-    }
-
-    return ret;
-}
-
-/** Destroy a picture.  This function calls the wrapped function that
- *  frees the resources in the DMX server associated with this
- *  picture. */
-void
-dmxDestroyPicture(PicturePtr pPicture)
-{
-    ScreenPtr pScreen = pPicture->pDrawable->pScreen;
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    PictureScreenPtr ps = GetPictureScreen(pScreen);
-
-    DMX_UNWRAP(DestroyPicture, dmxScreen, ps);
-
-    /* Destroy picture on back-end server */
-    if (dmxBEFreePicture(pPicture))
-        dmxSync(dmxScreen, FALSE);
-
-#if 1
-    if (ps->DestroyPicture)
-        ps->DestroyPicture(pPicture);
-#endif
-    DMX_WRAP(DestroyPicture, dmxDestroyPicture, dmxScreen, ps);
-}
-
-/** Change the picture's list of clip rectangles. */
-int
-dmxChangePictureClip(PicturePtr pPicture, int clipType, void *value, int n)
-{
-    ScreenPtr pScreen = pPicture->pDrawable->pScreen;
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    PictureScreenPtr ps = GetPictureScreen(pScreen);
-    dmxPictPrivPtr pPictPriv = DMX_GET_PICT_PRIV(pPicture);
-
-    DMX_UNWRAP(ChangePictureClip, dmxScreen, ps);
-#if 1
-    if (ps->ChangePictureClip)
-        ps->ChangePictureClip(pPicture, clipType, value, n);
-#endif
-
-    /* Change picture clip rects on back-end server */
-    if (pPictPriv->pict) {
-        /* The clip has already been changed into a region by the mi
-         * routine called above.
-         */
-        if (clipType == CT_NONE) {
-            /* Disable clipping, show all */
-            XFixesSetPictureClipRegion(dmxScreen->beDisplay,
-                                       pPictPriv->pict, 0, 0, None);
-        }
-        else if (pPicture->clientClip) {
-            RegionPtr pClip = pPicture->clientClip;
-            BoxPtr pBox = RegionRects(pClip);
-            int nBox = RegionNumRects(pClip);
-            XRectangle *pRects;
-            XRectangle *pRect;
-            int nRects;
-
-            nRects = nBox;
-            pRects = pRect = xallocarray(nRects, sizeof(*pRect));
-
-            while (nBox--) {
-                pRect->x = pBox->x1;
-                pRect->y = pBox->y1;
-                pRect->width = pBox->x2 - pBox->x1;
-                pRect->height = pBox->y2 - pBox->y1;
-                pBox++;
-                pRect++;
-            }
-
-            XRenderSetPictureClipRectangles(dmxScreen->beDisplay,
-                                            pPictPriv->pict,
-                                            0, 0, pRects, nRects);
-            free(pRects);
-        }
-        else {
-            XRenderSetPictureClipRectangles(dmxScreen->beDisplay,
-                                            pPictPriv->pict, 0, 0, NULL, 0);
-        }
-        dmxSync(dmxScreen, FALSE);
-    }
-    else {
-        /* FIXME: Handle saving clip region when offscreen */
-    }
-
-    DMX_WRAP(ChangePictureClip, dmxChangePictureClip, dmxScreen, ps);
-
-    return Success;
-}
-
-/** Destroy the picture's list of clip rectangles. */
-void
-dmxDestroyPictureClip(PicturePtr pPicture)
-{
-    ScreenPtr pScreen = pPicture->pDrawable->pScreen;
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    PictureScreenPtr ps = GetPictureScreen(pScreen);
-    dmxPictPrivPtr pPictPriv = DMX_GET_PICT_PRIV(pPicture);
-
-    DMX_UNWRAP(DestroyPictureClip, dmxScreen, ps);
-#if 1
-    if (ps->DestroyPictureClip)
-        ps->DestroyPictureClip(pPicture);
-#endif
-
-    /* Destroy picture clip rects on back-end server */
-    if (pPictPriv->pict) {
-        XRenderSetPictureClipRectangles(dmxScreen->beDisplay,
-                                        pPictPriv->pict, 0, 0, NULL, 0);
-        dmxSync(dmxScreen, FALSE);
-    }
-    else {
-        /* FIXME: Handle destroying clip region when offscreen */
-    }
-
-    DMX_WRAP(DestroyPictureClip, dmxDestroyPictureClip, dmxScreen, ps);
-}
-
-/** Change the attributes of the pictures.  If the picture has not yet
- *  been created due to lazy window creation, save the mask so that it
- *  can be used to appropriately initialize the picture's attributes
- *  when it is created later. */
-void
-dmxChangePicture(PicturePtr pPicture, Mask mask)
-{
-    ScreenPtr pScreen = pPicture->pDrawable->pScreen;
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    PictureScreenPtr ps = GetPictureScreen(pScreen);
-    dmxPictPrivPtr pPictPriv = DMX_GET_PICT_PRIV(pPicture);
-
-    DMX_UNWRAP(ChangePicture, dmxScreen, ps);
-#if 1
-    if (ps->ChangePicture)
-        ps->ChangePicture(pPicture, mask);
-#endif
-
-    /* Picture attribute changes are handled in ValidatePicture */
-    pPictPriv->savedMask |= mask;
-
-    DMX_WRAP(ChangePicture, dmxChangePicture, dmxScreen, ps);
-}
-
-/** Validate the picture's attributes before rendering to it.  Update
- *  any picture attributes that have been changed by one of the higher
- *  layers. */
-void
-dmxValidatePicture(PicturePtr pPicture, Mask mask)
-{
-    ScreenPtr pScreen = pPicture->pDrawable->pScreen;
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    PictureScreenPtr ps = GetPictureScreen(pScreen);
-    dmxPictPrivPtr pPictPriv = DMX_GET_PICT_PRIV(pPicture);
-
-    DMX_UNWRAP(ValidatePicture, dmxScreen, ps);
-
-    /* Change picture attributes on back-end server */
-    if (pPictPriv->pict) {
-        XRenderPictureAttributes attribs;
-
-        if (mask & CPRepeat) {
-            attribs.repeat = pPicture->repeatType;
-        }
-        if (mask & CPAlphaMap) {
-            if (pPicture->alphaMap) {
-                dmxPictPrivPtr pAlphaPriv;
-
-                pAlphaPriv = DMX_GET_PICT_PRIV(pPicture->alphaMap);
-                if (pAlphaPriv->pict) {
-                    attribs.alpha_map = pAlphaPriv->pict;
-                }
-                else {
-                    /* FIXME: alpha picture drawable has not been created?? */
-                    return;     /* or should this be: attribs.alpha_map = None; */
-                }
-            }
-            else {
-                attribs.alpha_map = None;
-            }
-        }
-        if (mask & CPAlphaXOrigin)
-            attribs.alpha_x_origin = pPicture->alphaOrigin.x;
-        if (mask & CPAlphaYOrigin)
-            attribs.alpha_y_origin = pPicture->alphaOrigin.y;
-        if (mask & CPClipXOrigin)
-            attribs.clip_x_origin = pPicture->clipOrigin.x;
-        if (mask & CPClipYOrigin)
-            attribs.clip_y_origin = pPicture->clipOrigin.y;
-        if (mask & CPClipMask)
-            mask &= ~CPClipMask;        /* Handled in ChangePictureClip */
-        if (mask & CPGraphicsExposure)
-            attribs.graphics_exposures = pPicture->graphicsExposures;
-        if (mask & CPSubwindowMode)
-            attribs.subwindow_mode = pPicture->subWindowMode;
-        if (mask & CPPolyEdge)
-            attribs.poly_edge = pPicture->polyEdge;
-        if (mask & CPPolyMode)
-            attribs.poly_mode = pPicture->polyMode;
-        if (mask & CPComponentAlpha)
-            attribs.component_alpha = pPicture->componentAlpha;
-
-        XRenderChangePicture(dmxScreen->beDisplay, pPictPriv->pict,
-                             mask, &attribs);
-        dmxSync(dmxScreen, FALSE);
-    }
-    else {
-        pPictPriv->savedMask |= mask;
-    }
-
-#if 1
-    if (ps->ValidatePicture)
-        ps->ValidatePicture(pPicture, mask);
-#endif
-
-    DMX_WRAP(ValidatePicture, dmxValidatePicture, dmxScreen, ps);
-}
-
-/** Composite a picture on the appropriate screen by combining the
- *  specified rectangle of the transformed src and mask operands with
- *  the specified rectangle of the dst using op as the compositing
- *  operator.  For a complete description see the protocol document of
- *  the RENDER library. */
-void
-dmxComposite(CARD8 op,
-             PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst,
-             INT16 xSrc, INT16 ySrc,
-             INT16 xMask, INT16 yMask,
-             INT16 xDst, INT16 yDst, CARD16 width, CARD16 height)
-{
-    ScreenPtr pScreen = pDst->pDrawable->pScreen;
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    PictureScreenPtr ps = GetPictureScreen(pScreen);
-    dmxPictPrivPtr pSrcPriv = DMX_GET_PICT_PRIV(pSrc);
-    dmxPictPrivPtr pMaskPriv = NULL;
-    dmxPictPrivPtr pDstPriv = DMX_GET_PICT_PRIV(pDst);
-
-    if (pMask)
-        pMaskPriv = DMX_GET_PICT_PRIV(pMask);
-
-    DMX_UNWRAP(Composite, dmxScreen, ps);
-#if 0
-    if (ps->Composite)
-        ps->Composite(op, pSrc, pMask, pDst,
-                      xSrc, ySrc, xMask, yMask, xDst, yDst, width, height);
-#endif
-
-    /* Composite on back-end server */
-    if (pSrcPriv->pict && pDstPriv->pict &&
-        ((pMaskPriv && pMaskPriv->pict) || !pMaskPriv)) {
-        XRenderComposite(dmxScreen->beDisplay,
-                         op,
-                         pSrcPriv->pict,
-                         pMaskPriv ? pMaskPriv->pict : None,
-                         pDstPriv->pict,
-                         xSrc, ySrc, xMask, yMask, xDst, yDst, width, height);
-        dmxSync(dmxScreen, FALSE);
-    }
-
-    DMX_WRAP(Composite, dmxComposite, dmxScreen, ps);
-}
-
-/** Null function to catch when/if RENDER calls lower level mi hooks.
- *  Compositing glyphs is handled by dmxProcRenderCompositeGlyphs().
- *  This function should never be called. */
-void
-dmxGlyphs(CARD8 op,
-          PicturePtr pSrc, PicturePtr pDst,
-          PictFormatPtr maskFormat,
-          INT16 xSrc, INT16 ySrc,
-          int nlists, GlyphListPtr lists, GlyphPtr * glyphs)
-{
-    /* This won't work, so we need to wrap ProcRenderCompositeGlyphs */
-}
-
-/** Fill a rectangle on the appropriate screen by combining the color
- *  with the dest picture in the area specified by the list of
- *  rectangles.  For a complete description see the protocol document of
- *  the RENDER library. */
-void
-dmxCompositeRects(CARD8 op,
-                  PicturePtr pDst,
-                  xRenderColor * color, int nRect, xRectangle *rects)
-{
-    ScreenPtr pScreen = pDst->pDrawable->pScreen;
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    PictureScreenPtr ps = GetPictureScreen(pScreen);
-    dmxPictPrivPtr pPictPriv = DMX_GET_PICT_PRIV(pDst);
-
-    DMX_UNWRAP(CompositeRects, dmxScreen, ps);
-#if 0
-    if (ps->CompositeRects)
-        ps->CompositeRects(op, pDst, color, nRect, rects);
-#endif
-
-    /* CompositeRects on back-end server */
-    if (pPictPriv->pict) {
-        XRenderFillRectangles(dmxScreen->beDisplay,
-                              op,
-                              pPictPriv->pict,
-                              (XRenderColor *) color,
-                              (XRectangle *) rects, nRect);
-        dmxSync(dmxScreen, FALSE);
-    }
-
-    DMX_WRAP(CompositeRects, dmxCompositeRects, dmxScreen, ps);
-}
-
-/** Indexed color visuals are not yet supported. */
-Bool
-dmxInitIndexed(ScreenPtr pScreen, PictFormatPtr pFormat)
-{
-    return TRUE;
-}
-
-/** Indexed color visuals are not yet supported. */
-void
-dmxCloseIndexed(ScreenPtr pScreen, PictFormatPtr pFormat)
-{
-}
-
-/** Indexed color visuals are not yet supported. */
-void
-dmxUpdateIndexed(ScreenPtr pScreen, PictFormatPtr pFormat,
-                 int ndef, xColorItem * pdef)
-{
-}
-
-/** Composite a list of trapezoids on the appropriate screen.  For a
- *  complete description see the protocol document of the RENDER
- *  library. */
-void
-dmxTrapezoids(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
-              PictFormatPtr maskFormat,
-              INT16 xSrc, INT16 ySrc, int ntrap, xTrapezoid * traps)
-{
-    ScreenPtr pScreen = pDst->pDrawable->pScreen;
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    PictureScreenPtr ps = GetPictureScreen(pScreen);
-    dmxPictPrivPtr pSrcPriv = DMX_GET_PICT_PRIV(pSrc);
-    dmxPictPrivPtr pDstPriv = DMX_GET_PICT_PRIV(pDst);
-
-    DMX_UNWRAP(Trapezoids, dmxScreen, ps);
-#if 0
-    if (ps->Trapezoids)
-        ps->Trapezoids(op, pSrc, pDst, maskFormat, xSrc, ySrc, ntrap, *traps);
-#endif
-
-    /* Draw trapezoids on back-end server */
-    if (pDstPriv->pict) {
-        XRenderPictFormat *pFormat;
-
-        pFormat = dmxFindFormat(dmxScreen, maskFormat);
-        if (!pFormat) {
-            /* FIXME: Error! */
-        }
-
-        XRenderCompositeTrapezoids(dmxScreen->beDisplay,
-                                   op,
-                                   pSrcPriv->pict,
-                                   pDstPriv->pict,
-                                   pFormat,
-                                   xSrc, ySrc, (XTrapezoid *) traps, ntrap);
-        dmxSync(dmxScreen, FALSE);
-    }
-
-    DMX_WRAP(Trapezoids, dmxTrapezoids, dmxScreen, ps);
-}
-
-/** Composite a list of triangles on the appropriate screen.  For a
- *  complete description see the protocol document of the RENDER
- *  library. */
-void
-dmxTriangles(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
-             PictFormatPtr maskFormat,
-             INT16 xSrc, INT16 ySrc, int ntri, xTriangle * tris)
-{
-    ScreenPtr pScreen = pDst->pDrawable->pScreen;
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    PictureScreenPtr ps = GetPictureScreen(pScreen);
-    dmxPictPrivPtr pSrcPriv = DMX_GET_PICT_PRIV(pSrc);
-    dmxPictPrivPtr pDstPriv = DMX_GET_PICT_PRIV(pDst);
-
-    DMX_UNWRAP(Triangles, dmxScreen, ps);
-#if 0
-    if (ps->Triangles)
-        ps->Triangles(op, pSrc, pDst, maskFormat, xSrc, ySrc, ntri, *tris);
-#endif
-
-    /* Draw trapezoids on back-end server */
-    if (pDstPriv->pict) {
-        XRenderPictFormat *pFormat;
-
-        pFormat = dmxFindFormat(dmxScreen, maskFormat);
-        if (!pFormat) {
-            /* FIXME: Error! */
-        }
-
-        XRenderCompositeTriangles(dmxScreen->beDisplay,
-                                  op,
-                                  pSrcPriv->pict,
-                                  pDstPriv->pict,
-                                  pFormat,
-                                  xSrc, ySrc, (XTriangle *) tris, ntri);
-        dmxSync(dmxScreen, FALSE);
-    }
-
-    DMX_WRAP(Triangles, dmxTriangles, dmxScreen, ps);
-}
diff --git a/hw/dmx/dmxpict.h b/hw/dmx/dmxpict.h
deleted file mode 100644
index f36eca3..0000000
--- a/hw/dmx/dmxpict.h
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Copyright 2001-2004 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Kevin E. Martin <kem@redhat.com>
- *
- */
-
-/** \file
- *  This file provides access to the externally visible RENDER support
- *  functions, global variables and macros for DMX.
- *
- *  FIXME: Move function definitions for non-externally visible function
- *  to .c file. */
-
-#ifndef DMXPICT_H
-#define DMXPICT_H
-
-/** Picture private structure */
-typedef struct _dmxPictPriv {
-    Picture pict;               /**< Picture ID from back-end server */
-    Mask savedMask;             /**< Mask of picture attributes saved for
-				 *   lazy window creation. */
-} dmxPictPrivRec, *dmxPictPrivPtr;
-
-/** Glyph Set private structure */
-typedef struct _dmxGlyphPriv {
-    GlyphSet *glyphSets;  /**< Glyph Set IDs from back-end server */
-} dmxGlyphPrivRec, *dmxGlyphPrivPtr;
-
-extern void dmxInitRender(void);
-extern void dmxResetRender(void);
-
-extern Bool dmxPictureInit(ScreenPtr pScreen,
-                           PictFormatPtr formats, int nformats);
-
-extern void dmxCreatePictureList(WindowPtr pWindow);
-extern Bool dmxDestroyPictureList(WindowPtr pWindow);
-
-extern int dmxCreatePicture(PicturePtr pPicture);
-extern void dmxDestroyPicture(PicturePtr pPicture);
-extern int dmxChangePictureClip(PicturePtr pPicture, int clipType,
-                                void *value, int n);
-extern void dmxDestroyPictureClip(PicturePtr pPicture);
-extern void dmxChangePicture(PicturePtr pPicture, Mask mask);
-extern void dmxValidatePicture(PicturePtr pPicture, Mask mask);
-extern void dmxComposite(CARD8 op,
-                         PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst,
-                         INT16 xSrc, INT16 ySrc,
-                         INT16 xMask, INT16 yMask,
-                         INT16 xDst, INT16 yDst, CARD16 width, CARD16 height);
-extern void dmxGlyphs(CARD8 op,
-                      PicturePtr pSrc, PicturePtr pDst,
-                      PictFormatPtr maskFormat,
-                      INT16 xSrc, INT16 ySrc,
-                      int nlists, GlyphListPtr lists, GlyphPtr * glyphs);
-extern void dmxCompositeRects(CARD8 op,
-                              PicturePtr pDst,
-                              xRenderColor * color,
-                              int nRect, xRectangle *rects);
-extern Bool dmxInitIndexed(ScreenPtr pScreen, PictFormatPtr pFormat);
-extern void dmxCloseIndexed(ScreenPtr pScreen, PictFormatPtr pFormat);
-extern void dmxUpdateIndexed(ScreenPtr pScreen, PictFormatPtr pFormat,
-                             int ndef, xColorItem * pdef);
-extern void dmxTrapezoids(CARD8 op,
-                          PicturePtr pSrc, PicturePtr pDst,
-                          PictFormatPtr maskFormat,
-                          INT16 xSrc, INT16 ySrc,
-                          int ntrap, xTrapezoid * traps);
-extern void dmxTriangles(CARD8 op,
-                         PicturePtr pSrc, PicturePtr pDst,
-                         PictFormatPtr maskFormat,
-                         INT16 xSrc, INT16 ySrc, int ntri, xTriangle * tris);
-
-extern int dmxBECreateGlyphSet(int idx, GlyphSetPtr glyphSet);
-extern Bool dmxBEFreeGlyphSet(ScreenPtr pScreen, GlyphSetPtr glyphSet);
-extern int dmxBECreatePicture(PicturePtr pPicture);
-extern Bool dmxBEFreePicture(PicturePtr pPicture);
-
-/** Get the picture private data given a picture pointer */
-#define DMX_GET_PICT_PRIV(_pPict)					\
-    (dmxPictPrivPtr)dixLookupPrivate(&(_pPict)->devPrivates, dmxPictPrivateKey)
-
-/** Set the glyphset private data given a glyphset pointer */
-#define DMX_SET_GLYPH_PRIV(_pGlyph, _pPriv)				\
-    GlyphSetSetPrivate((_pGlyph), dmxGlyphSetPrivateKey, (_pPriv))
-/** Get the glyphset private data given a glyphset pointer */
-#define DMX_GET_GLYPH_PRIV(_pGlyph)					\
-    (dmxGlyphPrivPtr)GlyphSetGetPrivate((_pGlyph), dmxGlyphSetPrivateKey)
-
-#endif                          /* DMXPICT_H */
diff --git a/hw/dmx/dmxpixmap.c b/hw/dmx/dmxpixmap.c
deleted file mode 100644
index 7b317ea..0000000
--- a/hw/dmx/dmxpixmap.c
+++ /dev/null
@@ -1,262 +0,0 @@
-/*
- * Copyright 2001-2004 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Kevin E. Martin <kem@redhat.com>
- *
- */
-
-/** \file
- * Provides pixmap support. */
-
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#include "dmx.h"
-#include "dmxsync.h"
-#include "dmxpixmap.h"
-
-#include "pixmapstr.h"
-#include "servermd.h"
-#include "privates.h"
-
-/** Initialize a private area in \a pScreen for pixmap information. */
-Bool
-dmxInitPixmap(ScreenPtr pScreen)
-{
-    if (!dixRegisterPrivateKey
-        (&dmxPixPrivateKeyRec, PRIVATE_PIXMAP, sizeof(dmxPixPrivRec)))
-        return FALSE;
-
-    return TRUE;
-}
-
-/** Create a pixmap on the back-end server. */
-void
-dmxBECreatePixmap(PixmapPtr pPixmap)
-{
-    ScreenPtr pScreen = pPixmap->drawable.pScreen;
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    dmxPixPrivPtr pPixPriv = DMX_GET_PIXMAP_PRIV(pPixmap);
-
-    /* Make sure we haven't already created this pixmap.  This can
-     * happen when the pixmap is used elsewhere (e.g., as a background
-     * or border for a window) and the refcnt > 1.
-     */
-    if (pPixPriv->pixmap)
-        return;
-
-    if (pPixmap->drawable.width && pPixmap->drawable.height) {
-        pPixPriv->pixmap = XCreatePixmap(dmxScreen->beDisplay,
-                                         dmxScreen->scrnWin,
-                                         pPixmap->drawable.width,
-                                         pPixmap->drawable.height,
-                                         pPixmap->drawable.depth);
-        dmxSync(dmxScreen, FALSE);
-    }
-}
-
-/** Create a pixmap for \a pScreen with the specified \a width, \a
- *  height, and \a depth. */
-PixmapPtr
-dmxCreatePixmap(ScreenPtr pScreen, int width, int height, int depth,
-                unsigned usage_hint)
-{
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    PixmapPtr pPixmap;
-    int bpp;
-    dmxPixPrivPtr pPixPriv;
-
-#if 0
-    DMX_UNWRAP(CreatePixmap, dmxScreen, pScreen);
-    if (pScreen->CreatePixmap)
-        ret = pScreen->CreatePixmap(pPixmap);
-#endif
-
-    /* Create pixmap on back-end server */
-    if (depth == 24)
-        bpp = 32;
-    else
-        bpp = depth;
-
-    pPixmap = AllocatePixmap(pScreen, 0);
-    if (!pPixmap)
-        return NullPixmap;
-
-    pPixmap->drawable.type = DRAWABLE_PIXMAP;
-    pPixmap->drawable.class = 0;
-    pPixmap->drawable.pScreen = pScreen;
-    pPixmap->drawable.depth = depth;
-    pPixmap->drawable.bitsPerPixel = bpp;
-    pPixmap->drawable.id = 0;
-    pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
-    pPixmap->drawable.x = 0;
-    pPixmap->drawable.y = 0;
-    pPixmap->drawable.width = width;
-    pPixmap->drawable.height = height;
-    pPixmap->devKind = PixmapBytePad(width, bpp);
-    pPixmap->refcnt = 1;
-    pPixmap->usage_hint = usage_hint;
-
-    pPixPriv = DMX_GET_PIXMAP_PRIV(pPixmap);
-    pPixPriv->pixmap = (Pixmap) 0;
-    pPixPriv->detachedImage = NULL;
-
-    /* Create the pixmap on the back-end server */
-    if (dmxScreen->beDisplay) {
-        dmxBECreatePixmap(pPixmap);
-    }
-
-#if 0
-    DMX_WRAP(CreatePixmap, dmxCreatePixmap, dmxScreen, pScreen);
-#endif
-
-    return pPixmap;
-}
-
-/** Destroy the pixmap on the back-end server. */
-Bool
-dmxBEFreePixmap(PixmapPtr pPixmap)
-{
-    ScreenPtr pScreen = pPixmap->drawable.pScreen;
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    dmxPixPrivPtr pPixPriv = DMX_GET_PIXMAP_PRIV(pPixmap);
-
-    if (pPixPriv->pixmap) {
-        XFreePixmap(dmxScreen->beDisplay, pPixPriv->pixmap);
-        pPixPriv->pixmap = (Pixmap) 0;
-        return TRUE;
-    }
-
-    return FALSE;
-}
-
-/** Destroy the pixmap pointed to by \a pPixmap. */
-Bool
-dmxDestroyPixmap(PixmapPtr pPixmap)
-{
-    ScreenPtr pScreen = pPixmap->drawable.pScreen;
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    Bool ret = TRUE;
-
-#if 0
-    DMX_UNWRAP(DestroyPixmap, dmxScreen, pScreen);
-#endif
-
-    if (--pPixmap->refcnt)
-        return TRUE;
-
-    /* Destroy pixmap on back-end server */
-    if (dmxScreen->beDisplay) {
-        if (dmxBEFreePixmap(pPixmap)) {
-            /* Also make sure that we destroy any detached image */
-            dmxPixPrivPtr pPixPriv = DMX_GET_PIXMAP_PRIV(pPixmap);
-
-            if (pPixPriv->detachedImage)
-                XDestroyImage(pPixPriv->detachedImage);
-            dmxSync(dmxScreen, FALSE);
-        }
-    }
-    FreePixmap(pPixmap);
-
-#if 0
-    if (pScreen->DestroyPixmap)
-        ret = pScreen->DestroyPixmap(pPixmap);
-    DMX_WRAP(DestroyPixmap, dmxDestroyPixmap, dmxScreen, pScreen);
-#endif
-
-    return ret;
-}
-
-/** Create and return a region based on the pixmap pointed to by \a
- *  pPixmap. */
-RegionPtr
-dmxBitmapToRegion(PixmapPtr pPixmap)
-{
-    DMXScreenInfo *dmxScreen = &dmxScreens[pPixmap->drawable.pScreen->myNum];
-    dmxPixPrivPtr pPixPriv = DMX_GET_PIXMAP_PRIV(pPixmap);
-    XImage *ximage;
-    RegionPtr pReg, pTmpReg;
-    int x, y;
-    unsigned long previousPixel, currentPixel;
-    BoxRec Box = { 0, };
-    Bool overlap;
-
-    if (!dmxScreen->beDisplay) {
-        pReg = RegionCreate(NullBox, 1);
-        return pReg;
-    }
-
-    ximage = XGetImage(dmxScreen->beDisplay, pPixPriv->pixmap, 0, 0,
-                       pPixmap->drawable.width, pPixmap->drawable.height,
-                       1, XYPixmap);
-
-    pReg = RegionCreate(NullBox, 1);
-    pTmpReg = RegionCreate(NullBox, 1);
-    if (!pReg || !pTmpReg) {
-        XDestroyImage(ximage);
-        return NullRegion;
-    }
-
-    for (y = 0; y < pPixmap->drawable.height; y++) {
-        Box.y1 = y;
-        Box.y2 = y + 1;
-        previousPixel = 0L;
-        for (x = 0; x < pPixmap->drawable.width; x++) {
-            currentPixel = XGetPixel(ximage, x, y);
-            if (previousPixel != currentPixel) {
-                if (previousPixel == 0L) {
-                    /* left edge */
-                    Box.x1 = x;
-                }
-                else if (currentPixel == 0L) {
-                    /* right edge */
-                    Box.x2 = x;
-                    RegionReset(pTmpReg, &Box);
-                    RegionAppend(pReg, pTmpReg);
-                }
-                previousPixel = currentPixel;
-            }
-        }
-        if (previousPixel != 0L) {
-            /* right edge because of the end of pixmap */
-            Box.x2 = pPixmap->drawable.width;
-            RegionReset(pTmpReg, &Box);
-            RegionAppend(pReg, pTmpReg);
-        }
-    }
-
-    RegionDestroy(pTmpReg);
-    XDestroyImage(ximage);
-
-    RegionValidate(pReg, &overlap);
-
-    dmxSync(dmxScreen, FALSE);
-    return pReg;
-}
diff --git a/hw/dmx/dmxpixmap.h b/hw/dmx/dmxpixmap.h
deleted file mode 100644
index 30bb666..0000000
--- a/hw/dmx/dmxpixmap.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright 2001-2004 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Kevin E. Martin <kem@redhat.com>
- *
- */
-
-/** \file
- * Interface for pixmap support.  \see dmxpixmap.c */
-
-#ifndef DMXPIXMAP_H
-#define DMXPIXMAP_H
-
-#include "pixmapstr.h"
-
-/** Pixmap private area. */
-typedef struct _dmxPixPriv {
-    Pixmap pixmap;
-    XImage *detachedImage;
-} dmxPixPrivRec, *dmxPixPrivPtr;
-
-extern Bool dmxInitPixmap(ScreenPtr pScreen);
-
-extern PixmapPtr dmxCreatePixmap(ScreenPtr pScreen,
-                                 int width, int height, int depth,
-                                 unsigned usage_hint);
-extern Bool dmxDestroyPixmap(PixmapPtr pPixmap);
-extern RegionPtr dmxBitmapToRegion(PixmapPtr pPixmap);
-
-extern void dmxBECreatePixmap(PixmapPtr pPixmap);
-extern Bool dmxBEFreePixmap(PixmapPtr pPixmap);
-
-/** Get pixmap private pointer. */
-#define DMX_GET_PIXMAP_PRIV(_pPix)					\
-    (dmxPixPrivPtr)dixLookupPrivate(&(_pPix)->devPrivates, dmxPixPrivateKey)
-
-#endif                          /* DMXPIXMAP_H */
diff --git a/hw/dmx/dmxprop.c b/hw/dmx/dmxprop.c
deleted file mode 100644
index 7dfa04a..0000000
--- a/hw/dmx/dmxprop.c
+++ /dev/null
@@ -1,375 +0,0 @@
-/*
- * Copyright 2002-2003 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-/** \file
- *
- * It is possible for one of the DMX "backend displays" to actually be
- * smaller than the dimensions of the backend X server.  Therefore, it
- * is possible for more than one of the DMX "backend displays" to be
- * physically located on the same backend X server.  This situation must
- * be detected so that cursor motion can be handled in an expected
- * fashion.
- *
- * We could analyze the names used for the DMX "backend displays" (e.g.,
- * the names passed to the -display command-line parameter), but there
- * are many possible names for a single X display, and failing to detect
- * sameness leads to very unexpected results.  Therefore, whenever the
- * DMX server opens a window on a backend X server, a property value is
- * queried and set on that backend to detect when another window is
- * already open on that server.
- *
- * Further, it is possible that two different DMX server instantiations
- * both have windows on the same physical backend X server.  This case
- * is also detected so that pointer input is not taken from that
- * particular backend X server.
- *
- * The routines in this file handle the property management. */
-
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#include "dmx.h"
-#include "dmxprop.h"
-#include "dmxlog.h"
-#include <X11/Xmu/SysUtil.h>    /* For XmuGetHostname */
-
-/** Holds the window id of all DMX windows on the backend X server. */
-#define DMX_ATOMNAME "DMX_NAME"
-
-/** The identification string of this DMX server */
-#define DMX_IDENT    "Xdmx"
-
-extern char *display;
-
-static int
-dmxPropertyErrorHandler(Display * dpy, XErrorEvent * ev)
-{
-    return 0;
-}
-
-static const unsigned char *
-dmxPropertyIdentifier(void)
-{
-    /* RATS: These buffers are only used in
-     * length-limited calls. */
-    char hostname[256];
-    static char buf[512];
-    static int initialized = 0;
-
-    if (initialized++)
-        return (unsigned char *) buf;
-
-    XmuGetHostname(hostname, sizeof(hostname));
-    snprintf(buf, sizeof(buf), "%s:%s:%s", DMX_IDENT, hostname, display);
-    return (unsigned char *) buf;
-}
-
-/** Starting with the \a start screen, iterate over all of the screens
- * on the same physical X server as \a start, calling \a f with the
- * screen and the \a closure.  (The common case is that \a start is the
- * only DMX window on the backend X server.) */
-void *
-dmxPropertyIterate(DMXScreenInfo * start,
-                   void *(*f) (DMXScreenInfo * dmxScreen, void *),
-                   void *closure)
-{
-    DMXScreenInfo *pt;
-
-    if (!start->next) {
-        if (!start->beDisplay)
-            return NULL;
-        return f(start, closure);
-    }
-
-    for (pt = start->next; /* condition at end of loop */ ; pt = pt->next) {
-        void *retval;
-
-        /* beDisplay ban be NULL if a screen was detached */
-        dmxLog(dmxDebug, "pt = %p\n", pt);
-        dmxLog(dmxDebug, "pt->beDisplay = %p\n", pt->beDisplay);
-        if (pt->beDisplay && (retval = f(pt, closure)))
-            return retval;
-        if (pt == start)
-            break;
-    }
-    return NULL;
-}
-
-/** Returns 0 if this is the only Xdmx session on the display; 1
- * otherwise. */
-static int
-dmxPropertyCheckOtherServers(DMXScreenInfo * dmxScreen, Atom atom)
-{
-    Display *dpy = dmxScreen->beDisplay;
-    XTextProperty tp;
-    XTextProperty tproot;
-    const char *pt;
-    int retcode = 0;
-    char **list = NULL;
-    int count = 0;
-    int i;
-    int (*dmxOldHandler) (Display *, XErrorEvent *);
-
-    if (!dpy)
-        return 0;
-
-    if (!XGetTextProperty(dpy, RootWindow(dpy, 0), &tproot, atom)
-        || !tproot.nitems)
-        return 0;
-
-    /* Ignore BadWindow errors for this
-     * routine because the window id stored
-     * in the property might be old */
-    dmxOldHandler = XSetErrorHandler(dmxPropertyErrorHandler);
-    for (pt = (const char *) tproot.value; pt && *pt; pt = pt ? pt + 1 : NULL) {
-        if ((pt = strchr(pt, ','))) {
-            Window win = strtol(pt + 1, NULL, 10);
-
-            if (XGetTextProperty(dpy, win, &tp, atom) && tp.nitems) {
-                if (!strncmp((char *) tp.value, DMX_IDENT, strlen(DMX_IDENT))) {
-                    int flag = 0;
-
-                    for (i = 0; i < count; i++)
-                        if (!strcmp(list[i], (char *) tp.value)) {
-                            ++flag;
-                            break;
-                        }
-                    if (flag)
-                        continue;
-                    ++retcode;
-                    dmxLogOutputWarning(dmxScreen,
-                                        "%s also running on %s\n",
-                                        tp.value, dmxScreen->name);
-                    list = reallocarray(list, ++count, sizeof(*list));
-                    list[count - 1] = malloc(tp.nitems + 2);
-                    strncpy(list[count - 1], (char *) tp.value, tp.nitems + 1);
-                }
-                XFree(tp.value);
-            }
-        }
-    }
-    XSetErrorHandler(dmxOldHandler);
-
-    for (i = 0; i < count; i++)
-        free(list[i]);
-    free(list);
-    XFree(tproot.value);
-    if (!retcode)
-        dmxLogOutput(dmxScreen, "No Xdmx server running on backend\n");
-    return retcode;
-}
-
-/** Returns NULL if this is the only Xdmx window on the display.
- * Otherwise, returns a pointer to the dmxScreen of the other windows on
- * the display. */
-static DMXScreenInfo *
-dmxPropertyCheckOtherWindows(DMXScreenInfo * dmxScreen, Atom atom)
-{
-    Display *dpy = dmxScreen->beDisplay;
-    const unsigned char *id = dmxPropertyIdentifier();
-    XTextProperty tproot;
-    XTextProperty tp;
-    const char *pt;
-    int (*dmxOldHandler) (Display *, XErrorEvent *);
-
-    if (!dpy)
-        return NULL;
-
-    if (!XGetTextProperty(dpy, RootWindow(dpy, 0), &tproot, atom)
-        || !tproot.nitems)
-        return 0;
-
-    /* Ignore BadWindow errors for this
-     * routine because the window id stored
-     * in the property might be old */
-    dmxOldHandler = XSetErrorHandler(dmxPropertyErrorHandler);
-    for (pt = (const char *) tproot.value; pt && *pt; pt = pt ? pt + 1 : NULL) {
-        if ((pt = strchr(pt, ','))) {
-            Window win = strtol(pt + 1, NULL, 10);
-
-            if (XGetTextProperty(dpy, win, &tp, atom) && tp.nitems) {
-                dmxLog(dmxDebug, "On %s/%lu: %s\n",
-                       dmxScreen->name, (unsigned long) win, tp.value);
-                if (!strncmp((char *) tp.value, (char *) id,
-                             strlen((char *) id))) {
-                    int idx;
-
-                    if (!(pt = strchr((char *) tp.value, ',')))
-                        continue;
-                    idx = strtol(pt + 1, NULL, 10);
-                    if (idx < 0 || idx >= dmxNumScreens)
-                        continue;
-                    if (dmxScreens[idx].scrnWin != win)
-                        continue;
-                    XSetErrorHandler(dmxOldHandler);
-                    return &dmxScreens[idx];
-                }
-                XFree(tp.value);
-            }
-        }
-    }
-    XSetErrorHandler(dmxOldHandler);
-    XFree(tproot.value);
-    return 0;
-}
-
-/** Returns 0 if this is the only Xdmx session on the display; 1
- * otherwise. */
-int
-dmxPropertyDisplay(DMXScreenInfo * dmxScreen)
-{
-    Atom atom;
-    const unsigned char *id = dmxPropertyIdentifier();
-    Display *dpy = dmxScreen->beDisplay;
-
-    if (!dpy)
-        return 0;
-
-    atom = XInternAtom(dpy, DMX_ATOMNAME, False);
-    if (dmxPropertyCheckOtherServers(dmxScreen, atom)) {
-        dmxScreen->shared = 1;
-        return 1;
-    }
-    XChangeProperty(dpy, RootWindow(dpy, 0), atom, XA_STRING, 8,
-                    PropModeReplace, id, strlen((char *) id));
-    return 0;
-}
-
-/** Returns 1 if the dmxScreen and the display in \a name are on the
- * same display, or 0 otherwise.  We can't just compare the display
- * names because there can be multiple synonyms for the same display,
- * some of which cannot be determined without accessing the display
- * itself (e.g., domain aliases or machines with multiple NICs). */
-int
-dmxPropertySameDisplay(DMXScreenInfo * dmxScreen, const char *name)
-{
-    Display *dpy0 = dmxScreen->beDisplay;
-    Atom atom0;
-    XTextProperty tp0;
-    Display *dpy1 = NULL;
-    Atom atom1;
-    XTextProperty tp1;
-    int retval = 0;
-
-    if (!dpy0)
-        return 0;
-
-    tp0.nitems = 0;
-    tp1.nitems = 0;
-
-    if ((atom0 = XInternAtom(dpy0, DMX_ATOMNAME, True)) == None) {
-        dmxLog(dmxWarning, "No atom on %s\n", dmxScreen->name);
-        return 0;
-    }
-    if (!XGetTextProperty(dpy0, RootWindow(dpy0, 0), &tp0, atom0)
-        || !tp0.nitems) {
-        dmxLog(dmxWarning, "No text property on %s\n", dmxScreen->name);
-        return 0;
-    }
-
-    if (!(dpy1 = XOpenDisplay(name))) {
-        dmxLog(dmxWarning, "Cannot open %s\n", name);
-        goto cleanup;
-    }
-    atom1 = XInternAtom(dpy1, DMX_ATOMNAME, True);
-    if (atom1 == None) {
-        dmxLog(dmxDebug, "No atom on %s\n", name);
-        goto cleanup;
-    }
-    if (!XGetTextProperty(dpy1, RootWindow(dpy1, 0), &tp1, atom1)
-        || !tp1.nitems) {
-        dmxLog(dmxDebug, "No text property on %s\n", name);
-        goto cleanup;
-    }
-    if (!strcmp((char *) tp0.value, (char *) tp1.value))
-        retval = 1;
-
- cleanup:
-    if (tp0.nitems)
-        XFree(tp0.value);
-    if (tp1.nitems)
-        XFree(tp1.value);
-    if (dpy1)
-        XCloseDisplay(dpy1);
-    return retval;
-}
-
-/** Prints a log message if \a dmxScreen is on the same backend X server
- * as some other DMX backend (output) screen.  Modifies the property
- * (#DMX_ATOMNAME) on the backend X server to reflect the creation of \a
- * dmxScreen.
- *
- * The root window of the backend X server holds a list of window ids
- * for all DMX windows (on this DMX server or some other DMX server).
- *
- * This list can then be iterated, and the property for each window can
- * be examined.  This property contains the following tuple (no quotes):
- *
- * "#DMX_IDENT:<hostname running DMX>:<display name of DMX>,<screen number>"
- */
-void
-dmxPropertyWindow(DMXScreenInfo * dmxScreen)
-{
-    Atom atom;
-    const unsigned char *id = dmxPropertyIdentifier();
-    Display *dpy = dmxScreen->beDisplay;
-    Window win = dmxScreen->scrnWin;
-    DMXScreenInfo *other;
-    char buf[1024];              /* RATS: only used with snprintf */
-
-    if (!dpy)
-        return;                 /* FIXME: What should be done here if Xdmx is started
-                                 * with this screen initially detached?
-                                 */
-
-    atom = XInternAtom(dpy, DMX_ATOMNAME, False);
-    if ((other = dmxPropertyCheckOtherWindows(dmxScreen, atom))) {
-        DMXScreenInfo *tmp = dmxScreen->next;
-
-        dmxScreen->next = (other->next ? other->next : other);
-        other->next = (tmp ? tmp : dmxScreen);
-        dmxLog(dmxDebug, "%d/%s/%lu and %d/%s/%lu are on the same backend\n",
-               dmxScreen->index, dmxScreen->name, (unsigned long) dmxScreen->scrnWin,
-               other->index, other->name, (unsigned long) other->scrnWin);
-    }
-
-    snprintf(buf, sizeof(buf), ".%d,%lu", dmxScreen->index,
-             (long unsigned) win);
-    XChangeProperty(dpy, RootWindow(dpy, 0), atom, XA_STRING, 8,
-                    PropModeAppend, (unsigned char *) buf, strlen(buf));
-
-    snprintf(buf, sizeof(buf), "%s,%d", id, dmxScreen->index);
-    XChangeProperty(dpy, win, atom, XA_STRING, 8,
-                    PropModeAppend, (unsigned char *) buf, strlen(buf));
-}
diff --git a/hw/dmx/dmxprop.h b/hw/dmx/dmxprop.h
deleted file mode 100644
index a117052..0000000
--- a/hw/dmx/dmxprop.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2002,2003 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-/** \file
- * Interface for property support.  \see dmxprop.c */
-
-#ifndef _DMXPROP_H_
-#define _DMXPROP_H_
-extern int dmxPropertyDisplay(DMXScreenInfo * dmxScreen);
-extern void dmxPropertyWindow(DMXScreenInfo * dmxScreen);
-extern void *dmxPropertyIterate(DMXScreenInfo * start,
-                                void *(*f) (DMXScreenInfo * dmxScreen,
-                                            void *closure), void *closure);
-extern int dmxPropertySameDisplay(DMXScreenInfo * dmxScreen, const char *name);
-#endif
diff --git a/hw/dmx/dmxscrinit.c b/hw/dmx/dmxscrinit.c
deleted file mode 100644
index ae095e3..0000000
--- a/hw/dmx/dmxscrinit.c
+++ /dev/null
@@ -1,485 +0,0 @@
-/*
- * Copyright 2001-2004 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Kevin E. Martin <kem@redhat.com>
- *   David H. Dawes <dawes@xfree86.org>
- *
- */
-
-/** \file
- * This file provides support for screen initialization. */
-
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#include "dmx.h"
-#include "dmxsync.h"
-#include "dmxscrinit.h"
-#include "dmxcursor.h"
-#include "dmxgc.h"
-#include "dmxgcops.h"
-#include "dmxwindow.h"
-#include "dmxpixmap.h"
-#include "dmxfont.h"
-#include "dmxcmap.h"
-#include "dmxprop.h"
-#include "dmxdpms.h"
-
-#include "dmxpict.h"
-
-#include "fb.h"
-#include "mipointer.h"
-#include "micmap.h"
-
-#include <X11/fonts/libxfont2.h>
-
-extern Bool dmxCloseScreen(ScreenPtr pScreen);
-static Bool dmxSaveScreen(ScreenPtr pScreen, int what);
-
-static unsigned long dmxGeneration;
-static unsigned long *dmxCursorGeneration;
-
-DevPrivateKeyRec dmxGCPrivateKeyRec;
-DevPrivateKeyRec dmxWinPrivateKeyRec;
-DevPrivateKeyRec dmxPixPrivateKeyRec;
-int dmxFontPrivateIndex;        /**< Private index for Fonts     */
-DevPrivateKeyRec dmxScreenPrivateKeyRec;
-DevPrivateKeyRec dmxColormapPrivateKeyRec;
-DevPrivateKeyRec dmxPictPrivateKeyRec;
-DevPrivateKeyRec dmxGlyphSetPrivateKeyRec;
-
-#ifdef DPMSExtension
-static void
-dmxDPMS(ScreenPtr pScreen, int level)
-{
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    dmxDPMSBackend(dmxScreen, level);
-}
-#else
-#define dmxDPMS NULL
-#endif
-
-/** Initialize the parts of screen \a idx that require access to the
- *  back-end server. */
-void
-dmxBEScreenInit(ScreenPtr pScreen)
-{
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    XSetWindowAttributes attribs;
-    unsigned long mask;
-    int i, j;
-
-    /* FIXME: The dmxScreenInit() code currently assumes that it will
-     * not be called if the Xdmx server is started with this screen
-     * detached -- i.e., it assumes that dmxScreen->beDisplay is always
-     * valid.  This is not necessarily a valid assumption when full
-     * addition/removal of screens is implemented, but when this code is
-     * broken out for screen reattachment, then we will reevaluate this
-     * assumption.
-     */
-
-    pScreen->mmWidth = DisplayWidthMM(dmxScreen->beDisplay,
-                                      DefaultScreen(dmxScreen->beDisplay));
-    pScreen->mmHeight = DisplayHeightMM(dmxScreen->beDisplay,
-                                        DefaultScreen(dmxScreen->beDisplay));
-
-    pScreen->whitePixel = dmxScreen->beWhitePixel;
-    pScreen->blackPixel = dmxScreen->beBlackPixel;
-
-    /* Handle screen savers and DPMS on the backend */
-    if (dmxDPMSInit(dmxScreen))
-        pScreen->DPMS = dmxDPMS;
-
-    /* Create root window for screen */
-    mask = CWBackPixel | CWEventMask | CWColormap | CWOverrideRedirect;
-    attribs.background_pixel = dmxScreen->beBlackPixel;
-    attribs.event_mask = (KeyPressMask
-                          | KeyReleaseMask
-                          | ButtonPressMask
-                          | ButtonReleaseMask
-                          | EnterWindowMask
-                          | LeaveWindowMask
-                          | PointerMotionMask
-                          | KeymapStateMask | FocusChangeMask);
-    attribs.colormap = dmxScreen->beDefColormaps[dmxScreen->beDefVisualIndex];
-    attribs.override_redirect = True;
-
-    dmxScreen->scrnWin =
-        XCreateWindow(dmxScreen->beDisplay,
-                      DefaultRootWindow(dmxScreen->beDisplay),
-                      dmxScreen->scrnX,
-                      dmxScreen->scrnY,
-                      dmxScreen->scrnWidth,
-                      dmxScreen->scrnHeight,
-                      0,
-                      pScreen->rootDepth,
-                      InputOutput,
-                      dmxScreen->beVisuals[dmxScreen->beDefVisualIndex].visual,
-                      mask, &attribs);
-    dmxPropertyWindow(dmxScreen);
-
-    /*
-     * This turns off the cursor by defining a cursor with no visible
-     * components.
-     */
-    {
-        char noCursorData[] = { 0, 0, 0, 0,
-            0, 0, 0, 0
-        };
-        Pixmap pixmap;
-        XColor color, tmp;
-
-        pixmap = XCreateBitmapFromData(dmxScreen->beDisplay, dmxScreen->scrnWin,
-                                       noCursorData, 8, 8);
-        XAllocNamedColor(dmxScreen->beDisplay, dmxScreen->beDefColormaps[0],
-                         "black", &color, &tmp);
-        dmxScreen->noCursor = XCreatePixmapCursor(dmxScreen->beDisplay,
-                                                  pixmap, pixmap,
-                                                  &color, &color, 0, 0);
-        XDefineCursor(dmxScreen->beDisplay, dmxScreen->scrnWin,
-                      dmxScreen->noCursor);
-
-        XFreePixmap(dmxScreen->beDisplay, pixmap);
-    }
-
-    XMapWindow(dmxScreen->beDisplay, dmxScreen->scrnWin);
-
-    /* Create default drawables (used during GC creation) */
-    for (i = 0; i < dmxScreen->beNumPixmapFormats; i++)
-	for (j = 0; j < dmxScreen->beNumDepths; j++)
-	    if ((dmxScreen->bePixmapFormats[i].depth == 1) ||
-		(dmxScreen->bePixmapFormats[i].depth ==
-		 dmxScreen->beDepths[j])) {
-		dmxScreen->scrnDefDrawables[i] = (Drawable)
-		    XCreatePixmap(dmxScreen->beDisplay, dmxScreen->scrnWin,
-				  1, 1,
-				  dmxScreen->bePixmapFormats[i].depth);
-		break;
-	    }
-}
-
-/** Initialize screen number \a pScreen->myNum. */
-Bool
-dmxScreenInit(ScreenPtr pScreen, int argc, char *argv[])
-{
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    int i, j;
-
-    if (!dixRegisterPrivateKey(&dmxScreenPrivateKeyRec, PRIVATE_SCREEN, 0))
-        return FALSE;
-    if (!dixRegisterPrivateKey(&dmxColormapPrivateKeyRec, PRIVATE_COLORMAP, 0))
-        return FALSE;
-    if (!dixRegisterPrivateKey(&dmxGlyphSetPrivateKeyRec, PRIVATE_GLYPHSET, 0))
-        return FALSE;
-
-    if (dmxGeneration != serverGeneration) {
-        /* Allocate font private index */
-        dmxFontPrivateIndex = xfont2_allocate_font_private_index();
-        if (dmxFontPrivateIndex == -1)
-            return FALSE;
-
-        dmxGeneration = serverGeneration;
-    }
-
-    if (!dmxInitGC(pScreen))
-	return FALSE;
-    if (!dmxInitWindow(pScreen))
-	return FALSE;
-    if (!dmxInitPixmap(pScreen))
-	return FALSE;
-
-    /*
-     * Initalise the visual types.  miSetVisualTypesAndMasks() requires
-     * that all of the types for each depth be collected together.  It's
-     * intended for slightly different usage to what we would like here.
-     * Maybe a miAddVisualTypeAndMask() function will be added to make
-     * things easier here.
-     */
-    for (i = 0; i < dmxScreen->beNumDepths; i++) {
-        int depth;
-        int visuals = 0;
-        int bitsPerRgb = 0;
-        int preferredClass = -1;
-        Pixel redMask = 0;
-        Pixel greenMask = 0;
-        Pixel blueMask = 0;
-
-        depth = dmxScreen->beDepths[i];
-        for (j = 0; j < dmxScreen->beNumVisuals; j++) {
-            XVisualInfo *vi;
-
-            vi = &dmxScreen->beVisuals[j];
-            if (vi->depth == depth) {
-                /* Assume the masks are all the same. */
-                visuals |= (1 << vi->class);
-                bitsPerRgb = vi->bits_per_rgb;
-                redMask = vi->red_mask;
-                greenMask = vi->green_mask;
-                blueMask = vi->blue_mask;
-                if (j == dmxScreen->beDefVisualIndex) {
-                    preferredClass = vi->class;
-                }
-            }
-        }
-        miSetVisualTypesAndMasks(depth, visuals, bitsPerRgb, preferredClass,
-                                 redMask, greenMask, blueMask);
-    }
-
-    fbScreenInit(pScreen,
-                 NULL,
-                 dmxScreen->scrnWidth,
-                 dmxScreen->scrnHeight,
-                 dmxScreen->beXDPI,
-                 dmxScreen->beXDPI, dmxScreen->scrnWidth, dmxScreen->beBPP);
-    (void) dmxPictureInit(pScreen, 0, 0);
-
-    /* Not yet... */
-    pScreen->GetWindowPixmap = NULL;
-    pScreen->SetWindowPixmap = NULL;
-
-    MAXSCREENSALLOC(dmxCursorGeneration);
-    if (dmxCursorGeneration[pScreen->myNum] != serverGeneration) {
-	if (!(miPointerInitialize(pScreen,
-				  &dmxPointerSpriteFuncs,
-				  &dmxPointerCursorFuncs, FALSE)))
-	    return FALSE;
-
-	dmxCursorGeneration[pScreen->myNum] = serverGeneration;
-    }
-
-    DMX_WRAP(CloseScreen, dmxCloseScreen, dmxScreen, pScreen);
-    DMX_WRAP(SaveScreen, dmxSaveScreen, dmxScreen, pScreen);
-
-    dmxBEScreenInit(pScreen);
-
-    /* Wrap GC functions */
-    DMX_WRAP(CreateGC, dmxCreateGC, dmxScreen, pScreen);
-
-    /* Wrap Window functions */
-    DMX_WRAP(CreateWindow, dmxCreateWindow, dmxScreen, pScreen);
-    DMX_WRAP(DestroyWindow, dmxDestroyWindow, dmxScreen, pScreen);
-    DMX_WRAP(PositionWindow, dmxPositionWindow, dmxScreen, pScreen);
-    DMX_WRAP(ChangeWindowAttributes, dmxChangeWindowAttributes, dmxScreen,
-	     pScreen);
-    DMX_WRAP(RealizeWindow, dmxRealizeWindow, dmxScreen, pScreen);
-    DMX_WRAP(UnrealizeWindow, dmxUnrealizeWindow, dmxScreen, pScreen);
-    DMX_WRAP(RestackWindow, dmxRestackWindow, dmxScreen, pScreen);
-    DMX_WRAP(WindowExposures, dmxWindowExposures, dmxScreen, pScreen);
-    DMX_WRAP(CopyWindow, dmxCopyWindow, dmxScreen, pScreen);
-
-    DMX_WRAP(ResizeWindow, dmxResizeWindow, dmxScreen, pScreen);
-    DMX_WRAP(ReparentWindow, dmxReparentWindow, dmxScreen, pScreen);
-
-    DMX_WRAP(ChangeBorderWidth, dmxChangeBorderWidth, dmxScreen, pScreen);
-
-    /* Wrap Image functions */
-    DMX_WRAP(GetImage, dmxGetImage, dmxScreen, pScreen);
-    DMX_WRAP(GetSpans, dmxGetSpans, dmxScreen, pScreen);
-
-    /* Wrap Pixmap functions */
-    DMX_WRAP(CreatePixmap, dmxCreatePixmap, dmxScreen, pScreen);
-    DMX_WRAP(DestroyPixmap, dmxDestroyPixmap, dmxScreen, pScreen);
-    DMX_WRAP(BitmapToRegion, dmxBitmapToRegion, dmxScreen, pScreen);
-
-    /* Wrap Font functions */
-    DMX_WRAP(RealizeFont, dmxRealizeFont, dmxScreen, pScreen);
-    DMX_WRAP(UnrealizeFont, dmxUnrealizeFont, dmxScreen, pScreen);
-
-    /* Wrap Colormap functions */
-    DMX_WRAP(CreateColormap, dmxCreateColormap, dmxScreen, pScreen);
-    DMX_WRAP(DestroyColormap, dmxDestroyColormap, dmxScreen, pScreen);
-    DMX_WRAP(InstallColormap, dmxInstallColormap, dmxScreen, pScreen);
-    DMX_WRAP(StoreColors, dmxStoreColors, dmxScreen, pScreen);
-
-    /* Wrap Shape functions */
-    DMX_WRAP(SetShape, dmxSetShape, dmxScreen, pScreen);
-
-    if (!dmxCreateDefColormap(pScreen))
-        return FALSE;
-
-    return TRUE;
-}
-
-/** Close the \a pScreen resources on the back-end server. */
-void
-dmxBECloseScreen(ScreenPtr pScreen)
-{
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    int i;
-
-    /* Restore the back-end screen-saver and DPMS state. */
-    dmxDPMSTerm(dmxScreen);
-
-    /* Free the screen resources */
-
-    XFreeCursor(dmxScreen->beDisplay, dmxScreen->noCursor);
-    dmxScreen->noCursor = (Cursor) 0;
-
-    XUnmapWindow(dmxScreen->beDisplay, dmxScreen->scrnWin);
-    XDestroyWindow(dmxScreen->beDisplay, dmxScreen->scrnWin);
-    dmxScreen->scrnWin = (Window) 0;
-
-    /* Free the default drawables */
-    for (i = 0; i < dmxScreen->beNumPixmapFormats; i++) {
-	if (dmxScreen->scrnDefDrawables[i]) {
-	    XFreePixmap(dmxScreen->beDisplay,
-			dmxScreen->scrnDefDrawables[i]);
-	    dmxScreen->scrnDefDrawables[i] = (Drawable) 0;
-	}
-    }
-
-    /* Free resources allocated during initialization (in dmxinit.c) */
-    for (i = 0; i < dmxScreen->beNumDefColormaps; i++)
-        XFreeColormap(dmxScreen->beDisplay, dmxScreen->beDefColormaps[i]);
-    free(dmxScreen->beDefColormaps);
-    dmxScreen->beDefColormaps = NULL;
-
-#if 0
-    /* Do not free visuals, depths and pixmap formats here.  Free them
-     * in dmxCloseScreen() instead -- see comment below. */
-    XFree(dmxScreen->beVisuals);
-    dmxScreen->beVisuals = NULL;
-
-    XFree(dmxScreen->beDepths);
-    dmxScreen->beDepths = NULL;
-
-    XFree(dmxScreen->bePixmapFormats);
-    dmxScreen->bePixmapFormats = NULL;
-#endif
-
-#ifdef GLXEXT
-    if (dmxScreen->glxVisuals) {
-        XFree(dmxScreen->glxVisuals);
-        dmxScreen->glxVisuals = NULL;
-        dmxScreen->numGlxVisuals = 0;
-    }
-#endif
-
-    /* Close display */
-    XCloseDisplay(dmxScreen->beDisplay);
-    dmxScreen->beDisplay = NULL;
-}
-
-/** Close screen number \a idx. */
-Bool
-dmxCloseScreen(ScreenPtr pScreen)
-{
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-
-    /* Reset the proc vectors */
-    if (pScreen->myNum == 0) {
-        dmxResetRender();
-        dmxResetFonts();
-    }
-
-    /* Unwrap Shape functions */
-    DMX_UNWRAP(SetShape, dmxScreen, pScreen);
-
-    /* Unwrap the pScreen functions */
-    DMX_UNWRAP(CreateGC, dmxScreen, pScreen);
-
-    DMX_UNWRAP(CreateWindow, dmxScreen, pScreen);
-    DMX_UNWRAP(DestroyWindow, dmxScreen, pScreen);
-    DMX_UNWRAP(PositionWindow, dmxScreen, pScreen);
-    DMX_UNWRAP(ChangeWindowAttributes, dmxScreen, pScreen);
-    DMX_UNWRAP(RealizeWindow, dmxScreen, pScreen);
-    DMX_UNWRAP(UnrealizeWindow, dmxScreen, pScreen);
-    DMX_UNWRAP(RestackWindow, dmxScreen, pScreen);
-    DMX_UNWRAP(WindowExposures, dmxScreen, pScreen);
-    DMX_UNWRAP(CopyWindow, dmxScreen, pScreen);
-
-    DMX_UNWRAP(ResizeWindow, dmxScreen, pScreen);
-    DMX_UNWRAP(ReparentWindow, dmxScreen, pScreen);
-
-    DMX_UNWRAP(ChangeBorderWidth, dmxScreen, pScreen);
-
-    DMX_UNWRAP(GetImage, dmxScreen, pScreen);
-    DMX_UNWRAP(GetSpans, dmxScreen, pScreen);
-
-    DMX_UNWRAP(CreatePixmap, dmxScreen, pScreen);
-    DMX_UNWRAP(DestroyPixmap, dmxScreen, pScreen);
-    DMX_UNWRAP(BitmapToRegion, dmxScreen, pScreen);
-
-    DMX_UNWRAP(RealizeFont, dmxScreen, pScreen);
-    DMX_UNWRAP(UnrealizeFont, dmxScreen, pScreen);
-
-    DMX_UNWRAP(CreateColormap, dmxScreen, pScreen);
-    DMX_UNWRAP(DestroyColormap, dmxScreen, pScreen);
-    DMX_UNWRAP(InstallColormap, dmxScreen, pScreen);
-    DMX_UNWRAP(StoreColors, dmxScreen, pScreen);
-
-    DMX_UNWRAP(SaveScreen, dmxScreen, pScreen);
-
-    if (dmxScreen->beDisplay) {
-        dmxBECloseScreen(pScreen);
-
-#if 1
-        /* Free visuals, depths and pixmap formats here so that they
-         * won't be freed when a screen is detached, thereby allowing
-         * the screen to be reattached to be compared to the one
-         * previously removed.
-         */
-        XFree(dmxScreen->beVisuals);
-        dmxScreen->beVisuals = NULL;
-
-        XFree(dmxScreen->beDepths);
-        dmxScreen->beDepths = NULL;
-
-        XFree(dmxScreen->bePixmapFormats);
-        dmxScreen->bePixmapFormats = NULL;
-#endif
-    }
-
-    DMX_UNWRAP(CloseScreen, dmxScreen, pScreen);
-    return pScreen->CloseScreen(pScreen);
-}
-
-static Bool
-dmxSaveScreen(ScreenPtr pScreen, int what)
-{
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-
-    if (dmxScreen->beDisplay) {
-        switch (what) {
-        case SCREEN_SAVER_OFF:
-        case SCREEN_SAVER_FORCER:
-            XResetScreenSaver(dmxScreen->beDisplay);
-            dmxSync(dmxScreen, FALSE);
-            break;
-        case SCREEN_SAVER_ON:
-        case SCREEN_SAVER_CYCLE:
-            XActivateScreenSaver(dmxScreen->beDisplay);
-            dmxSync(dmxScreen, FALSE);
-            break;
-        }
-    }
-
-    return TRUE;
-}
diff --git a/hw/dmx/dmxscrinit.h b/hw/dmx/dmxscrinit.h
deleted file mode 100644
index 9fe9c98..0000000
--- a/hw/dmx/dmxscrinit.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright 2001-2004 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Kevin E. Martin <kem@redhat.com>
- *   David H. Dawes <dawes@xfree86.org>
- *
- */
-
-/** \file
- * Interface for screen initialization.  \see dmxscrinit.c */
-
-#ifndef DMXSCRINIT_H
-#define DMXSCRINIT_H
-
-#include "scrnintstr.h"
-
-extern Bool dmxScreenInit(ScreenPtr pScreen, int argc, char *argv[]);
-
-extern void dmxBEScreenInit(ScreenPtr pScreen);
-extern void dmxBECloseScreen(ScreenPtr pScreen);
-
-#endif                          /* DMXSCRINIT_H */
diff --git a/hw/dmx/dmxstat.c b/hw/dmx/dmxstat.c
deleted file mode 100644
index 0ae5107..0000000
--- a/hw/dmx/dmxstat.c
+++ /dev/null
@@ -1,238 +0,0 @@
-/*
- * Copyright 2002, 2003 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-/** \file
- *
- * The DMX server code is written to call #dmxSync() whenever an XSync()
- * might be necessary.  However, since XSync() requires a two way
- * communication with the other X server, eliminating unnecessary
- * XSync() calls is a key performance optimization.  Support for this
- * optimization is provided in \a dmxsync.c.  This file provides routines
- * that evaluate this optimization by counting the number of XSync()
- * calls and monitoring their latency.  This functionality can be turned
- * on using the -stat command-line parameter. */
-
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#include "dmx.h"
-#include "dmxstat.h"
-#include "dmxlog.h"
-#include <X11/Xos.h>            /* For sys/time.h */
-
-/** Used to compute a running average of value. */
-typedef struct _DMXStatAvg {
-    int pos;
-    int count;
-    unsigned long value[DMX_STAT_LENGTH];
-} DMXStatAvg;
-
-/** Statistical information about XSync calls. */
-struct _DMXStatInfo {
-    unsigned long syncCount;
-    unsigned long oldSyncCount;
-
-    DMXStatAvg usec;
-    DMXStatAvg pending;
-
-    unsigned long bins[DMX_STAT_BINS];
-};
-
-/* Interval in mS between statistic message log entries. */
-int dmxStatInterval;
-static int dmxStatDisplays;
-static OsTimerPtr dmxStatTimer;
-
-/** Return the number of microseconds as an unsigned long.
- * Unfortunately, this is only useful for intervals < about 4 sec.  */
-static unsigned long
-usec(struct timeval *stop, struct timeval *start)
-{
-    return (stop->tv_sec - start->tv_sec) * 1000000
-        + stop->tv_usec - start->tv_usec;
-}
-
-static unsigned long
-avg(DMXStatAvg * data, unsigned long *max)
-{
-    unsigned long sum;
-    int i;
-
-    *max = 0;
-    if (!data->count)
-        return 0;
-
-    for (i = 0, sum = 0; i < data->count; i++) {
-        if (data->value[i] > *max)
-            *max = data->value[i];
-        sum += data->value[i];
-    }
-    return sum / data->count;
-}
-
-/** Turn on XSync statistic gathering and printing.  Print every \a
- * interval seconds, with lines for the first \a displays.  If \a
- * interval is NULL, 1 will be used.  If \a displays is NULL, 0 will be
- * used (meaning a line for every display will be printed).  Note that
- * this function takes string arguments because it will usually be
- * called from #ddxProcessArgument in \a dmxinit.c. */
-void
-dmxStatActivate(const char *interval, const char *displays)
-{
-    dmxStatInterval = (interval ? atoi(interval) : 1) * 1000;
-    dmxStatDisplays = (displays ? atoi(displays) : 0);
-
-    if (dmxStatInterval < 1000)
-        dmxStatInterval = 1000;
-    if (dmxStatDisplays < 0)
-        dmxStatDisplays = 0;
-}
-
-/** Allocate a \a DMXStatInfo structure. */
-DMXStatInfo *
-dmxStatAlloc(void)
-{
-    DMXStatInfo *pt = calloc(1, sizeof(*pt));
-
-    return pt;
-}
-
-/** Free the memory used by a \a DMXStatInfo structure. */
-void
-dmxStatFree(DMXStatInfo * pt)
-{
-    free(pt);
-}
-
-static void
-dmxStatValue(DMXStatAvg * data, unsigned long value)
-{
-    if (data->count != DMX_STAT_LENGTH)
-        ++data->count;
-    if (data->pos >= DMX_STAT_LENGTH - 1)
-        data->pos = 0;
-    data->value[data->pos++] = value;
-}
-
-/** Note that a XSync() was just done on \a dmxScreen with the \a start
- * and \a stop times (from gettimeofday()) and the number of
- * pending-but-not-yet-processed XSync requests.  This routine is called
- * from #dmxDoSync in \a dmxsync.c */
-void
-dmxStatSync(DMXScreenInfo * dmxScreen,
-            struct timeval *stop, struct timeval *start, unsigned long pending)
-{
-    DMXStatInfo *s = dmxScreen->stat;
-    unsigned long elapsed = usec(stop, start);
-    unsigned long thresh;
-    int i;
-
-    ++s->syncCount;
-    dmxStatValue(&s->usec, elapsed);
-    dmxStatValue(&s->pending, pending);
-
-    for (i = 0, thresh = DMX_STAT_BIN0; i < DMX_STAT_BINS - 1; i++) {
-        if (elapsed < thresh) {
-            ++s->bins[i];
-            break;
-        }
-        thresh *= DMX_STAT_BINMULT;
-    }
-    if (i == DMX_STAT_BINS - 1)
-        ++s->bins[i];
-}
-
-/* Actually do the work of printing out the human-readable message. */
-static CARD32
-dmxStatCallback(OsTimerPtr timer, CARD32 t, void *arg)
-{
-    int i, j;
-    static int header = 0;
-    int limit = dmxNumScreens;
-
-    if (!dmxNumScreens) {
-        header = 0;
-        return DMX_STAT_INTERVAL;
-    }
-
-    if (!header++ || !(header % 10)) {
-        dmxLog(dmxDebug,
-               " S SyncCount  Sync/s avSync mxSync avPend mxPend | "
-               "<10ms   <1s   >1s\n");
-    }
-
-    if (dmxStatDisplays && dmxStatDisplays < limit)
-        limit = dmxStatDisplays;
-    for (i = 0; i < limit; i++) {
-        DMXScreenInfo *dmxScreen = &dmxScreens[i];
-        DMXStatInfo *s = dmxScreen->stat;
-        unsigned long aSync, mSync;
-        unsigned long aPend, mPend;
-
-        if (!s)
-            continue;
-
-        aSync = avg(&s->usec, &mSync);
-        aPend = avg(&s->pending, &mPend);
-        dmxLog(dmxDebug, "%2d %9lu %7lu %6lu %6lu %6lu %6lu |", i,      /* S */
-               s->syncCount,    /* SyncCount */
-               (s->syncCount - s->oldSyncCount) * 1000 / dmxStatInterval,       /* Sync/s */
-               aSync,           /* us/Sync */
-               mSync,           /* max/Sync */
-               aPend,           /* avgPend */
-               mPend);          /* maxPend */
-        for (j = 0; j < DMX_STAT_BINS; j++)
-            dmxLogCont(dmxDebug, " %5lu", s->bins[j]);
-        dmxLogCont(dmxDebug, "\n");
-
-        /* Reset/clear */
-        s->oldSyncCount = s->syncCount;
-        for (j = 0; j < DMX_STAT_BINS; j++)
-            s->bins[j] = 0;
-    }
-    return DMX_STAT_INTERVAL;   /* Place on queue again */
-}
-
-/** Try to initialize the statistic gathering and printing routines.
- * Initialization only takes place if #dmxStatActivate has already been
- * called.  We don't need the same generation protection that we used in
- * dmxSyncInit because our timer is always on a queue -- hence, server
- * generation will always free it. */
-void
-dmxStatInit(void)
-{
-    if (dmxStatInterval)
-        dmxStatTimer = TimerSet(NULL, 0,
-                                dmxStatInterval, dmxStatCallback, NULL);
-}
diff --git a/hw/dmx/dmxstat.h b/hw/dmx/dmxstat.h
deleted file mode 100644
index 8c8d7ba..0000000
--- a/hw/dmx/dmxstat.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright 2002 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-/** \file
- * Interface for statistic gathering interface. \see dmxstat.c */
-
-#ifndef _DMXSTAT_H_
-#define _DMXSTAT_H_
-
-#define DMX_STAT_LENGTH     10  /**< number of events for moving average */
-#define DMX_STAT_INTERVAL 1000  /**< msec between printouts */
-#define DMX_STAT_BINS        3  /**< number of bins */
-#define DMX_STAT_BIN0    10000  /**< us for bin[0] */
-#define DMX_STAT_BINMULT   100  /**< multiplier for next bin[] */
-
-extern int dmxStatInterval;         /**< Only for dmxstat.c and dmxsync.c */
-extern void dmxStatActivate(const char *interval, const char *displays);
-extern DMXStatInfo *dmxStatAlloc(void);
-extern void dmxStatFree(DMXStatInfo *);
-extern void dmxStatInit(void);
-extern void dmxStatSync(DMXScreenInfo * dmxScreen,
-                        struct timeval *stop, struct timeval *start,
-                        unsigned long pending);
-
-#endif
diff --git a/hw/dmx/dmxsync.c b/hw/dmx/dmxsync.c
deleted file mode 100644
index b55c9dd..0000000
--- a/hw/dmx/dmxsync.c
+++ /dev/null
@@ -1,207 +0,0 @@
-/*
- * Copyright 2002-2004 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-/** \file
- *
- * The DMX server code is written to call #dmxSync() whenever an XSync()
- * might be necessary.  However, since XSync() requires a two way
- * communication with the other X server, eliminating unnecessary
- * XSync() calls is a key performance optimization.  Support for this
- * optimization is provided here.  Statistics about XSync() calls and
- * latency are gathered in \a dmxstat.c.
- *
- * During the initial conversion from calling XSync() immediately to the
- * XSync() batching method implemented in this file, it was noted that,
- * out of more than 300 \a x11perf tests, 8 tests became more than 100
- * times faster, with 68 more than 50X faster, 114 more than 10X faster,
- * and 181 more than 2X faster. */
-
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#include "dmx.h"
-#include "dmxsync.h"
-#include "dmxstat.h"
-#include "dmxlog.h"
-#include <sys/time.h>
-
-static int dmxSyncInterval = 100;       /* Default interval in milliseconds */
-static OsTimerPtr dmxSyncTimer;
-static int dmxSyncPending;
-
-static void
-dmxDoSync(DMXScreenInfo * dmxScreen)
-{
-    dmxScreen->needsSync = FALSE;
-
-    if (!dmxScreen->beDisplay)
-        return;                 /* FIXME: Is this correct behavior for sync stats? */
-
-    if (!dmxStatInterval) {
-        XSync(dmxScreen->beDisplay, False);
-    }
-    else {
-        struct timeval start, stop;
-
-        gettimeofday(&start, 0);
-        XSync(dmxScreen->beDisplay, False);
-        gettimeofday(&stop, 0);
-        dmxStatSync(dmxScreen, &stop, &start, dmxSyncPending);
-    }
-}
-
-static CARD32
-dmxSyncCallback(OsTimerPtr timer, CARD32 time, void *arg)
-{
-    int i;
-
-    if (dmxSyncPending) {
-        for (i = 0; i < dmxNumScreens; i++) {
-            DMXScreenInfo *dmxScreen = &dmxScreens[i];
-
-            if (dmxScreen->needsSync)
-                dmxDoSync(dmxScreen);
-        }
-    }
-    dmxSyncPending = 0;
-    return 0;                   /* Do not place on queue again */
-}
-
-static void
-dmxSyncBlockHandler(void *blockData, void *timeout)
-{
-    TimerForce(dmxSyncTimer);
-}
-
-static void
-dmxSyncWakeupHandler(void *blockData, int result)
-{
-}
-
-/** Request the XSync() batching optimization with the specified \a
- * interval (in mS).  If the \a interval is 0, 100mS is used.  If the \a
- * interval is less than 0, then the XSync() batching optimization is
- * not requested (e.g., so the -syncbatch -1 command line option can
- * turn off the default 100mS XSync() batching).
- *
- * Note that the parameter to this routine is a string, since it will
- * usually be called from #ddxProcessArgument in \a dmxinit.c */
-void
-dmxSyncActivate(const char *interval)
-{
-    dmxSyncInterval = (interval ? atoi(interval) : 100);
-
-    if (dmxSyncInterval < 0)
-        dmxSyncInterval = 0;
-}
-
-/** Initialize the XSync() batching optimization, but only if
- * #dmxSyncActivate was last called with a non-negative value. */
-void
-dmxSyncInit(void)
-{
-    if (dmxSyncInterval) {
-        RegisterBlockAndWakeupHandlers(dmxSyncBlockHandler,
-                                       dmxSyncWakeupHandler, NULL);
-        dmxLog(dmxInfo, "XSync batching with %d ms interval\n",
-               dmxSyncInterval);
-    }
-    else {
-        dmxLog(dmxInfo, "XSync batching disabled\n");
-    }
-}
-
-/** Request an XSync() to the display used by \a dmxScreen.  If \a now
- * is TRUE, call XSync() immediately instead of waiting for the next
- * XSync() batching point.  Note that if XSync() batching was deselected
- * with #dmxSyncActivate() before #dmxSyncInit() was called, then no
- * XSync() batching is performed and this function always calles XSync()
- * immediately.
- *
- * (Note that this function uses TimerSet but works correctly in the
- * face of a server generation.  See the source for details.)
- *
- * If \a dmxScreen is \a NULL, then all pending syncs will be flushed
- * immediately.
- */
-void
-dmxSync(DMXScreenInfo * dmxScreen, Bool now)
-{
-    static unsigned long dmxGeneration = 0;
-
-    if (dmxSyncInterval) {
-        if (dmxGeneration != serverGeneration) {
-            /* Server generation does a TimerInit, which frees all
-             * timers.  So, at this point dmxSyncTimer is either:
-             * 1) NULL, iff dmxGeneration == 0,
-             * 2) freed, if it was on a queue (dmxSyncPending != 0), or
-             * 3) allocated, if it wasn't on a queue (dmxSyncPending == 0)
-             */
-            if (dmxSyncTimer && !dmxSyncPending)
-                free(dmxSyncTimer);
-            dmxSyncTimer = NULL;
-            now = TRUE;
-            dmxGeneration = serverGeneration;
-        }
-        /* Queue sync */
-        if (dmxScreen) {
-            dmxScreen->needsSync = TRUE;
-            ++dmxSyncPending;
-        }
-
-        /* Do sync or set time for later */
-        if (now || !dmxScreen) {
-            if (dmxSyncTimer == NULL || !TimerForce(dmxSyncTimer))
-                dmxSyncCallback(NULL, 0, NULL);
-            /* At this point, dmxSyncPending == 0 because
-             * dmxSyncCallback must have been called. */
-            if (dmxSyncPending)
-                dmxLog(dmxFatal, "dmxSync(%s,%d): dmxSyncPending = %d\n",
-                       dmxScreen ? dmxScreen->name : "", now, dmxSyncPending);
-        }
-        else {
-            dmxScreen->needsSync = TRUE;
-            if (dmxSyncPending == 1)
-                dmxSyncTimer = TimerSet(dmxSyncTimer, 0, dmxSyncInterval,
-                                        dmxSyncCallback, NULL);
-        }
-    }
-    else {
-        /* If dmxSyncInterval is not being used,
-         * then all the backends are already
-         * up-to-date. */
-        if (dmxScreen)
-            dmxDoSync(dmxScreen);
-    }
-}
diff --git a/hw/dmx/dmxsync.h b/hw/dmx/dmxsync.h
deleted file mode 100644
index d67ae09..0000000
--- a/hw/dmx/dmxsync.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright 2002 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-/** \file
- * Interface for sync support.  \see dmxsync.c */
-
-#ifndef _DMXSYNC_H_
-#define _DMXSYNC_H_
-
-extern void dmxSyncActivate(const char *interval);
-extern void dmxSyncInit(void);
-extern void dmxSync(DMXScreenInfo * dmxScreen, Bool now);
-#endif
diff --git a/hw/dmx/dmxvisual.c b/hw/dmx/dmxvisual.c
deleted file mode 100644
index 23b9bdd..0000000
--- a/hw/dmx/dmxvisual.c
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * Copyright 2002-2004 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Kevin E. Martin <kem@redhat.com>
- *
- */
-
-/** \file
- * This file provides support for visuals. */
-
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#include "dmx.h"
-#include "dmxvisual.h"
-
-#include "scrnintstr.h"
-
-#ifdef GLXEXT
-
-#include <GL/glxint.h>
-
-extern VisualID glxMatchVisualInConfigList(ScreenPtr pScreen,
-                                           VisualPtr pVisual,
-                                           __GLXvisualConfig * configs,
-                                           int nconfigs);
-
-static Visual *
-dmxLookupGLXVisual(ScreenPtr pScreen, VisualPtr pVisual)
-{
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    int j;
-    VisualID vid;
-
-    vid = glxMatchVisualInConfigList(pScreen, pVisual,
-                                     dmxScreen->glxVisuals,
-                                     dmxScreen->numGlxVisuals);
-    if (vid) {
-        /* Find the X visual of the matching GLX visual */
-        for (j = 0; j < dmxScreen->beNumVisuals; j++)
-            if (vid == dmxScreen->beVisuals[j].visualid)
-                return dmxScreen->beVisuals[j].visual;
-    }
-
-    /* No matching visual found */
-    return NULL;
-}
-#endif
-
-/** Return the visual that matched \a pVisual. */
-Visual *
-dmxLookupVisual(ScreenPtr pScreen, VisualPtr pVisual)
-{
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    int i;
-
-#ifdef GLXEXT
-    Visual *retval;
-#endif
-
-    if (!dmxScreen->beDisplay)
-        return NULL;
-
-#ifdef GLXEXT
-    if ((retval = dmxLookupGLXVisual(pScreen, pVisual)))
-        return retval;
-#endif
-
-    for (i = 0; i < dmxScreen->beNumVisuals; i++) {
-        if (pVisual->class == dmxScreen->beVisuals[i].class &&
-            pVisual->bitsPerRGBValue == dmxScreen->beVisuals[i].bits_per_rgb &&
-            pVisual->ColormapEntries == dmxScreen->beVisuals[i].colormap_size &&
-            pVisual->nplanes == dmxScreen->beVisuals[i].depth &&
-            pVisual->redMask == dmxScreen->beVisuals[i].red_mask &&
-            pVisual->greenMask == dmxScreen->beVisuals[i].green_mask &&
-            pVisual->blueMask == dmxScreen->beVisuals[i].blue_mask) {
-            return dmxScreen->beVisuals[i].visual;
-        }
-    }
-
-    return NULL;
-}
-
-/** Return the visual that matched the \a vid. */
-Visual *
-dmxLookupVisualFromID(ScreenPtr pScreen, VisualID vid)
-{
-    Visual *visual;
-    int i;
-
-    if (!dmxScreens[pScreen->myNum].beDisplay)
-        return NULL;
-
-    for (i = 0; i < pScreen->numVisuals; i++) {
-        if (pScreen->visuals[i].vid == vid) {
-            visual = dmxLookupVisual(pScreen, &pScreen->visuals[i]);
-            if (visual)
-                return visual;
-        }
-    }
-
-    return NULL;
-}
-
-/** Return the colormap for the \a visual. */
-Colormap
-dmxColormapFromDefaultVisual(ScreenPtr pScreen, Visual * visual)
-{
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    int i;
-
-    if (dmxScreen->beDisplay) {
-        for (i = 0; i < dmxScreen->beNumDefColormaps; i++)
-            if (visual == dmxScreen->beVisuals[i].visual)
-                return dmxScreen->beDefColormaps[i];
-    }
-
-    return None;
-}
diff --git a/hw/dmx/dmxvisual.h b/hw/dmx/dmxvisual.h
deleted file mode 100644
index 4d97df9..0000000
--- a/hw/dmx/dmxvisual.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright 2002 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Kevin E. Martin <kem@redhat.com>
- *
- */
-
-/** \file
- * Interface for visual support.  \see dmxvisual.c */
-
-#ifndef DMXVISUAL_H
-#define DMXVISUAL_H
-
-#include "scrnintstr.h"
-
-extern Visual *dmxLookupVisual(ScreenPtr pScreen, VisualPtr pVisual);
-extern Visual *dmxLookupVisualFromID(ScreenPtr pScreen, VisualID vid);
-extern Colormap dmxColormapFromDefaultVisual(ScreenPtr pScreen,
-                                             Visual * visual);
-
-#endif                          /* DMXVISUAL_H */
diff --git a/hw/dmx/dmxwindow.c b/hw/dmx/dmxwindow.c
deleted file mode 100644
index dcdb9ac..0000000
--- a/hw/dmx/dmxwindow.c
+++ /dev/null
@@ -1,1044 +0,0 @@
-/*
- * Copyright 2001-2004 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Kevin E. Martin <kem@redhat.com>
- *
- */
-
-/** \file
- * This file provides support for window-related functions. */
-
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#include "dmx.h"
-#include "dmxsync.h"
-#include "dmxwindow.h"
-#include "dmxpixmap.h"
-#include "dmxcmap.h"
-#include "dmxvisual.h"
-#include "dmxinput.h"
-#include "dmxextension.h"
-#include "dmxpict.h"
-
-#include "windowstr.h"
-
-static void dmxDoRestackWindow(WindowPtr pWindow);
-static void dmxDoChangeWindowAttributes(WindowPtr pWindow,
-                                        unsigned long *mask,
-                                        XSetWindowAttributes * attribs);
-
-static void dmxDoSetShape(WindowPtr pWindow);
-
-/** Initialize the private area for the window functions. */
-Bool
-dmxInitWindow(ScreenPtr pScreen)
-{
-    if (!dixRegisterPrivateKey
-        (&dmxWinPrivateKeyRec, PRIVATE_WINDOW, sizeof(dmxWinPrivRec)))
-        return FALSE;
-
-    return TRUE;
-}
-
-Window
-dmxCreateRootWindow(WindowPtr pWindow)
-{
-    ScreenPtr pScreen = pWindow->drawable.pScreen;
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    dmxWinPrivPtr pWinPriv = DMX_GET_WINDOW_PRIV(pWindow);
-    Window parent;
-    Visual *visual;
-    unsigned long mask;
-    XSetWindowAttributes attribs;
-    ColormapPtr pCmap;
-    dmxColormapPrivPtr pCmapPriv;
-
-    /* Create root window */
-
-    parent = dmxScreen->scrnWin;        /* This is our "Screen" window */
-    visual = dmxScreen->beVisuals[dmxScreen->beDefVisualIndex].visual;
-
-    dixLookupResourceByType((void **) &pCmap, wColormap(pWindow),
-                            RT_COLORMAP, NullClient, DixUnknownAccess);
-    pCmapPriv = DMX_GET_COLORMAP_PRIV(pCmap);
-
-    mask = CWEventMask | CWBackingStore | CWColormap | CWBorderPixel;
-    attribs.event_mask = ExposureMask;
-    attribs.backing_store = NotUseful;
-    attribs.colormap = pCmapPriv->cmap;
-    attribs.border_pixel = 0;
-
-    /* Incorporate new attributes, if needed */
-    if (pWinPriv->attribMask) {
-        dmxDoChangeWindowAttributes(pWindow, &pWinPriv->attribMask, &attribs);
-        mask |= pWinPriv->attribMask;
-    }
-
-    return XCreateWindow(dmxScreen->beDisplay,
-                         parent,
-                         pWindow->origin.x - wBorderWidth(pWindow),
-                         pWindow->origin.y - wBorderWidth(pWindow),
-                         pWindow->drawable.width,
-                         pWindow->drawable.height,
-                         pWindow->borderWidth,
-                         pWindow->drawable.depth,
-                         pWindow->drawable.class, visual, mask, &attribs);
-}
-
-/** Change the location and size of the "screen" window.  Called from
- *  dmxextension.c dmxConfigureScreenWindow(). */
-void
-dmxResizeScreenWindow(ScreenPtr pScreen, int x, int y, int w, int h)
-{
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    unsigned int m;
-    XWindowChanges c;
-
-    if (!dmxScreen->beDisplay)
-        return;
-
-    /* Handle resizing on back-end server */
-    m = CWX | CWY | CWWidth | CWHeight;
-    c.x = x;
-    c.y = y;
-    c.width = w;
-    c.height = h;
-
-    XConfigureWindow(dmxScreen->beDisplay, dmxScreen->scrnWin, m, &c);
-    dmxSync(dmxScreen, False);
-}
-
-/** Change the location and size of the "root" window.  Called from
- *  #dmxCreateWindow. */
-void
-dmxResizeRootWindow(WindowPtr pRoot, int x, int y, int w, int h)
-{
-    DMXScreenInfo *dmxScreen = &dmxScreens[pRoot->drawable.pScreen->myNum];
-    dmxWinPrivPtr pWinPriv = DMX_GET_WINDOW_PRIV(pRoot);
-    unsigned int m;
-    XWindowChanges c;
-
-    /* Handle resizing on back-end server */
-    if (dmxScreen->beDisplay) {
-        m = CWX | CWY | CWWidth | CWHeight;
-        c.x = x;
-        c.y = y;
-        c.width = (w > 0) ? w : 1;
-        c.height = (h > 0) ? h : 1;
-
-        XConfigureWindow(dmxScreen->beDisplay, pWinPriv->window, m, &c);
-    }
-
-    if (w == 0 || h == 0) {
-        if (pWinPriv->mapped) {
-            if (dmxScreen->beDisplay)
-                XUnmapWindow(dmxScreen->beDisplay, pWinPriv->window);
-            pWinPriv->mapped = FALSE;
-        }
-    }
-    else if (!pWinPriv->mapped) {
-        if (dmxScreen->beDisplay)
-            XMapWindow(dmxScreen->beDisplay, pWinPriv->window);
-        pWinPriv->mapped = TRUE;
-    }
-
-    if (dmxScreen->beDisplay)
-        dmxSync(dmxScreen, False);
-}
-
-void
-dmxGetDefaultWindowAttributes(WindowPtr pWindow,
-                              Colormap * cmap, Visual ** visual)
-{
-    ScreenPtr pScreen = pWindow->drawable.pScreen;
-
-    if (pWindow->drawable.class != InputOnly &&
-        pWindow->optional &&
-        pWindow->optional->visual != wVisual(pWindow->parent)) {
-
-        /* Find the matching visual */
-        *visual = dmxLookupVisualFromID(pScreen, wVisual(pWindow));
-
-        /* Handle optional colormaps */
-        if (pWindow->optional->colormap) {
-            ColormapPtr pCmap;
-            dmxColormapPrivPtr pCmapPriv;
-
-            dixLookupResourceByType((void **) &pCmap, wColormap(pWindow),
-                                    RT_COLORMAP, NullClient, DixUnknownAccess);
-            pCmapPriv = DMX_GET_COLORMAP_PRIV(pCmap);
-            *cmap = pCmapPriv->cmap;
-        }
-        else {
-            *cmap = dmxColormapFromDefaultVisual(pScreen, *visual);
-        }
-    }
-    else {
-        *visual = CopyFromParent;
-        *cmap = (Colormap) 0;
-    }
-}
-
-static Window
-dmxCreateNonRootWindow(WindowPtr pWindow)
-{
-    ScreenPtr pScreen = pWindow->drawable.pScreen;
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    dmxWinPrivPtr pWinPriv = DMX_GET_WINDOW_PRIV(pWindow);
-    Window parent;
-    unsigned long mask = 0L;
-    XSetWindowAttributes attribs;
-    dmxWinPrivPtr pParentPriv = DMX_GET_WINDOW_PRIV(pWindow->parent);
-
-    /* Create window on back-end server */
-
-    parent = pParentPriv->window;
-
-    /* The parent won't exist if this call to CreateNonRootWindow came
-       from ReparentWindow and the grandparent window has not yet been
-       created */
-    if (!parent) {
-        dmxCreateAndRealizeWindow(pWindow->parent, FALSE);
-        parent = pParentPriv->window;
-    }
-
-    /* Incorporate new attributes, if needed */
-    if (pWinPriv->attribMask) {
-        dmxDoChangeWindowAttributes(pWindow, &pWinPriv->attribMask, &attribs);
-        mask |= pWinPriv->attribMask;
-    }
-
-    /* Add in default attributes */
-    if (pWindow->drawable.class != InputOnly) {
-        mask |= CWBackingStore;
-        attribs.backing_store = NotUseful;
-
-        if (!(mask & CWColormap) && pWinPriv->cmap) {
-            mask |= CWColormap;
-            attribs.colormap = pWinPriv->cmap;
-            if (!(mask & CWBorderPixel)) {
-                mask |= CWBorderPixel;
-                attribs.border_pixel = 0;
-            }
-        }
-    }
-
-    /* Handle case where subwindows are being mapped, but created out of
-       order -- if current window has a previous sibling, then it cannot
-       be created on top of the stack, so we must restack the windows */
-    pWinPriv->restacked = (pWindow->prevSib != NullWindow);
-
-    return XCreateWindow(dmxScreen->beDisplay,
-                         parent,
-                         pWindow->origin.x - wBorderWidth(pWindow),
-                         pWindow->origin.y - wBorderWidth(pWindow),
-                         pWindow->drawable.width,
-                         pWindow->drawable.height,
-                         pWindow->borderWidth,
-                         pWindow->drawable.depth,
-                         pWindow->drawable.class,
-                         pWinPriv->visual, mask, &attribs);
-}
-
-/** This function handles lazy window creation and realization.  Window
- *  creation is handled by #dmxCreateNonRootWindow().  It also handles
- *  any stacking changes that have occured since the window was
- *  originally created by calling #dmxDoRestackWindow().  If the window
- *  is shaped, the shape is set on the back-end server by calling
- *  #dmxDoSetShape(), and if the window has pictures (from RENDER)
- *  associated with it, those pictures are created on the back-end
- *  server by calling #dmxCreatePictureList().  If \a doSync is TRUE,
- *  then #dmxSync() is called. */
-void
-dmxCreateAndRealizeWindow(WindowPtr pWindow, Bool doSync)
-{
-    ScreenPtr pScreen = pWindow->drawable.pScreen;
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    dmxWinPrivPtr pWinPriv = DMX_GET_WINDOW_PRIV(pWindow);
-
-    if (!dmxScreen->beDisplay)
-        return;
-
-    pWinPriv->window = dmxCreateNonRootWindow(pWindow);
-    if (pWinPriv->restacked)
-        dmxDoRestackWindow(pWindow);
-    if (pWinPriv->isShaped)
-        dmxDoSetShape(pWindow);
-    if (pWinPriv->hasPict)
-        dmxCreatePictureList(pWindow);
-    if (pWinPriv->mapped)
-        XMapWindow(dmxScreen->beDisplay, pWinPriv->window);
-    if (doSync)
-        dmxSync(dmxScreen, False);
-}
-
-/** Create \a pWindow on the back-end server.  If the lazy window
- *  creation optimization is enabled, then the actual creation and
- *  realization of the window is handled by
- *  #dmxCreateAndRealizeWindow(). */
-Bool
-dmxCreateWindow(WindowPtr pWindow)
-{
-    ScreenPtr pScreen = pWindow->drawable.pScreen;
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    dmxWinPrivPtr pWinPriv = DMX_GET_WINDOW_PRIV(pWindow);
-    Bool ret = TRUE;
-
-    DMX_UNWRAP(CreateWindow, dmxScreen, pScreen);
-#if 0
-    if (pScreen->CreateWindow)
-        ret = pScreen->CreateWindow(pWindow);
-#endif
-
-    /* Set up the defaults */
-    pWinPriv->window = (Window) 0;
-    pWinPriv->offscreen = TRUE;
-    pWinPriv->mapped = FALSE;
-    pWinPriv->restacked = FALSE;
-    pWinPriv->attribMask = 0;
-    pWinPriv->isShaped = FALSE;
-    pWinPriv->hasPict = FALSE;
-#ifdef GLXEXT
-    pWinPriv->swapGroup = NULL;
-    pWinPriv->barrier = 0;
-#endif
-
-    if (dmxScreen->beDisplay) {
-        /* Only create the root window at this stage -- non-root windows are
-           created when they are mapped and are on-screen */
-        if (!pWindow->parent) {
-            dmxScreen->rootWin = pWinPriv->window
-                = dmxCreateRootWindow(pWindow);
-            if (dmxScreen->scrnX != dmxScreen->rootX
-                || dmxScreen->scrnY != dmxScreen->rootY
-                || dmxScreen->scrnWidth != dmxScreen->rootWidth
-                || dmxScreen->scrnHeight != dmxScreen->rootHeight) {
-                dmxResizeRootWindow(pWindow,
-                                    dmxScreen->rootX,
-                                    dmxScreen->rootY,
-                                    dmxScreen->rootWidth,
-                                    dmxScreen->rootHeight);
-                dmxUpdateScreenResources(screenInfo.screens[dmxScreen->index],
-                                         dmxScreen->rootX,
-                                         dmxScreen->rootY,
-                                         dmxScreen->rootWidth,
-                                         dmxScreen->rootHeight);
-                pWindow->origin.x = dmxScreen->rootX;
-                pWindow->origin.y = dmxScreen->rootY;
-            }
-        }
-        else {
-            dmxGetDefaultWindowAttributes(pWindow,
-                                          &pWinPriv->cmap, &pWinPriv->visual);
-
-            if (dmxLazyWindowCreation) {
-                /* Save parent's visual for use later */
-                if (pWinPriv->visual == CopyFromParent)
-                    pWinPriv->visual =
-                        dmxLookupVisualFromID(pScreen,
-                                              wVisual(pWindow->parent));
-            }
-            else {
-                pWinPriv->window = dmxCreateNonRootWindow(pWindow);
-            }
-        }
-
-        dmxSync(dmxScreen, False);
-    }
-
-    DMX_WRAP(CreateWindow, dmxCreateWindow, dmxScreen, pScreen);
-
-    return ret;
-}
-
-/** Destroy \a pWindow on the back-end server. */
-Bool
-dmxBEDestroyWindow(WindowPtr pWindow)
-{
-    ScreenPtr pScreen = pWindow->drawable.pScreen;
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    dmxWinPrivPtr pWinPriv = DMX_GET_WINDOW_PRIV(pWindow);
-
-    if (pWinPriv->window) {
-        XDestroyWindow(dmxScreen->beDisplay, pWinPriv->window);
-        pWinPriv->window = (Window) 0;
-        return TRUE;
-    }
-
-    return FALSE;
-}
-
-/** Destroy \a pWindow on the back-end server.  If any RENDER pictures
-    were created, destroy them as well. */
-Bool
-dmxDestroyWindow(WindowPtr pWindow)
-{
-    ScreenPtr pScreen = pWindow->drawable.pScreen;
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    Bool ret = TRUE;
-    Bool needSync = FALSE;
-
-#ifdef GLXEXT
-    dmxWinPrivPtr pWinPriv = DMX_GET_WINDOW_PRIV(pWindow);
-#endif
-
-    DMX_UNWRAP(DestroyWindow, dmxScreen, pScreen);
-
-    /* Destroy any picture list associated with this window */
-    needSync |= dmxDestroyPictureList(pWindow);
-
-    /* Destroy window on back-end server */
-    needSync |= dmxBEDestroyWindow(pWindow);
-    if (needSync)
-        dmxSync(dmxScreen, FALSE);
-
-#ifdef GLXEXT
-    if (pWinPriv->swapGroup && pWinPriv->windowDestroyed)
-        pWinPriv->windowDestroyed(pWindow);
-#endif
-
-    if (pScreen->DestroyWindow)
-        ret = pScreen->DestroyWindow(pWindow);
-
-    DMX_WRAP(DestroyWindow, dmxDestroyWindow, dmxScreen, pScreen);
-
-    return ret;
-}
-
-/** Change the position of \a pWindow to be \a x, \a y. */
-Bool
-dmxPositionWindow(WindowPtr pWindow, int x, int y)
-{
-    ScreenPtr pScreen = pWindow->drawable.pScreen;
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    Bool ret = TRUE;
-    dmxWinPrivPtr pWinPriv = DMX_GET_WINDOW_PRIV(pWindow);
-    unsigned int m;
-    XWindowChanges c;
-
-    DMX_UNWRAP(PositionWindow, dmxScreen, pScreen);
-#if 0
-    if (pScreen->PositionWindow)
-        ret = pScreen->PositionWindow(pWindow, x, y);
-#endif
-
-    /* Determine if the window is completely off the visible portion of
-       the screen */
-    pWinPriv->offscreen = DMX_WINDOW_OFFSCREEN(pWindow);
-
-    /* If the window is now on-screen and it is mapped and it has not
-       been created yet, create it and map it */
-    if (!pWinPriv->window && pWinPriv->mapped && !pWinPriv->offscreen) {
-        dmxCreateAndRealizeWindow(pWindow, TRUE);
-    }
-    else if (pWinPriv->window) {
-        /* Position window on back-end server */
-        m = CWX | CWY | CWWidth | CWHeight;
-        c.x = pWindow->origin.x - wBorderWidth(pWindow);
-        c.y = pWindow->origin.y - wBorderWidth(pWindow);
-        c.width = pWindow->drawable.width;
-        c.height = pWindow->drawable.height;
-        if (pWindow->drawable.class != InputOnly) {
-            m |= CWBorderWidth;
-            c.border_width = pWindow->borderWidth;
-        }
-
-        XConfigureWindow(dmxScreen->beDisplay, pWinPriv->window, m, &c);
-        dmxSync(dmxScreen, False);
-    }
-
-    DMX_WRAP(PositionWindow, dmxPositionWindow, dmxScreen, pScreen);
-
-    return ret;
-}
-
-static void
-dmxDoChangeWindowAttributes(WindowPtr pWindow,
-                            unsigned long *mask, XSetWindowAttributes * attribs)
-{
-    dmxPixPrivPtr pPixPriv;
-
-    if (*mask & CWBackPixmap) {
-        switch (pWindow->backgroundState) {
-        case None:
-            attribs->background_pixmap = None;
-            break;
-
-        case ParentRelative:
-            attribs->background_pixmap = ParentRelative;
-            break;
-
-        case BackgroundPixmap:
-            pPixPriv = DMX_GET_PIXMAP_PRIV(pWindow->background.pixmap);
-            attribs->background_pixmap = pPixPriv->pixmap;
-            break;
-
-        case BackgroundPixel:
-            *mask &= ~CWBackPixmap;
-            break;
-        }
-    }
-
-    if (*mask & CWBackPixel) {
-        if (pWindow->backgroundState == BackgroundPixel)
-            attribs->background_pixel = pWindow->background.pixel;
-        else
-            *mask &= ~CWBackPixel;
-    }
-
-    if (*mask & CWBorderPixmap) {
-        if (pWindow->borderIsPixel)
-            *mask &= ~CWBorderPixmap;
-        else {
-            pPixPriv = DMX_GET_PIXMAP_PRIV(pWindow->border.pixmap);
-            attribs->border_pixmap = pPixPriv->pixmap;
-        }
-    }
-
-    if (*mask & CWBorderPixel) {
-        if (pWindow->borderIsPixel)
-            attribs->border_pixel = pWindow->border.pixel;
-        else
-            *mask &= ~CWBorderPixel;
-    }
-
-    if (*mask & CWBitGravity)
-        attribs->bit_gravity = pWindow->bitGravity;
-
-    if (*mask & CWWinGravity)
-        *mask &= ~CWWinGravity; /* Handled by dix */
-
-    if (*mask & CWBackingStore)
-        *mask &= ~CWBackingStore;       /* Backing store not supported */
-
-    if (*mask & CWBackingPlanes)
-        *mask &= ~CWBackingPlanes;      /* Backing store not supported */
-
-    if (*mask & CWBackingPixel)
-        *mask &= ~CWBackingPixel;       /* Backing store not supported */
-
-    if (*mask & CWOverrideRedirect)
-        attribs->override_redirect = pWindow->overrideRedirect;
-
-    if (*mask & CWSaveUnder)
-        *mask &= ~CWSaveUnder;  /* Save unders not supported */
-
-    if (*mask & CWEventMask)
-        *mask &= ~CWEventMask;  /* Events are handled by dix */
-
-    if (*mask & CWDontPropagate)
-        *mask &= ~CWDontPropagate;      /* Events are handled by dix */
-
-    if (*mask & CWColormap) {
-        ColormapPtr pCmap;
-        dmxColormapPrivPtr pCmapPriv;
-
-        dixLookupResourceByType((void **) &pCmap, wColormap(pWindow),
-                                RT_COLORMAP, NullClient, DixUnknownAccess);
-        pCmapPriv = DMX_GET_COLORMAP_PRIV(pCmap);
-        attribs->colormap = pCmapPriv->cmap;
-    }
-
-    if (*mask & CWCursor)
-        *mask &= ~CWCursor;     /* Handled by the cursor code */
-}
-
-/** Change the window attributes of \a pWindow. */
-Bool
-dmxChangeWindowAttributes(WindowPtr pWindow, unsigned long mask)
-{
-    ScreenPtr pScreen = pWindow->drawable.pScreen;
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    Bool ret = TRUE;
-    dmxWinPrivPtr pWinPriv = DMX_GET_WINDOW_PRIV(pWindow);
-    XSetWindowAttributes attribs;
-
-    DMX_UNWRAP(ChangeWindowAttributes, dmxScreen, pScreen);
-#if 0
-    if (pScreen->ChangeWindowAttributes)
-        ret = pScreen->ChangeWindowAttributes(pWindow, mask);
-#endif
-
-    /* Change window attribs on back-end server */
-    dmxDoChangeWindowAttributes(pWindow, &mask, &attribs);
-
-    /* Save mask for lazy window creation optimization */
-    pWinPriv->attribMask |= mask;
-
-    if (mask && pWinPriv->window) {
-        XChangeWindowAttributes(dmxScreen->beDisplay, pWinPriv->window,
-                                mask, &attribs);
-        dmxSync(dmxScreen, False);
-    }
-
-    DMX_WRAP(ChangeWindowAttributes, dmxChangeWindowAttributes, dmxScreen,
-             pScreen);
-
-    return ret;
-}
-
-/** Realize \a pWindow on the back-end server.  If the lazy window
- *  creation optimization is enabled, the window is only realized when
- *  it at least partially overlaps the screen. */
-Bool
-dmxRealizeWindow(WindowPtr pWindow)
-{
-    ScreenPtr pScreen = pWindow->drawable.pScreen;
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    Bool ret = TRUE;
-    dmxWinPrivPtr pWinPriv = DMX_GET_WINDOW_PRIV(pWindow);
-
-    DMX_UNWRAP(RealizeWindow, dmxScreen, pScreen);
-#if 0
-    if (pScreen->RealizeWindow)
-        ret = pScreen->RealizeWindow(pWindow);
-#endif
-
-    /* Determine if the window is completely off the visible portion of
-       the screen */
-    pWinPriv->offscreen = DMX_WINDOW_OFFSCREEN(pWindow);
-
-    /* If the window hasn't been created and it's not offscreen, then
-       create it */
-    if (!pWinPriv->window && !pWinPriv->offscreen) {
-        dmxCreateAndRealizeWindow(pWindow, FALSE);
-    }
-
-    if (pWinPriv->window) {
-        /* Realize window on back-end server */
-        XMapWindow(dmxScreen->beDisplay, pWinPriv->window);
-        dmxSync(dmxScreen, False);
-    }
-
-    /* Let the other functions know that the window is now mapped */
-    pWinPriv->mapped = TRUE;
-
-    DMX_WRAP(RealizeWindow, dmxRealizeWindow, dmxScreen, pScreen);
-
-    dmxUpdateWindowInfo(DMX_UPDATE_REALIZE, pWindow);
-    return ret;
-}
-
-/** Unrealize \a pWindow on the back-end server. */
-Bool
-dmxUnrealizeWindow(WindowPtr pWindow)
-{
-    ScreenPtr pScreen = pWindow->drawable.pScreen;
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    Bool ret = TRUE;
-    dmxWinPrivPtr pWinPriv = DMX_GET_WINDOW_PRIV(pWindow);
-
-    DMX_UNWRAP(UnrealizeWindow, dmxScreen, pScreen);
-#if 0
-    if (pScreen->UnrealizeWindow)
-        ret = pScreen->UnrealizeWindow(pWindow);
-#endif
-
-    if (pWinPriv->window) {
-        /* Unrealize window on back-end server */
-        XUnmapWindow(dmxScreen->beDisplay, pWinPriv->window);
-        dmxSync(dmxScreen, False);
-    }
-
-    /* When unrealized (i.e., unmapped), the window is always considered
-       off of the visible portion of the screen */
-    pWinPriv->offscreen = TRUE;
-    pWinPriv->mapped = FALSE;
-
-#ifdef GLXEXT
-    if (pWinPriv->swapGroup && pWinPriv->windowUnmapped)
-        pWinPriv->windowUnmapped(pWindow);
-#endif
-
-    DMX_WRAP(UnrealizeWindow, dmxUnrealizeWindow, dmxScreen, pScreen);
-
-    dmxUpdateWindowInfo(DMX_UPDATE_UNREALIZE, pWindow);
-    return ret;
-}
-
-static void
-dmxDoRestackWindow(WindowPtr pWindow)
-{
-    ScreenPtr pScreen = pWindow->drawable.pScreen;
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    dmxWinPrivPtr pWinPriv = DMX_GET_WINDOW_PRIV(pWindow);
-    WindowPtr pNextSib = pWindow->nextSib;
-    unsigned int m;
-    XWindowChanges c;
-
-    if (pNextSib == NullWindow) {
-        /* Window is at the bottom of the stack */
-        m = CWStackMode;
-        c.sibling = (Window) 0;
-        c.stack_mode = Below;
-        XConfigureWindow(dmxScreen->beDisplay, pWinPriv->window, m, &c);
-    }
-    else {
-        /* Window is not at the bottom of the stack */
-        dmxWinPrivPtr pNextSibPriv = DMX_GET_WINDOW_PRIV(pNextSib);
-
-        /* Handle case where siblings have not yet been created due to
-           lazy window creation optimization by first finding the next
-           sibling in the sibling list that has been created (if any)
-           and then putting the current window just above that sibling,
-           and if no next siblings have been created yet, then put it at
-           the bottom of the stack (since it might have a previous
-           sibling that should be above it). */
-        while (!pNextSibPriv->window) {
-            pNextSib = pNextSib->nextSib;
-            if (pNextSib == NullWindow) {
-                /* Window is at the bottom of the stack */
-                m = CWStackMode;
-                c.sibling = (Window) 0;
-                c.stack_mode = Below;
-                XConfigureWindow(dmxScreen->beDisplay, pWinPriv->window, m, &c);
-                return;
-            }
-            pNextSibPriv = DMX_GET_WINDOW_PRIV(pNextSib);
-        }
-
-        m = CWStackMode | CWSibling;
-        c.sibling = pNextSibPriv->window;
-        c.stack_mode = Above;
-        XConfigureWindow(dmxScreen->beDisplay, pWinPriv->window, m, &c);
-    }
-}
-
-/** Handle window restacking.  The actual restacking occurs in
- *  #dmxDoRestackWindow(). */
-void
-dmxRestackWindow(WindowPtr pWindow, WindowPtr pOldNextSib)
-{
-    ScreenPtr pScreen = pWindow->drawable.pScreen;
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    dmxWinPrivPtr pWinPriv = DMX_GET_WINDOW_PRIV(pWindow);
-
-    DMX_UNWRAP(RestackWindow, dmxScreen, pScreen);
-#if 0
-    if (pScreen->RestackWindow)
-        pScreen->RestackWindow(pWindow, pOldNextSib);
-#endif
-
-    if (pOldNextSib != pWindow->nextSib) {
-        /* Track restacking for lazy window creation optimization */
-        pWinPriv->restacked = TRUE;
-
-        /* Restack window on back-end server */
-        if (pWinPriv->window) {
-            dmxDoRestackWindow(pWindow);
-            dmxSync(dmxScreen, False);
-        }
-    }
-
-    DMX_WRAP(RestackWindow, dmxRestackWindow, dmxScreen, pScreen);
-    dmxUpdateWindowInfo(DMX_UPDATE_RESTACK, pWindow);
-}
-
-static Bool
-dmxWindowExposurePredicate(Display * dpy, XEvent * ev, XPointer ptr)
-{
-    return (ev->type == Expose && ev->xexpose.window == *(Window *) ptr);
-}
-
-/** Handle exposures on \a pWindow.  Since window exposures are handled
- *  in DMX, the events that are generated by the back-end server are
- *  redundant, so we eat them here. */
-void
-dmxWindowExposures(WindowPtr pWindow, RegionPtr prgn)
-{
-    ScreenPtr pScreen = pWindow->drawable.pScreen;
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    dmxWinPrivPtr pWinPriv = DMX_GET_WINDOW_PRIV(pWindow);
-    XEvent ev;
-
-    DMX_UNWRAP(WindowExposures, dmxScreen, pScreen);
-
-    dmxSync(dmxScreen, False);
-
-    if (pWinPriv->window) {
-        while (XCheckIfEvent(dmxScreen->beDisplay, &ev,
-                             dmxWindowExposurePredicate,
-                             (XPointer) &pWinPriv->window)) {
-            /* Handle expose events -- this should not be necessary
-               since the base window in which the root window was
-               created is guaranteed to be on top (override_redirect),
-               so we should just swallow these events.  If for some
-               reason the window is not on top, then we'd need to
-               collect these events and send them to the client later
-               (e.g., during the block handler as Xnest does). */
-        }
-    }
-
-#if 1
-    if (pScreen->WindowExposures)
-        pScreen->WindowExposures(pWindow, prgn);
-#endif
-    DMX_WRAP(WindowExposures, dmxWindowExposures, dmxScreen, pScreen);
-}
-
-/** Move \a pWindow on the back-end server.  Determine whether or not it
- *  is on or offscreen, and realize it if it is newly on screen and the
- *  lazy window creation optimization is enabled. */
-void
-dmxCopyWindow(WindowPtr pWindow, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
-{
-    ScreenPtr pScreen = pWindow->drawable.pScreen;
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    dmxWinPrivPtr pWinPriv = DMX_GET_WINDOW_PRIV(pWindow);
-    unsigned int m;
-    XWindowChanges c;
-
-    DMX_UNWRAP(CopyWindow, dmxScreen, pScreen);
-#if 0
-    if (pScreen->CopyWindow)
-        pScreen->CopyWindow(pWindow, ptOldOrg, prgnSrc);
-#endif
-
-    /* Determine if the window is completely off the visible portion of
-       the screen */
-    pWinPriv->offscreen = DMX_WINDOW_OFFSCREEN(pWindow);
-
-    /* If the window is now on-screen and it is mapped and it has not
-       been created yet, create it and map it */
-    if (!pWinPriv->window && pWinPriv->mapped && !pWinPriv->offscreen) {
-        dmxCreateAndRealizeWindow(pWindow, TRUE);
-    }
-    else if (pWinPriv->window) {
-        /* Move window on back-end server */
-        m = CWX | CWY | CWWidth | CWHeight;
-        c.x = pWindow->origin.x - wBorderWidth(pWindow);
-        c.y = pWindow->origin.y - wBorderWidth(pWindow);
-        c.width = pWindow->drawable.width;
-        c.height = pWindow->drawable.height;
-
-        XConfigureWindow(dmxScreen->beDisplay, pWinPriv->window, m, &c);
-        dmxSync(dmxScreen, False);
-    }
-
-    DMX_WRAP(CopyWindow, dmxCopyWindow, dmxScreen, pScreen);
-    dmxUpdateWindowInfo(DMX_UPDATE_COPY, pWindow);
-}
-
-/** Resize \a pWindow on the back-end server.  Determine whether or not
- *  it is on or offscreen, and realize it if it is newly on screen and
- *  the lazy window creation optimization is enabled. */
-void
-dmxResizeWindow(WindowPtr pWindow, int x, int y,
-                unsigned int w, unsigned int h, WindowPtr pSib)
-{
-    ScreenPtr pScreen = pWindow->drawable.pScreen;
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    dmxWinPrivPtr pWinPriv = DMX_GET_WINDOW_PRIV(pWindow);
-    unsigned int m;
-    XWindowChanges c;
-
-    DMX_UNWRAP(ResizeWindow, dmxScreen, pScreen);
-#if 1
-    if (pScreen->ResizeWindow)
-        pScreen->ResizeWindow(pWindow, x, y, w, h, pSib);
-#endif
-
-    /* Determine if the window is completely off the visible portion of
-       the screen */
-    pWinPriv->offscreen = DMX_WINDOW_OFFSCREEN(pWindow);
-
-    /* If the window is now on-screen and it is mapped and it has not
-       been created yet, create it and map it */
-    if (!pWinPriv->window && pWinPriv->mapped && !pWinPriv->offscreen) {
-        dmxCreateAndRealizeWindow(pWindow, TRUE);
-    }
-    else if (pWinPriv->window) {
-        /* Handle resizing on back-end server */
-        m = CWX | CWY | CWWidth | CWHeight;
-        c.x = pWindow->origin.x - wBorderWidth(pWindow);
-        c.y = pWindow->origin.y - wBorderWidth(pWindow);
-        c.width = pWindow->drawable.width;
-        c.height = pWindow->drawable.height;
-
-        XConfigureWindow(dmxScreen->beDisplay, pWinPriv->window, m, &c);
-        dmxSync(dmxScreen, False);
-    }
-
-    DMX_WRAP(ResizeWindow, dmxResizeWindow, dmxScreen, pScreen);
-    dmxUpdateWindowInfo(DMX_UPDATE_RESIZE, pWindow);
-}
-
-/** Reparent \a pWindow on the back-end server. */
-void
-dmxReparentWindow(WindowPtr pWindow, WindowPtr pPriorParent)
-{
-    ScreenPtr pScreen = pWindow->drawable.pScreen;
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    dmxWinPrivPtr pWinPriv = DMX_GET_WINDOW_PRIV(pWindow);
-    dmxWinPrivPtr pParentPriv = DMX_GET_WINDOW_PRIV(pWindow->parent);
-
-    DMX_UNWRAP(ReparentWindow, dmxScreen, pScreen);
-#if 0
-    if (pScreen->ReparentWindow)
-        pScreen->ReparentWindow(pWindow, pPriorParent);
-#endif
-
-    if (pWinPriv->window) {
-        if (!pParentPriv->window) {
-            dmxCreateAndRealizeWindow(pWindow->parent, FALSE);
-        }
-
-        /* Handle reparenting on back-end server */
-        XReparentWindow(dmxScreen->beDisplay, pWinPriv->window,
-                        pParentPriv->window,
-                        pWindow->origin.x - wBorderWidth(pWindow),
-                        pWindow->origin.x - wBorderWidth(pWindow));
-        dmxSync(dmxScreen, False);
-    }
-
-    DMX_WRAP(ReparentWindow, dmxReparentWindow, dmxScreen, pScreen);
-    dmxUpdateWindowInfo(DMX_UPDATE_REPARENT, pWindow);
-}
-
-/** Change border width for \a pWindow to \a width pixels. */
-void
-dmxChangeBorderWidth(WindowPtr pWindow, unsigned int width)
-{
-    ScreenPtr pScreen = pWindow->drawable.pScreen;
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    dmxWinPrivPtr pWinPriv = DMX_GET_WINDOW_PRIV(pWindow);
-    unsigned int m;
-    XWindowChanges c;
-
-    DMX_UNWRAP(ChangeBorderWidth, dmxScreen, pScreen);
-#if 1
-    if (pScreen->ChangeBorderWidth)
-        pScreen->ChangeBorderWidth(pWindow, width);
-#endif
-
-    /* NOTE: Do we need to check for on/off screen here? */
-
-    if (pWinPriv->window) {
-        /* Handle border width change on back-end server */
-        m = CWBorderWidth;
-        c.border_width = width;
-
-        XConfigureWindow(dmxScreen->beDisplay, pWinPriv->window, m, &c);
-        dmxSync(dmxScreen, False);
-    }
-
-    DMX_WRAP(ChangeBorderWidth, dmxChangeBorderWidth, dmxScreen, pScreen);
-}
-
-static void
-dmxDoSetShape(WindowPtr pWindow)
-{
-    ScreenPtr pScreen = pWindow->drawable.pScreen;
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    dmxWinPrivPtr pWinPriv = DMX_GET_WINDOW_PRIV(pWindow);
-    int nBox;
-    BoxPtr pBox;
-    int nRect;
-    XRectangle *pRect;
-    XRectangle *pRectFirst;
-
-    /* First, set the bounding shape */
-    if (wBoundingShape(pWindow)) {
-        pBox = RegionRects(wBoundingShape(pWindow));
-        nRect = nBox = RegionNumRects(wBoundingShape(pWindow));
-        pRectFirst = pRect = xallocarray(nRect, sizeof(*pRect));
-        while (nBox--) {
-            pRect->x = pBox->x1;
-            pRect->y = pBox->y1;
-            pRect->width = pBox->x2 - pBox->x1;
-            pRect->height = pBox->y2 - pBox->y1;
-            pBox++;
-            pRect++;
-        }
-        XShapeCombineRectangles(dmxScreen->beDisplay, pWinPriv->window,
-                                ShapeBounding, 0, 0,
-                                pRectFirst, nRect, ShapeSet, YXBanded);
-        free(pRectFirst);
-    }
-    else {
-        XShapeCombineMask(dmxScreen->beDisplay, pWinPriv->window,
-                          ShapeBounding, 0, 0, None, ShapeSet);
-    }
-
-    /* Next, set the clip shape */
-    if (wClipShape(pWindow)) {
-        pBox = RegionRects(wClipShape(pWindow));
-        nRect = nBox = RegionNumRects(wClipShape(pWindow));
-        pRectFirst = pRect = xallocarray(nRect, sizeof(*pRect));
-        while (nBox--) {
-            pRect->x = pBox->x1;
-            pRect->y = pBox->y1;
-            pRect->width = pBox->x2 - pBox->x1;
-            pRect->height = pBox->y2 - pBox->y1;
-            pBox++;
-            pRect++;
-        }
-        XShapeCombineRectangles(dmxScreen->beDisplay, pWinPriv->window,
-                                ShapeClip, 0, 0,
-                                pRectFirst, nRect, ShapeSet, YXBanded);
-        free(pRectFirst);
-    }
-    else {
-        XShapeCombineMask(dmxScreen->beDisplay, pWinPriv->window,
-                          ShapeClip, 0, 0, None, ShapeSet);
-    }
-
-    if (XShapeInputSelected(dmxScreen->beDisplay, pWinPriv->window)) {
-        ErrorF("Input selected for window %x on Screen %d\n",
-               (unsigned int) pWinPriv->window, pScreen->myNum);
-    }
-}
-
-/** Set shape of \a pWindow on the back-end server. */
-void
-dmxSetShape(WindowPtr pWindow, int kind)
-{
-    ScreenPtr pScreen = pWindow->drawable.pScreen;
-    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
-    dmxWinPrivPtr pWinPriv = DMX_GET_WINDOW_PRIV(pWindow);
-
-    DMX_UNWRAP(SetShape, dmxScreen, pScreen);
-#if 1
-    if (pScreen->SetShape)
-        pScreen->SetShape(pWindow, kind);
-#endif
-
-    if (pWinPriv->window) {
-        /* Handle setting the current shape on the back-end server */
-        dmxDoSetShape(pWindow);
-        dmxSync(dmxScreen, False);
-    }
-    else {
-        pWinPriv->isShaped = TRUE;
-    }
-
-    DMX_WRAP(SetShape, dmxSetShape, dmxScreen, pScreen);
-}
diff --git a/hw/dmx/dmxwindow.h b/hw/dmx/dmxwindow.h
deleted file mode 100644
index dda6538..0000000
--- a/hw/dmx/dmxwindow.h
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Copyright 2001-2004 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Kevin E. Martin <kem@redhat.com>
- *
- */
-
-/** \file
- * Interface for window support.  \see dmxwindow.c */
-
-#ifndef DMXWINDOW_H
-#define DMXWINDOW_H
-
-#include "windowstr.h"
-
-/** Window private area. */
-typedef struct _dmxWinPriv {
-    Window window;
-    Bool offscreen;
-    Bool mapped;
-    Bool restacked;
-    unsigned long attribMask;
-    Colormap cmap;
-    Visual *visual;
-    Bool isShaped;
-    Bool hasPict;
-#ifdef GLXEXT
-    void *swapGroup;
-    int barrier;
-    void (*windowDestroyed) (WindowPtr);
-    void (*windowUnmapped) (WindowPtr);
-#endif
-} dmxWinPrivRec, *dmxWinPrivPtr;
-
-extern Bool dmxInitWindow(ScreenPtr pScreen);
-
-extern Window dmxCreateRootWindow(WindowPtr pWindow);
-
-extern void dmxGetDefaultWindowAttributes(WindowPtr pWindow,
-                                          Colormap * cmap, Visual ** visual);
-extern void dmxCreateAndRealizeWindow(WindowPtr pWindow, Bool doSync);
-
-extern Bool dmxCreateWindow(WindowPtr pWindow);
-extern Bool dmxDestroyWindow(WindowPtr pWindow);
-extern Bool dmxPositionWindow(WindowPtr pWindow, int x, int y);
-extern Bool dmxChangeWindowAttributes(WindowPtr pWindow, unsigned long mask);
-extern Bool dmxRealizeWindow(WindowPtr pWindow);
-extern Bool dmxUnrealizeWindow(WindowPtr pWindow);
-extern void dmxRestackWindow(WindowPtr pWindow, WindowPtr pOldNextSib);
-extern void dmxWindowExposures(WindowPtr pWindow, RegionPtr prgn);
-extern void dmxCopyWindow(WindowPtr pWindow, DDXPointRec ptOldOrg,
-                          RegionPtr prgnSrc);
-
-extern void dmxResizeWindow(WindowPtr pWindow, int x, int y,
-                            unsigned int w, unsigned int h, WindowPtr pSib);
-extern void dmxReparentWindow(WindowPtr pWindow, WindowPtr pPriorParent);
-
-extern void dmxChangeBorderWidth(WindowPtr pWindow, unsigned int width);
-
-extern void dmxResizeScreenWindow(ScreenPtr pScreen,
-                                  int x, int y, int w, int h);
-extern void dmxResizeRootWindow(WindowPtr pRoot, int x, int y, int w, int h);
-
-extern Bool dmxBEDestroyWindow(WindowPtr pWindow);
-
-/* Support for shape extension */
-extern void dmxSetShape(WindowPtr pWindow, int kind);
-
-/** Get window private pointer. */
-#define DMX_GET_WINDOW_PRIV(_pWin) ((dmxWinPrivPtr) \
-    dixLookupPrivate(&(_pWin)->devPrivates, dmxWinPrivateKey))
-
-/* All of these macros are only used in dmxwindow.c */
-#define DMX_WINDOW_FUNC_PROLOGUE(_pGC)					\
-do {									\
-    dmxGCPrivPtr pGCPriv = DMX_GET_GC_PRIV(_pGC);			\
-    DMX_UNWRAP(funcs, pGCPriv, (_pGC));					\
-    if (pGCPriv->ops)							\
-	DMX_UNWRAP(ops, pGCPriv, (_pGC));				\
-} while (0)
-
-#define DMX_WINDOW_FUNC_EPILOGUE(_pGC)					\
-do {									\
-    dmxGCPrivPtr pGCPriv = DMX_GET_GC_PRIV(_pGC);			\
-    DMX_WRAP(funcs, &dmxGCFuncs, pGCPriv, (_pGC));			\
-    if (pGCPriv->ops)							\
-	DMX_WRAP(ops, &dmxGCOps, pGCPriv, (_pGC));			\
-} while (0)
-
-#define DMX_WINDOW_X1(_pWin)						\
-    ((_pWin)->drawable.x - wBorderWidth(_pWin))
-#define DMX_WINDOW_Y1(_pWin)						\
-    ((_pWin)->drawable.y - wBorderWidth(_pWin))
-#define DMX_WINDOW_X2(_pWin)						\
-    ((_pWin)->drawable.x + wBorderWidth(_pWin) + (_pWin)->drawable.width)
-#define DMX_WINDOW_Y2(_pWin)						\
-    ((_pWin)->drawable.y + wBorderWidth(_pWin) + (_pWin)->drawable.height)
-
-#define DMX_WINDOW_OFFSCREEN(_pWin)					\
-    (DMX_WINDOW_X1(_pWin) >= (_pWin)->drawable.pScreen->width  ||	\
-     DMX_WINDOW_Y1(_pWin) >= (_pWin)->drawable.pScreen->height ||	\
-     DMX_WINDOW_X2(_pWin) <= 0                                 ||	\
-     DMX_WINDOW_Y2(_pWin) <= 0)
-
-#endif                          /* DMXWINDOW_H */
diff --git a/hw/dmx/doc/DMXSpec-v1.txt b/hw/dmx/doc/DMXSpec-v1.txt
deleted file mode 100644
index cea97b9..0000000
--- a/hw/dmx/doc/DMXSpec-v1.txt
+++ /dev/null
@@ -1,458 +0,0 @@
-
-
-            Client-to-Server DMX Extension to the X Protocol
-
-           $Date$, $Revision$
-
-               Rickard E. (Rik) Faith (faith@redhat.com)
-                    Kevin E. Martin (kem@redhat.com)
-
-    Copyright 2002,2003 Red Hat Inc., Raleigh, North Carolina.
-
-    Permission is hereby granted, free of charge, to any person
-    obtaining a copy of this software and associated documentation files
-    (the "Software"), to deal in the Software without restriction,
-    including without limitation on the rights to use, copy, modify,
-    merge, publish, distribute, sublicense, and/or sell copies of the
-    Software, and to permit persons to whom the Software is furnished to
-    do so, subject to the following conditions:
-
-    The above copyright notice and this permission notice (including the
-    next paragraph) shall be included in all copies or substantial
-    portions of the Software.
-
-    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-    EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-    NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
-    BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-    ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-    CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-    SOFTWARE.
-
-
-
-1. Overview
-
-    The client-to-server DMX extension to the X protocol (DMX) provides
-    normal client applications with the ability to determine information
-    about the characteristics of the Xdmx server and the back-end X
-    servers that DMX is using.
-
-    The name for this extension is "DMX".
-
-
-
-2. Syntactic conventions
-
-    This document uses the same syntactic conventions requests and data
-    types as [X11R6.4].
-
-
-
-3. Data types
-
-    No new data types are defined by this extension.  All data types
-    referenced in this document are defined in [X11R6.4].
-
-
-
-4. Requests
-
-    DMXQueryVersion
-        ==>
-        majorVersion: CARD32
-        minorVersion: CARD32
-        patchVersion: CARD32
-
-    The protocol this extension actually supports is indicated by
-    majorVersion and minorVersion (patchVersion indicates the
-    patchlevel and is for informational purposes only).
-
-    Any incompatible changes to the protocol should be indicated by
-    incrementing majorVersion.
-
-    Small, upward-compatible changes should be indicated by incrementing
-    minorVersion.
-
-    Servers that support the protocol defined in this document will
-    return a majorVersion of 1 and a minorVersion of 1.
-
-
-
-    DMXGetScreenCount
-        ==>
-        screenCount: CARD32
-
-    This request returns the number of back-end screens that the Xdmx
-    server controls.  A back-end screen may be managed as a regular X
-    screen in the Xdmx server or may be joined with other back-end
-    screens using Xinerama.  (The information returned by this request
-    does not change while Xdmx is running and may be cached on the
-    client side.)
-    
-
-
-    DMXGetScreenInformation
-        physicalScreen: CARD32
-        ==>
-        displayName: STRING8
-        width: CARD16
-        height: CARD16
-        xoffset: INT16
-        yoffset: INT16
-        logicalScreen: CARD32
-        xorigin: INT16
-        yorigin: INT16
-
-        Errors: Value
-
-    This request returns information about individual back-end screens.
-    The physicalScreen value is between 0 and screenCount-1, inclusive
-    (values outside this range will result in a Value error).  The
-    displayname is the name used to open the display, either from the
-    Xdmx command-line or from the configuration file.  The width,
-    height, xoffset, and yoffset values comprise a geometry
-    specification (see X(7x)) for the location of the DMX window on the
-    back-end screen.  This request will always return non-negative
-    (i.e., normalized) values for xoffset and yoffset.  The
-    logicalScreen value is the value of the screen that that Xdmx server
-    exports to clients.  When Xinerama is in use, this value is
-    typically 0 for all values of physicalScreen.  If Xinerama is in
-    use, the xorigin and yorigin values specify where the physical
-    screen is positioned in the global Xinerama coordinate system.
-    Otherwise, these values are set to 0.  (The information returned by
-    this request does not change while Xdmx is running and may be cached
-    on the client side.)
-
-
-
-    DMXGetWindowInformation
-        window: CARD32
-        ==>
-        screenCount: CARD32
-        screens: LISTofCARD32
-        windows: LISTofCARD32
-        pos: LISTofRECTANGLE
-        vis: LISTofRECTANGLE
-
-        Errors: Window, Alloc
-
-    This request computed the return values incorrectly for version 1.0
-    of this protocol.  Version 1.1 of this protocol conforms to this
-    description.
-
-    Given a window ID on the Xdmx server, this request returns data
-    about how the window is represented on the back-end X servers.  For
-    each back-end X server that displays a portion of the window, the
-    following information is returned:
-        1) the number of the physical screen containing that portion
-           (which can be used with the DMXGetScreenInformation request
-           to obtain more information about the screen),
-        2) the window ID on the back-end X server of the window
-           containing that portion,
-        3) the position and dimensions of the window on the back-end, in
-           screen coordinates, and
-        4) the visible area of the window on the back-end, in
-           window-relative coordinates (all zeros for windows that are
-           not visible)
-    Note that DMX allows multiple back-end windows to overlap in their
-    view of the DMX logical window.  Further, a logical window does not
-    have to be completely covered by back-end windows -- there may be
-    gaps.
-
-    As an example, consider a 500x500 window that spans the top two
-    1024x768 back-end displays (A and B) of a 2048x1536 DMX display
-    composed of 4 1024x768 back-end displays arranged in a cube:
-        A B
-        C D
-
-    In this case, the DMXGetWindowInformation call would return the
-    following information for the 500x500 window:
-
-    display A: 500x500 window at 1024-250,0 (relative to back end)
-               with 250x500 visible at 0,0 (relative to window origin)
-
-    display B: 500x500 window at -250,0 (relative to back end)
-               with 250x500 visible at 250,0 (relative to window origin)
-
-    display C: 500x500 window at 1024-250,-768 with 0x0 visible at 0,0
-
-    display D: 500x500 window at -250,-768 with 0x0 visible at 0,0
-
-    Note that if the specified window has not yet been mapped when
-    DMXGetWindowInformation is called, then a subsequent XMapWindow call
-    might be buffered in xlib while requests directly to the back-end X
-    servers are processed.  This race condition can be solved by calling
-    DMXSync before talking directly to the back-end X servers.
-
-
-    DMXGetInputCount
-        ==>
-        inputCount: CARD32
-
-    This request was first supported in version 1.1 of this protocol.
-
-    This request returns the number of input devices connected to the
-    Xdmx server.  This number is the same as that returned by
-    XListInputDevices, but is available even when the XInput extension
-    is not supported.
-
-
-
-    DMXGetInputInformation
-        deviceId: CARD32
-        ==>
-        inputType: CARD32
-        physicalScreen: CARD32
-        physicalId: CARD32
-        isCore: BOOL
-        sendsCore: BOOL
-        name: STRING8
-
-        Errors: Value
-
-    This request was first supported in version 1.1 of this protocol.
-
-    This request returns information about the specified input device
-    that cannot be obtained from the XListInputDeivices call.  The
-    deviceId is the same as that used by the XListInputDevices call, and
-    must be in the range 0 to inputCount-1, inclusive (values outside
-    this range will result in a Value error).
-
-    The value of inputType will always be value, and will be one of the
-    following values:
-        0 for local (and dummy) devices,
-        1 for console devices, and
-        2 for back-end devices.
-
-    For local devices, all other fields returned, except isCore and
-    sendsCore, are invalid.
-
-    For console devices, the physicalScreen and physicalID will be
-    invalid, and the name will return the name of the X server on which
-    the console window is displayed.
-
-    For back-end devices, the physicalScreen will identify the back-end
-    display and can be used as an argument to DMXGetScreenInformation to
-    obtain more information; the physicalId will be the XInput device id
-    on the back-end X server; and the name will be invalid (since it
-    does not provide any additional information that cannot be obtained
-    with DMXGetScreenInformation).
-
-    If isCore is True, then this device is active as a true core input
-    device and will send core events.  If sendsCore is True, then this
-    device queried an XInput extension device, but sends core events
-    instead of extension events.  Note that this behavior is different
-    from that of XFree86, where XInput extension devices may send both
-    extension events and core events.
-
-
-
-    DMXForceWindowCreation
-        window: CARD32
-        ==>
-
-        Errors: Window
-
-    This request was first supported in version 1.2 of this protocol.
-
-    When using the lazy window creation optimization, windows are not
-    created on the back-end X servers until they are required.  This
-    request forces the immediate creation of the window requested.
-
-
-
-    DMXReconfigureScreen
-        screen: CARD32
-        x: INT16
-        y: INT16
-        ==>
-        status: CARD32
-
-        Errors: Value
-
-    This request was first supported in version 1.3 of this protocol.
-
-    This request reconfigures the screen position to coordinates (x,y)
-    when using the Xinerama extension.  Otherwise, it is a NOP.  Illegal
-    values for screen will result in a BadValue error.  Other non-fatal
-    errors will be returned in status.
-
-
-
-    DMXSync
-        ==>
-
-    This request was first supported in version 1.5 of this protocol.
-
-    This request flushes all pending protocol requests between the Xdmx
-    server and each back-end X server.  It is used by a client that
-    talks directly to back-end X servers
-
-    To ensure proper synchronization semantics, this request has a
-    reply, but the reply does not carry any information.
-
-
-
-5. Events
-
-    No new events are defined by this extension.
-
-
-
-6. Errors
-
-    No new events are defined by this extension.
-
-
-
-7. Encoding
-
-    DMXQueryVersion
-        1           CARD8           opcode (X assigned)
-        1           0               DMX opcode (X_DMXQueryVersion)
-        2           1               request length
-    ==>
-        1           1               Reply
-        1                           unused
-        2           CARD16          sequence number
-        4           0               reply length
-        4           CARD32          majorVersion
-        4           CARD32          minorVersion
-        4           CARD32          patchVersion
-        12                          unused
-
-    DMXGetScreenCount
-        1           CARD8           opcode (X assigned)
-        1           1               DMX opcode (X_DMXGetScreenCount)
-        2           1               request length
-    ==>
-        1           1               Reply
-        1                           unused
-        2           CARD16          sequence number
-        4           0               reply length
-        4           CARD32          screenCount
-        20                          unused
-
-    DMXGetScreenInformation
-        1           CARD8           opcode (X assigned)
-        1           2               DMX opcode (X_DMXGetScreenInformation)
-        2           2               request length
-        4           CARD32          physicalScreen
-    ==>
-        1           1               Reply
-        1                           unused
-        2           CARD16          sequence number
-        4           n/4+p           reply length
-        4           n               displayNameLength
-        2           CARD16          width
-        2           CARD16          height
-        2           INT16           xoffset
-        2           INT16           yoffset
-        4           CARD32          logicalScreen
-        2           INT16           xorigin
-        2           INT16           yorigin
-        4                           unused
-        n                           displayName
-        p                           pad(n)
-
-    DMXGetWindowInformation
-        1           CARD8           opcode (X assigned)
-        1           3               DMX opcode (X_DMXGetWindowInformation)
-        2           2               request length
-        4           CARD32          window
-    ==>
-        1           1               Reply
-        1                           unused
-        2           CARD16          sequence number
-        4           n*6             reply length
-        4           n               screenCount
-        20                          unused
-        n*4         LISTofCARD32    screens
-        n*4         LISTofCARD32    windows
-        n*8         LISTofRECTANGLE pos
-        n*8         LISTofRECTANGLE vis
-
-    DMXGetInputCount
-        1           CARD8           opcode (X assigned)
-        1                           DMX opcode (X_DMXGetInputCount)
-        2           1               request length
-    ==>
-        1           1               Reply
-        1                           unused
-        2           CARD16          sequence number
-        4           0               reply length
-        4           CARD32          inputCount
-        20                          unused
-
-    DMXGetInputInformation
-        1           CARD8           opcode (X assigned)
-        1           4               DMX opcode (X_DMXGetInputInformation)
-        2           2               request length
-        4           CARD32          deviceId
-    ==>
-        1           1               Reply
-        1                           unused
-        2           CARD16          sequence number
-        4           n/4+p           reply length
-        4           CARD32          inputType
-        4           CARD32          physicalScreen
-        4           CARD32          physicalId
-        4           n               nameLength
-        1           BOOL            isCore
-        1           BOOL            sendsCore
-        6                           unused
-        n                           name
-        p                           pad(n)
-
-    DMXForceWindowCreation
-        1           CARD8           opcode (X assigned)
-        1           2               DMX opcode (X_DMXForceWindowCreation)
-        2           2               request length
-        4           CARD32          window
-    ==>
-
-    DMXReconfigureScreen
-        1           CARD8           opcode (X assigned)
-        1           2               DMX opcode (X_DMXReconfigureScreen)
-        2           2               request length
-        4           CARD32          screen
-        2           INT16           x
-        2           INT16           y
-    ==>
-        1           1               Reply
-        1                           unused
-        2           CARD16          sequence number
-        4           0               reply length
-        4           CARD32          status
-        20                          unused
-
-    DMXSync
-        1           CARD8           opcode (X assigned)
-        1           0               DMX opcode (X_DMXSync)
-        2           1               request length
-    ==>
-        1           1               Reply
-        1                           unused
-        2           CARD16          sequence number
-        4           0               reply length
-        24                          unused
-
-
-8. Changes to existing requests/replies/events
-
-    No changes to existing requests, replies, or events are necessitated
-    by this extension.
-
-
-
-9. Acknowledgments
-
-
-
-10. References
-
-    [X11R6.4] Robert W. Sheifler.  X Window System Protocol, X Consortium
-              Standard, X Version 11, Release 6.4.  Available from
-              xc/doc/specs/XProtocol and xc/doc/hardcopy/XProtocol.
diff --git a/hw/dmx/doc/DMXSpec.txt b/hw/dmx/doc/DMXSpec.txt
deleted file mode 100644
index 4009f12..0000000
--- a/hw/dmx/doc/DMXSpec.txt
+++ /dev/null
@@ -1,875 +0,0 @@
-
-
-            Client-to-Server DMX Extension to the X Protocol
-
-           $Date$, $Revision$
-
-               Rickard E. (Rik) Faith (faith@redhat.com)
-                    Kevin E. Martin (kem@redhat.com)
-
-    Copyright 2002-2004 Red Hat Inc., Raleigh, North Carolina.
-
-    Permission is hereby granted, free of charge, to any person
-    obtaining a copy of this software and associated documentation files
-    (the "Software"), to deal in the Software without restriction,
-    including without limitation on the rights to use, copy, modify,
-    merge, publish, distribute, sublicense, and/or sell copies of the
-    Software, and to permit persons to whom the Software is furnished to
-    do so, subject to the following conditions:
-
-    The above copyright notice and this permission notice (including the
-    next paragraph) shall be included in all copies or substantial
-    portions of the Software.
-
-    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-    EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-    NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
-    BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-    ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-    CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-    SOFTWARE.
-
-
-
-1. Overview
-
-    The client-to-server DMX extension to the X protocol (DMX) provides
-    normal client applications with the ability to determine information
-    about the characteristics of the Xdmx server and the back-end X
-    servers that DMX is using.
-
-    The name for this extension is "DMX".
-
-
-
-2. Syntactic conventions
-
-    This document uses the same syntactic conventions requests and data
-    types as [X11R6.4].
-
-
-
-3. Data types
-
-    No new data types are defined by this extension.  All data types
-    referenced in this document are defined in [X11R6.4].
-
-
-
-4. Requests
-
-    DMXQueryVersion
-        ==>
-        majorVersion: CARD32
-        minorVersion: CARD32
-        patchVersion: CARD32
-
-        Errors: None
-
-    The protocol this extension actually supports is indicated by
-    majorVersion and minorVersion (patchVersion indicates the
-    patchlevel and is for informational purposes only).
-
-    Any incompatible changes to the protocol should be indicated by
-    incrementing majorVersion.
-
-    Small, upward-compatible changes should be indicated by incrementing
-    minorVersion.
-
-    Servers that support the protocol defined in this document will
-    return a majorVersion of 2 and a minorVersion of 2.
-
-    (Version 1.5 was the last version in the 1.x series; version 2.0 was
-    a testing version that was poorly defined.)
-
-
-
-    DMXSync
-        ==>
-        status: CARD32
-
-        Errors: None
-
-    This request was first supported in version 1.5 of this protocol.
-    The status field in the reply was introduced in version 2.0 of this
-    protocol.  Since the status field is ignored, no changes to the
-    underlying protocol were required.
-
-    This request flushes all pending protocol requests between the Xdmx
-    server and each back-end X server.  It is used by clients that
-    talk directly to back-end X servers to ensure that all pending Xdmx
-    requests have reached all back-end servers and have been processed
-    by those servers.
-
-    The value of status is always 0.
-
-
-
-    DMXForceWindowCreation
-        window: CARD32
-        ==>
-        status: CARD32
-
-        Errors: Window
-
-    This request was first supported in version 1.2 of this protocol.
-    This request was changed to have a reply in version 2.0 of this
-    protocol.  The old version of this request was deprecated and will
-    return BadImplementation.
-
-    When using the lazy window creation optimization, windows are not
-    created on the back-end X servers until they are required.  This
-    request forces the immediate creation of the window requested.
-
-    The value of status is always 0.
-
-
-
-
-    DMXGetScreenCount
-        ==>
-        screenCount: CARD32
-
-        Errors: None
-
-    This request returns the number of screens that the Xdmx server
-    controls.  Since a DMX screen usually fills all of the available
-    area on a back-end server, there is usually a one-to-one
-    correspondence between DMX screens and backend servers.  However, it
-    is also possible for a DMX screen to cover only part of the
-    available area on a back-end server, and for more than one DMX
-    screen to occupy different parts of the visible area on the same
-    back-end server.
-
-    A DMX screen may be managed as a regular X screen in the Xdmx server
-    or may be joined with other DMX screens using Xinerama.
-    
-
-
-    DMXGetScreenAttributes
-        physicalScreen: CARD32
-        ==>
-        displayName: STRING8
-        logicalScreen: CARD32
-        screenWindowWidth: CARD16
-        screenWindowHeight: CARD16
-        screenWindowXoffset: INT16
-        screenWindowYoffset: INT16
-        rootWindowWidth: CARD16
-        rootWindowHeight: CARD16
-        rootWindowXoffset: INT16
-        rootWindowYoffset: INT16
-        rootWindowXorigin: INT16
-        rootWindowYorigin: INT16
-
-        Errors: Value
-
-    This request is new in version 2.0 of this protocol.  The old
-    DMXGetScreenInformation request is deprecated and will now return
-    BadImplementation.
-
-    This request returns attributes about a single DMX screen.
-
-    The physicalScreen value is between 0 and screenCount-1, inclusive
-    (values outside this range will result in a Value error).
-
-    The displayname is the name used to open the display, either from
-    the Xdmx command-line or from the configuration file.
-
-    The logicalScreen value is the value of the screen that that Xdmx
-    server exports to clients.  When Xinerama is in use, this value is
-    typically 0 for all values of physicalScreen.  If Xinerama is in
-    use, the rootWindowXOrigin and rootWindowYOrigin values specify
-    where the physical screen is positioned in the global Xinerama
-    coordinate system.  Otherwise, these values are set to 0.
-
-    The screenWindow values comprise a geometry specification (see
-    X(7x)) for the location of the DMX screen on the back-end screen.
-    The coordinant system of the back-end display is used.
-
-    The first four rootWindow values comprise a geometry specification
-    (see X(7x)) for the location of the root window on the screen
-    window.  The coordinant system of the screen window is used.  In
-    most cases, the root window will have the same geometry as the DMX
-    screen window, and will occupy the same area of the back-end
-    display.  (This would not be the case, for example, if automatic
-    projector alignment is used.)
-
-
-
-    DMXChangeScreensAttributes
-        screenCount: CARD32
-        maskCount: CARD32
-        screens: LISTofCARD32
-        valueMasks: LISTofCARD32
-        valueList: LISTofVALUES
-        ==>
-        status: CARD32
-        errorScreen: CARD32
-
-        Errors: Length, Alloc
-
-    This request was first supported in version 2.0 of this protocol.
-    (A singular version of this request with the ability to change some
-    RootWindow attributes was supported in version 1.3 of this protocol,
-    has been deprecated, and will return BadImplementation.)
-
-    This request changes the geometries and positions of the DMX screen
-    and DMX root windows on the back-end X servers.
-   
-    The valueMask and valueList specify which attributes are to be
-    changed.  The possible values are:
-
-        Attribute               Type
-
-        ScreenWindowWidth       CARD16
-        ScreenWindowHeight      CARD16
-        ScreenWindowXoffset     INT16
-        ScreenWindowYoffset     INT16
-        RootWindowWidth         CARD16
-        RootWindowHeight        CARD16
-        RootWindowXoffset       INT16
-        RootWindowYoffset       INT16
-        RootWindowXorigin       INT16
-        RootWindowYorigin       INT16
-
-    The attribute values have the same meaning as do the corresponding
-    values for DMXGetScreenAttributes.
-
-    Non-fatal errors will be returned in status (0 otherwise):
-        DmxBadXinerama: Xinerama is not active
-        DmxBadValue:    The resulting position is not allowed
-                        (e.g., one corner is outside the bounding box)
-    On error, errorScreen will contain the number of the screen that
-    caused the first error.
-
-
-
-    DMXAddScreen
-        displayName: STRING8
-        physicalScreen: CARD32
-        valueMask: CARD32
-        valueList: LISTofVALUES
-        ==>
-        status: CARD32
-        physicalScreen: CARD32
-
-        Errors: Length, Alloc, Value
-
-    This request was first supported in version 2.2 of this protocol.
-
-    This request re-attaches the back-end physicalScreen to the Xdmx
-    server.  Only back-end screens that have been previously detached
-    with DMXRemoveScreen may be added.  The name of the back-end display
-    is given in displayName, and this will replace the name of the
-    back-end screen that was detached.  Both the displayName and
-    physicalScreen must be correct for this request to work.
-
-    The valueMask and valueList specify the attributes to be used.  The
-    possible values are:
-
-        Attribute               Type
-
-        ScreenWindowWidth       CARD16
-        ScreenWindowHeight      CARD16
-        ScreenWindowXoffset     INT16
-        ScreenWindowYoffset     INT16
-        RootWindowWidth         CARD16
-        RootWindowHeight        CARD16
-        RootWindowXoffset       INT16
-        RootWindowYoffset       INT16
-        RootWindowXorigin       INT16
-        RootWindowYorigin       INT16
-
-    The attribute values have the same meaning as do the corresponding
-    values for DMXGetScreenAttributes.
-
-    On success, status will be 0 and physicalScreen will contain the new
-    screen number.  On failure, status will be non-zero.  The status
-    will be 1 if any of the following occured:
-        * the -addremovescreens command-line option was not specified on
-          the Xdmx command line
-        * the value of physicalScreen is out of range
-        * physicalScreen has not been detached (with DMXRemoveScreen)
-        * displayName cannot be opened
-        * the visuals of displayname do not match the visuals that Xdmx
-          is using
-        * the screen data for displayName does not match the data for the
-          previously removed display
-    The status will be DmxBadValue if the attribute values are out of
-    range.
-
-
-
-    DMXRemoveScreen
-        physicalScreen: CARD32
-        ==>
-        status: CARD32
-
-        Errors: None
-
-    This request was first supported in version 2.2 of this protocol.
-
-    This request detaches the physicalScreen screen.
-
-    On success, status will be 0.  On failure, the status will 1 if any
-    of the following occur:
-        * the -addremovescreens command-line option was not specified on
-          the Xdmx command line
-        * the value of physicalScreen is out of range
-        * the back-end screen has already been detached.
-
-
-
-    DMXGetWindowAttributes
-        window: CARD32
-        ==>
-        screenCount: CARD32
-        screens: LISTofCARD32
-        windows: LISTofCARD32
-        pos: LISTofRECTANGLE
-        vis: LISTofRECTANGLE
-
-        Errors: Window, Alloc
-
-    This request computes the return values incorrectly for version 1.0
-    of this protocol.  Version 1.1 of this protocol conforms to this
-    description.  In version 2.0, the name of this request was changed
-    from DMXGetWindowInformation.  However, since the request itself did
-    not change, no changes to the underlying protocol were made.
-
-    Given a window ID on the Xdmx server, this request returns data
-    about how the window is represented on the back-end X servers.  For
-    each back-end X server that displays a portion of the window, the
-    following information is returned:
-        1) the number of the physical screen containing that portion
-           (which can be used with the DMXGetScreenAttributes request
-           to obtain more information about the screen),
-        2) the window ID on the back-end X server of the window
-           containing that portion,
-        3) the position and dimensions of the window on the back-end, in
-           screen coordinates, and
-        4) the visible area of the window on the back-end, in
-           window-relative coordinates (all zeros for windows that are
-           not visible).
-    Note that DMX allows multiple back-end windows to overlap in their
-    view of the DMX logical window.  Further, a logical window does not
-    have to be completely covered by back-end windows -- there may be
-    gaps.
-
-    As an example, consider a 500x500 window that spans the top two
-    1024x768 back-end displays (A and B) of a 2048x1536 DMX display
-    composed of 4 1024x768 back-end displays arranged in a cube:
-        A B
-        C D
-
-    In this case, the DMXGetWindowAttributes call would return the
-    following information for the 500x500 window:
-
-    display A: 500x500 window at 1024-250,0 (relative to back end)
-               with 250x500 visible at 0,0 (relative to window origin)
-
-    display B: 500x500 window at -250,0 (relative to back end)
-               with 250x500 visible at 250,0 (relative to window origin)
-
-    display C: 500x500 window at 1024-250,-768 with 0x0 visible at 0,0
-
-    display D: 500x500 window at -250,-768 with 0x0 visible at 0,0
-
-    Note that if the specified window has not yet been mapped when
-    DMXGetWindowAttributes is called, then a subsequent XMapWindow call
-    might be buffered in xlib while requests directly to the back-end X
-    servers are processed.  This race condition can be solved by calling
-    DMXSync before talking directly to the back-end X servers.
-
-
-
-    DMXGetDesktopAttributes
-        ==>
-        width: INT16
-        height: INT16
-        shiftX: INT16
-        shiftY: INT16
-
-        Errors: None
-
-    This request was first supported in version 2.0 of this protocol.
-
-    This request returns the size of the bounding box of the whole
-    screen in width and height.  The shiftX and shiftY values will
-    always be 0.  The global bounding box is computed whether or not
-    Xinerama is active, and may be larger than the Xinerama screen size
-    because of information in the configuration file.
-
-
-
-    DMXChangeDesktopAttributes
-        valueMask: BITMASK
-        valueList: LISTofVALUE
-        ==>
-        status: CARD32
-
-        Errors: Length, Value
-
-    This request was first supported in version 2.0 of this protocol.
-
-    This request resizes the bounding box of the whole screen when using
-    the Xinerama extension.  Otherwise, it has no effect on the screen
-    layout.  The valueMask and valueList specify which attributes are to
-    be changed.  The possible values are:
-
-        Attriubute      Type
-
-        Width           INT16
-        Height          INT16
-        ShiftX          INT16
-        ShiftY          INT16
-
-    Width and Height specify the new width and height for the bounding
-    box.  ShiftX and ShiftY specify where the Xinerama origin will be
-    placed with respect to the origin of the new bounding box.  This
-    allows the left and upper edges of the bounding box to be changed
-    without changing the visual position of the windows on the desktop.
-    If Width or Height is not specified, the current values will be
-    used.  If ShiftX or ShiftY is not specified, 0 will be used.
-
-    All coordinants are in the global DMX coordinant system.  If
-    Xinerama is not active, this request is not useful.
-
-    Non-fatal errors will be returned in status (0 otherwise):
-        DmxBadXinerama: Xinerama is not active
-        DmxBadValue:    The size of the bounding box is too large
-
-
-
-    DMXGetInputCount
-        ==>
-        inputCount: CARD32
-
-    This request was first supported in version 1.1 of this protocol.
-
-    This request returns the number of input devices connected to the
-    Xdmx server.  This number is the same as that returned by
-    XListInputDevices, but is available even when the XInput extension
-    is not supported.
-
-
-
-    DMXGetInputAttributes
-        deviceId: CARD32
-        ==>
-        inputType: CARD32
-        physicalScreen: CARD32
-        physicalId: CARD32
-        isCore: BOOL
-        sendsCore: BOOL
-        detached: BOOL
-        name: STRING8
-
-        Errors: Value
-
-    This request was first supported in version 1.1 of this protocol.
-    In version 2.0, the name of this request was changed from
-    DMXGetInputInformation.  However, since the request itself did not
-    change, no changes to the underlying protocol were made.  In version
-    2.2, the name of detached was changed from reservation.  There was
-    no change in underlying protocol.
-
-    This request returns information about the specified input device
-    that cannot be obtained from the XListInputDeivices call.  The
-    deviceId is the same as that used by the XListInputDevices call, and
-    must be in the range 0 to inputCount-1, inclusive (values outside
-    this range will result in a Value error).
-
-    The value of inputType will always be valid, and will be one of the
-    following values:
-        0 for local (and dummy) devices,
-        1 for console devices, and
-        2 for back-end devices.
-
-    For local devices, all other fields returned, except isCore and
-    sendsCore, are invalid.
-
-    For console devices, the physicalScreen and physicalID will be
-    invalid, and the name will return the name of the X server on which
-    the console window is displayed.
-
-    For back-end devices, the physicalScreen will identify the back-end
-    display and can be used as an argument to DMXGetScreenAttributes to
-    obtain more information; the physicalId will be the XInput device id
-    on the back-end X server; and the name will be invalid (since it
-    does not provide any additional information that cannot be obtained
-    with DMXGetScreenAttributes).
-
-    If isCore is True, then this device is active as a true core input
-    device and will send core events.  If sendsCore is True, then this
-    device is an XInput extension device, but sends core events instead
-    of extension events.  Note that this behavior is different from that
-    of XFree86 or Xorg, where XInput extension devices may send both
-    extension events and core events.
-
-    If detached is True, then this device has been detached and is no
-    longer producing input events.  The device may be reattached using
-    DMXAddInput.
-
-    
-
-    DMXAddInput
-        displayName: STRING8
-        valueMask: CARD32
-        valueList: LISTofVALUES
-        ==>
-        status: CARD32
-        physicalId: CARD32
-
-        Errors: Value, Access
-
-    This request was first supported in version 2.2 of this protocol.
-
-    The valueMask and valueList specify the attributes to be used.  The
-    possible values are:
-
-        Attribute               Type
-
-        InputType               CARD32
-        InputPhysicalScreen     CARD32
-        InputSendsCore          BOOL
-
-    This request attaches an input device to the Xdmx server.  The value
-    of inputType will be one:
-        1 for console devices, and
-        2 for back-end devices.
-    Other values of InputType will return a BadValue error.  Local
-    devices (inputType=0 in DMXGetInputAttributes) cannot be attached or
-    removed.  For console devices, displayName will store the name of
-    the display to be used.
-
-    For back-end devices, InputPhysicalScreen will specify the screen
-    number.  BadValue will be returned if the screen number is out of
-    range.  BadAccess will be returned if the input has already been
-    attached or if the backend screen is currently detached.
-
-    If InputSendsCore is True, the new device will be added as a true
-    core device.
-
-    If a device was removed with DMXRemoveInput an attempt will be made
-    to reconnect the previous devices (InputSendsCore is ignored in this
-    case).
-
-
-
-    DMXRemoveInput
-        physicalId: CARD32
-        ==>
-        status: CARD32
-
-        Errors: Value, Access
-
-    This request was first supported in version 2.2 of this protocol.
-
-    This request detaches the input device with physicalId, and all
-    associated inputs (e.g., if the physicalId is a backend mouse, and a
-    keyboard is also attached to the backend, then both devices will be
-    detached).  If the physicalId is outside the valid range (0 to one
-    less than the value returned by DMXInputCount), BadValue is
-    returned.  If the physicalId has already been detached, BadAccess is
-    returned.  The status is always 0.
-
-
-
-5. Events
-
-    No new events are defined by this extension.
-
-
-
-6. Errors
-
-    No new events are defined by this extension.
-
-
-
-7. Encoding
-
-    Deprecated DMX opcodes:
-        DMXGetScreenInformation           2
-        DMXForceWindowCreation            6
-        DMXReconfigureScreen              7
-
-    Valid DMX opcodes:
-        DMXQueryVersion                   0
-        DMXSync                           8
-        DMXForceWindowCreation            9
-
-        DMXGetScreenCount                 1
-        DMXGetScreenAttributes           10
-        DMXChangeScreensAttributes       11
-        DMXAddScreen                     12
-        DMXRemoveScreen                  13
-
-        DMXGetWindowAttributes            3
-
-        DMXGetDesktopAttributes          14
-        DMXChangeDesktopAttributes       15
-
-        DMXGetInputCount                  4
-        DMXGetInputAttributes             5
-        DMXAddInput                      16
-        DMXRemoveInput                   17
-
-    DMXQueryVersion
-        1           CARD8           opcode (X assigned)
-        1           0               DMX opcode (X_DMXQueryVersion)
-        2           1               request length
-    ==>
-        1           1               Reply
-        1                           unused
-        2           CARD16          sequence number
-        4           0               reply length
-        4           CARD32          majorVersion
-        4           CARD32          minorVersion
-        4           CARD32          patchVersion
-        12                          unused
-
-    DMXSync
-        1           CARD8           opcode (X assigned)
-        1           8               DMX opcode (X_DMXSync)
-        2           1               request length
-    ==>
-        1           1               Reply
-        1                           unused
-        2           CARD16          sequence number
-        4           0               reply length
-        4           CARD32          status
-        20                          unused
-
-    DMXForceWindowCreation
-        1           CARD8           opcode (X assigned)
-        1           9               DMX opcode (X_DMXForceWindowCreation)
-        2           2               request length
-        4           CARD32          window
-    ==>
-        1           1               Reply
-        1                           unused
-        2           CARD16          sequence number
-        4           0               reply length
-        4           CARD32          status
-        20                          unused
-
-
-    DMXGetScreenCount
-        1           CARD8           opcode (X assigned)
-        1           1               DMX opcode (X_DMXGetScreenCount)
-        2           1               request length
-    ==>
-        1           1               Reply
-        1                           unused
-        2           CARD16          sequence number
-        4           0               reply length
-        4           CARD32          screenCount
-        20                          unused
-
-    DMXGetScreenAttributes
-        1           CARD8           opcode (X assigned)
-        1           10               DMX opcode (X_DMXGetScreenAttributes)
-        2           2               request length
-        4           CARD32          physicalScreen
-    ==>
-        1           1               Reply
-        1                           unused
-        2           CARD16          sequence number
-        4           1+(n+p)/4       reply length
-        4           n               displayNameLength
-        4           CARD32          logicalScreen
-        2           CARD16          screenWindowWidth
-        2           CARD16          screenWindowHeight
-        2           INT16           screenWindowXoffset
-        2           INT16           screenWindowYoffset
-        2           CARD16          rootWindowWidth
-        2           CARD16          rootWindowHeight
-        2           INT16           rootWindowXoffset
-        2           INT16           rootWindowYoffset
-        2           INT16           rootWindowXorigin
-        2           INT16           rootWindowYorigin
-        n                           displayName
-        p                           pad(n)
-
-    DMXChangeScreensAttributes
-        1           CARD8           opcode (X assigned)
-        1           11              DMX opcode (X_DMXChangeScreenAttributes)
-        2           3+s+m+n         request length
-        4           s               screenCount
-        4           m               maskCount
-        4s          LISTofCARD32    screens
-        4m          LISTofCARD32    valueMasks
-        4n          LISTofVALUES    valueList
-    ==>
-        1           1               Reply
-        1                           unused
-        2           CARD16          sequence number
-        4           0               reply length
-        4           CARD32          status
-        4           CARD32          errorScreen
-        16                          unused
-
-
-    DMXAddScreen
-        1           CARD8           opcode (X assigned)
-        1           12              DMX opcode (X_DMXAddScreen)
-        2           3+m+(n+p)/4     request length
-        4           n               displayNameLength
-        4           CARD32          physicalScreen
-        4           CARD32          valueMask
-        4m          LISTofVALUES    valueList
-        n                           displayName
-        p                           pad(n)
-    ==>
-        1           1               Reply
-        1                           unused
-        2           CARD16          sequence number
-        4           0               reply length
-        4           CARD32          status
-        4           CARD32          physicalScreen
-        16                          unused
-
-    DMXRemoveScreen
-        1           CARD8           opcode (X assigned)
-        1           13              DMX opcode (X_DMXRemoveScreen)
-        2           2               request length
-        4           CARD32          physicalScreen
-    ==>
-        1           1               Reply
-        1                           unused
-        2           CARD16          sequence number
-        4           0               reply length
-        4           CARD32          status
-        20                          unused
-
-    DMXGetWindowAttributes
-        1           CARD8           opcode (X assigned)
-        1           3               DMX opcode (X_DMXGetWindowAttributes)
-        2           2               request length
-        4           CARD32          window
-    ==>
-        1           1               Reply
-        1                           unused
-        2           CARD16          sequence number
-        4           n*6             reply length
-        4           n               screenCount
-        20                          unused
-        n*4         LISTofCARD32    screens
-        n*4         LISTofCARD32    windows
-        n*8         LISTofRECTANGLE pos
-        n*8         LISTofRECTANGLE vis
-
-    DMXGetDesktopAttributes
-        1           CARD8           opcode (X assigned)
-        1           14              DMX opcode (X_DMXGetDesktopAttributes)
-        2           1               request length
-    ==>
-        1           1               Reply
-        1                           unused
-        2           CARD16          sequence number
-        4           0               reply length
-        2           INT16           width
-        2           INT16           height
-        2           INT16           shiftX
-        2           INT16           shiftY
-        16                          unused
-
-    DMXChangeDesktopAttributes
-        1           CARD8           opcode (X assigned)
-        1           15              DMX opcode (X_DMXChangeDesktopAttributes)
-        2           2+n             request length
-        4           BITMASK         valueMask
-        4n          LISTofVALUES    valueList
-    ==>
-        1           1               Reply
-        1                           unused
-        2           CARD16          sequence number
-        4           0               reply length
-        4           CARD32          status
-        20                          unused
-
-    DMXGetInputCount
-        1           CARD8           opcode (X assigned)
-        1           4               DMX opcode (X_DMXGetInputCount)
-        2           1               request length
-    ==>
-        1           1               Reply
-        1                           unused
-        2           CARD16          sequence number
-        4           0               reply length
-        4           CARD32          inputCount
-        20                          unused
-
-    DMXGetInputAttributes
-        1           CARD8           opcode (X assigned)
-        1           5               DMX opcode (X_DMXGetInputAttributes)
-        2           2               request length
-        4           CARD32          deviceId
-    ==>
-        1           1               Reply
-        1                           unused
-        2           CARD16          sequence number
-        4           (n+p)/4         reply length
-        4           CARD32          inputType
-        4           CARD32          physicalScreen
-        4           CARD32          physicalId
-        4           n               nameLength
-        1           BOOL            isCore
-        1           BOOL            sendsCore
-        1           BOOL            detached
-        5                           unused
-        n                           name
-        p                           pad(n)
-
-    DMXAddInput
-        1           CARD8           opcode (X assigned)
-        1           16              DMX opcode (X_DMXAddInput)
-        2           3+m+(n+p)/4     request length
-        4           n               displayNameLength
-        4           CARD32          valueMask
-        4m          LISTofVALUES    valueList
-        n                           displayName
-        p                           pad(n)
-    ==>
-        1           1               Reply
-        1                           unused
-        2           CARD16          sequence number
-        4           0               reply length
-        4           CARD32          status
-        4           CARD32          physicalId
-        16                          unused
-
-    DMXRemoveInput
-        1           CARD8           opcode (X assigned)
-        1           17              DMX opcode (X_DMXRemoveInput)
-        2           3               request length
-        4           CARD32          physicalId
-    ==>
-        1           1               Reply
-        1                           unused
-        2           CARD16          sequence number
-        4           0               reply length
-        4           CARD32          status
-        20                          unused
-
-
-8. Changes to existing requests/replies/events
-
-    No changes to existing requests, replies, or events are necessitated
-    by this extension.
-
-
-
-9. Acknowledgments
-
-
-
-10. References
-
-    [X11R6.4] Robert W. Sheifler.  X Window System Protocol, X Consortium
-              Standard, X Version 11, Release 6.4.  Available from
-              xc/doc/specs/XProtocol and xc/doc/hardcopy/XProtocol.
diff --git a/hw/dmx/doc/Makefile.am b/hw/dmx/doc/Makefile.am
deleted file mode 100644
index 0713884..0000000
--- a/hw/dmx/doc/Makefile.am
+++ /dev/null
@@ -1,34 +0,0 @@
-#  Copyright 2005 Red Hat, Inc.
-#
-#  Permission to use, copy, modify, distribute, and sell this software
-#  and its documentation for any purpose is hereby granted without
-#  fee, provided that the above copyright notice appear in all copies
-#  and that both that copyright notice and this permission notice
-#  appear in supporting documentation, and that the name of Red Hat
-#  not be used in advertising or publicity pertaining to distribution
-#  of the software without specific, written prior permission.  Red
-#  Hat makes no representations about the suitability of this software
-#  for any purpose.  It is provided "as is" without express or implied
-#  warranty.
-#
-#  RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-#  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
-#  NO EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
-#  CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
-#  OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
-#  NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
-#  CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-if ENABLE_DEVEL_DOCS
-if HAVE_XMLTO
-
-# Main DocBook/XML files (DOCTYPE book)
-docbook = dmx.xml scaled.xml
-
-# Generate DocBook/XML output formats with or without stylesheets
-include $(top_srcdir)/devbook.am
-
-endif HAVE_XMLTO
-endif ENABLE_DEVEL_DOCS
-
-EXTRA_DIST = DMXSpec.txt DMXSpec-v1.txt
diff --git a/hw/dmx/doc/Makefile.in b/hw/dmx/doc/Makefile.in
deleted file mode 100644
index dfdd821..0000000
--- a/hw/dmx/doc/Makefile.in
+++ /dev/null
@@ -1,771 +0,0 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
-
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-#  Copyright 2005 Red Hat, Inc.
-#
-#  Permission to use, copy, modify, distribute, and sell this software
-#  and its documentation for any purpose is hereby granted without
-#  fee, provided that the above copyright notice appear in all copies
-#  and that both that copyright notice and this permission notice
-#  appear in supporting documentation, and that the name of Red Hat
-#  not be used in advertising or publicity pertaining to distribution
-#  of the software without specific, written prior permission.  Red
-#  Hat makes no representations about the suitability of this software
-#  for any purpose.  It is provided "as is" without express or implied
-#  warranty.
-#
-#  RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-#  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
-#  NO EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
-#  CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
-#  OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
-#  NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
-#  CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-#
-# Generate output formats for a single DocBook/XML with/without chapters
-#
-# Variables set by the calling Makefile:
-# noinst_DATA: developers docs are not installed
-# docbook:  the main DocBook/XML file, no chapters, appendix or image files
-# chapters: all files pulled in by an XInclude statement and images.
-#
-
-#
-# This makefile is intended for Developers Documentation and is not installed.
-# Do not use for Users docs or Specs which need to be installed and require olink support
-# Refer to http://www.x.org/releases/X11R7.6/doc/xorg-docs/ReleaseNotes.html#id2584393
-# for an explanation on documents classification.
-#
-
-VPATH = @srcdir@
-am__is_gnu_make = { \
-  if test -z '$(MAKELEVEL)'; then \
-    false; \
-  elif test -n '$(MAKE_HOST)'; then \
-    true; \
-  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
-    true; \
-  else \
-    false; \
-  fi; \
-}
-am__make_running_with_option = \
-  case $${target_option-} in \
-      ?) ;; \
-      *) echo "am__make_running_with_option: internal error: invalid" \
-              "target option '$${target_option-}' specified" >&2; \
-         exit 1;; \
-  esac; \
-  has_opt=no; \
-  sane_makeflags=$$MAKEFLAGS; \
-  if $(am__is_gnu_make); then \
-    sane_makeflags=$$MFLAGS; \
-  else \
-    case $$MAKEFLAGS in \
-      *\\[\ \	]*) \
-        bs=\\; \
-        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
-          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
-    esac; \
-  fi; \
-  skip_next=no; \
-  strip_trailopt () \
-  { \
-    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
-  }; \
-  for flg in $$sane_makeflags; do \
-    test $$skip_next = yes && { skip_next=no; continue; }; \
-    case $$flg in \
-      *=*|--*) continue;; \
-        -*I) strip_trailopt 'I'; skip_next=yes;; \
-      -*I?*) strip_trailopt 'I';; \
-        -*O) strip_trailopt 'O'; skip_next=yes;; \
-      -*O?*) strip_trailopt 'O';; \
-        -*l) strip_trailopt 'l'; skip_next=yes;; \
-      -*l?*) strip_trailopt 'l';; \
-      -[dEDm]) skip_next=yes;; \
-      -[JT]) skip_next=yes;; \
-    esac; \
-    case $$flg in \
-      *$$target_option*) has_opt=yes; break;; \
-    esac; \
-  done; \
-  test $$has_opt = yes
-am__make_dryrun = (target_option=n; $(am__make_running_with_option))
-am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-@ENABLE_DEVEL_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@am__append_1 = $(docbook:.xml=.html)
-@ENABLE_DEVEL_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TEXT_TRUE@@HAVE_XMLTO_TRUE@am__append_2 = $(docbook:.xml=.txt)
-@ENABLE_DEVEL_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@am__append_3 = $(docbook:.xml=.pdf) $(docbook:.xml=.ps)
-subdir = hw/dmx/doc
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \
-	$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \
-	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
-	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
-	$(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-	$(ACLOCAL_M4)
-DIST_COMMON = $(srcdir)/Makefile.am $(am__dist_noinst_DATA_DIST) \
-	$(am__DIST_COMMON)
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
-	$(top_builddir)/include/xorg-server.h \
-	$(top_builddir)/include/dix-config.h \
-	$(top_builddir)/include/xorg-config.h \
-	$(top_builddir)/include/xkb-config.h \
-	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
-	$(top_builddir)/include/version-config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-AM_V_P = $(am__v_P_@AM_V@)
-am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
-am__v_P_0 = false
-am__v_P_1 = :
-AM_V_GEN = $(am__v_GEN_@AM_V@)
-am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo "  GEN     " $@;
-am__v_GEN_1 = 
-AM_V_at = $(am__v_at_@AM_V@)
-am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
-am__v_at_0 = @
-am__v_at_1 = 
-SOURCES =
-DIST_SOURCES =
-am__can_run_installinfo = \
-  case $$AM_UPDATE_INFO_DIR in \
-    n|no|NO) false;; \
-    *) (install-info --version) >/dev/null 2>&1;; \
-  esac
-am__dist_noinst_DATA_DIST = dmx.xml scaled.xml
-DATA = $(dist_noinst_DATA) $(noinst_DATA)
-am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
-am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/devbook.am
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
-ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
-AMTAR = @AMTAR@
-AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
-APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@
-APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@
-APP_MAN_DIR = @APP_MAN_DIR@
-APP_MAN_SUFFIX = @APP_MAN_SUFFIX@
-AR = @AR@
-AS = @AS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-BASE_CFLAGS = @BASE_CFLAGS@
-BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
-BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
-BUNDLE_VERSION = @BUNDLE_VERSION@
-BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
-CC = @CC@
-CCAS = @CCAS@
-CCASDEPMODE = @CCASDEPMODE@
-CCASFLAGS = @CCASFLAGS@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CHANGELOG_CMD = @CHANGELOG_CMD@
-COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CWARNFLAGS = @CWARNFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DBUS_CFLAGS = @DBUS_CFLAGS@
-DBUS_LIBS = @DBUS_LIBS@
-DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@
-DEFAULT_LOGDIR = @DEFAULT_LOGDIR@
-DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@
-DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@
-DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@
-DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DGA_CFLAGS = @DGA_CFLAGS@
-DGA_LIBS = @DGA_LIBS@
-DIX_CFLAGS = @DIX_CFLAGS@
-DIX_LIB = @DIX_LIB@
-DLLTOOL = @DLLTOOL@
-DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
-DOT = @DOT@
-DOXYGEN = @DOXYGEN@
-DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
-DRI2PROTO_LIBS = @DRI2PROTO_LIBS@
-DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@
-DRI3PROTO_LIBS = @DRI3PROTO_LIBS@
-DRIVER_MAN_DIR = @DRIVER_MAN_DIR@
-DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
-DRI_DRIVER_PATH = @DRI_DRIVER_PATH@
-DSYMUTIL = @DSYMUTIL@
-DTRACE = @DTRACE@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-FILE_MAN_DIR = @FILE_MAN_DIR@
-FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
-FONT100DPIDIR = @FONT100DPIDIR@
-FONT75DPIDIR = @FONT75DPIDIR@
-FONTMISCDIR = @FONTMISCDIR@
-FONTOTFDIR = @FONTOTFDIR@
-FONTROOTDIR = @FONTROOTDIR@
-FONTTTFDIR = @FONTTTFDIR@
-FONTTYPE1DIR = @FONTTYPE1DIR@
-FOP = @FOP@
-GBM_CFLAGS = @GBM_CFLAGS@
-GBM_LIBS = @GBM_LIBS@
-GLAMOR_CFLAGS = @GLAMOR_CFLAGS@
-GLAMOR_LIBS = @GLAMOR_LIBS@
-GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@
-GLX_DEFINES = @GLX_DEFINES@
-GLX_SYS_LIBS = @GLX_SYS_LIBS@
-GL_CFLAGS = @GL_CFLAGS@
-GL_LIBS = @GL_LIBS@
-GREP = @GREP@
-HAL_CFLAGS = @HAL_CFLAGS@
-HAL_LIBS = @HAL_LIBS@
-HAVE_DOT = @HAVE_DOT@
-INSTALL = @INSTALL@
-INSTALL_CMD = @INSTALL_CMD@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-KDRIVE_CFLAGS = @KDRIVE_CFLAGS@
-KDRIVE_INCS = @KDRIVE_INCS@
-KDRIVE_LIBS = @KDRIVE_LIBS@
-KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@
-KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@
-KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@
-KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@
-KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@
-KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@
-KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@
-LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@
-LEX = @LEX@
-LEXLIB = @LEXLIB@
-LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
-LIBDRM_CFLAGS = @LIBDRM_CFLAGS@
-LIBDRM_LIBS = @LIBDRM_LIBS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@
-LIBSHA1_LIBS = @LIBSHA1_LIBS@
-LIBTOOL = @LIBTOOL@
-LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
-LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
-LIB_MAN_DIR = @LIB_MAN_DIR@
-LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
-MAIN_LIB = @MAIN_LIB@
-MAKEINFO = @MAKEINFO@
-MANIFEST_TOOL = @MANIFEST_TOOL@
-MAN_SUBSTS = @MAN_SUBSTS@
-MISC_MAN_DIR = @MISC_MAN_DIR@
-MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
-MKDIR_P = @MKDIR_P@
-NM = @NM@
-NMEDIT = @NMEDIT@
-OBJC = @OBJC@
-OBJCCLD = @OBJCCLD@
-OBJCDEPMODE = @OBJCDEPMODE@
-OBJCFLAGS = @OBJCFLAGS@
-OBJCLINK = @OBJCLINK@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
-OPENSSL_LIBS = @OPENSSL_LIBS@
-OS_LIB = @OS_LIB@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@
-PCIACCESS_LIBS = @PCIACCESS_LIBS@
-PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@
-PIXMAN_CFLAGS = @PIXMAN_CFLAGS@
-PIXMAN_LIBS = @PIXMAN_LIBS@
-PKG_CONFIG = @PKG_CONFIG@
-PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
-PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
-PROJECTROOT = @PROJECTROOT@
-PTHREAD_CC = @PTHREAD_CC@
-PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
-PTHREAD_LIBS = @PTHREAD_LIBS@
-PYTHON3 = @PYTHON3@
-RANLIB = @RANLIB@
-RAWCPP = @RAWCPP@
-RAWCPPFLAGS = @RAWCPPFLAGS@
-RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
-SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
-SED = @SED@
-SELINUX_CFLAGS = @SELINUX_CFLAGS@
-SELINUX_LIBS = @SELINUX_LIBS@
-SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@
-SET_MAKE = @SET_MAKE@
-SHA1_CFLAGS = @SHA1_CFLAGS@
-SHA1_LIBS = @SHA1_LIBS@
-SHELL = @SHELL@
-SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@
-STRICT_CFLAGS = @STRICT_CFLAGS@
-STRIP = @STRIP@
-STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@
-SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@
-SYSCONFDIR = @SYSCONFDIR@
-SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@
-SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@
-TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@
-UDEV_CFLAGS = @UDEV_CFLAGS@
-UDEV_LIBS = @UDEV_LIBS@
-UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
-VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
-VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
-WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
-WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
-WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
-XCONFIGDIR = @XCONFIGDIR@
-XCONFIGFILE = @XCONFIGFILE@
-XDMCP_CFLAGS = @XDMCP_CFLAGS@
-XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
-XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
-XEPHYR_INCS = @XEPHYR_INCS@
-XEPHYR_LIBS = @XEPHYR_LIBS@
-XF86CONFIGDIR = @XF86CONFIGDIR@
-XF86CONFIGFILE = @XF86CONFIGFILE@
-XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@
-XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@
-XKB_COMPILED_DIR = @XKB_COMPILED_DIR@
-XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@
-XKB_DFLT_MODEL = @XKB_DFLT_MODEL@
-XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@
-XKB_DFLT_RULES = @XKB_DFLT_RULES@
-XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@
-XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@
-XLIB_CFLAGS = @XLIB_CFLAGS@
-XLIB_LIBS = @XLIB_LIBS@
-XMLTO = @XMLTO@
-XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@
-XNESTMODULES_LIBS = @XNESTMODULES_LIBS@
-XNEST_LIBS = @XNEST_LIBS@
-XNEST_SYS_LIBS = @XNEST_SYS_LIBS@
-XORG_CFLAGS = @XORG_CFLAGS@
-XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@
-XORG_INCS = @XORG_INCS@
-XORG_LIBS = @XORG_LIBS@
-XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@
-XORG_MAN_PAGE = @XORG_MAN_PAGE@
-XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@
-XORG_MODULES_LIBS = @XORG_MODULES_LIBS@
-XORG_OS_SUBDIR = @XORG_OS_SUBDIR@
-XORG_SGML_PATH = @XORG_SGML_PATH@
-XORG_SYS_LIBS = @XORG_SYS_LIBS@
-XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@
-XPBPROXY_LIBS = @XPBPROXY_LIBS@
-XQUARTZ_LIBS = @XQUARTZ_LIBS@
-XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
-XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
-XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
-XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
-XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
-XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@
-XSERVER_LIBS = @XSERVER_LIBS@
-XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@
-XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
-XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
-XSLTPROC = @XSLTPROC@
-XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
-XVFB_LIBS = @XVFB_LIBS@
-XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
-XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
-XWINMODULES_LIBS = @XWINMODULES_LIBS@
-XWIN_LIBS = @XWIN_LIBS@
-XWIN_SERVER_NAME = @XWIN_SERVER_NAME@
-XWIN_SYS_LIBS = @XWIN_SYS_LIBS@
-YACC = @YACC@
-YFLAGS = @YFLAGS@
-abi_ansic = @abi_ansic@
-abi_extension = @abi_extension@
-abi_videodrv = @abi_videodrv@
-abi_xinput = @abi_xinput@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_AR = @ac_ct_AR@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-ax_pthread_config = @ax_pthread_config@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-driverdir = @driverdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-extdir = @extdir@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-logdir = @logdir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-moduledir = @moduledir@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-runstatedir = @runstatedir@
-sbindir = @sbindir@
-sdkdir = @sdkdir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-symbol_visibility = @symbol_visibility@
-sysconfdir = @sysconfdir@
-sysconfigdir = @sysconfigdir@
-target_alias = @target_alias@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-
-# Main DocBook/XML files (DOCTYPE book)
-@ENABLE_DEVEL_DOCS_TRUE@@HAVE_XMLTO_TRUE@docbook = dmx.xml scaled.xml
-
-# Developers documnetation is not installed
-@ENABLE_DEVEL_DOCS_TRUE@@HAVE_XMLTO_TRUE@noinst_DATA =  \
-@ENABLE_DEVEL_DOCS_TRUE@@HAVE_XMLTO_TRUE@	$(am__append_1) \
-@ENABLE_DEVEL_DOCS_TRUE@@HAVE_XMLTO_TRUE@	$(am__append_2) \
-@ENABLE_DEVEL_DOCS_TRUE@@HAVE_XMLTO_TRUE@	$(am__append_3)
-
-# DocBook/XML file with chapters, appendix and images it includes
-@ENABLE_DEVEL_DOCS_TRUE@@HAVE_XMLTO_TRUE@dist_noinst_DATA = $(docbook) $(chapters)
-@ENABLE_DEVEL_DOCS_TRUE@@HAVE_XMLTO_TRUE@FILTER_XMLTO = $(SHELL) $(top_srcdir)/doc/filter-xmlto.sh $(XMLTO)
-@ENABLE_DEVEL_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@XMLTO_HTML_FLAGS = \
-@ENABLE_DEVEL_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@	--searchpath "$(XORG_SGML_PATH)/X11" 		\
-@ENABLE_DEVEL_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@	--searchpath "$(abs_top_builddir)"		\
-@ENABLE_DEVEL_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@	-x $(STYLESHEET_SRCDIR)/xorg-xhtml.xsl
-
-@ENABLE_DEVEL_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@XMLTO_FO_FLAGS = \
-@ENABLE_DEVEL_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@	--searchpath "$(XORG_SGML_PATH)/X11" 		\
-@ENABLE_DEVEL_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@	--searchpath "$(abs_top_builddir)"		\
-@ENABLE_DEVEL_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@	--stringparam img.src.path=$(abs_builddir)/	\
-@ENABLE_DEVEL_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@	-x $(STYLESHEET_SRCDIR)/xorg-fo.xsl
-
-@ENABLE_DEVEL_DOCS_TRUE@@HAVE_XMLTO_TRUE@CLEANFILES = $(noinst_DATA)
-
-# Generate DocBook/XML output formats with or without stylesheets
-EXTRA_DIST = DMXSpec.txt DMXSpec-v1.txt
-all: all-am
-
-.SUFFIXES:
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(top_srcdir)/devbook.am $(am__configure_deps)
-	@for dep in $?; do \
-	  case '$(am__configure_deps)' in \
-	    *$$dep*) \
-	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
-	        && { if test -f $@; then exit 0; else break; fi; }; \
-	      exit 1;; \
-	  esac; \
-	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/dmx/doc/Makefile'; \
-	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --foreign hw/dmx/doc/Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	@case '$?' in \
-	  *config.status*) \
-	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
-	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
-	esac;
-$(top_srcdir)/devbook.am $(am__empty):
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure:  $(am__configure_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-
-mostlyclean-libtool:
-	-rm -f *.lo
-
-clean-libtool:
-	-rm -rf .libs _libs
-tags TAGS:
-
-ctags CTAGS:
-
-cscope cscopelist:
-
-
-distdir: $(BUILT_SOURCES)
-	$(MAKE) $(AM_MAKEFLAGS) distdir-am
-
-distdir-am: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	list='$(DISTFILES)'; \
-	  dist_files=`for file in $$list; do echo $$file; done | \
-	  sed -e "s|^$$srcdirstrip/||;t" \
-	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
-	case $$dist_files in \
-	  */*) $(MKDIR_P) `echo "$$dist_files" | \
-			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
-			   sort -u` ;; \
-	esac; \
-	for file in $$dist_files; do \
-	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  if test -d $$d/$$file; then \
-	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
-	    if test -d "$(distdir)/$$file"; then \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
-	  else \
-	    test -f "$(distdir)/$$file" \
-	    || cp -p $$d/$$file "$(distdir)/$$file" \
-	    || exit 1; \
-	  fi; \
-	done
-check-am: all-am
-check: check-am
-all-am: Makefile $(DATA)
-installdirs:
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
-	if test -z '$(STRIP)'; then \
-	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	      install; \
-	else \
-	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
-	fi
-mostlyclean-generic:
-
-clean-generic:
-	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean-generic:
-	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
-	@echo "This command is intended for maintainers to use"
-	@echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-am
-	-rm -f Makefile
-distclean-am: clean-am distclean-generic
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am:
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
-	-rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am:
-
-.MAKE: install-am install-strip
-
-.PHONY: all all-am check check-am clean clean-generic clean-libtool \
-	cscopelist-am ctags-am distclean distclean-generic \
-	distclean-libtool distdir dvi dvi-am html html-am info info-am \
-	install install-am install-data install-data-am install-dvi \
-	install-dvi-am install-exec install-exec-am install-html \
-	install-html-am install-info install-info-am install-man \
-	install-pdf install-pdf-am install-ps install-ps-am \
-	install-strip installcheck installcheck-am installdirs \
-	maintainer-clean maintainer-clean-generic mostlyclean \
-	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-	tags-am uninstall uninstall-am
-
-.PRECIOUS: Makefile
-
-@ENABLE_DEVEL_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@%.html: %.xml  $(chapters)
-@ENABLE_DEVEL_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@	$(AM_V_GEN)$(FILTER_XMLTO) $(XMLTO_HTML_FLAGS) xhtml-nochunks $<
-@ENABLE_DEVEL_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TEXT_TRUE@@HAVE_XMLTO_TRUE@%.txt: %.xml $(chapters)
-@ENABLE_DEVEL_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TEXT_TRUE@@HAVE_XMLTO_TRUE@	$(AM_V_GEN)$(FILTER_XMLTO) $(XMLTO_HTML_FLAGS) txt $<
-@ENABLE_DEVEL_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@%.pdf: %.xml $(chapters)
-@ENABLE_DEVEL_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@	$(AM_V_GEN)$(FILTER_XMLTO) $(XMLTO_FO_FLAGS) --with-fop pdf $<
-@ENABLE_DEVEL_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@%.ps: %.xml $(chapters)
-@ENABLE_DEVEL_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@	$(AM_V_GEN)$(FILTER_XMLTO) $(XMLTO_FO_FLAGS) --with-fop ps $<
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/hw/dmx/doc/dmx.xml b/hw/dmx/doc/dmx.xml
deleted file mode 100644
index f10cf79..0000000
--- a/hw/dmx/doc/dmx.xml
+++ /dev/null
@@ -1,3412 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
- "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
- <!ENTITY % defs SYSTEM "/xserver/doc/xml/xserver.ent"> %defs;
-]>
-
-<article>
-
-  <articleinfo>
-    <!-- Title information -->
-    <title>Distributed Multihead X Design</title>
-    <authorgroup>
-      <author><firstname>Kevin E.</firstname><surname>Martin</surname></author>
-      <author><firstname>David H.</firstname><surname>Dawes</surname></author>
-      <author><firstname>Rickard E.</firstname><surname>Faith</surname></author>
-    </authorgroup>
-    <pubdate>29 June 2004 (created 25 July 2001)</pubdate>
-    <releaseinfo>X Server Version &xserver.version;</releaseinfo>
-    <abstract><para>
-        This document covers the motivation, background, design, and
-        implementation of the distributed multihead X (DMX) system.  It
-        is a living document and describes the current design and
-        implementation details of the DMX system.  As the project
-        progresses, this document will be continually updated to reflect
-        the changes in the code and/or design.  <emphasis remap="it">Copyright 2001 by VA
-        Linux Systems, Inc., Fremont, California.  Copyright 2001-2004
-        by Red Hat, Inc., Raleigh, North Carolina</emphasis>
-      </para></abstract>
-  </articleinfo>
-
-<!-- Begin the document -->
-<sect1>
-<title>Introduction</title>
-
-<sect2>
-<title>The Distributed Multihead X Server</title>
-
-<para>Current Open Source multihead solutions are limited to a single
-physical machine.  A single X server controls multiple display devices,
-which can be arranged as independent heads or unified into a single
-desktop (with Xinerama).  These solutions are limited to the number of
-physical devices that can co-exist in a single machine (e.g., due to the
-number of AGP/PCI slots available for graphics cards).  Thus, large
-tiled displays are not currently possible.  The work described in this
-paper will eliminate the requirement that the display devices reside in
-the same physical machine.  This will be accomplished by developing a
-front-end proxy X server that will control multiple back-end X servers
-that make up the large display.
-</para>
-
-<para>The overall structure of the distributed multihead X (DMX) project is
-as follows: A single front-end X server will act as a proxy to a set of
-back-end X servers, which handle all of the visible rendering.  X
-clients will connect to the front-end server just as they normally would
-to a regular X server.  The front-end server will present an abstracted
-view to the client of a single large display.  This will ensure that all
-standard X clients will continue to operate without modification
-(limited, as always, by the visuals and extensions provided by the X
-server).  Clients that are DMX-aware will be able to use an extension to
-obtain information about the back-end servers (e.g., for placement of
-pop-up windows, window alignments by the window manager, etc.).
-</para>
-
-<para>The architecture of the DMX server is divided into two main sections:
-input (e.g., mouse and keyboard events) and output (e.g., rendering and
-windowing requests).  Each of these are describe briefly below, and the
-rest of this design document will describe them in greater detail.
-</para>
-
-<para>The DMX server can receive input from three general types of input
-devices: "local" devices that are physically attached to the machine on
-which DMX is running, "backend" devices that are physically attached to
-one or more of the back-end X servers (and that generate events via the
-X protocol stream from the backend), and "console" devices that can be
-abstracted from any non-back-end X server.  Backend and console devices
-are treated differently because the pointer device on the back-end X
-server also controls the location of the hardware X cursor.  Full
-support for XInput extension devices is provided.
-</para>
-
-<para>Rendering requests will be accepted by the front-end server; however,
-rendering to visible windows will be broken down as needed and sent to
-the appropriate back-end server(s) via X11 library calls for actual
-rendering.  The basic framework will follow a Xnest-style approach.  GC
-state will be managed in the front-end server and sent to the
-appropriate back-end server(s) as required.  Pixmap rendering will (at
-least initially) be handled by the front-end X server.  Windowing
-requests (e.g., ordering, mapping, moving, etc.) will handled in the
-front-end server.  If the request requires a visible change, the
-windowing operation will be translated into requests for the appropriate
-back-end server(s).  Window state will be mirrored in the back-end
-server(s) as needed.
-</para>
-</sect2>
-
-<sect2>
-<title>Layout of Paper</title>
-
-<para>The next section describes the general development plan that was
-actually used for implementation.  The final section discusses
-outstanding issues at the conclusion of development.  The first appendix
-provides low-level technical detail that may be of interest to those
-intimately familiar with the X server architecture.  The final appendix
-describes the four phases of development that were performed during the
-first two years of development.
-</para>
-
-<para>The final year of work was divided into 9 tasks that are not
-described in specific sections of this document.  The major tasks during
-that time were the enhancement of the reconfiguration ability added in
-Phase IV, addition of support for a dynamic number of back-end displays
-(instead of a hard-coded limit), and the support for back-end display
-and input removal and addition.  This work is mentioned in this paper,
-but is not covered in detail.
-</para>
-</sect2>
-</sect1>
-
-<!-- ============================================================ -->
-<sect1>
-<title>Development plan</title>
-
-<para>This section describes the development plan from approximately June
-2001 through July 2003.
-</para>
-
-<sect2>
-<title>Bootstrap code</title>
-
-<para>To allow for rapid development of the DMX server by multiple
-developers during the first development stage, the problem will be
-broken down into three tasks: the overall DMX framework, back-end
-rendering services and input device handling services.  However, before
-the work begins on these tasks, a simple framework that each developer
-could use was implemented to bootstrap the development effort.  This
-framework renders to a single back-end server and provides dummy input
-devices (i.e., the keyboard and mouse).  The simple back-end rendering
-service was implemented using the shadow framebuffer support currently
-available in the XFree86 environment.
-</para>
-
-<para>Using this bootstrapping framework, each developer has been able to
-work on each of the tasks listed above independently as follows: the
-framework will be extended to handle arbitrary back-end server
-configurations; the back-end rendering services will be transitioned to
-the more efficient Xnest-style implementation; and, an input device
-framework to handle various input devices via the input extension will
-be developed.
-</para>
-
-<para>Status: The boot strap code is complete.   <!-- August 2001 -->
-</para>
-
-</sect2>
-
-<sect2>
-<title>Input device handling</title>
-
-<para>An X server (including the front-end X server) requires two core
-input devices -- a keyboard and a pointer (mouse).  These core devices
-are handled and required by the core X11 protocol.  Additional types of
-input devices may be attached and utilized via the XInput extension.
-These are usually referred to as ``XInput extension devices'',
-</para>
-
-<para>There are some options as to how the front-end X server gets its core
-input devices:
-
-<orderedlist>
-<listitem>
-    <para>Local Input. The physical input devices (e.g., keyboard and
-    mouse) can be attached directly to the front-end X server.  In this
-    case, the keyboard and mouse on the machine running the front-end X
-    server will be used.  The front-end will have drivers to read the
-    raw input from those devices and convert it into the required X
-    input events (e.g., key press/release, pointer button press/release,
-    pointer motion).  The front-end keyboard driver will keep track of
-    keyboard properties such as key and modifier mappings, autorepeat
-    state, keyboard sound and led state.  Similarly the front-end
-    pointer driver will keep track if pointer properties such as the
-    button mapping and movement acceleration parameters.  With this
-    option, input is handled fully in the front-end X server, and the
-    back-end X servers are used in a display-only mode.  This option was
-    implemented and works for a limited number of Linux-specific
-    devices.  Adding additional local input devices for other
-    architectures is expected to be relatively simple.
-</para>
-
-    <para>The following options are available for implementing local input
-    devices:
-
-<orderedlist>
-<listitem>
-        <para>The XFree86 X server has modular input drivers that could
-        be adapted for this purpose.  The mouse driver supports a wide
-        range of mouse types and interfaces, as well as a range of
-        Operating System platforms.  The keyboard driver in XFree86 is
-        not currently as modular as the mouse driver, but could be made
-        so.  The XFree86 X server also has a range of other input
-        drivers for extended input devices such as tablets and touch
-        screens.  Unfortunately, the XFree86 drivers are generally
-        complex, often simultaneously providing support for multiple
-        devices across multiple architectures; and rely so heavily on
-        XFree86-specific helper-functions, that this option was not
-        pursued.
-</para>
-</listitem>
-
-<listitem>
-        <para>The <command>kdrive</command> X server in XFree86 has built-in drivers that
-        support PS/2 mice and keyboard under Linux.  The mouse driver
-        can indirectly handle other mouse types if the Linux utility
-        <command>gpm</command> is used as to translate the native mouse protocol into
-        PS/2 mouse format.  These drivers could be adapted and built in
-        to the front-end X server if this range of hardware and OS
-        support is sufficient.  While much simpler than the XFree86
-        drivers, the <command>kdrive</command> drivers were not used for the DMX
-        implementation.
-</para>
-</listitem>
-
-<listitem>
-        <para>Reimplementation of keyboard and mouse drivers from
-        scratch for the DMX framework.  Because keyboard and mouse
-        drivers are relatively trivial to implement, this pathway was
-        selected.  Other drivers in the X source tree were referenced,
-        and significant contributions from other drivers are noted in
-        the DMX source code.
-</para>
-</listitem>
-</orderedlist>
-</para>
-</listitem>
-
-<listitem>
-    <para>Backend Input.  The front-end can make use of the core input
-    devices attached to one or more of the back-end X servers.  Core
-    input events from multiple back-ends are merged into a single input
-    event stream.  This can work sanely when only a single set of input
-    devices is used at any given time.  The keyboard and pointer state
-    will be handled in the front-end, with changes propagated to the
-    back-end servers as needed.  This option was implemented and works
-    well.  Because the core pointer on a back-end controls the hardware
-    mouse on that back-end, core pointers cannot be treated as XInput
-    extension devices.  However, all back-end XInput extensions devices
-    can be mapped to either DMX core or DMX XInput extension devices.
-</para>
-</listitem>
-
-<listitem>
-    <para>Console Input.  The front-end server could create a console
-    window that is displayed on an X server independent of the back-end
-    X servers.  This console window could display things like the
-    physical screen layout, and the front-end could get its core input
-    events from events delivered to the console window.  This option was
-    implemented and works well.  To help the human navigate, window
-    outlines are also displayed in the console window.  Further, console
-    windows can be used as either core or XInput extension devices.
-</para>
-</listitem>
-
-<listitem>
-    <para>Other options were initially explored, but they were all
-    partial subsets of the options listed above and, hence, are
-    irrelevant.
-</para>
-</listitem>
-
-</orderedlist>
-</para>
-
-<para>Although extended input devices are not specifically mentioned in the
-Distributed X requirements, the options above were all implemented so
-that XInput extension devices were supported.
-</para>
-
-<para>The bootstrap code (Xdmx) had dummy input devices, and these are
-still supported in the final version.  These do the necessary
-initialization to satisfy the X server's requirements for core pointer
-and keyboard devices, but no input events are ever generated.
-</para>
-
-<para>Status: The input code is complete.  Because of the complexity of the
-XFree86 input device drivers (and their heavy reliance on XFree86
-infrastructure), separate low-level device drivers were implemented for
-Xdmx.  The following kinds of drivers are supported (in general, the
-devices can be treated arbitrarily as "core" input devices or as XInput
-"extension" devices; and multiple instances of different kinds of
-devices can be simultaneously available):
-<orderedlist>
-<listitem>
-        <para> A "dummy" device drive that never generates events.
-</para>
-</listitem>
-
-<listitem>
-        <para> "Local" input is from the low-level hardware on which the
-        Xdmx binary is running.  This is the only area where using the
-        XFree86 driver infrastructure would have been helpful, and then
-        only partially, since good support for generic USB devices does
-        not yet exist in XFree86 (in any case, XFree86 and kdrive driver
-        code was used where possible).  Currently, the following local
-        devices are supported under Linux (porting to other operating
-        systems should be fairly straightforward):
-        <itemizedlist>
-            <listitem><para>Linux keyboard</para></listitem>
-            <listitem><para>Linux serial mouse (MS)</para></listitem>
-            <listitem><para>Linux PS/2 mouse</para></listitem>
-            <listitem><para>USB keyboard</para></listitem>
-            <listitem><para>USB mouse</para></listitem>
-            <listitem><para>USB generic device (e.g., joystick, gamepad, etc.)</para></listitem>
-        </itemizedlist>
-</para>
-</listitem>
-
-<listitem>
-        <para> "Backend" input is taken from one or more of the back-end
-        displays.  In this case, events are taken from the back-end X
-        server and are converted to Xdmx events.  Care must be taken so
-        that the sprite moves properly on the display from which input
-        is being taken.
-</para>
-</listitem>
-
-<listitem>
-        <para> "Console" input is taken from an X window that Xdmx
-        creates on the operator's display (i.e., on the machine running
-        the Xdmx binary).  When the operator's mouse is inside the
-        console window, then those events are converted to Xdmx events.
-        Several special features are available: the console can display
-        outlines of windows that are on the Xdmx display (to facilitate
-        navigation), the cursor can be confined to the console, and a
-        "fine" mode can be activated to allow very precise cursor
-        positioning.
-</para>
-</listitem>
-</orderedlist>
-
-</para>
-
-</sect2>
-
-<!-- May 2002; July 2003 -->
-
-<sect2>
-<title>Output device handling</title>
-
-<para>The output of the DMX system displays rendering and windowing
-requests across multiple screens.  The screens are typically arranged in
-a grid such that together they represent a single large display.
-</para>
-
-<para>The output section of the DMX code consists of two parts.  The first
-is in the front-end proxy X server (Xdmx), which accepts client
-connections, manages the windows, and potentially renders primitives but
-does not actually display any of the drawing primitives.  The second
-part is the back-end X server(s), which accept commands from the
-front-end server and display the results on their screens.
-</para>
-
-<sect3>
-<title>Initialization</title>
-
-<para>The DMX front-end must first initialize its screens by connecting to
-each of the back-end X servers and collecting information about each of
-these screens.  However, the information collected from the back-end X
-servers might be inconsistent.  Handling these cases can be difficult
-and/or inefficient.  For example, a two screen system has one back-end X
-server running at 16bpp while the second is running at 32bpp.
-Converting rendering requests (e.g., XPutImage() or XGetImage()
-requests) to the appropriate bit depth can be very time consuming.
-Analyzing these cases to determine how or even if it is possible to
-handle them is required.  The current Xinerama code handles many of
-these cases (e.g., in PanoramiXConsolidate()) and will be used as a
-starting point.  In general, the best solution is to use homogeneous X
-servers and display devices.  Using back-end servers with the same depth
-is a requirement of the final DMX implementation.
-</para>
-
-<para>Once this screen consolidation is finished, the relative position of
-each back-end X server's screen in the unified screen is initialized.  A
-full-screen window is opened on each of the back-end X servers, and the
-cursor on each screen is turned off.  The final DMX implementation can
-also make use of a partial-screen window, or multiple windows per
-back-end screen.
-</para>
-</sect3>
-
-<sect3>
-<title>Handling rendering requests</title>
-
-<para>After initialization, X applications connect to the front-end server.
-There are two possible implementations of how rendering and windowing
-requests are handled in the DMX system:
-
-<orderedlist>
-<listitem>
-    <para>A shadow framebuffer is used in the front-end server as the
-    render target.  In this option, all protocol requests are completely
-    handled in the front-end server.  All state and resources are
-    maintained in the front-end including a shadow copy of the entire
-    framebuffer.  The framebuffers attached to the back-end servers are
-    updated by XPutImage() calls with data taken directly from the
-    shadow framebuffer.
-</para>
-
-    <para>This solution suffers from two main problems.  First, it does not
-    take advantage of any accelerated hardware available in the system.
-    Second, the size of the XPutImage() calls can be quite large and
-    thus will be limited by the bandwidth available.
-</para>
-
-    <para>The initial DMX implementation used a shadow framebuffer by
-    default.
-</para>
-</listitem>
-
-<listitem>
-    <para>Rendering requests are sent to each back-end server for
-    handling (as is done in the Xnest server described above).  In this
-    option, certain protocol requests are handled in the front-end
-    server and certain requests are repackaged and then sent to the
-    back-end servers.  The framebuffer is distributed across the
-    multiple back-end servers.  Rendering to the framebuffer is handled
-    on each back-end and can take advantage of any acceleration
-    available on the back-end servers' graphics display device.  State
-    is maintained both in the front and back-end servers.
-</para>
-
-    <para>This solution suffers from two main drawbacks.  First, protocol
-    requests are sent to all back-end servers -- even those that will
-    completely clip the rendering primitive -- which wastes bandwidth
-    and processing time.  Second, state is maintained both in the front-
-    and back-end servers.  These drawbacks are not as severe as in
-    option 1 (above) and can either be overcome through optimizations or
-    are acceptable.  Therefore, this option will be used in the final
-    implementation.
-</para>
-
-    <para>The final DMX implementation defaults to this mechanism, but also
-    supports the shadow framebuffer mechanism.  Several optimizations
-    were implemented to eliminate the drawbacks of the default
-    mechanism.  These optimizations are described the section below and
-    in Phase II of the Development Results (see appendix).
-</para>
-</listitem>
-
-</orderedlist>
-</para>
-
-<para>Status: Both the shadow framebuffer and Xnest-style code is complete.
-<!-- May 2002 -->
-</para>
-
-</sect3>
-</sect2>
-
-<sect2>
-<title>Optimizing DMX</title>
-
-<para>Initially, the Xnest-style solution's performance will be measured
-and analyzed to determine where the performance bottlenecks exist.
-There are four main areas that will be addressed.
-</para>
-
-<para>First, to obtain reasonable interactivity with the first development
-phase, XSync() was called after each protocol request.  The XSync()
-function flushes any pending protocol requests.  It then waits for the
-back-end to process the request and send a reply that the request has
-completed.  This happens with each back-end server and performance
-greatly suffers.  As a result of the way XSync() is called in the first
-development phase, the batching that the X11 library performs is
-effectively defeated.  The XSync() call usage will be analyzed and
-optimized by batching calls and performing them at regular intervals,
-except where interactivity will suffer (e.g., on cursor movements).
-</para>
-
-<para>Second, the initial Xnest-style solution described above sends the
-repackaged protocol requests to all back-end servers regardless of
-whether or not they would be completely clipped out.  The requests that
-are trivially rejected on the back-end server wastes the limited
-bandwidth available.  By tracking clipping changes in the DMX X server's
-windowing code (e.g., by opening, closing, moving or resizing windows),
-we can determine whether or not back-end windows are visible so that
-trivial tests in the front-end server's GC ops drawing functions can
-eliminate these unnecessary protocol requests.
-</para>
-
-<para>Third, each protocol request will be analyzed to determine if it is
-possible to break the request into smaller pieces at display boundaries.
-The initial ones to be analyzed are put and get image requests since
-they will require the greatest bandwidth to transmit data between the
-front and back-end servers.  Other protocol requests will be analyzed
-and those that will benefit from breaking them into smaller requests
-will be implemented.
-</para>
-
-<para>Fourth, an extension is being considered that will allow font glyphs to
-be transferred from the front-end DMX X server to each back-end server.
-This extension will permit the front-end to handle all font requests and
-eliminate the requirement that all back-end X servers share the exact
-same fonts as the front-end server.  We are investigating the
-feasibility of this extension during this development phase.
-</para>
-
-<para>Other potential optimizations will be determined from the performance
-analysis.
-</para>
-
-<para>Please note that in our initial design, we proposed optimizing BLT
-operations (e.g., XCopyArea() and window moves) by developing an
-extension that would allow individual back-end servers to directly copy
-pixel data to other back-end servers.  This potential optimization was
-in response to the simple image movement implementation that required
-potentially many calls to GetImage() and PutImage().  However, the
-current Xinerama implementation handles these BLT operations
-differently.  Instead of copying data to and from screens, they generate
-expose events -- just as happens in the case when a window is moved from
-off a screen to on screen.  This approach saves the limited bandwidth
-available between front and back-end servers and is being standardized
-with Xinerama.  It also eliminates the potential setup problems and
-security issues resulting from having each back-end server open
-connections to all other back-end servers.  Therefore, we suggest
-accepting Xinerama's expose event solution.
-</para>
-
-<para>Also note that the approach proposed in the second and third
-optimizations might cause backing store algorithms in the back-end to be
-defeated, so a DMX X server configuration flag will be added to disable
-these optimizations.
-</para>
-
-<para>Status: The optimizations proposed above are complete.  It was
-determined that the using the xfs font server was sufficient and
-creating a new mechanism to pass glyphs was redundant; therefore, the
-fourth optimization proposed above was not included in DMX.
-<!-- September 2002 -->
-</para>
-
-</sect2>
-
-<sect2>
-<title>DMX X extension support</title>
-
-<para>The DMX X server keeps track of all the windowing information on the
-back-end X servers, but does not currently export this information to
-any client applications.  An extension will be developed to pass the
-screen information and back-end window IDs to DMX-aware clients.  These
-clients can then use this information to directly connect to and render
-to the back-end windows.  Bypassing the DMX X server allows DMX-aware
-clients to break up complex rendering requests on their own and send
-them directly to the windows on the back-end server's screens.  An
-example of a client that can make effective use of this extension is
-Chromium.
-</para>
-
-<para>Status: The extension, as implemented, is fully documented in
-"Client-to-Server DMX Extension to the X Protocol".  Future changes
-might be required based on feedback and other proposed enhancements to
-DMX.  Currently, the following facilities are supported:
-<orderedlist>
-<listitem><para>
-        Screen information (clipping rectangle for each screen relative
-        to the virtual screen)
-</para></listitem>
-<listitem><para>
-        Window information (window IDs and clipping information for each
-        back-end window that corresponds to each DMX window)
-</para></listitem>
-<listitem><para>
-        Input device information (mappings from DMX device IDs to
-        back-end device IDs)
-</para></listitem>
-<listitem><para>
-        Force window creation (so that a client can override the
-        server-side lazy window creation optimization)
-</para></listitem>
-<listitem><para>
-        Reconfiguration (so that a client can request that a screen
-        position be changed)
-</para></listitem>
-<listitem><para>
-        Addition and removal of back-end servers and back-end and
-        console inputs.
-</para></listitem>
-</orderedlist>
-</para>
-<!-- September 2002; July 2003 -->
-
-</sect2>
-
-<sect2>
-<title>Common X extension support</title>
-
-<para>The XInput, XKeyboard and Shape extensions are commonly used
-extensions to the base X11 protocol.  XInput allows multiple and
-non-standard input devices to be accessed simultaneously.  These input
-devices can be connected to either the front-end or back-end servers.
-XKeyboard allows much better keyboard mappings control.  Shape adds
-support for arbitrarily shaped windows and is used by various window
-managers.  Nearly all potential back-end X servers make these extensions
-available, and support for each one will be added to the DMX system.
-</para>
-
-<para>In addition to the extensions listed above, support for the X
-Rendering extension (Render) is being developed.  Render adds digital
-image composition to the rendering model used by the X Window System.
-While this extension is still under development by Keith Packard of HP,
-support for the current version will be added to the DMX system.
-</para>
-
-<para>Support for the XTest extension was added during the first
-development phase.
-</para>
-
-<!-- WARNING: this list is duplicated in the Phase IV discussion -->
-<para>Status: The following extensions are supported and are discussed in
-more detail in Phase IV of the Development Results (see appendix):
-    BIG-REQUESTS,
-    DEC-XTRAP,
-    DMX,
-    DPMS,
-    Extended-Visual-Information,
-    GLX,
-    LBX,
-    RECORD,
-    RENDER,
-    SECURITY,
-    SHAPE,
-    SYNC,
-    X-Resource,
-    XC-APPGROUP,
-    XC-MISC,
-    XFree86-Bigfont,
-    XINERAMA,
-    XInputExtension,
-    XKEYBOARD, and
-    XTEST.
-<!-- November 2002; updated February 2003, July 2003 -->
-</para>
-</sect2>
-
-<sect2>
-<title>OpenGL support</title>
-
-<para>OpenGL support using the Mesa code base exists in XFree86 release 4
-and later.  Currently, the direct rendering infrastructure (DRI)
-provides accelerated OpenGL support for local clients and unaccelerated
-OpenGL support (i.e., software rendering) is provided for non-local
-clients.
-</para>
-
-<para>The single head OpenGL support in XFree86 4.x will be extended to use
-the DMX system.  When the front and back-end servers are on the same
-physical hardware, it is possible to use the DRI to directly render to
-the back-end servers.  First, the existing DRI will be extended to
-support multiple display heads, and then to support the DMX system.
-OpenGL rendering requests will be direct rendering to each back-end X
-server.  The DRI will request the screen layout (either from the
-existing Xinerama extension or a DMX-specific extension).  Support for
-synchronized swap buffers will also be added (on hardware that supports
-it).  Note that a single front-end server with a single back-end server
-on the same physical machine can emulate accelerated indirect rendering.
-</para>
-
-<para>When the front and back-end servers are on different physical
-hardware or are using non-XFree86 4.x X servers, a mechanism to render
-primitives across the back-end servers will be provided.  There are
-several options as to how this can be implemented.
-</para>
-
-<orderedlist>
-<listitem>
-    <para>The existing OpenGL support in each back-end server can be
-    used by repackaging rendering primitives and sending them to each
-    back-end server.  This option is similar to the unoptimized
-    Xnest-style approach mentioned above.  Optimization of this solution
-    is beyond the scope of this project and is better suited to other
-    distributed rendering systems.
-</para></listitem>
-
-<listitem>
-    <para>Rendering to a pixmap in the front-end server using the
-    current XFree86 4.x code, and then displaying to the back-ends via
-    calls to XPutImage() is another option.  This option is similar to
-    the shadow frame buffer approach mentioned above.  It is slower and
-    bandwidth intensive, but has the advantage that the back-end servers
-    are not required to have OpenGL support.
-</para></listitem>
-</orderedlist>
-
-<para>These, and other, options will be investigated in this phase of the
-work.
-</para>
-
-<para>Work by others have made Chromium DMX-aware.  Chromium will use the
-DMX X protocol extension to obtain information about the back-end
-servers and will render directly to those servers, bypassing DMX.
-</para>
-
-<para>Status: OpenGL support by the glxProxy extension was implemented by
-SGI and has been integrated into the DMX code base.
-</para>
-<!-- May 2003-->
-</sect2>
-
-</sect1>
-
-<!-- ============================================================ -->
-<sect1>
-<title>Current issues</title>
-
-<para>In this sections the current issues are outlined that require further
-investigation.
-</para>
-
-<sect2>
-<title>Fonts</title>
-
-<para>The font path and glyphs need to be the same for the front-end and
-each of the back-end servers.  Font glyphs could be sent to the back-end
-servers as necessary but this would consume a significant amount of
-available bandwidth during font rendering for clients that use many
-different fonts (e.g., Netscape).  Initially, the font server (xfs) will
-be used to provide the fonts to both the front-end and back-end servers.
-Other possibilities will be investigated during development.
-</para>
-</sect2>
-
-<sect2>
-<title>Zero width rendering primitives</title>
-
-<para>To allow pixmap and on-screen rendering to be pixel perfect, all
-back-end servers must render zero width primitives exactly the same as
-the front-end renders the primitives to pixmaps.  For those back-end
-servers that do not exactly match, zero width primitives will be
-automatically converted to one width primitives.  This can be handled in
-the front-end server via the GC state.
-</para>
-</sect2>
-
-<sect2>
-<title>Output scaling</title>
-
-<para>With very large tiled displays, it might be difficult to read the
-information on the standard X desktop.  In particular, the cursor can be
-easily lost and fonts could be difficult to read.  Automatic primitive
-scaling might prove to be very useful.  We will investigate the
-possibility of scaling the cursor and providing a set of alternate
-pre-scaled fonts to replace the standard fonts that many applications
-use (e.g., fixed).  Other options for automatic scaling will also be
-investigated.
-</para>
-</sect2>
-
-<sect2>
-<title>Per-screen colormaps</title>
-
-<para>Each screen's default colormap in the set of back-end X servers
-should be able to be adjusted via a configuration utility.  This support
-is would allow the back-end screens to be calibrated via custom gamma
-tables.  On 24-bit systems that support a DirectColor visual, this type
-of correction can be accommodated.  One possible implementation would be
-to advertise to X client of the DMX server a TrueColor visual while
-using DirectColor visuals on the back-end servers to implement this type
-of color correction.  Other options will be investigated.
-</para>
-</sect2>
-</sect1>
-
-<!-- ============================================================ -->
-<appendix>
-<title>Appendix</title>
-
-<sect1>
-<title>Background</title>
-
-<para>This section describes the existing Open Source architectures that
-can be used to handle multiple screens and upon which this development
-project is based.  This section was written before the implementation
-was finished, and may not reflect actual details of the implementation.
-It is left for historical interest only.
-</para>
-
-<sect2>
-<title>Core input device handling</title>
-
-<para>The following is a description of how core input devices are handled
-by an X server.
-</para>
-
-<sect3>
-<title>InitInput()</title>
-
-<para>InitInput() is a DDX function that is called at the start of each
-server generation from the X server's main() function.  Its purpose is
-to determine what input devices are connected to the X server, register
-them with the DIX and MI layers, and initialize the input event queue.
-InitInput() does not have a return value, but the X server will abort if
-either a core keyboard device or a core pointer device are not
-registered.  Extended input (XInput) devices can also be registered in
-InitInput().
-</para>
-
-<para>InitInput() usually has implementation specific code to determine
-which input devices are available.  For each input device it will be
-using, it calls AddInputDevice():
-
-<variablelist>
-<varlistentry>
-<term>AddInputDevice()</term>
-<listitem><para>This DIX function allocates the device structure,
-registers a callback function (which handles device init, close, on and
-off), and returns the input handle, which can be treated as opaque.  It
-is called once for each input device.
-</para></listitem>
-</varlistentry>
-</variablelist>
-</para>
-
-<para>Once input handles for core keyboard and core pointer devices have
-been obtained from AddInputDevice().  If both core devices are not
-registered, then the X server will exit with a fatal error when it
-attempts to start the input devices in InitAndStartDevices(), which is
-called directly after InitInput() (see below).
-</para>
-
-<para>The core pointer device is then registered with the miPointer code
-(which does the high level cursor handling).  While this registration
-is not necessary for correct miPointer operation in the current XFree86
-code, it is still done mostly for compatibility reasons.
-</para>
-
-<para><variablelist>
-
-<varlistentry>
-<term>miRegisterPointerDevice()</term>
-<listitem><para>This MI function registers the core
-pointer's input handle with with the miPointer code.
-</para></listitem></varlistentry>
-</variablelist>
-</para>
-
-<para>The final part of InitInput() is the initialization of the input
-event queue handling.  In most cases, the event queue handling provided
-in the MI layer is used.  The primary XFree86 X server uses its own
-event queue handling to support some special cases related to the XInput
-extension and the XFree86-specific DGA extension.  For our purposes, the
-MI event queue handling should be suitable.  It is initialized by
-calling mieqInit():
-
-<variablelist>
-<varlistentry>
-<term>mieqInit()</term>
-<listitem><para>This MI function initializes the MI event queue for the
-core devices, and is passed the public component of the input handles
-for the two core devices.
-</para></listitem></varlistentry>
-</variablelist>
-</para>
-
-<para>If a wakeup handler is required to deliver synchronous input
-events, it can be registered here by calling the DIX function
-RegisterBlockAndWakeupHandlers().  (See the devReadInput() description
-below.)
-</para>
-</sect3>
-
-<sect3>
-<title>InitAndStartDevices()</title>
-
-<para>InitAndStartDevices() is a DIX function that is called immediately
-after InitInput() from the X server's main() function.  Its purpose is
-to initialize each input device that was registered with
-AddInputDevice(), enable each input device that was successfully
-initialized, and create the list of enabled input devices.  Once each
-registered device is processed in this way, the list of enabled input
-devices is checked to make sure that both a core keyboard device and
-core pointer device were registered and successfully enabled.  If not,
-InitAndStartDevices() returns failure, and results in the the X server
-exiting with a fatal error.
-</para>
-
-<para>Each registered device is initialized by calling its callback
-(dev-&gt;deviceProc) with the DEVICE_INIT argument:
-
-<variablelist>
-<varlistentry>
-<term>(*dev-&gt;deviceProc)(dev, DEVICE_INIT)</term>
-<listitem>
-<para>This function initializes the
-device structs with core information relevant to the device.
-</para>
-
-<para>For pointer devices, this means specifying the number of buttons,
-default button mapping, the function used to get motion events (usually
-miPointerGetMotionEvents()), the function used to change/control the
-core pointer motion parameters (acceleration and threshold), and the
-motion buffer size.
-</para>
-
-<para>For keyboard devices, this means specifying the keycode range,
-default keycode to keysym mapping, default modifier mapping, and the
-functions used to sound the keyboard bell and modify/control the
-keyboard parameters (LEDs, bell pitch and duration, key click, which
-keys are auto-repeating, etc).
-</para></listitem></varlistentry>
-</variablelist>
-</para>
-
-<para>Each initialized device is enabled by calling EnableDevice():
-
-<variablelist>
-<varlistentry>
-<term>EnableDevice()</term>
-<listitem>
-<para>EnableDevice() calls the device callback with
-DEVICE_ON:
-    <variablelist>
-    <varlistentry>
-    <term>(*dev-&gt;deviceProc)(dev, DEVICE_ON)</term>
-    <listitem>
-    <para>This typically opens and
-    initializes the relevant physical device, and when appropriate,
-    registers the device's file descriptor (or equivalent) as a valid
-    input source.
-    </para></listitem></varlistentry>
-    </variablelist>
-    </para>
-
-    <para>EnableDevice() then adds the device handle to the X server's
-    global list of enabled devices.
-</para></listitem></varlistentry>
-</variablelist>
-</para>
-
-<para>InitAndStartDevices() then verifies that a valid core keyboard and
-pointer has been initialized and enabled.  It returns failure if either
-are missing.
-</para>
-</sect3>
-
-<sect3>
-<title>devReadInput()</title>
-
-<para>Each device will have some function that gets called to read its
-physical input. This function should do at least two things: make sure that
-input events get enqueued, and make sure that the cursor gets moved for motion
-events (except if these are handled later by the driver's own event queue
-processing function, which cannot be done when using the MI event queue
-handling).
-</para>
-
-<para>Events are queued by calling mieqEnqueue():
-
-<variablelist>
-<varlistentry>
-<term>mieqEnqueue()</term>
-<listitem>
-<para>This MI function is used to add input events to the
-event queue.  It is simply passed the event to be queued.
-</para></listitem></varlistentry>
-</variablelist>
-</para>
-
-<para>The cursor position should be updated when motion events are
-enqueued by calling miPointerDeltaCursor():
-
-<variablelist>
-<varlistentry>
-<term>miPointerDeltaCursor()</term>
-<listitem>
-<para>This MI function is used to move the cursor
-relative to its current position.
-</para></listitem></varlistentry>
-</variablelist>
-</para>
-</sect3>
-
-<sect3>
-<title>ProcessInputEvents()</title>
-
-<para>ProcessInputEvents() is a DDX function that is called from the X
-server's main dispatch loop when new events are available in the input
-event queue.  It typically processes the enqueued events, and updates
-the cursor/pointer position.  It may also do other DDX-specific event
-processing.
-</para>
-
-<para>Enqueued events are processed by mieqProcessInputEvents() and passed
-to the DIX layer for transmission to clients:
-
-<variablelist>
-<varlistentry>
-<term>mieqProcessInputEvents()</term>
-<listitem>
-<para>This function processes each event in the
-event queue, and passes it to the device's input processing function.
-The DIX layer provides default functions to do this processing, and they
-handle the task of getting the events passed back to the relevant
-clients.
-</para></listitem></varlistentry>
-<varlistentry>
-<term>miPointerUpdate()</term>
-<listitem>
-<para>This function resynchronized the cursor position
-with the new pointer position.  It also takes care of moving the cursor
-between screens when needed in multi-head configurations.
-</para></listitem></varlistentry>
-</variablelist>
-</para>
-
-</sect3>
-
-<sect3>
-<title>DisableDevice()</title>
-
-<para>DisableDevice is a DIX function that removes an input device from the
-list of enabled devices.  The result of this is that the device no
-longer generates input events.  The device's data structures are kept in
-place, and disabling a device like this can be reversed by calling
-EnableDevice().  DisableDevice() may be called from the DDX when it is
-desirable to do so (e.g., the XFree86 server does this when VT
-switching).  Except for special cases, this is not normally called for
-core input devices.
-</para>
-
-<para>DisableDevice() calls the device's callback function with
-<constant>DEVICE_OFF</constant>:
-
-<variablelist>
-<varlistentry>
-<term>(*dev-&gt;deviceProc)(dev, DEVICE_OFF)</term>
-<listitem>
-<para>This typically closes the
-relevant physical device, and when appropriate, unregisters the device's
-file descriptor (or equivalent) as a valid input source.
-</para></listitem></varlistentry>
-</variablelist>
-</para>
-
-<para>DisableDevice() then removes the device handle from the X server's
-global list of enabled devices.
-</para>
-
-</sect3>
-
-<sect3>
-<title>CloseDevice()</title>
-
-<para>CloseDevice is a DIX function that removes an input device from the
-list of available devices.  It disables input from the device and frees
-all data structures associated with the device.  This function is
-usually called from CloseDownDevices(), which is called from main() at
-the end of each server generation to close all input devices.
-</para>
-
-<para>CloseDevice() calls the device's callback function with
-<constant>DEVICE_CLOSE</constant>:
-
-<variablelist>
-<varlistentry>
-<term>(*dev-&gt;deviceProc)(dev, DEVICE_CLOSE)</term>
-<listitem>
-<para>This typically closes the
-relevant physical device, and when appropriate, unregisters the device's
-file descriptor (or equivalent) as a valid input source.  If any device
-specific data structures were allocated when the device was initialized,
-they are freed here.
-</para></listitem></varlistentry>
-</variablelist>
-</para>
-
-<para>CloseDevice() then frees the data structures that were allocated
-for the device when it was registered/initialized.
-</para>
-
-</sect3>
-
-<sect3>
-<title>LegalModifier()</title>
-<!-- dmx/dmxinput.c - currently returns TRUE -->
-<para>LegalModifier() is a required DDX function that can be used to
-restrict which keys may be modifier keys.  This seems to be present for
-historical reasons, so this function should simply return TRUE
-unconditionally.
-</para>
-
-</sect3>
-</sect2>
-
-<sect2>
-<title>Output handling</title>
-
-<para>The following sections describe the main functions required to
-initialize, use and close the output device(s) for each screen in the X
-server.
-</para>
-
-<sect3>
-<title>InitOutput()</title>
-
-<para>This DDX function is called near the start of each server generation
-from the X server's main() function.  InitOutput()'s main purpose is to
-initialize each screen and fill in the global screenInfo structure for
-each screen.  It is passed three arguments: a pointer to the screenInfo
-struct, which it is to initialize, and argc and argv from main(), which
-can be used to determine additional configuration information.
-</para>
-
-<para>The primary tasks for this function are outlined below:
-
-<orderedlist>
-<listitem>
-    <para><emphasis remap="bf">Parse configuration info:</emphasis> The first task of InitOutput()
-    is to parses any configuration information from the configuration
-    file.  In addition to the XF86Config file, other configuration
-    information can be taken from the command line.  The command line
-    options can be gathered either in InitOutput() or earlier in the
-    ddxProcessArgument() function, which is called by
-    ProcessCommandLine().  The configuration information determines the
-    characteristics of the screen(s).  For example, in the XFree86 X
-    server, the XF86Config file specifies the monitor information, the
-    screen resolution, the graphics devices and slots in which they are
-    located, and, for Xinerama, the screens' layout.
-</para>
-</listitem>
-
-<listitem>
-    <para><emphasis remap="bf">Initialize screen info:</emphasis> The next task is to initialize
-    the screen-dependent internal data structures.  For example, part of
-    what the XFree86 X server does is to allocate its screen and pixmap
-    private indices, probe for graphics devices, compare the probed
-    devices to the ones listed in the XF86Config file, and add the ones that
-    match to the internal xf86Screens&lsqb;&rsqb; structure.
-</para>
-</listitem>
-
-<listitem>
-    <para><emphasis remap="bf">Set pixmap formats:</emphasis> The next task is to initialize the
-    screenInfo's image byte order, bitmap bit order and bitmap scanline
-    unit/pad.  The screenInfo's pixmap format's depth, bits per pixel
-    and scanline padding is also initialized at this stage.
-</para>
-</listitem>
-
-<listitem>
-    <para><emphasis remap="bf">Unify screen info:</emphasis> An optional task that might be done at
-    this stage is to compare all of the information from the various
-    screens and determines if they are compatible (i.e., if the set of
-    screens can be unified into a single desktop).  This task has
-    potential to be useful to the DMX front-end server, if Xinerama's
-    PanoramiXConsolidate() function is not sufficient.
-</para>
-</listitem>
-</orderedlist>
-</para>
-
-<para>Once these tasks are complete, the valid screens are known and each
-of these screens can be initialized by calling AddScreen().
-</para>
-</sect3>
-
-<sect3>
-<title>AddScreen()</title>
-
-<para>This DIX function is called from InitOutput(), in the DDX layer, to
-add each new screen to the screenInfo structure.  The DDX screen
-initialization function and command line arguments (i.e., argc and argv)
-are passed to it as arguments.
-</para>
-
-<para>This function first allocates a new Screen structure and any privates
-that are required.  It then initializes some of the fields in the Screen
-struct and sets up the pixmap padding information.  Finally, it calls
-the DDX screen initialization function ScreenInit(), which is described
-below.  It returns the number of the screen that were just added, or -1
-if there is insufficient memory to add the screen or if the DDX screen
-initialization fails.
-</para>
-</sect3>
-
-<sect3>
-<title>ScreenInit()</title>
-
-<para>This DDX function initializes the rest of the Screen structure with
-either generic or screen-specific functions (as necessary).  It also
-fills in various screen attributes (e.g., width and height in
-millimeters, black and white pixel values).
-</para>
-
-<para>The screen init function usually calls several functions to perform
-certain screen initialization functions.  They are described below:
-
-<variablelist>
-<varlistentry>
-<term>{mi,*fb}ScreenInit()</term>
-<listitem>
-<para>The DDX layer's ScreenInit() function usually
-calls another layer's ScreenInit() function (e.g., miScreenInit() or
-fbScreenInit()) to initialize the fallbacks that the DDX driver does not
-specifically handle.
-</para>
-
-<para>After calling another layer's ScreenInit() function, any
-screen-specific functions either wrap or replace the other layer's
-function pointers.  If a function is to be wrapped, each of the old
-function pointers from the other layer are stored in a screen private
-area.  Common functions to wrap are CloseScreen() and SaveScreen().
-</para></listitem></varlistentry>
-
-<varlistentry>
-<term>miDCInitialize()</term>
-<listitem>
-<para>This MI function initializes the MI cursor
-display structures and function pointers.  If a hardware cursor is used,
-the DDX layer's ScreenInit() function will wrap additional screen and
-the MI cursor display function pointers.
-</para></listitem></varlistentry>
-</variablelist>
-</para>
-
-<para>Another common task for ScreenInit() function is to initialize the
-output device state.  For example, in the XFree86 X server, the
-ScreenInit() function saves the original state of the video card and
-then initializes the video mode of the graphics device.
-</para>
-</sect3>
-
-<sect3>
-<title>CloseScreen()</title>
-
-<para>This function restores any wrapped screen functions (and in
-particular the wrapped CloseScreen() function) and restores the state of
-the output device to its original state.  It should also free any
-private data it created during the screen initialization.
-</para>
-</sect3>
-
-<sect3>
-<title>GC operations</title>
-
-<para>When the X server is requested to render drawing primitives, it does
-so by calling drawing functions through the graphics context's operation
-function pointer table (i.e., the GCOps functions).  These functions
-render the basic graphics operations such as drawing rectangles, lines,
-text or copying pixmaps.  Default routines are provided either by the MI
-layer, which draws indirectly through a simple span interface, or by the
-framebuffer layers (e.g., CFB, MFB, FB), which draw directly to a
-linearly mapped frame buffer.
-</para>
-
-<para>To take advantage of special hardware on the graphics device,
-specific GCOps functions can be replaced by device specific code.
-However, many times the graphics devices can handle only a subset of the
-possible states of the GC, so during graphics context validation,
-appropriate routines are selected based on the state and capabilities of
-the hardware.  For example, some graphics hardware can accelerate single
-pixel width lines with certain dash patterns.  Thus, for dash patterns
-that are not supported by hardware or for width 2 or greater lines, the
-default routine is chosen during GC validation.
-</para>
-
-<para>Note that some pointers to functions that draw to the screen are
-stored in the Screen structure.  They include GetImage(), GetSpans(),
-CopyWindow() and RestoreAreas().
-</para>
-</sect3>
-
-<sect3>
-<title>Xnest</title>
-
-<para>The Xnest X server is a special proxy X server that relays the X
-protocol requests that it receives to a ``real'' X server that then
-processes the requests and displays the results, if applicable.  To the X
-applications, Xnest appears as if it is a regular X server.  However,
-Xnest is both server to the X application and client of the real X
-server, which will actually handle the requests.
-</para>
-
-<para>The Xnest server implements all of the standard input and output
-initialization steps outlined above.
-</para>
-
-<para><variablelist>
-<varlistentry>
-<term>InitOutput()</term>
-<listitem>
-<para>Xnest takes its configuration information from
-command line arguments via ddxProcessArguments().  This information
-includes the real X server display to connect to, its default visual
-class, the screen depth, the Xnest window's geometry, etc.  Xnest then
-connects to the real X server and gathers visual, colormap, depth and
-pixmap information about that server's display, creates a window on that
-server, which will be used as the root window for Xnest.
-</para>
-
-<para>Next, Xnest initializes its internal data structures and uses the
-data from the real X server's pixmaps to initialize its own pixmap
-formats.  Finally, it calls AddScreen(xnestOpenScreen, argc, argv) to
-initialize each of its screens.
-</para></listitem></varlistentry>
-
-<varlistentry>
-<term>ScreenInit()</term>
-<listitem>
-<para>Xnest's ScreenInit() function is called
-xnestOpenScreen().  This function initializes its screen's depth and
-visual information, and then calls miScreenInit() to set up the default
-screen functions.  It then calls miDCInitialize() to initialize the
-software cursor.
-Finally, it replaces many of the screen functions with its own
-functions that repackage and send the requests to the real X server to
-which Xnest is attached.
-</para></listitem></varlistentry>
-
-<varlistentry>
-<term>CloseScreen()</term>
-<listitem>
-<para>This function frees its internal data structure
-allocations.  Since it replaces instead of wrapping screen functions,
-there are no function pointers to unwrap.  This can potentially lead to
-problems during server regeneration.
-</para></listitem></varlistentry>
-
-<varlistentry>
-<term>GC operations</term>
-<listitem>
-<para>The GC operations in Xnest are very simple since
-they leave all of the drawing to the real X server to which Xnest is
-attached.  Each of the GCOps takes the request and sends it to the
-real X server using standard Xlib calls.  For example, the X
-application issues a XDrawLines() call.  This function turns into a
-protocol request to Xnest, which calls the xnestPolylines() function
-through Xnest's GCOps function pointer table.  The xnestPolylines()
-function is only a single line, which calls XDrawLines() using the same
-arguments that were passed into it.  Other GCOps functions are very
-similar.  Two exceptions to the simple GCOps functions described above
-are the image functions and the BLT operations.
-</para>
-
-<para>The image functions, GetImage() and PutImage(), must use a temporary
-image to hold the image to be put of the image that was just grabbed
-from the screen while it is in transit to the real X server or the
-client.  When the image has been transmitted, the temporary image is
-destroyed.
-</para>
-
-<para>The BLT operations, CopyArea() and CopyPlane(), handle not only the
-copy function, which is the same as the simple cases described above,
-but also the graphics exposures that result when the GC's graphics
-exposure bit is set to True.  Graphics exposures are handled in a helper
-function, xnestBitBlitHelper().  This function collects the exposure
-events from the real X server and, if any resulting in regions being
-exposed, then those regions are passed back to the MI layer so that it
-can generate exposure events for the X application.
-</para></listitem></varlistentry>
-</variablelist>
-</para>
-
-<para>The Xnest server takes its input from the X server to which it is
-connected.  When the mouse is in the Xnest server's window, keyboard and
-mouse events are received by the Xnest server, repackaged and sent back
-to any client that requests those events.
-</para>
-</sect3>
-
-<sect3>
-<title>Shadow framebuffer</title>
-
-<para>The most common type of framebuffer is a linear array memory that
-maps to the video memory on the graphics device.  However, accessing
-that video memory over an I/O bus (e.g., ISA or PCI) can be slow.  The
-shadow framebuffer layer allows the developer to keep the entire
-framebuffer in main memory and copy it back to video memory at regular
-intervals.  It also has been extended to handle planar video memory and
-rotated framebuffers.
-</para>
-
-<para>There are two main entry points to the shadow framebuffer code:
-
-<variablelist>
-<varlistentry>
-<term>shadowAlloc(width, height, bpp)</term>
-<listitem>
-<para>This function allocates the in
-memory copy of the framebuffer of size width*height*bpp.  It returns a
-pointer to that memory, which will be used by the framebuffer
-ScreenInit() code during the screen's initialization.
-</para></listitem></varlistentry>
-
-<varlistentry>
-<term>shadowInit(pScreen, updateProc, windowProc)</term>
-<listitem>
-<para>This function
-initializes the shadow framebuffer layer.  It wraps several screen
-drawing functions, and registers a block handler that will update the
-screen.  The updateProc is a function that will copy the damaged regions
-to the screen, and the windowProc is a function that is used when the
-entire linear video memory range cannot be accessed simultaneously so
-that only a window into that memory is available (e.g., when using the
-VGA aperture).
-</para></listitem></varlistentry>
-</variablelist>
-</para>
-
-<para>The shadow framebuffer code keeps track of the damaged area of each
-screen by calculating the bounding box of all drawing operations that
-have occurred since the last screen update.  Then, when the block handler
-is next called, only the damaged portion of the screen is updated.
-</para>
-
-<para>Note that since the shadow framebuffer is kept in main memory, all
-drawing operations are performed by the CPU and, thus, no accelerated
-hardware drawing operations are possible.
-</para>
-
-</sect3>
-</sect2>
-
-<sect2>
-<title>Xinerama</title>
-
-<para>Xinerama is an X extension that allows multiple physical screens
-controlled by a single X server to appear as a single screen.  Although
-the extension allows clients to find the physical screen layout via
-extension requests, it is completely transparent to clients at the core
-X11 protocol level.  The original public implementation of Xinerama came
-from Digital/Compaq.  XFree86 rewrote it, filling in some missing pieces
-and improving both X11 core protocol compliance and performance.  The
-Xinerama extension will be passing through X.Org's standardization
-process in the near future, and the sample implementation will be based
-on this rewritten version.
-</para>
-
-<para>The current implementation of Xinerama is based primarily in the DIX
-(device independent) and MI (machine independent) layers of the X
-server.  With few exceptions the DDX layers do not need any changes to
-support Xinerama.  X server extensions often do need modifications to
-provide full Xinerama functionality.
-</para>
-
-<para>The following is a code-level description of how Xinerama functions.
-</para>
-
-<para>Note: Because the Xinerama extension was originally called the
-PanoramiX extension, many of the Xinerama functions still have the
-PanoramiX prefix.
-</para>
-
-<variablelist>
-<varlistentry>
-<term>PanoramiXExtensionInit()</term>
-<listitem>
-    <para>PanoramiXExtensionInit() is a
-    device-independent extension function that is called at the start of
-    each server generation from InitExtensions(), which is called from
-    the X server's main() function after all output devices have been
-    initialized, but before any input devices have been initialized.
-    </para>
-
-    <para>PanoramiXNumScreens is set to the number of physical screens.  If
-    only one physical screen is present, the extension is disabled, and
-    PanoramiXExtensionInit() returns without doing anything else.
-    </para>
-
-    <para>The Xinerama extension is registered by calling AddExtension().
-    </para>
-
-    <para>GC and Screen private
-    indexes are allocated, and both GC and Screen private areas are
-    allocated for each physical screen.  These hold Xinerama-specific
-    per-GC and per-Screen data.  Each screen's CreateGC and CloseScreen
-    functions are wrapped by XineramaCreateGC() and
-    XineramaCloseScreen() respectively.  Some new resource classes are
-    created for Xinerama drawables and GCs, and resource types for
-    Xinerama windows, pixmaps and colormaps.
-    </para>
-
-    <para>A region (PanoramiXScreenRegion) is
-    initialized to be the union of the screen regions.
-    The relative positioning information for the
-    physical screens is taken from the ScreenRec x and y members, which
-    the DDX layer must initialize in InitOutput().  The bounds of the
-    combined screen is also calculated (PanoramiXPixWidth and
-    PanoramiXPixHeight).
-    </para>
-
-    <para>The DIX layer has a list of function pointers
-    (ProcVector&lsqb;&rsqb;) that
-    holds the entry points for the functions that process core protocol
-    requests.  The requests that Xinerama must intercept and break up
-    into physical screen-specific requests are wrapped.  The original
-    set is copied to SavedProcVector&lsqb;&rsqb;.  The types of requests
-    intercepted are Window requests, GC requests, colormap requests,
-    drawing requests, and some geometry-related requests.  This wrapping
-    allows the bulk of the protocol request processing to be handled
-    transparently to the DIX layer.  Some operations cannot be dealt with
-    in this way and are handled with Xinerama-specific code within the
-    DIX layer.
-    </para>
-</listitem></varlistentry>
-
-<varlistentry>
-<term>PanoramiXConsolidate()</term>
-<listitem>
-    <para>PanoramiXConsolidate() is a
-    device-independent extension function that is called directly from
-    the X server's main() function after extensions and input/output
-    devices have been initialized, and before the root windows are
-    defined and initialized.
-</para>
-
-    <para>This function finds the set of depths (PanoramiXDepths&lsqb;&rsqb;) and
-    visuals (PanoramiXVisuals&lsqb;&rsqb;)
-    common to all of the physical screens.
-    PanoramiXNumDepths is set to the number of common depths, and
-    PanoramiXNumVisuals is set to the number of common visuals.
-    Resources are created for the single root window and the default
-    colormap.  Each of these resources has per-physical screen entries.
-    </para>
-</listitem></varlistentry>
-
-<varlistentry>
-<term>PanoramiXCreateConnectionBlock()</term>
-<listitem>
-    <para>PanoramiXConsolidate() is a
-    device-independent extension function that is called directly from
-    the X server's main() function after the per-physical screen root
-    windows are created.  It is called instead of the standard DIX
-    CreateConnectionBlock() function.  If this function returns FALSE,
-    the X server exits with a fatal error.  This function will return
-    FALSE if no common depths were found in PanoramiXConsolidate().
-    With no common depths, Xinerama mode is not possible.
-    </para>
-
-    <para>The connection block holds the information that clients get when
-    they open a connection to the X server.  It includes information
-    such as the supported pixmap formats, number of screens and the
-    sizes, depths, visuals, default colormap information, etc, for each
-    of the screens (much of information that <command>xdpyinfo</command> shows).  The
-    connection block is initialized with the combined single screen
-    values that were calculated in the above two functions.
-    </para>
-
-    <para>The Xinerama extension allows the registration of connection
-    block callback functions.  The purpose of these is to allow other
-    extensions to do processing at this point.  These callbacks can be
-    registered by calling XineramaRegisterConnectionBlockCallback() from
-    the other extension's ExtensionInit() function.  Each registered
-    connection block callback is called at the end of
-    PanoramiXCreateConnectionBlock().
-    </para>
-</listitem></varlistentry>
-</variablelist>
-
-<sect3>
-<title>Xinerama-specific changes to the DIX code</title>
-
-<para>There are a few types of Xinerama-specific changes within the DIX
-code.  The main ones are described here.
-</para>
-
-<para>Functions that deal with colormap or GC -related operations outside of
-the intercepted protocol requests have a test added to only do the
-processing for screen numbers &gt; 0.  This is because they are handled for
-the single Xinerama screen and the processing is done once for screen 0.
-</para>
-
-<para>The handling of motion events does some coordinate translation between
-the physical screen's origin and screen zero's origin.  Also, motion
-events must be reported relative to the composite screen origin rather
-than the physical screen origins.
-</para>
-
-<para>There is some special handling for cursor, window and event processing
-that cannot (either not at all or not conveniently) be done via the
-intercepted protocol requests.  A particular case is the handling of
-pointers moving between physical screens.
-</para>
-</sect3>
-
-<sect3>
-<title>Xinerama-specific changes to the MI code</title>
-
-<para>The only Xinerama-specific change to the MI code is in miSendExposures()
-to handle the coordinate (and window ID) translation for expose events.
-</para>
-</sect3>
-
-<sect3>
-<title>Intercepted DIX core requests</title>
-
-<para>Xinerama breaks up drawing requests for dispatch to each physical
-screen.  It also breaks up windows into pieces for each physical screen.
-GCs are translated into per-screen GCs.  Colormaps are replicated on
-each physical screen.  The functions handling the intercepted requests
-take care of breaking the requests and repackaging them so that they can
-be passed to the standard request handling functions for each screen in
-turn.  In addition, and to aid the repackaging, the information from
-many of the intercepted requests is used to keep up to date the
-necessary state information for the single composite screen.  Requests
-(usually those with replies) that can be satisfied completely from this
-stored state information do not call the standard request handling
-functions.
-</para>
-
-</sect3>
-
-</sect2>
-
-</sect1>
-
-<!-- ============================================================ -->
-
-<sect1>
-<title>Development Results</title>
-
-<para>In this section the results of each phase of development are
-discussed.  This development took place between approximately June 2001
-and July 2003.
-</para>
-
-<sect2>
-<title>Phase I</title>
-
-<para>The initial development phase dealt with the basic implementation
-including the bootstrap code, which used the shadow framebuffer, and the
-unoptimized implementation, based on an Xnest-style implementation.
-</para>
-
-<sect3>
-<title>Scope</title>
-
-<para>The goal of Phase I is to provide fundamental functionality that can
-act as a foundation for ongoing work:
-<orderedlist>
-<listitem>
-    <para>Develop the proxy X server
-    <itemizedlist>
-	<listitem>
-	<para>The proxy X server will operate on the X11 protocol and
-	relay requests as necessary to correctly perform the request.
-	</para></listitem>
-	<listitem>
-	<para>Work will be based on the existing work for Xinerama and
-	Xnest.
-	</para></listitem>
-	<listitem>
-	<para>Input events and windowing operations are handled in the
-	proxy server and rendering requests are repackaged and sent to
-	each of the back-end servers for display.
-	</para></listitem>
-	<listitem>
-	<para>The multiple screen layout (including support for
-	overlapping screens) will be user configurable via a
-	configuration file or through the configuration tool.
-	</para></listitem>
-    </itemizedlist>
-    </para></listitem>
-    <listitem>
-    <para>Develop graphical configuration tool
-    <itemizedlist>
-	<listitem>
-	<para>There will be potentially a large number of X servers to
-	configure into a single display.  The tool will allow the user
-	to specify which servers are involved in the configuration and
-	how they should be laid out.
-	</para></listitem>
-    </itemizedlist>
-    </para></listitem>
-    <listitem>
-    <para>Pass the X Test Suite
-    <itemizedlist>
-	<listitem>
-	<para>The X Test Suite covers the basic X11 operations.  All
-	tests known to succeed must correctly operate in the distributed
-	X environment.
-	</para></listitem>
-    </itemizedlist>
-    </para></listitem>
-</orderedlist>
-
-</para>
-
-<para>For this phase, the back-end X servers are assumed to be unmodified X
-servers that do not support any DMX-related protocol extensions; future
-optimization pathways are considered, but are not implemented; and the
-configuration tool is assumed to rely only on libraries in the X source
-tree (e.g., Xt).
-</para>
-</sect3>
-
-<sect3>
-<title>Results</title>
-
-<para>The proxy X server, Xdmx, was developed to distribute X11 protocol
-requests to the set of back-end X servers.  It opens a window on each
-back-end server, which represents the part of the front-end's root
-window that is visible on that screen.  It mirrors window, pixmap and
-other state in each back-end server.  Drawing requests are sent to
-either windows or pixmaps on each back-end server.  This code is based
-on Xnest and uses the existing Xinerama extension.
-</para>
-
-<para>Input events can be taken from (1) devices attached to the back-end
-server, (2) core devices attached directly to the Xdmx server, or (3)
-from a ``console'' window on another X server.  Events for these devices
-are gathered, processed and delivered to clients attached to the Xdmx
-server.
-</para>
-
-<para>An intuitive configuration format was developed to help the user
-easily configure the multiple back-end X servers.  It was defined (see
-grammar in Xdmx man page) and a parser was implemented that is used by
-the Xdmx server and by a standalone xdmxconfig utility.  The parsing
-support was implemented such that it can be easily factored out of the X
-source tree for use with other tools (e.g., vdl).  Support for
-converting legacy vdl-format configuration files to the DMX format is
-provided by the vdltodmx utility.
-</para>
-
-<para>Originally, the configuration file was going to be a subsection of
-XFree86's XF86Config file, but that was not possible since Xdmx is a
-completely separate X server.  Thus, a separate config file format was
-developed.  In addition, a graphical configuration
-tool, xdmxconfig, was developed to allow the user to create and arrange
-the screens in the configuration file.  The <emphasis remap="bf">-configfile</emphasis> and <emphasis remap="bf">-config</emphasis>
-command-line options can be used to start Xdmx using a configuration
-file.
-</para>
-
-<para>An extension that enables remote input testing is required for the X
-Test Suite to function.  During this phase, this extension (XTEST) was
-implemented in the Xdmx server.  The results from running the X Test
-Suite are described in detail below.
-</para>
-</sect3>
-
-<sect3>
-<title>X Test Suite</title>
-
-        <sect4>
-          <title>Introduction</title>
-            <para>
-              The X Test Suite contains tests that verify Xlib functions
-              operate correctly.  The test suite is designed to run on a
-              single X server; however, since X applications will not be
-              able to tell the difference between the DMX server and a
-              standard X server, the X Test Suite should also run on the
-              DMX server.
-            </para>
-            <para>
-              The Xdmx server was tested with the X Test Suite, and the
-              existing failures are noted in this section.  To put these
-              results in perspective, we first discuss expected X Test
-              failures and how errors in underlying systems can impact
-              Xdmx test results.
-            </para>
-        </sect4>
-
-        <sect4>
-          <title>Expected Failures for a Single Head</title>
-            <para>
-              A correctly implemented X server with a single screen is
-              expected to fail certain X Test tests.  The following
-              well-known errors occur because of rounding error in the X
-              server code:
-              <literallayout>
-XDrawArc: Tests 42, 63, 66, 73
-XDrawArcs: Tests 45, 66, 69, 76
-              </literallayout>
-            </para>
-            <para>
-              The following failures occur because of the high-level X
-              server implementation:
-              <literallayout>
-XLoadQueryFont: Test 1
-XListFontsWithInfo: Tests 3, 4
-XQueryFont: Tests 1, 2
-              </literallayout>
-            </para>
-            <para>
-              The following test fails when running the X server as root
-              under Linux because of the way directory modes are
-              interpreted:
-              <literallayout>
-XWriteBitmapFile: Test 3
-              </literallayout>
-            </para>
-            <para>
-              Depending on the video card used for the back-end, other
-              failures may also occur because of bugs in the low-level
-              driver implementation.  Over time, failures of this kind
-              are usually fixed by XFree86, but will show up in Xdmx
-              testing until then.
-            </para>
-        </sect4>
-
-        <sect4>
-          <title>Expected Failures for Xinerama</title>
-            <para>
-              Xinerama fails several X Test Suite tests because of
-              design decisions made for the current implementation of
-              Xinerama.  Over time, many of these errors will be
-              corrected by XFree86 and the group working on a new
-              Xinerama implementation.  Therefore, Xdmx will also share
-              X Suite Test failures with Xinerama.
-            </para>
-
-            <para>
-              We may be able to fix or work-around some of these
-              failures at the Xdmx level, but this will require
-              additional exploration that was not part of Phase I.
-            </para>
-
-            <para>
-              Xinerama is constantly improving, and the list of
-              Xinerama-related failures depends on XFree86 version and
-              the underlying graphics hardware.  We tested with a
-              variety of hardware, including nVidia, S3, ATI Radeon,
-              and Matrox G400 (in dual-head mode).  The list below
-              includes only those failures that appear to be from the
-              Xinerama layer, and does not include failures listed in
-              the previous section, or failures that appear to be from
-              the low-level graphics driver itself:
-            </para>
-
-            <para>
-              These failures were noted with multiple Xinerama
-              configurations:
-              <literallayout>
-XCopyPlane: Tests 13, 22, 31 (well-known Xinerama implementation issue)
-XSetFontPath: Test 4
-XGetDefault: Test 5
-XMatchVisualInfo: Test 1
-              </literallayout>
-            </para>
-            <para>
-              These failures were noted only when using one dual-head
-              video card with a 4.2.99.x XFree86 server:
-              <literallayout>
-XListPixmapFormats: Test 1
-XDrawRectangles: Test 45
-              </literallayout>
-            </para>
-            <para>
-              These failures were noted only when using two video cards
-              from different vendors with a 4.1.99.x XFree86 server:
-              <literallayout>
-XChangeWindowAttributes: Test 32
-XCreateWindow: Test 30
-XDrawLine: Test 22
-XFillArc: Test 22
-XChangeKeyboardControl: Tests 9, 10
-XRebindKeysym: Test 1
-              </literallayout>
-            </para>
-        </sect4>
-
-        <sect4>
-	  <title>Additional Failures from Xdmx</title>
-
-            <para>
-              When running Xdmx, no unexpected failures were noted.
-              Since the Xdmx server is based on Xinerama, we expect to
-              have most of the Xinerama failures present in the Xdmx
-              server.  Similarly, since the Xdmx server must rely on the
-              low-level device drivers on each back-end server, we also
-              expect that Xdmx will exhibit most of the back-end
-              failures.  Here is a summary:
-              <literallayout>
-XListPixmapFormats: Test 1 (configuration dependent)
-XChangeWindowAttributes: Test 32
-XCreateWindow: Test 30
-XCopyPlane: Test 13, 22, 31
-XSetFontPath: Test 4
-XGetDefault: Test 5 (configuration dependent)
-XMatchVisualInfo: Test 1
-XRebindKeysym: Test 1 (configuration dependent)
-                </literallayout>
-            </para>
-            <para>
-              Note that this list is shorter than the combined list for
-              Xinerama because Xdmx uses different code paths to perform
-              some Xinerama operations.  Further, some Xinerama failures
-              have been fixed in the XFree86 4.2.99.x CVS repository.
-            </para>
-        </sect4>
-
-        <sect4>
-          <title>Summary and Future Work</title>
-
-            <para>
-              Running the X Test Suite on Xdmx does not produce any
-              failures that cannot be accounted for by the underlying
-              Xinerama subsystem used by the front-end or by the
-              low-level device-driver code running on the back-end X
-              servers.  The Xdmx server therefore is as ``correct'' as
-              possible with respect to the standard set of X Test Suite
-              tests.
-            </para>
-
-            <para>
-              During the following phases, we will continue to verify
-              Xdmx correctness using the X Test Suite.  We may also use
-              other tests suites or write additional tests that run
-              under the X Test Suite that specifically verify the
-              expected behavior of DMX.
-            </para>
-        </sect4>
-</sect3>
-
-<sect3>
-<title>Fonts</title>
-
-<para>In Phase I, fonts are handled directly by both the front-end and the
-back-end servers, which is required since we must treat each back-end
-server during this phase as a ``black box''.  What this requires is that
-<emphasis remap="bf">the front- and back-end servers must share the exact same font
-path</emphasis>.  There are two ways to help make sure that all servers share the
-same font path:
-
-<orderedlist>
-  <listitem>
-    <para>First, each server can be configured to use the same font
-    server.  The font server, xfs, can be configured to serve fonts to
-    multiple X servers via TCP.
-    </para></listitem>
-
-  <listitem>
-    <para>Second, each server can be configured to use the same font
-    path and either those font paths can be copied to each back-end
-    machine or they can be mounted (e.g., via NFS) on each back-end
-    machine.
-    </para></listitem>
-</orderedlist>
-</para>
-
-<para>One additional concern is that a client program can set its own font
-path, and if it does so, then that font path must be available on each
-back-end machine.
-</para>
-
-<para>The -fontpath command line option was added to allow users to
-initialize the font path of the front end server.  This font path is
-propagated to each back-end server when the default font is loaded.  If
-there are any problems, an error message is printed, which will describe
-the problem and list the current font path.  For more information about
-setting the font path, see the -fontpath option description in the man
-page.
-</para>
-</sect3>
-
-<sect3>
-<title>Performance</title>
-
-<para>Phase I of development was not intended to optimize performance.  Its
-focus was on completely and correctly handling the base X11 protocol in
-the Xdmx server.  However, several insights were gained during Phase I,
-which are listed here for reference during the next phase of
-development.
-</para>
-
-<orderedlist>
-  <listitem>
-    <para>Calls to XSync() can slow down rendering since it requires a
-    complete round trip to and from a back-end server.  This is
-    especially problematic when communicating over long haul networks.
-    </para></listitem>
-
-  <listitem>
-    <para>Sending drawing requests to only the screens that they overlap
-    should improve performance.
-    </para></listitem>
-</orderedlist>
-</sect3>
-
-<sect3>
-<title>Pixmaps</title>
-
-<para>Pixmaps were originally expected to be handled entirely in the
-front-end X server; however, it was found that this overly complicated
-the rendering code and would have required sending potentially large
-images to each back server that required them when copying from pixmap
-to screen.  Thus, pixmap state is mirrored in the back-end server just
-as it is with regular window state.  With this implementation, the same
-rendering code that draws to windows can be used to draw to pixmaps on
-the back-end server, and no large image transfers are required to copy
-from pixmap to window.
-</para>
-
-</sect3>
-
-</sect2>
-
-<!-- ============================================================ -->
-<sect2>
-<title>Phase II</title>
-
-<para>The second phase of development concentrates on performance
-optimizations.  These optimizations are documented here, with
-<command>x11perf</command> data to show how the optimizations improve performance.
-</para>
-
-<para>All benchmarks were performed by running Xdmx on a dual processor
-1.4GHz AMD Athlon machine with 1GB of RAM connecting over 100baseT to
-two single-processor 1GHz Pentium III machines with 256MB of RAM and ATI
-Rage 128 (RF) video cards.  The front end was running Linux
-2.4.20-pre1-ac1 and the back ends were running Linux 2.4.7-10 and
-version 4.2.99.1 of XFree86 pulled from the XFree86 CVS repository on
-August 7, 2002.  All systems were running Red Hat Linux 7.2.
-</para>
-
-<sect3>
-<title>Moving from XFree86 4.1.99.1 to 4.2.0.0</title>
-
-<para>For phase II, the working source tree was moved to the branch tagged
-with dmx-1-0-branch and was updated from version 4.1.99.1 (20 August
-2001) of the XFree86 sources to version 4.2.0.0 (18 January 2002).
-After this update, the following tests were noted to be more than 10%
-faster:
-<screen>
-1.13   Fill 300x300 opaque stippled trapezoid (161x145 stipple)
-1.16   Fill 1x1 tiled trapezoid (161x145 tile)
-1.13   Fill 10x10 tiled trapezoid (161x145 tile)
-1.17   Fill 100x100 tiled trapezoid (161x145 tile)
-1.16   Fill 1x1 tiled trapezoid (216x208 tile)
-1.20   Fill 10x10 tiled trapezoid (216x208 tile)
-1.15   Fill 100x100 tiled trapezoid (216x208 tile)
-1.37   Circulate Unmapped window (200 kids)
-</screen>
-And the following tests were noted to be more than 10% slower:
-<screen>
-0.88   Unmap window via parent (25 kids)
-0.75   Circulate Unmapped window (4 kids)
-0.79   Circulate Unmapped window (16 kids)
-0.80   Circulate Unmapped window (25 kids)
-0.82   Circulate Unmapped window (50 kids)
-0.85   Circulate Unmapped window (75 kids)
-</screen>
-</para>
-
-<para>These changes were not caused by any changes in the DMX system, and
-may point to changes in the XFree86 tree or to tests that have more
-"jitter" than most other <command>x11perf</command> tests.
-</para>
-</sect3>
-
-<sect3>
-<title>Global changes</title>
-
-<para>During the development of the Phase II DMX server, several global
-changes were made.  These changes were also compared with the Phase I
-server.  The following tests were noted to be more than 10% faster:
-<screen>
-1.13   Fill 300x300 opaque stippled trapezoid (161x145 stipple)
-1.15   Fill 1x1 tiled trapezoid (161x145 tile)
-1.13   Fill 10x10 tiled trapezoid (161x145 tile)
-1.17   Fill 100x100 tiled trapezoid (161x145 tile)
-1.16   Fill 1x1 tiled trapezoid (216x208 tile)
-1.19   Fill 10x10 tiled trapezoid (216x208 tile)
-1.15   Fill 100x100 tiled trapezoid (216x208 tile)
-1.15   Circulate Unmapped window (4 kids)
-</screen>
-</para>
-
-<para>The following tests were noted to be more than 10% slower:
-<screen>
-0.69   Scroll 10x10 pixels
-0.68   Scroll 100x100 pixels
-0.68   Copy 10x10 from window to window
-0.68   Copy 100x100 from window to window
-0.76   Circulate Unmapped window (75 kids)
-0.83   Circulate Unmapped window (100 kids)
-</screen>
-</para>
-
-<para>For the remainder of this analysis, the baseline of comparison will
-be the Phase II deliverable with all optimizations disabled (unless
-otherwise noted).  This will highlight how the optimizations in
-isolation impact performance.
-</para>
-</sect3>
-
-<sect3>
-<title>XSync() Batching</title>
-
-<para>During the Phase I implementation, XSync() was called after every
-protocol request made by the DMX server.  This provided the DMX server
-with an interactive feel, but defeated X11's protocol buffering system
-and introduced round-trip wire latency into every operation.  During
-Phase II, DMX was changed so that protocol requests are no longer
-followed by calls to XSync().  Instead, the need for an XSync() is
-noted, and XSync() calls are only made every 100mS or when the DMX
-server specifically needs to make a call to guarantee interactivity.
-With this new system, X11 buffers protocol as much as possible during a
-100mS interval, and many unnecessary XSync() calls are avoided.
-</para>
-
-<para>Out of more than 300 <command>x11perf</command> tests, 8 tests became more than 100
-times faster, with 68 more than 50X faster, 114 more than 10X faster,
-and 181 more than 2X faster.  See table below for summary.
-</para>
-
-<para>The following tests were noted to be more than 10% slower with
-XSync() batching on:
-<screen>
-0.88   500x500 tiled rectangle (161x145 tile)
-0.89   Copy 500x500 from window to window
-</screen>
-</para>
-</sect3>
-
-<sect3>
-<title>Offscreen Optimization</title>
-
-<para>Windows span one or more of the back-end servers' screens; however,
-during Phase I development, windows were created on every back-end
-server and every rendering request was sent to every window regardless
-of whether or not that window was visible.  With the offscreen
-optimization, the DMX server tracks when a window is completely off of a
-back-end server's screen and, in that case, it does not send rendering
-requests to those back-end windows.  This optimization saves bandwidth
-between the front and back-end servers, and it reduces the number of
-XSync() calls.  The performance tests were run on a DMX system with only
-two back-end servers.  Greater performance gains will be had as the
-number of back-end servers increases.
-</para>
-
-<para>Out of more than 300 <command>x11perf</command> tests, 3 tests were at least twice as
-fast, and 146 tests were at least 10% faster.  Two tests were more than
-10% slower with the offscreen optimization:
-<screen>
-0.88   Hide/expose window via popup (4 kids)
-0.89   Resize unmapped window (75 kids)
-</screen>
-</para>
-</sect3>
-
-<sect3>
-<title>Lazy Window Creation Optimization</title>
-
-<para>As mentioned above, during Phase I, windows were created on every
-back-end server even if they were not visible on that back-end.  With
-the lazy window creation optimization, the DMX server does not create
-windows on a back-end server until they are either visible or they
-become the parents of a visible window.  This optimization builds on the
-offscreen optimization (described above) and requires it to be enabled.
-</para>
-
-<para>The lazy window creation optimization works by creating the window
-data structures in the front-end server when a client creates a window,
-but delays creation of the window on the back-end server(s).  A private
-window structure in the DMX server saves the relevant window data and
-tracks changes to the window's attributes and stacking order for later
-use.  The only times a window is created on a back-end server are (1)
-when it is mapped and is at least partially overlapping the back-end
-server's screen (tracked by the offscreen optimization), or (2) when the
-window becomes the parent of a previously visible window.  The first
-case occurs when a window is mapped or when a visible window is copied,
-moved or resized and now overlaps the back-end server's screen.  The
-second case occurs when starting a window manager after having created
-windows to which the window manager needs to add decorations.
-</para>
-
-<para>When either case occurs, a window on the back-end server is created
-using the data saved in the DMX server's window private data structure.
-The stacking order is then adjusted to correctly place the window on the
-back-end and lastly the window is mapped.  From this time forward, the
-window is handled exactly as if the window had been created at the time
-of the client's request.
-</para>
-
-<para>Note that when a window is no longer visible on a back-end server's
-screen (e.g., it is moved offscreen), the window is not destroyed;
-rather, it is kept and reused later if the window once again becomes
-visible on the back-end server's screen.  Originally with this
-optimization, destroying windows was implemented but was later rejected
-because it increased bandwidth when windows were opaquely moved or
-resized, which is common in many window managers.
-</para>
-
-<para>The performance tests were run on a DMX system with only two back-end
-servers.  Greater performance gains will be had as the number of
-back-end servers increases.
-</para>
-
-<para>This optimization improved the following <command>x11perf</command> tests by more
-than 10%:
-<screen>
-1.10   500x500 rectangle outline
-1.12   Fill 100x100 stippled trapezoid (161x145 stipple)
-1.20   Circulate Unmapped window (50 kids)
-1.19   Circulate Unmapped window (75 kids)
-</screen>
-</para>
-</sect3>
-
-<sect3>
-<title>Subdividing Rendering Primitives</title>
-
-<para>X11 imaging requests transfer significant data between the client and
-the X server.  During Phase I, the DMX server would then transfer the
-image data to each back-end server.  Even with the offscreen
-optimization (above), these requests still required transferring
-significant data to each back-end server that contained a visible
-portion of the window.  For example, if the client uses XPutImage() to
-copy an image to a window that overlaps the entire DMX screen, then the
-entire image is copied by the DMX server to every back-end server.
-</para>
-
-<para>To reduce the amount of data transferred between the DMX server and
-the back-end servers when XPutImage() is called, the image data is
-subdivided and only the data that will be visible on a back-end server's
-screen is sent to that back-end server.  Xinerama already implements a
-subdivision algorithm for XGetImage() and no further optimization was
-needed.
-</para>
-
-<para>Other rendering primitives were analyzed, but the time required to
-subdivide these primitives was a significant proportion of the time
-required to send the entire rendering request to the back-end server, so
-this optimization was rejected for the other rendering primitives.
-</para>
-
-<para>Again, the performance tests were run on a DMX system with only two
-back-end servers.  Greater performance gains will be had as the number
-of back-end servers increases.
-</para>
-
-<para>This optimization improved the following <command>x11perf</command> tests by more
-than 10%:
-<screen>
-1.12   Fill 100x100 stippled trapezoid (161x145 stipple)
-1.26   PutImage 10x10 square
-1.83   PutImage 100x100 square
-1.91   PutImage 500x500 square
-1.40   PutImage XY 10x10 square
-1.48   PutImage XY 100x100 square
-1.50   PutImage XY 500x500 square
-1.45   Circulate Unmapped window (75 kids)
-1.74   Circulate Unmapped window (100 kids)
-</screen>
-</para>
-
-<para>The following test was noted to be more than 10% slower with this
-optimization:
-<screen>
-0.88   10-pixel fill chord partial circle
-</screen>
-</para>
-</sect3>
-
-<sect3>
-<title>Summary of x11perf Data</title>
-
-<para>With all of the optimizations on, 53 <command>x11perf</command> tests are more than
-100X faster than the unoptimized Phase II deliverable, with 69 more than
-50X faster, 73 more than 10X faster, and 199 more than twice as fast.
-No tests were more than 10% slower than the unoptimized Phase II
-deliverable.  (Compared with the Phase I deliverable, only Circulate
-Unmapped window (100 kids) was more than 10% slower than the Phase II
-deliverable.  As noted above, this test seems to have wider variability
-than other <command>x11perf</command> tests.)
-</para>
-
-<para>The following table summarizes relative <command>x11perf</command> test changes for
-all optimizations individually and collectively.  Note that some of the
-optimizations have a synergistic effect when used together.
-<screen>
-
-1: XSync() batching only
-2: Off screen optimizations only
-3: Window optimizations only
-4: Subdivprims only
-5: All optimizations
-
-    1     2    3    4      5 Operation
------- ---- ---- ---- ------ ---------
-  2.14 1.85 1.00 1.00   4.13 Dot
-  1.67 1.80 1.00 1.00   3.31 1x1 rectangle
-  2.38 1.43 1.00 1.00   2.44 10x10 rectangle
-  1.00 1.00 0.92 0.98   1.00 100x100 rectangle
-  1.00 1.00 1.00 1.00   1.00 500x500 rectangle
-  1.83 1.85 1.05 1.06   3.54 1x1 stippled rectangle (8x8 stipple)
-  2.43 1.43 1.00 1.00   2.41 10x10 stippled rectangle (8x8 stipple)
-  0.98 1.00 1.00 1.00   1.00 100x100 stippled rectangle (8x8 stipple)
-  1.00 1.00 1.00 1.00   0.98 500x500 stippled rectangle (8x8 stipple)
-  1.75 1.75 1.00 1.00   3.40 1x1 opaque stippled rectangle (8x8 stipple)
-  2.38 1.42 1.00 1.00   2.34 10x10 opaque stippled rectangle (8x8 stipple)
-  1.00 1.00 0.97 0.97   1.00 100x100 opaque stippled rectangle (8x8 stipple)
-  1.00 1.00 1.00 1.00   0.99 500x500 opaque stippled rectangle (8x8 stipple)
-  1.82 1.82 1.04 1.04   3.56 1x1 tiled rectangle (4x4 tile)
-  2.33 1.42 1.00 1.00   2.37 10x10 tiled rectangle (4x4 tile)
-  1.00 0.92 1.00 1.00   1.00 100x100 tiled rectangle (4x4 tile)
-  1.00 1.00 1.00 1.00   1.00 500x500 tiled rectangle (4x4 tile)
-  1.94 1.62 1.00 1.00   3.66 1x1 stippled rectangle (17x15 stipple)
-  1.74 1.28 1.00 1.00   1.73 10x10 stippled rectangle (17x15 stipple)
-  1.00 1.00 1.00 0.89   0.98 100x100 stippled rectangle (17x15 stipple)
-  1.00 1.00 1.00 1.00   0.98 500x500 stippled rectangle (17x15 stipple)
-  1.94 1.62 1.00 1.00   3.67 1x1 opaque stippled rectangle (17x15 stipple)
-  1.69 1.26 1.00 1.00   1.66 10x10 opaque stippled rectangle (17x15 stipple)
-  1.00 0.95 1.00 1.00   1.00 100x100 opaque stippled rectangle (17x15 stipple)
-  1.00 1.00 1.00 1.00   0.97 500x500 opaque stippled rectangle (17x15 stipple)
-  1.93 1.61 0.99 0.99   3.69 1x1 tiled rectangle (17x15 tile)
-  1.73 1.27 1.00 1.00   1.72 10x10 tiled rectangle (17x15 tile)
-  1.00 1.00 1.00 1.00   0.98 100x100 tiled rectangle (17x15 tile)
-  1.00 1.00 0.97 0.97   1.00 500x500 tiled rectangle (17x15 tile)
-  1.95 1.63 1.00 1.00   3.83 1x1 stippled rectangle (161x145 stipple)
-  1.80 1.30 1.00 1.00   1.83 10x10 stippled rectangle (161x145 stipple)
-  0.97 1.00 1.00 1.00   1.01 100x100 stippled rectangle (161x145 stipple)
-  1.00 1.00 1.00 1.00   0.98 500x500 stippled rectangle (161x145 stipple)
-  1.95 1.63 1.00 1.00   3.56 1x1 opaque stippled rectangle (161x145 stipple)
-  1.65 1.25 1.00 1.00   1.68 10x10 opaque stippled rectangle (161x145 stipple)
-  1.00 1.00 1.00 1.00   1.01 100x100 opaque stippled rectangle (161x145...
-  1.00 1.00 1.00 1.00   0.97 500x500 opaque stippled rectangle (161x145...
-  1.95 1.63 0.98 0.99   3.80 1x1 tiled rectangle (161x145 tile)
-  1.67 1.26 1.00 1.00   1.67 10x10 tiled rectangle (161x145 tile)
-  1.13 1.14 1.14 1.14   1.14 100x100 tiled rectangle (161x145 tile)
-  0.88 1.00 1.00 1.00   0.99 500x500 tiled rectangle (161x145 tile)
-  1.93 1.63 1.00 1.00   3.53 1x1 tiled rectangle (216x208 tile)
-  1.69 1.26 1.00 1.00   1.66 10x10 tiled rectangle (216x208 tile)
-  1.00 1.00 1.00 1.00   1.00 100x100 tiled rectangle (216x208 tile)
-  1.00 1.00 1.00 1.00   1.00 500x500 tiled rectangle (216x208 tile)
-  1.82 1.70 1.00 1.00   3.38 1-pixel line segment
-  2.07 1.56 0.90 1.00   3.31 10-pixel line segment
-  1.29 1.10 1.00 1.00   1.27 100-pixel line segment
-  1.05 1.06 1.03 1.03   1.09 500-pixel line segment
-  1.30 1.13 1.00 1.00   1.29 100-pixel line segment (1 kid)
-  1.32 1.15 1.00 1.00   1.32 100-pixel line segment (2 kids)
-  1.33 1.16 1.00 1.00   1.33 100-pixel line segment (3 kids)
-  1.92 1.64 1.00 1.00   3.73 10-pixel dashed segment
-  1.34 1.16 1.00 1.00   1.34 100-pixel dashed segment
-  1.24 1.11 0.99 0.97   1.23 100-pixel double-dashed segment
-  1.72 1.77 1.00 1.00   3.25 10-pixel horizontal line segment
-  1.83 1.66 1.01 1.00   3.54 100-pixel horizontal line segment
-  1.86 1.30 1.00 1.00   1.84 500-pixel horizontal line segment
-  2.11 1.52 1.00 0.99   3.02 10-pixel vertical line segment
-  1.21 1.10 1.00 1.00   1.20 100-pixel vertical line segment
-  1.03 1.03 1.00 1.00   1.02 500-pixel vertical line segment
-  4.42 1.68 1.00 1.01   4.64 10x1 wide horizontal line segment
-  1.83 1.31 1.00 1.00   1.83 100x10 wide horizontal line segment
-  1.07 1.00 0.96 1.00   1.07 500x50 wide horizontal line segment
-  4.10 1.67 1.00 1.00   4.62 10x1 wide vertical line segment
-  1.50 1.24 1.06 1.06   1.48 100x10 wide vertical line segment
-  1.06 1.03 1.00 1.00   1.05 500x50 wide vertical line segment
-  2.54 1.61 1.00 1.00   3.61 1-pixel line
-  2.71 1.48 1.00 1.00   2.67 10-pixel line
-  1.19 1.09 1.00 1.00   1.19 100-pixel line
-  1.04 1.02 1.00 1.00   1.03 500-pixel line
-  2.68 1.51 0.98 1.00   3.17 10-pixel dashed line
-  1.23 1.11 0.99 0.99   1.23 100-pixel dashed line
-  1.15 1.08 1.00 1.00   1.15 100-pixel double-dashed line
-  2.27 1.39 1.00 1.00   2.23 10x1 wide line
-  1.20 1.09 1.00 1.00   1.20 100x10 wide line
-  1.04 1.02 1.00 1.00   1.04 500x50 wide line
-  1.52 1.45 1.00 1.00   1.52 100x10 wide dashed line
-  1.54 1.47 1.00 1.00   1.54 100x10 wide double-dashed line
-  1.97 1.30 0.96 0.95   1.95 10x10 rectangle outline
-  1.44 1.27 1.00 1.00   1.43 100x100 rectangle outline
-  3.22 2.16 1.10 1.09   3.61 500x500 rectangle outline
-  1.95 1.34 1.00 1.00   1.90 10x10 wide rectangle outline
-  1.14 1.14 1.00 1.00   1.13 100x100 wide rectangle outline
-  1.00 1.00 1.00 1.00   1.00 500x500 wide rectangle outline
-  1.57 1.72 1.00 1.00   3.03 1-pixel circle
-  1.96 1.35 1.00 1.00   1.92 10-pixel circle
-  1.21 1.07 0.86 0.97   1.20 100-pixel circle
-  1.08 1.04 1.00 1.00   1.08 500-pixel circle
-  1.39 1.19 1.03 1.03   1.38 100-pixel dashed circle
-  1.21 1.11 1.00 1.00   1.23 100-pixel double-dashed circle
-  1.59 1.28 1.00 1.00   1.58 10-pixel wide circle
-  1.22 1.12 0.99 1.00   1.22 100-pixel wide circle
-  1.06 1.04 1.00 1.00   1.05 500-pixel wide circle
-  1.87 1.84 1.00 1.00   1.85 100-pixel wide dashed circle
-  1.90 1.93 1.01 1.01   1.90 100-pixel wide double-dashed circle
-  2.13 1.43 1.00 1.00   2.32 10-pixel partial circle
-  1.42 1.18 1.00 1.00   1.42 100-pixel partial circle
-  1.92 1.85 1.01 1.01   1.89 10-pixel wide partial circle
-  1.73 1.67 1.00 1.00   1.73 100-pixel wide partial circle
-  1.36 1.95 1.00 1.00   2.64 1-pixel solid circle
-  2.02 1.37 1.00 1.00   2.03 10-pixel solid circle
-  1.19 1.09 1.00 1.00   1.19 100-pixel solid circle
-  1.02 0.99 1.00 1.00   1.01 500-pixel solid circle
-  1.74 1.28 1.00 0.88   1.73 10-pixel fill chord partial circle
-  1.31 1.13 1.00 1.00   1.31 100-pixel fill chord partial circle
-  1.67 1.31 1.03 1.03   1.72 10-pixel fill slice partial circle
-  1.30 1.13 1.00 1.00   1.28 100-pixel fill slice partial circle
-  2.45 1.49 1.01 1.00   2.71 10-pixel ellipse
-  1.22 1.10 1.00 1.00   1.22 100-pixel ellipse
-  1.09 1.04 1.00 1.00   1.09 500-pixel ellipse
-  1.90 1.28 1.00 1.00   1.89 100-pixel dashed ellipse
-  1.62 1.24 0.96 0.97   1.61 100-pixel double-dashed ellipse
-  2.43 1.50 1.00 1.00   2.42 10-pixel wide ellipse
-  1.61 1.28 1.03 1.03   1.60 100-pixel wide ellipse
-  1.08 1.05 1.00 1.00   1.08 500-pixel wide ellipse
-  1.93 1.88 1.00 1.00   1.88 100-pixel wide dashed ellipse
-  1.94 1.89 1.01 1.00   1.94 100-pixel wide double-dashed ellipse
-  2.31 1.48 1.00 1.00   2.67 10-pixel partial ellipse
-  1.38 1.17 1.00 1.00   1.38 100-pixel partial ellipse
-  2.00 1.85 0.98 0.97   1.98 10-pixel wide partial ellipse
-  1.89 1.86 1.00 1.00   1.89 100-pixel wide partial ellipse
-  3.49 1.60 1.00 1.00   3.65 10-pixel filled ellipse
-  1.67 1.26 1.00 1.00   1.67 100-pixel filled ellipse
-  1.06 1.04 1.00 1.00   1.06 500-pixel filled ellipse
-  2.38 1.43 1.01 1.00   2.32 10-pixel fill chord partial ellipse
-  2.06 1.30 1.00 1.00   2.05 100-pixel fill chord partial ellipse
-  2.27 1.41 1.00 1.00   2.27 10-pixel fill slice partial ellipse
-  1.98 1.33 1.00 0.97   1.97 100-pixel fill slice partial ellipse
- 57.46 1.99 1.01 1.00 114.92 Fill 1x1 equivalent triangle
- 56.94 1.98 1.01 1.00  73.89 Fill 10x10 equivalent triangle
-  6.07 1.75 1.00 1.00   6.07 Fill 100x100 equivalent triangle
- 51.12 1.98 1.00 1.00 102.81 Fill 1x1 trapezoid
- 51.42 1.82 1.01 1.00  94.89 Fill 10x10 trapezoid
-  6.47 1.80 1.00 1.00   6.44 Fill 100x100 trapezoid
-  1.56 1.28 1.00 0.99   1.56 Fill 300x300 trapezoid
- 51.27 1.97 0.96 0.97 102.54 Fill 1x1 stippled trapezoid (8x8 stipple)
- 51.73 2.00 1.02 1.02  67.92 Fill 10x10 stippled trapezoid (8x8 stipple)
-  5.36 1.72 1.00 1.00   5.36 Fill 100x100 stippled trapezoid (8x8 stipple)
-  1.54 1.26 1.00 1.00   1.59 Fill 300x300 stippled trapezoid (8x8 stipple)
- 51.41 1.94 1.01 1.00 102.82 Fill 1x1 opaque stippled trapezoid (8x8 stipple)
- 50.71 1.95 0.99 1.00  65.44 Fill 10x10 opaque stippled trapezoid (8x8...
-  5.33 1.73 1.00 1.00   5.36 Fill 100x100 opaque stippled trapezoid (8x8...
-  1.58 1.25 1.00 1.00   1.58 Fill 300x300 opaque stippled trapezoid (8x8...
- 51.56 1.96 0.99 0.90 103.68 Fill 1x1 tiled trapezoid (4x4 tile)
- 51.59 1.99 1.01 1.01  62.25 Fill 10x10 tiled trapezoid (4x4 tile)
-  5.38 1.72 1.00 1.00   5.38 Fill 100x100 tiled trapezoid (4x4 tile)
-  1.54 1.25 1.00 0.99   1.58 Fill 300x300 tiled trapezoid (4x4 tile)
- 51.70 1.98 1.01 1.01 103.98 Fill 1x1 stippled trapezoid (17x15 stipple)
- 44.86 1.97 1.00 1.00  44.86 Fill 10x10 stippled trapezoid (17x15 stipple)
-  2.74 1.56 1.00 1.00   2.73 Fill 100x100 stippled trapezoid (17x15 stipple)
-  1.29 1.14 1.00 1.00   1.27 Fill 300x300 stippled trapezoid (17x15 stipple)
- 51.41 1.96 0.96 0.95 103.39 Fill 1x1 opaque stippled trapezoid (17x15...
- 45.14 1.96 1.01 1.00  45.14 Fill 10x10 opaque stippled trapezoid (17x15...
-  2.68 1.56 1.00 1.00   2.68 Fill 100x100 opaque stippled trapezoid (17x15...
-  1.26 1.10 1.00 1.00   1.28 Fill 300x300 opaque stippled trapezoid (17x15...
- 51.13 1.97 1.00 0.99 103.39 Fill 1x1 tiled trapezoid (17x15 tile)
- 47.58 1.96 1.00 1.00  47.86 Fill 10x10 tiled trapezoid (17x15 tile)
-  2.74 1.56 1.00 1.00   2.74 Fill 100x100 tiled trapezoid (17x15 tile)
-  1.29 1.14 1.00 1.00   1.28 Fill 300x300 tiled trapezoid (17x15 tile)
- 51.13 1.97 0.99 0.97 103.39 Fill 1x1 stippled trapezoid (161x145 stipple)
- 45.14 1.97 1.00 1.00  44.29 Fill 10x10 stippled trapezoid (161x145 stipple)
-  3.02 1.77 1.12 1.12   3.38 Fill 100x100 stippled trapezoid (161x145 stipple)
-  1.31 1.13 1.00 1.00   1.30 Fill 300x300 stippled trapezoid (161x145 stipple)
- 51.27 1.97 1.00 1.00 103.10 Fill 1x1 opaque stippled trapezoid (161x145...
- 45.01 1.97 1.00 1.00  45.01 Fill 10x10 opaque stippled trapezoid (161x145...
-  2.67 1.56 1.00 1.00   2.69 Fill 100x100 opaque stippled trapezoid (161x145..
-  1.29 1.13 1.00 1.01   1.27 Fill 300x300 opaque stippled trapezoid (161x145..
- 51.41 1.96 1.00 0.99 103.39 Fill 1x1 tiled trapezoid (161x145 tile)
- 45.01 1.96 0.98 1.00  45.01 Fill 10x10 tiled trapezoid (161x145 tile)
-  2.62 1.36 1.00 1.00   2.69 Fill 100x100 tiled trapezoid (161x145 tile)
-  1.27 1.13 1.00 1.00   1.22 Fill 300x300 tiled trapezoid (161x145 tile)
- 51.13 1.98 1.00 1.00 103.39 Fill 1x1 tiled trapezoid (216x208 tile)
- 45.14 1.97 1.01 0.99  45.14 Fill 10x10 tiled trapezoid (216x208 tile)
-  2.62 1.55 1.00 1.00   2.71 Fill 100x100 tiled trapezoid (216x208 tile)
-  1.28 1.13 1.00 1.00   1.20 Fill 300x300 tiled trapezoid (216x208 tile)
- 50.71 1.95 1.00 1.00  54.70 Fill 10x10 equivalent complex polygon
-  5.51 1.71 0.96 0.98   5.47 Fill 100x100 equivalent complex polygons
-  8.39 1.97 1.00 1.00  16.75 Fill 10x10 64-gon (Convex)
-  8.38 1.83 1.00 1.00   8.43 Fill 100x100 64-gon (Convex)
-  8.50 1.96 1.00 1.00  16.64 Fill 10x10 64-gon (Complex)
-  8.26 1.83 1.00 1.00   8.35 Fill 100x100 64-gon (Complex)
- 14.09 1.87 1.00 1.00  14.05 Char in 80-char line (6x13)
- 11.91 1.87 1.00 1.00  11.95 Char in 70-char line (8x13)
- 11.16 1.85 1.01 1.00  11.10 Char in 60-char line (9x15)
- 10.09 1.78 1.00 1.00  10.09 Char16 in 40-char line (k14)
-  6.15 1.75 1.00 1.00   6.31 Char16 in 23-char line (k24)
- 11.92 1.90 1.03 1.03  11.88 Char in 80-char line (TR 10)
-  8.18 1.78 1.00 0.99   8.17 Char in 30-char line (TR 24)
- 42.83 1.44 1.01 1.00  42.11 Char in 20/40/20 line (6x13, TR 10)
- 27.45 1.43 1.01 1.01  27.45 Char16 in 7/14/7 line (k14, k24)
- 12.13 1.85 1.00 1.00  12.05 Char in 80-char image line (6x13)
- 10.00 1.84 1.00 1.00  10.00 Char in 70-char image line (8x13)
-  9.18 1.83 1.00 1.00   9.12 Char in 60-char image line (9x15)
-  9.66 1.82 0.98 0.95   9.66 Char16 in 40-char image line (k14)
-  5.82 1.72 1.00 1.00   5.99 Char16 in 23-char image line (k24)
-  8.70 1.80 1.00 1.00   8.65 Char in 80-char image line (TR 10)
-  4.67 1.66 1.00 1.00   4.67 Char in 30-char image line (TR 24)
- 84.43 1.47 1.00 1.00 124.18 Scroll 10x10 pixels
-  3.73 1.50 1.00 0.98   3.73 Scroll 100x100 pixels
-  1.00 1.00 1.00 1.00   1.00 Scroll 500x500 pixels
- 84.43 1.51 1.00 1.00 134.02 Copy 10x10 from window to window
-  3.62 1.51 0.98 0.98   3.62 Copy 100x100 from window to window
-  0.89 1.00 1.00 1.00   1.00 Copy 500x500 from window to window
- 57.06 1.99 1.00 1.00  88.64 Copy 10x10 from pixmap to window
-  2.49 2.00 1.00 1.00   2.48 Copy 100x100 from pixmap to window
-  1.00 0.91 1.00 1.00   0.98 Copy 500x500 from pixmap to window
-  2.04 1.01 1.00 1.00   2.03 Copy 10x10 from window to pixmap
-  1.05 1.00 1.00 1.00   1.05 Copy 100x100 from window to pixmap
-  1.00 1.00 0.93 1.00   1.04 Copy 500x500 from window to pixmap
- 58.52 1.03 1.03 1.02  57.95 Copy 10x10 from pixmap to pixmap
-  2.40 1.00 1.00 1.00   2.45 Copy 100x100 from pixmap to pixmap
-  1.00 1.00 1.00 1.00   1.00 Copy 500x500 from pixmap to pixmap
- 51.57 1.92 1.00 1.00  85.75 Copy 10x10 1-bit deep plane
-  6.37 1.75 1.01 1.01   6.37 Copy 100x100 1-bit deep plane
-  1.26 1.11 1.00 1.00   1.24 Copy 500x500 1-bit deep plane
-  4.23 1.63 0.98 0.97   4.38 Copy 10x10 n-bit deep plane
-  1.04 1.02 1.00 1.00   1.04 Copy 100x100 n-bit deep plane
-  1.00 1.00 1.00 1.00   1.00 Copy 500x500 n-bit deep plane
-  6.45 1.98 1.00 1.26  12.80 PutImage 10x10 square
-  1.10 1.87 1.00 1.83   2.11 PutImage 100x100 square
-  1.02 1.93 1.00 1.91   1.91 PutImage 500x500 square
-  4.17 1.78 1.00 1.40   7.18 PutImage XY 10x10 square
-  1.27 1.49 0.97 1.48   2.10 PutImage XY 100x100 square
-  1.00 1.50 1.00 1.50   1.52 PutImage XY 500x500 square
-  1.07 1.01 1.00 1.00   1.06 GetImage 10x10 square
-  1.01 1.00 1.00 1.00   1.01 GetImage 100x100 square
-  1.00 1.00 1.00 1.00   1.00 GetImage 500x500 square
-  1.56 1.00 0.99 0.97   1.56 GetImage XY 10x10 square
-  1.02 1.00 1.00 1.00   1.02 GetImage XY 100x100 square
-  1.00 1.00 1.00 1.00   1.00 GetImage XY 500x500 square
-  1.00 1.00 1.01 0.98   0.95 X protocol NoOperation
-  1.02 1.03 1.04 1.03   1.00 QueryPointer
-  1.03 1.02 1.04 1.03   1.00 GetProperty
-100.41 1.51 1.00 1.00 198.76 Change graphics context
- 45.81 1.00 0.99 0.97  57.10 Create and map subwindows (4 kids)
- 78.45 1.01 1.02 1.02  63.07 Create and map subwindows (16 kids)
- 73.91 1.01 1.00 1.00  56.37 Create and map subwindows (25 kids)
- 73.22 1.00 1.00 1.00  49.07 Create and map subwindows (50 kids)
- 72.36 1.01 0.99 1.00  32.14 Create and map subwindows (75 kids)
- 70.34 1.00 1.00 1.00  30.12 Create and map subwindows (100 kids)
- 55.00 1.00 1.00 0.99  23.75 Create and map subwindows (200 kids)
- 55.30 1.01 1.00 1.00 141.03 Create unmapped window (4 kids)
- 55.38 1.01 1.01 1.00 163.25 Create unmapped window (16 kids)
- 54.75 0.96 1.00 0.99 166.95 Create unmapped window (25 kids)
- 54.83 1.00 1.00 0.99 178.81 Create unmapped window (50 kids)
- 55.38 1.01 1.01 1.00 181.20 Create unmapped window (75 kids)
- 55.38 1.01 1.01 1.00 181.20 Create unmapped window (100 kids)
- 54.87 1.01 1.01 1.00 182.05 Create unmapped window (200 kids)
- 28.13 1.00 1.00 1.00  30.75 Map window via parent (4 kids)
- 36.14 1.01 1.01 1.01  32.58 Map window via parent (16 kids)
- 26.13 1.00 0.98 0.95  29.85 Map window via parent (25 kids)
- 40.07 1.00 1.01 1.00  27.57 Map window via parent (50 kids)
- 23.26 0.99 1.00 1.00  18.23 Map window via parent (75 kids)
- 22.91 0.99 1.00 0.99  16.52 Map window via parent (100 kids)
- 27.79 1.00 1.00 0.99  12.50 Map window via parent (200 kids)
- 22.35 1.00 1.00 1.00  56.19 Unmap window via parent (4 kids)
-  9.57 1.00 0.99 1.00  89.78 Unmap window via parent (16 kids)
- 80.77 1.01 1.00 1.00 103.85 Unmap window via parent (25 kids)
- 96.34 1.00 1.00 1.00 116.06 Unmap window via parent (50 kids)
- 99.72 1.00 1.00 1.00 124.93 Unmap window via parent (75 kids)
-112.36 1.00 1.00 1.00 125.27 Unmap window via parent (100 kids)
-105.41 1.00 1.00 0.99 120.00 Unmap window via parent (200 kids)
- 51.29 1.03 1.02 1.02  74.19 Destroy window via parent (4 kids)
- 86.75 0.99 0.99 0.99 116.87 Destroy window via parent (16 kids)
-106.43 1.01 1.01 1.01 127.49 Destroy window via parent (25 kids)
-120.34 1.01 1.01 1.00 140.11 Destroy window via parent (50 kids)
-126.67 1.00 0.99 0.99 145.00 Destroy window via parent (75 kids)
-126.11 1.01 1.01 1.00 140.56 Destroy window via parent (100 kids)
-128.57 1.01 1.00 1.00 137.91 Destroy window via parent (200 kids)
- 16.04 0.88 1.00 1.00  20.36 Hide/expose window via popup (4 kids)
- 19.04 1.01 1.00 1.00  23.48 Hide/expose window via popup (16 kids)
- 19.22 1.00 1.00 1.00  20.44 Hide/expose window via popup (25 kids)
- 17.41 1.00 0.91 0.97  17.68 Hide/expose window via popup (50 kids)
- 17.29 1.01 1.00 1.01  17.07 Hide/expose window via popup (75 kids)
- 16.74 1.00 1.00 1.00  16.17 Hide/expose window via popup (100 kids)
- 10.30 1.00 1.00 1.00  10.51 Hide/expose window via popup (200 kids)
- 16.48 1.01 1.00 1.00  26.05 Move window (4 kids)
- 17.01 0.95 1.00 1.00  23.97 Move window (16 kids)
- 16.95 1.00 1.00 1.00  22.90 Move window (25 kids)
- 16.05 1.01 1.00 1.00  21.32 Move window (50 kids)
- 15.58 1.00 0.98 0.98  19.44 Move window (75 kids)
- 14.98 1.02 1.03 1.03  18.17 Move window (100 kids)
- 10.90 1.01 1.01 1.00  12.68 Move window (200 kids)
- 49.42 1.00 1.00 1.00 198.27 Moved unmapped window (4 kids)
- 50.72 0.97 1.00 1.00 193.66 Moved unmapped window (16 kids)
- 50.87 1.00 0.99 1.00 195.09 Moved unmapped window (25 kids)
- 50.72 1.00 1.00 1.00 189.34 Moved unmapped window (50 kids)
- 50.87 1.00 1.00 1.00 191.33 Moved unmapped window (75 kids)
- 50.87 1.00 1.00 0.90 186.71 Moved unmapped window (100 kids)
- 50.87 1.00 1.00 1.00 179.19 Moved unmapped window (200 kids)
- 41.04 1.00 1.00 1.00  56.61 Move window via parent (4 kids)
- 69.81 1.00 1.00 1.00 130.82 Move window via parent (16 kids)
- 95.81 1.00 1.00 1.00 141.92 Move window via parent (25 kids)
- 95.98 1.00 1.00 1.00 149.43 Move window via parent (50 kids)
- 96.59 1.01 1.01 1.00 153.98 Move window via parent (75 kids)
- 97.19 1.00 1.00 1.00 157.30 Move window via parent (100 kids)
- 96.67 1.00 0.99 0.96 159.44 Move window via parent (200 kids)
- 17.75 1.01 1.00 1.00  27.61 Resize window (4 kids)
- 17.94 1.00 1.00 0.99  25.42 Resize window (16 kids)
- 17.92 1.01 1.00 1.00  24.47 Resize window (25 kids)
- 17.24 0.97 1.00 1.00  24.14 Resize window (50 kids)
- 16.81 1.00 1.00 0.99  22.75 Resize window (75 kids)
- 16.08 1.00 1.00 1.00  21.20 Resize window (100 kids)
- 12.92 1.00 0.99 1.00  16.26 Resize window (200 kids)
- 52.94 1.01 1.00 1.00 327.12 Resize unmapped window (4 kids)
- 53.60 1.01 1.01 1.01 333.71 Resize unmapped window (16 kids)
- 52.99 1.00 1.00 1.00 337.29 Resize unmapped window (25 kids)
- 51.98 1.00 1.00 1.00 329.38 Resize unmapped window (50 kids)
- 53.05 0.89 1.00 1.00 322.60 Resize unmapped window (75 kids)
- 53.05 1.00 1.00 1.00 318.08 Resize unmapped window (100 kids)
- 53.11 1.00 1.00 0.99 306.21 Resize unmapped window (200 kids)
- 16.76 1.00 0.96 1.00  19.46 Circulate window (4 kids)
- 17.24 1.00 1.00 0.97  16.24 Circulate window (16 kids)
- 16.30 1.03 1.03 1.03  15.85 Circulate window (25 kids)
- 13.45 1.00 1.00 1.00  14.90 Circulate window (50 kids)
- 12.91 1.00 1.00 1.00  13.06 Circulate window (75 kids)
- 11.30 0.98 1.00 1.00  11.03 Circulate window (100 kids)
-  7.58 1.01 1.01 0.99   7.47 Circulate window (200 kids)
-  1.01 1.01 0.98 1.00   0.95 Circulate Unmapped window (4 kids)
-  1.07 1.07 1.01 1.07   1.02 Circulate Unmapped window (16 kids)
-  1.04 1.09 1.06 1.05   0.97 Circulate Unmapped window (25 kids)
-  1.04 1.23 1.20 1.18   1.05 Circulate Unmapped window (50 kids)
-  1.18 1.53 1.19 1.45   1.24 Circulate Unmapped window (75 kids)
-  1.08 1.02 1.01 1.74   1.01 Circulate Unmapped window (100 kids)
-  1.01 1.12 0.98 0.91   0.97 Circulate Unmapped window (200 kids)
-</screen>
-</para>
-</sect3>
-
-<sect3>
-<title>Profiling with OProfile</title>
-
-<para>OProfile (available from http://oprofile.sourceforge.net/) is a
-system-wide profiler for Linux systems that uses processor-level
-counters to collect sampling data.  OProfile can provide information
-that is similar to that provided by <command>gprof</command>, but without the
-necessity of recompiling the program with special instrumentation (i.e.,
-OProfile can collect statistical profiling information about optimized
-programs).  A test harness was developed to collect OProfile data for
-each <command>x11perf</command> test individually.
-</para>
-
-<para>Test runs were performed using the RETIRED_INSNS counter on the AMD
-Athlon and the CPU_CLK_HALTED counter on the Intel Pentium III (with a
-test configuration different from the one described above).  We have
-examined OProfile output and have compared it with <command>gprof</command> output.
-This investigation has not produced results that yield performance
-increases in <command>x11perf</command> numbers.
-</para>
-
-</sect3>
-
-<!--
-<sect3>Retired Instructions
-
-<p>The initial tests using OProfile were done using the RETIRED_INSNS
-counter with DMX running on the dual-processor AMD Athlon machine - the
-same test configuration that was described above and that was used for
-other tests.  The RETIRED_INSNS counter counts retired instructions and
-showed drawing, text, copying, and image tests to be dominated (&gt;
-30%) by calls to Hash(), SecurityLookupIDByClass(),
-SecurityLookupIDByType(), and StandardReadRequestFromClient().  Some of
-these tests also executed significant instructions in
-WaitForSomething().
-
-<p>In contrast, the window tests executed significant
-instructions in SecurityLookupIDByType(), Hash(),
-StandardReadRequestFromClient(), but also executed significant
-instructions in other routines, such as ConfigureWindow().  Some time
-was spent looking at Hash() function, but optimizations in this routine
-did not lead to a dramatic increase in <tt/x11perf/ performance.
--->
-
-<!--
-<sect3>Clock Cycles
-
-<p>Retired instructions can be misleading because Intel/AMD instructions
-execute in variable amounts of time.  The OProfile tests were repeated
-using the Intel CPU_CLK_HALTED counter with DMX running on the second
-back-end machine.  Note that this is a different test configuration that
-the one described above.  However, these tests show the amount of time
-(as measured in CPU cycles) that are spent in each routine.  Because
-<tt/x11perf/ was running on the first back-end machine and because
-window optimizations were on, the load on the second back-end machine
-was not significant.
-
-<p>Using CPU_CLK_HALTED, DMX showed simple drawing
-tests spending more than 10% of their time in
-StandardReadRequestFromClient(), with significant time (&gt; 20% total)
-spent in SecurityLookupIDByClass(), WaitForSomething(), and Dispatch().
-For these tests, &lt; 5% of the time was spent in Hash(), which explains
-why optimizing the Hash() routine did not impact <tt/x11perf/ results.
-
-<p>The trapezoid, text, scrolling, copying, and image tests were
-dominated by time in ProcFillPoly(), PanoramiXFillPoly(), dmxFillPolygon(),
-SecurityLookupIDByClass(), SecurityLookupIDByType(), and
-StandardReadRequestFromClient().  Hash() time was generally above 5% but
-less than 10% of total time.
--->
-
-<sect3>
-<title>X Test Suite</title>
-
-<para>The X Test Suite was run on the fully optimized DMX server using the
-configuration described above.  The following failures were noted:
-<screen>
-XListPixmapFormats: Test 1              [1]
-XChangeWindowAttributes: Test 32        [1]
-XCreateWindow: Test 30                  [1]
-XFreeColors: Test 4                     [3]
-XCopyArea: Test 13, 17, 21, 25, 30      [2]
-XCopyPlane: Test 11, 15, 27, 31         [2]
-XSetFontPath: Test 4                    [1]
-XChangeKeyboardControl: Test 9, 10      [1]
-
-[1] Previously documented errors expected from the Xinerama
-    implementation (see Phase I discussion).
-[2] Newly noted errors that have been verified as expected
-    behavior of the Xinerama implementation.
-[3] Newly noted error that has been verified as a Xinerama
-    implementation bug.
-</screen>
-</para>
-
-</sect3>
-
-</sect2>
-
-<!-- ============================================================ -->
-<sect2>
-<title>Phase III</title>
-
-<para>During the third phase of development, support was provided for the
-following extensions: SHAPE, RENDER, XKEYBOARD, XInput.
-</para>
-
-<sect3>
-<title>SHAPE</title>
-
-<para>The SHAPE extension is supported.  Test applications (e.g., xeyes and
-oclock) and window managers that make use of the SHAPE extension will
-work as expected.
-</para>
-</sect3>
-
-<sect3>
-<title>RENDER</title>
-
-<para>The RENDER extension is supported.  The version included in the DMX
-CVS tree is version 0.2, and this version is fully supported by Xdmx.
-Applications using only version 0.2 functions will work correctly;
-however, some apps that make use of functions from later versions do not
-properly check the extension's major/minor version numbers.  These apps
-will fail with a Bad Implementation error when using post-version 0.2
-functions.  This is expected behavior.  When the DMX CVS tree is updated
-to include newer versions of RENDER, support for these newer functions
-will be added to the DMX X server.
-</para>
-</sect3>
-
-<sect3>
-<title>XKEYBOARD</title>
-
-<para>The XKEYBOARD extension is supported.  If present on the back-end X
-servers, the XKEYBOARD extension will be used to obtain information
-about the type of the keyboard for initialization.  Otherwise, the
-keyboard will be initialized using defaults.  Note that this departs
-from older behavior: when Xdmx is compiled without XKEYBOARD support,
-the map from the back-end X server will be preserved.  With XKEYBOARD
-support, the map is not preserved because better information and control
-of the keyboard is available.
-</para>
-</sect3>
-
-<sect3>
-<title>XInput</title>
-
-<para>The XInput extension is supported.  Any device can be used as a core
-device and be used as an XInput extension device, with the exception of
-core devices on the back-end servers.  This limitation is present
-because cursor handling on the back-end requires that the back-end
-cursor sometimes track the Xdmx core cursor -- behavior that is
-incompatible with using the back-end pointer as a non-core device.
-</para>
-
-<para>Currently, back-end extension devices are not available as Xdmx
-extension devices, but this limitation should be removed in the future.
-</para>
-
-<para>To demonstrate the XInput extension, and to provide more examples for
-low-level input device driver writers, USB device drivers have been
-written for mice (usb-mou), keyboards (usb-kbd), and
-non-mouse/non-keyboard USB devices (usb-oth).  Please see the man page
-for information on Linux kernel drivers that are required for using
-these Xdmx drivers.
-</para>
-</sect3>
-
-<sect3>
-<title>DPMS</title>
-
-<para>The DPMS extension is exported but does not do anything at this time.
-</para>
-
-</sect3>
-
-<sect3>
-<title>Other Extensions</title>
-
-<para>The LBX,
-       SECURITY,
-       XC-APPGROUP, and
-       XFree86-Bigfont
-extensions do not require any special Xdmx support and have been exported.
-</para>
-
-<para>The
-    BIG-REQUESTS,
-    DEC-XTRAP,
-    DOUBLE-BUFFER,
-    Extended-Visual-Information,
-    FontCache,
-    GLX,
-    MIT-SCREEN-SAVER,
-    MIT-SHM,
-    MIT-SUNDRY-NONSTANDARD,
-    RECORD,
-    SECURITY,
-    SGI-GLX,
-    SYNC,
-    TOG-CUP,
-    X-Resource,
-    XC-MISC,
-    XFree86-DGA,
-    XFree86-DRI,
-    XFree86-Misc,
-    XFree86-VidModeExtension, and
-    XVideo
-extensions are <emphasis remap="it">not</emphasis> supported at this time, but will be evaluated
-for inclusion in future DMX releases.  <emphasis remap="bf">See below for additional work
-on extensions after Phase III.</emphasis>
-</para>
-</sect3>
-</sect2>
-
-<sect2>
-<title>Phase IV</title>
-
-<sect3>
-<title>Moving to XFree86 4.3.0</title>
-
-<para>For Phase IV, the recent release of XFree86 4.3.0 (27 February 2003)
-was merged onto the dmx.sourceforge.net CVS trunk and all work is
-proceeding using this tree.
-</para>
-</sect3>
-
-<sect3>
-<title>Extensions </title>
-
-<sect4>
-<title>XC-MISC (supported)</title>
-
-<para>XC-MISC is used internally by the X library to recycle XIDs from the
-X server.  This is important for long-running X server sessions.  Xdmx
-supports this extension.  The X Test Suite passed and failed the exact
-same tests before and after this extension was enabled.
-<!-- Tested February/March 2003 -->
-</para>
-</sect4>
-
-<sect4>
-<title>Extended-Visual-Information (supported)</title>
-
-<para>The Extended-Visual-Information extension provides a method for an X
-client to obtain detailed visual information.  Xdmx supports this
-extension.  It was tested using the <filename>hw/dmx/examples/evi</filename> example
-program.  <emphasis remap="bf">Note that this extension is not Xinerama-aware</emphasis> -- it will
-return visual information for each screen even though Xinerama is
-causing the X server to export a single logical screen.
-<!-- Tested March 2003 -->
-</para>
-</sect4>
-
-<sect4>
-<title>RES (supported)</title>
-
-<para>The X-Resource extension provides a mechanism for a client to obtain
-detailed information about the resources used by other clients.  This
-extension was tested with the <filename>hw/dmx/examples/res</filename> program.  The
-X Test Suite passed and failed the exact same tests before and after
-this extension was enabled.
-<!-- Tested March 2003 -->
-</para>
-</sect4>
-
-<sect4>
-<title>BIG-REQUESTS (supported)</title>
-
-<para>This extension enables the X11 protocol to handle requests longer
-than 262140 bytes.  The X Test Suite passed and failed the exact same
-tests before and after this extension was enabled.
-<!-- Tested March 2003 -->
-</para>
-</sect4>
-
-<sect4>
-<title>XSYNC (supported)</title>
-
-<para>This extension provides facilities for two different X clients to
-synchronize their requests.  This extension was minimally tested with
-<command>xdpyinfo</command> and the X Test Suite passed and failed the exact same
-tests before and after this extension was enabled.
-<!-- Tested March 2003 -->
-</para>
-</sect4>
-
-<sect4>
-<title>XTEST, RECORD, DEC-XTRAP (supported) and XTestExtension1 (not supported)</title>
-
-<para>The XTEST and RECORD extension were developed by the X Consortium for
-use in the X Test Suite and are supported as a standard in the X11R6
-tree.  They are also supported in Xdmx.  When X Test Suite tests that
-make use of the XTEST extension are run, Xdmx passes and fails exactly
-the same tests as does a standard XFree86 X server.  When the
-<literal remap="tt">rcrdtest</literal> test (a part of the X Test Suite that verifies the RECORD
-extension) is run, Xdmx passes and fails exactly the same tests as does
-a standard XFree86 X server. <!-- Tested February/March 2003 -->
-</para>
-
-<para>There are two older XTEST-like extensions: DEC-XTRAP and
-XTestExtension1.  The XTestExtension1 extension was developed for use by
-the X Testing Consortium for use with a test suite that eventually
-became (part of?) the X Test Suite.  Unlike XTEST, which only allows
-events to be sent to the server, the XTestExtension1 extension also
-allowed events to be recorded (similar to the RECORD extension).  The
-second is the DEC-XTRAP extension that was developed by the Digital
-Equipment Corporation.
-</para>
-
-<para>The DEC-XTRAP extension is available from Xdmx and has been tested
-with the <command>xtrap*</command> tools which are distributed as standard X11R6
-clients. <!-- Tested March 2003 -->
-</para>
-
-<para>The XTestExtension1 is <emphasis>not</emphasis> supported because it does not appear
-to be used by any modern X clients (the few that support it also support
-XTEST) and because there are no good methods available for testing that
-it functions correctly (unlike XTEST and DEC-XTRAP, the code for
-XTestExtension1 is not part of the standard X server source tree, so
-additional testing is important). <!-- Tested March 2003 -->
-</para>
-
-<para>Most of these extensions are documented in the X11R6 source tree.
-Further, several original papers exist that this author was unable to
-locate -- for completeness and historical interest, citations are
-provide:
-<variablelist>
-<varlistentry>
-<term>XRECORD</term>
-<listitem>
-<para>Martha Zimet. Extending X For Recording.  8th Annual X
-Technical Conference Boston, MA January 24-26, 1994.
-</para></listitem></varlistentry>
-<varlistentry>
-<term>DEC-XTRAP</term>
-<listitem>
-<para>Dick Annicchiarico, Robert Chesler, Alan Jamison. XTrap
-Architecture. Digital Equipment Corporation, July 1991.
-</para></listitem></varlistentry>
-<varlistentry>
-<term>XTestExtension1</term>
-<listitem>
-<para>Larry Woestman. X11 Input Synthesis Extension
-Proposal. Hewlett Packard, November 1991.
-</para></listitem></varlistentry>
-</variablelist>
-</para>
-</sect4>
-
-<sect4>
-<title>MIT-MISC (not supported)</title>
-
-<para>The MIT-MISC extension is used to control a bug-compatibility flag
-that provides compatibility with xterm programs from X11R1 and X11R2.
-There does not appear to be a single client available that makes use of
-this extension and there is not way to verify that it works correctly.
-The Xdmx server does <emphasis>not</emphasis> support MIT-MISC.
-</para>
-</sect4>
-
-<sect4>
-<title>SCREENSAVER (not supported)</title>
-
-<para>This extension provides special support for the X screen saver.  It
-was tested with beforelight, which appears to be the only client that
-works with it.  When Xinerama was not active, <command>beforelight</command> behaved
-as expected.  However, when Xinerama was active, <command>beforelight</command> did
-not behave as expected.  Further, when this extension is not active,
-<command>xscreensaver</command> (a widely-used X screen saver program) did not behave
-as expected.  Since this extension is not Xinerama-aware and is not
-commonly used with expected results by clients, we have left this
-extension disabled at this time.
-</para>
-</sect4>
-
-<sect4>
-<title>GLX (supported)</title>
-
-<para>The GLX extension provides OpenGL and GLX windowing support.  In
-Xdmx, the extension is called glxProxy, and it is Xinerama aware.  It
-works by either feeding requests forward through Xdmx to each of the
-back-end servers or handling them locally.  All rendering requests are
-handled on the back-end X servers.  This code was donated to the DMX
-project by SGI.  For the X Test Suite results comparison, see below.
-</para>
-</sect4>
-
-<sect4>
-<title>RENDER (supported)</title>
-
-<para>The X Rendering Extension (RENDER) provides support for digital image
-composition.  Geometric and text rendering are supported.  RENDER is
-partially Xinerama-aware, with text and the most basic compositing
-operator; however, its higher level primitives (triangles, triangle
-strips, and triangle fans) are not yet Xinerama-aware.  The RENDER
-extension is still under development, and is currently at version 0.8.
-Additional support will be required in DMX as more primitives and/or
-requests are added to the extension.
-</para>
-
-<para>There is currently no test suite for the X Rendering Extension;
-however, there has been discussion of developing a test suite as the
-extension matures.  When that test suite becomes available, additional
-testing can be performed with Xdmx.  The X Test Suite passed and failed
-the exact same tests before and after this extension was enabled.
-</para>
-</sect4>
-
-<sect4>
-<title>Summary</title>
-
-<!-- WARNING: this list is duplicated in the "Common X extension
-support" section -->
-<para>To summarize, the following extensions are currently supported:
-    BIG-REQUESTS,
-    DEC-XTRAP,
-    DMX,
-    DPMS,
-    Extended-Visual-Information,
-    GLX,
-    LBX,
-    RECORD,
-    RENDER,
-    SECURITY,
-    SHAPE,
-    SYNC,
-    X-Resource,
-    XC-APPGROUP,
-    XC-MISC,
-    XFree86-Bigfont,
-    XINERAMA,
-    XInputExtension,
-    XKEYBOARD, and
-    XTEST.
-</para>
-
-<para>The following extensions are <emphasis>not</emphasis> supported at this time:
-    DOUBLE-BUFFER,
-    FontCache,
-    MIT-SCREEN-SAVER,
-    MIT-SHM,
-    MIT-SUNDRY-NONSTANDARD,
-    TOG-CUP,
-    XFree86-DGA,
-    XFree86-Misc,
-    XFree86-VidModeExtension,
-    XTestExtensionExt1, and
-    XVideo.
-</para>
-</sect4>
-</sect3>
-
-<sect3>
-<title>Additional Testing with the X Test Suite</title>
-
-<sect4>
-<title>XFree86 without XTEST</title>
-
-<para>After the release of XFree86 4.3.0, we retested the XFree86 X server
-with and without using the XTEST extension.  When the XTEST extension
-was <emphasis>not</emphasis> used for testing, the XFree86 4.3.0 server running on our
-usual test system with a Radeon VE card reported unexpected failures in
-the following tests:
-<literallayout>
-XListPixmapFormats: Test 1
-XChangeKeyboardControl: Tests 9, 10
-XGetDefault: Test 5
-XRebindKeysym: Test 1
-</literallayout>
-</para>
-</sect4>
-
-<sect4>
-<title>XFree86 with XTEST</title>
-
-<para>When using the XTEST extension, the XFree86 4.3.0 server reported the
-following errors:
-<literallayout>
-XListPixmapFormats: Test 1
-XChangeKeyboardControl: Tests 9, 10
-XGetDefault: Test 5
-XRebindKeysym: Test 1
-
-XAllowEvents: Tests 20, 21, 24
-XGrabButton: Tests 5, 9-12, 14, 16, 19, 21-25
-XGrabKey: Test 8
-XSetPointerMapping: Test 3
-XUngrabButton: Test 4
-</literallayout>
-</para>
-
-<para>While these errors may be important, they will probably be fixed
-eventually in the XFree86 source tree.  We are particularly interested
-in demonstrating that the Xdmx server does not introduce additional
-failures that are not known Xinerama failures.
-</para>
-</sect4>
-
-<sect4>
-<title>Xdmx with XTEST, without Xinerama, without GLX</title>
-
-<para>Without Xinerama, but using the XTEST extension, the following errors
-were reported from Xdmx (note that these are the same as for the XFree86
-4.3.0, except that XGetDefault no longer fails):
-<literallayout>
-XListPixmapFormats: Test 1
-XChangeKeyboardControl: Tests 9, 10
-XRebindKeysym: Test 1
-
-XAllowEvents: Tests  20, 21, 24
-XGrabButton: Tests 5, 9-12, 14, 16, 19, 21-25
-XGrabKey: Test 8
-XSetPointerMapping: Test 3
-XUngrabButton: Test 4
-</literallayout>
-</para>
-</sect4>
-
-<sect4>
-<title>Xdmx with XTEST, with Xinerama, without GLX</title>
-
-<para>With Xinerama, using the XTEST extension, the following errors
-were reported from Xdmx:
-<literallayout>
-XListPixmapFormats: Test 1
-XChangeKeyboardControl: Tests 9, 10
-XRebindKeysym: Test 1
-
-XAllowEvents: Tests 20, 21, 24
-XGrabButton: Tests 5, 9-12, 14, 16, 19, 21-25
-XGrabKey: Test 8
-XSetPointerMapping: Test 3
-XUngrabButton: Test 4
-
-XCopyPlane: Tests 13, 22, 31 (well-known XTEST/Xinerama interaction issue)
-XDrawLine: Test 67
-XDrawLines: Test 91
-XDrawSegments: Test 68
-</literallayout>
-Note that the first two sets of errors are the same as for the XFree86
-4.3.0 server, and that the XCopyPlane error is a well-known error
-resulting from an XTEST/Xinerama interaction when the request crosses a
-screen boundary.  The XDraw* errors are resolved when the tests are run
-individually and they do not cross a screen boundary.  We will
-investigate these errors further to determine their cause.
-</para>
-</sect4>
-
-<sect4>
-<title>Xdmx with XTEST, with Xinerama, with GLX</title>
-
-<para>With GLX enabled, using the XTEST extension, the following errors
-were reported from Xdmx (these results are from early during the Phase
-IV development, but were confirmed with a late Phase IV snapshot):
-<literallayout>
-XListPixmapFormats: Test 1
-XChangeKeyboardControl: Tests 9, 10
-XRebindKeysym: Test 1
-
-XAllowEvents: Tests 20, 21, 24
-XGrabButton: Tests 5, 9-12, 14, 16, 19, 21-25
-XGrabKey: Test 8
-XSetPointerMapping: Test 3
-XUngrabButton: Test 4
-
-XClearArea: Test 8
-XCopyArea: Tests 4, 5, 11, 14, 17, 23, 25, 27, 30
-XCopyPlane: Tests 6, 7, 10, 19, 22, 31
-XDrawArcs: Tests 89, 100, 102
-XDrawLine: Test 67
-XDrawSegments: Test 68
-</literallayout>
-Note that the first two sets of errors are the same as for the XFree86
-4.3.0 server, and that the third set has different failures than when
-Xdmx does not include GLX support.  Since the GLX extension adds new
-visuals to support GLX's visual configs and the X Test Suite runs tests
-over the entire set of visuals, additional rendering tests were run and
-presumably more of them crossed a screen boundary.  This conclusion is
-supported by the fact that nearly all of the rendering errors reported
-are resolved when the tests are run individually and they do no cross a
-screen boundary.
-</para>
-
-<para>Further, when hardware rendering is disabled on the back-end displays,
-many of the errors in the third set are eliminated, leaving only:
-<literallayout>
-XClearArea: Test 8
-XCopyArea: Test 4, 5, 11, 14, 17, 23, 25, 27, 30
-XCopyPlane: Test 6, 7, 10, 19, 22, 31
-</literallayout>
-</para>
-</sect4>
-
-<sect4>
-<title>Conclusion</title>
-
-<para>We conclude that all of the X Test Suite errors reported for Xdmx are
-the result of errors in the back-end X server or the Xinerama
-implementation.  Further, all of these errors that can be reasonably
-fixed at the Xdmx layer have been.  (Where appropriate, we have
-submitted patches to the XFree86 and Xinerama upstream maintainers.)
-</para>
-</sect4>
-</sect3>
-
-<sect3>
-<title>Dynamic Reconfiguration</title>
-
-<para>During this development phase, dynamic reconfiguration support was
-added to DMX.  This support allows an application to change the position
-and offset of a back-end server's screen.  For example, if the
-application would like to shift a screen slightly to the left, it could
-query Xdmx for the screen's &lt;x,y&gt; position and then dynamically
-reconfigure that screen to be at position &lt;x+10,y&gt;.  When a screen
-is dynamically reconfigured, input handling and a screen's root window
-dimensions are adjusted as needed.  These adjustments are transparent to
-the user.
-</para>
-
-<sect4>
-<title>Dynamic reconfiguration extension</title>
-
-<para>The application interface to DMX's dynamic reconfiguration is through
-a function in the DMX extension library:
-<programlisting>
-Bool DMXReconfigureScreen(Display *dpy, int screen, int x, int y)
-</programlisting>
-where <parameter>dpy</parameter> is DMX server's display, <parameter>screen</parameter> is the number of the
-screen to be reconfigured, and <parameter>x</parameter> and <parameter>y</parameter> are the new upper,
-left-hand coordinates of the screen to be reconfigured.
-</para>
-
-<para>The coordinates are not limited other than as required by the X
-protocol, which limits all coordinates to a signed 16 bit number.  In
-addition, all coordinates within a screen must also be legal values.
-Therefore, setting a screen's upper, left-hand coordinates such that the
-right or bottom edges of the screen is greater than 32,767 is illegal.
-</para>
-</sect4>
-
-<sect4>
-<title>Bounding box</title>
-
-<para>When the Xdmx server is started, a bounding box is calculated from
-the screens' layout given either on the command line or in the
-configuration file.  This bounding box is currently fixed for the
-lifetime of the Xdmx server.
-</para>
-
-<para>While it is possible to move a screen outside of the bounding box, it
-is currently not possible to change the dimensions of the bounding box.
-For example, it is possible to specify coordinates of &lt;-100,-100&gt;
-for the upper, left-hand corner of the bounding box, which was
-previously at coordinates &lt;0,0&gt;.  As expected, the screen is moved
-down and to the right; however, since the bounding box is fixed, the
-left side and upper portions of the screen exposed by the
-reconfiguration are no longer accessible on that screen.  Those
-inaccessible regions are filled with black.
-</para>
-
-<para>This fixed bounding box limitation will be addressed in a future
-development phase.
-</para>
-</sect4>
-
-<sect4>
-<title>Sample applications</title>
-
-<para>An example of where this extension is useful is in setting up a video
-wall.  It is not always possible to get everything perfectly aligned,
-and sometimes the positions are changed (e.g., someone might bump into a
-projector).  Instead of physically moving projectors or monitors, it is
-now possible to adjust the positions of the back-end server's screens
-using the dynamic reconfiguration support in DMX.
-</para>
-
-<para>Other applications, such as automatic setup and calibration tools,
-can make use of dynamic reconfiguration to correct for projector
-alignment problems, as long as the projectors are still arranged
-rectilinearly.  Horizontal and vertical keystone correction could be
-applied to projectors to correct for non-rectilinear alignment problems;
-however, this must be done external to Xdmx.
-</para>
-
-<para>A sample test program is included in the DMX server's examples
-directory to demonstrate the interface and how an application might use
-dynamic reconfiguration.  See <filename>dmxreconfig.c</filename> for details.
-</para>
-</sect4>
-
-<sect4>
-<title>Additional notes</title>
-
-<para>In the original development plan, Phase IV was primarily devoted to
-adding OpenGL support to DMX; however, SGI became interested in the DMX
-project and developed code to support OpenGL/GLX.  This code was later
-donated to the DMX project and integrated into the DMX code base, which
-freed the DMX developers to concentrate on dynamic reconfiguration (as
-described above).
-</para>
-</sect4>
-</sect3>
-
-<sect3>
-<title>Doxygen documentation</title>
-
-<para>Doxygen is an open-source (GPL) documentation system for generating
-browseable documentation from stylized comments in the source code.  We
-have placed all of the Xdmx server and DMX protocol source code files
-under Doxygen so that comprehensive documentation for the Xdmx source
-code is available in an easily browseable format.
-</para>
-</sect3>
-
-<sect3>
-<title>Valgrind</title>
-
-<para>Valgrind, an open-source (GPL) memory debugger for Linux, was used to
-search for memory management errors.  Several memory leaks were detected
-and repaired.  The following errors were not addressed:
-<orderedlist>
-    <listitem><para>
-        When the X11 transport layer sends a reply to the client, only
-        those fields that are required by the protocol are filled in --
-        unused fields are left as uninitialized memory and are therefore
-        noted by valgrind.  These instances are not errors and were not
-        repaired.
-    </para></listitem>
-    <listitem><para>
-        At each server generation, glxInitVisuals allocates memory that
-        is never freed.  The amount of memory lost each generation
-        approximately equal to 128 bytes for each back-end visual.
-        Because the code involved is automatically generated, this bug
-        has not been fixed and will be referred to SGI.
-    </para></listitem>
-    <listitem><para>
-        At each server generation, dmxRealizeFont calls XLoadQueryFont,
-        which allocates a font structure that is not freed.
-        dmxUnrealizeFont can free the font structure for the first
-        screen, but cannot free it for the other screens since they are
-        already closed by the time dmxUnrealizeFont could free them.
-        The amount of memory lost each generation is approximately equal
-        to 80 bytes per font per back-end.  When this bug is fixed in
-        the the X server's device-independent (dix) code, DMX will be
-        able to properly free the memory allocated by XLoadQueryFont.
-    </para></listitem>
-</orderedlist>
-</para>
-</sect3>
-
-<sect3>
-<title>RATS</title>
-
-<para>RATS (Rough Auditing Tool for Security) is an open-source (GPL)
-security analysis tool that scans source code for common
-security-related programming errors (e.g., buffer overflows and TOCTOU
-races).  RATS was used to audit all of the code in the hw/dmx directory
-and all "High" notations were checked manually.  The code was either
-re-written to eliminate the warning, or a comment containing "RATS" was
-inserted on the line to indicate that a human had checked the code.
-Unrepaired warnings are as follows:
-<orderedlist>
-    <listitem><para>
-        Fixed-size buffers are used in many areas, but code has been
-        added to protect against buffer overflows (e.g., snprintf).
-        The only instances that have not yet been fixed are in
-        config/xdmxconfig.c (which is not part of the Xdmx server) and
-        input/usb-common.c.
-    </para></listitem>
-    <listitem><para>
-        vprintf and vfprintf are used in the logging routines.  In
-        general, all uses of these functions (e.g., dmxLog) provide a
-        constant format string from a trusted source, so the use is
-        relatively benign.
-    </para></listitem>
-    <listitem><para>
-        glxProxy/glxscreens.c uses getenv and strcat.  The use of these
-        functions is safe and will remain safe as long as
-        ExtensionsString is longer then GLXServerExtensions (ensuring
-        this may not be ovious to the casual programmer, but this is in
-        automatically generated code, so we hope that the generator
-        enforces this constraint).
-    </para></listitem>
-</orderedlist>
-
-</para>
-
-</sect3>
-
-</sect2>
-
-</sect1>
-
-</appendix>
-
-  </article>
-
-  <!-- Local Variables: -->
-  <!-- fill-column: 72  -->
-  <!-- End:             -->
diff --git a/hw/dmx/doc/scaled.xml b/hw/dmx/doc/scaled.xml
deleted file mode 100644
index 30c9b9f..0000000
--- a/hw/dmx/doc/scaled.xml
+++ /dev/null
@@ -1,727 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
- "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
- <!ENTITY % defs SYSTEM "/xserver/doc/xml/xserver.ent"> %defs;
-]>
-  <article>
-
-  <articleinfo>
-    <!-- Title information -->
-    <title>Scaled Window Support in DMX</title>
-    <authorgroup>
-      <author><firstname>Kevin E.</firstname><surname>Martin</surname></author>
-      <author><firstname>Rickard E.</firstname><surname>Faith</surname></author>
-    </authorgroup>
-    <pubdate>15 October 2003 (created 19 September 2003)</pubdate>
-    <releaseinfo>X Server Version &xserver.version;</releaseinfo>
-    <abstract>
-      <para>
-      This document investigates the possibility of adding scaled window
-      support to the DMX X server, thereby allowing a window or some
-      selected part of the logical DMX area to be displayed using a
-      scaling factor.  For example, this might allow the contents of a
-      window to be magnified for easier viewing.  In particular, scaling
-      for the VNC client is explored.  <emphasis remap="it">Copyright 2003
-        by Red Hat, Inc., Raleigh, North Carolina</emphasis>
-      </para>
-    </abstract>
-  </articleinfo>
-
-      <!-- Begin the document -->
-      <sect1><title>Introduction</title>
-        <sect2><title>DMX</title>
-          <para>
-            The DMX X server (Xdmx) is a proxy server that is designed
-            to allow X servers on multiple machines to be combined into
-            a single multi-headed X server.  Combined with Xinerama,
-            these heads can appear as a single very high-resolution
-            screen.  Typical applications include the creation of a
-            video wall with 16 1280x1024 displays arranged in a
-            rectangle, for a total resolution of of 5120x4096.
-          </para>
-        </sect2>
-        <sect2><title>Problem Statement</title>
-          <para>
-            Applications displayed on a physically large video wall that
-            provides high pixel-resolution may be difficult to see,
-            especially if the application is designed for use on a
-            typical desktop computer with a relatively small display
-            located close to the human operator.  The goal of this paper
-            is to describe and discuss solutions to this problem.
-          </para>
-          <para>
-            The original driving problem for this work is to provide
-            scaling for the <command>vncviewer</command> application when
-            displayed using DMX (VNC scaling is currently available only
-            with the Windows client, and there is no plan to extend that
-            capability to other clients).  While this specific problem
-            will be addressed in this paper, the general solution space
-            will also be explored, since this may lead to a good
-            solution not only for <command>vncviewer</command> but also for
-            other applications.
-          </para>
-        </sect2>
-        <sect2><title>Task</title>
-          <para>
-            For reference, here is the original description of the task
-            this paper addresses:
-            <itemizedlist>
-              <listitem><para>Scaled window support (for VNC)
-                <itemizedlist>
-                  <listitem><para>
-                    Investigate possibility of implementing a "scaled
-                    window" extension:
-                    <itemizedlist>
-                      <listitem><para>
-                        Add XCreateScaledWindow call that could be used
-                        in place of XCreateWindow
-                      </para></listitem>
-                      <listitem><para>
-                        All primitives drawn to scaled window would be
-                        scaled by appropriate (integral?) scaling factor
-                      </para></listitem>
-                    </itemizedlist>
-                  </para></listitem>
-                  <listitem><para>
-                    Alternate approach: special case VNC support
-                  </para></listitem>
-                </itemizedlist>
-              </para></listitem>
-            </itemizedlist>
-          </para>
-        </sect2>
-      </sect1>
-
-      <sect1><title>Previous Work</title>
-        <para>
-          This section reviews relevant previous work.
-        </para>
-        <sect2><title>VNC</title>
-          <sect3><title>Scaling under VNC</title>
-            <para>
-              When using the <command>vncviewer</command> program for Windows, it
-              is possible to specify a scaling factor (as numerator and
-              denominator).  When scaling is in effect, the viewer
-              software uses StretchBlt (instead of BitBlt) to display
-              the pixels for the user.  When this call is made, the
-              viewer already has received all of the pixel information
-              (at full unscaled resolution).
-            </para>
-            <para>
-              The scaling in VNC is primitive.  It does not conserve
-              bandwidth, it does not treat textual information
-              differently (i.e., by using a suitably scaled font), and
-              it does not provide any anti-aliasing other than that
-              provided by the underlying (Windows-only) system library.
-            </para>
-          </sect3>
-        </sect2>
-        <sect2><title>The X Video Extension</title>
-          <para>
-            The X Video Extension is a widely-available extension to the
-            X11 protocol that provides support for streaming video.
-            Integral to this support is the ability to arbitrarily scale
-            the output.  In version 2.2 of the X Video specification,
-            support for scaled still images was provided, using both
-            shared memory and traditional transport.  The API for this
-            support uses calls that are quite similar to XCreateWindow,
-            XPutImage, and XShmPutImage.  Currently, most of the drivers
-            implemented in XFree86 only support data in various YUV
-            formats.  However, several modern video adaptors support RGB
-            as well.
-          </para>
-          <para>
-            Note, though, that the target output for this scaling is an
-            overlay plane -- so X Video provides functionality that is
-            fundamentally different from that provided by the Windows
-            StrechBlt call.
-          </para>
-        </sect2>
-      </sect1>
-
-      <sect1><title>Possible Solutions</title>
-        <para>
-          This section briefly discusses possible solutions, including
-          major advantages and disadvantages from both the
-          implementation and the end-user programmer standpoint.
-        </para>
-        <sect2><title>VNC-like Scaling</title>
-          <sect3><title>Software Scaling</title>
-            <para>
-              The <command>vncviewer</command> application could be modified to
-              provide software scaling.  This is not a general solution,
-              but it does solve one of the goals of this work.
-            </para>
-            <para>
-              A prototype of this solution was implemented and a patch
-              against <filename>vnc-3.3.7-unixsrc</filename> is available in the
-              <filename>dmx/external</filename> directory.  Because of limited time
-              available for this work, all of the edge cases were not
-              considered and the solution works well mainly for integer
-              scaling.
-            </para>
-            <para>
-              Currently, <command>vncviewer</command> writes to the X display
-              with XPutImage, XCopyArea, and XFillRectangle.  All
-              instances of these calls have to be aware of scaling
-              and must round correctly.  In the prototype solution,
-              rounding is incorrect and can cause artifacts.
-            </para>
-            <para>
-              A better solution would be to cache all updates to the
-              desktop image in <command>vncviewer</command> and only send the
-              damaged area to the X display with XPutImage.  This would
-              allow the damaged area to be computed so that rounding
-              errors do not create artifacts.  This method is probably
-              similar to what is used in the Window client.  (The whole
-              VNC suite is being re-written in C++ and the forthcoming
-              version 4 has not been evaluated.)
-            </para>
-          </sect3>
-          <sect3><title>Scaling with the X Video Extension</title>
-            <para>
-              The scaling in the Windows <command>vncviewer</command> application
-              makes use of a scaled blit that is supplied by the
-              underlying system library.  Several video cards currently
-              provide support for a scaled blit, and some X servers
-              (including XFree86) expose this capability to applications
-              via the XvPutImage interface of the X Video Extension.
-              The capability exposed by XvPutImage results in the scaled
-              image being drawn to an overlay plane.  Most video cards
-              also provide support for a scaled blit into the normal
-              output planes, but this is not exposed via XvPutImage.
-            </para>
-            <para>
-              The <command>vncviewer</command> program could be modified to use
-              the X Video Extension to provide scaling under X11 that is
-              similar to the scaling currently provided under Windows.
-              Unfortunately, Xdmx does not currently export the X Video
-              Extension, so this would not provide an immediate solution
-              usable with DMX.
-            </para>
-            <para>
-              A very early-stage proof-of-concept prototype was
-              implemented and a preliminary patch against
-              <filename>vnc-3.3.7-unixsrc</filename> is available in the
-              <filename>dmx/external</filename> directory.  This prototype was
-              implemented to better understand the problems that must be
-              solved to make this solution viable:
-              <itemizedlist>
-                <listitem><para>
-                  As noted under the software scaling section above,
-                  <command>vncviewer</command> writes to the X display with
-                  several different calls.  These calls write to the
-                  normal output planes and are compatible with
-                  XvPutImage, which writes to an overlay plane.  To
-                  eliminate artifacts caused by this problem,
-                  <command>vncviewer</command> should be modified so that a cached
-                  copy of the desktop is available, either as a
-                  client-side image or a server-side off-screen pixmap,
-                  so that XvPutImage would be the only method for
-                  writing to the X display.
-                </para></listitem>
-                <listitem>
-                  <para>
-                    Although several modern graphics adaptors support
-                    hardware scaling using an RGB format (e.g., ATI
-                    Radeon, nVidia, etc.), XFree86 drivers typically
-                    only implement YUV formats.  YUV generally compress
-                    the pixel information in some way.  For example, two
-                    commonly implemented formats, YUY2 and UYVY provide
-                    intensity information for every RGB pixel, but only
-                    provide chroma and luminance information for pairs
-                    of horizontal pixels.  Since VNC uses
-                    pixel-resolution for communicating updates on the
-                    wire, additional artifacts are introduced (because
-                    there may not be enough information from the wire to
-                    update a pair of pixels).
-                  </para>
-                  <para>
-                    Further, the well-known problem with YUV encoding
-                    is even more evident when the image is a desktop
-                    instead of a movie.  For example, consider a
-                    1-pixel-wide vertical window border.  If the border
-                    changes in color but not intensity (e.g., because a
-                    window manager uses color to indicate focus), there
-                    may or may not be a change in the YUY2 image,
-                    depending on the algorithm used for RGB to YUV
-                    conversion and on how the border pixel is ordered in
-                    the pair of pixels used by the algorithm.
-                  </para>
-                  <para>
-                    Many of these artifacts could be eliminated if
-                    <command>vncviewer</command> cached a complete RGB image of
-                    the desktop, and only did the conversion to YUV for
-                    properly aligned areas of damage.  The remaining artifacts
-                    could be eliminated if an RGB format was used with X
-                    Video (which may require the extension of existing
-                    XFree86 drivers to support RGB).
-                  </para>
-	        </listitem>
-                <listitem><para>
-                  Most modern video cards support exactly one overlay
-                  plane that is suitable for use with X Video.
-                  Therefore, only one application can use X Video at any
-                  given time.  This is a severe limitation in a desktop
-                  environment.
-                </para></listitem>
-              </itemizedlist>
-            </para>
-            <sect4><title>Implementing the X Video Extension for DMX</title>
-              <para>
-                The user-level API for X Video is fairly simple, but the
-                underlying support required for the full specification
-                is large.  However, since the API provides a method to
-                query supported capabilities, a usable subset of X
-                Video can be implemented that would support XvPutImage
-                and little else.  This would require support for the
-                following:
-                <itemizedlist>
-                  <listitem><para>
-                    X Video Extension API calls, including the
-                    following:
-                    <itemizedlist>
-                      <listitem><para>XvQueryExtension</para></listitem>
-                      <listitem><para>XvQueryAdaptors</para></listitem>
-                      <listitem><para>XvQueryPortAttributes</para></listitem>
-                      <listitem><para>XvFreeAdaptorInfo</para></listitem>
-                      <listitem><para>XvListImageFormats</para></listitem>
-                      <listitem><para>XvGrabPort</para></listitem>
-                      <listitem><para>XvCreateImage</para></listitem>
-                      <listitem><para>XvPutImage</para></listitem>
-                      <listitem><para>XvShmCreateImage</para></listitem>
-                      <listitem><para>XvShmPutImage</para></listitem>
-                    </itemizedlist>
-                  </para></listitem>
-                  <listitem><para>
-                    Support for querying back-end X Video Extension
-                    capabilities.
-                  </para></listitem>
-                  <listitem><para>
-                    Support for sending the image to the back-ends.
-                    Because X Video requires sending full images, there
-                    may be a trade-off between bandwidth limitations and
-                    additional complexity to divide the image up such
-                    that is scales properly.
-                  </para></listitem>
-                  <listitem><para>
-                    Possible support for a software fall-back.  For
-                    example, if all of the back-ends do not support the X
-                    Video Extension, software scaling can be implemented
-                    such that the image is sent to the back-end with
-                    XPutImage.  This pathway would have poor
-                    performance.
-                  </para></listitem>
-                </itemizedlist>
-              </para>
-            </sect4>
-            <sect4><title>Supporting RGB formats for the X Video Extension</title>
-              <para>
-                Assuming an XFree86 driver already supports the X Video
-                Extension, and assuming the target hardware supports an
-                RGB format, then adding support for that format is
-                relatively simple and straightforward.
-              </para>
-            </sect4>
-          </sect3>
-          <sect3><title>Scaling with an XPutImageScaled Extension</title>
-            <para>
-              Instead of (or in addition to) implementing the X Video
-              Extension in DMX, one obvious solution would be to
-              implement a new extension that provides access to
-              hardware-assisted scaled blits, similar to the StretchBlt
-              call available under Windows.  This call would scale RGB
-              images and would not use the overlay plane (unlike the X
-              Video Extension).
-            </para>
-            <para>
-              This approach has many of the same advantages and
-              disadvantages as the XCopyAreaScaled Extension, discussed
-              in the next section.  Discussion of XPutImageScaled is
-              deferred in favor of XCopyAreaScaled for the following
-              reasons:
-              <itemizedlist>
-                <listitem><para>
-                  XPutImageScaled can be emulated with XCopyAreaScaled
-                  by first using XPutImage to copy the image to an
-                  off-screen pixmap, and then calling XCopyAreaScaled
-                  between that off-screen pixmap and the target
-                  drawable.
-                </para></listitem>
-                <listitem><para>
-                  Since XCopyAreaScaled would copy between two areas of
-                  on-screen or off-screen memory, it has additional uses
-                  and can be viewed as efficiently providing a superset
-                  of XPutImageScaled functionality.
-                </para></listitem>
-              </itemizedlist>
-            </para>
-          </sect3>
-          <sect3><title>Scaling with an XCopyAreaScaled Extension</title>
-            <para>
-              As noted in the previous section, because XCopyAreaScaled
-              provides a superset of the functionality provided by
-              XPutImageScaled, we will consider this extension instead.
-            </para>
-            <para>
-              First, XCopyAreaScaled would provide for RGB scaling
-              between pixmaps (i.e., on-screen or off-screen areas of
-              memory that reside on the video card).  Unlike the X Video
-              Extension, which writes into an overlay plane,
-              XCopyAreaScaled would write into the non-overlay areas of
-              the screen.  Key points to consider are as follows:
-              <itemizedlist>
-                <listitem><para>
-                  Because different planes are involved, the two scaling
-                  operations are usually implemented in hardware
-                  differently, so an XCopyAreaScaled extension could be
-                  added in a manner that would neither conflict with nor
-                  interact with the X Video extension in any way.
-                </para></listitem>
-                <listitem><para>
-                  The XCopyAreaScaled extension provides new
-                  functionality that the X Video Extension does not
-                  provide.  Based on anecdotal feedback, we believe that
-                  many people outside the DMX and VNC communities would
-                  be excited about this extension.
-                </para></listitem>
-                <listitem><para>
-                  The main drawback to this extension is that it is new
-                  and needs to be implemented at the driver level in
-                  XFree86 for each video card to be supported.  At the
-                  present time, it is more likely that the X Video
-                  Extension will be implemented for a particular piece
-                  hardware because the X Video extension has multimedia
-                  uses.  However, over time, we would expect the
-                  XCopyAreaScaled extension to be implemented along with
-                  the X Video extension, especially if it becomes
-                  popular.
-                </para></listitem>
-                <listitem><para>
-                  Another drawback is that not all modern cards provide
-                  support for a simple scaled blit operation.  However,
-                  these cards usually do provide a 3D pipeline which
-                  could be used to provide this functionality in a
-                  manner that is transparent to the client application
-                  that is using the XCopyAreaScaled extension.  However,
-                  this implementation pathway would make this extension
-                  somewhat more difficult to implement on certain cards.
-                </para></listitem>
-              </itemizedlist>
-            </para>
-          </sect3>
-          <sect3><title>Scaling with OpenGL</title>
-            <para>
-              Another general solution to the scaling problem is to use
-              the texture scaling found in all 3D hardware.  This
-              ability is already exposed through OpenGL and can be
-              exploited by clients without X server modification (i.e.,
-              other than the ability to support OpenGL).  An application
-              using OpenGL would transmit the non-scaled image to the X
-              server as a texture, and would then display a single
-              non-transformed rect using that texture.  This also works
-              around the single overlay problem with the X Video
-              Extension as well as the need to implement additional
-              scaled primitive extensions.
-            </para>
-            <para>
-              The downside is that most OpenGL implementations require
-              power of 2 texture sizes and this can be very wasteful of
-              memory if, for example, the application needs to scale a
-              1025x1025 image, which would require a 2048x2048 texture
-              area (even a 640x480 image would require a 1024x512
-              texture).  Another downside is that some OpenGL
-              implementations have a limited about of texture memory and
-              cannot handle textures that are very large.  For example,
-              they might limit the texture size to 1024x1024.
-            </para>
-          </sect3>
-        </sect2>
-        <sect2><title>Application-transparent Scaling for DMX
-          </title><sect3><title>Back-end Scaling Without Disconnect/Reconnect</title>
-            <para>
-              VNC does scaling on the client side (in the
-              <command>vncviewer</command> application).  Implementing a similar
-              solution for DMX would require support in the back-end X
-              servers and, therefore, is not a general solution.
-            </para>
-            <para>
-              XFree86 already implements some support for "scaling" that
-              could be used with DMX: if, in the XF86Config file,
-              multiple Modes are listed in the Display Subsection of the
-              Screen Section, then pressing Ctrl-Alt-Plus and
-              Ctrl-Alt-Minus can be used to iterate through the listed
-              modes.  The display dimensions will change to the
-              dimensions in the Modes line, but the logical dimensions
-              of the X server (i.e., the dimensions that Xdmx knows
-              about) will not change.
-            </para>
-            <para>
-              Further, the dimensions of the XFree86 display are under
-              software control (via the XFree86-VidModeExtension), so
-              the Xdmx server could change the screen dimensions on a
-              per-display basis, thereby scaling the information on part
-              of that display.
-            </para>
-            <para>
-              However, this scaling appears to have limited use.  For
-              example, assume a 4 by 4 display wall consisting of 16
-              1280x1024 displays.  If all of the back-end servers were
-              simultaneously configured to display 640x480, the left
-              hand corner of each display would be magnified, but the
-              composite result would be unreadable.  Magnifying one
-              display at a time could be usable, but could have limited
-              utility, since the result would still be no larger than a
-              single display.
-            </para>
-          </sect3>
-          <sect3><title>Back-end Scaling With Disconnect/Reconnect</title>
-            <para>
-              Disconnect and reconnect features are not currently
-              supported in DMX, but are scheduled to be implemented in
-              the future.  These features, combined with the
-              XFree86-VidModeExtension Extension, would allow an
-              application to do the following:
-              <itemizedlist>
-                <listitem><para>
-                  Disconnect a specific back-end server (via the DMX
-                  Extension),
-                </para></listitem>
-                <listitem><para>
-                  reconfigure the XFree86 back-end server resolution,
-                  and
-                </para></listitem>
-                <listitem><para>
-                  reconnect the back-end server to DMX -- at a new
-                  origin with the new screen resolution.
-                </para></listitem>
-              </itemizedlist>
-            </para>
-            <para>
-              For example, consider a display wall consisting of 16
-              1280x1024 displays with a total resolution of 5120x4096.
-              All of the screens could be disconnected, repositioned,
-              and reconnected each at a resolution of 640x480.  The
-              total resolution of the display wall would be 2560x1920,
-              allowing a view of a selected area approximately
-              one-fourth of the size of the DMX display.  This change
-              would be completely application independent (except,
-              perhaps, for a DMX-aware window manager).  When work at
-              the increased resolution was completed, the back-end
-              servers could be disconnected, reconfigured, and
-              reconnected for the original 5120x4096 view.
-            </para>
-            <para>
-              Support for this type of scaling can be implemented in a
-              DMX-aware X11 client assuming the DMX server support
-              arbitrary disconnect and reconnect semantics.  Because
-              this application cannot be written before
-              disconnect/reconnect is implemented, this solution will
-              not be discussed further in this paper.
-            </para>
-          </sect3>
-          <sect3><title>Server-side Scaling</title>
-            <para>
-              In earlier versions of DMX, a frame buffer was maintained
-              on the server side, and XPutImage was used to move the
-              information from the server to the client (similar to some
-              early VNC implementations).  The use of a server-side
-              frame buffer would allow the server to do scaling, but is
-              not a recommended solution because of overall performance
-              issues and server-side memory issues (i.e., the frame
-              buffer would be very large for large display walls).
-            </para>
-            <para>
-              Exploration of this path is not recommended.
-            </para>
-          </sect3>
-        </sect2>
-        <sect2><title>XCreateScaledWindow API</title>
-          <para>
-            The implementation of X Video Extension in DMX, and the use
-            of XvPutImage by applications requiring scaling requires
-            significant changes in DMX Further, XvPutImage is,
-            essentially a scaled blit, and it is only useful for
-            applications which are already using (or can be modified to
-            use) XPutImage.  Therefore, a more general API will be
-            discussed as another possibility.
-          </para>
-          <para>
-            X applications typically create windows with the
-            XCreateWindow call.  A new extension could provide an
-            XCreateScaledWindow call that could be used in place of the
-            XCreateWindow call and be otherwise transparent to the
-            application.  This would allow applications, even those that
-            do not depend on XPutImage, to take advantage of window
-            scaling.  In this section we describe how the call would
-            work, what transparency it provides, and how to solve the
-            potential problems that transparency creates.
-          </para>
-          <sect3><title>XCreateWindow</title>
-            <para>
-              The XCreateWindow call takes width and height as
-              parameters.  An XCreateScaledWindow call could take all
-              the same parameters, with the addition of a scaling factor.
-            </para>
-          </sect3>
-          <sect3><title>XSetWindowAttributes</title>
-            <para>
-              An X11 window has several attributes that would have to be
-              scaled:
-              <itemizedlist>
-                <listitem><para>Background and border pixmaps</para></listitem>
-                <listitem><para>Border width</para></listitem>
-                <listitem><para>Cursor</para></listitem>
-              </itemizedlist>
-            </para>
-          </sect3>
-          <sect3><title>XGetWindowAttributes, XGetGeometry</title>
-            <para>
-              For transparency, calls that query the window attributes
-              should return unscaled information.  This suggests that
-              all unscaled pixmaps and window attributes should be
-              cached.
-            </para>
-            <para>
-              Unfortunately, a window manager requires the scaled
-              geometry to properly decorate the window.  The X server
-              can probably determine which client is acting as the
-              window manager (e.g., because that client will select
-              events that are used exclusively by the window manager).
-              However, other Scaled Window Extension aware clients may
-              also need to determine the scaled geometry.  Therefore, at
-              least two additional extension calls should be
-              implemented: XGetScaledWindowAttributes and
-              XGetScaledGeometry.
-            </para>
-          </sect3>
-          <sect3><title>Popup and Child window positions</title>
-            <para>
-              Some applications may position popup and child windows
-              based on an unscaled notion of the main window geometry.
-              In this case, additional modifications to the client would
-              be required.
-            </para>
-          </sect3>
-          <sect3><title>Events</title>
-            <para>
-              Most events (e.g., for mouse motion) return information
-              about the coordinates at which the even occurred.  These
-              coordinates would have to be modified so that unscaled
-              values were presented to the client.
-            </para>
-          </sect3>
-          <sect3><title>Implementation</title>
-            <para>
-              There are many implementation issues, some of which are
-              similar to the issues involved in implementing the X Video
-              Extension for DMX.  The window contents must be scaled,
-              either by performing all operations to a frame buffer and
-              then writing the image to the display (perhaps using
-              hardware scaling support), or by modifying all of the
-              various drawing operations to perform scaling.  Because of
-              the complexity involved, the frame buffer option is
-              recommended.
-            </para>
-          </sect3>
-        </sect2>
-      </sect1>
-
-      <sect1><title>Conclusion and Recommendations
-        </title><para>
-          We recommend a three phase implementation strategy, based on
-          how an application could be written to take advantage of
-          scaling:
-          <orderedlist>
-            <listitem>
-              <para>
-                The XCopyAreaScaled extension should be implemented, since
-                this is the ideal solution for applications like VNC, and
-                since making use of this extension will require minimal
-                changes to applications that already use XPutImage or
-                XCopyArea.
-              </para>
-              <para>
-                The initial implementation work would include the design
-                of the X protocol extension, writing this up in the
-                usual format for extension documentation, implementation
-                of the protocol transport pieces in XFree86,
-                implementation of a software fall-back in XFree86 and
-                DMX, one example hardware implementation for XFree86,
-                and implementation of support for this extension in DMX.
-              </para>
-              <para>
-                We suggest implementing the extension first on the ATI
-                Radeon cards.  However, since these cards do not provide
-                a 2D scaled blit primitive, the implementation would
-                have to make use of the 3D texture engine to emulate a
-                scaled blit.  This is recommended, since other modern
-                graphics cards also do not provide a simple 2D scaled
-                blit operation and an example of the more difficult
-                implementation pathway would be helpful to others.
-              </para>
-            </listitem>
-            <listitem>
-              <para>
-                Until XCopyAreaScaled is widely supported, applications
-                that require scaling will have to fall back to another
-                scaling method.  We suggest OpenGL as the first fall-back
-                method because it is widely available and supported by
-                DMX.
-              </para>
-              <para>
-                A project centered around OpenGL-based scaling would
-                implement this scaling in VNC as an example.  This work
-                would include re-writing the <command>vncviewer</command>
-                rendering engine to cache a master copy of the desktop
-                image for all operations.
-              </para>
-            </listitem>
-            <listitem>
-              <para>
-                Since OpenGL is not implemented everywhere, and may not
-                provide hardware-assisted performance in every
-                implementation, an application that requires scaling
-                should also fall back to using the X Video Extension.
-              </para>
-              <para>
-                This project would add support for the X Video Extension
-                to DMX and would add support to VNC to take advantage of
-                this extension without introducing artifacts.  This
-                would require modifying the <command>vncviewer</command> rendering
-                engine to cache a master copy of the desktop image for
-                all operations.  This project should also add support
-                for the RGB format to at least one XFree86 driver (e.g.,
-                ATI Radeon).
-              </para>
-              <para>
-                The X Video Extension is one of the few popular
-                extensions that DMX does not support.  We recommend
-                implementing the X Video Extension even if scaling is
-                the specific goal of that work.
-              </para>
-            </listitem>
-          </orderedlist>
-        </para>
-        <para>
-          We do <emphasis>not</emphasis> recommend implementation of the
-          XCreateScaledWindow extension because of the complexity
-          involved.  We do <emphasis>not</emphasis> recommend implementation of the
-          XPutImageScaled extension because it requires the same amount
-          of work as the XCopyAreaScaled extension, but provides less
-          functionality.  Further, server-side scaling with a large
-          frame buffer is <emphasis>not</emphasis> recommended because of the
-          performance implications.
-        </para>
-        <para>
-          The back-end scaling, especially with disconnect/reconnect
-          support should be explored in the future after
-          disconnect/reconnect is implemented, but not at the present
-          time.
-        </para>
-      </sect1>
-
-  </article>
-  <!-- Local Variables: -->
-  <!-- fill-column: 72  -->
-  <!-- End:             -->
diff --git a/hw/dmx/doxygen/Makefile.am b/hw/dmx/doxygen/Makefile.am
deleted file mode 100644
index fe159df..0000000
--- a/hw/dmx/doxygen/Makefile.am
+++ /dev/null
@@ -1,36 +0,0 @@
-#  Copyright 2005 Red Hat, Inc.
-#
-#  Permission to use, copy, modify, distribute, and sell this software
-#  and its documentation for any purpose is hereby granted without
-#  fee, provided that the above copyright notice appear in all copies
-#  and that both that copyright notice and this permission notice
-#  appear in supporting documentation, and that the name of Red Hat
-#  not be used in advertising or publicity pertaining to distribution
-#  of the software without specific, written prior permission.  Red
-#  Hat makes no representations about the suitability of this software
-#  for any purpose.  It is provided "as is" without express or implied
-#  warranty.
-#
-#  RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-#  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
-#  NO EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
-#  CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
-#  OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
-#  NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
-#  CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-if ENABLE_DEVEL_DOCS
-if HAVE_DOXYGEN
-
-# Developers documentation is not installed
-noinst_DATA = html/index.html
-dist_noinst_DATA = doxygen.conf.in footer.html
-
-html/index.html:
-	$(AM_V_GEN)$(DOXYGEN) doxygen.conf
-
-clean-local:
-	$(AM_V_at)rm -fr html/
-
-endif HAVE_DOXYGEN
-endif ENABLE_DEVEL_DOCS
diff --git a/hw/dmx/doxygen/Makefile.in b/hw/dmx/doxygen/Makefile.in
deleted file mode 100644
index 4d1b772..0000000
--- a/hw/dmx/doxygen/Makefile.in
+++ /dev/null
@@ -1,728 +0,0 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
-
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-#  Copyright 2005 Red Hat, Inc.
-#
-#  Permission to use, copy, modify, distribute, and sell this software
-#  and its documentation for any purpose is hereby granted without
-#  fee, provided that the above copyright notice appear in all copies
-#  and that both that copyright notice and this permission notice
-#  appear in supporting documentation, and that the name of Red Hat
-#  not be used in advertising or publicity pertaining to distribution
-#  of the software without specific, written prior permission.  Red
-#  Hat makes no representations about the suitability of this software
-#  for any purpose.  It is provided "as is" without express or implied
-#  warranty.
-#
-#  RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-#  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
-#  NO EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
-#  CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
-#  OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
-#  NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
-#  CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-VPATH = @srcdir@
-am__is_gnu_make = { \
-  if test -z '$(MAKELEVEL)'; then \
-    false; \
-  elif test -n '$(MAKE_HOST)'; then \
-    true; \
-  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
-    true; \
-  else \
-    false; \
-  fi; \
-}
-am__make_running_with_option = \
-  case $${target_option-} in \
-      ?) ;; \
-      *) echo "am__make_running_with_option: internal error: invalid" \
-              "target option '$${target_option-}' specified" >&2; \
-         exit 1;; \
-  esac; \
-  has_opt=no; \
-  sane_makeflags=$$MAKEFLAGS; \
-  if $(am__is_gnu_make); then \
-    sane_makeflags=$$MFLAGS; \
-  else \
-    case $$MAKEFLAGS in \
-      *\\[\ \	]*) \
-        bs=\\; \
-        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
-          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
-    esac; \
-  fi; \
-  skip_next=no; \
-  strip_trailopt () \
-  { \
-    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
-  }; \
-  for flg in $$sane_makeflags; do \
-    test $$skip_next = yes && { skip_next=no; continue; }; \
-    case $$flg in \
-      *=*|--*) continue;; \
-        -*I) strip_trailopt 'I'; skip_next=yes;; \
-      -*I?*) strip_trailopt 'I';; \
-        -*O) strip_trailopt 'O'; skip_next=yes;; \
-      -*O?*) strip_trailopt 'O';; \
-        -*l) strip_trailopt 'l'; skip_next=yes;; \
-      -*l?*) strip_trailopt 'l';; \
-      -[dEDm]) skip_next=yes;; \
-      -[JT]) skip_next=yes;; \
-    esac; \
-    case $$flg in \
-      *$$target_option*) has_opt=yes; break;; \
-    esac; \
-  done; \
-  test $$has_opt = yes
-am__make_dryrun = (target_option=n; $(am__make_running_with_option))
-am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-subdir = hw/dmx/doxygen
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \
-	$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \
-	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
-	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
-	$(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-	$(ACLOCAL_M4)
-DIST_COMMON = $(srcdir)/Makefile.am $(am__dist_noinst_DATA_DIST) \
-	$(am__DIST_COMMON)
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
-	$(top_builddir)/include/xorg-server.h \
-	$(top_builddir)/include/dix-config.h \
-	$(top_builddir)/include/xorg-config.h \
-	$(top_builddir)/include/xkb-config.h \
-	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
-	$(top_builddir)/include/version-config.h
-CONFIG_CLEAN_FILES = doxygen.conf
-CONFIG_CLEAN_VPATH_FILES =
-AM_V_P = $(am__v_P_@AM_V@)
-am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
-am__v_P_0 = false
-am__v_P_1 = :
-AM_V_GEN = $(am__v_GEN_@AM_V@)
-am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo "  GEN     " $@;
-am__v_GEN_1 = 
-AM_V_at = $(am__v_at_@AM_V@)
-am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
-am__v_at_0 = @
-am__v_at_1 = 
-SOURCES =
-DIST_SOURCES =
-am__can_run_installinfo = \
-  case $$AM_UPDATE_INFO_DIR in \
-    n|no|NO) false;; \
-    *) (install-info --version) >/dev/null 2>&1;; \
-  esac
-am__dist_noinst_DATA_DIST = doxygen.conf.in footer.html
-DATA = $(dist_noinst_DATA) $(noinst_DATA)
-am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
-am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/doxygen.conf.in
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
-ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
-AMTAR = @AMTAR@
-AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
-APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@
-APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@
-APP_MAN_DIR = @APP_MAN_DIR@
-APP_MAN_SUFFIX = @APP_MAN_SUFFIX@
-AR = @AR@
-AS = @AS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-BASE_CFLAGS = @BASE_CFLAGS@
-BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
-BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
-BUNDLE_VERSION = @BUNDLE_VERSION@
-BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
-CC = @CC@
-CCAS = @CCAS@
-CCASDEPMODE = @CCASDEPMODE@
-CCASFLAGS = @CCASFLAGS@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CHANGELOG_CMD = @CHANGELOG_CMD@
-COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CWARNFLAGS = @CWARNFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DBUS_CFLAGS = @DBUS_CFLAGS@
-DBUS_LIBS = @DBUS_LIBS@
-DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@
-DEFAULT_LOGDIR = @DEFAULT_LOGDIR@
-DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@
-DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@
-DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@
-DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DGA_CFLAGS = @DGA_CFLAGS@
-DGA_LIBS = @DGA_LIBS@
-DIX_CFLAGS = @DIX_CFLAGS@
-DIX_LIB = @DIX_LIB@
-DLLTOOL = @DLLTOOL@
-DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
-DOT = @DOT@
-DOXYGEN = @DOXYGEN@
-DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
-DRI2PROTO_LIBS = @DRI2PROTO_LIBS@
-DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@
-DRI3PROTO_LIBS = @DRI3PROTO_LIBS@
-DRIVER_MAN_DIR = @DRIVER_MAN_DIR@
-DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
-DRI_DRIVER_PATH = @DRI_DRIVER_PATH@
-DSYMUTIL = @DSYMUTIL@
-DTRACE = @DTRACE@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-FILE_MAN_DIR = @FILE_MAN_DIR@
-FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
-FONT100DPIDIR = @FONT100DPIDIR@
-FONT75DPIDIR = @FONT75DPIDIR@
-FONTMISCDIR = @FONTMISCDIR@
-FONTOTFDIR = @FONTOTFDIR@
-FONTROOTDIR = @FONTROOTDIR@
-FONTTTFDIR = @FONTTTFDIR@
-FONTTYPE1DIR = @FONTTYPE1DIR@
-FOP = @FOP@
-GBM_CFLAGS = @GBM_CFLAGS@
-GBM_LIBS = @GBM_LIBS@
-GLAMOR_CFLAGS = @GLAMOR_CFLAGS@
-GLAMOR_LIBS = @GLAMOR_LIBS@
-GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@
-GLX_DEFINES = @GLX_DEFINES@
-GLX_SYS_LIBS = @GLX_SYS_LIBS@
-GL_CFLAGS = @GL_CFLAGS@
-GL_LIBS = @GL_LIBS@
-GREP = @GREP@
-HAL_CFLAGS = @HAL_CFLAGS@
-HAL_LIBS = @HAL_LIBS@
-HAVE_DOT = @HAVE_DOT@
-INSTALL = @INSTALL@
-INSTALL_CMD = @INSTALL_CMD@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-KDRIVE_CFLAGS = @KDRIVE_CFLAGS@
-KDRIVE_INCS = @KDRIVE_INCS@
-KDRIVE_LIBS = @KDRIVE_LIBS@
-KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@
-KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@
-KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@
-KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@
-KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@
-KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@
-KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@
-LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@
-LEX = @LEX@
-LEXLIB = @LEXLIB@
-LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
-LIBDRM_CFLAGS = @LIBDRM_CFLAGS@
-LIBDRM_LIBS = @LIBDRM_LIBS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@
-LIBSHA1_LIBS = @LIBSHA1_LIBS@
-LIBTOOL = @LIBTOOL@
-LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
-LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
-LIB_MAN_DIR = @LIB_MAN_DIR@
-LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
-MAIN_LIB = @MAIN_LIB@
-MAKEINFO = @MAKEINFO@
-MANIFEST_TOOL = @MANIFEST_TOOL@
-MAN_SUBSTS = @MAN_SUBSTS@
-MISC_MAN_DIR = @MISC_MAN_DIR@
-MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
-MKDIR_P = @MKDIR_P@
-NM = @NM@
-NMEDIT = @NMEDIT@
-OBJC = @OBJC@
-OBJCCLD = @OBJCCLD@
-OBJCDEPMODE = @OBJCDEPMODE@
-OBJCFLAGS = @OBJCFLAGS@
-OBJCLINK = @OBJCLINK@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
-OPENSSL_LIBS = @OPENSSL_LIBS@
-OS_LIB = @OS_LIB@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@
-PCIACCESS_LIBS = @PCIACCESS_LIBS@
-PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@
-PIXMAN_CFLAGS = @PIXMAN_CFLAGS@
-PIXMAN_LIBS = @PIXMAN_LIBS@
-PKG_CONFIG = @PKG_CONFIG@
-PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
-PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
-PROJECTROOT = @PROJECTROOT@
-PTHREAD_CC = @PTHREAD_CC@
-PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
-PTHREAD_LIBS = @PTHREAD_LIBS@
-PYTHON3 = @PYTHON3@
-RANLIB = @RANLIB@
-RAWCPP = @RAWCPP@
-RAWCPPFLAGS = @RAWCPPFLAGS@
-RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
-SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
-SED = @SED@
-SELINUX_CFLAGS = @SELINUX_CFLAGS@
-SELINUX_LIBS = @SELINUX_LIBS@
-SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@
-SET_MAKE = @SET_MAKE@
-SHA1_CFLAGS = @SHA1_CFLAGS@
-SHA1_LIBS = @SHA1_LIBS@
-SHELL = @SHELL@
-SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@
-STRICT_CFLAGS = @STRICT_CFLAGS@
-STRIP = @STRIP@
-STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@
-SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@
-SYSCONFDIR = @SYSCONFDIR@
-SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@
-SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@
-TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@
-UDEV_CFLAGS = @UDEV_CFLAGS@
-UDEV_LIBS = @UDEV_LIBS@
-UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
-VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
-VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
-WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
-WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
-WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
-XCONFIGDIR = @XCONFIGDIR@
-XCONFIGFILE = @XCONFIGFILE@
-XDMCP_CFLAGS = @XDMCP_CFLAGS@
-XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
-XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
-XEPHYR_INCS = @XEPHYR_INCS@
-XEPHYR_LIBS = @XEPHYR_LIBS@
-XF86CONFIGDIR = @XF86CONFIGDIR@
-XF86CONFIGFILE = @XF86CONFIGFILE@
-XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@
-XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@
-XKB_COMPILED_DIR = @XKB_COMPILED_DIR@
-XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@
-XKB_DFLT_MODEL = @XKB_DFLT_MODEL@
-XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@
-XKB_DFLT_RULES = @XKB_DFLT_RULES@
-XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@
-XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@
-XLIB_CFLAGS = @XLIB_CFLAGS@
-XLIB_LIBS = @XLIB_LIBS@
-XMLTO = @XMLTO@
-XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@
-XNESTMODULES_LIBS = @XNESTMODULES_LIBS@
-XNEST_LIBS = @XNEST_LIBS@
-XNEST_SYS_LIBS = @XNEST_SYS_LIBS@
-XORG_CFLAGS = @XORG_CFLAGS@
-XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@
-XORG_INCS = @XORG_INCS@
-XORG_LIBS = @XORG_LIBS@
-XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@
-XORG_MAN_PAGE = @XORG_MAN_PAGE@
-XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@
-XORG_MODULES_LIBS = @XORG_MODULES_LIBS@
-XORG_OS_SUBDIR = @XORG_OS_SUBDIR@
-XORG_SGML_PATH = @XORG_SGML_PATH@
-XORG_SYS_LIBS = @XORG_SYS_LIBS@
-XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@
-XPBPROXY_LIBS = @XPBPROXY_LIBS@
-XQUARTZ_LIBS = @XQUARTZ_LIBS@
-XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
-XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
-XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
-XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
-XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
-XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@
-XSERVER_LIBS = @XSERVER_LIBS@
-XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@
-XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
-XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
-XSLTPROC = @XSLTPROC@
-XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
-XVFB_LIBS = @XVFB_LIBS@
-XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
-XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
-XWINMODULES_LIBS = @XWINMODULES_LIBS@
-XWIN_LIBS = @XWIN_LIBS@
-XWIN_SERVER_NAME = @XWIN_SERVER_NAME@
-XWIN_SYS_LIBS = @XWIN_SYS_LIBS@
-YACC = @YACC@
-YFLAGS = @YFLAGS@
-abi_ansic = @abi_ansic@
-abi_extension = @abi_extension@
-abi_videodrv = @abi_videodrv@
-abi_xinput = @abi_xinput@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_AR = @ac_ct_AR@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-ax_pthread_config = @ax_pthread_config@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-driverdir = @driverdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-extdir = @extdir@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-logdir = @logdir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-moduledir = @moduledir@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-runstatedir = @runstatedir@
-sbindir = @sbindir@
-sdkdir = @sdkdir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-symbol_visibility = @symbol_visibility@
-sysconfdir = @sysconfdir@
-sysconfigdir = @sysconfigdir@
-target_alias = @target_alias@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-
-# Developers documentation is not installed
-@ENABLE_DEVEL_DOCS_TRUE@@HAVE_DOXYGEN_TRUE@noinst_DATA = html/index.html
-@ENABLE_DEVEL_DOCS_TRUE@@HAVE_DOXYGEN_TRUE@dist_noinst_DATA = doxygen.conf.in footer.html
-all: all-am
-
-.SUFFIXES:
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
-	@for dep in $?; do \
-	  case '$(am__configure_deps)' in \
-	    *$$dep*) \
-	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
-	        && { if test -f $@; then exit 0; else break; fi; }; \
-	      exit 1;; \
-	  esac; \
-	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/dmx/doxygen/Makefile'; \
-	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --foreign hw/dmx/doxygen/Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	@case '$?' in \
-	  *config.status*) \
-	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
-	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
-	esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure:  $(am__configure_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-doxygen.conf: $(top_builddir)/config.status $(srcdir)/doxygen.conf.in
-	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-
-mostlyclean-libtool:
-	-rm -f *.lo
-
-clean-libtool:
-	-rm -rf .libs _libs
-tags TAGS:
-
-ctags CTAGS:
-
-cscope cscopelist:
-
-
-distdir: $(BUILT_SOURCES)
-	$(MAKE) $(AM_MAKEFLAGS) distdir-am
-
-distdir-am: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	list='$(DISTFILES)'; \
-	  dist_files=`for file in $$list; do echo $$file; done | \
-	  sed -e "s|^$$srcdirstrip/||;t" \
-	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
-	case $$dist_files in \
-	  */*) $(MKDIR_P) `echo "$$dist_files" | \
-			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
-			   sort -u` ;; \
-	esac; \
-	for file in $$dist_files; do \
-	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  if test -d $$d/$$file; then \
-	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
-	    if test -d "$(distdir)/$$file"; then \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
-	  else \
-	    test -f "$(distdir)/$$file" \
-	    || cp -p $$d/$$file "$(distdir)/$$file" \
-	    || exit 1; \
-	  fi; \
-	done
-check-am: all-am
-check: check-am
-all-am: Makefile $(DATA)
-installdirs:
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
-	if test -z '$(STRIP)'; then \
-	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	      install; \
-	else \
-	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
-	fi
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
-	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
-	@echo "This command is intended for maintainers to use"
-	@echo "it deletes files that may require special tools to rebuild."
-@ENABLE_DEVEL_DOCS_FALSE@clean-local:
-@HAVE_DOXYGEN_FALSE@clean-local:
-clean: clean-am
-
-clean-am: clean-generic clean-libtool clean-local mostlyclean-am
-
-distclean: distclean-am
-	-rm -f Makefile
-distclean-am: clean-am distclean-generic
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am:
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
-	-rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am:
-
-.MAKE: install-am install-strip
-
-.PHONY: all all-am check check-am clean clean-generic clean-libtool \
-	clean-local cscopelist-am ctags-am distclean distclean-generic \
-	distclean-libtool distdir dvi dvi-am html html-am info info-am \
-	install install-am install-data install-data-am install-dvi \
-	install-dvi-am install-exec install-exec-am install-html \
-	install-html-am install-info install-info-am install-man \
-	install-pdf install-pdf-am install-ps install-ps-am \
-	install-strip installcheck installcheck-am installdirs \
-	maintainer-clean maintainer-clean-generic mostlyclean \
-	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-	tags-am uninstall uninstall-am
-
-.PRECIOUS: Makefile
-
-
-@ENABLE_DEVEL_DOCS_TRUE@@HAVE_DOXYGEN_TRUE@html/index.html:
-@ENABLE_DEVEL_DOCS_TRUE@@HAVE_DOXYGEN_TRUE@	$(AM_V_GEN)$(DOXYGEN) doxygen.conf
-
-@ENABLE_DEVEL_DOCS_TRUE@@HAVE_DOXYGEN_TRUE@clean-local:
-@ENABLE_DEVEL_DOCS_TRUE@@HAVE_DOXYGEN_TRUE@	$(AM_V_at)rm -fr html/
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/hw/dmx/doxygen/doxygen.conf.in b/hw/dmx/doxygen/doxygen.conf.in
deleted file mode 100644
index d709c9b..0000000
--- a/hw/dmx/doxygen/doxygen.conf.in
+++ /dev/null
@@ -1,2400 +0,0 @@
-# Doxyfile 1.8.10
-
-# This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project.
-#
-# All text after a double hash (##) is considered a comment and is placed in
-# front of the TAG it is preceding.
-#
-# All text after a single hash (#) is considered a comment and will be ignored.
-# The format is:
-# TAG = value [value, ...]
-# For lists, items can also be appended using:
-# TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (\" \").
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-
-# This tag specifies the encoding used for all characters in the config file
-# that follow. The default is UTF-8 which is also the encoding used for all text
-# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv
-# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv
-# for the list of possible encodings.
-# The default value is: UTF-8.
-
-DOXYFILE_ENCODING      = UTF-8
-
-# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by
-# double-quotes, unless you are using Doxywizard) that should identify the
-# project for which the documentation is generated. This name is used in the
-# title of most generated pages and in a few other places.
-# The default value is: My Project.
-
-PROJECT_NAME           = "Distributed Multihead X"
-
-# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
-# could be handy for archiving the generated documentation or if some version
-# control system is used.
-
-PROJECT_NUMBER         = "@PACKAGE_VERSION@"
-
-# Using the PROJECT_BRIEF tag one can provide an optional one line description
-# for a project that appears at the top of each page and should give viewer a
-# quick idea about the purpose of the project. Keep the description short.
-
-PROJECT_BRIEF          =
-
-# With the PROJECT_LOGO tag one can specify a logo or an icon that is included
-# in the documentation. The maximum height of the logo should not exceed 55
-# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
-# the logo to the output directory.
-
-PROJECT_LOGO           =
-
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
-# into which the generated documentation will be written. If a relative path is
-# entered, it will be relative to the location where doxygen was started. If
-# left blank the current directory will be used.
-
-OUTPUT_DIRECTORY       =
-
-# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
-# directories (in 2 levels) under the output directory of each output format and
-# will distribute the generated files over these directories. Enabling this
-# option can be useful when feeding doxygen a huge amount of source files, where
-# putting all generated files in the same directory would otherwise causes
-# performance problems for the file system.
-# The default value is: NO.
-
-CREATE_SUBDIRS         = NO
-
-# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII
-# characters to appear in the names of generated files. If set to NO, non-ASCII
-# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode
-# U+3044.
-# The default value is: NO.
-
-ALLOW_UNICODE_NAMES    = NO
-
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all
-# documentation generated by doxygen is written. Doxygen will use this
-# information to generate all constant output in the proper language.
-# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese,
-# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States),
-# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian,
-# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages),
-# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian,
-# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian,
-# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish,
-# Ukrainian and Vietnamese.
-# The default value is: English.
-
-OUTPUT_LANGUAGE        = English
-
-# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member
-# descriptions after the members that are listed in the file and class
-# documentation (similar to Javadoc). Set to NO to disable this.
-# The default value is: YES.
-
-BRIEF_MEMBER_DESC      = YES
-
-# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief
-# description of a member or function before the detailed description
-#
-# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
-# brief descriptions will be completely suppressed.
-# The default value is: YES.
-
-REPEAT_BRIEF           = YES
-
-# This tag implements a quasi-intelligent brief description abbreviator that is
-# used to form the text in various listings. Each string in this list, if found
-# as the leading text of the brief description, will be stripped from the text
-# and the result, after processing the whole list, is used as the annotated
-# text. Otherwise, the brief description is used as-is. If left blank, the
-# following values are used ($name is automatically replaced with the name of
-# the entity):The $name class, The $name widget, The $name file, is, provides,
-# specifies, contains, represents, a, an and the.
-
-ABBREVIATE_BRIEF       =
-
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
-# doxygen will generate a detailed section even if there is only a brief
-# description.
-# The default value is: NO.
-
-ALWAYS_DETAILED_SEC    = YES
-
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
-# inherited members of a class in the documentation of that class as if those
-# members were ordinary class members. Constructors, destructors and assignment
-# operators of the base classes will not be shown.
-# The default value is: NO.
-
-INLINE_INHERITED_MEMB  = NO
-
-# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path
-# before files name in the file list and in the header files. If set to NO the
-# shortest path that makes the file name unique will be used
-# The default value is: YES.
-
-FULL_PATH_NAMES        = NO
-
-# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.
-# Stripping is only done if one of the specified strings matches the left-hand
-# part of the path. The tag can be used to show relative paths in the file list.
-# If left blank the directory from which doxygen is run is used as the path to
-# strip.
-#
-# Note that you can specify absolute paths here, but also relative paths, which
-# will be relative from the directory where doxygen is started.
-# This tag requires that the tag FULL_PATH_NAMES is set to YES.
-
-STRIP_FROM_PATH        =
-
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
-# path mentioned in the documentation of a class, which tells the reader which
-# header file to include in order to use a class. If left blank only the name of
-# the header file containing the class definition is used. Otherwise one should
-# specify the list of include paths that are normally passed to the compiler
-# using the -I flag.
-
-STRIP_FROM_INC_PATH    =
-
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
-# less readable) file names. This can be useful is your file systems doesn't
-# support long names like on DOS, Mac, or CD-ROM.
-# The default value is: NO.
-
-SHORT_NAMES            = NO
-
-# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the
-# first line (until the first dot) of a Javadoc-style comment as the brief
-# description. If set to NO, the Javadoc-style will behave just like regular Qt-
-# style comments (thus requiring an explicit @brief command for a brief
-# description.)
-# The default value is: NO.
-
-JAVADOC_AUTOBRIEF      = NO
-
-# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
-# line (until the first dot) of a Qt-style comment as the brief description. If
-# set to NO, the Qt-style will behave just like regular Qt-style comments (thus
-# requiring an explicit \brief command for a brief description.)
-# The default value is: NO.
-
-QT_AUTOBRIEF           = NO
-
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a
-# multi-line C++ special comment block (i.e. a block of //! or /// comments) as
-# a brief description. This used to be the default behavior. The new default is
-# to treat a multi-line C++ comment block as a detailed description. Set this
-# tag to YES if you prefer the old behavior instead.
-#
-# Note that setting this tag to YES also means that rational rose comments are
-# not recognized any more.
-# The default value is: NO.
-
-MULTILINE_CPP_IS_BRIEF = NO
-
-# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the
-# documentation from any documented member that it re-implements.
-# The default value is: YES.
-
-INHERIT_DOCS           = YES
-
-# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new
-# page for each member. If set to NO, the documentation of a member will be part
-# of the file/class/namespace that contains it.
-# The default value is: NO.
-
-SEPARATE_MEMBER_PAGES  = NO
-
-# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen
-# uses this value to replace tabs by spaces in code fragments.
-# Minimum value: 1, maximum value: 16, default value: 4.
-
-TAB_SIZE               = 8
-
-# This tag can be used to specify a number of aliases that act as commands in
-# the documentation. An alias has the form:
-# name=value
-# For example adding
-# "sideeffect=@par Side Effects:\n"
-# will allow you to put the command \sideeffect (or @sideeffect) in the
-# documentation, which will result in a user-defined paragraph with heading
-# "Side Effects:". You can put \n's in the value part of an alias to insert
-# newlines.
-
-ALIASES                =
-
-# This tag can be used to specify a number of word-keyword mappings (TCL only).
-# A mapping has the form "name=value". For example adding "class=itcl::class"
-# will allow you to use the command class in the itcl::class meaning.
-
-TCL_SUBST              =
-
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
-# only. Doxygen will then generate output that is more tailored for C. For
-# instance, some of the names that are used will be different. The list of all
-# members will be omitted, etc.
-# The default value is: NO.
-
-OPTIMIZE_OUTPUT_FOR_C  = YES
-
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or
-# Python sources only. Doxygen will then generate output that is more tailored
-# for that language. For instance, namespaces will be presented as packages,
-# qualified scopes will look different, etc.
-# The default value is: NO.
-
-OPTIMIZE_OUTPUT_JAVA   = NO
-
-# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
-# sources. Doxygen will then generate output that is tailored for Fortran.
-# The default value is: NO.
-
-OPTIMIZE_FOR_FORTRAN   = NO
-
-# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
-# sources. Doxygen will then generate output that is tailored for VHDL.
-# The default value is: NO.
-
-OPTIMIZE_OUTPUT_VHDL   = NO
-
-# Doxygen selects the parser to use depending on the extension of the files it
-# parses. With this tag you can assign which parser to use for a given
-# extension. Doxygen has a built-in mapping, but you can override or extend it
-# using this tag. The format is ext=language, where ext is a file extension, and
-# language is one of the parsers supported by doxygen: IDL, Java, Javascript,
-# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran:
-# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran:
-# Fortran. In the later case the parser tries to guess whether the code is fixed
-# or free formatted code, this is the default for Fortran type files), VHDL. For
-# instance to make doxygen treat .inc files as Fortran files (default is PHP),
-# and .f files as C (default is Fortran), use: inc=Fortran f=C.
-#
-# Note: For files without extension you can use no_extension as a placeholder.
-#
-# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
-# the files are not read by doxygen.
-
-EXTENSION_MAPPING      =
-
-# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
-# according to the Markdown format, which allows for more readable
-# documentation. See http://daringfireball.net/projects/markdown/ for details.
-# The output of markdown processing is further processed by doxygen, so you can
-# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
-# case of backward compatibilities issues.
-# The default value is: YES.
-
-MARKDOWN_SUPPORT       = YES
-
-# When enabled doxygen tries to link words that correspond to documented
-# classes, or namespaces to their corresponding documentation. Such a link can
-# be prevented in individual cases by putting a % sign in front of the word or
-# globally by setting AUTOLINK_SUPPORT to NO.
-# The default value is: YES.
-
-AUTOLINK_SUPPORT       = YES
-
-# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
-# to include (a tag file for) the STL sources as input, then you should set this
-# tag to YES in order to let doxygen match functions declarations and
-# definitions whose arguments contain STL classes (e.g. func(std::string);
-# versus func(std::string) {}). This also make the inheritance and collaboration
-# diagrams that involve STL classes more complete and accurate.
-# The default value is: NO.
-
-BUILTIN_STL_SUPPORT    = NO
-
-# If you use Microsoft's C++/CLI language, you should set this option to YES to
-# enable parsing support.
-# The default value is: NO.
-
-CPP_CLI_SUPPORT        = NO
-
-# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
-# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
-# will parse them like normal C++ but will assume all classes use public instead
-# of private inheritance when no explicit protection keyword is present.
-# The default value is: NO.
-
-SIP_SUPPORT            = NO
-
-# For Microsoft's IDL there are propget and propput attributes to indicate
-# getter and setter methods for a property. Setting this option to YES will make
-# doxygen to replace the get and set methods by a property in the documentation.
-# This will only work if the methods are indeed getting or setting a simple
-# type. If this is not the case, or you want to show the methods anyway, you
-# should set this option to NO.
-# The default value is: YES.
-
-IDL_PROPERTY_SUPPORT   = YES
-
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
-# tag is set to YES then doxygen will reuse the documentation of the first
-# member in the group (if any) for the other members of the group. By default
-# all members of a group must be documented explicitly.
-# The default value is: NO.
-
-DISTRIBUTE_GROUP_DOC   = NO
-
-# If one adds a struct or class to a group and this option is enabled, then also
-# any nested class or struct is added to the same group. By default this option
-# is disabled and one has to add nested compounds explicitly via \ingroup.
-# The default value is: NO.
-
-GROUP_NESTED_COMPOUNDS = NO
-
-# Set the SUBGROUPING tag to YES to allow class member groups of the same type
-# (for instance a group of public functions) to be put as a subgroup of that
-# type (e.g. under the Public Functions section). Set it to NO to prevent
-# subgrouping. Alternatively, this can be done per class using the
-# \nosubgrouping command.
-# The default value is: YES.
-
-SUBGROUPING            = YES
-
-# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions
-# are shown inside the group in which they are included (e.g. using \ingroup)
-# instead of on a separate page (for HTML and Man pages) or section (for LaTeX
-# and RTF).
-#
-# Note that this feature does not work in combination with
-# SEPARATE_MEMBER_PAGES.
-# The default value is: NO.
-
-INLINE_GROUPED_CLASSES = NO
-
-# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions
-# with only public data fields or simple typedef fields will be shown inline in
-# the documentation of the scope in which they are defined (i.e. file,
-# namespace, or group documentation), provided this scope is documented. If set
-# to NO, structs, classes, and unions are shown on a separate page (for HTML and
-# Man pages) or section (for LaTeX and RTF).
-# The default value is: NO.
-
-INLINE_SIMPLE_STRUCTS  = NO
-
-# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or
-# enum is documented as struct, union, or enum with the name of the typedef. So
-# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
-# with name TypeT. When disabled the typedef will appear as a member of a file,
-# namespace, or class. And the struct will be named TypeS. This can typically be
-# useful for C code in case the coding convention dictates that all compound
-# types are typedef'ed and only the typedef is referenced, never the tag name.
-# The default value is: NO.
-
-TYPEDEF_HIDES_STRUCT   = NO
-
-# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This
-# cache is used to resolve symbols given their name and scope. Since this can be
-# an expensive process and often the same symbol appears multiple times in the
-# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small
-# doxygen will become slower. If the cache is too large, memory is wasted. The
-# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range
-# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536
-# symbols. At the end of a run doxygen will report the cache usage and suggest
-# the optimal cache size from a speed point of view.
-# Minimum value: 0, maximum value: 9, default value: 0.
-
-LOOKUP_CACHE_SIZE      = 0
-
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-
-# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in
-# documentation are documented, even if no documentation was available. Private
-# class members and static file members will be hidden unless the
-# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES.
-# Note: This will also disable the warnings about undocumented members that are
-# normally produced when WARNINGS is set to YES.
-# The default value is: NO.
-
-EXTRACT_ALL            = YES
-
-# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will
-# be included in the documentation.
-# The default value is: NO.
-
-EXTRACT_PRIVATE        = NO
-
-# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal
-# scope will be included in the documentation.
-# The default value is: NO.
-
-EXTRACT_PACKAGE        = NO
-
-# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be
-# included in the documentation.
-# The default value is: NO.
-
-EXTRACT_STATIC         = YES
-
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined
-# locally in source files will be included in the documentation. If set to NO,
-# only classes defined in header files are included. Does not have any effect
-# for Java sources.
-# The default value is: YES.
-
-EXTRACT_LOCAL_CLASSES  = YES
-
-# This flag is only useful for Objective-C code. If set to YES, local methods,
-# which are defined in the implementation section but not in the interface are
-# included in the documentation. If set to NO, only methods in the interface are
-# included.
-# The default value is: NO.
-
-EXTRACT_LOCAL_METHODS  = NO
-
-# If this flag is set to YES, the members of anonymous namespaces will be
-# extracted and appear in the documentation as a namespace called
-# 'anonymous_namespace{file}', where file will be replaced with the base name of
-# the file that contains the anonymous namespace. By default anonymous namespace
-# are hidden.
-# The default value is: NO.
-
-EXTRACT_ANON_NSPACES   = NO
-
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
-# undocumented members inside documented classes or files. If set to NO these
-# members will be included in the various overviews, but no documentation
-# section is generated. This option has no effect if EXTRACT_ALL is enabled.
-# The default value is: NO.
-
-HIDE_UNDOC_MEMBERS     = YES
-
-# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all
-# undocumented classes that are normally visible in the class hierarchy. If set
-# to NO, these classes will be included in the various overviews. This option
-# has no effect if EXTRACT_ALL is enabled.
-# The default value is: NO.
-
-HIDE_UNDOC_CLASSES     = NO
-
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
-# (class|struct|union) declarations. If set to NO, these declarations will be
-# included in the documentation.
-# The default value is: NO.
-
-HIDE_FRIEND_COMPOUNDS  = NO
-
-# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any
-# documentation blocks found inside the body of a function. If set to NO, these
-# blocks will be appended to the function's detailed documentation block.
-# The default value is: NO.
-
-HIDE_IN_BODY_DOCS      = NO
-
-# The INTERNAL_DOCS tag determines if documentation that is typed after a
-# \internal command is included. If the tag is set to NO then the documentation
-# will be excluded. Set it to YES to include the internal documentation.
-# The default value is: NO.
-
-INTERNAL_DOCS          = NO
-
-# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file
-# names in lower-case letters. If set to YES, upper-case letters are also
-# allowed. This is useful if you have classes or files whose names only differ
-# in case and if your file system supports case sensitive file names. Windows
-# and Mac users are advised to set this option to NO.
-# The default value is: system dependent.
-
-CASE_SENSE_NAMES       = YES
-
-# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with
-# their full class and namespace scopes in the documentation. If set to YES, the
-# scope will be hidden.
-# The default value is: NO.
-
-HIDE_SCOPE_NAMES       = NO
-
-# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will
-# append additional text to a page's title, such as Class Reference. If set to
-# YES the compound reference will be hidden.
-# The default value is: NO.
-
-HIDE_COMPOUND_REFERENCE= NO
-
-# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of
-# the files that are included by a file in the documentation of that file.
-# The default value is: YES.
-
-SHOW_INCLUDE_FILES     = YES
-
-# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each
-# grouped member an include statement to the documentation, telling the reader
-# which file to include in order to use the member.
-# The default value is: NO.
-
-SHOW_GROUPED_MEMB_INC  = NO
-
-# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include
-# files with double quotes in the documentation rather than with sharp brackets.
-# The default value is: NO.
-
-FORCE_LOCAL_INCLUDES   = NO
-
-# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the
-# documentation for inline members.
-# The default value is: YES.
-
-INLINE_INFO            = YES
-
-# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the
-# (detailed) documentation of file and class members alphabetically by member
-# name. If set to NO, the members will appear in declaration order.
-# The default value is: YES.
-
-SORT_MEMBER_DOCS       = YES
-
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief
-# descriptions of file, namespace and class members alphabetically by member
-# name. If set to NO, the members will appear in declaration order. Note that
-# this will also influence the order of the classes in the class list.
-# The default value is: NO.
-
-SORT_BRIEF_DOCS        = NO
-
-# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the
-# (brief and detailed) documentation of class members so that constructors and
-# destructors are listed first. If set to NO the constructors will appear in the
-# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS.
-# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief
-# member documentation.
-# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting
-# detailed member documentation.
-# The default value is: NO.
-
-SORT_MEMBERS_CTORS_1ST = NO
-
-# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy
-# of group names into alphabetical order. If set to NO the group names will
-# appear in their defined order.
-# The default value is: NO.
-
-SORT_GROUP_NAMES       = NO
-
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by
-# fully-qualified names, including namespaces. If set to NO, the class list will
-# be sorted only by class name, not including the namespace part.
-# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
-# Note: This option applies only to the class list, not to the alphabetical
-# list.
-# The default value is: NO.
-
-SORT_BY_SCOPE_NAME     = NO
-
-# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper
-# type resolution of all parameters of a function it will reject a match between
-# the prototype and the implementation of a member function even if there is
-# only one candidate or it is obvious which candidate to choose by doing a
-# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still
-# accept a match between prototype and implementation in such cases.
-# The default value is: NO.
-
-STRICT_PROTO_MATCHING  = NO
-
-# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo
-# list. This list is created by putting \todo commands in the documentation.
-# The default value is: YES.
-
-GENERATE_TODOLIST      = YES
-
-# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test
-# list. This list is created by putting \test commands in the documentation.
-# The default value is: YES.
-
-GENERATE_TESTLIST      = YES
-
-# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug
-# list. This list is created by putting \bug commands in the documentation.
-# The default value is: YES.
-
-GENERATE_BUGLIST       = YES
-
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO)
-# the deprecated list. This list is created by putting \deprecated commands in
-# the documentation.
-# The default value is: YES.
-
-GENERATE_DEPRECATEDLIST= YES
-
-# The ENABLED_SECTIONS tag can be used to enable conditional documentation
-# sections, marked by \if <section_label> ... \endif and \cond <section_label>
-# ... \endcond blocks.
-
-ENABLED_SECTIONS       =
-
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the
-# initial value of a variable or macro / define can have for it to appear in the
-# documentation. If the initializer consists of more lines than specified here
-# it will be hidden. Use a value of 0 to hide initializers completely. The
-# appearance of the value of individual variables and macros / defines can be
-# controlled using \showinitializer or \hideinitializer command in the
-# documentation regardless of this setting.
-# Minimum value: 0, maximum value: 10000, default value: 30.
-
-MAX_INITIALIZER_LINES  = 30
-
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at
-# the bottom of the documentation of classes and structs. If set to YES, the
-# list will mention the files that were used to generate the documentation.
-# The default value is: YES.
-
-SHOW_USED_FILES        = YES
-
-# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This
-# will remove the Files entry from the Quick Index and from the Folder Tree View
-# (if specified).
-# The default value is: YES.
-
-SHOW_FILES             = YES
-
-# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces
-# page. This will remove the Namespaces entry from the Quick Index and from the
-# Folder Tree View (if specified).
-# The default value is: YES.
-
-SHOW_NAMESPACES        = YES
-
-# The FILE_VERSION_FILTER tag can be used to specify a program or script that
-# doxygen should invoke to get the current version for each file (typically from
-# the version control system). Doxygen will invoke the program by executing (via
-# popen()) the command command input-file, where command is the value of the
-# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided
-# by doxygen. Whatever the program writes to standard output is used as the file
-# version. For an example see the documentation.
-
-FILE_VERSION_FILTER    =
-
-# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
-# by doxygen. The layout file controls the global structure of the generated
-# output files in an output format independent way. To create the layout file
-# that represents doxygen's defaults, run doxygen with the -l option. You can
-# optionally specify a file name after the option, if omitted DoxygenLayout.xml
-# will be used as the name of the layout file.
-#
-# Note that if you run doxygen from a directory containing a file called
-# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
-# tag is left empty.
-
-LAYOUT_FILE            =
-
-# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
-# the reference definitions. This must be a list of .bib files. The .bib
-# extension is automatically appended if omitted. This requires the bibtex tool
-# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info.
-# For LaTeX the style of the bibliography can be controlled using
-# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
-# search path. See also \cite for info how to create references.
-
-CITE_BIB_FILES         =
-
-#---------------------------------------------------------------------------
-# Configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-
-# The QUIET tag can be used to turn on/off the messages that are generated to
-# standard output by doxygen. If QUIET is set to YES this implies that the
-# messages are off.
-# The default value is: NO.
-
-QUIET                  = YES
-
-# The WARNINGS tag can be used to turn on/off the warning messages that are
-# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES
-# this implies that the warnings are on.
-#
-# Tip: Turn warnings on while writing the documentation.
-# The default value is: YES.
-
-WARNINGS               = YES
-
-# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate
-# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag
-# will automatically be disabled.
-# The default value is: YES.
-
-WARN_IF_UNDOCUMENTED   = YES
-
-# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for
-# potential errors in the documentation, such as not documenting some parameters
-# in a documented function, or documenting parameters that don't exist or using
-# markup commands wrongly.
-# The default value is: YES.
-
-WARN_IF_DOC_ERROR      = YES
-
-# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
-# are documented, but have no documentation for their parameters or return
-# value. If set to NO, doxygen will only warn about wrong or incomplete
-# parameter documentation, but not about the absence of documentation.
-# The default value is: NO.
-
-WARN_NO_PARAMDOC       = NO
-
-# The WARN_FORMAT tag determines the format of the warning messages that doxygen
-# can produce. The string should contain the $file, $line, and $text tags, which
-# will be replaced by the file and line number from which the warning originated
-# and the warning text. Optionally the format may contain $version, which will
-# be replaced by the version of the file (if it could be obtained via
-# FILE_VERSION_FILTER)
-# The default value is: $file:$line: $text.
-
-WARN_FORMAT            = "$file:$line: $text"
-
-# The WARN_LOGFILE tag can be used to specify a file to which warning and error
-# messages should be written. If left blank the output is written to standard
-# error (stderr).
-
-WARN_LOGFILE           =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the input files
-#---------------------------------------------------------------------------
-
-# The INPUT tag is used to specify the files and/or directories that contain
-# documented source files. You may enter file names like myfile.cpp or
-# directories like /usr/src/myproject. Separate the files or directories with
-# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
-# Note: If this tag is empty the current directory is searched.
-
-INPUT                  = @srcdir@/.. \
-                         @srcdir@/../input \
-                         @srcdir@/../config
-
-# This tag can be used to specify the character encoding of the source files
-# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
-# libiconv (or the iconv built into libc) for the transcoding. See the libiconv
-# documentation (see: http://www.gnu.org/software/libiconv) for the list of
-# possible encodings.
-# The default value is: UTF-8.
-
-INPUT_ENCODING         = UTF-8
-
-# If the value of the INPUT tag contains directories, you can use the
-# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and
-# *.h) to filter out the source-files in the directories.
-#
-# Note that for custom extensions or not directly supported extensions you also
-# need to set EXTENSION_MAPPING for the extension otherwise the files are not
-# read by doxygen.
-#
-# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp,
-# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h,
-# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc,
-# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd,
-# *.vhdl, *.ucf, *.qsf, *.as and *.js.
-
-FILE_PATTERNS          =
-
-# The RECURSIVE tag can be used to specify whether or not subdirectories should
-# be searched for input files as well.
-# The default value is: NO.
-
-RECURSIVE              = NO
-
-# The EXCLUDE tag can be used to specify files and/or directories that should be
-# excluded from the INPUT source files. This way you can easily exclude a
-# subdirectory from a directory tree whose root is specified with the INPUT tag.
-#
-# Note that relative paths are relative to the directory from which doxygen is
-# run.
-
-EXCLUDE                = @srcdir@/../config/parser.c \
-                         @srcdir@/../config/parser.h \
-                         @srcdir@/../config/scanner.c
-
-# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
-# directories that are symbolic links (a Unix file system feature) are excluded
-# from the input.
-# The default value is: NO.
-
-EXCLUDE_SYMLINKS       = YES
-
-# If the value of the INPUT tag contains directories, you can use the
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
-# certain files from those directories.
-#
-# Note that the wildcards are matched against the file with absolute path, so to
-# exclude all test directories for example use the pattern */test/*
-
-EXCLUDE_PATTERNS       = atKeynames.h \
-                         Canvas*.*
-
-# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
-# (namespaces, classes, functions, etc.) that should be excluded from the
-# output. The symbol name can be a fully qualified name, a word, or if the
-# wildcard * is used, a substring. Examples: ANamespace, AClass,
-# AClass::ANamespace, ANamespace::*Test
-#
-# Note that the wildcards are matched against the file with absolute path, so to
-# exclude all test directories use the pattern */test/*
-
-EXCLUDE_SYMBOLS        =
-
-# The EXAMPLE_PATH tag can be used to specify one or more files or directories
-# that contain example code fragments that are included (see the \include
-# command).
-
-EXAMPLE_PATH           =
-
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
-# *.h) to filter out the source-files in the directories. If left blank all
-# files are included.
-
-EXAMPLE_PATTERNS       =
-
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
-# searched for input files to be used with the \include or \dontinclude commands
-# irrespective of the value of the RECURSIVE tag.
-# The default value is: NO.
-
-EXAMPLE_RECURSIVE      = NO
-
-# The IMAGE_PATH tag can be used to specify one or more files or directories
-# that contain images that are to be included in the documentation (see the
-# \image command).
-
-IMAGE_PATH             =
-
-# The INPUT_FILTER tag can be used to specify a program that doxygen should
-# invoke to filter for each input file. Doxygen will invoke the filter program
-# by executing (via popen()) the command:
-#
-# <filter> <input-file>
-#
-# where <filter> is the value of the INPUT_FILTER tag, and <input-file> is the
-# name of an input file. Doxygen will then use the output that the filter
-# program writes to standard output. If FILTER_PATTERNS is specified, this tag
-# will be ignored.
-#
-# Note that the filter must not add or remove lines; it is applied before the
-# code is scanned, but not when the output code is generated. If lines are added
-# or removed, the anchors will not be placed correctly.
-
-INPUT_FILTER           =
-
-# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
-# basis. Doxygen will compare the file name with each pattern and apply the
-# filter if there is a match. The filters are a list of the form: pattern=filter
-# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how
-# filters are used. If the FILTER_PATTERNS tag is empty or if none of the
-# patterns match the file name, INPUT_FILTER is applied.
-
-FILTER_PATTERNS        =
-
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
-# INPUT_FILTER) will also be used to filter the input files that are used for
-# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES).
-# The default value is: NO.
-
-FILTER_SOURCE_FILES    = NO
-
-# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
-# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and
-# it is also possible to disable source filtering for a specific pattern using
-# *.ext= (so without naming a filter).
-# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
-
-FILTER_SOURCE_PATTERNS =
-
-# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that
-# is part of the input, its contents will be placed on the main page
-# (index.html). This can be useful if you have a project on for instance GitHub
-# and want to reuse the introduction page also for the doxygen output.
-
-USE_MDFILE_AS_MAINPAGE =
-
-#---------------------------------------------------------------------------
-# Configuration options related to source browsing
-#---------------------------------------------------------------------------
-
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will be
-# generated. Documented entities will be cross-referenced with these sources.
-#
-# Note: To get rid of all source code in the generated output, make sure that
-# also VERBATIM_HEADERS is set to NO.
-# The default value is: NO.
-
-SOURCE_BROWSER         = NO
-
-# Setting the INLINE_SOURCES tag to YES will include the body of functions,
-# classes and enums directly into the documentation.
-# The default value is: NO.
-
-INLINE_SOURCES         = NO
-
-# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any
-# special comment blocks from generated source code fragments. Normal C, C++ and
-# Fortran comments will always remain visible.
-# The default value is: YES.
-
-STRIP_CODE_COMMENTS    = YES
-
-# If the REFERENCED_BY_RELATION tag is set to YES then for each documented
-# function all documented functions referencing it will be listed.
-# The default value is: NO.
-
-REFERENCED_BY_RELATION = YES
-
-# If the REFERENCES_RELATION tag is set to YES then for each documented function
-# all documented entities called/used by that function will be listed.
-# The default value is: NO.
-
-REFERENCES_RELATION    = YES
-
-# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set
-# to YES then the hyperlinks from functions in REFERENCES_RELATION and
-# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will
-# link to the documentation.
-# The default value is: YES.
-
-REFERENCES_LINK_SOURCE = YES
-
-# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the
-# source code will show a tooltip with additional information such as prototype,
-# brief description and links to the definition and documentation. Since this
-# will make the HTML file larger and loading of large files a bit slower, you
-# can opt to disable this feature.
-# The default value is: YES.
-# This tag requires that the tag SOURCE_BROWSER is set to YES.
-
-SOURCE_TOOLTIPS        = YES
-
-# If the USE_HTAGS tag is set to YES then the references to source code will
-# point to the HTML generated by the htags(1) tool instead of doxygen built-in
-# source browser. The htags tool is part of GNU's global source tagging system
-# (see http://www.gnu.org/software/global/global.html). You will need version
-# 4.8.6 or higher.
-#
-# To use it do the following:
-# - Install the latest version of global
-# - Enable SOURCE_BROWSER and USE_HTAGS in the config file
-# - Make sure the INPUT points to the root of the source tree
-# - Run doxygen as normal
-#
-# Doxygen will invoke htags (and that will in turn invoke gtags), so these
-# tools must be available from the command line (i.e. in the search path).
-#
-# The result: instead of the source browser generated by doxygen, the links to
-# source code will now point to the output of htags.
-# The default value is: NO.
-# This tag requires that the tag SOURCE_BROWSER is set to YES.
-
-USE_HTAGS              = NO
-
-# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a
-# verbatim copy of the header file for each class for which an include is
-# specified. Set to NO to disable this.
-# See also: Section \class.
-# The default value is: YES.
-
-VERBATIM_HEADERS       = YES
-
-#---------------------------------------------------------------------------
-# Configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all
-# compounds will be generated. Enable this if the project contains a lot of
-# classes, structs, unions or interfaces.
-# The default value is: YES.
-
-ALPHABETICAL_INDEX     = YES
-
-# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in
-# which the alphabetical index list will be split.
-# Minimum value: 1, maximum value: 20, default value: 5.
-# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
-
-COLS_IN_ALPHA_INDEX    = 5
-
-# In case all classes in a project start with a common prefix, all classes will
-# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag
-# can be used to specify a prefix (or a list of prefixes) that should be ignored
-# while generating the index headers.
-# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
-
-IGNORE_PREFIX          =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the HTML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output
-# The default value is: YES.
-
-GENERATE_HTML          = YES
-
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a
-# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
-# it.
-# The default directory is: html.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_OUTPUT            = html
-
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
-# generated HTML page (for example: .htm, .php, .asp).
-# The default value is: .html.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_FILE_EXTENSION    = .html
-
-# The HTML_HEADER tag can be used to specify a user-defined HTML header file for
-# each generated HTML page. If the tag is left blank doxygen will generate a
-# standard header.
-#
-# To get valid HTML the header file that includes any scripts and style sheets
-# that doxygen needs, which is dependent on the configuration options used (e.g.
-# the setting GENERATE_TREEVIEW). It is highly recommended to start with a
-# default header using
-# doxygen -w html new_header.html new_footer.html new_stylesheet.css
-# YourConfigFile
-# and then modify the file new_header.html. See also section "Doxygen usage"
-# for information on how to generate the default header that doxygen normally
-# uses.
-# Note: The header is subject to change so you typically have to regenerate the
-# default header when upgrading to a newer version of doxygen. For a description
-# of the possible markers and block names see the documentation.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_HEADER            =
-
-# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
-# generated HTML page. If the tag is left blank doxygen will generate a standard
-# footer. See HTML_HEADER for more information on how to generate a default
-# footer and what special commands can be used inside the footer. See also
-# section "Doxygen usage" for information on how to generate the default footer
-# that doxygen normally uses.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_FOOTER            = @srcdir@/footer.html
-
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
-# sheet that is used by each HTML page. It can be used to fine-tune the look of
-# the HTML output. If left blank doxygen will generate a default style sheet.
-# See also section "Doxygen usage" for information on how to generate the style
-# sheet that doxygen normally uses.
-# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as
-# it is more robust and this tag (HTML_STYLESHEET) will in the future become
-# obsolete.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_STYLESHEET        =
-
-# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined
-# cascading style sheets that are included after the standard style sheets
-# created by doxygen. Using this option one can overrule certain style aspects.
-# This is preferred over using HTML_STYLESHEET since it does not replace the
-# standard style sheet and is therefore more robust against future updates.
-# Doxygen will copy the style sheet files to the output directory.
-# Note: The order of the extra style sheet files is of importance (e.g. the last
-# style sheet in the list overrules the setting of the previous ones in the
-# list). For an example see the documentation.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_EXTRA_STYLESHEET  =
-
-# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
-# other source files which should be copied to the HTML output directory. Note
-# that these files will be copied to the base HTML output directory. Use the
-# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
-# files. In the HTML_STYLESHEET file, use the file name only. Also note that the
-# files will be copied as-is; there are no commands or markers available.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_EXTRA_FILES       =
-
-# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
-# will adjust the colors in the style sheet and background images according to
-# this color. Hue is specified as an angle on a colorwheel, see
-# http://en.wikipedia.org/wiki/Hue for more information. For instance the value
-# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
-# purple, and 360 is red again.
-# Minimum value: 0, maximum value: 359, default value: 220.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_COLORSTYLE_HUE    = 220
-
-# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors
-# in the HTML output. For a value of 0 the output will use grayscales only. A
-# value of 255 will produce the most vivid colors.
-# Minimum value: 0, maximum value: 255, default value: 100.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_COLORSTYLE_SAT    = 100
-
-# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the
-# luminance component of the colors in the HTML output. Values below 100
-# gradually make the output lighter, whereas values above 100 make the output
-# darker. The value divided by 100 is the actual gamma applied, so 80 represents
-# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not
-# change the gamma.
-# Minimum value: 40, maximum value: 240, default value: 80.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_COLORSTYLE_GAMMA  = 80
-
-# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
-# page will contain the date and time when the page was generated. Setting this
-# to YES can help to show when doxygen was last run and thus if the
-# documentation is up to date.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_TIMESTAMP         = NO
-
-# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
-# documentation will contain sections that can be hidden and shown after the
-# page has loaded.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_DYNAMIC_SECTIONS  = NO
-
-# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries
-# shown in the various tree structured indices initially; the user can expand
-# and collapse entries dynamically later on. Doxygen will expand the tree to
-# such a level that at most the specified number of entries are visible (unless
-# a fully collapsed tree already exceeds this amount). So setting the number of
-# entries 1 will produce a full collapsed tree by default. 0 is a special value
-# representing an infinite number of entries and will result in a full expanded
-# tree by default.
-# Minimum value: 0, maximum value: 9999, default value: 100.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_INDEX_NUM_ENTRIES = 100
-
-# If the GENERATE_DOCSET tag is set to YES, additional index files will be
-# generated that can be used as input for Apple's Xcode 3 integrated development
-# environment (see: http://developer.apple.com/tools/xcode/), introduced with
-# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a
-# Makefile in the HTML output directory. Running make will produce the docset in
-# that directory and running make install will install the docset in
-# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
-# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
-# for more information.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-GENERATE_DOCSET        = NO
-
-# This tag determines the name of the docset feed. A documentation feed provides
-# an umbrella under which multiple documentation sets from a single provider
-# (such as a company or product suite) can be grouped.
-# The default value is: Doxygen generated docs.
-# This tag requires that the tag GENERATE_DOCSET is set to YES.
-
-DOCSET_FEEDNAME        = "Doxygen generated docs"
-
-# This tag specifies a string that should uniquely identify the documentation
-# set bundle. This should be a reverse domain-name style string, e.g.
-# com.mycompany.MyDocSet. Doxygen will append .docset to the name.
-# The default value is: org.doxygen.Project.
-# This tag requires that the tag GENERATE_DOCSET is set to YES.
-
-DOCSET_BUNDLE_ID       = org.doxygen.Project
-
-# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify
-# the documentation publisher. This should be a reverse domain-name style
-# string, e.g. com.mycompany.MyDocSet.documentation.
-# The default value is: org.doxygen.Publisher.
-# This tag requires that the tag GENERATE_DOCSET is set to YES.
-
-DOCSET_PUBLISHER_ID    = org.doxygen.Publisher
-
-# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher.
-# The default value is: Publisher.
-# This tag requires that the tag GENERATE_DOCSET is set to YES.
-
-DOCSET_PUBLISHER_NAME  = Publisher
-
-# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
-# additional HTML index files: index.hhp, index.hhc, and index.hhk. The
-# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
-# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on
-# Windows.
-#
-# The HTML Help Workshop contains a compiler that can convert all HTML output
-# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML
-# files are now used as the Windows 98 help format, and will replace the old
-# Windows help format (.hlp) on all Windows platforms in the future. Compressed
-# HTML files also contain an index, a table of contents, and you can search for
-# words in the documentation. The HTML workshop also contains a viewer for
-# compressed HTML files.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-GENERATE_HTMLHELP      = NO
-
-# The CHM_FILE tag can be used to specify the file name of the resulting .chm
-# file. You can add a path in front of the file if the result should not be
-# written to the html output directory.
-# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-
-CHM_FILE               =
-
-# The HHC_LOCATION tag can be used to specify the location (absolute path
-# including file name) of the HTML help compiler (hhc.exe). If non-empty,
-# doxygen will try to run the HTML help compiler on the generated index.hhp.
-# The file has to be specified with full path.
-# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-
-HHC_LOCATION           =
-
-# The GENERATE_CHI flag controls if a separate .chi index file is generated
-# (YES) or that it should be included in the master .chm file (NO).
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-
-GENERATE_CHI           = NO
-
-# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc)
-# and project file content.
-# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-
-CHM_INDEX_ENCODING     =
-
-# The BINARY_TOC flag controls whether a binary table of contents is generated
-# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it
-# enables the Previous and Next buttons.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-
-BINARY_TOC             = NO
-
-# The TOC_EXPAND flag can be set to YES to add extra items for group members to
-# the table of contents of the HTML help documentation and to the tree view.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-
-TOC_EXPAND             = NO
-
-# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
-# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that
-# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help
-# (.qch) of the generated HTML documentation.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-GENERATE_QHP           = NO
-
-# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify
-# the file name of the resulting .qch file. The path specified is relative to
-# the HTML output folder.
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QCH_FILE               =
-
-# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
-# Project output. For more information please see Qt Help Project / Namespace
-# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).
-# The default value is: org.doxygen.Project.
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QHP_NAMESPACE          = org.doxygen.Project
-
-# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
-# Help Project output. For more information please see Qt Help Project / Virtual
-# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
-# folders).
-# The default value is: doc.
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QHP_VIRTUAL_FOLDER     = doc
-
-# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
-# filter to add. For more information please see Qt Help Project / Custom
-# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
-# filters).
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QHP_CUST_FILTER_NAME   =
-
-# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
-# custom filter to add. For more information please see Qt Help Project / Custom
-# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
-# filters).
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QHP_CUST_FILTER_ATTRS  =
-
-# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
-# project's filter section matches. Qt Help Project / Filter Attributes (see:
-# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QHP_SECT_FILTER_ATTRS  =
-
-# The QHG_LOCATION tag can be used to specify the location of Qt's
-# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the
-# generated .qhp file.
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QHG_LOCATION           =
-
-# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be
-# generated, together with the HTML files, they form an Eclipse help plugin. To
-# install this plugin and make it available under the help contents menu in
-# Eclipse, the contents of the directory containing the HTML and XML files needs
-# to be copied into the plugins directory of eclipse. The name of the directory
-# within the plugins directory should be the same as the ECLIPSE_DOC_ID value.
-# After copying Eclipse needs to be restarted before the help appears.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-GENERATE_ECLIPSEHELP   = NO
-
-# A unique identifier for the Eclipse help plugin. When installing the plugin
-# the directory name containing the HTML and XML files should also have this
-# name. Each documentation set should have its own identifier.
-# The default value is: org.doxygen.Project.
-# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES.
-
-ECLIPSE_DOC_ID         = org.doxygen.Project
-
-# If you want full control over the layout of the generated HTML pages it might
-# be necessary to disable the index and replace it with your own. The
-# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top
-# of each HTML page. A value of NO enables the index and the value YES disables
-# it. Since the tabs in the index contain the same information as the navigation
-# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-DISABLE_INDEX          = NO
-
-# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
-# structure should be generated to display hierarchical information. If the tag
-# value is set to YES, a side panel will be generated containing a tree-like
-# index structure (just like the one that is generated for HTML Help). For this
-# to work a browser that supports JavaScript, DHTML, CSS and frames is required
-# (i.e. any modern browser). Windows users are probably better off using the
-# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can
-# further fine-tune the look of the index. As an example, the default style
-# sheet generated by doxygen has an example that shows how to put an image at
-# the root of the tree instead of the PROJECT_NAME. Since the tree basically has
-# the same information as the tab index, you could consider setting
-# DISABLE_INDEX to YES when enabling this option.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-GENERATE_TREEVIEW      = YES
-
-# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that
-# doxygen will group on one line in the generated HTML documentation.
-#
-# Note that a value of 0 will completely suppress the enum values from appearing
-# in the overview section.
-# Minimum value: 0, maximum value: 20, default value: 4.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-ENUM_VALUES_PER_LINE   = 4
-
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used
-# to set the initial width (in pixels) of the frame in which the tree is shown.
-# Minimum value: 0, maximum value: 1500, default value: 250.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-TREEVIEW_WIDTH         = 250
-
-# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to
-# external symbols imported via tag files in a separate window.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-EXT_LINKS_IN_WINDOW    = NO
-
-# Use this tag to change the font size of LaTeX formulas included as images in
-# the HTML documentation. When you change the font size after a successful
-# doxygen run you need to manually remove any form_*.png images from the HTML
-# output directory to force them to be regenerated.
-# Minimum value: 8, maximum value: 50, default value: 10.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-FORMULA_FONTSIZE       = 10
-
-# Use the FORMULA_TRANPARENT tag to determine whether or not the images
-# generated for formulas are transparent PNGs. Transparent PNGs are not
-# supported properly for IE 6.0, but are supported on all modern browsers.
-#
-# Note that when changing this option you need to delete any form_*.png files in
-# the HTML output directory before the changes have effect.
-# The default value is: YES.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-FORMULA_TRANSPARENT    = YES
-
-# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
-# http://www.mathjax.org) which uses client side Javascript for the rendering
-# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX
-# installed or if you want to formulas look prettier in the HTML output. When
-# enabled you may also need to install MathJax separately and configure the path
-# to it using the MATHJAX_RELPATH option.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-USE_MATHJAX            = NO
-
-# When MathJax is enabled you can set the default output format to be used for
-# the MathJax output. See the MathJax site (see:
-# http://docs.mathjax.org/en/latest/output.html) for more details.
-# Possible values are: HTML-CSS (which is slower, but has the best
-# compatibility), NativeMML (i.e. MathML) and SVG.
-# The default value is: HTML-CSS.
-# This tag requires that the tag USE_MATHJAX is set to YES.
-
-MATHJAX_FORMAT         = HTML-CSS
-
-# When MathJax is enabled you need to specify the location relative to the HTML
-# output directory using the MATHJAX_RELPATH option. The destination directory
-# should contain the MathJax.js script. For instance, if the mathjax directory
-# is located at the same level as the HTML output directory, then
-# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
-# Content Delivery Network so you can quickly see the result without installing
-# MathJax. However, it is strongly recommended to install a local copy of
-# MathJax from http://www.mathjax.org before deployment.
-# The default value is: http://cdn.mathjax.org/mathjax/latest.
-# This tag requires that the tag USE_MATHJAX is set to YES.
-
-MATHJAX_RELPATH        = http://cdn.mathjax.org/mathjax/latest
-
-# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax
-# extension names that should be enabled during MathJax rendering. For example
-# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
-# This tag requires that the tag USE_MATHJAX is set to YES.
-
-MATHJAX_EXTENSIONS     =
-
-# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces
-# of code that will be used on startup of the MathJax code. See the MathJax site
-# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an
-# example see the documentation.
-# This tag requires that the tag USE_MATHJAX is set to YES.
-
-MATHJAX_CODEFILE       =
-
-# When the SEARCHENGINE tag is enabled doxygen will generate a search box for
-# the HTML output. The underlying search engine uses javascript and DHTML and
-# should work on any modern browser. Note that when using HTML help
-# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET)
-# there is already a search function so this one should typically be disabled.
-# For large projects the javascript based search engine can be slow, then
-# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to
-# search using the keyboard; to jump to the search box use <access key> + S
-# (what the <access key> is depends on the OS and browser, but it is typically
-# <CTRL>, <ALT>/<option>, or both). Inside the search box use the <cursor down
-# key> to jump into the search results window, the results can be navigated
-# using the <cursor keys>. Press <Enter> to select an item or <escape> to cancel
-# the search. The filter options can be selected when the cursor is inside the
-# search box by pressing <Shift>+<cursor down>. Also here use the <cursor keys>
-# to select a filter and <Enter> or <escape> to activate or cancel the filter
-# option.
-# The default value is: YES.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-SEARCHENGINE           = NO
-
-# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
-# implemented using a web server instead of a web client using Javascript. There
-# are two flavors of web server based searching depending on the EXTERNAL_SEARCH
-# setting. When disabled, doxygen will generate a PHP script for searching and
-# an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing
-# and searching needs to be provided by external tools. See the section
-# "External Indexing and Searching" for details.
-# The default value is: NO.
-# This tag requires that the tag SEARCHENGINE is set to YES.
-
-SERVER_BASED_SEARCH    = NO
-
-# When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP
-# script for searching. Instead the search results are written to an XML file
-# which needs to be processed by an external indexer. Doxygen will invoke an
-# external search engine pointed to by the SEARCHENGINE_URL option to obtain the
-# search results.
-#
-# Doxygen ships with an example indexer (doxyindexer) and search engine
-# (doxysearch.cgi) which are based on the open source search engine library
-# Xapian (see: http://xapian.org/).
-#
-# See the section "External Indexing and Searching" for details.
-# The default value is: NO.
-# This tag requires that the tag SEARCHENGINE is set to YES.
-
-EXTERNAL_SEARCH        = NO
-
-# The SEARCHENGINE_URL should point to a search engine hosted by a web server
-# which will return the search results when EXTERNAL_SEARCH is enabled.
-#
-# Doxygen ships with an example indexer (doxyindexer) and search engine
-# (doxysearch.cgi) which are based on the open source search engine library
-# Xapian (see: http://xapian.org/). See the section "External Indexing and
-# Searching" for details.
-# This tag requires that the tag SEARCHENGINE is set to YES.
-
-SEARCHENGINE_URL       =
-
-# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed
-# search data is written to a file for indexing by an external tool. With the
-# SEARCHDATA_FILE tag the name of this file can be specified.
-# The default file is: searchdata.xml.
-# This tag requires that the tag SEARCHENGINE is set to YES.
-
-SEARCHDATA_FILE        = searchdata.xml
-
-# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the
-# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is
-# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple
-# projects and redirect the results back to the right project.
-# This tag requires that the tag SEARCHENGINE is set to YES.
-
-EXTERNAL_SEARCH_ID     =
-
-# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen
-# projects other than the one defined by this configuration file, but that are
-# all added to the same external search index. Each project needs to have a
-# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id of
-# to a relative location where the documentation can be found. The format is:
-# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
-# This tag requires that the tag SEARCHENGINE is set to YES.
-
-EXTRA_SEARCH_MAPPINGS  =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output.
-# The default value is: YES.
-
-GENERATE_LATEX         = NO
-
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
-# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
-# it.
-# The default directory is: latex.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_OUTPUT           = latex
-
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
-# invoked.
-#
-# Note that when enabling USE_PDFLATEX this option is only used for generating
-# bitmaps for formulas in the HTML output, but not in the Makefile that is
-# written to the output directory.
-# The default file is: latex.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_CMD_NAME         = latex
-
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate
-# index for LaTeX.
-# The default file is: makeindex.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-MAKEINDEX_CMD_NAME     = makeindex
-
-# If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX
-# documents. This may be useful for small projects and may help to save some
-# trees in general.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-COMPACT_LATEX          = NO
-
-# The PAPER_TYPE tag can be used to set the paper type that is used by the
-# printer.
-# Possible values are: a4 (210 x 297 mm), letter (8.5 x 11 inches), legal (8.5 x
-# 14 inches) and executive (7.25 x 10.5 inches).
-# The default value is: a4.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-PAPER_TYPE             = a4wide
-
-# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names
-# that should be included in the LaTeX output. The package can be specified just
-# by its name or with the correct syntax as to be used with the LaTeX
-# \usepackage command. To get the times font for instance you can specify :
-# EXTRA_PACKAGES=times or EXTRA_PACKAGES={times}
-# To use the option intlimits with the amsmath package you can specify:
-# EXTRA_PACKAGES=[intlimits]{amsmath}
-# If left blank no extra packages will be included.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-EXTRA_PACKAGES         =
-
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for the
-# generated LaTeX document. The header should contain everything until the first
-# chapter. If it is left blank doxygen will generate a standard header. See
-# section "Doxygen usage" for information on how to let doxygen write the
-# default header to a separate file.
-#
-# Note: Only use a user-defined header if you know what you are doing! The
-# following commands have a special meaning inside the header: $title,
-# $datetime, $date, $doxygenversion, $projectname, $projectnumber,
-# $projectbrief, $projectlogo. Doxygen will replace $title with the empty
-# string, for the replacement values of the other commands the user is referred
-# to HTML_HEADER.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_HEADER           =
-
-# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the
-# generated LaTeX document. The footer should contain everything after the last
-# chapter. If it is left blank doxygen will generate a standard footer. See
-# LATEX_HEADER for more information on how to generate a default footer and what
-# special commands can be used inside the footer.
-#
-# Note: Only use a user-defined footer if you know what you are doing!
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_FOOTER           =
-
-# The LATEX_EXTRA_STYLESHEET tag can be used to specify additional user-defined
-# LaTeX style sheets that are included after the standard style sheets created
-# by doxygen. Using this option one can overrule certain style aspects. Doxygen
-# will copy the style sheet files to the output directory.
-# Note: The order of the extra style sheet files is of importance (e.g. the last
-# style sheet in the list overrules the setting of the previous ones in the
-# list).
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_EXTRA_STYLESHEET =
-
-# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or
-# other source files which should be copied to the LATEX_OUTPUT output
-# directory. Note that the files will be copied as-is; there are no commands or
-# markers available.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_EXTRA_FILES      =
-
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is
-# prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will
-# contain links (just like the HTML output) instead of page references. This
-# makes the output suitable for online browsing using a PDF viewer.
-# The default value is: YES.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-PDF_HYPERLINKS         = NO
-
-# If the USE_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate
-# the PDF file directly from the LaTeX files. Set this option to YES, to get a
-# higher quality PDF documentation.
-# The default value is: YES.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-USE_PDFLATEX           = NO
-
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \batchmode
-# command to the generated LaTeX files. This will instruct LaTeX to keep running
-# if errors occur, instead of asking the user for help. This option is also used
-# when generating formulas in HTML.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_BATCHMODE        = NO
-
-# If the LATEX_HIDE_INDICES tag is set to YES then doxygen will not include the
-# index chapters (such as File Index, Compound Index, etc.) in the output.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_HIDE_INDICES     = NO
-
-# If the LATEX_SOURCE_CODE tag is set to YES then doxygen will include source
-# code with syntax highlighting in the LaTeX output.
-#
-# Note that which sources are shown also depends on other settings such as
-# SOURCE_BROWSER.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_SOURCE_CODE      = NO
-
-# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
-# bibliography, e.g. plainnat, or ieeetr. See
-# http://en.wikipedia.org/wiki/BibTeX and \cite for more info.
-# The default value is: plain.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_BIB_STYLE        = plain
-
-# If the LATEX_TIMESTAMP tag is set to YES then the footer of each generated
-# page will contain the date and time when the page was generated. Setting this
-# to NO can help when comparing the output of multiple runs.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_TIMESTAMP        = NO
-
-#---------------------------------------------------------------------------
-# Configuration options related to the RTF output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_RTF tag is set to YES, doxygen will generate RTF output. The
-# RTF output is optimized for Word 97 and may not look too pretty with other RTF
-# readers/editors.
-# The default value is: NO.
-
-GENERATE_RTF           = NO
-
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. If a
-# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
-# it.
-# The default directory is: rtf.
-# This tag requires that the tag GENERATE_RTF is set to YES.
-
-RTF_OUTPUT             = rtf
-
-# If the COMPACT_RTF tag is set to YES, doxygen generates more compact RTF
-# documents. This may be useful for small projects and may help to save some
-# trees in general.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_RTF is set to YES.
-
-COMPACT_RTF            = NO
-
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated will
-# contain hyperlink fields. The RTF file will contain links (just like the HTML
-# output) instead of page references. This makes the output suitable for online
-# browsing using Word or some other Word compatible readers that support those
-# fields.
-#
-# Note: WordPad (write) and others do not support links.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_RTF is set to YES.
-
-RTF_HYPERLINKS         = NO
-
-# Load stylesheet definitions from file. Syntax is similar to doxygen's config
-# file, i.e. a series of assignments. You only have to provide replacements,
-# missing definitions are set to their default value.
-#
-# See also section "Doxygen usage" for information on how to generate the
-# default style sheet that doxygen normally uses.
-# This tag requires that the tag GENERATE_RTF is set to YES.
-
-RTF_STYLESHEET_FILE    =
-
-# Set optional variables used in the generation of an RTF document. Syntax is
-# similar to doxygen's config file. A template extensions file can be generated
-# using doxygen -e rtf extensionFile.
-# This tag requires that the tag GENERATE_RTF is set to YES.
-
-RTF_EXTENSIONS_FILE    =
-
-# If the RTF_SOURCE_CODE tag is set to YES then doxygen will include source code
-# with syntax highlighting in the RTF output.
-#
-# Note that which sources are shown also depends on other settings such as
-# SOURCE_BROWSER.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_RTF is set to YES.
-
-RTF_SOURCE_CODE        = NO
-
-#---------------------------------------------------------------------------
-# Configuration options related to the man page output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_MAN tag is set to YES, doxygen will generate man pages for
-# classes and files.
-# The default value is: NO.
-
-GENERATE_MAN           = NO
-
-# The MAN_OUTPUT tag is used to specify where the man pages will be put. If a
-# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
-# it. A directory man3 will be created inside the directory specified by
-# MAN_OUTPUT.
-# The default directory is: man.
-# This tag requires that the tag GENERATE_MAN is set to YES.
-
-MAN_OUTPUT             = man
-
-# The MAN_EXTENSION tag determines the extension that is added to the generated
-# man pages. In case the manual section does not start with a number, the number
-# 3 is prepended. The dot (.) at the beginning of the MAN_EXTENSION tag is
-# optional.
-# The default value is: .3.
-# This tag requires that the tag GENERATE_MAN is set to YES.
-
-MAN_EXTENSION          = .3
-
-# The MAN_SUBDIR tag determines the name of the directory created within
-# MAN_OUTPUT in which the man pages are placed. If defaults to man followed by
-# MAN_EXTENSION with the initial . removed.
-# This tag requires that the tag GENERATE_MAN is set to YES.
-
-MAN_SUBDIR             =
-
-# If the MAN_LINKS tag is set to YES and doxygen generates man output, then it
-# will generate one additional man file for each entity documented in the real
-# man page(s). These additional files only source the real man page, but without
-# them the man command would be unable to find the correct page.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_MAN is set to YES.
-
-MAN_LINKS              = NO
-
-#---------------------------------------------------------------------------
-# Configuration options related to the XML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_XML tag is set to YES, doxygen will generate an XML file that
-# captures the structure of the code including all documentation.
-# The default value is: NO.
-
-GENERATE_XML           = NO
-
-# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a
-# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
-# it.
-# The default directory is: xml.
-# This tag requires that the tag GENERATE_XML is set to YES.
-
-XML_OUTPUT             = xml
-
-# If the XML_PROGRAMLISTING tag is set to YES, doxygen will dump the program
-# listings (including syntax highlighting and cross-referencing information) to
-# the XML output. Note that enabling this will significantly increase the size
-# of the XML output.
-# The default value is: YES.
-# This tag requires that the tag GENERATE_XML is set to YES.
-
-XML_PROGRAMLISTING     = YES
-
-#---------------------------------------------------------------------------
-# Configuration options related to the DOCBOOK output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_DOCBOOK tag is set to YES, doxygen will generate Docbook files
-# that can be used to generate PDF.
-# The default value is: NO.
-
-GENERATE_DOCBOOK       = NO
-
-# The DOCBOOK_OUTPUT tag is used to specify where the Docbook pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be put in
-# front of it.
-# The default directory is: docbook.
-# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
-
-DOCBOOK_OUTPUT         = docbook
-
-# If the DOCBOOK_PROGRAMLISTING tag is set to YES, doxygen will include the
-# program listings (including syntax highlighting and cross-referencing
-# information) to the DOCBOOK output. Note that enabling this will significantly
-# increase the size of the DOCBOOK output.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
-
-DOCBOOK_PROGRAMLISTING = NO
-
-#---------------------------------------------------------------------------
-# Configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an
-# AutoGen Definitions (see http://autogen.sf.net) file that captures the
-# structure of the code including all documentation. Note that this feature is
-# still experimental and incomplete at the moment.
-# The default value is: NO.
-
-GENERATE_AUTOGEN_DEF   = NO
-
-#---------------------------------------------------------------------------
-# Configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_PERLMOD tag is set to YES, doxygen will generate a Perl module
-# file that captures the structure of the code including all documentation.
-#
-# Note that this feature is still experimental and incomplete at the moment.
-# The default value is: NO.
-
-GENERATE_PERLMOD       = NO
-
-# If the PERLMOD_LATEX tag is set to YES, doxygen will generate the necessary
-# Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI
-# output from the Perl module output.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-
-PERLMOD_LATEX          = NO
-
-# If the PERLMOD_PRETTY tag is set to YES, the Perl module output will be nicely
-# formatted so it can be parsed by a human reader. This is useful if you want to
-# understand what is going on. On the other hand, if this tag is set to NO, the
-# size of the Perl module output will be much smaller and Perl will parse it
-# just the same.
-# The default value is: YES.
-# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-
-PERLMOD_PRETTY         = YES
-
-# The names of the make variables in the generated doxyrules.make file are
-# prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. This is useful
-# so different doxyrules.make files included by the same Makefile don't
-# overwrite each other's variables.
-# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-
-PERLMOD_MAKEVAR_PREFIX =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-
-# If the ENABLE_PREPROCESSING tag is set to YES, doxygen will evaluate all
-# C-preprocessor directives found in the sources and include files.
-# The default value is: YES.
-
-ENABLE_PREPROCESSING   = YES
-
-# If the MACRO_EXPANSION tag is set to YES, doxygen will expand all macro names
-# in the source code. If set to NO, only conditional compilation will be
-# performed. Macro expansion can be done in a controlled way by setting
-# EXPAND_ONLY_PREDEF to YES.
-# The default value is: NO.
-# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-
-MACRO_EXPANSION        = NO
-
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then
-# the macro expansion is limited to the macros specified with the PREDEFINED and
-# EXPAND_AS_DEFINED tags.
-# The default value is: NO.
-# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-
-EXPAND_ONLY_PREDEF     = NO
-
-# If the SEARCH_INCLUDES tag is set to YES, the include files in the
-# INCLUDE_PATH will be searched if a #include is found.
-# The default value is: YES.
-# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-
-SEARCH_INCLUDES        = YES
-
-# The INCLUDE_PATH tag can be used to specify one or more directories that
-# contain include files that are not input files but should be processed by the
-# preprocessor.
-# This tag requires that the tag SEARCH_INCLUDES is set to YES.
-
-INCLUDE_PATH           =
-
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
-# patterns (like *.h and *.hpp) to filter out the header-files in the
-# directories. If left blank, the patterns specified with FILE_PATTERNS will be
-# used.
-# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-
-INCLUDE_FILE_PATTERNS  =
-
-# The PREDEFINED tag can be used to specify one or more macro names that are
-# defined before the preprocessor is started (similar to the -D option of e.g.
-# gcc). The argument of the tag is a list of macros of the form: name or
-# name=definition (no spaces). If the definition and the "=" are omitted, "=1"
-# is assumed. To prevent a macro definition from being undefined via #undef or
-# recursively expanded use the := operator instead of the = operator.
-# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-
-PREDEFINED             = SHAPE \
-                         RENDER \
-                         XKB \
-                         XINPUT
-
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
-# tag can be used to specify a list of macro names that should be expanded. The
-# macro definition that is found in the sources will be used. Use the PREDEFINED
-# tag if you want to use a different macro definition that overrules the
-# definition found in the source code.
-# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-
-EXPAND_AS_DEFINED      =
-
-# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will
-# remove all references to function-like macros that are alone on a line, have
-# an all uppercase name, and do not end with a semicolon. Such function macros
-# are typically used for boiler-plate code, and will confuse the parser if not
-# removed.
-# The default value is: YES.
-# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-
-SKIP_FUNCTION_MACROS   = YES
-
-#---------------------------------------------------------------------------
-# Configuration options related to external references
-#---------------------------------------------------------------------------
-
-# The TAGFILES tag can be used to specify one or more tag files. For each tag
-# file the location of the external documentation should be added. The format of
-# a tag file without this location is as follows:
-# TAGFILES = file1 file2 ...
-# Adding location for the tag files is done as follows:
-# TAGFILES = file1=loc1 "file2 = loc2" ...
-# where loc1 and loc2 can be relative or absolute paths or URLs. See the
-# section "Linking to external documentation" for more information about the use
-# of tag files.
-# Note: Each tag file must have a unique name (where the name does NOT include
-# the path). If a tag file is not located in the directory in which doxygen is
-# run, you must also specify the path to the tagfile here.
-
-TAGFILES               =
-
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create a
-# tag file that is based on the input files it reads. See section "Linking to
-# external documentation" for more information about the usage of tag files.
-
-GENERATE_TAGFILE       =
-
-# If the ALLEXTERNALS tag is set to YES, all external class will be listed in
-# the class index. If set to NO, only the inherited external classes will be
-# listed.
-# The default value is: NO.
-
-ALLEXTERNALS           = NO
-
-# If the EXTERNAL_GROUPS tag is set to YES, all external groups will be listed
-# in the modules index. If set to NO, only the current project's groups will be
-# listed.
-# The default value is: YES.
-
-EXTERNAL_GROUPS        = YES
-
-# If the EXTERNAL_PAGES tag is set to YES, all external pages will be listed in
-# the related pages index. If set to NO, only the current project's pages will
-# be listed.
-# The default value is: YES.
-
-EXTERNAL_PAGES         = YES
-
-# The PERL_PATH should be the absolute path and name of the perl script
-# interpreter (i.e. the result of 'which perl').
-# The default file (with absolute path) is: /usr/bin/perl.
-
-PERL_PATH              = /usr/bin/perl
-
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-
-# If the CLASS_DIAGRAMS tag is set to YES, doxygen will generate a class diagram
-# (in HTML and LaTeX) for classes with base or super classes. Setting the tag to
-# NO turns the diagrams off. Note that this option also works with HAVE_DOT
-# disabled, but it is recommended to install and use dot, since it yields more
-# powerful graphs.
-# The default value is: YES.
-
-CLASS_DIAGRAMS         = YES
-
-# You can define message sequence charts within doxygen comments using the \msc
-# command. Doxygen will then run the mscgen tool (see:
-# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the
-# documentation. The MSCGEN_PATH tag allows you to specify the directory where
-# the mscgen tool resides. If left empty the tool is assumed to be found in the
-# default search path.
-
-MSCGEN_PATH            =
-
-# You can include diagrams made with dia in doxygen documentation. Doxygen will
-# then run dia to produce the diagram and insert it in the documentation. The
-# DIA_PATH tag allows you to specify the directory where the dia binary resides.
-# If left empty dia is assumed to be found in the default search path.
-
-DIA_PATH               =
-
-# If set to YES the inheritance and collaboration graphs will hide inheritance
-# and usage relations if the target is undocumented or is not a class.
-# The default value is: YES.
-
-HIDE_UNDOC_RELATIONS   = YES
-
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
-# available from the path. This tool is part of Graphviz (see:
-# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
-# Bell Labs. The other options in this section have no effect if this option is
-# set to NO
-# The default value is: NO.
-
-HAVE_DOT               = NO
-
-# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
-# to run in parallel. When set to 0 doxygen will base this on the number of
-# processors available in the system. You can set it explicitly to a value
-# larger than 0 to get control over the balance between CPU load and processing
-# speed.
-# Minimum value: 0, maximum value: 32, default value: 0.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_NUM_THREADS        = 0
-
-# When you want a differently looking font in the dot files that doxygen
-# generates you can specify the font name using DOT_FONTNAME. You need to make
-# sure dot is able to find the font, which can be done by putting it in a
-# standard location or by setting the DOTFONTPATH environment variable or by
-# setting DOT_FONTPATH to the directory containing the font.
-# The default value is: Helvetica.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_FONTNAME           = Helvetica
-
-# The DOT_FONTSIZE tag can be used to set the size (in points) of the font of
-# dot graphs.
-# Minimum value: 4, maximum value: 24, default value: 10.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_FONTSIZE           = 10
-
-# By default doxygen will tell dot to use the default font as specified with
-# DOT_FONTNAME. If you specify a different font using DOT_FONTNAME you can set
-# the path where dot can find it using this tag.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_FONTPATH           =
-
-# If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for
-# each documented class showing the direct and indirect inheritance relations.
-# Setting this tag to YES will force the CLASS_DIAGRAMS tag to NO.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-CLASS_GRAPH            = YES
-
-# If the COLLABORATION_GRAPH tag is set to YES then doxygen will generate a
-# graph for each documented class showing the direct and indirect implementation
-# dependencies (inheritance, containment, and class references variables) of the
-# class with other documented classes.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-COLLABORATION_GRAPH    = YES
-
-# If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for
-# groups, showing the direct groups dependencies.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-GROUP_GRAPHS           = YES
-
-# If the UML_LOOK tag is set to YES, doxygen will generate inheritance and
-# collaboration diagrams in a style similar to the OMG's Unified Modeling
-# Language.
-# The default value is: NO.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-UML_LOOK               = NO
-
-# If the UML_LOOK tag is enabled, the fields and methods are shown inside the
-# class node. If there are many fields or methods and many nodes the graph may
-# become too big to be useful. The UML_LIMIT_NUM_FIELDS threshold limits the
-# number of items for each type to make the size more manageable. Set this to 0
-# for no limit. Note that the threshold may be exceeded by 50% before the limit
-# is enforced. So when you set the threshold to 10, up to 15 fields may appear,
-# but if the number exceeds 15, the total amount of fields shown is limited to
-# 10.
-# Minimum value: 0, maximum value: 100, default value: 10.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-UML_LIMIT_NUM_FIELDS   = 10
-
-# If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and
-# collaboration graphs will show the relations between templates and their
-# instances.
-# The default value is: NO.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-TEMPLATE_RELATIONS     = YES
-
-# If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to
-# YES then doxygen will generate a graph for each documented file showing the
-# direct and indirect include dependencies of the file with other documented
-# files.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-INCLUDE_GRAPH          = YES
-
-# If the INCLUDED_BY_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are
-# set to YES then doxygen will generate a graph for each documented file showing
-# the direct and indirect include dependencies of the file with other documented
-# files.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-INCLUDED_BY_GRAPH      = YES
-
-# If the CALL_GRAPH tag is set to YES then doxygen will generate a call
-# dependency graph for every global function or class method.
-#
-# Note that enabling this option will significantly increase the time of a run.
-# So in most cases it will be better to enable call graphs for selected
-# functions only using the \callgraph command. Disabling a call graph can be
-# accomplished by means of the command \hidecallgraph.
-# The default value is: NO.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-CALL_GRAPH             = NO
-
-# If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller
-# dependency graph for every global function or class method.
-#
-# Note that enabling this option will significantly increase the time of a run.
-# So in most cases it will be better to enable caller graphs for selected
-# functions only using the \callergraph command. Disabling a caller graph can be
-# accomplished by means of the command \hidecallergraph.
-# The default value is: NO.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-CALLER_GRAPH           = NO
-
-# If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical
-# hierarchy of all classes instead of a textual one.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-GRAPHICAL_HIERARCHY    = YES
-
-# If the DIRECTORY_GRAPH tag is set to YES then doxygen will show the
-# dependencies a directory has on other directories in a graphical way. The
-# dependency relations are determined by the #include relations between the
-# files in the directories.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DIRECTORY_GRAPH        = YES
-
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
-# generated by dot. For an explanation of the image formats see the section
-# output formats in the documentation of the dot tool (Graphviz (see:
-# http://www.graphviz.org/)).
-# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order
-# to make the SVG files visible in IE 9+ (other browsers do not have this
-# requirement).
-# Possible values are: png, jpg, gif, svg, png:gd, png:gd:gd, png:cairo,
-# png:cairo:gd, png:cairo:cairo, png:cairo:gdiplus, png:gdiplus and
-# png:gdiplus:gdiplus.
-# The default value is: png.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_IMAGE_FORMAT       = gif
-
-# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
-# enable generation of interactive SVG images that allow zooming and panning.
-#
-# Note that this requires a modern browser other than Internet Explorer. Tested
-# and working are Firefox, Chrome, Safari, and Opera.
-# Note: For IE 9+ you need to set HTML_FILE_EXTENSION to xhtml in order to make
-# the SVG files visible. Older versions of IE do not have SVG support.
-# The default value is: NO.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-INTERACTIVE_SVG        = NO
-
-# The DOT_PATH tag can be used to specify the path where the dot tool can be
-# found. If left blank, it is assumed the dot tool can be found in the path.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_PATH               =
-
-# The DOTFILE_DIRS tag can be used to specify one or more directories that
-# contain dot files that are included in the documentation (see the \dotfile
-# command).
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOTFILE_DIRS           =
-
-# The MSCFILE_DIRS tag can be used to specify one or more directories that
-# contain msc files that are included in the documentation (see the \mscfile
-# command).
-
-MSCFILE_DIRS           =
-
-# The DIAFILE_DIRS tag can be used to specify one or more directories that
-# contain dia files that are included in the documentation (see the \diafile
-# command).
-
-DIAFILE_DIRS           =
-
-# When using plantuml, the PLANTUML_JAR_PATH tag should be used to specify the
-# path where java can find the plantuml.jar file. If left blank, it is assumed
-# PlantUML is not used or called during a preprocessing step. Doxygen will
-# generate a warning when it encounters a \startuml command in this case and
-# will not generate output for the diagram.
-
-PLANTUML_JAR_PATH      =
-
-# When using plantuml, the specified paths are searched for files specified by
-# the !include statement in a plantuml block.
-
-PLANTUML_INCLUDE_PATH  =
-
-# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes
-# that will be shown in the graph. If the number of nodes in a graph becomes
-# larger than this value, doxygen will truncate the graph, which is visualized
-# by representing a node as a red box. Note that doxygen if the number of direct
-# children of the root node in a graph is already larger than
-# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note that
-# the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
-# Minimum value: 0, maximum value: 10000, default value: 50.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_GRAPH_MAX_NODES    = 50
-
-# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs
-# generated by dot. A depth value of 3 means that only nodes reachable from the
-# root by following a path via at most 3 edges will be shown. Nodes that lay
-# further from the root node will be omitted. Note that setting this option to 1
-# or 2 may greatly reduce the computation time needed for large code bases. Also
-# note that the size of a graph can be further restricted by
-# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
-# Minimum value: 0, maximum value: 1000, default value: 0.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-MAX_DOT_GRAPH_DEPTH    = 0
-
-# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
-# background. This is disabled by default, because dot on Windows does not seem
-# to support this out of the box.
-#
-# Warning: Depending on the platform used, enabling this option may lead to
-# badly anti-aliased labels on the edges of a graph (i.e. they become hard to
-# read).
-# The default value is: NO.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_TRANSPARENT        = NO
-
-# Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output
-# files in one run (i.e. multiple -o and -T options on the command line). This
-# makes dot run faster, but since only newer versions of dot (>1.8.10) support
-# this, this feature is disabled by default.
-# The default value is: NO.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_MULTI_TARGETS      = YES
-
-# If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page
-# explaining the meaning of the various boxes and arrows in the dot generated
-# graphs.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-GENERATE_LEGEND        = YES
-
-# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate dot
-# files that are used to generate the various graphs.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_CLEANUP            = YES
diff --git a/hw/dmx/doxygen/footer.html b/hw/dmx/doxygen/footer.html
deleted file mode 100644
index f80dc82..0000000
--- a/hw/dmx/doxygen/footer.html
+++ /dev/null
@@ -1,4 +0,0 @@
-<hr size="1"/><address style="text-align: right;"><small>
-Generated on $datetime for $projectname by&nbsp;<a href="http://www.doxygen.org/index.html"><img class="footer" src="doxygen.png" alt="doxygen"/></a> $doxygenversion</small></address>
-</body>
-</html>
diff --git a/hw/dmx/examples/Makefile.am b/hw/dmx/examples/Makefile.am
deleted file mode 100644
index d055ddc..0000000
--- a/hw/dmx/examples/Makefile.am
+++ /dev/null
@@ -1,70 +0,0 @@
-if DMX_BUILD_USB 
-# Requires <linux/input.h>
-EV_PROG = ev
-endif
-
-bin_PROGRAMS = \
-	dmxinfo dmxwininfo dmxreconfig dmxresize \
-	dmxaddscreen dmxrmscreen \
-	dmxaddinput dmxrminput
-noinst_PROGRAMS = xinput xtest evi res xled xbell $(EV_PROG)
-
-dmxinfo_SOURCES = dmxinfo.c
-dmxinfo_LDADD = $(DMXEXAMPLES_DEP_LIBS)
-dmxinfo_CFLAGS = $(DMXEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
-
-dmxwininfo_SOURCES = dmxwininfo.c
-dmxwininfo_LDADD = $(DMXXMUEXAMPLES_DEP_LIBS)
-dmxwininfo_CFLAGS = $(DMXXMUEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
-
-dmxreconfig_SOURCES = dmxreconfig.c
-dmxreconfig_LDADD = $(DMXEXAMPLES_DEP_LIBS)
-dmxreconfig_CFLAGS = $(DMXEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
-
-dmxresize_SOURCES = dmxresize.c
-dmxresize_LDADD = $(DMXEXAMPLES_DEP_LIBS)
-dmxresize_CFLAGS = $(DMXEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
-
-dmxaddscreen_SOURCES = dmxaddscreen.c
-dmxaddscreen_LDADD = $(DMXEXAMPLES_DEP_LIBS)
-dmxaddscreen_CFLAGS = $(DMXEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
-
-dmxrmscreen_SOURCES = dmxrmscreen.c
-dmxrmscreen_LDADD = $(DMXEXAMPLES_DEP_LIBS)
-dmxrmscreen_CFLAGS = $(DMXEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
-
-dmxaddinput_SOURCES = dmxaddinput.c
-dmxaddinput_LDADD = $(DMXEXAMPLES_DEP_LIBS)
-dmxaddinput_CFLAGS = $(DMXEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
-
-dmxrminput_SOURCES = dmxrminput.c
-dmxrminput_LDADD = $(DMXEXAMPLES_DEP_LIBS)
-dmxrminput_CFLAGS = $(DMXEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
-
-xinput_SOURCES = xinput.c
-xinput_LDADD = $(DMXXIEXAMPLES_DEP_LIBS)
-xinput_CFLAGS = $(DMXXIEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
-
-xtest_SOURCES = xtest.c
-xtest_LDADD = $(XTSTEXAMPLES_DEP_LIBS)
-xtest_CFLAGS = $(XTSTEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
-
-evi_SOURCES = evi.c
-evi_LDADD = $(X11EXAMPLES_DEP_LIBS)
-evi_CFLAGS = $(X11EXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
-
-res_SOURCES = res.c
-res_LDADD = $(XRESEXAMPLES_DEP_LIBS)
-res_CFLAGS = $(XRESEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
-
-xled_SOURCES = xled.c
-xled_LDADD = $(X11EXAMPLES_DEP_LIBS)
-xled_CFLAGS = $(X11EXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
-
-xbell_SOURCES = xbell.c
-xbell_LDADD = $(X11EXAMPLES_DEP_LIBS)
-xbell_CFLAGS = $(X11EXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
-
-ev_SOURCES = ev.c
-ev_LDADD = 
-ev_CFLAGS = 
diff --git a/hw/dmx/examples/Makefile.in b/hw/dmx/examples/Makefile.in
deleted file mode 100644
index 20c099b..0000000
--- a/hw/dmx/examples/Makefile.in
+++ /dev/null
@@ -1,1364 +0,0 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
-
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-VPATH = @srcdir@
-am__is_gnu_make = { \
-  if test -z '$(MAKELEVEL)'; then \
-    false; \
-  elif test -n '$(MAKE_HOST)'; then \
-    true; \
-  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
-    true; \
-  else \
-    false; \
-  fi; \
-}
-am__make_running_with_option = \
-  case $${target_option-} in \
-      ?) ;; \
-      *) echo "am__make_running_with_option: internal error: invalid" \
-              "target option '$${target_option-}' specified" >&2; \
-         exit 1;; \
-  esac; \
-  has_opt=no; \
-  sane_makeflags=$$MAKEFLAGS; \
-  if $(am__is_gnu_make); then \
-    sane_makeflags=$$MFLAGS; \
-  else \
-    case $$MAKEFLAGS in \
-      *\\[\ \	]*) \
-        bs=\\; \
-        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
-          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
-    esac; \
-  fi; \
-  skip_next=no; \
-  strip_trailopt () \
-  { \
-    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
-  }; \
-  for flg in $$sane_makeflags; do \
-    test $$skip_next = yes && { skip_next=no; continue; }; \
-    case $$flg in \
-      *=*|--*) continue;; \
-        -*I) strip_trailopt 'I'; skip_next=yes;; \
-      -*I?*) strip_trailopt 'I';; \
-        -*O) strip_trailopt 'O'; skip_next=yes;; \
-      -*O?*) strip_trailopt 'O';; \
-        -*l) strip_trailopt 'l'; skip_next=yes;; \
-      -*l?*) strip_trailopt 'l';; \
-      -[dEDm]) skip_next=yes;; \
-      -[JT]) skip_next=yes;; \
-    esac; \
-    case $$flg in \
-      *$$target_option*) has_opt=yes; break;; \
-    esac; \
-  done; \
-  test $$has_opt = yes
-am__make_dryrun = (target_option=n; $(am__make_running_with_option))
-am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-bin_PROGRAMS = dmxinfo$(EXEEXT) dmxwininfo$(EXEEXT) \
-	dmxreconfig$(EXEEXT) dmxresize$(EXEEXT) dmxaddscreen$(EXEEXT) \
-	dmxrmscreen$(EXEEXT) dmxaddinput$(EXEEXT) dmxrminput$(EXEEXT)
-noinst_PROGRAMS = xinput$(EXEEXT) xtest$(EXEEXT) evi$(EXEEXT) \
-	res$(EXEEXT) xled$(EXEEXT) xbell$(EXEEXT) $(am__EXEEXT_1)
-subdir = hw/dmx/examples
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \
-	$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \
-	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
-	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
-	$(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-	$(ACLOCAL_M4)
-DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
-	$(top_builddir)/include/xorg-server.h \
-	$(top_builddir)/include/dix-config.h \
-	$(top_builddir)/include/xorg-config.h \
-	$(top_builddir)/include/xkb-config.h \
-	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
-	$(top_builddir)/include/version-config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-am__installdirs = "$(DESTDIR)$(bindir)"
-@DMX_BUILD_USB_TRUE@am__EXEEXT_1 = ev$(EXEEXT)
-PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS)
-am_dmxaddinput_OBJECTS = dmxaddinput-dmxaddinput.$(OBJEXT)
-dmxaddinput_OBJECTS = $(am_dmxaddinput_OBJECTS)
-am__DEPENDENCIES_1 =
-dmxaddinput_DEPENDENCIES = $(am__DEPENDENCIES_1)
-AM_V_lt = $(am__v_lt_@AM_V@)
-am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
-am__v_lt_0 = --silent
-am__v_lt_1 = 
-dmxaddinput_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(dmxaddinput_CFLAGS) \
-	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-am_dmxaddscreen_OBJECTS = dmxaddscreen-dmxaddscreen.$(OBJEXT)
-dmxaddscreen_OBJECTS = $(am_dmxaddscreen_OBJECTS)
-dmxaddscreen_DEPENDENCIES = $(am__DEPENDENCIES_1)
-dmxaddscreen_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(dmxaddscreen_CFLAGS) \
-	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-am_dmxinfo_OBJECTS = dmxinfo-dmxinfo.$(OBJEXT)
-dmxinfo_OBJECTS = $(am_dmxinfo_OBJECTS)
-dmxinfo_DEPENDENCIES = $(am__DEPENDENCIES_1)
-dmxinfo_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(dmxinfo_CFLAGS) \
-	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-am_dmxreconfig_OBJECTS = dmxreconfig-dmxreconfig.$(OBJEXT)
-dmxreconfig_OBJECTS = $(am_dmxreconfig_OBJECTS)
-dmxreconfig_DEPENDENCIES = $(am__DEPENDENCIES_1)
-dmxreconfig_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(dmxreconfig_CFLAGS) \
-	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-am_dmxresize_OBJECTS = dmxresize-dmxresize.$(OBJEXT)
-dmxresize_OBJECTS = $(am_dmxresize_OBJECTS)
-dmxresize_DEPENDENCIES = $(am__DEPENDENCIES_1)
-dmxresize_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(dmxresize_CFLAGS) \
-	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-am_dmxrminput_OBJECTS = dmxrminput-dmxrminput.$(OBJEXT)
-dmxrminput_OBJECTS = $(am_dmxrminput_OBJECTS)
-dmxrminput_DEPENDENCIES = $(am__DEPENDENCIES_1)
-dmxrminput_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(dmxrminput_CFLAGS) \
-	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-am_dmxrmscreen_OBJECTS = dmxrmscreen-dmxrmscreen.$(OBJEXT)
-dmxrmscreen_OBJECTS = $(am_dmxrmscreen_OBJECTS)
-dmxrmscreen_DEPENDENCIES = $(am__DEPENDENCIES_1)
-dmxrmscreen_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(dmxrmscreen_CFLAGS) \
-	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-am_dmxwininfo_OBJECTS = dmxwininfo-dmxwininfo.$(OBJEXT)
-dmxwininfo_OBJECTS = $(am_dmxwininfo_OBJECTS)
-dmxwininfo_DEPENDENCIES = $(am__DEPENDENCIES_1)
-dmxwininfo_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(dmxwininfo_CFLAGS) \
-	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-am_ev_OBJECTS = ev-ev.$(OBJEXT)
-ev_OBJECTS = $(am_ev_OBJECTS)
-ev_DEPENDENCIES =
-ev_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(ev_CFLAGS) $(CFLAGS) \
-	$(AM_LDFLAGS) $(LDFLAGS) -o $@
-am_evi_OBJECTS = evi-evi.$(OBJEXT)
-evi_OBJECTS = $(am_evi_OBJECTS)
-evi_DEPENDENCIES = $(am__DEPENDENCIES_1)
-evi_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(evi_CFLAGS) $(CFLAGS) \
-	$(AM_LDFLAGS) $(LDFLAGS) -o $@
-am_res_OBJECTS = res-res.$(OBJEXT)
-res_OBJECTS = $(am_res_OBJECTS)
-res_DEPENDENCIES = $(am__DEPENDENCIES_1)
-res_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(res_CFLAGS) $(CFLAGS) \
-	$(AM_LDFLAGS) $(LDFLAGS) -o $@
-am_xbell_OBJECTS = xbell-xbell.$(OBJEXT)
-xbell_OBJECTS = $(am_xbell_OBJECTS)
-xbell_DEPENDENCIES = $(am__DEPENDENCIES_1)
-xbell_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(xbell_CFLAGS) $(CFLAGS) \
-	$(AM_LDFLAGS) $(LDFLAGS) -o $@
-am_xinput_OBJECTS = xinput-xinput.$(OBJEXT)
-xinput_OBJECTS = $(am_xinput_OBJECTS)
-xinput_DEPENDENCIES = $(am__DEPENDENCIES_1)
-xinput_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(xinput_CFLAGS) $(CFLAGS) \
-	$(AM_LDFLAGS) $(LDFLAGS) -o $@
-am_xled_OBJECTS = xled-xled.$(OBJEXT)
-xled_OBJECTS = $(am_xled_OBJECTS)
-xled_DEPENDENCIES = $(am__DEPENDENCIES_1)
-xled_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(xled_CFLAGS) $(CFLAGS) \
-	$(AM_LDFLAGS) $(LDFLAGS) -o $@
-am_xtest_OBJECTS = xtest-xtest.$(OBJEXT)
-xtest_OBJECTS = $(am_xtest_OBJECTS)
-xtest_DEPENDENCIES = $(am__DEPENDENCIES_1)
-xtest_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(xtest_CFLAGS) $(CFLAGS) \
-	$(AM_LDFLAGS) $(LDFLAGS) -o $@
-AM_V_P = $(am__v_P_@AM_V@)
-am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
-am__v_P_0 = false
-am__v_P_1 = :
-AM_V_GEN = $(am__v_GEN_@AM_V@)
-am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo "  GEN     " $@;
-am__v_GEN_1 = 
-AM_V_at = $(am__v_at_@AM_V@)
-am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
-am__v_at_0 = @
-am__v_at_1 = 
-DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__maybe_remake_depfiles = depfiles
-am__depfiles_remade = ./$(DEPDIR)/dmxaddinput-dmxaddinput.Po \
-	./$(DEPDIR)/dmxaddscreen-dmxaddscreen.Po \
-	./$(DEPDIR)/dmxinfo-dmxinfo.Po \
-	./$(DEPDIR)/dmxreconfig-dmxreconfig.Po \
-	./$(DEPDIR)/dmxresize-dmxresize.Po \
-	./$(DEPDIR)/dmxrminput-dmxrminput.Po \
-	./$(DEPDIR)/dmxrmscreen-dmxrmscreen.Po \
-	./$(DEPDIR)/dmxwininfo-dmxwininfo.Po ./$(DEPDIR)/ev-ev.Po \
-	./$(DEPDIR)/evi-evi.Po ./$(DEPDIR)/res-res.Po \
-	./$(DEPDIR)/xbell-xbell.Po ./$(DEPDIR)/xinput-xinput.Po \
-	./$(DEPDIR)/xled-xled.Po ./$(DEPDIR)/xtest-xtest.Po
-am__mv = mv -f
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
-	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
-	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-	$(AM_CFLAGS) $(CFLAGS)
-AM_V_CC = $(am__v_CC_@AM_V@)
-am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
-am__v_CC_0 = @echo "  CC      " $@;
-am__v_CC_1 = 
-CCLD = $(CC)
-LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-	$(AM_LDFLAGS) $(LDFLAGS) -o $@
-AM_V_CCLD = $(am__v_CCLD_@AM_V@)
-am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
-am__v_CCLD_0 = @echo "  CCLD    " $@;
-am__v_CCLD_1 = 
-SOURCES = $(dmxaddinput_SOURCES) $(dmxaddscreen_SOURCES) \
-	$(dmxinfo_SOURCES) $(dmxreconfig_SOURCES) $(dmxresize_SOURCES) \
-	$(dmxrminput_SOURCES) $(dmxrmscreen_SOURCES) \
-	$(dmxwininfo_SOURCES) $(ev_SOURCES) $(evi_SOURCES) \
-	$(res_SOURCES) $(xbell_SOURCES) $(xinput_SOURCES) \
-	$(xled_SOURCES) $(xtest_SOURCES)
-DIST_SOURCES = $(dmxaddinput_SOURCES) $(dmxaddscreen_SOURCES) \
-	$(dmxinfo_SOURCES) $(dmxreconfig_SOURCES) $(dmxresize_SOURCES) \
-	$(dmxrminput_SOURCES) $(dmxrmscreen_SOURCES) \
-	$(dmxwininfo_SOURCES) $(ev_SOURCES) $(evi_SOURCES) \
-	$(res_SOURCES) $(xbell_SOURCES) $(xinput_SOURCES) \
-	$(xled_SOURCES) $(xtest_SOURCES)
-am__can_run_installinfo = \
-  case $$AM_UPDATE_INFO_DIR in \
-    n|no|NO) false;; \
-    *) (install-info --version) >/dev/null 2>&1;; \
-  esac
-am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
-# Read a list of newline-separated strings from the standard input,
-# and print each of them once, without duplicates.  Input order is
-# *not* preserved.
-am__uniquify_input = $(AWK) '\
-  BEGIN { nonempty = 0; } \
-  { items[$$0] = 1; nonempty = 1; } \
-  END { if (nonempty) { for (i in items) print i; }; } \
-'
-# Make sure the list of sources is unique.  This is necessary because,
-# e.g., the same source file might be shared among _SOURCES variables
-# for different programs/libraries.
-am__define_uniq_tagged_files = \
-  list='$(am__tagged_files)'; \
-  unique=`for i in $$list; do \
-    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-  done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
-am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
-ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
-AMTAR = @AMTAR@
-AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
-APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@
-APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@
-APP_MAN_DIR = @APP_MAN_DIR@
-APP_MAN_SUFFIX = @APP_MAN_SUFFIX@
-AR = @AR@
-AS = @AS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-BASE_CFLAGS = @BASE_CFLAGS@
-BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
-BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
-BUNDLE_VERSION = @BUNDLE_VERSION@
-BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
-CC = @CC@
-CCAS = @CCAS@
-CCASDEPMODE = @CCASDEPMODE@
-CCASFLAGS = @CCASFLAGS@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CHANGELOG_CMD = @CHANGELOG_CMD@
-COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CWARNFLAGS = @CWARNFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DBUS_CFLAGS = @DBUS_CFLAGS@
-DBUS_LIBS = @DBUS_LIBS@
-DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@
-DEFAULT_LOGDIR = @DEFAULT_LOGDIR@
-DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@
-DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@
-DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@
-DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DGA_CFLAGS = @DGA_CFLAGS@
-DGA_LIBS = @DGA_LIBS@
-DIX_CFLAGS = @DIX_CFLAGS@
-DIX_LIB = @DIX_LIB@
-DLLTOOL = @DLLTOOL@
-DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
-DOT = @DOT@
-DOXYGEN = @DOXYGEN@
-DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
-DRI2PROTO_LIBS = @DRI2PROTO_LIBS@
-DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@
-DRI3PROTO_LIBS = @DRI3PROTO_LIBS@
-DRIVER_MAN_DIR = @DRIVER_MAN_DIR@
-DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
-DRI_DRIVER_PATH = @DRI_DRIVER_PATH@
-DSYMUTIL = @DSYMUTIL@
-DTRACE = @DTRACE@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-FILE_MAN_DIR = @FILE_MAN_DIR@
-FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
-FONT100DPIDIR = @FONT100DPIDIR@
-FONT75DPIDIR = @FONT75DPIDIR@
-FONTMISCDIR = @FONTMISCDIR@
-FONTOTFDIR = @FONTOTFDIR@
-FONTROOTDIR = @FONTROOTDIR@
-FONTTTFDIR = @FONTTTFDIR@
-FONTTYPE1DIR = @FONTTYPE1DIR@
-FOP = @FOP@
-GBM_CFLAGS = @GBM_CFLAGS@
-GBM_LIBS = @GBM_LIBS@
-GLAMOR_CFLAGS = @GLAMOR_CFLAGS@
-GLAMOR_LIBS = @GLAMOR_LIBS@
-GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@
-GLX_DEFINES = @GLX_DEFINES@
-GLX_SYS_LIBS = @GLX_SYS_LIBS@
-GL_CFLAGS = @GL_CFLAGS@
-GL_LIBS = @GL_LIBS@
-GREP = @GREP@
-HAL_CFLAGS = @HAL_CFLAGS@
-HAL_LIBS = @HAL_LIBS@
-HAVE_DOT = @HAVE_DOT@
-INSTALL = @INSTALL@
-INSTALL_CMD = @INSTALL_CMD@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-KDRIVE_CFLAGS = @KDRIVE_CFLAGS@
-KDRIVE_INCS = @KDRIVE_INCS@
-KDRIVE_LIBS = @KDRIVE_LIBS@
-KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@
-KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@
-KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@
-KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@
-KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@
-KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@
-KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@
-LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@
-LEX = @LEX@
-LEXLIB = @LEXLIB@
-LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
-LIBDRM_CFLAGS = @LIBDRM_CFLAGS@
-LIBDRM_LIBS = @LIBDRM_LIBS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@
-LIBSHA1_LIBS = @LIBSHA1_LIBS@
-LIBTOOL = @LIBTOOL@
-LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
-LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
-LIB_MAN_DIR = @LIB_MAN_DIR@
-LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
-MAIN_LIB = @MAIN_LIB@
-MAKEINFO = @MAKEINFO@
-MANIFEST_TOOL = @MANIFEST_TOOL@
-MAN_SUBSTS = @MAN_SUBSTS@
-MISC_MAN_DIR = @MISC_MAN_DIR@
-MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
-MKDIR_P = @MKDIR_P@
-NM = @NM@
-NMEDIT = @NMEDIT@
-OBJC = @OBJC@
-OBJCCLD = @OBJCCLD@
-OBJCDEPMODE = @OBJCDEPMODE@
-OBJCFLAGS = @OBJCFLAGS@
-OBJCLINK = @OBJCLINK@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
-OPENSSL_LIBS = @OPENSSL_LIBS@
-OS_LIB = @OS_LIB@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@
-PCIACCESS_LIBS = @PCIACCESS_LIBS@
-PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@
-PIXMAN_CFLAGS = @PIXMAN_CFLAGS@
-PIXMAN_LIBS = @PIXMAN_LIBS@
-PKG_CONFIG = @PKG_CONFIG@
-PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
-PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
-PROJECTROOT = @PROJECTROOT@
-PTHREAD_CC = @PTHREAD_CC@
-PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
-PTHREAD_LIBS = @PTHREAD_LIBS@
-PYTHON3 = @PYTHON3@
-RANLIB = @RANLIB@
-RAWCPP = @RAWCPP@
-RAWCPPFLAGS = @RAWCPPFLAGS@
-RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
-SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
-SED = @SED@
-SELINUX_CFLAGS = @SELINUX_CFLAGS@
-SELINUX_LIBS = @SELINUX_LIBS@
-SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@
-SET_MAKE = @SET_MAKE@
-SHA1_CFLAGS = @SHA1_CFLAGS@
-SHA1_LIBS = @SHA1_LIBS@
-SHELL = @SHELL@
-SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@
-STRICT_CFLAGS = @STRICT_CFLAGS@
-STRIP = @STRIP@
-STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@
-SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@
-SYSCONFDIR = @SYSCONFDIR@
-SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@
-SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@
-TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@
-UDEV_CFLAGS = @UDEV_CFLAGS@
-UDEV_LIBS = @UDEV_LIBS@
-UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
-VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
-VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
-WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
-WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
-WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
-XCONFIGDIR = @XCONFIGDIR@
-XCONFIGFILE = @XCONFIGFILE@
-XDMCP_CFLAGS = @XDMCP_CFLAGS@
-XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
-XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
-XEPHYR_INCS = @XEPHYR_INCS@
-XEPHYR_LIBS = @XEPHYR_LIBS@
-XF86CONFIGDIR = @XF86CONFIGDIR@
-XF86CONFIGFILE = @XF86CONFIGFILE@
-XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@
-XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@
-XKB_COMPILED_DIR = @XKB_COMPILED_DIR@
-XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@
-XKB_DFLT_MODEL = @XKB_DFLT_MODEL@
-XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@
-XKB_DFLT_RULES = @XKB_DFLT_RULES@
-XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@
-XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@
-XLIB_CFLAGS = @XLIB_CFLAGS@
-XLIB_LIBS = @XLIB_LIBS@
-XMLTO = @XMLTO@
-XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@
-XNESTMODULES_LIBS = @XNESTMODULES_LIBS@
-XNEST_LIBS = @XNEST_LIBS@
-XNEST_SYS_LIBS = @XNEST_SYS_LIBS@
-XORG_CFLAGS = @XORG_CFLAGS@
-XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@
-XORG_INCS = @XORG_INCS@
-XORG_LIBS = @XORG_LIBS@
-XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@
-XORG_MAN_PAGE = @XORG_MAN_PAGE@
-XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@
-XORG_MODULES_LIBS = @XORG_MODULES_LIBS@
-XORG_OS_SUBDIR = @XORG_OS_SUBDIR@
-XORG_SGML_PATH = @XORG_SGML_PATH@
-XORG_SYS_LIBS = @XORG_SYS_LIBS@
-XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@
-XPBPROXY_LIBS = @XPBPROXY_LIBS@
-XQUARTZ_LIBS = @XQUARTZ_LIBS@
-XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
-XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
-XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
-XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
-XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
-XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@
-XSERVER_LIBS = @XSERVER_LIBS@
-XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@
-XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
-XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
-XSLTPROC = @XSLTPROC@
-XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
-XVFB_LIBS = @XVFB_LIBS@
-XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
-XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
-XWINMODULES_LIBS = @XWINMODULES_LIBS@
-XWIN_LIBS = @XWIN_LIBS@
-XWIN_SERVER_NAME = @XWIN_SERVER_NAME@
-XWIN_SYS_LIBS = @XWIN_SYS_LIBS@
-YACC = @YACC@
-YFLAGS = @YFLAGS@
-abi_ansic = @abi_ansic@
-abi_extension = @abi_extension@
-abi_videodrv = @abi_videodrv@
-abi_xinput = @abi_xinput@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_AR = @ac_ct_AR@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-ax_pthread_config = @ax_pthread_config@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-driverdir = @driverdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-extdir = @extdir@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-logdir = @logdir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-moduledir = @moduledir@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-runstatedir = @runstatedir@
-sbindir = @sbindir@
-sdkdir = @sdkdir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-symbol_visibility = @symbol_visibility@
-sysconfdir = @sysconfdir@
-sysconfigdir = @sysconfigdir@
-target_alias = @target_alias@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-# Requires <linux/input.h>
-@DMX_BUILD_USB_TRUE@EV_PROG = ev
-dmxinfo_SOURCES = dmxinfo.c
-dmxinfo_LDADD = $(DMXEXAMPLES_DEP_LIBS)
-dmxinfo_CFLAGS = $(DMXEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
-dmxwininfo_SOURCES = dmxwininfo.c
-dmxwininfo_LDADD = $(DMXXMUEXAMPLES_DEP_LIBS)
-dmxwininfo_CFLAGS = $(DMXXMUEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
-dmxreconfig_SOURCES = dmxreconfig.c
-dmxreconfig_LDADD = $(DMXEXAMPLES_DEP_LIBS)
-dmxreconfig_CFLAGS = $(DMXEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
-dmxresize_SOURCES = dmxresize.c
-dmxresize_LDADD = $(DMXEXAMPLES_DEP_LIBS)
-dmxresize_CFLAGS = $(DMXEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
-dmxaddscreen_SOURCES = dmxaddscreen.c
-dmxaddscreen_LDADD = $(DMXEXAMPLES_DEP_LIBS)
-dmxaddscreen_CFLAGS = $(DMXEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
-dmxrmscreen_SOURCES = dmxrmscreen.c
-dmxrmscreen_LDADD = $(DMXEXAMPLES_DEP_LIBS)
-dmxrmscreen_CFLAGS = $(DMXEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
-dmxaddinput_SOURCES = dmxaddinput.c
-dmxaddinput_LDADD = $(DMXEXAMPLES_DEP_LIBS)
-dmxaddinput_CFLAGS = $(DMXEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
-dmxrminput_SOURCES = dmxrminput.c
-dmxrminput_LDADD = $(DMXEXAMPLES_DEP_LIBS)
-dmxrminput_CFLAGS = $(DMXEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
-xinput_SOURCES = xinput.c
-xinput_LDADD = $(DMXXIEXAMPLES_DEP_LIBS)
-xinput_CFLAGS = $(DMXXIEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
-xtest_SOURCES = xtest.c
-xtest_LDADD = $(XTSTEXAMPLES_DEP_LIBS)
-xtest_CFLAGS = $(XTSTEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
-evi_SOURCES = evi.c
-evi_LDADD = $(X11EXAMPLES_DEP_LIBS)
-evi_CFLAGS = $(X11EXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
-res_SOURCES = res.c
-res_LDADD = $(XRESEXAMPLES_DEP_LIBS)
-res_CFLAGS = $(XRESEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
-xled_SOURCES = xled.c
-xled_LDADD = $(X11EXAMPLES_DEP_LIBS)
-xled_CFLAGS = $(X11EXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
-xbell_SOURCES = xbell.c
-xbell_LDADD = $(X11EXAMPLES_DEP_LIBS)
-xbell_CFLAGS = $(X11EXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
-ev_SOURCES = ev.c
-ev_LDADD = 
-ev_CFLAGS = 
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
-	@for dep in $?; do \
-	  case '$(am__configure_deps)' in \
-	    *$$dep*) \
-	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
-	        && { if test -f $@; then exit 0; else break; fi; }; \
-	      exit 1;; \
-	  esac; \
-	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/dmx/examples/Makefile'; \
-	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --foreign hw/dmx/examples/Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	@case '$?' in \
-	  *config.status*) \
-	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
-	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
-	esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure:  $(am__configure_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-install-binPROGRAMS: $(bin_PROGRAMS)
-	@$(NORMAL_INSTALL)
-	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
-	if test -n "$$list"; then \
-	  echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
-	  $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
-	fi; \
-	for p in $$list; do echo "$$p $$p"; done | \
-	sed 's/$(EXEEXT)$$//' | \
-	while read p p1; do if test -f $$p \
-	 || test -f $$p1 \
-	  ; then echo "$$p"; echo "$$p"; else :; fi; \
-	done | \
-	sed -e 'p;s,.*/,,;n;h' \
-	    -e 's|.*|.|' \
-	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
-	sed 'N;N;N;s,\n, ,g' | \
-	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
-	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
-	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
-	    else { print "f", $$3 "/" $$4, $$1; } } \
-	  END { for (d in files) print "f", d, files[d] }' | \
-	while read type dir files; do \
-	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
-	    test -z "$$files" || { \
-	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
-	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
-	    } \
-	; done
-
-uninstall-binPROGRAMS:
-	@$(NORMAL_UNINSTALL)
-	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
-	files=`for p in $$list; do echo "$$p"; done | \
-	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
-	      -e 's/$$/$(EXEEXT)/' \
-	`; \
-	test -n "$$list" || exit 0; \
-	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
-	cd "$(DESTDIR)$(bindir)" && rm -f $$files
-
-clean-binPROGRAMS:
-	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
-	echo " rm -f" $$list; \
-	rm -f $$list || exit $$?; \
-	test -n "$(EXEEXT)" || exit 0; \
-	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
-	echo " rm -f" $$list; \
-	rm -f $$list
-
-clean-noinstPROGRAMS:
-	@list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
-	echo " rm -f" $$list; \
-	rm -f $$list || exit $$?; \
-	test -n "$(EXEEXT)" || exit 0; \
-	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
-	echo " rm -f" $$list; \
-	rm -f $$list
-
-dmxaddinput$(EXEEXT): $(dmxaddinput_OBJECTS) $(dmxaddinput_DEPENDENCIES) $(EXTRA_dmxaddinput_DEPENDENCIES) 
-	@rm -f dmxaddinput$(EXEEXT)
-	$(AM_V_CCLD)$(dmxaddinput_LINK) $(dmxaddinput_OBJECTS) $(dmxaddinput_LDADD) $(LIBS)
-
-dmxaddscreen$(EXEEXT): $(dmxaddscreen_OBJECTS) $(dmxaddscreen_DEPENDENCIES) $(EXTRA_dmxaddscreen_DEPENDENCIES) 
-	@rm -f dmxaddscreen$(EXEEXT)
-	$(AM_V_CCLD)$(dmxaddscreen_LINK) $(dmxaddscreen_OBJECTS) $(dmxaddscreen_LDADD) $(LIBS)
-
-dmxinfo$(EXEEXT): $(dmxinfo_OBJECTS) $(dmxinfo_DEPENDENCIES) $(EXTRA_dmxinfo_DEPENDENCIES) 
-	@rm -f dmxinfo$(EXEEXT)
-	$(AM_V_CCLD)$(dmxinfo_LINK) $(dmxinfo_OBJECTS) $(dmxinfo_LDADD) $(LIBS)
-
-dmxreconfig$(EXEEXT): $(dmxreconfig_OBJECTS) $(dmxreconfig_DEPENDENCIES) $(EXTRA_dmxreconfig_DEPENDENCIES) 
-	@rm -f dmxreconfig$(EXEEXT)
-	$(AM_V_CCLD)$(dmxreconfig_LINK) $(dmxreconfig_OBJECTS) $(dmxreconfig_LDADD) $(LIBS)
-
-dmxresize$(EXEEXT): $(dmxresize_OBJECTS) $(dmxresize_DEPENDENCIES) $(EXTRA_dmxresize_DEPENDENCIES) 
-	@rm -f dmxresize$(EXEEXT)
-	$(AM_V_CCLD)$(dmxresize_LINK) $(dmxresize_OBJECTS) $(dmxresize_LDADD) $(LIBS)
-
-dmxrminput$(EXEEXT): $(dmxrminput_OBJECTS) $(dmxrminput_DEPENDENCIES) $(EXTRA_dmxrminput_DEPENDENCIES) 
-	@rm -f dmxrminput$(EXEEXT)
-	$(AM_V_CCLD)$(dmxrminput_LINK) $(dmxrminput_OBJECTS) $(dmxrminput_LDADD) $(LIBS)
-
-dmxrmscreen$(EXEEXT): $(dmxrmscreen_OBJECTS) $(dmxrmscreen_DEPENDENCIES) $(EXTRA_dmxrmscreen_DEPENDENCIES) 
-	@rm -f dmxrmscreen$(EXEEXT)
-	$(AM_V_CCLD)$(dmxrmscreen_LINK) $(dmxrmscreen_OBJECTS) $(dmxrmscreen_LDADD) $(LIBS)
-
-dmxwininfo$(EXEEXT): $(dmxwininfo_OBJECTS) $(dmxwininfo_DEPENDENCIES) $(EXTRA_dmxwininfo_DEPENDENCIES) 
-	@rm -f dmxwininfo$(EXEEXT)
-	$(AM_V_CCLD)$(dmxwininfo_LINK) $(dmxwininfo_OBJECTS) $(dmxwininfo_LDADD) $(LIBS)
-
-ev$(EXEEXT): $(ev_OBJECTS) $(ev_DEPENDENCIES) $(EXTRA_ev_DEPENDENCIES) 
-	@rm -f ev$(EXEEXT)
-	$(AM_V_CCLD)$(ev_LINK) $(ev_OBJECTS) $(ev_LDADD) $(LIBS)
-
-evi$(EXEEXT): $(evi_OBJECTS) $(evi_DEPENDENCIES) $(EXTRA_evi_DEPENDENCIES) 
-	@rm -f evi$(EXEEXT)
-	$(AM_V_CCLD)$(evi_LINK) $(evi_OBJECTS) $(evi_LDADD) $(LIBS)
-
-res$(EXEEXT): $(res_OBJECTS) $(res_DEPENDENCIES) $(EXTRA_res_DEPENDENCIES) 
-	@rm -f res$(EXEEXT)
-	$(AM_V_CCLD)$(res_LINK) $(res_OBJECTS) $(res_LDADD) $(LIBS)
-
-xbell$(EXEEXT): $(xbell_OBJECTS) $(xbell_DEPENDENCIES) $(EXTRA_xbell_DEPENDENCIES) 
-	@rm -f xbell$(EXEEXT)
-	$(AM_V_CCLD)$(xbell_LINK) $(xbell_OBJECTS) $(xbell_LDADD) $(LIBS)
-
-xinput$(EXEEXT): $(xinput_OBJECTS) $(xinput_DEPENDENCIES) $(EXTRA_xinput_DEPENDENCIES) 
-	@rm -f xinput$(EXEEXT)
-	$(AM_V_CCLD)$(xinput_LINK) $(xinput_OBJECTS) $(xinput_LDADD) $(LIBS)
-
-xled$(EXEEXT): $(xled_OBJECTS) $(xled_DEPENDENCIES) $(EXTRA_xled_DEPENDENCIES) 
-	@rm -f xled$(EXEEXT)
-	$(AM_V_CCLD)$(xled_LINK) $(xled_OBJECTS) $(xled_LDADD) $(LIBS)
-
-xtest$(EXEEXT): $(xtest_OBJECTS) $(xtest_DEPENDENCIES) $(EXTRA_xtest_DEPENDENCIES) 
-	@rm -f xtest$(EXEEXT)
-	$(AM_V_CCLD)$(xtest_LINK) $(xtest_OBJECTS) $(xtest_LDADD) $(LIBS)
-
-mostlyclean-compile:
-	-rm -f *.$(OBJEXT)
-
-distclean-compile:
-	-rm -f *.tab.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxaddinput-dmxaddinput.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxaddscreen-dmxaddscreen.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxinfo-dmxinfo.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxreconfig-dmxreconfig.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxresize-dmxresize.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxrminput-dmxrminput.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxrmscreen-dmxrmscreen.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxwininfo-dmxwininfo.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ev-ev.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evi-evi.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/res-res.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xbell-xbell.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xinput-xinput.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xled-xled.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xtest-xtest.Po@am__quote@ # am--include-marker
-
-$(am__depfiles_remade):
-	@$(MKDIR_P) $(@D)
-	@echo '# dummy' >$@-t && $(am__mv) $@-t $@
-
-am--depfiles: $(am__depfiles_remade)
-
-.c.o:
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
-
-.c.obj:
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
-
-.c.lo:
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
-
-dmxaddinput-dmxaddinput.o: dmxaddinput.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dmxaddinput_CFLAGS) $(CFLAGS) -MT dmxaddinput-dmxaddinput.o -MD -MP -MF $(DEPDIR)/dmxaddinput-dmxaddinput.Tpo -c -o dmxaddinput-dmxaddinput.o `test -f 'dmxaddinput.c' || echo '$(srcdir)/'`dmxaddinput.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/dmxaddinput-dmxaddinput.Tpo $(DEPDIR)/dmxaddinput-dmxaddinput.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmxaddinput.c' object='dmxaddinput-dmxaddinput.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dmxaddinput_CFLAGS) $(CFLAGS) -c -o dmxaddinput-dmxaddinput.o `test -f 'dmxaddinput.c' || echo '$(srcdir)/'`dmxaddinput.c
-
-dmxaddinput-dmxaddinput.obj: dmxaddinput.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dmxaddinput_CFLAGS) $(CFLAGS) -MT dmxaddinput-dmxaddinput.obj -MD -MP -MF $(DEPDIR)/dmxaddinput-dmxaddinput.Tpo -c -o dmxaddinput-dmxaddinput.obj `if test -f 'dmxaddinput.c'; then $(CYGPATH_W) 'dmxaddinput.c'; else $(CYGPATH_W) '$(srcdir)/dmxaddinput.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/dmxaddinput-dmxaddinput.Tpo $(DEPDIR)/dmxaddinput-dmxaddinput.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmxaddinput.c' object='dmxaddinput-dmxaddinput.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dmxaddinput_CFLAGS) $(CFLAGS) -c -o dmxaddinput-dmxaddinput.obj `if test -f 'dmxaddinput.c'; then $(CYGPATH_W) 'dmxaddinput.c'; else $(CYGPATH_W) '$(srcdir)/dmxaddinput.c'; fi`
-
-dmxaddscreen-dmxaddscreen.o: dmxaddscreen.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dmxaddscreen_CFLAGS) $(CFLAGS) -MT dmxaddscreen-dmxaddscreen.o -MD -MP -MF $(DEPDIR)/dmxaddscreen-dmxaddscreen.Tpo -c -o dmxaddscreen-dmxaddscreen.o `test -f 'dmxaddscreen.c' || echo '$(srcdir)/'`dmxaddscreen.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/dmxaddscreen-dmxaddscreen.Tpo $(DEPDIR)/dmxaddscreen-dmxaddscreen.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmxaddscreen.c' object='dmxaddscreen-dmxaddscreen.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dmxaddscreen_CFLAGS) $(CFLAGS) -c -o dmxaddscreen-dmxaddscreen.o `test -f 'dmxaddscreen.c' || echo '$(srcdir)/'`dmxaddscreen.c
-
-dmxaddscreen-dmxaddscreen.obj: dmxaddscreen.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dmxaddscreen_CFLAGS) $(CFLAGS) -MT dmxaddscreen-dmxaddscreen.obj -MD -MP -MF $(DEPDIR)/dmxaddscreen-dmxaddscreen.Tpo -c -o dmxaddscreen-dmxaddscreen.obj `if test -f 'dmxaddscreen.c'; then $(CYGPATH_W) 'dmxaddscreen.c'; else $(CYGPATH_W) '$(srcdir)/dmxaddscreen.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/dmxaddscreen-dmxaddscreen.Tpo $(DEPDIR)/dmxaddscreen-dmxaddscreen.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmxaddscreen.c' object='dmxaddscreen-dmxaddscreen.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dmxaddscreen_CFLAGS) $(CFLAGS) -c -o dmxaddscreen-dmxaddscreen.obj `if test -f 'dmxaddscreen.c'; then $(CYGPATH_W) 'dmxaddscreen.c'; else $(CYGPATH_W) '$(srcdir)/dmxaddscreen.c'; fi`
-
-dmxinfo-dmxinfo.o: dmxinfo.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dmxinfo_CFLAGS) $(CFLAGS) -MT dmxinfo-dmxinfo.o -MD -MP -MF $(DEPDIR)/dmxinfo-dmxinfo.Tpo -c -o dmxinfo-dmxinfo.o `test -f 'dmxinfo.c' || echo '$(srcdir)/'`dmxinfo.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/dmxinfo-dmxinfo.Tpo $(DEPDIR)/dmxinfo-dmxinfo.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmxinfo.c' object='dmxinfo-dmxinfo.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dmxinfo_CFLAGS) $(CFLAGS) -c -o dmxinfo-dmxinfo.o `test -f 'dmxinfo.c' || echo '$(srcdir)/'`dmxinfo.c
-
-dmxinfo-dmxinfo.obj: dmxinfo.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dmxinfo_CFLAGS) $(CFLAGS) -MT dmxinfo-dmxinfo.obj -MD -MP -MF $(DEPDIR)/dmxinfo-dmxinfo.Tpo -c -o dmxinfo-dmxinfo.obj `if test -f 'dmxinfo.c'; then $(CYGPATH_W) 'dmxinfo.c'; else $(CYGPATH_W) '$(srcdir)/dmxinfo.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/dmxinfo-dmxinfo.Tpo $(DEPDIR)/dmxinfo-dmxinfo.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmxinfo.c' object='dmxinfo-dmxinfo.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dmxinfo_CFLAGS) $(CFLAGS) -c -o dmxinfo-dmxinfo.obj `if test -f 'dmxinfo.c'; then $(CYGPATH_W) 'dmxinfo.c'; else $(CYGPATH_W) '$(srcdir)/dmxinfo.c'; fi`
-
-dmxreconfig-dmxreconfig.o: dmxreconfig.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dmxreconfig_CFLAGS) $(CFLAGS) -MT dmxreconfig-dmxreconfig.o -MD -MP -MF $(DEPDIR)/dmxreconfig-dmxreconfig.Tpo -c -o dmxreconfig-dmxreconfig.o `test -f 'dmxreconfig.c' || echo '$(srcdir)/'`dmxreconfig.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/dmxreconfig-dmxreconfig.Tpo $(DEPDIR)/dmxreconfig-dmxreconfig.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmxreconfig.c' object='dmxreconfig-dmxreconfig.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dmxreconfig_CFLAGS) $(CFLAGS) -c -o dmxreconfig-dmxreconfig.o `test -f 'dmxreconfig.c' || echo '$(srcdir)/'`dmxreconfig.c
-
-dmxreconfig-dmxreconfig.obj: dmxreconfig.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dmxreconfig_CFLAGS) $(CFLAGS) -MT dmxreconfig-dmxreconfig.obj -MD -MP -MF $(DEPDIR)/dmxreconfig-dmxreconfig.Tpo -c -o dmxreconfig-dmxreconfig.obj `if test -f 'dmxreconfig.c'; then $(CYGPATH_W) 'dmxreconfig.c'; else $(CYGPATH_W) '$(srcdir)/dmxreconfig.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/dmxreconfig-dmxreconfig.Tpo $(DEPDIR)/dmxreconfig-dmxreconfig.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmxreconfig.c' object='dmxreconfig-dmxreconfig.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dmxreconfig_CFLAGS) $(CFLAGS) -c -o dmxreconfig-dmxreconfig.obj `if test -f 'dmxreconfig.c'; then $(CYGPATH_W) 'dmxreconfig.c'; else $(CYGPATH_W) '$(srcdir)/dmxreconfig.c'; fi`
-
-dmxresize-dmxresize.o: dmxresize.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dmxresize_CFLAGS) $(CFLAGS) -MT dmxresize-dmxresize.o -MD -MP -MF $(DEPDIR)/dmxresize-dmxresize.Tpo -c -o dmxresize-dmxresize.o `test -f 'dmxresize.c' || echo '$(srcdir)/'`dmxresize.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/dmxresize-dmxresize.Tpo $(DEPDIR)/dmxresize-dmxresize.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmxresize.c' object='dmxresize-dmxresize.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dmxresize_CFLAGS) $(CFLAGS) -c -o dmxresize-dmxresize.o `test -f 'dmxresize.c' || echo '$(srcdir)/'`dmxresize.c
-
-dmxresize-dmxresize.obj: dmxresize.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dmxresize_CFLAGS) $(CFLAGS) -MT dmxresize-dmxresize.obj -MD -MP -MF $(DEPDIR)/dmxresize-dmxresize.Tpo -c -o dmxresize-dmxresize.obj `if test -f 'dmxresize.c'; then $(CYGPATH_W) 'dmxresize.c'; else $(CYGPATH_W) '$(srcdir)/dmxresize.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/dmxresize-dmxresize.Tpo $(DEPDIR)/dmxresize-dmxresize.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmxresize.c' object='dmxresize-dmxresize.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dmxresize_CFLAGS) $(CFLAGS) -c -o dmxresize-dmxresize.obj `if test -f 'dmxresize.c'; then $(CYGPATH_W) 'dmxresize.c'; else $(CYGPATH_W) '$(srcdir)/dmxresize.c'; fi`
-
-dmxrminput-dmxrminput.o: dmxrminput.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dmxrminput_CFLAGS) $(CFLAGS) -MT dmxrminput-dmxrminput.o -MD -MP -MF $(DEPDIR)/dmxrminput-dmxrminput.Tpo -c -o dmxrminput-dmxrminput.o `test -f 'dmxrminput.c' || echo '$(srcdir)/'`dmxrminput.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/dmxrminput-dmxrminput.Tpo $(DEPDIR)/dmxrminput-dmxrminput.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmxrminput.c' object='dmxrminput-dmxrminput.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dmxrminput_CFLAGS) $(CFLAGS) -c -o dmxrminput-dmxrminput.o `test -f 'dmxrminput.c' || echo '$(srcdir)/'`dmxrminput.c
-
-dmxrminput-dmxrminput.obj: dmxrminput.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dmxrminput_CFLAGS) $(CFLAGS) -MT dmxrminput-dmxrminput.obj -MD -MP -MF $(DEPDIR)/dmxrminput-dmxrminput.Tpo -c -o dmxrminput-dmxrminput.obj `if test -f 'dmxrminput.c'; then $(CYGPATH_W) 'dmxrminput.c'; else $(CYGPATH_W) '$(srcdir)/dmxrminput.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/dmxrminput-dmxrminput.Tpo $(DEPDIR)/dmxrminput-dmxrminput.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmxrminput.c' object='dmxrminput-dmxrminput.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dmxrminput_CFLAGS) $(CFLAGS) -c -o dmxrminput-dmxrminput.obj `if test -f 'dmxrminput.c'; then $(CYGPATH_W) 'dmxrminput.c'; else $(CYGPATH_W) '$(srcdir)/dmxrminput.c'; fi`
-
-dmxrmscreen-dmxrmscreen.o: dmxrmscreen.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dmxrmscreen_CFLAGS) $(CFLAGS) -MT dmxrmscreen-dmxrmscreen.o -MD -MP -MF $(DEPDIR)/dmxrmscreen-dmxrmscreen.Tpo -c -o dmxrmscreen-dmxrmscreen.o `test -f 'dmxrmscreen.c' || echo '$(srcdir)/'`dmxrmscreen.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/dmxrmscreen-dmxrmscreen.Tpo $(DEPDIR)/dmxrmscreen-dmxrmscreen.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmxrmscreen.c' object='dmxrmscreen-dmxrmscreen.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dmxrmscreen_CFLAGS) $(CFLAGS) -c -o dmxrmscreen-dmxrmscreen.o `test -f 'dmxrmscreen.c' || echo '$(srcdir)/'`dmxrmscreen.c
-
-dmxrmscreen-dmxrmscreen.obj: dmxrmscreen.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dmxrmscreen_CFLAGS) $(CFLAGS) -MT dmxrmscreen-dmxrmscreen.obj -MD -MP -MF $(DEPDIR)/dmxrmscreen-dmxrmscreen.Tpo -c -o dmxrmscreen-dmxrmscreen.obj `if test -f 'dmxrmscreen.c'; then $(CYGPATH_W) 'dmxrmscreen.c'; else $(CYGPATH_W) '$(srcdir)/dmxrmscreen.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/dmxrmscreen-dmxrmscreen.Tpo $(DEPDIR)/dmxrmscreen-dmxrmscreen.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmxrmscreen.c' object='dmxrmscreen-dmxrmscreen.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dmxrmscreen_CFLAGS) $(CFLAGS) -c -o dmxrmscreen-dmxrmscreen.obj `if test -f 'dmxrmscreen.c'; then $(CYGPATH_W) 'dmxrmscreen.c'; else $(CYGPATH_W) '$(srcdir)/dmxrmscreen.c'; fi`
-
-dmxwininfo-dmxwininfo.o: dmxwininfo.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dmxwininfo_CFLAGS) $(CFLAGS) -MT dmxwininfo-dmxwininfo.o -MD -MP -MF $(DEPDIR)/dmxwininfo-dmxwininfo.Tpo -c -o dmxwininfo-dmxwininfo.o `test -f 'dmxwininfo.c' || echo '$(srcdir)/'`dmxwininfo.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/dmxwininfo-dmxwininfo.Tpo $(DEPDIR)/dmxwininfo-dmxwininfo.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmxwininfo.c' object='dmxwininfo-dmxwininfo.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dmxwininfo_CFLAGS) $(CFLAGS) -c -o dmxwininfo-dmxwininfo.o `test -f 'dmxwininfo.c' || echo '$(srcdir)/'`dmxwininfo.c
-
-dmxwininfo-dmxwininfo.obj: dmxwininfo.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dmxwininfo_CFLAGS) $(CFLAGS) -MT dmxwininfo-dmxwininfo.obj -MD -MP -MF $(DEPDIR)/dmxwininfo-dmxwininfo.Tpo -c -o dmxwininfo-dmxwininfo.obj `if test -f 'dmxwininfo.c'; then $(CYGPATH_W) 'dmxwininfo.c'; else $(CYGPATH_W) '$(srcdir)/dmxwininfo.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/dmxwininfo-dmxwininfo.Tpo $(DEPDIR)/dmxwininfo-dmxwininfo.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dmxwininfo.c' object='dmxwininfo-dmxwininfo.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dmxwininfo_CFLAGS) $(CFLAGS) -c -o dmxwininfo-dmxwininfo.obj `if test -f 'dmxwininfo.c'; then $(CYGPATH_W) 'dmxwininfo.c'; else $(CYGPATH_W) '$(srcdir)/dmxwininfo.c'; fi`
-
-ev-ev.o: ev.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ev_CFLAGS) $(CFLAGS) -MT ev-ev.o -MD -MP -MF $(DEPDIR)/ev-ev.Tpo -c -o ev-ev.o `test -f 'ev.c' || echo '$(srcdir)/'`ev.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/ev-ev.Tpo $(DEPDIR)/ev-ev.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='ev.c' object='ev-ev.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ev_CFLAGS) $(CFLAGS) -c -o ev-ev.o `test -f 'ev.c' || echo '$(srcdir)/'`ev.c
-
-ev-ev.obj: ev.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ev_CFLAGS) $(CFLAGS) -MT ev-ev.obj -MD -MP -MF $(DEPDIR)/ev-ev.Tpo -c -o ev-ev.obj `if test -f 'ev.c'; then $(CYGPATH_W) 'ev.c'; else $(CYGPATH_W) '$(srcdir)/ev.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/ev-ev.Tpo $(DEPDIR)/ev-ev.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='ev.c' object='ev-ev.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ev_CFLAGS) $(CFLAGS) -c -o ev-ev.obj `if test -f 'ev.c'; then $(CYGPATH_W) 'ev.c'; else $(CYGPATH_W) '$(srcdir)/ev.c'; fi`
-
-evi-evi.o: evi.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(evi_CFLAGS) $(CFLAGS) -MT evi-evi.o -MD -MP -MF $(DEPDIR)/evi-evi.Tpo -c -o evi-evi.o `test -f 'evi.c' || echo '$(srcdir)/'`evi.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/evi-evi.Tpo $(DEPDIR)/evi-evi.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='evi.c' object='evi-evi.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(evi_CFLAGS) $(CFLAGS) -c -o evi-evi.o `test -f 'evi.c' || echo '$(srcdir)/'`evi.c
-
-evi-evi.obj: evi.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(evi_CFLAGS) $(CFLAGS) -MT evi-evi.obj -MD -MP -MF $(DEPDIR)/evi-evi.Tpo -c -o evi-evi.obj `if test -f 'evi.c'; then $(CYGPATH_W) 'evi.c'; else $(CYGPATH_W) '$(srcdir)/evi.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/evi-evi.Tpo $(DEPDIR)/evi-evi.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='evi.c' object='evi-evi.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(evi_CFLAGS) $(CFLAGS) -c -o evi-evi.obj `if test -f 'evi.c'; then $(CYGPATH_W) 'evi.c'; else $(CYGPATH_W) '$(srcdir)/evi.c'; fi`
-
-res-res.o: res.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(res_CFLAGS) $(CFLAGS) -MT res-res.o -MD -MP -MF $(DEPDIR)/res-res.Tpo -c -o res-res.o `test -f 'res.c' || echo '$(srcdir)/'`res.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/res-res.Tpo $(DEPDIR)/res-res.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='res.c' object='res-res.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(res_CFLAGS) $(CFLAGS) -c -o res-res.o `test -f 'res.c' || echo '$(srcdir)/'`res.c
-
-res-res.obj: res.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(res_CFLAGS) $(CFLAGS) -MT res-res.obj -MD -MP -MF $(DEPDIR)/res-res.Tpo -c -o res-res.obj `if test -f 'res.c'; then $(CYGPATH_W) 'res.c'; else $(CYGPATH_W) '$(srcdir)/res.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/res-res.Tpo $(DEPDIR)/res-res.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='res.c' object='res-res.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(res_CFLAGS) $(CFLAGS) -c -o res-res.obj `if test -f 'res.c'; then $(CYGPATH_W) 'res.c'; else $(CYGPATH_W) '$(srcdir)/res.c'; fi`
-
-xbell-xbell.o: xbell.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xbell_CFLAGS) $(CFLAGS) -MT xbell-xbell.o -MD -MP -MF $(DEPDIR)/xbell-xbell.Tpo -c -o xbell-xbell.o `test -f 'xbell.c' || echo '$(srcdir)/'`xbell.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/xbell-xbell.Tpo $(DEPDIR)/xbell-xbell.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='xbell.c' object='xbell-xbell.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xbell_CFLAGS) $(CFLAGS) -c -o xbell-xbell.o `test -f 'xbell.c' || echo '$(srcdir)/'`xbell.c
-
-xbell-xbell.obj: xbell.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xbell_CFLAGS) $(CFLAGS) -MT xbell-xbell.obj -MD -MP -MF $(DEPDIR)/xbell-xbell.Tpo -c -o xbell-xbell.obj `if test -f 'xbell.c'; then $(CYGPATH_W) 'xbell.c'; else $(CYGPATH_W) '$(srcdir)/xbell.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/xbell-xbell.Tpo $(DEPDIR)/xbell-xbell.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='xbell.c' object='xbell-xbell.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xbell_CFLAGS) $(CFLAGS) -c -o xbell-xbell.obj `if test -f 'xbell.c'; then $(CYGPATH_W) 'xbell.c'; else $(CYGPATH_W) '$(srcdir)/xbell.c'; fi`
-
-xinput-xinput.o: xinput.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xinput_CFLAGS) $(CFLAGS) -MT xinput-xinput.o -MD -MP -MF $(DEPDIR)/xinput-xinput.Tpo -c -o xinput-xinput.o `test -f 'xinput.c' || echo '$(srcdir)/'`xinput.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/xinput-xinput.Tpo $(DEPDIR)/xinput-xinput.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='xinput.c' object='xinput-xinput.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xinput_CFLAGS) $(CFLAGS) -c -o xinput-xinput.o `test -f 'xinput.c' || echo '$(srcdir)/'`xinput.c
-
-xinput-xinput.obj: xinput.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xinput_CFLAGS) $(CFLAGS) -MT xinput-xinput.obj -MD -MP -MF $(DEPDIR)/xinput-xinput.Tpo -c -o xinput-xinput.obj `if test -f 'xinput.c'; then $(CYGPATH_W) 'xinput.c'; else $(CYGPATH_W) '$(srcdir)/xinput.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/xinput-xinput.Tpo $(DEPDIR)/xinput-xinput.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='xinput.c' object='xinput-xinput.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xinput_CFLAGS) $(CFLAGS) -c -o xinput-xinput.obj `if test -f 'xinput.c'; then $(CYGPATH_W) 'xinput.c'; else $(CYGPATH_W) '$(srcdir)/xinput.c'; fi`
-
-xled-xled.o: xled.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xled_CFLAGS) $(CFLAGS) -MT xled-xled.o -MD -MP -MF $(DEPDIR)/xled-xled.Tpo -c -o xled-xled.o `test -f 'xled.c' || echo '$(srcdir)/'`xled.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/xled-xled.Tpo $(DEPDIR)/xled-xled.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='xled.c' object='xled-xled.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xled_CFLAGS) $(CFLAGS) -c -o xled-xled.o `test -f 'xled.c' || echo '$(srcdir)/'`xled.c
-
-xled-xled.obj: xled.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xled_CFLAGS) $(CFLAGS) -MT xled-xled.obj -MD -MP -MF $(DEPDIR)/xled-xled.Tpo -c -o xled-xled.obj `if test -f 'xled.c'; then $(CYGPATH_W) 'xled.c'; else $(CYGPATH_W) '$(srcdir)/xled.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/xled-xled.Tpo $(DEPDIR)/xled-xled.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='xled.c' object='xled-xled.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xled_CFLAGS) $(CFLAGS) -c -o xled-xled.obj `if test -f 'xled.c'; then $(CYGPATH_W) 'xled.c'; else $(CYGPATH_W) '$(srcdir)/xled.c'; fi`
-
-xtest-xtest.o: xtest.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xtest_CFLAGS) $(CFLAGS) -MT xtest-xtest.o -MD -MP -MF $(DEPDIR)/xtest-xtest.Tpo -c -o xtest-xtest.o `test -f 'xtest.c' || echo '$(srcdir)/'`xtest.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/xtest-xtest.Tpo $(DEPDIR)/xtest-xtest.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='xtest.c' object='xtest-xtest.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xtest_CFLAGS) $(CFLAGS) -c -o xtest-xtest.o `test -f 'xtest.c' || echo '$(srcdir)/'`xtest.c
-
-xtest-xtest.obj: xtest.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xtest_CFLAGS) $(CFLAGS) -MT xtest-xtest.obj -MD -MP -MF $(DEPDIR)/xtest-xtest.Tpo -c -o xtest-xtest.obj `if test -f 'xtest.c'; then $(CYGPATH_W) 'xtest.c'; else $(CYGPATH_W) '$(srcdir)/xtest.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/xtest-xtest.Tpo $(DEPDIR)/xtest-xtest.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='xtest.c' object='xtest-xtest.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xtest_CFLAGS) $(CFLAGS) -c -o xtest-xtest.obj `if test -f 'xtest.c'; then $(CYGPATH_W) 'xtest.c'; else $(CYGPATH_W) '$(srcdir)/xtest.c'; fi`
-
-mostlyclean-libtool:
-	-rm -f *.lo
-
-clean-libtool:
-	-rm -rf .libs _libs
-
-ID: $(am__tagged_files)
-	$(am__define_uniq_tagged_files); mkid -fID $$unique
-tags: tags-am
-TAGS: tags
-
-tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
-	set x; \
-	here=`pwd`; \
-	$(am__define_uniq_tagged_files); \
-	shift; \
-	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
-	  test -n "$$unique" || unique=$$empty_fix; \
-	  if test $$# -gt 0; then \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      "$$@" $$unique; \
-	  else \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      $$unique; \
-	  fi; \
-	fi
-ctags: ctags-am
-
-CTAGS: ctags
-ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
-	$(am__define_uniq_tagged_files); \
-	test -z "$(CTAGS_ARGS)$$unique" \
-	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$unique
-
-GTAGS:
-	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && $(am__cd) $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) "$$here"
-cscopelist: cscopelist-am
-
-cscopelist-am: $(am__tagged_files)
-	list='$(am__tagged_files)'; \
-	case "$(srcdir)" in \
-	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
-	  *) sdir=$(subdir)/$(srcdir) ;; \
-	esac; \
-	for i in $$list; do \
-	  if test -f "$$i"; then \
-	    echo "$(subdir)/$$i"; \
-	  else \
-	    echo "$$sdir/$$i"; \
-	  fi; \
-	done >> $(top_builddir)/cscope.files
-
-distclean-tags:
-	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(BUILT_SOURCES)
-	$(MAKE) $(AM_MAKEFLAGS) distdir-am
-
-distdir-am: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	list='$(DISTFILES)'; \
-	  dist_files=`for file in $$list; do echo $$file; done | \
-	  sed -e "s|^$$srcdirstrip/||;t" \
-	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
-	case $$dist_files in \
-	  */*) $(MKDIR_P) `echo "$$dist_files" | \
-			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
-			   sort -u` ;; \
-	esac; \
-	for file in $$dist_files; do \
-	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  if test -d $$d/$$file; then \
-	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
-	    if test -d "$(distdir)/$$file"; then \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
-	  else \
-	    test -f "$(distdir)/$$file" \
-	    || cp -p $$d/$$file "$(distdir)/$$file" \
-	    || exit 1; \
-	  fi; \
-	done
-check-am: all-am
-check: check-am
-all-am: Makefile $(PROGRAMS)
-installdirs:
-	for dir in "$(DESTDIR)$(bindir)"; do \
-	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
-	done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
-	if test -z '$(STRIP)'; then \
-	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	      install; \
-	else \
-	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
-	fi
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
-	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
-	@echo "This command is intended for maintainers to use"
-	@echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-binPROGRAMS clean-generic clean-libtool \
-	clean-noinstPROGRAMS mostlyclean-am
-
-distclean: distclean-am
-		-rm -f ./$(DEPDIR)/dmxaddinput-dmxaddinput.Po
-	-rm -f ./$(DEPDIR)/dmxaddscreen-dmxaddscreen.Po
-	-rm -f ./$(DEPDIR)/dmxinfo-dmxinfo.Po
-	-rm -f ./$(DEPDIR)/dmxreconfig-dmxreconfig.Po
-	-rm -f ./$(DEPDIR)/dmxresize-dmxresize.Po
-	-rm -f ./$(DEPDIR)/dmxrminput-dmxrminput.Po
-	-rm -f ./$(DEPDIR)/dmxrmscreen-dmxrmscreen.Po
-	-rm -f ./$(DEPDIR)/dmxwininfo-dmxwininfo.Po
-	-rm -f ./$(DEPDIR)/ev-ev.Po
-	-rm -f ./$(DEPDIR)/evi-evi.Po
-	-rm -f ./$(DEPDIR)/res-res.Po
-	-rm -f ./$(DEPDIR)/xbell-xbell.Po
-	-rm -f ./$(DEPDIR)/xinput-xinput.Po
-	-rm -f ./$(DEPDIR)/xled-xled.Po
-	-rm -f ./$(DEPDIR)/xtest-xtest.Po
-	-rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
-	distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am: install-binPROGRAMS
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
-		-rm -f ./$(DEPDIR)/dmxaddinput-dmxaddinput.Po
-	-rm -f ./$(DEPDIR)/dmxaddscreen-dmxaddscreen.Po
-	-rm -f ./$(DEPDIR)/dmxinfo-dmxinfo.Po
-	-rm -f ./$(DEPDIR)/dmxreconfig-dmxreconfig.Po
-	-rm -f ./$(DEPDIR)/dmxresize-dmxresize.Po
-	-rm -f ./$(DEPDIR)/dmxrminput-dmxrminput.Po
-	-rm -f ./$(DEPDIR)/dmxrmscreen-dmxrmscreen.Po
-	-rm -f ./$(DEPDIR)/dmxwininfo-dmxwininfo.Po
-	-rm -f ./$(DEPDIR)/ev-ev.Po
-	-rm -f ./$(DEPDIR)/evi-evi.Po
-	-rm -f ./$(DEPDIR)/res-res.Po
-	-rm -f ./$(DEPDIR)/xbell-xbell.Po
-	-rm -f ./$(DEPDIR)/xinput-xinput.Po
-	-rm -f ./$(DEPDIR)/xled-xled.Po
-	-rm -f ./$(DEPDIR)/xtest-xtest.Po
-	-rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic \
-	mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-binPROGRAMS
-
-.MAKE: install-am install-strip
-
-.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
-	clean-binPROGRAMS clean-generic clean-libtool \
-	clean-noinstPROGRAMS cscopelist-am ctags ctags-am distclean \
-	distclean-compile distclean-generic distclean-libtool \
-	distclean-tags distdir dvi dvi-am html html-am info info-am \
-	install install-am install-binPROGRAMS install-data \
-	install-data-am install-dvi install-dvi-am install-exec \
-	install-exec-am install-html install-html-am install-info \
-	install-info-am install-man install-pdf install-pdf-am \
-	install-ps install-ps-am install-strip installcheck \
-	installcheck-am installdirs maintainer-clean \
-	maintainer-clean-generic mostlyclean mostlyclean-compile \
-	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-	tags tags-am uninstall uninstall-am uninstall-binPROGRAMS
-
-.PRECIOUS: Makefile
-
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/hw/dmx/examples/dmxaddinput.c b/hw/dmx/examples/dmxaddinput.c
deleted file mode 100644
index fdd09b9..0000000
--- a/hw/dmx/examples/dmxaddinput.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright 2003,2004 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <X11/Xlib.h>
-#include <X11/extensions/dmxext.h>
-
-int
-main(int argc, char **argv)
-{
-    Display *display = NULL;
-    int event_base;
-    int error_base;
-    int major_version, minor_version, patch_version;
-    int id = -1;
-    int status;
-
-    if (argc != 5) {
-        printf("Usage: %s display c|b name|screen isCore\n", argv[0]);
-        return -1;
-    }
-
-    if (!(display = XOpenDisplay(argv[1]))) {
-        printf("Cannot open display %s\n", argv[1]);
-        return -1;
-    }
-
-    if (!DMXQueryExtension(display, &event_base, &error_base)) {
-        printf("DMX extension not present\n");
-        return -1;
-    }
-    printf("DMX extension present: event_base = %d, error_base = %d\n",
-           event_base, error_base);
-
-    if (!DMXQueryVersion(display,
-                         &major_version, &minor_version, &patch_version)) {
-        printf("Could not get extension version\n");
-        return -1;
-    }
-    printf("Extension version: %d.%d patch %d\n",
-           major_version, minor_version, patch_version);
-
-    if (argv[2][0] == 'c') {
-        status = DMXAddConsoleInput(display, argv[3], atoi(argv[4]), &id);
-    }
-    else {
-        status = DMXAddBackendInput(display, atoi(argv[3]), atoi(argv[4]), &id);
-    }
-
-    printf("status = %d, id = %d\n", status, id);
-
-    XCloseDisplay(display);
-    return 0;
-}
diff --git a/hw/dmx/examples/dmxaddscreen.c b/hw/dmx/examples/dmxaddscreen.c
deleted file mode 100644
index 58129fa..0000000
--- a/hw/dmx/examples/dmxaddscreen.c
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Copyright 2003-2004 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Kevin E. Martin <kem@redhat.com>
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <X11/Xlib.h>
-#include <X11/extensions/dmxext.h>
-
-int
-main(int argc, char **argv)
-{
-    Display *display = NULL;
-    int event_base;
-    int error_base;
-    int major_version, minor_version, patch_version;
-    int screenNum;
-    DMXScreenAttributes attr;
-    unsigned int mask = 0;
-
-    if (argc != 4 && argc != 14) {
-        printf
-            ("Usage: %s display screenNum displayName [scrnx scrny scrnw scrnh rootx rooty rootw rooth originx originy]\n",
-             argv[0]);
-        return -1;
-    }
-
-    if (!(display = XOpenDisplay(argv[1]))) {
-        printf("Cannot open display %s\n", argv[1]);
-        return -1;
-    }
-
-    screenNum = strtol(argv[2], NULL, 0);
-    if (argc == 14) {
-        mask |= (DMXScreenWindowXoffset |
-                 DMXScreenWindowYoffset |
-                 DMXScreenWindowWidth | DMXScreenWindowHeight);
-        attr.screenWindowXoffset = strtol(argv[4], NULL, 0);
-        attr.screenWindowYoffset = strtol(argv[5], NULL, 0);
-        attr.screenWindowWidth = strtol(argv[6], NULL, 0);
-        attr.screenWindowHeight = strtol(argv[7], NULL, 0);
-
-        mask |= (DMXRootWindowXoffset |
-                 DMXRootWindowYoffset |
-                 DMXRootWindowWidth | DMXRootWindowHeight);
-        attr.rootWindowXoffset = strtol(argv[8], NULL, 0);
-        attr.rootWindowYoffset = strtol(argv[9], NULL, 0);
-        attr.rootWindowWidth = strtol(argv[10], NULL, 0);
-        attr.rootWindowHeight = strtol(argv[11], NULL, 0);
-
-        mask |= DMXRootWindowXorigin | DMXRootWindowYorigin;
-        attr.rootWindowXorigin = strtol(argv[12], NULL, 0);
-        attr.rootWindowYorigin = strtol(argv[13], NULL, 0);
-    }
-
-    if (!DMXQueryExtension(display, &event_base, &error_base)) {
-        printf("DMX extension not present\n");
-        return -1;
-    }
-    printf("DMX extension present: event_base = %d, error_base = %d\n",
-           event_base, error_base);
-
-    if (!DMXQueryVersion(display,
-                         &major_version, &minor_version, &patch_version)) {
-        printf("Could not get extension version\n");
-        return -1;
-    }
-    printf("Extension version: %d.%d patch %d\n",
-           major_version, minor_version, patch_version);
-
-    if (!DMXAddScreen(display, argv[3], mask, &attr, &screenNum))
-        printf("Failed to add %s as screen #%d\n", argv[2], screenNum);
-
-    XCloseDisplay(display);
-    return 0;
-}
diff --git a/hw/dmx/examples/dmxinfo.c b/hw/dmx/examples/dmxinfo.c
deleted file mode 100644
index fea94e2..0000000
--- a/hw/dmx/examples/dmxinfo.c
+++ /dev/null
@@ -1,256 +0,0 @@
-/*
- * Copyright 2001,2002 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <X11/Xlib.h>
-#include <X11/extensions/dmxext.h>
-
-static void
-indent(int level)
-{
-    int i;
-
-    for (i = 0; i < level; i++)
-        printf("    ");
-}
-
-static void
-print_window_id(const char *displayName, Display * display,
-                Window window, int level, int child)
-{
-    char *name;
-
-    if (!XFetchName(display, window, &name))
-        name = NULL;
-    indent(level);
-    if (child)
-        printf("(%d) ", child);
-    printf("%s window 0x%08lx: %s%s\n",
-           displayName,
-           (long unsigned) window,
-           name ? name : "", (window == DefaultRootWindow(display))
-           ? " (DMX root window)" : "");
-    if (name)
-        XFree(name);
-}
-
-static void
-print_info(Display * display, Window window, int level, int child)
-{
-    DMXWindowAttributes winfo[128];
-    int count;
-    int i;
-
-    if (!DMXGetWindowAttributes(display, window, &count, 128, winfo)) {
-        printf("Could not get window information for 0x%08lx\n",
-               (long unsigned) window);
-        exit(-2);
-    }
-    printf("\n");
-    print_window_id("DMX", display, window, level, child);
-    for (i = 0; i < count; i++) {
-        DMXScreenAttributes sinfo;
-        Display *backend;
-
-        /* This could also be cached -- the information doesn't change. */
-        if (!DMXGetScreenAttributes(display, winfo[i].screen, &sinfo)) {
-            printf("Could not get screen information for screen %d\n", i);
-            exit(-2);
-        }
-        if (!(backend = XOpenDisplay(sinfo.displayName))) {
-            printf("Cannot open backend display %s\n", sinfo.displayName);
-            exit(-2);
-        }
-        XCloseDisplay(backend);
-
-        indent(level + 1);
-        printf("%s window 0x%08lx: %dx%d%+d%+d",
-               sinfo.displayName,
-               (long unsigned) winfo[i].window,
-               winfo[i].pos.width, winfo[i].pos.height,
-               winfo[i].pos.x, winfo[i].pos.y);
-        if (!winfo[i].vis.width
-            && !winfo[i].vis.height && !winfo[i].vis.x && !winfo[i].vis.y)
-            printf(" not visible\n");
-        else if (winfo[i].vis.width == winfo[i].pos.width
-                 && winfo[i].vis.height == winfo[i].pos.height) {
-            printf(" %+d%+d\n", winfo[i].vis.x, winfo[i].vis.y);
-        }
-        else {
-            printf(" %dx%d%+d%+d\n",
-                   winfo[i].vis.width, winfo[i].vis.height,
-                   winfo[i].vis.x, winfo[i].vis.y);
-        }
-    }
-}
-
-static void
-print_tree(Display * display, Window window, int level, int child)
-{
-    Window root, parent;
-    Window *list;
-    unsigned int count;
-    unsigned int i;
-
-    print_info(display, window, level, child);
-
-    if (!XQueryTree(display, window, &root, &parent, &list, &count)) {
-        printf("Cannot query window tree for 0x%08lx\n",
-               (long unsigned) window);
-        exit(-3);
-    }
-
-    if (count) {
-        indent(level + 1);
-        printf("%d child%s:\n", count, count > 1 ? "ren" : "");
-        for (i = 0; i < count; i++) {
-            print_tree(display, list[i], level + 1, i + 1);
-        }
-    }
-}
-
-static const char *
-core(DMXInputAttributes * iinfo)
-{
-    if (iinfo->isCore)
-        return "core";
-    else if (iinfo->sendsCore)
-        return "extension (sends core)";
-    else
-        return "extension";
-}
-
-int
-main(int argc, char **argv)
-{
-    Display *display = NULL;
-    Window window = 0;
-    int event_base;
-    int error_base;
-    int major_version, minor_version, patch_version;
-    DMXScreenAttributes sinfo;
-    DMXInputAttributes iinfo;
-    int count;
-    int i;
-
-    if (argc == 2 || argc == 3) {
-        if (!(display = XOpenDisplay(argv[1]))) {
-            printf("Cannot open display %s\n", argv[1]);
-            return -1;
-        }
-        if (argc == 3)
-            window = strtol(argv[2], NULL, 0);
-    }
-    else {
-        printf("Usage: %s display [windowid]\n", argv[0]);
-        return -1;
-    }
-
-    if (!display && !(display = XOpenDisplay(NULL))) {
-        printf("Cannot open default display\n");
-        return -1;
-    }
-
-    if (!DMXQueryExtension(display, &event_base, &error_base)) {
-        printf("DMX extension not present\n");
-        return -1;
-    }
-    printf("DMX extension present: event_base = %d, error_base = %d\n",
-           event_base, error_base);
-
-    if (!DMXQueryVersion(display,
-                         &major_version, &minor_version, &patch_version)) {
-        printf("Could not get extension version\n");
-        return -1;
-    }
-    printf("Extension version: %d.%d patch %d\n",
-           major_version, minor_version, patch_version);
-
-    if (!DMXGetScreenCount(display, &count)) {
-        printf("Could not get screen count\n");
-        return -1;
-    }
-    printf("Screen count = %d\n", count);
-
-    for (i = 0; i < count; i++) {
-        if (!DMXGetScreenAttributes(display, i, &sinfo)) {
-            printf("Could not get screen information for %d\n", i);
-            return -1;
-        }
-        printf("%d: %s %ux%u+%d+%d %d @%dx%d (root: %dx%d%+d%+d)\n",
-               i, sinfo.displayName,
-               sinfo.screenWindowWidth, sinfo.screenWindowHeight,
-               sinfo.screenWindowXoffset, sinfo.screenWindowYoffset,
-               sinfo.logicalScreen,
-               sinfo.rootWindowXorigin, sinfo.rootWindowYorigin,
-               sinfo.rootWindowWidth, sinfo.rootWindowHeight,
-               sinfo.rootWindowXoffset, sinfo.rootWindowYoffset);
-    }
-
-    if (major_version == 1 && minor_version >= 1) {
-        if (!DMXGetInputCount(display, &count)) {
-            printf("Could not get input count\n");
-            return -1;
-        }
-        printf("Input count = %d\n", count);
-        for (i = 0; i < count; i++) {
-            if (!DMXGetInputAttributes(display, i, &iinfo)) {
-                printf("Could not get input information for id %d\n", i);
-                return -1;
-            }
-            switch (iinfo.inputType) {
-            case DMXLocalInputType:
-                printf("  %2d local   %-20.20s %s\n", i, "", core(&iinfo));
-                break;
-            case DMXConsoleInputType:
-                printf("  %2d console %-20.20s %s\n",
-                       i, iinfo.name, core(&iinfo));
-                break;
-            case DMXBackendInputType:
-                printf("  %2d backend %-20.20s id=%2d screen=%2d %s\n",
-                       i, iinfo.name, iinfo.physicalId, iinfo.physicalScreen,
-                       core(&iinfo));
-                break;
-            }
-        }
-    }
-
-    if (window)
-        print_info(display, window, 0, 0);
-    else
-        print_tree(display, DefaultRootWindow(display), 0, 0);
-
-    XCloseDisplay(display);
-    return 0;
-}
diff --git a/hw/dmx/examples/dmxreconfig.c b/hw/dmx/examples/dmxreconfig.c
deleted file mode 100644
index 9587682..0000000
--- a/hw/dmx/examples/dmxreconfig.c
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * Copyright 2003 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Kevin E. Martin <kem@redhat.com>
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <X11/Xlib.h>
-#include <X11/extensions/dmxext.h>
-
-int
-main(int argc, char **argv)
-{
-    Display *display = NULL;
-    int event_base;
-    int error_base;
-    int major_version, minor_version, patch_version;
-    int screen;
-    DMXScreenAttributes attr;
-    unsigned int mask = 0;
-    int status;
-    int errorScreen;
-
-    if (argc != 13) {
-        fprintf(stderr,
-                "Usage: %s display screen scrnx scrny scrnw scrnh rootx rooty rootw rooth originx originy\n",
-                argv[0]);
-        return -1;
-    }
-
-    if (!(display = XOpenDisplay(argv[1]))) {
-        fprintf(stderr, "Cannot open display %s\n", argv[1]);
-        return -1;
-    }
-
-    screen = strtol(argv[2], NULL, 0);
-
-    mask |= (DMXScreenWindowXoffset |
-             DMXScreenWindowYoffset |
-             DMXScreenWindowWidth | DMXScreenWindowHeight);
-    attr.screenWindowXoffset = strtol(argv[3], NULL, 0);
-    attr.screenWindowYoffset = strtol(argv[4], NULL, 0);
-    attr.screenWindowWidth = strtol(argv[5], NULL, 0);
-    attr.screenWindowHeight = strtol(argv[6], NULL, 0);
-
-    mask |= (DMXRootWindowXoffset |
-             DMXRootWindowYoffset | DMXRootWindowWidth | DMXRootWindowHeight);
-    attr.rootWindowXoffset = strtol(argv[7], NULL, 0);
-    attr.rootWindowYoffset = strtol(argv[8], NULL, 0);
-    attr.rootWindowWidth = strtol(argv[9], NULL, 0);
-    attr.rootWindowHeight = strtol(argv[10], NULL, 0);
-
-    mask |= DMXRootWindowXorigin | DMXRootWindowYorigin;
-    attr.rootWindowXorigin = strtol(argv[11], NULL, 0);
-    attr.rootWindowYorigin = strtol(argv[12], NULL, 0);
-
-    if (!DMXQueryExtension(display, &event_base, &error_base)) {
-        fprintf(stderr, "DMX extension not present\n");
-        return -1;
-    }
-    printf("DMX extension present: event_base = %d, error_base = %d\n",
-           event_base, error_base);
-
-    if (!DMXQueryVersion(display,
-                         &major_version, &minor_version, &patch_version)) {
-        fprintf(stderr, "Could not get extension version\n");
-        return -1;
-    }
-    printf("Extension version: %d.%d patch %d\n",
-           major_version, minor_version, patch_version);
-
-    if (major_version == 1 && minor_version < 3) {
-        fprintf(stderr,
-                "ReconfigureScreen not supported in this extension version\n");
-        return -1;
-    }
-
-    if (major_version < 2) {
-        fprintf(stderr,
-                "ChangeScreensAttributes not supported in this extension "
-                "version\n");
-        return -1;
-    }
-
-    if (!(status = DMXChangeScreensAttributes(display, 1, &screen, 1, &mask,
-                                              &attr, &errorScreen))) {
-        printf("Reconfigured screen #%d to "
-               "%dx%d%s%d%s%d %dx%d%s%d%s%d %s%d%s%d\n",
-               screen,
-               attr.screenWindowWidth,
-               attr.screenWindowHeight,
-               (attr.screenWindowXoffset < 0 ? "" : "+"),
-               attr.screenWindowXoffset,
-               (attr.screenWindowYoffset < 0 ? "" : "+"),
-               attr.screenWindowYoffset,
-               attr.rootWindowWidth,
-               attr.rootWindowHeight,
-               (attr.rootWindowXoffset < 0 ? "" : "+"),
-               attr.rootWindowXoffset,
-               (attr.rootWindowYoffset < 0 ? "" : "+"),
-               attr.rootWindowYoffset,
-               (attr.rootWindowXorigin < 0 ? "" : "+"),
-               attr.rootWindowXorigin,
-               (attr.rootWindowYorigin < 0 ? "" : "+"), attr.rootWindowYorigin);
-    }
-    else {
-        fprintf(stderr,
-                "Could not set screen #%d to "
-                "%dx%d%s%d%s%d %dx%d%s%d%s%d %s%d%s%d\n"
-                "[status = %d, errorScreen=%d]\n",
-                screen,
-                attr.screenWindowWidth,
-                attr.screenWindowHeight,
-                (attr.screenWindowXoffset < 0 ? "" : "+"),
-                attr.screenWindowXoffset,
-                (attr.screenWindowYoffset < 0 ? "" : "+"),
-                attr.screenWindowYoffset,
-                attr.rootWindowWidth,
-                attr.rootWindowHeight,
-                (attr.rootWindowXoffset < 0 ? "" : "+"),
-                attr.rootWindowXoffset,
-                (attr.rootWindowYoffset < 0 ? "" : "+"),
-                attr.rootWindowYoffset,
-                (attr.rootWindowXorigin < 0 ? "" : "+"),
-                attr.rootWindowXorigin,
-                (attr.rootWindowYorigin < 0 ? "" : "+"),
-                attr.rootWindowYorigin, status, errorScreen);
-        return -1;
-    }
-
-    XCloseDisplay(display);
-    return 0;
-}
diff --git a/hw/dmx/examples/dmxresize.c b/hw/dmx/examples/dmxresize.c
deleted file mode 100644
index fed3bd0..0000000
--- a/hw/dmx/examples/dmxresize.c
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Copyright 2003 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <X11/Xlib.h>
-#include <X11/extensions/dmxext.h>
-
-int
-main(int argc, char **argv)
-{
-    Display *display = NULL;
-    int event_base;
-    int error_base;
-    int major_version, minor_version, patch_version;
-    int width, height, shiftX, shiftY, status;
-    DMXDesktopAttributes attr;
-    unsigned int mask;
-
-    if (argc != 6) {
-        printf("Usage: %s display width height shiftX shiftY\n", argv[0]);
-        return -1;
-    }
-
-    if (!(display = XOpenDisplay(argv[1]))) {
-        printf("Cannot open display %s\n", argv[1]);
-        return -1;
-    }
-
-    width = strtol(argv[2], NULL, 0);
-    height = strtol(argv[3], NULL, 0);
-    shiftX = strtol(argv[4], NULL, 0);
-    shiftY = strtol(argv[5], NULL, 0);
-
-    if (!DMXQueryExtension(display, &event_base, &error_base)) {
-        printf("DMX extension not present\n");
-        return -1;
-    }
-    printf("DMX extension present: event_base = %d, error_base = %d\n",
-           event_base, error_base);
-
-    if (!DMXQueryVersion(display,
-                         &major_version, &minor_version, &patch_version)) {
-        printf("Could not get extension version\n");
-        return -1;
-    }
-    printf("Extension version: %d.%d patch %d\n",
-           major_version, minor_version, patch_version);
-
-    mask = (DMXDesktopWidth |
-            DMXDesktopHeight | DMXDesktopShiftX | DMXDesktopShiftY);
-    attr.width = width;
-    attr.height = height;
-    attr.shiftX = shiftX;
-    attr.shiftY = shiftY;
-    switch (status = DMXChangeDesktopAttributes(display, mask, &attr)) {
-    case DmxBadXinerama:
-        printf("status = %d (No Xinerama)\n", status);
-        break;
-    case DmxBadValue:
-        printf("status = %d (Bad Value)\n", status);
-        break;
-    case Success:
-        printf("status = %d (Success)\n", status);
-        break;
-    default:
-        printf("status = %d (UNKNOWN ERROR *****)\n", status);
-        break;
-    }
-
-    XCloseDisplay(display);
-    return 0;
-}
diff --git a/hw/dmx/examples/dmxrminput.c b/hw/dmx/examples/dmxrminput.c
deleted file mode 100644
index 0113a7f..0000000
--- a/hw/dmx/examples/dmxrminput.c
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright 2003,2004 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <X11/Xlib.h>
-#include <X11/extensions/dmxext.h>
-
-int
-main(int argc, char **argv)
-{
-    Display *display = NULL;
-    int event_base;
-    int error_base;
-    int major_version, minor_version, patch_version;
-    int status;
-
-    if (argc != 3) {
-        printf("Usage: %s display id\n", argv[0]);
-        return -1;
-    }
-
-    if (!(display = XOpenDisplay(argv[1]))) {
-        printf("Cannot open display %s\n", argv[1]);
-        return -1;
-    }
-
-    if (!DMXQueryExtension(display, &event_base, &error_base)) {
-        printf("DMX extension not present\n");
-        return -1;
-    }
-    printf("DMX extension present: event_base = %d, error_base = %d\n",
-           event_base, error_base);
-
-    if (!DMXQueryVersion(display,
-                         &major_version, &minor_version, &patch_version)) {
-        printf("Could not get extension version\n");
-        return -1;
-    }
-    printf("Extension version: %d.%d patch %d\n",
-           major_version, minor_version, patch_version);
-
-    status = DMXRemoveInput(display, atoi(argv[2]));
-
-    printf("status = %d\n", status);
-
-    XCloseDisplay(display);
-    return 0;
-}
diff --git a/hw/dmx/examples/dmxrmscreen.c b/hw/dmx/examples/dmxrmscreen.c
deleted file mode 100644
index 627875b..0000000
--- a/hw/dmx/examples/dmxrmscreen.c
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright 2003-2004 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Kevin E. Martin <kem@redhat.com>
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <X11/Xlib.h>
-#include <X11/extensions/dmxext.h>
-
-int
-main(int argc, char **argv)
-{
-    Display *display = NULL;
-    int event_base;
-    int error_base;
-    int major_version, minor_version, patch_version;
-    int screenNum;
-
-    if (argc != 3) {
-        printf("Usage: %s display screenNum\n", argv[0]);
-        return -1;
-    }
-
-    if (!(display = XOpenDisplay(argv[1]))) {
-        printf("Cannot open display %s\n", argv[1]);
-        return -1;
-    }
-
-    screenNum = strtol(argv[2], NULL, 0);
-
-    if (!DMXQueryExtension(display, &event_base, &error_base)) {
-        printf("DMX extension not present\n");
-        return -1;
-    }
-    printf("DMX extension present: event_base = %d, error_base = %d\n",
-           event_base, error_base);
-
-    if (!DMXQueryVersion(display,
-                         &major_version, &minor_version, &patch_version)) {
-        printf("Could not get extension version\n");
-        return -1;
-    }
-    printf("Extension version: %d.%d patch %d\n",
-           major_version, minor_version, patch_version);
-
-    if (!DMXRemoveScreen(display, screenNum))
-        printf("Failed to remove screen #%d\n", screenNum);
-
-    XCloseDisplay(display);
-    return 0;
-}
diff --git a/hw/dmx/examples/dmxwininfo.c b/hw/dmx/examples/dmxwininfo.c
deleted file mode 100644
index 9b1ce76..0000000
--- a/hw/dmx/examples/dmxwininfo.c
+++ /dev/null
@@ -1,477 +0,0 @@
-/*
- * Copyright (c) 2003 by the XFree86 Project, Inc.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Create a window and use the DMX extension to query the window's
- * back-end properties.  Display the info inside the window itself.
- *
- * Brian Paul
- * 23 Jan 2003
- */
-
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-#include <X11/extensions/dmxext.h>
-
-static const char *FontName = "fixed";
-
-static void
-EventLoop(Display * dpy, Window win, GC gc)
-{
-    XEvent ev;
-
-    while (1) {
-        XNextEvent(dpy, &ev);
-        switch (ev.type) {
-        case ReparentNotify:
-            break;
-        case MapNotify:
-            break;
-        case ConfigureNotify:
-        case Expose:
-        {
-            int numScreens, count, i;
-            DMXWindowAttributes *winInfo;
-            int x, y;
-            const char *msg = "DMX window info:";
-
-            DMXGetScreenCount(dpy, &numScreens);
-            winInfo = (DMXWindowAttributes *)
-                malloc(numScreens * sizeof(DMXWindowAttributes));
-            assert(winInfo);
-            if (!DMXGetWindowAttributes(dpy, win, &count, numScreens, winInfo)) {
-                printf("Could not get window information for 0x%08lx\n",
-                       (long unsigned) win);
-            }
-            x = y = 50;
-            XClearWindow(dpy, win);
-            XDrawString(dpy, win, gc, x, y, msg, strlen(msg));
-            y += 20;
-            for (i = 0; i < count; i++) {
-                char str[500];
-
-                snprintf(str, sizeof(str),
-                         "screen %d:  pos: %dx%d+%d+%d  visible: %dx%d+%d+%d",
-                         winInfo[i].screen,
-                         winInfo[i].pos.width, winInfo[i].pos.height,
-                         winInfo[i].pos.x, winInfo[i].pos.y,
-                         winInfo[i].vis.width, winInfo[i].vis.height,
-                         winInfo[i].vis.x, winInfo[i].vis.y);
-                XDrawString(dpy, win, gc, x, y, str, strlen(str));
-                y += 20;
-            }
-            free(winInfo);
-        }
-            break;
-        default:
-            printf("Event type 0x%x\n", ev.type);
-        }
-    }
-}
-
-int
-main(int argc, char *argv[])
-{
-    const char *displayName = NULL;
-    Display *dpy;
-    int event_base, error_base;
-    int scr, n;
-    long vinfoMask, attrMask;
-    XVisualInfo vinfoTemp, *visInfo;
-    Visual *vis;
-    Window win, root;
-    XSetWindowAttributes attr;
-    XFontStruct *fontInfo;
-    GC gc;
-
-    if (argc > 1) {
-        displayName = argv[1];
-    }
-
-    dpy = XOpenDisplay(displayName);
-    if (!dpy) {
-        fprintf(stderr, "Unable to open display %s\n", displayName);
-        return -1;
-    }
-
-    if (!DMXQueryExtension(dpy, &event_base, &error_base)) {
-        fprintf(stderr, "DMX extension not available on this display.\n");
-        return -1;
-    }
-
-    scr = DefaultScreen(dpy);
-    root = RootWindow(dpy, scr);
-    vis = DefaultVisual(dpy, scr);
-
-    vinfoMask = VisualIDMask;
-    vinfoTemp.visualid = vis->visualid;
-    visInfo = XGetVisualInfo(dpy, vinfoMask, &vinfoTemp, &n);
-    if (!visInfo || n != 1) {
-        fprintf(stderr, "Unable to get visual!\n");
-        XCloseDisplay(dpy);
-        return -1;
-    }
-
-    attr.background_pixel = 0;
-    attr.border_pixel = 0;
-    attr.colormap = XCreateColormap(dpy, root, visInfo->visual, AllocNone);
-    attr.event_mask = StructureNotifyMask | ExposureMask;
-    attrMask = CWBackPixel | CWBorderPixel | CWColormap | CWEventMask;
-
-    win = XCreateWindow(dpy, root, 500, 500, 600, 400,  /* x, y, w, h */
-                        0,      /* border_width */
-                        visInfo->depth, InputOutput,
-                        visInfo->visual, attrMask, &attr);
-
-    if (!win) {
-        fprintf(stderr, "Unable to create window!\n");
-        XCloseDisplay(dpy);
-        return -1;
-    }
-
-    fontInfo = XLoadQueryFont(dpy, FontName);
-    if (!fontInfo) {
-        fprintf(stderr, "Error: font %s not found\n", FontName);
-        exit(0);
-    }
-
-    gc = XCreateGC(dpy, win, 0, NULL);
-    XSetBackground(dpy, gc, BlackPixel(dpy, scr));
-    XSetForeground(dpy, gc, WhitePixel(dpy, scr));
-    XSetFont(dpy, gc, fontInfo->fid);
-
-    XMapWindow(dpy, win);
-
-    EventLoop(dpy, win, gc);
-
-    XDestroyWindow(dpy, win);
-    XCloseDisplay(dpy);
-    return 0;
-}
-
-#if 00
-
-static void
-make_window(char *title, int color_flag)
-{
-    int x = 10, y = 10, width = 400, height = 300;
-    Display *dpy;
-    int scr;
-    Window root, win;
-    Colormap cmap;
-    XColor xcolor;
-    int attr_flags;
-    XVisualInfo *visinfo;
-    XSetWindowAttributes attr;
-    XTextProperty tp;
-    XSizeHints sh;
-    XEvent e;
-    XMesaContext context;
-    XMesaVisual visual;
-    XMesaBuffer buffer;
-
-    /*
-     * Do the usual X things to make a window.
-     */
-
-    dpy = XOpenDisplay(NULL);
-    if (!dpy) {
-        printf("Couldn't open default display!\n");
-        exit(1);
-    }
-
-    scr = DefaultScreen(dpy);
-    root = RootWindow(dpy, scr);
-
-    /* alloc visinfo struct */
-    visinfo = (XVisualInfo *) malloc(sizeof(XVisualInfo));
-
-    /* Get a visual and colormap */
-    if (color_flag) {
-        /* Open TrueColor window */
-
-/*
-      if (!XMatchVisualInfo( dpy, scr, 24, TrueColor, visinfo )) {
-	 printf("Couldn't get 24-bit TrueColor visual!\n");
-	 exit(1);
-      }
-*/
-        if (!XMatchVisualInfo(dpy, scr, 8, PseudoColor, visinfo)) {
-            printf("Couldn't get 8-bit PseudoColor visual!\n");
-            exit(1);
-        }
-
-        cmap = XCreateColormap(dpy, root, visinfo->visual, AllocNone);
-        Black = Red = Green = Blue = 0;
-    }
-    else {
-        /* Open color index window */
-
-        if (!XMatchVisualInfo(dpy, scr, 8, PseudoColor, visinfo)) {
-            printf("Couldn't get 8-bit PseudoColor visual\n");
-            exit(1);
-        }
-
-        cmap = XCreateColormap(dpy, root, visinfo->visual, AllocNone);
-
-        /* Allocate colors */
-        xcolor.red = 0x0;
-        xcolor.green = 0x0;
-        xcolor.blue = 0x0;
-        xcolor.flags = DoRed | DoGreen | DoBlue;
-        if (!XAllocColor(dpy, cmap, &xcolor)) {
-            printf("Couldn't allocate black!\n");
-            exit(1);
-        }
-        Black = xcolor.pixel;
-
-        xcolor.red = 0xffff;
-        xcolor.green = 0x0;
-        xcolor.blue = 0x0;
-        xcolor.flags = DoRed | DoGreen | DoBlue;
-        if (!XAllocColor(dpy, cmap, &xcolor)) {
-            printf("Couldn't allocate red!\n");
-            exit(1);
-        }
-        Red = xcolor.pixel;
-
-        xcolor.red = 0x0;
-        xcolor.green = 0xffff;
-        xcolor.blue = 0x0;
-        xcolor.flags = DoRed | DoGreen | DoBlue;
-        if (!XAllocColor(dpy, cmap, &xcolor)) {
-            printf("Couldn't allocate green!\n");
-            exit(1);
-        }
-        Green = xcolor.pixel;
-
-        xcolor.red = 0x0;
-        xcolor.green = 0x0;
-        xcolor.blue = 0xffff;
-        xcolor.flags = DoRed | DoGreen | DoBlue;
-        if (!XAllocColor(dpy, cmap, &xcolor)) {
-            printf("Couldn't allocate blue!\n");
-            exit(1);
-        }
-        Blue = xcolor.pixel;
-    }
-
-    /* set window attributes */
-    attr.colormap = cmap;
-    attr.event_mask = ExposureMask | StructureNotifyMask;
-    attr.border_pixel = BlackPixel(dpy, scr);
-    attr.background_pixel = BlackPixel(dpy, scr);
-    attr_flags = CWColormap | CWEventMask | CWBorderPixel | CWBackPixel;
-
-    /* Create the window */
-    win = XCreateWindow(dpy, root, x, y, width, height, 0,
-                        visinfo->depth, InputOutput,
-                        visinfo->visual, attr_flags, &attr);
-    if (!win) {
-        printf("Couldn't open window!\n");
-        exit(1);
-    }
-
-    XStringListToTextProperty(&title, 1, &tp);
-    sh.flags = USPosition | USSize;
-    XSetWMProperties(dpy, win, &tp, &tp, 0, 0, &sh, 0, 0);
-    XMapWindow(dpy, win);
-    while (1) {
-        XNextEvent(dpy, &e);
-        if (e.type == MapNotify && e.xmap.window == win) {
-            break;
-        }
-    }
-
-    /*
-     * Now do the special Mesa/Xlib stuff!
-     */
-
-    visual = XMesaCreateVisual(dpy, visinfo, (GLboolean) color_flag, GL_FALSE,  /* alpha_flag */
-                               GL_FALSE,        /* db_flag */
-                               GL_FALSE,        /* stereo flag */
-                               GL_FALSE,        /* ximage_flag */
-                               0,       /* depth size */
-                               0,       /* stencil size */
-                               0, 0, 0, 0,      /* accum_size */
-                               0,       /* num samples */
-                               0,       /* level */
-                               0        /* caveat */
-        );
-    if (!visual) {
-        printf("Couldn't create Mesa/X visual!\n");
-        exit(1);
-    }
-
-    /* Create a Mesa rendering context */
-    context = XMesaCreateContext(visual, NULL   /* share_list */
-        );
-    if (!context) {
-        printf("Couldn't create Mesa/X context!\n");
-        exit(1);
-    }
-
-    buffer = XMesaCreateWindowBuffer(visual, win);
-    if (!buffer) {
-        printf("Couldn't create Mesa/X buffer!\n");
-        exit(1);
-    }
-
-    XMesaMakeCurrent(context, buffer);
-
-    /* Ready to render! */
-}
-
-static void
-draw_cube(void)
-{
-    /* X faces */
-    glIndexi(Red);
-    glColor3f(1.0, 0.0, 0.0);
-    glBegin(GL_POLYGON);
-    glVertex3f(1.0, 1.0, 1.0);
-    glVertex3f(1.0, -1.0, 1.0);
-    glVertex3f(1.0, -1.0, -1.0);
-    glVertex3f(1.0, 1.0, -1.0);
-    glEnd();
-
-    glBegin(GL_POLYGON);
-    glVertex3f(-1.0, 1.0, 1.0);
-    glVertex3f(-1.0, 1.0, -1.0);
-    glVertex3f(-1.0, -1.0, -1.0);
-    glVertex3f(-1.0, -1.0, 1.0);
-    glEnd();
-
-    /* Y faces */
-    glIndexi(Green);
-    glColor3f(0.0, 1.0, 0.0);
-    glBegin(GL_POLYGON);
-    glVertex3f(1.0, 1.0, 1.0);
-    glVertex3f(1.0, 1.0, -1.0);
-    glVertex3f(-1.0, 1.0, -1.0);
-    glVertex3f(-1.0, 1.0, 1.0);
-    glEnd();
-
-    glBegin(GL_POLYGON);
-    glVertex3f(1.0, -1.0, 1.0);
-    glVertex3f(-1.0, -1.0, 1.0);
-    glVertex3f(-1.0, -1.0, -1.0);
-    glVertex3f(1.0, -1.0, -1.0);
-    glEnd();
-
-    /* Z faces */
-    glIndexi(Blue);
-    glColor3f(0.0, 0.0, 1.0);
-    glBegin(GL_POLYGON);
-    glVertex3f(1.0, 1.0, 1.0);
-    glVertex3f(-1.0, 1.0, 1.0);
-    glVertex3f(-1.0, -1.0, 1.0);
-    glVertex3f(1.0, -1.0, 1.0);
-    glEnd();
-
-    glBegin(GL_POLYGON);
-    glVertex3f(1.0, 1.0, -1.0);
-    glVertex3f(1.0, -1.0, -1.0);
-    glVertex3f(-1.0, -1.0, -1.0);
-    glVertex3f(-1.0, 1.0, -1.0);
-    glEnd();
-}
-
-static void
-display_loop(void)
-{
-    GLfloat xrot, yrot, zrot;
-
-    xrot = yrot = zrot = 0.0;
-
-    glClearColor(0.0, 0.0, 0.0, 0.0);
-    glClearIndex(Black);
-
-    glMatrixMode(GL_PROJECTION);
-    glLoadIdentity();
-    glFrustum(-1.0, 1.0, -1.0, 1.0, 1.0, 10.0);
-    glTranslatef(0.0, 0.0, -5.0);
-
-    glMatrixMode(GL_MODELVIEW);
-    glLoadIdentity();
-
-    glCullFace(GL_BACK);
-    glEnable(GL_CULL_FACE);
-
-    glShadeModel(GL_FLAT);
-
-    while (1) {
-        glClear(GL_COLOR_BUFFER_BIT);
-        glPushMatrix();
-        glRotatef(xrot, 1.0, 0.0, 0.0);
-        glRotatef(yrot, 0.0, 1.0, 0.0);
-        glRotatef(zrot, 0.0, 0.0, 1.0);
-
-        draw_cube();
-
-        glPopMatrix();
-        glFinish();
-
-        xrot += 10.0;
-        yrot += 7.0;
-        zrot -= 3.0;
-    }
-
-}
-
-int
-main(int argc, char *argv[])
-{
-    int mode = 0;
-
-    if (argc >= 2) {
-        if (strcmp(argv[1], "-ci") == 0)
-            mode = 0;
-        else if (strcmp(argv[1], "-rgb") == 0)
-            mode = 1;
-        else {
-            printf("Bad flag: %s\n", argv[1]);
-            printf("Specify -ci for 8-bit color index or -rgb for RGB mode\n");
-            exit(1);
-        }
-    }
-    else {
-        printf("Specify -ci for 8-bit color index or -rgb for RGB mode\n");
-        printf("Defaulting to  8-bit color index\n");
-    }
-
-    make_window(argv[0], mode);
-
-    display_loop();
-    return 0;
-}
-
-#endif
diff --git a/hw/dmx/examples/ev.c b/hw/dmx/examples/ev.c
deleted file mode 100644
index 09e703c..0000000
--- a/hw/dmx/examples/ev.c
+++ /dev/null
@@ -1,274 +0,0 @@
-/*
- * Copyright 2002 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * This is a simple test program that reads from /dev/input/event*,
- * decoding events into a human readable form.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <sys/types.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <time.h>
-#include <linux/input.h>
-
-struct input_event event;
-
-int
-main(int argc, char **argv)
-{
-    char name[64];              /* RATS: Use ok, but could be better */
-    char buf[256] = { 0, };     /* RATS: Use ok */
-    unsigned char mask[EV_MAX / 8 + 1]; /* RATS: Use ok */
-    int version;
-    int fd = 0;
-    int rc;
-    int i, j;
-    const char *tmp;
-
-#define test_bit(bit) (mask[(bit)/8] & (1 << ((bit)%8)))
-
-    for (i = 0; i < 32; i++) {
-        snprintf(name, sizeof(name), "/dev/input/event%d", i);
-        if ((fd = open(name, O_RDONLY, 0)) >= 0) {
-            ioctl(fd, EVIOCGVERSION, &version);
-            ioctl(fd, EVIOCGNAME(sizeof(buf)), buf);
-            ioctl(fd, EVIOCGBIT(0, sizeof(mask)), mask);
-            printf("%s\n", name);
-            printf("    evdev version: %d.%d.%d\n",
-                   version >> 16, (version >> 8) & 0xff, version & 0xff);
-            printf("    name: %s\n", buf);
-            printf("    features:");
-            for (j = 0; j < EV_MAX; j++) {
-                if (test_bit(j)) {
-                    const char *type = "unknown";
-
-                    switch (j) {
-                    case EV_KEY:
-                        type = "keys/buttons";
-                        break;
-                    case EV_REL:
-                        type = "relative";
-                        break;
-                    case EV_ABS:
-                        type = "absolute";
-                        break;
-                    case EV_MSC:
-                        type = "reserved";
-                        break;
-                    case EV_LED:
-                        type = "leds";
-                        break;
-                    case EV_SND:
-                        type = "sound";
-                        break;
-                    case EV_REP:
-                        type = "repeat";
-                        break;
-                    case EV_FF:
-                        type = "feedback";
-                        break;
-                    }
-                    printf(" %s", type);
-                }
-            }
-            printf("\n");
-            close(fd);
-        }
-    }
-
-    if (argc > 1) {
-        snprintf(name, sizeof(name), "/dev/input/event%d", atoi(argv[1]));
-        if ((fd = open(name, O_RDWR, 0)) >= 0) {
-            printf("%s: open, fd = %d\n", name, fd);
-            for (i = 0; i < LED_MAX; i++) {
-                event.time.tv_sec = time(0);
-                event.time.tv_usec = 0;
-                event.type = EV_LED;
-                event.code = i;
-                event.value = 0;
-                write(fd, &event, sizeof(event));
-            }
-
-            while ((rc = read(fd, &event, sizeof(event))) > 0) {
-                printf("%-24.24s.%06lu type 0x%04x; code 0x%04x;"
-                       " value 0x%08x; ",
-                       ctime(&event.time.tv_sec),
-                       event.time.tv_usec, event.type, event.code, event.value);
-                switch (event.type) {
-                case EV_KEY:
-                    if (event.code > BTN_MISC) {
-                        printf("Button %d %s",
-                               event.code & 0xff,
-                               event.value ? "press" : "release");
-                    }
-                    else {
-                        printf("Key %d (0x%x) %s",
-                               event.code & 0xff,
-                               event.code & 0xff,
-                               event.value ? "press" : "release");
-                    }
-                    break;
-                case EV_REL:
-                    switch (event.code) {
-                    case REL_X:
-                        tmp = "X";
-                        break;
-                    case REL_Y:
-                        tmp = "Y";
-                        break;
-                    case REL_HWHEEL:
-                        tmp = "HWHEEL";
-                        break;
-                    case REL_DIAL:
-                        tmp = "DIAL";
-                        break;
-                    case REL_WHEEL:
-                        tmp = "WHEEL";
-                        break;
-                    case REL_MISC:
-                        tmp = "MISC";
-                        break;
-                    default:
-                        tmp = "UNKNOWN";
-                        break;
-                    }
-                    printf("Relative %s %d", tmp, event.value);
-                    break;
-                case EV_ABS:
-                    switch (event.code) {
-                    case ABS_X:
-                        tmp = "X";
-                        break;
-                    case ABS_Y:
-                        tmp = "Y";
-                        break;
-                    case ABS_Z:
-                        tmp = "Z";
-                        break;
-                    case ABS_RX:
-                        tmp = "RX";
-                        break;
-                    case ABS_RY:
-                        tmp = "RY";
-                        break;
-                    case ABS_RZ:
-                        tmp = "RZ";
-                        break;
-                    case ABS_THROTTLE:
-                        tmp = "THROTTLE";
-                        break;
-                    case ABS_RUDDER:
-                        tmp = "RUDDER";
-                        break;
-                    case ABS_WHEEL:
-                        tmp = "WHEEL";
-                        break;
-                    case ABS_GAS:
-                        tmp = "GAS";
-                        break;
-                    case ABS_BRAKE:
-                        tmp = "BRAKE";
-                        break;
-                    case ABS_HAT0X:
-                        tmp = "HAT0X";
-                        break;
-                    case ABS_HAT0Y:
-                        tmp = "HAT0Y";
-                        break;
-                    case ABS_HAT1X:
-                        tmp = "HAT1X";
-                        break;
-                    case ABS_HAT1Y:
-                        tmp = "HAT1Y";
-                        break;
-                    case ABS_HAT2X:
-                        tmp = "HAT2X";
-                        break;
-                    case ABS_HAT2Y:
-                        tmp = "HAT2Y";
-                        break;
-                    case ABS_HAT3X:
-                        tmp = "HAT3X";
-                        break;
-                    case ABS_HAT3Y:
-                        tmp = "HAT3Y";
-                        break;
-                    case ABS_PRESSURE:
-                        tmp = "PRESSURE";
-                        break;
-                    case ABS_DISTANCE:
-                        tmp = "DISTANCE";
-                        break;
-                    case ABS_TILT_X:
-                        tmp = "TILT_X";
-                        break;
-                    case ABS_TILT_Y:
-                        tmp = "TILT_Y";
-                        break;
-                    case ABS_MISC:
-                        tmp = "MISC";
-                        break;
-                    default:
-                        tmp = "UNKNOWN";
-                        break;
-                    }
-                    printf("Absolute %s %d", tmp, event.value);
-                    break;
-                case EV_MSC:
-                    printf("Misc");
-                    break;
-                case EV_LED:
-                    printf("Led");
-                    break;
-                case EV_SND:
-                    printf("Snd");
-                    break;
-                case EV_REP:
-                    printf("Rep");
-                    break;
-                case EV_FF:
-                    printf("FF");
-                    break;
-                    break;
-                }
-                printf("\n");
-            }
-            printf("rc = %d, (%s)\n", rc, strerror(errno));
-            close(fd);
-        }
-    }
-    return 0;
-}
diff --git a/hw/dmx/examples/evi.c b/hw/dmx/examples/evi.c
deleted file mode 100644
index 64dfb7e..0000000
--- a/hw/dmx/examples/evi.c
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright 2003 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <X11/Xlib.h>
-#include <X11/extensions/XEVI.h>
-
-int
-main(int argc, char **argv)
-{
-    Display *display = NULL;
-    int major_version, minor_version;
-    ExtendedVisualInfo *evi;
-    int count;
-    int i;
-
-    if (argc == 2) {
-        if (!(display = XOpenDisplay(argv[1]))) {
-            printf("Cannot open display %s\n", argv[1]);
-            return -1;
-        }
-    }
-    else {
-        printf("Usage: %s display\n", argv[0]);
-        return -1;
-    }
-
-    if (!display && !(display = XOpenDisplay(NULL))) {
-        printf("Cannot open default display\n");
-        return -1;
-    }
-
-    if (!XeviQueryVersion(display, &major_version, &minor_version)) {
-        printf("EVI extension not present\n");
-        return -1;
-    }
-    printf("EVI Extension version: %d.%d\n", major_version, minor_version);
-
-    XeviGetVisualInfo(display, NULL, 0, &evi, &count);
-
-    for (i = 0; i < count; i++) {
-        printf("%02d vid=0x%02lx screen=%d level=%d type=%u value=%u"
-               " min=%u max=%u conflicts=%u\n",
-               i,
-               (long unsigned) evi[i].core_visual_id,
-               evi[i].screen,
-               evi[i].level,
-               evi[i].transparency_type,
-               evi[i].transparency_value,
-               evi[i].min_hw_colormaps,
-               evi[i].max_hw_colormaps, evi[i].num_colormap_conflicts);
-    }
-
-    XCloseDisplay(display);
-    return 0;
-}
diff --git a/hw/dmx/examples/meson.build b/hw/dmx/examples/meson.build
deleted file mode 100644
index ad0d798..0000000
--- a/hw/dmx/examples/meson.build
+++ /dev/null
@@ -1,53 +0,0 @@
-dmxexamples_dep = [
-    dependency('xext'),
-    dependency('x11'),
-]
-
-dmx_dep = dependency('dmx', version: '>= 1.0.99.1')
-
-dmx_examples = [
-    ['dmxinfo', [dmx_dep]],
-    ['dmxwininfo', [dmx_dep, dependency('xmu')]],
-    ['dmxreconfig', [dmx_dep]],
-    ['dmxresize', [dmx_dep]],
-    ['dmxaddscreen', [dmx_dep]],
-    ['dmxrmscreen', [dmx_dep]],
-    ['dmxaddinput', [dmx_dep]],
-    ['dmxrminput', [dmx_dep]],
-]
-
-noinst_dmx_examples = [
-    ['xinput', [dmx_dep, dependency('xi')]],
-    ['xtest', [dependency('xtst')]],
-    ['evi', []],
-    ['xled', []],
-    ['xbell', []],
-    ['res', [dependency('xres')]],
-]
-
-foreach ex: dmx_examples
-    bin = ex[0]
-    extra_dep = ex[1]
-
-    executable(
-        bin,
-        bin + '.c',
-        dependencies: [dmxexamples_dep, extra_dep],
-        install: true
-    )
-endforeach
-
-foreach ex: noinst_dmx_examples
-    bin = ex[0]
-    extra_dep = ex[1]
-
-    executable(
-        bin,
-        bin + '.c',
-        dependencies: [dmxexamples_dep, extra_dep],
-    )
-endforeach
-
-if cc.has_header('linux/input.h')
-    executable('ev', 'ev.c')
-endif
diff --git a/hw/dmx/examples/res.c b/hw/dmx/examples/res.c
deleted file mode 100644
index 138216e..0000000
--- a/hw/dmx/examples/res.c
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright 2003 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <X11/Xlib.h>
-#include <X11/extensions/XRes.h>
-
-int
-main(int argc, char **argv)
-{
-    Display *display = NULL;
-    int major_version, minor_version;
-    int event, error;
-    int count;
-    int i;
-    XResClient *clients;
-
-    if (argc == 2) {
-        if (!(display = XOpenDisplay(argv[1]))) {
-            printf("Cannot open display %s\n", argv[1]);
-            return -1;
-        }
-    }
-    else {
-        printf("Usage: %s display\n", argv[0]);
-        return -1;
-    }
-
-    if (!display && !(display = XOpenDisplay(NULL))) {
-        printf("Cannot open default display\n");
-        return -1;
-    }
-
-    if (!XResQueryExtension(display, &event, &error)) {
-        printf("X-Resource extension not present\n");
-        return -1;
-    }
-    printf("X-Resource extension present: event=%d error=%d\n", event, error);
-
-    if (!XResQueryVersion(display, &major_version, &minor_version)) {
-        printf("XResQueryVersion call failed\n");
-        return -1;
-    }
-    printf("X-Resource extension version: %d.%d\n",
-           major_version, minor_version);
-
-    XResQueryClients(display, &count, &clients);
-
-    printf("%d clients:\n", count);
-    for (i = 0; i < count; i++) {
-        int c, j;
-        XResType *types;
-
-        XResQueryClientResources(display, clients[i].resource_base, &c, &types);
-        printf(" %3d: base = 0x%lx, mask = 0x%lx, %d resource types:\n",
-               i, (long unsigned) clients[i].resource_base,
-               (long unsigned) clients[i].resource_mask, c);
-        for (j = 0; j < c; j++) {
-            char *name = XGetAtomName(display, types[j].resource_type);
-
-            printf("      %2d: %s %d\n", j, name, types[j].count);
-            XFree(name);
-        }
-        XFree(types);
-    }
-
-    XFree(clients);
-    XCloseDisplay(display);
-    return 0;
-}
diff --git a/hw/dmx/examples/xbell.c b/hw/dmx/examples/xbell.c
deleted file mode 100644
index 543db24..0000000
--- a/hw/dmx/examples/xbell.c
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright 2002 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <X11/Xlib.h>
-
-static void
-pkc(XKeyboardControl * kc, unsigned long vm)
-{
-    if (vm & KBKeyClickPercent)
-        printf("   key_click_percent  = %d\n", kc->key_click_percent);
-    if (vm & KBBellPercent)
-        printf("   bell_percent       = %d\n", kc->bell_percent);
-    if (vm & KBBellPitch)
-        printf("   bell_pitch         = %d\n", kc->bell_pitch);
-    if (vm & KBBellDuration)
-        printf("   bell_duration      = %d\n", kc->bell_duration);
-    if (vm & KBLed)
-        printf("   led                = 0x%x\n", kc->led);
-    if (vm & KBLedMode)
-        printf("   led_mode           = %d\n", kc->led_mode);
-    if (vm & KBKey)
-        printf("   key                = %d\n", kc->key);
-    if (vm & KBAutoRepeatMode)
-        printf("   auto_repeat_mode   = %d\n", kc->auto_repeat_mode);
-}
-
-static void
-pks(XKeyboardState * ks)
-{
-    printf("   key_click_percent  = %d\n", ks->key_click_percent);
-    printf("   bell_percent       = %d\n", ks->bell_percent);
-    printf("   bell_pitch         = %u\n", ks->bell_pitch);
-    printf("   bell_duration      = %u\n", ks->bell_duration);
-    printf("   led_mask           = 0x%lx\n", ks->led_mask);
-    printf("   global_auto_repeat = %d\n", ks->global_auto_repeat);
-}
-
-int
-main(int argc, char **argv)
-{
-    Display *display = XOpenDisplay(NULL);
-    XKeyboardControl kc;
-    XKeyboardState ks;
-    unsigned long vm;
-
-    if (argc != 5) {
-        printf("Usage: xbell percent baseVolume pitch duration\n");
-        return 1;
-    }
-
-    vm = (KBBellPercent | KBBellPitch | KBBellDuration);
-    kc.key_click_percent = atoi(argv[1]);
-    kc.bell_percent = atoi(argv[2]);
-    kc.bell_pitch = atoi(argv[3]);
-    kc.bell_duration = atoi(argv[4]);
-
-    printf("Setting:\n");
-    pkc(&kc, vm);
-    XChangeKeyboardControl(display, vm, &kc);
-
-    printf("Have:\n");
-    XGetKeyboardControl(display, &ks);
-    pks(&ks);
-
-    XBell(display, 100);
-
-    XCloseDisplay(display);
-    return 0;
-}
diff --git a/hw/dmx/examples/xinput.c b/hw/dmx/examples/xinput.c
deleted file mode 100644
index 6eddc6a..0000000
--- a/hw/dmx/examples/xinput.c
+++ /dev/null
@@ -1,355 +0,0 @@
-/*
- * Copyright 2001,2002 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <X11/Xlib.h>
-#include <X11/XKBlib.h>
-#include <X11/extensions/XInput.h>
-#include <X11/extensions/XKB.h>
-#include <X11/extensions/XKBstr.h>
-#include <X11/extensions/dmxext.h>
-#include <sys/time.h>
-
-static const char *
-core(DMXInputAttributes * iinf)
-{
-    if (iinf->isCore)
-        return "core";
-    else if (iinf->sendsCore)
-        return "extension (sends core events)";
-    else
-        return "extension";
-}
-
-static void
-printdmxinfo(Display * display, int id)
-{
-    int event_base;
-    int error_base;
-    int major_version, minor_version, patch_version;
-    DMXInputAttributes iinf;
-    Display *backend;
-    char *backendname = NULL;
-
-    if (!DMXQueryExtension(display, &event_base, &error_base))
-        return;
-    if (!DMXQueryVersion(display, &major_version, &minor_version,
-                         &patch_version))
-        return;
-    if (major_version == 1 && minor_version == 0)
-        return;                 /* too old */
-    if (!DMXGetInputAttributes(display, id, &iinf))
-        return;
-
-    printf("   DMX Information: ");
-    if (iinf.detached)
-        printf("detached ");
-    else
-        printf("active   ");
-    switch (iinf.inputType) {
-    case DMXLocalInputType:
-        printf("local, %s", core(&iinf));
-        break;
-    case DMXConsoleInputType:
-        printf("console %s, %s", iinf.name, core(&iinf));
-        break;
-    case DMXBackendInputType:
-        if (iinf.physicalId >= 0) {
-            if ((backend = XOpenDisplay(iinf.name))) {
-                XExtensionVersion *ext = XGetExtensionVersion(backend, INAME);
-
-                if (ext && ext != (XExtensionVersion *) NoSuchExtension) {
-                    int count, i;
-                    XDeviceInfo *devInfo = XListInputDevices(backend, &count);
-
-                    if (devInfo) {
-                        for (i = 0; i < count; i++) {
-                            if ((unsigned) iinf.physicalId == devInfo[i].id
-                                && devInfo[i].name) {
-                                backendname = strdup(devInfo[i].name);
-                                break;
-                            }
-                        }
-                        XFreeDeviceList(devInfo);
-                    }
-                }
-                XCloseDisplay(backend);
-            }
-        }
-        printf("backend o%d/%s", iinf.physicalScreen, iinf.name);
-        if (iinf.physicalId >= 0)
-            printf("/id%d", iinf.physicalId);
-        if (backendname) {
-            printf("=%s", backendname);
-            free(backendname);
-        }
-        printf(" %s", core(&iinf));
-        break;
-    }
-    printf("\n");
-}
-
-int
-main(int argc, char **argv)
-{
-    Display *display = NULL;
-    int device = -1;
-    int newmouse = -1;
-    int newkbd = -1;
-    int count;
-    int i, j;
-    XDeviceInfo *devInfo;
-    XExtensionVersion *ext;
-
-    if (argc == 2 || argc == 3 || argc == 4 || argc == 5) {
-        if (!(display = XOpenDisplay(argv[1]))) {
-            printf("Cannot open display %s\n", argv[1]);
-            return -1;
-        }
-        if (argc >= 3)
-            device = strtol(argv[2], NULL, 0);
-        if (argc >= 4)
-            newmouse = strtol(argv[3], NULL, 0);
-        if (argc >= 5)
-            newkbd = strtol(argv[4], NULL, 0);
-    }
-    else {
-        printf("Usage: %s display [device] [newmouse] [newkbd]\n", argv[0]);
-        return -1;
-    }
-
-    if (!display && !(display = XOpenDisplay(NULL))) {
-        printf("Cannot open default display\n");
-        return -1;
-    }
-
-    ext = XGetExtensionVersion(display, INAME);
-    if (!ext || ext == (XExtensionVersion *) NoSuchExtension) {
-        printf("No XInputExtension\n");
-        return -1;
-    }
-    printf("%s version %d.%d\n", INAME, ext->major_version, ext->minor_version);
-
-    if (!(devInfo = XListInputDevices(display, &count)) || !count) {
-        printf("Cannot list devices\n");
-        return -1;
-    }
-
-    for (i = 0; i < count; i++) {
-        XAnyClassPtr any;
-        const char *kind = "Unknown";
-        int has_key = 0;
-
-        switch (devInfo[i].use) {
-        case IsXPointer:
-            kind = "XPointer";
-            break;
-        case IsXKeyboard:
-            kind = "XKeyboard";
-            break;
-        case IsXExtensionDevice:
-            kind = "XExtensionDevice";
-            break;
-        }
-        printf("%2lu %-20.20s %-16.16s",
-               (long unsigned) devInfo[i].id,
-               devInfo[i].name ? devInfo[i].name : "", kind);
-
-        for (j = 0, any = devInfo[i].inputclassinfo;
-             j < devInfo[i].num_classes;
-             any = (XAnyClassPtr) ((char *) any + any->length), j++) {
-            const char *class = "unk";
-
-            switch (any->class) {
-            case KeyClass:
-                class = "key";
-                ++has_key;
-                break;
-            case ButtonClass:
-                class = "btn";
-                break;
-            case ValuatorClass:
-                class = "val";
-                break;
-            case FeedbackClass:
-                class = "fdb";
-                break;
-            case ProximityClass:
-                class = "prx";
-                break;
-            case FocusClass:
-                class = "foc";
-                break;
-            case OtherClass:
-                class = "oth";
-                break;
-            }
-            printf(" %s", class);
-        }
-        printf("\n");
-        printdmxinfo(display, i);
-
-        if (has_key) {
-            XkbDescPtr xkb;
-
-            if ((xkb = XkbGetKeyboard(display,
-                                      XkbAllComponentsMask, devInfo[i].id))) {
-                printf("   Xkb Information:\n");
-                printf("      Device id = %d\n", xkb->device_spec);
-                printf("      Min keycode = 0x%02x\n", xkb->min_key_code);
-                printf("      Max keycode = 0x%02x\n", xkb->max_key_code);
-#define PRINTNAME(x)                                                     \
-    printf("      %s = %s\n",                                            \
-           #x, xkb->names->x ? XGetAtomName(display, xkb->names->x) : "")
-                PRINTNAME(keycodes);
-                PRINTNAME(geometry);
-                PRINTNAME(symbols);
-                PRINTNAME(types);
-                PRINTNAME(compat);
-            }
-        }
-    }
-
-    if (newmouse >= 0) {
-        XDevice *dev;
-
-        printf("Trying to make device %d core mouse\n", newmouse);
-        dev = XOpenDevice(display, devInfo[newmouse].id);
-        printf("Status = %d\n", XChangePointerDevice(display, dev, 0, 1));
-        return 0;
-    }
-
-    if (newkbd >= 0) {
-        XDevice *dev;
-
-        printf("Trying to make device %d core keyboard\n", newkbd);
-        dev = XOpenDevice(display, devInfo[newkbd].id);
-        printf("Status = %d\n", XChangeKeyboardDevice(display, dev));
-        return 0;
-    }
-
-    if (device >= 0) {
-#define MAX_EVENTS 100
-        int cnt = 0;
-        XDevice *dev;
-        XEventClass event_list[MAX_EVENTS];
-        int event_type[MAX_EVENTS];
-        const char *names[MAX_EVENTS];
-        int total = 0;
-
-#define ADD(type)                                     \
-        if (cnt >= MAX_EVENTS) abort();             \
-        names[cnt] = #type;                           \
-        type(dev, event_type[cnt], event_list[cnt]);  \
-        if (event_type[cnt]) ++cnt
-
-        dev = XOpenDevice(display, devInfo[device].id);
-        ADD(DeviceKeyPress);
-        ADD(DeviceKeyRelease);
-        ADD(DeviceButtonPress);
-        ADD(DeviceButtonRelease);
-        ADD(DeviceMotionNotify);
-        ADD(DeviceFocusIn);
-        ADD(DeviceFocusOut);
-        ADD(ProximityIn);
-        ADD(ProximityOut);
-        ADD(DeviceStateNotify);
-        ADD(DeviceMappingNotify);
-        ADD(ChangeDeviceNotify);
-
-        for (i = 0; i < cnt; i++) {
-            printf("Waiting for %s events of type %d (%lu) on 0x%08lx\n",
-                   names[i],
-                   event_type[i], (unsigned long) event_list[i],
-                   (long unsigned) DefaultRootWindow(display));
-        }
-        XSelectExtensionEvent(display, DefaultRootWindow(display),
-                              event_list, cnt);
-
-        for (;;) {
-            XEvent event;
-
-            XNextEvent(display, &event);
-            for (i = 0; i < cnt; i++) {
-                XDeviceMotionEvent *e = (XDeviceMotionEvent *) &event;
-                XDeviceButtonEvent *b = (XDeviceButtonEvent *) &event;
-
-                if (event.type == event_type[i]) {
-                    printf("%s id=%lu (%d @ %d,%d; s=0x%04x, d=%d, t=%lu)"
-                           " axes_count=%d first=%d %d %d %d %d %d %d\n",
-                           names[i],
-                           (long unsigned) e->deviceid,
-                           e->type,
-                           e->x, e->y,
-                           e->device_state,
-                           b->button,
-                           (long unsigned) b->time,
-                           e->axes_count,
-                           e->first_axis,
-                           e->axis_data[0],
-                           e->axis_data[1],
-                           e->axis_data[2],
-                           e->axis_data[3], e->axis_data[4], e->axis_data[5]);
-                }
-            }
-            ++total;
-#if 0
-            /* Used to check motion history for
-             * extension devices. */
-            if (!(total % 10)) {
-                XDeviceTimeCoord *tc;
-                int n, m, a;
-                struct timeval tv;
-                unsigned long ms;
-
-                gettimeofday(&tv, NULL);
-                ms = tv.tv_sec * 1000 + tv.tv_usec / 1000;
-                tc = XGetDeviceMotionEvents(display, dev, ms - 1000, ms,
-                                            &n, &m, &a);
-                printf("Got %d events of mode %s with %d axes\n",
-                       n, m == Absolute ? "Absolute" : "Relative", a);
-                for (i = 0; i < n && i < 10; i++) {
-                    printf("  %d: %lu %d %d\n",
-                           i, tc[i].time, tc[i].data[0], tc[i].data[1]);
-                }
-                XFreeDeviceMotionEvents(tc);
-            }
-#endif
-        }
-    }
-
-    XCloseDisplay(display);
-    return 0;
-}
diff --git a/hw/dmx/examples/xled.c b/hw/dmx/examples/xled.c
deleted file mode 100644
index 32e8e37..0000000
--- a/hw/dmx/examples/xled.c
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Copyright 2003 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <X11/Xlib.h>
-#include <X11/XKBlib.h>
-#include <X11/extensions/XKB.h>
-#include <X11/extensions/XKBstr.h>
-#include <sys/time.h>
-
-int
-main(int argc, char **argv)
-{
-    Display *display = NULL;
-    int mask = 0;
-    unsigned i;
-    XKeyboardState ks;
-    XKeyboardControl kc;
-    XkbDescPtr xkb;
-    int old[32];
-
-    if (argc == 2 || argc == 3) {
-        if (!(display = XOpenDisplay(argv[1]))) {
-            printf("Cannot open display %s\n", argv[1]);
-            return -1;
-        }
-        if (argc >= 3)
-            mask = strtol(argv[2], NULL, 0);
-    }
-    else {
-        printf("Usage: %s display [mask]\n", argv[0]);
-        return -1;
-    }
-
-    if (!display && !(display = XOpenDisplay(NULL))) {
-        printf("Cannot open default display\n");
-        return -1;
-    }
-
-    if (!(xkb = XkbAllocKeyboard())) {
-        printf("Cannot allocate\n");
-        return -1;
-    }
-    if (XkbGetIndicatorMap(display, XkbAllIndicatorsMask, xkb)) {
-        printf("Cannot Get Indicators\n");
-        return -1;
-    }
-    if (XkbGetNames(display, XkbAllNamesMask, xkb)) {
-        printf("Cannot Get Names\n");
-        return -1;
-    }
-    for (i = 0; i < XkbNumIndicators; i++) {
-        if (xkb->indicators->phys_indicators & (1 << i)) {
-            printf("led %d = %d\n", i, xkb->indicators->maps[i].flags);
-            old[i] = xkb->indicators->maps[i].flags;
-            xkb->indicators->maps[i].flags = XkbIM_NoAutomatic;
-        }
-    }
-    printf("XkbSetIndicatorMap = %d\n", XkbSetIndicatorMap(display, ~0, xkb));
-    XkbFreeKeyboard(xkb, 0, True);
-
-    if (!(xkb = XkbAllocKeyboard())) {
-        printf("Cannot allocate\n");
-        return -1;
-    }
-    if (XkbGetIndicatorMap(display, XkbAllIndicatorsMask, xkb)) {
-        printf("Cannot Get Indicators\n");
-        return -1;
-    }
-    for (i = 0; i < XkbNumIndicators; i++) {
-        if (xkb->indicators->phys_indicators & (1 << i))
-            printf("led %d = %d\n", i, xkb->indicators->maps[i].flags);
-    }
-
-    printf("XGetKeyboardControl = %d\n", XGetKeyboardControl(display, &ks));
-    printf("old mask = 0x%08lx\n", ks.led_mask);
-    for (i = 0; i < 5; i++) {
-        kc.led = i + 1;
-        kc.led_mode = (mask & (1 << i)) ? LedModeOn : LedModeOff;
-        printf("XChangeKeyboardControl = %d\n",
-               XChangeKeyboardControl(display, KBLed | KBLedMode, &kc));
-    }
-    printf("XGetKeyboardControl = %d\n", XGetKeyboardControl(display, &ks));
-    printf("new mask = 0x%08lx\n", ks.led_mask);
-
-    for (i = 0; i < XkbNumIndicators; i++)
-        if (xkb->indicators->phys_indicators & (i << 1))
-            xkb->indicators->maps[i].flags = old[i];
-    printf("XkbSetIndicatorMap = %d\n", XkbSetIndicatorMap(display, ~0, xkb));
-
-    XkbFreeKeyboard(xkb, 0, True);
-    XCloseDisplay(display);
-    return 0;
-}
diff --git a/hw/dmx/examples/xtest.c b/hw/dmx/examples/xtest.c
deleted file mode 100644
index 9ce896a..0000000
--- a/hw/dmx/examples/xtest.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright 2003 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <X11/Xlib.h>
-#include <X11/extensions/XTest.h>
-
-int
-main(int argc, char **argv)
-{
-    Display *display = NULL;
-    int event_base;
-    int error_base;
-    int major_version, minor_version;
-
-    if (argc == 2) {
-        if (!(display = XOpenDisplay(argv[1]))) {
-            printf("Cannot open display %s\n", argv[1]);
-            return -1;
-        }
-    }
-    else {
-        printf("Usage: %s display\n", argv[0]);
-        return -1;
-    }
-
-    if (!display && !(display = XOpenDisplay(NULL))) {
-        printf("Cannot open default display\n");
-        return -1;
-    }
-
-    if (!XTestQueryExtension(display, &event_base, &error_base,
-                             &major_version, &minor_version)) {
-        printf("XTEST extension not present\n");
-        return -1;
-    }
-    printf("XTEST extension present: event_base = %d, error_base = %d\n",
-           event_base, error_base);
-    printf("Extension version: %d.%d\n", major_version, minor_version);
-
-    XTestFakeKeyEvent(display, 30, True, 10);
-    XTestFakeKeyEvent(display, 30, False, 10);
-
-    XCloseDisplay(display);
-    return 0;
-}
diff --git a/hw/dmx/glxProxy/Makefile.am b/hw/dmx/glxProxy/Makefile.am
deleted file mode 100644
index c3df169..0000000
--- a/hw/dmx/glxProxy/Makefile.am
+++ /dev/null
@@ -1,42 +0,0 @@
-noinst_LIBRARIES = libglxproxy.a
-
-libglxproxy_a_SOURCES = compsize.c \
-                        compsize.h \
-                        g_disptab.c \
-                        g_disptab.h \
-                        global.c \
-                        glxcmds.c \
-                        glxcmds.h \
-                        glxcmdsswap.c \
-                        glxcontext.h \
-                        glxdrawable.h \
-                        glxerror.h \
-                        glxext.c \
-                        glxext.h \
-                        glxfbconfig.c \
-                        glxfbconfig.h \
-                        glxscreens.c \
-                        glxscreens.h \
-                        glxserver.h \
-                        glxsingle.c \
-                        glxsingle.h \
-                        glxswap.c \
-                        glxswap.h \
-                        glxutil.h \
-                        glxvendor.c \
-                        glxvendor.h \
-                        glxvisuals.c \
-                        glxvisuals.h \
-                        g_renderswap.c \
-                        render2swap.c \
-                        renderpixswap.c \
-                        unpack.h
-
-AM_CFLAGS = \
-            @GLX_ARCH_DEFINES@ \
-            $(DIX_CFLAGS) \
-            -I$(top_srcdir)/hw/dmx \
-            -I$(top_srcdir)/include \
-            -DHAVE_DMX_CONFIG_H \
-            @DMXMODULES_CFLAGS@ \
-            -I$(top_srcdir)/hw/xfree86/os-support
diff --git a/hw/dmx/glxProxy/Makefile.in b/hw/dmx/glxProxy/Makefile.in
deleted file mode 100644
index 0225176..0000000
--- a/hw/dmx/glxProxy/Makefile.in
+++ /dev/null
@@ -1,938 +0,0 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
-
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-VPATH = @srcdir@
-am__is_gnu_make = { \
-  if test -z '$(MAKELEVEL)'; then \
-    false; \
-  elif test -n '$(MAKE_HOST)'; then \
-    true; \
-  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
-    true; \
-  else \
-    false; \
-  fi; \
-}
-am__make_running_with_option = \
-  case $${target_option-} in \
-      ?) ;; \
-      *) echo "am__make_running_with_option: internal error: invalid" \
-              "target option '$${target_option-}' specified" >&2; \
-         exit 1;; \
-  esac; \
-  has_opt=no; \
-  sane_makeflags=$$MAKEFLAGS; \
-  if $(am__is_gnu_make); then \
-    sane_makeflags=$$MFLAGS; \
-  else \
-    case $$MAKEFLAGS in \
-      *\\[\ \	]*) \
-        bs=\\; \
-        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
-          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
-    esac; \
-  fi; \
-  skip_next=no; \
-  strip_trailopt () \
-  { \
-    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
-  }; \
-  for flg in $$sane_makeflags; do \
-    test $$skip_next = yes && { skip_next=no; continue; }; \
-    case $$flg in \
-      *=*|--*) continue;; \
-        -*I) strip_trailopt 'I'; skip_next=yes;; \
-      -*I?*) strip_trailopt 'I';; \
-        -*O) strip_trailopt 'O'; skip_next=yes;; \
-      -*O?*) strip_trailopt 'O';; \
-        -*l) strip_trailopt 'l'; skip_next=yes;; \
-      -*l?*) strip_trailopt 'l';; \
-      -[dEDm]) skip_next=yes;; \
-      -[JT]) skip_next=yes;; \
-    esac; \
-    case $$flg in \
-      *$$target_option*) has_opt=yes; break;; \
-    esac; \
-  done; \
-  test $$has_opt = yes
-am__make_dryrun = (target_option=n; $(am__make_running_with_option))
-am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-subdir = hw/dmx/glxProxy
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \
-	$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \
-	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
-	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
-	$(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-	$(ACLOCAL_M4)
-DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
-	$(top_builddir)/include/xorg-server.h \
-	$(top_builddir)/include/dix-config.h \
-	$(top_builddir)/include/xorg-config.h \
-	$(top_builddir)/include/xkb-config.h \
-	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
-	$(top_builddir)/include/version-config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-LIBRARIES = $(noinst_LIBRARIES)
-ARFLAGS = cru
-AM_V_AR = $(am__v_AR_@AM_V@)
-am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@)
-am__v_AR_0 = @echo "  AR      " $@;
-am__v_AR_1 = 
-libglxproxy_a_AR = $(AR) $(ARFLAGS)
-libglxproxy_a_LIBADD =
-am_libglxproxy_a_OBJECTS = compsize.$(OBJEXT) g_disptab.$(OBJEXT) \
-	global.$(OBJEXT) glxcmds.$(OBJEXT) glxcmdsswap.$(OBJEXT) \
-	glxext.$(OBJEXT) glxfbconfig.$(OBJEXT) glxscreens.$(OBJEXT) \
-	glxsingle.$(OBJEXT) glxswap.$(OBJEXT) glxvendor.$(OBJEXT) \
-	glxvisuals.$(OBJEXT) g_renderswap.$(OBJEXT) \
-	render2swap.$(OBJEXT) renderpixswap.$(OBJEXT)
-libglxproxy_a_OBJECTS = $(am_libglxproxy_a_OBJECTS)
-AM_V_P = $(am__v_P_@AM_V@)
-am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
-am__v_P_0 = false
-am__v_P_1 = :
-AM_V_GEN = $(am__v_GEN_@AM_V@)
-am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo "  GEN     " $@;
-am__v_GEN_1 = 
-AM_V_at = $(am__v_at_@AM_V@)
-am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
-am__v_at_0 = @
-am__v_at_1 = 
-DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__maybe_remake_depfiles = depfiles
-am__depfiles_remade = ./$(DEPDIR)/compsize.Po ./$(DEPDIR)/g_disptab.Po \
-	./$(DEPDIR)/g_renderswap.Po ./$(DEPDIR)/global.Po \
-	./$(DEPDIR)/glxcmds.Po ./$(DEPDIR)/glxcmdsswap.Po \
-	./$(DEPDIR)/glxext.Po ./$(DEPDIR)/glxfbconfig.Po \
-	./$(DEPDIR)/glxscreens.Po ./$(DEPDIR)/glxsingle.Po \
-	./$(DEPDIR)/glxswap.Po ./$(DEPDIR)/glxvendor.Po \
-	./$(DEPDIR)/glxvisuals.Po ./$(DEPDIR)/render2swap.Po \
-	./$(DEPDIR)/renderpixswap.Po
-am__mv = mv -f
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
-	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-AM_V_lt = $(am__v_lt_@AM_V@)
-am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
-am__v_lt_0 = --silent
-am__v_lt_1 = 
-LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
-	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-	$(AM_CFLAGS) $(CFLAGS)
-AM_V_CC = $(am__v_CC_@AM_V@)
-am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
-am__v_CC_0 = @echo "  CC      " $@;
-am__v_CC_1 = 
-CCLD = $(CC)
-LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-	$(AM_LDFLAGS) $(LDFLAGS) -o $@
-AM_V_CCLD = $(am__v_CCLD_@AM_V@)
-am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
-am__v_CCLD_0 = @echo "  CCLD    " $@;
-am__v_CCLD_1 = 
-SOURCES = $(libglxproxy_a_SOURCES)
-DIST_SOURCES = $(libglxproxy_a_SOURCES)
-am__can_run_installinfo = \
-  case $$AM_UPDATE_INFO_DIR in \
-    n|no|NO) false;; \
-    *) (install-info --version) >/dev/null 2>&1;; \
-  esac
-am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
-# Read a list of newline-separated strings from the standard input,
-# and print each of them once, without duplicates.  Input order is
-# *not* preserved.
-am__uniquify_input = $(AWK) '\
-  BEGIN { nonempty = 0; } \
-  { items[$$0] = 1; nonempty = 1; } \
-  END { if (nonempty) { for (i in items) print i; }; } \
-'
-# Make sure the list of sources is unique.  This is necessary because,
-# e.g., the same source file might be shared among _SOURCES variables
-# for different programs/libraries.
-am__define_uniq_tagged_files = \
-  list='$(am__tagged_files)'; \
-  unique=`for i in $$list; do \
-    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-  done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
-am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
-ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
-AMTAR = @AMTAR@
-AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
-APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@
-APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@
-APP_MAN_DIR = @APP_MAN_DIR@
-APP_MAN_SUFFIX = @APP_MAN_SUFFIX@
-AR = @AR@
-AS = @AS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-BASE_CFLAGS = @BASE_CFLAGS@
-BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
-BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
-BUNDLE_VERSION = @BUNDLE_VERSION@
-BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
-CC = @CC@
-CCAS = @CCAS@
-CCASDEPMODE = @CCASDEPMODE@
-CCASFLAGS = @CCASFLAGS@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CHANGELOG_CMD = @CHANGELOG_CMD@
-COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CWARNFLAGS = @CWARNFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DBUS_CFLAGS = @DBUS_CFLAGS@
-DBUS_LIBS = @DBUS_LIBS@
-DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@
-DEFAULT_LOGDIR = @DEFAULT_LOGDIR@
-DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@
-DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@
-DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@
-DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DGA_CFLAGS = @DGA_CFLAGS@
-DGA_LIBS = @DGA_LIBS@
-DIX_CFLAGS = @DIX_CFLAGS@
-DIX_LIB = @DIX_LIB@
-DLLTOOL = @DLLTOOL@
-DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
-DOT = @DOT@
-DOXYGEN = @DOXYGEN@
-DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
-DRI2PROTO_LIBS = @DRI2PROTO_LIBS@
-DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@
-DRI3PROTO_LIBS = @DRI3PROTO_LIBS@
-DRIVER_MAN_DIR = @DRIVER_MAN_DIR@
-DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
-DRI_DRIVER_PATH = @DRI_DRIVER_PATH@
-DSYMUTIL = @DSYMUTIL@
-DTRACE = @DTRACE@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-FILE_MAN_DIR = @FILE_MAN_DIR@
-FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
-FONT100DPIDIR = @FONT100DPIDIR@
-FONT75DPIDIR = @FONT75DPIDIR@
-FONTMISCDIR = @FONTMISCDIR@
-FONTOTFDIR = @FONTOTFDIR@
-FONTROOTDIR = @FONTROOTDIR@
-FONTTTFDIR = @FONTTTFDIR@
-FONTTYPE1DIR = @FONTTYPE1DIR@
-FOP = @FOP@
-GBM_CFLAGS = @GBM_CFLAGS@
-GBM_LIBS = @GBM_LIBS@
-GLAMOR_CFLAGS = @GLAMOR_CFLAGS@
-GLAMOR_LIBS = @GLAMOR_LIBS@
-GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@
-GLX_DEFINES = @GLX_DEFINES@
-GLX_SYS_LIBS = @GLX_SYS_LIBS@
-GL_CFLAGS = @GL_CFLAGS@
-GL_LIBS = @GL_LIBS@
-GREP = @GREP@
-HAL_CFLAGS = @HAL_CFLAGS@
-HAL_LIBS = @HAL_LIBS@
-HAVE_DOT = @HAVE_DOT@
-INSTALL = @INSTALL@
-INSTALL_CMD = @INSTALL_CMD@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-KDRIVE_CFLAGS = @KDRIVE_CFLAGS@
-KDRIVE_INCS = @KDRIVE_INCS@
-KDRIVE_LIBS = @KDRIVE_LIBS@
-KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@
-KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@
-KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@
-KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@
-KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@
-KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@
-KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@
-LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@
-LEX = @LEX@
-LEXLIB = @LEXLIB@
-LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
-LIBDRM_CFLAGS = @LIBDRM_CFLAGS@
-LIBDRM_LIBS = @LIBDRM_LIBS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@
-LIBSHA1_LIBS = @LIBSHA1_LIBS@
-LIBTOOL = @LIBTOOL@
-LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
-LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
-LIB_MAN_DIR = @LIB_MAN_DIR@
-LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
-MAIN_LIB = @MAIN_LIB@
-MAKEINFO = @MAKEINFO@
-MANIFEST_TOOL = @MANIFEST_TOOL@
-MAN_SUBSTS = @MAN_SUBSTS@
-MISC_MAN_DIR = @MISC_MAN_DIR@
-MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
-MKDIR_P = @MKDIR_P@
-NM = @NM@
-NMEDIT = @NMEDIT@
-OBJC = @OBJC@
-OBJCCLD = @OBJCCLD@
-OBJCDEPMODE = @OBJCDEPMODE@
-OBJCFLAGS = @OBJCFLAGS@
-OBJCLINK = @OBJCLINK@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
-OPENSSL_LIBS = @OPENSSL_LIBS@
-OS_LIB = @OS_LIB@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@
-PCIACCESS_LIBS = @PCIACCESS_LIBS@
-PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@
-PIXMAN_CFLAGS = @PIXMAN_CFLAGS@
-PIXMAN_LIBS = @PIXMAN_LIBS@
-PKG_CONFIG = @PKG_CONFIG@
-PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
-PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
-PROJECTROOT = @PROJECTROOT@
-PTHREAD_CC = @PTHREAD_CC@
-PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
-PTHREAD_LIBS = @PTHREAD_LIBS@
-PYTHON3 = @PYTHON3@
-RANLIB = @RANLIB@
-RAWCPP = @RAWCPP@
-RAWCPPFLAGS = @RAWCPPFLAGS@
-RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
-SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
-SED = @SED@
-SELINUX_CFLAGS = @SELINUX_CFLAGS@
-SELINUX_LIBS = @SELINUX_LIBS@
-SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@
-SET_MAKE = @SET_MAKE@
-SHA1_CFLAGS = @SHA1_CFLAGS@
-SHA1_LIBS = @SHA1_LIBS@
-SHELL = @SHELL@
-SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@
-STRICT_CFLAGS = @STRICT_CFLAGS@
-STRIP = @STRIP@
-STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@
-SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@
-SYSCONFDIR = @SYSCONFDIR@
-SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@
-SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@
-TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@
-UDEV_CFLAGS = @UDEV_CFLAGS@
-UDEV_LIBS = @UDEV_LIBS@
-UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
-VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
-VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
-WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
-WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
-WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
-XCONFIGDIR = @XCONFIGDIR@
-XCONFIGFILE = @XCONFIGFILE@
-XDMCP_CFLAGS = @XDMCP_CFLAGS@
-XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
-XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
-XEPHYR_INCS = @XEPHYR_INCS@
-XEPHYR_LIBS = @XEPHYR_LIBS@
-XF86CONFIGDIR = @XF86CONFIGDIR@
-XF86CONFIGFILE = @XF86CONFIGFILE@
-XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@
-XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@
-XKB_COMPILED_DIR = @XKB_COMPILED_DIR@
-XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@
-XKB_DFLT_MODEL = @XKB_DFLT_MODEL@
-XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@
-XKB_DFLT_RULES = @XKB_DFLT_RULES@
-XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@
-XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@
-XLIB_CFLAGS = @XLIB_CFLAGS@
-XLIB_LIBS = @XLIB_LIBS@
-XMLTO = @XMLTO@
-XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@
-XNESTMODULES_LIBS = @XNESTMODULES_LIBS@
-XNEST_LIBS = @XNEST_LIBS@
-XNEST_SYS_LIBS = @XNEST_SYS_LIBS@
-XORG_CFLAGS = @XORG_CFLAGS@
-XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@
-XORG_INCS = @XORG_INCS@
-XORG_LIBS = @XORG_LIBS@
-XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@
-XORG_MAN_PAGE = @XORG_MAN_PAGE@
-XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@
-XORG_MODULES_LIBS = @XORG_MODULES_LIBS@
-XORG_OS_SUBDIR = @XORG_OS_SUBDIR@
-XORG_SGML_PATH = @XORG_SGML_PATH@
-XORG_SYS_LIBS = @XORG_SYS_LIBS@
-XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@
-XPBPROXY_LIBS = @XPBPROXY_LIBS@
-XQUARTZ_LIBS = @XQUARTZ_LIBS@
-XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
-XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
-XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
-XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
-XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
-XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@
-XSERVER_LIBS = @XSERVER_LIBS@
-XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@
-XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
-XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
-XSLTPROC = @XSLTPROC@
-XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
-XVFB_LIBS = @XVFB_LIBS@
-XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
-XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
-XWINMODULES_LIBS = @XWINMODULES_LIBS@
-XWIN_LIBS = @XWIN_LIBS@
-XWIN_SERVER_NAME = @XWIN_SERVER_NAME@
-XWIN_SYS_LIBS = @XWIN_SYS_LIBS@
-YACC = @YACC@
-YFLAGS = @YFLAGS@
-abi_ansic = @abi_ansic@
-abi_extension = @abi_extension@
-abi_videodrv = @abi_videodrv@
-abi_xinput = @abi_xinput@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_AR = @ac_ct_AR@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-ax_pthread_config = @ax_pthread_config@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-driverdir = @driverdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-extdir = @extdir@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-logdir = @logdir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-moduledir = @moduledir@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-runstatedir = @runstatedir@
-sbindir = @sbindir@
-sdkdir = @sdkdir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-symbol_visibility = @symbol_visibility@
-sysconfdir = @sysconfdir@
-sysconfigdir = @sysconfigdir@
-target_alias = @target_alias@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-noinst_LIBRARIES = libglxproxy.a
-libglxproxy_a_SOURCES = compsize.c \
-                        compsize.h \
-                        g_disptab.c \
-                        g_disptab.h \
-                        global.c \
-                        glxcmds.c \
-                        glxcmds.h \
-                        glxcmdsswap.c \
-                        glxcontext.h \
-                        glxdrawable.h \
-                        glxerror.h \
-                        glxext.c \
-                        glxext.h \
-                        glxfbconfig.c \
-                        glxfbconfig.h \
-                        glxscreens.c \
-                        glxscreens.h \
-                        glxserver.h \
-                        glxsingle.c \
-                        glxsingle.h \
-                        glxswap.c \
-                        glxswap.h \
-                        glxutil.h \
-                        glxvendor.c \
-                        glxvendor.h \
-                        glxvisuals.c \
-                        glxvisuals.h \
-                        g_renderswap.c \
-                        render2swap.c \
-                        renderpixswap.c \
-                        unpack.h
-
-AM_CFLAGS = \
-            @GLX_ARCH_DEFINES@ \
-            $(DIX_CFLAGS) \
-            -I$(top_srcdir)/hw/dmx \
-            -I$(top_srcdir)/include \
-            -DHAVE_DMX_CONFIG_H \
-            @DMXMODULES_CFLAGS@ \
-            -I$(top_srcdir)/hw/xfree86/os-support
-
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
-	@for dep in $?; do \
-	  case '$(am__configure_deps)' in \
-	    *$$dep*) \
-	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
-	        && { if test -f $@; then exit 0; else break; fi; }; \
-	      exit 1;; \
-	  esac; \
-	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/dmx/glxProxy/Makefile'; \
-	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --foreign hw/dmx/glxProxy/Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	@case '$?' in \
-	  *config.status*) \
-	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
-	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
-	esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure:  $(am__configure_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-
-clean-noinstLIBRARIES:
-	-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-
-libglxproxy.a: $(libglxproxy_a_OBJECTS) $(libglxproxy_a_DEPENDENCIES) $(EXTRA_libglxproxy_a_DEPENDENCIES) 
-	$(AM_V_at)-rm -f libglxproxy.a
-	$(AM_V_AR)$(libglxproxy_a_AR) libglxproxy.a $(libglxproxy_a_OBJECTS) $(libglxproxy_a_LIBADD)
-	$(AM_V_at)$(RANLIB) libglxproxy.a
-
-mostlyclean-compile:
-	-rm -f *.$(OBJEXT)
-
-distclean-compile:
-	-rm -f *.tab.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compsize.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_disptab.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_renderswap.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/global.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glxcmds.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glxcmdsswap.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glxext.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glxfbconfig.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glxscreens.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glxsingle.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glxswap.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glxvendor.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glxvisuals.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/render2swap.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/renderpixswap.Po@am__quote@ # am--include-marker
-
-$(am__depfiles_remade):
-	@$(MKDIR_P) $(@D)
-	@echo '# dummy' >$@-t && $(am__mv) $@-t $@
-
-am--depfiles: $(am__depfiles_remade)
-
-.c.o:
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
-
-.c.obj:
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
-
-.c.lo:
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
-
-mostlyclean-libtool:
-	-rm -f *.lo
-
-clean-libtool:
-	-rm -rf .libs _libs
-
-ID: $(am__tagged_files)
-	$(am__define_uniq_tagged_files); mkid -fID $$unique
-tags: tags-am
-TAGS: tags
-
-tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
-	set x; \
-	here=`pwd`; \
-	$(am__define_uniq_tagged_files); \
-	shift; \
-	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
-	  test -n "$$unique" || unique=$$empty_fix; \
-	  if test $$# -gt 0; then \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      "$$@" $$unique; \
-	  else \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      $$unique; \
-	  fi; \
-	fi
-ctags: ctags-am
-
-CTAGS: ctags
-ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
-	$(am__define_uniq_tagged_files); \
-	test -z "$(CTAGS_ARGS)$$unique" \
-	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$unique
-
-GTAGS:
-	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && $(am__cd) $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) "$$here"
-cscopelist: cscopelist-am
-
-cscopelist-am: $(am__tagged_files)
-	list='$(am__tagged_files)'; \
-	case "$(srcdir)" in \
-	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
-	  *) sdir=$(subdir)/$(srcdir) ;; \
-	esac; \
-	for i in $$list; do \
-	  if test -f "$$i"; then \
-	    echo "$(subdir)/$$i"; \
-	  else \
-	    echo "$$sdir/$$i"; \
-	  fi; \
-	done >> $(top_builddir)/cscope.files
-
-distclean-tags:
-	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(BUILT_SOURCES)
-	$(MAKE) $(AM_MAKEFLAGS) distdir-am
-
-distdir-am: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	list='$(DISTFILES)'; \
-	  dist_files=`for file in $$list; do echo $$file; done | \
-	  sed -e "s|^$$srcdirstrip/||;t" \
-	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
-	case $$dist_files in \
-	  */*) $(MKDIR_P) `echo "$$dist_files" | \
-			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
-			   sort -u` ;; \
-	esac; \
-	for file in $$dist_files; do \
-	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  if test -d $$d/$$file; then \
-	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
-	    if test -d "$(distdir)/$$file"; then \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
-	  else \
-	    test -f "$(distdir)/$$file" \
-	    || cp -p $$d/$$file "$(distdir)/$$file" \
-	    || exit 1; \
-	  fi; \
-	done
-check-am: all-am
-check: check-am
-all-am: Makefile $(LIBRARIES)
-installdirs:
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
-	if test -z '$(STRIP)'; then \
-	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	      install; \
-	else \
-	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
-	fi
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
-	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
-	@echo "This command is intended for maintainers to use"
-	@echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \
-	mostlyclean-am
-
-distclean: distclean-am
-		-rm -f ./$(DEPDIR)/compsize.Po
-	-rm -f ./$(DEPDIR)/g_disptab.Po
-	-rm -f ./$(DEPDIR)/g_renderswap.Po
-	-rm -f ./$(DEPDIR)/global.Po
-	-rm -f ./$(DEPDIR)/glxcmds.Po
-	-rm -f ./$(DEPDIR)/glxcmdsswap.Po
-	-rm -f ./$(DEPDIR)/glxext.Po
-	-rm -f ./$(DEPDIR)/glxfbconfig.Po
-	-rm -f ./$(DEPDIR)/glxscreens.Po
-	-rm -f ./$(DEPDIR)/glxsingle.Po
-	-rm -f ./$(DEPDIR)/glxswap.Po
-	-rm -f ./$(DEPDIR)/glxvendor.Po
-	-rm -f ./$(DEPDIR)/glxvisuals.Po
-	-rm -f ./$(DEPDIR)/render2swap.Po
-	-rm -f ./$(DEPDIR)/renderpixswap.Po
-	-rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
-	distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am:
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
-		-rm -f ./$(DEPDIR)/compsize.Po
-	-rm -f ./$(DEPDIR)/g_disptab.Po
-	-rm -f ./$(DEPDIR)/g_renderswap.Po
-	-rm -f ./$(DEPDIR)/global.Po
-	-rm -f ./$(DEPDIR)/glxcmds.Po
-	-rm -f ./$(DEPDIR)/glxcmdsswap.Po
-	-rm -f ./$(DEPDIR)/glxext.Po
-	-rm -f ./$(DEPDIR)/glxfbconfig.Po
-	-rm -f ./$(DEPDIR)/glxscreens.Po
-	-rm -f ./$(DEPDIR)/glxsingle.Po
-	-rm -f ./$(DEPDIR)/glxswap.Po
-	-rm -f ./$(DEPDIR)/glxvendor.Po
-	-rm -f ./$(DEPDIR)/glxvisuals.Po
-	-rm -f ./$(DEPDIR)/render2swap.Po
-	-rm -f ./$(DEPDIR)/renderpixswap.Po
-	-rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic \
-	mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am:
-
-.MAKE: install-am install-strip
-
-.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
-	clean-generic clean-libtool clean-noinstLIBRARIES \
-	cscopelist-am ctags ctags-am distclean distclean-compile \
-	distclean-generic distclean-libtool distclean-tags distdir dvi \
-	dvi-am html html-am info info-am install install-am \
-	install-data install-data-am install-dvi install-dvi-am \
-	install-exec install-exec-am install-html install-html-am \
-	install-info install-info-am install-man install-pdf \
-	install-pdf-am install-ps install-ps-am install-strip \
-	installcheck installcheck-am installdirs maintainer-clean \
-	maintainer-clean-generic mostlyclean mostlyclean-compile \
-	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-	tags tags-am uninstall uninstall-am
-
-.PRECIOUS: Makefile
-
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/hw/dmx/glxProxy/compsize.c b/hw/dmx/glxProxy/compsize.c
deleted file mode 100644
index c204d3d..0000000
--- a/hw/dmx/glxProxy/compsize.c
+++ /dev/null
@@ -1,641 +0,0 @@
-/*
- * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
- * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice including the dates of first publication and
- * either this permission notice or a reference to
- * http://oss.sgi.com/projects/FreeB/
- * shall be included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of Silicon Graphics, Inc.
- * shall not be used in advertising or otherwise to promote the sale, use or
- * other dealings in this Software without prior written authorization from
- * Silicon Graphics, Inc.
- */
-
-#include <GL/gl.h>
-#include "compsize.h"
-
-GLint
-__glFogiv_size(GLenum pname)
-{
-    switch (pname) {
-    case GL_FOG_COLOR:
-        return 4;
-    case GL_FOG_DENSITY:
-        return 1;
-    case GL_FOG_END:
-        return 1;
-    case GL_FOG_MODE:
-        return 1;
-    case GL_FOG_INDEX:
-        return 1;
-    case GL_FOG_START:
-        return 1;
-    default:
-        return 0;
-    }
-}
-
-GLint
-__glFogfv_size(GLenum pname)
-{
-    return __glFogiv_size(pname);
-}
-
-GLint
-__glCallLists_size(GLsizei n, GLenum type)
-{
-    GLint size;
-
-    if (n < 0)
-        return 0;
-    switch (type) {
-    case GL_BYTE:
-        size = 1;
-        break;
-    case GL_UNSIGNED_BYTE:
-        size = 1;
-        break;
-    case GL_SHORT:
-        size = 2;
-        break;
-    case GL_UNSIGNED_SHORT:
-        size = 2;
-        break;
-    case GL_INT:
-        size = 4;
-        break;
-    case GL_UNSIGNED_INT:
-        size = 4;
-        break;
-    case GL_FLOAT:
-        size = 4;
-        break;
-    case GL_2_BYTES:
-        size = 2;
-        break;
-    case GL_3_BYTES:
-        size = 3;
-        break;
-    case GL_4_BYTES:
-        size = 4;
-        break;
-    default:
-        return 0;
-    }
-    return n * size;
-}
-
-GLint
-__glDrawPixels_size(GLenum format, GLenum type, GLsizei w, GLsizei h)
-{
-    GLint elements, esize;
-
-    switch (format) {
-    case GL_COLOR_INDEX:
-    case GL_STENCIL_INDEX:
-    case GL_DEPTH_COMPONENT:
-        elements = 1;
-        break;
-    case GL_RED:
-    case GL_GREEN:
-    case GL_BLUE:
-    case GL_ALPHA:
-    case GL_LUMINANCE:
-        elements = 1;
-        break;
-    case GL_LUMINANCE_ALPHA:
-        elements = 2;
-        break;
-    case GL_RGB:
-        elements = 3;
-        break;
-    case GL_RGBA:
-    case GL_ABGR_EXT:
-        elements = 4;
-        break;
-    default:
-        return 0;
-    }
-    switch (type) {
-    case GL_BITMAP:
-        if (format == GL_COLOR_INDEX || format == GL_STENCIL_INDEX) {
-            return (h * ((w + 7) / 8));
-        }
-        else {
-            return 0;
-        }
-    case GL_BYTE:
-    case GL_UNSIGNED_BYTE:
-        esize = 1;
-        break;
-    case GL_UNSIGNED_BYTE_3_3_2:
-    case GL_UNSIGNED_BYTE_2_3_3_REV:
-        esize = 1;
-        elements = 1;
-        break;
-    case GL_SHORT:
-    case GL_UNSIGNED_SHORT:
-        esize = 2;
-        break;
-    case GL_UNSIGNED_SHORT_5_6_5:
-    case GL_UNSIGNED_SHORT_5_6_5_REV:
-    case GL_UNSIGNED_SHORT_4_4_4_4:
-    case GL_UNSIGNED_SHORT_4_4_4_4_REV:
-    case GL_UNSIGNED_SHORT_5_5_5_1:
-    case GL_UNSIGNED_SHORT_1_5_5_5_REV:
-        esize = 2;
-        elements = 1;
-        break;
-    case GL_INT:
-    case GL_UNSIGNED_INT:
-    case GL_FLOAT:
-        esize = 4;
-        break;
-    case GL_UNSIGNED_INT_8_8_8_8:
-    case GL_UNSIGNED_INT_8_8_8_8_REV:
-    case GL_UNSIGNED_INT_10_10_10_2:
-    case GL_UNSIGNED_INT_2_10_10_10_REV:
-        esize = 4;
-        elements = 1;
-        break;
-    default:
-        return 0;
-    }
-    return elements * esize * w * h;
-}
-
-GLint
-__glBitmap_size(GLsizei w, GLsizei h)
-{
-    return __glDrawPixels_size(GL_COLOR_INDEX, GL_BITMAP, w, h);
-}
-
-GLint
-__glTexGendv_size(GLenum e)
-{
-    switch (e) {
-    case GL_TEXTURE_GEN_MODE:
-        return 1;
-    case GL_OBJECT_PLANE:
-    case GL_EYE_PLANE:
-        return 4;
-    default:
-        return 0;
-    }
-}
-
-GLint
-__glTexGenfv_size(GLenum e)
-{
-    return __glTexGendv_size(e);
-}
-
-GLint
-__glTexGeniv_size(GLenum e)
-{
-    return __glTexGendv_size(e);
-}
-
-GLint
-__glTexParameterfv_size(GLenum e)
-{
-    switch (e) {
-    case GL_TEXTURE_WRAP_S:
-    case GL_TEXTURE_WRAP_T:
-    case GL_TEXTURE_WRAP_R:
-    case GL_TEXTURE_MIN_FILTER:
-    case GL_TEXTURE_MAG_FILTER:
-        return 1;
-    case GL_TEXTURE_BORDER_COLOR:
-        return 4;
-    case GL_TEXTURE_PRIORITY:
-        return 1;
-    case GL_TEXTURE_MIN_LOD:
-    case GL_TEXTURE_MAX_LOD:
-    case GL_TEXTURE_BASE_LEVEL:
-    case GL_TEXTURE_MAX_LEVEL:
-        return 1;
-    default:
-        return 0;
-    }
-}
-
-GLint
-__glTexParameteriv_size(GLenum e)
-{
-    return __glTexParameterfv_size(e);
-}
-
-GLint
-__glTexEnvfv_size(GLenum e)
-{
-    switch (e) {
-    case GL_TEXTURE_ENV_MODE:
-        return 1;
-    case GL_TEXTURE_ENV_COLOR:
-        return 4;
-    default:
-        return 0;
-    }
-}
-
-GLint
-__glTexEnviv_size(GLenum e)
-{
-    return __glTexEnvfv_size(e);
-}
-
-GLint
-__glTexImage1D_size(GLenum format, GLenum type, GLsizei w)
-{
-    GLint elements, esize;
-
-    if (w < 0)
-        return 0;
-    switch (format) {
-    case GL_COLOR_INDEX:
-        elements = 1;
-        break;
-    case GL_RED:
-    case GL_GREEN:
-    case GL_BLUE:
-    case GL_ALPHA:
-    case GL_LUMINANCE:
-        elements = 1;
-        break;
-    case GL_LUMINANCE_ALPHA:
-        elements = 2;
-        break;
-    case GL_RGB:
-        elements = 3;
-        break;
-    case GL_RGBA:
-    case GL_ABGR_EXT:
-        elements = 4;
-        break;
-    default:
-        return 0;
-    }
-    switch (type) {
-    case GL_BITMAP:
-        if (format == GL_COLOR_INDEX) {
-            return (w + 7) / 8;
-        }
-        else {
-            return 0;
-        }
-    case GL_BYTE:
-    case GL_UNSIGNED_BYTE:
-        esize = 1;
-        break;
-    case GL_UNSIGNED_BYTE_3_3_2:
-    case GL_UNSIGNED_BYTE_2_3_3_REV:
-        esize = 1;
-        elements = 1;
-        break;
-    case GL_SHORT:
-    case GL_UNSIGNED_SHORT:
-        esize = 2;
-        break;
-    case GL_UNSIGNED_SHORT_5_6_5:
-    case GL_UNSIGNED_SHORT_5_6_5_REV:
-    case GL_UNSIGNED_SHORT_4_4_4_4:
-    case GL_UNSIGNED_SHORT_4_4_4_4_REV:
-    case GL_UNSIGNED_SHORT_5_5_5_1:
-    case GL_UNSIGNED_SHORT_1_5_5_5_REV:
-        esize = 2;
-        elements = 1;
-        break;
-    case GL_INT:
-    case GL_UNSIGNED_INT:
-    case GL_FLOAT:
-        esize = 4;
-        break;
-    case GL_UNSIGNED_INT_8_8_8_8:
-    case GL_UNSIGNED_INT_8_8_8_8_REV:
-    case GL_UNSIGNED_INT_10_10_10_2:
-    case GL_UNSIGNED_INT_2_10_10_10_REV:
-        esize = 4;
-        elements = 1;
-        break;
-    default:
-        return 0;
-    }
-    return elements * esize * w;
-}
-
-GLint
-__glTexImage2D_size(GLenum format, GLenum type, GLsizei w, GLsizei h)
-{
-    GLint elements, esize;
-
-    if (w < 0)
-        return 0;
-    if (h < 0)
-        return 0;
-    switch (format) {
-    case GL_COLOR_INDEX:
-        elements = 1;
-        break;
-    case GL_RED:
-    case GL_GREEN:
-    case GL_BLUE:
-    case GL_ALPHA:
-    case GL_LUMINANCE:
-        elements = 1;
-        break;
-    case GL_LUMINANCE_ALPHA:
-        elements = 2;
-        break;
-    case GL_RGB:
-        elements = 3;
-        break;
-    case GL_RGBA:
-    case GL_ABGR_EXT:
-        elements = 4;
-        break;
-    default:
-        return 0;
-    }
-    switch (type) {
-    case GL_BITMAP:
-        if (format == GL_COLOR_INDEX) {
-            return (h * ((w + 7) / 8));
-        }
-        else {
-            return 0;
-        }
-    case GL_BYTE:
-    case GL_UNSIGNED_BYTE:
-        esize = 1;
-        break;
-    case GL_UNSIGNED_BYTE_3_3_2:
-    case GL_UNSIGNED_BYTE_2_3_3_REV:
-        esize = 1;
-        elements = 1;
-        break;
-    case GL_SHORT:
-    case GL_UNSIGNED_SHORT:
-        esize = 2;
-        break;
-    case GL_UNSIGNED_SHORT_5_6_5:
-    case GL_UNSIGNED_SHORT_5_6_5_REV:
-    case GL_UNSIGNED_SHORT_4_4_4_4:
-    case GL_UNSIGNED_SHORT_4_4_4_4_REV:
-    case GL_UNSIGNED_SHORT_5_5_5_1:
-    case GL_UNSIGNED_SHORT_1_5_5_5_REV:
-        esize = 2;
-        elements = 1;
-        break;
-    case GL_INT:
-    case GL_UNSIGNED_INT:
-    case GL_FLOAT:
-        esize = 4;
-        break;
-    case GL_UNSIGNED_INT_8_8_8_8:
-    case GL_UNSIGNED_INT_8_8_8_8_REV:
-    case GL_UNSIGNED_INT_10_10_10_2:
-    case GL_UNSIGNED_INT_2_10_10_10_REV:
-        esize = 4;
-        elements = 1;
-        break;
-    default:
-        return 0;
-    }
-    return elements * esize * w * h;
-}
-
-GLint
-__glTexImage3D_size(GLenum format, GLenum type, GLsizei w, GLsizei h, GLsizei d)
-{
-    GLint elements, esize;
-
-    if (w < 0)
-        return 0;
-    if (h < 0)
-        return 0;
-    if (d < 0)
-        return 0;
-    switch (format) {
-    case GL_COLOR_INDEX:
-        elements = 1;
-        break;
-    case GL_RED:
-    case GL_GREEN:
-    case GL_BLUE:
-    case GL_ALPHA:
-    case GL_LUMINANCE:
-        elements = 1;
-        break;
-    case GL_LUMINANCE_ALPHA:
-        elements = 2;
-        break;
-    case GL_RGB:
-        elements = 3;
-        break;
-    case GL_RGBA:
-    case GL_ABGR_EXT:
-        elements = 4;
-        break;
-    default:
-        return 0;
-    }
-    switch (type) {
-    case GL_BITMAP:
-        if (format == GL_COLOR_INDEX) {
-            return (d * (h * ((w + 7) / 8)));
-        }
-        else {
-            return 0;
-        }
-    case GL_BYTE:
-    case GL_UNSIGNED_BYTE:
-        esize = 1;
-        break;
-    case GL_UNSIGNED_BYTE_3_3_2:
-    case GL_UNSIGNED_BYTE_2_3_3_REV:
-        esize = 1;
-        elements = 1;
-        break;
-    case GL_SHORT:
-    case GL_UNSIGNED_SHORT:
-        esize = 2;
-        break;
-    case GL_UNSIGNED_SHORT_5_6_5:
-    case GL_UNSIGNED_SHORT_5_6_5_REV:
-    case GL_UNSIGNED_SHORT_4_4_4_4:
-    case GL_UNSIGNED_SHORT_4_4_4_4_REV:
-    case GL_UNSIGNED_SHORT_5_5_5_1:
-    case GL_UNSIGNED_SHORT_1_5_5_5_REV:
-        esize = 2;
-        elements = 1;
-        break;
-    case GL_INT:
-    case GL_UNSIGNED_INT:
-    case GL_FLOAT:
-        esize = 4;
-        break;
-    case GL_UNSIGNED_INT_8_8_8_8:
-    case GL_UNSIGNED_INT_8_8_8_8_REV:
-    case GL_UNSIGNED_INT_10_10_10_2:
-    case GL_UNSIGNED_INT_2_10_10_10_REV:
-        esize = 4;
-        elements = 1;
-        break;
-    default:
-        return 0;
-    }
-    return elements * esize * w * h * d;
-}
-
-GLint
-__glLightfv_size(GLenum pname)
-{
-    switch (pname) {
-    case GL_SPOT_EXPONENT:
-        return 1;
-    case GL_SPOT_CUTOFF:
-        return 1;
-    case GL_AMBIENT:
-        return 4;
-    case GL_DIFFUSE:
-        return 4;
-    case GL_SPECULAR:
-        return 4;
-    case GL_POSITION:
-        return 4;
-    case GL_SPOT_DIRECTION:
-        return 3;
-    case GL_CONSTANT_ATTENUATION:
-        return 1;
-    case GL_LINEAR_ATTENUATION:
-        return 1;
-    case GL_QUADRATIC_ATTENUATION:
-        return 1;
-    default:
-        return 0;
-    }
-}
-
-GLint
-__glLightiv_size(GLenum pname)
-{
-    return __glLightfv_size(pname);
-}
-
-GLint
-__glLightModelfv_size(GLenum pname)
-{
-    switch (pname) {
-    case GL_LIGHT_MODEL_AMBIENT:
-        return 4;
-    case GL_LIGHT_MODEL_LOCAL_VIEWER:
-        return 1;
-    case GL_LIGHT_MODEL_TWO_SIDE:
-        return 1;
-    case GL_LIGHT_MODEL_COLOR_CONTROL:
-        return 1;
-    default:
-        return 0;
-    }
-}
-
-GLint
-__glLightModeliv_size(GLenum pname)
-{
-    return __glLightModelfv_size(pname);
-}
-
-GLint
-__glMaterialfv_size(GLenum pname)
-{
-    switch (pname) {
-    case GL_SHININESS:
-        return 1;
-    case GL_EMISSION:
-        return 4;
-    case GL_AMBIENT:
-        return 4;
-    case GL_DIFFUSE:
-        return 4;
-    case GL_SPECULAR:
-        return 4;
-    case GL_AMBIENT_AND_DIFFUSE:
-        return 4;
-    case GL_COLOR_INDEXES:
-        return 3;
-    default:
-        return 0;
-    }
-}
-
-GLint
-__glMaterialiv_size(GLenum pname)
-{
-    return __glMaterialfv_size(pname);
-}
-
-GLint
-__glColorTableParameterfv_size(GLenum pname)
-{
-    switch (pname) {
-    case GL_COLOR_TABLE_FORMAT:
-    case GL_COLOR_TABLE_WIDTH:
-    case GL_COLOR_TABLE_RED_SIZE:
-    case GL_COLOR_TABLE_GREEN_SIZE:
-    case GL_COLOR_TABLE_BLUE_SIZE:
-    case GL_COLOR_TABLE_ALPHA_SIZE:
-    case GL_COLOR_TABLE_LUMINANCE_SIZE:
-    case GL_COLOR_TABLE_INTENSITY_SIZE:
-        return 1;
-    case GL_COLOR_TABLE_SCALE:
-    case GL_COLOR_TABLE_BIAS:
-        return 4;
-    default:
-        return -1;
-    }
-}
-
-GLint
-__glColorTableParameteriv_size(GLenum pname)
-{
-    return __glColorTableParameterfv_size(pname);
-}
-
-GLint
-__glConvolutionParameterfv_size(GLenum pname)
-{
-    switch (pname) {
-    case GL_CONVOLUTION_BORDER_MODE:
-        return 1;
-    case GL_CONVOLUTION_BORDER_COLOR:
-    case GL_CONVOLUTION_FILTER_SCALE:
-    case GL_CONVOLUTION_FILTER_BIAS:
-        return 4;
-    default:                   /* error: bad enum value */
-        return -1;
-    }
-}
-
-GLint
-__glConvolutionParameteriv_size(GLenum pname)
-{
-    return __glConvolutionParameterfv_size(pname);
-}
diff --git a/hw/dmx/glxProxy/compsize.h b/hw/dmx/glxProxy/compsize.h
deleted file mode 100644
index 5e759b0..0000000
--- a/hw/dmx/glxProxy/compsize.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright 2011 Apple Inc.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#ifndef __compsize_h__
-#define __compsize_h__
-
-extern GLint __glColorTableParameterfv_size(GLenum pname);
-extern GLint __glColorTableParameteriv_size(GLenum pname);
-extern GLint __glConvolutionParameterfv_size(GLenum pname);
-extern GLint __glConvolutionParameteriv_size(GLenum pname);
-extern GLint __glFogfv_size(GLenum pname);
-extern GLint __glFogiv_size(GLenum pname);
-extern GLint __glLightModelfv_size(GLenum pname);
-extern GLint __glLightModeliv_size(GLenum pname);
-extern GLint __glLightfv_size(GLenum pname);
-extern GLint __glLightiv_size(GLenum pname);
-extern GLint __glMaterialfv_size(GLenum pname);
-extern GLint __glMaterialiv_size(GLenum pname);
-extern GLint __glTexEnvfv_size(GLenum e);
-extern GLint __glTexEnviv_size(GLenum e);
-extern GLint __glTexGendv_size(GLenum e);
-extern GLint __glTexGenfv_size(GLenum e);
-extern GLint __glTexGeniv_size(GLenum e);
-extern GLint __glTexParameterfv_size(GLenum e);
-extern GLint __glTexParameteriv_size(GLenum e);
-
-extern GLint __glCallLists_size(GLsizei n, GLenum type);
-extern GLint __glDrawPixels_size(GLenum format, GLenum type, GLsizei w, GLsizei h);
-extern GLint __glBitmap_size(GLsizei w, GLsizei h);
-extern GLint __glTexImage1D_size(GLenum format, GLenum type, GLsizei w);
-extern GLint __glTexImage2D_size(GLenum format, GLenum type, GLsizei w, GLsizei h);
-extern GLint __glTexImage3D_size(GLenum format, GLenum type, GLsizei w, GLsizei h, GLsizei d);
-
-#endif                          /* !__compsize_h__ */
diff --git a/hw/dmx/glxProxy/g_disptab.c b/hw/dmx/glxProxy/g_disptab.c
deleted file mode 100644
index 46177c4..0000000
--- a/hw/dmx/glxProxy/g_disptab.c
+++ /dev/null
@@ -1,610 +0,0 @@
-/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED */
-/*
- * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
- * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice including the dates of first publication and
- * either this permission notice or a reference to
- * http://oss.sgi.com/projects/FreeB/
- * shall be included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of Silicon Graphics, Inc.
- * shall not be used in advertising or otherwise to promote the sale, use or
- * other dealings in this Software without prior written authorization from
- * Silicon Graphics, Inc.
- */
-
-#include "glxserver.h"
-#include "glxext.h"
-#include "g_disptab.h"
-#include "glxsingle.h"
-
-__GLXdispatchSingleProcPtr __glXSingleTable[] = {
-    __glXNoSuchSingleOpcode,
-    __glXRender,
-    __glXRenderLarge,
-    __glXCreateContext,
-    __glXDestroyContext,
-    __glXMakeCurrent,
-    __glXIsDirect,
-    __glXQueryVersion,
-    __glXWaitGL,
-    __glXWaitX,
-    __glXCopyContext,
-    __glXSwapBuffers,
-    __glXUseXFont,
-    __glXCreateGLXPixmap,
-    __glXGetVisualConfigs,
-    __glXDestroyGLXPixmap,
-    __glXVendorPrivate,
-    __glXVendorPrivateWithReply,
-    __glXQueryExtensionsString,
-    __glXQueryServerString,
-    __glXClientInfo,
-    __glXGetFBConfigs,          /* __glXGetFBConfigs */
-    __glXCreatePixmap,          /* __glXCreatePixmap, */
-    __glXDestroyGLXPixmap,      /* __glXDestroyPixmap, */
-    __glXCreateNewContext,      /* __glXCreateNewContext, */
-    __glXQueryContext,          /* __glXQueryContext, */
-    __glXMakeContextCurrent,    /* __glXMakeContextCurrent, */
-    __glXCreatePbuffer,         /* __glXCreatePbuffer, */
-    __glXDestroyPbuffer,        /* __glXDestroyPbuffer, */
-    __glXGetDrawableAttributes, /* __glXGetDrawableAttributes, */
-    __glXChangeDrawableAttributes,      /* __glXChangeDrawableAttributes, */
-    __glXCreateWindow,          /* __glXCreateWindow, */
-    __glXDestroyWindow,         /* __glXDestroyWindow, */
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXForwardSingleReq,      /* __glXDisp_NewList, */
-    __glXForwardSingleReq,      /* __glXDisp_EndList, */
-    __glXForwardSingleReq,      /* __glXDisp_DeleteLists, */
-    __glXForwardPipe0WithReply, /* __glXDisp_GenLists, */
-    __glXForwardSingleReq,      /* __glXDisp_FeedbackBuffer, */
-    __glXForwardSingleReq,      /* __glXDisp_SelectBuffer, */
-    __glXForwardAllWithReply,   /* __glXDisp_RenderMode, */
-    __glXForwardAllWithReply,   /* __glXDisp_Finish, */
-    __glXForwardSingleReq,      /* __glXDisp_PixelStoref, */
-    __glXForwardSingleReq,      /* __glXDisp_PixelStorei, */
-    __glXDisp_ReadPixels,       /* __glXDisp_ReadPixels, */
-    __glXForwardPipe0WithReply, /* __glXDisp_GetBooleanv, */
-    __glXForwardPipe0WithReply, /* __glXDisp_GetClipPlane, */
-    __glXForwardPipe0WithReply, /* __glXDisp_GetDoublev, */
-    __glXForwardPipe0WithReply, /* __glXDisp_GetError, */
-    __glXForwardPipe0WithReply, /* __glXDisp_GetFloatv, */
-    __glXForwardPipe0WithReply, /* __glXDisp_GetIntegerv, */
-    __glXForwardPipe0WithReply, /* __glXDisp_GetLightfv, */
-    __glXForwardPipe0WithReply, /* __glXDisp_GetLightiv, */
-    __glXForwardPipe0WithReply, /* __glXDisp_GetMapdv, */
-    __glXForwardPipe0WithReply, /* __glXDisp_GetMapfv, */
-    __glXForwardPipe0WithReply, /* __glXDisp_GetMapiv, */
-    __glXForwardPipe0WithReply, /* __glXDisp_GetMaterialfv, */
-    __glXForwardPipe0WithReply, /* __glXDisp_GetMaterialiv, */
-    __glXForwardPipe0WithReply, /* __glXDisp_GetPixelMapfv, */
-    __glXForwardPipe0WithReply, /* __glXDisp_GetPixelMapuiv, */
-    __glXForwardPipe0WithReply, /* __glXDisp_GetPixelMapusv, */
-    __glXForwardPipe0WithReply, /* __glXDisp_GetPolygonStipple, */
-    __glXForwardPipe0WithReply, /* __glXDisp_GetString, */
-    __glXForwardPipe0WithReply, /* __glXDisp_GetTexEnvfv, */
-    __glXForwardPipe0WithReply, /* __glXDisp_GetTexEnviv, */
-    __glXForwardPipe0WithReply, /* __glXDisp_GetTexGendv, */
-    __glXForwardPipe0WithReply, /* __glXDisp_GetTexGenfv, */
-    __glXForwardPipe0WithReply, /* __glXDisp_GetTexGeniv, */
-    __glXForwardPipe0WithReply, /* __glXDisp_GetTexImage, */
-    __glXForwardPipe0WithReply, /* __glXDisp_GetTexParameterfv, */
-    __glXForwardPipe0WithReply, /* __glXDisp_GetTexParameteriv, */
-    __glXForwardPipe0WithReply, /* __glXDisp_GetTexLevelParameterfv, */
-    __glXForwardPipe0WithReply, /* __glXDisp_GetTexLevelParameteriv, */
-    __glXForwardPipe0WithReply, /* __glXDisp_IsEnabled, */
-    __glXForwardPipe0WithReply, /* __glXDisp_IsList, */
-    __glXForwardSingleReq,      /* __glXDisp_Flush, */
-    __glXForwardPipe0WithReply, /* __glXDisp_AreTexturesResident, */
-    __glXForwardSingleReq,      /* __glXDisp_DeleteTextures, */
-    __glXForwardAllWithReply,   /* __glXDisp_GenTextures, */
-    __glXForwardPipe0WithReply, /* __glXDisp_IsTexture, */
-    __glXForwardPipe0WithReply, /* __glXDisp_GetColorTable, */
-    __glXForwardPipe0WithReply, /* __glXDisp_GetColorTableParameterfv, */
-    __glXForwardPipe0WithReply, /* __glXDisp_GetColorTableParameteriv, */
-    __glXForwardPipe0WithReply, /* __glXDisp_GetConvolutionFilter, */
-    __glXForwardPipe0WithReply, /* __glXDisp_GetConvolutionParameterfv, */
-    __glXForwardPipe0WithReply, /* __glXDisp_GetConvolutionParameteriv, */
-    __glXForwardPipe0WithReply, /* __glXDisp_GetSeparableFilter, */
-    __glXForwardPipe0WithReply, /* __glXDisp_GetHistogram, */
-    __glXForwardPipe0WithReply, /* __glXDisp_GetHistogramParameterfv, */
-    __glXForwardPipe0WithReply, /* __glXDisp_GetHistogramParameteriv, */
-    __glXForwardPipe0WithReply, /* __glXDisp_GetMinmax, */
-    __glXForwardPipe0WithReply, /* __glXDisp_GetMinmaxParameterfv, */
-    __glXForwardPipe0WithReply, /* __glXDisp_GetMinmaxParameteriv, */
-};
-
-__GLXdispatchSingleProcPtr __glXSwapSingleTable[] = {
-    __glXNoSuchSingleOpcode,
-    __glXSwapRender,
-    __glXSwapRenderLarge,
-    __glXSwapCreateContext,
-    __glXSwapDestroyContext,
-    __glXSwapMakeCurrent,
-    __glXSwapIsDirect,
-    __glXSwapQueryVersion,
-    __glXSwapWaitGL,
-    __glXSwapWaitX,
-    __glXSwapCopyContext,
-    __glXSwapSwapBuffers,
-    __glXSwapUseXFont,
-    __glXSwapCreateGLXPixmap,
-    __glXSwapGetVisualConfigs,
-    __glXSwapDestroyGLXPixmap,
-    __glXSwapVendorPrivate,
-    __glXSwapVendorPrivateWithReply,
-    __glXSwapQueryExtensionsString,
-    __glXSwapQueryServerString,
-    __glXSwapClientInfo,
-    __glXSwapGetFBConfigs,
-    __glXSwapCreatePixmap,
-    __glXSwapDestroyGLXPixmap,
-    __glXSwapCreateNewContext,
-    __glXSwapQueryContext,
-    __glXSwapMakeContextCurrent,
-    __glXSwapCreatePbuffer,
-    __glXSwapDestroyPbuffer,
-    __glXSwapGetDrawableAttributes,
-    __glXSwapChangeDrawableAttributes,
-    __glXSwapCreateWindow,
-    __glXSwapDestroyWindow,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXNoSuchSingleOpcode,
-    __glXForwardSingleReqSwap,  /* __glXDisp_NewList, */
-    __glXForwardSingleReqSwap,  /* __glXDisp_EndList, */
-    __glXForwardSingleReqSwap,  /* __glXDisp_DeleteLists, */
-    __glXForwardPipe0WithReplySwap,     /* __glXDisp_GenLists, */
-    __glXForwardSingleReqSwap,  /* __glXDisp_FeedbackBuffer, */
-    __glXForwardSingleReqSwap,  /* __glXDisp_SelectBuffer, */
-    __glXForwardAllWithReplySwapiv,     /* __glXDisp_RenderMode, */
-    __glXForwardAllWithReplySwap,       /* __glXDisp_Finish, */
-    __glXForwardSingleReqSwap,  /* __glXDisp_PixelStoref, */
-    __glXForwardSingleReqSwap,  /* __glXDisp_PixelStorei, */
-    __glXDisp_ReadPixels,       /* __glXDisp_ReadPixels, */
-    __glXForwardPipe0WithReplySwap,     /* __glXDisp_GetBooleanv, */
-    __glXForwardPipe0WithReplySwapdv,   /* __glXDisp_GetClipPlane, */
-    __glXForwardPipe0WithReplySwapdv,   /* __glXDisp_GetDoublev, */
-    __glXForwardPipe0WithReplySwap,     /* __glXDisp_GetError, */
-    __glXForwardPipe0WithReplySwapiv,   /* __glXDisp_GetFloatv, */
-    __glXForwardPipe0WithReplySwapiv,   /* __glXDisp_GetIntegerv, */
-    __glXForwardPipe0WithReplySwapiv,   /* __glXDisp_GetLightfv, */
-    __glXForwardPipe0WithReplySwapiv,   /* __glXDisp_GetLightiv, */
-    __glXForwardPipe0WithReplySwapdv,   /* __glXDisp_GetMapdv, */
-    __glXForwardPipe0WithReplySwapiv,   /* __glXDisp_GetMapfv, */
-    __glXForwardPipe0WithReplySwapiv,   /* __glXDisp_GetMapiv, */
-    __glXForwardPipe0WithReplySwapiv,   /* __glXDisp_GetMaterialfv, */
-    __glXForwardPipe0WithReplySwapiv,   /* __glXDisp_GetMaterialiv, */
-    __glXForwardPipe0WithReplySwapiv,   /* __glXDisp_GetPixelMapfv, */
-    __glXForwardPipe0WithReplySwapiv,   /* __glXDisp_GetPixelMapuiv, */
-    __glXForwardPipe0WithReplySwapsv,   /* __glXDisp_GetPixelMapusv, */
-    __glXForwardPipe0WithReplySwap,     /* __glXDisp_GetPolygonStipple, */
-    __glXForwardPipe0WithReplySwap,     /* __glXDisp_GetString, */
-    __glXForwardPipe0WithReplySwapiv,   /* __glXDisp_GetTexEnvfv, */
-    __glXForwardPipe0WithReplySwapiv,   /* __glXDisp_GetTexEnviv, */
-    __glXForwardPipe0WithReplySwapdv,   /* __glXDisp_GetTexGendv, */
-    __glXForwardPipe0WithReplySwapiv,   /* __glXDisp_GetTexGenfv, */
-    __glXForwardPipe0WithReplySwapiv,   /* __glXDisp_GetTexGeniv, */
-    __glXDispSwap_GetTexImage,  /* __glXDisp_GetTexImage, */
-    __glXForwardPipe0WithReplySwapiv,   /* __glXDisp_GetTexParameterfv, */
-    __glXForwardPipe0WithReplySwapiv,   /* __glXDisp_GetTexParameteriv, */
-    __glXForwardPipe0WithReplySwapiv,   /* __glXDisp_GetTexLevelParameterfv, */
-    __glXForwardPipe0WithReplySwapiv,   /* __glXDisp_GetTexLevelParameteriv, */
-    __glXForwardPipe0WithReplySwap,     /* __glXDisp_IsEnabled, */
-    __glXForwardPipe0WithReplySwap,     /* __glXDisp_IsList, */
-    __glXForwardSingleReqSwap,  /* __glXDisp_Flush, */
-    __glXForwardPipe0WithReplySwap,     /* __glXDisp_AreTexturesResident, */
-    __glXForwardSingleReqSwap,  /* __glXDisp_DeleteTextures, */
-    __glXForwardAllWithReplySwapiv,     /* __glXDisp_GenTextures, */
-    __glXForwardPipe0WithReplySwap,     /* __glXDisp_IsTexture, */
-    __glXDispSwap_GetColorTable,        /* __glXDisp_GetColorTable, */
-    __glXForwardPipe0WithReplySwapiv,   /* __glXDisp_GetColorTableParameterfv, */
-    __glXForwardPipe0WithReplySwapiv,   /* __glXDisp_GetColorTableParameteriv, */
-    __glXDispSwap_GetColorTable,        /* __glXDisp_GetConvolutionFilter, */
-    __glXForwardPipe0WithReplySwapiv,   /* __glXDisp_GetConvolutionParameterfv, */
-    __glXForwardPipe0WithReplySwapiv,   /* __glXDisp_GetConvolutionParameteriv, */
-    __glXDispSwap_GetColorTable,        /* __glXDisp_GetSeparableFilter, */
-    __glXDispSwap_GetColorTable,        /* __glXDisp_GetHistogram, */
-    __glXForwardPipe0WithReplySwapiv,   /* __glXDisp_GetHistogramParameterfv, */
-    __glXForwardPipe0WithReplySwapiv,   /* __glXDisp_GetHistogramParameteriv, */
-    __glXDispSwap_GetColorTable,        /* __glXDisp_GetMinmax, */
-    __glXForwardPipe0WithReplySwapiv,   /* __glXDisp_GetMinmaxParameterfv, */
-    __glXForwardPipe0WithReplySwapiv,   /* __glXDisp_GetMinmaxParameteriv, */
-};
-
-__GLXdispatchRenderProcPtr __glXSwapRenderTable[] = {
-    __glXNoSuchRenderOpcode,
-    __glXDispSwap_CallList,
-    __glXDispSwap_CallLists,
-    __glXDispSwap_ListBase,
-    __glXDispSwap_Begin,
-    __glXDispSwap_Bitmap,
-    __glXDispSwap_Color3bv,
-    __glXDispSwap_Color3dv,
-    __glXDispSwap_Color3fv,
-    __glXDispSwap_Color3iv,
-    __glXDispSwap_Color3sv,
-    __glXDispSwap_Color3ubv,
-    __glXDispSwap_Color3uiv,
-    __glXDispSwap_Color3usv,
-    __glXDispSwap_Color4bv,
-    __glXDispSwap_Color4dv,
-    __glXDispSwap_Color4fv,
-    __glXDispSwap_Color4iv,
-    __glXDispSwap_Color4sv,
-    __glXDispSwap_Color4ubv,
-    __glXDispSwap_Color4uiv,
-    __glXDispSwap_Color4usv,
-    __glXDispSwap_EdgeFlagv,
-    __glXDispSwap_End,
-    __glXDispSwap_Indexdv,
-    __glXDispSwap_Indexfv,
-    __glXDispSwap_Indexiv,
-    __glXDispSwap_Indexsv,
-    __glXDispSwap_Normal3bv,
-    __glXDispSwap_Normal3dv,
-    __glXDispSwap_Normal3fv,
-    __glXDispSwap_Normal3iv,
-    __glXDispSwap_Normal3sv,
-    __glXDispSwap_RasterPos2dv,
-    __glXDispSwap_RasterPos2fv,
-    __glXDispSwap_RasterPos2iv,
-    __glXDispSwap_RasterPos2sv,
-    __glXDispSwap_RasterPos3dv,
-    __glXDispSwap_RasterPos3fv,
-    __glXDispSwap_RasterPos3iv,
-    __glXDispSwap_RasterPos3sv,
-    __glXDispSwap_RasterPos4dv,
-    __glXDispSwap_RasterPos4fv,
-    __glXDispSwap_RasterPos4iv,
-    __glXDispSwap_RasterPos4sv,
-    __glXDispSwap_Rectdv,
-    __glXDispSwap_Rectfv,
-    __glXDispSwap_Rectiv,
-    __glXDispSwap_Rectsv,
-    __glXDispSwap_TexCoord1dv,
-    __glXDispSwap_TexCoord1fv,
-    __glXDispSwap_TexCoord1iv,
-    __glXDispSwap_TexCoord1sv,
-    __glXDispSwap_TexCoord2dv,
-    __glXDispSwap_TexCoord2fv,
-    __glXDispSwap_TexCoord2iv,
-    __glXDispSwap_TexCoord2sv,
-    __glXDispSwap_TexCoord3dv,
-    __glXDispSwap_TexCoord3fv,
-    __glXDispSwap_TexCoord3iv,
-    __glXDispSwap_TexCoord3sv,
-    __glXDispSwap_TexCoord4dv,
-    __glXDispSwap_TexCoord4fv,
-    __glXDispSwap_TexCoord4iv,
-    __glXDispSwap_TexCoord4sv,
-    __glXDispSwap_Vertex2dv,
-    __glXDispSwap_Vertex2fv,
-    __glXDispSwap_Vertex2iv,
-    __glXDispSwap_Vertex2sv,
-    __glXDispSwap_Vertex3dv,
-    __glXDispSwap_Vertex3fv,
-    __glXDispSwap_Vertex3iv,
-    __glXDispSwap_Vertex3sv,
-    __glXDispSwap_Vertex4dv,
-    __glXDispSwap_Vertex4fv,
-    __glXDispSwap_Vertex4iv,
-    __glXDispSwap_Vertex4sv,
-    __glXDispSwap_ClipPlane,
-    __glXDispSwap_ColorMaterial,
-    __glXDispSwap_CullFace,
-    __glXDispSwap_Fogf,
-    __glXDispSwap_Fogfv,
-    __glXDispSwap_Fogi,
-    __glXDispSwap_Fogiv,
-    __glXDispSwap_FrontFace,
-    __glXDispSwap_Hint,
-    __glXDispSwap_Lightf,
-    __glXDispSwap_Lightfv,
-    __glXDispSwap_Lighti,
-    __glXDispSwap_Lightiv,
-    __glXDispSwap_LightModelf,
-    __glXDispSwap_LightModelfv,
-    __glXDispSwap_LightModeli,
-    __glXDispSwap_LightModeliv,
-    __glXDispSwap_LineStipple,
-    __glXDispSwap_LineWidth,
-    __glXDispSwap_Materialf,
-    __glXDispSwap_Materialfv,
-    __glXDispSwap_Materiali,
-    __glXDispSwap_Materialiv,
-    __glXDispSwap_PointSize,
-    __glXDispSwap_PolygonMode,
-    __glXDispSwap_PolygonStipple,
-    __glXDispSwap_Scissor,
-    __glXDispSwap_ShadeModel,
-    __glXDispSwap_TexParameterf,
-    __glXDispSwap_TexParameterfv,
-    __glXDispSwap_TexParameteri,
-    __glXDispSwap_TexParameteriv,
-    __glXDispSwap_TexImage1D,
-    __glXDispSwap_TexImage2D,
-    __glXDispSwap_TexEnvf,
-    __glXDispSwap_TexEnvfv,
-    __glXDispSwap_TexEnvi,
-    __glXDispSwap_TexEnviv,
-    __glXDispSwap_TexGend,
-    __glXDispSwap_TexGendv,
-    __glXDispSwap_TexGenf,
-    __glXDispSwap_TexGenfv,
-    __glXDispSwap_TexGeni,
-    __glXDispSwap_TexGeniv,
-    __glXDispSwap_InitNames,
-    __glXDispSwap_LoadName,
-    __glXDispSwap_PassThrough,
-    __glXDispSwap_PopName,
-    __glXDispSwap_PushName,
-    __glXDispSwap_DrawBuffer,
-    __glXDispSwap_Clear,
-    __glXDispSwap_ClearAccum,
-    __glXDispSwap_ClearIndex,
-    __glXDispSwap_ClearColor,
-    __glXDispSwap_ClearStencil,
-    __glXDispSwap_ClearDepth,
-    __glXDispSwap_StencilMask,
-    __glXDispSwap_ColorMask,
-    __glXDispSwap_DepthMask,
-    __glXDispSwap_IndexMask,
-    __glXDispSwap_Accum,
-    __glXDispSwap_Disable,
-    __glXDispSwap_Enable,
-    __glXNoSuchRenderOpcode,
-    __glXDispSwap_PopAttrib,
-    __glXDispSwap_PushAttrib,
-    __glXDispSwap_Map1d,
-    __glXDispSwap_Map1f,
-    __glXDispSwap_Map2d,
-    __glXDispSwap_Map2f,
-    __glXDispSwap_MapGrid1d,
-    __glXDispSwap_MapGrid1f,
-    __glXDispSwap_MapGrid2d,
-    __glXDispSwap_MapGrid2f,
-    __glXDispSwap_EvalCoord1dv,
-    __glXDispSwap_EvalCoord1fv,
-    __glXDispSwap_EvalCoord2dv,
-    __glXDispSwap_EvalCoord2fv,
-    __glXDispSwap_EvalMesh1,
-    __glXDispSwap_EvalPoint1,
-    __glXDispSwap_EvalMesh2,
-    __glXDispSwap_EvalPoint2,
-    __glXDispSwap_AlphaFunc,
-    __glXDispSwap_BlendFunc,
-    __glXDispSwap_LogicOp,
-    __glXDispSwap_StencilFunc,
-    __glXDispSwap_StencilOp,
-    __glXDispSwap_DepthFunc,
-    __glXDispSwap_PixelZoom,
-    __glXDispSwap_PixelTransferf,
-    __glXDispSwap_PixelTransferi,
-    __glXDispSwap_PixelMapfv,
-    __glXDispSwap_PixelMapuiv,
-    __glXDispSwap_PixelMapusv,
-    __glXDispSwap_ReadBuffer,
-    __glXDispSwap_CopyPixels,
-    __glXDispSwap_DrawPixels,
-    __glXDispSwap_DepthRange,
-    __glXDispSwap_Frustum,
-    __glXDispSwap_LoadIdentity,
-    __glXDispSwap_LoadMatrixf,
-    __glXDispSwap_LoadMatrixd,
-    __glXDispSwap_MatrixMode,
-    __glXDispSwap_MultMatrixf,
-    __glXDispSwap_MultMatrixd,
-    __glXDispSwap_Ortho,
-    __glXDispSwap_PopMatrix,
-    __glXDispSwap_PushMatrix,
-    __glXDispSwap_Rotated,
-    __glXDispSwap_Rotatef,
-    __glXDispSwap_Scaled,
-    __glXDispSwap_Scalef,
-    __glXDispSwap_Translated,
-    __glXDispSwap_Translatef,
-    __glXDispSwap_Viewport,
-    __glXDispSwap_PolygonOffset,
-    __glXDispSwap_DrawArrays,
-    __glXDispSwap_Indexubv,
-    __glXDispSwap_ColorSubTable,
-    __glXDispSwap_CopyColorSubTable,
-    __glXDispSwap_ActiveTextureARB,
-    __glXDispSwap_MultiTexCoord1dvARB,
-    __glXDispSwap_MultiTexCoord1fvARB,
-    __glXDispSwap_MultiTexCoord1ivARB,
-    __glXDispSwap_MultiTexCoord1svARB,
-    __glXDispSwap_MultiTexCoord2dvARB,
-    __glXDispSwap_MultiTexCoord2fvARB,
-    __glXDispSwap_MultiTexCoord2ivARB,
-    __glXDispSwap_MultiTexCoord2svARB,
-    __glXDispSwap_MultiTexCoord3dvARB,
-    __glXDispSwap_MultiTexCoord3fvARB,
-    __glXDispSwap_MultiTexCoord3ivARB,
-    __glXDispSwap_MultiTexCoord3svARB,
-    __glXDispSwap_MultiTexCoord4dvARB,
-    __glXDispSwap_MultiTexCoord4fvARB,
-    __glXDispSwap_MultiTexCoord4ivARB,
-    __glXDispSwap_MultiTexCoord4svARB,
-};
-
-__GLXRenderSwapInfo __glXSwapRenderTable_EXT[] = {
-    {4, 4, NULL},               /* X_GLrop_BlendColorEXT */
-    {4, 1, NULL},               /* X_GLrop_BlendEquationEXT */
-    {4, 2, NULL},               /* X_GLrop_PolygonOffsetEXT */
-    {4, 0, __glXDispSwap_TexSubImage1D},        /* X_GLrop_TexSubImage1DEXT */
-    {4, 0, __glXDispSwap_TexSubImage2D},        /* X_GLrop_TexSubImage2DEXT */
-    {4, 0, __glXDispSwap_ConvolutionFilter1D},  /* X_GLrop_ConvolutionFilter1DEXT */
-    {4, 0, __glXDispSwap_ConvolutionFilter2D},  /* X_GLrop_ConvolutionFilter2DEXT */
-    {4, 3, NULL},               /* X_GLrop_ConvolutionParameterfEXT */
-    {4, 0, __glXDispSwap_ConvolutionParameterfv},       /* X_GLrop_ConvolutionParameterfvEXT */
-    {4, 3, NULL},               /* X_GLrop_ConvolutionParameteriEXT */
-    {4, 0, __glXDispSwap_ConvolutionParameteriv},       /* X_GLrop_ConvolutionParameterivEXT */
-    {4, 0, __glXDispSwap_CopyConvolutionFilter1D},      /* X_GLrop_CopyConvolutionFilter1DEXT */
-    {4, 0, __glXDispSwap_CopyConvolutionFilter2D},      /* X_GLrop_CopyConvolutionFilter2DEXT */
-    {4, 0, __glXDispSwap_SeparableFilter2D},    /* X_GLrop_SeparableFilter2DEXT */
-    {4, 3, NULL},               /* X_GLrop_HistogramEXT */
-    {4, 2, NULL},               /* X_GLrop_MinmaxEXT */
-    {4, 1, NULL},               /* X_GLrop_ResetHistogramEXT */
-    {4, 1, NULL},               /* X_GLrop_ResetMinmaxEXT */
-    {4, 0, __glXDispSwap_TexImage3D},   /* X_GLrop_TexImage3DEXT */
-    {4, 0, __glXDispSwap_TexSubImage3D},        /* X_GLrop_TexSubImage3DEXT */
-    {4, 0, __glXDispSwap_DrawArrays},   /* X_GLrop_DrawArraysEXT */
-    {4, 2, NULL},               /* X_GLrop_BindTextureEXT */
-    {4, 0, __glXDispSwap_PrioritizeTextures},   /* X_GLrop_PrioritizeTexturesEXT */
-    {4, 0, __glXDispSwap_CopyTexImage1D},       /* X_GLrop_CopyTexImage1DEXT */
-    {4, 0, __glXDispSwap_CopyTexImage2D},       /* X_GLrop_CopyTexImage2DEXT */
-    {4, 0, __glXDispSwap_CopyTexSubImage1D},    /* X_GLrop_CopyTexSubImage1DEXT */
-    {4, 0, __glXDispSwap_CopyTexSubImage2D},    /* X_GLrop_CopyTexSubImage2DEXT */
-    {4, 0, __glXDispSwap_CopyTexSubImage3D},    /* X_GLrop_CopyTexSubImage3DEXT */
-
-};
diff --git a/hw/dmx/glxProxy/g_disptab.h b/hw/dmx/glxProxy/g_disptab.h
deleted file mode 100644
index 783f87a..0000000
--- a/hw/dmx/glxProxy/g_disptab.h
+++ /dev/null
@@ -1,699 +0,0 @@
-/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED */
-#ifndef _GLX_g_disptab_h_
-#define _GLX_g_disptab_h_
-/*
- * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
- * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice including the dates of first publication and
- * either this permission notice or a reference to
- * http://oss.sgi.com/projects/FreeB/
- * shall be included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of Silicon Graphics, Inc.
- * shall not be used in advertising or otherwise to promote the sale, use or
- * other dealings in this Software without prior written authorization from
- * Silicon Graphics, Inc.
- */
-
-extern int __glXRender(__GLXclientState *, GLbyte *);
-extern int __glXRenderLarge(__GLXclientState *, GLbyte *);
-extern int __glXSendLargeCommand(__GLXclientState * cl,
-                                 GLXContextTag contextTag);
-extern int __glXCreateContext(__GLXclientState *, GLbyte *);
-extern int __glXCreateNewContext(__GLXclientState * cl, GLbyte * pc);
-extern int __glXDestroyContext(__GLXclientState *, GLbyte *);
-extern int __glXMakeCurrent(__GLXclientState *, GLbyte *);
-extern int __glXMakeContextCurrent(__GLXclientState *, GLbyte *);
-extern int __glXCreatePbuffer(__GLXclientState * cl, GLbyte * pc);
-extern int __glXDestroyPbuffer(__GLXclientState * cl, GLbyte * pc);
-extern int __glXGetDrawableAttributes(__GLXclientState * cl, GLbyte * pc);
-extern int __glXChangeDrawableAttributes(__GLXclientState * cl, GLbyte * pc);
-extern int __glXIsDirect(__GLXclientState *, GLbyte *);
-extern int __glXQueryVersion(__GLXclientState *, GLbyte *);
-extern int __glXWaitGL(__GLXclientState *, GLbyte *);
-extern int __glXWaitX(__GLXclientState *, GLbyte *);
-extern int __glXCopyContext(__GLXclientState *, GLbyte *);
-extern int __glXSwapBuffers(__GLXclientState *, GLbyte *);
-extern int __glXUseXFont(__GLXclientState *, GLbyte *);
-extern int __glXCreateGLXPixmap(__GLXclientState *, GLbyte *);
-extern int __glXCreatePixmap(__GLXclientState * cl, GLbyte * pc);
-extern int __glXGetVisualConfigs(__GLXclientState *, GLbyte *);
-extern int __glXDestroyGLXPixmap(__GLXclientState *, GLbyte *);
-extern int __glXVendorPrivate(__GLXclientState *, GLbyte *);
-extern int __glXVendorPrivateWithReply(__GLXclientState *, GLbyte *);
-extern int __glXQueryExtensionsString(__GLXclientState *, GLbyte *);
-extern int __glXQueryServerString(__GLXclientState *, GLbyte *);
-extern int __glXClientInfo(__GLXclientState *, GLbyte *);
-extern int __glXGetFBConfigs(__GLXclientState *, GLbyte *);
-extern int __glXCreateWindow(__GLXclientState * cl, GLbyte * pc);
-extern int __glXDestroyWindow(__GLXclientState * cl, GLbyte * pc);
-extern int __glXQueryContext(__GLXclientState * cl, GLbyte * pc);
-extern int __glXDisp_NewList(__GLXclientState *, GLbyte *);
-extern int __glXDisp_EndList(__GLXclientState *, GLbyte *);
-extern int __glXDisp_DeleteLists(__GLXclientState *, GLbyte *);
-extern int __glXDisp_GenLists(__GLXclientState *, GLbyte *);
-extern int __glXDisp_FeedbackBuffer(__GLXclientState *, GLbyte *);
-extern int __glXDisp_SelectBuffer(__GLXclientState *, GLbyte *);
-extern int __glXDisp_RenderMode(__GLXclientState *, GLbyte *);
-extern int __glXDisp_Finish(__GLXclientState *, GLbyte *);
-extern int __glXDisp_PixelStoref(__GLXclientState *, GLbyte *);
-extern int __glXDisp_PixelStorei(__GLXclientState *, GLbyte *);
-extern int __glXDisp_ReadPixels(__GLXclientState *, GLbyte *);
-extern int __glXDisp_GetBooleanv(__GLXclientState *, GLbyte *);
-extern int __glXDisp_GetClipPlane(__GLXclientState *, GLbyte *);
-extern int __glXDisp_GetDoublev(__GLXclientState *, GLbyte *);
-extern int __glXDisp_GetError(__GLXclientState *, GLbyte *);
-extern int __glXDisp_GetFloatv(__GLXclientState *, GLbyte *);
-extern int __glXDisp_GetIntegerv(__GLXclientState *, GLbyte *);
-extern int __glXDisp_GetLightfv(__GLXclientState *, GLbyte *);
-extern int __glXDisp_GetLightiv(__GLXclientState *, GLbyte *);
-extern int __glXDisp_GetMapdv(__GLXclientState *, GLbyte *);
-extern int __glXDisp_GetMapfv(__GLXclientState *, GLbyte *);
-extern int __glXDisp_GetMapiv(__GLXclientState *, GLbyte *);
-extern int __glXDisp_GetMaterialfv(__GLXclientState *, GLbyte *);
-extern int __glXDisp_GetMaterialiv(__GLXclientState *, GLbyte *);
-extern int __glXDisp_GetPixelMapfv(__GLXclientState *, GLbyte *);
-extern int __glXDisp_GetPixelMapuiv(__GLXclientState *, GLbyte *);
-extern int __glXDisp_GetPixelMapusv(__GLXclientState *, GLbyte *);
-extern int __glXDisp_GetPolygonStipple(__GLXclientState *, GLbyte *);
-extern int __glXDisp_GetString(__GLXclientState *, GLbyte *);
-extern int __glXDisp_GetTexEnvfv(__GLXclientState *, GLbyte *);
-extern int __glXDisp_GetTexEnviv(__GLXclientState *, GLbyte *);
-extern int __glXDisp_GetTexGendv(__GLXclientState *, GLbyte *);
-extern int __glXDisp_GetTexGenfv(__GLXclientState *, GLbyte *);
-extern int __glXDisp_GetTexGeniv(__GLXclientState *, GLbyte *);
-extern int __glXDisp_GetTexImage(__GLXclientState *, GLbyte *);
-extern int __glXDisp_GetTexParameterfv(__GLXclientState *, GLbyte *);
-extern int __glXDisp_GetTexParameteriv(__GLXclientState *, GLbyte *);
-extern int __glXDisp_GetTexLevelParameterfv(__GLXclientState *, GLbyte *);
-extern int __glXDisp_GetTexLevelParameteriv(__GLXclientState *, GLbyte *);
-extern int __glXDisp_IsEnabled(__GLXclientState *, GLbyte *);
-extern int __glXDisp_IsList(__GLXclientState *, GLbyte *);
-extern int __glXDisp_Flush(__GLXclientState *, GLbyte *);
-extern int __glXDisp_AreTexturesResident(__GLXclientState *, GLbyte *);
-extern int __glXDisp_DeleteTextures(__GLXclientState *, GLbyte *);
-extern int __glXDisp_GenTextures(__GLXclientState *, GLbyte *);
-extern int __glXDisp_IsTexture(__GLXclientState *, GLbyte *);
-extern int __glXDisp_GetColorTable(__GLXclientState *, GLbyte *);
-extern int __glXDisp_GetColorTableParameterfv(__GLXclientState *, GLbyte *);
-extern int __glXDisp_GetColorTableParameteriv(__GLXclientState *, GLbyte *);
-extern int __glXDisp_GetConvolutionFilter(__GLXclientState *, GLbyte *);
-extern int __glXDisp_GetConvolutionParameterfv(__GLXclientState *, GLbyte *);
-extern int __glXDisp_GetConvolutionParameteriv(__GLXclientState *, GLbyte *);
-extern int __glXDisp_GetSeparableFilter(__GLXclientState *, GLbyte *);
-extern int __glXDisp_GetHistogram(__GLXclientState *, GLbyte *);
-extern int __glXDisp_GetHistogramParameterfv(__GLXclientState *, GLbyte *);
-extern int __glXDisp_GetHistogramParameteriv(__GLXclientState *, GLbyte *);
-extern int __glXDisp_GetMinmax(__GLXclientState *, GLbyte *);
-extern int __glXDisp_GetMinmaxParameterfv(__GLXclientState *, GLbyte *);
-extern int __glXDisp_GetMinmaxParameteriv(__GLXclientState *, GLbyte *);
-
-extern void __glXDisp_CallList(GLbyte *);
-extern void __glXDisp_CallLists(GLbyte *);
-extern void __glXDisp_ListBase(GLbyte *);
-extern void __glXDisp_Begin(GLbyte *);
-extern void __glXDisp_Bitmap(GLbyte *);
-extern void __glXDisp_Color3bv(GLbyte *);
-extern void __glXDisp_Color3dv(GLbyte *);
-extern void __glXDisp_Color3fv(GLbyte *);
-extern void __glXDisp_Color3iv(GLbyte *);
-extern void __glXDisp_Color3sv(GLbyte *);
-extern void __glXDisp_Color3ubv(GLbyte *);
-extern void __glXDisp_Color3uiv(GLbyte *);
-extern void __glXDisp_Color3usv(GLbyte *);
-extern void __glXDisp_Color4bv(GLbyte *);
-extern void __glXDisp_Color4dv(GLbyte *);
-extern void __glXDisp_Color4fv(GLbyte *);
-extern void __glXDisp_Color4iv(GLbyte *);
-extern void __glXDisp_Color4sv(GLbyte *);
-extern void __glXDisp_Color4ubv(GLbyte *);
-extern void __glXDisp_Color4uiv(GLbyte *);
-extern void __glXDisp_Color4usv(GLbyte *);
-extern void __glXDisp_EdgeFlagv(GLbyte *);
-extern void __glXDisp_End(GLbyte *);
-extern void __glXDisp_Indexdv(GLbyte *);
-extern void __glXDisp_Indexfv(GLbyte *);
-extern void __glXDisp_Indexiv(GLbyte *);
-extern void __glXDisp_Indexsv(GLbyte *);
-extern void __glXDisp_Normal3bv(GLbyte *);
-extern void __glXDisp_Normal3dv(GLbyte *);
-extern void __glXDisp_Normal3fv(GLbyte *);
-extern void __glXDisp_Normal3iv(GLbyte *);
-extern void __glXDisp_Normal3sv(GLbyte *);
-extern void __glXDisp_RasterPos2dv(GLbyte *);
-extern void __glXDisp_RasterPos2fv(GLbyte *);
-extern void __glXDisp_RasterPos2iv(GLbyte *);
-extern void __glXDisp_RasterPos2sv(GLbyte *);
-extern void __glXDisp_RasterPos3dv(GLbyte *);
-extern void __glXDisp_RasterPos3fv(GLbyte *);
-extern void __glXDisp_RasterPos3iv(GLbyte *);
-extern void __glXDisp_RasterPos3sv(GLbyte *);
-extern void __glXDisp_RasterPos4dv(GLbyte *);
-extern void __glXDisp_RasterPos4fv(GLbyte *);
-extern void __glXDisp_RasterPos4iv(GLbyte *);
-extern void __glXDisp_RasterPos4sv(GLbyte *);
-extern void __glXDisp_Rectdv(GLbyte *);
-extern void __glXDisp_Rectfv(GLbyte *);
-extern void __glXDisp_Rectiv(GLbyte *);
-extern void __glXDisp_Rectsv(GLbyte *);
-extern void __glXDisp_TexCoord1dv(GLbyte *);
-extern void __glXDisp_TexCoord1fv(GLbyte *);
-extern void __glXDisp_TexCoord1iv(GLbyte *);
-extern void __glXDisp_TexCoord1sv(GLbyte *);
-extern void __glXDisp_TexCoord2dv(GLbyte *);
-extern void __glXDisp_TexCoord2fv(GLbyte *);
-extern void __glXDisp_TexCoord2iv(GLbyte *);
-extern void __glXDisp_TexCoord2sv(GLbyte *);
-extern void __glXDisp_TexCoord3dv(GLbyte *);
-extern void __glXDisp_TexCoord3fv(GLbyte *);
-extern void __glXDisp_TexCoord3iv(GLbyte *);
-extern void __glXDisp_TexCoord3sv(GLbyte *);
-extern void __glXDisp_TexCoord4dv(GLbyte *);
-extern void __glXDisp_TexCoord4fv(GLbyte *);
-extern void __glXDisp_TexCoord4iv(GLbyte *);
-extern void __glXDisp_TexCoord4sv(GLbyte *);
-extern void __glXDisp_Vertex2dv(GLbyte *);
-extern void __glXDisp_Vertex2fv(GLbyte *);
-extern void __glXDisp_Vertex2iv(GLbyte *);
-extern void __glXDisp_Vertex2sv(GLbyte *);
-extern void __glXDisp_Vertex3dv(GLbyte *);
-extern void __glXDisp_Vertex3fv(GLbyte *);
-extern void __glXDisp_Vertex3iv(GLbyte *);
-extern void __glXDisp_Vertex3sv(GLbyte *);
-extern void __glXDisp_Vertex4dv(GLbyte *);
-extern void __glXDisp_Vertex4fv(GLbyte *);
-extern void __glXDisp_Vertex4iv(GLbyte *);
-extern void __glXDisp_Vertex4sv(GLbyte *);
-extern void __glXDisp_ClipPlane(GLbyte *);
-extern void __glXDisp_ColorMaterial(GLbyte *);
-extern void __glXDisp_CullFace(GLbyte *);
-extern void __glXDisp_Fogf(GLbyte *);
-extern void __glXDisp_Fogfv(GLbyte *);
-extern void __glXDisp_Fogi(GLbyte *);
-extern void __glXDisp_Fogiv(GLbyte *);
-extern void __glXDisp_FrontFace(GLbyte *);
-extern void __glXDisp_Hint(GLbyte *);
-extern void __glXDisp_Lightf(GLbyte *);
-extern void __glXDisp_Lightfv(GLbyte *);
-extern void __glXDisp_Lighti(GLbyte *);
-extern void __glXDisp_Lightiv(GLbyte *);
-extern void __glXDisp_LightModelf(GLbyte *);
-extern void __glXDisp_LightModelfv(GLbyte *);
-extern void __glXDisp_LightModeli(GLbyte *);
-extern void __glXDisp_LightModeliv(GLbyte *);
-extern void __glXDisp_LineStipple(GLbyte *);
-extern void __glXDisp_LineWidth(GLbyte *);
-extern void __glXDisp_Materialf(GLbyte *);
-extern void __glXDisp_Materialfv(GLbyte *);
-extern void __glXDisp_Materiali(GLbyte *);
-extern void __glXDisp_Materialiv(GLbyte *);
-extern void __glXDisp_PointSize(GLbyte *);
-extern void __glXDisp_PolygonMode(GLbyte *);
-extern void __glXDisp_PolygonStipple(GLbyte *);
-extern void __glXDisp_Scissor(GLbyte *);
-extern void __glXDisp_ShadeModel(GLbyte *);
-extern void __glXDisp_TexParameterf(GLbyte *);
-extern void __glXDisp_TexParameterfv(GLbyte *);
-extern void __glXDisp_TexParameteri(GLbyte *);
-extern void __glXDisp_TexParameteriv(GLbyte *);
-extern void __glXDisp_TexImage1D(GLbyte *);
-extern void __glXDisp_TexImage2D(GLbyte *);
-extern void __glXDisp_TexEnvf(GLbyte *);
-extern void __glXDisp_TexEnvfv(GLbyte *);
-extern void __glXDisp_TexEnvi(GLbyte *);
-extern void __glXDisp_TexEnviv(GLbyte *);
-extern void __glXDisp_TexGend(GLbyte *);
-extern void __glXDisp_TexGendv(GLbyte *);
-extern void __glXDisp_TexGenf(GLbyte *);
-extern void __glXDisp_TexGenfv(GLbyte *);
-extern void __glXDisp_TexGeni(GLbyte *);
-extern void __glXDisp_TexGeniv(GLbyte *);
-extern void __glXDisp_InitNames(GLbyte *);
-extern void __glXDisp_LoadName(GLbyte *);
-extern void __glXDisp_PassThrough(GLbyte *);
-extern void __glXDisp_PopName(GLbyte *);
-extern void __glXDisp_PushName(GLbyte *);
-extern void __glXDisp_DrawBuffer(GLbyte *);
-extern void __glXDisp_Clear(GLbyte *);
-extern void __glXDisp_ClearAccum(GLbyte *);
-extern void __glXDisp_ClearIndex(GLbyte *);
-extern void __glXDisp_ClearColor(GLbyte *);
-extern void __glXDisp_ClearStencil(GLbyte *);
-extern void __glXDisp_ClearDepth(GLbyte *);
-extern void __glXDisp_StencilMask(GLbyte *);
-extern void __glXDisp_ColorMask(GLbyte *);
-extern void __glXDisp_DepthMask(GLbyte *);
-extern void __glXDisp_IndexMask(GLbyte *);
-extern void __glXDisp_Accum(GLbyte *);
-extern void __glXDisp_Disable(GLbyte *);
-extern void __glXDisp_Enable(GLbyte *);
-extern void __glXDisp_PopAttrib(GLbyte *);
-extern void __glXDisp_PushAttrib(GLbyte *);
-extern void __glXDisp_Map1d(GLbyte *);
-extern void __glXDisp_Map1f(GLbyte *);
-extern void __glXDisp_Map2d(GLbyte *);
-extern void __glXDisp_Map2f(GLbyte *);
-extern void __glXDisp_MapGrid1d(GLbyte *);
-extern void __glXDisp_MapGrid1f(GLbyte *);
-extern void __glXDisp_MapGrid2d(GLbyte *);
-extern void __glXDisp_MapGrid2f(GLbyte *);
-extern void __glXDisp_EvalCoord1dv(GLbyte *);
-extern void __glXDisp_EvalCoord1fv(GLbyte *);
-extern void __glXDisp_EvalCoord2dv(GLbyte *);
-extern void __glXDisp_EvalCoord2fv(GLbyte *);
-extern void __glXDisp_EvalMesh1(GLbyte *);
-extern void __glXDisp_EvalPoint1(GLbyte *);
-extern void __glXDisp_EvalMesh2(GLbyte *);
-extern void __glXDisp_EvalPoint2(GLbyte *);
-extern void __glXDisp_AlphaFunc(GLbyte *);
-extern void __glXDisp_BlendFunc(GLbyte *);
-extern void __glXDisp_LogicOp(GLbyte *);
-extern void __glXDisp_StencilFunc(GLbyte *);
-extern void __glXDisp_StencilOp(GLbyte *);
-extern void __glXDisp_DepthFunc(GLbyte *);
-extern void __glXDisp_PixelZoom(GLbyte *);
-extern void __glXDisp_PixelTransferf(GLbyte *);
-extern void __glXDisp_PixelTransferi(GLbyte *);
-extern void __glXDisp_PixelMapfv(GLbyte *);
-extern void __glXDisp_PixelMapuiv(GLbyte *);
-extern void __glXDisp_PixelMapusv(GLbyte *);
-extern void __glXDisp_ReadBuffer(GLbyte *);
-extern void __glXDisp_CopyPixels(GLbyte *);
-extern void __glXDisp_DrawPixels(GLbyte *);
-extern void __glXDisp_DepthRange(GLbyte *);
-extern void __glXDisp_Frustum(GLbyte *);
-extern void __glXDisp_LoadIdentity(GLbyte *);
-extern void __glXDisp_LoadMatrixf(GLbyte *);
-extern void __glXDisp_LoadMatrixd(GLbyte *);
-extern void __glXDisp_MatrixMode(GLbyte *);
-extern void __glXDisp_MultMatrixf(GLbyte *);
-extern void __glXDisp_MultMatrixd(GLbyte *);
-extern void __glXDisp_Ortho(GLbyte *);
-extern void __glXDisp_PopMatrix(GLbyte *);
-extern void __glXDisp_PushMatrix(GLbyte *);
-extern void __glXDisp_Rotated(GLbyte *);
-extern void __glXDisp_Rotatef(GLbyte *);
-extern void __glXDisp_Scaled(GLbyte *);
-extern void __glXDisp_Scalef(GLbyte *);
-extern void __glXDisp_Translated(GLbyte *);
-extern void __glXDisp_Translatef(GLbyte *);
-extern void __glXDisp_Viewport(GLbyte *);
-extern void __glXDisp_PolygonOffset(GLbyte *);
-extern void __glXDisp_DrawArrays(GLbyte *);
-extern void __glXDisp_Indexubv(GLbyte *);
-extern void __glXDisp_ColorSubTable(GLbyte *);
-extern void __glXDisp_CopyColorSubTable(GLbyte *);
-extern void __glXDisp_ActiveTextureARB(GLbyte *);
-extern void __glXDisp_MultiTexCoord1dvARB(GLbyte *);
-extern void __glXDisp_MultiTexCoord1fvARB(GLbyte *);
-extern void __glXDisp_MultiTexCoord1ivARB(GLbyte *);
-extern void __glXDisp_MultiTexCoord1svARB(GLbyte *);
-extern void __glXDisp_MultiTexCoord2dvARB(GLbyte *);
-extern void __glXDisp_MultiTexCoord2fvARB(GLbyte *);
-extern void __glXDisp_MultiTexCoord2ivARB(GLbyte *);
-extern void __glXDisp_MultiTexCoord2svARB(GLbyte *);
-extern void __glXDisp_MultiTexCoord3dvARB(GLbyte *);
-extern void __glXDisp_MultiTexCoord3fvARB(GLbyte *);
-extern void __glXDisp_MultiTexCoord3ivARB(GLbyte *);
-extern void __glXDisp_MultiTexCoord3svARB(GLbyte *);
-extern void __glXDisp_MultiTexCoord4dvARB(GLbyte *);
-extern void __glXDisp_MultiTexCoord4fvARB(GLbyte *);
-extern void __glXDisp_MultiTexCoord4ivARB(GLbyte *);
-extern void __glXDisp_MultiTexCoord4svARB(GLbyte *);
-
-extern int __glXSwapRender(__GLXclientState *, GLbyte *);
-extern int __glXSwapRenderLarge(__GLXclientState *, GLbyte *);
-extern int __glXSwapCreateContext(__GLXclientState *, GLbyte *);
-extern int __glXSwapCreateNewContext(__GLXclientState * cl, GLbyte * pc);
-extern int __glXSwapDestroyContext(__GLXclientState *, GLbyte *);
-extern int __glXSwapMakeCurrent(__GLXclientState *, GLbyte *);
-extern int __glXSwapMakeContextCurrent(__GLXclientState *, GLbyte *);
-extern int __glXSwapCreatePbuffer(__GLXclientState * cl, GLbyte * pc);
-extern int __glXSwapDestroyPbuffer(__GLXclientState * cl, GLbyte * pc);
-extern int __glXSwapGetDrawableAttributes(__GLXclientState * cl, GLbyte * pc);
-extern int __glXSwapChangeDrawableAttributes(__GLXclientState * cl,
-                                             GLbyte * pc);
-extern int __glXSwapIsDirect(__GLXclientState *, GLbyte *);
-extern int __glXSwapQueryVersion(__GLXclientState *, GLbyte *);
-extern int __glXSwapWaitGL(__GLXclientState *, GLbyte *);
-extern int __glXSwapWaitX(__GLXclientState *, GLbyte *);
-extern int __glXSwapCopyContext(__GLXclientState *, GLbyte *);
-extern int __glXSwapSwapBuffers(__GLXclientState *, GLbyte *);
-extern int __glXSwapUseXFont(__GLXclientState *, GLbyte *);
-extern int __glXSwapCreateGLXPixmap(__GLXclientState *, GLbyte *);
-extern int __glXSwapCreatePixmap(__GLXclientState * cl, GLbyte * pc);
-extern int __glXSwapGetVisualConfigs(__GLXclientState *, GLbyte *);
-extern int __glXSwapDestroyGLXPixmap(__GLXclientState *, GLbyte *);
-extern int __glXSwapVendorPrivate(__GLXclientState *, GLbyte *);
-extern int __glXSwapVendorPrivateWithReply(__GLXclientState *, GLbyte *);
-extern int __glXSwapQueryExtensionsString(__GLXclientState *, GLbyte *);
-extern int __glXSwapQueryServerString(__GLXclientState *, GLbyte *);
-extern int __glXSwapClientInfo(__GLXclientState *, GLbyte *);
-extern int __glXSwapGetFBConfigs(__GLXclientState *, GLbyte *);
-extern int __glXSwapCreateWindow(__GLXclientState * cl, GLbyte * pc);
-extern int __glXSwapDestroyWindow(__GLXclientState * cl, GLbyte * pc);
-extern int __glXSwapQueryContext(__GLXclientState * cl, GLbyte * pc);
-extern int __glXDispSwap_NewList(__GLXclientState *, GLbyte *);
-extern int __glXDispSwap_EndList(__GLXclientState *, GLbyte *);
-extern int __glXDispSwap_DeleteLists(__GLXclientState *, GLbyte *);
-extern int __glXDispSwap_GenLists(__GLXclientState *, GLbyte *);
-extern int __glXDispSwap_FeedbackBuffer(__GLXclientState *, GLbyte *);
-extern int __glXDispSwap_SelectBuffer(__GLXclientState *, GLbyte *);
-extern int __glXDispSwap_RenderMode(__GLXclientState *, GLbyte *);
-extern int __glXDispSwap_Finish(__GLXclientState *, GLbyte *);
-extern int __glXDispSwap_PixelStoref(__GLXclientState *, GLbyte *);
-extern int __glXDispSwap_PixelStorei(__GLXclientState *, GLbyte *);
-extern int __glXDispSwap_ReadPixels(__GLXclientState *, GLbyte *);
-extern int __glXDispSwap_GetBooleanv(__GLXclientState *, GLbyte *);
-extern int __glXDispSwap_GetClipPlane(__GLXclientState *, GLbyte *);
-extern int __glXDispSwap_GetDoublev(__GLXclientState *, GLbyte *);
-extern int __glXDispSwap_GetError(__GLXclientState *, GLbyte *);
-extern int __glXDispSwap_GetFloatv(__GLXclientState *, GLbyte *);
-extern int __glXDispSwap_GetIntegerv(__GLXclientState *, GLbyte *);
-extern int __glXDispSwap_GetLightfv(__GLXclientState *, GLbyte *);
-extern int __glXDispSwap_GetLightiv(__GLXclientState *, GLbyte *);
-extern int __glXDispSwap_GetMapdv(__GLXclientState *, GLbyte *);
-extern int __glXDispSwap_GetMapfv(__GLXclientState *, GLbyte *);
-extern int __glXDispSwap_GetMapiv(__GLXclientState *, GLbyte *);
-extern int __glXDispSwap_GetMaterialfv(__GLXclientState *, GLbyte *);
-extern int __glXDispSwap_GetMaterialiv(__GLXclientState *, GLbyte *);
-extern int __glXDispSwap_GetPixelMapfv(__GLXclientState *, GLbyte *);
-extern int __glXDispSwap_GetPixelMapuiv(__GLXclientState *, GLbyte *);
-extern int __glXDispSwap_GetPixelMapusv(__GLXclientState *, GLbyte *);
-extern int __glXDispSwap_GetPolygonStipple(__GLXclientState *, GLbyte *);
-extern int __glXDispSwap_GetString(__GLXclientState *, GLbyte *);
-extern int __glXDispSwap_GetTexEnvfv(__GLXclientState *, GLbyte *);
-extern int __glXDispSwap_GetTexEnviv(__GLXclientState *, GLbyte *);
-extern int __glXDispSwap_GetTexGendv(__GLXclientState *, GLbyte *);
-extern int __glXDispSwap_GetTexGenfv(__GLXclientState *, GLbyte *);
-extern int __glXDispSwap_GetTexGeniv(__GLXclientState *, GLbyte *);
-extern int __glXDispSwap_GetTexImage(__GLXclientState *, GLbyte *);
-extern int __glXDispSwap_GetTexParameterfv(__GLXclientState *, GLbyte *);
-extern int __glXDispSwap_GetTexParameteriv(__GLXclientState *, GLbyte *);
-extern int __glXDispSwap_GetTexLevelParameterfv(__GLXclientState *, GLbyte *);
-extern int __glXDispSwap_GetTexLevelParameteriv(__GLXclientState *, GLbyte *);
-extern int __glXDispSwap_IsEnabled(__GLXclientState *, GLbyte *);
-extern int __glXDispSwap_IsList(__GLXclientState *, GLbyte *);
-extern int __glXDispSwap_Flush(__GLXclientState *, GLbyte *);
-extern int __glXDispSwap_AreTexturesResident(__GLXclientState *, GLbyte *);
-extern int __glXDispSwap_DeleteTextures(__GLXclientState *, GLbyte *);
-extern int __glXDispSwap_GenTextures(__GLXclientState *, GLbyte *);
-extern int __glXDispSwap_IsTexture(__GLXclientState *, GLbyte *);
-extern int __glXDispSwap_GetColorTable(__GLXclientState *, GLbyte *);
-extern int __glXDispSwap_GetColorTableParameterfv(__GLXclientState *, GLbyte *);
-extern int __glXDispSwap_GetColorTableParameteriv(__GLXclientState *, GLbyte *);
-extern int __glXDispSwap_GetConvolutionFilter(__GLXclientState *, GLbyte *);
-extern int __glXDispSwap_GetConvolutionParameterfv(__GLXclientState *,
-                                                   GLbyte *);
-extern int __glXDispSwap_GetConvolutionParameteriv(__GLXclientState *,
-                                                   GLbyte *);
-extern int __glXDispSwap_GetSeparableFilter(__GLXclientState *, GLbyte *);
-extern int __glXDispSwap_GetHistogram(__GLXclientState *, GLbyte *);
-extern int __glXDispSwap_GetHistogramParameterfv(__GLXclientState *, GLbyte *);
-extern int __glXDispSwap_GetHistogramParameteriv(__GLXclientState *, GLbyte *);
-extern int __glXDispSwap_GetMinmax(__GLXclientState *, GLbyte *);
-extern int __glXDispSwap_GetMinmaxParameterfv(__GLXclientState *, GLbyte *);
-extern int __glXDispSwap_GetMinmaxParameteriv(__GLXclientState *, GLbyte *);
-
-extern void __glXDispSwap_CallList(GLbyte *);
-extern void __glXDispSwap_CallLists(GLbyte *);
-extern void __glXDispSwap_ListBase(GLbyte *);
-extern void __glXDispSwap_Begin(GLbyte *);
-extern void __glXDispSwap_Bitmap(GLbyte *);
-extern void __glXDispSwap_Color3bv(GLbyte *);
-extern void __glXDispSwap_Color3dv(GLbyte *);
-extern void __glXDispSwap_Color3fv(GLbyte *);
-extern void __glXDispSwap_Color3iv(GLbyte *);
-extern void __glXDispSwap_Color3sv(GLbyte *);
-extern void __glXDispSwap_Color3ubv(GLbyte *);
-extern void __glXDispSwap_Color3uiv(GLbyte *);
-extern void __glXDispSwap_Color3usv(GLbyte *);
-extern void __glXDispSwap_Color4bv(GLbyte *);
-extern void __glXDispSwap_Color4dv(GLbyte *);
-extern void __glXDispSwap_Color4fv(GLbyte *);
-extern void __glXDispSwap_Color4iv(GLbyte *);
-extern void __glXDispSwap_Color4sv(GLbyte *);
-extern void __glXDispSwap_Color4ubv(GLbyte *);
-extern void __glXDispSwap_Color4uiv(GLbyte *);
-extern void __glXDispSwap_Color4usv(GLbyte *);
-extern void __glXDispSwap_EdgeFlagv(GLbyte *);
-extern void __glXDispSwap_End(GLbyte *);
-extern void __glXDispSwap_Indexdv(GLbyte *);
-extern void __glXDispSwap_Indexfv(GLbyte *);
-extern void __glXDispSwap_Indexiv(GLbyte *);
-extern void __glXDispSwap_Indexsv(GLbyte *);
-extern void __glXDispSwap_Normal3bv(GLbyte *);
-extern void __glXDispSwap_Normal3dv(GLbyte *);
-extern void __glXDispSwap_Normal3fv(GLbyte *);
-extern void __glXDispSwap_Normal3iv(GLbyte *);
-extern void __glXDispSwap_Normal3sv(GLbyte *);
-extern void __glXDispSwap_RasterPos2dv(GLbyte *);
-extern void __glXDispSwap_RasterPos2fv(GLbyte *);
-extern void __glXDispSwap_RasterPos2iv(GLbyte *);
-extern void __glXDispSwap_RasterPos2sv(GLbyte *);
-extern void __glXDispSwap_RasterPos3dv(GLbyte *);
-extern void __glXDispSwap_RasterPos3fv(GLbyte *);
-extern void __glXDispSwap_RasterPos3iv(GLbyte *);
-extern void __glXDispSwap_RasterPos3sv(GLbyte *);
-extern void __glXDispSwap_RasterPos4dv(GLbyte *);
-extern void __glXDispSwap_RasterPos4fv(GLbyte *);
-extern void __glXDispSwap_RasterPos4iv(GLbyte *);
-extern void __glXDispSwap_RasterPos4sv(GLbyte *);
-extern void __glXDispSwap_Rectdv(GLbyte *);
-extern void __glXDispSwap_Rectfv(GLbyte *);
-extern void __glXDispSwap_Rectiv(GLbyte *);
-extern void __glXDispSwap_Rectsv(GLbyte *);
-extern void __glXDispSwap_TexCoord1dv(GLbyte *);
-extern void __glXDispSwap_TexCoord1fv(GLbyte *);
-extern void __glXDispSwap_TexCoord1iv(GLbyte *);
-extern void __glXDispSwap_TexCoord1sv(GLbyte *);
-extern void __glXDispSwap_TexCoord2dv(GLbyte *);
-extern void __glXDispSwap_TexCoord2fv(GLbyte *);
-extern void __glXDispSwap_TexCoord2iv(GLbyte *);
-extern void __glXDispSwap_TexCoord2sv(GLbyte *);
-extern void __glXDispSwap_TexCoord3dv(GLbyte *);
-extern void __glXDispSwap_TexCoord3fv(GLbyte *);
-extern void __glXDispSwap_TexCoord3iv(GLbyte *);
-extern void __glXDispSwap_TexCoord3sv(GLbyte *);
-extern void __glXDispSwap_TexCoord4dv(GLbyte *);
-extern void __glXDispSwap_TexCoord4fv(GLbyte *);
-extern void __glXDispSwap_TexCoord4iv(GLbyte *);
-extern void __glXDispSwap_TexCoord4sv(GLbyte *);
-extern void __glXDispSwap_Vertex2dv(GLbyte *);
-extern void __glXDispSwap_Vertex2fv(GLbyte *);
-extern void __glXDispSwap_Vertex2iv(GLbyte *);
-extern void __glXDispSwap_Vertex2sv(GLbyte *);
-extern void __glXDispSwap_Vertex3dv(GLbyte *);
-extern void __glXDispSwap_Vertex3fv(GLbyte *);
-extern void __glXDispSwap_Vertex3iv(GLbyte *);
-extern void __glXDispSwap_Vertex3sv(GLbyte *);
-extern void __glXDispSwap_Vertex4dv(GLbyte *);
-extern void __glXDispSwap_Vertex4fv(GLbyte *);
-extern void __glXDispSwap_Vertex4iv(GLbyte *);
-extern void __glXDispSwap_Vertex4sv(GLbyte *);
-extern void __glXDispSwap_ClipPlane(GLbyte *);
-extern void __glXDispSwap_ColorMaterial(GLbyte *);
-extern void __glXDispSwap_CullFace(GLbyte *);
-extern void __glXDispSwap_Fogf(GLbyte *);
-extern void __glXDispSwap_Fogfv(GLbyte *);
-extern void __glXDispSwap_Fogi(GLbyte *);
-extern void __glXDispSwap_Fogiv(GLbyte *);
-extern void __glXDispSwap_FrontFace(GLbyte *);
-extern void __glXDispSwap_Hint(GLbyte *);
-extern void __glXDispSwap_Lightf(GLbyte *);
-extern void __glXDispSwap_Lightfv(GLbyte *);
-extern void __glXDispSwap_Lighti(GLbyte *);
-extern void __glXDispSwap_Lightiv(GLbyte *);
-extern void __glXDispSwap_LightModelf(GLbyte *);
-extern void __glXDispSwap_LightModelfv(GLbyte *);
-extern void __glXDispSwap_LightModeli(GLbyte *);
-extern void __glXDispSwap_LightModeliv(GLbyte *);
-extern void __glXDispSwap_LineStipple(GLbyte *);
-extern void __glXDispSwap_LineWidth(GLbyte *);
-extern void __glXDispSwap_Materialf(GLbyte *);
-extern void __glXDispSwap_Materialfv(GLbyte *);
-extern void __glXDispSwap_Materiali(GLbyte *);
-extern void __glXDispSwap_Materialiv(GLbyte *);
-extern void __glXDispSwap_PointSize(GLbyte *);
-extern void __glXDispSwap_PolygonMode(GLbyte *);
-extern void __glXDispSwap_PolygonStipple(GLbyte *);
-extern void __glXDispSwap_Scissor(GLbyte *);
-extern void __glXDispSwap_ShadeModel(GLbyte *);
-extern void __glXDispSwap_TexParameterf(GLbyte *);
-extern void __glXDispSwap_TexParameterfv(GLbyte *);
-extern void __glXDispSwap_TexParameteri(GLbyte *);
-extern void __glXDispSwap_TexParameteriv(GLbyte *);
-extern void __glXDispSwap_TexImage1D(GLbyte *);
-extern void __glXDispSwap_TexImage2D(GLbyte *);
-extern void __glXDispSwap_TexEnvf(GLbyte *);
-extern void __glXDispSwap_TexEnvfv(GLbyte *);
-extern void __glXDispSwap_TexEnvi(GLbyte *);
-extern void __glXDispSwap_TexEnviv(GLbyte *);
-extern void __glXDispSwap_TexGend(GLbyte *);
-extern void __glXDispSwap_TexGendv(GLbyte *);
-extern void __glXDispSwap_TexGenf(GLbyte *);
-extern void __glXDispSwap_TexGenfv(GLbyte *);
-extern void __glXDispSwap_TexGeni(GLbyte *);
-extern void __glXDispSwap_TexGeniv(GLbyte *);
-extern void __glXDispSwap_InitNames(GLbyte *);
-extern void __glXDispSwap_LoadName(GLbyte *);
-extern void __glXDispSwap_PassThrough(GLbyte *);
-extern void __glXDispSwap_PopName(GLbyte *);
-extern void __glXDispSwap_PushName(GLbyte *);
-extern void __glXDispSwap_DrawBuffer(GLbyte *);
-extern void __glXDispSwap_Clear(GLbyte *);
-extern void __glXDispSwap_ClearAccum(GLbyte *);
-extern void __glXDispSwap_ClearIndex(GLbyte *);
-extern void __glXDispSwap_ClearColor(GLbyte *);
-extern void __glXDispSwap_ClearStencil(GLbyte *);
-extern void __glXDispSwap_ClearDepth(GLbyte *);
-extern void __glXDispSwap_StencilMask(GLbyte *);
-extern void __glXDispSwap_ColorMask(GLbyte *);
-extern void __glXDispSwap_DepthMask(GLbyte *);
-extern void __glXDispSwap_IndexMask(GLbyte *);
-extern void __glXDispSwap_Accum(GLbyte *);
-extern void __glXDispSwap_Disable(GLbyte *);
-extern void __glXDispSwap_Enable(GLbyte *);
-extern void __glXDispSwap_PopAttrib(GLbyte *);
-extern void __glXDispSwap_PushAttrib(GLbyte *);
-extern void __glXDispSwap_Map1d(GLbyte *);
-extern void __glXDispSwap_Map1f(GLbyte *);
-extern void __glXDispSwap_Map2d(GLbyte *);
-extern void __glXDispSwap_Map2f(GLbyte *);
-extern void __glXDispSwap_MapGrid1d(GLbyte *);
-extern void __glXDispSwap_MapGrid1f(GLbyte *);
-extern void __glXDispSwap_MapGrid2d(GLbyte *);
-extern void __glXDispSwap_MapGrid2f(GLbyte *);
-extern void __glXDispSwap_EvalCoord1dv(GLbyte *);
-extern void __glXDispSwap_EvalCoord1fv(GLbyte *);
-extern void __glXDispSwap_EvalCoord2dv(GLbyte *);
-extern void __glXDispSwap_EvalCoord2fv(GLbyte *);
-extern void __glXDispSwap_EvalMesh1(GLbyte *);
-extern void __glXDispSwap_EvalPoint1(GLbyte *);
-extern void __glXDispSwap_EvalMesh2(GLbyte *);
-extern void __glXDispSwap_EvalPoint2(GLbyte *);
-extern void __glXDispSwap_AlphaFunc(GLbyte *);
-extern void __glXDispSwap_BlendFunc(GLbyte *);
-extern void __glXDispSwap_LogicOp(GLbyte *);
-extern void __glXDispSwap_StencilFunc(GLbyte *);
-extern void __glXDispSwap_StencilOp(GLbyte *);
-extern void __glXDispSwap_DepthFunc(GLbyte *);
-extern void __glXDispSwap_PixelZoom(GLbyte *);
-extern void __glXDispSwap_PixelTransferf(GLbyte *);
-extern void __glXDispSwap_PixelTransferi(GLbyte *);
-extern void __glXDispSwap_PixelMapfv(GLbyte *);
-extern void __glXDispSwap_PixelMapuiv(GLbyte *);
-extern void __glXDispSwap_PixelMapusv(GLbyte *);
-extern void __glXDispSwap_ReadBuffer(GLbyte *);
-extern void __glXDispSwap_CopyPixels(GLbyte *);
-extern void __glXDispSwap_DrawPixels(GLbyte *);
-extern void __glXDispSwap_DepthRange(GLbyte *);
-extern void __glXDispSwap_Frustum(GLbyte *);
-extern void __glXDispSwap_LoadIdentity(GLbyte *);
-extern void __glXDispSwap_LoadMatrixf(GLbyte *);
-extern void __glXDispSwap_LoadMatrixd(GLbyte *);
-extern void __glXDispSwap_MatrixMode(GLbyte *);
-extern void __glXDispSwap_MultMatrixf(GLbyte *);
-extern void __glXDispSwap_MultMatrixd(GLbyte *);
-extern void __glXDispSwap_Ortho(GLbyte *);
-extern void __glXDispSwap_PopMatrix(GLbyte *);
-extern void __glXDispSwap_PushMatrix(GLbyte *);
-extern void __glXDispSwap_Rotated(GLbyte *);
-extern void __glXDispSwap_Rotatef(GLbyte *);
-extern void __glXDispSwap_Scaled(GLbyte *);
-extern void __glXDispSwap_Scalef(GLbyte *);
-extern void __glXDispSwap_Translated(GLbyte *);
-extern void __glXDispSwap_Translatef(GLbyte *);
-extern void __glXDispSwap_Viewport(GLbyte *);
-extern void __glXDispSwap_PolygonOffset(GLbyte *);
-extern void __glXDispSwap_DrawArrays(GLbyte *);
-extern void __glXDispSwap_Indexubv(GLbyte *);
-extern void __glXDispSwap_ColorSubTable(GLbyte *);
-extern void __glXDispSwap_CopyColorSubTable(GLbyte *);
-extern void __glXDispSwap_ActiveTextureARB(GLbyte *);
-extern void __glXDispSwap_MultiTexCoord1dvARB(GLbyte *);
-extern void __glXDispSwap_MultiTexCoord1fvARB(GLbyte *);
-extern void __glXDispSwap_MultiTexCoord1ivARB(GLbyte *);
-extern void __glXDispSwap_MultiTexCoord1svARB(GLbyte *);
-extern void __glXDispSwap_MultiTexCoord2dvARB(GLbyte *);
-extern void __glXDispSwap_MultiTexCoord2fvARB(GLbyte *);
-extern void __glXDispSwap_MultiTexCoord2ivARB(GLbyte *);
-extern void __glXDispSwap_MultiTexCoord2svARB(GLbyte *);
-extern void __glXDispSwap_MultiTexCoord3dvARB(GLbyte *);
-extern void __glXDispSwap_MultiTexCoord3fvARB(GLbyte *);
-extern void __glXDispSwap_MultiTexCoord3ivARB(GLbyte *);
-extern void __glXDispSwap_MultiTexCoord3svARB(GLbyte *);
-extern void __glXDispSwap_MultiTexCoord4dvARB(GLbyte *);
-extern void __glXDispSwap_MultiTexCoord4fvARB(GLbyte *);
-extern void __glXDispSwap_MultiTexCoord4ivARB(GLbyte *);
-extern void __glXDispSwap_MultiTexCoord4svARB(GLbyte *);
-
-extern void __glXDispSwap_TexSubImage1D(GLbyte *);
-extern void __glXDispSwap_TexSubImage2D(GLbyte *);
-extern void __glXDispSwap_ConvolutionFilter1D(GLbyte *);
-extern void __glXDispSwap_ConvolutionFilter2D(GLbyte *);
-extern void __glXDispSwap_ConvolutionParameterfv(GLbyte *);
-extern void __glXDispSwap_ConvolutionParameteriv(GLbyte *);
-extern void __glXDispSwap_CopyConvolutionFilter1D(GLbyte *);
-extern void __glXDispSwap_CopyConvolutionFilter2D(GLbyte *);
-extern void __glXDispSwap_SeparableFilter2D(GLbyte *);
-extern void __glXDispSwap_TexImage3D(GLbyte *);
-extern void __glXDispSwap_TexSubImage3D(GLbyte *);
-extern void __glXDispSwap_PrioritizeTextures(GLbyte *);
-extern void __glXDispSwap_CopyTexImage1D(GLbyte *);
-extern void __glXDispSwap_CopyTexImage2D(GLbyte *);
-extern void __glXDispSwap_CopyTexSubImage1D(GLbyte *);
-extern void __glXDispSwap_CopyTexSubImage2D(GLbyte *);
-extern void __glXDispSwap_CopyTexSubImage3D(GLbyte *);
-
-extern void __glXDispSwap_BindTexture(GLbyte *);
-extern void __glXDispSwap_BlendColor(GLbyte *);
-extern void __glXDispSwap_BlendEquation(GLbyte *);
-extern void __glXDispSwap_ColorTable(GLbyte *);
-extern void __glXDispSwap_ColorTableParameterfv(GLbyte *);
-extern void __glXDispSwap_ColorTableParameteriv(GLbyte *);
-extern void __glXDispSwap_CopyColorTable(GLbyte *);
-extern void __glXDispSwap_ConvolutionParameterf(GLbyte *);
-extern void __glXDispSwap_ConvolutionParameteri(GLbyte *);
-extern void __glXDispSwap_Histogram(GLbyte *);
-extern void __glXDispSwap_Minmax(GLbyte *);
-extern void __glXDispSwap_ResetHistogram(GLbyte *);
-extern void __glXDispSwap_ResetMinmax(GLbyte *);
-
-extern int __glXSwapCreateContextWithConfigSGIX(__GLXclientState *, GLbyte *);
-extern int __glXSwapBindSwapBarrierSGIX(__GLXclientState *, GLbyte *);
-extern int __glXSwapJoinSwapGroupSGIX(__GLXclientState *, GLbyte *);
-extern int __glXSwapQueryMaxSwapBarriersSGIX(__GLXclientState *, GLbyte *);
-extern int __glXSwapMakeCurrentReadSGI(__GLXclientState *, GLbyte *);
-
-#define __GLX_MIN_GLXCMD_OPCODE 1
-#define __GLX_MAX_GLXCMD_OPCODE 20
-#define __GLX_MIN_RENDER_OPCODE 1
-#define __GLX_MAX_RENDER_OPCODE 213
-#define __GLX_MIN_SINGLE_OPCODE 1
-#define __GLX_MAX_SINGLE_OPCODE 159
-#define __GLX_SINGLE_TABLE_SIZE 160
-#define __GLX_RENDER_TABLE_SIZE 214
-
-#define __GLX_MIN_RENDER_OPCODE_EXT 4096
-#define __GLX_MAX_RENDER_OPCODE_EXT 4123
-
-extern __GLXdispatchSingleProcPtr __glXSingleTable[__GLX_SINGLE_TABLE_SIZE];
-extern __GLXdispatchSingleProcPtr __glXSwapSingleTable[__GLX_SINGLE_TABLE_SIZE];
-#endif                          /* _GLX_g_disptab_h_ */
diff --git a/hw/dmx/glxProxy/g_renderswap.c b/hw/dmx/glxProxy/g_renderswap.c
deleted file mode 100644
index ce1c609..0000000
--- a/hw/dmx/glxProxy/g_renderswap.c
+++ /dev/null
@@ -1,2663 +0,0 @@
-/*
- * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
- * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice including the dates of first publication and
- * either this permission notice or a reference to
- * http://oss.sgi.com/projects/FreeB/
- * shall be included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of Silicon Graphics, Inc.
- * shall not be used in advertising or otherwise to promote the sale, use or
- * other dealings in this Software without prior written authorization from
- * Silicon Graphics, Inc.
- */
-
-#include "glxserver.h"
-#include "glxext.h"
-#include "g_disptab.h"
-#include "unpack.h"
-#include "compsize.h"
-
-void
-__glXDispSwap_CallList(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-
-}
-
-void
-__glXDispSwap_ListBase(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-
-}
-
-void
-__glXDispSwap_Begin(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-
-}
-
-void
-__glXDispSwap_Color3bv(GLbyte * pc)
-{
-}
-
-void
-__glXDispSwap_Color3dv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-#ifdef __GLX_ALIGN64
-    if ((unsigned long) (pc) & 7) {
-        __GLX_MEM_COPY(pc - 4, pc, 24);
-        pc -= 4;
-    }
-#endif
-    __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 3);
-
-}
-
-void
-__glXDispSwap_Color3fv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_FLOAT_ARRAY(pc + 0, 3);
-}
-
-void
-__glXDispSwap_Color3iv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_INT_ARRAY(pc + 0, 3);
-
-}
-
-void
-__glXDispSwap_Color3sv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_SHORT_ARRAY(pc + 0, 3);
-
-}
-
-void
-__glXDispSwap_Color3ubv(GLbyte * pc)
-{
-}
-
-void
-__glXDispSwap_Color3uiv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_INT_ARRAY(pc + 0, 3);
-}
-
-void
-__glXDispSwap_Color3usv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_SHORT_ARRAY(pc + 0, 3);
-}
-
-void
-__glXDispSwap_Color4bv(GLbyte * pc)
-{
-}
-
-void
-__glXDispSwap_Color4dv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-#ifdef __GLX_ALIGN64
-    if ((unsigned long) (pc) & 7) {
-        __GLX_MEM_COPY(pc - 4, pc, 32);
-        pc -= 4;
-    }
-#endif
-    __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 4);
-}
-
-void
-__glXDispSwap_Color4fv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_FLOAT_ARRAY(pc + 0, 4);
-
-}
-
-void
-__glXDispSwap_Color4iv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_INT_ARRAY(pc + 0, 4);
-
-}
-
-void
-__glXDispSwap_Color4sv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_SHORT_ARRAY(pc + 0, 4);
-
-}
-
-void
-__glXDispSwap_Color4ubv(GLbyte * pc)
-{
-
-}
-
-void
-__glXDispSwap_Color4uiv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_INT_ARRAY(pc + 0, 4);
-
-}
-
-void
-__glXDispSwap_Color4usv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_SHORT_ARRAY(pc + 0, 4);
-
-}
-
-void
-__glXDispSwap_EdgeFlagv(GLbyte * pc)
-{
-}
-
-void
-__glXDispSwap_End(GLbyte * pc)
-{
-}
-
-void
-__glXDispSwap_Indexdv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-#ifdef __GLX_ALIGN64
-    if ((unsigned long) (pc) & 7) {
-        __GLX_MEM_COPY(pc - 4, pc, 8);
-        pc -= 4;
-    }
-#endif
-    __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 1);
-
-}
-
-void
-__glXDispSwap_Indexfv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_FLOAT_ARRAY(pc + 0, 1);
-
-}
-
-void
-__glXDispSwap_Indexiv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_INT_ARRAY(pc + 0, 1);
-
-}
-
-void
-__glXDispSwap_Indexsv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_SHORT_ARRAY(pc + 0, 1);
-
-}
-
-void
-__glXDispSwap_Normal3bv(GLbyte * pc)
-{
-}
-
-void
-__glXDispSwap_Normal3dv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-#ifdef __GLX_ALIGN64
-    if ((unsigned long) (pc) & 7) {
-        __GLX_MEM_COPY(pc - 4, pc, 24);
-        pc -= 4;
-    }
-#endif
-    __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 3);
-
-}
-
-void
-__glXDispSwap_Normal3fv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_FLOAT_ARRAY(pc + 0, 3);
-
-}
-
-void
-__glXDispSwap_Normal3iv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_INT_ARRAY(pc + 0, 3);
-
-}
-
-void
-__glXDispSwap_Normal3sv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_SHORT_ARRAY(pc + 0, 3);
-
-}
-
-void
-__glXDispSwap_RasterPos2dv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-#ifdef __GLX_ALIGN64
-    if ((unsigned long) (pc) & 7) {
-        __GLX_MEM_COPY(pc - 4, pc, 16);
-        pc -= 4;
-    }
-#endif
-    __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 2);
-
-}
-
-void
-__glXDispSwap_RasterPos2fv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_FLOAT_ARRAY(pc + 0, 2);
-
-}
-
-void
-__glXDispSwap_RasterPos2iv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_INT_ARRAY(pc + 0, 2);
-
-}
-
-void
-__glXDispSwap_RasterPos2sv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_SHORT_ARRAY(pc + 0, 2);
-
-}
-
-void
-__glXDispSwap_RasterPos3dv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-#ifdef __GLX_ALIGN64
-    if ((unsigned long) (pc) & 7) {
-        __GLX_MEM_COPY(pc - 4, pc, 24);
-        pc -= 4;
-    }
-#endif
-    __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 3);
-
-}
-
-void
-__glXDispSwap_RasterPos3fv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_FLOAT_ARRAY(pc + 0, 3);
-
-}
-
-void
-__glXDispSwap_RasterPos3iv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_INT_ARRAY(pc + 0, 3);
-
-}
-
-void
-__glXDispSwap_RasterPos3sv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_SHORT_ARRAY(pc + 0, 3);
-
-}
-
-void
-__glXDispSwap_RasterPos4dv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-#ifdef __GLX_ALIGN64
-    if ((unsigned long) (pc) & 7) {
-        __GLX_MEM_COPY(pc - 4, pc, 32);
-        pc -= 4;
-    }
-#endif
-    __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 4);
-
-}
-
-void
-__glXDispSwap_RasterPos4fv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_FLOAT_ARRAY(pc + 0, 4);
-
-}
-
-void
-__glXDispSwap_RasterPos4iv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_INT_ARRAY(pc + 0, 4);
-
-}
-
-void
-__glXDispSwap_RasterPos4sv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_SHORT_ARRAY(pc + 0, 4);
-
-}
-
-void
-__glXDispSwap_Rectdv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-#ifdef __GLX_ALIGN64
-    if ((unsigned long) (pc) & 7) {
-        __GLX_MEM_COPY(pc - 4, pc, 32);
-        pc -= 4;
-    }
-#endif
-    __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 2);
-    __GLX_SWAP_DOUBLE_ARRAY(pc + 16, 2);
-
-}
-
-void
-__glXDispSwap_Rectfv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_FLOAT_ARRAY(pc + 0, 2);
-    __GLX_SWAP_FLOAT_ARRAY(pc + 8, 2);
-
-}
-
-void
-__glXDispSwap_Rectiv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_INT_ARRAY(pc + 0, 2);
-    __GLX_SWAP_INT_ARRAY(pc + 8, 2);
-
-}
-
-void
-__glXDispSwap_Rectsv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_SHORT_ARRAY(pc + 0, 2);
-    __GLX_SWAP_SHORT_ARRAY(pc + 4, 2);
-
-}
-
-void
-__glXDispSwap_TexCoord1dv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-#ifdef __GLX_ALIGN64
-    if ((unsigned long) (pc) & 7) {
-        __GLX_MEM_COPY(pc - 4, pc, 8);
-        pc -= 4;
-    }
-#endif
-    __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 1);
-
-}
-
-void
-__glXDispSwap_TexCoord1fv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_FLOAT_ARRAY(pc + 0, 1);
-
-}
-
-void
-__glXDispSwap_TexCoord1iv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_INT_ARRAY(pc + 0, 1);
-
-}
-
-void
-__glXDispSwap_TexCoord1sv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_SHORT_ARRAY(pc + 0, 1);
-
-}
-
-void
-__glXDispSwap_TexCoord2dv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-#ifdef __GLX_ALIGN64
-    if ((unsigned long) (pc) & 7) {
-        __GLX_MEM_COPY(pc - 4, pc, 16);
-        pc -= 4;
-    }
-#endif
-    __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 2);
-
-}
-
-void
-__glXDispSwap_TexCoord2fv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_FLOAT_ARRAY(pc + 0, 2);
-
-}
-
-void
-__glXDispSwap_TexCoord2iv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_INT_ARRAY(pc + 0, 2);
-
-}
-
-void
-__glXDispSwap_TexCoord2sv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_SHORT_ARRAY(pc + 0, 2);
-
-}
-
-void
-__glXDispSwap_TexCoord3dv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-#ifdef __GLX_ALIGN64
-    if ((unsigned long) (pc) & 7) {
-        __GLX_MEM_COPY(pc - 4, pc, 24);
-        pc -= 4;
-    }
-#endif
-    __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 3);
-
-}
-
-void
-__glXDispSwap_TexCoord3fv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_FLOAT_ARRAY(pc + 0, 3);
-
-}
-
-void
-__glXDispSwap_TexCoord3iv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_INT_ARRAY(pc + 0, 3);
-
-}
-
-void
-__glXDispSwap_TexCoord3sv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_SHORT_ARRAY(pc + 0, 3);
-
-}
-
-void
-__glXDispSwap_TexCoord4dv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-#ifdef __GLX_ALIGN64
-    if ((unsigned long) (pc) & 7) {
-        __GLX_MEM_COPY(pc - 4, pc, 32);
-        pc -= 4;
-    }
-#endif
-    __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 4);
-
-}
-
-void
-__glXDispSwap_TexCoord4fv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_FLOAT_ARRAY(pc + 0, 4);
-
-}
-
-void
-__glXDispSwap_TexCoord4iv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_INT_ARRAY(pc + 0, 4);
-
-}
-
-void
-__glXDispSwap_TexCoord4sv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_SHORT_ARRAY(pc + 0, 4);
-
-}
-
-void
-__glXDispSwap_Vertex2dv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-#ifdef __GLX_ALIGN64
-    if ((unsigned long) (pc) & 7) {
-        __GLX_MEM_COPY(pc - 4, pc, 16);
-        pc -= 4;
-    }
-#endif
-    __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 2);
-
-}
-
-void
-__glXDispSwap_Vertex2fv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_FLOAT_ARRAY(pc + 0, 2);
-
-}
-
-void
-__glXDispSwap_Vertex2iv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_INT_ARRAY(pc + 0, 2);
-
-}
-
-void
-__glXDispSwap_Vertex2sv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_SHORT_ARRAY(pc + 0, 2);
-
-}
-
-void
-__glXDispSwap_Vertex3dv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-#ifdef __GLX_ALIGN64
-    if ((unsigned long) (pc) & 7) {
-        __GLX_MEM_COPY(pc - 4, pc, 24);
-        pc -= 4;
-    }
-#endif
-    __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 3);
-
-}
-
-void
-__glXDispSwap_Vertex3fv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_FLOAT_ARRAY(pc + 0, 3);
-
-}
-
-void
-__glXDispSwap_Vertex3iv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_INT_ARRAY(pc + 0, 3);
-
-}
-
-void
-__glXDispSwap_Vertex3sv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_SHORT_ARRAY(pc + 0, 3);
-
-}
-
-void
-__glXDispSwap_Vertex4dv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-#ifdef __GLX_ALIGN64
-    if ((unsigned long) (pc) & 7) {
-        __GLX_MEM_COPY(pc - 4, pc, 32);
-        pc -= 4;
-    }
-#endif
-    __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 4);
-
-}
-
-void
-__glXDispSwap_Vertex4fv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_FLOAT_ARRAY(pc + 0, 4);
-
-}
-
-void
-__glXDispSwap_Vertex4iv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_INT_ARRAY(pc + 0, 4);
-
-}
-
-void
-__glXDispSwap_Vertex4sv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_SHORT_ARRAY(pc + 0, 4);
-
-}
-
-void
-__glXDispSwap_ClipPlane(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-#ifdef __GLX_ALIGN64
-    if ((unsigned long) (pc) & 7) {
-        __GLX_MEM_COPY(pc - 4, pc, 36);
-        pc -= 4;
-    }
-#endif
-    __GLX_SWAP_INT(pc + 32);
-    __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 4);
-
-}
-
-void
-__glXDispSwap_ColorMaterial(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_INT(pc + 4);
-
-}
-
-void
-__glXDispSwap_CullFace(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-
-}
-
-void
-__glXDispSwap_Fogf(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_FLOAT(pc + 4);
-
-}
-
-void
-__glXDispSwap_Fogfv(GLbyte * pc)
-{
-    GLenum pname;
-    GLint compsize;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    pname = *(GLenum *) (pc + 0);
-    compsize = __glFogfv_size(pname);
-    if (compsize < 0)
-        compsize = 0;
-    __GLX_SWAP_FLOAT_ARRAY(pc + 4, compsize);
-
-}
-
-void
-__glXDispSwap_Fogi(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_INT(pc + 4);
-
-}
-
-void
-__glXDispSwap_Fogiv(GLbyte * pc)
-{
-    GLenum pname;
-    GLint compsize;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    pname = *(GLenum *) (pc + 0);
-    compsize = __glFogiv_size(pname);
-    if (compsize < 0)
-        compsize = 0;
-    __GLX_SWAP_INT_ARRAY(pc + 4, compsize);
-
-}
-
-void
-__glXDispSwap_FrontFace(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-
-}
-
-void
-__glXDispSwap_Hint(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_INT(pc + 4);
-
-}
-
-void
-__glXDispSwap_Lightf(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_INT(pc + 4);
-    __GLX_SWAP_FLOAT(pc + 8);
-
-}
-
-void
-__glXDispSwap_Lightfv(GLbyte * pc)
-{
-    GLenum pname;
-    GLint compsize;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 4);
-    pname = *(GLenum *) (pc + 4);
-    compsize = __glLightfv_size(pname);
-    if (compsize < 0)
-        compsize = 0;
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_FLOAT_ARRAY(pc + 8, compsize);
-
-}
-
-void
-__glXDispSwap_Lighti(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_INT(pc + 4);
-    __GLX_SWAP_INT(pc + 8);
-
-}
-
-void
-__glXDispSwap_Lightiv(GLbyte * pc)
-{
-    GLenum pname;
-    GLint compsize;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 4);
-    pname = *(GLenum *) (pc + 4);
-    compsize = __glLightiv_size(pname);
-    if (compsize < 0)
-        compsize = 0;
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_INT_ARRAY(pc + 8, compsize);
-
-}
-
-void
-__glXDispSwap_LightModelf(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_FLOAT(pc + 4);
-
-}
-
-void
-__glXDispSwap_LightModelfv(GLbyte * pc)
-{
-    GLenum pname;
-    GLint compsize;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    pname = *(GLenum *) (pc + 0);
-    compsize = __glLightModelfv_size(pname);
-    if (compsize < 0)
-        compsize = 0;
-    __GLX_SWAP_FLOAT_ARRAY(pc + 4, compsize);
-
-}
-
-void
-__glXDispSwap_LightModeli(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_INT(pc + 4);
-
-}
-
-void
-__glXDispSwap_LightModeliv(GLbyte * pc)
-{
-    GLenum pname;
-    GLint compsize;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    pname = *(GLenum *) (pc + 0);
-    compsize = __glLightModeliv_size(pname);
-    if (compsize < 0)
-        compsize = 0;
-    __GLX_SWAP_INT_ARRAY(pc + 4, compsize);
-
-}
-
-void
-__glXDispSwap_LineStipple(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_SHORT(pc + 4);
-
-}
-
-void
-__glXDispSwap_LineWidth(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_FLOAT(pc + 0);
-
-}
-
-void
-__glXDispSwap_Materialf(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_INT(pc + 4);
-    __GLX_SWAP_FLOAT(pc + 8);
-
-}
-
-void
-__glXDispSwap_Materialfv(GLbyte * pc)
-{
-    GLenum pname;
-    GLint compsize;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 4);
-    pname = *(GLenum *) (pc + 4);
-    compsize = __glMaterialfv_size(pname);
-    if (compsize < 0)
-        compsize = 0;
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_FLOAT_ARRAY(pc + 8, compsize);
-
-}
-
-void
-__glXDispSwap_Materiali(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_INT(pc + 4);
-    __GLX_SWAP_INT(pc + 8);
-
-}
-
-void
-__glXDispSwap_Materialiv(GLbyte * pc)
-{
-    GLenum pname;
-    GLint compsize;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 4);
-    pname = *(GLenum *) (pc + 4);
-    compsize = __glMaterialiv_size(pname);
-    if (compsize < 0)
-        compsize = 0;
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_INT_ARRAY(pc + 8, compsize);
-
-}
-
-void
-__glXDispSwap_PointSize(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_FLOAT(pc + 0);
-
-}
-
-void
-__glXDispSwap_PolygonMode(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_INT(pc + 4);
-
-}
-
-void
-__glXDispSwap_Scissor(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_INT(pc + 4);
-    __GLX_SWAP_INT(pc + 8);
-    __GLX_SWAP_INT(pc + 12);
-
-}
-
-void
-__glXDispSwap_ShadeModel(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-
-}
-
-void
-__glXDispSwap_TexParameterf(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_INT(pc + 4);
-    __GLX_SWAP_FLOAT(pc + 8);
-
-}
-
-void
-__glXDispSwap_TexParameterfv(GLbyte * pc)
-{
-    GLenum pname;
-    GLint compsize;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 4);
-    pname = *(GLenum *) (pc + 4);
-    compsize = __glTexParameterfv_size(pname);
-    if (compsize < 0)
-        compsize = 0;
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_FLOAT_ARRAY(pc + 8, compsize);
-
-}
-
-void
-__glXDispSwap_TexParameteri(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_INT(pc + 4);
-    __GLX_SWAP_INT(pc + 8);
-
-}
-
-void
-__glXDispSwap_TexParameteriv(GLbyte * pc)
-{
-    GLenum pname;
-    GLint compsize;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 4);
-    pname = *(GLenum *) (pc + 4);
-    compsize = __glTexParameteriv_size(pname);
-    if (compsize < 0)
-        compsize = 0;
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_INT_ARRAY(pc + 8, compsize);
-
-}
-
-void
-__glXDispSwap_TexEnvf(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_INT(pc + 4);
-    __GLX_SWAP_FLOAT(pc + 8);
-
-}
-
-void
-__glXDispSwap_TexEnvfv(GLbyte * pc)
-{
-    GLenum pname;
-    GLint compsize;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 4);
-    pname = *(GLenum *) (pc + 4);
-    compsize = __glTexEnvfv_size(pname);
-    if (compsize < 0)
-        compsize = 0;
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_FLOAT_ARRAY(pc + 8, compsize);
-
-}
-
-void
-__glXDispSwap_TexEnvi(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_INT(pc + 4);
-    __GLX_SWAP_INT(pc + 8);
-
-}
-
-void
-__glXDispSwap_TexEnviv(GLbyte * pc)
-{
-    GLenum pname;
-    GLint compsize;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 4);
-    pname = *(GLenum *) (pc + 4);
-    compsize = __glTexEnviv_size(pname);
-    if (compsize < 0)
-        compsize = 0;
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_INT_ARRAY(pc + 8, compsize);
-
-}
-
-void
-__glXDispSwap_TexGend(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-#ifdef __GLX_ALIGN64
-    if ((unsigned long) (pc) & 7) {
-        __GLX_MEM_COPY(pc - 4, pc, 16);
-        pc -= 4;
-    }
-#endif
-    __GLX_SWAP_INT(pc + 8);
-    __GLX_SWAP_INT(pc + 12);
-    __GLX_SWAP_DOUBLE(pc + 0);
-
-}
-
-void
-__glXDispSwap_TexGendv(GLbyte * pc)
-{
-    GLenum pname;
-    GLint cmdlen;
-    GLint compsize;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 4);
-    pname = *(GLenum *) (pc + 4);
-    compsize = __glTexGendv_size(pname);
-    if (compsize < 0)
-        compsize = 0;
-    cmdlen = __GLX_PAD(8 + compsize * 8);
-
-#ifdef __GLX_ALIGN64
-    if ((unsigned long) (pc) & 7) {
-        __GLX_MEM_COPY(pc - 4, pc, cmdlen);
-        pc -= 4;
-    }
-#endif
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_DOUBLE_ARRAY(pc + 8, compsize);
-
-}
-
-void
-__glXDispSwap_TexGenf(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_INT(pc + 4);
-    __GLX_SWAP_FLOAT(pc + 8);
-
-}
-
-void
-__glXDispSwap_TexGenfv(GLbyte * pc)
-{
-    GLenum pname;
-    GLint compsize;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 4);
-    pname = *(GLenum *) (pc + 4);
-    compsize = __glTexGenfv_size(pname);
-    if (compsize < 0)
-        compsize = 0;
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_FLOAT_ARRAY(pc + 8, compsize);
-
-}
-
-void
-__glXDispSwap_TexGeni(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_INT(pc + 4);
-    __GLX_SWAP_INT(pc + 8);
-
-}
-
-void
-__glXDispSwap_TexGeniv(GLbyte * pc)
-{
-    GLenum pname;
-    GLint compsize;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 4);
-    pname = *(GLenum *) (pc + 4);
-    compsize = __glTexGeniv_size(pname);
-    if (compsize < 0)
-        compsize = 0;
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_INT_ARRAY(pc + 8, compsize);
-
-}
-
-void
-__glXDispSwap_InitNames(GLbyte * pc)
-{
-}
-
-void
-__glXDispSwap_LoadName(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-
-}
-
-void
-__glXDispSwap_PassThrough(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_FLOAT(pc + 0);
-
-}
-
-void
-__glXDispSwap_PopName(GLbyte * pc)
-{
-}
-
-void
-__glXDispSwap_PushName(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-
-}
-
-void
-__glXDispSwap_DrawBuffer(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-
-}
-
-void
-__glXDispSwap_Clear(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-
-}
-
-void
-__glXDispSwap_ClearAccum(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_FLOAT(pc + 0);
-    __GLX_SWAP_FLOAT(pc + 4);
-    __GLX_SWAP_FLOAT(pc + 8);
-    __GLX_SWAP_FLOAT(pc + 12);
-
-}
-
-void
-__glXDispSwap_ClearIndex(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_FLOAT(pc + 0);
-
-}
-
-void
-__glXDispSwap_ClearColor(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_FLOAT(pc + 0);
-    __GLX_SWAP_FLOAT(pc + 4);
-    __GLX_SWAP_FLOAT(pc + 8);
-    __GLX_SWAP_FLOAT(pc + 12);
-
-}
-
-void
-__glXDispSwap_ClearStencil(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-
-}
-
-void
-__glXDispSwap_ClearDepth(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-#ifdef __GLX_ALIGN64
-    if ((unsigned long) (pc) & 7) {
-        __GLX_MEM_COPY(pc - 4, pc, 8);
-        pc -= 4;
-    }
-#endif
-    __GLX_SWAP_DOUBLE(pc + 0);
-
-}
-
-void
-__glXDispSwap_StencilMask(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-
-}
-
-void
-__glXDispSwap_ColorMask(GLbyte * pc)
-{
-}
-
-void
-__glXDispSwap_DepthMask(GLbyte * pc)
-{
-}
-
-void
-__glXDispSwap_IndexMask(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-
-}
-
-void
-__glXDispSwap_Accum(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_FLOAT(pc + 4);
-
-}
-
-void
-__glXDispSwap_Disable(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-
-}
-
-void
-__glXDispSwap_Enable(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-
-}
-
-void
-__glXDispSwap_PopAttrib(GLbyte * pc)
-{
-}
-
-void
-__glXDispSwap_PushAttrib(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-
-}
-
-void
-__glXDispSwap_MapGrid1d(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-#ifdef __GLX_ALIGN64
-    if ((unsigned long) (pc) & 7) {
-        __GLX_MEM_COPY(pc - 4, pc, 20);
-        pc -= 4;
-    }
-#endif
-    __GLX_SWAP_INT(pc + 16);
-    __GLX_SWAP_DOUBLE(pc + 0);
-    __GLX_SWAP_DOUBLE(pc + 8);
-
-}
-
-void
-__glXDispSwap_MapGrid1f(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_FLOAT(pc + 4);
-    __GLX_SWAP_FLOAT(pc + 8);
-
-}
-
-void
-__glXDispSwap_MapGrid2d(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-#ifdef __GLX_ALIGN64
-    if ((unsigned long) (pc) & 7) {
-        __GLX_MEM_COPY(pc - 4, pc, 40);
-        pc -= 4;
-    }
-#endif
-    __GLX_SWAP_INT(pc + 32);
-    __GLX_SWAP_DOUBLE(pc + 0);
-    __GLX_SWAP_DOUBLE(pc + 8);
-    __GLX_SWAP_INT(pc + 36);
-    __GLX_SWAP_DOUBLE(pc + 16);
-    __GLX_SWAP_DOUBLE(pc + 24);
-
-}
-
-void
-__glXDispSwap_MapGrid2f(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_FLOAT(pc + 4);
-    __GLX_SWAP_FLOAT(pc + 8);
-    __GLX_SWAP_INT(pc + 12);
-    __GLX_SWAP_FLOAT(pc + 16);
-    __GLX_SWAP_FLOAT(pc + 20);
-
-}
-
-void
-__glXDispSwap_EvalCoord1dv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-#ifdef __GLX_ALIGN64
-    if ((unsigned long) (pc) & 7) {
-        __GLX_MEM_COPY(pc - 4, pc, 8);
-        pc -= 4;
-    }
-#endif
-    __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 1);
-
-}
-
-void
-__glXDispSwap_EvalCoord1fv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_FLOAT_ARRAY(pc + 0, 1);
-
-}
-
-void
-__glXDispSwap_EvalCoord2dv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-#ifdef __GLX_ALIGN64
-    if ((unsigned long) (pc) & 7) {
-        __GLX_MEM_COPY(pc - 4, pc, 16);
-        pc -= 4;
-    }
-#endif
-    __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 2);
-
-}
-
-void
-__glXDispSwap_EvalCoord2fv(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_FLOAT_ARRAY(pc + 0, 2);
-
-}
-
-void
-__glXDispSwap_EvalMesh1(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_INT(pc + 4);
-    __GLX_SWAP_INT(pc + 8);
-
-}
-
-void
-__glXDispSwap_EvalPoint1(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-
-}
-
-void
-__glXDispSwap_EvalMesh2(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_INT(pc + 4);
-    __GLX_SWAP_INT(pc + 8);
-    __GLX_SWAP_INT(pc + 12);
-    __GLX_SWAP_INT(pc + 16);
-
-}
-
-void
-__glXDispSwap_EvalPoint2(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_INT(pc + 4);
-
-}
-
-void
-__glXDispSwap_AlphaFunc(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_FLOAT(pc + 4);
-
-}
-
-void
-__glXDispSwap_BlendFunc(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_INT(pc + 4);
-
-}
-
-void
-__glXDispSwap_LogicOp(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-
-}
-
-void
-__glXDispSwap_StencilFunc(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_INT(pc + 4);
-    __GLX_SWAP_INT(pc + 8);
-
-}
-
-void
-__glXDispSwap_StencilOp(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_INT(pc + 4);
-    __GLX_SWAP_INT(pc + 8);
-
-}
-
-void
-__glXDispSwap_DepthFunc(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-
-}
-
-void
-__glXDispSwap_PixelZoom(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_FLOAT(pc + 0);
-    __GLX_SWAP_FLOAT(pc + 4);
-
-}
-
-void
-__glXDispSwap_PixelTransferf(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_FLOAT(pc + 4);
-
-}
-
-void
-__glXDispSwap_PixelTransferi(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_INT(pc + 4);
-
-}
-
-void
-__glXDispSwap_PixelMapfv(GLbyte * pc)
-{
-    GLint mapsize;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 4);
-    mapsize = *(GLint *) (pc + 4);
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_FLOAT_ARRAY(pc + 8, mapsize);
-
-}
-
-void
-__glXDispSwap_PixelMapuiv(GLbyte * pc)
-{
-    GLint mapsize;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 4);
-    mapsize = *(GLint *) (pc + 4);
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_INT_ARRAY(pc + 8, mapsize);
-
-}
-
-void
-__glXDispSwap_PixelMapusv(GLbyte * pc)
-{
-    GLint mapsize;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 4);
-    mapsize = *(GLint *) (pc + 4);
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_SHORT_ARRAY(pc + 8, mapsize);
-
-}
-
-void
-__glXDispSwap_ReadBuffer(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-
-}
-
-void
-__glXDispSwap_CopyPixels(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_INT(pc + 4);
-    __GLX_SWAP_INT(pc + 8);
-    __GLX_SWAP_INT(pc + 12);
-    __GLX_SWAP_INT(pc + 16);
-
-}
-
-void
-__glXDispSwap_DepthRange(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-#ifdef __GLX_ALIGN64
-    if ((unsigned long) (pc) & 7) {
-        __GLX_MEM_COPY(pc - 4, pc, 16);
-        pc -= 4;
-    }
-#endif
-    __GLX_SWAP_DOUBLE(pc + 0);
-    __GLX_SWAP_DOUBLE(pc + 8);
-
-}
-
-void
-__glXDispSwap_Frustum(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-#ifdef __GLX_ALIGN64
-    if ((unsigned long) (pc) & 7) {
-        __GLX_MEM_COPY(pc - 4, pc, 48);
-        pc -= 4;
-    }
-#endif
-    __GLX_SWAP_DOUBLE(pc + 0);
-    __GLX_SWAP_DOUBLE(pc + 8);
-    __GLX_SWAP_DOUBLE(pc + 16);
-    __GLX_SWAP_DOUBLE(pc + 24);
-    __GLX_SWAP_DOUBLE(pc + 32);
-    __GLX_SWAP_DOUBLE(pc + 40);
-
-}
-
-void
-__glXDispSwap_LoadIdentity(GLbyte * pc)
-{
-}
-
-void
-__glXDispSwap_LoadMatrixf(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_FLOAT_ARRAY(pc + 0, 16);
-
-}
-
-void
-__glXDispSwap_LoadMatrixd(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-#ifdef __GLX_ALIGN64
-    if ((unsigned long) (pc) & 7) {
-        __GLX_MEM_COPY(pc - 4, pc, 128);
-        pc -= 4;
-    }
-#endif
-    __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 16);
-
-}
-
-void
-__glXDispSwap_MatrixMode(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-
-}
-
-void
-__glXDispSwap_MultMatrixf(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_FLOAT_ARRAY(pc + 0, 16);
-
-}
-
-void
-__glXDispSwap_MultMatrixd(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-#ifdef __GLX_ALIGN64
-    if ((unsigned long) (pc) & 7) {
-        __GLX_MEM_COPY(pc - 4, pc, 128);
-        pc -= 4;
-    }
-#endif
-    __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 16);
-
-}
-
-void
-__glXDispSwap_Ortho(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-#ifdef __GLX_ALIGN64
-    if ((unsigned long) (pc) & 7) {
-        __GLX_MEM_COPY(pc - 4, pc, 48);
-        pc -= 4;
-    }
-#endif
-    __GLX_SWAP_DOUBLE(pc + 0);
-    __GLX_SWAP_DOUBLE(pc + 8);
-    __GLX_SWAP_DOUBLE(pc + 16);
-    __GLX_SWAP_DOUBLE(pc + 24);
-    __GLX_SWAP_DOUBLE(pc + 32);
-    __GLX_SWAP_DOUBLE(pc + 40);
-
-}
-
-void
-__glXDispSwap_PopMatrix(GLbyte * pc)
-{
-}
-
-void
-__glXDispSwap_PushMatrix(GLbyte * pc)
-{
-}
-
-void
-__glXDispSwap_Rotated(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-#ifdef __GLX_ALIGN64
-    if ((unsigned long) (pc) & 7) {
-        __GLX_MEM_COPY(pc - 4, pc, 32);
-        pc -= 4;
-    }
-#endif
-    __GLX_SWAP_DOUBLE(pc + 0);
-    __GLX_SWAP_DOUBLE(pc + 8);
-    __GLX_SWAP_DOUBLE(pc + 16);
-    __GLX_SWAP_DOUBLE(pc + 24);
-
-}
-
-void
-__glXDispSwap_Rotatef(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_FLOAT(pc + 0);
-    __GLX_SWAP_FLOAT(pc + 4);
-    __GLX_SWAP_FLOAT(pc + 8);
-    __GLX_SWAP_FLOAT(pc + 12);
-
-}
-
-void
-__glXDispSwap_Scaled(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-#ifdef __GLX_ALIGN64
-    if ((unsigned long) (pc) & 7) {
-        __GLX_MEM_COPY(pc - 4, pc, 24);
-        pc -= 4;
-    }
-#endif
-    __GLX_SWAP_DOUBLE(pc + 0);
-    __GLX_SWAP_DOUBLE(pc + 8);
-    __GLX_SWAP_DOUBLE(pc + 16);
-
-}
-
-void
-__glXDispSwap_Scalef(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_FLOAT(pc + 0);
-    __GLX_SWAP_FLOAT(pc + 4);
-    __GLX_SWAP_FLOAT(pc + 8);
-
-}
-
-void
-__glXDispSwap_Translated(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-#ifdef __GLX_ALIGN64
-    if ((unsigned long) (pc) & 7) {
-        __GLX_MEM_COPY(pc - 4, pc, 24);
-        pc -= 4;
-    }
-#endif
-    __GLX_SWAP_DOUBLE(pc + 0);
-    __GLX_SWAP_DOUBLE(pc + 8);
-    __GLX_SWAP_DOUBLE(pc + 16);
-
-}
-
-void
-__glXDispSwap_Translatef(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_FLOAT(pc + 0);
-    __GLX_SWAP_FLOAT(pc + 4);
-    __GLX_SWAP_FLOAT(pc + 8);
-
-}
-
-void
-__glXDispSwap_Viewport(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_INT(pc + 4);
-    __GLX_SWAP_INT(pc + 8);
-    __GLX_SWAP_INT(pc + 12);
-
-}
-
-void
-__glXDispSwap_PolygonOffset(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_FLOAT(pc + 0);
-    __GLX_SWAP_FLOAT(pc + 4);
-
-}
-
-void
-__glXDispSwap_CopyTexImage1D(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_INT(pc + 4);
-    __GLX_SWAP_INT(pc + 8);
-    __GLX_SWAP_INT(pc + 12);
-    __GLX_SWAP_INT(pc + 16);
-    __GLX_SWAP_INT(pc + 20);
-    __GLX_SWAP_INT(pc + 24);
-
-}
-
-void
-__glXDispSwap_CopyTexImage2D(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_INT(pc + 4);
-    __GLX_SWAP_INT(pc + 8);
-    __GLX_SWAP_INT(pc + 12);
-    __GLX_SWAP_INT(pc + 16);
-    __GLX_SWAP_INT(pc + 20);
-    __GLX_SWAP_INT(pc + 24);
-    __GLX_SWAP_INT(pc + 28);
-
-}
-
-void
-__glXDispSwap_CopyTexSubImage1D(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_INT(pc + 4);
-    __GLX_SWAP_INT(pc + 8);
-    __GLX_SWAP_INT(pc + 12);
-    __GLX_SWAP_INT(pc + 16);
-    __GLX_SWAP_INT(pc + 20);
-
-}
-
-void
-__glXDispSwap_CopyTexSubImage2D(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_INT(pc + 4);
-    __GLX_SWAP_INT(pc + 8);
-    __GLX_SWAP_INT(pc + 12);
-    __GLX_SWAP_INT(pc + 16);
-    __GLX_SWAP_INT(pc + 20);
-    __GLX_SWAP_INT(pc + 24);
-    __GLX_SWAP_INT(pc + 28);
-
-}
-
-void
-__glXDispSwap_BindTexture(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_INT(pc + 4);
-
-}
-
-void
-__glXDispSwap_PrioritizeTextures(GLbyte * pc)
-{
-    GLsizei n;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    n = *(GLsizei *) (pc + 0);
-    __GLX_SWAP_INT_ARRAY(pc + 4, n);
-    __GLX_SWAP_FLOAT_ARRAY(pc + 4 + n * 4, n);
-
-}
-
-void
-__glXDispSwap_Indexubv(GLbyte * pc)
-{
-}
-
-void
-__glXDispSwap_BlendColor(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_FLOAT(pc + 0);
-    __GLX_SWAP_FLOAT(pc + 4);
-    __GLX_SWAP_FLOAT(pc + 8);
-    __GLX_SWAP_FLOAT(pc + 12);
-
-}
-
-void
-__glXDispSwap_BlendEquation(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-
-}
-
-void
-__glXDispSwap_ColorTableParameterfv(GLbyte * pc)
-{
-    GLenum pname;
-    GLint compsize;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 4);
-    pname = *(GLenum *) (pc + 4);
-    compsize = __glColorTableParameterfv_size(pname);
-    if (compsize < 0)
-        compsize = 0;
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_FLOAT_ARRAY(pc + 8, compsize);
-
-}
-
-void
-__glXDispSwap_ColorTableParameteriv(GLbyte * pc)
-{
-    GLenum pname;
-    GLint compsize;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 4);
-    pname = *(GLenum *) (pc + 4);
-    compsize = __glColorTableParameteriv_size(pname);
-    if (compsize < 0)
-        compsize = 0;
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_INT_ARRAY(pc + 8, compsize);
-
-}
-
-void
-__glXDispSwap_CopyColorTable(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_INT(pc + 4);
-    __GLX_SWAP_INT(pc + 8);
-    __GLX_SWAP_INT(pc + 12);
-    __GLX_SWAP_INT(pc + 16);
-
-}
-
-void
-__glXDispSwap_CopyColorSubTable(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_INT(pc + 4);
-    __GLX_SWAP_INT(pc + 8);
-    __GLX_SWAP_INT(pc + 12);
-    __GLX_SWAP_INT(pc + 16);
-
-}
-
-void
-__glXDispSwap_ConvolutionParameterf(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_INT(pc + 4);
-    __GLX_SWAP_FLOAT(pc + 8);
-
-}
-
-void
-__glXDispSwap_ConvolutionParameterfv(GLbyte * pc)
-{
-    GLenum pname;
-    GLint compsize;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 4);
-    pname = *(GLenum *) (pc + 4);
-    compsize = __glConvolutionParameterfv_size(pname);
-    if (compsize < 0)
-        compsize = 0;
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_FLOAT_ARRAY(pc + 8, compsize);
-
-}
-
-void
-__glXDispSwap_ConvolutionParameteri(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_INT(pc + 4);
-    __GLX_SWAP_INT(pc + 8);
-
-}
-
-void
-__glXDispSwap_ConvolutionParameteriv(GLbyte * pc)
-{
-    GLenum pname;
-    GLint compsize;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 4);
-    pname = *(GLenum *) (pc + 4);
-    compsize = __glConvolutionParameteriv_size(pname);
-    if (compsize < 0)
-        compsize = 0;
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_INT_ARRAY(pc + 8, compsize);
-
-}
-
-void
-__glXDispSwap_CopyConvolutionFilter1D(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_INT(pc + 4);
-    __GLX_SWAP_INT(pc + 8);
-    __GLX_SWAP_INT(pc + 12);
-    __GLX_SWAP_INT(pc + 16);
-
-}
-
-void
-__glXDispSwap_CopyConvolutionFilter2D(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_INT(pc + 4);
-    __GLX_SWAP_INT(pc + 8);
-    __GLX_SWAP_INT(pc + 12);
-    __GLX_SWAP_INT(pc + 16);
-    __GLX_SWAP_INT(pc + 20);
-
-}
-
-void
-__glXDispSwap_Histogram(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_INT(pc + 4);
-    __GLX_SWAP_INT(pc + 8);
-
-}
-
-void
-__glXDispSwap_Minmax(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_INT(pc + 4);
-
-}
-
-void
-__glXDispSwap_ResetHistogram(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-
-}
-
-void
-__glXDispSwap_ResetMinmax(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-
-}
-
-void
-__glXDispSwap_CopyTexSubImage3D(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_INT(pc + 4);
-    __GLX_SWAP_INT(pc + 8);
-    __GLX_SWAP_INT(pc + 12);
-    __GLX_SWAP_INT(pc + 16);
-    __GLX_SWAP_INT(pc + 20);
-    __GLX_SWAP_INT(pc + 24);
-    __GLX_SWAP_INT(pc + 28);
-    __GLX_SWAP_INT(pc + 32);
-
-}
-
-void
-__glXDispSwap_ActiveTextureARB(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-
-}
-
-void
-__glXDispSwap_MultiTexCoord1dvARB(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-#ifdef __GLX_ALIGN64
-    if ((unsigned long) (pc) & 7) {
-        __GLX_MEM_COPY(pc - 4, pc, 12);
-        pc -= 4;
-    }
-#endif
-    __GLX_SWAP_INT(pc + 8);
-    __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 1);
-
-}
-
-void
-__glXDispSwap_MultiTexCoord1fvARB(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_FLOAT_ARRAY(pc + 4, 1);
-
-}
-
-void
-__glXDispSwap_MultiTexCoord1ivARB(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_INT_ARRAY(pc + 4, 1);
-
-}
-
-void
-__glXDispSwap_MultiTexCoord1svARB(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_SHORT_ARRAY(pc + 4, 1);
-
-}
-
-void
-__glXDispSwap_MultiTexCoord2dvARB(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-#ifdef __GLX_ALIGN64
-    if ((unsigned long) (pc) & 7) {
-        __GLX_MEM_COPY(pc - 4, pc, 20);
-        pc -= 4;
-    }
-#endif
-    __GLX_SWAP_INT(pc + 16);
-    __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 2);
-
-}
-
-void
-__glXDispSwap_MultiTexCoord2fvARB(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_FLOAT_ARRAY(pc + 4, 2);
-
-}
-
-void
-__glXDispSwap_MultiTexCoord2ivARB(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_INT_ARRAY(pc + 4, 2);
-
-}
-
-void
-__glXDispSwap_MultiTexCoord2svARB(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_SHORT_ARRAY(pc + 4, 2);
-
-}
-
-void
-__glXDispSwap_MultiTexCoord3dvARB(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-#ifdef __GLX_ALIGN64
-    if ((unsigned long) (pc) & 7) {
-        __GLX_MEM_COPY(pc - 4, pc, 28);
-        pc -= 4;
-    }
-#endif
-    __GLX_SWAP_INT(pc + 24);
-    __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 3);
-
-}
-
-void
-__glXDispSwap_MultiTexCoord3fvARB(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_FLOAT_ARRAY(pc + 4, 3);
-
-}
-
-void
-__glXDispSwap_MultiTexCoord3ivARB(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_INT_ARRAY(pc + 4, 3);
-
-}
-
-void
-__glXDispSwap_MultiTexCoord3svARB(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_SHORT_ARRAY(pc + 4, 3);
-
-}
-
-void
-__glXDispSwap_MultiTexCoord4dvARB(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-#ifdef __GLX_ALIGN64
-    if ((unsigned long) (pc) & 7) {
-        __GLX_MEM_COPY(pc - 4, pc, 36);
-        pc -= 4;
-    }
-#endif
-    __GLX_SWAP_INT(pc + 32);
-    __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 4);
-
-}
-
-void
-__glXDispSwap_MultiTexCoord4fvARB(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_FLOAT_ARRAY(pc + 4, 4);
-
-}
-
-void
-__glXDispSwap_MultiTexCoord4ivARB(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_INT_ARRAY(pc + 4, 4);
-
-}
-
-void
-__glXDispSwap_MultiTexCoord4svARB(GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_SHORT_ARRAY(pc + 4, 4);
-
-}
diff --git a/hw/dmx/glxProxy/global.c b/hw/dmx/glxProxy/global.c
deleted file mode 100644
index 6d4612d..0000000
--- a/hw/dmx/glxProxy/global.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
- * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice including the dates of first publication and
- * either this permission notice or a reference to
- * http://oss.sgi.com/projects/FreeB/
- * shall be included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of Silicon Graphics, Inc.
- * shall not be used in advertising or otherwise to promote the sale, use or
- * other dealings in this Software without prior written authorization from
- * Silicon Graphics, Inc.
- */
-
-#include "glxserver.h"
-
-/*
-** The last context used by the server.  It is the context that is current
-** from the server's perspective.
-*/
-__GLXcontext *__glXLastContext;
-
-/*
-** X resources.
-*/
-RESTYPE __glXContextRes;
-RESTYPE __glXClientRes;
-RESTYPE __glXPixmapRes;
-RESTYPE __glXWindowRes;
-RESTYPE __glXPbufferRes;
-
-/*
-** Error codes with the extension error base already added in.
-*/
-int __glXerrorBase;
-int __glXBadContext, __glXBadContextState, __glXBadDrawable, __glXBadPixmap;
-int __glXBadContextTag, __glXBadCurrentWindow;
-int __glXBadRenderRequest, __glXBadLargeRequest;
-int __glXUnsupportedPrivateRequest;
-int __glXBadFBConfig, __glXBadPbuffer;
-
-/*
-** Reply for most singles.
-*/
-xGLXSingleReply __glXReply;
-
-/*
-** A set of state for each client.  The 0th one is unused because client
-** indices start at 1, not 0.
-*/
-__GLXclientState *__glXClients[MAXCLIENTS + 1];
-
-int __glXVersionMajor;
-int __glXVersionMinor;
diff --git a/hw/dmx/glxProxy/glxcmds.c b/hw/dmx/glxProxy/glxcmds.c
deleted file mode 100644
index 330d5c4..0000000
--- a/hw/dmx/glxProxy/glxcmds.c
+++ /dev/null
@@ -1,3843 +0,0 @@
-/*
- * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
- * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice including the dates of first publication and
- * either this permission notice or a reference to
- * http://oss.sgi.com/projects/FreeB/
- * shall be included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of Silicon Graphics, Inc.
- * shall not be used in advertising or otherwise to promote the sale, use or
- * other dealings in this Software without prior written authorization from
- * Silicon Graphics, Inc.
- */
-
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#include "dmx.h"
-#include "dmxwindow.h"
-#include "dmxpixmap.h"
-#include "dmxfont.h"
-#include "dmxsync.h"
-
-#include "glxserver.h"
-#include "g_disptab.h"
-#include <pixmapstr.h>
-#include <windowstr.h>
-#include "glxutil.h"
-#include "glxext.h"
-#include "unpack.h"
-
-#include "GL/glxproto.h"
-#include "glxvendor.h"
-#include "glxvisuals.h"
-#include "glxswap.h"
-
-#include "glxcmds.h"
-
-#ifdef PANORAMIX
-#include "panoramiXsrv.h"
-#endif
-
-extern __GLXFBConfig **__glXFBConfigs;
-extern int __glXNumFBConfigs;
-
-extern int __glXGetFBConfigsSGIX(__GLXclientState * cl, GLbyte * pc);
-
-#define BE_TO_CLIENT_ERROR(x) \
-           ( (x) >= __glXerrorBase ? \
-             (x) - dmxScreen->glxErrorBase + __glXerrorBase \
-	     : (x) )
-
-static __GLXFBConfig *
-glxLookupFBConfig(GLXFBConfigID id)
-{
-    int i, j;
-
-    for (i = 0, j = 0; i < __glXNumFBConfigs;
-         i++, j += (__glXNumActiveScreens + 1)) {
-        if (__glXFBConfigs[j]->id == id)
-            return __glXFBConfigs[j];
-    }
-
-    return NULL;
-}
-
-static __GLXFBConfig *
-glxLookupFBConfigByVID(VisualID vid)
-{
-    int i, j;
-
-    for (i = 0, j = 0; i < __glXNumFBConfigs;
-         i++, j += (__glXNumActiveScreens + 1)) {
-        if (__glXFBConfigs[j]->associatedVisualId == vid)
-            return __glXFBConfigs[j];
-    }
-
-    return NULL;
-}
-
-static __GLXFBConfig *
-glxLookupBackEndFBConfig(GLXFBConfigID id, int screen)
-{
-    int i;
-    int j;
-
-    for (i = 0, j = 0; i < __glXNumFBConfigs;
-         i++, j += (__glXNumActiveScreens + 1)) {
-        if (__glXFBConfigs[j]->id == id)
-            return __glXFBConfigs[j + screen + 1];
-    }
-
-    return NULL;
-
-}
-
-Display *
-GetBackEndDisplay(__GLXclientState * cl, int s)
-{
-    if (!cl->be_displays[s]) {
-        cl->be_displays[s] =
-            XOpenDisplay(DisplayString(dmxScreens[s].beDisplay));
-    }
-    return cl->be_displays[s];
-}
-
-/**
- * Convert the render type bits from fbconfig into context render type.
- */
-static int
-renderTypeBitsToRenderTypeEnum(int fbRenderType)
-{
-    if (fbRenderType & GLX_RGBA_BIT)
-        return GLX_RGBA_TYPE;
-
-    if (fbRenderType & GLX_COLOR_INDEX_BIT)
-        return  GLX_COLOR_INDEX_TYPE;
-
-    if (fbRenderType & GLX_RGBA_FLOAT_BIT_ARB)
-        return GLX_RGBA_FLOAT_TYPE_ARB;
-
-    if (fbRenderType & GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT)
-        return GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT;
-
-    /* There's no recognized renderType in the config */
-    return GLX_RGBA_TYPE;
-}
-
-/*
-** Create a GL context with the given properties.
-*/
-static int
-CreateContext(__GLXclientState * cl,
-              GLXContextID gcId,
-              VisualID vid, GLXFBConfigID fbconfigId,
-              int screen, GLXContextID shareList, int isDirect)
-{
-    ClientPtr client = cl->client;
-    xGLXCreateContextReq *be_req;
-    xGLXCreateNewContextReq *be_new_req;
-    VisualPtr pVisual;
-    ScreenPtr pScreen;
-    __GLXcontext *glxc, *shareglxc;
-    __GLXvisualConfig *pGlxVisual;
-    __GLXscreenInfo *pGlxScreen;
-    VisualID visual = vid;
-    GLint i;
-    int from_screen = screen;
-    int to_screen = screen;
-    DMXScreenInfo *dmxScreen;
-    VisualID be_vid = 0;
-    GLXFBConfigID be_fbconfigId = 0;
-    int num_be_screens;
-    Display *dpy;
-
-    /*
-     ** Check if screen exists.
-     */
-    if (screen >= screenInfo.numScreens) {
-        client->errorValue = screen;
-        return BadValue;
-    }
-
-#ifdef PANORAMIX
-    if (!noPanoramiXExtension) {
-        from_screen = 0;
-        to_screen = screenInfo.numScreens - 1;
-    }
-#endif
-
-    /*
-     ** Find the display list space that we want to share.
-     **
-     */
-    if (shareList == None) {
-        shareglxc = NULL;
-    }
-    else {
-        dixLookupResourceByType((void **) &shareglxc, shareList,
-                                __glXContextRes, NullClient, DixUnknownAccess);
-        if (!shareglxc) {
-            client->errorValue = shareList;
-            return __glXBadContext;
-        }
-    }
-
-    /*
-     ** Allocate memory for the new context
-     */
-    glxc = calloc(1, sizeof(__GLXcontext));
-    if (!glxc) {
-        return BadAlloc;
-    }
-
-    pScreen = screenInfo.screens[screen];
-    pGlxScreen = &__glXActiveScreens[screen];
-
-    if (fbconfigId != None) {
-        glxc->pFBConfig = glxLookupFBConfig(fbconfigId);
-        if (!glxc->pFBConfig) {
-            client->errorValue = fbconfigId;
-            free(glxc);
-            return BadValue;
-        }
-        visual = glxc->pFBConfig->associatedVisualId;
-    }
-    else {
-        glxc->pFBConfig = NULL;
-    }
-
-    if (visual != None) {
-        /*
-         ** Check if the visual ID is valid for this screen.
-         */
-        pVisual = pScreen->visuals;
-        for (i = 0; i < pScreen->numVisuals; i++, pVisual++) {
-            if (pVisual->vid == visual) {
-                break;
-            }
-        }
-        if (i == pScreen->numVisuals) {
-            client->errorValue = visual;
-            free(glxc);
-            return BadValue;
-        }
-
-        pGlxVisual = pGlxScreen->pGlxVisual;
-        for (i = 0; i < pGlxScreen->numVisuals; i++, pGlxVisual++) {
-            if (pGlxVisual->vid == visual) {
-                break;
-            }
-        }
-        if (i == pGlxScreen->numVisuals) {
-            /*
-             ** Visual not support on this screen by this OpenGL implementation.
-             */
-            client->errorValue = visual;
-            free(glxc);
-            return BadValue;
-        }
-
-        if (glxc->pFBConfig == NULL) {
-            glxc->pFBConfig = glxLookupFBConfigByVID(visual);
-
-            if (glxc->pFBConfig == NULL) {
-                /*
-                 * visual does not have an FBConfig ???
-                 client->errorValue = visual;
-                 free( glxc );
-                 return BadValue;
-                 */
-            }
-        }
-    }
-    else {
-        pVisual = NULL;
-        pGlxVisual = NULL;
-    }
-
-    glxc->pScreen = pScreen;
-    glxc->pGlxScreen = pGlxScreen;
-    glxc->pVisual = pVisual;
-    glxc->pGlxVisual = pGlxVisual;
-
-    /*
-     * allocate memory for back-end servers info
-     */
-    num_be_screens = to_screen - from_screen + 1;
-    glxc->real_ids = xallocarray(num_be_screens, sizeof(XID));
-    if (!glxc->real_ids) {
-        return BadAlloc;
-    }
-    glxc->real_vids = xallocarray(num_be_screens, sizeof(XID));
-    if (!glxc->real_vids) {
-        return BadAlloc;
-    }
-
-    for (screen = from_screen; screen <= to_screen; screen++) {
-        int sent = 0;
-
-        pScreen = screenInfo.screens[screen];
-        pGlxScreen = &__glXActiveScreens[screen];
-        dmxScreen = &dmxScreens[screen];
-
-        if (glxc->pFBConfig) {
-            __GLXFBConfig *beFBConfig =
-                glxLookupBackEndFBConfig(glxc->pFBConfig->id,
-                                         screen);
-
-            be_fbconfigId = beFBConfig->id;
-        }
-
-        if (pGlxVisual) {
-
-            be_vid = glxMatchGLXVisualInConfigList(pGlxVisual,
-                                                   dmxScreen->glxVisuals,
-                                                   dmxScreen->numGlxVisuals);
-
-            if (!be_vid) {
-                /* visual is not supported on the back-end server */
-                free(glxc->real_ids);
-                free(glxc->real_vids);
-                free(glxc);
-                return BadValue;
-            }
-        }
-
-        glxc->real_ids[screen - from_screen] =
-            XAllocID(GetBackEndDisplay(cl, screen));
-
-        /* send the create context request to the back-end server */
-        dpy = GetBackEndDisplay(cl, screen);
-        if (glxc->pFBConfig) {
-            /* For a specific visual, multiple render types (i.e., both RGB
-             * and COLOR INDEX) can be accessible. The only parameter to
-             * choose the renderType should be the class of the colormap,
-             * since the first classes do not support RGB mode (only COLOR
-             * INDEX), and TrueColor and DirectColor do not support COLOR
-             * INDEX.
-             */
-            int renderType = GLX_RGBA_TYPE;
-
-            if (pVisual) {
-                switch (pVisual->class) {
-                case PseudoColor:
-                case StaticColor:
-                case GrayScale:
-                case StaticGray:
-                    renderType = GLX_COLOR_INDEX_TYPE;
-                    break;
-                case TrueColor:
-                case DirectColor:
-                default:
-                    renderType = GLX_RGBA_TYPE;
-                    break;
-                }
-            } else {
-                renderType =
-                    renderTypeBitsToRenderTypeEnum(glxc->pFBConfig->renderType);
-            }
-
-            if (__GLX_IS_VERSION_SUPPORTED(1, 3)) {
-                LockDisplay(dpy);
-                GetReq(GLXCreateNewContext, be_new_req);
-                be_new_req->reqType = dmxScreen->glxMajorOpcode;
-                be_new_req->glxCode = X_GLXCreateNewContext;
-                be_new_req->context =
-                    (unsigned int) glxc->real_ids[screen - from_screen];
-                be_new_req->fbconfig = (unsigned int) be_fbconfigId;
-                be_new_req->screen = DefaultScreen(dpy);
-                be_new_req->renderType = renderType;
-
-                be_new_req->shareList =
-                    (shareglxc ? shareglxc->real_ids[screen - from_screen] : 0);
-                be_new_req->isDirect = 0;
-                UnlockDisplay(dpy);
-                glxc->real_vids[screen - from_screen] = be_fbconfigId;
-                sent = 1;
-            }
-            else if (glxIsExtensionSupported("GLX_SGIX_fbconfig")) {
-
-                xGLXCreateContextWithConfigSGIXReq *ext_req;
-                xGLXVendorPrivateReq *vpreq;
-
-                LockDisplay(dpy);
-                GetReqExtra(GLXVendorPrivate,
-                            sz_xGLXCreateContextWithConfigSGIXReq -
-                            sz_xGLXVendorPrivateReq, vpreq);
-                ext_req = (xGLXCreateContextWithConfigSGIXReq *) vpreq;
-                ext_req->reqType = dmxScreen->glxMajorOpcode;
-                ext_req->glxCode = X_GLXVendorPrivate;
-                ext_req->vendorCode = X_GLXvop_CreateContextWithConfigSGIX;
-                ext_req->context =
-                    (unsigned int) glxc->real_ids[screen - from_screen];
-                ext_req->fbconfig = (unsigned int) be_fbconfigId;
-                ext_req->screen = DefaultScreen(dpy);
-                ext_req->renderType = renderType;
-                ext_req->shareList =
-                    (shareglxc ? shareglxc->real_ids[screen - from_screen] : 0);
-                ext_req->isDirect = 0;
-                UnlockDisplay(dpy);
-                glxc->real_vids[screen - from_screen] = be_fbconfigId;
-                sent = 1;
-            }
-        }
-
-        if (!sent) {
-            LockDisplay(dpy);
-            GetReq(GLXCreateContext, be_req);
-            be_req->reqType = dmxScreen->glxMajorOpcode;
-            be_req->glxCode = X_GLXCreateContext;
-            be_req->context =
-                (unsigned int) glxc->real_ids[screen - from_screen];
-            be_req->visual = (unsigned int) be_vid;
-            be_req->screen = DefaultScreen(dpy);
-            be_req->shareList =
-                (shareglxc ? shareglxc->real_ids[screen - from_screen] : 0);
-            be_req->isDirect = 0;
-            UnlockDisplay(dpy);
-            glxc->real_vids[screen - from_screen] = be_vid;
-        }
-        SyncHandle();
-
-    }
-
-    /*
-     ** Register this context as a resource.
-     */
-    if (!AddResource(gcId, __glXContextRes, (void *) glxc)) {
-        free(glxc->real_ids);
-        free(glxc->real_vids);
-        free(glxc);
-        client->errorValue = gcId;
-        return BadAlloc;
-    }
-
-    /*
-     ** Finally, now that everything is working, setup the rest of the
-     ** context.
-     */
-    glxc->id = gcId;
-    glxc->share_id = shareList;
-    glxc->idExists = GL_TRUE;
-    glxc->isCurrent = GL_FALSE;
-
-    return Success;
-}
-
-int
-__glXCreateContext(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXCreateContextReq *req = (xGLXCreateContextReq *) pc;
-
-    return (CreateContext(cl, req->context, req->visual, None,
-                          req->screen, req->shareList, req->isDirect));
-
-}
-
-int
-__glXCreateNewContext(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXCreateNewContextReq *req = (xGLXCreateNewContextReq *) pc;
-
-    return (CreateContext(cl, req->context, None, req->fbconfig,
-                          req->screen, req->shareList, req->isDirect));
-
-}
-
-int
-__glXCreateContextWithConfigSGIX(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXCreateContextWithConfigSGIXReq *req =
-        (xGLXCreateContextWithConfigSGIXReq *) pc;
-
-    return (CreateContext(cl, req->context, None, req->fbconfig,
-                          req->screen, req->shareList, req->isDirect));
-
-}
-
-int
-__glXQueryMaxSwapBarriersSGIX(__GLXclientState * cl, GLbyte * pc)
-{
-    ClientPtr client = cl->client;
-    xGLXQueryMaxSwapBarriersSGIXReq *req =
-        (xGLXQueryMaxSwapBarriersSGIXReq *) pc;
-    xGLXQueryMaxSwapBarriersSGIXReply reply = {
-        .type = X_Reply,
-        .sequenceNumber = client->sequence,
-        .length = 0,
-        .max = QueryMaxSwapBarriersSGIX(req->screen)
-    };
-
-    if (client->swapped) {
-        __glXSwapQueryMaxSwapBarriersSGIXReply(client, &reply);
-    }
-    else {
-        WriteToClient(client, sz_xGLXQueryMaxSwapBarriersSGIXReply, &reply);
-    }
-
-    return Success;
-}
-
-int
-__glXBindSwapBarrierSGIX(__GLXclientState * cl, GLbyte * pc)
-{
-    ClientPtr client = cl->client;
-    xGLXBindSwapBarrierSGIXReq *req = (xGLXBindSwapBarrierSGIXReq *) pc;
-    DrawablePtr pDraw;
-    __GLXpixmap *pGlxPixmap = NULL;
-    __glXWindow *pGlxWindow = NULL;
-    int rc;
-
-    rc = dixLookupDrawable(&pDraw, req->drawable, client, 0, DixGetAttrAccess);
-    if (rc != Success) {
-        dixLookupResourceByType((void **) &pGlxPixmap, req->drawable,
-                                __glXPixmapRes, NullClient, DixUnknownAccess);
-        if (pGlxPixmap)
-            pDraw = pGlxPixmap->pDraw;
-    }
-
-    if (!pDraw && __GLX_IS_VERSION_SUPPORTED(1, 3)) {
-        dixLookupResourceByType((void **) &pGlxWindow, req->drawable,
-                                __glXWindowRes, NullClient, DixUnknownAccess);
-        if (pGlxWindow)
-            pDraw = pGlxWindow->pDraw;
-    }
-
-    if (!pDraw) {
-        client->errorValue = req->drawable;
-        return __glXBadDrawable;
-    }
-
-    return BindSwapBarrierSGIX(pDraw, req->barrier);
-}
-
-int
-__glXJoinSwapGroupSGIX(__GLXclientState * cl, GLbyte * pc)
-{
-    ClientPtr client = cl->client;
-    xGLXJoinSwapGroupSGIXReq *req = (xGLXJoinSwapGroupSGIXReq *) pc;
-    DrawablePtr pDraw, pMember = NULL;
-    __GLXpixmap *pGlxPixmap = NULL;
-    __glXWindow *pGlxWindow = NULL;
-    int rc;
-
-    rc = dixLookupDrawable(&pDraw, req->drawable, client, 0, DixManageAccess);
-    if (rc != Success) {
-        dixLookupResourceByType((void **) &pGlxPixmap, req->drawable,
-                                __glXPixmapRes, NullClient, DixUnknownAccess);
-        if (pGlxPixmap)
-            pDraw = pGlxPixmap->pDraw;
-    }
-
-    if (!pDraw && __GLX_IS_VERSION_SUPPORTED(1, 3)) {
-        dixLookupResourceByType((void **) &pGlxWindow, req->drawable,
-                                __glXWindowRes, NullClient, DixUnknownAccess);
-        if (pGlxWindow)
-            pDraw = pGlxWindow->pDraw;
-    }
-
-    if (!pDraw) {
-        client->errorValue = req->drawable;
-        return __glXBadDrawable;
-    }
-
-    if (req->member != None) {
-        rc = dixLookupDrawable(&pMember, req->member, client, 0,
-                               DixGetAttrAccess);
-        if (rc != Success) {
-            dixLookupResourceByType((void **) &pGlxPixmap, req->member,
-                                    __glXPixmapRes, NullClient,
-                                    DixUnknownAccess);
-            if (pGlxPixmap)
-                pMember = pGlxPixmap->pDraw;
-        }
-
-        if (!pMember && __GLX_IS_VERSION_SUPPORTED(1, 3)) {
-            dixLookupResourceByType((void **) &pGlxWindow, req->member,
-                                    __glXWindowRes, NullClient,
-                                    DixUnknownAccess);
-            if (pGlxWindow)
-                pMember = pGlxWindow->pDraw;
-        }
-
-        if (!pMember) {
-            client->errorValue = req->member;
-            return __glXBadDrawable;
-        }
-    }
-
-    return JoinSwapGroupSGIX(pDraw, pMember);
-}
-
-/*
-** Destroy a GL context as an X resource.
-*/
-int
-__glXDestroyContext(__GLXclientState * cl, GLbyte * pc)
-{
-    ClientPtr client = cl->client;
-    xGLXDestroyContextReq *req = (xGLXDestroyContextReq *) pc;
-    xGLXDestroyContextReq *be_req;
-    GLXContextID gcId = req->context;
-    __GLXcontext *glxc;
-    int from_screen = 0;
-    int to_screen = 0;
-    int s;
-
-    dixLookupResourceByType((void **) &glxc, gcId, __glXContextRes,
-                            NullClient, DixUnknownAccess);
-    if (glxc) {
-        /*
-         ** Just free the resource; don't actually destroy the context,
-         ** because it might be in use.  The
-         ** destroy method will be called by the resource destruction routine
-         ** if necessary.
-         */
-        FreeResourceByType(gcId, __glXContextRes, FALSE);
-
-        from_screen = to_screen = glxc->pScreen->myNum;
-
-    }
-    else {
-        client->errorValue = gcId;
-        return __glXBadContext;
-    }
-
-#ifdef PANORAMIX
-    if (!noPanoramiXExtension) {
-        from_screen = 0;
-        to_screen = screenInfo.numScreens - 1;
-    }
-#endif
-
-    /*
-     * send DestroyContext request to all back-end servers
-     */
-    for (s = from_screen; s <= to_screen; s++) {
-        DMXScreenInfo *dmxScreen = &dmxScreens[s];
-        Display *dpy = GetBackEndDisplay(cl, s);
-
-        LockDisplay(dpy);
-        GetReq(GLXDestroyContext, be_req);
-        be_req->reqType = dmxScreen->glxMajorOpcode;
-        be_req->glxCode = X_GLXDestroyContext;
-        be_req->context = glxc->real_ids[s - from_screen];
-        UnlockDisplay(dpy);
-        SyncHandle();
-    }
-
-    return Success;
-}
-
-/*****************************************************************************/
-
-/*
-** For each client, the server keeps a table of all the contexts that are
-** current for that client (each thread of a client may have its own current
-** context).  These routines add, change, and lookup contexts in the table.
-*/
-
-/*
-** Add a current context, and return the tag that will be used to refer to it.
-*/
-static int
-AddCurrentContext(__GLXclientState * cl, __GLXcontext * glxc, DrawablePtr pDraw)
-{
-    int i;
-    int num = cl->numCurrentContexts;
-    __GLXcontext **table = cl->currentContexts;
-
-    if (!glxc)
-        return -1;
-
-    /*
-     ** Try to find an empty slot and use it.
-     */
-    for (i = 0; i < num; i++) {
-        if (!table[i]) {
-            table[i] = glxc;
-            return i + 1;
-        }
-    }
-    /*
-     ** Didn't find a free slot, so we'll have to grow the table.
-     */
-    if (!num) {
-        table = (__GLXcontext **) malloc(sizeof(__GLXcontext *));
-        cl->currentDrawables = (DrawablePtr *) malloc(sizeof(DrawablePtr));
-        cl->be_currentCTag = xallocarray(screenInfo.numScreens,
-                                         sizeof(GLXContextTag));
-    }
-    else {
-        table = reallocarray(table, num + 1, sizeof(__GLXcontext *));
-        cl->currentDrawables = reallocarray(cl->currentDrawables, num + 1,
-                                            sizeof(DrawablePtr));
-        cl->be_currentCTag = reallocarray(cl->be_currentCTag,
-                                          (num + 1) * screenInfo.numScreens,
-                                          sizeof(GLXContextTag));
-    }
-    table[num] = glxc;
-    cl->currentDrawables[num] = pDraw;
-    cl->currentContexts = table;
-    cl->numCurrentContexts++;
-
-    memset(cl->be_currentCTag + num * screenInfo.numScreens, 0,
-           screenInfo.numScreens * sizeof(GLXContextTag));
-
-    return num + 1;
-}
-
-/*
-** Given a tag, change the current context for the corresponding entry.
-*/
-static void
-ChangeCurrentContext(__GLXclientState * cl, __GLXcontext * glxc,
-                     GLXContextTag tag)
-{
-    __GLXcontext **table = cl->currentContexts;
-
-    table[tag - 1] = glxc;
-}
-
-/*
-** Given a tag, and back-end screen number, retrives the current back-end
-** tag.
-*/
-int
-GetCurrentBackEndTag(__GLXclientState * cl, GLXContextTag tag, int s)
-{
-    if (tag > 0) {
-        return (cl->be_currentCTag[(tag - 1) * screenInfo.numScreens + s]);
-    }
-    else {
-        return 0;
-    }
-}
-
-/*
-** Given a tag, and back-end screen number, sets the current back-end
-** tag.
-*/
-static void
-SetCurrentBackEndTag(__GLXclientState * cl, GLXContextTag tag, int s,
-                     GLXContextTag be_tag)
-{
-    if (tag > 0) {
-        cl->be_currentCTag[(tag - 1) * screenInfo.numScreens + s] = be_tag;
-    }
-}
-
-/*
-** For this implementation we have chosen to simply use the index of the
-** context's entry in the table as the context tag.  A tag must be greater
-** than 0.
-*/
-__GLXcontext *
-__glXLookupContextByTag(__GLXclientState * cl, GLXContextTag tag)
-{
-    int num = cl->numCurrentContexts;
-
-    if (tag < 1 || tag > num) {
-        return 0;
-    }
-    else {
-        return cl->currentContexts[tag - 1];
-    }
-}
-
-DrawablePtr
-__glXLookupDrawableByTag(__GLXclientState * cl, GLXContextTag tag)
-{
-    int num = cl->numCurrentContexts;
-
-    if (tag < 1 || tag > num) {
-        return 0;
-    }
-    else {
-        return cl->currentDrawables[tag - 1];
-    }
-}
-
-/*****************************************************************************/
-
-static void
-StopUsingContext(__GLXcontext * glxc)
-{
-    if (glxc) {
-        if (glxc == __glXLastContext) {
-            /* Tell server GL library */
-            __glXLastContext = 0;
-        }
-        glxc->isCurrent = GL_FALSE;
-        if (!glxc->idExists) {
-            __glXFreeContext(glxc);
-        }
-    }
-}
-
-static void
-StartUsingContext(__GLXclientState * cl, __GLXcontext * glxc)
-{
-    glxc->isCurrent = GL_TRUE;
-}
-
-/*****************************************************************************/
-/*
-** Make an OpenGL context and drawable current.
-*/
-static int
-MakeCurrent(__GLXclientState * cl,
-            GLXDrawable drawable,
-            GLXDrawable readdrawable,
-            GLXContextID context, GLXContextTag oldContextTag)
-{
-    ClientPtr client = cl->client;
-    DrawablePtr pDraw = NULL;
-    DrawablePtr pReadDraw = NULL;
-    xGLXMakeCurrentReadSGIReply new_reply = {
-        .type = X_Reply,
-        .sequenceNumber = client->sequence,
-        .length = 0
-    };
-    xGLXMakeCurrentReq *be_req;
-    xGLXMakeCurrentReply be_reply;
-    xGLXMakeContextCurrentReq *be_new_req;
-    xGLXMakeContextCurrentReply be_new_reply;
-    GLXDrawable drawId = drawable;
-    GLXDrawable readId = readdrawable;
-    GLXContextID contextId = context;
-    __GLXpixmap *pGlxPixmap = 0;
-    __GLXpixmap *pReadGlxPixmap = 0;
-    __GLXcontext *glxc, *prevglxc;
-    GLXContextTag tag = oldContextTag;
-    WindowPtr pWin = NULL;
-    WindowPtr pReadWin = NULL;
-    __glXWindow *pGlxWindow = NULL;
-    __glXWindow *pGlxReadWindow = NULL;
-    __glXPbuffer *pGlxPbuffer = NULL;
-    __glXPbuffer *pGlxReadPbuffer = NULL;
-
-#ifdef PANORAMIX
-    PanoramiXRes *pXinDraw = NULL;
-    PanoramiXRes *pXinReadDraw = NULL;
-#endif
-    int from_screen = 0;
-    int to_screen = 0;
-    int s, rc;
-
-    /*
-     ** If one is None and the other isn't, it's a bad match.
-     */
-    if ((drawId == None && contextId != None) ||
-        (drawId != None && contextId == None)) {
-        return BadMatch;
-    }
-
-    /*
-     ** Lookup old context.  If we have one, it must be in a usable state.
-     */
-    if (tag != 0) {
-        prevglxc = __glXLookupContextByTag(cl, tag);
-        if (!prevglxc) {
-            /*
-             ** Tag for previous context is invalid.
-             */
-            return __glXBadContextTag;
-        }
-    }
-    else {
-        prevglxc = 0;
-    }
-
-    /*
-     ** Lookup new context.  It must not be current for someone else.
-     */
-    if (contextId != None) {
-        dixLookupResourceByType((void **) &glxc, contextId, __glXContextRes,
-                                NullClient, DixUnknownAccess);
-        if (!glxc) {
-            client->errorValue = contextId;
-            return __glXBadContext;
-        }
-        if ((glxc != prevglxc) && glxc->isCurrent) {
-            /* Context is current to somebody else */
-            return BadAccess;
-        }
-    }
-    else {
-        /* Switching to no context.  Ignore new drawable. */
-        glxc = 0;
-    }
-
-    if (drawId != None) {
-        rc = dixLookupDrawable(&pDraw, drawId, client, 0, DixWriteAccess);
-        if (rc == Success) {
-            if (pDraw->type == DRAWABLE_WINDOW) {
-                /*
-                 ** Drawable is an X Window.
-                 */
-                VisualID vid;
-
-                pWin = (WindowPtr) pDraw;
-                vid = wVisual(pWin);
-
-                new_reply.writeVid =
-                    (glxc->pFBConfig ? glxc->pFBConfig->id : vid);
-                new_reply.writeType = GLX_WINDOW_TYPE;
-
-                /*
-                 ** Check if window and context are similar.
-                 */
-                if ((vid != glxc->pVisual->vid) ||
-                    (pWin->drawable.pScreen != glxc->pScreen)) {
-                    client->errorValue = drawId;
-                    return BadMatch;
-                }
-
-                from_screen = to_screen = pWin->drawable.pScreen->myNum;
-
-            }
-            else {
-                /*
-                 ** An X Pixmap is not allowed as a parameter (a GLX Pixmap
-                 ** is, but it must first be created with glxCreateGLXPixmap).
-                 */
-                client->errorValue = drawId;
-                return __glXBadDrawable;
-            }
-        }
-
-        if (!pDraw) {
-            dixLookupResourceByType((void **) &pGlxPixmap, drawId,
-                                    __glXPixmapRes, NullClient,
-                                    DixUnknownAccess);
-            if (pGlxPixmap) {
-                /*
-                 ** Check if pixmap and context are similar.
-                 */
-                if (pGlxPixmap->pScreen != glxc->pScreen ||
-                    pGlxPixmap->pGlxVisual != glxc->pGlxVisual) {
-                    client->errorValue = drawId;
-                    return BadMatch;
-                }
-                pDraw = pGlxPixmap->pDraw;
-
-                new_reply.writeVid = (glxc->pFBConfig ? glxc->pFBConfig->id :
-                                      pGlxPixmap->pGlxVisual->vid);
-
-                new_reply.writeType = GLX_PIXMAP_TYPE;
-
-                from_screen = to_screen = pGlxPixmap->pScreen->myNum;
-
-            }
-        }
-
-        if (!pDraw && __GLX_IS_VERSION_SUPPORTED(1, 3)) {
-            dixLookupResourceByType((void **) &pGlxWindow, drawId,
-                                    __glXWindowRes, NullClient,
-                                    DixUnknownAccess);
-            if (pGlxWindow) {
-                /*
-                 ** Drawable is a GLXWindow.
-                 **
-                 ** Check if GLX window and context are similar.
-                 */
-                if (pGlxWindow->pScreen != glxc->pScreen ||
-                    pGlxWindow->pGlxFBConfig != glxc->pFBConfig) {
-                    client->errorValue = drawId;
-                    return BadMatch;
-                }
-
-                pDraw = pGlxWindow->pDraw;
-                new_reply.writeVid = pGlxWindow->pGlxFBConfig->id;
-                new_reply.writeType = GLX_GLXWINDOW_TYPE;
-            }
-
-        }
-
-        if (!pDraw && __GLX_IS_VERSION_SUPPORTED(1, 3)) {
-            dixLookupResourceByType((void **) &pGlxPbuffer, drawId,
-                                    __glXPbufferRes, NullClient,
-                                    DixUnknownAccess);
-            if (pGlxPbuffer) {
-                if (pGlxPbuffer->pScreen != glxc->pScreen ||
-                    pGlxPbuffer->pFBConfig != glxc->pFBConfig) {
-                    client->errorValue = drawId;
-                    return BadMatch;
-                }
-
-                pDraw = (DrawablePtr) pGlxPbuffer;
-                new_reply.writeVid = pGlxPbuffer->pFBConfig->id;
-                new_reply.writeType = GLX_PBUFFER_TYPE;
-            }
-        }
-
-        if (!pDraw) {
-            /*
-             ** Drawable is not a Window , GLXWindow or a GLXPixmap.
-             */
-            client->errorValue = drawId;
-            return __glXBadDrawable;
-        }
-
-    }
-    else {
-        pDraw = 0;
-    }
-
-    if (readId != None && readId != drawId) {
-        rc = dixLookupDrawable(&pReadDraw, readId, client, 0, DixReadAccess);
-        if (rc == Success) {
-            if (pReadDraw->type == DRAWABLE_WINDOW) {
-                /*
-                 ** Drawable is an X Window.
-                 */
-                VisualID vid;
-
-                pReadWin = (WindowPtr) pDraw;
-                vid = wVisual(pReadWin);
-
-                new_reply.readVid =
-                    (glxc->pFBConfig ? glxc->pFBConfig->id : vid);
-                new_reply.readType = GLX_WINDOW_TYPE;
-
-                /*
-                 ** Check if window and context are similar.
-                 */
-                if ((vid != glxc->pVisual->vid) ||
-                    (pReadWin->drawable.pScreen != glxc->pScreen)) {
-                    client->errorValue = readId;
-                    return BadMatch;
-                }
-
-            }
-            else {
-
-                /*
-                 ** An X Pixmap is not allowed as a parameter (a GLX Pixmap
-                 ** is, but it must first be created with glxCreateGLXPixmap).
-                 */
-                client->errorValue = readId;
-                return __glXBadDrawable;
-            }
-        }
-
-        if (!pReadDraw) {
-            dixLookupResourceByType((void **) &pReadGlxPixmap, readId,
-                                    __glXPixmapRes, NullClient,
-                                    DixUnknownAccess);
-            if (pReadGlxPixmap) {
-                /*
-                 ** Check if pixmap and context are similar.
-                 */
-                if (pReadGlxPixmap->pScreen != glxc->pScreen ||
-                    pReadGlxPixmap->pGlxVisual != glxc->pGlxVisual) {
-                    client->errorValue = readId;
-                    return BadMatch;
-                }
-                pReadDraw = pReadGlxPixmap->pDraw;
-
-                new_reply.readVid = (glxc->pFBConfig ? glxc->pFBConfig->id :
-                                     pReadGlxPixmap->pGlxVisual->vid);
-                new_reply.readType = GLX_PIXMAP_TYPE;
-
-            }
-        }
-
-        if (!pReadDraw && __GLX_IS_VERSION_SUPPORTED(1, 3)) {
-            dixLookupResourceByType((void **) &pGlxReadWindow, readId,
-                                    __glXWindowRes, NullClient,
-                                    DixUnknownAccess);
-            if (pGlxReadWindow) {
-                /*
-                 ** Drawable is a GLXWindow.
-                 **
-                 ** Check if GLX window and context are similar.
-                 */
-                if (pGlxReadWindow->pScreen != glxc->pScreen ||
-                    pGlxReadWindow->pGlxFBConfig != glxc->pFBConfig) {
-                    client->errorValue = readId;
-                    return BadMatch;
-                }
-
-                pReadDraw = pGlxReadWindow->pDraw;
-                new_reply.readVid = pGlxReadWindow->pGlxFBConfig->id;
-                new_reply.readType = GLX_GLXWINDOW_TYPE;
-            }
-        }
-
-        if (!pReadDraw && __GLX_IS_VERSION_SUPPORTED(1, 3)) {
-            dixLookupResourceByType((void **) &pGlxReadPbuffer, readId,
-                                    __glXPbufferRes, NullClient,
-                                    DixUnknownAccess);
-            if (pGlxReadPbuffer) {
-                if (pGlxReadPbuffer->pScreen != glxc->pScreen ||
-                    pGlxReadPbuffer->pFBConfig != glxc->pFBConfig) {
-                    client->errorValue = drawId;
-                    return BadMatch;
-                }
-
-                pReadDraw = (DrawablePtr) pGlxReadPbuffer;
-                new_reply.readVid = pGlxReadPbuffer->pFBConfig->id;
-                new_reply.readType = GLX_PBUFFER_TYPE;
-            }
-        }
-
-        if (!pReadDraw) {
-            /*
-             ** Drawable is neither a Window nor a GLXPixmap.
-             */
-            client->errorValue = readId;
-            return __glXBadDrawable;
-        }
-
-    }
-    else {
-        pReadDraw = pDraw;
-        pReadGlxPixmap = pGlxPixmap;
-        pReadWin = pWin;
-        new_reply.readVid = new_reply.writeVid;
-        new_reply.readType = new_reply.writeType;
-    }
-
-    if (prevglxc) {
-
-        if (prevglxc->pGlxPixmap) {
-            /*
-             ** The previous drawable was a glx pixmap, release it.
-             */
-            prevglxc->pGlxPixmap->refcnt--;
-            __glXFreeGLXPixmap(prevglxc->pGlxPixmap);
-            prevglxc->pGlxPixmap = 0;
-        }
-
-        if (prevglxc->pGlxReadPixmap) {
-            /*
-             ** The previous drawable was a glx pixmap, release it.
-             */
-            prevglxc->pGlxReadPixmap->refcnt--;
-            __glXFreeGLXPixmap(prevglxc->pGlxReadPixmap);
-            prevglxc->pGlxReadPixmap = 0;
-        }
-
-        if (prevglxc->pGlxWindow) {
-            /*
-             ** The previous drawable was a glx window, release it.
-             */
-            prevglxc->pGlxWindow->refcnt--;
-            __glXFreeGLXWindow(prevglxc->pGlxWindow);
-            prevglxc->pGlxWindow = 0;
-        }
-
-        if (prevglxc->pGlxReadWindow) {
-            /*
-             ** The previous drawable was a glx window, release it.
-             */
-            prevglxc->pGlxReadWindow->refcnt--;
-            __glXFreeGLXWindow(prevglxc->pGlxReadWindow);
-            prevglxc->pGlxReadWindow = 0;
-        }
-
-        if (prevglxc->pGlxPbuffer) {
-            /*
-             ** The previous drawable was a glx Pbuffer, release it.
-             */
-            prevglxc->pGlxPbuffer->refcnt--;
-            __glXFreeGLXPbuffer(prevglxc->pGlxPbuffer);
-            prevglxc->pGlxPbuffer = 0;
-        }
-
-        if (prevglxc->pGlxReadPbuffer) {
-            /*
-             ** The previous drawable was a glx Pbuffer, release it.
-             */
-            prevglxc->pGlxReadPbuffer->refcnt--;
-            __glXFreeGLXPbuffer(prevglxc->pGlxReadPbuffer);
-            prevglxc->pGlxReadPbuffer = 0;
-        }
-
-        ChangeCurrentContext(cl, glxc, tag);
-        ChangeCurrentContext(cl, glxc, tag);
-        StopUsingContext(prevglxc);
-    }
-    else {
-        tag = AddCurrentContext(cl, glxc, pDraw);
-    }
-    if (glxc) {
-
-        glxc->pGlxPixmap = pGlxPixmap;
-        glxc->pGlxReadPixmap = pReadGlxPixmap;
-        glxc->pGlxWindow = pGlxWindow;
-        glxc->pGlxReadWindow = pGlxReadWindow;
-        glxc->pGlxPbuffer = pGlxPbuffer;
-        glxc->pGlxReadPbuffer = pGlxReadPbuffer;
-
-        if (pGlxPixmap) {
-            pGlxPixmap->refcnt++;
-        }
-
-        if (pReadGlxPixmap) {
-            pReadGlxPixmap->refcnt++;
-        }
-
-        if (pGlxWindow) {
-            pGlxWindow->refcnt++;
-        }
-
-        if (pGlxReadWindow) {
-            pGlxReadWindow->refcnt++;
-        }
-
-        if (pGlxPbuffer) {
-            pGlxPbuffer->refcnt++;
-        }
-
-        if (pGlxReadPbuffer) {
-            pGlxReadPbuffer->refcnt++;
-        }
-
-        StartUsingContext(cl, glxc);
-        new_reply.contextTag = tag;
-    }
-    else {
-        new_reply.contextTag = 0;
-    }
-
-#ifdef PANORAMIX
-    if (!noPanoramiXExtension) {
-        from_screen = 0;
-        to_screen = screenInfo.numScreens - 1;
-
-        if (pDraw && new_reply.writeType != GLX_PBUFFER_TYPE) {
-            dixLookupResourceByClass((void **) &pXinDraw,
-                                     pDraw->id, XRC_DRAWABLE,
-                                     client, DixReadAccess);
-        }
-
-        if (pReadDraw && pReadDraw != pDraw &&
-            new_reply.readType != GLX_PBUFFER_TYPE) {
-            dixLookupResourceByClass((void **) &pXinReadDraw,
-                                     pReadDraw->id, XRC_DRAWABLE,
-                                     client, DixReadAccess);
-        }
-        else {
-            pXinReadDraw = pXinDraw;
-        }
-    }
-#endif
-
-    /* send the MakeCurrent request to all required
-     * back-end servers.
-     */
-    for (s = from_screen; s <= to_screen; s++) {
-        DMXScreenInfo *dmxScreen = &dmxScreens[s];
-        Display *dpy = GetBackEndDisplay(cl, s);
-        unsigned int be_draw = None;
-        unsigned int be_read_draw = None;
-
-        if (pGlxPixmap) {
-            be_draw = pGlxPixmap->be_xids[s];
-        }
-        else if (pGlxPbuffer) {
-            be_draw = pGlxPbuffer->be_xids[s];
-        }
-#ifdef PANORAMIX
-        else if (pXinDraw) {
-            dixLookupWindow(&pWin, pXinDraw->info[s].id, client, DixReadAccess);
-        }
-#endif
-        else if (pGlxWindow) {
-            pWin = (WindowPtr) pGlxWindow->pDraw;
-        }
-
-        if (pWin && be_draw == None) {
-            be_draw = (unsigned int) (DMX_GET_WINDOW_PRIV(pWin))->window;
-            if (!be_draw) {
-                /* it might be that the window did not created yet on the */
-                /* back-end server (lazy window creation option), force   */
-                /* creation of the window */
-                dmxCreateAndRealizeWindow(pWin, TRUE);
-                be_draw = (unsigned int) (DMX_GET_WINDOW_PRIV(pWin))->window;
-            }
-        }
-
-        /*
-         * Before sending the MakeCurrent request - sync the
-         * X11 connection to the back-end servers to make sure
-         * that drawable is already created
-         */
-        dmxSync(dmxScreen, 1);
-
-        if (drawId == readId) {
-            LockDisplay(dpy);
-            GetReq(GLXMakeCurrent, be_req);
-            be_req->reqType = dmxScreen->glxMajorOpcode;
-            be_req->glxCode = X_GLXMakeCurrent;
-            be_req->drawable = be_draw;
-            be_req->context =
-                (unsigned int) (glxc ? glxc->real_ids[s - from_screen] : 0);
-            be_req->oldContextTag = GetCurrentBackEndTag(cl, tag, s);
-            if (!_XReply(dpy, (xReply *) &be_reply, 0, False)) {
-
-                /* The make current failed */
-                UnlockDisplay(dpy);
-                SyncHandle();
-                return (BE_TO_CLIENT_ERROR(dmxLastErrorEvent.error_code));
-            }
-
-            UnlockDisplay(dpy);
-            SyncHandle();
-
-            SetCurrentBackEndTag(cl, tag, s, be_reply.contextTag);
-        }
-        else {
-
-            if (pReadGlxPixmap) {
-                be_read_draw = pReadGlxPixmap->be_xids[s];
-            }
-            else if (pGlxReadPbuffer) {
-                be_read_draw = pGlxReadPbuffer->be_xids[s];
-            }
-#ifdef PANORAMIX
-            else if (pXinReadDraw) {
-                dixLookupWindow(&pReadWin, pXinReadDraw->info[s].id, client,
-                                DixReadAccess);
-            }
-#endif
-            else if (pGlxReadWindow) {
-                pReadWin = (WindowPtr) pGlxReadWindow->pDraw;
-            }
-
-            if (pReadWin && be_read_draw == None) {
-                be_read_draw =
-                    (unsigned int) (DMX_GET_WINDOW_PRIV(pReadWin))->window;
-                if (!be_read_draw) {
-                    /* it might be that the window did not created yet on the */
-                    /* back-end server (lazy window creation option), force   */
-                    /* creation of the window */
-                    dmxCreateAndRealizeWindow(pReadWin, TRUE);
-                    be_read_draw =
-                        (unsigned int) (DMX_GET_WINDOW_PRIV(pReadWin))->window;
-                    dmxSync(dmxScreen, 1);
-                }
-            }
-
-            if (__GLX_IS_VERSION_SUPPORTED(1, 3)) {
-                LockDisplay(dpy);
-                GetReq(GLXMakeContextCurrent, be_new_req);
-                be_new_req->reqType = dmxScreen->glxMajorOpcode;
-                be_new_req->glxCode = X_GLXMakeContextCurrent;
-                be_new_req->drawable = be_draw;
-                be_new_req->readdrawable = be_read_draw;
-                be_new_req->context =
-                    (unsigned int) (glxc ? glxc->real_ids[s - from_screen] : 0);
-                be_new_req->oldContextTag = GetCurrentBackEndTag(cl, tag, s);
-                if (!_XReply(dpy, (xReply *) &be_new_reply, 0, False)) {
-
-                    /* The make current failed */
-                    UnlockDisplay(dpy);
-                    SyncHandle();
-                    return (BE_TO_CLIENT_ERROR(dmxLastErrorEvent.error_code));
-                }
-
-                UnlockDisplay(dpy);
-                SyncHandle();
-
-                SetCurrentBackEndTag(cl, tag, s, be_new_reply.contextTag);
-            }
-            else if (glxIsExtensionSupported("GLX_SGI_make_current_read")) {
-                xGLXMakeCurrentReadSGIReq *ext_req;
-                xGLXVendorPrivateWithReplyReq *vpreq;
-                xGLXMakeCurrentReadSGIReply ext_reply;
-
-                LockDisplay(dpy);
-                GetReqExtra(GLXVendorPrivateWithReply,
-                            sz_xGLXMakeCurrentReadSGIReq -
-                            sz_xGLXVendorPrivateWithReplyReq, vpreq);
-                ext_req = (xGLXMakeCurrentReadSGIReq *) vpreq;
-                ext_req->reqType = dmxScreen->glxMajorOpcode;
-                ext_req->glxCode = X_GLXVendorPrivateWithReply;
-                ext_req->vendorCode = X_GLXvop_MakeCurrentReadSGI;
-                ext_req->drawable = be_draw;
-                ext_req->readable = be_read_draw;
-                ext_req->context =
-                    (unsigned int) (glxc ? glxc->real_ids[s - from_screen] : 0);
-                ext_req->oldContextTag = GetCurrentBackEndTag(cl, tag, s);
-                if (!_XReply(dpy, (xReply *) &ext_reply, 0, False)) {
-
-                    /* The make current failed */
-                    UnlockDisplay(dpy);
-                    SyncHandle();
-                    return (BE_TO_CLIENT_ERROR(dmxLastErrorEvent.error_code));
-                }
-
-                UnlockDisplay(dpy);
-                SyncHandle();
-
-                SetCurrentBackEndTag(cl, tag, s, ext_reply.contextTag);
-
-            }
-            else {
-                return BadMatch;
-            }
-        }
-
-        XFlush(dpy);
-    }
-
-    if (client->swapped) {
-        __glXSwapMakeCurrentReply(client, &new_reply);
-    }
-    else {
-        WriteToClient(client, sz_xGLXMakeContextCurrentReply, &new_reply);
-    }
-
-    return Success;
-}
-
-int
-__glXMakeCurrent(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXMakeCurrentReq *req = (xGLXMakeCurrentReq *) pc;
-
-    return (MakeCurrent(cl, req->drawable, req->drawable,
-                        req->context, req->oldContextTag));
-}
-
-int
-__glXMakeContextCurrent(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXMakeContextCurrentReq *req = (xGLXMakeContextCurrentReq *) pc;
-
-    return (MakeCurrent(cl, req->drawable, req->readdrawable,
-                        req->context, req->oldContextTag));
-}
-
-int
-__glXMakeCurrentReadSGI(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXMakeCurrentReadSGIReq *req = (xGLXMakeCurrentReadSGIReq *) pc;
-
-    return (MakeCurrent(cl, req->drawable, req->readable,
-                        req->context, req->oldContextTag));
-}
-
-int
-__glXIsDirect(__GLXclientState * cl, GLbyte * pc)
-{
-    ClientPtr client = cl->client;
-    xGLXIsDirectReq *req = (xGLXIsDirectReq *) pc;
-    xGLXIsDirectReply reply;
-    __GLXcontext *glxc;
-
-    /*
-     ** Find the GL context.
-     */
-    dixLookupResourceByType((void **) &glxc, req->context, __glXContextRes,
-                            NullClient, DixUnknownAccess);
-    if (!glxc) {
-        client->errorValue = req->context;
-        return __glXBadContext;
-    }
-
-    reply = (xGLXIsDirectReply) {
-        .type = X_Reply,
-        .sequenceNumber = client->sequence,
-        .length = 0,
-        .isDirect = 0
-    };
-
-    if (client->swapped) {
-        __glXSwapIsDirectReply(client, &reply);
-    }
-    else {
-        WriteToClient(client, sz_xGLXIsDirectReply, &reply);
-    }
-
-    return Success;
-}
-
-int
-__glXQueryVersion(__GLXclientState * cl, GLbyte * pc)
-{
-    ClientPtr client = cl->client;
-
-/*    xGLXQueryVersionReq *req = (xGLXQueryVersionReq *) pc; */
-
-    xGLXQueryVersionReply reply = {
-        .type = X_Reply,
-        .sequenceNumber = client->sequence,
-        .length = 0,
-    /*
-     ** Server should take into consideration the version numbers sent by the
-     ** client if it wants to work with older clients; however, in this
-     ** implementation the server just returns its version number.
-     */
-        .majorVersion = __glXVersionMajor,
-        .minorVersion = __glXVersionMinor
-    };
-
-    if (client->swapped) {
-        __glXSwapQueryVersionReply(client, &reply);
-    }
-    else {
-        WriteToClient(client, sz_xGLXQueryVersionReply, &reply);
-    }
-    return Success;
-}
-
-int
-__glXWaitGL(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXWaitGLReq *req = (xGLXWaitGLReq *) pc;
-    xGLXWaitGLReq *be_req = (xGLXWaitGLReq *) pc;
-    int from_screen = 0;
-    int to_screen = 0;
-    int s;
-    __GLXcontext *glxc = NULL;
-
-    if (req->contextTag != 0) {
-        glxc = __glXLookupContextByTag(cl, req->contextTag);
-        if (glxc) {
-            from_screen = to_screen = glxc->pScreen->myNum;
-        }
-    }
-
-#ifdef PANORAMIX
-    if (!noPanoramiXExtension) {
-        from_screen = 0;
-        to_screen = screenInfo.numScreens - 1;
-    }
-#endif
-
-    for (s = from_screen; s <= to_screen; s++) {
-        DMXScreenInfo *dmxScreen = &dmxScreens[s];
-        Display *dpy = GetBackEndDisplay(cl, s);
-
-        LockDisplay(dpy);
-        GetReq(GLXWaitGL, be_req);
-        be_req->reqType = dmxScreen->glxMajorOpcode;
-        be_req->glxCode = X_GLXWaitGL;
-        be_req->contextTag =
-            (glxc ? GetCurrentBackEndTag(cl, req->contextTag, s) : 0);
-        UnlockDisplay(dpy);
-        SyncHandle();
-
-        XSync(dpy, False);
-    }
-
-    return Success;
-}
-
-int
-__glXWaitX(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXWaitXReq *req = (xGLXWaitXReq *) pc;
-    xGLXWaitXReq *be_req;
-    int from_screen = 0;
-    int to_screen = 0;
-    int s;
-    __GLXcontext *glxc = NULL;
-
-    if (req->contextTag != 0) {
-        glxc = __glXLookupContextByTag(cl, req->contextTag);
-        if (glxc) {
-            from_screen = to_screen = glxc->pScreen->myNum;
-        }
-    }
-
-#ifdef PANORAMIX
-    if (!noPanoramiXExtension) {
-        from_screen = 0;
-        to_screen = screenInfo.numScreens - 1;
-    }
-#endif
-
-    for (s = from_screen; s <= to_screen; s++) {
-        DMXScreenInfo *dmxScreen = &dmxScreens[s];
-        Display *dpy = GetBackEndDisplay(cl, s);
-
-        dmxSync(dmxScreen, 1);
-
-        LockDisplay(dpy);
-        GetReq(GLXWaitX, be_req);
-        be_req->reqType = dmxScreen->glxMajorOpcode;
-        be_req->glxCode = X_GLXWaitX;
-        be_req->contextTag =
-            (glxc ? GetCurrentBackEndTag(cl, req->contextTag, s) : 0);
-        UnlockDisplay(dpy);
-        SyncHandle();
-
-        XFlush(dpy);
-    }
-
-    return Success;
-}
-
-int
-__glXCopyContext(__GLXclientState * cl, GLbyte * pc)
-{
-    ClientPtr client = cl->client;
-    xGLXCopyContextReq *be_req;
-    xGLXCopyContextReq *req = (xGLXCopyContextReq *) pc;
-    GLXContextID source = req->source;
-    GLXContextID dest = req->dest;
-    GLXContextTag tag = req->contextTag;
-    unsigned long mask = req->mask;
-    __GLXcontext *src, *dst;
-    int s;
-    int from_screen = 0;
-    int to_screen = 0;
-
-    /*
-     ** Check that each context exists.
-     */
-    dixLookupResourceByType((void **) &src, source, __glXContextRes,
-                            NullClient, DixUnknownAccess);
-    if (!src) {
-        client->errorValue = source;
-        return __glXBadContext;
-    }
-    dixLookupResourceByType((void **) &dst, dest, __glXContextRes,
-                            NullClient, DixUnknownAccess);
-    if (!dst) {
-        client->errorValue = dest;
-        return __glXBadContext;
-    }
-
-    /*
-     ** They must be in the same address space, and same screen.
-     */
-    if (src->pGlxScreen != dst->pGlxScreen) {
-        client->errorValue = source;
-        return BadMatch;
-    }
-
-    /*
-     ** The destination context must not be current for any client.
-     */
-    if (dst->isCurrent) {
-        client->errorValue = dest;
-        return BadAccess;
-    }
-
-    if (tag) {
-        __GLXcontext *tagcx = __glXLookupContextByTag(cl, tag);
-
-        if (!tagcx) {
-            return __glXBadContextTag;
-        }
-        if (tagcx != src) {
-            /*
-             ** This would be caused by a faulty implementation of the client
-             ** library.
-             */
-            return BadMatch;
-        }
-    }
-
-    from_screen = to_screen = src->pScreen->myNum;
-
-#ifdef PANORAMIX
-    if (!noPanoramiXExtension) {
-        from_screen = 0;
-        to_screen = screenInfo.numScreens - 1;
-    }
-#endif
-
-    for (s = from_screen; s <= to_screen; s++) {
-        DMXScreenInfo *dmxScreen = &dmxScreens[s];
-        Display *dpy = GetBackEndDisplay(cl, s);
-
-        LockDisplay(dpy);
-        GetReq(GLXCopyContext, be_req);
-        be_req->reqType = dmxScreen->glxMajorOpcode;
-        be_req->glxCode = X_GLXCopyContext;
-        be_req->source = (unsigned int) src->real_ids[s - from_screen];
-        be_req->dest = (unsigned int) dst->real_ids[s - from_screen];
-        be_req->mask = mask;
-        be_req->contextTag =
-            (tag ? GetCurrentBackEndTag(cl, req->contextTag, s) : 0);
-        UnlockDisplay(dpy);
-        SyncHandle();
-    }
-
-    return Success;
-}
-
-int
-__glXGetVisualConfigs(__GLXclientState * cl, GLbyte * pc)
-{
-    ClientPtr client = cl->client;
-    xGLXGetVisualConfigsReq *req = (xGLXGetVisualConfigsReq *) pc;
-    xGLXGetVisualConfigsReply reply;
-    __GLXscreenInfo *pGlxScreen;
-    __GLXvisualConfig *pGlxVisual;
-    CARD32 buf[__GLX_TOTAL_CONFIG];
-    unsigned int screen;
-    int i, p;
-
-    screen = req->screen;
-    if (screen >= screenInfo.numScreens) {
-        /* The client library must send a valid screen number. */
-        client->errorValue = screen;
-        return BadValue;
-    }
-    pGlxScreen = &__glXActiveScreens[screen];
-
-    reply = (xGLXGetVisualConfigsReply) {
-        .type = X_Reply,
-        .sequenceNumber = client->sequence,
-        .numVisuals = pGlxScreen->numGLXVisuals,
-        .numProps = __GLX_TOTAL_CONFIG,
-        .length = (pGlxScreen->numGLXVisuals * __GLX_SIZE_CARD32 *
-                    __GLX_TOTAL_CONFIG) >> 2
-    };
-
-    WriteToClient(client, sz_xGLXGetVisualConfigsReply, &reply);
-
-    for (i = 0; i < pGlxScreen->numVisuals; i++) {
-        pGlxVisual = &pGlxScreen->pGlxVisual[i];
-        if (!pGlxScreen->isGLXvis[i] || pGlxVisual->vid == 0) {
-            /* not a usable visual */
-            continue;
-        }
-        p = 0;
-        buf[p++] = pGlxVisual->vid;
-        buf[p++] = pGlxVisual->class;
-        buf[p++] = pGlxVisual->rgba;
-
-        buf[p++] = pGlxVisual->redSize;
-        buf[p++] = pGlxVisual->greenSize;
-        buf[p++] = pGlxVisual->blueSize;
-        buf[p++] = pGlxVisual->alphaSize;
-        buf[p++] = pGlxVisual->accumRedSize;
-        buf[p++] = pGlxVisual->accumGreenSize;
-        buf[p++] = pGlxVisual->accumBlueSize;
-        buf[p++] = pGlxVisual->accumAlphaSize;
-
-        buf[p++] = pGlxVisual->doubleBuffer;
-        buf[p++] = pGlxVisual->stereo;
-
-        buf[p++] = pGlxVisual->bufferSize;
-        buf[p++] = pGlxVisual->depthSize;
-        buf[p++] = pGlxVisual->stencilSize;
-        buf[p++] = pGlxVisual->auxBuffers;
-        buf[p++] = pGlxVisual->level;
-        /*
-         ** Add token/value pairs for extensions.
-         */
-        buf[p++] = GLX_VISUAL_CAVEAT_EXT;
-        buf[p++] = pGlxVisual->visualRating;
-        buf[p++] = GLX_TRANSPARENT_TYPE_EXT;
-        buf[p++] = pGlxVisual->transparentPixel;
-        buf[p++] = GLX_TRANSPARENT_RED_VALUE_EXT;
-        buf[p++] = pGlxVisual->transparentRed;
-        buf[p++] = GLX_TRANSPARENT_GREEN_VALUE_EXT;
-        buf[p++] = pGlxVisual->transparentGreen;
-        buf[p++] = GLX_TRANSPARENT_BLUE_VALUE_EXT;
-        buf[p++] = pGlxVisual->transparentBlue;
-        buf[p++] = GLX_TRANSPARENT_ALPHA_VALUE_EXT;
-        buf[p++] = pGlxVisual->transparentAlpha;
-        buf[p++] = GLX_TRANSPARENT_INDEX_VALUE_EXT;
-        buf[p++] = pGlxVisual->transparentIndex;
-        buf[p++] = GLX_SAMPLES_SGIS;
-        buf[p++] = pGlxVisual->multiSampleSize;
-        buf[p++] = GLX_SAMPLE_BUFFERS_SGIS;
-        buf[p++] = pGlxVisual->nMultiSampleBuffers;
-        buf[p++] = GLX_VISUAL_SELECT_GROUP_SGIX;
-        buf[p++] = pGlxVisual->visualSelectGroup;
-
-        WriteToClient(client, __GLX_SIZE_CARD32 * __GLX_TOTAL_CONFIG, buf);
-    }
-    return Success;
-}
-
-/*
-** Create a GLX Pixmap from an X Pixmap.
-*/
-static int
-CreateGLXPixmap(__GLXclientState * cl,
-                VisualID visual, GLXFBConfigID fbconfigId,
-                int screenNum, XID pixmapId, XID glxpixmapId)
-{
-    ClientPtr client = cl->client;
-    xGLXCreateGLXPixmapReq *be_req;
-    xGLXCreatePixmapReq *be_new_req;
-    DrawablePtr pDraw;
-    ScreenPtr pScreen;
-    VisualPtr pVisual;
-    __GLXpixmap *pGlxPixmap;
-    __GLXscreenInfo *pGlxScreen;
-    __GLXvisualConfig *pGlxVisual;
-    __GLXFBConfig *pFBConfig;
-    int i, s, rc;
-    int from_screen, to_screen;
-
-#ifdef PANORAMIX
-    PanoramiXRes *pXinDraw = NULL;
-#endif
-
-    rc = dixLookupDrawable(&pDraw, pixmapId, client, M_DRAWABLE_PIXMAP,
-                           DixAddAccess);
-    if (rc != Success)
-        return rc;
-
-    /*
-     ** Check if screen of visual matches screen of pixmap.
-     */
-    pScreen = pDraw->pScreen;
-    if (screenNum != pScreen->myNum) {
-        return BadMatch;
-    }
-
-    if (fbconfigId == 0 && visual == 0) {
-        return BadValue;
-    }
-
-    if (fbconfigId != None) {
-        pFBConfig = glxLookupFBConfig(fbconfigId);
-        if (!pFBConfig) {
-            client->errorValue = fbconfigId;
-            return BadValue;
-        }
-        visual = pFBConfig->associatedVisualId;
-    }
-    else {
-        pFBConfig = NULL;
-    }
-
-    if (visual != None) {
-        /*
-         ** Find the VisualRec for this visual.
-         */
-        pVisual = pScreen->visuals;
-        for (i = 0; i < pScreen->numVisuals; i++, pVisual++) {
-            if (pVisual->vid == visual) {
-                break;
-            }
-        }
-        if (i == pScreen->numVisuals) {
-            client->errorValue = visual;
-            return BadValue;
-        }
-        /*
-         ** Check if depth of visual matches depth of pixmap.
-         */
-        if (pVisual->nplanes != pDraw->depth) {
-            client->errorValue = visual;
-            return BadMatch;
-        }
-
-        /*
-         ** Get configuration of the visual.
-         */
-        pGlxScreen = &__glXActiveScreens[screenNum];
-        pGlxVisual = pGlxScreen->pGlxVisual;
-        for (i = 0; i < pGlxScreen->numVisuals; i++, pGlxVisual++) {
-            if (pGlxVisual->vid == visual) {
-                break;
-            }
-        }
-        if (i == pGlxScreen->numVisuals) {
-            /*
-             ** Visual not support on this screen by this OpenGL implementation.
-             */
-            client->errorValue = visual;
-            return BadValue;
-        }
-
-        /* find the FBConfig for that visual (if any) */
-        if (pFBConfig == NULL) {
-            pFBConfig = glxLookupFBConfigByVID(visual);
-
-            if (pFBConfig == NULL) {
-                /*
-                 * visual does not have an FBConfig ???
-                 client->errorValue = visual;
-                 return BadValue;
-                 */
-            }
-        }
-    }
-    else {
-        pVisual = NULL;
-        pGlxVisual = NULL;
-        pGlxScreen = &__glXActiveScreens[pDraw->pScreen->myNum];
-    }
-
-    pGlxPixmap = (__GLXpixmap *) malloc(sizeof(__GLXpixmap));
-    if (!pGlxPixmap) {
-        return BadAlloc;
-    }
-    pGlxPixmap->be_xids = xallocarray(screenInfo.numScreens, sizeof(XID));
-    if (!pGlxPixmap->be_xids) {
-        free(pGlxPixmap);
-        return BadAlloc;
-    }
-
-    pGlxPixmap->pDraw = pDraw;
-    pGlxPixmap->pGlxScreen = pGlxScreen;
-    pGlxPixmap->pGlxVisual = pGlxVisual;
-    pGlxPixmap->pFBConfig = pFBConfig;
-    pGlxPixmap->pScreen = pScreen;
-    pGlxPixmap->idExists = True;
-    pGlxPixmap->refcnt = 0;
-
-    /*
-     ** Bump the ref count on the X pixmap so it won't disappear.
-     */
-    ((PixmapPtr) pDraw)->refcnt++;
-
-    /*
-     * send the request to the back-end server(s)
-     */
-    from_screen = to_screen = screenNum;
-#ifdef PANORAMIX
-    if (!noPanoramiXExtension) {
-        from_screen = 0;
-        to_screen = screenInfo.numScreens - 1;
-
-        dixLookupResourceByClass((void **) &pXinDraw,
-                                 pDraw->id, XRC_DRAWABLE,
-                                 client, DixReadAccess);
-    }
-#endif
-
-    for (s = from_screen; s <= to_screen; s++) {
-
-        DMXScreenInfo *dmxScreen = &dmxScreens[s];
-        Display *dpy = GetBackEndDisplay(cl, s);
-        Pixmap be_pixmap;
-        DrawablePtr pRealDraw = pDraw;
-
-#ifdef PANORAMIX
-        if (pXinDraw) {
-            dixLookupDrawable(&pRealDraw, pXinDraw->info[s].id, client, 0,
-                              DixAddAccess);
-        }
-#endif
-
-        be_pixmap = (DMX_GET_PIXMAP_PRIV((PixmapPtr) pRealDraw))->pixmap;
-
-        /* make sure pixmap already created on back-end */
-        dmxSync(dmxScreen, 1);
-
-        if (pFBConfig && __GLX_IS_VERSION_SUPPORTED(1, 3)) {
-            __GLXFBConfig *be_FBConfig =
-                glxLookupBackEndFBConfig(pFBConfig->id, s);
-
-            LockDisplay(dpy);
-            pGlxPixmap->be_xids[s] = XAllocID(dpy);
-            GetReq(GLXCreatePixmap, be_new_req);
-            be_new_req->reqType = dmxScreen->glxMajorOpcode;
-            be_new_req->glxCode = X_GLXCreatePixmap;
-            be_new_req->screen = DefaultScreen(dpy);
-            be_new_req->fbconfig = be_FBConfig->id;
-            be_new_req->pixmap = (unsigned int) be_pixmap;
-            be_new_req->glxpixmap = (unsigned int) pGlxPixmap->be_xids[s];
-            be_new_req->numAttribs = 0;
-            UnlockDisplay(dpy);
-            SyncHandle();
-        }
-        else if (pFBConfig && glxIsExtensionSupported("GLX_SGIX_fbconfig")) {
-            __GLXFBConfig *be_FBConfig =
-                glxLookupBackEndFBConfig(pFBConfig->id, s);
-            xGLXCreateGLXPixmapWithConfigSGIXReq *ext_req;
-            xGLXVendorPrivateReq *vpreq;
-
-            LockDisplay(dpy);
-            pGlxPixmap->be_xids[s] = XAllocID(dpy);
-            GetReqExtra(GLXVendorPrivate,
-                        sz_xGLXCreateGLXPixmapWithConfigSGIXReq -
-                        sz_xGLXVendorPrivateReq, vpreq);
-            ext_req = (xGLXCreateGLXPixmapWithConfigSGIXReq *) vpreq;
-            ext_req->reqType = dmxScreen->glxMajorOpcode;
-            ext_req->glxCode = X_GLXVendorPrivate;
-            ext_req->vendorCode = X_GLXvop_CreateGLXPixmapWithConfigSGIX;
-            ext_req->screen = DefaultScreen(dpy);
-            ext_req->fbconfig = be_FBConfig->id;
-            ext_req->pixmap = (unsigned int) be_pixmap;
-            ext_req->glxpixmap = (unsigned int) pGlxPixmap->be_xids[s];
-            UnlockDisplay(dpy);
-            SyncHandle();
-        }
-        else if (pGlxVisual) {
-            LockDisplay(dpy);
-            pGlxPixmap->be_xids[s] = XAllocID(dpy);
-            GetReq(GLXCreateGLXPixmap, be_req);
-            be_req->reqType = dmxScreen->glxMajorOpcode;
-            be_req->glxCode = X_GLXCreateGLXPixmap;
-            be_req->screen = DefaultScreen(dpy);
-            be_req->visual =
-                (unsigned int) glxMatchGLXVisualInConfigList(pGlxVisual,
-                                                             dmxScreen->
-                                                             glxVisuals,
-                                                             dmxScreen->
-                                                             numGlxVisuals);
-            be_req->pixmap = (unsigned int) be_pixmap;
-            be_req->glxpixmap = (unsigned int) pGlxPixmap->be_xids[s];
-            UnlockDisplay(dpy);
-            SyncHandle();
-        }
-        else {
-            client->errorValue = (visual ? visual : fbconfigId);
-            free(pGlxPixmap->be_xids);
-            free(pGlxPixmap);
-            return BadValue;
-        }
-
-        XFlush(dpy);
-    }
-
-    if (!(AddResource(glxpixmapId, __glXPixmapRes, pGlxPixmap)))
-        return BadAlloc;
-
-    return Success;
-}
-
-int
-__glXCreateGLXPixmap(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXCreateGLXPixmapReq *req = (xGLXCreateGLXPixmapReq *) pc;
-
-    return (CreateGLXPixmap(cl, req->visual, None,
-                            req->screen, req->pixmap, req->glxpixmap));
-}
-
-int
-__glXCreatePixmap(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXCreatePixmapReq *req = (xGLXCreatePixmapReq *) pc;
-
-    return (CreateGLXPixmap(cl, None, req->fbconfig,
-                            req->screen, req->pixmap, req->glxpixmap));
-}
-
-int
-__glXDestroyGLXPixmap(__GLXclientState * cl, GLbyte * pc)
-{
-    ClientPtr client = cl->client;
-    xGLXDestroyGLXPixmapReq *req = (xGLXDestroyGLXPixmapReq *) pc;
-    XID glxpixmap = req->glxpixmap;
-    __GLXpixmap *pGlxPixmap;
-    int s;
-    int from_screen, to_screen;
-
-    /*
-     ** Check if it's a valid GLX pixmap.
-     */
-    dixLookupResourceByType((void **) &pGlxPixmap, glxpixmap,
-                            __glXPixmapRes, NullClient, DixUnknownAccess);
-    if (!pGlxPixmap) {
-        client->errorValue = glxpixmap;
-        return __glXBadPixmap;
-    }
-    FreeResource(glxpixmap, FALSE);
-
-    /*
-     * destroy the pixmap on the back-end server(s).
-     */
-    from_screen = to_screen = pGlxPixmap->pDraw->pScreen->myNum;
-#ifdef PANORAMIX
-    if (!noPanoramiXExtension) {
-        from_screen = 0;
-        to_screen = screenInfo.numScreens - 1;
-    }
-#endif
-
-    for (s = from_screen; s <= to_screen; s++) {
-        DMXScreenInfo *dmxScreen = &dmxScreens[s];
-        Display *dpy = GetBackEndDisplay(cl, s);
-
-        /* make sure pixmap exist in back-end */
-        dmxSync(dmxScreen, 1);
-
-        LockDisplay(dpy);
-        GetReq(GLXDestroyGLXPixmap, req);
-        req->reqType = dmxScreen->glxMajorOpcode;
-        req->glxCode = X_GLXDestroyGLXPixmap;
-        req->glxpixmap = (unsigned int) pGlxPixmap->be_xids[s];
-        UnlockDisplay(dpy);
-        SyncHandle();
-    }
-
-    return Success;
-}
-
-/*****************************************************************************/
-
-/*
-** NOTE: There is no portable implementation for swap buffers as of
-** this time that is of value.  Consequently, this code must be
-** implemented by somebody other than SGI.
-*/
-int
-__glXDoSwapBuffers(__GLXclientState * cl, XID drawId, GLXContextTag tag)
-{
-    ClientPtr client = cl->client;
-    DrawablePtr pDraw;
-    xGLXSwapBuffersReq *be_req;
-    WindowPtr pWin = NULL;
-    __GLXpixmap *pGlxPixmap = NULL;
-    __GLXcontext *glxc = NULL;
-
-#ifdef PANORAMIX
-    PanoramiXRes *pXinDraw = NULL;
-#endif
-    __glXWindow *pGlxWindow = NULL;
-    int from_screen = 0;
-    int to_screen = 0;
-    int s, rc;
-
-    /*
-     ** Check that the GLX drawable is valid.
-     */
-    rc = dixLookupDrawable(&pDraw, drawId, client, 0, DixWriteAccess);
-    if (rc == Success) {
-        from_screen = to_screen = pDraw->pScreen->myNum;
-
-        if (pDraw->type == DRAWABLE_WINDOW) {
-            /*
-             ** Drawable is an X window.
-             */
-            pWin = (WindowPtr) pDraw;
-        }
-        else {
-            /*
-             ** Drawable is an X pixmap, which is not allowed.
-             */
-            client->errorValue = drawId;
-            return __glXBadDrawable;
-        }
-    }
-
-    if (!pDraw) {
-        dixLookupResourceByType((void **) &pGlxPixmap, drawId,
-                                __glXPixmapRes, NullClient, DixUnknownAccess);
-        if (pGlxPixmap) {
-            /*
-             ** Drawable is a GLX pixmap.
-             */
-            pDraw = pGlxPixmap->pDraw;
-            from_screen = to_screen = pGlxPixmap->pScreen->myNum;
-        }
-    }
-
-    if (!pDraw && __GLX_IS_VERSION_SUPPORTED(1, 3)) {
-        dixLookupResourceByType((void **) &pGlxWindow, drawId,
-                                __glXWindowRes, NullClient, DixUnknownAccess);
-        if (pGlxWindow) {
-            /*
-             ** Drawable is a GLXWindow.
-             */
-            pDraw = pGlxWindow->pDraw;
-            from_screen = to_screen = pGlxWindow->pScreen->myNum;
-        }
-    }
-
-    if (!pDraw) {
-        /*
-         ** Drawable is neither a X window nor a GLX pixmap.
-         */
-        client->errorValue = drawId;
-        return __glXBadDrawable;
-    }
-
-    if (tag) {
-        glxc = __glXLookupContextByTag(cl, tag);
-        if (!glxc) {
-            return __glXBadContextTag;
-        }
-    }
-
-#ifdef PANORAMIX
-    if (!noPanoramiXExtension) {
-        from_screen = 0;
-        to_screen = screenInfo.numScreens - 1;
-        dixLookupResourceByClass((void **) &pXinDraw,
-                                 pDraw->id, XRC_DRAWABLE,
-                                 client, DixReadAccess);
-    }
-#endif
-
-    /* If requested, send a glFinish to all back-end servers before swapping. */
-    if (dmxGLXFinishSwap) {
-        for (s = from_screen; s <= to_screen; s++) {
-            Display *dpy = GetBackEndDisplay(cl, s);
-            DMXScreenInfo *dmxScreen = &dmxScreens[s];
-            xGLXSingleReq *finishReq;
-            xGLXSingleReply reply;
-
-#define X_GLXSingle 0           /* needed by GetReq below */
-
-            LockDisplay(dpy);
-            GetReq(GLXSingle, finishReq);
-            finishReq->reqType = dmxScreen->glxMajorOpcode;
-            finishReq->glxCode = X_GLsop_Finish;
-            finishReq->contextTag =
-                (tag ? GetCurrentBackEndTag(cl, tag, s) : 0);
-            (void) _XReply(dpy, (xReply *) &reply, 0, False);
-            UnlockDisplay(dpy);
-            SyncHandle();
-        }
-    }
-
-    /* If requested, send an XSync to all back-end servers before swapping. */
-    if (dmxGLXSyncSwap) {
-        for (s = from_screen; s <= to_screen; s++)
-            XSync(GetBackEndDisplay(cl, s), False);
-    }
-
-    /* send the SwapBuffers request to all back-end servers */
-
-    for (s = from_screen; s <= to_screen; s++) {
-        DMXScreenInfo *dmxScreen = &dmxScreens[s];
-        Display *dpy = GetBackEndDisplay(cl, s);
-        unsigned int be_draw = 0;
-
-        if (pGlxPixmap) {
-            be_draw = (unsigned int) pGlxPixmap->be_xids[s];
-        }
-#ifdef PANORAMIX
-        else if (pXinDraw) {
-            dixLookupWindow(&pWin, pXinDraw->info[s].id, client, DixReadAccess);
-        }
-#endif
-        else if (pGlxWindow) {
-            pWin = (WindowPtr) pGlxWindow->pDraw;
-        }
-
-        if (pWin && !be_draw) {
-            be_draw = (unsigned int) (DMX_GET_WINDOW_PRIV(pWin))->window;
-            if (!be_draw) {
-                /* it might be that the window did not created yet on the */
-                /* back-end server (lazy window creation option), force   */
-                /* creation of the window */
-                dmxCreateAndRealizeWindow(pWin, TRUE);
-                be_draw = (unsigned int) (DMX_GET_WINDOW_PRIV(pWin))->window;
-            }
-        }
-
-        dmxSync(dmxScreen, 1);
-
-        LockDisplay(dpy);
-        GetReq(GLXSwapBuffers, be_req);
-        be_req->reqType = dmxScreen->glxMajorOpcode;
-        be_req->glxCode = X_GLXSwapBuffers;
-        be_req->drawable = be_draw;
-        be_req->contextTag = (tag ? GetCurrentBackEndTag(cl, tag, s) : 0);
-        UnlockDisplay(dpy);
-        SyncHandle();
-        XFlush(dpy);
-    }
-
-    return Success;
-}
-
-int
-__glXSwapBuffers(__GLXclientState * cl, GLbyte * pc)
-{
-    ClientPtr client = cl->client;
-    DrawablePtr pDraw;
-    xGLXSwapBuffersReq *req = (xGLXSwapBuffersReq *) pc;
-    GLXContextTag tag = req->contextTag;
-    XID drawId = req->drawable;
-    __GLXpixmap *pGlxPixmap = NULL;
-    __GLXcontext *glxc = NULL;
-    __glXWindow *pGlxWindow = NULL;
-    int rc;
-
-    /*
-     ** Check that the GLX drawable is valid.
-     */
-    rc = dixLookupDrawable(&pDraw, drawId, client, 0, DixWriteAccess);
-    if (rc == Success) {
-        if (pDraw->type != DRAWABLE_WINDOW) {
-            /*
-             ** Drawable is an X pixmap, which is not allowed.
-             */
-            client->errorValue = drawId;
-            return __glXBadDrawable;
-        }
-    }
-
-    if (!pDraw) {
-        dixLookupResourceByType((void **) &pGlxPixmap, drawId,
-                                __glXPixmapRes, NullClient, DixUnknownAccess);
-        if (pGlxPixmap) {
-            /*
-             ** Drawable is a GLX pixmap.
-             */
-            pDraw = pGlxPixmap->pDraw;
-        }
-    }
-
-    if (!pDraw && __GLX_IS_VERSION_SUPPORTED(1, 3)) {
-        dixLookupResourceByType((void **) &pGlxWindow, drawId,
-                                __glXWindowRes, NullClient, DixUnknownAccess);
-        if (pGlxWindow) {
-            /*
-             ** Drawable is a GLXWindow.
-             */
-            pDraw = pGlxWindow->pDraw;
-        }
-    }
-
-    if (!pDraw) {
-        /*
-         ** Drawable is neither a X window nor a GLX pixmap.
-         */
-        client->errorValue = drawId;
-        return __glXBadDrawable;
-    }
-
-    if (tag) {
-        glxc = __glXLookupContextByTag(cl, tag);
-        if (!glxc) {
-            return __glXBadContextTag;
-        }
-    }
-
-    if (pDraw &&
-        pDraw->type == DRAWABLE_WINDOW &&
-        DMX_GET_WINDOW_PRIV((WindowPtr) pDraw)->swapGroup) {
-        return SGSwapBuffers(cl, drawId, tag, pDraw);
-    }
-
-    return __glXDoSwapBuffers(cl, drawId, tag);
-}
-
-/************************************************************************/
-
-/*
-** Render and Renderlarge are not in the GLX API.  They are used by the GLX
-** client library to send batches of GL rendering commands.
-*/
-
-/*
-** Execute all the drawing commands in a request.
-*/
-int
-__glXRender(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXRenderReq *req;
-    xGLXRenderReq *be_req;
-    int size;
-    __GLXcontext *glxc;
-    int from_screen = 0;
-    int to_screen = 0;
-    int s;
-
-    /*
-     ** NOTE: much of this code also appears in the byteswapping version of this
-     ** routine, __glXSwapRender().  Any changes made here should also be
-     ** duplicated there.
-     */
-
-    req = (xGLXRenderReq *) pc;
-
-    glxc = __glXLookupContextByTag(cl, req->contextTag);
-    if (!glxc) {
-        return 0;
-    }
-    from_screen = to_screen = glxc->pScreen->myNum;
-
-#ifdef PANORAMIX
-    if (!noPanoramiXExtension) {
-        from_screen = 0;
-        to_screen = screenInfo.numScreens - 1;
-    }
-#endif
-
-    pc += sz_xGLXRenderReq;
-    size = (req->length << 2) - sz_xGLXRenderReq;
-
-    /*
-     * just forward the request to back-end server(s)
-     */
-    for (s = from_screen; s <= to_screen; s++) {
-        DMXScreenInfo *dmxScreen = &dmxScreens[s];
-        Display *dpy = GetBackEndDisplay(cl, s);
-
-        LockDisplay(dpy);
-        GetReq(GLXRender, be_req);
-        be_req->reqType = dmxScreen->glxMajorOpcode;
-        be_req->glxCode = X_GLXRender;
-        be_req->length = req->length;
-        be_req->contextTag = GetCurrentBackEndTag(cl, req->contextTag, s);
-        _XSend(dpy, (const char *) pc, size);
-        UnlockDisplay(dpy);
-        SyncHandle();
-    }
-
-    return Success;
-}
-
-/*
-** Execute a large rendering request (one that spans multiple X requests).
-*/
-int
-__glXRenderLarge(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXRenderLargeReq *req;
-    xGLXRenderLargeReq *be_req;
-    __GLXcontext *glxc;
-    int from_screen = 0;
-    int to_screen = 0;
-    int s;
-
-    /*
-     ** NOTE: much of this code also appears in the byteswapping version of this
-     ** routine, __glXSwapRenderLarge().  Any changes made here should also be
-     ** duplicated there.
-     */
-
-    req = (xGLXRenderLargeReq *) pc;
-    glxc = __glXLookupContextByTag(cl, req->contextTag);
-    if (!glxc) {
-        return 0;
-    }
-    from_screen = to_screen = glxc->pScreen->myNum;
-
-#ifdef PANORAMIX
-    if (!noPanoramiXExtension) {
-        from_screen = 0;
-        to_screen = screenInfo.numScreens - 1;
-    }
-#endif
-
-    pc += sz_xGLXRenderLargeReq;
-
-    /*
-     * just forward the request to back-end server(s)
-     */
-    for (s = from_screen; s <= to_screen; s++) {
-        DMXScreenInfo *dmxScreen = &dmxScreens[s];
-        Display *dpy = GetBackEndDisplay(cl, s);
-
-        GetReq(GLXRenderLarge, be_req);
-        be_req->reqType = dmxScreen->glxMajorOpcode;
-        be_req->glxCode = X_GLXRenderLarge;
-        be_req->contextTag = GetCurrentBackEndTag(cl, req->contextTag, s);
-        be_req->length = req->length;
-        be_req->requestNumber = req->requestNumber;
-        be_req->requestTotal = req->requestTotal;
-        be_req->dataBytes = req->dataBytes;
-        Data(dpy, (const char *) pc, req->dataBytes);
-        UnlockDisplay(dpy);
-        SyncHandle();
-
-    }
-
-    return Success;
-}
-
-/************************************************************************/
-
-int
-__glXVendorPrivate(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXVendorPrivateReq *req;
-
-    req = (xGLXVendorPrivateReq *) pc;
-
-    switch (req->vendorCode) {
-
-    case X_GLvop_DeleteTexturesEXT:
-        return __glXVForwardSingleReq(cl, pc);
-        break;
-
-    case X_GLXvop_SwapIntervalSGI:
-        if (glxIsExtensionSupported("SGI_swap_control")) {
-            return __glXVForwardSingleReq(cl, pc);
-        }
-        else {
-            return Success;
-        }
-        break;
-
-#if 0                           /* glx 1.3 */
-    case X_GLXvop_CreateGLXVideoSourceSGIX:
-        break;
-    case X_GLXvop_DestroyGLXVideoSourceSGIX:
-        break;
-    case X_GLXvop_CreateGLXPixmapWithConfigSGIX:
-        break;
-    case X_GLXvop_DestroyGLXPbufferSGIX:
-        break;
-    case X_GLXvop_ChangeDrawableAttributesSGIX:
-        break;
-#endif
-
-    case X_GLXvop_BindSwapBarrierSGIX:
-        return __glXBindSwapBarrierSGIX(cl, pc);
-        break;
-
-    case X_GLXvop_JoinSwapGroupSGIX:
-        return __glXJoinSwapGroupSGIX(cl, pc);
-        break;
-
-    case X_GLXvop_CreateContextWithConfigSGIX:
-        return __glXCreateContextWithConfigSGIX(cl, pc);
-        break;
-
-    default:
-        /*
-         ** unsupported private request
-         */
-        cl->client->errorValue = req->vendorCode;
-        return __glXUnsupportedPrivateRequest;
-    }
-
-    cl->client->errorValue = req->vendorCode;
-    return __glXUnsupportedPrivateRequest;
-
-}
-
-int
-__glXVendorPrivateWithReply(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXVendorPrivateWithReplyReq *req;
-
-    req = (xGLXVendorPrivateWithReplyReq *) pc;
-
-    switch (req->vendorCode) {
-
-    case X_GLvop_GetConvolutionFilterEXT:
-    case X_GLvop_GetConvolutionParameterfvEXT:
-    case X_GLvop_GetConvolutionParameterivEXT:
-    case X_GLvop_GetSeparableFilterEXT:
-    case X_GLvop_GetHistogramEXT:
-    case X_GLvop_GetHistogramParameterivEXT:
-    case X_GLvop_GetMinmaxEXT:
-    case X_GLvop_GetMinmaxParameterfvEXT:
-    case X_GLvop_GetMinmaxParameterivEXT:
-    case X_GLvop_AreTexturesResidentEXT:
-    case X_GLvop_IsTextureEXT:
-        return (__glXVForwardPipe0WithReply(cl, pc));
-        break;
-
-    case X_GLvop_GenTexturesEXT:
-        return (__glXVForwardAllWithReply(cl, pc));
-        break;
-
-#if 0                           /* glx1.3 */
-    case X_GLvop_GetDetailTexFuncSGIS:
-    case X_GLvop_GetSharpenTexFuncSGIS:
-    case X_GLvop_GetColorTableSGI:
-    case X_GLvop_GetColorTableParameterfvSGI:
-    case X_GLvop_GetColorTableParameterivSGI:
-    case X_GLvop_GetTexFilterFuncSGIS:
-    case X_GLvop_GetInstrumentsSGIX:
-    case X_GLvop_InstrumentsBufferSGIX:
-    case X_GLvop_PollInstrumentsSGIX:
-    case X_GLvop_FlushRasterSGIX:
-    case X_GLXvop_CreateGLXPbufferSGIX:
-    case X_GLXvop_GetDrawableAttributesSGIX:
-    case X_GLXvop_QueryHyperpipeNetworkSGIX:
-    case X_GLXvop_QueryHyperpipeConfigSGIX:
-    case X_GLXvop_HyperpipeConfigSGIX:
-    case X_GLXvop_DestroyHyperpipeConfigSGIX:
-#endif
-    case X_GLXvop_QueryMaxSwapBarriersSGIX:
-        return (__glXQueryMaxSwapBarriersSGIX(cl, pc));
-        break;
-
-    case X_GLXvop_GetFBConfigsSGIX:
-        return (__glXGetFBConfigsSGIX(cl, pc));
-        break;
-
-    case X_GLXvop_MakeCurrentReadSGI:
-        return (__glXMakeCurrentReadSGI(cl, pc));
-        break;
-
-    case X_GLXvop_QueryContextInfoEXT:
-        return (__glXQueryContextInfoEXT(cl, pc));
-        break;
-
-    default:
-        /*
-         ** unsupported private request
-         */
-        cl->client->errorValue = req->vendorCode;
-        return __glXUnsupportedPrivateRequest;
-    }
-
-}
-
-int
-__glXQueryExtensionsString(__GLXclientState * cl, GLbyte * pc)
-{
-    ClientPtr client = cl->client;
-    xGLXQueryExtensionsStringReq *req = (xGLXQueryExtensionsStringReq *) pc;
-    xGLXQueryExtensionsStringReply reply;
-    GLint screen;
-    size_t length;
-    int len, numbytes;
-    char *be_buf;
-
-#ifdef FWD_QUERY_REQ
-    xGLXQueryExtensionsStringReq *be_req;
-    xGLXQueryExtensionsStringReply be_reply;
-    DMXScreenInfo *dmxScreen;
-    Display *dpy;
-#endif
-
-    screen = req->screen;
-
-    /*
-     ** Check if screen exists.
-     */
-    if ((screen < 0) || (screen >= screenInfo.numScreens)) {
-        client->errorValue = screen;
-        return BadValue;
-    }
-
-#ifdef FWD_QUERY_REQ
-    dmxScreen = &dmxScreens[screen];
-
-    /* Send the glXQueryServerString request */
-    dpy = GetBackEndDisplay(cl, screen);
-    LockDisplay(dpy);
-    GetReq(GLXQueryExtensionsString, be_req);
-    be_req->reqType = dmxScreen->glxMajorOpcode;
-    be_req->glxCode = X_GLXQueryServerString;
-    be_req->screen = DefaultScreen(dpy);
-    _XReply(dpy, (xReply *) &be_reply, 0, False);
-    len = (int) be_reply.length;
-    numbytes = (int) be_reply.n;
-    be_buf = (char *) malloc(numbytes);
-    if (!be_buf) {
-        /* Throw data on the floor */
-        _XEatDataWords(dpy, len);
-    }
-    else {
-        _XReadPad(dpy, (char *) be_buf, numbytes);
-    }
-    UnlockDisplay(dpy);
-    SyncHandle();
-
-#else
-
-    be_buf = __glXGetServerString(GLX_EXTENSIONS);
-    numbytes = strlen(be_buf) + 1;
-    len = __GLX_PAD(numbytes) >> 2;
-
-#endif
-
-    length = len;
-    reply = (xGLXQueryExtensionsStringReply) {
-        .type = X_Reply,
-        .sequenceNumber = client->sequence,
-        .length = len,
-        .n = numbytes
-    };
-
-    if (client->swapped) {
-        glxSwapQueryExtensionsStringReply(client, &reply, be_buf);
-    }
-    else {
-        WriteToClient(client, sz_xGLXQueryExtensionsStringReply, &reply);
-        WriteToClient(client, (int) (length << 2), be_buf);
-    }
-
-    return Success;
-}
-
-int
-__glXQueryServerString(__GLXclientState * cl, GLbyte * pc)
-{
-    ClientPtr client = cl->client;
-    xGLXQueryServerStringReq *req = (xGLXQueryServerStringReq *) pc;
-    xGLXQueryServerStringReply reply;
-    int name;
-    GLint screen;
-    size_t length;
-    int len, numbytes;
-    char *be_buf;
-
-#ifdef FWD_QUERY_REQ
-    xGLXQueryServerStringReq *be_req;
-    xGLXQueryServerStringReply be_reply;
-    DMXScreenInfo *dmxScreen;
-    Display *dpy;
-#endif
-
-    name = req->name;
-    screen = req->screen;
-    /*
-     ** Check if screen exists.
-     */
-    if ((screen < 0) || (screen >= screenInfo.numScreens)) {
-        client->errorValue = screen;
-        return BadValue;
-    }
-
-#ifdef FWD_QUERY_REQ
-    dmxScreen = &dmxScreens[screen];
-
-    /* Send the glXQueryServerString request */
-    dpy = GetBackEndDisplay(cl, screen);
-    LockDisplay(dpy);
-    GetReq(GLXQueryServerString, be_req);
-    be_req->reqType = dmxScreen->glxMajorOpcode;
-    be_req->glxCode = X_GLXQueryServerString;
-    be_req->screen = DefaultScreen(dpy);
-    be_req->name = name;
-    _XReply(dpy, (xReply *) &be_reply, 0, False);
-    len = (int) be_reply.length;
-    numbytes = (int) be_reply.n;
-    be_buf = (char *) malloc(numbytes);
-    if (!be_buf) {
-        /* Throw data on the floor */
-        _XEatDataWords(dpy, len);
-    }
-    else {
-        _XReadPad(dpy, (char *) be_buf, numbytes);
-    }
-    UnlockDisplay(dpy);
-    SyncHandle();
-
-#else
-    be_buf = __glXGetServerString(name);
-    numbytes = strlen(be_buf) + 1;
-    len = __GLX_PAD(numbytes) >> 2;
-#endif
-
-    length = len;
-    reply = (xGLXQueryServerStringReply) {
-        .type = X_Reply,
-        .sequenceNumber = client->sequence,
-        .length = length,
-        .n = numbytes
-    };
-
-    if (client->swapped) {
-        glxSwapQueryServerStringReply(client, &reply, be_buf);
-    }
-    else {
-        WriteToClient(client, sz_xGLXQueryServerStringReply, &reply);
-        WriteToClient(client, (int) (length << 2), be_buf);
-    }
-
-    return Success;
-}
-
-int
-__glXClientInfo(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXClientInfoReq *req = (xGLXClientInfoReq *) pc;
-    xGLXClientInfoReq *be_req;
-    const char *buf;
-    int from_screen = 0;
-    int to_screen = 0;
-    int s;
-
-    free(cl->GLClientextensions);
-    buf = (const char *) (req + 1);
-    cl->GLClientextensions = strdup(buf);
-
-    to_screen = screenInfo.numScreens - 1;
-
-    for (s = from_screen; s <= to_screen; s++) {
-        DMXScreenInfo *dmxScreen = &dmxScreens[s];
-        Display *dpy = GetBackEndDisplay(cl, s);
-
-        LockDisplay(dpy);
-        GetReq(GLXClientInfo, be_req);
-        be_req->reqType = dmxScreen->glxMajorOpcode;
-        be_req->glxCode = X_GLXClientInfo;
-        be_req->major = req->major;
-        be_req->minor = req->minor;
-        be_req->length = req->length;
-        be_req->numbytes = req->numbytes;
-        Data(dpy, buf, req->numbytes);
-
-        UnlockDisplay(dpy);
-        SyncHandle();
-    }
-
-    return Success;
-}
-
-int
-__glXUseXFont(__GLXclientState * cl, GLbyte * pc)
-{
-    ClientPtr client = cl->client;
-    xGLXUseXFontReq *req;
-    xGLXUseXFontReq *be_req;
-    FontPtr pFont;
-    __GLXcontext *glxc = NULL;
-    int from_screen = 0;
-    int to_screen = 0;
-    int s;
-    dmxFontPrivPtr pFontPriv;
-    DMXScreenInfo *dmxScreen;
-    Display *dpy;
-
-    req = (xGLXUseXFontReq *) pc;
-
-    if (req->contextTag != 0) {
-        glxc = __glXLookupContextByTag(cl, req->contextTag);
-        if (glxc) {
-            from_screen = to_screen = glxc->pScreen->myNum;
-        }
-    }
-
-    /*
-     ** Font can actually be either the ID of a font or the ID of a GC
-     ** containing a font.
-     */
-    dixLookupResourceByType((void **) &pFont, req->font, RT_FONT,
-                            NullClient, DixUnknownAccess);
-    if (!pFont) {
-        GC *pGC;
-
-        dixLookupResourceByType((void **) &pGC, req->font,
-                                RT_GC, NullClient, DixUnknownAccess);
-        if (!pGC) {
-            client->errorValue = req->font;
-            return BadFont;
-        }
-        pFont = pGC->font;
-    }
-
-    pFontPriv = FontGetPrivate(pFont, dmxFontPrivateIndex);
-
-#ifdef PANORAMIX
-    if (!noPanoramiXExtension) {
-        from_screen = 0;
-        to_screen = screenInfo.numScreens - 1;
-    }
-#endif
-
-    for (s = from_screen; s <= to_screen; s++) {
-        dmxScreen = &dmxScreens[s];
-        dpy = GetBackEndDisplay(cl, s);
-
-        dmxSync(dmxScreen, 1);
-
-        LockDisplay(dpy);
-        GetReq(GLXUseXFont, be_req);
-        be_req->reqType = dmxScreen->glxMajorOpcode;
-        be_req->glxCode = X_GLXUseXFont;
-        be_req->contextTag =
-            (glxc ? GetCurrentBackEndTag(cl, req->contextTag, s) : 0);
-        be_req->font = pFontPriv->font[s]->fid;
-        be_req->first = req->first;
-        be_req->count = req->count;
-        be_req->listBase = req->listBase;
-        UnlockDisplay(dpy);
-        SyncHandle();
-
-        XSync(dpy, False);
-    }
-
-    return Success;
-}
-
-/*
- * start GLX 1.3 here
- */
-
-int
-__glXGetFBConfigs(__GLXclientState * cl, GLbyte * pc)
-{
-    ClientPtr client = cl->client;
-    xGLXGetFBConfigsReq *req = (xGLXGetFBConfigsReq *) pc;
-    xGLXGetFBConfigsReply reply;
-    __GLXFBConfig *pFBConfig;
-    CARD32 buf[2 * __GLX_TOTAL_FBCONFIG_PROPS];
-    int numAttribs = __GLX_TOTAL_FBCONFIG_PROPS;
-    unsigned int screen = req->screen;
-    int numFBConfigs, i, p;
-    __GLXscreenInfo *pGlxScreen;
-
-    if (screen >= screenInfo.numScreens) {
-        /* The client library must send a valid screen number. */
-        client->errorValue = screen;
-        return BadValue;
-    }
-
-    pGlxScreen = &__glXActiveScreens[screen];
-    numFBConfigs = __glXNumFBConfigs;
-
-    reply = (xGLXGetFBConfigsReply) {
-        .type = X_Reply,
-        .sequenceNumber = client->sequence,
-        .length = (numFBConfigs * 2 * numAttribs * __GLX_SIZE_CARD32) >> 2,
-        .numFBConfigs = numFBConfigs,
-        .numAttribs = numAttribs
-    };
-
-    if (client->swapped) {
-        __GLX_DECLARE_SWAP_VARIABLES;
-        __GLX_SWAP_SHORT(&reply.sequenceNumber);
-        __GLX_SWAP_INT(&reply.length);
-        __GLX_SWAP_INT(&reply.numFBConfigs);
-        __GLX_SWAP_INT(&reply.numAttribs);
-    }
-    WriteToClient(client, sz_xGLXGetFBConfigsReply, &reply);
-
-    for (i = 0; i < numFBConfigs; i++) {
-        int associatedVisualId = 0;
-        int drawableTypeIndex;
-
-        pFBConfig = __glXFBConfigs[i * (screenInfo.numScreens + 1)];
-
-        p = 0;
-        /* core attributes */
-        buf[p++] = GLX_FBCONFIG_ID;
-        buf[p++] = pFBConfig->id;
-        buf[p++] = GLX_BUFFER_SIZE;
-        buf[p++] = pFBConfig->indexBits;
-        buf[p++] = GLX_LEVEL;
-        buf[p++] = pFBConfig->level;
-        buf[p++] = GLX_DOUBLEBUFFER;
-        buf[p++] = pFBConfig->doubleBufferMode;
-        buf[p++] = GLX_STEREO;
-        buf[p++] = pFBConfig->stereoMode;
-        buf[p++] = GLX_AUX_BUFFERS;
-        buf[p++] = pFBConfig->maxAuxBuffers;
-        buf[p++] = GLX_RED_SIZE;
-        buf[p++] = pFBConfig->redBits;
-        buf[p++] = GLX_GREEN_SIZE;
-        buf[p++] = pFBConfig->greenBits;
-        buf[p++] = GLX_BLUE_SIZE;
-        buf[p++] = pFBConfig->blueBits;
-        buf[p++] = GLX_ALPHA_SIZE;
-        buf[p++] = pFBConfig->alphaBits;
-        buf[p++] = GLX_DEPTH_SIZE;
-        buf[p++] = pFBConfig->depthBits;
-        buf[p++] = GLX_STENCIL_SIZE;
-        buf[p++] = pFBConfig->stencilBits;
-        buf[p++] = GLX_ACCUM_RED_SIZE;
-        buf[p++] = pFBConfig->accumRedBits;
-        buf[p++] = GLX_ACCUM_GREEN_SIZE;
-        buf[p++] = pFBConfig->accumGreenBits;
-        buf[p++] = GLX_ACCUM_BLUE_SIZE;
-        buf[p++] = pFBConfig->accumBlueBits;
-        buf[p++] = GLX_ACCUM_ALPHA_SIZE;
-        buf[p++] = pFBConfig->accumAlphaBits;
-        buf[p++] = GLX_RENDER_TYPE;
-        buf[p++] = pFBConfig->renderType;
-        buf[p++] = GLX_DRAWABLE_TYPE;
-        drawableTypeIndex = p;
-        buf[p++] = pFBConfig->drawableType;
-        buf[p++] = GLX_X_VISUAL_TYPE;
-        buf[p++] = pFBConfig->visualType;
-        buf[p++] = GLX_CONFIG_CAVEAT;
-        buf[p++] = pFBConfig->visualCaveat;
-        buf[p++] = GLX_TRANSPARENT_TYPE;
-        buf[p++] = pFBConfig->transparentType;
-        buf[p++] = GLX_TRANSPARENT_RED_VALUE;
-        buf[p++] = pFBConfig->transparentRed;
-        buf[p++] = GLX_TRANSPARENT_GREEN_VALUE;
-        buf[p++] = pFBConfig->transparentGreen;
-        buf[p++] = GLX_TRANSPARENT_BLUE_VALUE;
-        buf[p++] = pFBConfig->transparentBlue;
-        buf[p++] = GLX_TRANSPARENT_ALPHA_VALUE;
-        buf[p++] = pFBConfig->transparentAlpha;
-        buf[p++] = GLX_TRANSPARENT_INDEX_VALUE;
-        buf[p++] = pFBConfig->transparentIndex;
-        buf[p++] = GLX_MAX_PBUFFER_WIDTH;
-        buf[p++] = pFBConfig->maxPbufferWidth;
-        buf[p++] = GLX_MAX_PBUFFER_HEIGHT;
-        buf[p++] = pFBConfig->maxPbufferHeight;
-        buf[p++] = GLX_MAX_PBUFFER_PIXELS;
-        buf[p++] = pFBConfig->maxPbufferPixels;
-
-        /*
-         * find the visual of the back-end server and match a visual
-         * on the proxy.
-         * do only once - if a visual is not yet associated.
-         */
-        if (pFBConfig->associatedVisualId == (unsigned int) -1) {
-            DMXScreenInfo *dmxScreen = &dmxScreens[screen];
-            __GLXFBConfig *be_pFBConfig =
-                __glXFBConfigs[i * (screenInfo.numScreens + 1) + screen + 1];
-            __GLXvisualConfig *pGlxVisual = NULL;
-            int v;
-            int found = 0;
-
-            for (v = 0; v < dmxScreen->numGlxVisuals; v++) {
-                if (dmxScreen->glxVisuals[v].vid ==
-                    be_pFBConfig->associatedVisualId) {
-                    pGlxVisual = &dmxScreen->glxVisuals[v];
-                    break;
-                }
-            }
-
-            if (pGlxVisual) {
-                for (v = 0; v < pGlxScreen->numVisuals; v++) {
-                    if (glxVisualsMatch(&pGlxScreen->pGlxVisual[v], pGlxVisual)) {
-                        associatedVisualId = pGlxScreen->pGlxVisual[v].vid;
-                        found = 1;
-                        break;
-                    }
-                }
-            }
-
-            if (!found) {
-                associatedVisualId = 0;
-                pFBConfig->drawableType &= ~(GLX_WINDOW_BIT);
-                buf[drawableTypeIndex] = pFBConfig->drawableType;
-            }
-#ifdef PANORAMIX
-            else if (!noPanoramiXExtension) {
-                /* convert the associated visualId to the panoramix one */
-                pFBConfig->associatedVisualId =
-                    PanoramiXTranslateVisualID(screen, v);
-            }
-#endif
-        }
-        else {
-            associatedVisualId = pFBConfig->associatedVisualId;
-        }
-
-        buf[p++] = GLX_VISUAL_ID;
-        buf[p++] = associatedVisualId;
-
-        /* SGIS_multisample attributes */
-        buf[p++] = GLX_SAMPLES_SGIS;
-        buf[p++] = pFBConfig->multiSampleSize;
-        buf[p++] = GLX_SAMPLE_BUFFERS_SGIS;
-        buf[p++] = pFBConfig->nMultiSampleBuffers;
-
-        /* SGIX_pbuffer specific attributes */
-        buf[p++] = GLX_OPTIMAL_PBUFFER_WIDTH_SGIX;
-        buf[p++] = pFBConfig->optimalPbufferWidth;
-        buf[p++] = GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX;
-        buf[p++] = pFBConfig->optimalPbufferHeight;
-
-        buf[p++] = GLX_VISUAL_SELECT_GROUP_SGIX;
-        buf[p++] = pFBConfig->visualSelectGroup;
-
-        if (client->swapped) {
-            __GLX_DECLARE_SWAP_VARIABLES;
-            __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-            __GLX_SWAP_INT_ARRAY((int *) buf, 2 * numAttribs);
-        }
-        WriteToClient(client, 2 * numAttribs * __GLX_SIZE_CARD32, buf);
-    }
-    return Success;
-}
-
-int
-__glXGetFBConfigsSGIX(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXGetFBConfigsSGIXReq *req = (xGLXGetFBConfigsSGIXReq *) pc;
-    xGLXGetFBConfigsReq new_req;
-
-    new_req.reqType = req->reqType;
-    new_req.glxCode = req->glxCode;
-    new_req.length = req->length;
-    new_req.screen = req->screen;
-
-    return (__glXGetFBConfigs(cl, (GLbyte *) &new_req));
-}
-
-int
-__glXCreateWindow(__GLXclientState * cl, GLbyte * pc)
-{
-    ClientPtr client = cl->client;
-    xGLXCreateWindowReq *req = (xGLXCreateWindowReq *) pc;
-    int screen = req->screen;
-    GLXFBConfigID fbconfigId = req->fbconfig;
-    XID windowId = req->window;
-    XID glxwindowId = req->glxwindow;
-    DrawablePtr pDraw;
-    ScreenPtr pScreen;
-    __glXWindow *pGlxWindow;
-    __GLXFBConfig *pGlxFBConfig = NULL;
-    VisualPtr pVisual;
-    VisualID visId;
-    int i, rc;
-    void *val;
-
-    /*
-     ** Check if windowId is valid
-     */
-    rc = dixLookupDrawable(&pDraw, windowId, client, M_DRAWABLE_WINDOW,
-                           DixAddAccess);
-    if (rc != Success)
-        return rc;
-
-    /*
-     ** Check if screen of window matches screen of fbconfig.
-     */
-    pScreen = pDraw->pScreen;
-    if (screen != pScreen->myNum) {
-        return BadMatch;
-    }
-
-    /*
-     ** Find the FBConfigRec for this fbconfigid.
-     */
-    if (!(pGlxFBConfig = glxLookupFBConfig(fbconfigId))) {
-        client->errorValue = fbconfigId;
-        return __glXBadFBConfig;
-    }
-    visId = pGlxFBConfig->associatedVisualId;
-
-    /*
-     ** Check if the fbconfig supports rendering to windows
-     */
-    if (!(pGlxFBConfig->drawableType & GLX_WINDOW_BIT)) {
-        return BadMatch;
-    }
-
-    if (visId != None) {
-        /*
-         ** Check if the visual ID is valid for this screen.
-         */
-        pVisual = pScreen->visuals;
-        for (i = 0; i < pScreen->numVisuals; i++, pVisual++) {
-            if (pVisual->vid == visId) {
-                break;
-            }
-        }
-        if (i == pScreen->numVisuals) {
-            client->errorValue = visId;
-            return BadValue;
-        }
-
-        /*
-         ** Check if color buffer depth of fbconfig matches depth
-         ** of window.
-         */
-        if (pVisual->nplanes != pDraw->depth) {
-            return BadMatch;
-        }
-    }
-    else
-        /*
-         ** The window was created with no visual that corresponds
-         ** to fbconfig
-         */
-        return BadMatch;
-
-    /*
-     ** Check if there is already a fbconfig associated with this window
-     */
-    if (Success == dixLookupResourceByType(&val,
-                                           glxwindowId, __glXWindowRes,
-                                           NullClient, DixUnknownAccess)) {
-        client->errorValue = glxwindowId;
-        return BadAlloc;
-    }
-
-    pGlxWindow = (__glXWindow *) malloc(sizeof(__glXWindow));
-    if (!pGlxWindow) {
-        return BadAlloc;
-    }
-
-    /*
-     ** Register this GLX window as a resource
-     */
-    if (!(AddResource(glxwindowId, __glXWindowRes, pGlxWindow))) {
-        return BadAlloc;
-    }
-
-    pGlxWindow->pDraw = pDraw;
-    pGlxWindow->type = GLX_GLXWINDOW_TYPE;
-    pGlxWindow->idExists = True;
-    pGlxWindow->refcnt = 0;
-    pGlxWindow->pGlxFBConfig = pGlxFBConfig;
-    pGlxWindow->pScreen = pScreen;
-
-    return Success;
-}
-
-int
-__glXDestroyWindow(__GLXclientState * cl, GLbyte * pc)
-{
-    ClientPtr client = cl->client;
-    xGLXDestroyWindowReq *req = (xGLXDestroyWindowReq *) pc;
-    XID glxwindow = req->glxwindow;
-    void *val;
-
-    /*
-     ** Check if it's a valid GLX window.
-     */
-    if (Success != dixLookupResourceByType(&val,
-                                           glxwindow, __glXWindowRes,
-                                           NullClient, DixUnknownAccess)) {
-        client->errorValue = glxwindow;
-        return __glXBadDrawable;
-    }
-    /*
-     ** The glx window destructor will check whether it's current before
-     ** freeing anything.
-     */
-    FreeResource(glxwindow, RT_NONE);
-
-    return Success;
-}
-
-int
-__glXQueryContext(__GLXclientState * cl, GLbyte * pc)
-{
-    ClientPtr client = cl->client;
-    __GLXcontext *ctx;
-    xGLXQueryContextReq *req;
-    xGLXQueryContextReply reply;
-    int nProps;
-    int *sendBuf, *pSendBuf;
-    int nReplyBytes;
-
-    req = (xGLXQueryContextReq *) pc;
-    dixLookupResourceByType((void **) &ctx, req->context, __glXContextRes,
-                            NullClient, DixUnknownAccess);
-    if (!ctx) {
-        client->errorValue = req->context;
-        return __glXBadContext;
-    }
-
-    nProps = 3;
-
-    reply = (xGLXQueryContextReply) {
-        .type = X_Reply,
-        .sequenceNumber = client->sequence,
-        .length = nProps << 1,
-        .n = nProps
-    };
-
-    nReplyBytes = reply.length << 2;
-    sendBuf = (int *) malloc(nReplyBytes);
-    pSendBuf = sendBuf;
-    *pSendBuf++ = GLX_FBCONFIG_ID;
-    *pSendBuf++ = (int) (ctx->pFBConfig->id);
-    *pSendBuf++ = GLX_RENDER_TYPE;
-    *pSendBuf++ = renderTypeBitsToRenderTypeEnum(ctx->pFBConfig->renderType);
-    *pSendBuf++ = GLX_SCREEN;
-    *pSendBuf++ = (int) (ctx->pScreen->myNum);
-
-    if (client->swapped) {
-        __glXSwapQueryContextReply(client, &reply, sendBuf);
-    }
-    else {
-        WriteToClient(client, sz_xGLXQueryContextReply, &reply);
-        WriteToClient(client, nReplyBytes, sendBuf);
-    }
-    free((char *) sendBuf);
-
-    return Success;
-}
-
-int
-__glXQueryContextInfoEXT(__GLXclientState * cl, GLbyte * pc)
-{
-    ClientPtr client = cl->client;
-    __GLXcontext *ctx;
-    xGLXQueryContextInfoEXTReq *req;
-    xGLXQueryContextInfoEXTReply reply;
-    int nProps;
-    int *sendBuf, *pSendBuf;
-    int nReplyBytes;
-
-    req = (xGLXQueryContextInfoEXTReq *) pc;
-    dixLookupResourceByType((void **) &ctx,
-                            req->context, __glXContextRes,
-                            client, DixReadAccess);
-
-    if (!ctx) {
-        client->errorValue = req->context;
-        return __glXBadContext;
-    }
-
-    nProps = 4;
-
-    reply = (xGLXQueryContextInfoEXTReply) {
-        .type = X_Reply,
-        .sequenceNumber = client->sequence,
-        .length = nProps << 1,
-        .n = nProps
-    };
-
-    nReplyBytes = reply.length << 2;
-    sendBuf = (int *) malloc(nReplyBytes);
-    pSendBuf = sendBuf;
-    *pSendBuf++ = GLX_SHARE_CONTEXT_EXT;
-    *pSendBuf++ = (int) (ctx->share_id);
-    *pSendBuf++ = GLX_VISUAL_ID_EXT;
-    *pSendBuf++ = (int) (ctx->pVisual ? ctx->pVisual->vid : 0);
-    *pSendBuf++ = GLX_SCREEN_EXT;
-    *pSendBuf++ = (int) (ctx->pScreen->myNum);
-    *pSendBuf++ = GLX_FBCONFIG_ID;
-    *pSendBuf++ = (int) (ctx->pFBConfig ? ctx->pFBConfig->id : 0);
-
-    if (client->swapped) {
-        __glXSwapQueryContextInfoEXTReply(client, &reply, sendBuf);
-    }
-    else {
-        WriteToClient(client, sz_xGLXQueryContextInfoEXTReply, &reply);
-        WriteToClient(client, nReplyBytes, sendBuf);
-    }
-    free((char *) sendBuf);
-
-    return Success;
-}
-
-int
-__glXCreatePbuffer(__GLXclientState * cl, GLbyte * pc)
-{
-    ClientPtr client = cl->client;
-    xGLXCreatePbufferReq *req = (xGLXCreatePbufferReq *) pc;
-    xGLXCreatePbufferReq *be_req;
-    int screen = req->screen;
-    GLXFBConfigID fbconfigId = req->fbconfig;
-    GLXPbuffer pbuffer = req->pbuffer;
-    __glXPbuffer *pGlxPbuffer;
-    int numAttribs = req->numAttribs;
-    int *attr;
-    ScreenPtr pScreen;
-    __GLXFBConfig *pGlxFBConfig;
-    __GLXFBConfig *be_pGlxFBConfig;
-    XID be_xid;
-    Display *dpy;
-    DMXScreenInfo *dmxScreen;
-    int s;
-    int from_screen, to_screen;
-
-    /*
-     ** Look up screen and FBConfig.
-     */
-    if (screen >= screenInfo.numScreens) {
-        /* The client library must send a valid screen number. */
-        client->errorValue = screen;
-        return BadValue;
-    }
-    pScreen = screenInfo.screens[screen];
-
-    /*
-     ** Find the FBConfigRec for this fbconfigid.
-     */
-    if (!(pGlxFBConfig = glxLookupFBConfig(fbconfigId))) {
-        client->errorValue = fbconfigId;
-        return __glXBadFBConfig;
-    }
-
-    /*
-     ** Create the GLX part of the Pbuffer.
-     */
-    pGlxPbuffer = (__glXPbuffer *) malloc(sizeof(__glXPbuffer));
-    if (!pGlxPbuffer) {
-        return BadAlloc;
-    }
-
-    pGlxPbuffer->be_xids = xallocarray(screenInfo.numScreens, sizeof(XID));
-    if (!pGlxPbuffer->be_xids) {
-        free(pGlxPbuffer);
-        return BadAlloc;
-    }
-
-    /*
-     * Allocate an XID on the back-end server(s) and send him the request
-     */
-    from_screen = to_screen = screen;
-#ifdef PANORAMIX
-    if (!noPanoramiXExtension) {
-        from_screen = 0;
-        to_screen = screenInfo.numScreens - 1;
-    }
-#endif
-
-    for (s = from_screen; s <= to_screen; s++) {
-        dpy = GetBackEndDisplay(cl, s);
-        be_xid = XAllocID(dpy);
-        dmxScreen = &dmxScreens[s];
-        be_pGlxFBConfig = glxLookupBackEndFBConfig(pGlxFBConfig->id, s);
-
-        attr = (int *) (req + 1);
-
-        LockDisplay(dpy);
-        GetReqExtra(GLXCreatePbuffer, 2 * numAttribs * __GLX_SIZE_CARD32,
-                    be_req);
-        be_req->reqType = dmxScreen->glxMajorOpcode;
-        be_req->glxCode = X_GLXCreatePbuffer;
-        be_req->screen = be_pGlxFBConfig->screen;
-        be_req->fbconfig = be_pGlxFBConfig->id;
-        be_req->pbuffer = be_xid;
-        be_req->numAttribs = numAttribs;
-
-        /* Send attributes */
-        if (attr != NULL) {
-            CARD32 *pca = (CARD32 *) (be_req + 1);
-
-            while (numAttribs-- > 0) {
-                *pca++ = *attr++;        /* token */
-                *pca++ = *attr++;        /* value */
-            }
-        }
-
-        UnlockDisplay(dpy);
-        SyncHandle();
-
-        pGlxPbuffer->be_xids[s] = be_xid;
-    }
-
-    pGlxPbuffer->idExists = True;
-    pGlxPbuffer->refcnt = 0;
-    pGlxPbuffer->pFBConfig = pGlxFBConfig;
-    pGlxPbuffer->pScreen = pScreen;
-
-    /*
-     ** Register the resource.
-     */
-    if (!(AddResource(pbuffer, __glXPbufferRes, pGlxPbuffer))) {
-        return BadAlloc;
-    }
-
-    return Success;
-
-}
-
-int
-__glXDestroyPbuffer(__GLXclientState * cl, GLbyte * pc)
-{
-    ClientPtr client = cl->client;
-    xGLXDestroyPbufferReq *req = (xGLXDestroyPbufferReq *) pc;
-    xGLXDestroyPbufferReq *be_req;
-    GLXPbuffer pbuffer = req->pbuffer;
-    Display *dpy;
-    int screen;
-    DMXScreenInfo *dmxScreen;
-    __glXPbuffer *pGlxPbuffer;
-    int s;
-    int from_screen, to_screen;
-
-    /*
-     ** Check if it's a valid Pbuffer
-     */
-    dixLookupResourceByType((void **) &pGlxPbuffer, pbuffer,
-                            __glXPbufferRes, NullClient, DixUnknownAccess);
-    if (!pGlxPbuffer) {
-        client->errorValue = pbuffer;
-        return __glXBadPbuffer;
-    }
-
-    screen = pGlxPbuffer->pScreen->myNum;
-
-    from_screen = to_screen = screen;
-#ifdef PANORAMIX
-    if (!noPanoramiXExtension) {
-        from_screen = 0;
-        to_screen = screenInfo.numScreens - 1;
-    }
-#endif
-
-    for (s = from_screen; s <= to_screen; s++) {
-        dpy = GetBackEndDisplay(cl, s);
-        dmxScreen = &dmxScreens[s];
-
-        /* send the destroy request to the back-end server */
-        LockDisplay(dpy);
-        GetReq(GLXDestroyPbuffer, be_req);
-        be_req->reqType = dmxScreen->glxMajorOpcode;
-        be_req->glxCode = X_GLXDestroyPbuffer;
-        be_req->pbuffer = pGlxPbuffer->be_xids[s];
-        UnlockDisplay(dpy);
-        SyncHandle();
-    }
-
-    FreeResource(pbuffer, RT_NONE);
-
-    return Success;
-}
-
-int
-__glXGetDrawableAttributes(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXGetDrawableAttributesReq *req = (xGLXGetDrawableAttributesReq *) pc;
-    xGLXGetDrawableAttributesReq *be_req;
-    xGLXGetDrawableAttributesReply reply;
-    ClientPtr client = cl->client;
-    GLXDrawable drawId = req->drawable;
-    GLXDrawable be_drawable = 0;
-    DrawablePtr pDraw = NULL;
-    Display *dpy;
-    int screen, rc;
-    DMXScreenInfo *dmxScreen;
-    CARD32 *attribs = NULL;
-    int attribs_size = 0;
-
-#ifdef PANORAMIX
-    PanoramiXRes *pXinDraw = NULL;
-#endif
-
-    if (drawId != None) {
-        rc = dixLookupDrawable(&pDraw, drawId, client, 0, DixGetAttrAccess);
-        if (rc == Success && pDraw->type == DRAWABLE_WINDOW) {
-            WindowPtr pWin = (WindowPtr) pDraw;
-
-            be_drawable = 0;
-            screen = pWin->drawable.pScreen->myNum;
-        }
-        else {
-            /*
-             ** Drawable is not a Window , GLXWindow or a GLXPixmap.
-             */
-            client->errorValue = drawId;
-            return __glXBadDrawable;
-        }
-
-        if (!pDraw) {
-            __GLXpixmap *pGlxPixmap;
-
-            dixLookupResourceByType((void **) &pGlxPixmap,
-                                    drawId, __glXPixmapRes,
-                                    NullClient, DixUnknownAccess);
-            if (pGlxPixmap) {
-                pDraw = pGlxPixmap->pDraw;
-                screen = pGlxPixmap->pScreen->myNum;
-                be_drawable = pGlxPixmap->be_xids[screen];
-            }
-        }
-
-        if (!pDraw) {
-            __glXWindow *pGlxWindow;
-
-            dixLookupResourceByType((void **) &pGlxWindow,
-                                    drawId, __glXWindowRes,
-                                    NullClient, DixUnknownAccess);
-            if (pGlxWindow) {
-                pDraw = pGlxWindow->pDraw;
-                screen = pGlxWindow->pScreen->myNum;
-                be_drawable = 0;
-            }
-        }
-
-        if (!pDraw) {
-            __glXPbuffer *pGlxPbuffer;
-
-            dixLookupResourceByType((void **) &pGlxPbuffer,
-                                    drawId, __glXPbufferRes,
-                                    NullClient, DixUnknownAccess);
-            if (pGlxPbuffer) {
-                pDraw = (DrawablePtr) pGlxPbuffer;
-                screen = pGlxPbuffer->pScreen->myNum;
-                be_drawable = pGlxPbuffer->be_xids[screen];
-            }
-        }
-    }
-
-    if (!pDraw) {
-        /*
-         ** Drawable is not a Window , GLXWindow or a GLXPixmap.
-         */
-        client->errorValue = drawId;
-        return __glXBadDrawable;
-    }
-
-    /* if the drawable is a window or GLXWindow -
-     * we need to find the base id on the back-end server
-     */
-    if (!be_drawable) {
-        WindowPtr pWin = (WindowPtr) pDraw;
-
-#ifdef PANORAMIX
-        if (!noPanoramiXExtension) {
-            if (Success != dixLookupResourceByClass((void **) &pXinDraw,
-                                                    pDraw->id, XRC_DRAWABLE,
-                                                    client, DixReadAccess)) {
-                client->errorValue = drawId;
-                return __glXBadDrawable;
-            }
-
-            dixLookupWindow(&pWin, pXinDraw->info[screen].id, client,
-                            DixReadAccess);
-        }
-#endif
-
-        if (pWin) {
-            be_drawable = (unsigned int) (DMX_GET_WINDOW_PRIV(pWin))->window;
-            if (!be_drawable) {
-                /* it might be that the window did not created yet on the */
-                /* back-end server (lazy window creation option), force   */
-                /* creation of the window */
-                dmxCreateAndRealizeWindow(pWin, TRUE);
-                be_drawable =
-                    (unsigned int) (DMX_GET_WINDOW_PRIV(pWin))->window;
-            }
-        }
-        else {
-            client->errorValue = drawId;
-            return __glXBadDrawable;
-        }
-    }
-
-    /* send the request to the back-end server */
-    dpy = GetBackEndDisplay(cl, screen);
-    dmxScreen = &dmxScreens[screen];
-
-    /* make sure drawable exists on back-end */
-    dmxSync(dmxScreen, 1);
-
-    LockDisplay(dpy);
-    GetReq(GLXGetDrawableAttributes, be_req);
-    be_req->reqType = dmxScreen->glxMajorOpcode;
-    be_req->glxCode = X_GLXGetDrawableAttributes;
-    be_req->drawable = be_drawable;
-    be_req->length = req->length;
-    if (!_XReply(dpy, (xReply *) &reply, 0, False)) {
-        UnlockDisplay(dpy);
-        SyncHandle();
-        return (BE_TO_CLIENT_ERROR(dmxLastErrorEvent.error_code));
-    }
-
-    if (reply.numAttribs) {
-        attribs = xallocarray(reply.numAttribs, 2 * __GLX_SIZE_CARD32);
-        if (attribs == NULL) {
-            UnlockDisplay(dpy);
-            SyncHandle();
-            return BadAlloc;
-        }
-        attribs_size = 2 * reply.numAttribs * __GLX_SIZE_CARD32;
-
-        _XRead(dpy, (char *) attribs, attribs_size);
-    }
-
-    UnlockDisplay(dpy);
-    SyncHandle();
-
-    /* send the reply back to the client */
-    reply.sequenceNumber = client->sequence;
-    if (client->swapped) {
-        __glXSwapGetDrawableAttributesReply(client, &reply, (int *) attribs);
-    }
-    else {
-        WriteToClient(client, sz_xGLXGetDrawableAttributesReply, &reply);
-        WriteToClient(client, attribs_size, attribs);
-    }
-
-    free(attribs);
-
-    return Success;
-}
-
-int
-__glXChangeDrawableAttributes(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXChangeDrawableAttributesReq *req =
-        (xGLXChangeDrawableAttributesReq *) pc;
-    xGLXChangeDrawableAttributesReq *be_req;
-    ClientPtr client = cl->client;
-    GLXDrawable drawId = req->drawable;
-    GLXDrawable be_drawable = 0;
-    DrawablePtr pDraw = NULL;
-    Display *dpy;
-    int screen, rc;
-    DMXScreenInfo *dmxScreen;
-
-    if (drawId != None) {
-        rc = dixLookupDrawable(&pDraw, drawId, client, 0, DixSetAttrAccess);
-        if (rc == Success && pDraw->type == DRAWABLE_WINDOW) {
-            be_drawable = 0;
-            screen = pDraw->pScreen->myNum;
-        }
-        else {
-            /*
-             ** Drawable is not a Window , GLXWindow or a GLXPixmap.
-             */
-            client->errorValue = drawId;
-            return __glXBadDrawable;
-        }
-
-        if (!pDraw) {
-            __GLXpixmap *pGlxPixmap;
-
-            dixLookupResourceByType((void **) &pGlxPixmap,
-                                    drawId, __glXPixmapRes,
-                                    NullClient, DixUnknownAccess);
-            if (pGlxPixmap) {
-                pDraw = pGlxPixmap->pDraw;
-                screen = pGlxPixmap->pScreen->myNum;
-                be_drawable = pGlxPixmap->be_xids[screen];
-            }
-        }
-
-        if (!pDraw) {
-            __glXWindow *pGlxWindow;
-
-            dixLookupResourceByType((void **) &pGlxWindow,
-                                    drawId, __glXWindowRes,
-                                    NullClient, DixUnknownAccess);
-            if (pGlxWindow) {
-                pDraw = pGlxWindow->pDraw;
-                screen = pGlxWindow->pScreen->myNum;
-                be_drawable = 0;
-            }
-        }
-
-        if (!pDraw) {
-            __glXPbuffer *pGlxPbuffer;
-
-            dixLookupResourceByType((void **) &pGlxPbuffer,
-                                    drawId, __glXPbufferRes,
-                                    NullClient, DixUnknownAccess);
-            if (pGlxPbuffer) {
-                pDraw = (DrawablePtr) pGlxPbuffer;
-                screen = pGlxPbuffer->pScreen->myNum;
-                be_drawable = pGlxPbuffer->be_xids[screen];
-            }
-        }
-    }
-
-    if (!pDraw) {
-        /*
-         ** Drawable is not a Window , GLXWindow or a GLXPixmap.
-         */
-        client->errorValue = drawId;
-        return __glXBadDrawable;
-    }
-
-    /* if the drawable is a window or GLXWindow -
-     * we need to find the base id on the back-end server
-     */
-    if (!be_drawable) {
-        WindowPtr pWin = (WindowPtr) pDraw;
-
-#ifdef PANORAMIX
-        if (!noPanoramiXExtension) {
-            PanoramiXRes *pXinDraw;
-
-            if (Success != dixLookupResourceByClass((void **) &pXinDraw,
-                                                    pDraw->id, XRC_DRAWABLE,
-                                                    client, DixReadAccess)) {
-                client->errorValue = drawId;
-                return __glXBadDrawable;
-            }
-
-            dixLookupWindow(&pWin, pXinDraw->info[screen].id, client,
-                            DixReadAccess);
-        }
-#endif
-
-        if (pWin) {
-            be_drawable = (unsigned int) (DMX_GET_WINDOW_PRIV(pWin))->window;
-            if (!be_drawable) {
-                /* it might be that the window did not created yet on the */
-                /* back-end server (lazy window creation option), force   */
-                /* creation of the window */
-                dmxCreateAndRealizeWindow(pWin, TRUE);
-                be_drawable =
-                    (unsigned int) (DMX_GET_WINDOW_PRIV(pWin))->window;
-            }
-        }
-        else {
-            client->errorValue = drawId;
-            return __glXBadDrawable;
-        }
-    }
-
-    /* send the request to the back-end server */
-    dpy = GetBackEndDisplay(cl, screen);
-    dmxScreen = &dmxScreens[screen];
-
-    /* make sure drawable exists on back-end */
-    dmxSync(dmxScreen, 1);
-
-    LockDisplay(dpy);
-    GetReqExtra(GLXChangeDrawableAttributes,
-                2 * req->numAttribs * __GLX_SIZE_CARD32, be_req);
-    be_req->reqType = dmxScreen->glxMajorOpcode;
-    be_req->glxCode = X_GLXChangeDrawableAttributes;
-    be_req->drawable = be_drawable;
-    be_req->numAttribs = req->numAttribs;
-    be_req->length = req->length;
-
-    UnlockDisplay(dpy);
-    SyncHandle();
-
-    return Success;
-}
-
-int
-__glXSendLargeCommand(__GLXclientState * cl, GLXContextTag contextTag)
-{
-    ClientPtr client = cl->client;
-    xGLXRenderLargeReq *req;
-    GLint maxSize, amount;
-    GLint totalRequests, requestNumber;
-    GLint dataLen;
-    GLbyte *data;
-    __GLXcontext *glxc;
-    int s;
-    int from_screen, to_screen;
-
-    maxSize = cl->largeCmdMaxReqDataSize - (GLint) sizeof(xGLXRenderLargeReq);
-    dataLen = cl->largeCmdBytesTotal;
-    totalRequests = (dataLen / maxSize);
-    if (dataLen % maxSize)
-        totalRequests++;
-
-    glxc = __glXLookupContextByTag(cl, contextTag);
-    if (!glxc) {
-        client->errorValue = contextTag;
-        return __glXBadContext;
-    }
-    from_screen = to_screen = glxc->pScreen->myNum;
-
-#ifdef PANORAMIX
-    if (!noPanoramiXExtension) {
-        from_screen = 0;
-        to_screen = screenInfo.numScreens - 1;
-    }
-#endif
-
-    /*
-     ** Send enough requests until the whole array is sent.
-     */
-    requestNumber = 1;
-    data = cl->largeCmdBuf;
-    while (dataLen > 0) {
-        amount = dataLen;
-        if (amount > maxSize) {
-            amount = maxSize;
-        }
-
-        for (s = from_screen; s <= to_screen; s++) {
-
-            Display *dpy = GetBackEndDisplay(cl, s);
-            DMXScreenInfo *dmxScreen = &dmxScreens[s];
-
-            LockDisplay(dpy);
-            GetReq(GLXRenderLarge, req);
-            req->reqType = dmxScreen->glxMajorOpcode;
-            req->glxCode = X_GLXRenderLarge;
-            req->contextTag = GetCurrentBackEndTag(cl, contextTag, s);
-            req->length += (amount + 3) >> 2;
-            req->requestNumber = requestNumber++;
-            req->requestTotal = totalRequests;
-            req->dataBytes = amount;
-            Data(dpy, ((const char *) data), amount);
-            dataLen -= amount;
-            data = ((GLbyte *) data) + amount;
-            UnlockDisplay(dpy);
-            SyncHandle();
-        }
-    }
-
-    return Success;
-}
diff --git a/hw/dmx/glxProxy/glxcmds.h b/hw/dmx/glxProxy/glxcmds.h
deleted file mode 100644
index 689e334..0000000
--- a/hw/dmx/glxProxy/glxcmds.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright 2011 Apple Inc.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#ifndef __GLX_cmds_h__
-#define __GLX_cmds_h__
-
-extern int __glXBindSwapBarrierSGIX(__GLXclientState * cl, GLbyte * pc);
-extern int __glXCreateContextWithConfigSGIX(__GLXclientState * cl, GLbyte * pc);
-extern int __glXJoinSwapGroupSGIX(__GLXclientState * cl, GLbyte * pc);
-extern int __glXMakeCurrentReadSGI(__GLXclientState * cl, GLbyte * pc);
-extern int __glXQueryMaxSwapBarriersSGIX(__GLXclientState * cl, GLbyte * pc);
-extern int __glXDoSwapBuffers(__GLXclientState * cl, XID drawId,
-                              GLXContextTag tag);
-
-extern Display *GetBackEndDisplay(__GLXclientState * cl, int s);
-extern int GetCurrentBackEndTag(__GLXclientState * cl, GLXContextTag tag,
-                                int s);
-
-#endif                          /* !__GLX_cmds_h__ */
diff --git a/hw/dmx/glxProxy/glxcmdsswap.c b/hw/dmx/glxProxy/glxcmdsswap.c
deleted file mode 100644
index 92ca512..0000000
--- a/hw/dmx/glxProxy/glxcmdsswap.c
+++ /dev/null
@@ -1,1157 +0,0 @@
-/*
- * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
- * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice including the dates of first publication and
- * either this permission notice or a reference to
- * http://oss.sgi.com/projects/FreeB/
- * shall be included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of Silicon Graphics, Inc.
- * shall not be used in advertising or otherwise to promote the sale, use or
- * other dealings in this Software without prior written authorization from
- * Silicon Graphics, Inc.
- */
-
-#include "glxserver.h"
-#include "glxutil.h"
-#include <g_disptab.h>
-#include <pixmapstr.h>
-#include <windowstr.h>
-#include "unpack.h"
-#include "glxcmds.h"
-#include "glxext.h"
-#include "glxvendor.h"
-
-int __glXSwapGetFBConfigsSGIX(__GLXclientState * cl, GLbyte * pc);
-
-/************************************************************************/
-
-/*
-** Byteswapping versions of GLX commands.  In most cases they just swap
-** the incoming arguments and then call the unswapped routine.  For commands
-** that have replies, a separate swapping routine for the reply is provided;
-** it is called at the end of the unswapped routine.
-*/
-
-int
-__glXSwapCreateContext(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXCreateContextReq *req = (xGLXCreateContextReq *) pc;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_SHORT(&req->length);
-    __GLX_SWAP_INT(&req->context);
-    __GLX_SWAP_INT(&req->visual);
-    __GLX_SWAP_INT(&req->screen);
-    __GLX_SWAP_INT(&req->shareList);
-
-    return __glXCreateContext(cl, pc);
-}
-
-int
-__glXSwapCreateNewContext(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXCreateNewContextReq *req = (xGLXCreateNewContextReq *) pc;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_SHORT(&req->length);
-    __GLX_SWAP_INT(&req->context);
-    __GLX_SWAP_INT(&req->fbconfig);
-    __GLX_SWAP_INT(&req->screen);
-    __GLX_SWAP_INT(&req->shareList);
-
-    return __glXCreateNewContext(cl, pc);
-}
-
-int
-__glXSwapCreateContextWithConfigSGIX(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXCreateContextWithConfigSGIXReq *req =
-        (xGLXCreateContextWithConfigSGIXReq *) pc;
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_SHORT(&req->length);
-    __GLX_SWAP_INT(&req->context);
-    __GLX_SWAP_INT(&req->fbconfig);
-    __GLX_SWAP_INT(&req->screen);
-    __GLX_SWAP_INT(&req->shareList);
-
-    return __glXCreateContextWithConfigSGIX(cl, pc);
-}
-
-int
-__glXSwapQueryMaxSwapBarriersSGIX(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXQueryMaxSwapBarriersSGIXReq *req =
-        (xGLXQueryMaxSwapBarriersSGIXReq *) pc;
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_SHORT(&req->length);
-    __GLX_SWAP_INT(&req->screen);
-
-    return __glXQueryMaxSwapBarriersSGIX(cl, pc);
-}
-
-int
-__glXSwapBindSwapBarrierSGIX(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXBindSwapBarrierSGIXReq *req = (xGLXBindSwapBarrierSGIXReq *) pc;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_SHORT(&req->length);
-    __GLX_SWAP_INT(&req->drawable);
-    __GLX_SWAP_INT(&req->barrier);
-
-    return __glXBindSwapBarrierSGIX(cl, pc);
-}
-
-int
-__glXSwapJoinSwapGroupSGIX(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXJoinSwapGroupSGIXReq *req = (xGLXJoinSwapGroupSGIXReq *) pc;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_SHORT(&req->length);
-    __GLX_SWAP_INT(&req->drawable);
-    __GLX_SWAP_INT(&req->member);
-
-    return __glXJoinSwapGroupSGIX(cl, pc);
-}
-
-int
-__glXSwapDestroyContext(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXDestroyContextReq *req = (xGLXDestroyContextReq *) pc;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_SHORT(&req->length);
-    __GLX_SWAP_INT(&req->context);
-
-    return __glXDestroyContext(cl, pc);
-}
-
-int
-__glXSwapMakeCurrent(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXMakeCurrentReq *req = (xGLXMakeCurrentReq *) pc;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_SHORT(&req->length);
-    __GLX_SWAP_INT(&req->drawable);
-    __GLX_SWAP_INT(&req->context);
-    __GLX_SWAP_INT(&req->oldContextTag);
-
-    return __glXMakeCurrent(cl, pc);
-}
-
-int
-__glXSwapMakeContextCurrent(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXMakeContextCurrentReq *req = (xGLXMakeContextCurrentReq *) pc;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_SHORT(&req->length);
-    __GLX_SWAP_INT(&req->drawable);
-    __GLX_SWAP_INT(&req->readdrawable);
-    __GLX_SWAP_INT(&req->context);
-    __GLX_SWAP_INT(&req->oldContextTag);
-
-    return __glXMakeContextCurrent(cl, pc);
-}
-
-int
-__glXSwapMakeCurrentReadSGI(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXMakeCurrentReadSGIReq *req = (xGLXMakeCurrentReadSGIReq *) pc;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_SHORT(&req->length);
-    __GLX_SWAP_INT(&req->drawable);
-    __GLX_SWAP_INT(&req->readable);
-    __GLX_SWAP_INT(&req->context);
-    __GLX_SWAP_INT(&req->oldContextTag);
-
-    return __glXMakeCurrentReadSGI(cl, pc);
-}
-
-int
-__glXSwapIsDirect(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXIsDirectReq *req = (xGLXIsDirectReq *) pc;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_SHORT(&req->length);
-    __GLX_SWAP_INT(&req->context);
-
-    return __glXIsDirect(cl, pc);
-}
-
-int
-__glXSwapQueryVersion(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXQueryVersionReq *req = (xGLXQueryVersionReq *) pc;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_SHORT(&req->length);
-    __GLX_SWAP_INT(&req->majorVersion);
-    __GLX_SWAP_INT(&req->minorVersion);
-
-    return __glXQueryVersion(cl, pc);
-}
-
-int
-__glXSwapWaitGL(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXWaitGLReq *req = (xGLXWaitGLReq *) pc;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_SHORT(&req->length);
-    __GLX_SWAP_INT(&req->contextTag);
-
-    return __glXWaitGL(cl, pc);
-}
-
-int
-__glXSwapWaitX(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXWaitXReq *req = (xGLXWaitXReq *) pc;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_SHORT(&req->length);
-    __GLX_SWAP_INT(&req->contextTag);
-
-    return __glXWaitX(cl, pc);
-}
-
-int
-__glXSwapCopyContext(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXCopyContextReq *req = (xGLXCopyContextReq *) pc;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_SHORT(&req->length);
-    __GLX_SWAP_INT(&req->source);
-    __GLX_SWAP_INT(&req->dest);
-    __GLX_SWAP_INT(&req->mask);
-
-    return __glXCopyContext(cl, pc);
-}
-
-int
-__glXSwapGetVisualConfigs(__GLXclientState * cl, GLbyte * pc)
-{
-    ClientPtr client = cl->client;
-    xGLXGetVisualConfigsReq *req = (xGLXGetVisualConfigsReq *) pc;
-    xGLXGetVisualConfigsReply reply;
-    __GLXscreenInfo *pGlxScreen;
-    __GLXvisualConfig *pGlxVisual;
-    CARD32 buf[__GLX_TOTAL_CONFIG];
-    unsigned int screen;
-    int i, p;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_INT(&req->screen);
-    screen = req->screen;
-    if (screen >= screenInfo.numScreens) {
-        /* The client library must send a valid screen number. */
-        client->errorValue = screen;
-        return BadValue;
-    }
-    pGlxScreen = &__glXActiveScreens[screen];
-
-    reply = (xGLXGetVisualConfigsReply) {
-        .type = X_Reply,
-        .sequenceNumber = client->sequence,
-        .length = (pGlxScreen->numGLXVisuals * __GLX_SIZE_CARD32 *
-                   __GLX_TOTAL_CONFIG) >> 2,
-        .numVisuals = pGlxScreen->numGLXVisuals,
-        .numProps = __GLX_TOTAL_CONFIG
-    };
-
-    __GLX_SWAP_SHORT(&reply.sequenceNumber);
-    __GLX_SWAP_INT(&reply.length);
-    __GLX_SWAP_INT(&reply.numVisuals);
-    __GLX_SWAP_INT(&reply.numProps);
-    WriteToClient(client, sz_xGLXGetVisualConfigsReply, &reply);
-
-    for (i = 0; i < pGlxScreen->numVisuals; i++) {
-        pGlxVisual = &pGlxScreen->pGlxVisual[i];
-        if (!pGlxScreen->isGLXvis[i] || pGlxVisual->vid == 0) {
-            /* not a usable visual */
-            continue;
-        }
-        p = 0;
-        buf[p++] = pGlxVisual->vid;
-        buf[p++] = pGlxVisual->class;
-        buf[p++] = pGlxVisual->rgba;
-
-        buf[p++] = pGlxVisual->redSize;
-        buf[p++] = pGlxVisual->greenSize;
-        buf[p++] = pGlxVisual->blueSize;
-        buf[p++] = pGlxVisual->alphaSize;
-        buf[p++] = pGlxVisual->accumRedSize;
-        buf[p++] = pGlxVisual->accumGreenSize;
-        buf[p++] = pGlxVisual->accumBlueSize;
-        buf[p++] = pGlxVisual->accumAlphaSize;
-
-        buf[p++] = pGlxVisual->doubleBuffer;
-        buf[p++] = pGlxVisual->stereo;
-
-        buf[p++] = pGlxVisual->bufferSize;
-        buf[p++] = pGlxVisual->depthSize;
-        buf[p++] = pGlxVisual->stencilSize;
-        buf[p++] = pGlxVisual->auxBuffers;
-        buf[p++] = pGlxVisual->level;
-        /*
-         ** Add token/value pairs for extensions.
-         */
-        buf[p++] = GLX_VISUAL_CAVEAT_EXT;
-        buf[p++] = pGlxVisual->visualRating;
-        buf[p++] = GLX_TRANSPARENT_TYPE_EXT;
-        buf[p++] = pGlxVisual->transparentPixel;
-        buf[p++] = GLX_TRANSPARENT_RED_VALUE_EXT;
-        buf[p++] = pGlxVisual->transparentRed;
-        buf[p++] = GLX_TRANSPARENT_GREEN_VALUE_EXT;
-        buf[p++] = pGlxVisual->transparentGreen;
-        buf[p++] = GLX_TRANSPARENT_BLUE_VALUE_EXT;
-        buf[p++] = pGlxVisual->transparentBlue;
-        buf[p++] = GLX_TRANSPARENT_ALPHA_VALUE_EXT;
-        buf[p++] = pGlxVisual->transparentAlpha;
-        buf[p++] = GLX_TRANSPARENT_INDEX_VALUE_EXT;
-        buf[p++] = pGlxVisual->transparentIndex;
-
-        __GLX_SWAP_INT_ARRAY(buf, __GLX_TOTAL_CONFIG);
-        WriteToClient(client, __GLX_SIZE_CARD32 * __GLX_TOTAL_CONFIG, buf);
-    }
-    return Success;
-}
-
-int
-__glXSwapCreateGLXPixmap(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXCreateGLXPixmapReq *req = (xGLXCreateGLXPixmapReq *) pc;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_SHORT(&req->length);
-    __GLX_SWAP_INT(&req->screen);
-    __GLX_SWAP_INT(&req->visual);
-    __GLX_SWAP_INT(&req->pixmap);
-    __GLX_SWAP_INT(&req->glxpixmap);
-
-    return __glXCreateGLXPixmap(cl, pc);
-}
-
-int
-__glXSwapCreatePixmap(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXCreatePixmapReq *req = (xGLXCreatePixmapReq *) pc;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_SHORT(&req->length);
-    __GLX_SWAP_INT(&req->screen);
-    __GLX_SWAP_INT(&req->fbconfig);
-    __GLX_SWAP_INT(&req->pixmap);
-    __GLX_SWAP_INT(&req->glxpixmap);
-    __GLX_SWAP_INT(&req->numAttribs);
-
-    return __glXCreatePixmap(cl, pc);
-}
-
-int
-__glXSwapDestroyGLXPixmap(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXDestroyGLXPixmapReq *req = (xGLXDestroyGLXPixmapReq *) pc;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_SHORT(&req->length);
-    __GLX_SWAP_INT(&req->glxpixmap);
-
-    return __glXDestroyGLXPixmap(cl, pc);
-}
-
-int
-__glXSwapSwapBuffers(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXSwapBuffersReq *req = (xGLXSwapBuffersReq *) pc;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_SHORT(&req->length);
-    __GLX_SWAP_INT(&req->contextTag);
-    __GLX_SWAP_INT(&req->drawable);
-
-    return __glXSwapBuffers(cl, pc);
-}
-
-int
-__glXSwapUseXFont(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXUseXFontReq *req = (xGLXUseXFontReq *) pc;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_SHORT(&req->length);
-    __GLX_SWAP_INT(&req->contextTag);
-    __GLX_SWAP_INT(&req->font);
-    __GLX_SWAP_INT(&req->first);
-    __GLX_SWAP_INT(&req->count);
-    __GLX_SWAP_INT(&req->listBase);
-
-    return __glXUseXFont(cl, pc);
-}
-
-int
-__glXSwapQueryExtensionsString(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXQueryExtensionsStringReq *req = (xGLXQueryExtensionsStringReq *) pc;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_SHORT(&req->length);
-    __GLX_SWAP_INT(&req->screen);
-
-    return __glXQueryExtensionsString(cl, pc);
-}
-
-int
-__glXSwapQueryServerString(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXQueryServerStringReq *req = (xGLXQueryServerStringReq *) pc;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_SHORT(&req->length);
-    __GLX_SWAP_INT(&req->screen);
-    __GLX_SWAP_INT(&req->name);
-
-    return __glXQueryServerString(cl, pc);
-}
-
-int
-__glXSwapClientInfo(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXClientInfoReq *req = (xGLXClientInfoReq *) pc;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_SHORT(&req->length);
-    __GLX_SWAP_INT(&req->major);
-    __GLX_SWAP_INT(&req->minor);
-    __GLX_SWAP_INT(&req->numbytes);
-
-    return __glXClientInfo(cl, pc);
-}
-
-int
-__glXSwapQueryContextInfoEXT(__GLXclientState * cl, char *pc)
-{
-    xGLXQueryContextInfoEXTReq *req = (xGLXQueryContextInfoEXTReq *) pc;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_SHORT(&req->length);
-    __GLX_SWAP_INT(&req->context);
-
-    return __glXQueryContextInfoEXT(cl, (GLbyte *) pc);
-}
-
-/************************************************************************/
-
-/*
-** Swap replies.
-*/
-
-void
-__glXSwapMakeCurrentReply(ClientPtr client, xGLXMakeCurrentReadSGIReply * reply)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_SWAP_SHORT(&reply->sequenceNumber);
-    __GLX_SWAP_INT(&reply->length);
-    __GLX_SWAP_INT(&reply->contextTag);
-    __GLX_SWAP_INT(&reply->writeVid);
-    __GLX_SWAP_INT(&reply->writeType);
-    __GLX_SWAP_INT(&reply->readVid);
-    __GLX_SWAP_INT(&reply->readType);
-    WriteToClient(client, sz_xGLXMakeCurrentReadSGIReply, reply);
-}
-
-void
-__glXSwapIsDirectReply(ClientPtr client, xGLXIsDirectReply * reply)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_SWAP_SHORT(&reply->sequenceNumber);
-    __GLX_SWAP_INT(&reply->length);
-    WriteToClient(client, sz_xGLXIsDirectReply, reply);
-}
-
-void
-__glXSwapQueryVersionReply(ClientPtr client, xGLXQueryVersionReply * reply)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_SWAP_SHORT(&reply->sequenceNumber);
-    __GLX_SWAP_INT(&reply->length);
-    __GLX_SWAP_INT(&reply->majorVersion);
-    __GLX_SWAP_INT(&reply->minorVersion);
-    WriteToClient(client, sz_xGLXQueryVersionReply, reply);
-}
-
-void
-glxSwapQueryExtensionsStringReply(ClientPtr client,
-                                  xGLXQueryExtensionsStringReply * reply,
-                                  char *buf)
-{
-    int length = reply->length;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-    __GLX_SWAP_SHORT(&reply->sequenceNumber);
-    __GLX_SWAP_INT(&reply->length);
-    __GLX_SWAP_INT(&reply->n);
-    WriteToClient(client, sz_xGLXQueryExtensionsStringReply, reply);
-    __GLX_SWAP_INT_ARRAY((int *) buf, length);
-    WriteToClient(client, length << 2, buf);
-}
-
-void
-glxSwapQueryServerStringReply(ClientPtr client,
-                              xGLXQueryServerStringReply * reply, char *buf)
-{
-    int length = reply->length;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_SWAP_SHORT(&reply->sequenceNumber);
-    __GLX_SWAP_INT(&reply->length);
-    __GLX_SWAP_INT(&reply->n);
-    WriteToClient(client, sz_xGLXQueryServerStringReply, reply);
-    /** no swap is needed for an array of chars **/
-    /* __GLX_SWAP_INT_ARRAY((int *)buf, length); */
-    WriteToClient(client, length << 2, buf);
-}
-
-void
-__glXSwapQueryContextInfoEXTReply(ClientPtr client,
-                                  xGLXQueryContextInfoEXTReply * reply,
-                                  int *buf)
-{
-    int length = reply->length;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-    __GLX_SWAP_SHORT(&reply->sequenceNumber);
-    __GLX_SWAP_INT(&reply->length);
-    __GLX_SWAP_INT(&reply->n);
-    WriteToClient(client, sz_xGLXQueryContextInfoEXTReply, reply);
-    __GLX_SWAP_INT_ARRAY((int *) buf, length);
-    WriteToClient(client, length << 2, buf);
-}
-
-void
-__glXSwapQueryContextReply(ClientPtr client,
-                           xGLXQueryContextReply * reply, int *buf)
-{
-    int length = reply->length;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-    __GLX_SWAP_SHORT(&reply->sequenceNumber);
-    __GLX_SWAP_INT(&reply->length);
-    __GLX_SWAP_INT(&reply->n);
-    WriteToClient(client, sz_xGLXQueryContextReply, reply);
-    __GLX_SWAP_INT_ARRAY((int *) buf, length);
-    WriteToClient(client, length << 2, buf);
-}
-
-void
-__glXSwapGetDrawableAttributesReply(ClientPtr client,
-                                    xGLXGetDrawableAttributesReply * reply,
-                                    int *buf)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-    __GLX_SWAP_SHORT(&reply->sequenceNumber);
-    __GLX_SWAP_INT(&reply->length);
-    __GLX_SWAP_INT(&reply->numAttribs);
-    __GLX_SWAP_INT_ARRAY(buf, reply->length);
-    WriteToClient(client, sz_xGLXGetDrawableAttributesReply, reply);
-    WriteToClient(client, reply->length << 2, buf);
-}
-
-void
-__glXSwapQueryMaxSwapBarriersSGIXReply(ClientPtr client,
-                                       xGLXQueryMaxSwapBarriersSGIXReply *
-                                       reply)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_SWAP_SHORT(&reply->sequenceNumber);
-    __GLX_SWAP_INT(&reply->length);
-    __GLX_SWAP_INT(&reply->max);
-    WriteToClient(client, sz_xGLXQueryMaxSwapBarriersSGIXReply, reply);
-}
-
-/************************************************************************/
-
-/*
-** Render and Renderlarge are not in the GLX API.  They are used by the GLX
-** client library to send batches of GL rendering commands.
-*/
-
-int
-__glXSwapRender(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXRenderReq *req;
-    int left;
-    __GLXrenderHeader *hdr;
-    ClientPtr client = cl->client;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    /*
-     ** NOTE: much of this code also appears in the nonswapping version of this
-     ** routine, __glXRender().  Any changes made here should also be
-     ** duplicated there.
-     */
-
-    req = (xGLXRenderReq *) pc;
-    __GLX_SWAP_SHORT(&req->length);
-    __GLX_SWAP_INT(&req->contextTag);
-
-    pc += sz_xGLXRenderReq;
-    left = (req->length << 2) - sz_xGLXRenderReq;
-    while (left > 0) {
-        void (*proc) (GLbyte *);
-        CARD16 opcode;
-
-        /*
-         ** Verify that the header length and the overall length agree.
-         ** Also, each command must be word aligned.
-         */
-        hdr = (__GLXrenderHeader *) pc;
-        __GLX_SWAP_SHORT(&hdr->length);
-        __GLX_SWAP_SHORT(&hdr->opcode);
-
-        /*
-         * call the command procedure to swap any arguments
-         */
-        opcode = hdr->opcode;
-        if ((opcode >= __GLX_MIN_RENDER_OPCODE) &&
-            (opcode <= __GLX_MAX_RENDER_OPCODE)) {
-            proc = __glXSwapRenderTable[opcode];
-#if __GLX_MAX_RENDER_OPCODE_EXT > __GLX_MIN_RENDER_OPCODE_EXT
-        }
-        else if ((opcode >= __GLX_MIN_RENDER_OPCODE_EXT) &&
-                 (opcode <= __GLX_MAX_RENDER_OPCODE_EXT)) {
-            int index = opcode - __GLX_MIN_RENDER_OPCODE_EXT;
-            __GLXRenderSwapInfo *info = &__glXSwapRenderTable_EXT[index];
-
-            if (info->swapfunc) {
-                proc = info->swapfunc;
-            }
-            else {
-                proc = NULL;
-                if (info->elem_size == 4 && info->nelems > 0) {
-                    __GLX_SWAP_INT_ARRAY((int *) (pc + __GLX_RENDER_HDR_SIZE),
-                                         info->nelems);
-                }
-                else if (info->elem_size == 2 && info->nelems > 0) {
-                    __GLX_SWAP_SHORT_ARRAY((short *) (pc +
-                                                      __GLX_RENDER_HDR_SIZE),
-                                           info->nelems);
-                }
-                else if (info->elem_size == 8 && info->nelems > 0) {
-                    __GLX_SWAP_DOUBLE_ARRAY((double *) (pc +
-                                                        __GLX_RENDER_HDR_SIZE),
-                                            info->nelems);
-                }
-            }
-#endif                          /* __GLX_MAX_RENDER_OPCODE_EXT > __GLX_MIN_RENDER_OPCODE_EXT */
-        }
-        else {
-            client->errorValue = 0;
-            return __glXBadRenderRequest;
-        }
-
-        if (proc != NULL)
-            (*proc) (pc + __GLX_RENDER_HDR_SIZE);
-
-        /*
-         * proceed to the next command
-         */
-        pc += hdr->length;
-        left -= hdr->length;
-    }
-
-    return __glXRender(cl, (GLbyte *) req);
-}
-
-/*
-** Execute a large rendering request (one that spans multiple X requests).
-*/
-int
-__glXSwapRenderLarge(__GLXclientState * cl, GLbyte * pc)
-{
-    ClientPtr client = cl->client;
-    xGLXRenderLargeReq *req;
-    __GLXrenderLargeHeader *hdr;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    req = (xGLXRenderLargeReq *) pc;
-    __GLX_SWAP_SHORT(&req->length);
-    __GLX_SWAP_INT(&req->contextTag);
-    __GLX_SWAP_INT(&req->dataBytes);
-    __GLX_SWAP_SHORT(&req->requestNumber);
-    __GLX_SWAP_SHORT(&req->requestTotal);
-
-    pc += sz_xGLXRenderLargeReq;
-
-    if (req->requestNumber == 1) {
-        void (*proc) (GLbyte *) = NULL;
-        __GLXRenderSwapInfo *info = NULL;
-        CARD16 opcode;
-
-        hdr = (__GLXrenderLargeHeader *) pc;
-        __GLX_SWAP_INT(&hdr->length);
-        __GLX_SWAP_INT(&hdr->opcode);
-
-        /*
-         * call the command procedure to swap any arguments
-         * Note that we are assuming that all arguments that needs to be
-         * swaped are on the first req only !
-         */
-        opcode = hdr->opcode;
-        if ((opcode >= __GLX_MIN_RENDER_OPCODE) &&
-            (opcode <= __GLX_MAX_RENDER_OPCODE)) {
-            proc = __glXSwapRenderTable[opcode];
-#if __GLX_MAX_RENDER_OPCODE_EXT > __GLX_MIN_RENDER_OPCODE_EXT
-        }
-        else if ((opcode >= __GLX_MIN_RENDER_OPCODE_EXT) &&
-                 (opcode <= __GLX_MAX_RENDER_OPCODE_EXT)) {
-            int index = opcode - __GLX_MIN_RENDER_OPCODE_EXT;
-
-            info = &__glXSwapRenderTable_EXT[index];
-            if (info->swapfunc) {
-                proc = info->swapfunc;
-            }
-#endif                          /* __GLX_MAX_RENDER_OPCODE_EXT > __GLX_MIN_RENDER_OPCODE_EXT */
-        }
-        else {
-            client->errorValue = 0;
-            cl->largeCmdRequestsTotal = 0;
-            return __glXBadLargeRequest;
-        }
-
-        /*
-         ** Make enough space in the buffer, then copy the entire request.
-         */
-        if (cl->largeCmdBufSize < hdr->length) {
-            if (!cl->largeCmdBuf) {
-                cl->largeCmdBuf = (GLbyte *) malloc(hdr->length);
-            }
-            else {
-                cl->largeCmdBuf =
-                    (GLbyte *) realloc(cl->largeCmdBuf, hdr->length);
-            }
-            if (!cl->largeCmdBuf) {
-                cl->largeCmdRequestsTotal = 0;
-                return BadAlloc;
-            }
-            cl->largeCmdBufSize = hdr->length;
-        }
-        memcpy(cl->largeCmdBuf, pc, req->dataBytes);
-
-        cl->largeCmdBytesSoFar = req->dataBytes;
-        cl->largeCmdBytesTotal = hdr->length;
-        cl->largeCmdRequestsSoFar = 1;
-        cl->largeCmdRequestsTotal = req->requestTotal;
-        cl->largeCmdRequestsSwapProc = proc;
-        cl->largeCmdMaxReqDataSize = req->dataBytes;
-        cl->largeCmdRequestsSwap_info = info;
-
-        return Success;
-
-    }
-    else if (req->requestNumber < cl->largeCmdRequestsTotal) {
-        /*
-         * This is not the first nor last request - just copy the data
-         */
-        if (cl->largeCmdBytesSoFar + req->dataBytes > cl->largeCmdBytesTotal) {
-            cl->largeCmdRequestsTotal = 0;
-            return __glXBadLargeRequest;
-        }
-
-        memcpy(cl->largeCmdBuf + cl->largeCmdBytesSoFar, pc, req->dataBytes);
-
-        cl->largeCmdBytesSoFar += req->dataBytes;
-
-        if (req->dataBytes > cl->largeCmdMaxReqDataSize)
-            cl->largeCmdMaxReqDataSize = req->dataBytes;
-
-        return Success;
-    }
-    else if (req->requestNumber == cl->largeCmdRequestsTotal) {
-        /*
-         * this is the last request
-         * copy the remainder bytes, call the procedure to swap any
-         * needed data, and then call to transfer the command to all
-         * back-end servers
-         */
-        if (cl->largeCmdBytesSoFar + req->dataBytes > cl->largeCmdBytesTotal) {
-            cl->largeCmdRequestsTotal = 0;
-            return __glXBadLargeRequest;
-        }
-
-        memcpy(cl->largeCmdBuf + cl->largeCmdBytesSoFar, pc, req->dataBytes);
-
-        cl->largeCmdBytesSoFar += req->dataBytes;
-
-        if (req->dataBytes > cl->largeCmdMaxReqDataSize)
-            cl->largeCmdMaxReqDataSize = req->dataBytes;
-
-        if (cl->largeCmdRequestsSwapProc != NULL) {
-            (*cl->largeCmdRequestsSwapProc) (cl->largeCmdBuf +
-                                             __GLX_RENDER_LARGE_HDR_SIZE);
-        }
-        else if (cl->largeCmdRequestsSwap_info &&
-                 cl->largeCmdRequestsSwap_info->nelems > 0) {
-            if (cl->largeCmdRequestsSwap_info->elem_size == 4) {
-                __GLX_SWAP_INT_ARRAY((int *) (pc + __GLX_RENDER_LARGE_HDR_SIZE),
-                                     cl->largeCmdRequestsSwap_info->nelems);
-            }
-            else if (cl->largeCmdRequestsSwap_info->elem_size == 2) {
-                __GLX_SWAP_SHORT_ARRAY((short *) (pc +
-                                                  __GLX_RENDER_LARGE_HDR_SIZE),
-                                       cl->largeCmdRequestsSwap_info->nelems);
-            }
-            else if (cl->largeCmdRequestsSwap_info->elem_size == 8) {
-                __GLX_SWAP_DOUBLE_ARRAY((double *) (pc +
-                                                    __GLX_RENDER_LARGE_HDR_SIZE),
-                                        cl->largeCmdRequestsSwap_info->nelems);
-            }
-        }
-
-        cl->largeCmdRequestsTotal = 0;
-        return (__glXSendLargeCommand(cl, req->contextTag));
-
-    }
-    else {
-        cl->largeCmdRequestsTotal = 0;
-        return __glXBadLargeRequest;
-    }
-
-}
-
-/************************************************************************/
-
-/*
-** No support is provided for the vendor-private requests other than
-** allocating these entry points in the dispatch table.
-*/
-
-int
-__glXSwapVendorPrivate(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXVendorPrivateReq *req;
-    CARD32 vendorCode;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    req = (xGLXVendorPrivateReq *) pc;
-    vendorCode = req->vendorCode;
-    __GLX_SWAP_INT(&vendorCode);
-
-    switch (vendorCode) {
-
-    case X_GLvop_DeleteTexturesEXT:
-        return __glXVForwardSingleReqSwap(cl, pc);
-        break;
-
-    case X_GLXvop_SwapIntervalSGI:
-        if (glxIsExtensionSupported("SGI_swap_control")) {
-            return __glXVForwardSingleReqSwap(cl, pc);
-        }
-        else {
-            return Success;
-        }
-        break;
-
-#if 0                           /* glx 1.3 */
-    case X_GLXvop_CreateGLXVideoSourceSGIX:
-        break;
-    case X_GLXvop_DestroyGLXVideoSourceSGIX:
-        break;
-    case X_GLXvop_CreateGLXPixmapWithConfigSGIX:
-        break;
-    case X_GLXvop_DestroyGLXPbufferSGIX:
-        break;
-    case X_GLXvop_ChangeDrawableAttributesSGIX:
-        break;
-#endif
-
-    case X_GLXvop_JoinSwapGroupSGIX:
-        return __glXSwapJoinSwapGroupSGIX(cl, pc);
-        break;
-
-    case X_GLXvop_BindSwapBarrierSGIX:
-        return __glXSwapBindSwapBarrierSGIX(cl, pc);
-        break;
-
-    case X_GLXvop_CreateContextWithConfigSGIX:
-        return __glXSwapCreateContextWithConfigSGIX(cl, pc);
-        break;
-
-    default:
-        /*
-         ** unsupported private request
-         */
-        cl->client->errorValue = req->vendorCode;
-        return __glXUnsupportedPrivateRequest;
-    }
-
-}
-
-int
-__glXSwapVendorPrivateWithReply(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXVendorPrivateWithReplyReq *req;
-    CARD32 vendorCode;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    req = (xGLXVendorPrivateWithReplyReq *) pc;
-    vendorCode = req->vendorCode;
-    __GLX_SWAP_INT(&vendorCode);
-
-    switch (vendorCode) {
-
-    case X_GLvop_GetConvolutionFilterEXT:
-    case X_GLvop_GetSeparableFilterEXT:
-    case X_GLvop_GetHistogramEXT:
-    case X_GLvop_GetMinmaxEXT:
-        return (__glXNoSuchSingleOpcode(cl, pc));
-        break;
-
-    case X_GLvop_GetConvolutionParameterfvEXT:
-    case X_GLvop_GetConvolutionParameterivEXT:
-    case X_GLvop_GetHistogramParameterivEXT:
-    case X_GLvop_GetMinmaxParameterfvEXT:
-    case X_GLvop_GetMinmaxParameterivEXT:
-    case X_GLvop_GenTexturesEXT:
-        return (__glXVForwardAllWithReplySwapiv(cl, pc));
-        break;
-
-    case X_GLvop_AreTexturesResidentEXT:
-    case X_GLvop_IsTextureEXT:
-        return (__glXVForwardPipe0WithReplySwap(cl, pc));
-        break;
-
-#if 0                           /* glx1.3 */
-    case X_GLvop_GetDetailTexFuncSGIS:
-    case X_GLvop_GetSharpenTexFuncSGIS:
-    case X_GLvop_GetColorTableSGI:
-    case X_GLvop_GetColorTableParameterfvSGI:
-    case X_GLvop_GetColorTableParameterivSGI:
-    case X_GLvop_GetTexFilterFuncSGIS:
-    case X_GLvop_GetInstrumentsSGIX:
-    case X_GLvop_InstrumentsBufferSGIX:
-    case X_GLvop_PollInstrumentsSGIX:
-    case X_GLvop_FlushRasterSGIX:
-    case X_GLXvop_CreateGLXPbufferSGIX:
-    case X_GLXvop_GetDrawableAttributesSGIX:
-    case X_GLXvop_QueryHyperpipeNetworkSGIX:
-    case X_GLXvop_QueryHyperpipeConfigSGIX:
-    case X_GLXvop_HyperpipeConfigSGIX:
-    case X_GLXvop_DestroyHyperpipeConfigSGIX:
-#endif
-    case X_GLXvop_QueryMaxSwapBarriersSGIX:
-        return (__glXSwapQueryMaxSwapBarriersSGIX(cl, pc));
-        break;
-
-    case X_GLXvop_GetFBConfigsSGIX:
-        return (__glXSwapGetFBConfigsSGIX(cl, pc));
-        break;
-
-    case X_GLXvop_MakeCurrentReadSGI:
-        return (__glXSwapMakeCurrentReadSGI(cl, pc));
-        break;
-
-    case X_GLXvop_QueryContextInfoEXT:
-        return (__glXSwapQueryContextInfoEXT(cl, (char *) pc));
-        break;
-
-    default:
-        /*
-         ** unsupported private request
-         */
-        cl->client->errorValue = req->vendorCode;
-        return __glXUnsupportedPrivateRequest;
-    }
-
-}
-
-int
-__glXSwapGetFBConfigs(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXGetFBConfigsReq *req = (xGLXGetFBConfigsReq *) pc;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_SHORT(&req->length);
-    __GLX_SWAP_INT(&req->screen);
-
-    return __glXGetFBConfigs(cl, pc);
-}
-
-int
-__glXSwapGetFBConfigsSGIX(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXGetFBConfigsSGIXReq *req = (xGLXGetFBConfigsSGIXReq *) pc;
-    xGLXGetFBConfigsReq new_req;
-
-    new_req.reqType = req->reqType;
-    new_req.glxCode = req->glxCode;
-    new_req.length = req->length;
-    new_req.screen = req->screen;
-
-    return (__glXSwapGetFBConfigs(cl, (GLbyte *) &new_req));
-}
-
-int
-__glXSwapCreateWindow(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXCreateWindowReq *req = (xGLXCreateWindowReq *) pc;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_SHORT(&req->length);
-    __GLX_SWAP_INT(&req->screen);
-    __GLX_SWAP_INT(&req->fbconfig);
-    __GLX_SWAP_INT(&req->window);
-    __GLX_SWAP_INT(&req->glxwindow);
-    __GLX_SWAP_INT(&req->numAttribs);
-
-    return (__glXCreateWindow(cl, (GLbyte *) pc));
-}
-
-int
-__glXSwapDestroyWindow(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXDestroyWindowReq *req = (xGLXDestroyWindowReq *) pc;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_SHORT(&req->length);
-    __GLX_SWAP_INT(&req->glxwindow);
-
-    return (__glXDestroyWindow(cl, (GLbyte *) pc));
-}
-
-int
-__glXSwapQueryContext(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXQueryContextReq *req = (xGLXQueryContextReq *) pc;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_SHORT(&req->length);
-    __GLX_SWAP_INT(&req->context);
-
-    return (__glXQueryContext(cl, (GLbyte *) pc));
-
-}
-
-int
-__glXSwapCreatePbuffer(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXCreatePbufferReq *req = (xGLXCreatePbufferReq *) pc;
-    int nattr = req->numAttribs;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_SHORT(&req->length);
-    __GLX_SWAP_INT(&req->screen);
-    __GLX_SWAP_INT(&req->fbconfig);
-    __GLX_SWAP_INT(&req->pbuffer);
-    __GLX_SWAP_INT(&req->numAttribs);
-    __GLX_SWAP_INT_ARRAY((int *) (req + 1), nattr * 2);
-
-    return (__glXCreatePbuffer(cl, pc));
-}
-
-int
-__glXSwapDestroyPbuffer(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXDestroyPbufferReq *req = (xGLXDestroyPbufferReq *) pc;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_SHORT(&req->length);
-    __GLX_SWAP_INT(&req->pbuffer);
-
-    return (__glXDestroyPbuffer(cl, (GLbyte *) pc));
-}
-
-int
-__glXSwapGetDrawableAttributes(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXGetDrawableAttributesReq *req = (xGLXGetDrawableAttributesReq *) pc;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_SHORT(&req->length);
-    __GLX_SWAP_INT(&req->drawable);
-
-    return (__glXGetDrawableAttributes(cl, pc));
-}
-
-int
-__glXSwapChangeDrawableAttributes(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXChangeDrawableAttributesReq *req =
-        (xGLXChangeDrawableAttributesReq *) pc;
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_SHORT(&req->length);
-    __GLX_SWAP_INT(&req->drawable);
-    __GLX_SWAP_INT(&req->numAttribs);
-    __GLX_SWAP_INT_ARRAY((int *) (req + 1), req->numAttribs * 2);
-
-    return (__glXChangeDrawableAttributes(cl, pc));
-}
diff --git a/hw/dmx/glxProxy/glxcontext.h b/hw/dmx/glxProxy/glxcontext.h
deleted file mode 100644
index 479186c..0000000
--- a/hw/dmx/glxProxy/glxcontext.h
+++ /dev/null
@@ -1,109 +0,0 @@
-#ifndef _GLX_context_h_
-#define _GLX_context_h_
-
-/*
- * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
- * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice including the dates of first publication and
- * either this permission notice or a reference to
- * http://oss.sgi.com/projects/FreeB/
- * shall be included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of Silicon Graphics, Inc.
- * shall not be used in advertising or otherwise to promote the sale, use or
- * other dealings in this Software without prior written authorization from
- * Silicon Graphics, Inc.
- */
-
-typedef struct __GLXcontextRec __GLXcontext;
-
-struct __GLXcontextRec {
-    /*
-     ** list of context structs
-     */
-    struct __GLXcontextRec *last;
-    struct __GLXcontextRec *next;
-
-    /*
-     ** Pointer to screen info data for this context.  This is set
-     ** when the context is created.
-     */
-    ScreenPtr pScreen;
-    __GLXscreenInfo *pGlxScreen;
-
-    /*
-     ** This context is created with respect to this visual.
-     */
-    VisualRec *pVisual;
-    __GLXvisualConfig *pGlxVisual;
-    __GLXFBConfig *pFBConfig;
-
-    /*
-     ** The XID of this context.
-     */
-    XID id;
-    XID *real_ids;
-
-    /*
-     ** The XID of the shareList context.
-     */
-    XID share_id;
-
-    /*
-     ** Visual id.
-     */
-    VisualID vid;
-    VisualID *real_vids;
-
-    /*
-     ** screen number.
-     */
-    GLint screen;
-
-    /*
-     ** Whether this context's ID still exists.
-     */
-    GLboolean idExists;
-
-    /*
-     ** Whether this context is current for some client.
-     */
-    GLboolean isCurrent;
-
-    /*
-     ** Buffers for feedback and selection.
-     */
-    GLfloat *feedbackBuf;
-    GLint feedbackBufSize;      /* number of elements allocated */
-    GLuint *selectBuf;
-    GLint selectBufSize;        /* number of elements allocated */
-
-    /*
-     ** Set only if current drawable is a glx pixmap.
-     */
-    __GLXpixmap *pGlxPixmap;
-    __GLXpixmap *pGlxReadPixmap;
-    __glXWindow *pGlxWindow;
-    __glXWindow *pGlxReadWindow;
-    __glXPbuffer *pGlxPbuffer;
-    __glXPbuffer *pGlxReadPbuffer;
-
-};
-
-#endif                          /* !__GLX_context_h__ */
diff --git a/hw/dmx/glxProxy/glxdrawable.h b/hw/dmx/glxProxy/glxdrawable.h
deleted file mode 100644
index 0340896..0000000
--- a/hw/dmx/glxProxy/glxdrawable.h
+++ /dev/null
@@ -1,65 +0,0 @@
-#ifndef _GLX_drawable_h_
-#define _GLX_drawable_h_
-
-/*
- * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
- * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice including the dates of first publication and
- * either this permission notice or a reference to
- * http://oss.sgi.com/projects/FreeB/
- * shall be included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of Silicon Graphics, Inc.
- * shall not be used in advertising or otherwise to promote the sale, use or
- * other dealings in this Software without prior written authorization from
- * Silicon Graphics, Inc.
- */
-
-typedef struct {
-
-    DrawablePtr pDraw;
-    __GLXvisualConfig *pGlxVisual;
-    __GLXscreenInfo *pGlxScreen;
-    __GLXFBConfig *pFBConfig;
-    ScreenPtr pScreen;
-    Bool idExists;
-    int refcnt;
-    XID *be_xids;
-
-} __GLXpixmap;
-
-typedef struct {
-    DrawablePtr pDraw;
-    int type;
-    Bool idExists;
-    int refcnt;                 /* contexts bound */
-    __GLXFBConfig *pGlxFBConfig;
-    ScreenPtr pScreen;
-} __glXWindow;
-
-typedef struct {
-    __GLXscreenInfo *pGlxScreen;
-    __GLXFBConfig *pFBConfig;
-    ScreenPtr pScreen;
-    Bool idExists;
-    int refcnt;
-    XID *be_xids;
-} __glXPbuffer;
-
-#endif                          /* !__GLX_drawable_h__ */
diff --git a/hw/dmx/glxProxy/glxerror.h b/hw/dmx/glxProxy/glxerror.h
deleted file mode 100644
index 26492d2..0000000
--- a/hw/dmx/glxProxy/glxerror.h
+++ /dev/null
@@ -1,51 +0,0 @@
-#ifndef _GLX_error_h_
-#define _GLX_error_h_
-
-/*
- * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
- * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice including the dates of first publication and
- * either this permission notice or a reference to
- * http://oss.sgi.com/projects/FreeB/
- * shall be included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of Silicon Graphics, Inc.
- * shall not be used in advertising or otherwise to promote the sale, use or
- * other dealings in this Software without prior written authorization from
- * Silicon Graphics, Inc.
- */
-
-/*
-** Error codes.  These have the extension error base added to them
-** when the extension initializes.
-*/
-extern int __glXerrorBase;
-extern int __glXBadContext;
-extern int __glXBadContextState;
-extern int __glXBadDrawable;
-extern int __glXBadPixmap;
-extern int __glXBadCurrentWindow;
-extern int __glXBadContextTag;
-extern int __glXBadRenderRequest;
-extern int __glXBadLargeRequest;
-extern int __glXUnsupportedPrivateRequest;
-extern int __glXBadFBConfig;
-extern int __glXBadPbuffer;
-
-#endif
diff --git a/hw/dmx/glxProxy/glxext.c b/hw/dmx/glxProxy/glxext.c
deleted file mode 100644
index ca9780f..0000000
--- a/hw/dmx/glxProxy/glxext.c
+++ /dev/null
@@ -1,497 +0,0 @@
-/*
- * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
- * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice including the dates of first publication and
- * either this permission notice or a reference to
- * http://oss.sgi.com/projects/FreeB/
- * shall be included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of Silicon Graphics, Inc.
- * shall not be used in advertising or otherwise to promote the sale, use or
- * other dealings in this Software without prior written authorization from
- * Silicon Graphics, Inc.
- */
-
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#include "dmx.h"
-
-#include "glxserver.h"
-#include <windowstr.h>
-#include <propertyst.h>
-#include <os.h>
-#include "g_disptab.h"
-#include "glxutil.h"
-#include "glxext.h"
-#include "glxvisuals.h"
-#include "micmap.h"
-#include "glxswap.h"
-#include "extinit.h"
-#include "glx_extinit.h"
-
-/*
-** Forward declarations.
-*/
-static int __glXSwapDispatch(ClientPtr);
-static int __glXDispatch(ClientPtr);
-
-/*
-** Called when the extension is reset.
-*/
-static void
-ResetExtension(ExtensionEntry * extEntry)
-{
-    __glXFlushContextCache();
-    __glXScreenReset();
-    SwapBarrierReset();
-}
-
-/*
-** Initialize the per-client context storage.
-*/
-static void
-ResetClientState(int clientIndex)
-{
-    __GLXclientState *cl = __glXClients[clientIndex];
-    Display **keep_be_displays;
-    int i;
-
-    free(cl->returnBuf);
-    free(cl->currentContexts);
-    free(cl->currentDrawables);
-    free(cl->largeCmdBuf);
-
-    for (i = 0; i < screenInfo.numScreens; i++) {
-        if (cl->be_displays[i])
-            XCloseDisplay(cl->be_displays[i]);
-    }
-
-    keep_be_displays = cl->be_displays;
-    memset(cl, 0, sizeof(__GLXclientState));
-    cl->be_displays = keep_be_displays;
-
-    free(cl->GLClientextensions);
-
-    memset(cl->be_displays, 0, screenInfo.numScreens * sizeof(Display *));
-}
-
-/*
-** This procedure is called when the client who created the context goes
-** away OR when glXDestroyContext is called.  In either case, all we do is
-** flag that the ID is no longer valid, and (maybe) free the context.
-** use.
-*/
-static int
-ContextGone(__GLXcontext * cx, XID id)
-{
-    cx->idExists = GL_FALSE;
-    if (!cx->isCurrent) {
-        __glXFreeContext(cx);
-    }
-
-    return True;
-}
-
-/*
-** Free a client's state.
-*/
-static int
-ClientGone(int clientIndex, XID id)
-{
-    __GLXcontext *cx;
-    __GLXclientState *cl = __glXClients[clientIndex];
-    int i;
-
-    if (cl) {
-        /*
-         ** Free all the contexts that are current for this client.
-         */
-        for (i = 0; i < cl->numCurrentContexts; i++) {
-            cx = cl->currentContexts[i];
-            if (cx) {
-                cx->isCurrent = GL_FALSE;
-                if (!cx->idExists) {
-                    __glXFreeContext(cx);
-                }
-            }
-        }
-        /*
-         ** Re-initialize the client state structure.  Don't free it because
-         ** we'll probably get another client with this index and use the struct
-         ** again.  There is a maximum of MAXCLIENTS of these structures.
-         */
-        ResetClientState(clientIndex);
-    }
-
-    return True;
-}
-
-/*
-** Free a GLX Pixmap.
-*/
-void
-__glXFreeGLXPixmap(__GLXpixmap * pGlxPixmap)
-{
-    if (!pGlxPixmap->idExists && !pGlxPixmap->refcnt) {
-
-        PixmapPtr pPixmap = (PixmapPtr) pGlxPixmap->pDraw;
-
-        /*
-         ** The DestroyPixmap routine should decrement the refcount and free
-         ** only if it's zero.
-         */
-        (*pGlxPixmap->pScreen->DestroyPixmap) (pPixmap);
-        free(pGlxPixmap->be_xids);
-        free(pGlxPixmap);
-    }
-
-}
-
-static int
-PixmapGone(__GLXpixmap * pGlxPixmap, XID id)
-{
-
-    pGlxPixmap->idExists = False;
-    __glXFreeGLXPixmap(pGlxPixmap);
-
-    return True;
-}
-
-void
-__glXFreeGLXWindow(__glXWindow * pGlxWindow)
-{
-    if (!pGlxWindow->idExists && !pGlxWindow->refcnt) {
-        WindowPtr pWindow = (WindowPtr) pGlxWindow->pDraw;
-        WindowPtr ret;
-
-        dixLookupResourceByType((void *) &ret,
-                                pWindow->drawable.id, RT_WINDOW,
-                                NullClient, DixUnknownAccess);
-        if (ret == pWindow) {
-            (*pGlxWindow->pScreen->DestroyWindow) (pWindow);
-        }
-
-        free(pGlxWindow);
-    }
-}
-
-static void
-WindowGone(__glXWindow * pGlxWindow, XID id)
-{
-    pGlxWindow->idExists = False;
-    __glXFreeGLXWindow(pGlxWindow);
-}
-
-void
-__glXFreeGLXPbuffer(__glXPbuffer * pGlxPbuffer)
-{
-    if (!pGlxPbuffer->idExists && !pGlxPbuffer->refcnt) {
-        free(pGlxPbuffer->be_xids);
-        free(pGlxPbuffer);
-    }
-}
-
-static void
-PbufferGone(__glXPbuffer * pGlxPbuffer, XID id)
-{
-    pGlxPbuffer->idExists = False;
-    __glXFreeGLXPbuffer(pGlxPbuffer);
-}
-
-/*
-** Free a context.
-*/
-GLboolean
-__glXFreeContext(__GLXcontext * cx)
-{
-    if (cx->idExists || cx->isCurrent)
-        return GL_FALSE;
-
-    free(cx->feedbackBuf);
-    free(cx->selectBuf);
-    free(cx->real_ids);
-    free(cx->real_vids);
-
-    if (cx->pGlxPixmap) {
-        /*
-         ** The previous drawable was a glx pixmap, release it.
-         */
-        cx->pGlxPixmap->refcnt--;
-        __glXFreeGLXPixmap(cx->pGlxPixmap);
-        cx->pGlxPixmap = 0;
-    }
-
-    if (cx->pGlxReadPixmap) {
-        /*
-         ** The previous drawable was a glx pixmap, release it.
-         */
-        cx->pGlxReadPixmap->refcnt--;
-        __glXFreeGLXPixmap(cx->pGlxReadPixmap);
-        cx->pGlxReadPixmap = 0;
-    }
-
-    if (cx->pGlxWindow) {
-        /*
-         ** The previous drawable was a glx window, release it.
-         */
-        cx->pGlxWindow->refcnt--;
-        __glXFreeGLXWindow(cx->pGlxWindow);
-        cx->pGlxWindow = 0;
-    }
-
-    if (cx->pGlxReadWindow) {
-        /*
-         ** The previous drawable was a glx window, release it.
-         */
-        cx->pGlxReadWindow->refcnt--;
-        __glXFreeGLXWindow(cx->pGlxReadWindow);
-        cx->pGlxReadWindow = 0;
-    }
-
-    free(cx);
-
-    if (cx == __glXLastContext) {
-        __glXFlushContextCache();
-    }
-
-    return GL_TRUE;
-}
-
-/*
-** Initialize the GLX extension.
-*/
-void
-GlxExtensionInit(void)
-{
-    ExtensionEntry *extEntry;
-    int i;
-    int glxSupported = 1;
-
-    /*
-       // do not initialize GLX extension if GLX is not supported
-       // by ALL back-end servers.
-     */
-    for (i = 0; i < screenInfo.numScreens; i++) {
-        glxSupported &= (dmxScreens[i].glxMajorOpcode > 0);
-    }
-
-    if (!glxSupported || !dmxGLXProxy) {
-        return;
-    }
-
-    __glXContextRes = CreateNewResourceType((DeleteType) ContextGone,
-                                            "GLXContext");
-    __glXClientRes = CreateNewResourceType((DeleteType) ClientGone,
-                                           "GLXClient");
-    __glXPixmapRes = CreateNewResourceType((DeleteType) PixmapGone,
-                                           "GLXPixmap");
-    __glXWindowRes = CreateNewResourceType((DeleteType) WindowGone,
-                                           "GLXWindow");
-    __glXPbufferRes = CreateNewResourceType((DeleteType) PbufferGone,
-                                            "GLXPbuffer");
-
-    if (!__glXContextRes || !__glXClientRes || !__glXPixmapRes ||
-        !__glXWindowRes || !__glXPbufferRes)
-        return;
-
-    /*
-     ** Add extension to server extensions.
-     */
-    extEntry = AddExtension(GLX_EXTENSION_NAME, __GLX_NUMBER_EVENTS,
-                            __GLX_NUMBER_ERRORS, __glXDispatch,
-                            __glXSwapDispatch, ResetExtension,
-                            StandardMinorOpcode);
-    if (!extEntry) {
-        FatalError("__glXExtensionInit: AddExtensions failed\n");
-        return;
-    }
-
-    __glXerrorBase = extEntry->errorBase;
-    __glXBadContext = extEntry->errorBase + GLXBadContext;
-    __glXBadContextState = extEntry->errorBase + GLXBadContextState;
-    __glXBadDrawable = extEntry->errorBase + GLXBadDrawable;
-    __glXBadPixmap = extEntry->errorBase + GLXBadPixmap;
-    __glXBadContextTag = extEntry->errorBase + GLXBadContextTag;
-    __glXBadCurrentWindow = extEntry->errorBase + GLXBadCurrentWindow;
-    __glXBadRenderRequest = extEntry->errorBase + GLXBadRenderRequest;
-    __glXBadLargeRequest = extEntry->errorBase + GLXBadLargeRequest;
-    __glXUnsupportedPrivateRequest = extEntry->errorBase +
-        GLXUnsupportedPrivateRequest;
-    __glXBadFBConfig = extEntry->errorBase + GLXBadFBConfig;
-    __glXBadPbuffer = extEntry->errorBase + GLXBadPbuffer;
-
-    /*
-     ** Initialize table of client state.  There is never a client 0.
-     */
-    for (i = 1; i <= LimitClients; i++) {
-        __glXClients[i] = 0;
-    }
-
-    /*
-     ** Initialize screen specific data.
-     */
-    __glXScreenInit(screenInfo.numScreens);
-
-    /*
-     ** Initialize swap barrier support.
-     */
-    SwapBarrierInit();
-}
-
-/************************************************************************/
-
-Bool
-__glXCoreType(void)
-{
-    return 0;
-}
-
-/************************************************************************/
-
-void
-__glXFlushContextCache(void)
-{
-    __glXLastContext = 0;
-}
-
-/************************************************************************/
-
-/*
-** Top level dispatcher; all commands are executed from here down.
-*/
-static int
-__glXDispatch(ClientPtr client)
-{
-    REQUEST(xGLXSingleReq);
-    CARD8 opcode;
-    int (*proc) (__GLXclientState * cl, GLbyte * pc);
-    __GLXclientState *cl;
-
-    opcode = stuff->glxCode;
-    cl = __glXClients[client->index];
-    if (!cl) {
-        cl = calloc(1, sizeof(__GLXclientState));
-        __glXClients[client->index] = cl;
-        if (!cl) {
-            return BadAlloc;
-        }
-
-        cl->be_displays = calloc(screenInfo.numScreens, sizeof(Display *));
-        if (!cl->be_displays) {
-            free(cl);
-            return BadAlloc;
-        }
-    }
-
-    if (!cl->inUse) {
-        /*
-         ** This is first request from this client.  Associate a resource
-         ** with the client so we will be notified when the client dies.
-         */
-        XID xid = FakeClientID(client->index);
-
-        if (!AddResource(xid, __glXClientRes, (void *) (long) client->index)) {
-            return BadAlloc;
-        }
-        ResetClientState(client->index);
-        cl->largeCmdRequestsTotal = 0;
-        cl->inUse = GL_TRUE;
-        cl->client = client;
-    }
-
-    /*
-     ** Check for valid opcode.
-     */
-    if (opcode >= __GLX_SINGLE_TABLE_SIZE) {
-        return BadRequest;
-    }
-
-    /*
-     ** Use the opcode to index into the procedure table.
-     */
-    proc = __glXSingleTable[opcode];
-    return (*proc) (cl, (GLbyte *) stuff);
-}
-
-static int
-__glXSwapDispatch(ClientPtr client)
-{
-    REQUEST(xGLXSingleReq);
-    CARD8 opcode;
-    int (*proc) (__GLXclientState * cl, GLbyte * pc);
-    __GLXclientState *cl;
-
-    opcode = stuff->glxCode;
-    cl = __glXClients[client->index];
-    if (!cl) {
-        cl = calloc(1, sizeof(__GLXclientState));
-        __glXClients[client->index] = cl;
-        if (!cl) {
-            return BadAlloc;
-        }
-
-        cl->be_displays = calloc(screenInfo.numScreens, sizeof(Display *));
-        if (!cl->be_displays) {
-            free(cl);
-            return BadAlloc;
-        }
-    }
-
-    if (!cl->inUse) {
-        /*
-         ** This is first request from this client.  Associate a resource
-         ** with the client so we will be notified when the client dies.
-         */
-        XID xid = FakeClientID(client->index);
-
-        if (!AddResource(xid, __glXClientRes, (void *) (long) client->index)) {
-            return BadAlloc;
-        }
-        ResetClientState(client->index);
-        cl->inUse = GL_TRUE;
-        cl->client = client;
-    }
-
-    /*
-     ** Check for valid opcode.
-     */
-    if (opcode >= __GLX_SINGLE_TABLE_SIZE) {
-        return BadRequest;
-    }
-
-    /*
-     ** Use the opcode to index into the procedure table.
-     */
-    proc = __glXSwapSingleTable[opcode];
-    return (*proc) (cl, (GLbyte *) stuff);
-}
-
-int
-__glXNoSuchSingleOpcode(__GLXclientState * cl, GLbyte * pc)
-{
-    return BadRequest;
-}
-
-void
-__glXNoSuchRenderOpcode(GLbyte * pc)
-{
-    return;
-}
diff --git a/hw/dmx/glxProxy/glxext.h b/hw/dmx/glxProxy/glxext.h
deleted file mode 100644
index b96ebc1..0000000
--- a/hw/dmx/glxProxy/glxext.h
+++ /dev/null
@@ -1,70 +0,0 @@
-#ifndef _glxext_h_
-#define _glxext_h_
-
-/*
- * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
- * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice including the dates of first publication and
- * either this permission notice or a reference to
- * http://oss.sgi.com/projects/FreeB/
- * shall be included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of Silicon Graphics, Inc.
- * shall not be used in advertising or otherwise to promote the sale, use or
- * other dealings in this Software without prior written authorization from
- * Silicon Graphics, Inc.
- */
-
-/*
- * Added by VA Linux for XFree86 4.0.x
- */
-typedef struct {
-    int type;
-    void (*resetExtension) (void);
-    Bool (*initVisuals) (VisualPtr * visualp,
-                         DepthPtr * depthp,
-                         int *nvisualp,
-                         int *ndepthp,
-                         int *rootDepthp,
-                         VisualID * defaultVisp,
-                         unsigned long sizes, int bitsPerRGB);
-    void (*setVisualConfigs) (int nconfigs,
-                              __GLXvisualConfig * configs, void **privates);
-} __GLXextensionInfo;
-
-extern GLboolean __glXFreeContext(__GLXcontext * glxc);
-extern void __glXFlushContextCache(void);
-
-extern void __glXFreeGLXWindow(__glXWindow * pGlxWindow);
-extern void __glXFreeGLXPixmap(__GLXpixmap * pGlxPixmap);
-extern void __glXFreeGLXPbuffer(__glXPbuffer * pGlxPbuffer);
-
-extern void __glXNoSuchRenderOpcode(GLbyte *);
-extern int __glXNoSuchSingleOpcode(__GLXclientState *, GLbyte *);
-extern void __glXErrorCallBack(GLenum code);
-extern void __glXClearErrorOccured(void);
-extern GLboolean __glXErrorOccured(void);
-extern void __glXResetLargeCommandStatus(__GLXclientState *);
-
-extern int __glXQueryContextInfoEXT(__GLXclientState * cl, GLbyte * pc);
-extern int __glXSwapQueryContextInfoEXT(__GLXclientState * cl, char *pc);
-
-extern Bool __glXCoreType(void);
-
-#endif                          /* _glxext_h_ */
diff --git a/hw/dmx/glxProxy/glxfbconfig.c b/hw/dmx/glxProxy/glxfbconfig.c
deleted file mode 100644
index 2f46bd0..0000000
--- a/hw/dmx/glxProxy/glxfbconfig.c
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
- * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice including the dates of first publication and
- * either this permission notice or a reference to
- * http://oss.sgi.com/projects/FreeB/
- * shall be included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of Silicon Graphics, Inc.
- * shall not be used in advertising or otherwise to promote the sale, use or
- * other dealings in this Software without prior written authorization from
- * Silicon Graphics, Inc.
- */
-
-#include "glxfbconfig.h"
-
-int
-AreFBConfigsMatch(__GLXFBConfig * c1, __GLXFBConfig * c2)
-{
-    int match;
-
-    match = ((c1->visualType == c2->visualType) &&
-             (c1->transparentType == c2->transparentType) &&
-             (c1->transparentRed == c2->transparentRed) &&
-             (c1->transparentGreen == c2->transparentGreen) &&
-             (c1->transparentBlue == c2->transparentBlue) &&
-             (c1->transparentAlpha == c2->transparentAlpha) &&
-             (c1->transparentIndex == c2->transparentIndex) &&
-             (c1->visualCaveat == c2->visualCaveat) &&
-             (c1->drawableType == c2->drawableType) &&
-             (c1->renderType == c2->renderType) &&
-#if 0
-             (c1->maxPbufferWidth == c2->maxPbufferWidth) &&
-             (c1->maxPbufferHeight == c2->maxPbufferHeight) &&
-             (c1->maxPbufferPixels == c2->maxPbufferPixels) &&
-             (c1->optimalPbufferWidth == c2->optimalPbufferWidth) &&
-             (c1->optimalPbufferHeight == c2->optimalPbufferHeight) &&
-#endif
-             (c1->visualSelectGroup == c2->visualSelectGroup) &&
-             (c1->rgbMode == c2->rgbMode) &&
-             (c1->colorIndexMode == c2->colorIndexMode) &&
-             (c1->doubleBufferMode == c2->doubleBufferMode) &&
-             (c1->stereoMode == c2->stereoMode) &&
-             (c1->haveAccumBuffer == c2->haveAccumBuffer) &&
-             (c1->haveDepthBuffer == c2->haveDepthBuffer) &&
-             (c1->haveStencilBuffer == c2->haveStencilBuffer) &&
-             (c1->accumRedBits == c2->accumRedBits) &&
-             (c1->accumGreenBits == c2->accumGreenBits) &&
-             (c1->accumBlueBits == c2->accumBlueBits) &&
-             (c1->accumAlphaBits == c2->accumAlphaBits) &&
-             (c1->depthBits == c2->depthBits) &&
-             (c1->stencilBits == c2->stencilBits) &&
-             (c1->indexBits == c2->indexBits) &&
-             (c1->redBits == c2->redBits) &&
-             (c1->greenBits == c2->greenBits) &&
-             (c1->blueBits == c2->blueBits) &&
-             (c1->alphaBits == c2->alphaBits) &&
-             (c1->redMask == c2->redMask) &&
-             (c1->greenMask == c2->greenMask) &&
-             (c1->blueMask == c2->blueMask) &&
-             (c1->alphaMask == c2->alphaMask) &&
-             (c1->multiSampleSize == c2->multiSampleSize) &&
-             (c1->nMultiSampleBuffers == c2->nMultiSampleBuffers) &&
-             (c1->maxAuxBuffers == c2->maxAuxBuffers) &&
-             (c1->level == c2->level) &&
-             (c1->extendedRange == c2->extendedRange) &&
-             (c1->minRed == c2->minRed) &&
-             (c1->maxRed == c2->maxRed) &&
-             (c1->minGreen == c2->minGreen) &&
-             (c1->maxGreen == c2->maxGreen) &&
-             (c1->minBlue == c2->minBlue) &&
-             (c1->maxBlue == c2->maxBlue) &&
-             (c1->minAlpha == c2->minAlpha) && (c1->maxAlpha == c2->maxAlpha)
-        );
-
-    return match;
-}
-
-__GLXFBConfig *
-FindMatchingFBConfig(__GLXFBConfig * c, __GLXFBConfig * configs, int nconfigs)
-{
-    int i;
-
-    for (i = 0; i < nconfigs; i++) {
-        if (AreFBConfigsMatch(c, configs + i))
-            return configs + i;
-    }
-
-    return 0;
-}
diff --git a/hw/dmx/glxProxy/glxfbconfig.h b/hw/dmx/glxProxy/glxfbconfig.h
deleted file mode 100644
index 6626410..0000000
--- a/hw/dmx/glxProxy/glxfbconfig.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
- * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice including the dates of first publication and
- * either this permission notice or a reference to
- * http://oss.sgi.com/projects/FreeB/
- * shall be included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of Silicon Graphics, Inc.
- * shall not be used in advertising or otherwise to promote the sale, use or
- * other dealings in this Software without prior written authorization from
- * Silicon Graphics, Inc.
- */
-
-#ifndef _GLXFBCONFIG_H
-
-#include <GL/glxint.h>
-
-int AreFBConfigsMatch(__GLXFBConfig * c1, __GLXFBConfig * c2);
-__GLXFBConfig *FindMatchingFBConfig(__GLXFBConfig * c, __GLXFBConfig * configs,
-                                    int nconfigs);
-
-#endif
diff --git a/hw/dmx/glxProxy/glxscreens.c b/hw/dmx/glxProxy/glxscreens.c
deleted file mode 100644
index 508e67e..0000000
--- a/hw/dmx/glxProxy/glxscreens.c
+++ /dev/null
@@ -1,340 +0,0 @@
-/*
- * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
- * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice including the dates of first publication and
- * either this permission notice or a reference to
- * http://oss.sgi.com/projects/FreeB/
- * shall be included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of Silicon Graphics, Inc.
- * shall not be used in advertising or otherwise to promote the sale, use or
- * other dealings in this Software without prior written authorization from
- * Silicon Graphics, Inc.
- */
-
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#include "dmx.h"
-#include "dmxlog.h"
-
-#include "glxserver.h"
-
-#include <windowstr.h>
-
-#include "glxfbconfig.h"
-
-#ifdef PANORAMIX
-#include "panoramiXsrv.h"
-#endif
-
-__GLXscreenInfo *__glXActiveScreens;
-GLint __glXNumActiveScreens;
-
-__GLXFBConfig **__glXFBConfigs;
-int __glXNumFBConfigs;
-
-static char GLXServerVendorName[] = "SGI DMX/glxProxy";
-static char GLXServerVersion[64];
-static char GLXServerExtensions[] =
-    "GLX_EXT_visual_info "
-    "GLX_EXT_visual_rating "
-    "GLX_EXT_import_context "
-    "GLX_SGIX_fbconfig " "GLX_SGI_make_current_read " "GLX_SGI_swap_control ";
-
-static char ExtensionsString[1024];
-
-static void
-CalcServerVersionAndExtensions(void)
-{
-    int s;
-    char **be_extensions;
-    char *ext;
-    char *denied_extensions;
-
-    /*
-     * set the server glx version to be the minimum version
-     * supported by all back-end servers
-     */
-    __glXVersionMajor = 0;
-    __glXVersionMinor = 0;
-    for (s = 0; s < __glXNumActiveScreens; s++) {
-        DMXScreenInfo *dmxScreen = &dmxScreens[s];
-        Display *dpy = dmxScreen->beDisplay;
-        xGLXQueryVersionReq *req;
-        xGLXQueryVersionReply reply;
-
-        /* Send the glXQueryVersion request */
-        LockDisplay(dpy);
-        GetReq(GLXQueryVersion, req);
-        req->reqType = dmxScreen->glxMajorOpcode;
-        req->glxCode = X_GLXQueryVersion;
-        req->majorVersion = GLX_SERVER_MAJOR_VERSION;
-        req->minorVersion = GLX_SERVER_MINOR_VERSION;
-        _XReply(dpy, (xReply *) &reply, 0, False);
-        UnlockDisplay(dpy);
-        SyncHandle();
-
-        if (s == 0) {
-            __glXVersionMajor = reply.majorVersion;
-            __glXVersionMinor = reply.minorVersion;
-        }
-        else {
-            if (reply.majorVersion < __glXVersionMajor) {
-                __glXVersionMajor = reply.majorVersion;
-                __glXVersionMinor = reply.minorVersion;
-            }
-            else if ((reply.majorVersion == __glXVersionMajor) &&
-                     (reply.minorVersion < __glXVersionMinor)) {
-                __glXVersionMinor = reply.minorVersion;
-            }
-        }
-
-    }
-
-    if (GLX_SERVER_MAJOR_VERSION < __glXVersionMajor) {
-        __glXVersionMajor = GLX_SERVER_MAJOR_VERSION;
-        __glXVersionMinor = GLX_SERVER_MINOR_VERSION;
-    }
-    else if ((GLX_SERVER_MAJOR_VERSION == __glXVersionMajor) &&
-             (GLX_SERVER_MINOR_VERSION < __glXVersionMinor)) {
-        __glXVersionMinor = GLX_SERVER_MINOR_VERSION;
-    }
-
-    snprintf(GLXServerVersion, sizeof(GLXServerVersion),
-             "%d.%d DMX %d back-end server(s)",
-             __glXVersionMajor, __glXVersionMinor, __glXNumActiveScreens);
-    /*
-     * set the ExtensionsString to the minimum extensions string
-     */
-    ExtensionsString[0] = '\0';
-
-    /*
-     * read extensions strings of all back-end servers
-     */
-    be_extensions = xallocarray(__glXNumActiveScreens, sizeof(char *));
-    if (!be_extensions)
-        return;
-
-    for (s = 0; s < __glXNumActiveScreens; s++) {
-        DMXScreenInfo *dmxScreen = &dmxScreens[s];
-        Display *dpy = dmxScreen->beDisplay;
-        xGLXQueryServerStringReq *req;
-        xGLXQueryServerStringReply reply;
-        int length, numbytes;
-
-        /* Send the glXQueryServerString request */
-        LockDisplay(dpy);
-        GetReq(GLXQueryServerString, req);
-        req->reqType = dmxScreen->glxMajorOpcode;
-        req->glxCode = X_GLXQueryServerString;
-        req->screen = DefaultScreen(dpy);
-        req->name = GLX_EXTENSIONS;
-        _XReply(dpy, (xReply *) &reply, 0, False);
-
-        length = (int) reply.length;
-        numbytes = (int) reply.n;
-        be_extensions[s] = (char *) malloc(numbytes);
-        if (!be_extensions[s]) {
-            /* Throw data on the floor */
-            _XEatDataWords(dpy, length);
-        }
-        else {
-            _XReadPad(dpy, (char *) be_extensions[s], numbytes);
-        }
-        UnlockDisplay(dpy);
-        SyncHandle();
-    }
-
-    /*
-     * extensions string will include only extensions that our
-     * server supports as well as all back-end servers supports.
-     * extensions that are in the DMX_DENY_EXTENSIONS string will
-     * not be supported.
-     */
-    denied_extensions = getenv("DMX_DENY_GLX_EXTENSIONS");
-    ext = strtok(GLXServerExtensions, " ");
-    while (ext) {
-        int supported = 1;
-
-        if (denied_extensions && strstr(denied_extensions, ext)) {
-            supported = 0;
-        }
-        else {
-            for (s = 0; s < __glXNumActiveScreens && supported; s++) {
-                if (!strstr(be_extensions[s], ext)) {
-                    supported = 0;
-                }
-            }
-        }
-
-        if (supported) {
-            strcat(ExtensionsString, ext);
-            strcat(ExtensionsString, " ");
-        }
-
-        ext = strtok(NULL, " ");
-    }
-
-    /*
-     * release temporary storage
-     */
-    for (s = 0; s < __glXNumActiveScreens; s++) {
-        free(be_extensions[s]);
-    }
-    free(be_extensions);
-
-    if (dmxGLXSwapGroupSupport) {
-        if (!denied_extensions ||
-            !strstr(denied_extensions, "GLX_SGIX_swap_group")) {
-            strcat(ExtensionsString, "GLX_SGIX_swap_group");
-            if (!denied_extensions ||
-                !strstr(denied_extensions, "GLX_SGIX_swap_barrier")) {
-                strcat(ExtensionsString, " GLX_SGIX_swap_barrier");
-            }
-        }
-    }
-
-}
-
-void
-__glXScreenInit(GLint numscreens)
-{
-    int s;
-    int c;
-    DMXScreenInfo *dmxScreen0 = &dmxScreens[0];
-
-    __glXNumActiveScreens = numscreens;
-
-    CalcServerVersionAndExtensions();
-
-    __glXFBConfigs = NULL;
-    __glXNumFBConfigs = 0;
-
-    if ((__glXVersionMajor == 1 && __glXVersionMinor >= 3) ||
-        (__glXVersionMajor > 1) ||
-        (strstr(ExtensionsString, "GLX_SGIX_fbconfig"))) {
-
-        /*
-           // Initialize FBConfig info.
-           // find the set of FBConfigs that are present on all back-end
-           // servers - only those configs will be supported
-         */
-        __glXFBConfigs =
-            xallocarray(dmxScreen0->numFBConfigs * (numscreens + 1),
-                        sizeof(__GLXFBConfig *));
-        __glXNumFBConfigs = 0;
-
-        for (c = 0; c < dmxScreen0->numFBConfigs; c++) {
-            __GLXFBConfig *cfg = NULL;
-
-            if (numscreens > 1) {
-                for (s = 1; s < numscreens; s++) {
-                    DMXScreenInfo *dmxScreen = &dmxScreens[s];
-
-                    cfg = FindMatchingFBConfig(&dmxScreen0->fbconfigs[c],
-                                               dmxScreen->fbconfigs,
-                                               dmxScreen->numFBConfigs);
-                    __glXFBConfigs[__glXNumFBConfigs * (numscreens + 1) + s +
-                                   1] = cfg;
-                    if (!cfg) {
-                        dmxLog(dmxInfo,
-                               "screen0 FBConfig 0x%x is missing on screen#%d\n",
-                               dmxScreen0->fbconfigs[c].id, s);
-                        break;
-                    }
-                    else {
-                        dmxLog(dmxInfo,
-                               "screen0 FBConfig 0x%x matched to  0x%x on screen#%d\n",
-                               dmxScreen0->fbconfigs[c].id, cfg->id, s);
-                    }
-                }
-            }
-            else {
-                cfg = &dmxScreen0->fbconfigs[c];
-            }
-
-            if (cfg) {
-
-                /* filter out overlay visuals */
-                if (cfg->level == 0) {
-                    __GLXFBConfig *proxy_cfg;
-
-                    __glXFBConfigs[__glXNumFBConfigs * (numscreens + 1) + 1] =
-                        &dmxScreen0->fbconfigs[c];
-
-                    proxy_cfg = malloc(sizeof(__GLXFBConfig));
-                    memcpy(proxy_cfg, cfg, sizeof(__GLXFBConfig));
-                    proxy_cfg->id = FakeClientID(0);
-                    /* visual will be associated later in __glXGetFBConfigs */
-                    proxy_cfg->associatedVisualId = (unsigned int) -1;
-
-                    __glXFBConfigs[__glXNumFBConfigs * (numscreens + 1) + 0] =
-                        proxy_cfg;
-
-                    __glXNumFBConfigs++;
-                }
-
-            }
-
-        }
-
-    }
-
-}
-
-void
-__glXScreenReset(void)
-{
-    __glXNumActiveScreens = 0;
-}
-
-char *
-__glXGetServerString(unsigned int name)
-{
-    char *ret = NULL;
-
-    switch (name) {
-
-    case GLX_VENDOR:
-        ret = GLXServerVendorName;
-        break;
-
-    case GLX_VERSION:
-        ret = GLXServerVersion;
-        break;
-
-    case GLX_EXTENSIONS:
-        ret = ExtensionsString;
-        break;
-
-    default:
-        break;
-    }
-
-    return ret;
-
-}
-
-int
-glxIsExtensionSupported(const char *ext)
-{
-    return (strstr(ExtensionsString, ext) != NULL);
-}
diff --git a/hw/dmx/glxProxy/glxscreens.h b/hw/dmx/glxProxy/glxscreens.h
deleted file mode 100644
index 5f36b81..0000000
--- a/hw/dmx/glxProxy/glxscreens.h
+++ /dev/null
@@ -1,53 +0,0 @@
-#ifndef _GLX_screens_h_
-#define _GLX_screens_h_
-
-/*
- * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
- * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice including the dates of first publication and
- * either this permission notice or a reference to
- * http://oss.sgi.com/projects/FreeB/
- * shall be included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of Silicon Graphics, Inc.
- * shall not be used in advertising or otherwise to promote the sale, use or
- * other dealings in this Software without prior written authorization from
- * Silicon Graphics, Inc.
- */
-
-typedef struct {
-
-    __GLXvisualConfig *pGlxVisual;
-    GLint numVisuals;
-    GLint numGLXVisuals;
-    GLint *isGLXvis;
-
-    char *GLXvendor;
-    char *GLXextensions;
-
-} __GLXscreenInfo;
-
-extern void __glXScreenInit(GLint);
-extern void __glXScreenReset(void);
-
-extern char *__glXGetServerString(unsigned int name);
-
-extern int glxIsExtensionSupported(const char *ext);
-
-#endif                          /* !__GLX_screens_h__ */
diff --git a/hw/dmx/glxProxy/glxserver.h b/hw/dmx/glxProxy/glxserver.h
deleted file mode 100644
index 7aa5ad2..0000000
--- a/hw/dmx/glxProxy/glxserver.h
+++ /dev/null
@@ -1,292 +0,0 @@
-#ifndef _GLX_server_h_
-#define _GLX_server_h_
-
-/*
- * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
- * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice including the dates of first publication and
- * either this permission notice or a reference to
- * http://oss.sgi.com/projects/FreeB/
- * shall be included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of Silicon Graphics, Inc.
- * shall not be used in advertising or otherwise to promote the sale, use or
- * other dealings in this Software without prior written authorization from
- * Silicon Graphics, Inc.
- */
-
-#include "dmx.h"
-
-#include <misc.h>
-#include <dixstruct.h>
-#include <pixmapstr.h>
-#include <gcstruct.h>
-#include <extnsionst.h>
-#include <resource.h>
-#include <scrnintstr.h>
-
-#define GL_GLEXT_PROTOTYPES     /* we want prototypes */
-#include <GL/gl.h>
-#include <GL/glxproto.h>
-#include <GL/glxint.h>
-
-#include "glxscreens.h"
-#include "glxdrawable.h"
-#include "glxcontext.h"
-#include "glxerror.h"
-
-#define GLX_SERVER_MAJOR_VERSION 1
-#define GLX_SERVER_MINOR_VERSION 3
-
-#ifndef True
-#define True 1
-#endif
-#ifndef False
-#define False 0
-#endif
-
-/*
-** GLX resources.
-typedef XID GLXContextID;
-typedef XID GLXPixmap;
-typedef XID GLXDrawable;
-typedef XID GLXWindow;
-typedef XID GLXPbuffer;
-
-typedef struct __GLXcontextRec *GLXContext;
-*/
-typedef struct __GLXclientStateRec __GLXclientState;
-
-extern __GLXscreenInfo *__glXActiveScreens;
-extern GLint __glXNumActiveScreens;
-
-/************************************************************************/
-
-/*
-** The last context used (from the server's persective) is cached.
-*/
-extern __GLXcontext *__glXLastContext;
-extern __GLXcontext *__glXForceCurrent(__GLXclientState *, GLXContextTag,
-                                       int *);
-
-/************************************************************************/
-
-typedef struct {
-    int elem_size;              /* element size in bytes */
-    int nelems;                 /* number of elements to swap */
-    void (*swapfunc) (GLbyte * pc);
-} __GLXRenderSwapInfo;
-
-/*
-** State kept per client.
-*/
-struct __GLXclientStateRec {
-    /*
-     ** Whether this structure is currently being used to support a client.
-     */
-    Bool inUse;
-
-    /*
-     ** Buffer for returned data.
-     */
-    GLbyte *returnBuf;
-    GLint returnBufSize;
-
-    /*
-     ** Keep a list of all the contexts that are current for this client's
-     ** threads.
-     */
-    __GLXcontext **currentContexts;
-    DrawablePtr *currentDrawables;
-    GLint numCurrentContexts;
-
-    /* Back pointer to X client record */
-    ClientPtr client;
-
-    char *GLClientextensions;
-
-    GLXContextTag *be_currentCTag;
-    Display **be_displays;
-
-    /*
-     ** Keep track of large rendering commands, which span multiple requests.
-     */
-    GLint largeCmdBytesSoFar;   /* bytes received so far        */
-    GLint largeCmdBytesTotal;   /* total bytes expected         */
-    GLint largeCmdRequestsSoFar;        /* requests received so far     */
-    GLint largeCmdRequestsTotal;        /* total requests expected      */
-    void (*largeCmdRequestsSwapProc) (GLbyte *);
-    __GLXRenderSwapInfo *largeCmdRequestsSwap_info;
-    GLbyte *largeCmdBuf;
-    GLint largeCmdBufSize;
-    GLint largeCmdMaxReqDataSize;
-
-};
-
-extern __GLXclientState *__glXClients[];
-
-/************************************************************************/
-
-/*
-** Dispatch tables.
-*/
-typedef void (*__GLXdispatchRenderProcPtr) (GLbyte *);
-typedef int (*__GLXdispatchSingleProcPtr) (__GLXclientState *, GLbyte *);
-typedef int (*__GLXdispatchVendorPrivProcPtr) (__GLXclientState *, GLbyte *);
-extern __GLXdispatchVendorPrivProcPtr __glXVendorPrivTable_EXT[];
-extern __GLXdispatchVendorPrivProcPtr __glXSwapVendorPrivTable_EXT[];
-extern __GLXdispatchRenderProcPtr __glXSwapRenderTable[];
-
-extern __GLXRenderSwapInfo __glXSwapRenderTable_EXT[];
-
-/*
- * Dispatch for GLX commands.
- */
-typedef int (*__GLXprocPtr) (__GLXclientState *, char *pc);
-extern __GLXprocPtr __glXProcTable[];
-
-/*
- * Tables for computing the size of each rendering command.
- */
-typedef struct {
-    int bytes;
-    int (*varsize) (GLbyte * pc, Bool swap);
-} __GLXrenderSizeData;
-extern __GLXrenderSizeData __glXRenderSizeTable[];
-extern __GLXrenderSizeData __glXRenderSizeTable_EXT[];
-
-/************************************************************************/
-
-/*
-** X resources.
-*/
-extern RESTYPE __glXContextRes;
-extern RESTYPE __glXClientRes;
-extern RESTYPE __glXPixmapRes;
-extern RESTYPE __glXDrawableRes;
-extern RESTYPE __glXWindowRes;
-extern RESTYPE __glXPbufferRes;
-
-/************************************************************************/
-
-/*
-** Prototypes.
-*/
-
-extern char *__glXcombine_strings(const char *, const char *);
-
-/*
-** Routines for sending swapped replies.
-*/
-
-extern void __glXSwapMakeCurrentReply(ClientPtr client,
-                                      xGLXMakeCurrentReadSGIReply * reply);
-
-extern void __glXSwapIsDirectReply(ClientPtr client, xGLXIsDirectReply * reply);
-extern void __glXSwapQueryVersionReply(ClientPtr client,
-                                       xGLXQueryVersionReply * reply);
-extern void __glXSwapQueryContextInfoEXTReply(ClientPtr client,
-                                              xGLXQueryContextInfoEXTReply *
-                                              reply, int *buf);
-extern void glxSwapQueryExtensionsStringReply(ClientPtr client,
-                                              xGLXQueryExtensionsStringReply *
-                                              reply, char *buf);
-extern void glxSwapQueryServerStringReply(ClientPtr client,
-                                          xGLXQueryServerStringReply * reply,
-                                          char *buf);
-extern void __glXSwapQueryContextReply(ClientPtr client,
-                                       xGLXQueryContextReply * reply, int *buf);
-extern void __glXSwapGetDrawableAttributesReply(ClientPtr client,
-                                                xGLXGetDrawableAttributesReply *
-                                                reply, int *buf);
-extern void __glXSwapQueryMaxSwapBarriersSGIXReply(ClientPtr client,
-                                                   xGLXQueryMaxSwapBarriersSGIXReply
-                                                   * reply);
-
-/*
- * Routines for computing the size of variably-sized rendering commands.
- */
-
-extern int __glXTypeSize(GLenum enm);
-extern int __glXImageSize(GLenum format, GLenum type, GLsizei w, GLsizei h,
-                          GLint rowLength, GLint skipRows, GLint alignment);
-extern int __glXImage3DSize(GLenum format, GLenum type,
-                            GLsizei w, GLsizei h, GLsizei d,
-                            GLint imageHeight, GLint rowLength,
-                            GLint skipImages, GLint skipRows, GLint alignment);
-
-extern int __glXCallListsReqSize(GLbyte * pc, Bool swap);
-extern int __glXBitmapReqSize(GLbyte * pc, Bool swap);
-extern int __glXFogfvReqSize(GLbyte * pc, Bool swap);
-extern int __glXFogivReqSize(GLbyte * pc, Bool swap);
-extern int __glXLightfvReqSize(GLbyte * pc, Bool swap);
-extern int __glXLightivReqSize(GLbyte * pc, Bool swap);
-extern int __glXLightModelfvReqSize(GLbyte * pc, Bool swap);
-extern int __glXLightModelivReqSize(GLbyte * pc, Bool swap);
-extern int __glXMaterialfvReqSize(GLbyte * pc, Bool swap);
-extern int __glXMaterialivReqSize(GLbyte * pc, Bool swap);
-extern int __glXTexParameterfvReqSize(GLbyte * pc, Bool swap);
-extern int __glXTexParameterivReqSize(GLbyte * pc, Bool swap);
-extern int __glXTexImage1DReqSize(GLbyte * pc, Bool swap);
-extern int __glXTexImage2DReqSize(GLbyte * pc, Bool swap);
-extern int __glXTexEnvfvReqSize(GLbyte * pc, Bool swap);
-extern int __glXTexEnvivReqSize(GLbyte * pc, Bool swap);
-extern int __glXTexGendvReqSize(GLbyte * pc, Bool swap);
-extern int __glXTexGenfvReqSize(GLbyte * pc, Bool swap);
-extern int __glXTexGenivReqSize(GLbyte * pc, Bool swap);
-extern int __glXMap1dReqSize(GLbyte * pc, Bool swap);
-extern int __glXMap1fReqSize(GLbyte * pc, Bool swap);
-extern int __glXMap2dReqSize(GLbyte * pc, Bool swap);
-extern int __glXMap2fReqSize(GLbyte * pc, Bool swap);
-extern int __glXPixelMapfvReqSize(GLbyte * pc, Bool swap);
-extern int __glXPixelMapuivReqSize(GLbyte * pc, Bool swap);
-extern int __glXPixelMapusvReqSize(GLbyte * pc, Bool swap);
-extern int __glXDrawPixelsReqSize(GLbyte * pc, Bool swap);
-extern int __glXDrawArraysSize(GLbyte * pc, Bool swap);
-extern int __glXPrioritizeTexturesReqSize(GLbyte * pc, Bool swap);
-extern int __glXTexSubImage1DReqSize(GLbyte * pc, Bool swap);
-extern int __glXTexSubImage2DReqSize(GLbyte * pc, Bool swap);
-extern int __glXTexImage3DReqSize(GLbyte * pc, Bool swap);
-extern int __glXTexSubImage3DReqSize(GLbyte * pc, Bool swap);
-extern int __glXConvolutionFilter1DReqSize(GLbyte * pc, Bool swap);
-extern int __glXConvolutionFilter2DReqSize(GLbyte * pc, Bool swap);
-extern int __glXConvolutionParameterivReqSize(GLbyte * pc, Bool swap);
-extern int __glXConvolutionParameterfvReqSize(GLbyte * pc, Bool swap);
-extern int __glXSeparableFilter2DReqSize(GLbyte * pc, Bool swap);
-extern int __glXColorTableReqSize(GLbyte * pc, Bool swap);
-extern int __glXColorSubTableReqSize(GLbyte * pc, Bool swap);
-extern int __glXColorTableParameterfvReqSize(GLbyte * pc, Bool swap);
-extern int __glXColorTableParameterivReqSize(GLbyte * pc, Bool swap);
-
-/*
- * Routines for computing the size of returned data.
- */
-extern int __glXConvolutionParameterivSize(GLenum pname);
-extern int __glXConvolutionParameterfvSize(GLenum pname);
-extern int __glXColorTableParameterfvSize(GLenum pname);
-extern int __glXColorTableParameterivSize(GLenum pname);
-
-extern int __glXVersionMajor;
-extern int __glXVersionMinor;
-
-#define __GLX_IS_VERSION_SUPPORTED(major,minor) \
-         ( (__glXVersionMajor > (major)) || \
-           ((__glXVersionMajor == (major)) && (__glXVersionMinor >= (minor))) )
-
-#endif                          /* !__GLX_server_h__ */
diff --git a/hw/dmx/glxProxy/glxsingle.c b/hw/dmx/glxProxy/glxsingle.c
deleted file mode 100644
index e254936..0000000
--- a/hw/dmx/glxProxy/glxsingle.c
+++ /dev/null
@@ -1,1067 +0,0 @@
-/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED */
-/*
- * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
- * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice including the dates of first publication and
- * either this permission notice or a reference to
- * http://oss.sgi.com/projects/FreeB/
- * shall be included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of Silicon Graphics, Inc.
- * shall not be used in advertising or otherwise to promote the sale, use or
- * other dealings in this Software without prior written authorization from
- * Silicon Graphics, Inc.
- */
-
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#include "dmx.h"
-#include "dmxwindow.h"
-#include "dmxpixmap.h"
-#include "dmxfont.h"
-#include "dmxcb.h"
-
-#include "glxserver.h"
-#include "glxext.h"
-#include "g_disptab.h"
-/* #include "g_disptab_EXT.h" */
-#include "unpack.h"
-#include "glxutil.h"
-#include "glxcmds.h"
-#include "glxsingle.h"
-
-#include "GL/glxproto.h"
-
-#ifdef PANORAMIX
-#include "panoramiXsrv.h"
-#endif
-
-/*
- * GetReqSingle - this is the equivalent of GetReq macro
- *    from Xlibint.h but it does not set the reqType field (the opcode).
- *    this is because the GL single opcodes has different naming convension
- *    the other X opcodes (ie. X_GLsop_GetFloatv).
- */
-#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP)
-#define GetReqSingle(name, req) \
-        WORD64ALIGN\
-	if ((dpy->bufptr + SIZEOF(x##name##Req)) > dpy->bufmax)\
-		_XFlush(dpy);\
-	req = (x##name##Req *)(dpy->last_req = dpy->bufptr);\
-	req->length = (SIZEOF(x##name##Req))>>2;\
-	dpy->bufptr += SIZEOF(x##name##Req);\
-	dpy->request++
-
-#else                           /* non-ANSI C uses empty comment instead of "##" for token concatenation */
-#define GetReqSingle(name, req) \
-        WORD64ALIGN\
-	if ((dpy->bufptr + SIZEOF(x/**/name/**/Req)) > dpy->bufmax)\
-		_XFlush(dpy);\
-	req = (x/**/name/**/Req *)(dpy->last_req = dpy->bufptr);\
-	req->length = (SIZEOF(x/**/name/**/Req))>>2;\
-	dpy->bufptr += SIZEOF(x/**/name/**/Req);\
-	dpy->request++
-#endif
-
-#define X_GLXSingle 0           /* needed by GetReqExtra */
-
-static int swap_vec_element_size = 0;
-
-static void
-SendSwappedReply(ClientPtr client,
-                 xGLXSingleReply * reply, char *buf, int buf_size)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_SWAP_SHORT(&reply->sequenceNumber);
-    __GLX_SWAP_INT(&reply->length);
-    __GLX_SWAP_INT(&reply->retval);
-    __GLX_SWAP_INT(&reply->size);
-
-    if ((buf_size == 0) && (swap_vec_element_size > 0)) {
-        /*
-         * the reply has single component - need to swap pad3
-         */
-        if (swap_vec_element_size == 2) {
-            __GLX_SWAP_SHORT(&reply->pad3);
-        }
-        else if (swap_vec_element_size == 4) {
-            __GLX_SWAP_INT(&reply->pad3);
-            __GLX_SWAP_INT(&reply->pad4);       /* some requests use also pad4
-                                                 * i.e GetConvolutionFilter
-                                                 */
-        }
-        else if (swap_vec_element_size == 8) {
-            __GLX_SWAP_DOUBLE(&reply->pad3);
-        }
-    }
-    else if ((buf_size > 0) && (swap_vec_element_size > 0)) {
-        /*
-         * the reply has vector of elements which needs to be swapped
-         */
-        int vsize = buf_size / swap_vec_element_size;
-        char *p = buf;
-        int i;
-
-        for (i = 0; i < vsize; i++) {
-            if (swap_vec_element_size == 2) {
-                __GLX_SWAP_SHORT(p);
-            }
-            else if (swap_vec_element_size == 4) {
-                __GLX_SWAP_INT(p);
-            }
-            else if (swap_vec_element_size == 8) {
-                __GLX_SWAP_DOUBLE(p);
-            }
-
-            p += swap_vec_element_size;
-        }
-
-        /*
-         * swap pad words as well - for case that some single reply uses
-         * them as well
-         */
-        __GLX_SWAP_INT(&reply->pad3);
-        __GLX_SWAP_INT(&reply->pad4);
-        __GLX_SWAP_INT(&reply->pad5);
-        __GLX_SWAP_INT(&reply->pad6);
-
-    }
-
-    WriteToClient(client, sizeof(xGLXSingleReply), reply);
-    if (buf_size > 0)
-        WriteToClient(client, buf_size, buf);
-
-}
-
-int
-__glXForwardSingleReq(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXSingleReq *req = (xGLXSingleReq *) pc;
-    xGLXSingleReq *be_req;
-    __GLXcontext *glxc;
-    int from_screen = 0;
-    int to_screen = 0;
-    int buf_size;
-    int s;
-
-    glxc = __glXLookupContextByTag(cl, req->contextTag);
-    if (!glxc) {
-        return 0;
-    }
-    from_screen = to_screen = glxc->pScreen->myNum;
-
-#ifdef PANORAMIX
-    if (!noPanoramiXExtension) {
-        from_screen = 0;
-        to_screen = screenInfo.numScreens - 1;
-    }
-#endif
-
-    pc += sz_xGLXSingleReq;
-    buf_size = (req->length << 2) - sz_xGLXSingleReq;
-
-    /*
-     * just forward the request to back-end server(s)
-     */
-    for (s = from_screen; s <= to_screen; s++) {
-        DMXScreenInfo *dmxScreen = &dmxScreens[s];
-        Display *dpy = GetBackEndDisplay(cl, s);
-
-        LockDisplay(dpy);
-        GetReqSingle(GLXSingle, be_req);
-        be_req->reqType = dmxScreen->glxMajorOpcode;
-        be_req->glxCode = req->glxCode;
-        be_req->length = req->length;
-        be_req->contextTag = GetCurrentBackEndTag(cl, req->contextTag, s);
-        if (buf_size > 0)
-            _XSend(dpy, (const char *) pc, buf_size);
-        UnlockDisplay(dpy);
-        SyncHandle();
-
-        if (req->glxCode == X_GLsop_Flush) {
-            XFlush(dpy);
-        }
-
-    }
-
-    return Success;
-}
-
-int
-__glXForwardPipe0WithReply(__GLXclientState * cl, GLbyte * pc)
-{
-    ClientPtr client = cl->client;
-    xGLXSingleReq *req = (xGLXSingleReq *) pc;
-    xGLXSingleReq *be_req;
-    xGLXSingleReply reply;
-    xGLXSingleReply be_reply;
-    __GLXcontext *glxc;
-    int buf_size;
-    char *be_buf = NULL;
-    int be_buf_size;
-    DMXScreenInfo *dmxScreen;
-    Display *dpy;
-
-    glxc = __glXLookupContextByTag(cl, req->contextTag);
-    if (!glxc) {
-        return __glXBadContext;
-    }
-
-    pc += sz_xGLXSingleReq;
-    buf_size = (req->length << 2) - sz_xGLXSingleReq;
-
-    dmxScreen = &dmxScreens[glxc->pScreen->myNum];
-    dpy = GetBackEndDisplay(cl, glxc->pScreen->myNum);
-
-    /*
-     * send the request to the first back-end server
-     */
-    LockDisplay(dpy);
-    GetReqSingle(GLXSingle, be_req);
-    be_req->reqType = dmxScreen->glxMajorOpcode;
-    be_req->glxCode = req->glxCode;
-    be_req->length = req->length;
-    be_req->contextTag =
-        GetCurrentBackEndTag(cl, req->contextTag, glxc->pScreen->myNum);
-    if (buf_size > 0)
-        _XSend(dpy, (const char *) pc, buf_size);
-
-    /*
-     * get the reply from the back-end server
-     */
-    _XReply(dpy, (xReply *) &be_reply, 0, False);
-    be_buf_size = be_reply.length << 2;
-    if (be_buf_size > 0) {
-        be_buf = (char *) malloc(be_buf_size);
-        if (be_buf) {
-            _XRead(dpy, be_buf, be_buf_size);
-        }
-        else {
-            /* Throw data on the floor */
-            _XEatDataWords(dpy, be_reply.length);
-            return BadAlloc;
-        }
-    }
-
-    UnlockDisplay(dpy);
-    SyncHandle();
-
-    /*
-     * send the reply to the client
-     */
-    reply = (xGLXSingleReply) {
-        .type = X_Reply,
-        .sequenceNumber = client->sequence,
-        .length = be_reply.length,
-        .retval = be_reply.retval,
-        .size = be_reply.size,
-        .pad3 = be_reply.pad3,
-        .pad4 = be_reply.pad4
-    };
-
-    if (client->swapped) {
-        SendSwappedReply(client, &reply, be_buf, be_buf_size);
-    }
-    else {
-        WriteToClient(client, sizeof(xGLXSingleReply), &reply);
-        if (be_buf_size > 0)
-            WriteToClient(client, be_buf_size, be_buf);
-    }
-
-    if (be_buf_size > 0)
-        free(be_buf);
-
-    return Success;
-}
-
-int
-__glXForwardAllWithReply(__GLXclientState * cl, GLbyte * pc)
-{
-    ClientPtr client = cl->client;
-    xGLXSingleReq *req = (xGLXSingleReq *) pc;
-    xGLXSingleReq *be_req;
-    xGLXSingleReply reply;
-    xGLXSingleReply be_reply;
-    __GLXcontext *glxc;
-    int buf_size;
-    char *be_buf = NULL;
-    int be_buf_size = 0;
-    int from_screen = 0;
-    int to_screen = 0;
-    int s;
-
-    DMXScreenInfo *dmxScreen;
-    Display *dpy;
-
-    glxc = __glXLookupContextByTag(cl, req->contextTag);
-    if (!glxc) {
-        return 0;
-    }
-    from_screen = to_screen = glxc->pScreen->myNum;
-
-#ifdef PANORAMIX
-    if (!noPanoramiXExtension) {
-        from_screen = 0;
-        to_screen = screenInfo.numScreens - 1;
-    }
-#endif
-
-    pc += sz_xGLXSingleReq;
-    buf_size = (req->length << 2) - sz_xGLXSingleReq;
-
-    /*
-     * send the request to the first back-end server(s)
-     */
-    for (s = to_screen; s >= from_screen; s--) {
-        dmxScreen = &dmxScreens[s];
-        dpy = GetBackEndDisplay(cl, s);
-
-        LockDisplay(dpy);
-        GetReqSingle(GLXSingle, be_req);
-        be_req->reqType = dmxScreen->glxMajorOpcode;
-        be_req->glxCode = req->glxCode;
-        be_req->length = req->length;
-        be_req->contextTag = GetCurrentBackEndTag(cl, req->contextTag, s);
-        if (buf_size > 0)
-            _XSend(dpy, (const char *) pc, buf_size);
-
-        /*
-         * get the reply from the back-end server
-         */
-        _XReply(dpy, (xReply *) &be_reply, 0, False);
-        if (s == from_screen) {
-            /* Save data from last reply to send on to client */
-            be_buf_size = be_reply.length << 2;
-            if (be_buf_size > 0) {
-                be_buf = malloc(be_buf_size);
-                if (be_buf) {
-                    _XRead(dpy, be_buf, be_buf_size);
-                }
-                else {
-                    /* Throw data on the floor */
-                    _XEatDataWords(dpy, be_reply.length);
-                    return BadAlloc;
-                }
-            }
-        }
-        else {
-            /* Just discard data from all replies before the last one */
-            if (be_reply.length > 0)
-                _XEatDataWords(dpy, be_reply.length);
-        }
-
-        UnlockDisplay(dpy);
-        SyncHandle();
-    }
-
-    /*
-     * send the reply to the client
-     */
-    reply = (xGLXSingleReply) {
-        .type = X_Reply,
-        .sequenceNumber = client->sequence,
-        .length = be_reply.length,
-        .retval = be_reply.retval,
-        .size = be_reply.size,
-        .pad3 = be_reply.pad3,
-        .pad4 = be_reply.pad4
-    };
-
-    if (client->swapped) {
-        SendSwappedReply(client, &reply, be_buf, be_buf_size);
-    }
-    else {
-        WriteToClient(client, sizeof(xGLXSingleReply), &reply);
-        if (be_buf_size > 0)
-            WriteToClient(client, be_buf_size, be_buf);
-    }
-
-    if (be_buf_size > 0)
-        free(be_buf);
-
-    return Success;
-}
-
-int
-__glXForwardSingleReqSwap(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXSingleReq *req = (xGLXSingleReq *) pc;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_SHORT(&req->length);
-    __GLX_SWAP_INT(&req->contextTag);
-
-    swap_vec_element_size = 0;
-
-    /*
-     * swap extra data in request - assuming all data
-     * (if available) are arrays of 4 bytes components !
-     */
-    if (req->length > sz_xGLXSingleReq / 4) {
-        int *data = (int *) (req + 1);
-        int count = req->length - sz_xGLXSingleReq / 4;
-
-        __GLX_SWAP_INT_ARRAY(data, count);
-    }
-
-    return (__glXForwardSingleReq(cl, pc));
-}
-
-int
-__glXForwardPipe0WithReplySwap(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXSingleReq *req = (xGLXSingleReq *) pc;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_SHORT(&req->length);
-    __GLX_SWAP_INT(&req->contextTag);
-
-    swap_vec_element_size = 0;
-
-    /*
-     * swap extra data in request - assuming all data
-     * (if available) are arrays of 4 bytes components !
-     */
-    if (req->length > sz_xGLXSingleReq / 4) {
-        int *data = (int *) (req + 1);
-        int count = req->length - sz_xGLXSingleReq / 4;
-
-        __GLX_SWAP_INT_ARRAY(data, count);
-    }
-
-    return (__glXForwardPipe0WithReply(cl, pc));
-}
-
-int
-__glXForwardPipe0WithReplySwapsv(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXSingleReq *req = (xGLXSingleReq *) pc;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_SHORT(&req->length);
-    __GLX_SWAP_INT(&req->contextTag);
-
-    swap_vec_element_size = 2;
-
-    /*
-     * swap extra data in request - assuming all data
-     * (if available) are arrays of 4 bytes components !
-     */
-    if (req->length > sz_xGLXSingleReq / 4) {
-        int *data = (int *) (req + 1);
-        int count = req->length - sz_xGLXSingleReq / 4;
-
-        __GLX_SWAP_INT_ARRAY(data, count);
-    }
-
-    return (__glXForwardPipe0WithReply(cl, pc));
-}
-
-int
-__glXForwardPipe0WithReplySwapiv(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXSingleReq *req = (xGLXSingleReq *) pc;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_SHORT(&req->length);
-    __GLX_SWAP_INT(&req->contextTag);
-
-    swap_vec_element_size = 4;
-
-    /*
-     * swap extra data in request - assuming all data
-     * (if available) are arrays of 4 bytes components !
-     */
-    if (req->length > sz_xGLXSingleReq / 4) {
-        int *data = (int *) (req + 1);
-        int count = req->length - sz_xGLXSingleReq / 4;
-
-        __GLX_SWAP_INT_ARRAY(data, count);
-    }
-
-    return (__glXForwardPipe0WithReply(cl, pc));
-}
-
-int
-__glXForwardPipe0WithReplySwapdv(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXSingleReq *req = (xGLXSingleReq *) pc;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_SHORT(&req->length);
-    __GLX_SWAP_INT(&req->contextTag);
-
-    swap_vec_element_size = 8;
-
-    /*
-     * swap extra data in request - assuming all data
-     * (if available) are arrays of 4 bytes components !
-     */
-    if (req->length > sz_xGLXSingleReq / 4) {
-        int *data = (int *) (req + 1);
-        int count = req->length - sz_xGLXSingleReq / 4;
-
-        __GLX_SWAP_INT_ARRAY(data, count);
-    }
-
-    return (__glXForwardPipe0WithReply(cl, pc));
-}
-
-int
-__glXForwardAllWithReplySwap(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXSingleReq *req = (xGLXSingleReq *) pc;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_SHORT(&req->length);
-    __GLX_SWAP_INT(&req->contextTag);
-
-    swap_vec_element_size = 0;
-
-    /*
-     * swap extra data in request - assuming all data
-     * (if available) are arrays of 4 bytes components !
-     */
-    if (req->length > sz_xGLXSingleReq / 4) {
-        int *data = (int *) (req + 1);
-        int count = req->length - sz_xGLXSingleReq / 4;
-
-        __GLX_SWAP_INT_ARRAY(data, count);
-    }
-
-    return (__glXForwardAllWithReply(cl, pc));
-}
-
-int
-__glXForwardAllWithReplySwapsv(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXSingleReq *req = (xGLXSingleReq *) pc;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_SHORT(&req->length);
-    __GLX_SWAP_INT(&req->contextTag);
-
-    swap_vec_element_size = 2;
-
-    /*
-     * swap extra data in request - assuming all data
-     * (if available) are arrays of 4 bytes components !
-     */
-    if (req->length > sz_xGLXSingleReq / 4) {
-        int *data = (int *) (req + 1);
-        int count = req->length - sz_xGLXSingleReq / 4;
-
-        __GLX_SWAP_INT_ARRAY(data, count);
-    }
-
-    return (__glXForwardAllWithReply(cl, pc));
-}
-
-int
-__glXForwardAllWithReplySwapiv(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXSingleReq *req = (xGLXSingleReq *) pc;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_SHORT(&req->length);
-    __GLX_SWAP_INT(&req->contextTag);
-
-    swap_vec_element_size = 4;
-
-    /*
-     * swap extra data in request - assuming all data
-     * (if available) are arrays of 4 bytes components !
-     */
-    if (req->length > sz_xGLXSingleReq / 4) {
-        int *data = (int *) (req + 1);
-        int count = req->length - sz_xGLXSingleReq / 4;
-
-        __GLX_SWAP_INT_ARRAY(data, count);
-    }
-
-    return (__glXForwardAllWithReply(cl, pc));
-}
-
-int
-__glXForwardAllWithReplySwapdv(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXSingleReq *req = (xGLXSingleReq *) pc;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_SHORT(&req->length);
-    __GLX_SWAP_INT(&req->contextTag);
-
-    swap_vec_element_size = 8;
-
-    /*
-     * swap extra data in request - assuming all data
-     * (if available) are arrays of 4 bytes components !
-     */
-    if (req->length > sz_xGLXSingleReq / 4) {
-        int *data = (int *) (req + 1);
-        int count = req->length - sz_xGLXSingleReq / 4;
-
-        __GLX_SWAP_INT_ARRAY(data, count);
-    }
-
-    return (__glXForwardAllWithReply(cl, pc));
-}
-
-static GLint
-__glReadPixels_size(GLenum format, GLenum type, GLint w, GLint h,
-                    int *elementbits_return, int *rowbytes_return)
-{
-    GLint elements, esize;
-    GLint rowsize, padding;
-
-    if (w < 0 || h < 0) {
-        return -1;
-    }
-    switch (format) {
-    case GL_COLOR_INDEX:
-    case GL_STENCIL_INDEX:
-    case GL_DEPTH_COMPONENT:
-        elements = 1;
-        break;
-    case GL_RED:
-    case GL_GREEN:
-    case GL_BLUE:
-    case GL_ALPHA:
-    case GL_LUMINANCE:
-        elements = 1;
-        break;
-    case GL_LUMINANCE_ALPHA:
-        elements = 2;
-        break;
-    case GL_RGB:
-    case GL_BGR:
-        elements = 3;
-        break;
-    case GL_RGBA:
-    case GL_BGRA:
-    case GL_ABGR_EXT:
-        elements = 4;
-        break;
-    default:
-        return -1;
-    }
-    /*
-     ** According to the GLX protocol, each row must be padded to a multiple of
-     ** 4 bytes.  4 bytes also happens to be the default alignment in the pixel
-     ** store modes of the GL.
-     */
-    switch (type) {
-    case GL_BITMAP:
-        if (format == GL_COLOR_INDEX || format == GL_STENCIL_INDEX) {
-            rowsize = ((w * elements) + 7) / 8;
-            padding = rowsize % 4;
-            if (padding) {
-                rowsize += 4 - padding;
-            }
-            if (elementbits_return)
-                *elementbits_return = elements;
-            if (rowbytes_return)
-                *rowbytes_return = rowsize;
-            return rowsize * h;
-        }
-        else {
-            return -1;
-        }
-    case GL_BYTE:
-    case GL_UNSIGNED_BYTE:
-        esize = 1;
-        break;
-    case GL_UNSIGNED_BYTE_3_3_2:
-    case GL_UNSIGNED_BYTE_2_3_3_REV:
-        esize = 1;
-        elements = 1;
-        break;
-    case GL_SHORT:
-    case GL_UNSIGNED_SHORT:
-        esize = 2;
-        break;
-    case GL_UNSIGNED_SHORT_5_6_5:
-    case GL_UNSIGNED_SHORT_5_6_5_REV:
-    case GL_UNSIGNED_SHORT_4_4_4_4:
-    case GL_UNSIGNED_SHORT_4_4_4_4_REV:
-    case GL_UNSIGNED_SHORT_5_5_5_1:
-    case GL_UNSIGNED_SHORT_1_5_5_5_REV:
-        esize = 2;
-        elements = 1;
-        break;
-    case GL_INT:
-    case GL_UNSIGNED_INT:
-    case GL_FLOAT:
-        esize = 4;
-        break;
-    case GL_UNSIGNED_INT_8_8_8_8:
-    case GL_UNSIGNED_INT_8_8_8_8_REV:
-    case GL_UNSIGNED_INT_10_10_10_2:
-    case GL_UNSIGNED_INT_2_10_10_10_REV:
-        esize = 4;
-        elements = 1;
-        break;
-    default:
-        return -1;
-    }
-    rowsize = w * elements * esize;
-    padding = rowsize % 4;
-    if (padding) {
-        rowsize += 4 - padding;
-    }
-
-    if (elementbits_return)
-        *elementbits_return = esize * elements * 8;
-    if (rowbytes_return)
-        *rowbytes_return = rowsize;
-
-    return rowsize * h;
-}
-
-static int
-intersectRect(int x1, int x2, int y1, int y2,
-              int X1, int X2, int Y1, int Y2,
-              int *ix1, int *ix2, int *iy1, int *iy2)
-{
-    int right = (x2 < X2 ? x2 : X2);
-    int bottom = (y2 < Y2 ? y2 : Y2);
-    int left = (x1 > X1 ? x1 : X1);
-    int top = (y1 > Y1 ? y1 : Y1);
-    int width = right - left + 1;
-    int height = bottom - top + 1;
-
-    if ((width <= 0) || (height <= 0)) {
-        *ix1 = *ix2 = *iy1 = *iy2 = 0;
-        return 0;
-    }
-    else {
-        *ix1 = left;
-        *ix2 = right;
-        *iy1 = top;
-        *iy2 = bottom;
-        return width * height;
-    }
-
-}
-
-int
-__glXDisp_ReadPixels(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXSingleReq *req = (xGLXSingleReq *) pc;
-    xGLXSingleReq *be_req;
-    xGLXReadPixelsReply reply;
-    xGLXReadPixelsReply be_reply;
-    GLbyte *be_pc;
-    GLint x, y;
-    GLsizei width, height;
-    GLenum format, type;
-    GLboolean swapBytes, lsbFirst;
-    ClientPtr client = cl->client;
-    DrawablePtr pDraw;
-    __GLXcontext *glxc;
-    int from_screen = 0;
-    int to_screen = 0;
-    char *buf;
-    int buf_size;
-    int s;
-    int win_x1, win_x2;
-    int win_y1, win_y2;
-    int ebits, rowsize;
-
-    if (client->swapped) {
-        __GLX_DECLARE_SWAP_VARIABLES;
-        __GLX_SWAP_INT(&req->contextTag);
-    }
-
-    glxc = __glXLookupContextByTag(cl, req->contextTag);
-    if (!glxc) {
-        return 0;
-    }
-    from_screen = to_screen = glxc->pScreen->myNum;
-
-#ifdef PANORAMIX
-    if (!noPanoramiXExtension) {
-        from_screen = 0;
-        to_screen = screenInfo.numScreens - 1;
-    }
-#endif
-
-    pc += sz_xGLXSingleReq;
-    x = *(GLint *) (pc + 0);
-    y = *(GLint *) (pc + 4);
-    width = *(GLsizei *) (pc + 8);
-    height = *(GLsizei *) (pc + 12);
-    format = *(GLenum *) (pc + 16);
-    type = *(GLenum *) (pc + 20);
-    swapBytes = *(GLboolean *) (pc + 24);
-    lsbFirst = *(GLboolean *) (pc + 25);
-
-    if (client->swapped) {
-        __GLX_DECLARE_SWAP_VARIABLES;
-        __GLX_SWAP_INT(&x);
-        __GLX_SWAP_INT(&y);
-        __GLX_SWAP_INT(&width);
-        __GLX_SWAP_INT(&height);
-        __GLX_SWAP_INT(&format);
-        __GLX_SWAP_INT(&type);
-        swapBytes = !swapBytes;
-    }
-
-    buf_size =
-        __glReadPixels_size(format, type, width, height, &ebits, &rowsize);
-    if (buf_size > 0) {
-        buf = (char *) malloc(buf_size);
-        if (!buf) {
-            return BadAlloc;
-        }
-    }
-    else {
-        buf_size = 0;
-        buf = NULL;
-    }
-
-    if (buf_size > 0) {
-        /*
-         * Get the current drawable this context is bound to
-         */
-        pDraw = __glXLookupDrawableByTag(cl, req->contextTag);
-        win_x1 = pDraw->x + x;
-        win_x2 = win_x1 + width - 1;
-        win_y1 = (dmxGlobalHeight - pDraw->y - pDraw->height) + y;
-        win_y2 = win_y1 + height - 1;
-        if (pDraw->type != DRAWABLE_WINDOW) {
-            from_screen = to_screen = 0;
-        }
-
-        for (s = from_screen; s <= to_screen; s++) {
-            DMXScreenInfo *dmxScreen = &dmxScreens[s];
-            Display *dpy = GetBackEndDisplay(cl, s);
-            int scr_x1 = dmxScreen->rootXOrigin;
-            int scr_x2 = dmxScreen->rootXOrigin + dmxScreen->scrnWidth - 1;
-            int scr_y1 = dmxScreen->rootYOrigin;
-            int scr_y2 = dmxScreen->rootYOrigin + dmxScreen->scrnHeight - 1;
-            int wx1, wx2, wy1, wy2;
-            int sx, sy, sw, sh;
-            int npixels;
-
-            /*
-             * find the window portion that is on the current screen
-             */
-            if (pDraw->type == DRAWABLE_WINDOW) {
-                npixels = intersectRect(scr_x1, scr_x2, scr_y1, scr_y2,
-                                        win_x1, win_x2, win_y1, win_y2,
-                                        &wx1, &wx2, &wy1, &wy2);
-            }
-            else {
-                wx1 = win_x1;
-                wx2 = win_x2;
-                wy1 = win_y1;
-                wy2 = win_y2;
-                npixels = (wx2 - wx1 + 1) * (wy2 - wy1 + 1);
-            }
-
-            if (npixels > 0) {
-
-                /* send the request to the back-end server */
-                LockDisplay(dpy);
-                GetReqExtra(GLXSingle, __GLX_PAD(26), be_req);
-                be_req->reqType = dmxScreen->glxMajorOpcode;
-                be_req->glxCode = X_GLsop_ReadPixels;
-                be_req->contextTag =
-                    GetCurrentBackEndTag(cl, req->contextTag, s);
-                be_pc = ((GLbyte *) (be_req) + sz_xGLXSingleReq);
-
-                sx = wx1 - pDraw->x;
-                sy = wy1 - (dmxGlobalHeight - pDraw->y - pDraw->height);
-                sw = (wx2 - wx1 + 1);
-                sh = (wy2 - wy1 + 1);
-
-                *(GLint *) (be_pc + 0) = sx;    /* x */
-                *(GLint *) (be_pc + 4) = sy;    /* y */
-                *(GLsizei *) (be_pc + 8) = sw;  /* width */
-                *(GLsizei *) (be_pc + 12) = sh; /* height */
-                *(GLenum *) (be_pc + 16) = format;
-                *(GLenum *) (be_pc + 20) = type;
-                *(GLboolean *) (be_pc + 24) = swapBytes;
-                *(GLboolean *) (be_pc + 25) = lsbFirst;
-
-                _XReply(dpy, (xReply *) &be_reply, 0, False);
-
-                if (be_reply.length > 0) {
-                    char *be_buf;
-                    int be_buf_size = be_reply.length << 2;
-
-                    be_buf = (char *) malloc(be_buf_size);
-                    if (be_buf) {
-                        _XRead(dpy, be_buf, be_buf_size);
-
-                        /* copy pixels data to the right location of the */
-                        /* reply buffer */
-                        if (type != GL_BITMAP) {
-                            int pbytes = ebits / 8;
-                            char *dst =
-                                buf + (sy - y) * rowsize + (sx - x) * pbytes;
-                            char *src = be_buf;
-                            int pad = (pbytes * sw) % 4;
-                            int r;
-
-                            for (r = 0; r < sh; r++) {
-                                memcpy(dst, src, pbytes * sw);
-                                dst += rowsize;
-                                src += (pbytes * sw + (pad ? 4 - pad : 0));
-                            }
-                        }
-                        else {
-                            /* this is a GL_BITMAP pixel type, should copy bits */
-                            int r;
-                            int src_rowsize = bits_to_bytes(sw * ebits);
-                            int src_pad = src_rowsize % 4;
-
-                            if (src_pad) {
-                                src_rowsize += (4 - src_pad);
-                            }
-
-                            for (r = 0; r < sh; r++) {
-                                unsigned char dst_mask = 0x80 >> (sx % 8);
-                                unsigned char src_mask = 0x80;
-                                char *dst =
-                                    buf + (sy - y + r) * rowsize + (sx - x) / 8;
-                                char *src = be_buf + r * src_rowsize;
-                                int b;
-
-                                for (b = 0; b < sw * ebits; b++) {
-                                    if (*src & src_mask) {
-                                        *dst |= dst_mask;
-                                    }
-                                    else {
-                                        *dst &= ~dst_mask;
-                                    }
-
-                                    if (dst_mask > 1)
-                                        dst_mask >>= 1;
-                                    else {
-                                        dst_mask = 0x80;
-                                        dst++;
-                                    }
-
-                                    if (src_mask > 1)
-                                        src_mask >>= 1;
-                                    else {
-                                        src_mask = 0x80;
-                                        src++;
-                                    }
-                                }
-                            }
-
-                        }
-
-                        free(be_buf);
-                    }
-                    else {
-                        /* Throw data on the floor */
-                        _XEatDataWords(dpy, be_reply.length);
-                        free(buf);
-                        return BadAlloc;
-                    }
-                }
-
-                UnlockDisplay(dpy);
-                SyncHandle();
-
-            }                   /* of npixels > 0 */
-
-        }                       /* of for loop */
-
-    }                           /* of if buf_size > 0 */
-
-    reply = (xGLXReadPixelsReply) {
-        .type = X_Reply,
-        .sequenceNumber = client->sequence,
-        .length = buf_size >> 2
-    };
-
-    if (client->swapped) {
-        __GLX_DECLARE_SWAP_VARIABLES;
-        __GLX_SWAP_SHORT(&reply.sequenceNumber);
-        __GLX_SWAP_INT(&reply.length);
-    }
-
-    WriteToClient(client, sizeof(xGLXReadPixelsReply), &reply);
-    if (buf_size > 0) {
-        WriteToClient(client, buf_size, buf);
-        free(buf);
-    }
-
-    return Success;
-}
-
-int
-__glXDispSwap_GetTexImage(__GLXclientState * cl, GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    GLbyte *lpc = pc;
-
-    lpc += sz_xGLXSingleReq;
-    __GLX_SWAP_INT(lpc + 0);
-    __GLX_SWAP_INT(lpc + 4);
-    __GLX_SWAP_INT(lpc + 8);
-    __GLX_SWAP_INT(lpc + 12);
-
-    /* reverse swapBytes */
-    *(GLboolean *) (lpc + 16) = !*(GLboolean *) (lpc + 16);
-
-    return (__glXForwardPipe0WithReplySwap(cl, pc));
-}
-
-int
-__glXDispSwap_GetColorTable(__GLXclientState * cl, GLbyte * pc)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    GLbyte *lpc = pc;
-
-    lpc += sz_xGLXSingleReq;
-    __GLX_SWAP_INT(lpc + 0);
-    __GLX_SWAP_INT(lpc + 4);
-    __GLX_SWAP_INT(lpc + 8);
-
-    /* reverse swapBytes */
-    *(GLboolean *) (lpc + 12) = !*(GLboolean *) (lpc + 12);
-
-    return (__glXForwardPipe0WithReplySwap(cl, pc));
-}
diff --git a/hw/dmx/glxProxy/glxsingle.h b/hw/dmx/glxProxy/glxsingle.h
deleted file mode 100644
index 6126177..0000000
--- a/hw/dmx/glxProxy/glxsingle.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
- * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice including the dates of first publication and
- * either this permission notice or a reference to
- * http://oss.sgi.com/projects/FreeB/
- * shall be included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of Silicon Graphics, Inc.
- * shall not be used in advertising or otherwise to promote the sale, use or
- * other dealings in this Software without prior written authorization from
- * Silicon Graphics, Inc.
- */
-
-#ifndef __GLXSINGLE_H
-#define __GLXSINGLE_H
-
-extern int __glXForwardSingleReq(__GLXclientState * cl, GLbyte * pc);
-extern int __glXForwardPipe0WithReply(__GLXclientState * cl, GLbyte * pc);
-extern int __glXForwardAllWithReply(__GLXclientState * cl, GLbyte * pc);
-
-extern int __glXForwardSingleReqSwap(__GLXclientState * cl, GLbyte * pc);
-
-extern int __glXForwardPipe0WithReplySwap(__GLXclientState * cl, GLbyte * pc);
-extern int __glXForwardPipe0WithReplySwapsv(__GLXclientState * cl, GLbyte * pc);
-extern int __glXForwardPipe0WithReplySwapiv(__GLXclientState * cl, GLbyte * pc);
-extern int __glXForwardPipe0WithReplySwapdv(__GLXclientState * cl, GLbyte * pc);
-
-extern int __glXForwardAllWithReplySwap(__GLXclientState * cl, GLbyte * pc);
-extern int __glXForwardAllWithReplySwapsv(__GLXclientState * cl, GLbyte * pc);
-extern int __glXForwardAllWithReplySwapiv(__GLXclientState * cl, GLbyte * pc);
-extern int __glXForwardAllWithReplySwapdv(__GLXclientState * cl, GLbyte * pc);
-
-#endif
diff --git a/hw/dmx/glxProxy/glxswap.c b/hw/dmx/glxProxy/glxswap.c
deleted file mode 100644
index bc18e55..0000000
--- a/hw/dmx/glxProxy/glxswap.c
+++ /dev/null
@@ -1,560 +0,0 @@
-/*
- * Copyright 2003 Red Hat Inc., Raleigh, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Kevin E. Martin <kem@redhat.com>
- *
- */
-
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#include "dmx.h"
-#include "dmxwindow.h"
-#include "glxserver.h"
-#include "glxswap.h"
-#include "glxcmds.h"
-
-typedef struct _SwapGroup *SwapGroupPtr;
-
-static Bool SwapBarrierIsReadyToSwap(GLuint barrier);
-static void SwapSwapBarrier(GLuint barrier);
-static void UpdateSwapBarrierList(GLuint barrier,
-                                  SwapGroupPtr pOldSwap, SwapGroupPtr pNewSwap);
-
-/************************************************************************
- *
- * Swap Groups
- *
- ************************************************************************/
-
-typedef struct _SwapGroup {
-    WindowPtr pWin;
-    SwapGroupPtr pNext;
-
-    Bool swapping;
-    Bool sleeping;
-    GLuint barrier;
-
-    XID drawable;
-    GLXContextTag tag;
-    __GLXclientState *clState;
-} SwapGroupRec;
-
-static void
-SwapSwapGroup(SwapGroupPtr pSwap)
-{
-    SwapGroupPtr pCur;
-
-    /* All drawables in swap group are ready to swap, so just swap all
-     * drawables buffers and then wake up those clients that were
-     * previously sleeping */
-
-    for (pCur = pSwap; pCur; pCur = pCur->pNext) {
-        if (pCur->swapping) {
-            /* Swap pCur's buffers */
-            __glXDoSwapBuffers(pCur->clState, pCur->drawable, pCur->tag);
-            pCur->swapping = FALSE;
-        }
-
-        /* Wakeup client */
-        if (pCur->sleeping) {
-            ClientWakeup(pCur->clState->client);
-            pCur->sleeping = FALSE;
-        }
-    }
-}
-
-static Bool
-SwapGroupIsReadyToSwap(SwapGroupPtr pSwap)
-{
-    Bool isReady = TRUE;
-
-    /* The swap group is ready to swap when all drawables are ready to
-     * swap.  NOTE: A drawable is also ready to swap if it is not
-     * currently mapped */
-    for (; pSwap; pSwap = pSwap->pNext) {
-        isReady &= (pSwap->swapping || !pSwap->pWin->mapped);
-        /* FIXME: Should we use pSwap->pWin->mapped or ...->realized ??? */
-    }
-
-    return isReady;
-}
-
-static Bool
-SGSwapCleanup(ClientPtr client, void *closure)
-{
-    /* SwapGroupPtr  pSwap = (SwapGroupPtr)closure; */
-
-    /* This should not be called unless the client has died in which
-     * case we should remove the buffer from the swap list */
-
-    return TRUE;
-}
-
-int
-SGSwapBuffers(__GLXclientState * cl, XID drawId, GLXContextTag tag,
-              DrawablePtr pDraw)
-{
-    WindowPtr pWin = (WindowPtr) pDraw;
-    dmxWinPrivPtr pWinPriv = DMX_GET_WINDOW_PRIV(pWin);
-    SwapGroupPtr pSwap = pWinPriv->swapGroup;
-    SwapGroupPtr pCur;
-
-    for (pCur = pSwap; pCur && pCur->pWin != pWin; pCur = pCur->pNext);
-    if (!pCur)
-        return BadDrawable;
-
-    pCur->clState = cl;
-    pCur->drawable = drawId;
-    pCur->tag = tag;
-
-    /* We are now in the process of swapping */
-    pCur->swapping = TRUE;
-
-    if (pSwap->barrier && SwapBarrierIsReadyToSwap(pSwap->barrier)) {
-        /* The swap group is bound to a barrier and the barrier is ready
-         * to swap, so swap all the swap groups that are bound to this
-         * group's swap barrier */
-        SwapSwapBarrier(pSwap->barrier);
-    }
-    else if (!pSwap->barrier && SwapGroupIsReadyToSwap(pSwap)) {
-        /* Do the swap if the entire swap group is ready to swap and the
-         * group is not bound to a swap barrier */
-        SwapSwapGroup(pSwap);
-    }
-    else {
-        /* The swap group/barrier is not yet ready to swap, so put
-         * client to sleep until the rest are ready to swap */
-        ClientSleep(cl->client, SGSwapCleanup, (void *) pWin);
-        pCur->sleeping = TRUE;
-    }
-
-    return Success;
-}
-
-static void
-SGWindowUnmapped(WindowPtr pWin)
-{
-    dmxWinPrivPtr pWinPriv = DMX_GET_WINDOW_PRIV(pWin);
-    SwapGroupPtr pSwap = pWinPriv->swapGroup;
-
-    /* Now that one of the windows in the swap group has been unmapped,
-     * see if the entire swap group/barrier is ready to swap */
-
-    if (pSwap->barrier && SwapBarrierIsReadyToSwap(pSwap->barrier)) {
-        SwapSwapBarrier(pSwap->barrier);
-    }
-    else if (!pSwap->barrier && SwapGroupIsReadyToSwap(pSwap)) {
-        SwapSwapGroup(pSwap);
-    }
-}
-
-static void
-SGWindowDestroyed(WindowPtr pWin)
-{
-    JoinSwapGroupSGIX((DrawablePtr) pWin, NULL);
-}
-
-static SwapGroupPtr
-CreateSwapEntry(WindowPtr pWin)
-{
-    SwapGroupPtr pEntry;
-
-    /* Allocate new swap group */
-    pEntry = malloc(sizeof(*pEntry));
-    if (!pEntry)
-        return NULL;
-
-    /* Initialize swap group */
-    pEntry->pWin = pWin;
-    pEntry->pNext = NULL;
-    pEntry->swapping = FALSE;
-    pEntry->sleeping = FALSE;
-    pEntry->barrier = 0;
-    /* The following are not initialized until SwapBuffers is called:
-     *     pEntry->drawable
-     *     pEntry->tag
-     *     pEntry->clState
-     */
-
-    return pEntry;
-}
-
-static void
-FreeSwapEntry(SwapGroupPtr pEntry)
-{
-    /* Since we have removed the drawable from its previous swap group
-     * and it won't be added to another swap group, the only thing that
-     * we need to do is to make sure that the drawable's client is not
-     * sleeping.  This could happen if one thread is sleeping, while
-     * another thread called glxJoinSwapGroup().  Note that all sleeping
-     * threads should also be swapping, but there is a small window in
-     * the SGSwapBuffer() logic, above, where swapping can be set but
-     * sleeping is not.  We check both independently here just to be
-     * pedantic. */
-
-    /* Handle swap buffer request */
-    if (pEntry->swapping)
-        __glXDoSwapBuffers(pEntry->clState, pEntry->drawable, pEntry->tag);
-
-    /* Wake up client */
-    if (pEntry->sleeping)
-        ClientWakeup(pEntry->clState->client);
-
-    /* We can free the pEntry entry since it has already been removed
-     * from the swap group list and it won't be needed any longer */
-    free(pEntry);
-}
-
-int
-JoinSwapGroupSGIX(DrawablePtr pDraw, DrawablePtr pMember)
-{
-    if (pDraw->type == DRAWABLE_WINDOW) {
-        WindowPtr pWin = (WindowPtr) pDraw;
-        dmxWinPrivPtr pWinPriv = DMX_GET_WINDOW_PRIV(pWin);
-        SwapGroupPtr pOldSwap = NULL;
-        SwapGroupPtr pEntry;
-
-        /* If pDraw and pMember are already members of the same swap
-         * group, just return Success since there is nothing to do */
-        for (pEntry = pWinPriv->swapGroup; pEntry; pEntry = pEntry->pNext)
-            if (pEntry->pWin == (WindowPtr) pMember)
-                return Success;
-
-        /* Remove pDraw from its current swap group */
-        if (pWinPriv->swapGroup) {
-            SwapGroupPtr pSwapGroup = pWinPriv->swapGroup;
-            SwapGroupPtr pPrev;
-
-            /* Find old swap entry in swap group and save in pOldSwap
-             * for later use */
-            for (pOldSwap = pWinPriv->swapGroup, pPrev = NULL;
-                 pOldSwap && pOldSwap->pWin != pWin;
-                 pPrev = pOldSwap, pOldSwap = pOldSwap->pNext);
-            if (!pOldSwap)
-                return BadDrawable;
-
-            /* Remove pDraw's swap group entry from swap group list */
-            if (pPrev) {
-                pPrev->pNext = pOldSwap->pNext;
-            }
-            else {
-                /* pWin is at the head of the swap group list, so we
-                 * need to update all other members of this swap
-                 * group */
-                for (pEntry = pOldSwap->pNext; pEntry; pEntry = pEntry->pNext)
-                    DMX_GET_WINDOW_PRIV(pEntry->pWin)->swapGroup
-                        = pOldSwap->pNext;
-
-                /* Update the barrier list as well */
-                if (pOldSwap->barrier)
-                    UpdateSwapBarrierList(pOldSwap->barrier,
-                                          pOldSwap, pOldSwap->pNext);
-
-                /* Set pSwapGroup to point to the swap group without
-                 * pOldSwap */
-                pSwapGroup = pOldSwap->pNext;
-            }
-
-            /* Check to see if current swap group can now swap since we
-             * know at this point that pDraw and pMember are guaranteed
-             * to previously be in different swap groups */
-            if (pSwapGroup && SwapGroupIsReadyToSwap(pSwapGroup)) {
-                SwapSwapGroup(pSwapGroup);
-            }
-
-            /* Make the old swap entry a standalone group */
-            pOldSwap->pNext = NULL;
-            pOldSwap->barrier = 0;
-
-            /* Reset pWin's swap group */
-            pWinPriv->swapGroup = NULL;
-            pWinPriv->windowDestroyed = NULL;
-            pWinPriv->windowUnmapped = NULL;
-        }
-
-        if (!pMember || pMember->type != DRAWABLE_WINDOW) {
-            /* Free old swap group since it is no longer needed */
-            if (pOldSwap)
-                FreeSwapEntry(pOldSwap);
-        }
-        else if (pDraw == pMember && pOldSwap) {
-            /* Special case where pDraw was previously created and we
-             * are now just putting it to its own swap group */
-            pWinPriv->swapGroup = pOldSwap;
-            pWinPriv->windowDestroyed = SGWindowDestroyed;
-            pWinPriv->windowUnmapped = SGWindowUnmapped;
-
-            /* Check to see if pDraw is ready to swap */
-            if (SwapGroupIsReadyToSwap(pOldSwap))
-                SwapSwapGroup(pOldSwap);
-        }
-        else if (pMember->type == DRAWABLE_WINDOW) {
-            WindowPtr pMemberWin = (WindowPtr) pMember;
-            dmxWinPrivPtr pMemberPriv = DMX_GET_WINDOW_PRIV(pMemberWin);
-            SwapGroupPtr pMemberSwapGroup = pMemberPriv->swapGroup;
-
-            /* Finally, how we can add pDraw to pMember's swap group */
-
-            /* If pMember is not currently in a swap group, then create
-             * one for it since we are just about to add pDraw to it. */
-            if (!pMemberSwapGroup) {
-                /* Create new swap group */
-                pMemberSwapGroup = CreateSwapEntry(pMemberWin);
-                if (!pMemberSwapGroup) {
-                    if (pOldSwap)
-                        FreeSwapEntry(pOldSwap);
-                    return BadAlloc;
-                }
-
-                /* Set pMember's swap group */
-                pMemberPriv->swapGroup = pMemberSwapGroup;
-                pMemberPriv->windowDestroyed = SGWindowDestroyed;
-                pMemberPriv->windowUnmapped = SGWindowUnmapped;
-            }
-
-            /* If pDraw == pMember, that means pDraw was not a member of
-             * a group previously (or it would have been handled by the
-             * special case above), so no additional work is required
-             * since we just created a new swap group for pMember (i.e.,
-             * pDraw). */
-
-            if (pDraw != pMember) {
-                /* If pDraw was not previously in a swap group, then create
-                 * an entry for it */
-                if (!pOldSwap) {
-                    /* Create new swap group */
-                    pOldSwap = CreateSwapEntry(pWin);
-                    if (!pOldSwap) {
-                        /* If we just created a swap group for pMember, we
-                         * need to free it here */
-                        if (pMemberSwapGroup->pNext == NULL) {
-                            FreeSwapEntry(pMemberSwapGroup);
-                            pMemberPriv->swapGroup = NULL;
-                        }
-                        return BadAlloc;
-                    }
-                }
-
-                /* Find last entry in pMember's swap group */
-                for (pEntry = pMemberSwapGroup;
-                     pEntry->pNext; pEntry = pEntry->pNext);
-
-                /* Add pDraw's swap group entry to pMember's swap group list */
-                pEntry->pNext = pOldSwap;
-
-                /* Add pDraw to pMember's swap barrier */
-                pOldSwap->barrier = pEntry->barrier;
-
-                /* Set pDraw's swap group */
-                pWinPriv->swapGroup = pMemberSwapGroup;
-                pWinPriv->windowDestroyed = SGWindowDestroyed;
-                pWinPriv->windowUnmapped = SGWindowUnmapped;
-            }
-        }
-    }
-
-    return Success;
-}
-
-/************************************************************************
- *
- * Swap Barriers
- *
- ************************************************************************/
-
-#define GLX_MAX_SWAP_BARRIERS 10
-
-typedef struct _SwapBarrier *SwapBarrierPtr;
-typedef struct _SwapBarrier {
-    SwapGroupPtr pSwap;
-    SwapBarrierPtr pNext;
-} SwapBarrierRec;
-
-static SwapBarrierPtr SwapBarrierList[GLX_MAX_SWAP_BARRIERS + 1];
-
-void
-SwapBarrierInit(void)
-{
-    int i;
-
-    for (i = 0; i <= GLX_MAX_SWAP_BARRIERS; i++)
-        SwapBarrierList[i] = NULL;
-}
-
-void
-SwapBarrierReset(void)
-{
-    int i;
-
-    for (i = 0; i <= GLX_MAX_SWAP_BARRIERS; i++) {
-        SwapBarrierPtr pBarrier, pNextBarrier;
-
-        for (pBarrier = SwapBarrierList[i]; pBarrier; pBarrier = pNextBarrier) {
-            pNextBarrier = pBarrier->pNext;
-            free(pBarrier);
-        }
-        SwapBarrierList[i] = NULL;
-    }
-}
-
-int
-QueryMaxSwapBarriersSGIX(int screen)
-{
-    return GLX_MAX_SWAP_BARRIERS;
-}
-
-static Bool
-BindSwapGroupToBarrier(GLuint barrier, SwapGroupPtr pSwapGroup)
-{
-    SwapBarrierPtr pBarrier;
-
-    pBarrier = malloc(sizeof(*pBarrier));
-    if (!pBarrier)
-        return FALSE;
-
-    /* Add the swap group to barrier's list */
-    pBarrier->pSwap = pSwapGroup;
-    pBarrier->pNext = SwapBarrierList[barrier];
-    SwapBarrierList[barrier] = pBarrier;
-
-    return TRUE;
-}
-
-static Bool
-UnbindSwapGroupFromBarrier(GLuint barrier, SwapGroupPtr pSwapGroup)
-{
-    SwapBarrierPtr pBarrier, pPrevBarrier;
-
-    /* Find the swap group in barrier's list */
-    for (pBarrier = SwapBarrierList[barrier], pPrevBarrier = NULL;
-         pBarrier && pBarrier->pSwap != pSwapGroup;
-         pPrevBarrier = pBarrier, pBarrier = pBarrier->pNext);
-    if (!pBarrier)
-        return FALSE;
-
-    /* Remove the swap group from barrier's list */
-    if (pPrevBarrier)
-        pPrevBarrier->pNext = pBarrier->pNext;
-    else
-        SwapBarrierList[barrier] = pBarrier->pNext;
-
-    /* Free memory */
-    free(pBarrier);
-
-    return TRUE;
-}
-
-static void
-UpdateSwapBarrierList(GLuint barrier,
-                      SwapGroupPtr pOldSwap, SwapGroupPtr pNewSwap)
-{
-    SwapBarrierPtr pBarrier;
-
-    /* If the old swap group is being destroyed, then we need to remove
-     * the swap group from the list entirely */
-    if (!pNewSwap) {
-        UnbindSwapGroupFromBarrier(barrier, pOldSwap);
-        return;
-    }
-
-    /* Otherwise, find the old swap group in the barrier list and change
-     * it to the new swap group */
-    for (pBarrier = SwapBarrierList[barrier];
-         pBarrier; pBarrier = pBarrier->pNext) {
-        if (pBarrier->pSwap == pOldSwap) {
-            pBarrier->pSwap = pNewSwap;
-            return;
-        }
-    }
-}
-
-static Bool
-SwapBarrierIsReadyToSwap(GLuint barrier)
-{
-    SwapBarrierPtr pBarrier;
-    Bool isReady = TRUE;
-
-    /* The swap barier is ready to swap when swap groups that are bound
-     * to barrier are ready to swap */
-    for (pBarrier = SwapBarrierList[barrier];
-         pBarrier; pBarrier = pBarrier->pNext)
-        isReady &= SwapGroupIsReadyToSwap(pBarrier->pSwap);
-
-    return isReady;
-}
-
-static void
-SwapSwapBarrier(GLuint barrier)
-{
-    SwapBarrierPtr pBarrier;
-
-    /* Swap each group that is a member of this barrier */
-    for (pBarrier = SwapBarrierList[barrier];
-         pBarrier; pBarrier = pBarrier->pNext)
-        SwapSwapGroup(pBarrier->pSwap);
-}
-
-int
-BindSwapBarrierSGIX(DrawablePtr pDraw, int barrier)
-{
-    /* FIXME: Check for errors when pDraw->type != DRAWABLE_WINDOW */
-
-    if (barrier < 0 || barrier > GLX_MAX_SWAP_BARRIERS)
-        return BadValue;
-
-    if (pDraw->type == DRAWABLE_WINDOW) {
-        WindowPtr pWin = (WindowPtr) pDraw;
-        dmxWinPrivPtr pWinPriv = DMX_GET_WINDOW_PRIV(pWin);
-        SwapGroupPtr pSwapGroup = pWinPriv->swapGroup;
-        SwapGroupPtr pCur;
-
-        if (!pSwapGroup)
-            return BadDrawable;
-        if (barrier && pSwapGroup->barrier)
-            return BadValue;
-
-        /* Update the swap barrier list */
-        if (barrier) {
-            if (!BindSwapGroupToBarrier(barrier, pSwapGroup))
-                return BadAlloc;
-        }
-        else {
-            if (!UnbindSwapGroupFromBarrier(pSwapGroup->barrier, pSwapGroup))
-                return BadDrawable;
-        }
-
-        /* Set the barrier for each member of this swap group */
-        for (pCur = pSwapGroup; pCur; pCur = pCur->pNext)
-            pCur->barrier = barrier;
-    }
-
-    return Success;
-}
diff --git a/hw/dmx/glxProxy/glxswap.h b/hw/dmx/glxProxy/glxswap.h
deleted file mode 100644
index 1e1fea1..0000000
--- a/hw/dmx/glxProxy/glxswap.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright 2003 Red Hat Inc., Raleigh, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Kevin E. Martin <kem@redhat.com>
- *
- */
-
-#ifndef __GLX_swap_h__
-#define __GLX_swap_h__
-
-extern int JoinSwapGroupSGIX(DrawablePtr pDraw, DrawablePtr pMember);
-extern int SGSwapBuffers(__GLXclientState * cl, XID drawId, GLXContextTag tag,
-                         DrawablePtr pDraw);
-
-extern void SwapBarrierInit(void);
-extern void SwapBarrierReset(void);
-extern int QueryMaxSwapBarriersSGIX(int screen);
-extern int BindSwapBarrierSGIX(DrawablePtr pDraw, int barrier);
-
-#endif                          /* !__GLX_swap_h__ */
diff --git a/hw/dmx/glxProxy/glxutil.h b/hw/dmx/glxProxy/glxutil.h
deleted file mode 100644
index 605c07b..0000000
--- a/hw/dmx/glxProxy/glxutil.h
+++ /dev/null
@@ -1,39 +0,0 @@
-#ifndef _glxcmds_h_
-#define _glxcmds_h_
-
-/*
- * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
- * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice including the dates of first publication and
- * either this permission notice or a reference to
- * http://oss.sgi.com/projects/FreeB/
- * shall be included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of Silicon Graphics, Inc.
- * shall not be used in advertising or otherwise to promote the sale, use or
- * other dealings in this Software without prior written authorization from
- * Silicon Graphics, Inc.
- */
-
-/* context helper routines */
-extern __GLXcontext *__glXLookupContextByTag(__GLXclientState *, GLXContextTag);
-extern DrawablePtr __glXLookupDrawableByTag(__GLXclientState * cl,
-                                            GLXContextTag tag);
-
-#endif                          /* _glxcmds_h_ */
diff --git a/hw/dmx/glxProxy/glxvendor.c b/hw/dmx/glxProxy/glxvendor.c
deleted file mode 100644
index 52d70eb..0000000
--- a/hw/dmx/glxProxy/glxvendor.c
+++ /dev/null
@@ -1,618 +0,0 @@
-/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED */
-/*
- * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
- * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice including the dates of first publication and
- * either this permission notice or a reference to
- * http://oss.sgi.com/projects/FreeB/
- * shall be included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of Silicon Graphics, Inc.
- * shall not be used in advertising or otherwise to promote the sale, use or
- * other dealings in this Software without prior written authorization from
- * Silicon Graphics, Inc.
- */
-
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#include "dmx.h"
-#include "dmxwindow.h"
-#include "dmxpixmap.h"
-#include "dmxfont.h"
-
-#include "glxserver.h"
-#include "glxext.h"
-#include "g_disptab.h"
-/* #include "g_disptab_EXT.h" */
-#include "unpack.h"
-#include "glxutil.h"
-#include "glxcmds.h"
-#include "glxvendor.h"
-
-#include "GL/glxproto.h"
-
-#ifdef PANORAMIX
-#include "panoramiXsrv.h"
-#endif
-
-/*
- * GetReqVendorPrivate - this is the equivalent of GetReq macro
- *    from Xlibint.h but it does not set the reqType field (the opcode).
- *    this is because the GL single opcodes has different naming convension
- *    the other X opcodes (ie. X_GLsop_GetFloatv).
- */
-#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP)
-#define GetReqVendorPrivate(name, req) \
-        WORD64ALIGN\
-	if ((dpy->bufptr + SIZEOF(x##name##Req)) > dpy->bufmax)\
-		_XFlush(dpy);\
-	req = (x##name##Req *)(dpy->last_req = dpy->bufptr);\
-	req->length = (SIZEOF(x##name##Req))>>2;\
-	dpy->bufptr += SIZEOF(x##name##Req);\
-	dpy->request++
-
-#else                           /* non-ANSI C uses empty comment instead of "##" for token concatenation */
-#define GetReqVendorPrivate(name, req) \
-        WORD64ALIGN\
-	if ((dpy->bufptr + SIZEOF(x/**/name/**/Req)) > dpy->bufmax)\
-		_XFlush(dpy);\
-	req = (x/**/name/**/Req *)(dpy->last_req = dpy->bufptr);\
-	req->length = (SIZEOF(x/**/name/**/Req))>>2;\
-	dpy->bufptr += SIZEOF(x/**/name/**/Req);\
-	dpy->request++
-#endif
-
-static int swap_vec_element_size = 0;
-
-static void
-SendSwappedReply(ClientPtr client,
-                 xGLXVendorPrivReply * reply, char *buf, int buf_size)
-{
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_SWAP_SHORT(&reply->sequenceNumber);
-    __GLX_SWAP_INT(&reply->length);
-    __GLX_SWAP_INT(&reply->retval);
-    __GLX_SWAP_INT(&reply->size);
-
-    if ((buf_size == 0) && (swap_vec_element_size > 0)) {
-        /*
-         * the reply has single component - need to swap pad3
-         */
-        if (swap_vec_element_size == 2) {
-            __GLX_SWAP_SHORT(&reply->pad3);
-        }
-        else if (swap_vec_element_size == 4) {
-            __GLX_SWAP_INT(&reply->pad3);
-            __GLX_SWAP_INT(&reply->pad4);
-        }
-        else if (swap_vec_element_size == 8) {
-            __GLX_SWAP_DOUBLE(&reply->pad3);
-        }
-    }
-    else if ((buf_size > 0) && (swap_vec_element_size > 0)) {
-        /*
-         * the reply has vector of elements which needs to be swapped
-         */
-        int vsize = buf_size / swap_vec_element_size;
-        char *p = buf;
-        int i;
-
-        for (i = 0; i < vsize; i++) {
-            if (swap_vec_element_size == 2) {
-                __GLX_SWAP_SHORT(p);
-            }
-            else if (swap_vec_element_size == 4) {
-                __GLX_SWAP_INT(p);
-            }
-            else if (swap_vec_element_size == 8) {
-                __GLX_SWAP_DOUBLE(p);
-            }
-
-            p += swap_vec_element_size;
-        }
-
-        __GLX_SWAP_INT(&reply->pad3);
-        __GLX_SWAP_INT(&reply->pad4);
-        __GLX_SWAP_INT(&reply->pad5);
-        __GLX_SWAP_INT(&reply->pad6);
-
-    }
-
-    WriteToClient(client, sizeof(xGLXVendorPrivReply), reply);
-    if (buf_size > 0)
-        WriteToClient(client, buf_size, buf);
-
-}
-
-int
-__glXVForwardSingleReq(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc;
-    xGLXVendorPrivateReq *be_req;
-    __GLXcontext *glxc;
-    int from_screen = 0;
-    int to_screen = 0;
-    int buf_size;
-    int s;
-
-    glxc = __glXLookupContextByTag(cl, req->contextTag);
-    if (!glxc) {
-        return 0;
-    }
-    from_screen = to_screen = glxc->pScreen->myNum;
-
-#ifdef PANORAMIX
-    if (!noPanoramiXExtension) {
-        from_screen = 0;
-        to_screen = screenInfo.numScreens - 1;
-    }
-#endif
-
-    pc += sz_xGLXVendorPrivateReq;
-    buf_size = (req->length << 2) - sz_xGLXVendorPrivateReq;
-
-    /*
-     * just forward the request to back-end server(s)
-     */
-    for (s = from_screen; s <= to_screen; s++) {
-        DMXScreenInfo *dmxScreen = &dmxScreens[s];
-        Display *dpy = GetBackEndDisplay(cl, s);
-
-        LockDisplay(dpy);
-        GetReqVendorPrivate(GLXVendorPrivate, be_req);
-        be_req->reqType = dmxScreen->glxMajorOpcode;
-        be_req->glxCode = req->glxCode;
-        be_req->length = req->length;
-        be_req->vendorCode = req->vendorCode;
-        be_req->contextTag = GetCurrentBackEndTag(cl, req->contextTag, s);
-        if (buf_size > 0)
-            _XSend(dpy, (const char *) pc, buf_size);
-        UnlockDisplay(dpy);
-        SyncHandle();
-    }
-
-    return Success;
-}
-
-int
-__glXVForwardPipe0WithReply(__GLXclientState * cl, GLbyte * pc)
-{
-    ClientPtr client = cl->client;
-    xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc;
-    xGLXVendorPrivateReq *be_req;
-    xGLXVendorPrivReply reply;
-    xGLXVendorPrivReply be_reply;
-    __GLXcontext *glxc;
-    int buf_size;
-    char *be_buf = NULL;
-    int be_buf_size;
-    DMXScreenInfo *dmxScreen;
-    Display *dpy;
-
-    glxc = __glXLookupContextByTag(cl, req->contextTag);
-    if (!glxc) {
-        return __glXBadContext;
-    }
-
-    pc += sz_xGLXVendorPrivateReq;
-    buf_size = (req->length << 2) - sz_xGLXVendorPrivateReq;
-
-    dmxScreen = &dmxScreens[glxc->pScreen->myNum];
-    dpy = GetBackEndDisplay(cl, glxc->pScreen->myNum);
-
-    /*
-     * send the request to the first back-end server
-     */
-    LockDisplay(dpy);
-    GetReqVendorPrivate(GLXVendorPrivate, be_req);
-    be_req->reqType = dmxScreen->glxMajorOpcode;
-    be_req->glxCode = req->glxCode;
-    be_req->length = req->length;
-    be_req->vendorCode = req->vendorCode;
-    be_req->contextTag =
-        GetCurrentBackEndTag(cl, req->contextTag, glxc->pScreen->myNum);
-    if (buf_size > 0)
-        _XSend(dpy, (const char *) pc, buf_size);
-
-    /*
-     * get the reply from the back-end server
-     */
-    _XReply(dpy, (xReply *) &be_reply, 0, False);
-    be_buf_size = be_reply.length << 2;
-    if (be_buf_size > 0) {
-        be_buf = (char *) malloc(be_buf_size);
-        if (be_buf) {
-            _XRead(dpy, be_buf, be_buf_size);
-        }
-        else {
-            /* Throw data on the floor */
-            _XEatDataWords(dpy, be_reply.length);
-            return BadAlloc;
-        }
-    }
-
-    UnlockDisplay(dpy);
-    SyncHandle();
-
-    /*
-     * send the reply to the client
-     */
-    memcpy(&reply, &be_reply, sz_xGLXVendorPrivReply);
-    reply.type = X_Reply;
-    reply.sequenceNumber = client->sequence;
-
-    if (client->swapped) {
-        SendSwappedReply(client, &reply, be_buf, be_buf_size);
-    }
-    else {
-        WriteToClient(client, sizeof(xGLXVendorPrivReply), &reply);
-        if (be_buf_size > 0)
-            WriteToClient(client, be_buf_size, be_buf);
-    }
-
-    if (be_buf_size > 0)
-        free(be_buf);
-
-    return Success;
-}
-
-int
-__glXVForwardAllWithReply(__GLXclientState * cl, GLbyte * pc)
-{
-    ClientPtr client = cl->client;
-    xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc;
-    xGLXVendorPrivateReq *be_req;
-    xGLXVendorPrivReply reply;
-    xGLXVendorPrivReply be_reply;
-    __GLXcontext *glxc;
-    int buf_size;
-    char *be_buf = NULL;
-    int be_buf_size = 0;
-    int from_screen = 0;
-    int to_screen = 0;
-    int s;
-
-    DMXScreenInfo *dmxScreen;
-    Display *dpy;
-
-    glxc = __glXLookupContextByTag(cl, req->contextTag);
-    if (!glxc) {
-        return 0;
-    }
-    from_screen = to_screen = glxc->pScreen->myNum;
-
-#ifdef PANORAMIX
-    if (!noPanoramiXExtension) {
-        from_screen = 0;
-        to_screen = screenInfo.numScreens - 1;
-    }
-#endif
-
-    pc += sz_xGLXVendorPrivateReq;
-    buf_size = (req->length << 2) - sz_xGLXVendorPrivateReq;
-
-    /*
-     * send the request to the first back-end server(s)
-     */
-    for (s = to_screen; s >= from_screen; s--) {
-        dmxScreen = &dmxScreens[s];
-        dpy = GetBackEndDisplay(cl, s);
-
-        LockDisplay(dpy);
-        GetReqVendorPrivate(GLXVendorPrivate, be_req);
-        be_req->reqType = dmxScreen->glxMajorOpcode;
-        be_req->glxCode = req->glxCode;
-        be_req->length = req->length;
-        be_req->vendorCode = req->vendorCode;
-        be_req->contextTag = GetCurrentBackEndTag(cl, req->contextTag, s);
-        if (buf_size > 0)
-            _XSend(dpy, (const char *) pc, buf_size);
-
-        /*
-         * get the reply from the back-end server
-         */
-        _XReply(dpy, (xReply *) &be_reply, 0, False);
-        if (s == from_screen) {
-            /* Save data from last reply to send on to client */
-            be_buf_size = be_reply.length << 2;
-            if (be_buf_size > 0) {
-                be_buf = malloc(be_buf_size);
-                if (be_buf) {
-                    _XRead(dpy, be_buf, be_buf_size);
-                }
-                else {
-                    /* Throw data on the floor */
-                    _XEatDataWords(dpy, be_reply.length);
-                    return BadAlloc;
-                }
-            }
-        }
-        else {
-            /* Just discard data from all replies before the last one */
-            if (be_reply.length > 0)
-                _XEatDataWords(dpy, be_reply.length);
-        }
-
-        UnlockDisplay(dpy);
-        SyncHandle();
-    }
-
-    /*
-     * send the reply to the client
-     */
-    memcpy(&reply, &be_reply, sz_xGLXVendorPrivReply);
-    reply.type = X_Reply;
-    reply.sequenceNumber = client->sequence;
-
-    if (client->swapped) {
-        SendSwappedReply(client, &reply, be_buf, be_buf_size);
-    }
-    else {
-        WriteToClient(client, sizeof(xGLXVendorPrivReply), &reply);
-        if (be_buf_size > 0)
-            WriteToClient(client, be_buf_size, be_buf);
-    }
-
-    if (be_buf_size > 0)
-        free(be_buf);
-
-    return Success;
-}
-
-int
-__glXVForwardSingleReqSwap(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_SHORT(&req->length);
-    __GLX_SWAP_INT(&req->vendorCode);
-    __GLX_SWAP_INT(&req->contextTag);
-
-    swap_vec_element_size = 0;
-
-    return (__glXVForwardSingleReq(cl, pc));
-}
-
-int
-__glXVForwardPipe0WithReplySwap(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_SHORT(&req->length);
-    __GLX_SWAP_INT(&req->vendorCode);
-    __GLX_SWAP_INT(&req->contextTag);
-
-    swap_vec_element_size = 0;
-
-    /*
-     * swap extra data in request - assuming all data
-     * (if available) are arrays of 4 bytes components !
-     */
-    if (req->length > sz_xGLXVendorPrivateReq / 4) {
-        int *data = (int *) (req + 1);
-        int count = req->length - sz_xGLXVendorPrivateReq / 4;
-
-        __GLX_SWAP_INT_ARRAY(data, count);
-    }
-
-    return (__glXVForwardPipe0WithReply(cl, pc));
-}
-
-int
-__glXVForwardPipe0WithReplySwapsv(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_SHORT(&req->length);
-    __GLX_SWAP_INT(&req->vendorCode);
-    __GLX_SWAP_INT(&req->contextTag);
-
-    swap_vec_element_size = 2;
-
-    /*
-     * swap extra data in request - assuming all data
-     * (if available) are arrays of 4 bytes components !
-     */
-    if (req->length > sz_xGLXVendorPrivateReq / 4) {
-        int *data = (int *) (req + 1);
-        int count = req->length - sz_xGLXVendorPrivateReq / 4;
-
-        __GLX_SWAP_INT_ARRAY(data, count);
-    }
-
-    return (__glXVForwardPipe0WithReply(cl, pc));
-}
-
-int
-__glXVForwardPipe0WithReplySwapiv(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_SHORT(&req->length);
-    __GLX_SWAP_INT(&req->vendorCode);
-    __GLX_SWAP_INT(&req->contextTag);
-
-    swap_vec_element_size = 4;
-
-    /*
-     * swap extra data in request - assuming all data
-     * (if available) are arrays of 4 bytes components !
-     */
-    if (req->length > sz_xGLXVendorPrivateReq / 4) {
-        int *data = (int *) (req + 1);
-        int count = req->length - sz_xGLXVendorPrivateReq / 4;
-
-        __GLX_SWAP_INT_ARRAY(data, count);
-    }
-
-    return (__glXVForwardPipe0WithReply(cl, pc));
-}
-
-int
-__glXVForwardPipe0WithReplySwapdv(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_SHORT(&req->length);
-    __GLX_SWAP_INT(&req->vendorCode);
-    __GLX_SWAP_INT(&req->contextTag);
-
-    swap_vec_element_size = 8;
-
-    /*
-     * swap extra data in request - assuming all data
-     * (if available) are arrays of 4 bytes components !
-     */
-    if (req->length > sz_xGLXVendorPrivateReq / 4) {
-        int *data = (int *) (req + 1);
-        int count = req->length - sz_xGLXVendorPrivateReq / 4;
-
-        __GLX_SWAP_INT_ARRAY(data, count);
-    }
-
-    return (__glXVForwardPipe0WithReply(cl, pc));
-}
-
-int
-__glXVForwardAllWithReplySwap(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_SHORT(&req->length);
-    __GLX_SWAP_INT(&req->vendorCode);
-    __GLX_SWAP_INT(&req->contextTag);
-
-    swap_vec_element_size = 0;
-
-    /*
-     * swap extra data in request - assuming all data
-     * (if available) are arrays of 4 bytes components !
-     */
-    if (req->length > sz_xGLXVendorPrivateReq / 4) {
-        int *data = (int *) (req + 1);
-        int count = req->length - sz_xGLXVendorPrivateReq / 4;
-
-        __GLX_SWAP_INT_ARRAY(data, count);
-    }
-
-    return (__glXVForwardAllWithReply(cl, pc));
-}
-
-int
-__glXVForwardAllWithReplySwapsv(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_SHORT(&req->length);
-    __GLX_SWAP_INT(&req->vendorCode);
-    __GLX_SWAP_INT(&req->contextTag);
-
-    swap_vec_element_size = 2;
-
-    /*
-     * swap extra data in request - assuming all data
-     * (if available) are arrays of 4 bytes components !
-     */
-    if (req->length > sz_xGLXVendorPrivateReq / 4) {
-        int *data = (int *) (req + 1);
-        int count = req->length - sz_xGLXVendorPrivateReq / 4;
-
-        __GLX_SWAP_INT_ARRAY(data, count);
-    }
-
-    return (__glXVForwardAllWithReply(cl, pc));
-}
-
-int
-__glXVForwardAllWithReplySwapiv(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_SHORT(&req->length);
-    __GLX_SWAP_INT(&req->vendorCode);
-    __GLX_SWAP_INT(&req->contextTag);
-
-    swap_vec_element_size = 4;
-
-    /*
-     * swap extra data in request - assuming all data
-     * (if available) are arrays of 4 bytes components !
-     */
-    if (req->length > sz_xGLXVendorPrivateReq / 4) {
-        int *data = (int *) (req + 1);
-        int count = req->length - sz_xGLXVendorPrivateReq / 4;
-
-        __GLX_SWAP_INT_ARRAY(data, count);
-    }
-
-    return (__glXVForwardAllWithReply(cl, pc));
-}
-
-int
-__glXVForwardAllWithReplySwapdv(__GLXclientState * cl, GLbyte * pc)
-{
-    xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_SHORT(&req->length);
-    __GLX_SWAP_INT(&req->vendorCode);
-    __GLX_SWAP_INT(&req->contextTag);
-
-    swap_vec_element_size = 8;
-
-    /*
-     * swap extra data in request - assuming all data
-     * (if available) are arrays of 4 bytes components !
-     */
-    if (req->length > sz_xGLXVendorPrivateReq / 4) {
-        int *data = (int *) (req + 1);
-        int count = req->length - sz_xGLXVendorPrivateReq / 4;
-
-        __GLX_SWAP_INT_ARRAY(data, count);
-    }
-
-    return (__glXVForwardAllWithReply(cl, pc));
-}
diff --git a/hw/dmx/glxProxy/glxvendor.h b/hw/dmx/glxProxy/glxvendor.h
deleted file mode 100644
index 0d160ab..0000000
--- a/hw/dmx/glxProxy/glxvendor.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
- * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice including the dates of first publication and
- * either this permission notice or a reference to
- * http://oss.sgi.com/projects/FreeB/
- * shall be included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of Silicon Graphics, Inc.
- * shall not be used in advertising or otherwise to promote the sale, use or
- * other dealings in this Software without prior written authorization from
- * Silicon Graphics, Inc.
- */
-
-#ifndef __GLXVENDOR_H
-#define __GLXVENDOR_H
-
-extern int __glXVForwardSingleReq(__GLXclientState * cl, GLbyte * pc);
-extern int __glXVForwardPipe0WithReply(__GLXclientState * cl, GLbyte * pc);
-extern int __glXVForwardAllWithReply(__GLXclientState * cl, GLbyte * pc);
-
-extern int __glXVForwardSingleReqSwap(__GLXclientState * cl, GLbyte * pc);
-
-extern int __glXVForwardPipe0WithReplySwap(__GLXclientState * cl, GLbyte * pc);
-extern int __glXVForwardPipe0WithReplySwapsv(__GLXclientState * cl,
-                                             GLbyte * pc);
-extern int __glXVForwardPipe0WithReplySwapiv(__GLXclientState * cl,
-                                             GLbyte * pc);
-extern int __glXVForwardPipe0WithReplySwapdv(__GLXclientState * cl,
-                                             GLbyte * pc);
-
-extern int __glXVForwardAllWithReplySwap(__GLXclientState * cl, GLbyte * pc);
-extern int __glXVForwardAllWithReplySwapsv(__GLXclientState * cl, GLbyte * pc);
-extern int __glXVForwardAllWithReplySwapiv(__GLXclientState * cl, GLbyte * pc);
-extern int __glXVForwardAllWithReplySwapdv(__GLXclientState * cl, GLbyte * pc);
-
-#endif
diff --git a/hw/dmx/glxProxy/glxvisuals.c b/hw/dmx/glxProxy/glxvisuals.c
deleted file mode 100644
index 3fca04f..0000000
--- a/hw/dmx/glxProxy/glxvisuals.c
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
- * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice including the dates of first publication and
- * either this permission notice or a reference to
- * http://oss.sgi.com/projects/FreeB/
- * shall be included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of Silicon Graphics, Inc.
- * shall not be used in advertising or otherwise to promote the sale, use or
- * other dealings in this Software without prior written authorization from
- * Silicon Graphics, Inc.
- */
-
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#include "glxserver.h"
-#include "glxvisuals.h"
-
-int
-glxVisualsMatch(__GLXvisualConfig * v1, __GLXvisualConfig * v2)
-{
-    if ((v1->class == v2->class) &&
-        (v1->rgba == v2->rgba) &&
-        (v1->redSize == v2->redSize) &&
-        (v1->greenSize == v2->greenSize) &&
-        (v1->blueSize == v2->blueSize) &&
-        (v1->alphaSize == v2->alphaSize) &&
-        (v1->redMask == v2->redMask) &&
-        (v1->greenMask == v2->greenMask) &&
-        (v1->blueMask == v2->blueMask) &&
-        (v1->alphaMask == v2->alphaMask) &&
-        (v1->accumRedSize == v2->accumRedSize) &&
-        (v1->accumGreenSize == v2->accumGreenSize) &&
-        (v1->accumBlueSize == v2->accumBlueSize) &&
-        (v1->accumAlphaSize == v2->accumAlphaSize) &&
-        (v1->doubleBuffer == v2->doubleBuffer) &&
-        (v1->stereo == v2->stereo) &&
-        (v1->bufferSize == v2->bufferSize) &&
-        (v1->depthSize == v2->depthSize) &&
-        (v1->stencilSize == v2->stencilSize) &&
-        (v1->auxBuffers == v2->auxBuffers) &&
-        (v1->level == v2->level) &&
-        (v1->visualRating == v2->visualRating) &&
-        (v1->transparentPixel == v2->transparentPixel) &&
-        (v1->transparentRed == v2->transparentRed) &&
-        (v1->transparentGreen == v2->transparentGreen) &&
-        (v1->transparentBlue == v2->transparentBlue) &&
-        (v1->transparentAlpha == v2->transparentAlpha) &&
-        (v1->transparentIndex == v2->transparentIndex) &&
-        (v1->multiSampleSize == v2->multiSampleSize) &&
-        (v1->nMultiSampleBuffers == v2->nMultiSampleBuffers) &&
-        (v1->visualSelectGroup == v2->visualSelectGroup)) {
-
-        return 1;
-
-    }
-
-    return 0;
-
-}
-
-VisualID
-glxMatchGLXVisualInConfigList(__GLXvisualConfig * pGlxVisual,
-                              __GLXvisualConfig * configs, int nconfigs)
-{
-    int i;
-
-    for (i = 0; i < nconfigs; i++) {
-
-        if (glxVisualsMatch(pGlxVisual, &configs[i])) {
-
-            return configs[i].vid;
-
-        }
-    }
-
-    return 0;
-}
-
-VisualID
-glxMatchVisualInConfigList(ScreenPtr pScreen, VisualPtr pVisual,
-                           __GLXvisualConfig * configs, int nconfigs)
-{
-    __GLXscreenInfo *pGlxScreen;
-    __GLXvisualConfig *pGlxVisual;
-    int i;
-
-    /* check that the glx extension has been initialized */
-    if (!__glXActiveScreens)
-        return 0;
-
-    pGlxScreen = &__glXActiveScreens[pScreen->myNum];
-    pGlxVisual = pGlxScreen->pGlxVisual;
-
-    /* find the glx visual info for pVisual */
-    for (i = 0; i < pGlxScreen->numVisuals; i++, pGlxVisual++) {
-        if (pGlxVisual->vid == pVisual->vid) {
-            break;
-        }
-    }
-    if (i == pGlxScreen->numVisuals) {
-        /*
-         * the visual is not supported by glx
-         */
-        return 0;
-    }
-
-    return (glxMatchGLXVisualInConfigList(pGlxVisual, configs, nconfigs));
-}
-
-VisualPtr
-glxMatchVisual(ScreenPtr pScreen, VisualPtr pVisual, ScreenPtr pMatchScreen)
-{
-    __GLXscreenInfo *pGlxScreen2;
-    int j;
-    VisualID vid;
-
-    /* check that the glx extension has been initialized */
-    if (!__glXActiveScreens)
-        return NULL;
-
-    pGlxScreen2 = &__glXActiveScreens[pMatchScreen->myNum];
-
-    vid = glxMatchVisualInConfigList(pScreen, pVisual,
-                                     pGlxScreen2->pGlxVisual,
-                                     pGlxScreen2->numVisuals);
-    if (vid) {
-        /*
-         * find the X visual of the matching glx visual
-         */
-        for (j = 0; j < pMatchScreen->numVisuals; j++) {
-            if (vid == pMatchScreen->visuals[j].vid) {
-                return &pMatchScreen->visuals[j];
-            }
-        }
-    }
-
-    return 0;
-}
diff --git a/hw/dmx/glxProxy/glxvisuals.h b/hw/dmx/glxProxy/glxvisuals.h
deleted file mode 100644
index e1e0238..0000000
--- a/hw/dmx/glxProxy/glxvisuals.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
- * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice including the dates of first publication and
- * either this permission notice or a reference to
- * http://oss.sgi.com/projects/FreeB/
- * shall be included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of Silicon Graphics, Inc.
- * shall not be used in advertising or otherwise to promote the sale, use or
- * other dealings in this Software without prior written authorization from
- * Silicon Graphics, Inc.
- */
-
-#ifndef _GLX_VISUALS_H
-#define _GLX_VISUALS_H
-
-int glxVisualsMatch(__GLXvisualConfig * v1, __GLXvisualConfig * v2);
-
-VisualID glxMatchGLXVisualInConfigList(__GLXvisualConfig * pGlxVisual,
-                                       __GLXvisualConfig * configs,
-                                       int nconfigs);
-
-VisualID glxMatchVisualInConfigList(ScreenPtr pScreen, VisualPtr pVisual,
-                                    __GLXvisualConfig * configs, int nconfigs);
-
-VisualPtr glxMatchVisual(ScreenPtr pScreen, VisualPtr pVisual,
-                         ScreenPtr pMatchScreen);
-
-#endif
diff --git a/hw/dmx/glxProxy/meson.build b/hw/dmx/glxProxy/meson.build
deleted file mode 100644
index bbb93f4..0000000
--- a/hw/dmx/glxProxy/meson.build
+++ /dev/null
@@ -1,27 +0,0 @@
-srcs_dmx_glx = [
-    'compsize.c',
-    'g_disptab.c',
-    'global.c',
-    'glxcmds.c',
-    'glxcmdsswap.c',
-    'glxext.c',
-    'glxfbconfig.c',
-    'glxscreens.c',
-    'glxsingle.c',
-    'glxswap.c',
-    'glxvendor.c',
-    'glxvisuals.c',
-    'g_renderswap.c',
-    'render2swap.c',
-    'renderpixswap.c',
-]
-
-dmx_glx = static_library('dmx_glx',
-    srcs_dmx_glx,
-    include_directories: [
-        inc,
-        include_directories('../')
-    ],
-    dependencies: common_dep,
-    c_args: ['-DHAVE_DMX_CONFIG_H', glx_align64],
-)
diff --git a/hw/dmx/glxProxy/render2swap.c b/hw/dmx/glxProxy/render2swap.c
deleted file mode 100644
index 146476c..0000000
--- a/hw/dmx/glxProxy/render2swap.c
+++ /dev/null
@@ -1,283 +0,0 @@
-/*
- * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
- * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice including the dates of first publication and
- * either this permission notice or a reference to
- * http://oss.sgi.com/projects/FreeB/
- * shall be included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of Silicon Graphics, Inc.
- * shall not be used in advertising or otherwise to promote the sale, use or
- * other dealings in this Software without prior written authorization from
- * Silicon Graphics, Inc.
- */
-
-#include "glxserver.h"
-#include "unpack.h"
-#include "g_disptab.h"
-
-static GLint
-__glEvalComputeK(GLenum target)
-{
-    switch (target) {
-    case GL_MAP1_VERTEX_4:
-    case GL_MAP1_COLOR_4:
-    case GL_MAP1_TEXTURE_COORD_4:
-    case GL_MAP2_VERTEX_4:
-    case GL_MAP2_COLOR_4:
-    case GL_MAP2_TEXTURE_COORD_4:
-        return 4;
-    case GL_MAP1_VERTEX_3:
-    case GL_MAP1_TEXTURE_COORD_3:
-    case GL_MAP1_NORMAL:
-    case GL_MAP2_VERTEX_3:
-    case GL_MAP2_TEXTURE_COORD_3:
-    case GL_MAP2_NORMAL:
-        return 3;
-    case GL_MAP1_TEXTURE_COORD_2:
-    case GL_MAP2_TEXTURE_COORD_2:
-        return 2;
-    case GL_MAP1_TEXTURE_COORD_1:
-    case GL_MAP2_TEXTURE_COORD_1:
-    case GL_MAP1_INDEX:
-    case GL_MAP2_INDEX:
-        return 1;
-    default:
-        return 0;
-    }
-}
-
-void
-__glXDispSwap_Map1f(GLbyte * pc)
-{
-    GLint order, k;
-    GLfloat *points;
-    GLenum target;
-    GLint compsize;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_INT(pc + 12);
-    __GLX_SWAP_FLOAT(pc + 4);
-    __GLX_SWAP_FLOAT(pc + 8);
-
-    target = *(GLenum *) (pc + 0);
-    order = *(GLint *) (pc + 12);
-    points = (GLfloat *) (pc + 16);
-    k = __glEvalComputeK(target);
-
-    if (order <= 0 || k < 0) {
-        /* Erroneous command. */
-        compsize = 0;
-    }
-    else {
-        compsize = order * k;
-    }
-    __GLX_SWAP_FLOAT_ARRAY(points, compsize);
-
-}
-
-void
-__glXDispSwap_Map2f(GLbyte * pc)
-{
-    GLint uorder, vorder, k;
-    GLfloat *points;
-    GLenum target;
-    GLint compsize;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 0);
-    __GLX_SWAP_INT(pc + 12);
-    __GLX_SWAP_INT(pc + 24);
-    __GLX_SWAP_FLOAT(pc + 4);
-    __GLX_SWAP_FLOAT(pc + 8);
-    __GLX_SWAP_FLOAT(pc + 16);
-    __GLX_SWAP_FLOAT(pc + 20);
-
-    target = *(GLenum *) (pc + 0);
-    uorder = *(GLint *) (pc + 12);
-    vorder = *(GLint *) (pc + 24);
-    points = (GLfloat *) (pc + 28);
-
-    k = __glEvalComputeK(target);
-
-    if (vorder <= 0 || uorder <= 0 || k < 0) {
-        /* Erroneous command. */
-        compsize = 0;
-    }
-    else {
-        compsize = uorder * vorder * k;
-    }
-    __GLX_SWAP_FLOAT_ARRAY(points, compsize);
-
-}
-
-void
-__glXDispSwap_Map1d(GLbyte * pc)
-{
-    GLint order, k, compsize;
-    GLenum target;
-    GLdouble u1, u2;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_DOUBLE(pc + 0);
-    __GLX_SWAP_DOUBLE(pc + 8);
-    __GLX_SWAP_INT(pc + 16);
-    __GLX_SWAP_INT(pc + 20);
-
-    target = *(GLenum *) (pc + 16);
-    order = *(GLint *) (pc + 20);
-    k = __glEvalComputeK(target);
-    if (order <= 0 || k < 0) {
-        /* Erroneous command. */
-        compsize = 0;
-    }
-    else {
-        compsize = order * k;
-    }
-    __GLX_GET_DOUBLE(u1, pc);
-    __GLX_GET_DOUBLE(u2, pc + 8);
-    __GLX_SWAP_DOUBLE_ARRAY(pc + 24, compsize);
-    pc += 24;
-
-#ifdef __GLX_ALIGN64
-    if (((unsigned long) pc) & 7) {
-        /*
-         ** Copy the doubles up 4 bytes, trashing the command but aligning
-         ** the data in the process
-         */
-        __GLX_MEM_COPY(pc - 4, pc, compsize * 8);
-    }
-#endif
-}
-
-void
-__glXDispSwap_Map2d(GLbyte * pc)
-{
-    GLdouble u1, u2, v1, v2;
-    GLint uorder, vorder, k, compsize;
-    GLenum target;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_DOUBLE(pc + 0);
-    __GLX_SWAP_DOUBLE(pc + 8);
-    __GLX_SWAP_DOUBLE(pc + 16);
-    __GLX_SWAP_DOUBLE(pc + 24);
-    __GLX_SWAP_INT(pc + 32);
-    __GLX_SWAP_INT(pc + 36);
-    __GLX_SWAP_INT(pc + 40);
-
-    target = *(GLenum *) (pc + 32);
-    uorder = *(GLint *) (pc + 36);
-    vorder = *(GLint *) (pc + 40);
-    k = __glEvalComputeK(target);
-    if (vorder <= 0 || uorder <= 0 || k < 0) {
-        /* Erroneous command. */
-        compsize = 0;
-    }
-    else {
-        compsize = uorder * vorder * k;
-    }
-    __GLX_GET_DOUBLE(u1, pc);
-    __GLX_GET_DOUBLE(u2, pc + 8);
-    __GLX_GET_DOUBLE(v1, pc + 16);
-    __GLX_GET_DOUBLE(v2, pc + 24);
-    __GLX_SWAP_DOUBLE_ARRAY(pc + 44, compsize);
-    pc += 44;
-
-#ifdef __GLX_ALIGN64
-    if (((unsigned long) pc) & 7) {
-        /*
-         ** Copy the doubles up 4 bytes, trashing the command but aligning
-         ** the data in the process
-         */
-        __GLX_MEM_COPY(pc - 4, pc, compsize * 8);
-    }
-#endif
-}
-
-void
-__glXDispSwap_CallLists(GLbyte * pc)
-{
-    GLenum type;
-    GLsizei n;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
-    __GLX_SWAP_INT(pc + 4);
-    __GLX_SWAP_INT(pc + 0);
-    type = *(GLenum *) (pc + 4);
-    n = *(GLsizei *) (pc + 0);
-
-    switch (type) {
-    case GL_BYTE:
-    case GL_UNSIGNED_BYTE:
-    case GL_2_BYTES:
-    case GL_3_BYTES:
-    case GL_4_BYTES:
-        break;
-    case GL_SHORT:
-    case GL_UNSIGNED_SHORT:
-        __GLX_SWAP_SHORT_ARRAY(pc + 8, n);
-        break;
-    case GL_INT:
-    case GL_UNSIGNED_INT:
-        __GLX_SWAP_INT_ARRAY(pc + 8, n);
-        break;
-    case GL_FLOAT:
-        __GLX_SWAP_FLOAT_ARRAY(pc + 8, n);
-        break;
-    }
-
-}
-
-void
-__glXDispSwap_DrawArrays(GLbyte * pc)
-{
-    __GLXdispatchDrawArraysHeader *hdr = (__GLXdispatchDrawArraysHeader *) pc;
-    __GLXdispatchDrawArraysComponentHeader *compHeader;
-    int i;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT(&hdr->numVertexes);
-    __GLX_SWAP_INT(&hdr->numComponents);
-    __GLX_SWAP_INT(&hdr->primType);
-
-    pc += sizeof(__GLXdispatchDrawArraysHeader);
-    compHeader = (__GLXdispatchDrawArraysComponentHeader *) pc;
-
-    /* compute stride (same for all component arrays) */
-    for (i = 0; i < hdr->numComponents; i++) {
-        __GLX_SWAP_INT(&compHeader[i].datatype);
-        __GLX_SWAP_INT(&compHeader[i].numVals);
-        __GLX_SWAP_INT(&compHeader[i].component);
-
-    }
-
-}
diff --git a/hw/dmx/glxProxy/renderpixswap.c b/hw/dmx/glxProxy/renderpixswap.c
deleted file mode 100644
index 6557a8f..0000000
--- a/hw/dmx/glxProxy/renderpixswap.c
+++ /dev/null
@@ -1,403 +0,0 @@
-/*
- * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
- * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice including the dates of first publication and
- * either this permission notice or a reference to
- * http://oss.sgi.com/projects/FreeB/
- * shall be included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of Silicon Graphics, Inc.
- * shall not be used in advertising or otherwise to promote the sale, use or
- * other dealings in this Software without prior written authorization from
- * Silicon Graphics, Inc.
- */
-
-#include "glxserver.h"
-#include "unpack.h"
-#include "g_disptab.h"
-
-void
-__glXDispSwap_PolygonStipple(GLbyte * pc)
-{
-    __GLXpixelHeader *hdr = (__GLXpixelHeader *) pc;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT((GLbyte *) &hdr->rowLength);
-    __GLX_SWAP_INT((GLbyte *) &hdr->skipRows);
-    __GLX_SWAP_INT((GLbyte *) &hdr->skipPixels);
-    __GLX_SWAP_INT((GLbyte *) &hdr->alignment);
-
-    hdr->swapBytes = !hdr->swapBytes;
-}
-
-void
-__glXDispSwap_Bitmap(GLbyte * pc)
-{
-    __GLXdispatchBitmapHeader *hdr = (__GLXdispatchBitmapHeader *) pc;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT((GLbyte *) &hdr->rowLength);
-    __GLX_SWAP_INT((GLbyte *) &hdr->skipRows);
-    __GLX_SWAP_INT((GLbyte *) &hdr->skipPixels);
-    __GLX_SWAP_INT((GLbyte *) &hdr->alignment);
-
-    __GLX_SWAP_INT((GLbyte *) &hdr->width);
-    __GLX_SWAP_INT((GLbyte *) &hdr->height);
-    __GLX_SWAP_FLOAT((GLbyte *) &hdr->xorig);
-    __GLX_SWAP_FLOAT((GLbyte *) &hdr->yorig);
-    __GLX_SWAP_FLOAT((GLbyte *) &hdr->xmove);
-    __GLX_SWAP_FLOAT((GLbyte *) &hdr->ymove);
-
-    hdr->swapBytes = !hdr->swapBytes;
-
-}
-
-void
-__glXDispSwap_TexImage1D(GLbyte * pc)
-{
-    __GLXdispatchTexImageHeader *hdr = (__GLXdispatchTexImageHeader *) pc;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT((GLbyte *) &hdr->rowLength);
-    __GLX_SWAP_INT((GLbyte *) &hdr->skipRows);
-    __GLX_SWAP_INT((GLbyte *) &hdr->skipPixels);
-    __GLX_SWAP_INT((GLbyte *) &hdr->alignment);
-
-    __GLX_SWAP_INT((GLbyte *) &hdr->target);
-    __GLX_SWAP_INT((GLbyte *) &hdr->level);
-    __GLX_SWAP_INT((GLbyte *) &hdr->components);
-    __GLX_SWAP_INT((GLbyte *) &hdr->width);
-    __GLX_SWAP_INT((GLbyte *) &hdr->height);
-    __GLX_SWAP_INT((GLbyte *) &hdr->border);
-    __GLX_SWAP_INT((GLbyte *) &hdr->format);
-    __GLX_SWAP_INT((GLbyte *) &hdr->type);
-
-    /*
-     ** Just invert swapBytes flag; the GL will figure out if it needs to swap
-     ** the pixel data.
-     */
-    hdr->swapBytes = !hdr->swapBytes;
-}
-
-void
-__glXDispSwap_TexImage2D(GLbyte * pc)
-{
-    __GLXdispatchTexImageHeader *hdr = (__GLXdispatchTexImageHeader *) pc;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT((GLbyte *) &hdr->rowLength);
-    __GLX_SWAP_INT((GLbyte *) &hdr->skipRows);
-    __GLX_SWAP_INT((GLbyte *) &hdr->skipPixels);
-    __GLX_SWAP_INT((GLbyte *) &hdr->alignment);
-
-    __GLX_SWAP_INT((GLbyte *) &hdr->target);
-    __GLX_SWAP_INT((GLbyte *) &hdr->level);
-    __GLX_SWAP_INT((GLbyte *) &hdr->components);
-    __GLX_SWAP_INT((GLbyte *) &hdr->width);
-    __GLX_SWAP_INT((GLbyte *) &hdr->height);
-    __GLX_SWAP_INT((GLbyte *) &hdr->border);
-    __GLX_SWAP_INT((GLbyte *) &hdr->format);
-    __GLX_SWAP_INT((GLbyte *) &hdr->type);
-
-    /*
-     ** Just invert swapBytes flag; the GL will figure out if it needs to swap
-     ** the pixel data.
-     */
-    hdr->swapBytes = !hdr->swapBytes;
-}
-
-void
-__glXDispSwap_TexImage3D(GLbyte * pc)
-{
-    __GLXdispatchTexImage3DHeader *hdr = (__GLXdispatchTexImage3DHeader *) pc;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT((GLbyte *) &hdr->rowLength);
-    __GLX_SWAP_INT((GLbyte *) &hdr->imageHeight);
-    __GLX_SWAP_INT((GLbyte *) &hdr->imageDepth);
-    __GLX_SWAP_INT((GLbyte *) &hdr->skipRows);
-    __GLX_SWAP_INT((GLbyte *) &hdr->skipImages);
-    __GLX_SWAP_INT((GLbyte *) &hdr->skipVolumes);
-    __GLX_SWAP_INT((GLbyte *) &hdr->skipPixels);
-    __GLX_SWAP_INT((GLbyte *) &hdr->alignment);
-
-    __GLX_SWAP_INT((GLbyte *) &hdr->target);
-    __GLX_SWAP_INT((GLbyte *) &hdr->level);
-    __GLX_SWAP_INT((GLbyte *) &hdr->internalformat);
-    __GLX_SWAP_INT((GLbyte *) &hdr->width);
-    __GLX_SWAP_INT((GLbyte *) &hdr->height);
-    __GLX_SWAP_INT((GLbyte *) &hdr->depth);
-    __GLX_SWAP_INT((GLbyte *) &hdr->size4d);
-    __GLX_SWAP_INT((GLbyte *) &hdr->border);
-    __GLX_SWAP_INT((GLbyte *) &hdr->format);
-    __GLX_SWAP_INT((GLbyte *) &hdr->type);
-
-    /*
-     ** Just invert swapBytes flag; the GL will figure out if it needs to swap
-     ** the pixel data.
-     */
-    hdr->swapBytes = !hdr->swapBytes;
-}
-
-void
-__glXDispSwap_DrawPixels(GLbyte * pc)
-{
-    __GLXdispatchDrawPixelsHeader *hdr = (__GLXdispatchDrawPixelsHeader *) pc;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT((GLbyte *) &hdr->rowLength);
-    __GLX_SWAP_INT((GLbyte *) &hdr->skipRows);
-    __GLX_SWAP_INT((GLbyte *) &hdr->skipPixels);
-    __GLX_SWAP_INT((GLbyte *) &hdr->alignment);
-
-    __GLX_SWAP_INT((GLbyte *) &hdr->width);
-    __GLX_SWAP_INT((GLbyte *) &hdr->height);
-    __GLX_SWAP_INT((GLbyte *) &hdr->format);
-    __GLX_SWAP_INT((GLbyte *) &hdr->type);
-
-    /*
-     ** Just invert swapBytes flag; the GL will figure out if it needs to swap
-     ** the pixel data.
-     */
-    hdr->swapBytes = !hdr->swapBytes;
-}
-
-void
-__glXDispSwap_TexSubImage1D(GLbyte * pc)
-{
-    __GLXdispatchTexSubImageHeader *hdr = (__GLXdispatchTexSubImageHeader *) pc;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT((GLbyte *) &hdr->rowLength);
-    __GLX_SWAP_INT((GLbyte *) &hdr->skipRows);
-    __GLX_SWAP_INT((GLbyte *) &hdr->skipPixels);
-    __GLX_SWAP_INT((GLbyte *) &hdr->alignment);
-
-    __GLX_SWAP_INT((GLbyte *) &hdr->target);
-    __GLX_SWAP_INT((GLbyte *) &hdr->level);
-    __GLX_SWAP_INT((GLbyte *) &hdr->xoffset);
-    __GLX_SWAP_INT((GLbyte *) &hdr->width);
-    __GLX_SWAP_INT((GLbyte *) &hdr->format);
-    __GLX_SWAP_INT((GLbyte *) &hdr->type);
-
-    /*
-     ** Just invert swapBytes flag; the GL will figure out if it needs to swap
-     ** the pixel data.
-     */
-    hdr->swapBytes = !hdr->swapBytes;
-}
-
-void
-__glXDispSwap_TexSubImage2D(GLbyte * pc)
-{
-    __GLXdispatchTexSubImageHeader *hdr = (__GLXdispatchTexSubImageHeader *) pc;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT((GLbyte *) &hdr->rowLength);
-    __GLX_SWAP_INT((GLbyte *) &hdr->skipRows);
-    __GLX_SWAP_INT((GLbyte *) &hdr->skipPixels);
-    __GLX_SWAP_INT((GLbyte *) &hdr->alignment);
-
-    __GLX_SWAP_INT((GLbyte *) &hdr->target);
-    __GLX_SWAP_INT((GLbyte *) &hdr->level);
-    __GLX_SWAP_INT((GLbyte *) &hdr->xoffset);
-    __GLX_SWAP_INT((GLbyte *) &hdr->yoffset);
-    __GLX_SWAP_INT((GLbyte *) &hdr->width);
-    __GLX_SWAP_INT((GLbyte *) &hdr->height);
-    __GLX_SWAP_INT((GLbyte *) &hdr->format);
-    __GLX_SWAP_INT((GLbyte *) &hdr->type);
-
-    /*
-     ** Just invert swapBytes flag; the GL will figure out if it needs to swap
-     ** the pixel data.
-     */
-    hdr->swapBytes = !hdr->swapBytes;
-}
-
-void
-__glXDispSwap_TexSubImage3D(GLbyte * pc)
-{
-    __GLXdispatchTexSubImage3DHeader *hdr =
-        (__GLXdispatchTexSubImage3DHeader *) pc;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT((GLbyte *) &hdr->rowLength);
-    __GLX_SWAP_INT((GLbyte *) &hdr->imageHeight);
-    __GLX_SWAP_INT((GLbyte *) &hdr->imageDepth);
-    __GLX_SWAP_INT((GLbyte *) &hdr->skipRows);
-    __GLX_SWAP_INT((GLbyte *) &hdr->skipImages);
-    __GLX_SWAP_INT((GLbyte *) &hdr->skipVolumes);
-    __GLX_SWAP_INT((GLbyte *) &hdr->skipPixels);
-    __GLX_SWAP_INT((GLbyte *) &hdr->alignment);
-
-    __GLX_SWAP_INT((GLbyte *) &hdr->target);
-    __GLX_SWAP_INT((GLbyte *) &hdr->level);
-    __GLX_SWAP_INT((GLbyte *) &hdr->xoffset);
-    __GLX_SWAP_INT((GLbyte *) &hdr->yoffset);
-    __GLX_SWAP_INT((GLbyte *) &hdr->zoffset);
-    __GLX_SWAP_INT((GLbyte *) &hdr->width);
-    __GLX_SWAP_INT((GLbyte *) &hdr->height);
-    __GLX_SWAP_INT((GLbyte *) &hdr->depth);
-    __GLX_SWAP_INT((GLbyte *) &hdr->size4d);
-    __GLX_SWAP_INT((GLbyte *) &hdr->format);
-    __GLX_SWAP_INT((GLbyte *) &hdr->type);
-
-    /*
-     ** Just invert swapBytes flag; the GL will figure out if it needs to swap
-     ** the pixel data.
-     */
-    hdr->swapBytes = !hdr->swapBytes;
-}
-
-void
-__glXDispSwap_ColorTable(GLbyte * pc)
-{
-    __GLXdispatchColorTableHeader *hdr = (__GLXdispatchColorTableHeader *) pc;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT((GLbyte *) &hdr->rowLength);
-    __GLX_SWAP_INT((GLbyte *) &hdr->skipRows);
-    __GLX_SWAP_INT((GLbyte *) &hdr->skipPixels);
-    __GLX_SWAP_INT((GLbyte *) &hdr->alignment);
-
-    __GLX_SWAP_INT((GLbyte *) &hdr->target);
-    __GLX_SWAP_INT((GLbyte *) &hdr->internalformat);
-    __GLX_SWAP_INT((GLbyte *) &hdr->width);
-    __GLX_SWAP_INT((GLbyte *) &hdr->format);
-    __GLX_SWAP_INT((GLbyte *) &hdr->type);
-
-    /*
-     ** Just invert swapBytes flag; the GL will figure out if it needs to swap
-     ** the pixel data.
-     */
-    hdr->swapBytes = !hdr->swapBytes;
-}
-
-void
-__glXDispSwap_ColorSubTable(GLbyte * pc)
-{
-    __GLXdispatchColorSubTableHeader *hdr =
-        (__GLXdispatchColorSubTableHeader *) pc;
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT((GLbyte *) &hdr->rowLength);
-    __GLX_SWAP_INT((GLbyte *) &hdr->skipRows);
-    __GLX_SWAP_INT((GLbyte *) &hdr->skipPixels);
-    __GLX_SWAP_INT((GLbyte *) &hdr->alignment);
-
-    __GLX_SWAP_INT((GLbyte *) &hdr->target);
-    __GLX_SWAP_INT((GLbyte *) &hdr->start);
-    __GLX_SWAP_INT((GLbyte *) &hdr->count);
-    __GLX_SWAP_INT((GLbyte *) &hdr->format);
-    __GLX_SWAP_INT((GLbyte *) &hdr->type);
-
-    /*
-     ** Just invert swapBytes flag; the GL will figure out if it needs to swap
-     ** the pixel data.
-     */
-    hdr->swapBytes = !hdr->swapBytes;
-}
-
-void
-__glXDispSwap_ConvolutionFilter1D(GLbyte * pc)
-{
-    __GLXdispatchConvolutionFilterHeader *hdr =
-        (__GLXdispatchConvolutionFilterHeader *) pc;
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT((GLbyte *) &hdr->rowLength);
-    __GLX_SWAP_INT((GLbyte *) &hdr->skipRows);
-    __GLX_SWAP_INT((GLbyte *) &hdr->skipPixels);
-    __GLX_SWAP_INT((GLbyte *) &hdr->alignment);
-
-    __GLX_SWAP_INT((GLbyte *) &hdr->target);
-    __GLX_SWAP_INT((GLbyte *) &hdr->internalformat);
-    __GLX_SWAP_INT((GLbyte *) &hdr->width);
-    __GLX_SWAP_INT((GLbyte *) &hdr->format);
-    __GLX_SWAP_INT((GLbyte *) &hdr->type);
-
-    /*
-     ** Just invert swapBytes flag; the GL will figure out if it needs to swap
-     ** the pixel data.
-     */
-    hdr->swapBytes = !hdr->swapBytes;
-}
-
-void
-__glXDispSwap_ConvolutionFilter2D(GLbyte * pc)
-{
-    __GLXdispatchConvolutionFilterHeader *hdr =
-        (__GLXdispatchConvolutionFilterHeader *) pc;
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT((GLbyte *) &hdr->rowLength);
-    __GLX_SWAP_INT((GLbyte *) &hdr->skipRows);
-    __GLX_SWAP_INT((GLbyte *) &hdr->skipPixels);
-    __GLX_SWAP_INT((GLbyte *) &hdr->alignment);
-
-    __GLX_SWAP_INT((GLbyte *) &hdr->target);
-    __GLX_SWAP_INT((GLbyte *) &hdr->internalformat);
-    __GLX_SWAP_INT((GLbyte *) &hdr->width);
-    __GLX_SWAP_INT((GLbyte *) &hdr->height);
-    __GLX_SWAP_INT((GLbyte *) &hdr->format);
-    __GLX_SWAP_INT((GLbyte *) &hdr->type);
-
-    /*
-     ** Just invert swapBytes flag; the GL will figure out if it needs to swap
-     ** the pixel data.
-     */
-    hdr->swapBytes = !hdr->swapBytes;
-}
-
-void
-__glXDispSwap_SeparableFilter2D(GLbyte * pc)
-{
-    __GLXdispatchConvolutionFilterHeader *hdr =
-        (__GLXdispatchConvolutionFilterHeader *) pc;
-
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    __GLX_SWAP_INT((GLbyte *) &hdr->rowLength);
-    __GLX_SWAP_INT((GLbyte *) &hdr->skipRows);
-    __GLX_SWAP_INT((GLbyte *) &hdr->skipPixels);
-    __GLX_SWAP_INT((GLbyte *) &hdr->alignment);
-
-    __GLX_SWAP_INT((GLbyte *) &hdr->target);
-    __GLX_SWAP_INT((GLbyte *) &hdr->internalformat);
-    __GLX_SWAP_INT((GLbyte *) &hdr->width);
-    __GLX_SWAP_INT((GLbyte *) &hdr->height);
-    __GLX_SWAP_INT((GLbyte *) &hdr->format);
-    __GLX_SWAP_INT((GLbyte *) &hdr->type);
-
-    /*
-     ** Just invert swapBytes flag; the GL will figure out if it needs to swap
-     ** the pixel data.
-     */
-    hdr->swapBytes = !hdr->swapBytes;
-}
diff --git a/hw/dmx/glxProxy/unpack.h b/hw/dmx/glxProxy/unpack.h
deleted file mode 100644
index 45c27c6..0000000
--- a/hw/dmx/glxProxy/unpack.h
+++ /dev/null
@@ -1,223 +0,0 @@
-#ifndef __GLX_unpack_h__
-#define __GLX_unpack_h__
-
-/*
- * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
- * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice including the dates of first publication and
- * either this permission notice or a reference to
- * http://oss.sgi.com/projects/FreeB/
- * shall be included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of Silicon Graphics, Inc.
- * shall not be used in advertising or otherwise to promote the sale, use or
- * other dealings in this Software without prior written authorization from
- * Silicon Graphics, Inc.
- */
-
-#define __GLX_PAD(s) (((s)+3) & (GLuint)~3)
-
-/*
-** Fetch the context-id out of a SingleReq request pointed to by pc.
-*/
-#define __GLX_GET_SINGLE_CONTEXT_TAG(pc) (((xGLXSingleReq*)pc)->contextTag)
-#define __GLX_GET_VENDPRIV_CONTEXT_TAG(pc) (((xGLXVendorPrivateReq*)pc)->contextTag)
-
-/*
-** Fetch a double from potentially unaligned memory.
-*/
-#ifdef __GLX_ALIGN64
-#define __GLX_MEM_COPY(dst,src,n)	memmove(dst,src,n)
-#define __GLX_GET_DOUBLE(dst,src)	__GLX_MEM_COPY(&dst,src,8)
-#else
-#define __GLX_GET_DOUBLE(dst,src)	(dst) = *((GLdouble*)(src))
-#endif
-
-extern void __glXMemInit(void);
-
-extern xGLXSingleReply __glXReply;
-
-#define __GLX_BEGIN_REPLY(size) \
-  	__glXReply.length = __GLX_PAD(size) >> 2;	\
-  	__glXReply.type = X_Reply; 			\
-  	__glXReply.sequenceNumber = client->sequence;
-
-#define __GLX_SEND_HEADER() \
-	WriteToClient (client, sz_xGLXSingleReply, &__glXReply);
-
-#define __GLX_PUT_RETVAL(a) \
-  	__glXReply.retval = (a);
-
-#define __GLX_PUT_SIZE(a) \
-  	__glXReply.size = (a);
-
-#define __GLX_PUT_RENDERMODE(m) \
-        __glXReply.pad3 = (m)
-
-/*
-** Get a buffer to hold returned data, with the given alignment.  If we have
-** to realloc, allocate size+align, in case the pointer has to be bumped for
-** alignment.  The answerBuffer should already be aligned.
-**
-** NOTE: the cast (long)res below assumes a long is large enough to hold a
-** pointer.
-*/
-#define __GLX_GET_ANSWER_BUFFER(res,cl,size,align)			 \
-    if ((size) > sizeof(answerBuffer)) {				 \
-	int bump;							 \
-	if ((cl)->returnBufSize < (size)+(align)) {			 \
-	    (cl)->returnBuf = (GLbyte*)realloc((cl)->returnBuf,		 \
-						(size)+(align));         \
-	    if (!(cl)->returnBuf) {					 \
-		return BadAlloc;					 \
-	    }								 \
-	    (cl)->returnBufSize = (size)+(align);			 \
-	}								 \
-	res = (char*)cl->returnBuf;					 \
-	bump = (long)(res) % (align);					 \
-	if (bump) res += (align) - (bump);				 \
-    } else {								 \
-	res = (char *)answerBuffer;					 \
-    }
-
-#define __GLX_PUT_BYTE() \
-  	*(GLbyte *)&__glXReply.pad3 = *(GLbyte *)answer
-
-#define __GLX_PUT_SHORT() \
-  	*(GLshort *)&__glXReply.pad3 = *(GLshort *)answer
-
-#define __GLX_PUT_INT() \
-  	*(GLint *)&__glXReply.pad3 = *(GLint *)answer
-
-#define __GLX_PUT_FLOAT() \
-  	*(GLfloat *)&__glXReply.pad3 = *(GLfloat *)answer
-
-#define __GLX_PUT_DOUBLE() \
-  	*(GLdouble *)&__glXReply.pad3 = *(GLdouble *)answer
-
-#define __GLX_SEND_BYTE_ARRAY(len) \
-	WriteToClient(client, __GLX_PAD((len)*__GLX_SIZE_INT8), answer)
-
-#define __GLX_SEND_SHORT_ARRAY(len) \
-	WriteToClient(client, __GLX_PAD((len)*__GLX_SIZE_INT16), answer)
-
-#define __GLX_SEND_INT_ARRAY(len) \
-	WriteToClient(client, (len)*__GLX_SIZE_INT32, answer)
-
-#define __GLX_SEND_FLOAT_ARRAY(len) \
-	WriteToClient(client, (len)*__GLX_SIZE_FLOAT32, answer)
-
-#define __GLX_SEND_DOUBLE_ARRAY(len) \
-	WriteToClient(client, (len)*__GLX_SIZE_FLOAT64, answer)
-
-#define __GLX_SEND_VOID_ARRAY(len)  __GLX_SEND_BYTE_ARRAY(len)
-#define __GLX_SEND_UBYTE_ARRAY(len)  __GLX_SEND_BYTE_ARRAY(len)
-#define __GLX_SEND_USHORT_ARRAY(len) __GLX_SEND_SHORT_ARRAY(len)
-#define __GLX_SEND_UINT_ARRAY(len)  __GLX_SEND_INT_ARRAY(len)
-
-/*
-** PERFORMANCE NOTE:
-** Machine dependent optimizations abound here; these swapping macros can
-** conceivably be replaced with routines that do the job faster.
-*/
-#define __GLX_DECLARE_SWAP_VARIABLES \
-	GLbyte sw
-
-#define __GLX_DECLARE_SWAP_ARRAY_VARIABLES \
-  	GLbyte *swapPC;		\
-  	GLbyte *swapEnd
-
-#define __GLX_SWAP_INT(pc) 			\
-  	sw = ((GLbyte *)(pc))[0]; 		\
-  	((GLbyte *)(pc))[0] = ((GLbyte *)(pc))[3]; 	\
-  	((GLbyte *)(pc))[3] = sw; 		\
-  	sw = ((GLbyte *)(pc))[1]; 		\
-  	((GLbyte *)(pc))[1] = ((GLbyte *)(pc))[2]; 	\
-  	((GLbyte *)(pc))[2] = sw;
-
-#define __GLX_SWAP_SHORT(pc) \
-  	sw = ((GLbyte *)(pc))[0]; 		\
-  	((GLbyte *)(pc))[0] = ((GLbyte *)(pc))[1]; 	\
-  	((GLbyte *)(pc))[1] = sw;
-
-#define __GLX_SWAP_DOUBLE(pc) \
-  	sw = ((GLbyte *)(pc))[0]; 		\
-  	((GLbyte *)(pc))[0] = ((GLbyte *)(pc))[7]; 	\
-  	((GLbyte *)(pc))[7] = sw; 		\
-  	sw = ((GLbyte *)(pc))[1]; 		\
-  	((GLbyte *)(pc))[1] = ((GLbyte *)(pc))[6]; 	\
-  	((GLbyte *)(pc))[6] = sw;			\
-  	sw = ((GLbyte *)(pc))[2]; 		\
-  	((GLbyte *)(pc))[2] = ((GLbyte *)(pc))[5]; 	\
-  	((GLbyte *)(pc))[5] = sw;			\
-  	sw = ((GLbyte *)(pc))[3]; 		\
-  	((GLbyte *)(pc))[3] = ((GLbyte *)(pc))[4]; 	\
-  	((GLbyte *)(pc))[4] = sw;
-
-#define __GLX_SWAP_FLOAT(pc) \
-  	sw = ((GLbyte *)(pc))[0]; 		\
-  	((GLbyte *)(pc))[0] = ((GLbyte *)(pc))[3]; 	\
-  	((GLbyte *)(pc))[3] = sw; 		\
-  	sw = ((GLbyte *)(pc))[1]; 		\
-  	((GLbyte *)(pc))[1] = ((GLbyte *)(pc))[2]; 	\
-  	((GLbyte *)(pc))[2] = sw;
-
-#define __GLX_SWAP_INT_ARRAY(pc, count) \
-  	swapPC = ((GLbyte *)(pc));		\
-  	swapEnd = ((GLbyte *)(pc)) + (count)*__GLX_SIZE_INT32;\
-  	while (swapPC < swapEnd) {		\
-	    __GLX_SWAP_INT(swapPC);		\
-	    swapPC += __GLX_SIZE_INT32;		\
-	}
-
-#define __GLX_SWAP_SHORT_ARRAY(pc, count) \
-  	swapPC = ((GLbyte *)(pc));		\
-  	swapEnd = ((GLbyte *)(pc)) + (count)*__GLX_SIZE_INT16;\
-  	while (swapPC < swapEnd) {		\
-	    __GLX_SWAP_SHORT(swapPC);		\
-	    swapPC += __GLX_SIZE_INT16;		\
-	}
-
-#define __GLX_SWAP_DOUBLE_ARRAY(pc, count) \
-  	swapPC = ((GLbyte *)(pc));		\
-  	swapEnd = ((GLbyte *)(pc)) + (count)*__GLX_SIZE_FLOAT64;\
-  	while (swapPC < swapEnd) {		\
-	    __GLX_SWAP_DOUBLE(swapPC);		\
-	    swapPC += __GLX_SIZE_FLOAT64;	\
-	}
-
-#define __GLX_SWAP_FLOAT_ARRAY(pc, count) \
-  	swapPC = ((GLbyte *)(pc));		\
-  	swapEnd = ((GLbyte *)(pc)) + (count)*__GLX_SIZE_FLOAT32;\
-  	while (swapPC < swapEnd) {		\
-	    __GLX_SWAP_FLOAT(swapPC);		\
-	    swapPC += __GLX_SIZE_FLOAT32;	\
-	}
-
-#define __GLX_SWAP_REPLY_HEADER() \
-  	__GLX_SWAP_SHORT(&__glXReply.sequenceNumber); \
-  	__GLX_SWAP_INT(&__glXReply.length);
-
-#define __GLX_SWAP_REPLY_RETVAL() \
-  	__GLX_SWAP_INT(&__glXReply.retval)
-
-#define __GLX_SWAP_REPLY_SIZE() \
-  	__GLX_SWAP_INT(&__glXReply.size)
-
-#endif                          /* !__GLX_unpack_h__ */
diff --git a/hw/dmx/input/ChkNotMaskEv.c b/hw/dmx/input/ChkNotMaskEv.c
deleted file mode 100644
index 8411af8..0000000
--- a/hw/dmx/input/ChkNotMaskEv.c
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Copyright 1985, 1987, 1998  The Open Group
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation.
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
- * OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name of The Open Group shall not be
- * used in advertising or otherwise to promote the sale, use or other dealings
- * in this Software without prior written authorization from The Open Group.
- */
-/* $XFree86 */
-
-/*
- * Copyright 2002-2003 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/** \file
- * This file provides a #XCheckNotMaskEvent function that is derived
- * from the standard Xlib XCheckMaskEvent function. */
-
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#include "dmx.h"
-#include "ChkNotMaskEv.h"
-
-extern long const _Xevent_to_mask[];
-
-/** Check existing events in queue to find if any match.  If so, return.
- * If not, flush buffer and see if any more events are readable. If one
- * matches, return.  If all else fails, tell the user no events found.
- */
-Bool
-XCheckNotMaskEvent(Display * dpy, long mask, XEvent * event)
-{
-    register _XQEvent *prev, *qelt;
-    unsigned long qe_serial = 0;
-    int n;                      /* time through count */
-
-    LockDisplay(dpy);
-    prev = NULL;
-    for (n = 3; --n >= 0;) {
-        for (qelt = prev ? prev->next : dpy->head;
-             qelt; prev = qelt, qelt = qelt->next) {
-            if (qelt->event.type >= LASTEvent
-                || !(_Xevent_to_mask[qelt->event.type] & mask)) {
-                *event = qelt->event;
-                _XDeq(dpy, prev, qelt);
-                UnlockDisplay(dpy);
-                return True;
-            }
-        }
-        if (prev)
-            qe_serial = prev->qserial_num;
-        switch (n) {
-        case 2:
-            _XEventsQueued(dpy, QueuedAfterReading);
-            break;
-        case 1:
-            _XFlush(dpy);
-            break;
-        }
-        if (prev && prev->qserial_num != qe_serial)
-            /* another thread has snatched this event */
-            prev = NULL;
-    }
-    UnlockDisplay(dpy);
-    return False;
-}
diff --git a/hw/dmx/input/ChkNotMaskEv.h b/hw/dmx/input/ChkNotMaskEv.h
deleted file mode 100644
index 78ad51f..0000000
--- a/hw/dmx/input/ChkNotMaskEv.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright 2002 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-/** \file
- * Interface for #XCheckNotMaskEvent function.  \see ChkNotMaskEv.c */
-
-#ifndef _CHKNOTMASKEV_H_
-#define _CHKNOTMASKEV_H_
-extern Bool XCheckNotMaskEvent(Display * dpy, long mask, XEvent * event);
-#endif
diff --git a/hw/dmx/input/Makefile.am b/hw/dmx/input/Makefile.am
deleted file mode 100644
index 27f49d3..0000000
--- a/hw/dmx/input/Makefile.am
+++ /dev/null
@@ -1,56 +0,0 @@
-noinst_LIBRARIES = libdmxinput.a
-
-if DMX_BUILD_USB
-USBSRCS = usb-keyboard.c \
-          usb-keyboard.h \
-          usb-mouse.c \
-          usb-mouse.h \
-          usb-other.c \
-          usb-other.h \
-          usb-common.c \
-          usb-common.h \
-          usb-private.h
-endif
-
-DRVSRCS = dmxdummy.c \
-          dmxdummy.h \
-          dmxbackend.c \
-          dmxbackend.h \
-          dmxconsole.c \
-          dmxconsole.h \
-          dmxcommon.c \
-          dmxcommon.h
-
-DMXSRCS = dmxinputinit.c \
-          dmxinputinit.h \
-          dmxarg.c \
-          dmxarg.h \
-          dmxevents.c \
-          dmxevents.h \
-	  dmxxinput.c \
-          dmxmotion.c \
-          dmxmotion.h \
-          dmxmap.c \
-          dmxmap.h
-
-
-libdmxinput_a_SOURCES = ChkNotMaskEv.c \
-                        ChkNotMaskEv.h \
-                        atKeynames.h \
-                        $(RAWSRCS) \
-                        $(USBSRCS) \
-                        $(DRVSRCS) \
-                        $(DMXSRCS) \
-                        $(LIBSRCS)
-
-if GLX
-GLX_DEFS = @GL_CFLAGS@
-endif	    
-
-AM_CFLAGS = $(DIX_CFLAGS) \
-            -I$(top_srcdir)/hw/dmx \
-            -DHAVE_DMX_CONFIG_H \
-            $(GLX_DEFS) \
-            @DMXMODULES_CFLAGS@
-
-EXTRA_DIST = dmxdetach.c
diff --git a/hw/dmx/input/Makefile.in b/hw/dmx/input/Makefile.in
deleted file mode 100644
index 2de41ce..0000000
--- a/hw/dmx/input/Makefile.in
+++ /dev/null
@@ -1,957 +0,0 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
-
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-VPATH = @srcdir@
-am__is_gnu_make = { \
-  if test -z '$(MAKELEVEL)'; then \
-    false; \
-  elif test -n '$(MAKE_HOST)'; then \
-    true; \
-  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
-    true; \
-  else \
-    false; \
-  fi; \
-}
-am__make_running_with_option = \
-  case $${target_option-} in \
-      ?) ;; \
-      *) echo "am__make_running_with_option: internal error: invalid" \
-              "target option '$${target_option-}' specified" >&2; \
-         exit 1;; \
-  esac; \
-  has_opt=no; \
-  sane_makeflags=$$MAKEFLAGS; \
-  if $(am__is_gnu_make); then \
-    sane_makeflags=$$MFLAGS; \
-  else \
-    case $$MAKEFLAGS in \
-      *\\[\ \	]*) \
-        bs=\\; \
-        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
-          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
-    esac; \
-  fi; \
-  skip_next=no; \
-  strip_trailopt () \
-  { \
-    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
-  }; \
-  for flg in $$sane_makeflags; do \
-    test $$skip_next = yes && { skip_next=no; continue; }; \
-    case $$flg in \
-      *=*|--*) continue;; \
-        -*I) strip_trailopt 'I'; skip_next=yes;; \
-      -*I?*) strip_trailopt 'I';; \
-        -*O) strip_trailopt 'O'; skip_next=yes;; \
-      -*O?*) strip_trailopt 'O';; \
-        -*l) strip_trailopt 'l'; skip_next=yes;; \
-      -*l?*) strip_trailopt 'l';; \
-      -[dEDm]) skip_next=yes;; \
-      -[JT]) skip_next=yes;; \
-    esac; \
-    case $$flg in \
-      *$$target_option*) has_opt=yes; break;; \
-    esac; \
-  done; \
-  test $$has_opt = yes
-am__make_dryrun = (target_option=n; $(am__make_running_with_option))
-am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-subdir = hw/dmx/input
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \
-	$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \
-	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
-	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
-	$(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-	$(ACLOCAL_M4)
-DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
-	$(top_builddir)/include/xorg-server.h \
-	$(top_builddir)/include/dix-config.h \
-	$(top_builddir)/include/xorg-config.h \
-	$(top_builddir)/include/xkb-config.h \
-	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
-	$(top_builddir)/include/version-config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-LIBRARIES = $(noinst_LIBRARIES)
-ARFLAGS = cru
-AM_V_AR = $(am__v_AR_@AM_V@)
-am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@)
-am__v_AR_0 = @echo "  AR      " $@;
-am__v_AR_1 = 
-libdmxinput_a_AR = $(AR) $(ARFLAGS)
-libdmxinput_a_LIBADD =
-am__libdmxinput_a_SOURCES_DIST = ChkNotMaskEv.c ChkNotMaskEv.h \
-	atKeynames.h usb-keyboard.c usb-keyboard.h usb-mouse.c \
-	usb-mouse.h usb-other.c usb-other.h usb-common.c usb-common.h \
-	usb-private.h dmxdummy.c dmxdummy.h dmxbackend.c dmxbackend.h \
-	dmxconsole.c dmxconsole.h dmxcommon.c dmxcommon.h \
-	dmxinputinit.c dmxinputinit.h dmxarg.c dmxarg.h dmxevents.c \
-	dmxevents.h dmxxinput.c dmxmotion.c dmxmotion.h dmxmap.c \
-	dmxmap.h
-@DMX_BUILD_USB_TRUE@am__objects_1 = usb-keyboard.$(OBJEXT) \
-@DMX_BUILD_USB_TRUE@	usb-mouse.$(OBJEXT) usb-other.$(OBJEXT) \
-@DMX_BUILD_USB_TRUE@	usb-common.$(OBJEXT)
-am__objects_2 = dmxdummy.$(OBJEXT) dmxbackend.$(OBJEXT) \
-	dmxconsole.$(OBJEXT) dmxcommon.$(OBJEXT)
-am__objects_3 = dmxinputinit.$(OBJEXT) dmxarg.$(OBJEXT) \
-	dmxevents.$(OBJEXT) dmxxinput.$(OBJEXT) dmxmotion.$(OBJEXT) \
-	dmxmap.$(OBJEXT)
-am_libdmxinput_a_OBJECTS = ChkNotMaskEv.$(OBJEXT) $(am__objects_1) \
-	$(am__objects_2) $(am__objects_3)
-libdmxinput_a_OBJECTS = $(am_libdmxinput_a_OBJECTS)
-AM_V_P = $(am__v_P_@AM_V@)
-am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
-am__v_P_0 = false
-am__v_P_1 = :
-AM_V_GEN = $(am__v_GEN_@AM_V@)
-am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo "  GEN     " $@;
-am__v_GEN_1 = 
-AM_V_at = $(am__v_at_@AM_V@)
-am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
-am__v_at_0 = @
-am__v_at_1 = 
-DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__maybe_remake_depfiles = depfiles
-am__depfiles_remade = ./$(DEPDIR)/ChkNotMaskEv.Po \
-	./$(DEPDIR)/dmxarg.Po ./$(DEPDIR)/dmxbackend.Po \
-	./$(DEPDIR)/dmxcommon.Po ./$(DEPDIR)/dmxconsole.Po \
-	./$(DEPDIR)/dmxdummy.Po ./$(DEPDIR)/dmxevents.Po \
-	./$(DEPDIR)/dmxinputinit.Po ./$(DEPDIR)/dmxmap.Po \
-	./$(DEPDIR)/dmxmotion.Po ./$(DEPDIR)/dmxxinput.Po \
-	./$(DEPDIR)/usb-common.Po ./$(DEPDIR)/usb-keyboard.Po \
-	./$(DEPDIR)/usb-mouse.Po ./$(DEPDIR)/usb-other.Po
-am__mv = mv -f
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
-	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-AM_V_lt = $(am__v_lt_@AM_V@)
-am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
-am__v_lt_0 = --silent
-am__v_lt_1 = 
-LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
-	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-	$(AM_CFLAGS) $(CFLAGS)
-AM_V_CC = $(am__v_CC_@AM_V@)
-am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
-am__v_CC_0 = @echo "  CC      " $@;
-am__v_CC_1 = 
-CCLD = $(CC)
-LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-	$(AM_LDFLAGS) $(LDFLAGS) -o $@
-AM_V_CCLD = $(am__v_CCLD_@AM_V@)
-am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
-am__v_CCLD_0 = @echo "  CCLD    " $@;
-am__v_CCLD_1 = 
-SOURCES = $(libdmxinput_a_SOURCES)
-DIST_SOURCES = $(am__libdmxinput_a_SOURCES_DIST)
-am__can_run_installinfo = \
-  case $$AM_UPDATE_INFO_DIR in \
-    n|no|NO) false;; \
-    *) (install-info --version) >/dev/null 2>&1;; \
-  esac
-am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
-# Read a list of newline-separated strings from the standard input,
-# and print each of them once, without duplicates.  Input order is
-# *not* preserved.
-am__uniquify_input = $(AWK) '\
-  BEGIN { nonempty = 0; } \
-  { items[$$0] = 1; nonempty = 1; } \
-  END { if (nonempty) { for (i in items) print i; }; } \
-'
-# Make sure the list of sources is unique.  This is necessary because,
-# e.g., the same source file might be shared among _SOURCES variables
-# for different programs/libraries.
-am__define_uniq_tagged_files = \
-  list='$(am__tagged_files)'; \
-  unique=`for i in $$list; do \
-    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-  done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
-am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
-ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
-AMTAR = @AMTAR@
-AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
-APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@
-APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@
-APP_MAN_DIR = @APP_MAN_DIR@
-APP_MAN_SUFFIX = @APP_MAN_SUFFIX@
-AR = @AR@
-AS = @AS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-BASE_CFLAGS = @BASE_CFLAGS@
-BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
-BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
-BUNDLE_VERSION = @BUNDLE_VERSION@
-BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
-CC = @CC@
-CCAS = @CCAS@
-CCASDEPMODE = @CCASDEPMODE@
-CCASFLAGS = @CCASFLAGS@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CHANGELOG_CMD = @CHANGELOG_CMD@
-COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CWARNFLAGS = @CWARNFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DBUS_CFLAGS = @DBUS_CFLAGS@
-DBUS_LIBS = @DBUS_LIBS@
-DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@
-DEFAULT_LOGDIR = @DEFAULT_LOGDIR@
-DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@
-DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@
-DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@
-DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DGA_CFLAGS = @DGA_CFLAGS@
-DGA_LIBS = @DGA_LIBS@
-DIX_CFLAGS = @DIX_CFLAGS@
-DIX_LIB = @DIX_LIB@
-DLLTOOL = @DLLTOOL@
-DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
-DOT = @DOT@
-DOXYGEN = @DOXYGEN@
-DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
-DRI2PROTO_LIBS = @DRI2PROTO_LIBS@
-DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@
-DRI3PROTO_LIBS = @DRI3PROTO_LIBS@
-DRIVER_MAN_DIR = @DRIVER_MAN_DIR@
-DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
-DRI_DRIVER_PATH = @DRI_DRIVER_PATH@
-DSYMUTIL = @DSYMUTIL@
-DTRACE = @DTRACE@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-FILE_MAN_DIR = @FILE_MAN_DIR@
-FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
-FONT100DPIDIR = @FONT100DPIDIR@
-FONT75DPIDIR = @FONT75DPIDIR@
-FONTMISCDIR = @FONTMISCDIR@
-FONTOTFDIR = @FONTOTFDIR@
-FONTROOTDIR = @FONTROOTDIR@
-FONTTTFDIR = @FONTTTFDIR@
-FONTTYPE1DIR = @FONTTYPE1DIR@
-FOP = @FOP@
-GBM_CFLAGS = @GBM_CFLAGS@
-GBM_LIBS = @GBM_LIBS@
-GLAMOR_CFLAGS = @GLAMOR_CFLAGS@
-GLAMOR_LIBS = @GLAMOR_LIBS@
-GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@
-GLX_DEFINES = @GLX_DEFINES@
-GLX_SYS_LIBS = @GLX_SYS_LIBS@
-GL_CFLAGS = @GL_CFLAGS@
-GL_LIBS = @GL_LIBS@
-GREP = @GREP@
-HAL_CFLAGS = @HAL_CFLAGS@
-HAL_LIBS = @HAL_LIBS@
-HAVE_DOT = @HAVE_DOT@
-INSTALL = @INSTALL@
-INSTALL_CMD = @INSTALL_CMD@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-KDRIVE_CFLAGS = @KDRIVE_CFLAGS@
-KDRIVE_INCS = @KDRIVE_INCS@
-KDRIVE_LIBS = @KDRIVE_LIBS@
-KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@
-KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@
-KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@
-KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@
-KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@
-KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@
-KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@
-LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@
-LEX = @LEX@
-LEXLIB = @LEXLIB@
-LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
-LIBDRM_CFLAGS = @LIBDRM_CFLAGS@
-LIBDRM_LIBS = @LIBDRM_LIBS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@
-LIBSHA1_LIBS = @LIBSHA1_LIBS@
-LIBTOOL = @LIBTOOL@
-LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
-LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
-LIB_MAN_DIR = @LIB_MAN_DIR@
-LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
-MAIN_LIB = @MAIN_LIB@
-MAKEINFO = @MAKEINFO@
-MANIFEST_TOOL = @MANIFEST_TOOL@
-MAN_SUBSTS = @MAN_SUBSTS@
-MISC_MAN_DIR = @MISC_MAN_DIR@
-MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
-MKDIR_P = @MKDIR_P@
-NM = @NM@
-NMEDIT = @NMEDIT@
-OBJC = @OBJC@
-OBJCCLD = @OBJCCLD@
-OBJCDEPMODE = @OBJCDEPMODE@
-OBJCFLAGS = @OBJCFLAGS@
-OBJCLINK = @OBJCLINK@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
-OPENSSL_LIBS = @OPENSSL_LIBS@
-OS_LIB = @OS_LIB@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@
-PCIACCESS_LIBS = @PCIACCESS_LIBS@
-PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@
-PIXMAN_CFLAGS = @PIXMAN_CFLAGS@
-PIXMAN_LIBS = @PIXMAN_LIBS@
-PKG_CONFIG = @PKG_CONFIG@
-PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
-PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
-PROJECTROOT = @PROJECTROOT@
-PTHREAD_CC = @PTHREAD_CC@
-PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
-PTHREAD_LIBS = @PTHREAD_LIBS@
-PYTHON3 = @PYTHON3@
-RANLIB = @RANLIB@
-RAWCPP = @RAWCPP@
-RAWCPPFLAGS = @RAWCPPFLAGS@
-RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
-SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
-SED = @SED@
-SELINUX_CFLAGS = @SELINUX_CFLAGS@
-SELINUX_LIBS = @SELINUX_LIBS@
-SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@
-SET_MAKE = @SET_MAKE@
-SHA1_CFLAGS = @SHA1_CFLAGS@
-SHA1_LIBS = @SHA1_LIBS@
-SHELL = @SHELL@
-SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@
-STRICT_CFLAGS = @STRICT_CFLAGS@
-STRIP = @STRIP@
-STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@
-SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@
-SYSCONFDIR = @SYSCONFDIR@
-SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@
-SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@
-TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@
-UDEV_CFLAGS = @UDEV_CFLAGS@
-UDEV_LIBS = @UDEV_LIBS@
-UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
-VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
-VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
-WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
-WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
-WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
-XCONFIGDIR = @XCONFIGDIR@
-XCONFIGFILE = @XCONFIGFILE@
-XDMCP_CFLAGS = @XDMCP_CFLAGS@
-XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
-XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
-XEPHYR_INCS = @XEPHYR_INCS@
-XEPHYR_LIBS = @XEPHYR_LIBS@
-XF86CONFIGDIR = @XF86CONFIGDIR@
-XF86CONFIGFILE = @XF86CONFIGFILE@
-XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@
-XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@
-XKB_COMPILED_DIR = @XKB_COMPILED_DIR@
-XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@
-XKB_DFLT_MODEL = @XKB_DFLT_MODEL@
-XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@
-XKB_DFLT_RULES = @XKB_DFLT_RULES@
-XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@
-XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@
-XLIB_CFLAGS = @XLIB_CFLAGS@
-XLIB_LIBS = @XLIB_LIBS@
-XMLTO = @XMLTO@
-XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@
-XNESTMODULES_LIBS = @XNESTMODULES_LIBS@
-XNEST_LIBS = @XNEST_LIBS@
-XNEST_SYS_LIBS = @XNEST_SYS_LIBS@
-XORG_CFLAGS = @XORG_CFLAGS@
-XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@
-XORG_INCS = @XORG_INCS@
-XORG_LIBS = @XORG_LIBS@
-XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@
-XORG_MAN_PAGE = @XORG_MAN_PAGE@
-XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@
-XORG_MODULES_LIBS = @XORG_MODULES_LIBS@
-XORG_OS_SUBDIR = @XORG_OS_SUBDIR@
-XORG_SGML_PATH = @XORG_SGML_PATH@
-XORG_SYS_LIBS = @XORG_SYS_LIBS@
-XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@
-XPBPROXY_LIBS = @XPBPROXY_LIBS@
-XQUARTZ_LIBS = @XQUARTZ_LIBS@
-XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
-XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
-XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
-XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
-XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
-XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@
-XSERVER_LIBS = @XSERVER_LIBS@
-XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@
-XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
-XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
-XSLTPROC = @XSLTPROC@
-XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
-XVFB_LIBS = @XVFB_LIBS@
-XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
-XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
-XWINMODULES_LIBS = @XWINMODULES_LIBS@
-XWIN_LIBS = @XWIN_LIBS@
-XWIN_SERVER_NAME = @XWIN_SERVER_NAME@
-XWIN_SYS_LIBS = @XWIN_SYS_LIBS@
-YACC = @YACC@
-YFLAGS = @YFLAGS@
-abi_ansic = @abi_ansic@
-abi_extension = @abi_extension@
-abi_videodrv = @abi_videodrv@
-abi_xinput = @abi_xinput@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_AR = @ac_ct_AR@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-ax_pthread_config = @ax_pthread_config@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-driverdir = @driverdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-extdir = @extdir@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-logdir = @logdir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-moduledir = @moduledir@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-runstatedir = @runstatedir@
-sbindir = @sbindir@
-sdkdir = @sdkdir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-symbol_visibility = @symbol_visibility@
-sysconfdir = @sysconfdir@
-sysconfigdir = @sysconfigdir@
-target_alias = @target_alias@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-noinst_LIBRARIES = libdmxinput.a
-@DMX_BUILD_USB_TRUE@USBSRCS = usb-keyboard.c \
-@DMX_BUILD_USB_TRUE@          usb-keyboard.h \
-@DMX_BUILD_USB_TRUE@          usb-mouse.c \
-@DMX_BUILD_USB_TRUE@          usb-mouse.h \
-@DMX_BUILD_USB_TRUE@          usb-other.c \
-@DMX_BUILD_USB_TRUE@          usb-other.h \
-@DMX_BUILD_USB_TRUE@          usb-common.c \
-@DMX_BUILD_USB_TRUE@          usb-common.h \
-@DMX_BUILD_USB_TRUE@          usb-private.h
-
-DRVSRCS = dmxdummy.c \
-          dmxdummy.h \
-          dmxbackend.c \
-          dmxbackend.h \
-          dmxconsole.c \
-          dmxconsole.h \
-          dmxcommon.c \
-          dmxcommon.h
-
-DMXSRCS = dmxinputinit.c \
-          dmxinputinit.h \
-          dmxarg.c \
-          dmxarg.h \
-          dmxevents.c \
-          dmxevents.h \
-	  dmxxinput.c \
-          dmxmotion.c \
-          dmxmotion.h \
-          dmxmap.c \
-          dmxmap.h
-
-libdmxinput_a_SOURCES = ChkNotMaskEv.c \
-                        ChkNotMaskEv.h \
-                        atKeynames.h \
-                        $(RAWSRCS) \
-                        $(USBSRCS) \
-                        $(DRVSRCS) \
-                        $(DMXSRCS) \
-                        $(LIBSRCS)
-
-@GLX_TRUE@GLX_DEFS = @GL_CFLAGS@
-AM_CFLAGS = $(DIX_CFLAGS) \
-            -I$(top_srcdir)/hw/dmx \
-            -DHAVE_DMX_CONFIG_H \
-            $(GLX_DEFS) \
-            @DMXMODULES_CFLAGS@
-
-EXTRA_DIST = dmxdetach.c
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
-	@for dep in $?; do \
-	  case '$(am__configure_deps)' in \
-	    *$$dep*) \
-	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
-	        && { if test -f $@; then exit 0; else break; fi; }; \
-	      exit 1;; \
-	  esac; \
-	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/dmx/input/Makefile'; \
-	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --foreign hw/dmx/input/Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	@case '$?' in \
-	  *config.status*) \
-	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
-	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
-	esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure:  $(am__configure_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-
-clean-noinstLIBRARIES:
-	-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-
-libdmxinput.a: $(libdmxinput_a_OBJECTS) $(libdmxinput_a_DEPENDENCIES) $(EXTRA_libdmxinput_a_DEPENDENCIES) 
-	$(AM_V_at)-rm -f libdmxinput.a
-	$(AM_V_AR)$(libdmxinput_a_AR) libdmxinput.a $(libdmxinput_a_OBJECTS) $(libdmxinput_a_LIBADD)
-	$(AM_V_at)$(RANLIB) libdmxinput.a
-
-mostlyclean-compile:
-	-rm -f *.$(OBJEXT)
-
-distclean-compile:
-	-rm -f *.tab.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ChkNotMaskEv.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxarg.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxbackend.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxcommon.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxconsole.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxdummy.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxevents.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxinputinit.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxmap.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxmotion.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxxinput.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/usb-common.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/usb-keyboard.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/usb-mouse.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/usb-other.Po@am__quote@ # am--include-marker
-
-$(am__depfiles_remade):
-	@$(MKDIR_P) $(@D)
-	@echo '# dummy' >$@-t && $(am__mv) $@-t $@
-
-am--depfiles: $(am__depfiles_remade)
-
-.c.o:
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
-
-.c.obj:
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
-
-.c.lo:
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
-
-mostlyclean-libtool:
-	-rm -f *.lo
-
-clean-libtool:
-	-rm -rf .libs _libs
-
-ID: $(am__tagged_files)
-	$(am__define_uniq_tagged_files); mkid -fID $$unique
-tags: tags-am
-TAGS: tags
-
-tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
-	set x; \
-	here=`pwd`; \
-	$(am__define_uniq_tagged_files); \
-	shift; \
-	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
-	  test -n "$$unique" || unique=$$empty_fix; \
-	  if test $$# -gt 0; then \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      "$$@" $$unique; \
-	  else \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      $$unique; \
-	  fi; \
-	fi
-ctags: ctags-am
-
-CTAGS: ctags
-ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
-	$(am__define_uniq_tagged_files); \
-	test -z "$(CTAGS_ARGS)$$unique" \
-	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$unique
-
-GTAGS:
-	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && $(am__cd) $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) "$$here"
-cscopelist: cscopelist-am
-
-cscopelist-am: $(am__tagged_files)
-	list='$(am__tagged_files)'; \
-	case "$(srcdir)" in \
-	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
-	  *) sdir=$(subdir)/$(srcdir) ;; \
-	esac; \
-	for i in $$list; do \
-	  if test -f "$$i"; then \
-	    echo "$(subdir)/$$i"; \
-	  else \
-	    echo "$$sdir/$$i"; \
-	  fi; \
-	done >> $(top_builddir)/cscope.files
-
-distclean-tags:
-	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(BUILT_SOURCES)
-	$(MAKE) $(AM_MAKEFLAGS) distdir-am
-
-distdir-am: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	list='$(DISTFILES)'; \
-	  dist_files=`for file in $$list; do echo $$file; done | \
-	  sed -e "s|^$$srcdirstrip/||;t" \
-	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
-	case $$dist_files in \
-	  */*) $(MKDIR_P) `echo "$$dist_files" | \
-			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
-			   sort -u` ;; \
-	esac; \
-	for file in $$dist_files; do \
-	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  if test -d $$d/$$file; then \
-	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
-	    if test -d "$(distdir)/$$file"; then \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
-	  else \
-	    test -f "$(distdir)/$$file" \
-	    || cp -p $$d/$$file "$(distdir)/$$file" \
-	    || exit 1; \
-	  fi; \
-	done
-check-am: all-am
-check: check-am
-all-am: Makefile $(LIBRARIES)
-installdirs:
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
-	if test -z '$(STRIP)'; then \
-	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	      install; \
-	else \
-	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
-	fi
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
-	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
-	@echo "This command is intended for maintainers to use"
-	@echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \
-	mostlyclean-am
-
-distclean: distclean-am
-		-rm -f ./$(DEPDIR)/ChkNotMaskEv.Po
-	-rm -f ./$(DEPDIR)/dmxarg.Po
-	-rm -f ./$(DEPDIR)/dmxbackend.Po
-	-rm -f ./$(DEPDIR)/dmxcommon.Po
-	-rm -f ./$(DEPDIR)/dmxconsole.Po
-	-rm -f ./$(DEPDIR)/dmxdummy.Po
-	-rm -f ./$(DEPDIR)/dmxevents.Po
-	-rm -f ./$(DEPDIR)/dmxinputinit.Po
-	-rm -f ./$(DEPDIR)/dmxmap.Po
-	-rm -f ./$(DEPDIR)/dmxmotion.Po
-	-rm -f ./$(DEPDIR)/dmxxinput.Po
-	-rm -f ./$(DEPDIR)/usb-common.Po
-	-rm -f ./$(DEPDIR)/usb-keyboard.Po
-	-rm -f ./$(DEPDIR)/usb-mouse.Po
-	-rm -f ./$(DEPDIR)/usb-other.Po
-	-rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
-	distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am:
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
-		-rm -f ./$(DEPDIR)/ChkNotMaskEv.Po
-	-rm -f ./$(DEPDIR)/dmxarg.Po
-	-rm -f ./$(DEPDIR)/dmxbackend.Po
-	-rm -f ./$(DEPDIR)/dmxcommon.Po
-	-rm -f ./$(DEPDIR)/dmxconsole.Po
-	-rm -f ./$(DEPDIR)/dmxdummy.Po
-	-rm -f ./$(DEPDIR)/dmxevents.Po
-	-rm -f ./$(DEPDIR)/dmxinputinit.Po
-	-rm -f ./$(DEPDIR)/dmxmap.Po
-	-rm -f ./$(DEPDIR)/dmxmotion.Po
-	-rm -f ./$(DEPDIR)/dmxxinput.Po
-	-rm -f ./$(DEPDIR)/usb-common.Po
-	-rm -f ./$(DEPDIR)/usb-keyboard.Po
-	-rm -f ./$(DEPDIR)/usb-mouse.Po
-	-rm -f ./$(DEPDIR)/usb-other.Po
-	-rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic \
-	mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am:
-
-.MAKE: install-am install-strip
-
-.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
-	clean-generic clean-libtool clean-noinstLIBRARIES \
-	cscopelist-am ctags ctags-am distclean distclean-compile \
-	distclean-generic distclean-libtool distclean-tags distdir dvi \
-	dvi-am html html-am info info-am install install-am \
-	install-data install-data-am install-dvi install-dvi-am \
-	install-exec install-exec-am install-html install-html-am \
-	install-info install-info-am install-man install-pdf \
-	install-pdf-am install-ps install-ps-am install-strip \
-	installcheck installcheck-am installdirs maintainer-clean \
-	maintainer-clean-generic mostlyclean mostlyclean-compile \
-	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-	tags tags-am uninstall uninstall-am
-
-.PRECIOUS: Makefile
-
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/hw/dmx/input/atKeynames.h b/hw/dmx/input/atKeynames.h
deleted file mode 100644
index 68e2eb3..0000000
--- a/hw/dmx/input/atKeynames.h
+++ /dev/null
@@ -1,292 +0,0 @@
-/*
- * Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany.
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of Thomas Roell not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission.  Thomas Roell makes no representations
- * about the suitability of this software for any purpose.  It is provided
- * "as is" without express or implied warranty.
- *
- * THOMAS ROELL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL THOMAS ROELL BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- *
- */
-/*
- * Copyright (c) 1994-2003 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name of the copyright holder(s)
- * and author(s) shall not be used in advertising or otherwise to promote
- * the sale, use or other dealings in this Software without prior written
- * authorization from the copyright holder(s) and author(s).
- */
-
-#ifndef _ATKEYNAMES_H
-#define _ATKEYNAMES_H
-
-#define XK_TECHNICAL
-#define	XK_KATAKANA
-#include <X11/keysym.h>
-#include <X11/XF86keysym.h>
-
-#define GLYPHS_PER_KEY	4
-#define NUM_KEYCODES	248
-#define MIN_KEYCODE     8
-#define MAX_KEYCODE     (NUM_KEYCODES + MIN_KEYCODE - 1)
-
-#define AltMask		Mod1Mask
-#define NumLockMask	Mod2Mask
-#define AltLangMask	Mod3Mask
-#define KanaMask	Mod4Mask
-#define ScrollLockMask	Mod5Mask
-
-/*
- * NOTE: The AT/MF keyboards can generate (via the 8042) two (MF: three)
- *       sets of scancodes. Set3 can only be generated by a MF keyboard.
- *       Set2 sends a makecode for keypress, and the same code prefixed by a
- *       F0 for keyrelease. This is a little bit ugly to handle. Thus we use
- *       here for X386 the PC/XT compatible Set1. This set uses 8bit scancodes.
- *       Bit 7 ist set if the key is released. The code E0 switches to a
- *       different meaning to add the new MF cursorkeys, while not breaking old
- *       applications. E1 is another special prefix. Since I assume that there
- *       will be further versions of PC/XT scancode compatible keyboards, we
- *       may be in trouble one day.
- *
- * IDEA: 1) Use Set2 on AT84 keyboards and translate it to MF Set3.
- *       2) Use the keyboards native set and translate it to common keysyms.
- */
-
-/*
- * definition of the AT84/MF101/MF102 Keyboard:
- * ============================================================
- *       Defined             Key Cap Glyphs       Pressed value
- *      Key Name            Main       Also       (hex)    (dec)
- *      ----------------   ---------- -------    ------    ------
- */
-
-#define KEY_Escape       /* Escape                0x01  */    1
-#define KEY_1            /* 1           !         0x02  */    2
-#define KEY_2            /* 2           @         0x03  */    3
-#define KEY_3            /* 3           #         0x04  */    4
-#define KEY_4            /* 4           $         0x05  */    5
-#define KEY_5            /* 5           %         0x06  */    6
-#define KEY_6            /* 6           ^         0x07  */    7
-#define KEY_7            /* 7           &         0x08  */    8
-#define KEY_8            /* 8           *         0x09  */    9
-#define KEY_9            /* 9           (         0x0a  */   10
-#define KEY_0            /* 0           )         0x0b  */   11
-#define KEY_Minus        /* - (Minus)   _ (Under) 0x0c  */   12
-#define KEY_Equal        /* = (Equal)   +         0x0d  */   13
-#define KEY_BackSpace    /* Back Space            0x0e  */   14
-#define KEY_Tab          /* Tab                   0x0f  */   15
-#define KEY_Q            /* Q                     0x10  */   16
-#define KEY_W            /* W                     0x11  */   17
-#define KEY_E            /* E                     0x12  */   18
-#define KEY_R            /* R                     0x13  */   19
-#define KEY_T            /* T                     0x14  */   20
-#define KEY_Y            /* Y                     0x15  */   21
-#define KEY_U            /* U                     0x16  */   22
-#define KEY_I            /* I                     0x17  */   23
-#define KEY_O            /* O                     0x18  */   24
-#define KEY_P            /* P                     0x19  */   25
-#define KEY_LBrace       /* [           {         0x1a  */   26
-#define KEY_RBrace       /* ]           }         0x1b  */   27
-#define KEY_Enter        /* Enter                 0x1c  */   28
-#define KEY_LCtrl        /* Ctrl(left)            0x1d  */   29
-#define KEY_A            /* A                     0x1e  */   30
-#define KEY_S            /* S                     0x1f  */   31
-#define KEY_D            /* D                     0x20  */   32
-#define KEY_F            /* F                     0x21  */   33
-#define KEY_G            /* G                     0x22  */   34
-#define KEY_H            /* H                     0x23  */   35
-#define KEY_J            /* J                     0x24  */   36
-#define KEY_K            /* K                     0x25  */   37
-#define KEY_L            /* L                     0x26  */   38
-#define KEY_SemiColon    /* ;(SemiColon) :(Colon) 0x27  */   39
-#define KEY_Quote        /* ' (Apostr)  " (Quote) 0x28  */   40
-#define KEY_Tilde        /* ` (Accent)  ~ (Tilde) 0x29  */   41
-#define KEY_ShiftL       /* Shift(left)           0x2a  */   42
-#define KEY_BSlash       /* \(BckSlash) |(VertBar)0x2b  */   43
-#define KEY_Z            /* Z                     0x2c  */   44
-#define KEY_X            /* X                     0x2d  */   45
-#define KEY_C            /* C                     0x2e  */   46
-#define KEY_V            /* V                     0x2f  */   47
-#define KEY_B            /* B                     0x30  */   48
-#define KEY_N            /* N                     0x31  */   49
-#define KEY_M            /* M                     0x32  */   50
-#define KEY_Comma        /* , (Comma)   < (Less)  0x33  */   51
-#define KEY_Period       /* . (Period)  >(Greater)0x34  */   52
-#define KEY_Slash        /* / (Slash)   ?         0x35  */   53
-#define KEY_ShiftR       /* Shift(right)          0x36  */   54
-#define KEY_KP_Multiply  /* *                     0x37  */   55
-#define KEY_Alt          /* Alt(left)             0x38  */   56
-#define KEY_Space        /*   (SpaceBar)          0x39  */   57
-#define KEY_CapsLock     /* CapsLock              0x3a  */   58
-#define KEY_F1           /* F1                    0x3b  */   59
-#define KEY_F2           /* F2                    0x3c  */   60
-#define KEY_F3           /* F3                    0x3d  */   61
-#define KEY_F4           /* F4                    0x3e  */   62
-#define KEY_F5           /* F5                    0x3f  */   63
-#define KEY_F6           /* F6                    0x40  */   64
-#define KEY_F7           /* F7                    0x41  */   65
-#define KEY_F8           /* F8                    0x42  */   66
-#define KEY_F9           /* F9                    0x43  */   67
-#define KEY_F10          /* F10                   0x44  */   68
-#define KEY_NumLock      /* NumLock               0x45  */   69
-#define KEY_ScrollLock   /* ScrollLock            0x46  */   70
-#define KEY_KP_7         /* 7           Home      0x47  */   71
-#define KEY_KP_8         /* 8           Up        0x48  */   72
-#define KEY_KP_9         /* 9           PgUp      0x49  */   73
-#define KEY_KP_Minus     /* - (Minus)             0x4a  */   74
-#define KEY_KP_4         /* 4           Left      0x4b  */   75
-#define KEY_KP_5         /* 5                     0x4c  */   76
-#define KEY_KP_6         /* 6           Right     0x4d  */   77
-#define KEY_KP_Plus      /* + (Plus)              0x4e  */   78
-#define KEY_KP_1         /* 1           End       0x4f  */   79
-#define KEY_KP_2         /* 2           Down      0x50  */   80
-#define KEY_KP_3         /* 3           PgDown    0x51  */   81
-#define KEY_KP_0         /* 0           Insert    0x52  */   82
-#define KEY_KP_Decimal   /* . (Decimal) Delete    0x53  */   83
-#define KEY_SysReqest    /* SysReqest             0x54  */   84
-                         /* NOTUSED               0x55  */
-#define KEY_Less         /* < (Less)   >(Greater) 0x56  */   86
-#define KEY_F11          /* F11                   0x57  */   87
-#define KEY_F12          /* F12                   0x58  */   88
-
-#define KEY_Prefix0      /* special               0x60  */   96
-#define KEY_Prefix1      /* specail               0x61  */   97
-
-/*
- * The 'scancodes' below are generated by the server, because the MF101/102
- * keyboard sends them as sequence of other scancodes
- */
-#define KEY_Home         /* Home                  0x59  */   89
-#define KEY_Up           /* Up                    0x5a  */   90
-#define KEY_PgUp         /* PgUp                  0x5b  */   91
-#define KEY_Left         /* Left                  0x5c  */   92
-#define KEY_Begin        /* Begin                 0x5d  */   93
-#define KEY_Right        /* Right                 0x5e  */   94
-#define KEY_End          /* End                   0x5f  */   95
-#define KEY_Down         /* Down                  0x60  */   96
-#define KEY_PgDown       /* PgDown                0x61  */   97
-#define KEY_Insert       /* Insert                0x62  */   98
-#define KEY_Delete       /* Delete                0x63  */   99
-#define KEY_KP_Enter     /* Enter                 0x64  */  100
-#define KEY_RCtrl        /* Ctrl(right)           0x65  */  101
-#define KEY_Pause        /* Pause                 0x66  */  102
-#define KEY_Print        /* Print                 0x67  */  103
-#define KEY_KP_Divide    /* Divide                0x68  */  104
-#define KEY_AltLang      /* AtlLang(right)        0x69  */  105
-#define KEY_Break        /* Break                 0x6a  */  106
-#define KEY_LMeta        /* Left Meta             0x6b  */  107
-#define KEY_RMeta        /* Right Meta            0x6c  */  108
-#define KEY_Menu         /* Menu                  0x6d  */  109
-#define KEY_F13          /* F13                   0x6e  */  110
-#define KEY_F14          /* F14                   0x6f  */  111
-#define KEY_F15          /* F15                   0x70  */  112
-#define KEY_HKTG         /* Hirugana/Katakana tog 0x70  */  112
-#define KEY_F16          /* F16                   0x71  */  113
-#define KEY_F17          /* F17                   0x72  */  114
-#define KEY_KP_DEC       /* KP_DEC                0x73  */  115
-#define KEY_BSlash2      /* \           _         0x73  */  115
-#define KEY_KP_Equal	 /* Equal (Keypad)        0x76  */  118
-#define KEY_XFER         /* Kanji Transfer        0x79  */  121
-#define KEY_NFER         /* No Kanji Transfer     0x7b  */  123
-#define KEY_Yen          /* Yen                   0x7d  */  125
-
-#define KEY_Power        /* Power Key             0x84  */  132
-#define KEY_Mute         /* Audio Mute            0x85  */  133
-#define KEY_AudioLower   /* Audio Lower           0x86  */  134
-#define KEY_AudioRaise   /* Audio Raise           0x87  */  135
-#define KEY_Help         /* Help                  0x88  */  136
-#define KEY_L1           /* Stop                  0x89  */  137
-#define KEY_L2           /* Again                 0x8a  */  138
-#define KEY_L3           /* Props                 0x8b  */  139
-#define KEY_L4           /* Undo                  0x8c  */  140
-#define KEY_L5           /* Front                 0x8d  */  141
-#define KEY_L6           /* Copy                  0x8e  */  142
-#define KEY_L7           /* Open                  0x8f  */  143
-#define KEY_L8           /* Paste                 0x90  */  144
-#define KEY_L9           /* Find                  0x91  */  145
-#define KEY_L10          /* Cut                   0x92  */  146
-
-/*
- * Fake 'scancodes' in the following ranges are generated for 2-byte
- * codes not handled elsewhere.  These correspond to most extended keys
- * on so-called "Internet" keyboards:
- *
- *	0x79-0x93
- *	0x96-0xa1
- *	0xa3-0xac
- *	0xb1-0xb4
- *	0xba-0xbd
- *	0xc2
- *	0xcc-0xd2
- *	0xd6-0xf7
- */
-
-/*
- * Remapped 'scancodes' are generated for single-byte codes in the range
- * 0x59-0x5f,0x62-0x76.  These are used for some extra keys on some keyboards.
- */
-
-#define KEY_0x59		0x95
-#define KEY_0x5A		0xA2
-#define KEY_0x5B		0xAD
-#define KEY_0x5C		KEY_KP_EQUAL
-#define KEY_0x5D		0xAE
-#define KEY_0x5E		0xAF
-#define KEY_0x5F		0xB0
-#define KEY_0x62		0xB5
-#define KEY_0x63		0xB6
-#define KEY_0x64		0xB7
-#define KEY_0x65		0xB8
-#define KEY_0x66		0xB9
-#define KEY_0x67		0xBE
-#define KEY_0x68		0xBF
-#define KEY_0x69		0xC0
-#define KEY_0x6A		0xC1
-#define KEY_0x6B		0xC3
-#define KEY_0x6C		0xC4
-#define KEY_0x6D		0xC5
-#define KEY_0x6E		0xC6
-#define KEY_0x6F		0xC7
-#define KEY_0x70		0xC8
-#define KEY_0x71		0xC9
-#define KEY_0x72		0xCA
-#define KEY_0x73		0xCB
-#define KEY_0x74		0xD3
-#define KEY_0x75		0xD4
-#define KEY_0x76		0xD5
-
-/* These are for "notused" and "unknown" entries in translation maps. */
-#define KEY_NOTUSED	  0
-#define KEY_UNKNOWN	255
-
-#endif                          /* _ATKEYNAMES_H */
diff --git a/hw/dmx/input/dmxarg.c b/hw/dmx/input/dmxarg.c
deleted file mode 100644
index 582ed3f..0000000
--- a/hw/dmx/input/dmxarg.c
+++ /dev/null
@@ -1,177 +0,0 @@
-/*
- * Copyright 2002-2003 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-/** \file
- * Generic comma-delimited argument processing. */
-
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#define DMX_ARG_TEST 0
-
-#include "dmx.h"
-#include "dmxarg.h"
-#include <stdio.h>
-#include <string.h>
-
-#if DMX_ARG_TEST
-#include <stdlib.h>
-#endif
-
-/** Stores the parsed argument list. */
-struct _dmxArg {
-    int argc;          /**< Number of arguments in argv */
-    int argm;          /**< Maximum number of arguments store-able in argv */
-    const char **argv; /**< Arguments */
-};
-
-/** Create an (externally opaque) \a dmxArg object. */
-dmxArg
-dmxArgCreate(void)
-{
-    dmxArg a = malloc(sizeof(*a));
-
-    a->argc = 0;
-    a->argm = 2;
-    a->argv = malloc(a->argm * sizeof(*a->argv));
-    a->argv[0] = NULL;
-    return a;
-}
-
-/** Free the specified \a dmxArg object. */
-void
-dmxArgFree(dmxArg a)
-{
-    int i;
-
-    for (i = 0; i < a->argc; i++)
-        free((char *) a->argv[i]);
-    free(a->argv);
-    free(a);
-}
-
-/** Add the \a string as the next argument in the \a dmxArg object. */
-void
-dmxArgAdd(dmxArg a, const char *string)
-{
-    if (a->argm <= a->argc + 2)
-        a->argv = reallocarray(a->argv, (a->argm *= 2), sizeof(*a->argv));
-    a->argv[a->argc++] = strdup(string);
-    a->argv[a->argc] = NULL;
-}
-
-/** Return the argument number \a item in the \a dmxArg object.
- * Arguments are 0 based.  NULL will be returned for values less than 0
- * or equal to or greater than the number of arguments in the object. */
-const char *
-dmxArgV(dmxArg a, int item)
-{
-    if (item < 0 || item >= a->argc)
-        return NULL;
-    return a->argv[item];
-}
-
-/** Return the number of arguments in the \a dmxArg object. */
-int
-dmxArgC(dmxArg a)
-{
-    return a->argc;
-}
-
-/** Parse a string into arguments delimited by commas.  Return a new \a
- * dmxArg object containing the arguments. */
-dmxArg
-dmxArgParse(const char *string)
-{
-    int i = 0;
-    dmxArg a = dmxArgCreate();
-
-    if (!string)
-        return a;
-
-    a->argv = (const char **)xstrtokenize(string, ",");
-    if (a->argv)
-        for (i = 0; a->argv[i] != NULL; i++);
-    a->argc = i;
-
-    return a;
-}
-
-#if DMX_ARG_TEST
-static void
-dmxArgPrint(dmxArg a)
-{
-    int i;
-
-    printf("   argc = %d\n", dmxArgC(a));
-    for (i = 0; i < dmxArgC(a); i++)
-        printf("   argv[%d] = \"%s\"\n", i, dmxArgV(a, i));
-}
-
-static void
-dmxArgTest(const char *string)
-{
-    dmxArg a;
-
-    if (!string)
-        printf("Testing NULL\n");
-    else if (!strlen(string))
-        printf("Testing (empty)\n");
-    else
-        printf("Testing \"%s\"\n", string);
-
-    a = dmxArgParse(string);
-    dmxArgPrint(a);
-    dmxArgFree(a);
-}
-
-int
-main(void)
-{
-    dmxArgTest(NULL);
-    dmxArgTest("");
-    dmxArgTest(",");
-
-    dmxArgTest("a");
-    dmxArgTest("a,");
-    dmxArgTest(",a");
-
-    dmxArgTest("a,b");
-    dmxArgTest("a,b,");
-    dmxArgTest("a,b,,");
-    dmxArgTest("a,b,,c");
-
-    return 0;
-}
-#endif
diff --git a/hw/dmx/input/dmxarg.h b/hw/dmx/input/dmxarg.h
deleted file mode 100644
index acd8805..0000000
--- a/hw/dmx/input/dmxarg.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright 2002 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-/** \file
- * Interface to argument handling functions.  \see dmxarg.c */
-
-#ifndef _DMXARG_H_
-#define _DMXARG_H_
-
-typedef struct _dmxArg *dmxArg;
-
-extern dmxArg dmxArgCreate(void);
-extern void dmxArgFree(dmxArg a);
-extern void dmxArgAdd(dmxArg a, const char *string);
-extern const char *dmxArgV(dmxArg a, int item);
-extern int dmxArgC(dmxArg a);
-extern dmxArg dmxArgParse(const char *string);
-
-#endif
diff --git a/hw/dmx/input/dmxbackend.c b/hw/dmx/input/dmxbackend.c
deleted file mode 100644
index 56abe80..0000000
--- a/hw/dmx/input/dmxbackend.c
+++ /dev/null
@@ -1,661 +0,0 @@
-/*
- * Copyright 2001-2003 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   David H. Dawes <dawes@xfree86.org>
- *   Kevin E. Martin <kem@redhat.com>
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- */
-
-/** \file
- * These routines support taking input from devices on the backend
- * (output) displays.  \see dmxcommon.c. */
-
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#define DMX_BACKEND_DEBUG 0
-
-#include "dmxinputinit.h"
-#include "dmxbackend.h"
-#include "dmxcommon.h"
-#include "dmxconsole.h"
-#include "dmxcursor.h"
-#include "dmxprop.h"
-#include "dmxsync.h"
-#include "dmxcb.h"              /* For dmxGlobalWidth and dmxGlobalHeight */
-#include "dmxevents.h"          /* For dmxGetGlobalPosition */
-#include "ChkNotMaskEv.h"
-
-#include "inputstr.h"
-#include "input.h"
-#include <X11/keysym.h>
-#include "mipointer.h"
-#include "scrnintstr.h"
-#include "windowstr.h"
-
-/* Private area for backend devices. */
-typedef struct _myPrivate {
-    DMX_COMMON_PRIVATE;
-    int myScreen;
-    DMXScreenInfo *grabbedScreen;
-
-    int lastX, lastY;
-    int centerX, centerY;
-    int relative;
-    int newscreen;
-    int initialized;
-    DevicePtr mou, kbd;
-    int entered;
-    int offX, offY;
-} myPrivate;
-
-#if DMX_BACKEND_DEBUG
-#define DMXDBG0(f)                   dmxLog(dmxDebug,f)
-#define DMXDBG1(f,a)                 dmxLog(dmxDebug,f,a)
-#define DMXDBG2(f,a,b)               dmxLog(dmxDebug,f,a,b)
-#define DMXDBG3(f,a,b,c)             dmxLog(dmxDebug,f,a,b,c)
-#define DMXDBG4(f,a,b,c,d)           dmxLog(dmxDebug,f,a,b,c,d)
-#define DMXDBG5(f,a,b,c,d,e)         dmxLog(dmxDebug,f,a,b,c,d,e)
-#define DMXDBG6(f,a,b,c,d,e,g)       dmxLog(dmxDebug,f,a,b,c,d,e,g)
-#define DMXDBG7(f,a,b,c,d,e,g,h)     dmxLog(dmxDebug,f,a,b,c,d,e,g,h)
-#define DMXDBG8(f,a,b,c,d,e,g,h,i)   dmxLog(dmxDebug,f,a,b,c,d,e,g,h,i)
-#define DMXDBG9(f,a,b,c,d,e,g,h,i,j) dmxLog(dmxDebug,f,a,b,c,d,e,g,h,i,j)
-#else
-#define DMXDBG0(f)
-#define DMXDBG1(f,a)
-#define DMXDBG2(f,a,b)
-#define DMXDBG3(f,a,b,c)
-#define DMXDBG4(f,a,b,c,d)
-#define DMXDBG5(f,a,b,c,d,e)
-#define DMXDBG6(f,a,b,c,d,e,g)
-#define DMXDBG7(f,a,b,c,d,e,g,h)
-#define DMXDBG8(f,a,b,c,d,e,g,h,i)
-#define DMXDBG9(f,a,b,c,d,e,g,h,i,j)
-#endif
-
-/** Create and return a private data structure. */
-void *
-dmxBackendCreatePrivate(DeviceIntPtr pDevice)
-{
-    GETDMXLOCALFROMPDEVICE;
-    myPrivate *priv = calloc(1, sizeof(*priv));
-
-    priv->dmxLocal = dmxLocal;
-    return priv;
-}
-
-/** Destroy the private data structure.  No checking is performed to
- * verify that the structure was actually created by
- * #dmxBackendCreatePrivate. */
-void
-dmxBackendDestroyPrivate(void *private)
-{
-    free(private);
-}
-
-static void *
-dmxBackendTestScreen(DMXScreenInfo * dmxScreen, void *closure)
-{
-    long target = (long) closure;
-
-    if (dmxScreen->index == target)
-        return dmxScreen;
-    return NULL;
-}
-
-/* Return non-zero if screen and priv->myScreen are on the same physical
- * backend display (1 if they are the same screen, 2 if they are
- * different screens).  Since this is a common operation, the results
- * are cached.  The cache is invalidated if \a priv is NULL (this should
- * be done with each server generation and reconfiguration). */
-static int
-dmxBackendSameDisplay(myPrivate * priv, long screen)
-{
-    static myPrivate *oldpriv = NULL;
-    static int oldscreen = -1;
-    static int retcode = 0;
-
-    if (priv == oldpriv && screen == oldscreen)
-        return retcode;
-    if (!priv) {                /* Invalidate cache */
-        oldpriv = NULL;
-        oldscreen = -1;
-        retcode = 0;
-        return 0;
-    }
-
-    if (screen == priv->myScreen)
-        retcode = 1;
-    else if (screen < 0 || screen >= dmxNumScreens)
-        retcode = 0;
-    else if (dmxPropertyIterate(priv->be,
-                                dmxBackendTestScreen, (void *) screen))
-        retcode = 2;
-    else
-        retcode = 0;
-
-    oldpriv = priv;
-    oldscreen = screen;
-    return retcode;
-}
-
-static void *
-dmxBackendTestEvents(DMXScreenInfo * dmxScreen, void *closure)
-{
-    XEvent *X = (XEvent *) closure;
-
-    if (XCheckNotMaskEvent(dmxScreen->beDisplay, ExposureMask, X))
-        return dmxScreen;
-    return NULL;
-}
-
-static void *
-dmxBackendTestMotionEvent(DMXScreenInfo * dmxScreen, void *closure)
-{
-    XEvent *X = (XEvent *) closure;
-
-    if (XCheckTypedEvent(dmxScreen->beDisplay, MotionNotify, X))
-        return dmxScreen;
-    return NULL;
-}
-
-static DMXScreenInfo *
-dmxBackendGetEvent(myPrivate * priv, XEvent * X)
-{
-    DMXScreenInfo *dmxScreen;
-
-    if ((dmxScreen = dmxPropertyIterate(priv->be, dmxBackendTestEvents, X)))
-        return dmxScreen;
-    return NULL;
-}
-
-static DMXScreenInfo *
-dmxBackendPendingMotionEvent(myPrivate * priv, int save)
-{
-    DMXScreenInfo *dmxScreen;
-    XEvent N;
-
-    if ((dmxScreen = dmxPropertyIterate(priv->be,
-                                        dmxBackendTestMotionEvent, &N))) {
-        if (save)
-            XPutBackEvent(dmxScreen->beDisplay, &N);
-        return dmxScreen;
-    }
-    return NULL;
-}
-
-static void *
-dmxBackendTestWindow(DMXScreenInfo * dmxScreen, void *closure)
-{
-    Window win = (Window) (long) closure;
-
-    if (dmxScreen->scrnWin == win)
-        return dmxScreen;
-    return NULL;
-}
-
-static DMXScreenInfo *
-dmxBackendFindWindow(myPrivate * priv, Window win)
-{
-    return dmxPropertyIterate(priv->be, dmxBackendTestWindow,
-                              (void *) (long) win);
-}
-
-/* If the cursor is over a set of overlapping screens and one of those
- * screens takes backend input, then we want that particular screen to
- * be current, not one of the other ones. */
-static int
-dmxBackendFindOverlapping(myPrivate * priv, int screen, int x, int y)
-{
-    DMXScreenInfo *start = &dmxScreens[screen];
-    DMXScreenInfo *pt;
-
-    if (!start->over)
-        return screen;
-
-    for (pt = start->over; /* condition at end of loop */ ; pt = pt->over) {
-        if (pt->index == priv->myScreen
-            && dmxOnScreen(x, y, &dmxScreens[pt->index]))
-            return pt->index;
-        if (pt == start)
-            break;
-    }
-    return screen;
-}
-
-/* Return non-zero if \a x and \a y are off \a screen. */
-static int
-dmxBackendOffscreen(int screen, int x, int y)
-{
-    DMXScreenInfo *dmxScreen = &dmxScreens[screen];
-
-    return (!dmxOnScreen(x, y, dmxScreen));
-}
-
-/** This routine is called from #dmxCoreMotion for each motion
- * event. \a x and \a y are global coordinants. */
-void
-dmxBackendUpdatePosition(void *private, int x, int y)
-{
-    GETPRIVFROMPRIVATE;
-    int screen = miPointerGetScreen(inputInfo.pointer)->myNum;
-    DMXScreenInfo *dmxScreen = &dmxScreens[priv->myScreen];
-    int oldRelative = priv->relative;
-    int topscreen = dmxBackendFindOverlapping(priv, screen, x, y);
-    int same = dmxBackendSameDisplay(priv, topscreen);
-    int offscreen = dmxBackendOffscreen(priv->myScreen, x, y);
-    int offthis = dmxBackendOffscreen(screen, x, y);
-
-    DMXDBG9("dmxBackendUpdatePosition(%d,%d) my=%d mi=%d rel=%d"
-            " topscreen=%d same=%d offscreen=%d offthis=%d\n",
-            x, y, priv->myScreen, screen, priv->relative,
-            topscreen, same, offscreen, offthis);
-
-    if (offscreen) {
-        /* If the cursor is off the input screen, it should be moving
-         * relative unless it is visible on a screen of the same display
-         * (i.e., one that shares the mouse). */
-        if (same == 2 && !offthis) {
-            if (priv->relative) {
-                DMXDBG0("   Off screen, but not absolute\n");
-                priv->relative = 0;
-            }
-        }
-        else {
-            if (!priv->relative) {
-                DMXDBG0("   Off screen, but not relative\n");
-                priv->relative = 1;
-            }
-        }
-    }
-    else {
-        if (topscreen != screen) {
-            DMXDBG2("   Using screen %d instead of %d (from mi)\n",
-                    topscreen, screen);
-        }
-        if (same) {
-            if (priv->relative) {
-                DMXDBG0("   On screen, but not absolute\n");
-                priv->relative = 0;
-            }
-        }
-        else {
-            if (!priv->relative) {
-                DMXDBG0("   Not on screen, but not relative\n");
-                priv->relative = 1;
-            }
-        }
-    }
-
-    if (oldRelative != priv->relative) {
-        DMXDBG2("   Do switch, relative=%d same=%d\n", priv->relative, same);
-        /* Discard all pre-switch events */
-        dmxSync(dmxScreen, TRUE);
-        while (dmxBackendPendingMotionEvent(priv, FALSE));
-
-        if (dmxInput->console && offscreen) {
-            /* Our special case is a console window and a backend window
-             * share a display.  In this case, the cursor is either on
-             * the backend window (taking absolute input), or not (in
-             * which case the cursor needs to be in the console
-             * window). */
-            if (priv->grabbedScreen) {
-                DMXDBG2("   *** force ungrab on %s, display=%p\n",
-                        priv->grabbedScreen->name,
-                        priv->grabbedScreen->beDisplay);
-                XUngrabPointer(priv->grabbedScreen->beDisplay, CurrentTime);
-                dmxSync(priv->grabbedScreen, TRUE);
-                priv->grabbedScreen = NULL;
-            }
-            DMXDBG0("   Capturing console\n");
-            dmxConsoleCapture(dmxInput);
-        }
-        else {
-            priv->newscreen = 1;
-            if (priv->relative && !dmxInput->console) {
-                DMXDBG5("   Hide cursor; warp from %d,%d to %d,%d on %d\n",
-                        priv->lastX, priv->lastY, priv->centerX, priv->centerY,
-                        priv->myScreen);
-                dmxConsoleUncapture(dmxInput);
-                dmxHideCursor(dmxScreen);
-                priv->lastX = priv->centerX;
-                priv->lastY = priv->centerY;
-                XWarpPointer(priv->display, None, priv->window,
-                             0, 0, 0, 0, priv->lastX, priv->lastY);
-                dmxSync(dmxScreen, TRUE);
-            }
-            else {
-                DMXDBG0("   Check cursor\n");
-                dmxCheckCursor();
-            }
-        }
-    }
-}
-
-/** Get events from the X queue on the backend servers and put the
- * events into the DMX event queue. */
-void
-dmxBackendCollectEvents(DevicePtr pDev,
-                        dmxMotionProcPtr motion,
-                        dmxEnqueueProcPtr enqueue,
-                        dmxCheckSpecialProcPtr checkspecial, DMXBlockType block)
-{
-    GETPRIVFROMPDEV;
-    GETDMXINPUTFROMPRIV;
-    XEvent X;
-    DMXScreenInfo *dmxScreen;
-    int left = 0;
-    int entered = priv->entered;
-    int ignoreLeave = 0;
-    int v[2];
-    int retcode;
-
-    while ((dmxScreen = dmxBackendGetEvent(priv, &X))) {
-        switch (X.type) {
-        case EnterNotify:
-            dmxCommonSaveState(priv);
-            if (entered++)
-                continue;
-            priv->entered = 1;
-            ignoreLeave = 1;
-            DMXDBG5("dmxBackendCollectEvents: Enter %lu %d,%d; GRAB %s %p\n",
-                    X.xcrossing.root, X.xcrossing.x, X.xcrossing.y,
-                    dmxScreen->name, dmxScreen->beDisplay);
-            XRaiseWindow(dmxScreen->beDisplay, dmxScreen->scrnWin);
-            priv->grabbedScreen = dmxScreen;
-            if ((retcode = XGrabPointer(dmxScreen->beDisplay,
-                                        dmxScreen->scrnWin,
-                                        True, 0, GrabModeAsync,
-                                        GrabModeAsync, None, None,
-                                        CurrentTime))) {
-                dmxLog(dmxError,
-                       "XGrabPointer failed during backend enter (%d)\n",
-                       retcode);
-            }
-            break;
-        case LeaveNotify:
-            if (ignoreLeave) {
-                ignoreLeave = 0;
-                continue;
-            }
-            dmxCommonRestoreState(priv);
-            if (left++)
-                continue;
-            DMXDBG7("dmxBackendCollectEvents: Leave %lu %d,%d %d %d %s %s\n",
-                    X.xcrossing.root, X.xcrossing.x, X.xcrossing.y,
-                    X.xcrossing.detail, X.xcrossing.focus,
-                    priv->grabbedScreen ? "UNGRAB" : "", dmxScreen->name);
-            if (priv->grabbedScreen) {
-                XUngrabPointer(priv->grabbedScreen->beDisplay, CurrentTime);
-                dmxSync(priv->grabbedScreen, TRUE);
-                priv->grabbedScreen = NULL;
-            }
-            break;
-        case MotionNotify:
-            DMXDBG8("dmxBackendCollectEvents: MotionNotify %d/%d"
-                    " newscreen=%d: %d %d (e=%d; last=%d,%d)\n",
-                    dmxScreen->index, priv->myScreen,
-                    priv->newscreen,
-                    X.xmotion.x, X.xmotion.y,
-                    entered, priv->lastX, priv->lastY);
-            if (dmxBackendPendingMotionEvent(priv, TRUE))
-                continue;
-            if (!(dmxScreen = dmxBackendFindWindow(priv, X.xmotion.window)))
-                dmxLog(dmxFatal,
-                       "   Event on non-existant window %lu\n",
-                       X.xmotion.window);
-            if (!priv->relative || dmxInput->console) {
-                int newX = X.xmotion.x - dmxScreen->rootX;
-                int newY = X.xmotion.y - dmxScreen->rootY;
-
-                if (!priv->newscreen) {
-                    int width = dmxScreen->rootWidth;
-                    int height = dmxScreen->rootHeight;
-
-                    if (!newX)
-                        newX = -1;
-                    if (newX == width - 1)
-                        newX = width;
-                    if (!newY)
-                        newY = -1;
-                    if (newY == height - 1)
-                        newY = height;
-                }
-                priv->newscreen = 0;
-                v[0] = dmxScreen->rootXOrigin + newX;
-                v[1] = dmxScreen->rootYOrigin + newY;
-                DMXDBG8("   Absolute move: %d,%d (r=%dx%d+%d+%d s=%dx%d)\n",
-                        v[0], v[1],
-                        priv->be->rootWidth, priv->be->rootHeight,
-                        priv->be->rootX, priv->be->rootY,
-                        priv->be->scrnWidth, priv->be->scrnHeight);
-                motion(priv->mou, v, 0, 2, DMX_ABSOLUTE, block);
-                priv->entered = 0;
-            }
-            else {
-                int newX = priv->lastX - X.xmotion.x;
-                int newY = priv->lastY - X.xmotion.y;
-
-                priv->lastX = X.xmotion.x;
-                priv->lastY = X.xmotion.y;
-                v[0] = newX;
-                v[1] = newY;
-                DMXDBG2("   Relative move: %d, %d\n", v[0], v[1]);
-                motion(priv->mou, v, 0, 2, DMX_RELATIVE, block);
-            }
-            if (entered && priv->relative) {
-                DMXDBG4("   **** Relative %d %d instead of absolute %d %d\n",
-                        v[0], v[1],
-                        (dmxScreen->rootXOrigin + X.xmotion.x
-                         - dmxScreen->rootX),
-                        (dmxScreen->rootYOrigin + X.xmotion.y
-                         - dmxScreen->rootY));
-            }
-            break;
-
-        case KeyPress:
-        case KeyRelease:
-            enqueue(priv->kbd, X.type, X.xkey.keycode, 0, NULL, block);
-            break;
-        case ButtonPress:
-        case ButtonRelease:
-            /* fall-through */
-        default:
-            /* Pass the whole event here, because
-             * this may be an extension event. */
-            enqueue(priv->mou, X.type, X.xbutton.button, 0, &X, block);
-            break;
-        }
-    }
-}
-
-/** Called after input events are processed from the DMX queue.  No
- * event processing actually takes place here, but this is a convenient
- * place to update the pointer. */
-void
-dmxBackendProcessInput(void *private)
-{
-    GETPRIVFROMPRIVATE;
-
-    DMXDBG6("dmxBackendProcessInput: myScreen=%d relative=%d"
-            " last=%d,%d center=%d,%d\n",
-            priv->myScreen, priv->relative,
-            priv->lastX, priv->lastY, priv->centerX, priv->centerY);
-
-    if (priv->relative
-        && !dmxInput->console
-        && (priv->lastX != priv->centerX || priv->lastY != priv->centerY)) {
-        DMXDBG4("   warping pointer from last=%d,%d to center=%d,%d\n",
-                priv->lastX, priv->lastY, priv->centerX, priv->centerY);
-        priv->lastX = priv->centerX;
-        priv->lastY = priv->centerY;
-        XWarpPointer(priv->display, None, priv->window,
-                     0, 0, 0, 0, priv->lastX, priv->lastY);
-        dmxSync(&dmxScreens[priv->myScreen], TRUE);
-    }
-}
-
-static void
-dmxBackendComputeCenter(myPrivate * priv)
-{
-    int centerX;
-    int centerY;
-
-    centerX = priv->be->rootWidth / 2 + priv->be->rootX;
-    centerY = priv->be->rootHeight / 2 + priv->be->rootY;
-
-    if (centerX > priv->be->rootWidth)
-        centerX = priv->be->rootWidth - 1;
-    if (centerY > priv->be->rootHeight)
-        centerY = priv->be->rootHeight - 1;
-    if (centerX < 1)
-        centerX = 1;
-    if (centerY < 1)
-        centerY = 1;
-
-    priv->centerX = centerX;
-    priv->centerY = centerY;
-}
-
-static DMXScreenInfo *
-dmxBackendInitPrivate(DevicePtr pDev)
-{
-    GETPRIVFROMPDEV;
-    DMXInputInfo *dmxInput = &dmxInputs[dmxLocal->inputIdx];
-    DMXScreenInfo *dmxScreen;
-    int i;
-
-    /* Fill in myPrivate */
-    for (i = 0, dmxScreen = &dmxScreens[0]; i < dmxNumScreens; i++, dmxScreen++) {
-        if (dmxPropertySameDisplay(dmxScreen, dmxInput->name)) {
-            priv->display = dmxScreen->beDisplay;
-            priv->window = dmxScreen->scrnWin;
-            priv->be = dmxScreen;
-            break;
-        }
-    }
-
-    if (i >= dmxNumScreens)
-        dmxLog(dmxFatal,
-               "%s is not an existing backend display - cannot initialize\n",
-               dmxInput->name);
-
-    return dmxScreen;
-}
-
-/** Re-initialized the backend device described by \a pDev (after a
- * reconfig). */
-void
-dmxBackendLateReInit(DevicePtr pDev)
-{
-    GETPRIVFROMPDEV;
-    int x, y;
-
-    dmxBackendSameDisplay(NULL, 0);     /* Invalidate cache */
-    dmxBackendInitPrivate(pDev);
-    dmxBackendComputeCenter(priv);
-    dmxGetGlobalPosition(&x, &y);
-    dmxInvalidateGlobalPosition();      /* To force event processing */
-    dmxBackendUpdatePosition(priv, x, y);
-}
-
-/** Initialized the backend device described by \a pDev. */
-void
-dmxBackendInit(DevicePtr pDev)
-{
-    GETPRIVFROMPDEV;
-    DMXScreenInfo *dmxScreen;
-
-    dmxBackendSameDisplay(NULL, 0);     /* Invalidate cache */
-
-    if (dmxLocal->type == DMX_LOCAL_MOUSE)
-        priv->mou = pDev;
-    if (dmxLocal->type == DMX_LOCAL_KEYBOARD)
-        priv->kbd = pDev;
-    if (priv->initialized++)
-        return;                 /* Only do once for mouse/keyboard pair */
-
-    dmxScreen = dmxBackendInitPrivate(pDev);
-
-    /* Finish initialization using computed values or constants. */
-    dmxBackendComputeCenter(priv);
-    priv->eventMask = (EnterWindowMask | LeaveWindowMask);
-    priv->myScreen = dmxScreen->index;
-    priv->lastX = priv->centerX;
-    priv->lastY = priv->centerY;
-    priv->relative = 0;
-    priv->newscreen = 0;
-}
-
-/** Get information about the backend pointer (for initialization). */
-void
-dmxBackendMouGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info)
-{
-    const DMXScreenInfo *dmxScreen = dmxBackendInitPrivate(pDev);
-
-    info->buttonClass = 1;
-    dmxCommonMouGetMap(pDev, info->map, &info->numButtons);
-    info->valuatorClass = 1;
-    info->numRelAxes = 2;
-    info->minval[0] = 0;
-    info->minval[1] = 0;
-    info->maxval[0] = dmxScreen->beWidth;
-    info->maxval[1] = dmxScreen->beHeight;
-    info->res[0] = 1;
-    info->minres[0] = 0;
-    info->maxres[0] = 1;
-    info->ptrFeedbackClass = 1;
-}
-
-/** Get information about the backend keyboard (for initialization). */
-void
-dmxBackendKbdGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info)
-{
-    dmxCommonKbdGetInfo(pDev, info);
-    info->keyboard = 1;
-    info->keyClass = 1;
-    dmxCommonKbdGetMap(pDev, &info->keySyms, info->modMap);
-    info->freemap = 1;
-    info->focusClass = 1;
-    info->kbdFeedbackClass = 1;
-}
-
-/** Process #DMXFunctionType functions.  The only function handled here
- * is to acknowledge a pending server shutdown. */
-int
-dmxBackendFunctions(void *private, DMXFunctionType function)
-{
-    switch (function) {
-    case DMX_FUNCTION_TERMINATE:
-        return 1;
-    default:
-        return 0;
-    }
-}
diff --git a/hw/dmx/input/dmxbackend.h b/hw/dmx/input/dmxbackend.h
deleted file mode 100644
index a608573..0000000
--- a/hw/dmx/input/dmxbackend.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright 2002 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-/** \file
- * Interface to backend input device support. \see dmxbackend.c \see
- * dmxcommon.c */
-
-#ifndef _DMXBACKEND_H_
-#define _DMXBACKEND_H_
-
-extern void *dmxBackendCreatePrivate(DeviceIntPtr pDevice);
-extern void dmxBackendDestroyPrivate(void *private);
-extern void dmxBackendInit(DevicePtr pDev);
-extern void dmxBackendLateReInit(DevicePtr pDev);
-extern void dmxBackendMouGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info);
-extern void dmxBackendKbdGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info);
-extern void dmxBackendCollectEvents(DevicePtr pDev,
-                                    dmxMotionProcPtr motion,
-                                    dmxEnqueueProcPtr enqueue,
-                                    dmxCheckSpecialProcPtr checkspecial,
-                                    DMXBlockType block);
-extern void dmxBackendProcessInput(void *private);
-extern int dmxBackendFunctions(void *private, DMXFunctionType function);
-extern void dmxBackendUpdatePosition(void *private, int x, int y);
-
-#endif
diff --git a/hw/dmx/input/dmxcommon.c b/hw/dmx/input/dmxcommon.c
deleted file mode 100644
index c7aed68..0000000
--- a/hw/dmx/input/dmxcommon.c
+++ /dev/null
@@ -1,702 +0,0 @@
-/*
- * Copyright 2001-2003 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   David H. Dawes <dawes@xfree86.org>
- *   Kevin E. Martin <kem@redhat.com>
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- */
-
-/** \file
- *
- * This file implements common routines used by the backend and console
- * input devices.
- */
-
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#define DMX_STATE_DEBUG 0
-
-#include "dmxinputinit.h"
-#include "dmxcommon.h"
-#include "dmxconsole.h"
-#include "dmxprop.h"
-#include "dmxsync.h"
-#include "dmxmap.h"
-
-#include "inputstr.h"
-#include "input.h"
-#include <X11/keysym.h>
-#include "mipointer.h"
-#include "scrnintstr.h"
-
-#include <unistd.h>             /* For usleep() */
-
-#if DMX_STATE_DEBUG
-#define DMXDBG0(f)               dmxLog(dmxDebug,f)
-#else
-#define DMXDBG0(f)
-#endif
-
-/** Each device has a private area that is visible only from inside the
- * driver code. */
-typedef struct _myPrivate {
-    DMX_COMMON_PRIVATE;
-} myPrivate;
-
-static void
-dmxCommonKbdSetAR(Display * display, unsigned char *old, unsigned char *new)
-{
-    XKeyboardControl kc;
-    XKeyboardState ks;
-    unsigned long mask = KBKey | KBAutoRepeatMode;
-    int i, j;
-    int minKeycode, maxKeycode;
-
-    if (!old) {
-        XGetKeyboardControl(display, &ks);
-        old = (unsigned char *) ks.auto_repeats;
-    }
-
-    XDisplayKeycodes(display, &minKeycode, &maxKeycode);
-    for (i = 1; i < 32; i++) {
-        if (!old || old[i] != new[i]) {
-            for (j = 0; j < 8; j++) {
-                if ((new[i] & (1 << j)) != (old[i] & (1 << j))) {
-                    kc.key = i * 8 + j;
-                    kc.auto_repeat_mode = ((new[i] & (1 << j))
-                                           ? AutoRepeatModeOn
-                                           : AutoRepeatModeOff);
-                    if (kc.key >= minKeycode && kc.key <= maxKeycode)
-                        XChangeKeyboardControl(display, mask, &kc);
-                }
-            }
-        }
-    }
-}
-
-static void
-dmxCommonKbdSetLeds(Display * display, unsigned long new)
-{
-    int i;
-    XKeyboardControl kc;
-
-    for (i = 0; i < 32; i++) {
-        kc.led = i + 1;
-        kc.led_mode = (new & (1 << i)) ? LedModeOn : LedModeOff;
-        XChangeKeyboardControl(display, KBLed | KBLedMode, &kc);
-    }
-}
-
-static void
-dmxCommonKbdSetCtrl(Display * display, KeybdCtrl * old, KeybdCtrl * new)
-{
-    XKeyboardControl kc;
-    unsigned long mask = KBKeyClickPercent | KBAutoRepeatMode;
-
-    if (!old || old->click != new->click || old->autoRepeat != new->autoRepeat) {
-
-        kc.key_click_percent = new->click;
-        kc.auto_repeat_mode = new->autoRepeat;
-
-        XChangeKeyboardControl(display, mask, &kc);
-    }
-
-    dmxCommonKbdSetLeds(display, new->leds);
-    dmxCommonKbdSetAR(display, old ? old->autoRepeats : NULL, new->autoRepeats);
-}
-
-static void
-dmxCommonMouSetCtrl(Display * display, PtrCtrl * old, PtrCtrl * new)
-{
-    Bool do_accel, do_threshold;
-
-    if (!old
-        || old->num != new->num
-        || old->den != new->den || old->threshold != new->threshold) {
-        do_accel = (new->num > 0 && new->den > 0);
-        do_threshold = (new->threshold > 0);
-        if (do_accel || do_threshold) {
-            XChangePointerControl(display, do_accel, do_threshold,
-                                  new->num, new->den, new->threshold);
-        }
-    }
-}
-
-/** Update the keyboard control. */
-void
-dmxCommonKbdCtrl(DevicePtr pDev, KeybdCtrl * ctrl)
-{
-    GETPRIVFROMPDEV;
-
-    if (!priv->stateSaved && priv->be)
-        dmxCommonSaveState(priv);
-    if (!priv->display || !priv->stateSaved)
-        return;
-    dmxCommonKbdSetCtrl(priv->display,
-                        priv->kctrlset ? &priv->kctrl : NULL, ctrl);
-    priv->kctrl = *ctrl;
-    priv->kctrlset = 1;
-}
-
-/** Update the mouse control. */
-void
-dmxCommonMouCtrl(DevicePtr pDev, PtrCtrl * ctrl)
-{
-    GETPRIVFROMPDEV;
-
-    /* Don't set the acceleration for the
-     * console, because that should be
-     * controlled by the X server that the
-     * console is running on.  Otherwise,
-     * the acceleration for the console
-     * window would be unexpected for the
-     * scale of the window. */
-    if (priv->be) {
-        dmxCommonMouSetCtrl(priv->display,
-                            priv->mctrlset ? &priv->mctrl : NULL, ctrl);
-        priv->mctrl = *ctrl;
-        priv->mctrlset = 1;
-    }
-}
-
-/** Sound they keyboard bell. */
-void
-dmxCommonKbdBell(DevicePtr pDev, int percent,
-                 int volume, int pitch, int duration)
-{
-    GETPRIVFROMPDEV;
-    XKeyboardControl kc;
-    XKeyboardState ks;
-    unsigned long mask = KBBellPercent | KBBellPitch | KBBellDuration;
-
-    if (!priv->be)
-        XGetKeyboardControl(priv->display, &ks);
-    kc.bell_percent = volume;
-    kc.bell_pitch = pitch;
-    kc.bell_duration = duration;
-    XChangeKeyboardControl(priv->display, mask, &kc);
-    XBell(priv->display, percent);
-    if (!priv->be) {
-        kc.bell_percent = ks.bell_percent;
-        kc.bell_pitch = ks.bell_pitch;
-        kc.bell_duration = ks.bell_duration;
-        XChangeKeyboardControl(priv->display, mask, &kc);
-    }
-}
-
-/** Get the keyboard mapping. */
-void
-dmxCommonKbdGetMap(DevicePtr pDev, KeySymsPtr pKeySyms, CARD8 *pModMap)
-{
-    GETPRIVFROMPDEV;
-    int min_keycode;
-    int max_keycode;
-    int map_width;
-    KeySym *keyboard_mapping;
-    XModifierKeymap *modifier_mapping;
-    int i, j;
-
-    /* Compute pKeySyms.  Cast
-     * XGetKeyboardMapping because of
-     * compiler warning on 64-bit machines.
-     * We assume pointers to 32-bit and
-     * 64-bit ints are the same. */
-    XDisplayKeycodes(priv->display, &min_keycode, &max_keycode);
-    keyboard_mapping = (KeySym *) XGetKeyboardMapping(priv->display,
-                                                      min_keycode,
-                                                      max_keycode
-                                                      - min_keycode + 1,
-                                                      &map_width);
-    pKeySyms->minKeyCode = min_keycode;
-    pKeySyms->maxKeyCode = max_keycode;
-    pKeySyms->mapWidth = map_width;
-    pKeySyms->map = keyboard_mapping;
-
-    /* Compute pModMap  */
-    modifier_mapping = XGetModifierMapping(priv->display);
-    for (i = 0; i < MAP_LENGTH; i++)
-        pModMap[i] = 0;
-    for (j = 0; j < 8; j++) {
-        int max_keypermod = modifier_mapping->max_keypermod;
-
-        for (i = 0; i < max_keypermod; i++) {
-            CARD8 keycode =
-                modifier_mapping->modifiermap[j * max_keypermod + i];
-            if (keycode)
-                pModMap[keycode] |= 1 << j;
-        }
-    }
-    XFreeModifiermap(modifier_mapping);
-}
-
-/** Fill in the XKEYBOARD parts of the \a info structure for the
- * specified \a pDev. */
-void
-dmxCommonKbdGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info)
-{
-    GETPRIVFROMPDEV;
-    GETDMXINPUTFROMPRIV;
-    char *pt;
-
-    dmxCommonSaveState(priv);
-    if (priv->xkb) {
-#define NAME(x) \
- priv->xkb->names->x ? XGetAtomName(priv->display,priv->xkb->names->x) : NULL
-        info->names.keycodes = NAME(keycodes);
-        info->names.types = NAME(types);
-        info->names.compat = NAME(compat);
-        info->names.symbols = NAME(symbols);
-        info->names.geometry = NAME(geometry);
-        info->freenames = 1;
-#undef NAME
-        dmxLogInput(dmxInput,
-                    "XKEYBOARD: keycodes = %s\n", info->names.keycodes);
-        dmxLogInput(dmxInput,
-                    "XKEYBOARD: symbols  = %s\n", info->names.symbols);
-        dmxLogInput(dmxInput,
-                    "XKEYBOARD: geometry = %s\n", info->names.geometry);
-        if ((pt = strchr(info->names.keycodes, '+')))
-            *pt = '\0';
-    }
-    dmxCommonRestoreState(priv);
-}
-
-/** Turn \a pDev on (i.e., take input from \a pDev). */
-int
-dmxCommonKbdOn(DevicePtr pDev)
-{
-    GETPRIVFROMPDEV;
-    if (priv->be)
-        dmxCommonSaveState(priv);
-    priv->eventMask |= DMX_KEYBOARD_EVENT_MASK;
-    XSelectInput(priv->display, priv->window, priv->eventMask);
-    if (priv->be)
-        XSetInputFocus(priv->display, priv->window, RevertToPointerRoot,
-                       CurrentTime);
-    return -1;
-}
-
-/** Turn \a pDev off. */
-void
-dmxCommonKbdOff(DevicePtr pDev)
-{
-    GETPRIVFROMPDEV;
-    priv->eventMask &= ~DMX_KEYBOARD_EVENT_MASK;
-    XSelectInput(priv->display, priv->window, priv->eventMask);
-    dmxCommonRestoreState(priv);
-}
-
-/** Turn \a pDev on (i.e., take input from \a pDev). */
-int
-dmxCommonOthOn(DevicePtr pDev)
-{
-    GETPRIVFROMPDEV;
-    GETDMXINPUTFROMPRIV;
-    XEventClass event_list[DMX_MAX_XINPUT_EVENT_TYPES];
-    int event_type[DMX_MAX_XINPUT_EVENT_TYPES];
-    int count = 0;
-
-#define ADD(type)                                                            \
-    if (count < DMX_MAX_XINPUT_EVENT_TYPES) {                                \
-        type(priv->xi, event_type[count], event_list[count]);                \
-        if (event_type[count]) {                                             \
-            dmxMapInsert(dmxLocal, event_type[count], XI_##type);            \
-            ++count;                                                         \
-        }                                                                    \
-    } else {                                                                 \
-        dmxLog(dmxWarning, "More than %d event types for %s\n",              \
-               DMX_MAX_XINPUT_EVENT_TYPES, dmxInput->name);                  \
-    }
-
-    if (!(priv->xi = XOpenDevice(priv->display, dmxLocal->deviceId))) {
-        dmxLog(dmxWarning, "Cannot open %s device (id=%d) on %s\n",
-               dmxLocal->deviceName ? dmxLocal->deviceName : "(unknown)",
-               (int) dmxLocal->deviceId, dmxInput->name);
-        return -1;
-    }
-    ADD(DeviceKeyPress);
-    ADD(DeviceKeyRelease);
-    ADD(DeviceButtonPress);
-    ADD(DeviceButtonRelease);
-    ADD(DeviceMotionNotify);
-    ADD(DeviceFocusIn);
-    ADD(DeviceFocusOut);
-    ADD(ProximityIn);
-    ADD(ProximityOut);
-    ADD(DeviceStateNotify);
-    ADD(DeviceMappingNotify);
-    ADD(ChangeDeviceNotify);
-    XSelectExtensionEvent(priv->display, priv->window, event_list, count);
-
-    return -1;
-}
-
-/** Turn \a pDev off. */
-void
-dmxCommonOthOff(DevicePtr pDev)
-{
-    GETPRIVFROMPDEV;
-
-    if (priv->xi)
-        XCloseDevice(priv->display, priv->xi);
-    priv->xi = NULL;
-}
-
-/** Fill the \a info structure with information needed to initialize \a
- * pDev. */
-void
-dmxCommonOthGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info)
-{
-    GETPRIVFROMPDEV;
-    GETDMXINPUTFROMPRIV;
-    XExtensionVersion *ext;
-    XDeviceInfo *devices;
-    Display *display = priv->display;
-    int num;
-    int i, j, k;
-    XextErrorHandler handler;
-
-    if (!display && !(display = XOpenDisplay(dmxInput->name)))
-        return;
-
-    /* Print out information about the XInput Extension. */
-    handler = XSetExtensionErrorHandler(dmxInputExtensionErrorHandler);
-    ext = XGetExtensionVersion(display, INAME);
-    XSetExtensionErrorHandler(handler);
-
-    if (ext && ext != (XExtensionVersion *) NoSuchExtension) {
-        XFree(ext);
-        devices = XListInputDevices(display, &num);
-        for (i = 0; i < num; i++) {
-            if (devices[i].id == (XID) dmxLocal->deviceId) {
-                XAnyClassPtr any;
-                XKeyInfoPtr ki;
-                XButtonInfoPtr bi;
-                XValuatorInfoPtr vi;
-
-                for (j = 0, any = devices[i].inputclassinfo;
-                     j < devices[i].num_classes;
-                     any = (XAnyClassPtr) ((char *) any + any->length), j++) {
-                    switch (any->class) {
-                    case KeyClass:
-                        ki = (XKeyInfoPtr) any;
-                        info->keyboard = 1;
-                        info->keyClass = 1;
-                        info->keySyms.minKeyCode = ki->min_keycode;
-                        info->keySyms.maxKeyCode = ki->max_keycode;
-                        info->kbdFeedbackClass = 1;
-                        break;
-                    case ButtonClass:
-                        bi = (XButtonInfoPtr) any;
-                        info->buttonClass = 1;
-                        info->numButtons = bi->num_buttons;
-                        info->ptrFeedbackClass = 1;
-                        break;
-                    case ValuatorClass:
-                        /* This assume all axes are either
-                         * Absolute or Relative. */
-                        vi = (XValuatorInfoPtr) any;
-                        info->valuatorClass = 1;
-                        if (vi->mode == Absolute)
-                            info->numAbsAxes = vi->num_axes;
-                        else
-                            info->numRelAxes = vi->num_axes;
-                        for (k = 0; k < vi->num_axes; k++) {
-                            info->res[k] = vi->axes[k].resolution;
-                            info->minres[k] = vi->axes[k].resolution;
-                            info->maxres[k] = vi->axes[k].resolution;
-                            info->minval[k] = vi->axes[k].min_value;
-                            info->maxval[k] = vi->axes[k].max_value;
-                        }
-                        break;
-                    case FeedbackClass:
-                        /* Only keyboard and pointer feedback
-                         * are handled at this time. */
-                        break;
-                    case ProximityClass:
-                        info->proximityClass = 1;
-                        break;
-                    case FocusClass:
-                        info->focusClass = 1;
-                        break;
-                    case OtherClass:
-                        break;
-                    }
-                }
-            }
-        }
-        XFreeDeviceList(devices);
-    }
-    if (display != priv->display)
-        XCloseDisplay(display);
-}
-
-/** Obtain the mouse button mapping. */
-void
-dmxCommonMouGetMap(DevicePtr pDev, unsigned char *map, int *nButtons)
-{
-    GETPRIVFROMPDEV;
-    int i;
-
-    *nButtons = XGetPointerMapping(priv->display, map, DMX_MAX_BUTTONS);
-    for (i = 0; i <= *nButtons; i++)
-        map[i] = i;
-}
-
-static void *
-dmxCommonXSelect(DMXScreenInfo * dmxScreen, void *closure)
-{
-    myPrivate *priv = closure;
-
-    XSelectInput(dmxScreen->beDisplay, dmxScreen->scrnWin, priv->eventMask);
-    return NULL;
-}
-
-static void
-dmxCommonFdNotify(int fd, int ready, void *data)
-{
-    /* This should process input on this fd, but instead all
-     * of that is delayed until the block and wakeup handlers are called
-     */
-    ;
-}
-
-static void *
-dmxCommonAddEnabledDevice(DMXScreenInfo * dmxScreen, void *closure)
-{
-    SetNotifyFd(XConnectionNumber(dmxScreen->beDisplay), dmxCommonFdNotify, X_NOTIFY_READ, closure);
-    return NULL;
-}
-
-static void *
-dmxCommonRemoveEnabledDevice(DMXScreenInfo * dmxScreen, void *closure)
-{
-    RemoveNotifyFd(XConnectionNumber(dmxScreen->beDisplay));
-    return NULL;
-}
-
-/** Turn \a pDev on (i.e., take input from \a pDev). */
-int
-dmxCommonMouOn(DevicePtr pDev)
-{
-    GETPRIVFROMPDEV;
-    GETDMXINPUTFROMPRIV;
-
-    priv->eventMask |= DMX_POINTER_EVENT_MASK;
-    if (!priv->be) {
-        XSelectInput(priv->display, priv->window, priv->eventMask);
-        SetNotifyFd(XConnectionNumber(priv->display), dmxCommonFdNotify,X_NOTIFY_READ, pDev);
-    }
-    else {
-        dmxPropertyIterate(priv->be, dmxCommonXSelect, priv);
-        dmxPropertyIterate(priv->be, dmxCommonAddEnabledDevice, dmxInput);
-    }
-
-    return -1;
-}
-
-/** Turn \a pDev off. */
-void
-dmxCommonMouOff(DevicePtr pDev)
-{
-    GETPRIVFROMPDEV;
-    GETDMXINPUTFROMPRIV;
-
-    priv->eventMask &= ~DMX_POINTER_EVENT_MASK;
-    if (!priv->be) {
-        RemoveNotifyFd(XConnectionNumber(priv->display));
-        XSelectInput(priv->display, priv->window, priv->eventMask);
-    }
-    else {
-        dmxPropertyIterate(priv->be, dmxCommonRemoveEnabledDevice, dmxInput);
-        dmxPropertyIterate(priv->be, dmxCommonXSelect, priv);
-    }
-}
-
-/** Given the global coordinates \a x and \a y, determine the screen
- * with the lowest number on which those coordinates lie.  If they are
- * not on any screen, return -1.  The number returned is an index into
- * \a dmxScreenInfo and is between -1 and \a dmxNumScreens - 1,
- * inclusive. */
-int
-dmxFindPointerScreen(int x, int y)
-{
-    int i;
-
-    for (i = 0; i < dmxNumScreens; i++) {
-        ScreenPtr pScreen = screenInfo.screens[i];
-
-        if (x >= pScreen->x && x < pScreen->x + pScreen->width &&
-            y >= pScreen->y && y < pScreen->y + pScreen->height)
-            return i;
-    }
-    return -1;
-}
-
-/** Returns a pointer to the private area for the device that comes just
- * prior to \a pDevice in the current \a dmxInput device list.  This is
- * used as the private area for the current device in some situations
- * (e.g., when a keyboard and mouse form a pair that should share the
- * same private area).  If the requested private area cannot be located,
- * then NULL is returned. */
-void *
-dmxCommonCopyPrivate(DeviceIntPtr pDevice)
-{
-    GETDMXLOCALFROMPDEVICE;
-    DMXInputInfo *dmxInput = &dmxInputs[dmxLocal->inputIdx];
-    int i;
-
-    for (i = 0; i < dmxInput->numDevs; i++)
-        if (dmxInput->devs[i] == dmxLocal && i)
-            return dmxInput->devs[i - 1]->private;
-    return NULL;
-}
-
-/** This routine saves and resets some important state for the backend
- * and console device drivers:
- * - the modifier map is saved and set to 0 (so DMX controls the LEDs)
- * - the key click, bell, led, and repeat masks are saved and set to the
- * values that DMX claims to be using
- *
- * This routine and #dmxCommonRestoreState are used when the pointer
- * enters and leaves the console window, or when the backend window is
- * active or not active (for a full-screen window, this only happens at
- * server startup and server shutdown).
- */
-void
-dmxCommonSaveState(void *private)
-{
-    GETPRIVFROMPRIVATE;
-    XKeyboardState ks;
-    unsigned long i;
-    XModifierKeymap *modmap;
-
-    if (dmxInput->console)
-        priv = dmxInput->devs[0]->private;
-    if (!priv->display || priv->stateSaved)
-        return;
-    DMXDBG0("dmxCommonSaveState\n");
-    if (dmxUseXKB && (priv->xkb = XkbAllocKeyboard())) {
-        if (XkbGetIndicatorMap(priv->display, XkbAllIndicatorsMask, priv->xkb)
-            || XkbGetNames(priv->display, XkbAllNamesMask, priv->xkb)) {
-            dmxLogInput(dmxInput, "Could not get XKB information\n");
-            XkbFreeKeyboard(priv->xkb, 0, True);
-            priv->xkb = NULL;
-        }
-        else {
-            if (priv->xkb->indicators) {
-                priv->savedIndicators = *priv->xkb->indicators;
-                for (i = 0; i < XkbNumIndicators; i++)
-                    if (priv->xkb->indicators->phys_indicators & (1 << i)) {
-                        priv->xkb->indicators->maps[i].flags
-                            = XkbIM_NoAutomatic;
-                    }
-                XkbSetIndicatorMap(priv->display, ~0, priv->xkb);
-            }
-        }
-    }
-
-    XGetKeyboardControl(priv->display, &ks);
-    priv->savedKctrl.click = ks.key_click_percent;
-    priv->savedKctrl.bell = ks.bell_percent;
-    priv->savedKctrl.bell_pitch = ks.bell_pitch;
-    priv->savedKctrl.bell_duration = ks.bell_duration;
-    priv->savedKctrl.leds = ks.led_mask;
-    priv->savedKctrl.autoRepeat = ks.global_auto_repeat;
-    for (i = 0; i < 32; i++)
-        priv->savedKctrl.autoRepeats[i] = ks.auto_repeats[i];
-
-    dmxCommonKbdSetCtrl(priv->display, &priv->savedKctrl,
-                        &priv->dmxLocal->kctrl);
-
-    priv->savedModMap = XGetModifierMapping(priv->display);
-
-    modmap = XNewModifiermap(0);
-    XSetModifierMapping(priv->display, modmap);
-    if (dmxInput->scrnIdx != -1)
-        dmxSync(&dmxScreens[dmxInput->scrnIdx], TRUE);
-    XFreeModifiermap(modmap);
-
-    priv->stateSaved = 1;
-}
-
-/** This routine restores all the information saved by #dmxCommonSaveState. */
-void
-dmxCommonRestoreState(void *private)
-{
-    GETPRIVFROMPRIVATE;
-    int retcode = -1;
-    CARD32 start;
-
-    if (dmxInput->console)
-        priv = dmxInput->devs[0]->private;
-    if (!priv->stateSaved)
-        return;
-    priv->stateSaved = 0;
-
-    DMXDBG0("dmxCommonRestoreState\n");
-    if (priv->xkb) {
-        *priv->xkb->indicators = priv->savedIndicators;
-        XkbSetIndicatorMap(priv->display, ~0, priv->xkb);
-        XkbFreeKeyboard(priv->xkb, 0, True);
-        priv->xkb = 0;
-    }
-
-    for (start = GetTimeInMillis(); GetTimeInMillis() - start < 5000;) {
-        CARD32 tmp;
-
-        retcode = XSetModifierMapping(priv->display, priv->savedModMap);
-        if (retcode == MappingSuccess)
-            break;
-        if (retcode == MappingBusy)
-            dmxLogInput(dmxInput, "Keyboard busy, waiting\n");
-        else
-            dmxLogInput(dmxInput, "Keyboard error, waiting\n");
-
-        /* Don't generate X11 protocol for a bit */
-        for (tmp = GetTimeInMillis(); GetTimeInMillis() - tmp < 250;) {
-            usleep(250);        /* This ends up sleeping only until
-                                 * the next key press generates an
-                                 * interruption.  We make the delay
-                                 * relatively short in case the user
-                                 * pressed they keys quickly. */
-        }
-
-    }
-    if (retcode != MappingSuccess)
-        dmxLog(dmxWarning, "Unable to restore keyboard modifier state!\n");
-
-    XFreeModifiermap(priv->savedModMap);
-    priv->savedModMap = NULL;
-
-    dmxCommonKbdSetCtrl(priv->display, NULL, &priv->savedKctrl);
-    priv->kctrlset = 0;         /* Invalidate copy */
-}
diff --git a/hw/dmx/input/dmxcommon.h b/hw/dmx/input/dmxcommon.h
deleted file mode 100644
index ed04287..0000000
--- a/hw/dmx/input/dmxcommon.h
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Copyright 2002,2003 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-/** \file
- * Interface to functions used by backend and console input devices.
- * \see dmxcommon.c \see dmxbackend.c \see dmxconsole.c */
-
-#ifndef _DMXCOMMON_H_
-#define _DMXCOMMON_H_
-
-#define DMX_COMMON_OTHER                    \
-    Display                 *display;       \
-    Window                  window;         \
-    DMXScreenInfo           *be;            \
-    DMXLocalInputInfoPtr    dmxLocal;       \
-    int                     initPointerX;   \
-    int                     initPointerY;   \
-    long                    eventMask;      \
-    KeybdCtrl               kctrl;          \
-    PtrCtrl                 mctrl;          \
-    int                     kctrlset;       \
-    int                     mctrlset;       \
-    KeybdCtrl               savedKctrl;     \
-    XModifierKeymap         *savedModMap;   \
-    int                     stateSaved
-
-#define DMX_COMMON_XKB                      \
-    DMX_COMMON_OTHER;                       \
-    XkbDescPtr              xkb;            \
-    XkbIndicatorRec         savedIndicators
-
-#define DMX_COMMON_PRIVATE                  \
-    DMX_COMMON_XKB;                         \
-    XDevice                 *xi
-
-#define GETONLYPRIVFROMPRIVATE                                          \
-    myPrivate            *priv     = private
-
-#define GETPRIVFROMPRIVATE                                              \
-    GETONLYPRIVFROMPRIVATE;                                             \
-    DMXInputInfo         *dmxInput = &dmxInputs[priv->dmxLocal->inputIdx]
-
-#define GETDMXLOCALFROMPDEVICE                                          \
-    DevicePtr            pDev      = &pDevice->public;                  \
-    DMXLocalInputInfoPtr dmxLocal  = pDev->devicePrivate
-
-#define GETDMXINPUTFROMPRIV                                             \
-    DMXInputInfo         *dmxInput = &dmxInputs[priv->dmxLocal->inputIdx]
-
-#define GETDMXINPUTFROMPDEVICE                                          \
-    GETDMXLOCALFROMPDEVICE;                                             \
-    DMXInputInfo         *dmxInput = &dmxInputs[dmxLocal->inputIdx]
-
-#define GETDMXLOCALFROMPDEV                                             \
-    DMXLocalInputInfoPtr dmxLocal  = pDev->devicePrivate
-
-#define GETDMXINPUTFROMPDEV                                             \
-    GETDMXLOCALFROMPDEV;                                                \
-    DMXInputInfo         *dmxInput = &dmxInputs[dmxLocal->inputIdx]
-
-#define GETPRIVFROMPDEV                                                 \
-    GETDMXLOCALFROMPDEV;                                                \
-    myPrivate            *priv     = dmxLocal->private
-
-#define DMX_KEYBOARD_EVENT_MASK                                         \
-    (KeyPressMask | KeyReleaseMask | KeymapStateMask)
-
-#define DMX_POINTER_EVENT_MASK                                          \
-    (ButtonPressMask | ButtonReleaseMask | PointerMotionMask)
-
-extern void dmxCommonKbdGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info);
-extern void dmxCommonKbdGetMap(DevicePtr pDev,
-                               KeySymsPtr pKeySyms, CARD8 *pModMap);
-extern void dmxCommonKbdCtrl(DevicePtr pDev, KeybdCtrl * ctrl);
-extern void dmxCommonKbdBell(DevicePtr pDev, int percent,
-                             int volume, int pitch, int duration);
-extern int dmxCommonKbdOn(DevicePtr pDev);
-extern void dmxCommonKbdOff(DevicePtr pDev);
-extern void dmxCommonMouGetMap(DevicePtr pDev,
-                               unsigned char *map, int *nButtons);
-extern void dmxCommonMouCtrl(DevicePtr pDev, PtrCtrl * ctrl);
-extern int dmxCommonMouOn(DevicePtr pDev);
-extern void dmxCommonMouOff(DevicePtr pDev);
-extern int dmxFindPointerScreen(int x, int y);
-
-extern int dmxCommonOthOn(DevicePtr pDev);
-extern void dmxCommonOthOff(DevicePtr pDev);
-extern void dmxCommonOthGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info);
-
-                                /* helper functions */
-extern void *dmxCommonCopyPrivate(DeviceIntPtr pDevice);
-extern void dmxCommonSaveState(void *private);
-extern void dmxCommonRestoreState(void *private);
-#endif
diff --git a/hw/dmx/input/dmxconsole.c b/hw/dmx/input/dmxconsole.c
deleted file mode 100644
index f33a0eb..0000000
--- a/hw/dmx/input/dmxconsole.c
+++ /dev/null
@@ -1,1090 +0,0 @@
-/*
- * Copyright 2001-2003 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   David H. Dawes <dawes@xfree86.org>
- *   Kevin E. Martin <kem@redhat.com>
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-/** \file
- *
- * This file implements the console input devices.
- */
-
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#define DMX_CONSOLE_DEBUG 0
-#define DMX_WINDOW_DEBUG  0
-
-#include "dmxinputinit.h"
-#include "dmxevents.h"
-#include "dmxconsole.h"
-#include "dmxcommon.h"
-#include "dmxscrinit.h"
-#include "dmxcb.h"
-#include "dmxsync.h"
-
-#include "inputstr.h"
-#include "input.h"
-#include "mipointer.h"
-#include "windowstr.h"
-
-#define CONSOLE_NUM 3
-#define CONSOLE_DEN 4
-#define DMX_CONSOLE_NAME "DMX Console"
-#define DMX_RES_NAME     "Xdmx"
-#define DMX_RES_CLASS    "XDmx"
-#define CONSOLE_BG_COLOR "gray75"
-#define CONSOLE_FG_COLOR "black"
-#define CONSOLE_SCREEN_BG_COLOR "white"
-#define CONSOLE_SCREEN_FG_COLOR "black"
-#define CONSOLE_SCREEN_DET_COLOR "gray75"
-#define CONSOLE_SCREEN_CUR_COLOR "red"
-
-#if DMX_CONSOLE_DEBUG
-#define DMXDBG0(f)               dmxLog(dmxDebug,f)
-#define DMXDBG1(f,a)             dmxLog(dmxDebug,f,a)
-#define DMXDBG2(f,a,b)           dmxLog(dmxDebug,f,a,b)
-#define DMXDBG3(f,a,b,c)         dmxLog(dmxDebug,f,a,b,c)
-#define DMXDBG4(f,a,b,c,d)       dmxLog(dmxDebug,f,a,b,c,d)
-#define DMXDBG5(f,a,b,c,d,e)     dmxLog(dmxDebug,f,a,b,c,d,e)
-#define DMXDBG6(f,a,b,c,d,e,g)   dmxLog(dmxDebug,f,a,b,c,d,e,g)
-#define DMXDBG7(f,a,b,c,d,e,g,h) dmxLog(dmxDebug,f,a,b,c,d,e,g,h)
-#else
-#define DMXDBG0(f)
-#define DMXDBG1(f,a)
-#define DMXDBG2(f,a,b)
-#define DMXDBG3(f,a,b,c)
-#define DMXDBG4(f,a,b,c,d)
-#define DMXDBG5(f,a,b,c,d,e)
-#define DMXDBG6(f,a,b,c,d,e,g)
-#define DMXDBG7(f,a,b,c,d,e,g,h)
-#endif
-
-/* Private area for consoles. */
-typedef struct _myPrivate {
-    DMX_COMMON_PRIVATE;
-    int lastX;
-    int lastY;
-    int globalX;
-    int globalY;
-    int curX;
-    int curY;
-    int width;
-    int height;
-    int consWidth;
-    int consHeight;
-    double xScale;
-    double yScale;
-    XlibGC gc, gcDet, gcRev, gcCur;
-    int grabbed, fine, captured;
-    Cursor cursorNormal, cursorGrabbed, cursorEmpty;
-    Pixmap pixmap;
-
-    CloseScreenProcPtr CloseScreen;
-    struct _myPrivate *next;    /* for closing multiple consoles */
-    int initialized;
-    DevicePtr mou, kbd;
-} myPrivate;
-
-static int
-scalex(myPrivate * priv, int x)
-{
-    return (int) ((x * priv->xScale) + .5);
-}
-
-static int
-scaley(myPrivate * priv, int y)
-{
-    return (int) ((y * priv->yScale) + .5);
-}
-
-static int
-unscalex(myPrivate * priv, int x)
-{
-    return (int) ((x / priv->xScale) + .5);
-}
-
-static int
-unscaley(myPrivate * priv, int y)
-{
-    return (int) ((y / priv->yScale) + .5);
-}
-
-/** Create the private area for \a pDevice. */
-void *
-dmxConsoleCreatePrivate(DeviceIntPtr pDevice)
-{
-    GETDMXLOCALFROMPDEVICE;
-    myPrivate *priv = calloc(1, sizeof(*priv));
-
-    priv->dmxLocal = dmxLocal;
-    return priv;
-}
-
-/** If \a private is non-NULL, free its associated memory. */
-void
-dmxConsoleDestroyPrivate(void *private)
-{
-    free(private);
-}
-
-static void
-dmxConsoleDrawFineCursor(myPrivate * priv, XRectangle * rect)
-{
-    int size = 6;
-    int x, y;
-
-    XDrawLine(priv->display, priv->pixmap, priv->gcCur,
-              x = scalex(priv, priv->globalX) - size,
-              scaley(priv, priv->globalY),
-              scalex(priv, priv->globalX) + size, scaley(priv, priv->globalY));
-    XDrawLine(priv->display, priv->pixmap, priv->gcCur,
-              scalex(priv, priv->globalX),
-              y = scaley(priv, priv->globalY) - size,
-              scalex(priv, priv->globalX), scaley(priv, priv->globalY) + size);
-    if (priv->grabbed) {
-        XDrawLine(priv->display, priv->pixmap, priv->gcCur,
-                  scalex(priv, priv->globalX) - (int) (size / 1.4),
-                  scaley(priv, priv->globalY) - (int) (size / 1.4),
-                  scalex(priv, priv->globalX) + (int) (size / 1.4),
-                  scaley(priv, priv->globalY) + (int) (size / 1.4));
-        XDrawLine(priv->display, priv->pixmap, priv->gcCur,
-                  scalex(priv, priv->globalX) - (int) (size / 1.4),
-                  scaley(priv, priv->globalY) + (int) (size / 1.4),
-                  scalex(priv, priv->globalX) + (int) (size / 1.4),
-                  scaley(priv, priv->globalY) - (int) (size / 1.4));
-    }
-    if (rect) {
-        rect->x = x;
-        rect->y = y;
-        rect->width = 2 * size;
-        rect->height = 2 * size;
-    }
-}
-
-static void
-dmxConsoleDrawWindows(void *private)
-{
-    GETONLYPRIVFROMPRIVATE;
-    Display *dpy = priv->display;
-    int i;
-    Region whole, used, avail;
-    XRectangle rect;
-
-    whole = XCreateRegion();
-    used = XCreateRegion();
-    avail = XCreateRegion();
-    rect.x = 0;
-    rect.y = 0;
-    rect.width = priv->consWidth;
-    rect.height = priv->consHeight;
-    XUnionRectWithRegion(&rect, whole, whole);
-
-    for (i = 0; i < dmxNumScreens; i++) {
-        ScreenPtr pScreen = screenInfo.screens[i];
-        WindowPtr pRoot = pScreen->root;
-        WindowPtr pChild;
-
-#if DMX_WINDOW_DEBUG
-        dmxLog(dmxDebug, "%lu %p %p %p 2\n",
-               pRoot->drawable.id,
-               pRoot->parent, pRoot->firstChild, pRoot->lastChild);
-#endif
-
-        for (pChild = pRoot->firstChild; pChild; pChild = pChild->nextSib) {
-            if (pChild->mapped && pChild->realized) {
-#if DMX_WINDOW_DEBUG
-                dmxLog(dmxDebug, "  %p %d,%d %dx%d %d %d  %d RECTS\n",
-                       pChild,
-                       pChild->drawable.x,
-                       pChild->drawable.y,
-                       pChild->drawable.width,
-                       pChild->drawable.height,
-                       pChild->visibility,
-                       pChild->overrideRedirect,
-                       RegionNumRects(&pChild->clipList));
-#endif
-                rect.x = scalex(priv, pChild->drawable.x + pScreen->x);
-                rect.y = scaley(priv, pChild->drawable.y + pScreen->y);
-                rect.width = scalex(priv, pChild->drawable.width);
-                rect.height = scaley(priv, pChild->drawable.height);
-                XDrawRectangle(dpy, priv->pixmap, priv->gc,
-                               rect.x, rect.y, rect.width, rect.height);
-                XUnionRectWithRegion(&rect, used, used);
-                XSubtractRegion(whole, used, avail);
-                XSetRegion(dpy, priv->gc, avail);
-            }
-        }
-#ifdef PANORAMIX
-        if (!noPanoramiXExtension)
-            break;              /* Screen 0 valid with Xinerama */
-#endif
-    }
-    XDestroyRegion(avail);
-    XDestroyRegion(used);
-    XDestroyRegion(whole);
-    XSetClipMask(dpy, priv->gc, None);
-}
-
-static void
-dmxConsoleDraw(myPrivate * priv, int updateCursor, int update)
-{
-    GETDMXINPUTFROMPRIV;
-    Display *dpy = priv->display;
-    int i;
-
-    XFillRectangle(dpy, priv->pixmap, priv->gc, 0, 0,
-                   priv->consWidth, priv->consHeight);
-
-    for (i = 0; i < dmxNumScreens; i++) {
-        DMXScreenInfo *dmxScreen = &dmxScreens[i];
-
-        XFillRectangle(dpy, priv->pixmap,
-                       dmxScreen->beDisplay ? priv->gcRev : priv->gcDet,
-                       scalex(priv, screenInfo.screens[i]->x),
-                       scaley(priv, screenInfo.screens[i]->y),
-                       scalex(priv, screenInfo.screens[i]->width),
-                       scaley(priv, screenInfo.screens[i]->height));
-    }
-    for (i = 0; i < dmxNumScreens; i++) {
-        XDrawRectangle(dpy, priv->pixmap, priv->gc,
-                       scalex(priv, screenInfo.screens[i]->x),
-                       scaley(priv, screenInfo.screens[i]->y),
-                       scalex(priv, screenInfo.screens[i]->width),
-                       scaley(priv, screenInfo.screens[i]->height));
-    }
-    if (dmxInput->windows)
-        dmxConsoleDrawWindows(priv);
-    if (priv->fine && updateCursor)
-        dmxConsoleDrawFineCursor(priv, 0);
-    if (update) {
-        XCopyArea(priv->display, priv->pixmap, priv->window, priv->gc,
-                  0, 0, priv->consWidth, priv->consHeight, 0, 0);
-        XSync(priv->display, False);    /* Not a backend display */
-    }
-}
-
-static void
-dmxConsoleClearCursor(myPrivate * priv, int x, int y, XRectangle * rect)
-{
-    int cw = 14, ch = 14;       /* Clear width and height */
-
-    rect->x = scalex(priv, x) - cw / 2;
-    rect->y = scaley(priv, y) - ch / 2;
-    rect->width = cw;
-    rect->height = ch;
-    XSetClipRectangles(priv->display, priv->gc, 0, 0, rect, 1, Unsorted);
-    XSetClipRectangles(priv->display, priv->gcDet, 0, 0, rect, 1, Unsorted);
-    XSetClipRectangles(priv->display, priv->gcRev, 0, 0, rect, 1, Unsorted);
-    dmxConsoleDraw(priv, 0, 0);
-    XSetClipMask(priv->display, priv->gc, None);
-    XSetClipMask(priv->display, priv->gcDet, None);
-    XSetClipMask(priv->display, priv->gcRev, None);
-}
-
-static void
-dmxConsoleUpdateFineCursor(myPrivate * priv)
-{
-    int leave = 0;
-    XRectangle rects[2];
-
-    dmxConsoleClearCursor(priv, priv->globalX, priv->globalY, &rects[0]);
-    if (priv->dmxLocal->sendsCore) {
-        dmxGetGlobalPosition(&priv->globalX, &priv->globalY);
-    }
-    else {
-        priv->globalX = priv->dmxLocal->lastX;
-        priv->globalY = priv->dmxLocal->lastY;
-    }
-
-    priv->lastX = scalex(priv, priv->width / 2);
-    priv->lastY = scaley(priv, priv->height / 2);
-
-    /* Compute new warp position, which may be
-       outside the window */
-    if (priv->globalX < 1 || priv->globalX >= priv->width) {
-        if (priv->globalX < 1)
-            priv->lastX = 0;
-        else
-            priv->lastX = scalex(priv, priv->width);
-        priv->lastY = scaley(priv, priv->globalY);
-        ++leave;
-    }
-    if (priv->globalY < 1 || priv->globalY >= priv->height) {
-        if (priv->globalY < 1)
-            priv->lastY = 0;
-        else
-            priv->lastY = scaley(priv, priv->height);
-        priv->lastX = scalex(priv, priv->globalX);
-        ++leave;
-    }
-
-    /* Draw pseudo cursor in window */
-    dmxConsoleDrawFineCursor(priv, &rects[1]);
-
-    XSetClipRectangles(priv->display, priv->gc, 0, 0, rects, 2, Unsorted);
-    XCopyArea(priv->display, priv->pixmap, priv->window, priv->gc,
-              0, 0, priv->consWidth, priv->consHeight, 0, 0);
-    XSetClipMask(priv->display, priv->gc, None);
-
-    DMXDBG2("dmxConsoleUpdateFineCursor: WARP %d %d\n",
-            priv->lastX, priv->lastY);
-    XWarpPointer(priv->display, priv->window, priv->window,
-                 0, 0, 0, 0, priv->lastX, priv->lastY);
-    XSync(priv->display, False);        /* Not a backend display */
-
-    if (leave) {
-        XEvent X;
-
-        while (XCheckMaskEvent(priv->display, PointerMotionMask, &X)) {
-            if (X.type == MotionNotify) {
-                if (X.xmotion.x != priv->lastX || X.xmotion.y != priv->lastY) {
-                    DMXDBG4("Ignoring motion to %d %d after leave frm %d %d\n",
-                            X.xmotion.x, X.xmotion.y, priv->lastX, priv->lastY);
-                }
-            }
-            else {
-                dmxLog(dmxInfo, "Ignoring event (%d): %s ****************\n",
-                       X.type, dmxEventName(X.type));
-            }
-        }
-    }
-    DMXDBG6("dmxConsoleUpdateFineCursor: Warp %d %d on %d %d [%d %d]\n",
-            priv->lastX, priv->lastY,
-            scalex(priv, priv->width),
-            scaley(priv, priv->height), priv->globalX, priv->globalY);
-}
-
-/** Whenever the window layout (size, position, stacking order) might be
- * changed, this routine is called with the \a pWindow that changed and
- * the \a type of change.  This routine is called in a conservative
- * fashion: the actual layout of the windows of the screen might not
- * have had any human-visible changes. */
-void
-dmxConsoleUpdateInfo(void *private, DMXUpdateType type, WindowPtr pWindow)
-{
-    GETONLYPRIVFROMPRIVATE;
-    dmxConsoleDraw(priv, 1, 1);
-}
-
-static void
-dmxConsoleMoveAbsolute(myPrivate * priv, int x, int y,
-                       DevicePtr pDev, dmxMotionProcPtr motion,
-                       DMXBlockType block)
-{
-    int tmpX, tmpY, v[2];
-
-    tmpX = unscalex(priv, x);
-    tmpY = unscalex(priv, y);
-    DMXDBG6("dmxConsoleMoveAbsolute(,%d,%d) %d %d =? %d %d\n",
-            x, y, tmpX, tmpY, priv->curX, priv->curY);
-    if (tmpX == priv->curX && tmpY == priv->curY)
-        return;
-    v[0] = unscalex(priv, x);
-    v[1] = unscaley(priv, y);
-    motion(pDev, v, 0, 2, DMX_ABSOLUTE_CONFINED, block);
-    /* dmxConsoleUpdatePosition gets called here by dmxCoreMotion */
-}
-
-static void
-dmxConsoleMoveRelative(myPrivate * priv, int x, int y,
-                       DevicePtr pDev, dmxMotionProcPtr motion,
-                       DMXBlockType block)
-{
-    int v[2];
-
-    /* Ignore the event generated from * warping back to middle */
-    if (x == priv->lastX && y == priv->lastY)
-        return;
-    v[0] = priv->lastX - x;
-    v[1] = priv->lastY - y;
-    motion(pDev, v, 0, 2, DMX_RELATIVE, block);
-    /* dmxConsoleUpdatePosition gets called here by dmxCoreMotion */
-}
-
-/** This routine gets called from #dmxCoreMotion for each motion.  This
- * allows the console's notion of the cursor postion to change when
- * another input device actually caused the change. */
-void
-dmxConsoleUpdatePosition(void *private, int x, int y)
-{
-    GETONLYPRIVFROMPRIVATE;
-    int tmpX, tmpY;
-    Display *dpy = priv->display;
-    static unsigned long dmxGeneration = 0;
-
-    tmpX = scalex(priv, x);
-    tmpY = scaley(priv, y);
-    DMXDBG6("dmxConsoleUpdatePosition(,%d,%d) new=%d,%d dims=%d,%d\n",
-            x, y, tmpX, tmpY, priv->consWidth, priv->consHeight);
-
-    if (priv->fine)
-        dmxConsoleUpdateFineCursor(priv);
-    if (tmpX != priv->curX || tmpY != priv->curY) {
-        if (tmpX < 0)
-            tmpX = 0;
-        if (tmpY < 0)
-            tmpY = 0;
-        if (tmpX >= priv->consWidth)
-            tmpX = priv->consWidth - 1;
-        if (tmpY >= priv->consHeight)
-            tmpY = priv->consHeight - 1;
-        priv->curX = tmpX;
-        priv->curY = tmpY;
-        if (!priv->fine) {
-            DMXDBG2("   WARP B %d %d\n", priv->curX, priv->curY);
-            XWarpPointer(dpy, priv->window,
-                         priv->window, 0, 0, 0, 0, tmpX, tmpY);
-            XSync(dpy, False);  /* Not a backend display */
-        }
-    }
-
-    if (dmxGeneration != serverGeneration) {
-        dmxGeneration = serverGeneration;
-        dmxConsoleDraw(priv, 1, 1);
-    }
-}
-
-/** Collect all pending events from the console's display.  Plase these
- * events on the server event queue using the \a motion and \a enqueue
- * routines.  The \a checkspecial routine is used to check for special
- * keys that need handling.  \a block tells if signals should be blocked
- * when updating the event queue. */
-void
-dmxConsoleCollectEvents(DevicePtr pDev,
-                        dmxMotionProcPtr motion,
-                        dmxEnqueueProcPtr enqueue,
-                        dmxCheckSpecialProcPtr checkspecial, DMXBlockType block)
-{
-    GETPRIVFROMPDEV;
-    GETDMXINPUTFROMPRIV;
-    Display *dpy = priv->display;
-    Window win = priv->window;
-    int width = priv->width;
-    int height = priv->height;
-    XEvent X, N;
-    XSetWindowAttributes attribs;
-    static int rInitialized = 0;
-    static Region r;
-    XRectangle rect;
-    static int raising = 0, raiseX, raiseY;     /* FIXME */
-
-    while (XPending(dpy)) {
-        XNextEvent(dpy, &X);
-        switch (X.type) {
-        case VisibilityNotify:
-            break;
-        case Expose:
-            DMXDBG5("dmxConsoleCollectEvents: Expose #%d %d %d %d %d\n",
-                    X.xexpose.count,
-                    X.xexpose.x, X.xexpose.y,
-                    X.xexpose.width, X.xexpose.height);
-            if (!rInitialized++)
-                r = XCreateRegion();
-            rect.x = X.xexpose.x;
-            rect.y = X.xexpose.y;
-            rect.width = X.xexpose.width;
-            rect.height = X.xexpose.height;
-            XUnionRectWithRegion(&rect, r, r);
-            if (X.xexpose.count == 0) {
-                XSetRegion(dpy, priv->gc, r);
-                XSetRegion(dpy, priv->gcDet, r);
-                XSetRegion(dpy, priv->gcRev, r);
-                dmxConsoleDraw(priv, 1, 1);
-                XSetClipMask(dpy, priv->gc, None);
-                XSetClipMask(dpy, priv->gcDet, None);
-                XSetClipMask(dpy, priv->gcRev, None);
-                XDestroyRegion(r);
-                rInitialized = 0;
-            }
-            break;
-        case ResizeRequest:
-            DMXDBG2("dmxConsoleCollectEvents: Resize %d %d\n",
-                    X.xresizerequest.width, X.xresizerequest.height);
-            priv->consWidth = X.xresizerequest.width;
-            priv->consHeight = X.xresizerequest.height;
-            priv->xScale = (double) priv->consWidth / width;
-            priv->yScale = (double) priv->consHeight / height;
-            attribs.override_redirect = True;
-            XChangeWindowAttributes(dpy, win, CWOverrideRedirect, &attribs);
-            XResizeWindow(dpy, win, priv->consWidth, priv->consHeight);
-            XFreePixmap(dpy, priv->pixmap);
-            priv->pixmap = XCreatePixmap(dpy,
-                                         RootWindow(dpy, DefaultScreen(dpy)),
-                                         priv->consWidth,
-                                         priv->consHeight,
-                                         DefaultDepth(dpy, DefaultScreen(dpy)));
-            dmxConsoleDraw(priv, 1, 1);
-            attribs.override_redirect = False;
-            XChangeWindowAttributes(dpy, win, CWOverrideRedirect, &attribs);
-            break;
-        case LeaveNotify:
-            DMXDBG4("dmxConsoleCollectEvents: Leave @ %d,%d; r=%d f=%d\n",
-                    X.xcrossing.x, X.xcrossing.y, raising, priv->fine);
-            if (!priv->captured)
-                dmxCommonRestoreState(priv);
-            else {
-                dmxConsoleUncapture(dmxInput);
-                dmxCommonRestoreState(priv);
-            }
-            break;
-        case EnterNotify:
-            DMXDBG6("dmxConsoleCollectEvents: Enter %d,%d r=%d f=%d (%d,%d)\n",
-                    X.xcrossing.x, X.xcrossing.y, raising, priv->fine,
-                    priv->curX, priv->curY);
-            dmxCommonSaveState(priv);
-            if (raising) {
-                raising = 0;
-                dmxConsoleMoveAbsolute(priv, raiseX, raiseY,
-                                       priv->mou, motion, block);
-            }
-            else {
-                if (priv->fine) {
-                    /* The raise will generate an event near the center,
-                     * which is not where the cursor should be.  So we
-                     * save the real position, do the raise, and move
-                     * the cursor here again after the raise generates
-                     * the event. */
-                    raising = 1;
-                    raiseX = X.xcrossing.x;
-                    raiseY = X.xcrossing.y;
-                    XRaiseWindow(dpy, priv->window);
-                }
-                XSync(dpy, False);      /* Not a backend display */
-                if (!X.xcrossing.x && !X.xcrossing.y)
-                    dmxConsoleMoveAbsolute(priv, priv->curX, priv->curY,
-                                           priv->mou, motion, block);
-            }
-            break;
-        case MotionNotify:
-            if (priv->curX == X.xmotion.x && priv->curY == X.xmotion.y)
-                continue;
-            if (XPending(dpy)) {        /* do motion compression */
-                XPeekEvent(dpy, &N);
-                if (N.type == MotionNotify)
-                    continue;
-            }
-            DMXDBG2("dmxConsoleCollectEvents: Motion %d %d\n",
-                    X.xmotion.x, X.xmotion.y);
-            if (raising) {
-                raising = 0;
-                dmxConsoleMoveAbsolute(priv, raiseX, raiseY,
-                                       priv->mou, motion, block);
-            }
-            else {
-                if (priv->fine)
-                    dmxConsoleMoveRelative(priv, X.xmotion.x, X.xmotion.y,
-                                           priv->mou, motion, block);
-                else
-                    dmxConsoleMoveAbsolute(priv, X.xmotion.x, X.xmotion.y,
-                                           priv->mou, motion, block);
-            }
-            break;
-        case KeyPress:
-        case KeyRelease:
-            enqueue(priv->kbd, X.type, X.xkey.keycode, 0, NULL, block);
-            break;
-        default:
-            /* Pass the whole event here, because
-             * this may be an extension event. */
-            enqueue(priv->mou, X.type, X.xbutton.button, 0, &X, block);
-            break;
-        }
-    }
-}
-
-static void
-dmxCloseConsole(myPrivate * priv)
-{
-    GETDMXINPUTFROMPRIV;
-    dmxCommonRestoreState(priv);
-    if (priv->display) {
-        XFreeGC(priv->display, priv->gc);
-        XFreeGC(priv->display, priv->gcDet);
-        XFreeGC(priv->display, priv->gcRev);
-        XFreeGC(priv->display, priv->gcCur);
-        if (!dmxInput->console)
-            XCloseDisplay(priv->display);
-    }
-    priv->display = NULL;
-}
-
-static Bool
-dmxCloseConsoleScreen(ScreenPtr pScreen)
-{
-    myPrivate *priv, *last;
-
-    for (last = priv = (myPrivate *) dixLookupPrivate(&pScreen->devPrivates,
-                                                      dmxScreenPrivateKey);
-         priv; priv = priv->next)
-        dmxCloseConsole(last = priv);
-
-    DMX_UNWRAP(CloseScreen, last, pScreen);
-    return pScreen->CloseScreen(pScreen);
-}
-
-static Cursor
-dmxConsoleCreateEmptyCursor(myPrivate * priv)
-{
-    char noCursorData[] = { 0, 0, 0, 0, 0, 0, 0, 0 };
-    Pixmap pixmap;
-    Cursor cursor;
-    XColor color, tmpColor;
-    Display *dpy = priv->display;
-
-    /* Create empty cursor for window */
-    pixmap = XCreateBitmapFromData(priv->display, priv->window,
-                                   noCursorData, 8, 8);
-    if (!XAllocNamedColor(dpy, DefaultColormap(dpy, DefaultScreen(dpy)),
-                          "black", &color, &tmpColor))
-        dmxLog(dmxFatal, "Cannot allocate color for cursor\n");
-    cursor = XCreatePixmapCursor(dpy, pixmap, pixmap, &color, &color, 0, 0);
-    XFreePixmap(dpy, pixmap);
-    return cursor;
-}
-
-static void
-dmxConsoleComputeWidthHeight(myPrivate * priv,
-                             int *width, int *height,
-                             double *xScale, double *yScale,
-                             int *consWidth, int *consHeight)
-{
-    int screen;
-    Display *dpy = priv->display;
-
-    *width = 0;
-    *height = 0;
-    *xScale = 1.0;
-    *yScale = 1.0;
-
-    screen = DefaultScreen(dpy);
-    *consWidth = DisplayWidth(dpy, screen) * CONSOLE_NUM / CONSOLE_DEN;
-    *consHeight = DisplayHeight(dpy, screen) * CONSOLE_NUM / CONSOLE_DEN;
-
-    if (*consWidth < 1)
-        *consWidth = 1;
-    if (*consHeight < 1)
-        *consHeight = 1;
-
-#if 1
-    /* Always keep the console size similar
-     * to the global bounding box. */
-    *width = dmxGlobalWidth;
-    *height = dmxGlobalHeight;
-#else
-    /* Make the console window as big as
-     * possible by computing the visible
-     * bounding box. */
-    for (i = 0; i < dmxNumScreens; i++) {
-        if (screenInfo.screens[i]->x + screenInfo.screens[i]->width > *width)
-            *width = screenInfo.screens[i]->x + screenInfo.screens[i]->width;
-
-        if (screenInfo.screens[i]->y + screenInfo.screens[i]->height > *height)
-            *height = screenInfo.screens[i]->y + screenInfo.screens[i]->height;
-    }
-#endif
-
-    if ((double) *consWidth / *width < (double) *consHeight / *height)
-        *xScale = *yScale = (double) *consWidth / *width;
-    else
-        *xScale = *yScale = (double) *consHeight / *height;
-
-    *consWidth = scalex(priv, *width);
-    *consHeight = scaley(priv, *height);
-    if (*consWidth < 1)
-        *consWidth = 1;
-    if (*consHeight < 1)
-        *consHeight = 1;
-}
-
-/** Re-initialized the console device described by \a pDev (after a
- * reconfig). */
-void
-dmxConsoleReInit(DevicePtr pDev)
-{
-    GETPRIVFROMPDEV;
-    Display *dpy;
-
-    if (!priv || !priv->initialized)
-        return;
-    dpy = priv->display;
-
-    dmxConsoleComputeWidthHeight(priv,
-                                 &priv->width, &priv->height,
-                                 &priv->xScale, &priv->yScale,
-                                 &priv->consWidth, &priv->consHeight);
-    XResizeWindow(dpy, priv->window, priv->consWidth, priv->consHeight);
-    XFreePixmap(dpy, priv->pixmap);
-    priv->pixmap = XCreatePixmap(dpy,
-                                 RootWindow(dpy, DefaultScreen(dpy)),
-                                 priv->consWidth,
-                                 priv->consHeight,
-                                 DefaultDepth(dpy, DefaultScreen(dpy)));
-    dmxConsoleDraw(priv, 1, 1);
-}
-
-/** Initialized the console device described by \a pDev. */
-void
-dmxConsoleInit(DevicePtr pDev)
-{
-    GETPRIVFROMPDEV;
-    DMXInputInfo *dmxInput = &dmxInputs[dmxLocal->inputIdx];
-    int screen;
-    unsigned long mask;
-    XSetWindowAttributes attribs;
-    Display *dpy;
-    Window win;
-    XGCValues gcvals;
-    XColor color;
-    XClassHint class_hints;
-    unsigned long tmp;
-
-    if (dmxLocal->type == DMX_LOCAL_MOUSE)
-        priv->mou = pDev;
-    if (dmxLocal->type == DMX_LOCAL_KEYBOARD)
-        priv->kbd = pDev;
-    if (priv->initialized++)
-        return;                 /* Only do once for mouse/keyboard pair */
-
-    if (!(dpy = priv->display = XOpenDisplay(dmxInput->name)))
-        dmxLog(dmxFatal,
-               "dmxOpenConsole: cannot open console display %s\n",
-               dmxInput->name);
-
-    /* Set up defaults */
-    dmxConsoleComputeWidthHeight(priv,
-                                 &priv->width, &priv->height,
-                                 &priv->xScale, &priv->yScale,
-                                 &priv->consWidth, &priv->consHeight);
-
-    /* Private initialization using computed values or constants. */
-    screen = DefaultScreen(dpy);
-    priv->initPointerX = scalex(priv, priv->width / 2);
-    priv->initPointerY = scaley(priv, priv->height / 2);
-    priv->eventMask = (ButtonPressMask
-                       | ButtonReleaseMask
-                       | PointerMotionMask
-                       | EnterWindowMask
-                       | LeaveWindowMask
-                       | KeyPressMask
-                       | KeyReleaseMask | ExposureMask | ResizeRedirectMask);
-
-    mask = CWBackPixel | CWEventMask | CWColormap | CWOverrideRedirect;
-    attribs.colormap = DefaultColormap(dpy, screen);
-    if (XParseColor(dpy, attribs.colormap, CONSOLE_BG_COLOR, &color)
-        && XAllocColor(dpy, attribs.colormap, &color)) {
-        attribs.background_pixel = color.pixel;
-    }
-    else
-        attribs.background_pixel = WhitePixel(dpy, screen);
-
-    attribs.event_mask = priv->eventMask;
-    attribs.override_redirect = False;
-
-    win = priv->window = XCreateWindow(dpy,
-                                       RootWindow(dpy, screen),
-                                       0, 0, priv->consWidth, priv->consHeight,
-                                       0,
-                                       DefaultDepth(dpy, screen),
-                                       InputOutput,
-                                       DefaultVisual(dpy, screen),
-                                       mask, &attribs);
-    priv->pixmap = XCreatePixmap(dpy, RootWindow(dpy, screen),
-                                 priv->consWidth, priv->consHeight,
-                                 DefaultDepth(dpy, screen));
-
-    /* Set up properties */
-    XStoreName(dpy, win, DMX_CONSOLE_NAME);
-    class_hints.res_name = (char *) DMX_RES_NAME;
-    class_hints.res_class = (char *) DMX_RES_CLASS;
-    XSetClassHint(dpy, win, &class_hints);
-
-    /* Map the window */
-    XMapWindow(dpy, win);
-
-    /* Create cursors */
-    priv->cursorNormal = XCreateFontCursor(dpy, XC_circle);
-    priv->cursorGrabbed = XCreateFontCursor(dpy, XC_spider);
-    priv->cursorEmpty = dmxConsoleCreateEmptyCursor(priv);
-    XDefineCursor(dpy, priv->window, priv->cursorNormal);
-
-    /* Create GC */
-    mask = (GCFunction | GCPlaneMask | GCClipMask | GCForeground |
-            GCBackground | GCLineWidth | GCLineStyle | GCCapStyle |
-            GCFillStyle | GCGraphicsExposures);
-    gcvals.function = GXcopy;
-    gcvals.plane_mask = AllPlanes;
-    gcvals.clip_mask = None;
-    if (XParseColor(dpy, attribs.colormap, CONSOLE_SCREEN_FG_COLOR, &color)
-        && XAllocColor(dpy, attribs.colormap, &color)) {
-        gcvals.foreground = color.pixel;
-    }
-    else
-        gcvals.foreground = BlackPixel(dpy, screen);
-    if (XParseColor(dpy, attribs.colormap, CONSOLE_SCREEN_BG_COLOR, &color)
-        && XAllocColor(dpy, attribs.colormap, &color)) {
-        gcvals.background = color.pixel;
-    }
-    else
-        gcvals.background = WhitePixel(dpy, screen);
-    gcvals.line_width = 0;
-    gcvals.line_style = LineSolid;
-    gcvals.cap_style = CapNotLast;
-    gcvals.fill_style = FillSolid;
-    gcvals.graphics_exposures = False;
-
-    priv->gc = XCreateGC(dpy, win, mask, &gcvals);
-
-    tmp = gcvals.foreground;
-    if (XParseColor(dpy, attribs.colormap, CONSOLE_SCREEN_DET_COLOR, &color)
-        && XAllocColor(dpy, attribs.colormap, &color)) {
-        gcvals.foreground = color.pixel;
-    }
-    else
-        gcvals.foreground = BlackPixel(dpy, screen);
-    priv->gcDet = XCreateGC(dpy, win, mask, &gcvals);
-    gcvals.foreground = tmp;
-
-    tmp = gcvals.background;
-    gcvals.background = gcvals.foreground;
-    gcvals.foreground = tmp;
-    priv->gcRev = XCreateGC(dpy, win, mask, &gcvals);
-
-    gcvals.background = gcvals.foreground;
-    if (XParseColor(dpy, attribs.colormap, CONSOLE_SCREEN_CUR_COLOR, &color)
-        && XAllocColor(dpy, attribs.colormap, &color)) {
-        gcvals.foreground = color.pixel;
-    }
-    else
-        gcvals.foreground = BlackPixel(dpy, screen);
-    priv->gcCur = XCreateGC(dpy, win, mask, &gcvals);
-
-    dmxConsoleDraw(priv, 1, 1);
-
-    if (dixLookupPrivate(&screenInfo.screens[0]->devPrivates,
-                         dmxScreenPrivateKey))
-        priv->next = dixLookupPrivate(&screenInfo.screens[0]->devPrivates,
-                                      dmxScreenPrivateKey);
-    else
-        DMX_WRAP(CloseScreen, dmxCloseConsoleScreen,
-                 priv, screenInfo.screens[0]);
-    dixSetPrivate(&screenInfo.screens[0]->devPrivates, dmxScreenPrivateKey,
-                  priv);
-}
-
-/** Fill in the \a info structure for the specified \a pDev.  Only used
- * for pointers. */
-void
-dmxConsoleMouGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info)
-{
-    GETPRIVFROMPDEV;
-
-    info->buttonClass = 1;
-    dmxCommonMouGetMap(pDev, info->map, &info->numButtons);
-    info->valuatorClass = 1;
-    info->numRelAxes = 2;
-    info->minval[0] = 0;
-    info->minval[1] = 0;
-    /* max possible console window size: */
-    info->maxval[0] = DisplayWidth(priv->display, DefaultScreen(priv->display));
-    info->maxval[1] =
-        DisplayHeight(priv->display, DefaultScreen(priv->display));
-    info->res[0] = 1;
-    info->minres[0] = 0;
-    info->maxres[0] = 1;
-    info->ptrFeedbackClass = 1;
-}
-
-/** Fill in the \a info structure for the specified \a pDev.  Only used
- * for keyboard. */
-void
-dmxConsoleKbdGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info)
-{
-    dmxCommonKbdGetInfo(pDev, info);
-    info->keyboard = 1;
-    info->keyClass = 1;
-    dmxCommonKbdGetMap(pDev, &info->keySyms, info->modMap);
-    info->freemap = 1;
-    info->focusClass = 1;
-    info->kbdFeedbackClass = 1;
-}
-
-/** Handle special console-only keys. */
-int
-dmxConsoleFunctions(void *private, DMXFunctionType function)
-{
-    GETONLYPRIVFROMPRIVATE;
-    XRectangle rect;
-    Display *dpy = priv->display;
-
-    switch (function) {
-    case DMX_FUNCTION_FINE:
-        if (priv->fine) {
-            priv->fine = 0;
-            dmxConsoleClearCursor(priv, priv->globalX, priv->globalY, &rect);
-            XSetClipRectangles(dpy, priv->gc, 0, 0, &rect, 1, Unsorted);
-            XCopyArea(dpy, priv->pixmap, priv->window, priv->gc,
-                      0, 0, priv->consWidth, priv->consHeight, 0, 0);
-            XSetClipMask(dpy, priv->gc, None);
-
-            XDefineCursor(dpy, priv->window,
-                          priv->grabbed
-                          ? priv->cursorGrabbed : priv->cursorNormal);
-            XWarpPointer(dpy, priv->window, priv->window,
-                         0, 0, 0, 0,
-                         scalex(priv, priv->globalX),
-                         scaley(priv, priv->globalY));
-            XSync(dpy, False);  /* Not a backend display */
-        }
-        else {
-            priv->fine = 1;
-            XRaiseWindow(dpy, priv->window);
-            XDefineCursor(dpy, priv->window, priv->cursorEmpty);
-            dmxConsoleUpdateFineCursor(priv);
-        }
-        return 1;
-    case DMX_FUNCTION_GRAB:
-        if (priv->grabbed) {
-            XUngrabKeyboard(dpy, CurrentTime);
-            XUngrabPointer(dpy, CurrentTime);
-            XDefineCursor(dpy, priv->window,
-                          priv->fine ? priv->cursorEmpty : priv->cursorNormal);
-        }
-        else {
-            if (XGrabPointer(dpy, priv->window, True,
-                             0, GrabModeAsync, GrabModeAsync, priv->window,
-                             None, CurrentTime)) {
-                dmxLog(dmxError, "XGrabPointer failed\n");
-                return 0;
-            }
-            if (XGrabKeyboard(dpy, priv->window, True,
-                              GrabModeAsync, GrabModeAsync, CurrentTime)) {
-                dmxLog(dmxError, "XGrabKeyboard failed\n");
-                XUngrabPointer(dpy, CurrentTime);
-                return 0;
-            }
-            XDefineCursor(dpy, priv->window,
-                          priv->fine ? priv->cursorEmpty : priv->cursorGrabbed);
-        }
-        priv->grabbed = !priv->grabbed;
-        if (priv->fine)
-            dmxConsoleUpdateFineCursor(priv);
-        return 1;
-    case DMX_FUNCTION_TERMINATE:
-        return 1;
-    default:
-        return 0;
-    }
-}
-
-static void
-dmxDump(void)
-{
-    int i, j;
-    DMXInputInfo *dmxInput;
-    XEvent X;
-
-    for (i = 0, dmxInput = &dmxInputs[0]; i < dmxNumInputs; i++, dmxInput++) {
-        for (j = 0; j < dmxInput->numDevs; j++) {
-            DMXLocalInputInfoPtr dmxLocal = dmxInput->devs[j];
-            myPrivate *priv = dmxLocal->private;
-
-            while (priv
-                   && priv->display
-                   && XCheckTypedEvent(priv->display, MotionNotify, &X)) {
-                DMXDBG4("dmxDump: %s/%d threw event away %d %s\n",
-                        dmxInput->name, j, X.type, dmxEventName(X.type));
-            }
-        }
-    }
-}
-
-/** This routine is used to warp the pointer into the console window
- * from anywhere on the screen.  It is used when backend and console
- * input are both being taken from the same X display. */
-void
-dmxConsoleCapture(DMXInputInfo * dmxInput)
-{
-    int i;
-    XEvent X;
-
-    DMXDBG0("dmxConsoleCapture\n");
-    dmxSync(NULL, TRUE);
-    for (i = 0; i < dmxInput->numDevs; i++) {
-        DMXLocalInputInfoPtr dmxLocal = dmxInput->devs[i];
-        myPrivate *priv = dmxLocal->private;
-
-        if (dmxLocal->extType != DMX_LOCAL_TYPE_CONSOLE)
-            continue;
-        if (dmxLocal->type != DMX_LOCAL_MOUSE)
-            continue;
-        if (priv->captured)
-            continue;
-        priv->captured = 2;     /* Ungrab only after proximal events. */
-        XRaiseWindow(priv->display, priv->window);
-        XSync(priv->display, False);    /* Not a backend display */
-        while (XCheckTypedEvent(priv->display, MotionNotify, &X)) {
-            DMXDBG3("   Ignoring motion to %d %d after capture on %s\n",
-                    X.xmotion.x, X.xmotion.y, dmxInput->name);
-        }
-        XWarpPointer(priv->display, None,
-                     priv->window, 0, 0, 0, 0, priv->curX, priv->curY);
-        XSync(priv->display, False);    /* Not a backend display */
-        dmxDump();
-        if (priv->fine)
-            dmxConsoleUpdateFineCursor(priv);
-    }
-}
-
-/** Undo the capture that was done by #dmxConsoleCapture. */
-void
-dmxConsoleUncapture(DMXInputInfo * dmxInput)
-{
-    int i;
-
-    DMXDBG0("dmxConsoleUncapture\n");
-    dmxSync(NULL, TRUE);
-    for (i = 0; i < dmxInput->numDevs; i++) {
-        DMXLocalInputInfoPtr dmxLocal = dmxInput->devs[i];
-        myPrivate *priv = dmxLocal->private;
-
-        if (dmxLocal->extType != DMX_LOCAL_TYPE_CONSOLE)
-            continue;
-        if (dmxLocal->type != DMX_LOCAL_MOUSE)
-            continue;
-        if (!priv->captured)
-            continue;
-        priv->captured = 0;
-        XSync(priv->display, False);    /* Not a backend display */
-    }
-}
diff --git a/hw/dmx/input/dmxconsole.h b/hw/dmx/input/dmxconsole.h
deleted file mode 100644
index ea6033c..0000000
--- a/hw/dmx/input/dmxconsole.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright 2002 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-/** \file
- * Interface for console device support.  \see dmxconsole.c \see dmxcommon.c */
-
-#ifndef _DMXCONSOLE_H_
-#define _DMXCONSOLE_H_
-
-extern void *dmxConsoleCreatePrivate(DeviceIntPtr pDevice);
-extern void dmxConsoleDestroyPrivate(void *private);
-extern void dmxConsoleInit(DevicePtr pDev);
-extern void dmxConsoleReInit(DevicePtr pDev);
-extern void dmxConsoleMouGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info);
-extern void dmxConsoleKbdGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info);
-extern void dmxConsoleCollectEvents(DevicePtr pDev,
-                                    dmxMotionProcPtr motion,
-                                    dmxEnqueueProcPtr enqueue,
-                                    dmxCheckSpecialProcPtr checkspecial,
-                                    DMXBlockType block);
-extern int dmxConsoleFunctions(void *private, DMXFunctionType function);
-extern void dmxConsoleUpdatePosition(void *private, int x, int y);
-extern void dmxConsoleKbdSetCtrl(void *private, KeybdCtrl * ctrl);
-extern void dmxConsoleCapture(DMXInputInfo * dmxInput);
-extern void dmxConsoleUncapture(DMXInputInfo * dmxInput);
-extern void dmxConsoleUpdateInfo(void *private,
-                                 DMXUpdateType, WindowPtr pWindow);
-
-#endif
diff --git a/hw/dmx/input/dmxdetach.c b/hw/dmx/input/dmxdetach.c
deleted file mode 100644
index 469f9c8..0000000
--- a/hw/dmx/input/dmxdetach.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright 2004 Red Hat Inc., Raleigh, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-/** \file
- * Provide support and helper functions for input detach and attach. */
-
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#include "dmxinputinit.h"
-#include "dmxextension.h"       /* For dmxInputCount */
-
-/** Search for input associated with \a dmxScreen, and detach. */
-void
-dmxInputDetach(DMXScreenInfo * dmxScreen, Bool reserveId)
-{
-    int i;
-
-    for (i = 0; i < dmxNumInputs; i++) {
-        DMXInputInfo *dmxInput = &dmxInputs[i];
-
-        if (dmxInput->scrnIdx == dmxScreen->index) {
-            dmxLogInput(dmxInput, "Detaching (%sreserved)\n",
-                        reserveId ? "" : "not ");
-            dmxInput->detached = True;
-            return;
-        }
-    }
-}
diff --git a/hw/dmx/input/dmxdummy.c b/hw/dmx/input/dmxdummy.c
deleted file mode 100644
index 0690177..0000000
--- a/hw/dmx/input/dmxdummy.c
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright 2002 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-/** \file
- * Provide mouse and keyboard that are sufficient for starting the X
- * server, but that don't actually provide any events.  This is useful
- * for testing. */
-
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#include "dmx.h"
-#include "dmxinputinit.h"
-#include "dmxdummy.h"
-
-/** Return information about the dummy keyboard device specified in \a pDev
- * into the structure pointed to by \a info.  The keyboard is set up to
- * have 1 valid key code that is \a NoSymbol */
-void
-dmxDummyKbdGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info)
-{
-    static KeySym keyboard_mapping = NoSymbol;
-
-    info->keyboard = 1;
-    info->keyClass = 1;
-    info->keySyms.minKeyCode = 8;
-    info->keySyms.maxKeyCode = 8;
-    info->keySyms.mapWidth = 1;
-    info->keySyms.map = &keyboard_mapping;
-    info->freemap = 0;
-    info->focusClass = 1;
-    info->kbdFeedbackClass = 1;
-    info->force = 1;
-}
-
-/** Return information about the dummy mouse device specified in \a pDev
- * into the structure pointed to by \a info.  They mouse has 3 buttons
- * and two axes. */
-void
-dmxDummyMouGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info)
-{
-    info->buttonClass = 1;
-    info->numButtons = 3;
-    info->map[0] = 1;
-    info->map[1] = 2;
-    info->map[2] = 3;
-    info->valuatorClass = 1;
-    info->numRelAxes = 2;
-    info->minval[0] = 0;
-    info->minval[1] = 0;
-    info->maxval[0] = 0;
-    info->maxval[1] = 0;
-    info->res[0] = 1;
-    info->minres[0] = 0;
-    info->maxres[0] = 1;
-    info->ptrFeedbackClass = 1;
-}
diff --git a/hw/dmx/input/dmxdummy.h b/hw/dmx/input/dmxdummy.h
deleted file mode 100644
index e3a85be..0000000
--- a/hw/dmx/input/dmxdummy.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright 2002 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-/** \file
- * Interface to dummy input device support.  \see dmxdummy.c */
-
-#ifndef _DMXDUMMY_H_
-#define _DMXDUMMY_H_
-
-extern void dmxDummyMouGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info);
-extern void dmxDummyKbdGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info);
-
-#endif
diff --git a/hw/dmx/input/dmxevents.c b/hw/dmx/input/dmxevents.c
deleted file mode 100644
index fb0c00f..0000000
--- a/hw/dmx/input/dmxevents.c
+++ /dev/null
@@ -1,826 +0,0 @@
-/*
- * Copyright 2002-2003 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-/** \file
- * Provide support and helper functions for enqueing events received by
- * the low-level input drivers. */
-
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#define DMX_EVENTS_DEBUG 0
-
-#include "dmxinputinit.h"
-#include "dmxevents.h"
-#include "dmxcb.h"
-#include "dmxcommon.h"
-#include "dmxcursor.h"
-#include "dmxmotion.h"
-#include "dmxmap.h"
-
-#include <X11/keysym.h>
-#include "opaque.h"
-#include "inputstr.h"
-#include "inpututils.h"
-#include "mipointer.h"
-#include "mi.h"
-#include "exglobals.h"
-
-#include "xkbsrv.h"
-#include "XIstubs.h"
-
-static int dmxGlobalX, dmxGlobalY;      /* Global cursor position */
-static int dmxGlobalInvalid;    /* Flag indicating dmxCoreMotion
-                                 * should move the mouse anyway. */
-
-#if DMX_EVENTS_DEBUG
-#define DMXDBG0(f)               dmxLog(dmxDebug,f)
-#define DMXDBG1(f,a)             dmxLog(dmxDebug,f,a)
-#define DMXDBG2(f,a,b)           dmxLog(dmxDebug,f,a,b)
-#define DMXDBG3(f,a,b,c)         dmxLog(dmxDebug,f,a,b,c)
-#define DMXDBG4(f,a,b,c,d)       dmxLog(dmxDebug,f,a,b,c,d)
-#define DMXDBG5(f,a,b,c,d,e)     dmxLog(dmxDebug,f,a,b,c,d,e)
-#define DMXDBG6(f,a,b,c,d,e,g)   dmxLog(dmxDebug,f,a,b,c,d,e,g)
-#define DMXDBG7(f,a,b,c,d,e,g,h) dmxLog(dmxDebug,f,a,b,c,d,e,g,h)
-#else
-#define DMXDBG0(f)
-#define DMXDBG1(f,a)
-#define DMXDBG2(f,a,b)
-#define DMXDBG3(f,a,b,c)
-#define DMXDBG4(f,a,b,c,d)
-#define DMXDBG5(f,a,b,c,d,e)
-#define DMXDBG6(f,a,b,c,d,e,g)
-#define DMXDBG7(f,a,b,c,d,e,g,h)
-#endif
-
-static int
-dmxApplyFunctions(DMXInputInfo * dmxInput, DMXFunctionType f)
-{
-    int i;
-    int rc = 0;
-
-    for (i = 0; i < dmxInput->numDevs; i += dmxInput->devs[i]->binding)
-        if (dmxInput->devs[i]->functions)
-            rc += dmxInput->devs[i]->functions(dmxInput->devs[i]->private, f);
-    return rc;
-}
-
-static int
-dmxCheckFunctionKeys(DMXLocalInputInfoPtr dmxLocal, int type, KeySym keySym)
-{
-    DMXInputInfo *dmxInput = &dmxInputs[dmxLocal->inputIdx];
-
-#if 1                           /* hack to detect ctrl-alt-q, etc */
-    static int ctrl = 0, alt = 0;
-
-    /* keep track of ctrl/alt key status */
-    if (type == KeyPress && keySym == 0xffe3) {
-        ctrl = 1;
-    }
-    else if (type == KeyRelease && keySym == 0xffe3) {
-        ctrl = 0;
-    }
-    else if (type == KeyPress && keySym == 0xffe9) {
-        alt = 1;
-    }
-    else if (type == KeyRelease && keySym == 0xffe9) {
-        alt = 0;
-    }
-    if (!ctrl || !alt)
-        return 0;
-#else
-    unsigned short state = 0;
-
-    if (dmxLocal->sendsCore)
-        state = dmxLocalCoreKeyboard->pDevice->key->state;
-    else if (dmxLocal->pDevice->key)
-        state = dmxLocal->pDevice->key->state;
-
-    DMXDBG3("dmxCheckFunctionKeys: keySym=0x%04x %s state=0x%04x\n",
-            keySym, type == KeyPress ? "press" : "release", state);
-
-    if ((state & (ControlMask | Mod1Mask)) != (ControlMask | Mod1Mask))
-        return 0;
-#endif
-
-    switch (keySym) {
-    case XK_g:
-        if (type == KeyPress)
-            dmxApplyFunctions(dmxInput, DMX_FUNCTION_GRAB);
-        return 1;
-    case XK_f:
-        if (type == KeyPress)
-            dmxApplyFunctions(dmxInput, DMX_FUNCTION_FINE);
-        return 1;
-    case XK_q:
-        if (type == KeyPress && dmxLocal->sendsCore)
-            if (dmxApplyFunctions(dmxInput, DMX_FUNCTION_TERMINATE)) {
-                dmxLog(dmxInfo, "User request for termination\n");
-                dispatchException |= DE_TERMINATE;
-            }
-        return 1;
-    }
-
-    return 0;
-}
-
-DMXScreenInfo *
-dmxFindFirstScreen(int x, int y)
-{
-    int i;
-
-    for (i = 0; i < dmxNumScreens; i++) {
-        DMXScreenInfo *dmxScreen = &dmxScreens[i];
-
-        if (dmxOnScreen(x, y, dmxScreen))
-            return dmxScreen;
-    }
-    return NULL;
-}
-
-/**
- * Enqueue a motion event.
- */
-static void
-enqueueMotion(DevicePtr pDev, int x, int y)
-{
-    GETDMXLOCALFROMPDEV;
-    DeviceIntPtr p = dmxLocal->pDevice;
-    int valuators[3];
-    int detail = 0;             /* XXX should this be mask of pressed buttons? */
-    ValuatorMask mask;
-
-    valuators[0] = x;
-    valuators[1] = y;
-
-    valuator_mask_set_range(&mask, 0, 2, valuators);
-    QueuePointerEvents(p, MotionNotify, detail,
-                       POINTER_ABSOLUTE | POINTER_SCREEN, &mask);
-    return;
-}
-
-void
-dmxCoreMotion(DevicePtr pDev, int x, int y, int delta, DMXBlockType block)
-{
-    DMXScreenInfo *dmxScreen;
-    DMXInputInfo *dmxInput;
-    ScreenPtr pScreen;
-    int localX;
-    int localY;
-    int i;
-
-    if (!dmxGlobalInvalid && dmxGlobalX == x && dmxGlobalY == y)
-        return;
-
-    DMXDBG5("dmxCoreMotion(%d,%d,%d) dmxGlobalX=%d dmxGlobalY=%d\n",
-            x, y, delta, dmxGlobalX, dmxGlobalY);
-
-    dmxGlobalInvalid = 0;
-    dmxGlobalX = x;
-    dmxGlobalY = y;
-
-    if (dmxGlobalX < 0)
-        dmxGlobalX = 0;
-    if (dmxGlobalY < 0)
-        dmxGlobalY = 0;
-    if (dmxGlobalX >= dmxGlobalWidth)
-        dmxGlobalX = dmxGlobalWidth + delta - 1;
-    if (dmxGlobalY >= dmxGlobalHeight)
-        dmxGlobalY = dmxGlobalHeight + delta - 1;
-
-    if ((dmxScreen = dmxFindFirstScreen(dmxGlobalX, dmxGlobalY))) {
-        localX = dmxGlobalX - dmxScreen->rootXOrigin;
-        localY = dmxGlobalY - dmxScreen->rootYOrigin;
-        if ((pScreen = miPointerGetScreen(inputInfo.pointer))
-            && pScreen->myNum == dmxScreen->index) {
-            /* Screen is old screen */
-            if (block)
-                input_lock();
-            if (pDev)
-                enqueueMotion(pDev, localX, localY);
-            if (block)
-                input_unlock();
-        }
-        else {
-            /* Screen is new */
-            DMXDBG4("   New screen: old=%d new=%d localX=%d localY=%d\n",
-                    pScreen->myNum, dmxScreen->index, localX, localY);
-            if (block)
-                input_lock();
-            mieqProcessInputEvents();
-            miPointerSetScreen(inputInfo.pointer, dmxScreen->index,
-                               localX, localY);
-            if (pDev)
-                enqueueMotion(pDev, localX, localY);
-            if (block)
-                input_unlock();
-        }
-#if 00
-        miPointerGetPosition(inputInfo.pointer, &localX, &localY);
-
-        if ((pScreen = miPointerGetScreen(inputInfo.pointer))) {
-            dmxGlobalX = localX + dmxScreens[pScreen->myNum].rootXOrigin;
-            dmxGlobalY = localY + dmxScreens[pScreen->myNum].rootYOrigin;
-            ErrorF("Global is now %d, %d  %d, %d\n", dmxGlobalX, dmxGlobalY,
-                   localX, localY);
-            DMXDBG6("   Moved to dmxGlobalX=%d dmxGlobalY=%d"
-                    " on screen index=%d/%d localX=%d localY=%d\n",
-                    dmxGlobalX, dmxGlobalY,
-                    dmxScreen ? dmxScreen->index : -1, pScreen->myNum,
-                    localX, localY);
-        }
-#endif
-    }
-    /* Send updates down to all core input
-     * drivers */
-    for (i = 0, dmxInput = &dmxInputs[0]; i < dmxNumInputs; i++, dmxInput++) {
-        int j;
-
-        for (j = 0; j < dmxInput->numDevs; j += dmxInput->devs[j]->binding)
-            if (!dmxInput->detached
-                && dmxInput->devs[j]->sendsCore
-                && dmxInput->devs[j]->update_position)
-                dmxInput->devs[j]->update_position(dmxInput->devs[j]->private,
-                                                   dmxGlobalX, dmxGlobalY);
-    }
-    if (!dmxScreen)
-        ProcessInputEvents();
-}
-
-#define DMX_MAX_AXES 32         /* Max axes reported by this routine */
-static void
-dmxExtMotion(DMXLocalInputInfoPtr dmxLocal,
-             int *v, int firstAxis, int axesCount,
-             DMXMotionType type, DMXBlockType block)
-{
-    DeviceIntPtr pDevice = dmxLocal->pDevice;
-    xEvent xE[2 * DMX_MAX_AXES / 6];
-    deviceKeyButtonPointer *xev = (deviceKeyButtonPointer *) xE;
-    deviceValuator *xv = (deviceValuator *) xev + 1;
-    int thisX = 0;
-    int thisY = 0;
-    int count;
-    ValuatorMask mask;
-
-    memset(xE, 0, sizeof(xE));
-
-    if (axesCount > DMX_MAX_AXES)
-        axesCount = DMX_MAX_AXES;
-
-    if ((valuator_get_mode(pDevice, 0) == Relative) && axesCount == 2) {
-        /* The dmx console is a relative mode
-         * device that sometimes reports
-         * absolute motion.  It only has two
-         * axes. */
-        if (type == DMX_RELATIVE) {
-            thisX = -v[0];
-            thisY = -v[1];
-            dmxLocal->lastX += thisX;
-            dmxLocal->lastY += thisY;
-            if (dmxLocal->update_position)
-                dmxLocal->update_position(dmxLocal->private,
-                                          dmxLocal->lastX, dmxLocal->lastY);
-        }
-        else {                  /* Convert to relative */
-            if (dmxLocal->lastX || dmxLocal->lastY) {
-                thisX = v[0] - dmxLocal->lastX;
-                thisY = v[1] - dmxLocal->lastY;
-            }
-            dmxLocal->lastX = v[0];
-            dmxLocal->lastY = v[1];
-        }
-        v[0] = thisX;
-        v[1] = thisY;
-    }
-
-    if (axesCount <= 6) {
-        /* Optimize for the common case when
-         * only 1 or 2 axes change. */
-        xev->time = GetTimeInMillis();
-        xev->type = DeviceMotionNotify;
-        xev->detail = 0;
-        xev->deviceid = pDevice->id | MORE_EVENTS;
-
-        xv->type = DeviceValuator;
-        xv->deviceid = pDevice->id;
-        xv->num_valuators = axesCount;
-        xv->first_valuator = firstAxis;
-        switch (xv->num_valuators) {
-        case 6:
-            xv->valuator5 = v[5];
-        case 5:
-            xv->valuator4 = v[4];
-        case 4:
-            xv->valuator3 = v[3];
-        case 3:
-            xv->valuator2 = v[2];
-        case 2:
-            xv->valuator1 = v[1];
-        case 1:
-            xv->valuator0 = v[0];
-        }
-        count = 2;
-    }
-    else {
-        int i;
-
-        for (i = 0, count = 0; i < axesCount; i += 6) {
-            xev->time = GetTimeInMillis();
-            xev->type = DeviceMotionNotify;
-            xev->detail = 0;
-            xev->deviceid = pDevice->id | MORE_EVENTS;
-            xev += 2;
-
-            xv->type = DeviceValuator;
-            xv->deviceid = pDevice->id;
-            xv->num_valuators = (i + 6 >= axesCount ? axesCount - i : 6);
-            xv->first_valuator = firstAxis + i;
-            switch (xv->num_valuators) {
-            case 6:
-                xv->valuator5 = v[i + 5];
-            case 5:
-                xv->valuator4 = v[i + 4];
-            case 4:
-                xv->valuator3 = v[i + 3];
-            case 3:
-                xv->valuator2 = v[i + 2];
-            case 2:
-                xv->valuator1 = v[i + 1];
-            case 1:
-                xv->valuator0 = v[i + 0];
-            }
-            xv += 2;
-            count += 2;
-        }
-    }
-
-    if (block)
-        input_lock();
-    valuator_mask_set_range(&mask, firstAxis, axesCount, v);
-    QueuePointerEvents(pDevice, MotionNotify, 0, POINTER_ABSOLUTE, &mask);
-
-    if (block)
-        input_unlock();
-}
-
-static int
-dmxTranslateAndEnqueueExtEvent(DMXLocalInputInfoPtr dmxLocal,
-                               XEvent * e, DMXBlockType block)
-{
-    int type;
-    int event = -1;
-    XDeviceKeyEvent *ke = (XDeviceKeyEvent *) e;
-    XDeviceMotionEvent *me = (XDeviceMotionEvent *) e;
-    DeviceIntPtr pDevice = dmxLocal->pDevice;
-    int valuators[MAX_VALUATORS];
-    ValuatorMask mask;
-
-    if (!e)
-        return -1;              /* No extended event passed, cannot handle */
-
-    if ((XID) dmxLocal->deviceId != ke->deviceid) {
-        /* Search for the correct dmxLocal,
-         * since backend and console events are
-         * picked up for the first device on
-         * that X server. */
-        int i;
-        DMXInputInfo *dmxInput = &dmxInputs[dmxLocal->inputIdx];
-
-        for (i = 0; i < dmxInput->numDevs; i++) {
-            dmxLocal = dmxInput->devs[i];
-            if ((XID) dmxLocal->deviceId == ke->deviceid)
-                break;
-        }
-    }
-
-    if ((XID) dmxLocal->deviceId != ke->deviceid
-        || (type = dmxMapLookup(dmxLocal, e->type)) < 0)
-        return -1;              /* No mapping, so this event is unhandled */
-
-    switch (type) {
-    case XI_DeviceValuator:
-        event = DeviceValuator;
-        break;
-    case XI_DeviceKeyPress:
-        event = KeyPress;
-        break;
-    case XI_DeviceKeyRelease:
-        event = KeyRelease;
-        break;
-    case XI_DeviceButtonPress:
-        event = ButtonPress;
-        break;
-    case XI_DeviceButtonRelease:
-        event = ButtonRelease;
-        break;
-    case XI_DeviceMotionNotify:
-        event = MotionNotify;
-        break;
-    case XI_DeviceFocusIn:
-        event = DeviceFocusIn;
-        break;
-    case XI_DeviceFocusOut:
-        event = DeviceFocusOut;
-        break;
-    case XI_ProximityIn:
-        event = ProximityIn;
-        break;
-    case XI_ProximityOut:
-        event = ProximityOut;
-        break;
-    case XI_DeviceStateNotify:
-        event = DeviceStateNotify;
-        break;
-    case XI_DeviceMappingNotify:
-        event = DeviceMappingNotify;
-        break;
-    case XI_ChangeDeviceNotify:
-        event = ChangeDeviceNotify;
-        break;
-    case XI_DeviceKeystateNotify:
-        event = DeviceStateNotify;
-        break;
-    case XI_DeviceButtonstateNotify:
-        event = DeviceStateNotify;
-        break;
-    }
-
-#define EXTRACT_VALUATORS(ke, valuators) \
-        valuators[0] = ke->axis_data[0]; \
-        valuators[1] = ke->axis_data[1]; \
-        valuators[2] = ke->axis_data[2]; \
-        valuators[3] = ke->axis_data[3]; \
-        valuators[4] = ke->axis_data[4]; \
-        valuators[5] = ke->axis_data[5]; \
-
-    switch (type) {
-    case XI_DeviceKeyPress:
-    case XI_DeviceKeyRelease:
-        if (block)
-            input_lock();
-        QueueKeyboardEvents(pDevice, event, ke->keycode);
-        if (block)
-            input_unlock();
-        break;
-    case XI_DeviceButtonPress:
-    case XI_DeviceButtonRelease:
-        EXTRACT_VALUATORS(ke, valuators);
-        valuator_mask_set_range(&mask, ke->first_axis, ke->axes_count,
-                                valuators);
-        if (block)
-            input_lock();
-        QueuePointerEvents(pDevice, event, ke->keycode,
-                           POINTER_ABSOLUTE, &mask);
-        if (block)
-            input_unlock();
-        break;
-    case XI_ProximityIn:
-    case XI_ProximityOut:
-        EXTRACT_VALUATORS(ke, valuators);
-        valuator_mask_set_range(&mask, ke->first_axis, ke->axes_count,
-                                valuators);
-        if (block)
-            input_lock();
-        QueueProximityEvents(pDevice, event, &mask);
-        if (block)
-            input_unlock();
-        break;
-
-        break;
-
-    case XI_DeviceMotionNotify:
-        dmxExtMotion(dmxLocal, me->axis_data, me->first_axis, me->axes_count,
-                     DMX_ABSOLUTE, block);
-        break;
-    case XI_DeviceFocusIn:
-    case XI_DeviceFocusOut:
-    case XI_DeviceStateNotify:
-    case XI_DeviceMappingNotify:
-    case XI_ChangeDeviceNotify:
-    case XI_DeviceKeystateNotify:
-    case XI_DeviceButtonstateNotify:
-        /* These are ignored, since DMX will
-         * generate its own events of these
-         * types, as necessary.
-
-         * Perhaps ChangeDeviceNotify should
-         * generate an error, because it is
-         * unexpected? */
-        break;
-    case XI_DeviceValuator:
-    default:
-        dmxLog(dmxWarning,
-               "XInput extension event (remote=%d -> zero-based=%d)"
-               " not supported yet\n", e->type, type);
-        return -1;
-    }
-    return 0;
-}
-
-static int
-dmxGetButtonMapping(DMXLocalInputInfoPtr dmxLocal, int button)
-{
-    ButtonClassPtr b = dmxLocal->pDevice->button;
-
-    if (button > b->numButtons) {       /* This shouldn't happen. */
-        dmxLog(dmxWarning, "Button %d pressed, but only %d buttons?!?\n",
-               button, b->numButtons);
-        return button;
-    }
-    return b->map[button];
-}
-
-/** Return DMX's notion of the pointer position in the global coordinate
- * space. */
-void
-dmxGetGlobalPosition(int *x, int *y)
-{
-    *x = dmxGlobalX;
-    *y = dmxGlobalY;
-}
-
-/** Invalidate the global position for #dmxCoreMotion. */
-void
-dmxInvalidateGlobalPosition(void)
-{
-    dmxGlobalInvalid = 1;
-}
-
-/** Enqueue a motion event for \a pDev.  The \a v vector has length \a
- * axesCount, and contains values for each of the axes, starting at \a
- * firstAxes.
- *
- * The \a type of the motion may be \a DMX_RELATIVE, \a DMX_ABSOLUTE, or
- * \a DMX_ABSOLUTE_CONFINED (in the latter case, the pointer will not be
- * allowed to move outside the global boundaires).
- *
- * If \a block is set to \a DMX_BLOCK, then the input thread will be
- * blocked around calls to \a enqueueMotion(). */
-void
-dmxMotion(DevicePtr pDev, int *v, int firstAxes, int axesCount,
-          DMXMotionType type, DMXBlockType block)
-{
-    GETDMXLOCALFROMPDEV;
-
-    if (!dmxLocal->sendsCore) {
-        dmxExtMotion(dmxLocal, v, firstAxes, axesCount, type, block);
-        return;
-    }
-    if (axesCount == 2) {
-        switch (type) {
-        case DMX_RELATIVE:
-            dmxCoreMotion(pDev, dmxGlobalX - v[0], dmxGlobalY - v[1], 0, block);
-            break;
-        case DMX_ABSOLUTE:
-            dmxCoreMotion(pDev, v[0], v[1], 0, block);
-            break;
-        case DMX_ABSOLUTE_CONFINED:
-            dmxCoreMotion(pDev, v[0], v[1], -1, block);
-            break;
-        }
-    }
-}
-
-static KeySym
-dmxKeyCodeToKeySym(DMXLocalInputInfoPtr dmxLocal, KeyCode keyCode)
-{
-    KeySym keysym = NoSymbol;
-    int effectiveGroup;
-    XkbSrvInfoPtr xkbi;
-
-    if (!dmxLocal || !dmxLocal->pDevice || !dmxLocal->pDevice->key)
-        goto out;
-
-    xkbi = dmxLocal->pDevice->key->xkbInfo;
-    effectiveGroup = XkbGetEffectiveGroup(xkbi, &xkbi->state, keyCode);
-
-    if (effectiveGroup == -1)
-        goto out;
-
-    keysym = XkbKeySym(xkbi->desc, keyCode, effectiveGroup);
-    DMXDBG2("dmxKeyCodeToKeySym: Translated keyCode=%d to keySym=0x%04x\n",
-            keyCode, keysym);
-
- out:
-    return keysym;
-}
-
-static KeyCode
-dmxKeySymToKeyCode(DMXLocalInputInfoPtr dmxLocal, KeySym keySym, int tryFirst)
-{
-    /* FIXME: this is quite ineffective, converting to a core map first and
-     * then extracting the info from there. It'd be better to run the actual
-     * xkb map */
-    XkbSrvInfoPtr xkbi = dmxLocal->pDevice->key->xkbInfo;
-    KeySymsPtr pKeySyms = XkbGetCoreMap(dmxLocal->pDevice);
-    int i;
-
-    /* Optimize for similar maps */
-    if (XkbKeycodeInRange(xkbi->desc, tryFirst)
-        && pKeySyms->map[(tryFirst - xkbi->desc->min_key_code)
-                         * pKeySyms->mapWidth] == keySym)
-        return tryFirst;
-
-    for (i = pKeySyms->minKeyCode; i <= pKeySyms->maxKeyCode; i++) {
-        if (pKeySyms->map[(i - pKeySyms->minKeyCode)
-                          * pKeySyms->mapWidth] == keySym) {
-            DMXDBG3("dmxKeySymToKeyCode: Translated keySym=0x%04x to"
-                    " keyCode=%d (reverses to core keySym=0x%04x)\n",
-                    keySym, i, dmxKeyCodeToKeySym(dmxLocalCoreKeyboard, i));
-            return i;
-        }
-    }
-    return 0;
-}
-
-static int
-dmxFixup(DevicePtr pDev, int detail, KeySym keySym)
-{
-    GETDMXLOCALFROMPDEV;
-    int keyCode;
-
-    if (!dmxLocal->pDevice->key) {
-        dmxLog(dmxWarning, "dmxFixup: not a keyboard device (%s)\n",
-               dmxLocal->pDevice->name);
-        return NoSymbol;
-    }
-    if (!keySym)
-        keySym = dmxKeyCodeToKeySym(dmxLocal, detail);
-    if (keySym == NoSymbol)
-        return detail;
-    keyCode = dmxKeySymToKeyCode(dmxLocalCoreKeyboard, keySym, detail);
-
-    return keyCode ? keyCode : detail;
-}
-
-/** Enqueue an event from the \a pDev device with the
- * specified \a type and \a detail.  If the event is a KeyPress or
- * KeyRelease event, then the \a keySym is also specified.
- *
- * FIXME: make the code do what the comment says, or remove this comment.
- * If \a block is set to \a DMX_BLOCK, then the input thread will be
- * blocked around calls to dmxeqEnqueue(). */
-
-void
-dmxEnqueue(DevicePtr pDev, int type, int detail, KeySym keySym,
-           XEvent * e, DMXBlockType block)
-{
-    GETDMXINPUTFROMPDEV;
-    DeviceIntPtr p = dmxLocal->pDevice;
-    int valuators[3];
-    ValuatorMask mask;
-
-    DMXDBG2("dmxEnqueue: Enqueuing type=%d detail=0x%0x\n", type, detail);
-
-    switch (type) {
-    case KeyPress:
-    case KeyRelease:
-        if (!keySym)
-            keySym = dmxKeyCodeToKeySym(dmxLocal, detail);
-        if (dmxCheckFunctionKeys(dmxLocal, type, keySym))
-            return;
-        if (dmxLocal->sendsCore && dmxLocal != dmxLocalCoreKeyboard)
-            detail = dmxFixup(pDev, detail, keySym);
-
-        /*ErrorF("KEY %d  sym %d\n", detail, (int) keySym); */
-        QueueKeyboardEvents(p, type, detail);
-        return;
-
-    case ButtonPress:
-    case ButtonRelease:
-        detail = dmxGetButtonMapping(dmxLocal, detail);
-        valuator_mask_zero(&mask);
-        QueuePointerEvents(p, type, detail, 0, &mask);
-        return;
-
-    case MotionNotify:
-        valuators[0] = e->xmotion.x;
-        valuators[1] = e->xmotion.y;
-        valuators[2] = e->xmotion.state;        /* FIXME: WTF?? */
-        valuator_mask_set_range(&mask, 0, 3, valuators);
-        QueuePointerEvents(p, type, detail,
-                           POINTER_ABSOLUTE | POINTER_SCREEN, &mask);
-        return;
-
-    case EnterNotify:
-    case LeaveNotify:
-    case KeymapNotify:
-    case MappingNotify:        /* This is sent because we change the
-                                 * modifier map on the backend/console
-                                 * input device so that we have complete
-                                 * control of the input device LEDs. */
-        return;
-    default:
-        if (type == ProximityIn || type == ProximityOut) {
-            if (dmxLocal->sendsCore)
-                return;         /* Not a core event */
-            break;
-        }
-        if (type >= LASTEvent) {
-            if (dmxTranslateAndEnqueueExtEvent(dmxLocal, e, block))
-                dmxLogInput(dmxInput, "Unhandled extension event: %d\n", type);
-        }
-        else {
-            dmxLogInput(dmxInput, "Unhandled event: %d (%s)\n",
-                        type, dmxEventName(type));
-        }
-        return;
-    }
-
-}
-
-/** A pointer to this routine is passed to low-level input drivers so
- * that all special keychecking is unified to this file.  This function
- * returns 0 if no special keys have been pressed.  If the user has
- * requested termination of the DMX server, -1 is returned.  If the user
- * has requested a switch to a VT, then the (1-based) number of that VT
- * is returned. */
-int
-dmxCheckSpecialKeys(DevicePtr pDev, KeySym keySym)
-{
-    GETDMXINPUTFROMPDEV;
-    int vt = 0;
-    unsigned short state = 0;
-
-    if (dmxLocal->sendsCore)
-        state =
-            XkbStateFieldFromRec(&dmxLocalCoreKeyboard->pDevice->key->xkbInfo->
-                                 state);
-    else if (dmxLocal->pDevice->key)
-        state = XkbStateFieldFromRec(&dmxLocal->pDevice->key->xkbInfo->state);
-
-    if (!dmxLocal->sendsCore)
-        return 0;               /* Only for core devices */
-
-    DMXDBG2("dmxCheckSpecialKeys: keySym=0x%04x state=0x%04x\n", keySym, state);
-
-    if ((state & (ControlMask | Mod1Mask)) != (ControlMask | Mod1Mask))
-        return 0;
-
-    switch (keySym) {
-    case XK_F1:
-    case XK_F2:
-    case XK_F3:
-    case XK_F4:
-    case XK_F5:
-    case XK_F6:
-    case XK_F7:
-    case XK_F8:
-    case XK_F9:
-    case XK_F10:
-        vt = keySym - XK_F1 + 1;
-        break;
-
-    case XK_F11:
-    case XK_F12:
-        vt = keySym - XK_F11 + 11;
-        break;
-
-    case XK_q:                 /* To avoid confusion  */
-    case XK_BackSpace:
-    case XK_Delete:
-    case XK_KP_Delete:
-        dmxLog(dmxInfo, "User request for termination\n");
-        dispatchException |= DE_TERMINATE;
-        return -1;              /* Terminate */
-    }
-
-    if (vt) {
-        dmxLog(dmxInfo, "Request to switch to VT %d\n", vt);
-        dmxInput->vt_switch_pending = vt;
-        return vt;
-    }
-
-    return 0;                   /* Do nothing */
-}
diff --git a/hw/dmx/input/dmxevents.h b/hw/dmx/input/dmxevents.h
deleted file mode 100644
index 4877cf4..0000000
--- a/hw/dmx/input/dmxevents.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright 2001 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-/** \file
- * Interface to event processing functions.  \see dmxevents.h */
-
-#ifndef _DMXEVENTS_H_
-#define _DMXEVENTS_H_
-
-extern void dmxMotion(DevicePtr pDev, int *v, int firstAxis, int axesCount,
-                      DMXMotionType type, DMXBlockType block);
-extern void dmxEnqueue(DevicePtr pDev, int type, int detail, KeySym keySym,
-                       XEvent * e, DMXBlockType block);
-extern int dmxCheckSpecialKeys(DevicePtr pDev, KeySym keySym);
-extern void dmxInvalidateGlobalPosition(void);
-#endif
diff --git a/hw/dmx/input/dmxinputinit.c b/hw/dmx/input/dmxinputinit.c
deleted file mode 100644
index 04e4f3d..0000000
--- a/hw/dmx/input/dmxinputinit.c
+++ /dev/null
@@ -1,1350 +0,0 @@
-/*
- * Copyright 2002-2003 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-/** \file
- * This file provides generic input support.  Functions here set up
- * input and lead to the calling of low-level device drivers for
- * input. */
-
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#define DMX_WINDOW_DEBUG 0
-
-#include "dmxinputinit.h"
-#include "dmxextension.h"       /* For dmxInputCount */
-
-#include "dmxdummy.h"
-#include "dmxbackend.h"
-#include "dmxconsole.h"
-#include "dmxcommon.h"
-#include "dmxevents.h"
-#include "dmxmotion.h"
-#include "dmxprop.h"
-#include "config/dmxconfig.h"
-#include "dmxcursor.h"
-
-#include "usb-keyboard.h"
-#include "usb-mouse.h"
-#include "usb-other.h"
-#include "usb-common.h"
-
-#include "dmxarg.h"
-
-#include "inputstr.h"
-#include "input.h"
-#include "mipointer.h"
-#include "windowstr.h"
-#include "mi.h"
-#include "xkbsrv.h"
-
-#include <X11/extensions/XI.h>
-#include <X11/extensions/XIproto.h>
-#include "exevents.h"
-#include "extinit.h"
-
-DMXLocalInputInfoPtr dmxLocalCorePointer, dmxLocalCoreKeyboard;
-
-static DMXLocalInputInfoRec DMXDummyMou = {
-    "dummy-mou", DMX_LOCAL_MOUSE, DMX_LOCAL_TYPE_LOCAL, 1,
-    NULL, NULL, NULL, NULL, NULL, dmxDummyMouGetInfo
-};
-
-static DMXLocalInputInfoRec DMXDummyKbd = {
-    "dummy-kbd", DMX_LOCAL_KEYBOARD, DMX_LOCAL_TYPE_LOCAL, 1,
-    NULL, NULL, NULL, NULL, NULL, dmxDummyKbdGetInfo
-};
-
-static DMXLocalInputInfoRec DMXBackendMou = {
-    "backend-mou", DMX_LOCAL_MOUSE, DMX_LOCAL_TYPE_BACKEND, 2,
-    dmxBackendCreatePrivate, dmxBackendDestroyPrivate,
-    dmxBackendInit, NULL, dmxBackendLateReInit, dmxBackendMouGetInfo,
-    dmxCommonMouOn, dmxCommonMouOff, dmxBackendUpdatePosition,
-    NULL, NULL, NULL,
-    dmxBackendCollectEvents, dmxBackendProcessInput, dmxBackendFunctions, NULL,
-    dmxCommonMouCtrl
-};
-
-static DMXLocalInputInfoRec DMXBackendKbd = {
-    "backend-kbd", DMX_LOCAL_KEYBOARD, DMX_LOCAL_TYPE_BACKEND,
-    1,                          /* With backend-mou or console-mou */
-    dmxCommonCopyPrivate, NULL,
-    dmxBackendInit, NULL, NULL, dmxBackendKbdGetInfo,
-    dmxCommonKbdOn, dmxCommonKbdOff, NULL,
-    NULL, NULL, NULL,
-    NULL, NULL, NULL, NULL,
-    NULL, dmxCommonKbdCtrl, dmxCommonKbdBell
-};
-
-static DMXLocalInputInfoRec DMXConsoleMou = {
-    "console-mou", DMX_LOCAL_MOUSE, DMX_LOCAL_TYPE_CONSOLE, 2,
-    dmxConsoleCreatePrivate, dmxConsoleDestroyPrivate,
-    dmxConsoleInit, dmxConsoleReInit, NULL, dmxConsoleMouGetInfo,
-    dmxCommonMouOn, dmxCommonMouOff, dmxConsoleUpdatePosition,
-    NULL, NULL, NULL,
-    dmxConsoleCollectEvents, NULL, dmxConsoleFunctions, dmxConsoleUpdateInfo,
-    dmxCommonMouCtrl
-};
-
-static DMXLocalInputInfoRec DMXConsoleKbd = {
-    "console-kbd", DMX_LOCAL_KEYBOARD, DMX_LOCAL_TYPE_CONSOLE,
-    1,                          /* With backend-mou or console-mou */
-    dmxCommonCopyPrivate, NULL,
-    dmxConsoleInit, dmxConsoleReInit, NULL, dmxConsoleKbdGetInfo,
-    dmxCommonKbdOn, dmxCommonKbdOff, NULL,
-    NULL, NULL, NULL,
-    NULL, NULL, NULL, NULL,
-    NULL, dmxCommonKbdCtrl, dmxCommonKbdBell
-};
-
-static DMXLocalInputInfoRec DMXLocalDevices[] = {
-    /* Dummy drivers that can compile on any OS */
-#ifdef __linux__
-    /* USB drivers, currently only for
-       Linux, but relatively easy to port to
-       other OSs */
-    {
-     "usb-kbd", DMX_LOCAL_KEYBOARD, DMX_LOCAL_TYPE_LOCAL, 1,
-     usbCreatePrivate, usbDestroyPrivate,
-     kbdUSBInit, NULL, NULL, kbdUSBGetInfo,
-     kbdUSBOn, usbOff, NULL,
-     NULL, NULL, NULL,
-     kbdUSBRead, NULL, NULL, NULL,
-     NULL, kbdUSBCtrl},
-    {
-     "usb-mou", DMX_LOCAL_MOUSE, DMX_LOCAL_TYPE_LOCAL, 1,
-     usbCreatePrivate, usbDestroyPrivate,
-     mouUSBInit, NULL, NULL, mouUSBGetInfo,
-     mouUSBOn, usbOff, NULL,
-     NULL, NULL, NULL,
-     mouUSBRead},
-    {
-     "usb-oth", DMX_LOCAL_OTHER, DMX_LOCAL_TYPE_LOCAL, 1,
-     usbCreatePrivate, usbDestroyPrivate,
-     othUSBInit, NULL, NULL, othUSBGetInfo,
-     othUSBOn, usbOff, NULL,
-     NULL, NULL, NULL,
-     othUSBRead},
-#endif
-    {
-     "dummy-mou", DMX_LOCAL_MOUSE, DMX_LOCAL_TYPE_LOCAL, 1,
-     NULL, NULL, NULL, NULL, NULL, dmxDummyMouGetInfo},
-    {
-     "dummy-kbd", DMX_LOCAL_KEYBOARD, DMX_LOCAL_TYPE_LOCAL, 1,
-     NULL, NULL, NULL, NULL, NULL, dmxDummyKbdGetInfo},
-    {NULL}                      /* Must be last */
-};
-
-#if 11 /*BP*/
-    void
-DDXRingBell(int volume, int pitch, int duration)
-{
-    /* NO-OP */
-}
-
-/* taken from kdrive/src/kinput.c: */
-static void
-dmxKbdCtrl(DeviceIntPtr pDevice, KeybdCtrl * ctrl)
-{
-#if 0
-    KdKeyboardInfo *ki;
-
-    for (ki = kdKeyboards; ki; ki = ki->next) {
-        if (ki->dixdev && ki->dixdev->id == pDevice->id)
-            break;
-    }
-
-    if (!ki || !ki->dixdev || ki->dixdev->id != pDevice->id || !ki->driver)
-        return;
-
-    KdSetLeds(ki, ctrl->leds);
-    ki->bellPitch = ctrl->bell_pitch;
-    ki->bellDuration = ctrl->bell_duration;
-#endif
-}
-
-/* taken from kdrive/src/kinput.c: */
-static void
-dmxBell(int volume, DeviceIntPtr pDev, void *arg, int something)
-{
-#if 0
-    KeybdCtrl *ctrl = arg;
-    KdKeyboardInfo *ki = NULL;
-
-    for (ki = kdKeyboards; ki; ki = ki->next) {
-        if (ki->dixdev && ki->dixdev->id == pDev->id)
-            break;
-    }
-
-    if (!ki || !ki->dixdev || ki->dixdev->id != pDev->id || !ki->driver)
-        return;
-
-    KdRingBell(ki, volume, ctrl->bell_pitch, ctrl->bell_duration);
-#endif
-}
-
-#endif /*BP*/
-    static void
-_dmxChangePointerControl(DMXLocalInputInfoPtr dmxLocal, PtrCtrl * ctrl)
-{
-    if (!dmxLocal)
-        return;
-    dmxLocal->mctrl = *ctrl;
-    if (dmxLocal->mCtrl)
-        dmxLocal->mCtrl(&dmxLocal->pDevice->public, ctrl);
-}
-
-/** Change the pointer control information for the \a pDevice.  If the
- * device sends core events, then also change the control information
- * for all of the pointer devices that send core events. */
-void
-dmxChangePointerControl(DeviceIntPtr pDevice, PtrCtrl * ctrl)
-{
-    GETDMXLOCALFROMPDEVICE;
-    int i, j;
-
-    if (dmxLocal->sendsCore) {  /* Do for all core devices */
-        for (i = 0; i < dmxNumInputs; i++) {
-            DMXInputInfo *dmxInput = &dmxInputs[i];
-
-            if (dmxInput->detached)
-                continue;
-            for (j = 0; j < dmxInput->numDevs; j++)
-                if (dmxInput->devs[j]->sendsCore)
-                    _dmxChangePointerControl(dmxInput->devs[j], ctrl);
-        }
-    }
-    else {                      /* Do for this device only */
-        _dmxChangePointerControl(dmxLocal, ctrl);
-    }
-}
-
-static void
-_dmxKeyboardKbdCtrlProc(DMXLocalInputInfoPtr dmxLocal, KeybdCtrl * ctrl)
-{
-    dmxLocal->kctrl = *ctrl;
-    if (dmxLocal->kCtrl) {
-        dmxLocal->kCtrl(&dmxLocal->pDevice->public, ctrl);
-        if (dmxLocal->pDevice->kbdfeed) {
-            XkbEventCauseRec cause;
-
-            XkbSetCauseUnknown(&cause);
-            /* Generate XKB events, as necessary */
-            XkbUpdateIndicators(dmxLocal->pDevice, XkbAllIndicatorsMask, False,
-                                NULL, &cause);
-        }
-    }
-}
-
-/** Change the keyboard control information for the \a pDevice.  If the
- * device sends core events, then also change the control information
- * for all of the keyboard devices that send core events. */
-void
-dmxKeyboardKbdCtrlProc(DeviceIntPtr pDevice, KeybdCtrl * ctrl)
-{
-    GETDMXLOCALFROMPDEVICE;
-    int i, j;
-
-    if (dmxLocal->sendsCore) {  /* Do for all core devices */
-        for (i = 0; i < dmxNumInputs; i++) {
-            DMXInputInfo *dmxInput = &dmxInputs[i];
-
-            if (dmxInput->detached)
-                continue;
-            for (j = 0; j < dmxInput->numDevs; j++)
-                if (dmxInput->devs[j]->sendsCore)
-                    _dmxKeyboardKbdCtrlProc(dmxInput->devs[j], ctrl);
-        }
-    }
-    else {                      /* Do for this device only */
-        _dmxKeyboardKbdCtrlProc(dmxLocal, ctrl);
-    }
-}
-
-static void
-_dmxKeyboardBellProc(DMXLocalInputInfoPtr dmxLocal, int percent)
-{
-    if (dmxLocal->kBell)
-        dmxLocal->kBell(&dmxLocal->pDevice->public,
-                        percent,
-                        dmxLocal->kctrl.bell,
-                        dmxLocal->kctrl.bell_pitch,
-                        dmxLocal->kctrl.bell_duration);
-}
-
-/** Sound the bell on the device.  If the device send core events, then
- * sound the bell on all of the devices that send core events. */
-void
-dmxKeyboardBellProc(int percent, DeviceIntPtr pDevice,
-                    void *ctrl, int unknown)
-{
-    GETDMXLOCALFROMPDEVICE;
-    int i, j;
-
-    if (dmxLocal->sendsCore) {  /* Do for all core devices */
-        for (i = 0; i < dmxNumInputs; i++) {
-            DMXInputInfo *dmxInput = &dmxInputs[i];
-
-            if (dmxInput->detached)
-                continue;
-            for (j = 0; j < dmxInput->numDevs; j++)
-                if (dmxInput->devs[j]->sendsCore)
-                    _dmxKeyboardBellProc(dmxInput->devs[j], percent);
-        }
-    }
-    else {                      /* Do for this device only */
-        _dmxKeyboardBellProc(dmxLocal, percent);
-    }
-}
-
-static void
-dmxKeyboardFreeNames(XkbComponentNamesPtr names)
-{
-    if (names->keycodes)
-        XFree(names->keycodes);
-    if (names->types)
-        XFree(names->types);
-    if (names->compat)
-        XFree(names->compat);
-    if (names->symbols)
-        XFree(names->symbols);
-    if (names->geometry)
-        XFree(names->geometry);
-}
-
-static int
-dmxKeyboardOn(DeviceIntPtr pDevice, DMXLocalInitInfo * info)
-{
-    GETDMXINPUTFROMPDEVICE;
-    XkbRMLVOSet rmlvo;
-
-    rmlvo.rules = dmxConfigGetXkbRules();
-    rmlvo.model = dmxConfigGetXkbModel();
-    rmlvo.layout = dmxConfigGetXkbLayout();
-    rmlvo.variant = dmxConfigGetXkbVariant();
-    rmlvo.options = dmxConfigGetXkbOptions();
-
-    XkbSetRulesDflts(&rmlvo);
-    if (!info->force && (dmxInput->keycodes
-                         || dmxInput->symbols || dmxInput->geometry)) {
-        if (info->freenames)
-            dmxKeyboardFreeNames(&info->names);
-        info->freenames = 0;
-        info->names.keycodes = dmxInput->keycodes;
-        info->names.types = NULL;
-        info->names.compat = NULL;
-        info->names.symbols = dmxInput->symbols;
-        info->names.geometry = dmxInput->geometry;
-
-        dmxLogInput(dmxInput, "XKEYBOARD: From command line: %s",
-                    info->names.keycodes);
-        if (info->names.symbols && *info->names.symbols)
-            dmxLogInputCont(dmxInput, " %s", info->names.symbols);
-        if (info->names.geometry && *info->names.geometry)
-            dmxLogInputCont(dmxInput, " %s", info->names.geometry);
-        dmxLogInputCont(dmxInput, "\n");
-    }
-    else if (info->names.keycodes) {
-        dmxLogInput(dmxInput, "XKEYBOARD: From device: %s",
-                    info->names.keycodes);
-        if (info->names.symbols && *info->names.symbols)
-            dmxLogInputCont(dmxInput, " %s", info->names.symbols);
-        if (info->names.geometry && *info->names.geometry)
-            dmxLogInputCont(dmxInput, " %s", info->names.geometry);
-        dmxLogInputCont(dmxInput, "\n");
-    }
-    else {
-        dmxLogInput(dmxInput, "XKEYBOARD: Defaults: %s %s %s %s %s\n",
-                    dmxConfigGetXkbRules(),
-                    dmxConfigGetXkbLayout(),
-                    dmxConfigGetXkbModel(), dmxConfigGetXkbVariant()
-                    ? dmxConfigGetXkbVariant() : "", dmxConfigGetXkbOptions()
-                    ? dmxConfigGetXkbOptions() : "");
-    }
-    InitKeyboardDeviceStruct(pDevice, &rmlvo,
-                             dmxKeyboardBellProc, dmxKeyboardKbdCtrlProc);
-
-    if (info->freenames)
-        dmxKeyboardFreeNames(&info->names);
-
-    return Success;
-}
-
-static int
-dmxDeviceOnOff(DeviceIntPtr pDevice, int what)
-{
-    GETDMXINPUTFROMPDEVICE;
-    DMXLocalInitInfo info;
-    int i;
-    Atom btn_labels[MAX_BUTTONS] = { 0 };       /* FIXME */
-    Atom axis_labels[MAX_VALUATORS] = { 0 };    /* FIXME */
-
-    if (dmxInput->detached)
-        return Success;
-
-    memset(&info, 0, sizeof(info));
-    switch (what) {
-    case DEVICE_INIT:
-        if (dmxLocal->init)
-            dmxLocal->init(pDev);
-        if (dmxLocal->get_info)
-            dmxLocal->get_info(pDev, &info);
-        if (info.keyboard) {    /* XKEYBOARD makes this a special case */
-            dmxKeyboardOn(pDevice, &info);
-            break;
-        }
-        if (info.keyClass) {
-            XkbRMLVOSet rmlvo;
-
-            rmlvo.rules = dmxConfigGetXkbRules();
-            rmlvo.model = dmxConfigGetXkbModel();
-            rmlvo.layout = dmxConfigGetXkbLayout();
-            rmlvo.variant = dmxConfigGetXkbVariant();
-            rmlvo.options = dmxConfigGetXkbOptions();
-
-            InitKeyboardDeviceStruct(pDevice, &rmlvo, dmxBell, dmxKbdCtrl);
-        }
-        if (info.buttonClass) {
-            InitButtonClassDeviceStruct(pDevice, info.numButtons,
-                                        btn_labels, info.map);
-        }
-        if (info.valuatorClass) {
-            if (info.numRelAxes && dmxLocal->sendsCore) {
-                InitValuatorClassDeviceStruct(pDevice, info.numRelAxes,
-                                              axis_labels,
-                                              GetMaximumEventsNum(), Relative);
-                for (i = 0; i < info.numRelAxes; i++)
-                    InitValuatorAxisStruct(pDevice, i, axis_labels[i],
-                                           info.minval[i], info.maxval[i],
-                                           info.res[i],
-                                           info.minres[i], info.maxres[i],
-                                           Relative);
-            }
-            else if (info.numRelAxes) {
-                InitValuatorClassDeviceStruct(pDevice, info.numRelAxes,
-                                              axis_labels,
-                                              dmxPointerGetMotionBufferSize(),
-                                              Relative);
-                for (i = 0; i < info.numRelAxes; i++)
-                    InitValuatorAxisStruct(pDevice, i, axis_labels[i],
-                                           info.minval[i],
-                                           info.maxval[i], info.res[i],
-                                           info.minres[i], info.maxres[i],
-                                           Relative);
-            }
-            else if (info.numAbsAxes) {
-                InitValuatorClassDeviceStruct(pDevice, info.numAbsAxes,
-                                              axis_labels,
-                                              dmxPointerGetMotionBufferSize(),
-                                              Absolute);
-                for (i = 0; i < info.numAbsAxes; i++)
-                    InitValuatorAxisStruct(pDevice, i,
-                                           axis_labels[i],
-                                           info.minval[i], info.maxval[i],
-                                           info.res[i], info.minres[i],
-                                           info.maxres[i], Absolute);
-            }
-        }
-        if (info.focusClass)
-            InitFocusClassDeviceStruct(pDevice);
-        if (info.proximityClass)
-            InitProximityClassDeviceStruct(pDevice);
-        if (info.ptrFeedbackClass)
-            InitPtrFeedbackClassDeviceStruct(pDevice, dmxChangePointerControl);
-        if (info.intFeedbackClass || info.strFeedbackClass)
-            dmxLog(dmxWarning,
-                   "Integer and string feedback not supported for %s\n",
-                   pDevice->name);
-        if (!info.keyboard && (info.ledFeedbackClass || info.belFeedbackClass))
-            dmxLog(dmxWarning,
-                   "Led and bel feedback not supported for non-keyboard %s\n",
-                   pDevice->name);
-        break;
-    case DEVICE_ON:
-        if (!pDev->on) {
-            if (dmxLocal->on)
-		dmxLocal->on(pDev);
-            pDev->on = TRUE;
-        }
-        break;
-    case DEVICE_OFF:
-    case DEVICE_CLOSE:
-        /* This can get called twice consecutively: once for a
-         * detached screen (DEVICE_OFF), and then again at server
-         * generation time (DEVICE_CLOSE). */
-        if (pDev->on) {
-            if (dmxLocal->off)
-                dmxLocal->off(pDev);
-            pDev->on = FALSE;
-        }
-        break;
-    }
-    if (info.keySyms.map && info.freemap) {
-        XFree(info.keySyms.map);
-        info.keySyms.map = NULL;
-    }
-    if (info.xkb)
-        XkbFreeKeyboard(info.xkb, 0, True);
-    return Success;
-}
-
-static void
-dmxProcessInputEvents(DMXInputInfo * dmxInput)
-{
-    int i;
-
-    mieqProcessInputEvents();
-#if 00 /*BP*/
-        miPointerUpdate();
-#endif
-    if (dmxInput->detached)
-        return;
-    for (i = 0; i < dmxInput->numDevs; i += dmxInput->devs[i]->binding)
-        if (dmxInput->devs[i]->process_input) {
-            dmxInput->devs[i]->process_input(dmxInput->devs[i]->private);
-        }
-
-#if 11 /*BP*/
-        mieqProcessInputEvents();
-#endif
-}
-
-static void
-dmxUpdateWindowInformation(DMXInputInfo * dmxInput,
-                           DMXUpdateType type, WindowPtr pWindow)
-{
-    int i;
-
-#ifdef PANORAMIX
-    if (!noPanoramiXExtension && pWindow &&
-        pWindow->parent != screenInfo.screens[0]->root)
-        return;
-#endif
-#if DMX_WINDOW_DEBUG
-    {
-        const char *name = "Unknown";
-
-        switch (type) {
-        case DMX_UPDATE_REALIZE:
-            name = "Realize";
-            break;
-        case DMX_UPDATE_UNREALIZE:
-            name = "Unrealize";
-            break;
-        case DMX_UPDATE_RESTACK:
-            name = "Restack";
-            break;
-        case DMX_UPDATE_COPY:
-            name = "Copy";
-            break;
-        case DMX_UPDATE_RESIZE:
-            name = "Resize";
-            break;
-        case DMX_UPDATE_REPARENT:
-            name = "Repaint";
-            break;
-        }
-        dmxLog(dmxDebug, "Window %p changed: %s\n", pWindow, name);
-    }
-#endif
-
-    if (dmxInput->detached)
-        return;
-    for (i = 0; i < dmxInput->numDevs; i += dmxInput->devs[i]->binding)
-        if (dmxInput->devs[i]->update_info)
-            dmxInput->devs[i]->update_info(dmxInput->devs[i]->private,
-                                           type, pWindow);
-}
-
-static void
-dmxCollectAll(DMXInputInfo * dmxInput)
-{
-    int i;
-
-    if (dmxInput->detached)
-        return;
-    for (i = 0; i < dmxInput->numDevs; i += dmxInput->devs[i]->binding)
-        if (dmxInput->devs[i]->collect_events)
-            dmxInput->devs[i]->collect_events(&dmxInput->devs[i]->pDevice->
-                                              public, dmxMotion, dmxEnqueue,
-                                              dmxCheckSpecialKeys, DMX_BLOCK);
-}
-
-static void
-dmxBlockHandler(void *blockData, void *timeout)
-{
-    DMXInputInfo *dmxInput = &dmxInputs[(uintptr_t) blockData];
-    static unsigned long generation = 0;
-
-    if (generation != serverGeneration) {
-        generation = serverGeneration;
-        dmxCollectAll(dmxInput);
-    }
-}
-
-static void
-dmxSwitchReturn(void *p)
-{
-    DMXInputInfo *dmxInput = p;
-    int i;
-
-    dmxLog(dmxInfo, "Returning from VT %d\n", dmxInput->vt_switched);
-
-    if (!dmxInput->vt_switched)
-        dmxLog(dmxFatal, "dmxSwitchReturn called, but not switched\n");
-    for (i = 0; i < dmxInput->numDevs; i++)
-        if (dmxInput->devs[i]->vt_post_switch)
-            dmxInput->devs[i]->vt_post_switch(dmxInput->devs[i]->private);
-    dmxInput->vt_switched = 0;
-}
-
-static void
-dmxWakeupHandler(void *blockData, int result)
-{
-    DMXInputInfo *dmxInput = &dmxInputs[(uintptr_t) blockData];
-    int i;
-
-    if (dmxInput->vt_switch_pending) {
-        dmxLog(dmxInfo, "Switching to VT %d\n", dmxInput->vt_switch_pending);
-        for (i = 0; i < dmxInput->numDevs; i++)
-            if (dmxInput->devs[i]->vt_pre_switch)
-                dmxInput->devs[i]->vt_pre_switch(dmxInput->devs[i]->private);
-        dmxInput->vt_switched = dmxInput->vt_switch_pending;
-        dmxInput->vt_switch_pending = 0;
-        for (i = 0; i < dmxInput->numDevs; i++) {
-            if (dmxInput->devs[i]->vt_switch) {
-                if (!dmxInput->devs[i]->vt_switch(dmxInput->devs[i]->private,
-                                                  dmxInput->vt_switched,
-                                                  dmxSwitchReturn, dmxInput))
-                    dmxSwitchReturn(dmxInput);
-                break;          /* Only call one vt_switch routine */
-            }
-        }
-    }
-    dmxCollectAll(dmxInput);
-}
-
-static char *
-dmxMakeUniqueDeviceName(DMXLocalInputInfoPtr dmxLocal)
-{
-    static int k = 0;
-    static int m = 0;
-    static int o = 0;
-    static unsigned long dmxGeneration = 0;
-
-#define LEN  32
-    char *buf = malloc(LEN);
-
-    if (dmxGeneration != serverGeneration) {
-        k = m = o = 0;
-        dmxGeneration = serverGeneration;
-    }
-
-    switch (dmxLocal->type) {
-    case DMX_LOCAL_KEYBOARD:
-        snprintf(buf, LEN, "Keyboard%d", k++);
-        break;
-    case DMX_LOCAL_MOUSE:
-        snprintf(buf, LEN, "Mouse%d", m++);
-        break;
-    default:
-        snprintf(buf, LEN, "Other%d", o++);
-        break;
-    }
-
-    return buf;
-}
-
-static DeviceIntPtr
-dmxAddDevice(DMXLocalInputInfoPtr dmxLocal)
-{
-    DeviceIntPtr pDevice;
-    Atom atom;
-    const char *name = NULL;
-    char *devname;
-    DMXInputInfo *dmxInput;
-
-    if (!dmxLocal)
-        return NULL;
-    dmxInput = &dmxInputs[dmxLocal->inputIdx];
-
-    if (dmxLocal->sendsCore) {
-        if (dmxLocal->type == DMX_LOCAL_KEYBOARD && !dmxLocalCoreKeyboard) {
-            dmxLocal->isCore = 1;
-            dmxLocalCoreKeyboard = dmxLocal;
-            name = "keyboard";
-        }
-        if (dmxLocal->type == DMX_LOCAL_MOUSE && !dmxLocalCorePointer) {
-            dmxLocal->isCore = 1;
-            dmxLocalCorePointer = dmxLocal;
-            name = "pointer";
-        }
-    }
-
-    if (!name) {
-        name = "extension";
-    }
-
-    if (!name)
-        dmxLog(dmxFatal, "Cannot add device %s\n", dmxLocal->name);
-
-    pDevice = AddInputDevice(serverClient, dmxDeviceOnOff, TRUE);
-    if (!pDevice) {
-        dmxLog(dmxError, "Too many devices -- cannot add device %s\n",
-               dmxLocal->name);
-        return NULL;
-    }
-    pDevice->public.devicePrivate = dmxLocal;
-    dmxLocal->pDevice = pDevice;
-
-    devname = dmxMakeUniqueDeviceName(dmxLocal);
-    atom = MakeAtom((char *) devname, strlen(devname), TRUE);
-    pDevice->type = atom;
-    pDevice->name = devname;
-
-    if (dmxLocal->isCore && dmxLocal->type == DMX_LOCAL_MOUSE) {
-#if 00   /*BP*/
-            miRegisterPointerDevice(screenInfo.screens[0], pDevice);
-#else
-        /* Nothing? dmxDeviceOnOff() should get called to init, right? */
-#endif
-    }
-
-    if (dmxLocal->create_private)
-        dmxLocal->private = dmxLocal->create_private(pDevice);
-
-    dmxLogInput(dmxInput, "Added %s as %s device called %s%s\n",
-                dmxLocal->name, name, devname,
-                dmxLocal->isCore
-                ? " [core]"
-                : (dmxLocal->sendsCore ? " [sends core events]" : ""));
-
-    return pDevice;
-}
-
-static DMXLocalInputInfoPtr
-dmxLookupLocal(const char *name)
-{
-    DMXLocalInputInfoPtr pt;
-
-    for (pt = &DMXLocalDevices[0]; pt->name; ++pt)
-        if (!strcmp(pt->name, name))
-            return pt;          /* search for device name */
-    return NULL;
-}
-
-/** Copy the local input information from \a s into a new \a devs slot
- * in \a dmxInput. */
-DMXLocalInputInfoPtr
-dmxInputCopyLocal(DMXInputInfo * dmxInput, DMXLocalInputInfoPtr s)
-{
-    DMXLocalInputInfoPtr dmxLocal = malloc(sizeof(*dmxLocal));
-
-    if (!dmxLocal)
-        dmxLog(dmxFatal, "DMXLocalInputInfoPtr: out of memory\n");
-
-    memcpy(dmxLocal, s, sizeof(*dmxLocal));
-    dmxLocal->inputIdx = dmxInput->inputIdx;
-    dmxLocal->sendsCore = dmxInput->core;
-    dmxLocal->savedSendsCore = dmxInput->core;
-    dmxLocal->deviceId = -1;
-
-    ++dmxInput->numDevs;
-    dmxInput->devs = reallocarray(dmxInput->devs,
-                                  dmxInput->numDevs, sizeof(*dmxInput->devs));
-    dmxInput->devs[dmxInput->numDevs - 1] = dmxLocal;
-
-    return dmxLocal;
-}
-
-static void
-dmxPopulateLocal(DMXInputInfo * dmxInput, dmxArg a)
-{
-    int i;
-    int help = 0;
-    DMXLocalInputInfoRec *pt;
-
-    for (i = 1; i < dmxArgC(a); i++) {
-        const char *name = dmxArgV(a, i);
-
-        if ((pt = dmxLookupLocal(name))) {
-            dmxInputCopyLocal(dmxInput, pt);
-        }
-        else {
-            if (strlen(name))
-                dmxLog(dmxWarning, "Could not find a driver called %s\n", name);
-            ++help;
-        }
-    }
-    if (help) {
-        dmxLog(dmxInfo, "Available local device drivers:\n");
-        for (pt = &DMXLocalDevices[0]; pt->name; ++pt) {
-            const char *type;
-
-            switch (pt->type) {
-            case DMX_LOCAL_KEYBOARD:
-                type = "keyboard";
-                break;
-            case DMX_LOCAL_MOUSE:
-                type = "pointer";
-                break;
-            default:
-                type = "unknown";
-                break;
-            }
-            dmxLog(dmxInfo, "   %s (%s)\n", pt->name, type);
-        }
-        dmxLog(dmxFatal, "Must have valid local device driver\n");
-    }
-}
-
-int
-dmxInputExtensionErrorHandler(Display * dsp, _Xconst char *name,
-                              _Xconst char *reason)
-{
-    return 0;
-}
-
-static void
-dmxInputScanForExtensions(DMXInputInfo * dmxInput, int doXI)
-{
-    XExtensionVersion *ext;
-    XDeviceInfo *devices;
-    Display *dsp;
-    int num;
-    int i, j;
-    XextErrorHandler handler;
-
-    if (!(dsp = XOpenDisplay(dmxInput->name)))
-        return;
-
-    /* Print out information about the XInput Extension. */
-    handler = XSetExtensionErrorHandler(dmxInputExtensionErrorHandler);
-    ext = XGetExtensionVersion(dsp, INAME);
-    XSetExtensionErrorHandler(handler);
-
-    if (!ext || ext == (XExtensionVersion *) NoSuchExtension) {
-        dmxLogInput(dmxInput, "%s is not available\n", INAME);
-    }
-    else {
-        dmxLogInput(dmxInput, "Locating devices on %s (%s version %d.%d)\n",
-                    dmxInput->name, INAME,
-                    ext->major_version, ext->minor_version);
-        devices = XListInputDevices(dsp, &num);
-
-        XFree(ext);
-        ext = NULL;
-
-        /* Print a list of all devices */
-        for (i = 0; i < num; i++) {
-            const char *use = "Unknown";
-
-            switch (devices[i].use) {
-            case IsXPointer:
-                use = "XPointer";
-                break;
-            case IsXKeyboard:
-                use = "XKeyboard";
-                break;
-            case IsXExtensionDevice:
-                use = "XExtensionDevice";
-                break;
-            case IsXExtensionPointer:
-                use = "XExtensionPointer";
-                break;
-            case IsXExtensionKeyboard:
-                use = "XExtensionKeyboard";
-                break;
-            }
-            dmxLogInput(dmxInput, "  %2d %-10.10s %-16.16s\n",
-                        (int) devices[i].id,
-                        devices[i].name ? devices[i].name : "", use);
-        }
-
-        /* Search for extensions */
-        for (i = 0; i < num; i++) {
-            switch (devices[i].use) {
-            case IsXKeyboard:
-                for (j = 0; j < dmxInput->numDevs; j++) {
-                    DMXLocalInputInfoPtr dmxL = dmxInput->devs[j];
-
-                    if (dmxL->type == DMX_LOCAL_KEYBOARD && dmxL->deviceId < 0) {
-                        dmxL->deviceId = devices[i].id;
-                        dmxL->deviceName = (devices[i].name
-                                            ? strdup(devices[i].name)
-                                            : NULL);
-                    }
-                }
-                break;
-            case IsXPointer:
-                for (j = 0; j < dmxInput->numDevs; j++) {
-                    DMXLocalInputInfoPtr dmxL = dmxInput->devs[j];
-
-                    if (dmxL->type == DMX_LOCAL_MOUSE && dmxL->deviceId < 0) {
-                        dmxL->deviceId = devices[i].id;
-                        dmxL->deviceName = (devices[i].name
-                                            ? xstrdup(devices[i].name)
-                                            : NULL);
-                    }
-                }
-                break;
-            }
-        }
-        XFreeDeviceList(devices);
-    }
-    XCloseDisplay(dsp);
-}
-
-/** Re-initialize all the devices described in \a dmxInput.  Called from
-    #dmxAdjustCursorBoundaries before the cursor is redisplayed. */
-void
-dmxInputReInit(DMXInputInfo * dmxInput)
-{
-    int i;
-
-    for (i = 0; i < dmxInput->numDevs; i++) {
-        DMXLocalInputInfoPtr dmxLocal = dmxInput->devs[i];
-
-        if (dmxLocal->reinit)
-            dmxLocal->reinit(&dmxLocal->pDevice->public);
-    }
-}
-
-/** Re-initialize all the devices described in \a dmxInput.  Called from
-    #dmxAdjustCursorBoundaries after the cursor is redisplayed. */
-void
-dmxInputLateReInit(DMXInputInfo * dmxInput)
-{
-    int i;
-
-    for (i = 0; i < dmxInput->numDevs; i++) {
-        DMXLocalInputInfoPtr dmxLocal = dmxInput->devs[i];
-
-        if (dmxLocal->latereinit)
-            dmxLocal->latereinit(&dmxLocal->pDevice->public);
-    }
-}
-
-/** Initialize all of the devices described in \a dmxInput. */
-void
-dmxInputInit(DMXInputInfo * dmxInput)
-{
-    dmxArg a;
-    const char *name;
-    int i;
-    int doXI = 1;               /* Include by default */
-    int forceConsole = 0;
-    int doWindows = 1;          /* On by default */
-    int hasXkb = 0;
-
-    a = dmxArgParse(dmxInput->name);
-
-    name = dmxArgV(a, 0);
-
-    if (!strcmp(name, "local")) {
-        dmxPopulateLocal(dmxInput, a);
-    }
-    else if (!strcmp(name, "dummy")) {
-        dmxInputCopyLocal(dmxInput, &DMXDummyMou);
-        dmxInputCopyLocal(dmxInput, &DMXDummyKbd);
-        dmxLogInput(dmxInput, "Using dummy input\n");
-    }
-    else {
-        int found;
-
-        for (i = 1; i < dmxArgC(a); i++) {
-            switch (hasXkb) {
-            case 1:
-                dmxInput->keycodes = xstrdup(dmxArgV(a, i));
-                ++hasXkb;
-                break;
-            case 2:
-                dmxInput->symbols = xstrdup(dmxArgV(a, i));
-                ++hasXkb;
-                break;
-            case 3:
-                dmxInput->geometry = xstrdup(dmxArgV(a, i));
-                hasXkb = 0;
-                break;
-            case 0:
-                if (!strcmp(dmxArgV(a, i), "noxi"))
-                    doXI = 0;
-                else if (!strcmp(dmxArgV(a, i), "xi"))
-                    doXI = 1;
-                else if (!strcmp(dmxArgV(a, i), "console"))
-                    forceConsole = 1;
-                else if (!strcmp(dmxArgV(a, i), "noconsole"))
-                    forceConsole = 0;
-                else if (!strcmp(dmxArgV(a, i), "windows"))
-                    doWindows = 1;
-                else if (!strcmp(dmxArgV(a, i), "nowindows"))
-                    doWindows = 0;
-                else if (!strcmp(dmxArgV(a, i), "xkb"))
-                    hasXkb = 1;
-                else {
-                    dmxLog(dmxFatal, "Unknown input argument: %s\n", dmxArgV(a, i));
-                }
-            }
-        }
-
-        for (found = 0, i = 0; i < dmxNumScreens; i++) {
-            if (dmxPropertySameDisplay(&dmxScreens[i], name)) {
-                if (dmxScreens[i].shared)
-                    dmxLog(dmxFatal,
-                           "Cannot take input from shared backend (%s)\n",
-                           name);
-                if (!dmxInput->core) {
-                    dmxLog(dmxWarning,
-                           "Cannot use core devices on a backend (%s)"
-                           " as XInput devices\n", name);
-                }
-                else {
-                    char *pt;
-
-                    for (pt = (char *) dmxInput->name; pt && *pt; pt++)
-                        if (*pt == ',')
-                            *pt = '\0';
-                    dmxInputCopyLocal(dmxInput, &DMXBackendMou);
-                    dmxInputCopyLocal(dmxInput, &DMXBackendKbd);
-                    dmxInput->scrnIdx = i;
-                    dmxLogInput(dmxInput,
-                                "Using backend input from %s\n", name);
-                }
-                ++found;
-                break;
-            }
-        }
-        if (!found || forceConsole) {
-            char *pt;
-
-            if (found)
-                dmxInput->console = TRUE;
-            for (pt = (char *) dmxInput->name; pt && *pt; pt++)
-                if (*pt == ',')
-                    *pt = '\0';
-            dmxInputCopyLocal(dmxInput, &DMXConsoleMou);
-            dmxInputCopyLocal(dmxInput, &DMXConsoleKbd);
-            if (doWindows) {
-                dmxInput->windows = TRUE;
-                dmxInput->updateWindowInfo = dmxUpdateWindowInformation;
-            }
-            dmxLogInput(dmxInput,
-                        "Using console input from %s (%s windows)\n",
-                        name, doWindows ? "with" : "without");
-        }
-    }
-
-    dmxArgFree(a);
-
-    /* Locate extensions we may be interested in */
-    dmxInputScanForExtensions(dmxInput, doXI);
-
-    for (i = 0; i < dmxInput->numDevs; i++) {
-        DMXLocalInputInfoPtr dmxLocal = dmxInput->devs[i];
-
-        dmxLocal->pDevice = dmxAddDevice(dmxLocal);
-    }
-
-    dmxInput->processInputEvents = dmxProcessInputEvents;
-    dmxInput->detached = False;
-
-    RegisterBlockAndWakeupHandlers(dmxBlockHandler, dmxWakeupHandler,
-                                   (void *) (uintptr_t) dmxInput->inputIdx);
-}
-
-static void
-dmxInputFreeLocal(DMXLocalInputInfoRec * local)
-{
-    if (!local)
-        return;
-    if (local->isCore && local->type == DMX_LOCAL_MOUSE)
-        dmxLocalCorePointer = NULL;
-    if (local->isCore && local->type == DMX_LOCAL_KEYBOARD)
-        dmxLocalCoreKeyboard = NULL;
-    if (local->destroy_private)
-        local->destroy_private(local->private);
-    free(local->history);
-    free(local->valuators);
-    free((void *) local->deviceName);
-    local->private = NULL;
-    local->history = NULL;
-    local->deviceName = NULL;
-    free(local);
-}
-
-/** Free all of the memory associated with \a dmxInput */
-void
-dmxInputFree(DMXInputInfo * dmxInput)
-{
-    int i;
-
-    if (!dmxInput)
-        return;
-
-    free(dmxInput->keycodes);
-    free(dmxInput->symbols);
-    free(dmxInput->geometry);
-
-    for (i = 0; i < dmxInput->numDevs; i++) {
-        dmxInputFreeLocal(dmxInput->devs[i]);
-        dmxInput->devs[i] = NULL;
-    }
-    free(dmxInput->devs);
-    dmxInput->devs = NULL;
-    dmxInput->numDevs = 0;
-    if (dmxInput->freename)
-        free((void *) dmxInput->name);
-    dmxInput->name = NULL;
-}
-
-/** Log information about all of the known devices using #dmxLog(). */
-void
-dmxInputLogDevices(void)
-{
-    int i, j;
-
-    dmxLog(dmxInfo, "%d devices:\n", dmxGetInputCount());
-    dmxLog(dmxInfo, "  Id  Name                 Classes\n");
-    for (j = 0; j < dmxNumInputs; j++) {
-        DMXInputInfo *dmxInput = &dmxInputs[j];
-        const char *pt = strchr(dmxInput->name, ',');
-        int len = (pt ? (size_t) (pt - dmxInput->name)
-                   : strlen(dmxInput->name));
-
-        for (i = 0; i < dmxInput->numDevs; i++) {
-            DeviceIntPtr pDevice = dmxInput->devs[i]->pDevice;
-
-            if (pDevice) {
-                dmxLog(dmxInfo, "  %2d%c %-20.20s",
-                       pDevice->id,
-                       dmxInput->detached ? 'D' : ' ', pDevice->name);
-                if (pDevice->key)
-                    dmxLogCont(dmxInfo, " key");
-                if (pDevice->valuator)
-                    dmxLogCont(dmxInfo, " val");
-                if (pDevice->button)
-                    dmxLogCont(dmxInfo, " btn");
-                if (pDevice->focus)
-                    dmxLogCont(dmxInfo, " foc");
-                if (pDevice->kbdfeed)
-                    dmxLogCont(dmxInfo, " fb/kbd");
-                if (pDevice->ptrfeed)
-                    dmxLogCont(dmxInfo, " fb/ptr");
-                if (pDevice->intfeed)
-                    dmxLogCont(dmxInfo, " fb/int");
-                if (pDevice->stringfeed)
-                    dmxLogCont(dmxInfo, " fb/str");
-                if (pDevice->bell)
-                    dmxLogCont(dmxInfo, " fb/bel");
-                if (pDevice->leds)
-                    dmxLogCont(dmxInfo, " fb/led");
-                if (!pDevice->key && !pDevice->valuator && !pDevice->button
-                    && !pDevice->focus && !pDevice->kbdfeed
-                    && !pDevice->ptrfeed && !pDevice->intfeed
-                    && !pDevice->stringfeed && !pDevice->bell && !pDevice->leds)
-                    dmxLogCont(dmxInfo, " (none)");
-
-                dmxLogCont(dmxInfo, "\t[i%d/%*.*s",
-                           dmxInput->inputIdx, len, len, dmxInput->name);
-                if (dmxInput->devs[i]->deviceId >= 0)
-                    dmxLogCont(dmxInfo, "/id%d", (int) dmxInput->devs[i]->deviceId);
-                if (dmxInput->devs[i]->deviceName)
-                    dmxLogCont(dmxInfo, "=%s", dmxInput->devs[i]->deviceName);
-                dmxLogCont(dmxInfo, "] %s\n",
-                           dmxInput->devs[i]->isCore
-                           ? "core"
-                           : (dmxInput->devs[i]->sendsCore
-                              ? "extension (sends core events)" : "extension"));
-            }
-        }
-    }
-}
-
-/** Detach an input */
-int
-dmxInputDetach(DMXInputInfo * dmxInput)
-{
-    int i;
-
-    if (dmxInput->detached)
-        return BadAccess;
-
-    for (i = 0; i < dmxInput->numDevs; i++) {
-        DMXLocalInputInfoPtr dmxLocal = dmxInput->devs[i];
-
-        dmxLogInput(dmxInput, "Detaching device id %d: %s%s\n",
-                    dmxLocal->pDevice->id,
-                    dmxLocal->pDevice->name,
-                    dmxLocal->isCore
-                    ? " [core]"
-                    : (dmxLocal->sendsCore ? " [sends core events]" : ""));
-        DisableDevice(dmxLocal->pDevice, TRUE);
-    }
-    dmxInput->detached = True;
-    dmxInputLogDevices();
-    return 0;
-}
-
-/** Search for input associated with \a dmxScreen, and detach. */
-void
-dmxInputDetachAll(DMXScreenInfo * dmxScreen)
-{
-    int i;
-
-    for (i = 0; i < dmxNumInputs; i++) {
-        DMXInputInfo *dmxInput = &dmxInputs[i];
-
-        if (dmxInput->scrnIdx == dmxScreen->index)
-            dmxInputDetach(dmxInput);
-    }
-}
-
-/** Search for input associated with \a deviceId, and detach. */
-int
-dmxInputDetachId(int id)
-{
-    DMXInputInfo *dmxInput = dmxInputLocateId(id);
-
-    if (!dmxInput)
-        return BadValue;
-
-    return dmxInputDetach(dmxInput);
-}
-
-DMXInputInfo *
-dmxInputLocateId(int id)
-{
-    int i, j;
-
-    for (i = 0; i < dmxNumInputs; i++) {
-        DMXInputInfo *dmxInput = &dmxInputs[i];
-
-        for (j = 0; j < dmxInput->numDevs; j++) {
-            DMXLocalInputInfoPtr dmxLocal = dmxInput->devs[j];
-
-            if (dmxLocal->pDevice->id == id)
-                return dmxInput;
-        }
-    }
-    return NULL;
-}
-
-static int
-dmxInputAttachNew(DMXInputInfo * dmxInput, int *id)
-{
-    dmxInputInit(dmxInput);
-    InitAndStartDevices();
-    if (id && dmxInput->devs)
-        *id = dmxInput->devs[0]->pDevice->id;
-    dmxInputLogDevices();
-    return 0;
-}
-
-static int
-dmxInputAttachOld(DMXInputInfo * dmxInput, int *id)
-{
-    int i;
-
-    dmxInput->detached = False;
-    for (i = 0; i < dmxInput->numDevs; i++) {
-        DMXLocalInputInfoPtr dmxLocal = dmxInput->devs[i];
-
-        if (id)
-            *id = dmxLocal->pDevice->id;
-        dmxLogInput(dmxInput,
-                    "Attaching device id %d: %s%s\n",
-                    dmxLocal->pDevice->id,
-                    dmxLocal->pDevice->name,
-                    dmxLocal->isCore
-                    ? " [core]"
-                    : (dmxLocal->sendsCore ? " [sends core events]" : ""));
-        EnableDevice(dmxLocal->pDevice, TRUE);
-    }
-    dmxInputLogDevices();
-    return 0;
-}
-
-int
-dmxInputAttachConsole(const char *name, int isCore, int *id)
-{
-    DMXInputInfo *dmxInput;
-    int i;
-
-    for (i = 0; i < dmxNumInputs; i++) {
-        dmxInput = &dmxInputs[i];
-        if (dmxInput->scrnIdx == -1
-            && dmxInput->detached && !strcmp(dmxInput->name, name)) {
-            /* Found match */
-            dmxLogInput(dmxInput, "Reattaching detached console input\n");
-            return dmxInputAttachOld(dmxInput, id);
-        }
-    }
-
-    /* No match found */
-    dmxInput = dmxConfigAddInput(xstrdup(name), isCore);
-    dmxInput->freename = TRUE;
-    dmxLogInput(dmxInput, "Attaching new console input\n");
-    return dmxInputAttachNew(dmxInput, id);
-}
-
-int
-dmxInputAttachBackend(int physicalScreen, int isCore, int *id)
-{
-    DMXInputInfo *dmxInput;
-    DMXScreenInfo *dmxScreen;
-    int i;
-
-    if (physicalScreen < 0 || physicalScreen >= dmxNumScreens)
-        return BadValue;
-    for (i = 0; i < dmxNumInputs; i++) {
-        dmxInput = &dmxInputs[i];
-        if (dmxInput->scrnIdx != -1 && dmxInput->scrnIdx == physicalScreen) {
-            /* Found match */
-            if (!dmxInput->detached)
-                return BadAccess;       /* Already attached */
-            dmxScreen = &dmxScreens[physicalScreen];
-            if (!dmxScreen->beDisplay)
-                return BadAccess;       /* Screen detached */
-            dmxLogInput(dmxInput, "Reattaching detached backend input\n");
-            return dmxInputAttachOld(dmxInput, id);
-        }
-    }
-    /* No match found */
-    dmxScreen = &dmxScreens[physicalScreen];
-    if (!dmxScreen->beDisplay)
-        return BadAccess;       /* Screen detached */
-    dmxInput = dmxConfigAddInput(dmxScreen->name, isCore);
-    dmxLogInput(dmxInput, "Attaching new backend input\n");
-    return dmxInputAttachNew(dmxInput, id);
-}
diff --git a/hw/dmx/input/dmxinputinit.h b/hw/dmx/input/dmxinputinit.h
deleted file mode 100644
index 11af2ca..0000000
--- a/hw/dmx/input/dmxinputinit.h
+++ /dev/null
@@ -1,284 +0,0 @@
-/*
- * Copyright 2002 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-/** \file
- * Interface for low-level input support.  \see dmxinputinit.c */
-
-#ifndef _DMXINPUTINIT_H_
-#define _DMXINPUTINIT_H_
-
-#include "dmx.h"
-#include "dmxinput.h"
-#include "dmxlog.h"
-
-#define DMX_LOCAL_DEFAULT_KEYBOARD "kbd"
-#define DMX_LOCAL_DEFAULT_POINTER  "ps2"
-#define DMX_MAX_BUTTONS            256
-#define DMX_MOTION_SIZE            256
-#define DMX_MAX_VALUATORS          32
-#define DMX_MAX_AXES               32
-#define DMX_MAX_XINPUT_EVENT_TYPES 100
-#define DMX_MAP_ENTRIES            16   /* Must be a power of 2 */
-#define DMX_MAP_MASK               (DMX_MAP_ENTRIES - 1)
-
-typedef enum {
-    DMX_FUNCTION_GRAB,
-    DMX_FUNCTION_TERMINATE,
-    DMX_FUNCTION_FINE
-} DMXFunctionType;
-
-typedef enum {
-    DMX_LOCAL_HIGHLEVEL,
-    DMX_LOCAL_KEYBOARD,
-    DMX_LOCAL_MOUSE,
-    DMX_LOCAL_OTHER
-} DMXLocalInputType;
-
-typedef enum {
-    DMX_LOCAL_TYPE_LOCAL,
-    DMX_LOCAL_TYPE_CONSOLE,
-    DMX_LOCAL_TYPE_BACKEND,
-    DMX_LOCAL_TYPE_COMMON
-} DMXLocalInputExtType;
-
-typedef enum {
-    DMX_RELATIVE,
-    DMX_ABSOLUTE,
-    DMX_ABSOLUTE_CONFINED
-} DMXMotionType;
-
-/** Stores information from low-level device that is used to initialize
- * the device at the dix level. */
-typedef struct _DMXLocalInitInfo {
-    int keyboard;                  /**< Non-zero if the device is a keyboard */
-
-    int keyClass;                  /**< Non-zero if keys are present */
-    KeySymsRec keySyms;            /**< Key symbols */
-    int freemap;                   /**< If non-zero, free keySyms.map */
-    CARD8 modMap[MAP_LENGTH];                /**< Modifier map */
-    XkbDescPtr xkb;                 /**< XKB description */
-    XkbComponentNamesRec names;     /**< XKB component names */
-    int freenames;                  /**< Non-zero if names should be free'd */
-    int force;                      /**< Do not allow command line override */
-
-    int buttonClass;                  /**< Non-zero if buttons are present */
-    int numButtons;                   /**< Number of buttons */
-    unsigned char map[DMX_MAX_BUTTONS];        /**< Button map */
-
-    int valuatorClass;                  /**< Non-zero if valuators are
-                                         * present */
-    int numRelAxes;                     /**< Number of relative axes */
-    int numAbsAxes;                     /**< Number of absolute axes */
-    int minval[DMX_MAX_AXES];                  /**< Minimum values */
-    int maxval[DMX_MAX_AXES];                  /**< Maximum values */
-    int res[DMX_MAX_AXES];                     /**< Resolution */
-    int minres[DMX_MAX_AXES];                  /**< Minimum resolutions */
-    int maxres[DMX_MAX_AXES];                  /**< Maximum resolutions */
-
-    int focusClass;                        /**< Non-zero if device can
-                                            * cause focus */
-    int proximityClass;                    /**< Non-zero if device
-                                            * causes proximity events */
-    int kbdFeedbackClass;                  /**< Non-zero if device has
-                                            * keyboard feedback */
-    int ptrFeedbackClass;                  /**< Non-zero if device has
-                                            * pointer feedback */
-    int ledFeedbackClass;                  /**< Non-zero if device has
-                                            * LED indicators */
-    int belFeedbackClass;                  /**< Non-zero if device has a
-                                            * bell */
-    int intFeedbackClass;                  /**< Non-zero if device has
-                                            * integer feedback */
-    int strFeedbackClass;                  /**< Non-zero if device has
-                                            * string feedback */
-
-    int maxSymbols;                           /**< Maximum symbols */
-    int maxSymbolsSupported;                  /**< Maximum symbols supported */
-    KeySym *symbols;                          /**< Key symbols */
-} DMXLocalInitInfo, *DMXLocalInitInfoPtr;
-
-typedef void *(*dmxCreatePrivateProcPtr) (DeviceIntPtr);
-typedef void (*dmxDestroyPrivateProcPtr) (void *);
-
-typedef void (*dmxInitProcPtr) (DevicePtr);
-typedef void (*dmxReInitProcPtr) (DevicePtr);
-typedef void (*dmxLateReInitProcPtr) (DevicePtr);
-typedef void (*dmxGetInfoProcPtr) (DevicePtr, DMXLocalInitInfoPtr);
-typedef int (*dmxOnProcPtr) (DevicePtr);
-typedef void (*dmxOffProcPtr) (DevicePtr);
-typedef void (*dmxUpdatePositionProcPtr) (void *, int x, int y);
-
-typedef void (*dmxVTPreSwitchProcPtr) (void *);        /* Turn I/O Off */
-typedef void (*dmxVTPostSwitchProcPtr) (void *);       /* Turn I/O On */
-typedef void (*dmxVTSwitchReturnProcPtr) (void *);
-typedef int (*dmxVTSwitchProcPtr) (void *, int vt,
-                                   dmxVTSwitchReturnProcPtr, void *);
-
-typedef void (*dmxMotionProcPtr) (DevicePtr,
-                                  int *valuators,
-                                  int firstAxis,
-                                  int axesCount,
-                                  DMXMotionType type, DMXBlockType block);
-typedef void (*dmxEnqueueProcPtr) (DevicePtr, int type, int detail,
-                                   KeySym keySym, XEvent * e,
-                                   DMXBlockType block);
-typedef int (*dmxCheckSpecialProcPtr) (DevicePtr, KeySym keySym);
-typedef void (*dmxCollectEventsProcPtr) (DevicePtr,
-                                         dmxMotionProcPtr,
-                                         dmxEnqueueProcPtr,
-                                         dmxCheckSpecialProcPtr, DMXBlockType);
-typedef void (*dmxProcessInputProcPtr) (void *);
-typedef void (*dmxUpdateInfoProcPtr) (void *, DMXUpdateType, WindowPtr);
-typedef int (*dmxFunctionsProcPtr) (void *, DMXFunctionType);
-
-typedef void (*dmxKBCtrlProcPtr) (DevicePtr, KeybdCtrl * ctrl);
-typedef void (*dmxMCtrlProcPtr) (DevicePtr, PtrCtrl * ctrl);
-typedef void (*dmxKBBellProcPtr) (DevicePtr, int percent,
-                                  int volume, int pitch, int duration);
-
-/** Stores a mapping between the device id on the remote X server and
- * the id on the DMX server */
-typedef struct _DMXEventMap {
-    int remote;                 /**< Event number on remote X server */
-    int server;                 /**< Event number (unbiased) on DMX server */
-} DMXEventMap;
-
-/** This is the device-independent structure used by the low-level input
- * routines.  The contents are not exposed to top-level .c files (except
- * dmxextensions.c).  \see dmxinput.h \see dmxextensions.c */
-typedef struct _DMXLocalInputInfo {
-    const char *name;                 /**< Device name */
-    DMXLocalInputType type;           /**< Device type  */
-    DMXLocalInputExtType extType;     /**< Extended device type */
-    int binding;                      /**< Count of how many consecutive
-                                       * structs are bound to the same
-                                       * device */
-
-    /* Low-level (e.g., keyboard/mouse drivers) */
-
-    dmxCreatePrivateProcPtr create_private;   /**< Create
-                                               * device-dependent
-                                               * private */
-    dmxDestroyPrivateProcPtr destroy_private; /**< Destroy
-                                               * device-dependent
-                                               * private */
-    dmxInitProcPtr init;                      /**< Initialize device  */
-    dmxReInitProcPtr reinit;                  /**< Reinitialize device
-                                               * (during a
-                                               * reconfiguration) */
-    dmxLateReInitProcPtr latereinit;          /**< Reinitialize a device
-                                               * (called very late
-                                               * during a
-                                               * reconfiguration) */
-    dmxGetInfoProcPtr get_info;               /**< Get device information */
-    dmxOnProcPtr on;                          /**< Turn device on */
-    dmxOffProcPtr off;                        /**< Turn device off */
-    dmxUpdatePositionProcPtr update_position; /**< Called when another
-                                               * device updates the
-                                               * cursor position */
-    dmxVTPreSwitchProcPtr vt_pre_switch;      /**< Called before a VT switch */
-    dmxVTPostSwitchProcPtr vt_post_switch;    /**< Called after a VT switch */
-    dmxVTSwitchProcPtr vt_switch;             /**< Causes a VT switch */
-
-    dmxCollectEventsProcPtr collect_events;   /**< Collect and enqueue
-                                               * events from the
-                                               * device*/
-    dmxProcessInputProcPtr process_input;     /**< Process event (from
-                                               * queue)  */
-    dmxFunctionsProcPtr functions;
-    dmxUpdateInfoProcPtr update_info;         /**< Update window layout
-                                               * information */
-
-    dmxMCtrlProcPtr mCtrl;                    /**< Pointer control */
-    dmxKBCtrlProcPtr kCtrl;                   /**< Keyboard control */
-    dmxKBBellProcPtr kBell;                   /**< Bell control */
-
-    void *private;                            /**< Device-dependent private  */
-    int isCore;                               /**< Is a DMX core device  */
-    int sendsCore;                            /**< Sends DMX core events */
-    KeybdCtrl kctrl;                          /**< Keyboard control */
-    PtrCtrl mctrl;                            /**< Pointer control */
-
-    DeviceIntPtr pDevice;                     /**< X-level device  */
-    int inputIdx;                             /**< High-level index */
-    int lastX, lastY;                         /**< Last known position;
-                                               * for XInput in
-                                               * dmxevents.c */
-
-    int head;                                 /**< XInput motion history
-                                               * head */
-    int tail;                                 /**< XInput motion history
-                                               * tail */
-    unsigned long *history;                   /**< XInput motion history */
-    int *valuators;                           /**< Cache of previous values */
-
-    /* for XInput ChangePointerDevice */
-    int (*savedMotionProc) (DeviceIntPtr,
-                            xTimecoord *,
-                            unsigned long, unsigned long, ScreenPtr);
-    int savedMotionEvents;                      /**< Saved motion events */
-    int savedSendsCore;                         /**< Saved sends-core flag */
-
-    DMXEventMap map[DMX_MAP_ENTRIES];              /**< XInput device id map */
-    int mapOptimize;                               /**< XInput device id
-                                                    * map
-                                                    * optimization */
-
-    long deviceId;                        /**< device id on remote side,
-                                           * if any */
-    const char *deviceName;               /**< devive name on remote
-                                           * side, if any */
-} DMXLocalInputInfoRec;
-
-extern DMXLocalInputInfoPtr dmxLocalCorePointer, dmxLocalCoreKeyboard;
-
-extern void dmxLocalInitInput(DMXInputInfo * dmxInput);
-extern DMXLocalInputInfoPtr dmxInputCopyLocal(DMXInputInfo * dmxInput,
-                                              DMXLocalInputInfoPtr s);
-
-extern void dmxChangePointerControl(DeviceIntPtr pDevice, PtrCtrl * ctrl);
-extern void dmxKeyboardKbdCtrlProc(DeviceIntPtr pDevice, KeybdCtrl * ctrl);
-extern void dmxKeyboardBellProc(int percent, DeviceIntPtr pDevice,
-                                void *ctrl, int unknown);
-
-extern int dmxInputExtensionErrorHandler(Display * dsp, _Xconst char *name,
-                                         _Xconst char *reason);
-
-extern int dmxInputDetach(DMXInputInfo * dmxInput);
-extern void dmxInputDetachAll(DMXScreenInfo * dmxScreen);
-extern int dmxInputDetachId(int id);
-extern DMXInputInfo *dmxInputLocateId(int id);
-extern int dmxInputAttachConsole(const char *name, int isCore, int *id);
-extern int dmxInputAttachBackend(int physicalScreen, int isCore, int *id);
-
-#endif
diff --git a/hw/dmx/input/dmxmap.c b/hw/dmx/input/dmxmap.c
deleted file mode 100644
index 1a8d4c9..0000000
--- a/hw/dmx/input/dmxmap.c
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Copyright 2003 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- */
-
-/** \file
- *
- * This file implements a mapping from remote XInput event types to Xdmx
- * XInput event types.
- *
- * The exglobals.h file defines global server-side variables with names
- * Device* to be integers that hold the value of the type of the
- * server-side XInput extension event.
- *
- * The client-side X11/extensions/XInput.h file defines macros with THE
- * EXACT SAME Device* names!
- *
- * Using those macros to extract remote server event type values from
- * the (opaque) XDevice structure is appropriate, but makes a direct
- * mapping to the Device* integers impossible.  So we use the normalized
- * XI_Device* names for these routines.
- */
-
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#include "dmxinputinit.h"
-#include "dmxmap.h"
-
-/** Create a mapping from \a remoteEvent to \a serverEvent. The \a
- * remoteEvent is the type returned from the remote server.  The \a
- * serverEvent is from the XI_* list of events in
- * include/extensions/XIproto.h. */
-void
-dmxMapInsert(DMXLocalInputInfoPtr dmxLocal, int remoteEvent, int serverEvent)
-{
-    int hash = remoteEvent & DMX_MAP_MASK;
-    int i;
-
-    /* Return if this has already been mapped */
-    if (dmxLocal->map[hash].remote == remoteEvent
-        && dmxLocal->map[hash].server == serverEvent)
-        return;
-
-    if (dmxLocal->map[hash].remote) {
-        dmxLocal->mapOptimize = 0;
-        for (i = 0; i < DMX_MAP_ENTRIES; i++) {
-            if (!dmxLocal->map[i].remote) {
-                dmxLocal->map[i].remote = remoteEvent;
-                dmxLocal->map[i].server = serverEvent;
-                return;
-            }
-        }
-        dmxLog(dmxWarning,
-               "Out of map entries, cannot map remove event type %d\n",
-               remoteEvent);
-    }
-    else {
-        dmxLocal->map[hash].remote = remoteEvent;
-        dmxLocal->map[hash].server = serverEvent;
-    }
-}
-
-/** Remove all mappings there were inserted with #dmxMapInsert. */
-void
-dmxMapClear(DMXLocalInputInfoPtr dmxLocal)
-{
-    int i;
-
-    for (i = 0; i < DMX_MAP_ENTRIES; i++)
-        dmxLocal->map[i].remote = 0;
-    dmxLocal->mapOptimize = 1;
-}
-
-/** Lookup a mapping for \a remoteEvent.  The \a remoteEvent is the type
- * returned from the remote server.  The return value is that which was
- * passed into #dmxMapInsert (i.e., a value from the XI_* list in
- * include/extensions/XIproto.h).  If a mapping is not available, -1 is
- * returned. */
-int
-dmxMapLookup(DMXLocalInputInfoPtr dmxLocal, int remoteEvent)
-{
-    int hash = remoteEvent & DMX_MAP_MASK;
-    int serverEvent = -1;
-    int i;
-
-    if (dmxLocal->mapOptimize && dmxLocal->map[hash].remote == remoteEvent) {
-        serverEvent = dmxLocal->map[hash].server;
-    }
-    else {
-        for (i = 0; i < DMX_MAP_ENTRIES; i++)
-            if (dmxLocal->map[i].remote == remoteEvent) {
-                serverEvent = dmxLocal->map[hash].server;
-                break;
-            }
-    }
-
-    return serverEvent;
-}
diff --git a/hw/dmx/input/dmxmap.h b/hw/dmx/input/dmxmap.h
deleted file mode 100644
index 62da1ed..0000000
--- a/hw/dmx/input/dmxmap.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright 2003 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- */
-
-/** \file
- * Interface to XInput event mapping support.  \see dmxmap.c */
-
-#ifndef _DMXMAP_H_
-#define _DMXMAP_H_
-extern void dmxMapInsert(DMXLocalInputInfoPtr dmxLocal,
-                         int remoteEvent, int serverEvent);
-extern void dmxMapClear(DMXLocalInputInfoPtr dmxLocal);
-extern int dmxMapLookup(DMXLocalInputInfoPtr dmxLocal, int remoteEvent);
-#endif
diff --git a/hw/dmx/input/dmxmotion.c b/hw/dmx/input/dmxmotion.c
deleted file mode 100644
index 7f2cb8e..0000000
--- a/hw/dmx/input/dmxmotion.c
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Copyright 2002-2003 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-/** \file
- * This file provides functions similar to miPointerGetMotionEvents and
- * miPointerPutMotionEvents, with the exception that devices with more
- * than two axes are fully supported.  These routines may be used only
- * for motion buffers for extension devices, and are \a not compatible
- * replacements for the mi routines.  */
-
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#include "inputstr.h"
-#include "dmxinputinit.h"
-#include "dmxcommon.h"
-#include "dmxmotion.h"
-
-#define OFFSET(offset,element) ((offset) * (numAxes + 1) + (element))
-
-/** Return size of motion buffer. \see DMX_MOTION_SIZE */
-int
-dmxPointerGetMotionBufferSize(void)
-{
-    return DMX_MOTION_SIZE;
-}
-
-/** This routine performs the same function as \a miPointerGetMotionEvents:
- * the events in the motion history that are between the start and stop
- * times (in mS) are placed in the coords vector, and the count of the
- * number of items so placed is returned.  This routine is called from
- * dix/devices.c so that coords can hold valuator->numMotionEvents
- * events.  This routine is called from \a Xi/gtmotion.c with coords large
- * enough to hold the same number of events in a variable-length
- * extended \a xTimecoord structure.  This provides sufficient data for the
- * \a XGetDeviceMotionEvents library call, and would be identical to
- * \a miPointerGetMotionEvents for devices with only 2 axes (i.e., core
- * pointers) if \a xTimecoord used 32bit integers.
- *
- * Because DMX uses the mi* routines for all core devices, this routine
- * only has to support extension devices using the polymorphic coords.
- * Because compatibility with miPointerGetMotionEvents is not possible,
- * it is not provided. */
-int
-dmxPointerGetMotionEvents(DeviceIntPtr pDevice,
-                          xTimecoord * coords,
-                          unsigned long start,
-                          unsigned long stop, ScreenPtr pScreen)
-{
-    GETDMXLOCALFROMPDEVICE;
-    int numAxes = pDevice->valuator->numAxes;
-    unsigned long *c = (unsigned long *) coords;
-    int count = 0;
-    int i, j;
-
-    if (!dmxLocal->history)
-        return 0;
-    for (i = dmxLocal->head; i != dmxLocal->tail;) {
-        if (dmxLocal->history[OFFSET(i, 0)] >= stop)
-            break;
-        if (dmxLocal->history[OFFSET(i, 0)] >= start) {
-            for (j = 0; j < numAxes + 1; j++)
-                c[OFFSET(count, j)] = dmxLocal->history[OFFSET(i, j)];
-            ++count;
-        }
-        if (++i >= DMX_MOTION_SIZE)
-            i = 0;
-    }
-    return count;
-}
-
-/** This routine adds an event to the motion history.  A similar
- * function is performed by miPointerMove for the mi versions of these
- * routines. */
-void
-dmxPointerPutMotionEvent(DeviceIntPtr pDevice,
-                         int firstAxis, int axesCount, int *v,
-                         unsigned long time)
-{
-    GETDMXLOCALFROMPDEVICE;
-    int numAxes = pDevice->valuator->numAxes;
-    int i;
-
-    if (!dmxLocal->history) {
-        dmxLocal->history = xallocarray(numAxes + 1,
-                                 sizeof(*dmxLocal->history) * DMX_MOTION_SIZE);
-        dmxLocal->head = 0;
-        dmxLocal->tail = 0;
-        dmxLocal->valuators = calloc(sizeof(*dmxLocal->valuators), numAxes);
-    }
-    else {
-        if (++dmxLocal->tail >= DMX_MOTION_SIZE)
-            dmxLocal->tail = 0;
-        if (dmxLocal->head == dmxLocal->tail)
-            if (++dmxLocal->head >= DMX_MOTION_SIZE)
-                dmxLocal->head = 0;
-    }
-
-    dmxLocal->history[OFFSET(dmxLocal->tail, 0)] = time;
-
-    /* Initialize the data from the known
-     * values (if Absolute) or to zero (if
-     * Relative) */
-    for (i = 0; i < numAxes; i++) {
-        if (pDevice->valuator->axes[i].mode == Absolute)
-            dmxLocal->history[OFFSET(dmxLocal->tail, i + 1)]
-                = dmxLocal->valuators[i];
-        else
-            dmxLocal->history[OFFSET(dmxLocal->tail, i + 1)] = 0;
-    }
-
-    for (i = firstAxis; i < axesCount; i++) {
-        dmxLocal->history[OFFSET(dmxLocal->tail, i + i)]
-            = (unsigned long) v[i - firstAxis];
-        dmxLocal->valuators[i] = v[i - firstAxis];
-    }
-}
diff --git a/hw/dmx/input/dmxmotion.h b/hw/dmx/input/dmxmotion.h
deleted file mode 100644
index 5ccdbe4..0000000
--- a/hw/dmx/input/dmxmotion.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright 2002 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-/** \file
- * Interface to functions supporting motion events.  \see dmxmotion.c */
-
-#ifndef _DMXMOTION_H_
-#define _DMXMOTION_H_
-
-extern int dmxPointerGetMotionBufferSize(void);
-extern int dmxPointerGetMotionEvents(DeviceIntPtr pDevice,
-                                     xTimecoord * coords,
-                                     unsigned long start,
-                                     unsigned long stop, ScreenPtr pScreen);
-extern void dmxPointerPutMotionEvent(DeviceIntPtr pDevice,
-                                     int firstAxis, int axesCount, int *v,
-                                     unsigned long time);
-#endif
diff --git a/hw/dmx/input/dmxxinput.c b/hw/dmx/input/dmxxinput.c
deleted file mode 100644
index fccab5f..0000000
--- a/hw/dmx/input/dmxxinput.c
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright 2002-2003 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-/** \file
- *
- * This file implements support required by the XINPUT extension.
- */
-
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#include <X11/X.h>
-#include <X11/Xproto.h>
-#include "inputstr.h"
-#include <X11/extensions/XI.h>
-#include <X11/extensions/XIproto.h>
-#include "XIstubs.h"
-
-#include "mipointer.h"
-#include "dmxinputinit.h"
-#include "exevents.h"
-
-/** Set device mode to \a mode.  This is not implemented. */
-int
-SetDeviceMode(ClientPtr client, DeviceIntPtr dev, int mode)
-{
-    return BadMatch;
-}
-
-/** Set device valuators.  This is not implemented. */
-int
-SetDeviceValuators(ClientPtr client,
-                   DeviceIntPtr dev,
-                   int *valuators, int first_valuator, int num_valuators)
-{
-    return BadMatch;
-}
-
-/** Change device control.  This is not implemented. */
-int
-ChangeDeviceControl(ClientPtr client, DeviceIntPtr dev, xDeviceCtl * control)
-{
-    return BadMatch;
-}
diff --git a/hw/dmx/input/meson.build b/hw/dmx/input/meson.build
deleted file mode 100644
index cf058ad..0000000
--- a/hw/dmx/input/meson.build
+++ /dev/null
@@ -1,32 +0,0 @@
-srcs_dmx_input = [
-    'dmxdummy.c',
-    'dmxbackend.c',
-    'dmxconsole.c',
-    'dmxcommon.c',
-    'dmxinputinit.c',
-    'dmxarg.c',
-    'dmxevents.c',
-    'dmxxinput.c',
-    'dmxmotion.c',
-    'dmxmap.c',
-    'ChkNotMaskEv.c',
-]
-
-if cc.has_header('linux/input.h')
-    srcs_dmx_input += [
-        'usb-keyboard.c',
-        'usb-mouse.c',
-        'usb-other.c',
-        'usb-common.c',
-    ]
-endif
-
-dmx_input = static_library('dmx_input',
-	srcs_dmx_input,
-	include_directories: [
-            inc,
-            include_directories('../')
-        ],
-	dependencies: common_dep,
-        c_args: '-DHAVE_DMX_CONFIG_H',
-)
diff --git a/hw/dmx/input/usb-common.c b/hw/dmx/input/usb-common.c
deleted file mode 100644
index 8c62aba..0000000
--- a/hw/dmx/input/usb-common.c
+++ /dev/null
@@ -1,492 +0,0 @@
-/*
- * Copyright 2002-2003 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-/** \file
- *
- * Routines that are common between \a usb-keyboard.c, \a usb-mouse.c, and
- * \a usb-other.c */
-
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#include "usb-private.h"
-
-#define USB_COMMON_DEBUG 1
-
-/*****************************************************************************/
-/* Define some macros to make it easier to move this file to another
- * part of the Xserver tree.  All calls to the dmx* layer are #defined
- * here for the .c file.  The .h file will also have to be edited. */
-#include "usb-mouse.h"
-
-#define GETPRIV       myPrivate *priv                                         \
-                      = ((DMXLocalInputInfoPtr)(pDev->devicePrivate))->private
-
-#define GETNAME       ((DMXLocalInputInfoPtr)(pDevice->public.devicePrivate)) \
-                      ->name
-
-#define LOG0(f)       dmxLog(dmxDebug,f)
-#define LOG1(f,a)     dmxLog(dmxDebug,f,a)
-#define LOG2(f,a,b)   dmxLog(dmxDebug,f,a,b)
-#define LOG3(f,a,b,c) dmxLog(dmxDebug,f,a,b,c)
-#define LOG1INPUT(p,f,a)         dmxLogInput(p->dmxInput,f,a)
-#define LOG3INPUT(p,f,a,b,c)     dmxLogInput(p->dmxInput,f,a,b,c)
-#define LOG5INPUT(p,f,a,b,c,d,e) dmxLogInput(p->dmxInput,f,a,b,c,d,e)
-#define FATAL0(f)     dmxLog(dmxFatal,f)
-#define FATAL1(f,a)   dmxLog(dmxFatal,f,a)
-#define FATAL2(f,a,b) dmxLog(dmxFatal,f,a,b)
-#define MOTIONPROC    dmxMotionProcPtr
-#define ENQUEUEPROC   dmxEnqueueProcPtr
-#define CHECKPROC     dmxCheckSpecialProcPtr
-#define BLOCK         DMXBlockType
-
-/* End of interface definitions. */
-/*****************************************************************************/
-
-/** Read an event from the \a pDev device.  If the event is a motion
- * event, enqueue it with the \a motion function.  Otherwise, enqueue
- * the event with the \a enqueue function.  The \a block type is passed
- * to the functions so that they may block the input thread as appropriate
- * to the caller of this function.
- *
- * Since USB devices return EV_KEY events for buttons and keys, \a
- * minButton is used to decide if a Button or Key event should be
- * queued.*/
-void
-usbRead(DevicePtr pDev,
-        MOTIONPROC motion, ENQUEUEPROC enqueue, int minButton, BLOCK block)
-{
-    GETPRIV;
-    struct input_event raw;
-    int v[DMX_MAX_AXES];
-    int axis;
-
-#define PRESS(b)                                         \
-    do {                                                 \
-        enqueue(pDev, ButtonPress, 0, 0, NULL, block);   \
-    } while (0)
-
-#define RELEASE(b)                                       \
-    do {                                                 \
-        enqueue(pDev, ButtonRelease, 0, 0, NULL, block); \
-    } while (0)
-
-    while (read(priv->fd, &raw, sizeof(raw)) > 0) {
-#if USB_COMMON_DEBUG > 1
-        LOG3("USB: type = %d, code = 0x%02x, value = %d\n",
-             raw.type, raw.code, raw.value);
-#endif
-        switch (raw.type) {
-        case EV_KEY:
-            /* raw.value = 1 for first, 2 for repeat */
-            if (raw.code > minButton) {
-                if (raw.value)
-                    PRESS((raw.code & 0x0f) + 1);
-                else
-                    RELEASE((raw.code & 0x0f) + 1);
-            }
-            else {
-                enqueue(pDev, raw.value ? KeyPress : KeyRelease,
-                        0, 0, NULL, block);
-            }
-            break;
-        case EV_REL:
-            switch (raw.code) {
-            case REL_X:
-                v[0] = -raw.value;
-                v[1] = 0;
-                motion(pDev, v, 0, 2, DMX_RELATIVE, block);
-                break;
-            case REL_Y:
-                v[0] = 0;
-                v[1] = -raw.value;
-                motion(pDev, v, 0, 2, DMX_RELATIVE, block);
-                break;
-            case REL_WHEEL:
-                if ((int) raw.value > 0) {
-                    PRESS(4);
-                    RELEASE(4);
-                }
-                else if ((int) raw.value < 0) {
-                    PRESS(5);
-                    RELEASE(5);
-                }
-                break;
-            default:
-                memset(v, 0, sizeof(v));
-                axis = priv->relmap[raw.code];
-                v[axis] = raw.value;
-                motion(pDev, v, axis, 1, DMX_RELATIVE, block);
-            }
-            break;
-        case EV_ABS:
-            memset(v, 0, sizeof(v));
-            axis = priv->absmap[raw.code];
-            v[axis] = raw.value;
-            motion(pDev, v, axis, 1, DMX_ABSOLUTE, block);
-            break;
-        }
-    }
-}
-
-#define test_bit(bit)  (priv->mask[(bit)/8] & (1 << ((bit)%8)))
-#define test_bits(bit) (bits[(bit)/8] & (1 << ((bit)%8)))
-
-static void
-usbPrint(myPrivate * priv, const char *filename, const char *devname, int fd)
-{
-    int j, k;
-    DeviceIntPtr pDevice = priv->pDevice;
-    unsigned char bits[KEY_MAX / 8 + 1];        /* RATS: Use ok assuming that
-                                                 * KEY_MAX is greater than
-                                                 * REL_MAX, ABS_MAX, SND_MAX, and
-                                                 * LED_MAX. */
-
-    LOG3INPUT(priv, "%s (%s) using %s\n", pDevice->name, GETNAME, filename);
-    LOG1INPUT(priv, "    %s\n", devname);
-    for (j = 0; j < EV_MAX; j++) {
-        if (test_bit(j)) {
-            const char *type = "unknown";
-            char extra[256];    /* FIXME: may cause buffer overflow */
-
-            extra[0] = '\0';
-            switch (j) {
-            case EV_KEY:
-                type = "keys/buttons";
-                break;
-            case EV_REL:
-                type = "relative";
-                memset(bits, 0, sizeof(bits));
-                ioctl(priv->fd, EVIOCGBIT(EV_REL, sizeof(bits)), bits);
-                for (k = 0; k < REL_MAX; k++) {
-                    if (test_bits(k))
-                        switch (k) {
-                        case REL_X:
-                            strcat(extra, " X");
-                            break;
-                        case REL_Y:
-                            strcat(extra, " Y");
-                            break;
-                        case REL_Z:
-                            strcat(extra, " Z");
-                            break;
-                        case REL_HWHEEL:
-                            strcat(extra, " HWheel");
-                            break;
-                        case REL_DIAL:
-                            strcat(extra, " Dial");
-                            break;
-                        case REL_WHEEL:
-                            strcat(extra, " Wheel");
-                            break;
-                        case REL_MISC:
-                            strcat(extra, " Misc");
-                            break;
-                        }
-                }
-                break;
-            case EV_ABS:
-                type = "absolute";
-                memset(bits, 0, sizeof(bits));
-                ioctl(priv->fd, EVIOCGBIT(EV_ABS, sizeof(bits)), bits);
-                for (k = 0; k < ABS_MAX; k++) {
-                    if (test_bits(k))
-                        switch (k) {
-                        case ABS_X:
-                            strcat(extra, " X");
-                            break;
-                        case ABS_Y:
-                            strcat(extra, " Y");
-                            break;
-                        case ABS_Z:
-                            strcat(extra, " Z");
-                            break;
-                        case ABS_RX:
-                            strcat(extra, " RX");
-                            break;
-                        case ABS_RY:
-                            strcat(extra, " RY");
-                            break;
-                        case ABS_RZ:
-                            strcat(extra, " RZ");
-                            break;
-                        case ABS_THROTTLE:
-                            strcat(extra, " Throttle");
-                            break;
-                        case ABS_RUDDER:
-                            strcat(extra, " Rudder");
-                            break;
-                        case ABS_WHEEL:
-                            strcat(extra, " Wheel");
-                            break;
-                        case ABS_GAS:
-                            strcat(extra, " Gas");
-                            break;
-                        case ABS_BRAKE:
-                            strcat(extra, " Break");
-                            break;
-                        case ABS_HAT0X:
-                            strcat(extra, " Hat0X");
-                            break;
-                        case ABS_HAT0Y:
-                            strcat(extra, " Hat0Y");
-                            break;
-                        case ABS_HAT1X:
-                            strcat(extra, " Hat1X");
-                            break;
-                        case ABS_HAT1Y:
-                            strcat(extra, " Hat1Y");
-                            break;
-                        case ABS_HAT2X:
-                            strcat(extra, " Hat2X");
-                            break;
-                        case ABS_HAT2Y:
-                            strcat(extra, " Hat2Y");
-                            break;
-                        case ABS_HAT3X:
-                            strcat(extra, " Hat3X");
-                            break;
-                        case ABS_HAT3Y:
-                            strcat(extra, " Hat3Y");
-                            break;
-                        case ABS_PRESSURE:
-                            strcat(extra, " Pressure");
-                            break;
-                        case ABS_DISTANCE:
-                            strcat(extra, " Distance");
-                            break;
-                        case ABS_TILT_X:
-                            strcat(extra, " TiltX");
-                            break;
-                        case ABS_TILT_Y:
-                            strcat(extra, " TiltY");
-                            break;
-                        case ABS_MISC:
-                            strcat(extra, " Misc");
-                            break;
-                        }
-                }
-                break;
-            case EV_MSC:
-                type = "reserved";
-                break;
-            case EV_LED:
-                type = "leds";
-                memset(bits, 0, sizeof(bits));
-                ioctl(priv->fd, EVIOCGBIT(EV_LED, sizeof(bits)), bits);
-                for (k = 0; k < LED_MAX; k++) {
-                    if (test_bits(k))
-                        switch (k) {
-                        case LED_NUML:
-                            strcat(extra, " NumLock");
-                            break;
-                        case LED_CAPSL:
-                            strcat(extra, " CapsLock");
-                            break;
-                        case LED_SCROLLL:
-                            strcat(extra, " ScrlLock");
-                            break;
-                        case LED_COMPOSE:
-                            strcat(extra, " Compose");
-                            break;
-                        case LED_KANA:
-                            strcat(extra, " Kana");
-                            break;
-                        case LED_SLEEP:
-                            strcat(extra, " Sleep");
-                            break;
-                        case LED_SUSPEND:
-                            strcat(extra, " Suspend");
-                            break;
-                        case LED_MUTE:
-                            strcat(extra, " Mute");
-                            break;
-                        case LED_MISC:
-                            strcat(extra, " Misc");
-                            break;
-                        }
-                }
-                break;
-            case EV_SND:
-                type = "sound";
-                memset(bits, 0, sizeof(bits));
-                ioctl(priv->fd, EVIOCGBIT(EV_SND, sizeof(bits)), bits);
-                for (k = 0; k < SND_MAX; k++) {
-                    if (test_bits(k))
-                        switch (k) {
-                        case SND_CLICK:
-                            strcat(extra, " Click");
-                            break;
-                        case SND_BELL:
-                            strcat(extra, " Bell");
-                            break;
-                        }
-                }
-                break;
-            case EV_REP:
-                type = "repeat";
-                break;
-            case EV_FF:
-                type = "feedback";
-                break;
-            }
-            LOG5INPUT(priv, "    Feature 0x%02x = %s%s%s%s\n", j, type,
-                      extra[0] ? " [" : "",
-                      extra[0] ? extra + 1 : "", extra[0] ? "]" : "");
-        }
-    }
-}
-
-/** Initialized \a pDev as a \a usbMouse, \a usbKeyboard, or \a usbOther
-device. */
-void
-usbInit(DevicePtr pDev, usbType type)
-{
-    GETPRIV;
-    char name[64];              /* RATS: Only used in snprintf */
-    int i, j, k;
-    char buf[256] = { 0, };     /* RATS: Use ok */
-    int version;
-    unsigned char bits[KEY_MAX / 8 + 1];        /* RATS: Use ok assuming that
-                                                 * KEY_MAX is greater than
-                                                 * REL_MAX, ABS_MAX, SND_MAX, and
-                                                 * LED_MAX. */
-
-    if (priv->fd >= 0)
-        return;
-
-    for (i = 0; i < 32; i++) {
-        snprintf(name, sizeof(name), "/dev/input/event%d", i);
-        if ((priv->fd = open(name, O_RDWR | O_NONBLOCK, 0)) >= 0) {
-            ioctl(priv->fd, EVIOCGVERSION, &version);
-            ioctl(priv->fd, EVIOCGNAME(sizeof(buf)), buf);
-            memset(priv->mask, 0, sizeof(priv->mask));
-            ioctl(priv->fd, EVIOCGBIT(0, sizeof(priv->mask)), priv->mask);
-
-            for (j = 0; j < EV_MAX; j++) {
-                if (test_bit(j)) {
-                    switch (j) {
-                    case EV_REL:
-                        memset(bits, 0, sizeof(bits));
-                        ioctl(priv->fd, EVIOCGBIT(EV_REL, sizeof(bits)), bits);
-                        for (k = 0; k < REL_MAX; k++) {
-                            if (test_bits(k)) {
-                                if (k == REL_X)
-                                    priv->relmap[k] = 0;
-                                else if (k == REL_Y)
-                                    priv->relmap[k] = 1;
-                                else
-                                    priv->relmap[k] = 2 + priv->numAbs;
-                                ++priv->numRel;
-                            }
-                        }
-                        break;
-                    case EV_ABS:
-                        memset(bits, 0, sizeof(bits));
-                        ioctl(priv->fd, EVIOCGBIT(EV_ABS, sizeof(bits)), bits);
-                        for (k = 0; k < ABS_MAX; k++) {
-                            if (test_bits(k)) {
-                                priv->absmap[k] = priv->numAbs;
-                                ++priv->numAbs;
-                            }
-                        }
-                        break;
-                    case EV_LED:
-                        memset(bits, 0, sizeof(bits));
-                        ioctl(priv->fd, EVIOCGBIT(EV_LED, sizeof(bits)), bits);
-                        for (k = 0; k < LED_MAX; k++) {
-                            if (test_bits(k))
-                                ++priv->numLeds;
-                        }
-                        break;
-                    }
-                }
-            }
-            switch (type) {
-            case usbMouse:
-                if (test_bit(EV_REL) && test_bit(EV_KEY))
-                    goto found;
-                break;
-            case usbKeyboard:
-                if (test_bit(EV_KEY) && test_bit(EV_LED) && !test_bit(EV_ABS))
-                    goto found;
-                break;
-            case usbOther:
-                if (!(test_bit(EV_REL) && test_bit(EV_KEY))
-                    && !(test_bit(EV_KEY) && test_bit(EV_LED)
-                         && !test_bit(EV_ABS)))
-                    goto found;
-                break;
-            }
-            close(priv->fd);
-            priv->fd = -1;
-        }
-    }
-    if (priv->fd < 0)
-        FATAL1("usbInit: Cannot open /dev/input/event* port (%s)\n"
-               "         If you have not done so, you may need to:\n"
-               "           rmmod mousedev; rmmod keybdev\n"
-               "           modprobe evdev\n", strerror(errno));
- found:
-    usbPrint(priv, name, buf, priv->fd);
-}
-
-/** Turn \a pDev off (i.e., stop taking input from \a pDev). */
-void
-usbOff(DevicePtr pDev)
-{
-    GETPRIV;
-
-    if (priv->fd >= 0)
-        close(priv->fd);
-    priv->fd = -1;
-}
-
-/** Create a private structure for use within this file. */
-void *
-usbCreatePrivate(DeviceIntPtr pDevice)
-{
-    myPrivate *priv = calloc(1, sizeof(*priv));
-
-    priv->fd = -1;
-    priv->pDevice = pDevice;
-    return priv;
-}
-
-/** Destroy a private structure. */
-void
-usbDestroyPrivate(void *priv)
-{
-    free(priv);
-}
diff --git a/hw/dmx/input/usb-common.h b/hw/dmx/input/usb-common.h
deleted file mode 100644
index 7159376..0000000
--- a/hw/dmx/input/usb-common.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright 2002 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-/** \file
- * Interface to common USB support.  \see usb-common.c \see usb-mouse.c
- * \see usb-keyboard.c \see usb-other.c */
-
-#ifndef _USB_COMMON_H_
-#define _USB_COMMON_H_
-typedef enum {
-    usbMouse,
-    usbKeyboard,
-    usbOther
-} usbType;
-
-extern void *usbCreatePrivate(DeviceIntPtr pDevice);
-extern void usbDestroyPrivate(void *priv);
-extern void usbRead(DevicePtr pDev,
-                    dmxMotionProcPtr motion,
-                    dmxEnqueueProcPtr enqueue,
-                    int minButton, DMXBlockType block);
-extern void usbInit(DevicePtr pDev, usbType type);
-extern void usbOff(DevicePtr pDev);
-#endif
diff --git a/hw/dmx/input/usb-keyboard.c b/hw/dmx/input/usb-keyboard.c
deleted file mode 100644
index b26c822..0000000
--- a/hw/dmx/input/usb-keyboard.c
+++ /dev/null
@@ -1,478 +0,0 @@
-/* Portions of this file were derived from the following files:
- *
- **********************************************************************
- *
- * xfree86/common/xf86KbdLnx.c
- *
- * Linux version of keymapping setup. The kernel (since 0.99.14) has support
- * for fully remapping the keyboard, but there are some differences between
- * the Linux map and the SVR4 map (esp. in the extended keycodes). We also
- * remove the restriction on what keycodes can be remapped.
- * Orest Zborowski.
- *
- * Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany.
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of Thomas Roell not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission.  Thomas Roell makes no representations
- * about the suitability of this software for any purpose.  It is provided
- * "as is" without express or implied warranty.
- *
- * THOMAS ROELL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL THOMAS ROELL BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- *
- */
-
-/*
- * Copyright 2001,2002 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-/** \file
- *
- * This code implements a low-level device driver for a USB keyboard
- * under Linux.  The keymap description is derived from code by Thomas
- * Roell, Orest Zborowski. */
-
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#include "atKeynames.h"
-#include "usb-private.h"
-
-#define USB_KEYBOARD_DEBUG 0
-
-/*****************************************************************************/
-/* Define some macros to make it easier to move this file to another
- * part of the Xserver tree.  All calls to the dmx* layer are #defined
- * here for the .c file.  The .h file will also have to be edited. */
-#include "usb-keyboard.h"
-#include <xkbsrv.h>
-
-#define GETPRIV       myPrivate *priv                            \
-                      = ((DMXLocalInputInfoPtr)(pDev->devicePrivate))->private
-
-#define LOG0(f)       dmxLog(dmxDebug,f)
-#define LOG1(f,a)     dmxLog(dmxDebug,f,a)
-#define LOG2(f,a,b)   dmxLog(dmxDebug,f,a,b)
-#define LOG3(f,a,b,c) dmxLog(dmxDebug,f,a,b,c)
-#define FATAL0(f)     dmxLog(dmxFatal,f)
-#define FATAL1(f,a)   dmxLog(dmxFatal,f,a)
-#define FATAL2(f,a,b) dmxLog(dmxFatal,f,a,b)
-#define MOTIONPROC    dmxMotionProcPtr
-#define ENQUEUEPROC   dmxEnqueueProcPtr
-#define CHECKPROC     dmxCheckSpecialProcPtr
-#define BLOCK         DMXBlockType
-
-/* End of interface definitions. */
-/*****************************************************************************/
-
-#define GLYPHS_PER_KEY	4
-#define NUM_KEYCODES	248
-#define MIN_KEYCODE     8
-#define MAX_KEYCODE     (NUM_KEYCODES + MIN_KEYCODE - 1)
-
-static KeySym map[NUM_KEYCODES * GLYPHS_PER_KEY] = {
-/* Table modified from xc/programs/Xserver/hw/xfree86/common/xf86Keymap.h */
-    /* 0x00 */ NoSymbol, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x01 */ XK_Escape, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x02 */ XK_1, XK_exclam, NoSymbol, NoSymbol,
-    /* 0x03 */ XK_2, XK_at, NoSymbol, NoSymbol,
-    /* 0x04 */ XK_3, XK_numbersign, NoSymbol, NoSymbol,
-    /* 0x05 */ XK_4, XK_dollar, NoSymbol, NoSymbol,
-    /* 0x06 */ XK_5, XK_percent, NoSymbol, NoSymbol,
-    /* 0x07 */ XK_6, XK_asciicircum, NoSymbol, NoSymbol,
-    /* 0x08 */ XK_7, XK_ampersand, NoSymbol, NoSymbol,
-    /* 0x09 */ XK_8, XK_asterisk, NoSymbol, NoSymbol,
-    /* 0x0a */ XK_9, XK_parenleft, NoSymbol, NoSymbol,
-    /* 0x0b */ XK_0, XK_parenright, NoSymbol, NoSymbol,
-    /* 0x0c */ XK_minus, XK_underscore, NoSymbol, NoSymbol,
-    /* 0x0d */ XK_equal, XK_plus, NoSymbol, NoSymbol,
-    /* 0x0e */ XK_BackSpace, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x0f */ XK_Tab, XK_ISO_Left_Tab, NoSymbol, NoSymbol,
-    /* 0x10 */ XK_Q, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x11 */ XK_W, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x12 */ XK_E, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x13 */ XK_R, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x14 */ XK_T, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x15 */ XK_Y, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x16 */ XK_U, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x17 */ XK_I, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x18 */ XK_O, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x19 */ XK_P, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x1a */ XK_bracketleft, XK_braceleft, NoSymbol, NoSymbol,
-    /* 0x1b */ XK_bracketright, XK_braceright, NoSymbol, NoSymbol,
-    /* 0x1c */ XK_Return, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x1d */ XK_Control_L, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x1e */ XK_A, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x1f */ XK_S, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x20 */ XK_D, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x21 */ XK_F, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x22 */ XK_G, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x23 */ XK_H, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x24 */ XK_J, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x25 */ XK_K, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x26 */ XK_L, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x27 */ XK_semicolon, XK_colon, NoSymbol, NoSymbol,
-    /* 0x28 */ XK_quoteright, XK_quotedbl, NoSymbol, NoSymbol,
-    /* 0x29 */ XK_quoteleft, XK_asciitilde, NoSymbol, NoSymbol,
-    /* 0x2a */ XK_Shift_L, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x2b */ XK_backslash, XK_bar, NoSymbol, NoSymbol,
-    /* 0x2c */ XK_Z, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x2d */ XK_X, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x2e */ XK_C, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x2f */ XK_V, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x30 */ XK_B, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x31 */ XK_N, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x32 */ XK_M, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x33 */ XK_comma, XK_less, NoSymbol, NoSymbol,
-    /* 0x34 */ XK_period, XK_greater, NoSymbol, NoSymbol,
-    /* 0x35 */ XK_slash, XK_question, NoSymbol, NoSymbol,
-    /* 0x36 */ XK_Shift_R, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x37 */ XK_KP_Multiply, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x38 */ XK_Alt_L, XK_Meta_L, NoSymbol, NoSymbol,
-    /* 0x39 */ XK_space, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x3a */ XK_Caps_Lock, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x3b */ XK_F1, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x3c */ XK_F2, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x3d */ XK_F3, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x3e */ XK_F4, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x3f */ XK_F5, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x40 */ XK_F6, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x41 */ XK_F7, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x42 */ XK_F8, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x43 */ XK_F9, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x44 */ XK_F10, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x45 */ XK_Num_Lock, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x46 */ XK_Scroll_Lock, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x47 */ XK_KP_Home, XK_KP_7, NoSymbol, NoSymbol,
-    /* 0x48 */ XK_KP_Up, XK_KP_8, NoSymbol, NoSymbol,
-    /* 0x49 */ XK_KP_Prior, XK_KP_9, NoSymbol, NoSymbol,
-    /* 0x4a */ XK_KP_Subtract, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x4b */ XK_KP_Left, XK_KP_4, NoSymbol, NoSymbol,
-    /* 0x4c */ XK_KP_Begin, XK_KP_5, NoSymbol, NoSymbol,
-    /* 0x4d */ XK_KP_Right, XK_KP_6, NoSymbol, NoSymbol,
-    /* 0x4e */ XK_KP_Add, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x4f */ XK_KP_End, XK_KP_1, NoSymbol, NoSymbol,
-    /* 0x50 */ XK_KP_Down, XK_KP_2, NoSymbol, NoSymbol,
-    /* 0x51 */ XK_KP_Next, XK_KP_3, NoSymbol, NoSymbol,
-    /* 0x52 */ XK_KP_Insert, XK_KP_0, NoSymbol, NoSymbol,
-    /* 0x53 */ XK_KP_Delete, XK_KP_Decimal, NoSymbol, NoSymbol,
-    /* 0x54 */ XK_Sys_Req, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x55 */ NoSymbol, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x56 */ XK_less, XK_greater, NoSymbol, NoSymbol,
-    /* 0x57 */ XK_F11, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x58 */ XK_F12, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x59 */ NoSymbol, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x5a */ NoSymbol, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x5b */ NoSymbol, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x5c */ NoSymbol, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x5d */ XK_Begin, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x5e */ NoSymbol, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x5f */ NoSymbol, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x60 */ XK_KP_Enter, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x61 */ XK_Control_R, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x62 */ XK_KP_Divide, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x63 */ XK_Print, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x64 */ XK_Alt_R, XK_Meta_R, NoSymbol, NoSymbol,
-    /* 0x65 */ XK_Break, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x66 */ XK_Home, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x67 */ XK_Up, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x68 */ XK_Prior, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x69 */ XK_Left, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x6a */ XK_Right, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x6b */ XK_End, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x6c */ XK_Down, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x6d */ XK_Next, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x6e */ XK_Insert, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x6f */ XK_Delete, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x70 */ NoSymbol, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x71 */ NoSymbol, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x72 */ NoSymbol, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x73 */ NoSymbol, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x74 */ NoSymbol, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x75 */ NoSymbol, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x76 */ NoSymbol, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x77 */ XK_Pause, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x78 */ NoSymbol, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x79 */ NoSymbol, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x7a */ XK_Menu, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x7b */ NoSymbol, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x7c */ NoSymbol, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x7d */ XK_Super_L, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x7e */ XK_Super_R, NoSymbol, NoSymbol, NoSymbol,
-    /* 0x7f */ XK_Menu, NoSymbol, NoSymbol, NoSymbol,
-};
-
-static int
-kbdUSBKeyDown(myPrivate * priv, int keyCode)
-{
-    CARD8 byte = keyCode >> 5;
-    CARD32 bit = 1 << (keyCode & 0x1f);
-
-    if (byte > NUM_STATE_ENTRIES)
-        return 0;
-    return priv->kbdState[byte] & bit;
-}
-
-static void
-kbdUSBKeyState(myPrivate * priv, int type, int keyCode)
-{
-    CARD8 byte = keyCode >> 5;
-    CARD32 bit = 1 << (keyCode & 0x1f);
-
-    if (byte > NUM_STATE_ENTRIES)
-        return;
-    if (type == KeyPress)
-        priv->kbdState[byte] |= bit;
-    else
-        priv->kbdState[byte] &= ~bit;
-}
-
-/** Set the LEDs. */
-void
-kbdUSBCtrl(DevicePtr pDev, KeybdCtrl * ctrl)
-{
-    GETPRIV;
-    struct timeval tv;
-    struct input_event event;
-    int i, led;
-
-    gettimeofday(&tv, NULL);
-    for (i = 0; i < 5; i++) {
-        event.time.tv_sec = tv.tv_sec;
-        event.time.tv_usec = tv.tv_usec;
-        event.type = EV_LED;
-        if (i == 0)
-            led = 1;            /* LED_CAPSL == 0x01 */
-        else if (i == 1)
-            led = 0;            /* LED_NUML  == 0x00 */
-        else
-            led = i;
-        event.code = led;
-        event.value = ! !(ctrl->leds & (1 << led));
-        if (write(priv->fd, &event, sizeof(event)) != sizeof(event))
-            DebugF("Failed to set LEDs!\n");
-    }
-}
-
-/** Initialize \a pDev using #usbInit. */
-void
-kbdUSBInit(DevicePtr pDev)
-{
-    usbInit(pDev, usbKeyboard);
-}
-
-static void
-kbdUSBConvert(DevicePtr pDev,
-              unsigned int scanCode,
-              int value,
-              ENQUEUEPROC enqueue, CHECKPROC checkspecial, BLOCK block)
-{
-    GETPRIV;
-    XkbSrvInfoPtr xkbi = priv->pKeyboard->key->xkbInfo;
-    int type;
-    int keyCode;
-    KeySym keySym = NoSymbol;
-    int switching;
-
-    /* Set up xEvent information */
-    type = value ? KeyPress : KeyRelease;
-    keyCode = (scanCode & 0xff) + MIN_KEYCODE;
-
-    /* Handle repeats */
-
-    if (keyCode >= xkbi->desc->min_key_code &&
-        keyCode <= xkbi->desc->max_key_code) {
-
-        int effectiveGroup = XkbGetEffectiveGroup(xkbi,
-                                                  &xkbi->state,
-                                                  scanCode);
-
-        keySym = XkbKeySym(xkbi->desc, scanCode, effectiveGroup);
-#if 0
-        switch (keySym) {
-        case XK_Num_Lock:
-        case XK_Scroll_Lock:
-        case XK_Shift_Lock:
-        case XK_Caps_Lock:
-            /* Ignore releases and all but first press */
-            if (kbdLinuxModIgnore(priv, &xE, keySym))
-                return;
-            if (kbdLinuxKeyDown(priv, &xE))
-                xE.u.u.type = KeyRelease;
-            else
-                xE.u.u.type = KeyPress;
-            break;
-        }
-#endif
-
-        /* If key is already down, ignore or autorepeat */
-        if (type == KeyPress && kbdUSBKeyDown(priv, keyCode)) {
-            KbdFeedbackClassRec *feed = priv->pDevice->kbdfeed;
-
-            /* No auto-repeat? */
-            if ((feed && !feed->ctrl.autoRepeat)
-                || priv->pDevice->key->xkbInfo->desc->map->modmap[keyCode]
-                || (feed && !(feed->ctrl.autoRepeats[keyCode >> 3]
-                              & (1 << (keyCode & 7)))))
-                return;         /* Ignore */
-
-            /* Do auto-repeat */
-            enqueue(pDev, KeyRelease, keyCode, keySym, NULL, block);
-            type = KeyPress;
-        }
-
-        /* If key is already up, ignore */
-        if (type == KeyRelease && !kbdUSBKeyDown(priv, keyCode))
-            return;
-    }
-
-    switching = 0;
-    if (checkspecial && type == KeyPress)
-        switching = checkspecial(pDev, keySym);
-    if (!switching) {
-        if (enqueue)
-            enqueue(pDev, type, keyCode, keySym, NULL, block);
-        kbdUSBKeyState(priv, type, keyCode);    /* Update our state bitmap */
-    }
-}
-
-/** Read an event from the \a pDev device.  If the event is a motion
- * event, enqueue it with the \a motion function.  Otherwise, check for
- * special keys with the \a checkspecial function and enqueue the event
- * with the \a enqueue function.  The \a block type is passed to the
- * functions so that they may block the input thread as appropriate to the
- * caller of this function. */
-void
-kbdUSBRead(DevicePtr pDev,
-           MOTIONPROC motion,
-           ENQUEUEPROC enqueue, CHECKPROC checkspecial, BLOCK block)
-{
-    GETPRIV;
-    struct input_event raw;
-
-    while (read(priv->fd, &raw, sizeof(raw)) > 0) {
-#if USB_KEYBOARD_DEBUG
-        LOG3("KBD: type = %d, code = 0x%02x, value = %d\n",
-             raw.type, raw.code, raw.value);
-#endif
-        kbdUSBConvert(pDev, raw.code, raw.value, enqueue, checkspecial, block);
-    }
-}
-
-/** Turn \a pDev on (i.e., take input from \a pDev). */
-int
-kbdUSBOn(DevicePtr pDev)
-{
-    GETPRIV;
-
-    if (priv->fd < 0)
-        kbdUSBInit(pDev);
-    return priv->fd;
-}
-
-static void
-kbdUSBGetMap(DevicePtr pDev, KeySymsPtr pKeySyms, CARD8 *pModMap)
-{
-    KeySym *k, *mapCopy;
-    int i;
-
-    mapCopy = malloc(sizeof(map));
-    memcpy(mapCopy, map, sizeof(map));
-
-    /* compute the modifier map */
-    for (i = 0; i < MAP_LENGTH; i++)
-        pModMap[i] = NoSymbol;  /* make sure it is restored */
-
-    for (k = mapCopy, i = MIN_KEYCODE;
-         i < NUM_KEYCODES + MIN_KEYCODE; i++, k += 4) {
-        switch (*k) {
-        case XK_Shift_L:
-        case XK_Shift_R:
-            pModMap[i] = ShiftMask;
-            break;
-        case XK_Control_L:
-        case XK_Control_R:
-            pModMap[i] = ControlMask;
-            break;
-        case XK_Caps_Lock:
-            pModMap[i] = LockMask;
-            break;
-        case XK_Alt_L:
-        case XK_Alt_R:
-            pModMap[i] = AltMask;
-            break;
-        case XK_Num_Lock:
-            pModMap[i] = NumLockMask;
-            break;
-        case XK_Scroll_Lock:
-            pModMap[i] = ScrollLockMask;
-            break;
-        case XK_Kana_Lock:
-        case XK_Kana_Shift:
-            pModMap[i] = KanaMask;
-            break;
-        case XK_Mode_switch:
-            pModMap[i] = AltLangMask;
-            break;
-        }
-    }
-
-    pKeySyms->map = mapCopy;    /* Must be XFree'able */
-    pKeySyms->mapWidth = GLYPHS_PER_KEY;
-    pKeySyms->minKeyCode = MIN_KEYCODE;
-    pKeySyms->maxKeyCode = MAX_KEYCODE;
-}
-
-/** Fill the \a info structure with information needed to initialize \a
- * pDev. */
-void
-kbdUSBGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info)
-{
-    info->keyboard = 1;
-    info->keyClass = 1;
-    kbdUSBGetMap(pDev, &info->keySyms, info->modMap);
-    info->focusClass = 1;
-    info->kbdFeedbackClass = 1;
-    info->names.keycodes = strdup("powerpcps2");
-    info->force = 1;
-}
diff --git a/hw/dmx/input/usb-keyboard.h b/hw/dmx/input/usb-keyboard.h
deleted file mode 100644
index e14cca1..0000000
--- a/hw/dmx/input/usb-keyboard.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright 2002 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-/** \file
- * Interface to USB keyboard driver. \see usb-keyboard.c \see usb-common.c */
-
-#ifndef _USB_KEYBOARD_H_
-#define _USB_KEYBOARD_H_
-extern void kbdUSBInit(DevicePtr pDev);
-extern void kbdUSBGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info);
-extern int kbdUSBOn(DevicePtr pDev);
-extern void kbdUSBRead(DevicePtr pDev,
-                       dmxMotionProcPtr motion,
-                       dmxEnqueueProcPtr enqueue,
-                       dmxCheckSpecialProcPtr checkspecial, DMXBlockType block);
-extern void kbdUSBCtrl(DevicePtr pDev, KeybdCtrl * ctrl);
-#endif
diff --git a/hw/dmx/input/usb-mouse.c b/hw/dmx/input/usb-mouse.c
deleted file mode 100644
index 644342e..0000000
--- a/hw/dmx/input/usb-mouse.c
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * Copyright 2002 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-/** \file
- *
- * This code implements a low-level device driver for a USB mouse. */
-
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#include "usb-private.h"
-
-/*****************************************************************************/
-/* Define some macros to make it easier to move this file to another
- * part of the Xserver tree.  All calls to the dmx* layer are #defined
- * here for the .c file.  The .h file will also have to be edited. */
-#include "usb-mouse.h"
-
-#define GETPRIV       myPrivate *priv                            \
-                      = ((DMXLocalInputInfoPtr)(pDev->devicePrivate))->private
-
-#define LOG0(f)       dmxLog(dmxDebug,f)
-#define LOG1(f,a)     dmxLog(dmxDebug,f,a)
-#define LOG2(f,a,b)   dmxLog(dmxDebug,f,a,b)
-#define LOG3(f,a,b,c) dmxLog(dmxDebug,f,a,b,c)
-#define FATAL0(f)     dmxLog(dmxFatal,f)
-#define FATAL1(f,a)   dmxLog(dmxFatal,f,a)
-#define FATAL2(f,a,b) dmxLog(dmxFatal,f,a,b)
-#define MOTIONPROC    dmxMotionProcPtr
-#define ENQUEUEPROC   dmxEnqueueProcPtr
-#define CHECKPROC     dmxCheckSpecialProcPtr
-#define BLOCK         DMXBlockType
-
-/* End of interface definitions. */
-/*****************************************************************************/
-
-/** Read the USB device using #usbRead. */
-void
-mouUSBRead(DevicePtr pDev,
-           MOTIONPROC motion,
-           ENQUEUEPROC enqueue, CHECKPROC checkspecial, BLOCK block)
-{
-    usbRead(pDev, motion, enqueue, BTN_MISC, block);
-}
-
-/** Initialize \a pDev using #usbInit. */
-void
-mouUSBInit(DevicePtr pDev)
-{
-    usbInit(pDev, usbMouse);
-}
-
-/** Turn \a pDev on (i.e., take input from \a pDev). */
-int
-mouUSBOn(DevicePtr pDev)
-{
-    GETPRIV;
-
-    if (priv->fd < 0)
-        mouUSBInit(pDev);
-    return priv->fd;
-}
-
-static void
-mouUSBGetMap(DevicePtr pDev, unsigned char *map, int *nButtons)
-{
-    int i;
-
-    if (nButtons)
-        *nButtons = 5;
-    if (map)
-        for (i = 0; i <= *nButtons; i++)
-            map[i] = i;
-}
-
-/** Fill the \a info structure with information needed to initialize \a
- * pDev. */
-void
-mouUSBGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info)
-{
-    static KeySym keyboard_mapping = NoSymbol;
-
-    info->buttonClass = 1;
-    mouUSBGetMap(pDev, info->map, &info->numButtons);
-    info->valuatorClass = 1;
-    info->numRelAxes = 2;
-    info->minval[0] = 0;
-    info->maxval[0] = 0;
-    info->res[0] = 1;
-    info->minres[0] = 0;
-    info->maxres[0] = 1;
-    info->ptrFeedbackClass = 1;
-
-    /* Some USB mice devices return key
-     * events from their pair'd
-     * keyboard...  */
-    info->keyClass = 1;
-    info->keySyms.minKeyCode = 8;
-    info->keySyms.maxKeyCode = 8;
-    info->keySyms.mapWidth = 1;
-    info->keySyms.map = &keyboard_mapping;
-}
diff --git a/hw/dmx/input/usb-mouse.h b/hw/dmx/input/usb-mouse.h
deleted file mode 100644
index 91f6fcf..0000000
--- a/hw/dmx/input/usb-mouse.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright 2002 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-/** \file
- * Interface to USB mouse driver.  \see usb-mouse.c \see usb-common.c */
-
-#ifndef _USB_MOU_H_
-#define _USB_MOU_H_
-extern void mouUSBRead(DevicePtr pDev,
-                       dmxMotionProcPtr motion,
-                       dmxEnqueueProcPtr enqueue,
-                       dmxCheckSpecialProcPtr checkspecial, DMXBlockType block);
-extern void mouUSBInit(DevicePtr pDev);
-extern void mouUSBGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info);
-extern int mouUSBOn(DevicePtr pDev);
-extern void mouUSBCtrl(DevicePtr pDev, PtrCtrl * ctrl);
-#endif
diff --git a/hw/dmx/input/usb-other.c b/hw/dmx/input/usb-other.c
deleted file mode 100644
index f24f259..0000000
--- a/hw/dmx/input/usb-other.c
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * Copyright 2002 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-/** \file
- *
- * This code implements a low-level device driver for a non-keyboard,
- * non-mouse USB device (e.g., a joystick or gamepad). */
-
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#include "usb-private.h"
-
-/*****************************************************************************/
-/* Define some macros to make it easier to move this file to another
- * part of the Xserver tree.  All calls to the dmx* layer are #defined
- * here for the .c file.  The .h file will also have to be edited. */
-#include "dmxinputinit.h"
-#include "usb-other.h"
-
-#define GETPRIV       myPrivate *priv                            \
-                      = ((DMXLocalInputInfoPtr)(pDev->devicePrivate))->private
-
-#define LOG0(f)       dmxLog(dmxDebug,f)
-#define LOG1(f,a)     dmxLog(dmxDebug,f,a)
-#define LOG2(f,a,b)   dmxLog(dmxDebug,f,a,b)
-#define LOG3(f,a,b,c) dmxLog(dmxDebug,f,a,b,c)
-#define FATAL0(f)     dmxLog(dmxFatal,f)
-#define FATAL1(f,a)   dmxLog(dmxFatal,f,a)
-#define FATAL2(f,a,b) dmxLog(dmxFatal,f,a,b)
-#define MOTIONPROC    dmxMotionProcPtr
-#define ENQUEUEPROC   dmxEnqueueProcPtr
-#define CHECKPROC     dmxCheckSpecialProcPtr
-#define BLOCK         DMXBlockType
-
-/* End of interface definitions. */
-/*****************************************************************************/
-
-/** Read the USB device using #usbRead. */
-void
-othUSBRead(DevicePtr pDev,
-           MOTIONPROC motion,
-           ENQUEUEPROC enqueue, CHECKPROC checkspecial, BLOCK block)
-{
-    usbRead(pDev, motion, enqueue, 0xffff, block);
-}
-
-/** Initialize \a pDev using #usbInit. */
-void
-othUSBInit(DevicePtr pDev)
-{
-    usbInit(pDev, usbOther);
-}
-
-/** Turn \a pDev on (i.e., take input from \a pDev). */
-int
-othUSBOn(DevicePtr pDev)
-{
-    GETPRIV;
-
-    if (priv->fd < 0)
-        othUSBInit(pDev);
-    return priv->fd;
-}
-
-/** Fill the \a info structure with information needed to initialize \a
- * pDev. */
-void
-othUSBGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info)
-{
-    GETPRIV;
-    int i, j;
-    static KeySym keyboard_mapping = NoSymbol;
-    int absolute[5];
-
-#define test_bit(bit) (priv->mask[(bit)/8] & (1 << ((bit)%8)))
-
-    /* Some USB mice devices return key
-     * events from their pair'd
-     * keyboard...  */
-    info->keyClass = 1;
-    info->keySyms.minKeyCode = 8;
-    info->keySyms.maxKeyCode = 8;
-    info->keySyms.mapWidth = 1;
-    info->keySyms.map = &keyboard_mapping;
-
-    for (i = 0; i < EV_MAX; i++) {
-        if (test_bit(i)) {
-            switch (i) {
-            case EV_KEY:
-                /* See above */
-                break;
-            case EV_REL:
-                info->valuatorClass = 1;
-                if (info->numRelAxes + info->numAbsAxes > DMX_MAX_AXES - 1) {
-                    info->numRelAxes = DMX_MAX_AXES - info->numAbsAxes - 1;
-                    dmxLog(dmxWarning, "Can only use %d relative axes\n",
-                           info->numRelAxes);
-                }
-                else
-                    info->numRelAxes = priv->numRel;
-                info->minval[0] = 0;
-                info->maxval[0] = 0;
-                info->res[0] = 1;
-                info->minres[0] = 0;
-                info->maxres[0] = 1;
-                break;
-            case EV_ABS:
-                info->valuatorClass = 1;
-                if (info->numRelAxes + info->numAbsAxes > DMX_MAX_AXES - 1) {
-                    info->numAbsAxes = DMX_MAX_AXES - info->numRelAxes - 1;
-                    dmxLog(dmxWarning, "Can only use %d absolute axes\n",
-                           info->numAbsAxes);
-                }
-                else
-                    info->numAbsAxes = priv->numAbs;
-                for (j = 0; j < info->numAbsAxes; j++) {
-                    ioctl(priv->fd, EVIOCGABS(j), absolute);
-                    info->minval[1 + j] = absolute[1];
-                    info->maxval[1 + j] = absolute[2];
-                    info->res[1 + j] = absolute[3];
-                    info->minres[1 + j] = absolute[3];
-                    info->maxres[1 + j] = absolute[3];
-                }
-                break;
-            case EV_LED:
-                info->ledFeedbackClass = 0;     /* Not supported at this time */
-                break;
-            case EV_SND:
-                info->belFeedbackClass = 0;     /* Not supported at this time */
-                break;
-            }
-        }
-    }
-}
diff --git a/hw/dmx/input/usb-other.h b/hw/dmx/input/usb-other.h
deleted file mode 100644
index 89939a0..0000000
--- a/hw/dmx/input/usb-other.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright 2002 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-/** \file
- * Interface to USB generic driver.  \see usb-other.c \see usb-common.c */
-
-#ifndef _USB_OTHER_H_
-#define _USB_OTHER_H_
-extern void othUSBRead(DevicePtr pDev,
-                       dmxMotionProcPtr motion,
-                       dmxEnqueueProcPtr enqueue,
-                       dmxCheckSpecialProcPtr checkspecial, DMXBlockType block);
-extern void othUSBInit(DevicePtr pDev);
-extern void othUSBGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info);
-extern int othUSBOn(DevicePtr pDev);
-extern void othUSBCtrl(DevicePtr pDev, PtrCtrl * ctrl);
-#endif
diff --git a/hw/dmx/input/usb-private.h b/hw/dmx/input/usb-private.h
deleted file mode 100644
index 2ecfdf6..0000000
--- a/hw/dmx/input/usb-private.h
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Copyright 2002 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- *   Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-/** \file
- * Private header file for USB support.  This file provides
- * Linux-specific include files and the definition of the private
- * structure.  \see usb-common.c \see usb-keyboard.c \see usb-mouse.c
- * \see usb-other.c */
-
-#ifndef _USB_PRIVATE_H_
-#define _USB_PRIVATE_H_
-
-#include "dmxinputinit.h"
-#include "inputstr.h"
-#include <X11/Xos.h>
-#include <errno.h>
-#include <linux/input.h>
-#include "usb-common.h"
-
-                                /*  Support for force feedback was
-                                 *  introduced in Linxu 2.4.10 */
-#ifndef EV_MSC
-#define EV_MSC      0x04
-#endif
-#ifndef EV_FF
-#define EV_FF       0x15
-#endif
-#ifndef LED_SLEEP
-#define LED_SLEEP   0x05
-#endif
-#ifndef LED_SUSPEND
-#define LED_SUSPEND 0x06
-#endif
-#ifndef LED_MUTE
-#define LED_MUTE    0x07
-#endif
-#ifndef LED_MISC
-#define LED_MISC    0x08
-#endif
-#ifndef BTN_DEAD
-#define BTN_DEAD    0x12f
-#endif
-#ifndef BTN_THUMBL
-#define BTN_THUMBL  0x13d
-#endif
-#ifndef BTN_THUMBR
-#define BTN_THUMBR  0x13e
-#endif
-#ifndef MSC_SERIAL
-#define MSC_SERIAL  0x00
-#endif
-#ifndef MSC_MAX
-#define MSC_MAX     0x07
-#endif
-
-                                /* Support for older kernels. */
-#ifndef ABS_WHEEL
-#define ABS_WHEEL   0x08
-#endif
-#ifndef ABS_GAS
-#define ABS_GAS     0x09
-#endif
-#ifndef ABS_BRAKE
-#define ABS_BRAKE   0x0a
-#endif
-
-#define NUM_STATE_ENTRIES (256/32)
-
-/* Private area for USB devices. */
-typedef struct _myPrivate {
-    DeviceIntPtr pDevice;                   /**< Device (mouse or other) */
-    int fd;                                 /**< File descriptor */
-    unsigned char mask[EV_MAX / 8 + 1];     /**< Mask */
-    int numRel, numAbs, numLeds;            /**< Counts */
-    int relmap[REL_CNT];                    /**< Relative axis map */
-    int absmap[ABS_CNT];                    /**< Absolute axis map */
-
-    CARD32 kbdState[NUM_STATE_ENTRIES];         /**< Keyboard state */
-    DeviceIntPtr pKeyboard;                     /** Keyboard device */
-
-    int pitch;                  /**< Bell pitch  */
-    unsigned long duration;     /**< Bell duration */
-
-    /* FIXME: dmxInput is never initialized */
-    DMXInputInfo *dmxInput;     /**< For pretty-printing */
-} myPrivate;
-#endif
diff --git a/hw/dmx/man/Makefile.am b/hw/dmx/man/Makefile.am
deleted file mode 100644
index e717aef..0000000
--- a/hw/dmx/man/Makefile.am
+++ /dev/null
@@ -1,2 +0,0 @@
-include $(top_srcdir)/manpages.am
-appman_PRE = Xdmx.man
diff --git a/hw/dmx/man/Makefile.in b/hw/dmx/man/Makefile.in
deleted file mode 100644
index b632d6e..0000000
--- a/hw/dmx/man/Makefile.in
+++ /dev/null
@@ -1,848 +0,0 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
-
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-VPATH = @srcdir@
-am__is_gnu_make = { \
-  if test -z '$(MAKELEVEL)'; then \
-    false; \
-  elif test -n '$(MAKE_HOST)'; then \
-    true; \
-  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
-    true; \
-  else \
-    false; \
-  fi; \
-}
-am__make_running_with_option = \
-  case $${target_option-} in \
-      ?) ;; \
-      *) echo "am__make_running_with_option: internal error: invalid" \
-              "target option '$${target_option-}' specified" >&2; \
-         exit 1;; \
-  esac; \
-  has_opt=no; \
-  sane_makeflags=$$MAKEFLAGS; \
-  if $(am__is_gnu_make); then \
-    sane_makeflags=$$MFLAGS; \
-  else \
-    case $$MAKEFLAGS in \
-      *\\[\ \	]*) \
-        bs=\\; \
-        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
-          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
-    esac; \
-  fi; \
-  skip_next=no; \
-  strip_trailopt () \
-  { \
-    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
-  }; \
-  for flg in $$sane_makeflags; do \
-    test $$skip_next = yes && { skip_next=no; continue; }; \
-    case $$flg in \
-      *=*|--*) continue;; \
-        -*I) strip_trailopt 'I'; skip_next=yes;; \
-      -*I?*) strip_trailopt 'I';; \
-        -*O) strip_trailopt 'O'; skip_next=yes;; \
-      -*O?*) strip_trailopt 'O';; \
-        -*l) strip_trailopt 'l'; skip_next=yes;; \
-      -*l?*) strip_trailopt 'l';; \
-      -[dEDm]) skip_next=yes;; \
-      -[JT]) skip_next=yes;; \
-    esac; \
-    case $$flg in \
-      *$$target_option*) has_opt=yes; break;; \
-    esac; \
-  done; \
-  test $$has_opt = yes
-am__make_dryrun = (target_option=n; $(am__make_running_with_option))
-am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-subdir = hw/dmx/man
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \
-	$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \
-	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
-	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
-	$(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-	$(ACLOCAL_M4)
-DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
-	$(top_builddir)/include/xorg-server.h \
-	$(top_builddir)/include/dix-config.h \
-	$(top_builddir)/include/xorg-config.h \
-	$(top_builddir)/include/xkb-config.h \
-	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
-	$(top_builddir)/include/version-config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-AM_V_P = $(am__v_P_@AM_V@)
-am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
-am__v_P_0 = false
-am__v_P_1 = :
-AM_V_GEN = $(am__v_GEN_@AM_V@)
-am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo "  GEN     " $@;
-am__v_GEN_1 = 
-AM_V_at = $(am__v_at_@AM_V@)
-am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
-am__v_at_0 = @
-am__v_at_1 = 
-SOURCES =
-DIST_SOURCES =
-am__can_run_installinfo = \
-  case $$AM_UPDATE_INFO_DIR in \
-    n|no|NO) false;; \
-    *) (install-info --version) >/dev/null 2>&1;; \
-  esac
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
-    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
-    *) f=$$p;; \
-  esac;
-am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
-am__install_max = 40
-am__nobase_strip_setup = \
-  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
-am__nobase_strip = \
-  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
-am__nobase_list = $(am__nobase_strip_setup); \
-  for p in $$list; do echo "$$p $$p"; done | \
-  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
-  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
-    if (++n[$$2] == $(am__install_max)) \
-      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
-    END { for (dir in files) print dir, files[dir] }'
-am__base_list = \
-  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
-  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-am__uninstall_files_from_dir = { \
-  test -z "$$files" \
-    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
-    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
-         $(am__cd) "$$dir" && rm -f $$files; }; \
-  }
-am__installdirs = "$(DESTDIR)$(appmandir)" "$(DESTDIR)$(drivermandir)" \
-	"$(DESTDIR)$(filemandir)"
-DATA = $(appman_DATA) $(driverman_DATA) $(fileman_DATA)
-am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
-am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/manpages.am
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
-ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
-AMTAR = @AMTAR@
-AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
-APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@
-APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@
-APP_MAN_DIR = @APP_MAN_DIR@
-APP_MAN_SUFFIX = @APP_MAN_SUFFIX@
-AR = @AR@
-AS = @AS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-BASE_CFLAGS = @BASE_CFLAGS@
-BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
-BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
-BUNDLE_VERSION = @BUNDLE_VERSION@
-BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
-CC = @CC@
-CCAS = @CCAS@
-CCASDEPMODE = @CCASDEPMODE@
-CCASFLAGS = @CCASFLAGS@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CHANGELOG_CMD = @CHANGELOG_CMD@
-COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CWARNFLAGS = @CWARNFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DBUS_CFLAGS = @DBUS_CFLAGS@
-DBUS_LIBS = @DBUS_LIBS@
-DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@
-DEFAULT_LOGDIR = @DEFAULT_LOGDIR@
-DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@
-DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@
-DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@
-DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DGA_CFLAGS = @DGA_CFLAGS@
-DGA_LIBS = @DGA_LIBS@
-DIX_CFLAGS = @DIX_CFLAGS@
-DIX_LIB = @DIX_LIB@
-DLLTOOL = @DLLTOOL@
-DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
-DOT = @DOT@
-DOXYGEN = @DOXYGEN@
-DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
-DRI2PROTO_LIBS = @DRI2PROTO_LIBS@
-DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@
-DRI3PROTO_LIBS = @DRI3PROTO_LIBS@
-DRIVER_MAN_DIR = @DRIVER_MAN_DIR@
-DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
-DRI_DRIVER_PATH = @DRI_DRIVER_PATH@
-DSYMUTIL = @DSYMUTIL@
-DTRACE = @DTRACE@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-FILE_MAN_DIR = @FILE_MAN_DIR@
-FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
-FONT100DPIDIR = @FONT100DPIDIR@
-FONT75DPIDIR = @FONT75DPIDIR@
-FONTMISCDIR = @FONTMISCDIR@
-FONTOTFDIR = @FONTOTFDIR@
-FONTROOTDIR = @FONTROOTDIR@
-FONTTTFDIR = @FONTTTFDIR@
-FONTTYPE1DIR = @FONTTYPE1DIR@
-FOP = @FOP@
-GBM_CFLAGS = @GBM_CFLAGS@
-GBM_LIBS = @GBM_LIBS@
-GLAMOR_CFLAGS = @GLAMOR_CFLAGS@
-GLAMOR_LIBS = @GLAMOR_LIBS@
-GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@
-GLX_DEFINES = @GLX_DEFINES@
-GLX_SYS_LIBS = @GLX_SYS_LIBS@
-GL_CFLAGS = @GL_CFLAGS@
-GL_LIBS = @GL_LIBS@
-GREP = @GREP@
-HAL_CFLAGS = @HAL_CFLAGS@
-HAL_LIBS = @HAL_LIBS@
-HAVE_DOT = @HAVE_DOT@
-INSTALL = @INSTALL@
-INSTALL_CMD = @INSTALL_CMD@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-KDRIVE_CFLAGS = @KDRIVE_CFLAGS@
-KDRIVE_INCS = @KDRIVE_INCS@
-KDRIVE_LIBS = @KDRIVE_LIBS@
-KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@
-KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@
-KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@
-KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@
-KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@
-KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@
-KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@
-LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@
-LEX = @LEX@
-LEXLIB = @LEXLIB@
-LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
-LIBDRM_CFLAGS = @LIBDRM_CFLAGS@
-LIBDRM_LIBS = @LIBDRM_LIBS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@
-LIBSHA1_LIBS = @LIBSHA1_LIBS@
-LIBTOOL = @LIBTOOL@
-LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
-LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
-LIB_MAN_DIR = @LIB_MAN_DIR@
-LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
-MAIN_LIB = @MAIN_LIB@
-MAKEINFO = @MAKEINFO@
-MANIFEST_TOOL = @MANIFEST_TOOL@
-
-# xorg-macros.m4 has these bracketed by double underscores, but meson
-# wants ats.
-
-# Add server specific man pages string substitution from XORG_MANPAGE_SECTIONS
-# 's|/,|/, |g' will add a space to help font path formatting
-MAN_SUBSTS = @MAN_SUBSTS@ -e 's|@vendorversion@|"$(PACKAGE_STRING)" \
-	"$(XORG_MAN_PAGE)"|' -e 's|@xorgversion@|"$(PACKAGE_STRING)" \
-	"$(XORG_MAN_PAGE)"|' -e 's|@xservername@|Xorg|g' -e \
-	's|@xconfigfile@|xorg.conf|g' -e 's|@projectroot@|$(prefix)|g' \
-	-e 's|@apploaddir@|$(appdefaultdir)|g' -e \
-	's|@appmansuffix@|$(APP_MAN_SUFFIX)|g' -e \
-	's|@drivermansuffix@|$(DRIVER_MAN_SUFFIX)|g' -e \
-	's|@adminmansuffix@|$(ADMIN_MAN_SUFFIX)|g' -e \
-	's|@libmansuffix@|$(LIB_MAN_SUFFIX)|g' -e \
-	's|@miscmansuffix@|$(MISC_MAN_SUFFIX)|g' -e \
-	's|@filemansuffix@|$(FILE_MAN_SUFFIX)|g' -e \
-	's|[@]logdir[@]|$(logdir)|g' -e 's|[@]datadir[@]|$(datadir)|g' \
-	-e 's|[@]mandir[@]|$(mandir)|g' -e \
-	's|[@]sysconfdir[@]|$(sysconfdir)|g' -e \
-	's|[@]xconfigdir[@]|$(XCONFIGDIR)|g' -e \
-	's|[@]xkbdir[@]|$(XKB_BASE_DIRECTORY)|g' -e \
-	's|[@]XKB_DFLT_RULES[@]|$(XKB_DFLT_RULES)|g' -e \
-	's|[@]XKB_DFLT_MODEL[@]|$(XKB_DFLT_MODEL)|g' -e \
-	's|[@]XKB_DFLT_LAYOUT[@]|$(XKB_DFLT_LAYOUT)|g' -e \
-	's|[@]XKB_DFLT_VARIANT[@]|$(XKB_DFLT_VARIANT)|g' -e \
-	's|[@]XKB_DFLT_OPTIONS[@]|$(XKB_DFLT_OPTIONS)|g' -e \
-	's|[@]bundle_id_prefix[@]|$(BUNDLE_ID_PREFIX)|g' -e \
-	's|[@]modulepath[@]|$(DEFAULT_MODULE_PATH)|g' -e \
-	's|[@]suid_wrapper_dir[@]|$(SUID_WRAPPER_DIR)|g' -e \
-	's|[@]default_font_path[@]|$(COMPILEDDEFAULTFONTPATH)|g' -e \
-	'\|$(COMPILEDDEFAULTFONTPATH)| s|/,|/, |g'
-MISC_MAN_DIR = @MISC_MAN_DIR@
-MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
-MKDIR_P = @MKDIR_P@
-NM = @NM@
-NMEDIT = @NMEDIT@
-OBJC = @OBJC@
-OBJCCLD = @OBJCCLD@
-OBJCDEPMODE = @OBJCDEPMODE@
-OBJCFLAGS = @OBJCFLAGS@
-OBJCLINK = @OBJCLINK@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
-OPENSSL_LIBS = @OPENSSL_LIBS@
-OS_LIB = @OS_LIB@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@
-PCIACCESS_LIBS = @PCIACCESS_LIBS@
-PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@
-PIXMAN_CFLAGS = @PIXMAN_CFLAGS@
-PIXMAN_LIBS = @PIXMAN_LIBS@
-PKG_CONFIG = @PKG_CONFIG@
-PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
-PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
-PROJECTROOT = @PROJECTROOT@
-PTHREAD_CC = @PTHREAD_CC@
-PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
-PTHREAD_LIBS = @PTHREAD_LIBS@
-PYTHON3 = @PYTHON3@
-RANLIB = @RANLIB@
-RAWCPP = @RAWCPP@
-RAWCPPFLAGS = @RAWCPPFLAGS@
-RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
-SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
-SED = @SED@
-SELINUX_CFLAGS = @SELINUX_CFLAGS@
-SELINUX_LIBS = @SELINUX_LIBS@
-SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@
-SET_MAKE = @SET_MAKE@
-SHA1_CFLAGS = @SHA1_CFLAGS@
-SHA1_LIBS = @SHA1_LIBS@
-SHELL = @SHELL@
-SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@
-STRICT_CFLAGS = @STRICT_CFLAGS@
-STRIP = @STRIP@
-STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@
-SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@
-SYSCONFDIR = @SYSCONFDIR@
-SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@
-SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@
-TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@
-UDEV_CFLAGS = @UDEV_CFLAGS@
-UDEV_LIBS = @UDEV_LIBS@
-UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
-VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
-VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
-WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
-WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
-WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
-XCONFIGDIR = @XCONFIGDIR@
-XCONFIGFILE = @XCONFIGFILE@
-XDMCP_CFLAGS = @XDMCP_CFLAGS@
-XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
-XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
-XEPHYR_INCS = @XEPHYR_INCS@
-XEPHYR_LIBS = @XEPHYR_LIBS@
-XF86CONFIGDIR = @XF86CONFIGDIR@
-XF86CONFIGFILE = @XF86CONFIGFILE@
-XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@
-XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@
-XKB_COMPILED_DIR = @XKB_COMPILED_DIR@
-XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@
-XKB_DFLT_MODEL = @XKB_DFLT_MODEL@
-XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@
-XKB_DFLT_RULES = @XKB_DFLT_RULES@
-XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@
-XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@
-XLIB_CFLAGS = @XLIB_CFLAGS@
-XLIB_LIBS = @XLIB_LIBS@
-XMLTO = @XMLTO@
-XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@
-XNESTMODULES_LIBS = @XNESTMODULES_LIBS@
-XNEST_LIBS = @XNEST_LIBS@
-XNEST_SYS_LIBS = @XNEST_SYS_LIBS@
-XORG_CFLAGS = @XORG_CFLAGS@
-XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@
-XORG_INCS = @XORG_INCS@
-XORG_LIBS = @XORG_LIBS@
-XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@
-XORG_MAN_PAGE = @XORG_MAN_PAGE@
-XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@
-XORG_MODULES_LIBS = @XORG_MODULES_LIBS@
-XORG_OS_SUBDIR = @XORG_OS_SUBDIR@
-XORG_SGML_PATH = @XORG_SGML_PATH@
-XORG_SYS_LIBS = @XORG_SYS_LIBS@
-XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@
-XPBPROXY_LIBS = @XPBPROXY_LIBS@
-XQUARTZ_LIBS = @XQUARTZ_LIBS@
-XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
-XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
-XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
-XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
-XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
-XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@
-XSERVER_LIBS = @XSERVER_LIBS@
-XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@
-XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
-XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
-XSLTPROC = @XSLTPROC@
-XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
-XVFB_LIBS = @XVFB_LIBS@
-XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
-XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
-XWINMODULES_LIBS = @XWINMODULES_LIBS@
-XWIN_LIBS = @XWIN_LIBS@
-XWIN_SERVER_NAME = @XWIN_SERVER_NAME@
-XWIN_SYS_LIBS = @XWIN_SYS_LIBS@
-YACC = @YACC@
-YFLAGS = @YFLAGS@
-abi_ansic = @abi_ansic@
-abi_extension = @abi_extension@
-abi_videodrv = @abi_videodrv@
-abi_xinput = @abi_xinput@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_AR = @ac_ct_AR@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-ax_pthread_config = @ax_pthread_config@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-driverdir = @driverdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-extdir = @extdir@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-logdir = @logdir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-moduledir = @moduledir@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-runstatedir = @runstatedir@
-sbindir = @sbindir@
-sdkdir = @sdkdir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-symbol_visibility = @symbol_visibility@
-sysconfdir = @sysconfdir@
-sysconfigdir = @sysconfigdir@
-target_alias = @target_alias@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-appmandir = $(APP_MAN_DIR)
-#appman_PRE = list of application man page files set by calling Makefile.am
-appman_DATA = $(appman_PRE:man=$(APP_MAN_SUFFIX))
-drivermandir = $(DRIVER_MAN_DIR)
-#driverman_PRE = list of driver man page files set by calling Makefile.am
-driverman_DATA = $(driverman_PRE:man=$(DRIVER_MAN_SUFFIX))
-filemandir = $(FILE_MAN_DIR)
-#fileman_PRE = list of file man page files set by calling Makefile.am
-fileman_DATA = $(fileman_PRE:man=$(FILE_MAN_SUFFIX))
-
-# The calling Makefile should only contain man page targets
-# Otherwise the following three global variables may conflict
-EXTRA_DIST = $(appman_PRE) $(driverman_PRE) $(fileman_PRE)
-CLEANFILES = $(appman_DATA) $(driverman_DATA) $(fileman_DATA)
-SUFFIXES = .$(APP_MAN_SUFFIX) .$(DRIVER_MAN_SUFFIX) .$(FILE_MAN_SUFFIX) .man
-appman_PRE = Xdmx.man
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .$(APP_MAN_SUFFIX) .$(DRIVER_MAN_SUFFIX) .$(FILE_MAN_SUFFIX) .man
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(top_srcdir)/manpages.am $(am__configure_deps)
-	@for dep in $?; do \
-	  case '$(am__configure_deps)' in \
-	    *$$dep*) \
-	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
-	        && { if test -f $@; then exit 0; else break; fi; }; \
-	      exit 1;; \
-	  esac; \
-	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/dmx/man/Makefile'; \
-	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --foreign hw/dmx/man/Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	@case '$?' in \
-	  *config.status*) \
-	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
-	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
-	esac;
-$(top_srcdir)/manpages.am $(am__empty):
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure:  $(am__configure_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-
-mostlyclean-libtool:
-	-rm -f *.lo
-
-clean-libtool:
-	-rm -rf .libs _libs
-install-appmanDATA: $(appman_DATA)
-	@$(NORMAL_INSTALL)
-	@list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \
-	if test -n "$$list"; then \
-	  echo " $(MKDIR_P) '$(DESTDIR)$(appmandir)'"; \
-	  $(MKDIR_P) "$(DESTDIR)$(appmandir)" || exit 1; \
-	fi; \
-	for p in $$list; do \
-	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-	  echo "$$d$$p"; \
-	done | $(am__base_list) | \
-	while read files; do \
-	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(appmandir)'"; \
-	  $(INSTALL_DATA) $$files "$(DESTDIR)$(appmandir)" || exit $$?; \
-	done
-
-uninstall-appmanDATA:
-	@$(NORMAL_UNINSTALL)
-	@list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \
-	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-	dir='$(DESTDIR)$(appmandir)'; $(am__uninstall_files_from_dir)
-install-drivermanDATA: $(driverman_DATA)
-	@$(NORMAL_INSTALL)
-	@list='$(driverman_DATA)'; test -n "$(drivermandir)" || list=; \
-	if test -n "$$list"; then \
-	  echo " $(MKDIR_P) '$(DESTDIR)$(drivermandir)'"; \
-	  $(MKDIR_P) "$(DESTDIR)$(drivermandir)" || exit 1; \
-	fi; \
-	for p in $$list; do \
-	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-	  echo "$$d$$p"; \
-	done | $(am__base_list) | \
-	while read files; do \
-	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(drivermandir)'"; \
-	  $(INSTALL_DATA) $$files "$(DESTDIR)$(drivermandir)" || exit $$?; \
-	done
-
-uninstall-drivermanDATA:
-	@$(NORMAL_UNINSTALL)
-	@list='$(driverman_DATA)'; test -n "$(drivermandir)" || list=; \
-	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-	dir='$(DESTDIR)$(drivermandir)'; $(am__uninstall_files_from_dir)
-install-filemanDATA: $(fileman_DATA)
-	@$(NORMAL_INSTALL)
-	@list='$(fileman_DATA)'; test -n "$(filemandir)" || list=; \
-	if test -n "$$list"; then \
-	  echo " $(MKDIR_P) '$(DESTDIR)$(filemandir)'"; \
-	  $(MKDIR_P) "$(DESTDIR)$(filemandir)" || exit 1; \
-	fi; \
-	for p in $$list; do \
-	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-	  echo "$$d$$p"; \
-	done | $(am__base_list) | \
-	while read files; do \
-	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(filemandir)'"; \
-	  $(INSTALL_DATA) $$files "$(DESTDIR)$(filemandir)" || exit $$?; \
-	done
-
-uninstall-filemanDATA:
-	@$(NORMAL_UNINSTALL)
-	@list='$(fileman_DATA)'; test -n "$(filemandir)" || list=; \
-	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-	dir='$(DESTDIR)$(filemandir)'; $(am__uninstall_files_from_dir)
-tags TAGS:
-
-ctags CTAGS:
-
-cscope cscopelist:
-
-
-distdir: $(BUILT_SOURCES)
-	$(MAKE) $(AM_MAKEFLAGS) distdir-am
-
-distdir-am: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	list='$(DISTFILES)'; \
-	  dist_files=`for file in $$list; do echo $$file; done | \
-	  sed -e "s|^$$srcdirstrip/||;t" \
-	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
-	case $$dist_files in \
-	  */*) $(MKDIR_P) `echo "$$dist_files" | \
-			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
-			   sort -u` ;; \
-	esac; \
-	for file in $$dist_files; do \
-	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  if test -d $$d/$$file; then \
-	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
-	    if test -d "$(distdir)/$$file"; then \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
-	  else \
-	    test -f "$(distdir)/$$file" \
-	    || cp -p $$d/$$file "$(distdir)/$$file" \
-	    || exit 1; \
-	  fi; \
-	done
-check-am: all-am
-check: check-am
-all-am: Makefile $(DATA)
-installdirs:
-	for dir in "$(DESTDIR)$(appmandir)" "$(DESTDIR)$(drivermandir)" "$(DESTDIR)$(filemandir)"; do \
-	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
-	done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
-	if test -z '$(STRIP)'; then \
-	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	      install; \
-	else \
-	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
-	fi
-mostlyclean-generic:
-
-clean-generic:
-	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean-generic:
-	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
-	@echo "This command is intended for maintainers to use"
-	@echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-am
-	-rm -f Makefile
-distclean-am: clean-am distclean-generic
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am: install-appmanDATA install-drivermanDATA \
-	install-filemanDATA
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am:
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
-	-rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-appmanDATA uninstall-drivermanDATA \
-	uninstall-filemanDATA
-
-.MAKE: install-am install-strip
-
-.PHONY: all all-am check check-am clean clean-generic clean-libtool \
-	cscopelist-am ctags-am distclean distclean-generic \
-	distclean-libtool distdir dvi dvi-am html html-am info info-am \
-	install install-am install-appmanDATA install-data \
-	install-data-am install-drivermanDATA install-dvi \
-	install-dvi-am install-exec install-exec-am \
-	install-filemanDATA install-html install-html-am install-info \
-	install-info-am install-man install-pdf install-pdf-am \
-	install-ps install-ps-am install-strip installcheck \
-	installcheck-am installdirs maintainer-clean \
-	maintainer-clean-generic mostlyclean mostlyclean-generic \
-	mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \
-	uninstall-am uninstall-appmanDATA uninstall-drivermanDATA \
-	uninstall-filemanDATA
-
-.PRECIOUS: Makefile
-
-
-.man.$(APP_MAN_SUFFIX):
-	$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
-.man.$(DRIVER_MAN_SUFFIX):
-	$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
-.man.$(FILE_MAN_SUFFIX):
-	$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/hw/dmx/man/Xdmx.man b/hw/dmx/man/Xdmx.man
deleted file mode 100644
index 2ca9fb5..0000000
--- a/hw/dmx/man/Xdmx.man
+++ /dev/null
@@ -1,732 +0,0 @@
-.\"
-.\" Copyright 2001-2004 Red Hat Inc., Durham, North Carolina.
-.\" All Rights Reserved.
-.\"
-.\" Permission is hereby granted, free of charge, to any person obtaining
-.\" a copy of this software and associated documentation files (the
-.\" "Software"), to deal in the Software without restriction, including
-.\" without limitation on the rights to use, copy, modify, merge,
-.\" publish, distribute, sublicense, and/or sell copies of the Software,
-.\" and to permit persons to whom the Software is furnished to do so,
-.\" subject to the following conditions:
-.\"
-.\" The above copyright notice and this permission notice (including the
-.\" next paragraph) shall be included in all copies or substantial
-.\" portions of the Software.
-.\"
-.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-.\" NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
-.\" BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-.\" ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-.\" CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-.\" SOFTWARE.
-.TH Xdmx 1 @vendorversion@
-.SH NAME
-Xdmx - Distributed Multi-head X server
-.SH SYNOPSIS
-.B Xdmx
-[:display] [option ...]
-.SH DESCRIPTION
-.I Xdmx
-is a proxy X server that uses one or more other X servers as its display
-devices.  It provides multi-head X functionality for displays that might
-be located on different machines.
-.I Xdmx
-functions as a front-end X server that acts as a proxy to a set of
-back-end X servers.  All of the visible rendering is passed to the
-back-end X servers.  Clients connect to the
-.I Xdmx
-front-end, and everything appears as it would in a regular multi-head
-configuration.  If Xinerama is enabled (e.g., with
-.B +xinerama
-on the command line), the clients see a single large screen.
-.PP
-.I Xdmx
-communicates to the back-end X servers using the standard X11 protocol,
-and standard and/or commonly available X server extensions.
-.SH OPTIONS
-In addition to the normal X server options described in the
-.I Xserver(@appmansuffix@)
-manual page,
-.I Xdmx
-accepts the following command line switches:
-.TP 8
-.BI "\-display " display-name
-This specifies the name(s) of the back-end X server display(s) to connect
-to.  This option may be specified multiple times to connect to more than
-one back-end display.  The first is used as screen 0, the second as screen 1,
-etc.  If this option is omitted, the
-.B $DISPLAY
-environment variable is used as the single back-end X server display.
-.sp
-.TP 8
-.BI "\-xinput " input-source
-This specifies the source to use for XInput extension devices.  The
-choices are the same as for
-.BR "\-input " ,
-described below, except that core devices on backend servers cannot be
-treated as XInput extension devices.  (Although extension devices on
-backend and console servers are supported as extension devices under
-.IR Xdmx ).
-.sp
-.TP 8
-.BI "\-input " input-source
-This specifies the source to use for the core input devices.  The choices are:
-.RS
-.TP 4
-.B dummy
-A set of dummy core input drivers are used.  These never generate any
-input events.
-.sp
-.TP 4
-.B local
-The raw keyboard and pointer from the local computer are used.  A
-comma-separated list of driver names can be appended.
-The following drivers have been implemented for Linux: usb-mou
-(a USB mouse driver), usb-kbd (a USB keyboard driver), and usb-oth (a
-USB non-keyboard, non-mouse driver).  Additional drivers may be
-implemented in the future.  Appropriate defaults will be used if no
-comma-separated list is provided.
-.sp
-.TP 4
-.I display-name
-If the display-name is a back-end server, then core input events are
-taken from the server specified.  Otherwise, a console window will be
-opened on the specified display.
-.sp
-If the
-.I display-name
-is followed by ",xi" then XInput extension devices on the display will
-be used as
-.I Xdmx
-XInput extension devices.  If the
-.I display-name
-is followed by ",noxi" then XInput extension devices on the display will
-.B not
-be used as
-.I Xdmx
-XInput extension devices.  Currently, the default is ",xi".
-.sp
-If the
-.I display-name
-is followed by ",console" and the
-.I display-name
-refers to a display that is used as a backend display, then a console
-window will be opened on that display
-.B and
-that display will be treated as a backend display.  Otherwise (or if
-",noconsole" is used), the display will be treated purely as a backend
-or a console display, as described above.
-.sp
-If the
-.I display-name
-is followed by ",windows", then outlines of the windows on the backend
-will be displayed inside the console window.  Otherwise (or if
-",nowindows" is used), the console window will not display the outlines
-of backend windows.  (This option only applies to console input.)
-.sp
-If the
-.I display-name
-is followed by ",xkb", then the next 1 to 3 comma-separated parameters
-will specify the keycodes, symbols, and geometry of the keyboard for
-this input device.  For example, ",xkb,xfree86,pc104" will specify that
-the "xfree86" keycodes and the "pc104" symbols should be used to
-initialize the keyboard.  For an SGI keyboard, ",xkb,sgi/indy(pc102)"
-might be useful.  A list of keycodes, symbols, and geometries can be
-found in
-.IR @xkbdir@ .
-Use of keycodes, symbols and geometries for XKB configuration is
-deprecated in favor of the rules, layout, model, variant and options
-settings available via the -param command line switch.
-If this option is not specified, the input device will be queried,
-perhaps using the XKEYBOARD extension.
-.RE
-.sp
-.RS
-If this option isn't specified, the default input source is the first
-back-end server (the one used for screen 0).  The console window shows
-the layout of the back-end display(s) and pointer movements and key
-presses within the console window will be used as core input devices.
-.sp
-Several special function keys are active, depending on the input
-source:
-.sp
-.RS
-.B Ctrl-Alt-q
-will terminate the
-.I Xdmx
-server in all modes.
-.sp
-.B Ctrl-Alt-g
-will toggle a
-server grab in console mode (a special cursor, currently a spider, is
-used to indicate an active server grab).
-.sp
-.B Ctrl-Alt-f
-will toggle fine-grain motion in console mode (a special cursor,
-currently a cross hair, is used to indicate this mode).  If this mode is
-combined with a server grab, then the cursor will have 4 lines instead
-of only 2.
-.sp
-.BR Ctrl-Alt-F1 " through " Ctrl-Alt-F12
-will switch to another VC in local (raw) mode.
-.RE
-.RE
-.sp
-.TP 8
-.BI "-nomulticursor"
-This option turns off support for displaying multiple cursors on
-overlapped back-end displays.  This option is available for testing and
-benchmarking purposes.
-.sp
-.TP 8
-.BI "-fontpath"
-This option sets the
-.I Xdmx
-server's default font path.  This option can be specified multiple times
-to accommodate multiple font paths.  See the
-.B "FONT PATHS"
-section below for very important information regarding setting the
-default font path.
-.sp
-.TP 8
-.BI "-configfile " filename
-Specify the configuration file that should be read.  Note that if the
-.B \-display
-command-line option is used, then the configuration file will be
-ignored.
-.sp
-.TP 8
-.BI "-config " name
-Specify a configuration to use.  The
-.I name
-will be the name following the
-.B virtual
-keyword in the configuration file.
-.sp
-.TP 8
-.BI "-stat " "interval screens"
-This option enables the display of performance statistics.  The interval
-is in seconds.  The screens is a count of the number of back-end screens
-for which data is printed each interval.  Specifying 0 for screens will
-display data for all screens.
-.sp
-For each screen, the following information is printed: the screen
-number, an absolute count of the number of XSync() calls made
-(SyncCount), the rate of these calls during the previous interval
-(Sync/s), the average round-trip time (in microseconds) of the last 10
-XSync() calls (avSync), the maximum round-trip time (in microseconds) of
-the last 10 XSync calls (mxSync), the average number of XSync() requests
-that were pending but not yet processed for each of the last 10
-processed XSync() calls, the maximum number of XSync() requests that
-were pending but not yet processed for each of the last 10 processed
-XSync() calls, and a histogram showing the distribution of the times of
-all of the XSync() calls that were made during the previous interval.
-.sp
-(The length of the moving average and the number and value of histogram
-bins are configurable at compile time in the
-.B dmxstat.h
-header file.)
-.sp
-.TP 8
-.BI "-syncbatch " interval
-This option sets the
-.I interval
-in milliseconds for XSync() batching.  An
-.I interval
-less than or equal to 0 will disable XSync() batching.  The default
-.I interval
-is 100 ms.
-.sp
-.TP 8
-.BI "-nooffscreenopt"
-This option disables the offscreen optimization.  Since the lazy window
-creation optimization requires the offscreen optimization to be enabled,
-this option will also disable the lazy window creation optimization.
-.sp
-.TP 8
-.BI "-nowindowopt"
-This option disables the lazy window creation optimization.
-.sp
-.TP 8
-.BI "-nosubdivprims"
-This option disables the primitive subdivision optimization.
-.sp
-.TP 8
-.BI "-noxkb"
-Disable use of the XKB extension for communication with the back end
-displays.  (Combine with
-.B "-kb"
-to disable all use of XKB.)
-.sp
-.TP 8
-.BI "-depth " int
-This option sets the root window's default depth.  When choosing a
-default visual from those available on the back-end X server, the first
-visual with that matches the depth specified is used.
-.sp
-This option can be combined with the
-.BI "-cc"
-option, which specifies the default color visual class, to force the use
-of a specific depth and color class for the root window.
-.sp
-.TP 8
-.BI "-norender"
-This option disables the RENDER extension.
-.sp
-.TP 8
-.BI "-noglxproxy"
-This option disables GLX proxy -- the build-in GLX extension
-implementation that is DMX aware.
-.sp
-.TP 8
-.BI "-noglxswapgroup"
-This option disables the swap group and swap barrier extensions in GLX
-proxy.
-.sp
-.TP 8
-.BI "-glxsyncswap"
-This option enables synchronization after a swap buffers call by waiting
-until all X protocol has been processed.  When a client issues a
-glXSwapBuffers request, Xdmx relays that request to each back-end X
-server, and those requests are buffered along with all other protocol
-requests.  However, in systems that have large network buffers, this
-buffering can lead to the set of back-end X servers handling the swap
-buffers request asynchronously.  With this option, an XSync() request is
-issued to each back-end X server after sending the swap buffers request.
-The XSync() requests will flush all buffered protocol (including the
-swap buffers requests) and wait until the back-end X servers have
-processed those requests before continuing.  This option does not wait
-until all GL commands have been processed so there might be previously
-issued commands that are still being processed in the GL pipe when the
-XSync() request returns.  See the
-.BI "-glxfinishswap"
-option below if Xdmx should wait until the GL commands have been
-processed.
-.sp
-.TP 8
-.BI "-glxfinishswap"
-This option enables synchronization after a swap buffers call by waiting
-until all GL commands have been completed.  It is similar to the
-.BI "-glxsyncswap"
-option above; however, instead of issuing an XSync(), it issues a
-glFinish() request to each back-end X server after sending the swap
-buffers requests.  The glFinish() request will flush all buffered
-protocol requests, process both X and GL requests, and wait until all
-previously called GL commands are complete before returning.
-.sp
-.TP 8
-.BI "-ignorebadfontpaths"
-This option ignores font paths that are not available on all back-end
-servers by removing the bad font path(s) from the default font path
-list.  If no valid font paths are left after removing the bad paths, an
-error to that effect is printed in the log.
-.sp
-.TP 8
-.BI "-addremovescreens"
-This option enables the dynamic addition and removal of screens, which
-is disabled by default.  Note that GLXProxy and Render do not yet
-support dynamic addition and removal of screens, and must be disabled
-via the
-.BI "-noglxproxy"
-and
-.BI "-norender"
-command line options described above.
-.sp
-.TP 8
-.BI "-param"
-This option specifies parameters on the command line.  Currently, only
-parameters dealing with XKEYBOARD configuration are supported.  These
-parameters apply only to the core keyboard.  Parameter values are
-installation-dependent.  Please see
-.I @xkbdir@
-or a similar directory for complete information.
-.RS
-.TP 8
-.B XkbRules
-Defaults to "@XKB_DFLT_RULES@".  Other values may include "sgi" and "sun".
-.sp
-.TP 8
-.B XkbModel
-Defaults to "@XKB_DFLT_MODEL@".  When used with "base" rules, other values
-may include "pc102", "pc104", "microsoft", and many others.  When
-used with "sun" rules, other values may include "type4" and "type5".
-.sp
-.TP 8
-.B XkbLayout
-Defaults to "@XKB_DFLT_LAYOUT@".  Other country codes and "dvorak" are usually
-available.
-.sp
-.TP 8
-.B XkbVariant
-Defaults to "@XKB_DFLT_VARIANT@".
-.sp
-.TP 8
-.B XkbOptions
-Defaults to "@XKB_DFLT_OPTIONS@".
-.RE
-.SH "CONFIGURATION FILE GRAMMAR"
-The following words and tokens are reserved:
-.RS
-.B virtual
-.B display
-.B wall
-.B option
-.B param
-.B {
-.B }
-.B ;
-.B #
-.RE
-.PP
-Comments start with a
-.B #
-mark and extend to the end of the line.  They may appear anywhere.  If a
-configuration file is read into
-.BR xdmxconfig ,
-the comments in that file will be preserved, but will not be editable.
-.PP
-The grammar is as follows:
-.RS
-virtual-list ::= [ virtual-list ] | virtual
-
-virtual ::=
-.B virtual
-[ name ] [ dim ]
-.B {
-dw-list
-.B }
-
-dw-list ::= [ dw-list ] | dw
-
-dw ::= display | wall | option
-
-display ::=
-.B display
-name [ geometry ] [ / geometry ] [ origin ]
-.B ;
-
-wall ::=
-.B wall
-[ dim ] [ dim ] name-list
-.B ;
-
-option ::=
-.B option
-name-list
-.B ;
-
-param ::=
-.B param
-name-list
-.B ;
-
-param ::=
-.B param {
-param-list
-.B }
-
-param-list ::= [ param-list ] | name-list
-.B ;
-
-name-list ::= [ name-list ] | name
-
-name ::= string | double-quoted-string
-
-dim ::= integer
-.B x
-integer
-
-geometry ::= [ integer
-.B x
-integer ] [ signed-integer signed-integer ]
-
-origin ::=
-.B @
-integer
-.B x
-integer
-.RE
-.PP
-The name following
-.B virtual
-is used as an identifier for the configuration, and may be passed to
-.B Xdmx
-using the
-.B \-config
-command line option.  The name of a display should be standard X display
-name, although no checking is performed (e.g., "machine:0").
-.PP
-For names, double quotes are optional unless the name is reserved or
-contains spaces.
-.PP
-The first dimension following
-.B wall
-is the dimension for tiling (e.g., 2x4 or 4x4).  The second dimension
-following
-.B wall
-is the dimension of each display in the wall (e.g., 1280x1024).
-.PP
-The first geometry following
-.B display
-is the geometry of the screen window on the backend server.  The second
-geometry, which is always preceeded by a slash, is the geometry of the
-root window.  By default, the root window has the same geometry as the
-screen window.
-.PP
-The
-.B option
-line can be used to specify any command-line options (e.g.,
-.BR \-input ).
-(It cannot be used to specify the name of the front-end display.)  The
-option line is processed once at server startup, just line command line
-options.  This behavior may be unexpected.
-.SH "CONFIGURATION FILE EXAMPLES"
-Two displays being used for a desktop may be specified in any of the
-following formats:
-.RS
-.nf
-virtual example0 {
-    display d0:0 1280x1024 @0x0;
-    display d1:0 1280x1024 @1280x0;
-}
-.sp
-virtual example1 {
-    display d0:0 1280x1024;
-    display d1:0 @1280x0;
-}
-.sp
-virtual example2 {
-    display "d0:0";
-    display "d1:0" @1280x0;
-}
-.sp
-virtual example3 { wall 2x1 d0:0 d1:0; }
-.fi
-.RE
-A 4x4 wall of 16 total displays could be specified as follows (if no
-tiling dimension is specified, an approximate square is used):
-.RS
-.nf
-virtual example4 {
-    wall d0:0 d1:0 d2:0 d3:0
-         d4:0 d5:0 d6:0 d7:0
-         d8:0 d9:0 da:0 db:0
-         dc:0 dd:0 de:0 df:0;
-}
-.fi
-.RE
-.SH "FONT PATHS"
-The font path used by the
-.I Xdmx
-front-end server will be propagated to each back-end server,which
-requires that each back-end server have access to the exact same font
-paths as the front-end server.  This can be most easily handled by
-either using a font server (e.g., xfs) or by remotely mounting the font
-paths on each back-end server, and then setting the
-.I Xdmx
-server's default font path with the
--I "-fontpath"
-command line option described above.
-.PP
-For example, if you specify a font path with the following command line:
-.RS
-Xdmx :1 -display d0:0 -fontpath /usr/fonts/75dpi/ -fontpath /usr/fonts/Type1/ +xinerama
-.RE
-Then, /usr/fonts/75dpi/ and /usr/fonts/Type1/ must be valid font paths
-on the
-.I Xdmx
-server and all back-end server, which is d0 in this example.
-.PP
-Font servers can also be specified with the
-.I "-fontpath"
-option.  For example, let's assume that a properly configured font
-server is running on host d0.  Then, the following command line
-.RS
-Xdmx :1 -display d0:0 -display d1:0 -fontpath tcp/d0:7100 +xinerama
-.RE
-will initialize the front-end
-.I Xdmx
-server and each of the back-end servers to use the font server on d0.
-.PP
-Some fonts might not be supported by either the front-end or the
-back-end servers.  For example, let's assume the front-end
-.I Xdmx
-server includes support Type1 fonts, but one of the back-end servers
-does not.  Let's also assume that the default font path for
-.I Xdmx
-includes Type1 fonts in its font path.  Then, when
-.I Xdmx
-initializes the default font path to load the default font, the font
-path that includes Type1 fonts (along with the other default font paths
-that are used by the
-.I Xdmx
-server) is sent to the back-end server that cannot handle Type1 fonts.
-That back-end server then rejects the font path and sends an error back
-to the
-.I Xdmx
-server.
-.I Xdmx
-then prints an error message and exits because it failed to set the
-default font path and was unable load the default font.
-.PP
-To fix this error, the offending font path must be removed from the
-default font path by using a different
-.I "-fontpath"
-command line option.
-.PP
-The
-.I "-fontpath"
-option can also be added to the configuration file as described above.
-.SH "COMMAND-LINE EXAMPLES"
-The back-end machines are d0 and d1, core input is from the pointer and
-keyboard attached to d0, clients will refer to :1 when opening windows:
-.RS
-Xdmx :1 -display d0:0 -display d1:0 +xinerama
-.RE
-.PP
-As above, except with core input from d1:
-.RS
-Xdmx :1 -display d0:0 -display d1:0 -input d1:0 +xinerama
-.RE
-.PP
-As above, except with core input from a console window on the local
-display:
-.RS
-Xdmx :1 -display d0:0 -display d1:0 -input :0 +xinerama
-.RE
-.PP
-As above, except with core input from the local keyboard and mouse:
-.RS
-Xdmx :1 -display d0:0 -display d1:0 -input local,usb-kbd,usb-mou +xinerama
-.RE
-Note that local input can be used under Linux while another X session is
-running on :0 (assuming the user can access the Linux console tty and
-mouse devices): a new (blank) VC will be used for keyboard input on the
-local machine and the Ctrl-Alt-F* sequence will be available to change
-to another VC (possibly back to another X session running on the local
-machine).  Using Ctrl-Alt-Backspace on the blank VC will terminate the
-Xdmx session and return to the original VC.
-.PP
-This example uses the configuration file shown in the previous section:
-.RS
-Xdmx :1 -input :0 +xinerama -configfile filename -config example2
-.RE
-With this configuration file line:
-.RS
-option -input :0 +xinerama;
-.RE
-the command line can be shortened to:
-.RS
-Xdmx :1 -configfile filename -config example2
-.RE
-.SH "USING THE USB DEVICE DRIVERS"
-.P
-The USB device drivers use the devices called
-.IR /dev/input/event0 ", " /dev/input/event1 ", etc."
-under Linux.  These devices are driven using the
-.I evdev
-Linux kernel module, which is part of the hid suite.  Please note that
-if you load the
-.I mousedev
-or
-.I kbddev
-Linux kernel modules, then USB devices will appear as core Linux input
-devices and you will not be able to select between using the device only
-as an
-.I Xdmx
-core device or an
-.I Xdmx
-XInput extension device.  Further, you may be unable to unload the
-.I mousedev
-Linux kernel module if
-.I XFree86
-is configured to use
-.I /dev/input/mice
-as an input device (this is quite helpful for laptop users and is set up
-by default under some Linux distributions, but should be changed if USB
-devices are to be used with
-.IR Xdmx ).
-.PP
-The USB device drivers search through the Linux devices for the first
-mouse, keyboard, or non-mouse-non-keyboard Linux device and use that
-device.
-.SH "KEYBOARD INITIALIZATION"
-.PP
-If
-.I Xdmx
-was invoked with
-.I \-xkb
-or was
-.B not
-compiled to use the XKEYBOARD extension, then a keyboard on a backend or
-console will be initialized using the map that the host X server
-provides.
-.PP
-If the XKEYBOARD extension is used for both
-.I Xdmx
-and the host X server for the keyboard (i.e., the backend or console X
-server), then the type of the keyboard will
-be obtained from the host X server and the keyboard under
-.I Xdmx
-will be initialized with that information.  Otherwise, the default type
-of keyboard will be initialized.  In both cases, the map from the host X
-server will
-.B not
-be used.  This means that different initial behavior may be noted with
-and without XKEYBOARD.  Consistent and expected results will be obtained
-by running XKEYBOARD on all servers and by avoiding the use of
-.I xmodmap
-on the backend or console X servers prior to starting
-.IR Xdmx .
-.PP
-If
-.I \-xkbmap
-is specified on the
-.I Xdmx
-command line, then that map will currently be used for all keyboards.
-.SH "MULTIPLE CORE KEYBOARDS"
-X was not designed to support multiple core keyboards.  However,
-.I Xdmx
-provides some support for multiple core keyboards.  Best results will be
-obtained if all of the keyboards are of the same type and are using the
-same keyboard map.  Because the X server passes raw key code information
-to the X client, key symbols for keyboards with different key maps would
-be different if the key code for each keyboard was sent without
-translation to the client.  Therefore,
-.I Xdmx
-will attempt to translate the key code from a core keyboard to the key
-code for the key with the same key symbol of the
-.B first
-core keyboard that was loaded.  If the key symbol appears in both maps,
-the results will be expected.  Otherwise, the second core keyboard will
-return a NoSymbol key symbol for some keys that would have been
-translated if it was the first core keyboard.
-.ig
-.SH ENVIRONMENT
-..
-.ig
-.SH FILES
-..
-.SH "SEE ALSO"
-.BR DMX "(@libmansuffix@), " X "(@miscmansuffix@), "
-.BR Xserver "(@appmansuffix@), " xdmxconfig "(@appmansuffix@), "
-.BR vdltodmx "(@appmansuffix@), " xfs "(@appmansuffix@), "
-.BR xkbcomp "(@appmansuffix@), " xkeyboard-config "(@miscmansuffix@)"
-.SH AUTHORS
-Kevin E. Martin
-.I <kem@redhat.com>,
-David H. Dawes
-.I <dawes@xfree86.org>,
-and
-Rickard E. (Rik) Faith
-.IR <faith@redhat.com> .
-.PP
-Portions of
-.I Xdmx
-are based on code from The XFree86 Project
-.RI ( http://www.xfree86.org )
-and X.Org
-.RI ( https://www.x.org ).
diff --git a/hw/dmx/meson.build b/hw/dmx/meson.build
deleted file mode 100644
index 877466e..0000000
--- a/hw/dmx/meson.build
+++ /dev/null
@@ -1,91 +0,0 @@
-srcs = [
-    'dmx.c',
-    'dmxcb.c',
-    'dmxcmap.c',
-    'dmxcursor.c',
-    'dmxdpms.c',
-    'dmxextension.c',
-    'dmxfont.c',
-    'dmxgc.c',
-    'dmxgcops.c',
-    'dmxinit.c',
-    'dmxinput.c',
-    'dmxlog.c',
-    'dmxpict.c',
-    'dmxpixmap.c',
-    'dmxprop.c',
-    'dmxscrinit.c',
-    'dmxstat.c',
-    'dmxsync.c',
-    'dmxvisual.c',
-    'dmxwindow.c',
-    '../../mi/miinitext.c',
-    '../../Xext/panoramiX.c',
-]
-
-subdir('config')
-subdir('input')
-subdir('examples')
-# XXX: subdir('doc')
-# XXX: subdir('doxygen')
-
-install_man(configure_file(
-    input: 'man/Xdmx.man',
-    output: 'Xdmx.1',
-    configuration: manpage_config,
-))
-
-install_man(configure_file(
-    input: 'config/man/dmxtodmx.man',
-    output: 'dmxtodmx.1',
-    configuration: manpage_config,
-))
-
-install_man(configure_file(
-    input: 'config/man/vdltodmx.man',
-    output: 'vdltodmx.1',
-    configuration: manpage_config,
-))
-
-install_man(configure_file(
-    input: 'config/man/xdmxconfig.man',
-    output: 'xdmxconfig.1',
-    configuration: manpage_config,
-))
-
-dmx_dep = [
-    common_dep,
-    dependency('dmxproto', version: '>= 2.2.99.1'),
-    dependency('xext', version: '>= 1.0.99.4'),
-    dependency('xau'),
-    dependency('xmuu'),
-    dependency('xfixes'),
-    dependency('xrender'),
-    dependency('xi', version: '>= 1.2.99.1'),
-    xdmcp_dep,
-    dl_dep,
-]
-
-dmx_glx = []
-if build_glx
-    srcs += 'dmx_glxvisuals.c'
-    subdir('glxProxy')
-endif
-
-executable(
-    'Xdmx',
-    srcs,
-    include_directories: inc,
-    dependencies: dmx_dep,
-    link_with: [
-        libxserver_main,
-        libxserver_fb,
-        libxserver,
-        libxserver_xkb_stubs,
-        dmx_input,
-        dmx_config,
-        dmx_glx,
-    ],
-    c_args: '-DHAVE_DMX_CONFIG_H',
-    install: true,
-)
diff --git a/hw/kdrive/Makefile.in b/hw/kdrive/Makefile.in
index bb0593f..b8f2ced 100644
--- a/hw/kdrive/Makefile.in
+++ b/hw/kdrive/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -104,7 +104,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -160,8 +159,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 am__relativize = \
@@ -206,8 +203,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -221,6 +216,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -239,14 +236,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -263,8 +252,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -320,6 +311,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -372,7 +365,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -396,29 +388,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -456,8 +432,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -468,14 +442,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -694,7 +662,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/hw/kdrive/ephyr/Makefile.in b/hw/kdrive/ephyr/Makefile.in
index d4176ba..fec2130 100644
--- a/hw/kdrive/ephyr/Makefile.in
+++ b/hw/kdrive/ephyr/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -128,7 +128,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -232,8 +231,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 DIST_SUBDIRS = $(SUBDIRS)
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp README
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -279,8 +276,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -294,6 +289,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -312,14 +309,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -336,8 +325,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -393,6 +384,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -445,7 +438,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -469,29 +461,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -529,8 +505,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -541,14 +515,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -892,7 +860,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/hw/kdrive/ephyr/README b/hw/kdrive/ephyr/README
index 6d6a222..5019fbb 100644
--- a/hw/kdrive/ephyr/README
+++ b/hw/kdrive/ephyr/README
@@ -7,7 +7,7 @@ What Is It ?
 
 Xephyr is a a kdrive server that outputs to a window on a pre-existing
 'host' X display. Think Xnest but with support for modern extensions
-like composite, damage and randr. 
+like composite, damage and randr.
 
 Unlike Xnest which is an X proxy, i.e.  limited to the
 capabilities of the host X server, Xephyr is a real X server which
@@ -17,7 +17,7 @@ It also has support for 'visually' debugging what the server is
 painting.
 
 
-How To Use 
+How To Use
 ==========
 
 You probably want to run like;
@@ -26,48 +26,46 @@ Xephyr :1 -ac -screen 800x600 &
 
 Then set DISPLAY=:1 and run whatever X apps you like.
 
-Use 'xrandr' to change to orientation/size. 
+Use 'xrandr' to change to orientation/size.
 
-There is a '-parent' switch which works just like Xnests ( for use
+There is a '-parent' switch which works just like Xnest's ( for use
 with things like matchbox-nest - http://matchbox.handhelds.org ).
 
 There is also a '-host-cursor' switch to set 'cursor acceleration' -
 The host's cursor is reused. This is only really there to aid
 debugging by avoiding server paints for the cursor. Performance
-improvement is negiable. 
+improvement is negligible.
 
 Send a SIGUSR1 to the server ( eg kill -USR1 `pidof Xephyr` ) to
 toggle the debugging mode. In this mode red rectangles are painted to
 screen areas getting painted before painting the actual content. The
 delay between this can be altered by setting a XEPHYR_PAUSE env var to
-a value in micro seconds.
+a value in microseconds.
 
 
 Caveats
 =======
 
- - Depth is limited to being the same as the host. 
-   *Update* As of 8/11/2004. Xephyr can now do 8bpp & 16bpp 
+ - Depth is limited to being the same as the host.
+   *Update* As of 8/11/2004. Xephyr can now do 8bpp & 16bpp
             on 24bpp host.
 
  - Rotated displays are currently updated via full blits. This
    is slower than a normal oprientated display. Debug mode will
-   therefor not be of much use rotated.  
+   therefore not be of much use rotated.
 
- - The '-host-cursor' cursor is static in its appearence. 
+ - The '-host-cursor' cursor is static in its appearance.
 
  - The build gets a warning about 'nanosleep'. I think the various '-D'
-   build flags are causing this. I havn't figured as yet how to work
-   round it. It doesn't appear to break anything however. 
+   build flags are causing this. I haven't figured as yet how to work
+   around it. It doesn't appear to break anything however.
 
- - Keyboard handling is basic but works. 
+ - Keyboard handling is basic but works.
 
- - Mouse button 5 probably wont work. 
+ - Mouse button 5 probably won't work.
 
 
 
 
 
-Matthew Allum <mallum@o-hand.com> 2004 
-
-
+Matthew Allum <mallum@o-hand.com> 2004
diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c
index 4f1f198..c503ad6 100644
--- a/hw/kdrive/ephyr/ephyr.c
+++ b/hw/kdrive/ephyr/ephyr.c
@@ -1,5 +1,5 @@
 /*
- * Xephyr - A kdrive X server thats runs in a host X window.
+ * Xephyr - A kdrive X server that runs in a host X window.
  *          Authored by Matthew Allum <mallum@openedhand.com>
  *
  * Copyright © 2004 Nokia
@@ -219,7 +219,7 @@ ephyrMapFramebuffer(KdScreenInfo * screen)
 
     /*
      * Use the rotation last applied to ourselves (in the Xephyr case the fb
-     * coordinate system moves independently of the pointer coordiante system).
+     * coordinate system moves independently of the pointer coordinate system).
      */
     KdComputePointerMatrix(&m, ephyrRandr, screen->width, screen->height);
     KdSetPointerMatrix(&m);
@@ -294,7 +294,7 @@ ephyrShadowUpdate(ScreenPtr pScreen, shadowBufPtr pBuf)
     EPHYR_LOG("slow paint");
 
     /* FIXME: Slow Rotated/Reflected updates could be much
-     * much faster efficiently updating via tranforming
+     * much faster efficiently updating via transforming
      * pBuf->pDamage  regions
      */
     shadowUpdateRotatePacked(pScreen, pBuf);
@@ -777,8 +777,7 @@ ephyrUpdateModifierState(unsigned int state)
     for (i = 0, mask = 1; i < 8; i++, mask <<= 1) {
         int key;
 
-        /* Modifier is down, but shouldn't be
-         */
+        /* Modifier is down, but shouldn't be */
         if ((xkb_state & mask) && !(state & mask)) {
             int count = keyc->modifierKeyCount[i];
 
@@ -796,8 +795,7 @@ ephyrUpdateModifierState(unsigned int state)
                 }
         }
 
-        /* Modifier shoud be down, but isn't
-         */
+        /* Modifier should be down, but isn't */
         if (!(xkb_state & mask) && (state & mask))
             for (key = 0; key < MAP_LENGTH; key++)
                 if (keyc->xkbInfo->desc->map->modmap[key] & mask) {
diff --git a/hw/kdrive/ephyr/ephyr.h b/hw/kdrive/ephyr/ephyr.h
index fe01661..587a48d 100644
--- a/hw/kdrive/ephyr/ephyr.h
+++ b/hw/kdrive/ephyr/ephyr.h
@@ -1,5 +1,5 @@
 /*
- * Xephyr - A kdrive X server thats runs in a host X window.
+ * Xephyr - A kdrive X server that runs in a host X window.
  *          Authored by Matthew Allum <mallum@o-hand.com>
  *
  * Copyright © 2004 Nokia
diff --git a/hw/kdrive/ephyr/ephyr_glamor_glx.c b/hw/kdrive/ephyr/ephyr_glamor_glx.c
index 3fdc666..40b80cb 100644
--- a/hw/kdrive/ephyr/ephyr_glamor_glx.c
+++ b/hw/kdrive/ephyr/ephyr_glamor_glx.c
@@ -42,7 +42,7 @@
 #include <X11/Xproto.h>
 
 /* until we need geometry shaders GL3.1 should suffice. */
-/* Xephyr has it's own copy of this for build reasons */
+/* Xephyr has its own copy of this for build reasons */
 #define GLAMOR_GL_CORE_VER_MAJOR 3
 #define GLAMOR_GL_CORE_VER_MINOR 1
 /** @{
@@ -321,7 +321,7 @@ ephyr_glamor_glx_screen_init(xcb_window_t win)
             ctx = glXCreateContextAttribsARB(dpy, fb_config, NULL, True,
                                              context_attribs);
         } else {
-            FatalError("Xephyr -glamor_gles2 rquires "
+            FatalError("Xephyr -glamor_gles2 requires "
                        "GLX_EXT_create_context_es2_profile\n");
         }
     } else {
diff --git a/hw/kdrive/ephyr/ephyrinit.c b/hw/kdrive/ephyr/ephyrinit.c
index 47bd97a..020461d 100644
--- a/hw/kdrive/ephyr/ephyrinit.c
+++ b/hw/kdrive/ephyr/ephyrinit.c
@@ -1,5 +1,5 @@
 /*
- * Xephyr - A kdrive X server thats runs in a host X window.
+ * Xephyr - A kdrive X server that runs in a host X window.
  *          Authored by Matthew Allum <mallum@o-hand.com>
  *
  * Copyright © 2004 Nokia
diff --git a/hw/kdrive/ephyr/ephyrlog.h b/hw/kdrive/ephyr/ephyrlog.h
index 43679e1..744da74 100644
--- a/hw/kdrive/ephyr/ephyrlog.h
+++ b/hw/kdrive/ephyr/ephyrlog.h
@@ -1,5 +1,5 @@
 /*
- * Xephyr - A kdrive X server thats runs in a host X window.
+ * Xephyr - A kdrive X server that runs in a host X window.
  *          Authored by Matthew Allum <mallum@openedhand.com>
  *
  * Copyright © 2007 OpenedHand Ltd
diff --git a/hw/kdrive/ephyr/ephyrvideo.c b/hw/kdrive/ephyr/ephyrvideo.c
index 671a0dd..2dbddfb 100644
--- a/hw/kdrive/ephyr/ephyrvideo.c
+++ b/hw/kdrive/ephyr/ephyrvideo.c
@@ -1,5 +1,5 @@
 /*
- * Xephyr - A kdrive X server thats runs in a host X window.
+ * Xephyr - A kdrive X server that runs in a host X window.
  *          Authored by Matthew Allum <mallum@openedhand.com>
  *
  * Copyright © 2007 OpenedHand Ltd
diff --git a/hw/kdrive/ephyr/hostx.c b/hw/kdrive/ephyr/hostx.c
index c2f94ed..a5b2e34 100644
--- a/hw/kdrive/ephyr/hostx.c
+++ b/hw/kdrive/ephyr/hostx.c
@@ -1,5 +1,5 @@
 /*
- * Xephyr - A kdrive X server thats runs in a host X window.
+ * Xephyr - A kdrive X server that runs in a host X window.
  *          Authored by Matthew Allum <mallum@o-hand.com>
  *
  * Copyright © 2004 Nokia
@@ -680,7 +680,7 @@ hostx_init(void)
         }
     }
 
-    if (!xcb_aux_parse_color("red", &red, &green, &blue)) {
+    if (!xcb_aux_parse_color((char*)"red", &red, &green, &blue)) {
         xcb_lookup_color_cookie_t c =
             xcb_lookup_color(HostX.conn, xscreen->default_colormap, 3, "red");
         xcb_lookup_color_reply_t *reply =
@@ -975,7 +975,7 @@ hostx_screen_init(KdScreenInfo *screen,
      * -screen option (WxH+X or WxH+X+Y). Otherwise, accept the
      * position set by WM.
      * The trick here is putting this code after xcb_map_window() call,
-     * so these values won't be overriden by WM. */
+     * so these values won't be overridden by WM. */
     if (scrpriv->win_explicit_position)
     {
         uint32_t mask = XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y;
diff --git a/hw/kdrive/ephyr/hostx.h b/hw/kdrive/ephyr/hostx.h
index d0f3011..4b2678e 100644
--- a/hw/kdrive/ephyr/hostx.h
+++ b/hw/kdrive/ephyr/hostx.h
@@ -1,5 +1,5 @@
 /*
- * Xephyr - A kdrive X server thats runs in a host X window.
+ * Xephyr - A kdrive X server that runs in a host X window.
  *          Authored by Matthew Allum <mallum@o-hand.com>
  *
  * Copyright © 2004 Nokia
diff --git a/hw/kdrive/ephyr/man/Makefile.in b/hw/kdrive/ephyr/man/Makefile.in
index b5eb193..6378046 100644
--- a/hw/kdrive/ephyr/man/Makefile.in
+++ b/hw/kdrive/ephyr/man/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -105,7 +105,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -178,8 +177,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -193,6 +190,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -211,14 +210,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -235,8 +226,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -292,6 +285,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -375,7 +370,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -399,29 +393,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -459,8 +437,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -471,14 +447,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -676,7 +646,6 @@ ctags CTAGS:
 
 cscope cscopelist:
 
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/hw/kdrive/ephyr/meson.build b/hw/kdrive/ephyr/meson.build
index f8135e9..9e329ba 100644
--- a/hw/kdrive/ephyr/meson.build
+++ b/hw/kdrive/ephyr/meson.build
@@ -38,7 +38,7 @@ if build_xv
     xephyr_dep += dependency('xcb-xv')
 endif
 
-executable(
+xephyr_server = executable(
     'Xephyr',
     srcs,
     include_directories: [
diff --git a/hw/kdrive/src/Makefile.am b/hw/kdrive/src/Makefile.am
index 0833150..b1331da 100644
--- a/hw/kdrive/src/Makefile.am
+++ b/hw/kdrive/src/Makefile.am
@@ -13,7 +13,6 @@ KDRIVE_XV_SOURCES =	\
 endif
 
 libkdrive_la_SOURCES =	\
-	fourcc.h	\
 	kcmap.c		\
 	kdrive.c	\
 	kdrive.h	\
@@ -21,7 +20,8 @@ libkdrive_la_SOURCES =	\
 	kinput.c	\
 	kshadow.c	\
 	$(KDRIVE_XV_SOURCES) \
-        $(top_srcdir)/mi/miinitext.c
+	$(top_srcdir)/mi/miinitext.c	\
+	$(top_srcdir)/mi/miinitext.h
 
 if CONFIG_UDEV
 libkdrive_la_LIBADD = $(top_builddir)/config/libconfig.la
diff --git a/hw/kdrive/src/Makefile.in b/hw/kdrive/src/Makefile.in
index 862b1c5..54f2998 100644
--- a/hw/kdrive/src/Makefile.in
+++ b/hw/kdrive/src/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -105,7 +105,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -113,9 +112,9 @@ LTLIBRARIES = $(noinst_LTLIBRARIES)
 @CONFIG_HAL_TRUE@@CONFIG_UDEV_FALSE@libkdrive_la_DEPENDENCIES = $(top_builddir)/config/libconfig.la
 @CONFIG_UDEV_TRUE@libkdrive_la_DEPENDENCIES =  \
 @CONFIG_UDEV_TRUE@	$(top_builddir)/config/libconfig.la
-am__libkdrive_la_SOURCES_DIST = fourcc.h kcmap.c kdrive.c kdrive.h \
-	kinfo.c kinput.c kshadow.c kxv.c kxv.h \
-	$(top_srcdir)/mi/miinitext.c
+am__libkdrive_la_SOURCES_DIST = kcmap.c kdrive.c kdrive.h kinfo.c \
+	kinput.c kshadow.c kxv.c kxv.h $(top_srcdir)/mi/miinitext.c \
+	$(top_srcdir)/mi/miinitext.h
 @XV_TRUE@am__objects_1 = kxv.lo
 am_libkdrive_la_OBJECTS = kcmap.lo kdrive.lo kinfo.lo kinput.lo \
 	kshadow.lo $(am__objects_1) miinitext.lo
@@ -186,8 +185,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
@@ -207,8 +204,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -222,6 +217,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -240,14 +237,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -264,8 +253,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -321,6 +312,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -373,7 +366,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -397,29 +389,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -457,8 +433,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -469,14 +443,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -560,7 +528,6 @@ noinst_LTLIBRARIES = libkdrive.la
 @XV_TRUE@	kxv.h
 
 libkdrive_la_SOURCES = \
-	fourcc.h	\
 	kcmap.c		\
 	kdrive.c	\
 	kdrive.h	\
@@ -568,7 +535,8 @@ libkdrive_la_SOURCES = \
 	kinput.c	\
 	kshadow.c	\
 	$(KDRIVE_XV_SOURCES) \
-        $(top_srcdir)/mi/miinitext.c
+	$(top_srcdir)/mi/miinitext.c	\
+	$(top_srcdir)/mi/miinitext.h
 
 @CONFIG_HAL_TRUE@@CONFIG_UDEV_FALSE@libkdrive_la_LIBADD = $(top_builddir)/config/libconfig.la
 @CONFIG_UDEV_TRUE@libkdrive_la_LIBADD = $(top_builddir)/config/libconfig.la
@@ -725,7 +693,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/hw/kdrive/src/fourcc.h b/hw/kdrive/src/fourcc.h
deleted file mode 100644
index 534ec45..0000000
--- a/hw/kdrive/src/fourcc.h
+++ /dev/null
@@ -1,132 +0,0 @@
-
-/*
-   This header file contains listings of STANDARD guids for video formats.
-   Please do not place non-registered, or incomplete entries in this file.
-   A list of some popular fourcc's are at: http://www.webartz.com/fourcc/
-   For an explanation of fourcc <-> guid mappings see RFC2361.
-*/
-
-#ifndef _XF86_FOURCC_H_
-#define _XF86_FOURCC_H_ 1
-
-#define FOURCC_YUY2 0x32595559
-#define XVIMAGE_YUY2 \
-   { \
-	FOURCC_YUY2, \
-        XvYUV, \
-	LSBFirst, \
-	{'Y','U','Y','2', \
-	  0x00,0x00,0x00,0x10,0x80,0x00,0x00,0xAA,0x00,0x38,0x9B,0x71}, \
-	16, \
-	XvPacked, \
-	1, \
-	0, 0, 0, 0, \
-	8, 8, 8, \
-	1, 2, 2, \
-	1, 1, 1, \
-	{'Y','U','Y','V', \
-	  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, \
-	XvTopToBottom \
-   }
-
-#define FOURCC_YV12 0x32315659
-#define XVIMAGE_YV12 \
-   { \
-	FOURCC_YV12, \
-        XvYUV, \
-	LSBFirst, \
-	{'Y','V','1','2', \
-	  0x00,0x00,0x00,0x10,0x80,0x00,0x00,0xAA,0x00,0x38,0x9B,0x71}, \
-	12, \
-	XvPlanar, \
-	3, \
-	0, 0, 0, 0, \
-	8, 8, 8, \
-	1, 2, 2, \
-	1, 2, 2, \
-	{'Y','V','U', \
-	  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, \
-	XvTopToBottom \
-   }
-
-#define FOURCC_I420 0x30323449
-#define XVIMAGE_I420 \
-   { \
-	FOURCC_I420, \
-        XvYUV, \
-	LSBFirst, \
-	{'I','4','2','0', \
-	  0x00,0x00,0x00,0x10,0x80,0x00,0x00,0xAA,0x00,0x38,0x9B,0x71}, \
-	12, \
-	XvPlanar, \
-	3, \
-	0, 0, 0, 0, \
-	8, 8, 8, \
-	1, 2, 2, \
-	1, 2, 2, \
-	{'Y','U','V', \
-	  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, \
-	XvTopToBottom \
-   }
-
-#define FOURCC_UYVY 0x59565955
-#define XVIMAGE_UYVY \
-   { \
-	FOURCC_UYVY, \
-        XvYUV, \
-	LSBFirst, \
-	{'U','Y','V','Y', \
-	  0x00,0x00,0x00,0x10,0x80,0x00,0x00,0xAA,0x00,0x38,0x9B,0x71}, \
-	16, \
-	XvPacked, \
-	1, \
-	0, 0, 0, 0, \
-	8, 8, 8, \
-	1, 2, 2, \
-	1, 1, 1, \
-	{'U','Y','V','Y', \
-	  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, \
-	XvTopToBottom \
-   }
-
-#define FOURCC_IA44 0x34344149
-#define XVIMAGE_IA44 \
-   { \
-        FOURCC_IA44, \
-        XvYUV, \
-        LSBFirst, \
-        {'I','A','4','4', \
-          0x00,0x00,0x00,0x10,0x80,0x00,0x00,0xAA,0x00,0x38,0x9B,0x71}, \
-        8, \
-        XvPacked, \
-        1, \
-        0, 0, 0, 0, \
-        8, 8, 8, \
-        1, 1, 1, \
-        1, 1, 1, \
-        {'A','I', \
-          0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, \
-        XvTopToBottom \
-   }
-
-#define FOURCC_AI44 0x34344941
-#define XVIMAGE_AI44 \
-   { \
-        FOURCC_AI44, \
-        XvYUV, \
-        LSBFirst, \
-        {'A','I','4','4', \
-          0x00,0x00,0x00,0x10,0x80,0x00,0x00,0xAA,0x00,0x38,0x9B,0x71}, \
-        8, \
-        XvPacked, \
-        1, \
-        0, 0, 0, 0, \
-        8, 8, 8, \
-        1, 1, 1, \
-        1, 1, 1, \
-        {'I','A', \
-          0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, \
-        XvTopToBottom \
-   }
-
-#endif                          /* _XF86_FOURCC_H_ */
diff --git a/hw/kdrive/src/kdrive.c b/hw/kdrive/src/kdrive.c
index 6e81683..8de01cc 100644
--- a/hw/kdrive/src/kdrive.c
+++ b/hw/kdrive/src/kdrive.c
@@ -163,16 +163,10 @@ KdEnableScreen(ScreenPtr pScreen)
     return TRUE;
 }
 
-void
-AbortDDX(enum ExitCode error)
-{
-    KdDisableScreens();
-}
-
 void
 ddxGiveUp(enum ExitCode error)
 {
-    AbortDDX(error);
+    KdDisableScreens();
 }
 
 static Bool kdDumbDriver;
@@ -361,11 +355,11 @@ KdUseMsg(void)
         ("-mouse driver [,n,,options]    Specify the pointer driver and its options (n is the number of buttons)\n");
     ErrorF
         ("-keybd driver [,,options]      Specify the keyboard driver and its options\n");
-    ErrorF("-xkb-rules       Set default XkbRules value (can be overriden by -keybd options)\n");
-    ErrorF("-xkb-model       Set default XkbModel value (can be overriden by -keybd options)\n");
-    ErrorF("-xkb-layout      Set default XkbLayout value (can be overriden by -keybd options)\n");
-    ErrorF("-xkb-variant     Set default XkbVariant value (can be overriden by -keybd options)\n");
-    ErrorF("-xkb-options     Set default XkbOptions value (can be overriden by -keybd options)\n");
+    ErrorF("-xkb-rules       Set default XkbRules value (can be overridden by -keybd options)\n");
+    ErrorF("-xkb-model       Set default XkbModel value (can be overridden by -keybd options)\n");
+    ErrorF("-xkb-layout      Set default XkbLayout value (can be overridden by -keybd options)\n");
+    ErrorF("-xkb-variant     Set default XkbVariant value (can be overridden by -keybd options)\n");
+    ErrorF("-xkb-options     Set default XkbOptions value (can be overridden by -keybd options)\n");
     ErrorF("-zaphod          Disable cursor screen switching\n");
     ErrorF("-2button         Emulate 3 button mouse\n");
     ErrorF("-3button         Disable 3 button mouse emulation\n");
@@ -1001,11 +995,13 @@ DeleteGPUDeviceRequest(struct OdevAttributes *attribs)
 }
 #endif
 
+#if defined(CONFIG_UDEV) || defined(CONFIG_HAL)
 struct xf86_platform_device *
 xf86_find_platform_device_by_devnum(int major, int minor)
 {
     return NULL;
 }
+#endif
 
 #ifdef SYSTEMD_LOGIND
 void
diff --git a/hw/kdrive/src/kinput.c b/hw/kdrive/src/kinput.c
index 8ab8c24..185a9a3 100644
--- a/hw/kdrive/src/kinput.c
+++ b/hw/kdrive/src/kinput.c
@@ -354,12 +354,6 @@ KdPointerProc(DeviceIntPtr pDevice, int onoff)
     return BadImplementation;
 }
 
-Bool
-LegalModifier(unsigned int key, DeviceIntPtr pDev)
-{
-    return TRUE;
-}
-
 static void
 KdRingBell(KdKeyboardInfo * ki, int volume, int pitch, int duration)
 {
diff --git a/hw/kdrive/src/kxv.c b/hw/kdrive/src/kxv.c
index 711f4d8..cb04f48 100644
--- a/hw/kdrive/src/kxv.c
+++ b/hw/kdrive/src/kxv.c
@@ -423,7 +423,7 @@ KdXVInitAdaptors(ScreenPtr pScreen, KdVideoAdaptorPtr infoPtr, int number)
    client clip from the GC when the video is initialized.  We then
    use KdXVUpdateCompositeClip to calculate the new composite clip
    when we need it.  This is different from what DEC did.  They saved
-   the GC and used it's clip list when they needed to reclip the window,
+   the GC and used its clip list when they needed to reclip the window,
    even if the client clip was different from the one the video was
    initialized with.  If the original GC was destroyed, they had to stop
    the video.  I like the new method better (MArk).
diff --git a/hw/kdrive/src/meson.build b/hw/kdrive/src/meson.build
index 06bc34e..fbc0727 100644
--- a/hw/kdrive/src/meson.build
+++ b/hw/kdrive/src/meson.build
@@ -5,14 +5,13 @@ srcs_kdrive = [
     'kinput.c',
     'kshadow.c',
     '../../../mi/miinitext.c',
+    '../../../mi/miinitext.h',
 ]
 
 if build_xv
     srcs_kdrive += 'kxv.c'
 endif
 
-#XXX: libconfig
-
 kdrive = static_library('kdrive',
     srcs_kdrive,
     include_directories: inc,
diff --git a/hw/meson.build b/hw/meson.build
index 96c1559..f8bd28a 100644
--- a/hw/meson.build
+++ b/hw/meson.build
@@ -2,10 +2,6 @@ if get_option('xephyr')
     subdir('kdrive')
 endif
 
-if get_option('dmx')
-    subdir('dmx')
-endif
-
 if get_option('xvfb')
     subdir('vfb')
 endif
@@ -22,10 +18,6 @@ if build_xquartz
     subdir('xquartz')
 endif
 
-if build_xwayland
-    subdir('xwayland')
-endif
-
 if build_xwin
     subdir('xwin')
 endif
diff --git a/hw/vfb/InitInput.c b/hw/vfb/InitInput.c
index 52cde72..2c272fa 100644
--- a/hw/vfb/InitInput.c
+++ b/hw/vfb/InitInput.c
@@ -43,12 +43,6 @@ from The Open Group.
 #include "exevents.h"
 #include "extinit.h"
 
-Bool
-LegalModifier(unsigned int key, DeviceIntPtr pDev)
-{
-    return TRUE;
-}
-
 void
 ProcessInputEvents(void)
 {
diff --git a/hw/vfb/InitOutput.c b/hw/vfb/InitOutput.c
index d9f23f3..48efb61 100644
--- a/hw/vfb/InitOutput.c
+++ b/hw/vfb/InitOutput.c
@@ -156,22 +156,16 @@ vfbBitsPerPixel(int depth)
         return 32;
 }
 
-void
-ddxGiveUp(enum ExitCode error)
+static void
+freeScreenInfo(vfbScreenInfoPtr pvfb)
 {
-    int i;
-
-    /* clean up the framebuffers */
-
     switch (fbmemtype) {
 #ifdef HAVE_MMAP
     case MMAPPED_FILE_FB:
-        for (i = 0; i < vfbNumScreens; i++) {
-            if (-1 == unlink(vfbScreens[i].mmap_file)) {
-                perror("unlink");
-                ErrorF("unlink %s failed, %s",
-                       vfbScreens[i].mmap_file, strerror(errno));
-            }
+        if (-1 == unlink(pvfb->mmap_file)) {
+            perror("unlink");
+            ErrorF("unlink %s failed, %s",
+                   pvfb->mmap_file, strerror(errno));
         }
         break;
 #else                           /* HAVE_MMAP */
@@ -181,11 +175,9 @@ ddxGiveUp(enum ExitCode error)
 
 #ifdef HAS_SHM
     case SHARED_MEMORY_FB:
-        for (i = 0; i < vfbNumScreens; i++) {
-            if (-1 == shmdt((char *) vfbScreens[i].pXWDHeader)) {
-                perror("shmdt");
-                ErrorF("shmdt failed, %s", strerror(errno));
-            }
+        if (-1 == shmdt((char *) pvfb->pXWDHeader)) {
+            perror("shmdt");
+            ErrorF("shmdt failed, %s", strerror(errno));
         }
         break;
 #else                           /* HAS_SHM */
@@ -194,17 +186,20 @@ ddxGiveUp(enum ExitCode error)
 #endif                          /* HAS_SHM */
 
     case NORMAL_MEMORY_FB:
-        for (i = 0; i < vfbNumScreens; i++) {
-            free(vfbScreens[i].pXWDHeader);
-        }
+        free(pvfb->pXWDHeader);
         break;
     }
 }
 
 void
-AbortDDX(enum ExitCode error)
+ddxGiveUp(enum ExitCode error)
 {
-    ddxGiveUp(error);
+    int i;
+
+    /* clean up the framebuffers */
+    for (i = 0; i < vfbNumScreens; i++) {
+        freeScreenInfo(&vfbScreens[i]);
+    }
 }
 
 #ifdef __APPLE__
@@ -279,13 +274,6 @@ ddxProcessArgument(int argc, char *argv[], int i)
     else
         currentScreen = &vfbScreens[lastScreen];
 
-#define CHECK_FOR_REQUIRED_ARGUMENTS(num) \
-    if (((i + num) >= argc) || (!argv[i + num])) {                      \
-      ErrorF("Required argument to %s not specified\n", argv[i]);       \
-      UseMsg();                                                         \
-      FatalError("Required argument to %s not specified\n", argv[i]);   \
-    }
-
     if (strcmp(argv[i], "-screen") == 0) {      /* -screen n WxHxD */
         int screenNum;
 
@@ -470,12 +458,6 @@ vfbStoreColors(ColormapPtr pmap, int ndef, xColorItem * pdefs)
     }
 }
 
-static Bool
-vfbSaveScreen(ScreenPtr pScreen, int on)
-{
-    return TRUE;
-}
-
 #ifdef HAVE_MMAP
 
 /* this flushes any changes to the screens out to the mmapped file */
@@ -646,8 +628,8 @@ vfbAllocateFramebufferMemory(vfbScreenInfoPtr pvfb)
 
         return pvfb->pfbMemory;
     }
-    else
-        return NULL;
+
+    return NULL;
 }
 
 static void
@@ -804,6 +786,9 @@ vfbRRCrtcSet(ScreenPtr pScreen,
 static Bool
 vfbRRGetInfo(ScreenPtr pScreen, Rotation *rotations)
 {
+    /* Don't support rotations */
+    *rotations = RR_Rotate_0;
+
     return TRUE;
 }
 
@@ -851,6 +836,9 @@ vfbRandRInit(ScreenPtr pScreen)
     if (!crtc)
        return FALSE;
 
+    /* This is to avoid xrandr to complain about the gamma missing */
+    RRCrtcGammaSetSize (crtc, 256);
+
     output = RROutputCreate (pScreen, "screen", 6, NULL);
     if (!output)
        return FALSE;
@@ -944,8 +932,6 @@ vfbScreenInit(ScreenPtr pScreen, int argc, char **argv)
        return FALSE;
 
     pScreen->InstallColormap = vfbInstallColormap;
-
-    pScreen->SaveScreen = vfbSaveScreen;
     pScreen->StoreColors = vfbStoreColors;
 
     miDCInitialize(pScreen, &vfbPointerCursorFuncs);
diff --git a/hw/vfb/Makefile.am b/hw/vfb/Makefile.am
index 7033397..a4b4526 100644
--- a/hw/vfb/Makefile.am
+++ b/hw/vfb/Makefile.am
@@ -8,7 +8,8 @@ AM_CFLAGS = -DHAVE_DIX_CONFIG_H \
 
 SRCS =	InitInput.c \
 	InitOutput.c \
-	$(top_srcdir)/mi/miinitext.c
+	$(top_srcdir)/mi/miinitext.c \
+	$(top_srcdir)/mi/miinitext.h
 
 Xvfb_SOURCES = $(SRCS)
 
diff --git a/hw/vfb/Makefile.in b/hw/vfb/Makefile.in
index befef50..0f2ddb5 100644
--- a/hw/vfb/Makefile.in
+++ b/hw/vfb/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -106,7 +106,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -202,8 +201,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 DIST_SUBDIRS = $(SUBDIRS)
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -249,8 +246,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -264,6 +259,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -282,14 +279,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -306,8 +295,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -363,6 +354,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -415,7 +408,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -439,29 +431,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -499,8 +475,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -511,8 +485,6 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = \
         @XVFB_LIBS@ \
 	$(MAIN_LIB) \
@@ -520,10 +492,6 @@ XVFB_LIBS = \
 	$(top_builddir)/Xi/libXistubs.la
 
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -603,7 +571,8 @@ AM_CFLAGS = -DHAVE_DIX_CONFIG_H \
 
 SRCS = InitInput.c \
 	InitOutput.c \
-	$(top_srcdir)/mi/miinitext.c
+	$(top_srcdir)/mi/miinitext.c \
+	$(top_srcdir)/mi/miinitext.h
 
 Xvfb_SOURCES = $(SRCS)
 Xvfb_LDADD = $(XVFB_LIBS) $(XVFB_SYS_LIBS) $(XSERVER_SYS_LIBS)
@@ -851,7 +820,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/hw/vfb/man/Makefile.in b/hw/vfb/man/Makefile.in
index 30a36be..91949bb 100644
--- a/hw/vfb/man/Makefile.in
+++ b/hw/vfb/man/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -105,7 +105,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -178,8 +177,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -193,6 +190,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -211,14 +210,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -235,8 +226,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -292,6 +285,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -375,7 +370,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -399,29 +393,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -459,8 +437,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -471,14 +447,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -676,7 +646,6 @@ ctags CTAGS:
 
 cscope cscopelist:
 
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/hw/vfb/meson.build b/hw/vfb/meson.build
index 537e96a..7332866 100644
--- a/hw/vfb/meson.build
+++ b/hw/vfb/meson.build
@@ -2,6 +2,7 @@ srcs = [
     'InitInput.c',
     'InitOutput.c',
     '../../mi/miinitext.c',
+    '../../mi/miinitext.h',
 ]
 
 xvfb_server = executable(
diff --git a/hw/xfree86/Makefile.am b/hw/xfree86/Makefile.am
index 9aeaea1..baf380d 100644
--- a/hw/xfree86/Makefile.am
+++ b/hw/xfree86/Makefile.am
@@ -30,22 +30,18 @@ if VGAHW
 VGAHW_SUBDIR = vgahw
 endif
 
-if VBE
-VBE_SUBDIR = vbe
-endif
-
 if INT10MODULE
 INT10_SUBDIR = int10
 endif
 
 SUBDIRS = common ddc x86emu $(INT10_SUBDIR) os-support parser \
 	  ramdac $(VGAHW_SUBDIR) loader modes $(DRI_SUBDIR) \
-	  $(DRI2_SUBDIR) . $(VBE_SUBDIR) i2c dixmods xkb \
+	  $(DRI2_SUBDIR) . i2c dixmods xkb \
 	  fbdevhw shadowfb exa $(XF86UTILS_SUBDIR) doc man \
 	  $(GLAMOR_EGL_SUBDIR) drivers
 
 DIST_SUBDIRS = common ddc i2c x86emu int10 fbdevhw os-support \
-               parser ramdac shadowfb vbe vgahw \
+               parser ramdac shadowfb vgahw \
                loader dixmods xkb dri dri2 exa modes \
 	       utils doc man glamor_egl drivers
 
@@ -75,6 +71,7 @@ LOCAL_LIBS = \
             $(DRI2_LIB) \
 	    $(DRI3_LIB) \
 	    $(GLXVND_LIB) \
+	    $(top_builddir)/fb/libfb.la \
 	    $(top_builddir)/miext/sync/libsync.la \
             $(top_builddir)/mi/libmi.la \
             $(top_builddir)/os/libos.la \
diff --git a/hw/xfree86/Makefile.in b/hw/xfree86/Makefile.in
index 26a94da..fab724d 100644
--- a/hw/xfree86/Makefile.in
+++ b/hw/xfree86/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -107,7 +107,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES = Xorg.sh
 CONFIG_CLEAN_VPATH_FILES =
@@ -122,7 +121,7 @@ am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
 	dixmods/libdixmods.la modes/libxf86modes.la \
 	ramdac/libramdac.la ddc/libddc.la i2c/libi2c.la \
 	$(am__DEPENDENCIES_1) xkb/libxorgxkb.la $(DRI_LIB) $(DRI2_LIB) \
-	$(DRI3_LIB) $(GLXVND_LIB) \
+	$(DRI3_LIB) $(GLXVND_LIB) $(top_builddir)/fb/libfb.la \
 	$(top_builddir)/miext/sync/libsync.la \
 	$(top_builddir)/mi/libmi.la $(top_builddir)/os/libos.la \
 	$(top_builddir)/Xext/libXvidmode.la
@@ -213,8 +212,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Xorg.sh.in \
 	$(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -260,8 +257,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -275,6 +270,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -293,14 +290,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -317,8 +306,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -374,6 +365,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -426,7 +419,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -450,29 +442,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -510,8 +486,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -522,14 +496,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -612,16 +580,15 @@ top_srcdir = @top_srcdir@
 @GLAMOR_EGL_TRUE@GLAMOR_EGL_SUBDIR = glamor_egl
 @XF86UTILS_TRUE@XF86UTILS_SUBDIR = utils
 @VGAHW_TRUE@VGAHW_SUBDIR = vgahw
-@VBE_TRUE@VBE_SUBDIR = vbe
 @INT10MODULE_TRUE@INT10_SUBDIR = int10
 SUBDIRS = common ddc x86emu $(INT10_SUBDIR) os-support parser \
 	  ramdac $(VGAHW_SUBDIR) loader modes $(DRI_SUBDIR) \
-	  $(DRI2_SUBDIR) . $(VBE_SUBDIR) i2c dixmods xkb \
+	  $(DRI2_SUBDIR) . i2c dixmods xkb \
 	  fbdevhw shadowfb exa $(XF86UTILS_SUBDIR) doc man \
 	  $(GLAMOR_EGL_SUBDIR) drivers
 
 DIST_SUBDIRS = common ddc i2c x86emu int10 fbdevhw os-support \
-               parser ramdac shadowfb vbe vgahw \
+               parser ramdac shadowfb vgahw \
                loader dixmods xkb dri dri2 exa modes \
 	       utils doc man glamor_egl drivers
 
@@ -649,6 +616,7 @@ LOCAL_LIBS = \
             $(DRI2_LIB) \
 	    $(DRI3_LIB) \
 	    $(GLXVND_LIB) \
+	    $(top_builddir)/fb/libfb.la \
 	    $(top_builddir)/miext/sync/libsync.la \
             $(top_builddir)/mi/libmi.la \
             $(top_builddir)/os/libos.la \
@@ -958,7 +926,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
@@ -1028,7 +995,8 @@ installdirs-am:
 	done
 install: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) install-recursive
-install-exec: install-exec-recursive
+install-exec: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-exec-recursive
 install-data: install-data-recursive
 uninstall: uninstall-recursive
 
@@ -1137,7 +1105,7 @@ uninstall-am: uninstall-binPROGRAMS uninstall-local \
 	@$(NORMAL_INSTALL)
 	$(MAKE) $(AM_MAKEFLAGS) uninstall-hook
 .MAKE: $(am__recursive_targets) all check install install-am \
-	install-exec-am install-strip uninstall-am
+	install-exec install-exec-am install-strip uninstall-am
 
 .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
 	am--depfiles check check-am clean clean-binPROGRAMS \
diff --git a/hw/xfree86/common/Makefile.am b/hw/xfree86/common/Makefile.am
index 41758fd..39c1e90 100644
--- a/hw/xfree86/common/Makefile.am
+++ b/hw/xfree86/common/Makefile.am
@@ -45,16 +45,17 @@ libcommon_la_SOURCES = xf86Configure.c xf86Bus.c xf86Config.c \
                       xf86Mode.c xorgHelper.c xf86Extensions.h \
 		      xf86Extensions.c $(XF86VMODESOURCES) \
                       $(XVSOURCES) $(BUSSOURCES) $(RANDRSOURCES)
-nodist_libcommon_la_SOURCES = xf86DefModeSet.c xf86Build.h
+nodist_libcommon_la_SOURCES = xf86DefModeSet.c
 libcommon_la_LIBADD = $(top_builddir)/config/libconfig.la
 
 AM_CPPFLAGS = $(XORG_INCS) -I$(srcdir)/../ddc -I$(srcdir)/../i2c \
 	   -I$(srcdir)/../loader -I$(srcdir)/../parser \
            -I$(srcdir)/../vbe -I$(srcdir)/../int10 \
 	   -I$(srcdir)/../vgahw -I$(srcdir)/../dixmods/extmod \
-	   -I$(srcdir)/../modes -I$(srcdir)/../ramdac -I$(srcdir)/../dri2
+	   -I$(srcdir)/../modes -I$(srcdir)/../ramdac -I$(srcdir)/../dri2 \
+	   -I$(top_builddir)
 
-sdk_HEADERS = compiler.h fourcc.h xf86.h xf86Module.h xf86Opt.h \
+sdk_HEADERS = compiler.h xf86.h xf86Module.h xf86Opt.h \
               xf86PciInfo.h xf86Priv.h xf86Privstr.h \
               xf86cmap.h xf86fbman.h xf86str.h xf86Xinput.h xisb.h \
               $(XVSDKINCS) $(XF86VMODE_SDK) $(DGA_SDK) xorgVersion.h \
@@ -62,12 +63,10 @@ sdk_HEADERS = compiler.h fourcc.h xf86.h xf86Module.h xf86Opt.h \
 	      xf86platformBus.h xf86MatchDrivers.h \
 	      xaarop.h
 
-DISTCLEANFILES = xf86Build.h
 CLEANFILES = $(BUILT_SOURCES)
 
 EXTRA_DIST = \
 	compiler.h \
-	fourcc.h \
 	xf86.h \
 	xf86Bus.h \
 	xf86Config.h \
diff --git a/hw/xfree86/common/Makefile.in b/hw/xfree86/common/Makefile.in
index c14c776..e2977b8 100644
--- a/hw/xfree86/common/Makefile.in
+++ b/hw/xfree86/common/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -109,9 +109,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
-CONFIG_CLEAN_FILES = xf86Build.h
+CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 LTLIBRARIES = $(noinst_LTLIBRARIES)
 libcommon_la_DEPENDENCIES = $(top_builddir)/config/libconfig.la
@@ -203,12 +202,11 @@ am__can_run_installinfo = \
     n|no|NO) false;; \
     *) (install-info --version) >/dev/null 2>&1;; \
   esac
-am__sdk_HEADERS_DIST = compiler.h fourcc.h xf86.h xf86Module.h \
-	xf86Opt.h xf86PciInfo.h xf86Priv.h xf86Privstr.h xf86cmap.h \
-	xf86fbman.h xf86str.h xf86Xinput.h xisb.h xf86xv.h xf86xvmc.h \
-	xf86xvpriv.h dgaproc.h xorgVersion.h xf86sbusBus.h \
-	xf86VGAarbiter.h xf86Optionstr.h xf86platformBus.h \
-	xf86MatchDrivers.h xaarop.h
+am__sdk_HEADERS_DIST = compiler.h xf86.h xf86Module.h xf86Opt.h \
+	xf86PciInfo.h xf86Priv.h xf86Privstr.h xf86cmap.h xf86fbman.h \
+	xf86str.h xf86Xinput.h xisb.h xf86xv.h xf86xvmc.h xf86xvpriv.h \
+	dgaproc.h xorgVersion.h xf86sbusBus.h xf86VGAarbiter.h \
+	xf86Optionstr.h xf86platformBus.h xf86MatchDrivers.h xaarop.h
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
 am__vpath_adj = case $$p in \
     $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@ -255,10 +253,7 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
-am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/xf86Build.h.in \
-	$(top_srcdir)/depcomp
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
@@ -277,8 +272,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -292,6 +285,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -310,14 +305,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -334,8 +321,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -391,6 +380,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -443,7 +434,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -467,29 +457,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -527,8 +501,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -539,14 +511,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -644,15 +610,16 @@ libcommon_la_SOURCES = xf86Configure.c xf86Bus.c xf86Config.c \
 		      xf86Extensions.c $(XF86VMODESOURCES) \
                       $(XVSOURCES) $(BUSSOURCES) $(RANDRSOURCES)
 
-nodist_libcommon_la_SOURCES = xf86DefModeSet.c xf86Build.h
+nodist_libcommon_la_SOURCES = xf86DefModeSet.c
 libcommon_la_LIBADD = $(top_builddir)/config/libconfig.la
 AM_CPPFLAGS = $(XORG_INCS) -I$(srcdir)/../ddc -I$(srcdir)/../i2c \
 	   -I$(srcdir)/../loader -I$(srcdir)/../parser \
            -I$(srcdir)/../vbe -I$(srcdir)/../int10 \
 	   -I$(srcdir)/../vgahw -I$(srcdir)/../dixmods/extmod \
-	   -I$(srcdir)/../modes -I$(srcdir)/../ramdac -I$(srcdir)/../dri2
+	   -I$(srcdir)/../modes -I$(srcdir)/../ramdac -I$(srcdir)/../dri2 \
+	   -I$(top_builddir)
 
-sdk_HEADERS = compiler.h fourcc.h xf86.h xf86Module.h xf86Opt.h \
+sdk_HEADERS = compiler.h xf86.h xf86Module.h xf86Opt.h \
               xf86PciInfo.h xf86Priv.h xf86Privstr.h \
               xf86cmap.h xf86fbman.h xf86str.h xf86Xinput.h xisb.h \
               $(XVSDKINCS) $(XF86VMODE_SDK) $(DGA_SDK) xorgVersion.h \
@@ -660,11 +627,9 @@ sdk_HEADERS = compiler.h fourcc.h xf86.h xf86Module.h xf86Opt.h \
 	      xf86platformBus.h xf86MatchDrivers.h \
 	      xaarop.h
 
-DISTCLEANFILES = xf86Build.h
 CLEANFILES = $(BUILT_SOURCES)
 EXTRA_DIST = \
 	compiler.h \
-	fourcc.h \
 	xf86.h \
 	xf86Bus.h \
 	xf86Config.h \
@@ -726,8 +691,6 @@ $(top_srcdir)/configure:  $(am__configure_deps)
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(am__aclocal_m4_deps):
-xf86Build.h: $(top_builddir)/config.status $(srcdir)/xf86Build.h.in
-	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
 
 clean-noinstLTLIBRARIES:
 	-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
@@ -886,7 +849,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
@@ -930,7 +892,8 @@ installdirs:
 	done
 install: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) install-am
-install-exec: install-exec-am
+install-exec: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-exec-am
 install-data: install-data-am
 uninstall: uninstall-am
 
@@ -956,7 +919,6 @@ clean-generic:
 distclean-generic:
 	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
 	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
 
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
@@ -1093,7 +1055,7 @@ ps-am:
 
 uninstall-am: uninstall-sdkHEADERS
 
-.MAKE: all check install install-am install-strip
+.MAKE: all check install install-am install-exec install-strip
 
 .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
 	clean-generic clean-libtool clean-noinstLTLIBRARIES \
diff --git a/hw/xfree86/common/compiler.h b/hw/xfree86/common/compiler.h
index 2b2008b..eb788d3 100644
--- a/hw/xfree86/common/compiler.h
+++ b/hw/xfree86/common/compiler.h
@@ -518,14 +518,10 @@ xf86WriteMmio32Le(__volatile__ void *base, const unsigned long offset,
     barrier();
 }
 
-#elif defined(__mips__) || (defined(__arm32__) && !defined(__linux__))
-#if defined(__arm32__) || defined(__mips64)
+#elif defined(__arm32__) && !defined(__linux__)
 #define PORT_SIZE long
-#else
-#define PORT_SIZE short
-#endif
 
-_X_EXPORT unsigned int IOPortBase;      /* Memory mapped I/O port area */
+extern _X_EXPORT unsigned int IOPortBase;      /* Memory mapped I/O port area */
 
 static __inline__ void
 outb(unsigned PORT_SIZE port, unsigned char val)
diff --git a/hw/xfree86/common/dgaproc.h b/hw/xfree86/common/dgaproc.h
index 7925bd4..b9f0030 100644
--- a/hw/xfree86/common/dgaproc.h
+++ b/hw/xfree86/common/dgaproc.h
@@ -56,7 +56,6 @@ typedef struct {
 
 extern Bool DGAScreenAvailable(ScreenPtr pScreen);
 extern Bool DGAActive(int Index);
-extern void DGAShutdown(void);
 
 extern Bool DGAVTSwitch(void);
 extern Bool DGAStealButtonEvent(DeviceIntPtr dev, int Index,
diff --git a/hw/xfree86/common/meson.build b/hw/xfree86/common/meson.build
index 514999f..7dc19c6 100644
--- a/hw/xfree86/common/meson.build
+++ b/hw/xfree86/common/meson.build
@@ -26,7 +26,6 @@ srcs_xorg_common = [
 
 xorg_sdk_headers = [
     'compiler.h',
-    'fourcc.h',
     'xf86.h',
     'xf86Module.h',
     'xf86Opt.h',
@@ -47,6 +46,15 @@ xorg_sdk_headers = [
     'xaarop.h',
 ]
 
+fallback_driver = get_option('fallback_input_driver')
+if fallback_driver == 'auto'
+    if host_machine.system() == 'linux'
+        fallback_driver = 'libinput'
+    else
+        fallback_driver = ''
+    endif
+endif
+
 if build_dga
     srcs_xorg_common += 'xf86DGA.c'
     xorg_sdk_headers += 'dgaproc.h'
@@ -63,12 +71,11 @@ endif
 
 if get_option('pciaccess')
     srcs_xorg_common += ['xf86pciBus.c', 'xf86VGAarbiter.c']
-endif
 
-srcs_xorg_common += configure_file(
-    output: 'xf86Build.h',
-    command: ['sh', join_paths(meson.current_source_dir(), 'xf86Build.sh'), '@OUTPUT@'],
-)
+    if host_machine.cpu() == 'sparc' or host_machine.cpu() == 'sparc64'
+        srcs_xorg_common += 'xf86sbusBus.c'
+    endif
+endif
 
 srcs_xorg_common += custom_target(
     'xf86DefModeSet.c',
@@ -80,14 +87,17 @@ srcs_xorg_common += custom_target(
 
 xorg_common = static_library('xorg_common',
     srcs_xorg_common,
-    include_directories: [inc, xorg_inc],
+    include_directories: [inc, xorg_inc, top_dir_inc],
     dependencies: [
         common_dep,
         dbus_dep,
         pciaccess_dep,
         libdrm_dep,
     ],
-    c_args: xorg_c_args,
+    c_args: [
+        xorg_c_args,
+        '-DFALLBACK_INPUT_DRIVER="@0@"'.format(fallback_driver)
+    ],
 )
 
 install_data(xorg_sdk_headers, install_dir: xorgsdkdir)
diff --git a/hw/xfree86/common/xf86.h b/hw/xfree86/common/xf86.h
index 5743f0c..927a7a7 100644
--- a/hw/xfree86/common/xf86.h
+++ b/hw/xfree86/common/xf86.h
@@ -79,14 +79,6 @@ extern _X_EXPORT Bool xf86DRI2Enabled(void);
 
 #define XF86SCRNINFO(p) xf86ScreenToScrn(p)
 
-#define XF86FLIP_PIXELS() \
-	do { \
-	    if (xf86GetFlipPixels()) { \
-		pScreen->whitePixel = (pScreen->whitePixel) ? 0 : 1; \
-		pScreen->blackPixel = (pScreen->blackPixel) ? 0 : 1; \
-	   } \
-	while (0)
-
 #define BOOLTOSTRING(b) ((b) ? "TRUE" : "FALSE")
 
 /* Compatibility functions for pre-input-thread drivers */
@@ -155,8 +147,8 @@ extern _X_EXPORT EntityInfoPtr xf86GetEntityInfo(int entityIndex);
 extern _X_EXPORT Bool xf86IsEntityPrimary(int entityIndex);
 extern _X_EXPORT ScrnInfoPtr xf86FindScreenForEntity(int entityIndex);
 
-extern _X_EXPORT int xf86GetLastScrnFlag(int entityIndex);
-extern _X_EXPORT void xf86SetLastScrnFlag(int entityIndex, int scrnIndex);
+#define xf86SetLastScrnFlag(e, s) do { } while (0)
+
 extern _X_EXPORT Bool xf86IsEntityShared(int entityIndex);
 extern _X_EXPORT void xf86SetEntityShared(int entityIndex);
 extern _X_EXPORT Bool xf86IsEntitySharable(int entityIndex);
@@ -286,10 +278,6 @@ xf86GetWeight(void);
 extern _X_EXPORT Gamma
 xf86GetGamma(void);
 extern _X_EXPORT Bool
-xf86GetFlipPixels(void);
-extern _X_EXPORT const char *
-xf86GetServerName(void);
-extern _X_EXPORT Bool
 xf86ServerIsExiting(void);
 extern _X_EXPORT Bool
 xf86ServerIsResetting(void);
diff --git a/hw/xfree86/common/xf86Build.h.in b/hw/xfree86/common/xf86Build.h.in
deleted file mode 100644
index a4f56b0..0000000
--- a/hw/xfree86/common/xf86Build.h.in
+++ /dev/null
@@ -1,2 +0,0 @@
-#define BUILD_DATE @BUILD_DATE@
-#define BUILD_TIME @BUILD_TIME@
diff --git a/hw/xfree86/common/xf86Build.sh b/hw/xfree86/common/xf86Build.sh
deleted file mode 100755
index 5f859a5..0000000
--- a/hw/xfree86/common/xf86Build.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-DATE_FMT="%Y%m%d"
-TIME_FMT="1%H%M%S"
-
-BUILD_DATE="`date "+$DATE_FMT"`"
-BUILD_TIME="`date "+$TIME_FMT"`"
-if test "x$SOURCE_DATE_EPOCH" != "x"; then
-	BUILD_DATE="`date -u -d "@$SOURCE_DATE_EPOCH" "+$DATE_FMT" 2>/dev/null || date -u -r "$SOURCE_DATE_EPOCH" "+$DATE_FMT" 2>/dev/null || date -u "+$DATE_FMT"`"
-	BUILD_TIME="`date -u -d "@$SOURCE_DATE_EPOCH" "+$TIME_FMT" 2>/dev/null || date -u -r "$SOURCE_DATE_EPOCH" "+$TIME_FMT" 2>/dev/null || date -u "+$TIME_FMT"`"
-fi
-
-output=$1
-echo "#define BUILD_DATE $BUILD_DATE" > $output
-echo "#define BUILD_TIME $BUILD_TIME" >> $output
diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c
index 6bbf489..fd144db 100644
--- a/hw/xfree86/common/xf86Bus.c
+++ b/hw/xfree86/common/xf86Bus.c
@@ -106,6 +106,37 @@ xf86CallDriverProbe(DriverPtr drv, Bool detect_only)
     return foundScreen;
 }
 
+static screenLayoutPtr
+xf86BusConfigMatch(ScrnInfoPtr scrnInfo, Bool is_gpu) {
+    screenLayoutPtr layout;
+    int i, j;
+
+    for (layout = xf86ConfigLayout.screens; layout->screen != NULL;
+         layout++) {
+        for (i = 0; i < scrnInfo->numEntities; i++) {
+            GDevPtr dev =
+                xf86GetDevFromEntity(scrnInfo->entityList[i],
+                                     scrnInfo->entityInstanceList[i]);
+
+            if (is_gpu) {
+                for (j = 0; j < layout->screen->num_gpu_devices; j++) {
+                    if (dev == layout->screen->gpu_devices[j]) {
+                        /* A match has been found */
+                        return layout;
+                    }
+                }
+            } else {
+                if (dev == layout->screen->device) {
+                    /* A match has been found */
+                    return layout;
+                }
+            }
+        }
+    }
+
+    return NULL;
+}
+
 /**
  * @return TRUE if all buses are configured and set up correctly and FALSE
  * otherwise.
@@ -114,7 +145,7 @@ Bool
 xf86BusConfig(void)
 {
     screenLayoutPtr layout;
-    int i, j;
+    int i;
 
     /*
      * 3 step probe to (hopefully) ensure that we always find at least 1
@@ -131,7 +162,7 @@ xf86BusConfig(void)
     /*
      * 2. If no Screens were found, call each drivers probe function with
      *    ignorePrimary = TRUE, to ensure that we do actually get a
-     *    Screen if there is atleast one supported video card.
+     *    Screen if there is at least one supported video card.
      */
     if (xf86NumScreens == 0) {
         xf86ProbeIgnorePrimary = TRUE;
@@ -170,27 +201,10 @@ xf86BusConfig(void)
      *
      */
     for (i = 0; i < xf86NumScreens; i++) {
-        for (layout = xf86ConfigLayout.screens; layout->screen != NULL;
-             layout++) {
-            Bool found = FALSE;
-
-            for (j = 0; j < xf86Screens[i]->numEntities; j++) {
-
-                GDevPtr dev =
-                    xf86GetDevFromEntity(xf86Screens[i]->entityList[j],
-                                         xf86Screens[i]->entityInstanceList[j]);
-
-                if (dev == layout->screen->device) {
-                    /* A match has been found */
-                    xf86Screens[i]->confScreen = layout->screen;
-                    found = TRUE;
-                    break;
-                }
-            }
-            if (found)
-                break;
-        }
-        if (layout->screen == NULL) {
+        layout = xf86BusConfigMatch(xf86Screens[i], FALSE);
+        if (layout && layout->screen)
+            xf86Screens[i]->confScreen = layout->screen;
+        else {
             /* No match found */
             xf86Msg(X_ERROR,
                     "Screen %d deleted because of no matching config section.\n",
@@ -199,9 +213,12 @@ xf86BusConfig(void)
         }
     }
 
-    /* bind GPU conf screen to protocol screen 0 */
-    for (i = 0; i < xf86NumGPUScreens; i++)
-        xf86GPUScreens[i]->confScreen = xf86Screens[0]->confScreen;
+    /* bind GPU conf screen to the configured protocol screen, or 0 if not configured */
+    for (i = 0; i < xf86NumGPUScreens; i++) {
+        layout = xf86BusConfigMatch(xf86GPUScreens[i], TRUE);
+        int scrnum = (layout && layout->screen) ? layout->screen->screennum : 0;
+        xf86GPUScreens[i]->confScreen = xf86Screens[scrnum]->confScreen;
+    }
 
     /* If no screens left, return now.  */
     if (xf86NumScreens == 0) {
@@ -268,6 +285,8 @@ StringToBusType(const char *busID, const char **retID)
         ret = BUS_SBUS;
     if (!xf86NameCmp(p, "platform"))
         ret = BUS_PLATFORM;
+    if (!xf86NameCmp(p, "usb"))
+        ret = BUS_USB;
     if (ret != BUS_NONE)
         if (retID)
             *retID = busID + strlen(p) + 1;
@@ -294,7 +313,8 @@ xf86IsEntityPrimary(int entityIndex)
 
 #ifdef XSERVER_LIBPCIACCESS
     if (primaryBus.type == BUS_PLATFORM && pEnt->bus.type == BUS_PCI)
-	return MATCH_PCI_DEVICES(pEnt->bus.id.pci, primaryBus.id.plat->pdev);
+        if (primaryBus.id.plat->pdev)
+            return MATCH_PCI_DEVICES(pEnt->bus.id.pci, primaryBus.id.plat->pdev);
 #endif
 
     if (primaryBus.type != pEnt->bus.type)
@@ -403,7 +423,7 @@ xf86RemoveEntityFromScreen(ScrnInfoPtr pScrn, int entityIndex)
 
 /*
  * xf86ClearEntityListForScreen() - called when a screen is deleted
- * to mark it's entities unused. Called by xf86DeleteScreen().
+ * to mark its entities unused. Called by xf86DeleteScreen().
  */
 void
 xf86ClearEntityListForScreen(ScrnInfoPtr pScrn)
@@ -525,8 +545,8 @@ xf86GetDevFromEntity(int entityIndex, int instance)
 
     for (i = 0; i < xf86Entities[entityIndex]->numInstances; i++)
         if (xf86Entities[entityIndex]->devices[i]->screen == instance)
-            break;
-    return xf86Entities[entityIndex]->devices[i];
+            return xf86Entities[entityIndex]->devices[i];
+    return NULL;
 }
 
 /*
@@ -553,25 +573,6 @@ xf86PostProbe(void)
                    "       for all framebuffer devices\n");
 }
 
-int
-xf86GetLastScrnFlag(int entityIndex)
-{
-    if (entityIndex < xf86NumEntities) {
-        return xf86Entities[entityIndex]->lastScrnFlag;
-    }
-    else {
-        return -1;
-    }
-}
-
-void
-xf86SetLastScrnFlag(int entityIndex, int scrnIndex)
-{
-    if (entityIndex < xf86NumEntities) {
-        xf86Entities[entityIndex]->lastScrnFlag = scrnIndex;
-    }
-}
-
 Bool
 xf86IsEntityShared(int entityIndex)
 {
diff --git a/hw/xfree86/common/xf86Bus.h b/hw/xfree86/common/xf86Bus.h
index 52b497a..0d44a8a 100644
--- a/hw/xfree86/common/xf86Bus.h
+++ b/hw/xfree86/common/xf86Bus.h
@@ -51,7 +51,6 @@ typedef struct {
     Bool active;
     Bool inUse;
     BusRec bus;
-    int lastScrnFlag;
     DevUnion *entityPrivates;
     int numInstances;
     GDevPtr *devices;
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index e31030d..5d814c1 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -619,7 +619,6 @@ configFiles(XF86ConfFilesPtr fileconf)
 }
 
 typedef enum {
-    FLAG_NOTRAPSIGNALS,
     FLAG_DONTVTSWITCH,
     FLAG_DONTZAP,
     FLAG_DONTZOOM,
@@ -643,6 +642,7 @@ typedef enum {
     FLAG_DRI2,
     FLAG_USE_SIGIO,
     FLAG_AUTO_ADD_GPU,
+    FLAG_AUTO_BIND_GPU,
     FLAG_MAX_CLIENTS,
     FLAG_IGLX,
     FLAG_DEBUG,
@@ -653,8 +653,6 @@ typedef enum {
  * if the parser found the option in the config file.
  */
 static OptionInfoRec FlagOptions[] = {
-    {FLAG_NOTRAPSIGNALS, "NoTrapSignals", OPTV_BOOLEAN,
-     {0}, FALSE},
     {FLAG_DONTVTSWITCH, "DontVTSwitch", OPTV_BOOLEAN,
      {0}, FALSE},
     {FLAG_DONTZAP, "DontZap", OPTV_BOOLEAN,
@@ -699,6 +697,8 @@ static OptionInfoRec FlagOptions[] = {
      {0}, FALSE},
     {FLAG_AUTO_ADD_GPU, "AutoAddGPU", OPTV_BOOLEAN,
      {0}, FALSE},
+    {FLAG_AUTO_BIND_GPU, "AutoBindGPU", OPTV_BOOLEAN,
+     {0}, FALSE},
     {FLAG_MAX_CLIENTS, "MaxClients", OPTV_INTEGER,
      {0}, FALSE },
     {FLAG_IGLX, "IndirectGLX", OPTV_BOOLEAN,
@@ -737,7 +737,6 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
 
     xf86ProcessOptions(-1, optp, FlagOptions);
 
-    xf86GetOptValBool(FlagOptions, FLAG_NOTRAPSIGNALS, &xf86Info.notrapSignals);
     xf86GetOptValBool(FlagOptions, FLAG_DONTVTSWITCH, &xf86Info.dontVTSwitch);
     xf86GetOptValBool(FlagOptions, FLAG_DONTZAP, &xf86Info.dontZap);
     xf86GetOptValBool(FlagOptions, FLAG_DONTZOOM, &xf86Info.dontZoom);
@@ -779,6 +778,22 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
     }
     xf86Msg(from, "%sutomatically adding GPU devices\n",
             xf86Info.autoAddGPU ? "A" : "Not a");
+
+    if (xf86AutoBindGPUDisabled) {
+        xf86Info.autoBindGPU = FALSE;
+        from = X_CMDLINE;
+    }
+    else if (xf86IsOptionSet(FlagOptions, FLAG_AUTO_BIND_GPU)) {
+        xf86GetOptValBool(FlagOptions, FLAG_AUTO_BIND_GPU,
+                          &xf86Info.autoBindGPU);
+        from = X_CONFIG;
+    }
+    else {
+        from = X_DEFAULT;
+    }
+    xf86Msg(from, "%sutomatically binding GPU devices\n",
+            xf86Info.autoBindGPU ? "A" : "Not a");
+
     /*
      * Set things up based on the config file information.  Some of these
      * settings may be overridden later when the command line options are
@@ -1723,15 +1738,34 @@ configScreen(confScreenPtr screenp, XF86ConfScreenPtr conf_screen, int scrnum,
 
     if (auto_gpu_device && conf_screen->num_gpu_devices == 0 &&
         xf86configptr->conf_device_lst) {
-        XF86ConfDevicePtr sdevice = xf86configptr->conf_device_lst->list.next;
+        /* Loop through the entire device list and skip the primary device
+         * assigned to the screen. This is important because there are two
+         * cases where the assigned primary device is not the first device in
+         * the device list. Firstly, if the first device in the list is assigned
+         * to a different seat than this X server, it will not have been picked
+         * by the previous FIND_SUITABLE. Secondly, if the device was explicitly
+         * assigned in the config but there is still only one screen, this code
+         * path is executed but the explicitly assigned device may not be the
+         * first device in the list. */
+        XF86ConfDevicePtr ptmp, sdevice = xf86configptr->conf_device_lst;
 
         for (i = 0; i < MAX_GPUDEVICES; i++) {
             if (!sdevice)
                 break;
 
-            FIND_SUITABLE (XF86ConfDevicePtr, sdevice, conf_screen->scrn_gpu_devices[i]);
-            if (!conf_screen->scrn_gpu_devices[i])
+            FIND_SUITABLE (XF86ConfDevicePtr, sdevice, ptmp);
+            if (!ptmp)
                 break;
+
+            /* skip the primary device on the screen */
+            if (ptmp != conf_screen->scrn_device) {
+                conf_screen->scrn_gpu_devices[i] = ptmp;
+            } else {
+                sdevice = ptmp->list.next;
+                i--; /* run the next iteration with the same index */
+                continue;
+            }
+
             screenp->gpu_devices[i] = xnfcalloc(1, sizeof(GDevRec));
             if (configDevice(screenp->gpu_devices[i], conf_screen->scrn_gpu_devices[i], TRUE, TRUE)) {
                 screenp->gpu_devices[i]->myScreenSection = screenp;
@@ -1760,31 +1794,30 @@ configScreen(confScreenPtr screenp, XF86ConfScreenPtr conf_screen, int scrnum,
         count++;
         dispptr = (XF86ConfDisplayPtr) dispptr->list.next;
     }
-    screenp->displays = xnfallocarray(count, sizeof(DispRec));
+    screenp->displays = xnfallocarray(count, sizeof(DispPtr));
     screenp->numdisplays = count;
 
-    /* Fill in the default Virtual size, if any */
-    if (conf_screen->scrn_virtualX && conf_screen->scrn_virtualY) {
-        for (count = 0, dispptr = conf_screen->scrn_display_lst;
-             dispptr;
-             dispptr = (XF86ConfDisplayPtr) dispptr->list.next, count++) {
-            screenp->displays[count].virtualX = conf_screen->scrn_virtualX;
-            screenp->displays[count].virtualY = conf_screen->scrn_virtualY;
+    for (count = 0, dispptr = conf_screen->scrn_display_lst;
+         dispptr;
+         dispptr = (XF86ConfDisplayPtr) dispptr->list.next, count++) {
+
+        /* Allocate individual Display records */
+        screenp->displays[count] = xnfcalloc(1, sizeof(DispRec));
+
+        /* Fill in the default Virtual size, if any */
+        if (conf_screen->scrn_virtualX && conf_screen->scrn_virtualY) {
+            screenp->displays[count]->virtualX = conf_screen->scrn_virtualX;
+            screenp->displays[count]->virtualY = conf_screen->scrn_virtualY;
         }
-    }
 
-    /* Now do the per-Display Virtual sizes */
-    count = 0;
-    dispptr = conf_screen->scrn_display_lst;
-    while (dispptr) {
-        configDisplay(&(screenp->displays[count]), dispptr);
-        count++;
-        dispptr = (XF86ConfDisplayPtr) dispptr->list.next;
+        /* Now do the per-Display Virtual sizes */
+        configDisplay(screenp->displays[count], dispptr);
     }
 
     /*
      * figure out how many videoadaptor references there are and fill them in
      */
+    count = 0;
     conf_adaptor = conf_screen->scrn_adaptor_lst;
     while (conf_adaptor) {
         count++;
diff --git a/hw/xfree86/common/xf86Configure.c b/hw/xfree86/common/xf86Configure.c
index 44e7591..4347f6d 100644
--- a/hw/xfree86/common/xf86Configure.c
+++ b/hw/xfree86/common/xf86Configure.c
@@ -822,7 +822,7 @@ DoConfigure(void)
 
  bail:
     OsCleanup(TRUE);
-    AbortDDX(EXIT_ERR_CONFIGURE);
+    ddxGiveUp(EXIT_ERR_CONFIGURE);
     fflush(stderr);
     exit(0);
 }
@@ -875,7 +875,7 @@ DoShowOptions(void)
     }
  bail:
     OsCleanup(TRUE);
-    AbortDDX(EXIT_ERR_DRIVERS);
+    ddxGiveUp(EXIT_ERR_DRIVERS);
     fflush(stderr);
     exit(0);
 }
diff --git a/hw/xfree86/common/xf86Cursor.c b/hw/xfree86/common/xf86Cursor.c
index de054fb..8bb68a5 100644
--- a/hw/xfree86/common/xf86Cursor.c
+++ b/hw/xfree86/common/xf86Cursor.c
@@ -137,8 +137,8 @@ xf86PointerMoved(ScrnInfoPtr pScr, int x, int y)
     Bool frameChanged = FALSE;
 
     /*
-     * check wether (x,y) belongs to the visual part of the screen
-     * if not, change the base of the displayed frame accoring
+     * check whether (x,y) belongs to the visual part of the screen
+     * if not, change the base of the displayed frame occurring
      */
     if (pScr->frameX0 > x) {
         pScr->frameX0 = x;
diff --git a/hw/xfree86/common/xf86DGA.c b/hw/xfree86/common/xf86DGA.c
index 505b019..fa70ba2 100644
--- a/hw/xfree86/common/xf86DGA.c
+++ b/hw/xfree86/common/xf86DGA.c
@@ -81,7 +81,6 @@
 static DevPrivateKeyRec DGAScreenKeyRec;
 
 #define DGAScreenKeyRegistered dixPrivateKeyRegistered(&DGAScreenKeyRec)
-static Bool mieq_installed;
 
 static Bool DGACloseScreen(ScreenPtr pScreen);
 static void DGADestroyColormap(ColormapPtr pmap);
@@ -268,11 +267,8 @@ DGACloseScreen(ScreenPtr pScreen)
 {
     DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(pScreen);
 
-    if (mieq_installed) {
-        mieqSetHandler(ET_DGAEvent, NULL);
-        mieq_installed = FALSE;
-    }
-
+    mieqSetHandler(ET_DGAEvent, NULL);
+    pScreenPriv->pScrn->SetDGAMode(pScreenPriv->pScrn, 0, NULL);
     FreeMarkedVisuals(pScreen);
 
     pScreen->CloseScreen = pScreenPriv->CloseScreen;
@@ -280,9 +276,6 @@ DGACloseScreen(ScreenPtr pScreen)
     pScreen->InstallColormap = pScreenPriv->InstallColormap;
     pScreen->UninstallColormap = pScreenPriv->UninstallColormap;
 
-    /* DGAShutdown() should have ensured that no DGA
-       screen were active by here */
-
     free(pScreenPriv);
 
     return ((*pScreen->CloseScreen) (pScreen));
@@ -461,10 +454,7 @@ xf86SetDGAMode(ScrnInfoPtr pScrn, int num, DGADevicePtr devRet)
     pScreenPriv->grabMouse = TRUE;
     pScreenPriv->grabKeyboard = TRUE;
 
-    if (!mieq_installed) {
-        mieqSetHandler(ET_DGAEvent, DGAHandleEvent);
-        mieq_installed = TRUE;
-    }
+    mieqSetHandler(ET_DGAEvent, DGAHandleEvent);
 
     return Success;
 }
@@ -481,10 +471,7 @@ DGASetInputMode(int index, Bool keyboard, Bool mouse)
         pScreenPriv->grabMouse = mouse;
         pScreenPriv->grabKeyboard = keyboard;
 
-        if (!mieq_installed) {
-            mieqSetHandler(ET_DGAEvent, DGAHandleEvent);
-            mieq_installed = TRUE;
-        }
+        mieqSetHandler(ET_DGAEvent, DGAHandleEvent);
     }
 }
 
@@ -586,24 +573,6 @@ DGAActive(int index)
     return FALSE;
 }
 
-/* Called by the event code in case the server is abruptly terminated */
-
-void
-DGAShutdown(void)
-{
-    ScrnInfoPtr pScrn;
-    int i;
-
-    if (!DGAScreenKeyRegistered)
-        return;
-
-    for (i = 0; i < screenInfo.numScreens; i++) {
-        pScrn = xf86Screens[i];
-
-        (void) (*pScrn->SetDGAMode) (pScrn, 0, NULL);
-    }
-}
-
 /* Called by the extension to initialize a mode */
 
 static int
diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c
index 8a800bd..395bbc7 100644
--- a/hw/xfree86/common/xf86Events.c
+++ b/hw/xfree86/common/xf86Events.c
@@ -86,9 +86,7 @@
 #include "xf86platformBus.h"
 #include "systemd-logind.h"
 
-#ifdef XF86PM
 extern void (*xf86OSPMClose) (void);
-#endif
 
 static void xf86VTSwitch(void);
 
@@ -107,12 +105,6 @@ typedef struct x_IHRec {
 
 static IHPtr InputHandlers = NULL;
 
-Bool
-LegalModifier(unsigned int key, DeviceIntPtr pDev)
-{
-    return TRUE;
-}
-
 /*
  * TimeSinceLastInputEvent --
  *      Function used for screensaver purposes by the os module. Returns the
@@ -168,9 +160,6 @@ xf86ProcessActionEvent(ActionEvent action, void *arg)
     case ACTION_TERMINATE:
         if (!xf86Info.dontZap) {
             xf86Msg(X_INFO, "Server zapped. Shutting down.\n");
-#ifdef XFreeXDGA
-            DGAShutdown();
-#endif
             GiveUp(0);
         }
         break;
@@ -291,12 +280,12 @@ xf86ReleaseKeys(DeviceIntPtr pDev)
     /*
      * Hmm... here is the biggest hack of every time !
      * It may be possible that a switch-vt procedure has finished BEFORE
-     * you released all keys neccessary to do this. That peculiar behavior
+     * you released all keys necessary to do this. That peculiar behavior
      * can fool the X-server pretty much, cause it assumes that some keys
-     * were not released. TWM may stuck alsmost completly....
+     * were not released. TWM may stuck almost completely....
      * OK, what we are doing here is after returning from the vt-switch
-     * exeplicitely unrelease all keyboard keys before the input-devices
-     * are reenabled.
+     * explicitly unrelease all keyboard keys before the input-devices
+     * are re-enabled.
      */
 
     for (i = keyc->xkbInfo->desc->min_key_code;
@@ -393,14 +382,16 @@ xf86VTLeave(void)
     for (i = 0; i < xf86NumGPUScreens; i++)
         xf86GPUScreens[i]->LeaveVT(xf86GPUScreens[i]);
 
+    if (systemd_logind_controls_session()) {
+        systemd_logind_drop_master();
+    }
+
     if (!xf86VTSwitchAway())
         goto switch_failed;
 
-#ifdef XF86PM
     if (xf86OSPMClose)
         xf86OSPMClose();
     xf86OSPMClose = NULL;
-#endif
 
     for (i = 0; i < xf86NumScreens; i++) {
         /*
@@ -456,9 +447,7 @@ xf86VTEnter(void)
     if (!xf86VTSwitchTo())
         return;
 
-#ifdef XF86PM
     xf86OSPMClose = xf86OSPMOpen();
-#endif
 
     if (xorgHWAccess)
         xf86EnableIO();
diff --git a/hw/xfree86/common/xf86Globals.c b/hw/xfree86/common/xf86Globals.c
index 7cc7401..65a3192 100644
--- a/hw/xfree86/common/xf86Globals.c
+++ b/hw/xfree86/common/xf86Globals.c
@@ -108,7 +108,6 @@ xf86InfoRec xf86Info = {
     .ShareVTs = FALSE,
     .dontZap = FALSE,
     .dontZoom = FALSE,
-    .notrapSignals = FALSE,
     .currentScreen = NULL,
 #ifdef CSRG_BASED
     .consType = -1,
@@ -133,6 +132,7 @@ xf86InfoRec xf86Info = {
 #else
     .autoAddGPU = FALSE,
 #endif
+    .autoBindGPU = TRUE,
 };
 
 const char *xf86ConfigFile = NULL;
@@ -168,7 +168,6 @@ const char *xf86VisualNames[] = {
 };
 
 /* Parameters set only from the command line */
-const char *xf86ServerName = "no-name";
 Bool xf86fpFlag = FALSE;
 Bool xf86sFlag = FALSE;
 Bool xf86bsEnableFlag = FALSE;
@@ -189,10 +188,10 @@ int xf86FbBpp = -1;
 int xf86Depth = -1;
 rgb xf86Weight = { 0, 0, 0 };
 
-Bool xf86FlipPixels = FALSE;
 Gamma xf86Gamma = { 0.0, 0.0, 0.0 };
 
 Bool xf86AllowMouseOpenFail = FALSE;
+Bool xf86AutoBindGPUDisabled = FALSE;
 
 #ifdef XF86VIDMODE
 Bool xf86VidModeDisabled = FALSE;
diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c
index 95a90ad..0389945 100644
--- a/hw/xfree86/common/xf86Helper.c
+++ b/hw/xfree86/common/xf86Helper.c
@@ -39,6 +39,7 @@
 #endif
 
 #include <X11/X.h>
+#include "mi.h"
 #include "os.h"
 #include "servermd.h"
 #include "pixmapstr.h"
@@ -525,8 +526,8 @@ xf86SetDepthBpp(ScrnInfoPtr scrp, int depth, int dummy, int fbbpp,
      * Find the Display subsection matching the depth/fbbpp and initialise
      * scrp->display with it.
      */
-    for (i = 0, disp = scrp->confScreen->displays;
-         i < scrp->confScreen->numdisplays; i++, disp++) {
+    for (i = 0; i < scrp->confScreen->numdisplays; i++) {
+        disp = scrp->confScreen->displays[i];
         if ((disp->depth == scrp->depth && disp->fbbpp == scrp->bitsPerPixel)
             || (disp->depth == scrp->depth && disp->fbbpp <= 0)
             || (disp->fbbpp == scrp->bitsPerPixel && disp->depth <= 0)) {
@@ -540,8 +541,8 @@ xf86SetDepthBpp(ScrnInfoPtr scrp, int depth, int dummy, int fbbpp,
      * depth or fbbpp specified.
      */
     if (i == scrp->confScreen->numdisplays) {
-        for (i = 0, disp = scrp->confScreen->displays;
-             i < scrp->confScreen->numdisplays; i++, disp++) {
+        for (i = 0; i < scrp->confScreen->numdisplays; i++) {
+            disp = scrp->confScreen->displays[i];
             if (disp->depth <= 0 && disp->fbbpp <= 0) {
                 scrp->display = disp;
                 break;
@@ -556,24 +557,25 @@ xf86SetDepthBpp(ScrnInfoPtr scrp, int depth, int dummy, int fbbpp,
         scrp->confScreen->numdisplays++;
         scrp->confScreen->displays =
             xnfreallocarray(scrp->confScreen->displays,
-                            scrp->confScreen->numdisplays, sizeof(DispRec));
+                            scrp->confScreen->numdisplays, sizeof(DispPtr));
         xf86DrvMsg(scrp->scrnIndex, X_INFO,
                    "Creating default Display subsection in Screen section\n"
                    "\t\"%s\" for depth/fbbpp %d/%d\n",
                    scrp->confScreen->id, scrp->depth, scrp->bitsPerPixel);
-        memset(&scrp->confScreen->displays[i], 0, sizeof(DispRec));
-        scrp->confScreen->displays[i].blackColour.red = -1;
-        scrp->confScreen->displays[i].blackColour.green = -1;
-        scrp->confScreen->displays[i].blackColour.blue = -1;
-        scrp->confScreen->displays[i].whiteColour.red = -1;
-        scrp->confScreen->displays[i].whiteColour.green = -1;
-        scrp->confScreen->displays[i].whiteColour.blue = -1;
-        scrp->confScreen->displays[i].defaultVisual = -1;
-        scrp->confScreen->displays[i].modes = xnfalloc(sizeof(char *));
-        scrp->confScreen->displays[i].modes[0] = NULL;
-        scrp->confScreen->displays[i].depth = depth;
-        scrp->confScreen->displays[i].fbbpp = fbbpp;
-        scrp->display = &scrp->confScreen->displays[i];
+        scrp->confScreen->displays[i] = xnfcalloc(1, sizeof(DispRec));
+        memset(scrp->confScreen->displays[i], 0, sizeof(DispRec));
+        scrp->confScreen->displays[i]->blackColour.red = -1;
+        scrp->confScreen->displays[i]->blackColour.green = -1;
+        scrp->confScreen->displays[i]->blackColour.blue = -1;
+        scrp->confScreen->displays[i]->whiteColour.red = -1;
+        scrp->confScreen->displays[i]->whiteColour.green = -1;
+        scrp->confScreen->displays[i]->whiteColour.blue = -1;
+        scrp->confScreen->displays[i]->defaultVisual = -1;
+        scrp->confScreen->displays[i]->modes = xnfalloc(sizeof(char *));
+        scrp->confScreen->displays[i]->modes[0] = NULL;
+        scrp->confScreen->displays[i]->depth = depth;
+        scrp->confScreen->displays[i]->fbbpp = fbbpp;
+        scrp->display = scrp->confScreen->displays[i];
     }
 
     /*
@@ -728,9 +730,9 @@ xf86SetWeight(ScrnInfoPtr scrp, rgb weight, rgb mask)
         scrp->mask.red = mask.red;
         scrp->mask.green = mask.green;
         scrp->mask.blue = mask.blue;
-        scrp->offset.red = ffs(mask.red);
-        scrp->offset.green = ffs(mask.green);
-        scrp->offset.blue = ffs(mask.blue);
+        scrp->offset.red = ffs(mask.red) - 1;
+        scrp->offset.green = ffs(mask.green) - 1;
+        scrp->offset.blue = ffs(mask.blue) - 1;
     }
     return TRUE;
 }
@@ -811,8 +813,8 @@ xf86SetGamma(ScrnInfoPtr scrp, Gamma gamma)
         scrp->gamma.red = SET_GAMMA(DDC->features.gamma);
         scrp->gamma.green = SET_GAMMA(DDC->features.gamma);
         scrp->gamma.blue = SET_GAMMA(DDC->features.gamma);
-        /* EDID structure version 2 gives optional seperate red, green & blue gamma values
-         * in bytes 0x57-0x59 */
+        /* EDID structure version 2 gives optional separate red, green & blue
+         * gamma values in bytes 0x57-0x59 */
 #endif
     }
     else if (TEST_GAMMA(gamma)) {
@@ -950,14 +952,8 @@ xf86SetDpi(ScrnInfoPtr pScrn, int x, int y)
 void
 xf86SetBlackWhitePixels(ScreenPtr pScreen)
 {
-    if (xf86FlipPixels) {
-        pScreen->whitePixel = 0;
-        pScreen->blackPixel = 1;
-    }
-    else {
-        pScreen->whitePixel = 1;
-        pScreen->blackPixel = 0;
-    }
+    pScreen->whitePixel = 1;
+    pScreen->blackPixel = 0;
 }
 
 /*
@@ -1398,18 +1394,6 @@ xf86GetGamma(void)
     return xf86Gamma;
 }
 
-Bool
-xf86GetFlipPixels(void)
-{
-    return xf86FlipPixels;
-}
-
-const char *
-xf86GetServerName(void)
-{
-    return xf86ServerName;
-}
-
 Bool
 xf86ServerIsExiting(void)
 {
@@ -1756,3 +1740,16 @@ xf86UpdateDesktopDimensions(void)
 {
     update_desktop_dimensions();
 }
+
+
+void
+xf86AddInputEventDrainCallback(CallbackProcPtr callback, void *param)
+{
+    mieqAddCallbackOnDrained(callback, param);
+}
+
+void
+xf86RemoveInputEventDrainCallback(CallbackProcPtr callback, void *param)
+{
+    mieqRemoveCallbackOnDrained(callback, param);
+}
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index 2ec6b2f..5695e71 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -51,15 +51,11 @@
 #include "servermd.h"
 #include "windowstr.h"
 #include "scrnintstr.h"
-#include "site.h"
 #include "mi.h"
 #include "dbus-core.h"
 #include "systemd-logind.h"
 
 #include "loaderProcs.h"
-#ifdef XFreeXDGA
-#include "dgaproc.h"
-#endif
 
 #define XF86_OS_PRIVS
 #include "xf86.h"
@@ -68,7 +64,6 @@
 #include "xf86_OSlib.h"
 #include "xf86cmap.h"
 #include "xorgVersion.h"
-#include "xf86Build.h"
 #include "mipointer.h"
 #include <X11/extensions/XI.h>
 #include <X11/extensions/XIproto.h>
@@ -76,9 +71,9 @@
 #include "xf86DDC.h"
 #include "xf86Xinput.h"
 #include "xf86InPriv.h"
+#include "xf86Crtc.h"
 #include "picturestr.h"
 #include "randrstr.h"
-#include "glxvndabi.h"
 #include "xf86Bus.h"
 #ifdef XSERVER_LIBPCIACCESS
 #include "xf86VGAarbiter.h"
@@ -90,11 +85,14 @@
 #include <X11/extensions/dpmsconst.h>
 #include "dpmsproc.h"
 #endif
+
+#ifdef __linux__
+#include <linux/major.h>
+#include <sys/sysmacros.h>
+#endif
 #include <hotplug.h>
 
-#ifdef XF86PM
 void (*xf86OSPMClose) (void) = NULL;
-#endif
 static Bool xorgHWOpenConsole = FALSE;
 
 /* Common pixmap formats */
@@ -112,29 +110,10 @@ static PixmapFormatRec formats[MAXFORMATS] = {
 static int numFormats = 7;
 static Bool formatsDone = FALSE;
 
-#ifndef OSNAME
-#define OSNAME " unknown"
-#endif
-#ifndef OSVENDOR
-#define OSVENDOR ""
-#endif
-#ifndef PRE_RELEASE
-#define PRE_RELEASE XORG_VERSION_SNAP
-#endif
 
 static void
 xf86PrintBanner(void)
 {
-#if PRE_RELEASE
-    xf86ErrorFVerb(0, "\n"
-                   "This is a pre-release version of the X server from "
-                   XVENDORNAME ".\n" "It is not supported in any way.\n"
-                   "Bugs may be filed in the bugzilla at http://bugs.freedesktop.org/.\n"
-                   "Select the \"xorg\" product for bugs you find in this release.\n"
-                   "Before reporting bugs in pre-release versions please check the\n"
-                   "latest version in the X.Org Foundation git repository.\n"
-                   "See http://wiki.x.org/wiki/GitPage for git access instructions.\n");
-#endif
     xf86ErrorFVerb(0, "\nX.Org X Server %d.%d.%d",
                    XORG_VERSION_MAJOR, XORG_VERSION_MINOR, XORG_VERSION_PATCH);
 #if XORG_VERSION_SNAP > 0
@@ -167,7 +146,6 @@ xf86PrintBanner(void)
 #endif
     xf86ErrorFVerb(0, "\nX Protocol Version %d, Revision %d\n",
                    X_PROTOCOL, X_PROTOCOL_REVISION);
-    xf86ErrorFVerb(0, "Build Operating System: %s %s\n", OSNAME, OSVENDOR);
 #ifdef HAS_UTSNAME
     {
         struct utsname name;
@@ -199,28 +177,6 @@ xf86PrintBanner(void)
         }
     }
 #endif
-#if defined(BUILD_DATE) && (BUILD_DATE > 19000000)
-    {
-        struct tm t;
-        char buf[100];
-
-        memset(&t, 0, sizeof(t));
-        memset(buf, 0, sizeof(buf));
-        t.tm_mday = BUILD_DATE % 100;
-        t.tm_mon = (BUILD_DATE / 100) % 100 - 1;
-        t.tm_year = BUILD_DATE / 10000 - 1900;
-#if defined(BUILD_TIME)
-        t.tm_sec = BUILD_TIME % 100;
-        t.tm_min = (BUILD_TIME / 100) % 100;
-        t.tm_hour = (BUILD_TIME / 10000) % 100;
-        if (strftime(buf, sizeof(buf), "%d %B %Y  %I:%M:%S%p", &t))
-            xf86ErrorFVerb(0, "Build Date: %s\n", buf);
-#else
-        if (strftime(buf, sizeof(buf), "%d %B %Y", &t))
-            xf86ErrorFVerb(0, "Build Date: %s\n", buf);
-#endif
-    }
-#endif
 #if defined(BUILDERSTRING)
     xf86ErrorFVerb(0, "%s \n", BUILDERSTRING);
 #endif
@@ -237,21 +193,29 @@ xf86PrivsElevated(void)
     return PrivsElevated();
 }
 
-static void
-TrapSignals(void)
+Bool
+xf86HasTTYs(void)
 {
-    if (xf86Info.notrapSignals) {
-        OsSignal(SIGSEGV, SIG_DFL);
-        OsSignal(SIGABRT, SIG_DFL);
-        OsSignal(SIGILL, SIG_DFL);
-#ifdef SIGEMT
-        OsSignal(SIGEMT, SIG_DFL);
+#ifdef __linux__
+    struct stat tty0devAttributes;
+    return (stat("/dev/tty0", &tty0devAttributes) == 0 && major(tty0devAttributes.st_rdev) == TTY_MAJOR);
+#else
+    return TRUE;
 #endif
-        OsSignal(SIGFPE, SIG_DFL);
-        OsSignal(SIGBUS, SIG_DFL);
-        OsSignal(SIGSYS, SIG_DFL);
-        OsSignal(SIGXCPU, SIG_DFL);
-        OsSignal(SIGXFSZ, SIG_DFL);
+}
+
+static void
+xf86AutoConfigOutputDevices(void)
+{
+    int i;
+
+    if (!xf86Info.autoBindGPU)
+        return;
+
+    for (i = 0; i < xf86NumGPUScreens; i++) {
+        int scrnum = xf86GPUScreens[i]->confScreen->screennum;
+        RRProviderAutoConfigGpuScreen(xf86ScrnToScreen(xf86GPUScreens[i]),
+                                      xf86ScrnToScreen(xf86Screens[scrnum]));
     }
 }
 
@@ -335,11 +299,6 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
     config_pre_init();
 
     if (serverGeneration == 1) {
-        if ((xf86ServerName = strrchr(argv[0], '/')) != 0)
-            xf86ServerName++;
-        else
-            xf86ServerName = argv[0];
-
         xf86PrintBanner();
         LogPrintMarkers();
         if (xf86LogFile) {
@@ -366,8 +325,6 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
             }
         }
 
-        TrapSignals();
-
         /* Initialise the loader */
         LoaderInit();
 
@@ -397,9 +354,7 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
             }
         }
 
-#ifdef XF86PM
         xf86OSPMClose = xf86OSPMOpen();
-#endif
 
         xf86ExtensionInit();
 
@@ -473,7 +428,7 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
                 want_hw_access = TRUE;
 
             /* Non-seat0 X servers should not open console */
-            if (!(flags & HW_SKIP_CONSOLE) && !ServerIsNotSeat0())
+            if (!(flags & HW_SKIP_CONSOLE) && !ServerIsNotSeat0() && xf86HasTTYs())
                 xorgHWOpenConsole = TRUE;
         }
 
@@ -550,17 +505,6 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
             return;
         }
 
-        for (i = 0; i < xf86NumScreens; i++) {
-            if (xf86Screens[i]->name == NULL) {
-                char *tmp;
-                XNFasprintf(&tmp, "screen%d", i);
-                xf86Screens[i]->name = tmp;
-                xf86MsgVerb(X_WARNING, 0,
-                            "Screen driver %d has no name set, using `%s'.\n",
-                            i, xf86Screens[i]->name);
-            }
-        }
-
         /* Remove (unload) drivers that are not required */
         for (i = 0; i < xf86NumDrivers; i++)
             if (xf86DriverList[i] && xf86DriverList[i]->refCount <= 0)
@@ -626,7 +570,6 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
         if (xorgHWOpenConsole)
             xf86OpenConsole();
 
-#ifdef XF86PM
         /*
            should we reopen it here? We need to deal with an already opened
            device. We could leave this to the OS layer. For now we simply
@@ -636,7 +579,6 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
             xf86OSPMClose();
         if ((xf86OSPMClose = xf86OSPMOpen()) != NULL)
             xf86MsgVerb(X_INFO, 3, "APM registered successfully\n");
-#endif
 
         /* Make sure full I/O access is enabled */
         if (xorgHWAccess)
@@ -692,11 +634,6 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
 #ifdef XFreeXDGA
         xf86Screens[i]->SetDGAMode = xf86SetDGAMode;
 #endif
-        xf86Screens[i]->DPMSSet = NULL;
-        xf86Screens[i]->LoadPalette = NULL;
-        xf86Screens[i]->SetOverscan = NULL;
-        xf86Screens[i]->DriverFunc = NULL;
-        xf86Screens[i]->pScreen = NULL;
         scr_index = AddScreen(xf86ScreenInit, argc, argv);
         xf86VGAarbiterUnlock(xf86Screens[i]);
         if (scr_index == i) {
@@ -715,11 +652,6 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
             FatalError("AddScreen/ScreenInit failed for driver %d\n", i);
         }
 
-        DebugF("InitOutput - xf86Screens[%d]->pScreen = %p\n",
-               i, xf86Screens[i]->pScreen);
-        DebugF("xf86Screens[%d]->pScreen->CreateWindow = %p\n",
-               i, xf86Screens[i]->pScreen->CreateWindow);
-
         if (PictureGetSubpixelOrder(xf86Screens[i]->pScreen) == SubPixelUnknown) {
             xf86MonPtr DDC = (xf86MonPtr) (xf86Screens[i]->monitor->DDC);
 
@@ -749,11 +681,6 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
 #ifdef XFreeXDGA
         pScrn->SetDGAMode = xf86SetDGAMode;
 #endif
-        pScrn->DPMSSet = NULL;
-        pScrn->LoadPalette = NULL;
-        pScrn->SetOverscan = NULL;
-        pScrn->DriverFunc = NULL;
-        pScrn->pScreen = NULL;
         scr_index = AddGPUScreen(xf86ScreenInit, argc, argv);
         xf86VGAarbiterUnlock(pScrn);
         if (scr_index == i) {
@@ -767,8 +694,12 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
         }
     }
 
-    for (i = 0; i < xf86NumGPUScreens; i++)
-        AttachUnboundGPU(xf86Screens[0]->pScreen, xf86GPUScreens[i]->pScreen);
+    for (i = 0; i < xf86NumGPUScreens; i++) {
+        int scrnum = xf86GPUScreens[i]->confScreen->screennum;
+        AttachUnboundGPU(xf86Screens[scrnum]->pScreen, xf86GPUScreens[i]->pScreen);
+    }
+
+    xf86AutoConfigOutputDevices();
 
     xf86VGAarbiterWrapFunctions();
     if (sigio_blocked)
@@ -876,13 +807,34 @@ ddxGiveUp(enum ExitCode error)
 {
     int i;
 
+    if (error == EXIT_ERR_ABORT) {
+        input_lock();
+
+        /* try to restore the original video state */
+#ifdef DPMSExtension            /* Turn screens back on */
+        if (DPMSPowerLevel != DPMSModeOn)
+            DPMSSet(serverClient, DPMSModeOn);
+#endif
+        if (xf86Screens) {
+            for (i = 0; i < xf86NumScreens; i++)
+                if (xf86Screens[i]->vtSema) {
+                    /*
+                     * if we are aborting before ScreenInit() has finished we
+                     * might not have been wrapped yet. Therefore enable screen
+                     * explicitly.
+                     */
+                    xf86VGAarbiterLock(xf86Screens[i]);
+                    (xf86Screens[i]->LeaveVT) (xf86Screens[i]);
+                    xf86VGAarbiterUnlock(xf86Screens[i]);
+                }
+        }
+    }
+
     xf86VGAarbiterFini();
 
-#ifdef XF86PM
     if (xf86OSPMClose)
         xf86OSPMClose();
     xf86OSPMClose = NULL;
-#endif
 
     for (i = 0; i < xf86NumScreens; i++) {
         /*
@@ -892,10 +844,6 @@ ddxGiveUp(enum ExitCode error)
         xf86Screens[i]->vtSema = FALSE;
     }
 
-#ifdef XFreeXDGA
-    DGAShutdown();
-#endif
-
     if (xorgHWOpenConsole)
         xf86CloseConsole();
 
@@ -905,48 +853,6 @@ ddxGiveUp(enum ExitCode error)
     xf86CloseLog(error);
 }
 
-/*
- * AbortDDX --
- *      DDX - specific abort routine.  Called by AbortServer(). The attempt is
- *      made to restore all original setting of the displays. Also all devices
- *      are closed.
- */
-
-void
-AbortDDX(enum ExitCode error)
-{
-    int i;
-
-    input_lock();
-
-    /*
-     * try to restore the original video state
-     */
-#ifdef DPMSExtension            /* Turn screens back on */
-    if (DPMSPowerLevel != DPMSModeOn)
-        DPMSSet(serverClient, DPMSModeOn);
-#endif
-    if (xf86Screens) {
-        for (i = 0; i < xf86NumScreens; i++)
-            if (xf86Screens[i]->vtSema) {
-                /*
-                 * if we are aborting before ScreenInit() has finished
-                 * we might not have been wrapped yet. Therefore enable
-                 * screen explicitely.
-                 */
-                xf86VGAarbiterLock(xf86Screens[i]);
-                (xf86Screens[i]->LeaveVT) (xf86Screens[i]);
-                xf86VGAarbiterUnlock(xf86Screens[i]);
-            }
-    }
-
-    /*
-     * This is needed for an abnormal server exit, since the normal exit stuff
-     * MUST also be performed (i.e. the vt must be left in a defined state)
-     */
-    ddxGiveUp(error);
-}
-
 void
 OsVendorFatalError(const char *f, va_list args)
 {
@@ -1017,16 +923,9 @@ xf86CheckPrivs(const char *option, const char *arg)
 int
 ddxProcessArgument(int argc, char **argv, int i)
 {
-#define CHECK_FOR_REQUIRED_ARGUMENT() \
-    if (((i + 1) >= argc) || (!argv[i + 1])) { 				\
-      ErrorF("Required argument to %s not specified\n", argv[i]); 	\
-      UseMsg(); 							\
-      FatalError("Required argument to %s not specified\n", argv[i]);	\
-    }
-
     /* First the options that are not allowed with elevated privileges */
     if (!strcmp(argv[i], "-modulepath")) {
-        CHECK_FOR_REQUIRED_ARGUMENT();
+        CHECK_FOR_REQUIRED_ARGUMENTS(1);
         if (xf86PrivsElevated())
               FatalError("\nInvalid argument -modulepath "
                 "with elevated privileges\n");
@@ -1035,7 +934,7 @@ ddxProcessArgument(int argc, char **argv, int i)
         return 2;
     }
     if (!strcmp(argv[i], "-logfile")) {
-        CHECK_FOR_REQUIRED_ARGUMENT();
+        CHECK_FOR_REQUIRED_ARGUMENTS(1);
         if (xf86PrivsElevated())
               FatalError("\nInvalid argument -logfile "
                 "with elevated privileges\n");
@@ -1044,21 +943,17 @@ ddxProcessArgument(int argc, char **argv, int i)
         return 2;
     }
     if (!strcmp(argv[i], "-config") || !strcmp(argv[i], "-xf86config")) {
-        CHECK_FOR_REQUIRED_ARGUMENT();
+        CHECK_FOR_REQUIRED_ARGUMENTS(1);
         xf86CheckPrivs(argv[i], argv[i + 1]);
         xf86ConfigFile = argv[i + 1];
         return 2;
     }
     if (!strcmp(argv[i], "-configdir")) {
-        CHECK_FOR_REQUIRED_ARGUMENT();
+        CHECK_FOR_REQUIRED_ARGUMENTS(1);
         xf86CheckPrivs(argv[i], argv[i + 1]);
         xf86ConfigDir = argv[i + 1];
         return 2;
     }
-    if (!strcmp(argv[i], "-flipPixels")) {
-        xf86FlipPixels = TRUE;
-        return 1;
-    }
 #ifdef XF86VIDMODE
     if (!strcmp(argv[i], "-disableVidMode")) {
         xf86VidModeDisabled = TRUE;
@@ -1148,7 +1043,7 @@ ddxProcessArgument(int argc, char **argv, int i)
     if (!strcmp(argv[i], "-fbbpp")) {
         int bpp;
 
-        CHECK_FOR_REQUIRED_ARGUMENT();
+        CHECK_FOR_REQUIRED_ARGUMENTS(1);
         if (sscanf(argv[++i], "%d", &bpp) == 1) {
             xf86FbBpp = bpp;
             return 2;
@@ -1161,7 +1056,7 @@ ddxProcessArgument(int argc, char **argv, int i)
     if (!strcmp(argv[i], "-depth")) {
         int depth;
 
-        CHECK_FOR_REQUIRED_ARGUMENT();
+        CHECK_FOR_REQUIRED_ARGUMENTS(1);
         if (sscanf(argv[++i], "%d", &depth) == 1) {
             xf86Depth = depth;
             return 2;
@@ -1174,7 +1069,7 @@ ddxProcessArgument(int argc, char **argv, int i)
     if (!strcmp(argv[i], "-weight")) {
         int red, green, blue;
 
-        CHECK_FOR_REQUIRED_ARGUMENT();
+        CHECK_FOR_REQUIRED_ARGUMENTS(1);
         if (sscanf(argv[++i], "%1d%1d%1d", &red, &green, &blue) == 3) {
             xf86Weight.red = red;
             xf86Weight.green = green;
@@ -1190,7 +1085,7 @@ ddxProcessArgument(int argc, char **argv, int i)
         !strcmp(argv[i], "-ggamma") || !strcmp(argv[i], "-bgamma")) {
         double gamma;
 
-        CHECK_FOR_REQUIRED_ARGUMENT();
+        CHECK_FOR_REQUIRED_ARGUMENTS(1);
         if (sscanf(argv[++i], "%lf", &gamma) == 1) {
             if (gamma < GAMMA_MIN || gamma > GAMMA_MAX) {
                 ErrorF("gamma out of range, only  %.2f <= gamma_value <= %.1f"
@@ -1209,22 +1104,22 @@ ddxProcessArgument(int argc, char **argv, int i)
         }
     }
     if (!strcmp(argv[i], "-layout")) {
-        CHECK_FOR_REQUIRED_ARGUMENT();
+        CHECK_FOR_REQUIRED_ARGUMENTS(1);
         xf86LayoutName = argv[++i];
         return 2;
     }
     if (!strcmp(argv[i], "-screen")) {
-        CHECK_FOR_REQUIRED_ARGUMENT();
+        CHECK_FOR_REQUIRED_ARGUMENTS(1);
         xf86ScreenName = argv[++i];
         return 2;
     }
     if (!strcmp(argv[i], "-pointer")) {
-        CHECK_FOR_REQUIRED_ARGUMENT();
+        CHECK_FOR_REQUIRED_ARGUMENTS(1);
         xf86PointerName = argv[++i];
         return 2;
     }
     if (!strcmp(argv[i], "-keyboard")) {
-        CHECK_FOR_REQUIRED_ARGUMENT();
+        CHECK_FOR_REQUIRED_ARGUMENTS(1);
         xf86KeyboardName = argv[++i];
         return 2;
     }
@@ -1257,7 +1152,7 @@ ddxProcessArgument(int argc, char **argv, int i)
     }
 #ifdef XSERVER_LIBPCIACCESS
     if (!strcmp(argv[i], "-isolateDevice")) {
-        CHECK_FOR_REQUIRED_ARGUMENT();
+        CHECK_FOR_REQUIRED_ARGUMENTS(1);
         if (strncmp(argv[++i], "PCI:", 4)) {
             FatalError("Bus types other than PCI not yet isolable\n");
         }
@@ -1282,6 +1177,10 @@ ddxProcessArgument(int argc, char **argv, int i)
         xf86Info.iglxFrom = X_CMDLINE;
         return 0;
     }
+    if (!strcmp(argv[i], "-noautoBindGPU")) {
+        xf86AutoBindGPUDisabled = TRUE;
+        return 1;
+    }
 
     /* OS-specific processing */
     return xf86ProcessArgument(argc, argv, i);
@@ -1334,7 +1233,6 @@ ddxUseMsg(void)
     ErrorF
         ("-pointer name          specify the core pointer InputDevice name\n");
     ErrorF("-nosilk                disable Silken Mouse\n");
-    ErrorF("-flipPixels            swap default black/white Pixel values\n");
 #ifdef XF86VIDMODE
     ErrorF("-disableVidMode        disable mode adjustments with xvidtune\n");
     ErrorF
diff --git a/hw/xfree86/common/xf86Mode.c b/hw/xfree86/common/xf86Mode.c
index 484cde7..eb08855 100644
--- a/hw/xfree86/common/xf86Mode.c
+++ b/hw/xfree86/common/xf86Mode.c
@@ -1186,7 +1186,7 @@ LCM(unsigned int x, unsigned int y)
 
 /*
  * Given various screen attributes, determine the minimum scanline width such
- * that each scanline is server and DDX padded and any pixels with imbedded
+ * that each scanline is server and DDX padded and any pixels with embedded
  * bank boundaries are off-screen.  This function returns -1 if such a width
  * cannot exist.
  */
@@ -1223,7 +1223,7 @@ scanLineWidth(unsigned int xsize,       /* pixels */
 
     /*
      * Scanlines will be server-pad aligned at this point.  They will also be
-     * a multiple of nWidthUnit bits long.  Ensure that pixels with imbedded
+     * a multiple of nWidthUnit bits long.  Ensure that pixels with embedded
      * bank boundaries are off-screen.
      *
      * It seems reasonable to limit total frame buffer size to 1/16 of the
diff --git a/hw/xfree86/common/xf86Module.h b/hw/xfree86/common/xf86Module.h
index 00aa84a..1eb09bc 100644
--- a/hw/xfree86/common/xf86Module.h
+++ b/hw/xfree86/common/xf86Module.h
@@ -74,8 +74,8 @@
  * mask is 0xFFFF0000.
  */
 #define ABI_ANSIC_VERSION	SET_ABI_VERSION(0, 4)
-#define ABI_VIDEODRV_VERSION	SET_ABI_VERSION(24, 1)
-#define ABI_XINPUT_VERSION	SET_ABI_VERSION(24, 1)
+#define ABI_VIDEODRV_VERSION	SET_ABI_VERSION(25, 2)
+#define ABI_XINPUT_VERSION	SET_ABI_VERSION(24, 4)
 #define ABI_EXTENSION_VERSION	SET_ABI_VERSION(10, 0)
 
 #define MODINFOSTRING1	0xef23fdc5
@@ -92,7 +92,7 @@ typedef enum {
     LDR_NOENT,                  /* Module file does not exist */
     LDR_NOLOAD,                 /* type specific loader failed */
     LDR_ONCEONLY,               /* Module should only be loaded once (not an error) */
-    LDR_MISMATCH,               /* the module didn't match the spec'd requirments */
+    LDR_MISMATCH,               /* the module didn't match the spec'd requirements */
     LDR_BADUSAGE,               /* LoadModule is called with bad arguments */
     LDR_INVALID,                /* The module doesn't have a valid ModuleData object */
     LDR_BADOS,                  /* The module doesn't support the OS */
@@ -156,6 +156,7 @@ extern _X_EXPORT void *LoadSubModule(void *, const char *, const char **,
 extern _X_EXPORT void UnloadSubModule(void *);
 extern _X_EXPORT void UnloadModule(void *);
 extern _X_EXPORT void *LoaderSymbol(const char *);
+extern _X_EXPORT void *LoaderSymbolFromModule(void *, const char *);
 extern _X_EXPORT void LoaderErrorMsg(const char *, const char *, int, int);
 extern _X_EXPORT Bool LoaderShouldIgnoreABI(void);
 extern _X_EXPORT int LoaderGetABIVersion(const char *abiclass);
diff --git a/hw/xfree86/common/xf86Opt.h b/hw/xfree86/common/xf86Opt.h
index 3be2a0f..3046fbd 100644
--- a/hw/xfree86/common/xf86Opt.h
+++ b/hw/xfree86/common/xf86Opt.h
@@ -41,7 +41,7 @@ typedef union {
     unsigned long num;
     const char *str;
     double realnum;
-    Bool bool;
+    Bool boolean;
     OptFrequency freq;
 } ValueUnion;
 
diff --git a/hw/xfree86/common/xf86Option.c b/hw/xfree86/common/xf86Option.c
index 06973bc..ca538cc 100644
--- a/hw/xfree86/common/xf86Option.c
+++ b/hw/xfree86/common/xf86Option.c
@@ -213,7 +213,7 @@ LookupBoolOption(XF86OptionPtr optlist, const char *name, int deflt,
     o.name = name;
     o.type = OPTV_BOOLEAN;
     if (ParseOptionValue(-1, optlist, &o, markUsed))
-        deflt = o.value.bool;
+        deflt = o.value.boolean;
     return deflt;
 }
 
@@ -474,7 +474,7 @@ xf86ShowUnusedOptions(int scrnIndex, XF86OptionPtr opt)
 static Bool
 GetBoolValue(OptionInfoPtr p, const char *s)
 {
-    return xf86getBoolValue(&p->value.bool, s);
+    return xf86getBoolValue(&p->value.boolean, s);
 }
 
 static Bool
@@ -678,7 +678,7 @@ ParseOptionValue(int scrnIndex, XF86OptionPtr options, OptionInfoPtr p,
             if (markUsed)
                 xf86MarkOptionUsedByName(options, newn);
             if (GetBoolValue(&opt, s)) {
-                p->value.bool = !opt.value.bool;
+                p->value.boolean = !opt.value.boolean;
                 p->found = TRUE;
             }
             else {
@@ -869,7 +869,7 @@ xf86GetOptValBool(const OptionInfoRec * table, int token, Bool *value)
 
     p = xf86TokenToOptinfo(table, token);
     if (p && p->found) {
-        *value = p->value.bool;
+        *value = p->value.boolean;
         return TRUE;
     }
     else
@@ -883,7 +883,7 @@ xf86ReturnOptValBool(const OptionInfoRec * table, int token, Bool def)
 
     p = xf86TokenToOptinfo(table, token);
     if (p && p->found) {
-        return p->value.bool;
+        return p->value.boolean;
     }
     else
         return def;
diff --git a/hw/xfree86/common/xf86Priv.h b/hw/xfree86/common/xf86Priv.h
index 393af39..d5185d8 100644
--- a/hw/xfree86/common/xf86Priv.h
+++ b/hw/xfree86/common/xf86Priv.h
@@ -46,6 +46,7 @@
 extern _X_EXPORT const char *xf86ConfigFile;
 extern _X_EXPORT const char *xf86ConfigDir;
 extern _X_EXPORT Bool xf86AllowMouseOpenFail;
+extern _X_EXPORT Bool xf86AutoBindGPUDisabled;
 
 #ifdef XF86VIDMODE
 extern _X_EXPORT Bool xf86VidModeDisabled;
@@ -68,9 +69,7 @@ extern _X_EXPORT char *xf86KeyboardName;
 extern _X_EXPORT int xf86FbBpp;
 extern _X_EXPORT int xf86Depth;
 extern _X_EXPORT rgb xf86Weight;
-extern _X_EXPORT Bool xf86FlipPixels;
 extern _X_EXPORT Gamma xf86Gamma;
-extern _X_EXPORT const char *xf86ServerName;
 
 /* Other parameters */
 
@@ -91,8 +90,8 @@ extern _X_EXPORT const char *xf86VisualNames[];
 extern _X_EXPORT int xf86Verbose;       /* verbosity level */
 extern _X_EXPORT int xf86LogVerbose;    /* log file verbosity level */
 
-extern ScrnInfoPtr *xf86GPUScreens;      /* List of pointers to ScrnInfoRecs */
-extern int xf86NumGPUScreens;
+extern _X_EXPORT ScrnInfoPtr *xf86GPUScreens;      /* List of pointers to ScrnInfoRecs */
+extern _X_EXPORT int xf86NumGPUScreens;
 extern _X_EXPORT int xf86DRMMasterFd;              /* Command line argument for DRM master file descriptor */
 #ifndef DEFAULT_VERBOSE
 #define DEFAULT_VERBOSE		0
@@ -159,6 +158,8 @@ extern _X_EXPORT Bool
 xf86CallDriverProbe(struct _DriverRec *drv, Bool detect_only);
 extern _X_EXPORT Bool
 xf86PrivsElevated(void);
+extern _X_EXPORT Bool
+xf86HasTTYs(void);
 
 #endif                          /* _NO_XF86_PROTOTYPES */
 
diff --git a/hw/xfree86/common/xf86Privstr.h b/hw/xfree86/common/xf86Privstr.h
index 21c2e1f..3186114 100644
--- a/hw/xfree86/common/xf86Privstr.h
+++ b/hw/xfree86/common/xf86Privstr.h
@@ -63,7 +63,6 @@ typedef struct {
     Bool ShareVTs;
     Bool dontZap;
     Bool dontZoom;
-    Bool notrapSignals;         /* don't exit cleanly - die at fault */
 
     /* graphics part */
     ScreenPtr currentScreen;
@@ -79,7 +78,6 @@ typedef struct {
     Bool miscModInDevEnabled;   /* Allow input devices to be
                                  * changed */
     Bool miscModInDevAllowNonLocal;
-    Bool useSIGIO;              /* Use SIGIO for handling DRI1 swaps */
     Bool pmFlag;
     MessageType iglxFrom;
     XF86_GlxVisuals glxVisuals;
@@ -98,6 +96,7 @@ typedef struct {
 
     Bool autoAddGPU;
     const char *debug;
+    Bool autoBindGPU;
 } xf86InfoRec, *xf86InfoPtr;
 
 /* ISC's cc can't handle ~ of UL constants, so explicitly type cast them. */
diff --git a/hw/xfree86/common/xf86VGAarbiter.c b/hw/xfree86/common/xf86VGAarbiter.c
index 40f241a..9db8d04 100644
--- a/hw/xfree86/common/xf86VGAarbiter.c
+++ b/hw/xfree86/common/xf86VGAarbiter.c
@@ -321,9 +321,8 @@ VGAarbiterSourceValidate(DrawablePtr pDrawable,
 
     SCREEN_PROLOG(SourceValidate);
     VGAGet(pScreen);
-    if (pScreen->SourceValidate)
-        (*pScreen->SourceValidate) (pDrawable, x, y, width, height,
-                                    subWindowMode);
+    (*pScreen->SourceValidate) (pDrawable, x, y, width, height,
+                                subWindowMode);
     VGAPut();
     SCREEN_EPILOG(SourceValidate, VGAarbiterSourceValidate);
 }
diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index 75235b3..8cf3f62 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -323,6 +323,33 @@ ApplyTransformationMatrix(DeviceIntPtr dev)
                            PropModeReplace, 9, matrix, FALSE);
 }
 
+static void
+ApplyAutoRepeat(DeviceIntPtr dev)
+{
+    InputInfoPtr pInfo = (InputInfoPtr) dev->public.devicePrivate;
+    XkbSrvInfoPtr xkbi;
+    char *repeatStr;
+    long delay, rate;
+
+    if (!dev->key)
+        return;
+
+    xkbi = dev->key->xkbInfo;
+
+    repeatStr = xf86SetStrOption(pInfo->options, "AutoRepeat", NULL);
+    if (!repeatStr)
+        return;
+
+    if (sscanf(repeatStr, "%ld %ld", &delay, &rate) != 2) {
+        xf86Msg(X_ERROR, "\"%s\" is not a valid AutoRepeat value\n", repeatStr);
+        return;
+    }
+
+    xf86Msg(X_CONFIG, "AutoRepeat: %ld %ld\n", delay, rate);
+    xkbi->desc->ctrls->repeat_delay = delay;
+    xkbi->desc->ctrls->repeat_interval = rate;
+}
+
 /***********************************************************************
  *
  * xf86ProcessCommonOptions --
@@ -821,6 +848,7 @@ xf86InputDevicePostInit(DeviceIntPtr dev)
 {
     ApplyAccelerationSettings(dev);
     ApplyTransformationMatrix(dev);
+    ApplyAutoRepeat(dev);
     return Success;
 }
 
@@ -874,7 +902,7 @@ xf86NewInputDevice(InputInfoPtr pInfo, DeviceIntPtr *pdev, BOOL enable)
 {
     InputDriverPtr drv = NULL;
     DeviceIntPtr dev = NULL;
-    Bool paused;
+    Bool paused = FALSE;
     int rval;
     char *path = NULL;
 
@@ -1448,7 +1476,7 @@ xf86FirstLocalDevice(void)
  *
  * This function is the same for X or Y coordinates.
  * You may have to reverse the high and low values to compensate for
- * different orgins on the touch screen vs X.
+ * different origins on the touch screen vs X.
  *
  * e.g. to scale from device coordinates into screen coordinates, call
  * xf86ScaleAxis(x, 0, screen_width, dev_min, dev_max);
@@ -1562,6 +1590,58 @@ xf86PostTouchEvent(DeviceIntPtr dev, uint32_t touchid, uint16_t type,
     QueueTouchEvents(dev, type, touchid, flags, mask);
 }
 
+/**
+ * Post a gesture pinch event.  The driver is responsible for maintaining the
+ * correct event sequence (GesturePinchBegin, GesturePinchUpdate,
+ * GesturePinchEnd).
+ *
+ * @param dev The device to post the event for
+ * @param type One of XI_GesturePinchBegin, XI_GesturePinchUpdate,
+ *        XI_GesturePinchEnd
+ * @param num_touches The number of touches in the gesture
+ * @param flags Flags for this event
+ * @param delta_x,delta_y accelerated relative motion delta
+ * @param delta_unaccel_x,delta_unaccel_y unaccelerated relative motion delta
+ * @param scale absolute scale of a pinch gesture
+ * @param delta_angle the ange delta in degrees between the last and the current pinch event.
+ */
+void
+xf86PostGesturePinchEvent(DeviceIntPtr dev, uint16_t type,
+                          uint16_t num_touches, uint32_t flags,
+                          double delta_x, double delta_y,
+                          double delta_unaccel_x,
+                          double delta_unaccel_y,
+                          double scale, double delta_angle)
+{
+    QueueGesturePinchEvents(dev, type, num_touches, flags, delta_x, delta_y,
+                            delta_unaccel_x, delta_unaccel_y,
+                            scale, delta_angle);
+}
+
+/**
+ * Post a gesture swipe event.  The driver is responsible for maintaining the
+ * correct event sequence (GestureSwipeBegin, GestureSwipeUpdate,
+ * GestureSwipeEnd).
+ *
+ * @param dev The device to post the event for
+ * @param type One of XI_GestureSwipeBegin, XI_GestureSwipeUpdate,
+ *        XI_GestureSwipeEnd
+ * @param num_touches The number of touches in the gesture
+ * @param flags Flags for this event
+ * @param delta_x,delta_y accelerated relative motion delta
+ * @param delta_unaccel_x,delta_unaccel_y unaccelerated relative motion delta
+ */
+void
+xf86PostGestureSwipeEvent(DeviceIntPtr dev, uint16_t type,
+                          uint16_t num_touches, uint32_t flags,
+                          double delta_x, double delta_y,
+                          double delta_unaccel_x,
+                          double delta_unaccel_y)
+{
+    QueueGestureSwipeEvents(dev, type, num_touches, flags, delta_x, delta_y,
+                            delta_unaccel_x, delta_unaccel_y);
+}
+
 void
 xf86InputEnableVTProbe(void)
 {
diff --git a/hw/xfree86/common/xf86Xinput.h b/hw/xfree86/common/xf86Xinput.h
index 0024053..e73aff2 100644
--- a/hw/xfree86/common/xf86Xinput.h
+++ b/hw/xfree86/common/xf86Xinput.h
@@ -158,6 +158,20 @@ extern _X_EXPORT void xf86PostKeyboardEvent(DeviceIntPtr device,
 extern _X_EXPORT void xf86PostTouchEvent(DeviceIntPtr dev, uint32_t touchid,
                                          uint16_t type, uint32_t flags,
                                          const ValuatorMask *mask);
+extern _X_EXPORT void xf86PostGesturePinchEvent(DeviceIntPtr dev, uint16_t type,
+                                                uint16_t num_touches,
+                                                uint32_t flags,
+                                                double delta_x, double delta_y,
+                                                double delta_unaccel_x,
+                                                double delta_unaccel_y,
+                                                double scale, double delta_angle);
+extern _X_EXPORT void xf86PostGestureSwipeEvent(DeviceIntPtr dev, uint16_t type,
+                                                uint16_t num_touches,
+                                                uint32_t flags,
+                                                double delta_x, double delta_y,
+                                                double delta_unaccel_x,
+                                                double delta_unaccel_y);
+
 extern _X_EXPORT InputInfoPtr xf86FirstLocalDevice(void);
 extern _X_EXPORT int xf86ScaleAxis(int Cx, int to_max, int to_min, int from_max,
                                    int from_min);
@@ -199,6 +213,11 @@ xf86VIDrvMsgVerb(InputInfoPtr dev,
                  MessageType type, int verb, const char *format, va_list args)
 _X_ATTRIBUTE_PRINTF(4, 0);
 
+extern _X_EXPORT void xf86AddInputEventDrainCallback(CallbackProcPtr callback,
+                                                     void *param);
+extern _X_EXPORT void xf86RemoveInputEventDrainCallback(CallbackProcPtr callback,
+                                                        void *param);
+
 /* xf86Option.c */
 extern _X_EXPORT void
 xf86CollectInputOptions(InputInfoPtr pInfo, const char **defaultOpts);
diff --git a/hw/xfree86/common/xf86fbman.c b/hw/xfree86/common/xf86fbman.c
index 91ddedc..25779e5 100644
--- a/hw/xfree86/common/xf86fbman.c
+++ b/hw/xfree86/common/xf86fbman.c
@@ -382,7 +382,7 @@ AllocateArea(FBManagerPtr offman,
         break;
     }
 
-    /* try to boot a removeable one out if we are not expendable ourselves */
+    /* try to boot a removable one out if we are not expendable ourselves */
     if (!area && !removeCB) {
         link = offman->UsedAreas;
 
@@ -1056,7 +1056,7 @@ localResizeOffscreenLinear(FBLinearPtr resize, int length)
             return FALSE;
     }
 
-    /* This could actually be alot smarter and try to move allocations
+    /* This could actually be a lot smarter and try to move allocations
        from XY to linear when available.  For now if it was XY, we keep
        it XY */
 
diff --git a/hw/xfree86/common/xf86pciBus.c b/hw/xfree86/common/xf86pciBus.c
index 6575c4e..aeeed8b 100644
--- a/hw/xfree86/common/xf86pciBus.c
+++ b/hw/xfree86/common/xf86pciBus.c
@@ -633,7 +633,7 @@ struct Inst {
  * \param devList        List of Device sections parsed from the config file.
  * \param numDevs        Number of entries in \c devList.
  * \param drvp           Pointer the driver's control structure.
- * \param foundEntities  Returned list of entity indicies associated with the
+ * \param foundEntities  Returned list of entity indices associated with the
  *                       driver.
  *
  * \returns
diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c
index cef47da..45028f7 100644
--- a/hw/xfree86/common/xf86platformBus.c
+++ b/hw/xfree86/common/xf86platformBus.c
@@ -49,6 +49,7 @@
 #include "Pci.h"
 #include "xf86platformBus.h"
 #include "xf86Config.h"
+#include "xf86Crtc.h"
 
 #include "randrstr.h"
 int platformSlotClaimed;
@@ -289,7 +290,7 @@ xf86platformProbe(void)
     for (i = 0; i < xf86_num_platform_devices; i++) {
         char *busid = xf86_platform_odev_attributes(i)->busid;
 
-        if (pci && (strncmp(busid, "pci:", 4) == 0)) {
+        if (pci && busid && (strncmp(busid, "pci:", 4) == 0)) {
             platform_find_pci_info(&xf86_platform_devices[i], busid);
         }
 
@@ -364,10 +365,12 @@ xf86MergeOutputClassOptions(int entityIndex, void **options)
         break;
     case BUS_PCI:
         for (i = 0; i < xf86_num_platform_devices; i++) {
-            if (MATCH_PCI_DEVICES(xf86_platform_devices[i].pdev,
-                                  entity->bus.id.pci)) {
-                dev = &xf86_platform_devices[i];
-                break;
+            if (xf86_platform_devices[i].pdev) {
+                if (MATCH_PCI_DEVICES(xf86_platform_devices[i].pdev,
+                                      entity->bus.id.pci)) {
+                    dev = &xf86_platform_devices[i];
+                    break;
+                }
             }
         }
         break;
@@ -533,21 +536,34 @@ xf86platformProbeDev(DriverPtr drvp)
     const unsigned numDevs = xf86MatchDevice(drvp->driverName, &devList);
     int i, j;
 
-    /* find the main device or any device specificed in xorg.conf */
+    /* find the main device or any device specified in xorg.conf */
     for (i = 0; i < numDevs; i++) {
+        const char *devpath;
+
         /* skip inactive devices */
         if (!devList[i]->active)
             continue;
 
+        /* This is specific to modesetting. */
+        devpath = xf86FindOptionValue(devList[i]->options, "kmsdev");
+
         for (j = 0; j < xf86_num_platform_devices; j++) {
-            if (devList[i]->busID && *devList[i]->busID) {
+            if (devpath && *devpath) {
+                if (strcmp(xf86_platform_devices[j].attribs->path, devpath) == 0)
+                    break;
+            } else if (devList[i]->busID && *devList[i]->busID) {
                 if (xf86PlatformDeviceCheckBusID(&xf86_platform_devices[j], devList[i]->busID))
                     break;
             }
             else {
                 /* for non-seat0 servers assume first device is the master */
-                if (ServerIsNotSeat0())
+                if (ServerIsNotSeat0()) {
                     break;
+                } else {
+                    /* Accept the device if the driver is simpledrm */
+                    if (strcmp(xf86_platform_devices[j].attribs->driver, "simpledrm") == 0)
+                        break;
+                }
 
                 if (xf86IsPrimaryPlatform(&xf86_platform_devices[j]))
                     break;
@@ -597,7 +613,7 @@ xf86platformAddGPUDevices(DriverPtr drvp)
 int
 xf86platformAddDevice(int index)
 {
-    int i, old_screens, scr_index;
+    int i, old_screens, scr_index, scrnum;
     DriverPtr drvp = NULL;
     screenLayoutPtr layout;
     static const char *hotplug_driver_name = "modesetting";
@@ -663,11 +679,15 @@ xf86platformAddDevice(int index)
        xf86NumGPUScreens = old_screens;
        return -1;
    }
-   /* attach unbound to 0 protocol screen */
-   AttachUnboundGPU(xf86Screens[0]->pScreen, xf86GPUScreens[i]->pScreen);
+   /* attach unbound to the configured protocol screen (or 0) */
+   scrnum = xf86GPUScreens[i]->confScreen->screennum;
+   AttachUnboundGPU(xf86Screens[scrnum]->pScreen, xf86GPUScreens[i]->pScreen);
+   if (xf86Info.autoBindGPU)
+       RRProviderAutoConfigGpuScreen(xf86ScrnToScreen(xf86GPUScreens[i]),
+                                     xf86ScrnToScreen(xf86Screens[scrnum]));
 
-   RRResourcesChanged(xf86Screens[0]->pScreen);
-   RRTellChanged(xf86Screens[0]->pScreen);
+   RRResourcesChanged(xf86Screens[scrnum]->pScreen);
+   RRTellChanged(xf86Screens[scrnum]->pScreen);
 
    return 0;
 }
@@ -676,7 +696,7 @@ void
 xf86platformRemoveDevice(int index)
 {
     EntityPtr entity;
-    int ent_num, i, j;
+    int ent_num, i, j, scrnum;
     Bool found;
 
     for (ent_num = 0; ent_num < xf86NumEntities; ent_num++) {
@@ -703,6 +723,8 @@ xf86platformRemoveDevice(int index)
         goto out;
     }
 
+    scrnum = xf86GPUScreens[i]->confScreen->screennum;
+
     xf86GPUScreens[i]->pScreen->CloseScreen(xf86GPUScreens[i]->pScreen);
 
     RemoveGPUScreen(xf86GPUScreens[i]->pScreen);
@@ -712,8 +734,8 @@ xf86platformRemoveDevice(int index)
 
     xf86_remove_platform_device(index);
 
-    RRResourcesChanged(xf86Screens[0]->pScreen);
-    RRTellChanged(xf86Screens[0]->pScreen);
+    RRResourcesChanged(xf86Screens[scrnum]->pScreen);
+    RRTellChanged(xf86Screens[scrnum]->pScreen);
  out:
     return;
 }
diff --git a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h
index edd91c7..9072932 100644
--- a/hw/xfree86/common/xf86str.h
+++ b/hw/xfree86/common/xf86str.h
@@ -254,6 +254,7 @@ typedef struct _DriverRec {
 #undef BUS_PCI
 #undef BUS_SBUS
 #undef BUS_PLATFORM
+#undef BUS_USB
 #undef BUS_last
 #endif
 
@@ -262,6 +263,7 @@ typedef enum {
     BUS_PCI,
     BUS_SBUS,
     BUS_PLATFORM,
+    BUS_USB,
     BUS_last                    /* Keep last */
 } BusType;
 
@@ -349,7 +351,7 @@ typedef struct _confscreenrec {
     MonPtr monitor;
     GDevPtr device;
     int numdisplays;
-    DispPtr displays;
+    DispPtr *displays;
     int numxvadaptors;
     confXvAdaptorPtr xvadaptors;
     void *options;
@@ -640,7 +642,6 @@ typedef struct _ScrnInfoRec {
     int videoRam;               /* amount of video ram (kb) */
     unsigned long memPhysBase;  /* Physical address of FB */
     unsigned long fbOffset;     /* Offset of FB in the above */
-    Bool flipPixels;            /* swap default black/white */
     void *options;
 
     /* Allow screens to be enabled/disabled individually */
diff --git a/hw/xfree86/common/xf86xv.c b/hw/xfree86/common/xf86xv.c
index d613d71..8a8c593 100644
--- a/hw/xfree86/common/xf86xv.c
+++ b/hw/xfree86/common/xf86xv.c
@@ -544,7 +544,7 @@ xf86XVInitAdaptors(ScreenPtr pScreen, XF86VideoAdaptorPtr * infoPtr, int number)
    client clip from the GC when the video is initialized.  We then
    use xf86XVUpdateCompositeClip to calculate the new composite clip
    when we need it.  This is different from what DEC did.  They saved
-   the GC and used it's clip list when they needed to reclip the window,
+   the GC and used its clip list when they needed to reclip the window,
    even if the client clip was different from the one the video was
    initialized with.  If the original GC was destroyed, they had to stop
    the video.  I like the new method better (MArk).
diff --git a/hw/xfree86/common/xisb.c b/hw/xfree86/common/xisb.c
index 3568a57..f35a682 100644
--- a/hw/xfree86/common/xisb.c
+++ b/hw/xfree86/common/xisb.c
@@ -155,7 +155,7 @@ XisbTrace(XISBuffer * b, int trace)
  * will use check to select for data and prevent a block.
  * It is the caller's responsibility to set the block_duration to -1 if it
  * knows that there is data to read (because the main select loop triggered
- * the read) and want's to avoid the unnecessary overhead of the select call
+ * the read) and wants to avoid the unnecessary overhead of the select call
  *
  * a zero or positive block duration will cause the select to block for the
  * give duration in usecs.
diff --git a/hw/xfree86/ddc/Makefile.in b/hw/xfree86/ddc/Makefile.in
index 08bdeb0..d9ac1bc 100644
--- a/hw/xfree86/ddc/Makefile.in
+++ b/hw/xfree86/ddc/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -106,7 +106,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -208,8 +207,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
@@ -229,8 +226,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -244,6 +239,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -262,14 +259,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -286,8 +275,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -343,6 +334,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -395,7 +388,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -419,29 +411,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -479,8 +455,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -491,14 +465,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -741,7 +709,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/hw/xfree86/ddc/edid.h b/hw/xfree86/ddc/edid.h
index b884d82..adc9bf7 100644
--- a/hw/xfree86/ddc/edid.h
+++ b/hw/xfree86/ddc/edid.h
@@ -164,7 +164,7 @@
 #define T2 GET(E_T2)
 #define T_MANU GET(E_TMANU)
 
-/* extract information from estabished timing section */
+/* extract information from established timing section */
 #define _VALID_TIMING(x) !(((x[0] == 0x01) && (x[1] == 0x01)) \
                         || ((x[0] == 0x00) && (x[1] == 0x00)) \
                         || ((x[0] == 0x20) && (x[1] == 0x20)) )
diff --git a/hw/xfree86/ddc/interpret_edid.c b/hw/xfree86/ddc/interpret_edid.c
index 1963047..7259d21 100644
--- a/hw/xfree86/ddc/interpret_edid.c
+++ b/hw/xfree86/ddc/interpret_edid.c
@@ -768,7 +768,7 @@ gtf_supported(xf86MonPtr mon)
     } else {
         for (i = 0; i < DET_TIMINGS; i++) {
             struct detailed_monitor_section *det_timing_des = &(mon->det_mon[i]);
-            if (det_timing_des && (det_timing_des->type == DS_RANGES) &&
+            if (det_timing_des && (det_timing_des->type == DS_RANGES) && (mon->features.msc & 0x1) &&
                 (det_timing_des->section.ranges.display_range_timing_flags == DR_DEFAULT_GTF
 		|| det_timing_des->section.ranges.display_range_timing_flags == DR_SECONDARY_GTF))
 		    return TRUE;
diff --git a/hw/xfree86/ddc/print_edid.c b/hw/xfree86/ddc/print_edid.c
index e16b124..f5215bd 100644
--- a/hw/xfree86/ddc/print_edid.c
+++ b/hw/xfree86/ddc/print_edid.c
@@ -143,7 +143,7 @@ print_dpms_features(int scrnIndex, struct disp_features *c,
     if (!c->input_type) {       /* analog */
         switch (c->display_type) {
         case DISP_MONO:
-            xf86ErrorF("; Monochorome/GrayScale Display\n");
+            xf86ErrorF("; Monochrome/GrayScale Display\n");
             break;
         case DISP_RGB:
             xf86ErrorF("; RGB/Color Display\n");
@@ -507,7 +507,7 @@ handle_detailed_print(struct detailed_monitor_section *det_mon, void *data)
     }
     if (det_mon->type >= DS_VENDOR && det_mon->type <= DS_VENDOR_MAX) {
         xf86DrvMsg(scrnIndex, X_INFO,
-                   "Unknown vendor-specific block %hx\n",
+                   "Unknown vendor-specific block %x\n",
                    det_mon->type - DS_VENDOR);
     }
 
diff --git a/hw/xfree86/dixmods/Makefile.am b/hw/xfree86/dixmods/Makefile.am
index 856659f..3d58110 100644
--- a/hw/xfree86/dixmods/Makefile.am
+++ b/hw/xfree86/dixmods/Makefile.am
@@ -4,8 +4,7 @@ if GLX
 GLXMODS = libglx.la
 endif
 
-module_LTLIBRARIES = libfb.la \
-                     libwfb.la \
+module_LTLIBRARIES = libwfb.la \
                      libshadow.la
 
 extsmoduledir = $(moduledir)/extensions
@@ -17,11 +16,6 @@ AM_CPPFLAGS = @XORG_INCS@ \
            -I$(top_srcdir)/miext/shadow \
            -I$(top_srcdir)/glx
 
-libfb_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG)
-libfb_la_LIBADD = $(top_builddir)/fb/libfb.la
-libfb_la_SOURCES = fbmodule.c
-libfb_la_CFLAGS = $(AM_CFLAGS)
-
 libwfb_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG)
 libwfb_la_LIBADD = $(top_builddir)/fb/libwfb.la
 libwfb_la_SOURCES = fbmodule.c
@@ -39,10 +33,9 @@ libglx_la_SOURCES = glxmodule.c
 
 libshadow_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG)
 libshadow_la_LIBADD = $(top_builddir)/miext/shadow/libshadow.la
-if NO_UNDEFINED
-libshadow_la_LIBADD += libfb.la
-endif
 libshadow_la_SOURCES = shmodule.c
 
-libdixmods_la_SOURCES = $(top_srcdir)/mi/miinitext.c
+libdixmods_la_SOURCES = \
+	$(top_srcdir)/mi/miinitext.c \
+	$(top_srcdir)/mi/miinitext.h
 libdixmods_la_CFLAGS = $(AM_CFLAGS)
diff --git a/hw/xfree86/dixmods/Makefile.in b/hw/xfree86/dixmods/Makefile.in
index 7fa284c..146b8a1 100644
--- a/hw/xfree86/dixmods/Makefile.in
+++ b/hw/xfree86/dixmods/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -90,7 +90,6 @@ build_triplet = @build@
 host_triplet = @host@
 @DRI2_TRUE@am__append_1 = $(top_builddir)/glx/libglxdri.la
 @DRI2_TRUE@@NO_UNDEFINED_TRUE@am__append_2 = $(LIBDRM_LIBS) $(PIXMAN_LIBS)
-@NO_UNDEFINED_TRUE@am__append_3 = libfb.la
 subdir = hw/xfree86/dixmods
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \
@@ -108,7 +107,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -153,12 +151,6 @@ am__v_lt_1 =
 libdixmods_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
 	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(libdixmods_la_CFLAGS) \
 	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-libfb_la_DEPENDENCIES = $(top_builddir)/fb/libfb.la
-am_libfb_la_OBJECTS = libfb_la-fbmodule.lo
-libfb_la_OBJECTS = $(am_libfb_la_OBJECTS)
-libfb_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(libfb_la_CFLAGS) \
-	$(CFLAGS) $(libfb_la_LDFLAGS) $(LDFLAGS) -o $@
 am__DEPENDENCIES_1 =
 @DRI2_TRUE@@NO_UNDEFINED_TRUE@am__DEPENDENCIES_2 =  \
 @DRI2_TRUE@@NO_UNDEFINED_TRUE@	$(am__DEPENDENCIES_1) \
@@ -171,8 +163,7 @@ libglx_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
 	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
 	$(libglx_la_LDFLAGS) $(LDFLAGS) -o $@
 @GLX_TRUE@am_libglx_la_rpath = -rpath $(extsmoduledir)
-libshadow_la_DEPENDENCIES = $(top_builddir)/miext/shadow/libshadow.la \
-	$(am__append_3)
+libshadow_la_DEPENDENCIES = $(top_builddir)/miext/shadow/libshadow.la
 am_libshadow_la_OBJECTS = shmodule.lo
 libshadow_la_OBJECTS = $(am_libshadow_la_OBJECTS)
 libshadow_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
@@ -201,7 +192,6 @@ depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__maybe_remake_depfiles = depfiles
 am__depfiles_remade = ./$(DEPDIR)/glxmodule.Plo \
 	./$(DEPDIR)/libdixmods_la-miinitext.Plo \
-	./$(DEPDIR)/libfb_la-fbmodule.Plo \
 	./$(DEPDIR)/libwfb_la-fbmodule.Plo ./$(DEPDIR)/shmodule.Plo
 am__mv = mv -f
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
@@ -222,12 +212,10 @@ AM_V_CCLD = $(am__v_CCLD_@AM_V@)
 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
 am__v_CCLD_0 = @echo "  CCLD    " $@;
 am__v_CCLD_1 = 
-SOURCES = $(libdixmods_la_SOURCES) $(libfb_la_SOURCES) \
-	$(libglx_la_SOURCES) $(libshadow_la_SOURCES) \
-	$(libwfb_la_SOURCES)
-DIST_SOURCES = $(libdixmods_la_SOURCES) $(libfb_la_SOURCES) \
-	$(libglx_la_SOURCES) $(libshadow_la_SOURCES) \
-	$(libwfb_la_SOURCES)
+SOURCES = $(libdixmods_la_SOURCES) $(libglx_la_SOURCES) \
+	$(libshadow_la_SOURCES) $(libwfb_la_SOURCES)
+DIST_SOURCES = $(libdixmods_la_SOURCES) $(libglx_la_SOURCES) \
+	$(libshadow_la_SOURCES) $(libwfb_la_SOURCES)
 am__can_run_installinfo = \
   case $$AM_UPDATE_INFO_DIR in \
     n|no|NO) false;; \
@@ -250,8 +238,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
@@ -271,8 +257,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -286,6 +270,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -304,14 +290,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -328,8 +306,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -385,6 +365,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -437,7 +419,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -461,29 +442,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -521,8 +486,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -533,14 +496,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -615,8 +572,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 noinst_LTLIBRARIES = libdixmods.la
 @GLX_TRUE@GLXMODS = libglx.la
-module_LTLIBRARIES = libfb.la \
-                     libwfb.la \
+module_LTLIBRARIES = libwfb.la \
                      libshadow.la
 
 extsmoduledir = $(moduledir)/extensions
@@ -627,10 +583,6 @@ AM_CPPFLAGS = @XORG_INCS@ \
            -I$(top_srcdir)/miext/shadow \
            -I$(top_srcdir)/glx
 
-libfb_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG)
-libfb_la_LIBADD = $(top_builddir)/fb/libfb.la
-libfb_la_SOURCES = fbmodule.c
-libfb_la_CFLAGS = $(AM_CFLAGS)
 libwfb_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG)
 libwfb_la_LIBADD = $(top_builddir)/fb/libwfb.la
 libwfb_la_SOURCES = fbmodule.c
@@ -640,10 +592,12 @@ libglx_la_LIBADD = $(top_builddir)/glx/libglx.la $(GLX_SYS_LIBS) \
 	$(am__append_1) $(am__append_2)
 libglx_la_SOURCES = glxmodule.c
 libshadow_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG)
-libshadow_la_LIBADD = $(top_builddir)/miext/shadow/libshadow.la \
-	$(am__append_3)
+libshadow_la_LIBADD = $(top_builddir)/miext/shadow/libshadow.la
 libshadow_la_SOURCES = shmodule.c
-libdixmods_la_SOURCES = $(top_srcdir)/mi/miinitext.c
+libdixmods_la_SOURCES = \
+	$(top_srcdir)/mi/miinitext.c \
+	$(top_srcdir)/mi/miinitext.h
+
 libdixmods_la_CFLAGS = $(AM_CFLAGS)
 all: all-am
 
@@ -763,9 +717,6 @@ clean-noinstLTLIBRARIES:
 libdixmods.la: $(libdixmods_la_OBJECTS) $(libdixmods_la_DEPENDENCIES) $(EXTRA_libdixmods_la_DEPENDENCIES) 
 	$(AM_V_CCLD)$(libdixmods_la_LINK)  $(libdixmods_la_OBJECTS) $(libdixmods_la_LIBADD) $(LIBS)
 
-libfb.la: $(libfb_la_OBJECTS) $(libfb_la_DEPENDENCIES) $(EXTRA_libfb_la_DEPENDENCIES) 
-	$(AM_V_CCLD)$(libfb_la_LINK) -rpath $(moduledir) $(libfb_la_OBJECTS) $(libfb_la_LIBADD) $(LIBS)
-
 libglx.la: $(libglx_la_OBJECTS) $(libglx_la_DEPENDENCIES) $(EXTRA_libglx_la_DEPENDENCIES) 
 	$(AM_V_CCLD)$(libglx_la_LINK) $(am_libglx_la_rpath) $(libglx_la_OBJECTS) $(libglx_la_LIBADD) $(LIBS)
 
@@ -783,7 +734,6 @@ distclean-compile:
 
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glxmodule.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdixmods_la-miinitext.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbmodule.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbmodule.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shmodule.Plo@am__quote@ # am--include-marker
 
@@ -821,13 +771,6 @@ libdixmods_la-miinitext.lo: $(top_srcdir)/mi/miinitext.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdixmods_la_CFLAGS) $(CFLAGS) -c -o libdixmods_la-miinitext.lo `test -f '$(top_srcdir)/mi/miinitext.c' || echo '$(srcdir)/'`$(top_srcdir)/mi/miinitext.c
 
-libfb_la-fbmodule.lo: fbmodule.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbmodule.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbmodule.Tpo -c -o libfb_la-fbmodule.lo `test -f 'fbmodule.c' || echo '$(srcdir)/'`fbmodule.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fbmodule.Tpo $(DEPDIR)/libfb_la-fbmodule.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='fbmodule.c' object='libfb_la-fbmodule.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbmodule.lo `test -f 'fbmodule.c' || echo '$(srcdir)/'`fbmodule.c
-
 libwfb_la-fbmodule.lo: fbmodule.c
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbmodule.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbmodule.Tpo -c -o libwfb_la-fbmodule.lo `test -f 'fbmodule.c' || echo '$(srcdir)/'`fbmodule.c
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fbmodule.Tpo $(DEPDIR)/libwfb_la-fbmodule.Plo
@@ -892,7 +835,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
@@ -971,7 +913,6 @@ clean-am: clean-extsmoduleLTLIBRARIES clean-generic clean-libtool \
 distclean: distclean-am
 		-rm -f ./$(DEPDIR)/glxmodule.Plo
 	-rm -f ./$(DEPDIR)/libdixmods_la-miinitext.Plo
-	-rm -f ./$(DEPDIR)/libfb_la-fbmodule.Plo
 	-rm -f ./$(DEPDIR)/libwfb_la-fbmodule.Plo
 	-rm -f ./$(DEPDIR)/shmodule.Plo
 	-rm -f Makefile
@@ -1022,7 +963,6 @@ installcheck-am:
 maintainer-clean: maintainer-clean-am
 		-rm -f ./$(DEPDIR)/glxmodule.Plo
 	-rm -f ./$(DEPDIR)/libdixmods_la-miinitext.Plo
-	-rm -f ./$(DEPDIR)/libfb_la-fbmodule.Plo
 	-rm -f ./$(DEPDIR)/libwfb_la-fbmodule.Plo
 	-rm -f ./$(DEPDIR)/shmodule.Plo
 	-rm -f Makefile
diff --git a/hw/xfree86/dixmods/meson.build b/hw/xfree86/dixmods/meson.build
index 835d232..a1afbe8 100644
--- a/hw/xfree86/dixmods/meson.build
+++ b/hw/xfree86/dixmods/meson.build
@@ -1,17 +1,3 @@
-fb = shared_module(
-    'fb',
-    'fbmodule.c',
-
-    include_directories: [inc, xorg_inc],
-    c_args: xorg_c_args,
-    dependencies: common_dep,
-    link_whole: libxserver_fb,
-    link_with: e,
-
-    install: true,
-    install_dir: module_dir,
-)
-
 shared_module(
     'wfb',
     'fbmodule.c',
@@ -34,7 +20,7 @@ shared_module(
     c_args: xorg_c_args,
     dependencies: common_dep,
     link_whole: libxserver_miext_shadow,
-    link_with: [fb, e],
+    link_with: e,
 
     install: true,
     install_dir: module_dir,
@@ -47,7 +33,7 @@ if build_glx
 
         include_directories: [ inc, xorg_inc, glx_inc ],
         c_args: [ xorg_c_args, glx_align64 ],
-        dependencies: [ common_dep, dl_dep ],
+        dependencies: [ common_dep, dl_dep, dri_dep ],
         link_whole: libxserver_glx,
         link_with: e,
 
diff --git a/hw/xfree86/doc/Makefile.in b/hw/xfree86/doc/Makefile.in
index 8fe4695..85976e1 100644
--- a/hw/xfree86/doc/Makefile.in
+++ b/hw/xfree86/doc/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -125,7 +125,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -170,8 +169,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -185,6 +182,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -203,14 +202,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -227,8 +218,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -284,6 +277,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -336,7 +331,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -360,29 +354,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -420,8 +398,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -432,14 +408,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -589,7 +559,6 @@ ctags CTAGS:
 
 cscope cscopelist:
 
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/hw/xfree86/doc/README.modes b/hw/xfree86/doc/README.modes
index ea228e5..54543bf 100644
--- a/hw/xfree86/doc/README.modes
+++ b/hw/xfree86/doc/README.modes
@@ -54,7 +54,7 @@ refresh rate.
 
 As hardware often limits possible configuration combinations, each output
 knows the set of CRTCs that it can be connected to as well as the set of
-other outputs which can be simutaneously connected to a CRTC.
+other outputs which can be simultaneously connected to a CRTC.
 
 2.1.2 CRTC overview
 
diff --git a/hw/xfree86/doc/Registry b/hw/xfree86/doc/Registry
index ad5b9bf..9c6b114 100644
--- a/hw/xfree86/doc/Registry
+++ b/hw/xfree86/doc/Registry
@@ -216,7 +216,6 @@ DisableVidModeExtension   B     F    disable VidMode extension
 DontVTSwitch              B     F    disable Ctrl-Alt-Fn
 DontZap                   B     F    disable Ctrl-Alt-BS sequence
 DontZoom                  B     F    disable Ctrl-Alt-+/-
-NoTrapSignals             B     F    don't trap signals
 OffTime                   I     F    Time before DPMS off mode active (min)
 PciProbe1                 O     F    use PCI probe algorithm 1
 PciProbe2                 O     F    use PCI probe algorithm 2
diff --git a/hw/xfree86/doc/ddxDesign.xml b/hw/xfree86/doc/ddxDesign.xml
index 3678441..1eed293 100644
--- a/hw/xfree86/doc/ddxDesign.xml
+++ b/hw/xfree86/doc/ddxDesign.xml
@@ -511,7 +511,7 @@ mechanism for this.
 
 	<para>
     If a device is capable of disabling this decoding the resource is
-    called sharable.  For PCI devices a generic method is provided to
+    called shareable.  For PCI devices a generic method is provided to
     control resource decoding.  Other devices will have to provide a
     device specific function to control decoding.
 	</para>
@@ -1065,7 +1065,7 @@ Here is what <function>InitOutput()</function> does:
       against the expected number (most drivers expect only one).  The
       entity information for each of them should be retrieved (with
       <function>xf86GetEntityInfo()</function>) and checked for the correct
-      bus type and that none of the sharable resources registered during
+      bus type and that none of the shareable resources registered during
       the Probe phase was rejected.
 	    </para>
 
@@ -1373,7 +1373,7 @@ Here is what <function>InitOutput()</function> does:
 
 	<orderedlist>
 	  <listitem><para>
-	The sharable resources registered by each entity are compared.
+	The shareable resources registered by each entity are compared.
 	If a resource is registered by more than one entity the entity
 	will be marked to indicate that it needs to share this resources
 	type (IO or MEM).
@@ -1833,7 +1833,6 @@ Some of them are:
     xf86Depth                 -depth from the command line
     xf86Weight                -weight from the command line
     xf86Gamma                 -{r,g,b,}gamma from the command line
-    xf86FlipPixels            -flippixels from the command line
     xf86ProbeOnly             -probeonly from the command line
     defaultColorVisualClass   -cc from the command line
 	</literallayout>
@@ -1894,26 +1893,6 @@ functions:
 
 	</para></blockquote>
 
-      <blockquote><para>
-	  <programlisting>
-    Bool xf86GetFlipPixels();
-	  </programlisting>
-	  <blockquote><para>
-      Returns <constant>TRUE</constant> if <option>-flippixels</option> is
-      present on the command line, and <constant>FALSE</constant> otherwise.
-	    </para></blockquote>
-
-	</para></blockquote>
-
-      <blockquote><para>
-	  <programlisting>
-    const char *xf86GetServerName();
-	  </programlisting>
-	  <blockquote><para>
-      Returns the name of the X server from the command line.
-	    </para></blockquote>
-
-	</para></blockquote>
     </sect2>
 
     <sect2>
@@ -2214,7 +2193,7 @@ giving up the VT.
 
       <para>
 In <function>PreInit()</function> phase each driver should check if any
-sharable resources it has registered during <function>Probe()</function> has
+shareable resources it has registered during <function>Probe()</function> has
 been denied and take appropriate action which could simply be to fail.
 If it needs to access resources it has disabled during
 <function>EntitySetup()</function> it can do so provided it has registered
@@ -2247,7 +2226,7 @@ rules:
 
 	<orderedlist>
 	  <listitem><para>
-   The sharable resources registered by each entity are compared.  If
+   The shareable resources registered by each entity are compared.  If
    a resource is registered by more than one entity the entity will be
    marked to need to share this resources type (<constant>IO</constant> or
    <constant>MEM</constant>).
@@ -4725,7 +4704,7 @@ typedef struct {
 		  <varlistentry>
 		    <term><structfield>depth</structfield></term>
 		    <listitem><para>
-	The significant bits per pixel in RGB formats (analgous to the
+	The significant bits per pixel in RGB formats (analogous to the
 	depth of a pixmap format).
 		      </para></listitem></varlistentry>
 
@@ -6023,19 +6002,6 @@ strongly encouraged to improve the consistency of driver behaviour.
 
 	  </blockquote></para></blockquote>
 
-      <blockquote><para>
-	  <programlisting>
-    void xf86SetBlackWhitePixels(ScrnInfoPtr pScrn);
-	  </programlisting>
-	  <blockquote><para>
-      This functions sets the <structfield>blackPixel</structfield> and
-      <structfield>whitePixel</structfield> fields of the <structname>ScrnInfoRec</structname>
-      according to whether or not the <option>-flipPixels</option> command
-      line options is present.
-	    </para>
-
-	  </blockquote></para></blockquote>
-
       <blockquote><para>
 	  <programlisting>
     const char *xf86GetVisualName(int visual);
diff --git a/hw/xfree86/doc/meson.build b/hw/xfree86/doc/meson.build
new file mode 100644
index 0000000..df1d5e2
--- /dev/null
+++ b/hw/xfree86/doc/meson.build
@@ -0,0 +1,35 @@
+
+if build_docs_devel
+    basename = 'ddxDesign'
+    input_xml = basename + '.xml'
+
+    custom_target(
+        basename + '.html',
+        output: basename + '.html',
+        input: [input_xml],
+        command: [xmlto] + docs_xmlto_search_flags + [
+            '-x',  join_paths(doc_stylesheet_srcdir, 'xorg-xhtml.xsl'),
+            '-o', meson.current_build_dir(),
+            'xhtml-nochunks', '@INPUT0@'],
+        build_by_default: true,
+        install: false,
+    )
+
+    if build_docs_pdf
+        foreach format : ['ps', 'pdf']
+            output_fn = basename + '.' + format
+            custom_target(
+                output_fn,
+                output: output_fn,
+                input: [input_xml],
+                command: [xmlto] + docs_xmlto_search_flags + [
+                    '-x',  join_paths(doc_stylesheet_srcdir, 'xorg-fo.xsl'),
+                    '--stringparam', 'img.src.path=' + meson.current_build_dir(),
+                    '-o', meson.current_build_dir(),
+                    '--with-fop', format, '@INPUT0@'],
+                build_by_default: true,
+                install: false,
+            )
+        endforeach
+    endif
+endif
diff --git a/hw/xfree86/dri/Makefile.in b/hw/xfree86/dri/Makefile.in
index 2044be7..fe1d9c0 100644
--- a/hw/xfree86/dri/Makefile.in
+++ b/hw/xfree86/dri/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -106,7 +106,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -206,8 +205,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
@@ -227,8 +224,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -242,6 +237,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -260,14 +257,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -284,8 +273,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -341,6 +332,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -393,7 +386,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -417,29 +409,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -477,8 +453,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -489,14 +463,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -752,7 +720,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/hw/xfree86/dri/dri.c b/hw/xfree86/dri/dri.c
index 9f70759..d1b092b 100644
--- a/hw/xfree86/dri/dri.c
+++ b/hw/xfree86/dri/dri.c
@@ -1736,7 +1736,7 @@ DRISwapContext(int drmFD, void *oldctx, void *newctx)
         return;
     }
 
-    /* usefull for debugging, just print out after n context switches */
+    /* useful for debugging, just print out after n context switches */
     if (!count || !(count % 1)) {
         DRIDrvMsg(pScreen->myNum, X_INFO,
                   "[DRI] Context switch %5d from %p/0x%08x (%d)\n",
diff --git a/hw/xfree86/dri2/Makefile.in b/hw/xfree86/dri2/Makefile.in
index e875646..9706b12 100644
--- a/hw/xfree86/dri2/Makefile.in
+++ b/hw/xfree86/dri2/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -106,7 +106,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -222,8 +221,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 DIST_SUBDIRS = $(SUBDIRS)
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -269,8 +266,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -284,6 +279,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -302,14 +299,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -326,8 +315,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -383,6 +374,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -435,7 +428,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -459,29 +451,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -519,8 +495,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -531,14 +505,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -835,7 +803,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c
index 6619e3a..3397bb5 100644
--- a/hw/xfree86/dri2/dri2.c
+++ b/hw/xfree86/dri2/dri2.c
@@ -38,14 +38,12 @@
 #ifdef WITH_LIBDRM
 #include <xf86drm.h>
 #endif
-#include "xf86Module.h"
 #include "list.h"
 #include "scrnintstr.h"
 #include "windowstr.h"
 #include "dixstruct.h"
 #include "dri2.h"
 #include "dri2int.h"
-#include "xf86VGAarbiter.h"
 #include "damage.h"
 #include "xf86.h"
 
@@ -100,7 +98,7 @@ typedef struct _DRI2Drawable {
     unsigned blocked[3];
     Bool needInvalidate;
     int prime_id;
-    PixmapPtr prime_slave_pixmap;
+    PixmapPtr prime_secondary_pixmap;
     PixmapPtr redirectpixmap;
 } DRI2DrawableRec, *DRI2DrawablePtr;
 
@@ -183,33 +181,33 @@ DRI2GetScreen(ScreenPtr pScreen)
 }
 
 static ScreenPtr
-GetScreenPrime(ScreenPtr master, int prime_id)
+GetScreenPrime(ScreenPtr primary, int prime_id)
 {
-    ScreenPtr slave;
+    ScreenPtr secondary;
     if (prime_id == 0) {
-        return master;
+        return primary;
     }
-    xorg_list_for_each_entry(slave, &master->slave_list, slave_head) {
+    xorg_list_for_each_entry(secondary, &primary->secondary_list, secondary_head) {
         DRI2ScreenPtr ds;
 
-        if (!slave->is_offload_slave)
+        if (!secondary->is_offload_secondary)
             continue;
 
-        ds = DRI2GetScreen(slave);
+        ds = DRI2GetScreen(secondary);
         if (ds == NULL)
             continue;
 
         if (ds->prime_id == prime_id)
-            return slave;
+            return secondary;
     }
-    return master;
+    return primary;
 }
 
 static DRI2ScreenPtr
-DRI2GetScreenPrime(ScreenPtr master, int prime_id)
+DRI2GetScreenPrime(ScreenPtr primary, int prime_id)
 {
-    ScreenPtr slave = GetScreenPrime(master, prime_id);
-    return DRI2GetScreen(slave);
+    ScreenPtr secondary = GetScreenPrime(primary, prime_id);
+    return DRI2GetScreen(secondary);
 }
 
 static DRI2DrawablePtr
@@ -264,7 +262,7 @@ DRI2AllocateDrawable(DrawablePtr pDraw)
     xorg_list_init(&pPriv->reference_list);
     pPriv->needInvalidate = FALSE;
     pPriv->redirectpixmap = NULL;
-    pPriv->prime_slave_pixmap = NULL;
+    pPriv->prime_secondary_pixmap = NULL;
     if (pDraw->type == DRAWABLE_WINDOW) {
         pWin = (WindowPtr) pDraw;
         dixSetPrivate(&pWin->devPrivates, dri2WindowPrivateKey, pPriv);
@@ -429,9 +427,9 @@ DRI2DrawableGone(void *p, XID id)
         dixSetPrivate(&pPixmap->devPrivates, dri2PixmapPrivateKey, NULL);
     }
 
-    if (pPriv->prime_slave_pixmap) {
-        (*pPriv->prime_slave_pixmap->master_pixmap->drawable.pScreen->DestroyPixmap)(pPriv->prime_slave_pixmap->master_pixmap);
-        (*pPriv->prime_slave_pixmap->drawable.pScreen->DestroyPixmap)(pPriv->prime_slave_pixmap);
+    if (pPriv->prime_secondary_pixmap) {
+        (*pPriv->prime_secondary_pixmap->primary_pixmap->drawable.pScreen->DestroyPixmap)(pPriv->prime_secondary_pixmap->primary_pixmap);
+        (*pPriv->prime_secondary_pixmap->drawable.pScreen->DestroyPixmap)(pPriv->prime_secondary_pixmap);
     }
 
     if (pPriv->buffers != NULL) {
@@ -817,10 +815,10 @@ DrawablePtr DRI2UpdatePrime(DrawablePtr pDraw, DRI2BufferPtr pDest)
     DRI2DrawablePtr pPriv = DRI2GetDrawable(pDraw);
     PixmapPtr spix;
     PixmapPtr mpix = GetDrawablePixmap(pDraw);
-    ScreenPtr master, slave;
+    ScreenPtr primary, secondary;
     Bool ret;
 
-    master = mpix->drawable.pScreen;
+    primary = mpix->drawable.pScreen;
 
     if (pDraw->type == DRAWABLE_WINDOW) {
         WindowPtr pWin = (WindowPtr)pDraw;
@@ -833,15 +831,15 @@ DrawablePtr DRI2UpdatePrime(DrawablePtr pDraw, DRI2BufferPtr pDest)
                 pPriv->redirectpixmap->drawable.depth == pDraw->depth) {
                 mpix = pPriv->redirectpixmap;
             } else {
-                if (master->ReplaceScanoutPixmap) {
-                    mpix = (*master->CreatePixmap)(master, pDraw->width, pDraw->height,
+                if (primary->ReplaceScanoutPixmap) {
+                    mpix = (*primary->CreatePixmap)(primary, pDraw->width, pDraw->height,
                                                    pDraw->depth, CREATE_PIXMAP_USAGE_SHARED);
                     if (!mpix)
                         return NULL;
 
-                    ret = (*master->ReplaceScanoutPixmap)(pDraw, mpix, TRUE);
+                    ret = (*primary->ReplaceScanoutPixmap)(pDraw, mpix, TRUE);
                     if (ret == FALSE) {
-                        (*master->DestroyPixmap)(mpix);
+                        (*primary->DestroyPixmap)(mpix);
                         return NULL;
                     }
                     pPriv->redirectpixmap = mpix;
@@ -849,31 +847,31 @@ DrawablePtr DRI2UpdatePrime(DrawablePtr pDraw, DRI2BufferPtr pDest)
                     return NULL;
             }
         } else if (pPriv->redirectpixmap) {
-            (*master->ReplaceScanoutPixmap)(pDraw, pPriv->redirectpixmap, FALSE);
-            (*master->DestroyPixmap)(pPriv->redirectpixmap);
+            (*primary->ReplaceScanoutPixmap)(pDraw, pPriv->redirectpixmap, FALSE);
+            (*primary->DestroyPixmap)(pPriv->redirectpixmap);
             pPriv->redirectpixmap = NULL;
         }
     }
 
-    slave = GetScreenPrime(pDraw->pScreen, pPriv->prime_id);
+    secondary = GetScreenPrime(pDraw->pScreen, pPriv->prime_id);
 
     /* check if the pixmap is still fine */
-    if (pPriv->prime_slave_pixmap) {
-        if (pPriv->prime_slave_pixmap->master_pixmap == mpix)
-            return &pPriv->prime_slave_pixmap->drawable;
+    if (pPriv->prime_secondary_pixmap) {
+        if (pPriv->prime_secondary_pixmap->primary_pixmap == mpix)
+            return &pPriv->prime_secondary_pixmap->drawable;
         else {
-            PixmapUnshareSlavePixmap(pPriv->prime_slave_pixmap);
-            (*pPriv->prime_slave_pixmap->master_pixmap->drawable.pScreen->DestroyPixmap)(pPriv->prime_slave_pixmap->master_pixmap);
-            (*slave->DestroyPixmap)(pPriv->prime_slave_pixmap);
-            pPriv->prime_slave_pixmap = NULL;
+            PixmapUnshareSecondaryPixmap(pPriv->prime_secondary_pixmap);
+            (*pPriv->prime_secondary_pixmap->primary_pixmap->drawable.pScreen->DestroyPixmap)(pPriv->prime_secondary_pixmap->primary_pixmap);
+            (*secondary->DestroyPixmap)(pPriv->prime_secondary_pixmap);
+            pPriv->prime_secondary_pixmap = NULL;
         }
     }
 
-    spix = PixmapShareToSlave(mpix, slave);
+    spix = PixmapShareToSecondary(mpix, secondary);
     if (!spix)
         return NULL;
 
-    pPriv->prime_slave_pixmap = spix;
+    pPriv->prime_secondary_pixmap = spix;
 #ifdef COMPOSITE
     spix->screen_x = mpix->screen_x;
     spix->screen_y = mpix->screen_y;
@@ -1508,12 +1506,6 @@ DRI2ScreenInit(ScreenPtr pScreen, DRI2InfoPtr info)
     if (info->version < 3)
         return FALSE;
 
-    if (!xf86VGAarbiterAllowDRI(pScreen)) {
-        xf86DrvMsg(pScreen->myNum, X_WARNING,
-                   "[DRI2] Direct rendering is not supported when VGA arb is necessary for the device\n");
-        return FALSE;
-    }
-
     if (!dixRegisterPrivateKey(&dri2ScreenPrivateKeyRec, PRIVATE_SCREEN, 0))
         return FALSE;
 
@@ -1610,9 +1602,16 @@ DRI2ScreenInit(ScreenPtr pScreen, DRI2InfoPtr info)
         if (info->driverName) {
             ds->driverNames[0] = info->driverName;
         } else {
+            /* FIXME dri2_probe_driver_name() returns a strdup-ed string,
+             * currently this gets leaked */
             ds->driverNames[0] = ds->driverNames[1] = dri2_probe_driver_name(pScreen, info);
             if (!ds->driverNames[0])
                 return FALSE;
+
+            /* There is no VDPAU driver for i965, fallback to the generic
+             * OpenGL/VAAPI va_gl backend to emulate VDPAU on i965. */
+            if (strcmp(ds->driverNames[0], "i965") == 0)
+                ds->driverNames[1] = "va_gl";
         }
     }
     else {
diff --git a/hw/xfree86/dri2/dri2.h b/hw/xfree86/dri2/dri2.h
index 1e7afdd..4c14b70 100644
--- a/hw/xfree86/dri2/dri2.h
+++ b/hw/xfree86/dri2/dri2.h
@@ -169,7 +169,7 @@ typedef void (*DRI2InvalidateProcPtr) (DrawablePtr pDraw, void *data, XID id);
  * support other swap_limits it has to implement supported limits with this
  * callback.
  *
- * \param pDraw drawable whos swap_limit is going to be changed
+ * \param pDraw drawable whose swap_limit is going to be changed
  * \param swap_limit new swap_limit that going to be set
  * \return TRUE if limit is support, FALSE if not.
  */
@@ -299,13 +299,13 @@ extern _X_EXPORT int DRI2CopyRegion(DrawablePtr pDraw,
  * the \c XF86ModuleData from a layered module, such a module will fail to
  * load (due to an unresolved symbol) if the DRI2 extension is not loaded.
  *
- * \param major  Location to store the major verion of the DRI2 extension
- * \param minor  Location to store the minor verion of the DRI2 extension
+ * \param major  Location to store the major version of the DRI2 extension
+ * \param minor  Location to store the minor version of the DRI2 extension
  *
  * \note
  * This interface was added some time after the initial release of the DRI2
  * module.  Layered modules that wish to use this interface must first test
- * its existance by calling \c xf86LoaderCheckSymbol.
+ * its existence by calling \c xf86LoaderCheckSymbol.
  */
 extern _X_EXPORT void DRI2Version(int *major, int *minor);
 
diff --git a/hw/xfree86/dri2/dri2ext.c b/hw/xfree86/dri2/dri2ext.c
index 529de75..4f98639 100644
--- a/hw/xfree86/dri2/dri2ext.c
+++ b/hw/xfree86/dri2/dri2ext.c
@@ -344,7 +344,7 @@ ProcDRI2CopyRegion(ClientPtr client)
     /* CopyRegion needs to be a round trip to make sure the X server
      * queues the swap buffer rendering commands before the DRI client
      * continues rendering.  The reply has a bitmask to signal the
-     * presense of optional return values as well, but we're not using
+     * presence of optional return values as well, but we're not using
      * that yet.
      */
 
diff --git a/hw/xfree86/dri2/pci_ids/Makefile.in b/hw/xfree86/dri2/pci_ids/Makefile.in
index 023e076..0a92ed0 100644
--- a/hw/xfree86/dri2/pci_ids/Makefile.in
+++ b/hw/xfree86/dri2/pci_ids/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -104,7 +104,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -147,8 +146,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -162,6 +159,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -180,14 +179,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -204,8 +195,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -261,6 +254,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -313,7 +308,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -337,29 +331,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -397,8 +375,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -409,14 +385,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -546,7 +516,6 @@ ctags CTAGS:
 
 cscope cscopelist:
 
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/hw/xfree86/dri2/pci_ids/i965_pci_ids.h b/hw/xfree86/dri2/pci_ids/i965_pci_ids.h
index 646df44..c4072e2 100644
--- a/hw/xfree86/dri2/pci_ids/i965_pci_ids.h
+++ b/hw/xfree86/dri2/pci_ids/i965_pci_ids.h
@@ -239,3 +239,14 @@ CHIPSET(0x4500, ehl_4x8, "Intel(R) HD Graphics (Elkhart Lake 4x8)")
 CHIPSET(0x4571, ehl_4x8, "Intel(R) HD Graphics (Elkhart Lake 4x8)")
 CHIPSET(0x4551, ehl_4x4, "Intel(R) HD Graphics (Elkhart Lake 4x4)")
 CHIPSET(0x4541, ehl_2x4, "Intel(R) HD Graphics (Elkhart Lake 2x4)")
+CHIPSET(0x9A40, tgl_1x6x16, "Intel(R) HD Graphics (Tigerlake 1x6x16 GT2)")
+CHIPSET(0x9A49, tgl_1x6x16, "Intel(R) HD Graphics (Tigerlake 1x6x16 GT2)")
+CHIPSET(0x9A59, tgl_1x6x16, "Intel(R) HD Graphics (Tigerlake 1x6x16 GT2)")
+CHIPSET(0x9A60, tgl_1x2x16, "Intel(R) HD Graphics (Tigerlake 1x2x16 GT1)")
+CHIPSET(0x9A68, tgl_1x2x16, "Intel(R) HD Graphics (Tigerlake 1x2x16 GT1)")
+CHIPSET(0x9A70, tgl_1x2x16, "Intel(R) HD Graphics (Tigerlake 1x2x16 GT1)")
+CHIPSET(0x9A78, tgl_1x2x16, "Intel(R) HD Graphics (Tigerlake 1x2x16 GT1)")
+CHIPSET(0x9AC0, tgl_1x2x16, "Intel(R) HD Graphics (Tigerlake 1x2x16 GT2)")
+CHIPSET(0x9AC9, tg1_1x2x16, "Intel(R) HD Graphics (Tigerlake 1x2x16 GT2)")
+CHIPSET(0x9AD9, tgl_1x2x16, "Intel(R) HD Graphics (Tigerlake 1x2x16 GT2)")
+CHIPSET(0x9AF8, tgl_1x2x16, "Intel(R) HD Graphics (Tigerlake 1X2X16 GT2)")
diff --git a/hw/xfree86/dri2/pci_ids/pci_id_driver_map.h b/hw/xfree86/dri2/pci_ids/pci_id_driver_map.h
index da7ea1c..04f3722 100644
--- a/hw/xfree86/dri2/pci_ids/pci_id_driver_map.h
+++ b/hw/xfree86/dri2/pci_ids/pci_id_driver_map.h
@@ -45,12 +45,6 @@ static const int r600_chip_ids[] = {
 #undef CHIPSET
 };
 
-static const int radeonsi_chip_ids[] = {
-#define CHIPSET(chip, name, family) chip,
-#include "pci_ids/radeonsi_pci_ids.h"
-#undef CHIPSET
-};
-
 static const int virtio_gpu_chip_ids[] = {
 #define CHIPSET(chip, name, family) chip,
 #include "pci_ids/virtio_gpu_pci_ids.h"
@@ -71,13 +65,14 @@ static const struct {
 } driver_map[] = {
    { 0x8086, "i915", i915_chip_ids, ARRAY_SIZE(i915_chip_ids) },
    { 0x8086, "i965", i965_chip_ids, ARRAY_SIZE(i965_chip_ids) },
+   { 0x8086, "i965", NULL, -1 },
 #ifndef DRIVER_MAP_GALLIUM_ONLY
    { 0x1002, "radeon", r100_chip_ids, ARRAY_SIZE(r100_chip_ids) },
    { 0x1002, "r200", r200_chip_ids, ARRAY_SIZE(r200_chip_ids) },
 #endif
    { 0x1002, "r300", r300_chip_ids, ARRAY_SIZE(r300_chip_ids) },
    { 0x1002, "r600", r600_chip_ids, ARRAY_SIZE(r600_chip_ids) },
-   { 0x1002, "radeonsi", radeonsi_chip_ids, ARRAY_SIZE(radeonsi_chip_ids) },
+   { 0x1002, "radeonsi", NULL, -1 },
    { 0x10de, "nouveau", NULL, -1 },
    { 0x1af4, "virtio_gpu", virtio_gpu_chip_ids, ARRAY_SIZE(virtio_gpu_chip_ids) },
    { 0x15ad, "vmwgfx", vmwgfx_chip_ids, ARRAY_SIZE(vmwgfx_chip_ids) },
diff --git a/hw/xfree86/drivers/Makefile.am b/hw/xfree86/drivers/Makefile.am
index 04d787f..954c9f1 100644
--- a/hw/xfree86/drivers/Makefile.am
+++ b/hw/xfree86/drivers/Makefile.am
@@ -3,3 +3,6 @@ SUBDIRS =
 if XORG_DRIVER_MODESETTING
 SUBDIRS += modesetting
 endif
+if XORG_DRIVER_INPUT_INPUTTEST
+SUBDIRS += inputtest
+endif
diff --git a/hw/xfree86/drivers/Makefile.in b/hw/xfree86/drivers/Makefile.in
index 474ce90..da786c9 100644
--- a/hw/xfree86/drivers/Makefile.in
+++ b/hw/xfree86/drivers/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -88,6 +88,7 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 @XORG_DRIVER_MODESETTING_TRUE@am__append_1 = modesetting
+@XORG_DRIVER_INPUT_INPUTTEST_TRUE@am__append_2 = inputtest
 subdir = hw/xfree86/drivers
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \
@@ -105,7 +106,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -161,9 +161,7 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
-DIST_SUBDIRS = modesetting
+DIST_SUBDIRS = modesetting inputtest
 am__DIST_COMMON = $(srcdir)/Makefile.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 am__relativize = \
@@ -208,8 +206,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -223,6 +219,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -241,14 +239,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -265,8 +255,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -322,6 +314,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -374,7 +368,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -398,29 +391,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -458,8 +435,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -470,14 +445,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -550,7 +519,7 @@ target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-SUBDIRS = $(am__append_1)
+SUBDIRS = $(am__append_1) $(am__append_2)
 all: all-recursive
 
 .SUFFIXES:
@@ -688,7 +657,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/hw/xfree86/drivers/inputtest/Makefile.am b/hw/xfree86/drivers/inputtest/Makefile.am
new file mode 100644
index 0000000..f6210aa
--- /dev/null
+++ b/hw/xfree86/drivers/inputtest/Makefile.am
@@ -0,0 +1,48 @@
+#  Copyright 2005 Adam Jackson.
+#
+#  Permission is hereby granted, free of charge, to any person obtaining a
+#  copy of this software and associated documentation files (the "Software"),
+#  to deal in the Software without restriction, including without limitation
+#  on the rights to use, copy, modify, merge, publish, distribute, sub
+#  license, and/or sell copies of the Software, and to permit persons to whom
+#  the Software is furnished to do so, subject to the following conditions:
+#
+#  The above copyright notice and this permission notice (including the next
+#  paragraph) shall be included in all copies or substantial portions of the
+#  Software.
+#
+#  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+#  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+#  FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.  IN NO EVENT SHALL
+#  ADAM JACKSON BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+#  IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+#  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+# this is obnoxious:
+# -module lets us name the module exactly how we want
+# -avoid-version prevents gratuitous .0.0.0 version numbers on the end
+# _ladir passes a dummy rpath to libtool so the thing will actually link
+# TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc.
+
+include $(top_srcdir)/manpages.am
+
+AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) $(CWARNFLAGS)
+
+AM_CPPFLAGS = $(XORG_INCS)
+
+inputtest_drv_la_LTLIBRARIES = inputtest_drv.la
+inputtest_drv_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG)
+inputtest_drv_ladir = @moduledir@/input
+
+inputtest_drv_la_SOURCES = xf86-input-inputtest.c xf86-input-inputtest-protocol.h
+
+sdk_HEADERS = xf86-input-inputtest-protocol.h
+
+drivermandir = $(DRIVER_MAN_DIR)
+driverman_PRE = inputtestdrv.man
+driverman_DATA = $(driverman_PRE:man=@DRIVER_MAN_SUFFIX@)
+
+EXTRA_DIST = inputtestdrv.man
+
+CLEANFILES = $(driverman_DATA)
+
diff --git a/hw/xfree86/vbe/Makefile.in b/hw/xfree86/drivers/inputtest/Makefile.in
similarity index 70%
rename from hw/xfree86/vbe/Makefile.in
rename to hw/xfree86/drivers/inputtest/Makefile.in
index a74bedb..a211cfc 100644
--- a/hw/xfree86/vbe/Makefile.in
+++ b/hw/xfree86/drivers/inputtest/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -14,6 +14,33 @@
 
 @SET_MAKE@
 
+#  Copyright 2005 Adam Jackson.
+#
+#  Permission is hereby granted, free of charge, to any person obtaining a
+#  copy of this software and associated documentation files (the "Software"),
+#  to deal in the Software without restriction, including without limitation
+#  on the rights to use, copy, modify, merge, publish, distribute, sub
+#  license, and/or sell copies of the Software, and to permit persons to whom
+#  the Software is furnished to do so, subject to the following conditions:
+#
+#  The above copyright notice and this permission notice (including the next
+#  paragraph) shall be included in all copies or substantial portions of the
+#  Software.
+#
+#  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+#  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+#  FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.  IN NO EVENT SHALL
+#  ADAM JACKSON BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+#  IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+#  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+# this is obnoxious:
+# -module lets us name the module exactly how we want
+# -avoid-version prevents gratuitous .0.0.0 version numbers on the end
+# _ladir passes a dummy rpath to libtool so the thing will actually link
+# TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc.
+
+
 
 VPATH = @srcdir@
 am__is_gnu_make = { \
@@ -89,7 +116,7 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
-subdir = hw/xfree86/vbe
+subdir = hw/xfree86/drivers/inputtest
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \
 	$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \
@@ -106,7 +133,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -137,18 +163,21 @@ am__uninstall_files_from_dir = { \
     || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
          $(am__cd) "$$dir" && rm -f $$files; }; \
   }
-am__installdirs = "$(DESTDIR)$(moduledir)" "$(DESTDIR)$(sdkdir)"
-LTLIBRARIES = $(module_LTLIBRARIES)
-@NO_UNDEFINED_TRUE@libvbe_la_DEPENDENCIES = ../int10/libint10.la
-am_libvbe_la_OBJECTS = vbe.lo vbeModes.lo vbe_module.lo
-libvbe_la_OBJECTS = $(am_libvbe_la_OBJECTS)
+am__installdirs = "$(DESTDIR)$(inputtest_drv_ladir)" \
+	"$(DESTDIR)$(appmandir)" "$(DESTDIR)$(drivermandir)" \
+	"$(DESTDIR)$(filemandir)" "$(DESTDIR)$(sdkdir)"
+LTLIBRARIES = $(inputtest_drv_la_LTLIBRARIES)
+inputtest_drv_la_LIBADD =
+am_inputtest_drv_la_OBJECTS = xf86-input-inputtest.lo
+inputtest_drv_la_OBJECTS = $(am_inputtest_drv_la_OBJECTS)
 AM_V_lt = $(am__v_lt_@AM_V@)
 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
 am__v_lt_0 = --silent
 am__v_lt_1 = 
-libvbe_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-	$(libvbe_la_LDFLAGS) $(LDFLAGS) -o $@
+inputtest_drv_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+	$(AM_CFLAGS) $(CFLAGS) $(inputtest_drv_la_LDFLAGS) $(LDFLAGS) \
+	-o $@
 AM_V_P = $(am__v_P_@AM_V@)
 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
 am__v_P_0 = false
@@ -164,8 +193,7 @@ am__v_at_1 =
 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__maybe_remake_depfiles = depfiles
-am__depfiles_remade = ./$(DEPDIR)/vbe.Plo ./$(DEPDIR)/vbeModes.Plo \
-	./$(DEPDIR)/vbe_module.Plo
+am__depfiles_remade = ./$(DEPDIR)/xf86-input-inputtest.Plo
 am__mv = mv -f
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@@ -185,13 +213,14 @@ AM_V_CCLD = $(am__v_CCLD_@AM_V@)
 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
 am__v_CCLD_0 = @echo "  CCLD    " $@;
 am__v_CCLD_1 = 
-SOURCES = $(libvbe_la_SOURCES)
-DIST_SOURCES = $(libvbe_la_SOURCES)
+SOURCES = $(inputtest_drv_la_SOURCES)
+DIST_SOURCES = $(inputtest_drv_la_SOURCES)
 am__can_run_installinfo = \
   case $$AM_UPDATE_INFO_DIR in \
     n|no|NO) false;; \
     *) (install-info --version) >/dev/null 2>&1;; \
   esac
+DATA = $(appman_DATA) $(driverman_DATA) $(fileman_DATA)
 HEADERS = $(sdk_HEADERS)
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
 # Read a list of newline-separated strings from the standard input,
@@ -210,9 +239,8 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
-am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \
+	$(top_srcdir)/manpages.am
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
@@ -231,8 +259,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -246,6 +272,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -264,14 +292,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -288,8 +308,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -345,6 +367,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -354,7 +378,38 @@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
 MAIN_LIB = @MAIN_LIB@
 MAKEINFO = @MAKEINFO@
 MANIFEST_TOOL = @MANIFEST_TOOL@
-MAN_SUBSTS = @MAN_SUBSTS@
+
+# xorg-macros.m4 has these bracketed by double underscores, but meson
+# wants ats.
+
+# Add server specific man pages string substitution from XORG_MANPAGE_SECTIONS
+# 's|/,|/, |g' will add a space to help font path formatting
+MAN_SUBSTS = @MAN_SUBSTS@ -e 's|@vendorversion@|"$(PACKAGE_STRING)" \
+	"$(XORG_MAN_PAGE)"|' -e 's|@xorgversion@|"$(PACKAGE_STRING)" \
+	"$(XORG_MAN_PAGE)"|' -e 's|@xservername@|Xorg|g' -e \
+	's|@xconfigfile@|xorg.conf|g' -e 's|@projectroot@|$(prefix)|g' \
+	-e 's|@apploaddir@|$(appdefaultdir)|g' -e \
+	's|@appmansuffix@|$(APP_MAN_SUFFIX)|g' -e \
+	's|@drivermansuffix@|$(DRIVER_MAN_SUFFIX)|g' -e \
+	's|@adminmansuffix@|$(ADMIN_MAN_SUFFIX)|g' -e \
+	's|@libmansuffix@|$(LIB_MAN_SUFFIX)|g' -e \
+	's|@miscmansuffix@|$(MISC_MAN_SUFFIX)|g' -e \
+	's|@filemansuffix@|$(FILE_MAN_SUFFIX)|g' -e \
+	's|[@]logdir[@]|$(logdir)|g' -e 's|[@]datadir[@]|$(datadir)|g' \
+	-e 's|[@]mandir[@]|$(mandir)|g' -e \
+	's|[@]sysconfdir[@]|$(sysconfdir)|g' -e \
+	's|[@]xconfigdir[@]|$(XCONFIGDIR)|g' -e \
+	's|[@]xkbdir[@]|$(XKB_BASE_DIRECTORY)|g' -e \
+	's|[@]XKB_DFLT_RULES[@]|$(XKB_DFLT_RULES)|g' -e \
+	's|[@]XKB_DFLT_MODEL[@]|$(XKB_DFLT_MODEL)|g' -e \
+	's|[@]XKB_DFLT_LAYOUT[@]|$(XKB_DFLT_LAYOUT)|g' -e \
+	's|[@]XKB_DFLT_VARIANT[@]|$(XKB_DFLT_VARIANT)|g' -e \
+	's|[@]XKB_DFLT_OPTIONS[@]|$(XKB_DFLT_OPTIONS)|g' -e \
+	's|[@]bundle_id_prefix[@]|$(BUNDLE_ID_PREFIX)|g' -e \
+	's|[@]modulepath[@]|$(DEFAULT_MODULE_PATH)|g' -e \
+	's|[@]suid_wrapper_dir[@]|$(SUID_WRAPPER_DIR)|g' -e \
+	's|[@]default_font_path[@]|$(COMPILEDDEFAULTFONTPATH)|g' -e \
+	'\|$(COMPILEDDEFAULTFONTPATH)| s|/,|/, |g'
 MISC_MAN_DIR = @MISC_MAN_DIR@
 MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
 MKDIR_P = @MKDIR_P@
@@ -397,7 +452,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -421,29 +475,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -481,8 +519,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -493,14 +529,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -573,21 +603,30 @@ target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-module_LTLIBRARIES = libvbe.la
-libvbe_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG)
-libvbe_la_SOURCES = vbe.c vbeModes.c vbe_module.c
-@NO_UNDEFINED_TRUE@libvbe_la_LIBADD = ../int10/libint10.la
-sdk_HEADERS = vbe.h vbeModes.h
-AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS)
-AM_CPPFLAGS = $(XORG_INCS) -I$(srcdir)/../ddc -I$(srcdir)/../i2c \
-           -I$(srcdir)/../modes -I$(srcdir)/../parser \
-           -I$(srcdir)/../int10
-
+appmandir = $(APP_MAN_DIR)
+#appman_PRE = list of application man page files set by calling Makefile.am
+appman_DATA = $(appman_PRE:man=$(APP_MAN_SUFFIX))
+drivermandir = $(DRIVER_MAN_DIR)
+driverman_DATA = $(driverman_PRE:man=@DRIVER_MAN_SUFFIX@)
+filemandir = $(FILE_MAN_DIR)
+#fileman_PRE = list of file man page files set by calling Makefile.am
+fileman_DATA = $(fileman_PRE:man=$(FILE_MAN_SUFFIX))
+EXTRA_DIST = inputtestdrv.man
+CLEANFILES = $(driverman_DATA)
+SUFFIXES = .$(APP_MAN_SUFFIX) .$(DRIVER_MAN_SUFFIX) .$(FILE_MAN_SUFFIX) .man
+AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) $(CWARNFLAGS)
+AM_CPPFLAGS = $(XORG_INCS)
+inputtest_drv_la_LTLIBRARIES = inputtest_drv.la
+inputtest_drv_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG)
+inputtest_drv_ladir = @moduledir@/input
+inputtest_drv_la_SOURCES = xf86-input-inputtest.c xf86-input-inputtest-protocol.h
+sdk_HEADERS = xf86-input-inputtest-protocol.h
+driverman_PRE = inputtestdrv.man
 all: all-am
 
 .SUFFIXES:
-.SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+.SUFFIXES: .$(APP_MAN_SUFFIX) .$(DRIVER_MAN_SUFFIX) .$(FILE_MAN_SUFFIX) .man .c .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(top_srcdir)/manpages.am $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
 	    *$$dep*) \
@@ -596,9 +635,9 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xfree86/vbe/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xfree86/drivers/inputtest/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --foreign hw/xfree86/vbe/Makefile
+	  $(AUTOMAKE) --foreign hw/xfree86/drivers/inputtest/Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -607,6 +646,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
 	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
 	esac;
+$(top_srcdir)/manpages.am $(am__empty):
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
@@ -617,33 +657,33 @@ $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(am__aclocal_m4_deps):
 
-install-moduleLTLIBRARIES: $(module_LTLIBRARIES)
+install-inputtest_drv_laLTLIBRARIES: $(inputtest_drv_la_LTLIBRARIES)
 	@$(NORMAL_INSTALL)
-	@list='$(module_LTLIBRARIES)'; test -n "$(moduledir)" || list=; \
+	@list='$(inputtest_drv_la_LTLIBRARIES)'; test -n "$(inputtest_drv_ladir)" || list=; \
 	list2=; for p in $$list; do \
 	  if test -f $$p; then \
 	    list2="$$list2 $$p"; \
 	  else :; fi; \
 	done; \
 	test -z "$$list2" || { \
-	  echo " $(MKDIR_P) '$(DESTDIR)$(moduledir)'"; \
-	  $(MKDIR_P) "$(DESTDIR)$(moduledir)" || exit 1; \
-	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(moduledir)'"; \
-	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(moduledir)"; \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(inputtest_drv_ladir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(inputtest_drv_ladir)" || exit 1; \
+	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(inputtest_drv_ladir)'"; \
+	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(inputtest_drv_ladir)"; \
 	}
 
-uninstall-moduleLTLIBRARIES:
+uninstall-inputtest_drv_laLTLIBRARIES:
 	@$(NORMAL_UNINSTALL)
-	@list='$(module_LTLIBRARIES)'; test -n "$(moduledir)" || list=; \
+	@list='$(inputtest_drv_la_LTLIBRARIES)'; test -n "$(inputtest_drv_ladir)" || list=; \
 	for p in $$list; do \
 	  $(am__strip_dir) \
-	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(moduledir)/$$f'"; \
-	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(moduledir)/$$f"; \
+	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(inputtest_drv_ladir)/$$f'"; \
+	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(inputtest_drv_ladir)/$$f"; \
 	done
 
-clean-moduleLTLIBRARIES:
-	-test -z "$(module_LTLIBRARIES)" || rm -f $(module_LTLIBRARIES)
-	@list='$(module_LTLIBRARIES)'; \
+clean-inputtest_drv_laLTLIBRARIES:
+	-test -z "$(inputtest_drv_la_LTLIBRARIES)" || rm -f $(inputtest_drv_la_LTLIBRARIES)
+	@list='$(inputtest_drv_la_LTLIBRARIES)'; \
 	locs=`for p in $$list; do echo $$p; done | \
 	      sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
 	      sort -u`; \
@@ -652,8 +692,8 @@ clean-moduleLTLIBRARIES:
 	  rm -f $${locs}; \
 	}
 
-libvbe.la: $(libvbe_la_OBJECTS) $(libvbe_la_DEPENDENCIES) $(EXTRA_libvbe_la_DEPENDENCIES) 
-	$(AM_V_CCLD)$(libvbe_la_LINK) -rpath $(moduledir) $(libvbe_la_OBJECTS) $(libvbe_la_LIBADD) $(LIBS)
+inputtest_drv.la: $(inputtest_drv_la_OBJECTS) $(inputtest_drv_la_DEPENDENCIES) $(EXTRA_inputtest_drv_la_DEPENDENCIES) 
+	$(AM_V_CCLD)$(inputtest_drv_la_LINK) -rpath $(inputtest_drv_ladir) $(inputtest_drv_la_OBJECTS) $(inputtest_drv_la_LIBADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -661,9 +701,7 @@ mostlyclean-compile:
 distclean-compile:
 	-rm -f *.tab.c
 
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vbe.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vbeModes.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vbe_module.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86-input-inputtest.Plo@am__quote@ # am--include-marker
 
 $(am__depfiles_remade):
 	@$(MKDIR_P) $(@D)
@@ -697,6 +735,69 @@ mostlyclean-libtool:
 
 clean-libtool:
 	-rm -rf .libs _libs
+install-appmanDATA: $(appman_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(appmandir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(appmandir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(appmandir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(appmandir)" || exit $$?; \
+	done
+
+uninstall-appmanDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(appmandir)'; $(am__uninstall_files_from_dir)
+install-drivermanDATA: $(driverman_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(driverman_DATA)'; test -n "$(drivermandir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(drivermandir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(drivermandir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(drivermandir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(drivermandir)" || exit $$?; \
+	done
+
+uninstall-drivermanDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(driverman_DATA)'; test -n "$(drivermandir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(drivermandir)'; $(am__uninstall_files_from_dir)
+install-filemanDATA: $(fileman_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(fileman_DATA)'; test -n "$(filemandir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(filemandir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(filemandir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(filemandir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(filemandir)" || exit $$?; \
+	done
+
+uninstall-filemanDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(fileman_DATA)'; test -n "$(filemandir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(filemandir)'; $(am__uninstall_files_from_dir)
 install-sdkHEADERS: $(sdk_HEADERS)
 	@$(NORMAL_INSTALL)
 	@list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \
@@ -770,7 +871,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
@@ -806,9 +906,9 @@ distdir-am: $(DISTFILES)
 	done
 check-am: all-am
 check: check-am
-all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS)
 installdirs:
-	for dir in "$(DESTDIR)$(moduledir)" "$(DESTDIR)$(sdkdir)"; do \
+	for dir in "$(DESTDIR)$(inputtest_drv_ladir)" "$(DESTDIR)$(appmandir)" "$(DESTDIR)$(drivermandir)" "$(DESTDIR)$(filemandir)" "$(DESTDIR)$(sdkdir)"; do \
 	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
 	done
 install: install-am
@@ -833,6 +933,7 @@ install-strip:
 mostlyclean-generic:
 
 clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
 
 distclean-generic:
 	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
@@ -843,13 +944,11 @@ maintainer-clean-generic:
 	@echo "it deletes files that may require special tools to rebuild."
 clean: clean-am
 
-clean-am: clean-generic clean-libtool clean-moduleLTLIBRARIES \
-	mostlyclean-am
+clean-am: clean-generic clean-inputtest_drv_laLTLIBRARIES \
+	clean-libtool mostlyclean-am
 
 distclean: distclean-am
-		-rm -f ./$(DEPDIR)/vbe.Plo
-	-rm -f ./$(DEPDIR)/vbeModes.Plo
-	-rm -f ./$(DEPDIR)/vbe_module.Plo
+		-rm -f ./$(DEPDIR)/xf86-input-inputtest.Plo
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
 	distclean-tags
@@ -866,7 +965,9 @@ info: info-am
 
 info-am:
 
-install-data-am: install-moduleLTLIBRARIES install-sdkHEADERS
+install-data-am: install-appmanDATA install-drivermanDATA \
+	install-filemanDATA install-inputtest_drv_laLTLIBRARIES \
+	install-sdkHEADERS
 
 install-dvi: install-dvi-am
 
@@ -895,9 +996,7 @@ install-ps-am:
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
-		-rm -f ./$(DEPDIR)/vbe.Plo
-	-rm -f ./$(DEPDIR)/vbeModes.Plo
-	-rm -f ./$(DEPDIR)/vbe_module.Plo
+		-rm -f ./$(DEPDIR)/xf86-input-inputtest.Plo
 	-rm -f Makefile
 maintainer-clean-am: distclean-am maintainer-clean-generic
 
@@ -914,29 +1013,41 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am: uninstall-moduleLTLIBRARIES uninstall-sdkHEADERS
+uninstall-am: uninstall-appmanDATA uninstall-drivermanDATA \
+	uninstall-filemanDATA uninstall-inputtest_drv_laLTLIBRARIES \
+	uninstall-sdkHEADERS
 
 .MAKE: install-am install-strip
 
 .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
-	clean-generic clean-libtool clean-moduleLTLIBRARIES \
+	clean-generic clean-inputtest_drv_laLTLIBRARIES clean-libtool \
 	cscopelist-am ctags ctags-am distclean distclean-compile \
 	distclean-generic distclean-libtool distclean-tags distdir dvi \
 	dvi-am html html-am info info-am install install-am \
-	install-data install-data-am install-dvi install-dvi-am \
-	install-exec install-exec-am install-html install-html-am \
-	install-info install-info-am install-man \
-	install-moduleLTLIBRARIES install-pdf install-pdf-am \
-	install-ps install-ps-am install-sdkHEADERS install-strip \
-	installcheck installcheck-am installdirs maintainer-clean \
-	maintainer-clean-generic mostlyclean mostlyclean-compile \
-	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-	tags tags-am uninstall uninstall-am \
-	uninstall-moduleLTLIBRARIES uninstall-sdkHEADERS
+	install-appmanDATA install-data install-data-am \
+	install-drivermanDATA install-dvi install-dvi-am install-exec \
+	install-exec-am install-filemanDATA install-html \
+	install-html-am install-info install-info-am \
+	install-inputtest_drv_laLTLIBRARIES install-man install-pdf \
+	install-pdf-am install-ps install-ps-am install-sdkHEADERS \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
+	uninstall-appmanDATA uninstall-drivermanDATA \
+	uninstall-filemanDATA uninstall-inputtest_drv_laLTLIBRARIES \
+	uninstall-sdkHEADERS
 
 .PRECIOUS: Makefile
 
 
+.man.$(APP_MAN_SUFFIX):
+	$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
+.man.$(DRIVER_MAN_SUFFIX):
+	$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
+.man.$(FILE_MAN_SUFFIX):
+	$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
+
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/hw/xfree86/drivers/inputtest/inputtestdrv.man b/hw/xfree86/drivers/inputtest/inputtestdrv.man
new file mode 100644
index 0000000..b0aa76d
--- /dev/null
+++ b/hw/xfree86/drivers/inputtest/inputtestdrv.man
@@ -0,0 +1,112 @@
+.\" shorthand for double quote that works everywhere.
+.ds q \N'34'
+.TH INPUTTEST @drivermansuffix@ @vendorversion@
+.SH NAME
+inputtest \- An X.Org input driver for testing
+.SH SYNOPSIS
+.nf
+.B "Section \*qInputDevice\*q"
+.BI "  Identifier \*q" devname \*q
+.B  "  Driver \*qinputtest\*q"
+.BI "  Option \*qSocketPath\*q   \*q" path \*q
+\ \ ...
+.B EndSection
+.fi
+
+.SH DESCRIPTION
+.B inputtest
+is an Xorg input driver that passes events received over a socket on to the
+server as input events. It supports the full set of the xf86 driver APIs
+exposed by Xorg. The primary use cases of this input driver are various
+integration tests that need to interface with the input subsystem.
+
+.SH CONFIGURATION DETAILS
+Please refer to @xconfigfile@(@filemansuffix@) for general configuration
+details and for options that can be used with all input drivers.  This
+section only covers configuration details specific to this driver.
+.PP
+External process can communicate with the input driver via a named socket that
+is created after the driver is initialized. The paths to the socket is passed
+via input driver options.
+.PP
+The following driver
+.B Options
+are supported:
+.TP 7
+.BI "Option \*qSocketPath\*q \*q" string \*q
+Sets the path where the driver will create a named socket. Any existing file
+at that location will be removed.
+.TP 7
+.BI "Option \*qDeviceType\*q \*q" string \*q
+Sets the type of the device to be emulated.
+.IP
+.BI Keyboard
+Initializes a keyboard device.
+.IP
+.BI Pointer
+Initializes a relative-mode pointer device. It will have four valuators -
+a "Rel X" valuator at axis 0 and a "Rel Y" valuator at axis 1.
+A horizontal scroll valuator will be set up at axis 2.
+A vertical scroll valuator will be set up at axis 3.
+.IP
+.BI PointerAbsolute
+Initializes an absolute-mode pointer device. It will have four valuators -
+an "Abs X" valuator at axis 0 and an "Abs Y" valuator at axis 1.
+A horizontal scroll valuator will be set up at axis 2.
+A vertical scroll valuator will be set up at axis 3.
+.IP
+.BI PointerAbsoluteProximity
+Initializes an absolute-mode pointer device with proximity support.
+The valuators are initialized in the same way as for \fBPointerAbsolute\fR type.
+.IP
+.BI Touch
+Initializes a touch device.
+It will have 5 valuators: an "Abs MT Position X" at axis 0,
+an "Abs MT Position Y" valuator at axis 1,
+a horizontal scroll valuator on axis 2,
+a vertical scroll valuator on axis 3 and an "Abs MT Pressure" valuator
+at axis 4.
+.TP 7
+.BI "Option \*qTouchCount\*q \*q" int \*q
+Sets the maximum number of simultaneous touches for touch devices.
+.TP 7
+.BI "Option \*qPointerButtonCount\*q \*q" int \*q
+Sets the maximum number of buttons in pointer devices.
+.TP 7
+.BI "Option \*qPointerHasPressure\*q \*q" bool \*q
+Selects whether "Abs Pressure" is available at the axis 4 in pointer devices.
+
+.SH INTERFACE WITH THE DRIVER
+The communication with the driver is a binary protocol defined in
+include/xf86-input-inputtest-protocol.h
+.PP
+At the beginning, the client process that communicates with the driver must
+connect to the socket that is created by the driver at SocketPath.
+Once the connection is established, it must write a xf86ITEventClientVersion
+event and read a xf86ITResponseServerVersion response where the driver
+specifies the protocol version supported by it. If this version is lower than
+requested by the client, then the driver will disconnect.
+.PP
+After receiving xf86ITResponseServerVersion message the client may send events
+to the driver. Each event is an instance of one of the
+.BI xf86ITEvent*
+structs. The length field defines the full length of the struct in bytes and
+the event field defines the type of the struct.
+.PP
+The responses from the server follow the same structure. Each response is an
+instance of one of the
+.BI xf86ITResponse*
+structs. The length field defines the full length of the struct in bytes and
+the event field defines the type of the struct.
+.PP
+The synchronization with Xorg is performed via
+.BI xf86ITEventWaitForSync
+event. After sending such event, the client must read of a
+.BI xf86ITResponseSyncFinished event from the socket without sending additional
+events. The completion of the read operation indicates that Xorg has fully
+processed all input events sent to it so far.
+
+.SH AUTHORS
+Povilas Kanapickas <povilas@radix.lt>
+.SH "SEE ALSO"
+@xservername@(@appmansuffix@), @xconfigfile@(@filemansuffix@), Xserver(@appmansuffix@), X(@miscmansuffix@)
diff --git a/hw/xfree86/drivers/inputtest/meson.build b/hw/xfree86/drivers/inputtest/meson.build
new file mode 100644
index 0000000..fa642c8
--- /dev/null
+++ b/hw/xfree86/drivers/inputtest/meson.build
@@ -0,0 +1,26 @@
+inputtestdrv_srcs = [
+    'xf86-input-inputtest.c',
+]
+
+shared_module(
+    'inputtest_drv',
+    inputtestdrv_srcs,
+    name_prefix: '',
+
+    include_directories: [inc, xorg_inc],
+    c_args: xorg_c_args,
+    dependencies: [common_dep],
+
+    install: true,
+    install_dir: join_paths(module_dir, 'input'),
+
+    link_with: e,
+)
+
+install_man(configure_file(
+    input: 'inputtestdrv.man',
+    output: 'inputtestdrv.4',
+    configuration: manpage_config,
+))
+
+install_data('xf86-input-inputtest-protocol.h', install_dir: xorgsdkdir)
diff --git a/hw/xfree86/drivers/inputtest/xf86-input-inputtest-protocol.h b/hw/xfree86/drivers/inputtest/xf86-input-inputtest-protocol.h
new file mode 100644
index 0000000..46837f3
--- /dev/null
+++ b/hw/xfree86/drivers/inputtest/xf86-input-inputtest-protocol.h
@@ -0,0 +1,172 @@
+/*
+ * Copyright © 2020 Povilas Kanapickas <povilas@radix.lt>
+ *
+ * Permission to use, copy, modify, distribute, and sell this software
+ * and its documentation for any purpose is hereby granted without
+ * fee, provided that the above copyright notice appear in all copies
+ * and that both that copyright notice and this permission notice
+ * appear in supporting documentation, and that the name of Red Hat
+ * not be used in advertising or publicity pertaining to distribution
+ * of the software without specific, written prior permission.  Red
+ * Hat makes no representations about the suitability of this software
+ * for any purpose.  It is provided "as is" without express or implied
+ * warranty.
+ *
+ * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
+ * NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef XF86_INPUT_INPUTTEST_PROTOCOL_H_
+#define XF86_INPUT_INPUTTEST_PROTOCOL_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <stdint.h>
+
+#define XF86IT_PROTOCOL_VERSION_MAJOR 1
+#define XF86IT_PROTOCOL_VERSION_MINOR 1
+
+enum xf86ITResponseType {
+    XF86IT_RESPONSE_SERVER_VERSION,
+    XF86IT_RESPONSE_SYNC_FINISHED,
+};
+
+typedef struct {
+    uint32_t length; /* length of the whole event in bytes, including the header */
+    enum xf86ITResponseType type;
+} xf86ITResponseHeader;
+
+typedef struct {
+    xf86ITResponseHeader header;
+    uint16_t major;
+    uint16_t minor;
+} xf86ITResponseServerVersion;
+
+typedef struct {
+    xf86ITResponseHeader header;
+} xf86ITResponseSyncFinished;
+
+typedef union {
+    xf86ITResponseHeader header;
+    xf86ITResponseServerVersion version;
+} xf86ITResponseAny;
+
+/* We care more about preserving the binary input driver protocol more than the
+   size of the messages, so hardcode a larger valuator count than the server has */
+#define XF86IT_MAX_VALUATORS 64
+
+enum xf86ITEventType {
+    XF86IT_EVENT_CLIENT_VERSION,
+    XF86IT_EVENT_WAIT_FOR_SYNC,
+    XF86IT_EVENT_MOTION,
+    XF86IT_EVENT_PROXIMITY,
+    XF86IT_EVENT_BUTTON,
+    XF86IT_EVENT_KEY,
+    XF86IT_EVENT_TOUCH,
+    XF86IT_EVENT_GESTURE_PINCH,
+    XF86IT_EVENT_GESTURE_SWIPE,
+};
+
+typedef struct {
+    uint32_t length; /* length of the whole event in bytes, including the header */
+    enum xf86ITEventType type;
+} xf86ITEventHeader;
+
+typedef struct {
+    uint32_t has_unaccelerated;
+    uint8_t mask[(XF86IT_MAX_VALUATORS + 7) / 8];
+    double valuators[XF86IT_MAX_VALUATORS];
+    double unaccelerated[XF86IT_MAX_VALUATORS];
+} xf86ITValuatorData;
+
+typedef struct {
+    xf86ITEventHeader header;
+    uint16_t major;
+    uint16_t minor;
+} xf86ITEventClientVersion;
+
+typedef struct {
+    xf86ITEventHeader header;
+} xf86ITEventWaitForSync;
+
+typedef struct {
+    xf86ITEventHeader header;
+    uint32_t is_absolute;
+    xf86ITValuatorData valuators;
+} xf86ITEventMotion;
+
+typedef struct {
+    xf86ITEventHeader header;
+    uint32_t is_prox_in;
+    xf86ITValuatorData valuators;
+} xf86ITEventProximity;
+
+typedef struct {
+    xf86ITEventHeader header;
+    int32_t is_absolute;
+    int32_t button;
+    uint32_t is_press;
+    xf86ITValuatorData valuators;
+} xf86ITEventButton;
+
+typedef struct {
+    xf86ITEventHeader header;
+    int32_t key_code;
+    uint32_t is_press;
+} xf86ITEventKey;
+
+typedef struct {
+    xf86ITEventHeader header;
+    uint32_t touchid;
+    uint32_t touch_type;
+    xf86ITValuatorData valuators;
+} xf86ITEventTouch;
+
+typedef struct {
+    xf86ITEventHeader header;
+    uint16_t gesture_type;
+    uint16_t num_touches;
+    uint32_t flags;
+    double delta_x;
+    double delta_y;
+    double delta_unaccel_x;
+    double delta_unaccel_y;
+    double scale;
+    double delta_angle;
+} xf86ITEventGesturePinch;
+
+typedef struct {
+    xf86ITEventHeader header;
+    uint16_t gesture_type;
+    uint16_t num_touches;
+    uint32_t flags;
+    double delta_x;
+    double delta_y;
+    double delta_unaccel_x;
+    double delta_unaccel_y;
+} xf86ITEventGestureSwipe;
+
+typedef union {
+    xf86ITEventHeader header;
+    xf86ITEventClientVersion version;
+    xf86ITEventMotion motion;
+    xf86ITEventProximity proximity;
+    xf86ITEventButton button;
+    xf86ITEventKey key;
+    xf86ITEventTouch touch;
+    xf86ITEventGesturePinch pinch;
+    xf86ITEventGestureSwipe swipe;
+} xf86ITEventAny;
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* XF86_INPUT_INPUTTEST_PROTOCOL_H_ */
diff --git a/hw/xfree86/drivers/inputtest/xf86-input-inputtest.c b/hw/xfree86/drivers/inputtest/xf86-input-inputtest.c
new file mode 100644
index 0000000..dd19f47
--- /dev/null
+++ b/hw/xfree86/drivers/inputtest/xf86-input-inputtest.c
@@ -0,0 +1,1135 @@
+/*
+ * Copyright © 2013-2017 Red Hat, Inc.
+ * Copyright © 2020 Povilas Kanapickas <povilas@radix.lt>
+ *
+ * Permission to use, copy, modify, distribute, and sell this software
+ * and its documentation for any purpose is hereby granted without
+ * fee, provided that the above copyright notice appear in all copies
+ * and that both that copyright notice and this permission notice
+ * appear in supporting documentation, and that the name of Red Hat
+ * not be used in advertising or publicity pertaining to distribution
+ * of the software without specific, written prior permission.  Red
+ * Hat makes no representations about the suitability of this software
+ * for any purpose.  It is provided "as is" without express or implied
+ * warranty.
+ *
+ * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
+ * NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+#include <errno.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <exevents.h>
+#include <input.h>
+#include <xkbsrv.h>
+#include <xf86.h>
+#include <xf86Xinput.h>
+#include "xorgVersion.h"
+#include <xserver-properties.h>
+#include <os.h>
+#include <X11/Xatom.h>
+
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/un.h>
+#include <stdbool.h>
+
+#include "xf86-input-inputtest-protocol.h"
+
+#define MAX_POINTER_NUM_AXES 5 /* x, y, hscroll, vscroll, [pressure] */
+#define MAX_TOUCH_NUM_AXES 5 /* x, y, hscroll, vscroll, pressure */
+#define TOUCH_MAX_SLOTS 15
+
+#define TOUCH_AXIS_MAX 0xffff
+#define TABLET_PRESSURE_AXIS_MAX 2047
+
+#define EVENT_BUFFER_SIZE 4096
+
+enum xf86ITDeviceType {
+    DEVICE_KEYBOARD = 1,
+    DEVICE_POINTER,
+    DEVICE_POINTER_GESTURE,
+    DEVICE_POINTER_ABS,
+    DEVICE_POINTER_ABS_PROXIMITY,
+    DEVICE_TOUCH,
+};
+
+enum xf86ITClientState {
+    CLIENT_STATE_NOT_CONNECTED = 0,
+
+    /* connection_fd is valid */
+    CLIENT_STATE_NEW,
+
+    /* connection_fd is valid and client_protocol.{major,minor} are set */
+    CLIENT_STATE_READY,
+};
+
+typedef struct {
+    InputInfoPtr pInfo;
+
+    int socket_fd;  /* for accepting new clients */
+    int connection_fd; /* current client connection */
+
+    char *socket_path;
+
+    enum xf86ITClientState client_state;
+    struct {
+        int major, minor;
+    } client_protocol;
+
+    struct {
+        char data[EVENT_BUFFER_SIZE];
+        int valid_length;
+    } buffer;
+
+    uint32_t device_type;
+
+    /*  last_processed_event_num == last_event_num and waiting_for_drain != 0 must never be true
+        both at the same time. This would mean that we are waiting for the input queue to be
+        processed, yet all events have already been processed, i.e. a deadlock.
+
+        waiting_for_drain_mutex protects concurrent access to waiting_for_drain variable which
+        may be modified from multiple threads.
+    */
+    pthread_mutex_t waiting_for_drain_mutex;
+    bool waiting_for_drain;
+    int last_processed_event_num;
+    int last_event_num;
+
+    ValuatorMask *valuators;
+    ValuatorMask *valuators_unaccelerated;
+} xf86ITDevice, *xf86ITDevicePtr;
+
+static void
+read_input_from_connection(InputInfoPtr pInfo);
+
+static Bool
+notify_sync_finished(ClientPtr ptr, void *closure)
+{
+    int fd = (int)(intptr_t) closure;
+    xf86ITResponseSyncFinished response;
+    response.header.length = sizeof(response);
+    response.header.type = XF86IT_RESPONSE_SYNC_FINISHED;
+
+    input_lock();
+    /*  we don't really care whether the write succeeds. It may fail if the device is
+        already shut down and the descriptor is closed.
+    */
+    if (write(fd, &response, response.header.length) != response.header.length) {
+        LogMessageVerbSigSafe(X_ERROR, 0,
+                              "inputtest: Failed to write sync response: %s\n",
+                              strerror(errno));
+    }
+    input_unlock();
+    return TRUE;
+}
+
+static void
+input_drain_callback(CallbackListPtr *callback, void *data, void *call_data)
+{
+    void *drain_write_closure;
+    InputInfoPtr pInfo = data;
+    xf86ITDevicePtr driver_data = pInfo->private;
+    bool notify_synchronization = false;
+
+    pthread_mutex_lock(&driver_data->waiting_for_drain_mutex);
+    driver_data->last_processed_event_num = driver_data->last_event_num;
+    if (driver_data->waiting_for_drain) {
+        driver_data->waiting_for_drain = false;
+        notify_synchronization = true;
+    }
+    pthread_mutex_unlock(&driver_data->waiting_for_drain_mutex);
+
+    if (notify_synchronization) {
+        drain_write_closure = (void*)(intptr_t) driver_data->connection_fd;
+        /* One input event may result in additional sets of events being submitted to the
+           input queue from the input processing code itself. This results in
+           input_drain_callback being called multiple times.
+
+           We therefore schedule a WorkProc (to be run when the server is no longer busy)
+           to notify the client when all current events have been processed.
+         */
+        xf86IDrvMsg(pInfo, X_DEBUG, "Synchronization finished\n");
+        QueueWorkProc(notify_sync_finished, NULL, drain_write_closure);
+    }
+}
+
+static void
+read_events(int fd, int ready, void *data)
+{
+    DeviceIntPtr dev = (DeviceIntPtr) data;
+    InputInfoPtr pInfo = dev->public.devicePrivate;
+    read_input_from_connection(pInfo);
+}
+
+static void
+try_accept_connection(int fd, int ready, void *data)
+{
+    DeviceIntPtr dev = (DeviceIntPtr) data;
+    InputInfoPtr pInfo = dev->public.devicePrivate;
+    xf86ITDevicePtr driver_data = pInfo->private;
+    int connection_fd;
+    int flags;
+
+    if (driver_data->connection_fd >= 0)
+        return;
+
+    connection_fd = accept(driver_data->socket_fd, NULL, NULL);
+    if (connection_fd < 0) {
+        if (errno == EAGAIN || errno == EWOULDBLOCK)
+            return;
+        xf86IDrvMsg(pInfo, X_ERROR, "Failed to accept a connection\n");
+        return;
+    }
+
+    xf86IDrvMsg(pInfo, X_DEBUG, "Accepted input control connection\n");
+
+    flags = fcntl(connection_fd, F_GETFL, 0);
+    fcntl(connection_fd, F_SETFL, flags | O_NONBLOCK);
+
+    driver_data->connection_fd = connection_fd;
+    xf86AddInputEventDrainCallback(input_drain_callback, pInfo);
+    SetNotifyFd(driver_data->connection_fd, read_events, X_NOTIFY_READ, dev);
+
+    driver_data->client_state = CLIENT_STATE_NEW;
+}
+
+static int
+device_on(DeviceIntPtr dev)
+{
+    InputInfoPtr pInfo = dev->public.devicePrivate;
+    xf86ITDevicePtr driver_data = pInfo->private;
+
+    xf86IDrvMsg(pInfo, X_DEBUG, "Device turned on\n");
+
+    xf86AddEnabledDevice(pInfo);
+    dev->public.on = TRUE;
+    driver_data->buffer.valid_length = 0;
+
+    try_accept_connection(-1, 0, dev);
+    if (driver_data->connection_fd < 0)
+        SetNotifyFd(driver_data->socket_fd, try_accept_connection, X_NOTIFY_READ, dev);
+
+    return Success;
+}
+
+static void
+teardown_client_connection(InputInfoPtr pInfo)
+{
+    xf86ITDevicePtr driver_data = pInfo->private;
+    if (driver_data->client_state != CLIENT_STATE_NOT_CONNECTED) {
+        RemoveNotifyFd(driver_data->connection_fd);
+        xf86RemoveInputEventDrainCallback(input_drain_callback, pInfo);
+
+        close(driver_data->connection_fd);
+        driver_data->connection_fd = -1;
+    }
+    RemoveNotifyFd(driver_data->socket_fd);
+    driver_data->client_state = CLIENT_STATE_NOT_CONNECTED;
+}
+
+static int
+device_off(DeviceIntPtr dev)
+{
+    InputInfoPtr pInfo = dev->public.devicePrivate;
+
+    xf86IDrvMsg(pInfo, X_DEBUG, "Device turned off\n");
+
+    if (dev->public.on) {
+        teardown_client_connection(pInfo);
+        xf86RemoveEnabledDevice(pInfo);
+    }
+    dev->public.on = FALSE;
+    return Success;
+}
+
+static void
+ptr_ctl(DeviceIntPtr dev, PtrCtrl *ctl)
+{
+}
+
+static void
+init_button_map(unsigned char *btnmap, size_t size)
+{
+    int i;
+
+    memset(btnmap, 0, size);
+    for (i = 0; i < size; i++)
+        btnmap[i] = i;
+}
+
+static void
+init_button_labels(Atom *labels, size_t size)
+{
+    assert(size > 10);
+
+    memset(labels, 0, size * sizeof(Atom));
+    labels[0] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_LEFT);
+    labels[1] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_MIDDLE);
+    labels[2] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_RIGHT);
+    labels[3] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_WHEEL_UP);
+    labels[4] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_WHEEL_DOWN);
+    labels[5] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_HWHEEL_LEFT);
+    labels[6] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_HWHEEL_RIGHT);
+    labels[7] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_SIDE);
+    labels[8] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_EXTRA);
+    labels[9] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_FORWARD);
+    labels[10] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_BACK);
+}
+
+static void
+init_pointer(InputInfoPtr pInfo)
+{
+    DeviceIntPtr dev= pInfo->dev;
+    int min, max, res;
+    int nbuttons = 7;
+    bool has_pressure = false;
+    int num_axes = 0;
+
+    unsigned char btnmap[MAX_BUTTONS + 1];
+    Atom btnlabels[MAX_BUTTONS];
+    Atom axislabels[MAX_POINTER_NUM_AXES];
+
+    nbuttons = xf86SetIntOption(pInfo->options, "PointerButtonCount", 7);
+    has_pressure = xf86SetBoolOption(pInfo->options, "PointerHasPressure",
+                                     false);
+
+    init_button_map(btnmap, ARRAY_SIZE(btnmap));
+    init_button_labels(btnlabels, ARRAY_SIZE(btnlabels));
+
+    axislabels[num_axes++] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_X);
+    axislabels[num_axes++] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_Y);
+    axislabels[num_axes++] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_HSCROLL);
+    axislabels[num_axes++] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_VSCROLL);
+    if (has_pressure)
+        axislabels[num_axes++] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_PRESSURE);
+
+    InitPointerDeviceStruct((DevicePtr)dev,
+                            btnmap,
+                            nbuttons,
+                            btnlabels,
+                            ptr_ctl,
+                            GetMotionHistorySize(),
+                            num_axes,
+                            axislabels);
+    min = -1;
+    max = -1;
+    res = 0;
+
+    xf86InitValuatorAxisStruct(dev, 0, XIGetKnownProperty(AXIS_LABEL_PROP_REL_X),
+                               min, max, res * 1000, 0, res * 1000, Relative);
+    xf86InitValuatorAxisStruct(dev, 1, XIGetKnownProperty(AXIS_LABEL_PROP_REL_Y),
+                               min, max, res * 1000, 0, res * 1000, Relative);
+
+    SetScrollValuator(dev, 2, SCROLL_TYPE_HORIZONTAL, 120, 0);
+    SetScrollValuator(dev, 3, SCROLL_TYPE_VERTICAL, 120, 0);
+
+    if (has_pressure) {
+        xf86InitValuatorAxisStruct(dev, 4,
+            XIGetKnownProperty(AXIS_LABEL_PROP_ABS_PRESSURE),
+            0, 1000, 1, 1, 1, Absolute);
+    }
+}
+
+static void
+init_pointer_absolute(InputInfoPtr pInfo)
+{
+    DeviceIntPtr dev = pInfo->dev;
+    int min, max, res;
+    int nbuttons = 7;
+    bool has_pressure = false;
+    int num_axes = 0;
+
+    unsigned char btnmap[MAX_BUTTONS + 1];
+    Atom btnlabels[MAX_BUTTONS];
+    Atom axislabels[MAX_POINTER_NUM_AXES];
+
+    nbuttons = xf86SetIntOption(pInfo->options, "PointerButtonCount", 7);
+    has_pressure = xf86SetBoolOption(pInfo->options, "PointerHasPressure",
+                                     false);
+
+    init_button_map(btnmap, ARRAY_SIZE(btnmap));
+    init_button_labels(btnlabels, ARRAY_SIZE(btnlabels));
+
+    axislabels[num_axes++] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_X);
+    axislabels[num_axes++] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_Y);
+    axislabels[num_axes++] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_HSCROLL);
+    axislabels[num_axes++] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_VSCROLL);
+    if (has_pressure)
+        axislabels[num_axes++] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_PRESSURE);
+
+    InitPointerDeviceStruct((DevicePtr)dev,
+                            btnmap,
+                            nbuttons,
+                            btnlabels,
+                            ptr_ctl,
+                            GetMotionHistorySize(),
+                            num_axes ,
+                            axislabels);
+    min = 0;
+    max = TOUCH_AXIS_MAX;
+    res = 0;
+
+    xf86InitValuatorAxisStruct(dev, 0, XIGetKnownProperty(AXIS_LABEL_PROP_ABS_X),
+                               min, max, res * 1000, 0, res * 1000, Absolute);
+    xf86InitValuatorAxisStruct(dev, 1, XIGetKnownProperty(AXIS_LABEL_PROP_ABS_Y),
+                               min, max, res * 1000, 0, res * 1000, Absolute);
+
+    SetScrollValuator(dev, 2, SCROLL_TYPE_HORIZONTAL, 120, 0);
+    SetScrollValuator(dev, 3, SCROLL_TYPE_VERTICAL, 120, 0);
+
+    if (has_pressure) {
+        xf86InitValuatorAxisStruct(dev, 4,
+            XIGetKnownProperty(AXIS_LABEL_PROP_ABS_PRESSURE),
+            0, 1000, 1, 1, 1, Absolute);
+    }
+}
+
+static void
+init_proximity(InputInfoPtr pInfo)
+{
+    DeviceIntPtr dev = pInfo->dev;
+    InitProximityClassDeviceStruct(dev);
+}
+
+static void
+init_keyboard(InputInfoPtr pInfo)
+{
+    DeviceIntPtr dev= pInfo->dev;
+    XkbRMLVOSet rmlvo = {0};
+    XkbRMLVOSet defaults = {0};
+
+    XkbGetRulesDflts(&defaults);
+
+    rmlvo.rules = xf86SetStrOption(pInfo->options, "xkb_rules", defaults.rules);
+    rmlvo.model = xf86SetStrOption(pInfo->options, "xkb_model", defaults.model);
+    rmlvo.layout = xf86SetStrOption(pInfo->options, "xkb_layout", defaults.layout);
+    rmlvo.variant = xf86SetStrOption(pInfo->options, "xkb_variant", defaults.variant);
+    rmlvo.options = xf86SetStrOption(pInfo->options, "xkb_options", defaults.options);
+
+    InitKeyboardDeviceStruct(dev, &rmlvo, NULL, NULL);
+    XkbFreeRMLVOSet(&rmlvo, FALSE);
+    XkbFreeRMLVOSet(&defaults, FALSE);
+}
+
+static void
+init_touch(InputInfoPtr pInfo)
+{
+    DeviceIntPtr dev = pInfo->dev;
+    int min, max, res;
+    unsigned char btnmap[MAX_BUTTONS + 1];
+    Atom btnlabels[MAX_BUTTONS];
+    Atom axislabels[MAX_TOUCH_NUM_AXES];
+    int num_axes = 0;
+    int nbuttons = 7;
+    int ntouches = TOUCH_MAX_SLOTS;
+
+    init_button_map(btnmap, ARRAY_SIZE(btnmap));
+    init_button_labels(btnlabels, ARRAY_SIZE(btnlabels));
+
+    axislabels[num_axes++] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_MT_POSITION_X);
+    axislabels[num_axes++] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_MT_POSITION_Y);
+    axislabels[num_axes++] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_HSCROLL);
+    axislabels[num_axes++] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_VSCROLL);
+    axislabels[num_axes++] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_MT_PRESSURE);
+
+    InitPointerDeviceStruct((DevicePtr)dev,
+                            btnmap,
+                            nbuttons,
+                            btnlabels,
+                            ptr_ctl,
+                            GetMotionHistorySize(),
+                            num_axes,
+                            axislabels);
+    min = 0;
+    max = TOUCH_AXIS_MAX;
+    res = 0;
+
+    xf86InitValuatorAxisStruct(dev, 0,
+                               XIGetKnownProperty(AXIS_LABEL_PROP_ABS_MT_POSITION_X),
+                               min, max, res * 1000, 0, res * 1000, Absolute);
+    xf86InitValuatorAxisStruct(dev, 1,
+                               XIGetKnownProperty(AXIS_LABEL_PROP_ABS_MT_POSITION_Y),
+                               min, max, res * 1000, 0, res * 1000, Absolute);
+
+    SetScrollValuator(dev, 2, SCROLL_TYPE_HORIZONTAL, 120, 0);
+    SetScrollValuator(dev, 3, SCROLL_TYPE_VERTICAL, 120, 0);
+
+    xf86InitValuatorAxisStruct(dev, 4,
+                               XIGetKnownProperty(AXIS_LABEL_PROP_ABS_MT_PRESSURE),
+                               min, TABLET_PRESSURE_AXIS_MAX, res * 1000, 0, res * 1000, Absolute);
+
+    ntouches = xf86SetIntOption(pInfo->options, "TouchCount", TOUCH_MAX_SLOTS);
+    if (ntouches == 0) /* unknown */
+        ntouches = TOUCH_MAX_SLOTS;
+    InitTouchClassDeviceStruct(dev, ntouches, XIDirectTouch, 2);
+}
+
+static void
+init_gesture(InputInfoPtr pInfo)
+{
+    DeviceIntPtr dev = pInfo->dev;
+    int ntouches = TOUCH_MAX_SLOTS;
+    InitGestureClassDeviceStruct(dev, ntouches);
+}
+
+static void
+device_init(DeviceIntPtr dev)
+{
+    InputInfoPtr pInfo = dev->public.devicePrivate;
+    xf86ITDevicePtr driver_data = pInfo->private;
+
+    dev->public.on = FALSE;
+
+    switch (driver_data->device_type) {
+        case DEVICE_KEYBOARD:
+            init_keyboard(pInfo);
+            break;
+        case DEVICE_POINTER:
+            init_pointer(pInfo);
+            break;
+        case DEVICE_POINTER_GESTURE:
+            init_pointer(pInfo);
+            init_gesture(pInfo);
+            break;
+        case DEVICE_POINTER_ABS:
+            init_pointer_absolute(pInfo);
+            break;
+        case DEVICE_POINTER_ABS_PROXIMITY:
+            init_pointer_absolute(pInfo);
+            init_proximity(pInfo);
+            break;
+        case DEVICE_TOUCH:
+            init_touch(pInfo);
+            break;
+    }
+}
+
+static void
+device_destroy(DeviceIntPtr dev)
+{
+    InputInfoPtr pInfo = dev->public.devicePrivate;
+    xf86IDrvMsg(pInfo, X_INFO, "Close\n");
+}
+
+static int
+device_control(DeviceIntPtr dev, int mode)
+{
+    switch (mode) {
+        case DEVICE_INIT:
+            device_init(dev);
+            break;
+        case DEVICE_ON:
+            device_on(dev);
+            break;
+        case DEVICE_OFF:
+            device_off(dev);
+            break;
+        case DEVICE_CLOSE:
+            device_destroy(dev);
+            break;
+    }
+
+    return Success;
+}
+
+static void
+convert_to_valuator_mask(xf86ITValuatorData *event, ValuatorMask *mask)
+{
+    valuator_mask_zero(mask);
+    for (int i = 0; i < min(XF86IT_MAX_VALUATORS, MAX_VALUATORS); ++i) {
+        if (BitIsOn(event->mask, i)) {
+            if (event->has_unaccelerated) {
+                valuator_mask_set_unaccelerated(mask, i, event->valuators[i],
+                                                event->unaccelerated[i]);
+            } else {
+                valuator_mask_set_double(mask, i, event->valuators[i]);
+            }
+        }
+    }
+}
+
+static void
+handle_client_version(InputInfoPtr pInfo, xf86ITEventClientVersion *event)
+{
+    xf86ITDevicePtr driver_data = pInfo->private;
+    xf86ITResponseServerVersion response;
+
+    response.header.length = sizeof(response);
+    response.header.type = XF86IT_RESPONSE_SERVER_VERSION;
+    response.major = XF86IT_PROTOCOL_VERSION_MAJOR;
+    response.minor = XF86IT_PROTOCOL_VERSION_MINOR;
+
+    if (write(driver_data->connection_fd, &response, response.header.length) != response.header.length) {
+        xf86IDrvMsg(pInfo, X_ERROR, "Error writing driver version: %s\n", strerror(errno));
+        teardown_client_connection(pInfo);
+        return;
+    }
+
+    if (event->major != XF86IT_PROTOCOL_VERSION_MAJOR ||
+        event->minor > XF86IT_PROTOCOL_VERSION_MINOR)
+    {
+        xf86IDrvMsg(pInfo, X_ERROR, "Unsupported protocol version: %d.%d (current %d.%d)\n",
+                    event->major, event->minor,
+                    XF86IT_PROTOCOL_VERSION_MAJOR,
+                    XF86IT_PROTOCOL_VERSION_MINOR);
+        teardown_client_connection(pInfo);
+        return;
+    }
+
+    driver_data->client_protocol.major = event->major;
+    driver_data->client_protocol.minor = event->minor;
+
+    driver_data->client_state = CLIENT_STATE_READY;
+}
+
+static void
+handle_wait_for_sync(InputInfoPtr pInfo)
+{
+    xf86ITDevicePtr driver_data = pInfo->private;
+    bool notify_synchronization = false;
+    void *drain_write_closure;
+
+    xf86IDrvMsg(pInfo, X_DEBUG, "Handling sync event\n");
+
+    pthread_mutex_lock(&driver_data->waiting_for_drain_mutex);
+    if (driver_data->last_processed_event_num == driver_data->last_event_num) {
+        notify_synchronization = true;
+    } else {
+        driver_data->waiting_for_drain = true;
+    }
+    pthread_mutex_unlock(&driver_data->waiting_for_drain_mutex);
+
+    if (notify_synchronization) {
+        drain_write_closure = (void*)(intptr_t) driver_data->connection_fd;
+        xf86IDrvMsg(pInfo, X_DEBUG, "Synchronization finished\n");
+        notify_sync_finished(NULL, drain_write_closure);
+    }
+}
+
+static void
+handle_motion(InputInfoPtr pInfo, xf86ITEventMotion *event)
+{
+    DeviceIntPtr dev = pInfo->dev;
+    xf86ITDevicePtr driver_data = pInfo->private;
+    ValuatorMask *mask = driver_data->valuators;
+
+    xf86IDrvMsg(pInfo, X_DEBUG, "Handling motion event\n");
+
+    driver_data->last_event_num++;
+
+    convert_to_valuator_mask(&event->valuators, mask);
+    xf86PostMotionEventM(dev, event->is_absolute ? Absolute : Relative, mask);
+}
+
+static void
+handle_proximity(InputInfoPtr pInfo, xf86ITEventProximity *event)
+{
+    DeviceIntPtr dev = pInfo->dev;
+    xf86ITDevicePtr driver_data = pInfo->private;
+    ValuatorMask *mask = driver_data->valuators;
+
+    xf86IDrvMsg(pInfo, X_DEBUG, "Handling proximity event\n");
+
+    driver_data->last_event_num++;
+
+    convert_to_valuator_mask(&event->valuators, mask);
+    xf86PostProximityEventM(dev, event->is_prox_in, mask);
+}
+
+static void
+handle_button(InputInfoPtr pInfo, xf86ITEventButton *event)
+{
+    DeviceIntPtr dev = pInfo->dev;
+    xf86ITDevicePtr driver_data = pInfo->private;
+    ValuatorMask *mask = driver_data->valuators;
+
+    xf86IDrvMsg(pInfo, X_DEBUG, "Handling button event\n");
+
+    driver_data->last_event_num++;
+
+    convert_to_valuator_mask(&event->valuators, mask);
+    xf86PostButtonEventM(dev, event->is_absolute ? Absolute : Relative, event->button,
+                         event->is_press, mask);
+}
+
+static void
+handle_key(InputInfoPtr pInfo, xf86ITEventKey *event)
+{
+    DeviceIntPtr dev = pInfo->dev;
+    xf86ITDevicePtr driver_data = pInfo->private;
+
+    xf86IDrvMsg(pInfo, X_DEBUG, "Handling key event\n");
+
+    driver_data->last_event_num++;
+
+    xf86PostKeyboardEvent(dev, event->key_code, event->is_press);
+}
+
+static void
+handle_touch(InputInfoPtr pInfo, xf86ITEventTouch *event)
+{
+    DeviceIntPtr dev = pInfo->dev;
+    xf86ITDevicePtr driver_data = pInfo->private;
+    ValuatorMask *mask = driver_data->valuators;
+
+    xf86IDrvMsg(pInfo, X_DEBUG, "Handling touch event\n");
+
+    driver_data->last_event_num++;
+
+    convert_to_valuator_mask(&event->valuators, mask);
+    xf86PostTouchEvent(dev, event->touchid, event->touch_type, 0, mask);
+}
+
+static void
+handle_gesture_swipe(InputInfoPtr pInfo, xf86ITEventGestureSwipe *event)
+{
+    DeviceIntPtr dev = pInfo->dev;
+    xf86ITDevicePtr driver_data = pInfo->private;
+
+    xf86IDrvMsg(pInfo, X_DEBUG, "Handling gesture swipe event\n");
+
+    driver_data->last_event_num++;
+
+    xf86PostGestureSwipeEvent(dev, event->gesture_type, event->num_touches, event->flags,
+                              event->delta_x, event->delta_y,
+                              event->delta_unaccel_x, event->delta_unaccel_y);
+}
+
+static void
+handle_gesture_pinch(InputInfoPtr pInfo, xf86ITEventGesturePinch *event)
+{
+    DeviceIntPtr dev = pInfo->dev;
+    xf86ITDevicePtr driver_data = pInfo->private;
+
+    xf86IDrvMsg(pInfo, X_DEBUG, "Handling gesture pinch event\n");
+
+    driver_data->last_event_num++;
+
+    xf86PostGesturePinchEvent(dev, event->gesture_type, event->num_touches, event->flags,
+                              event->delta_x, event->delta_y,
+                              event->delta_unaccel_x, event->delta_unaccel_y,
+                              event->scale, event->delta_angle);
+}
+
+static void
+client_new_handle_event(InputInfoPtr pInfo, xf86ITEventAny *event)
+{
+    switch (event->header.type) {
+        case XF86IT_EVENT_CLIENT_VERSION:
+            handle_client_version(pInfo, &event->version);
+            break;
+        default:
+            xf86IDrvMsg(pInfo, X_ERROR, "Event before client is ready: event type %d\n",
+                        event->header.type);
+            teardown_client_connection(pInfo);
+            break;
+    }
+}
+
+static void
+client_ready_handle_event(InputInfoPtr pInfo, xf86ITEventAny *event)
+{
+    switch (event->header.type) {
+        case XF86IT_EVENT_WAIT_FOR_SYNC:
+            handle_wait_for_sync(pInfo);
+            break;
+        case XF86IT_EVENT_MOTION:
+            handle_motion(pInfo, &event->motion);
+            break;
+        case XF86IT_EVENT_PROXIMITY:
+            handle_proximity(pInfo, &event->proximity);
+            break;
+        case XF86IT_EVENT_BUTTON:
+            handle_button(pInfo, &event->button);
+            break;
+        case XF86IT_EVENT_KEY:
+            handle_key(pInfo, &event->key);
+            break;
+        case XF86IT_EVENT_TOUCH:
+            handle_touch(pInfo, &event->touch);
+            break;
+        case XF86IT_EVENT_GESTURE_PINCH:
+            handle_gesture_pinch(pInfo, &(event->pinch));
+            break;
+        case XF86IT_EVENT_GESTURE_SWIPE:
+            handle_gesture_swipe(pInfo, &(event->swipe));
+            break;
+        case XF86IT_EVENT_CLIENT_VERSION:
+            xf86IDrvMsg(pInfo, X_ERROR, "Only single ClientVersion event is allowed\n");
+            teardown_client_connection(pInfo);
+            break;
+        default:
+            xf86IDrvMsg(pInfo, X_ERROR, "Invalid event when client is ready %d\n",
+                        event->header.type);
+            teardown_client_connection(pInfo);
+            break;
+    }
+}
+
+static void
+handle_event(InputInfoPtr pInfo, xf86ITEventAny *event)
+{
+    xf86ITDevicePtr driver_data = pInfo->private;
+
+    if (!pInfo->dev->public.on)
+        return;
+
+    switch (driver_data->client_state) {
+        case CLIENT_STATE_NOT_CONNECTED:
+            xf86IDrvMsg(pInfo, X_ERROR, "Got event when client is not connected\n");
+            break;
+        case CLIENT_STATE_NEW:
+            client_new_handle_event(pInfo, event);
+            break;
+        case CLIENT_STATE_READY:
+            client_ready_handle_event(pInfo, event);
+            break;
+    }
+}
+
+static bool
+is_supported_event(enum xf86ITEventType type)
+{
+    switch (type) {
+        case XF86IT_EVENT_CLIENT_VERSION:
+        case XF86IT_EVENT_WAIT_FOR_SYNC:
+        case XF86IT_EVENT_MOTION:
+        case XF86IT_EVENT_PROXIMITY:
+        case XF86IT_EVENT_BUTTON:
+        case XF86IT_EVENT_KEY:
+        case XF86IT_EVENT_TOUCH:
+        case XF86IT_EVENT_GESTURE_PINCH:
+        case XF86IT_EVENT_GESTURE_SWIPE:
+            return true;
+    }
+    return false;
+}
+
+static int
+get_event_size(enum xf86ITEventType type)
+{
+    switch (type) {
+        case XF86IT_EVENT_CLIENT_VERSION: return sizeof(xf86ITEventClientVersion);
+        case XF86IT_EVENT_WAIT_FOR_SYNC: return sizeof(xf86ITEventWaitForSync);
+        case XF86IT_EVENT_MOTION: return sizeof(xf86ITEventMotion);
+        case XF86IT_EVENT_PROXIMITY: return sizeof(xf86ITEventProximity);
+        case XF86IT_EVENT_BUTTON: return sizeof(xf86ITEventButton);
+        case XF86IT_EVENT_KEY: return sizeof(xf86ITEventKey);
+        case XF86IT_EVENT_TOUCH: return sizeof(xf86ITEventTouch);
+        case XF86IT_EVENT_GESTURE_PINCH: return sizeof(xf86ITEventGesturePinch);
+        case XF86IT_EVENT_GESTURE_SWIPE: return sizeof(xf86ITEventGestureSwipe);
+    }
+    abort();
+}
+
+static void
+read_input_from_connection(InputInfoPtr pInfo)
+{
+    xf86ITDevicePtr driver_data = pInfo->private;
+
+    while (1) {
+        int processed_size = 0;
+        int read_size = read(driver_data->connection_fd,
+                             driver_data->buffer.data + driver_data->buffer.valid_length,
+                             EVENT_BUFFER_SIZE - driver_data->buffer.valid_length);
+
+        if (read_size < 0) {
+            if (errno == EAGAIN || errno == EWOULDBLOCK)
+                return;
+
+            xf86IDrvMsg(pInfo, X_ERROR, "Error reading events: %s\n", strerror(errno));
+            teardown_client_connection(pInfo);
+            return;
+        }
+
+        driver_data->buffer.valid_length += read_size;
+
+        while (1) {
+            xf86ITEventHeader event_header;
+            char *event_begin = driver_data->buffer.data + processed_size;
+
+            if (driver_data->buffer.valid_length - processed_size < sizeof(xf86ITEventHeader))
+                break;
+
+            /* Note that event_begin pointer is not aligned, accessing it directly is
+               undefined behavior. We must use memcpy to copy the data to aligned data
+               area. Most compilers will optimize out this call out and use whatever
+               is most efficient to access unaligned data on a particular platform */
+            memcpy(&event_header, event_begin, sizeof(xf86ITEventHeader));
+
+            if (event_header.length >= EVENT_BUFFER_SIZE) {
+                xf86IDrvMsg(pInfo, X_ERROR, "Received event with too long length: %d\n",
+                            event_header.length);
+                teardown_client_connection(pInfo);
+                return;
+            }
+
+            if (driver_data->buffer.valid_length - processed_size < event_header.length)
+                break;
+
+            if (is_supported_event(event_header.type)) {
+                int expected_event_size = get_event_size(event_header.type);
+
+                if (event_header.length != expected_event_size) {
+                    xf86IDrvMsg(pInfo, X_ERROR, "Unexpected event length: was %d bytes, "
+                                "expected %d (event type: %d)\n",
+                                event_header.length, expected_event_size,
+                                (int) event_header.type);
+                    teardown_client_connection(pInfo);
+                    return;
+                }
+
+                /* We could use event_begin pointer directly, but we want to ensure correct
+                   data alignment (if only so that address sanitizer does not complain) */
+                xf86ITEventAny event_data;
+                memset(&event_data, 0, sizeof(event_data));
+                memcpy(&event_data, event_begin, event_header.length);
+                handle_event(pInfo, &event_data);
+            }
+            processed_size += event_header.length;
+        }
+
+        if (processed_size > 0) {
+            memmove(driver_data->buffer.data,
+                    driver_data->buffer.data + processed_size,
+                    driver_data->buffer.valid_length - processed_size);
+            driver_data->buffer.valid_length -= processed_size;
+        }
+
+        if (read_size == 0)
+            break;
+    }
+}
+
+static void
+read_input(InputInfoPtr pInfo)
+{
+    /* The test input driver does not set up the pInfo->fd and use the regular
+       read_input callback because we want to only accept the connection to
+       the controlling socket after the device is turned on.
+    */
+}
+
+static const char*
+get_type_name(InputInfoPtr pInfo, xf86ITDevicePtr driver_data)
+{
+    switch (driver_data->device_type) {
+        case DEVICE_TOUCH: return XI_TOUCHSCREEN;
+        case DEVICE_POINTER: return XI_MOUSE;
+        case DEVICE_POINTER_GESTURE: return XI_TOUCHPAD;
+        case DEVICE_POINTER_ABS: return XI_MOUSE;
+        case DEVICE_POINTER_ABS_PROXIMITY: return XI_TABLET;
+        case DEVICE_KEYBOARD: return XI_KEYBOARD;
+    }
+    xf86IDrvMsg(pInfo, X_ERROR, "Unexpected device type %d\n",
+                driver_data->device_type);
+    return XI_KEYBOARD;
+}
+
+static xf86ITDevicePtr
+device_alloc(void)
+{
+    xf86ITDevicePtr driver_data = calloc(sizeof(xf86ITDevice), 1);
+
+    if (!driver_data)
+        return NULL;
+
+    driver_data->socket_fd = -1;
+    driver_data->connection_fd = -1;
+
+    return driver_data;
+}
+
+static void
+free_driver_data(xf86ITDevicePtr driver_data)
+{
+    if (driver_data) {
+        close(driver_data->connection_fd);
+        close(driver_data->socket_fd);
+        if (driver_data->socket_path)
+            unlink(driver_data->socket_path);
+        free(driver_data->socket_path);
+        pthread_mutex_destroy(&driver_data->waiting_for_drain_mutex);
+
+        if (driver_data->valuators)
+            valuator_mask_free(&driver_data->valuators);
+        if (driver_data->valuators_unaccelerated)
+            valuator_mask_free(&driver_data->valuators_unaccelerated);
+    }
+    free(driver_data);
+}
+
+static int
+pre_init(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
+{
+    xf86ITDevicePtr driver_data = NULL;
+    char *device_type_option;
+    struct sockaddr_un addr;
+
+    pInfo->type_name = 0;
+    pInfo->device_control = device_control;
+    pInfo->read_input = read_input;
+    pInfo->control_proc = NULL;
+    pInfo->switch_mode = NULL;
+
+    driver_data = device_alloc();
+    if (!driver_data)
+        goto fail;
+
+    driver_data->client_state = CLIENT_STATE_NOT_CONNECTED;
+    driver_data->last_event_num = 1;
+    driver_data->last_processed_event_num = 0;
+    driver_data->waiting_for_drain = false;
+    pthread_mutex_init(&driver_data->waiting_for_drain_mutex, NULL);
+
+    driver_data->valuators = valuator_mask_new(6);
+    if (!driver_data->valuators)
+        goto fail;
+
+    driver_data->valuators_unaccelerated = valuator_mask_new(2);
+    if (!driver_data->valuators_unaccelerated)
+        goto fail;
+
+    driver_data->socket_path = xf86SetStrOption(pInfo->options, "SocketPath", NULL);
+    if (!driver_data->socket_path){
+        xf86IDrvMsg(pInfo, X_ERROR, "SocketPath must be specified\n");
+        goto fail;
+    }
+
+    if (strlen(driver_data->socket_path) >= sizeof(addr.sun_path)) {
+        xf86IDrvMsg(pInfo, X_ERROR, "SocketPath is too long\n");
+        goto fail;
+    }
+
+    unlink(driver_data->socket_path);
+
+#ifdef SOCK_NONBLOCK
+    driver_data->socket_fd = socket(PF_UNIX, SOCK_STREAM | SOCK_NONBLOCK, 0);
+#else
+    int fd = socket(PF_UNIX, SOCK_STREAM, 0);
+    if (fd >= 0) {
+        flags = fcntl(fd, F_GETFL, 0);
+        if (fcntl(fd, F_SETFL, flags | O_NONBLOCK) < 0) {
+            fd = -1;
+        }
+    }
+    driver_data->socket_fd = fd;
+#endif
+
+    if (driver_data->socket_fd < 0) {
+        xf86IDrvMsg(pInfo, X_ERROR, "Failed to create a socket for communication: %s\n",
+                    strerror(errno));
+        goto fail;
+    }
+
+    memset(&addr, 0, sizeof(addr));
+    addr.sun_family = AF_UNIX;
+    strncpy(addr.sun_path, driver_data->socket_path, sizeof(addr.sun_path) - 1);
+
+    if (bind(driver_data->socket_fd, (struct sockaddr*) &addr, sizeof(addr)) < 0) {
+        xf86IDrvMsg(pInfo, X_ERROR, "Failed to assign address to the socket\n");
+        goto fail;
+    }
+
+    if (chmod(driver_data->socket_path, 0777) != 0) {
+        xf86IDrvMsg(pInfo, X_ERROR, "Failed to chmod the socket path\n");
+        goto fail;
+    }
+
+    if (listen(driver_data->socket_fd, 1) != 0) {
+        xf86IDrvMsg(pInfo, X_ERROR, "Failed to listen on the socket\n");
+        goto fail;
+    }
+
+    device_type_option = xf86SetStrOption(pInfo->options, "DeviceType", NULL);
+    if (device_type_option == NULL) {
+        xf86IDrvMsg(pInfo, X_ERROR, "DeviceType option must be specified\n");
+        goto fail;
+    }
+
+    if (strcmp(device_type_option, "Keyboard") == 0) {
+        driver_data->device_type = DEVICE_KEYBOARD;
+    } else if (strcmp(device_type_option, "Pointer") == 0) {
+        driver_data->device_type = DEVICE_POINTER;
+    } else if (strcmp(device_type_option, "PointerGesture") == 0) {
+        driver_data->device_type = DEVICE_POINTER_GESTURE;
+    } else if (strcmp(device_type_option, "PointerAbsolute") == 0) {
+        driver_data->device_type = DEVICE_POINTER_ABS;
+    } else if (strcmp(device_type_option, "PointerAbsoluteProximity") == 0) {
+        driver_data->device_type = DEVICE_POINTER_ABS_PROXIMITY;
+    } else if (strcmp(device_type_option, "Touch") == 0) {
+        driver_data->device_type = DEVICE_TOUCH;
+    } else {
+        xf86IDrvMsg(pInfo, X_ERROR, "Unsupported DeviceType option.\n");
+        goto fail;
+    }
+    free(device_type_option);
+
+    pInfo->private = driver_data;
+    driver_data->pInfo = pInfo;
+
+    pInfo->type_name = get_type_name(pInfo, driver_data);
+
+    return Success;
+fail:
+    free_driver_data(driver_data);
+    return BadValue;
+}
+
+static void
+uninit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
+{
+    xf86ITDevicePtr driver_data = pInfo->private;
+    free_driver_data(driver_data);
+    pInfo->private = NULL;
+    xf86DeleteInput(pInfo, flags);
+}
+
+InputDriverRec driver = {
+    .driverVersion = 1,
+    .driverName = "inputtest",
+    .PreInit = pre_init,
+    .UnInit = uninit,
+    .module = NULL,
+    .default_options = NULL,
+    .capabilities = 0
+};
+
+static XF86ModuleVersionInfo version_info = {
+    "inputtest",
+    MODULEVENDORSTRING,
+    MODINFOSTRING1,
+    MODINFOSTRING2,
+    XORG_VERSION_CURRENT,
+    XORG_VERSION_MAJOR,
+    XORG_VERSION_MINOR,
+    XORG_VERSION_PATCH,
+    ABI_CLASS_XINPUT,
+    ABI_XINPUT_VERSION,
+    MOD_CLASS_XINPUT,
+    {0, 0, 0, 0}
+};
+
+static void*
+setup_proc(void *module, void *options, int *errmaj, int *errmin)
+{
+    xf86AddInputDriver(&driver, module, 0);
+    return module;
+}
+
+_X_EXPORT XF86ModuleData inputtestModuleData = {
+    .vers = &version_info,
+    .setup = &setup_proc,
+    .teardown = NULL
+};
diff --git a/hw/xfree86/drivers/modesetting/Makefile.in b/hw/xfree86/drivers/modesetting/Makefile.in
index fd769a4..323febe 100644
--- a/hw/xfree86/drivers/modesetting/Makefile.in
+++ b/hw/xfree86/drivers/modesetting/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -132,7 +132,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -243,8 +242,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \
 	$(top_srcdir)/manpages.am
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -265,8 +262,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -280,6 +275,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -298,14 +295,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -322,8 +311,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -379,6 +370,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -462,7 +455,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -486,29 +478,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -546,8 +522,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -558,14 +532,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -913,7 +881,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/hw/xfree86/drivers/modesetting/dri2.c b/hw/xfree86/drivers/modesetting/dri2.c
index c079989..8d1b742 100644
--- a/hw/xfree86/drivers/modesetting/dri2.c
+++ b/hw/xfree86/drivers/modesetting/dri2.c
@@ -123,6 +123,7 @@ ms_dri2_create_buffer2(ScreenPtr screen, DrawablePtr drawable,
                        unsigned int attachment, unsigned int format)
 {
     ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
+    modesettingPtr ms = modesettingPTR(scrn);
     DRI2Buffer2Ptr buffer;
     PixmapPtr pixmap;
     CARD32 size;
@@ -200,7 +201,7 @@ ms_dri2_create_buffer2(ScreenPtr screen, DrawablePtr drawable,
      */
     buffer->flags = 0;
 
-    buffer->name = glamor_name_from_pixmap(pixmap, &pitch, &size);
+    buffer->name = ms->glamor.name_from_pixmap(pixmap, &pitch, &size);
     buffer->pitch = pitch;
     if (buffer->name == -1) {
         xf86DrvMsg(scrn->scrnIndex, X_ERROR,
@@ -496,7 +497,8 @@ ms_dri2_schedule_flip(ms_dri2_frame_event_ptr info)
     if (ms_do_pageflip(screen, back_priv->pixmap, event,
                        drmmode_crtc->vblank_pipe, FALSE,
                        ms_dri2_flip_handler,
-                       ms_dri2_flip_abort)) {
+                       ms_dri2_flip_abort,
+                       "DRI2-flip")) {
         ms->drmmode.dri2_flipping = TRUE;
         return TRUE;
     }
@@ -509,11 +511,12 @@ update_front(DrawablePtr draw, DRI2BufferPtr front)
     ScreenPtr screen = draw->pScreen;
     PixmapPtr pixmap = get_drawable_pixmap(draw);
     ms_dri2_buffer_private_ptr priv = front->driverPrivate;
+    modesettingPtr ms = modesettingPTR(xf86ScreenToScrn(screen));
     CARD32 size;
     CARD16 pitch;
     int name;
 
-    name = glamor_name_from_pixmap(pixmap, &pitch, &size);
+    name = ms->glamor.name_from_pixmap(pixmap, &pitch, &size);
     if (name < 0)
         return FALSE;
 
@@ -549,7 +552,7 @@ can_exchange(ScrnInfoPtr scrn, DrawablePtr draw,
             return FALSE;
 #endif
 
-        if (ms_crtc_on(config->crtc[i]))
+        if (xf86_crtc_on(config->crtc[i]))
             num_crtcs_on++;
     }
 
@@ -617,7 +620,7 @@ ms_dri2_exchange_buffers(DrawablePtr draw, DRI2BufferPtr front,
     *front_pix = *back_pix;
     *back_pix = tmp_pix;
 
-    glamor_egl_exchange_buffers(front_priv->pixmap, back_priv->pixmap);
+    ms->glamor.egl_exchange_buffers(front_priv->pixmap, back_priv->pixmap);
 
     /* Post damage on the front buffer so that listeners, such
      * as DisplayLink know take a copy and shove it over the USB.
@@ -1036,7 +1039,7 @@ ms_dri2_screen_init(ScreenPtr screen)
     DRI2InfoRec info;
     const char *driver_names[2] = { NULL, NULL };
 
-    if (!glamor_supports_pixmap_import_export(screen)) {
+    if (!ms->glamor.supports_pixmap_import_export(screen)) {
         xf86DrvMsg(scrn->scrnIndex, X_WARNING,
                    "DRI2: glamor lacks support for pixmap import/export\n");
     }
@@ -1073,8 +1076,9 @@ ms_dri2_screen_init(ScreenPtr screen)
     info.DestroyBuffer2 = ms_dri2_destroy_buffer2;
     info.CopyRegion2 = ms_dri2_copy_region2;
 
-    /* Ask Glamor to obtain the DRI driver name via EGL_MESA_query_driver. */
-    driver_names[0] = glamor_egl_get_driver_name(screen);
+    /* Ask Glamor to obtain the DRI driver name via EGL_MESA_query_driver, */
+    if (ms->glamor.egl_get_driver_name)
+        driver_names[0] = ms->glamor.egl_get_driver_name(screen);
 
     if (driver_names[0]) {
         /* There is no VDPAU driver for Intel, fallback to the generic
@@ -1082,7 +1086,8 @@ ms_dri2_screen_init(ScreenPtr screen)
          * guess that the DRI and VDPAU drivers have the same name.
          */
         if (strcmp(driver_names[0], "i965") == 0 ||
-            strcmp(driver_names[0], "iris") == 0) {
+            strcmp(driver_names[0], "iris") == 0 ||
+            strcmp(driver_names[0], "crocus") == 0) {
             driver_names[1] = "va_gl";
         } else {
             driver_names[1] = driver_names[0];
diff --git a/hw/xfree86/drivers/modesetting/driver.c b/hw/xfree86/drivers/modesetting/driver.c
index ef4a314..535f49d 100644
--- a/hw/xfree86/drivers/modesetting/driver.c
+++ b/hw/xfree86/drivers/modesetting/driver.c
@@ -1,6 +1,7 @@
 /*
  * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
  * Copyright 2011 Dave Airlie
+ * Copyright 2019 NVIDIA CORPORATION
  * All Rights Reserved.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
@@ -26,6 +27,8 @@
  *
  * Original Author: Alan Hourihane <alanh@tungstengraphics.com>
  * Rewrite: Dave Airlie <airlied@redhat.com>
+ * Additional contributors:
+ *   Aaron Plattner <aplattner@nvidia.com>
  *
  */
 
@@ -50,7 +53,6 @@
 #include "xf86Crtc.h"
 #include "miscstruct.h"
 #include "dixstruct.h"
-#include "shadow.h"
 #include "xf86xv.h"
 #include <X11/extensions/Xv.h>
 #include <xorg-config.h>
@@ -60,7 +62,6 @@
 #ifdef XSERVER_LIBPCIACCESS
 #include <pciaccess.h>
 #endif
-
 #include "driver.h"
 
 static void AdjustFrame(ScrnInfoPtr pScrn, int x, int y);
@@ -82,6 +83,14 @@ static Bool ms_pci_probe(DriverPtr driver,
                          intptr_t match_data);
 static Bool ms_driver_func(ScrnInfoPtr scrn, xorgDriverFuncOp op, void *data);
 
+/* window wrapper functions used to get the notification when
+ * the window property changes */
+static Atom vrr_atom;
+static Bool property_vectors_wrapped;
+static Bool restore_property_vector;
+static int (*saved_change_property) (ClientPtr client);
+static int (*saved_delete_property) (ClientPtr client);
+
 #ifdef XSERVER_LIBPCIACCESS
 static const struct pci_id_match ms_device_match[] = {
     {
@@ -133,6 +142,9 @@ static const OptionInfoRec Options[] = {
     {OPTION_ZAPHOD_HEADS, "ZaphodHeads", OPTV_STRING, {0}, FALSE},
     {OPTION_DOUBLE_SHADOW, "DoubleShadow", OPTV_BOOLEAN, {0}, FALSE},
     {OPTION_ATOMIC, "Atomic", OPTV_BOOLEAN, {0}, FALSE},
+    {OPTION_VARIABLE_REFRESH, "VariableRefresh", OPTV_BOOLEAN, {0}, FALSE},
+    {OPTION_USE_GAMMA_LUT, "UseGammaLUT", OPTV_BOOLEAN, {0}, FALSE},
+    {OPTION_ASYNC_FLIP_SECONDARIES, "AsyncFlipSecondaries", OPTV_BOOLEAN, {0}, FALSE},
     {-1, NULL, OPTV_NONE, {0}, FALSE}
 };
 
@@ -571,14 +583,14 @@ dispatch_dirty_pixmap(ScrnInfoPtr scrn, xf86CrtcPtr crtc, PixmapPtr ppix)
 {
     modesettingPtr ms = modesettingPTR(scrn);
     msPixmapPrivPtr ppriv = msGetPixmapPriv(&ms->drmmode, ppix);
-    DamagePtr damage = ppriv->slave_damage;
+    DamagePtr damage = ppriv->secondary_damage;
     int fb_id = ppriv->fb_id;
 
     dispatch_dirty_region(scrn, ppix, damage, fb_id);
 }
 
 static void
-dispatch_slave_dirty(ScreenPtr pScreen)
+dispatch_secondary_dirty(ScreenPtr pScreen)
 {
     ScrnInfoPtr scrn = xf86ScreenToScrn(pScreen);
     xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
@@ -603,28 +615,28 @@ redisplay_dirty(ScreenPtr screen, PixmapDirtyUpdatePtr dirty, int *timeout)
 {
     RegionRec pixregion;
 
-    PixmapRegionInit(&pixregion, dirty->slave_dst);
-    DamageRegionAppend(&dirty->slave_dst->drawable, &pixregion);
+    PixmapRegionInit(&pixregion, dirty->secondary_dst);
+    DamageRegionAppend(&dirty->secondary_dst->drawable, &pixregion);
     PixmapSyncDirtyHelper(dirty);
 
     if (!screen->isGPU) {
 #ifdef GLAMOR_HAS_GBM
         modesettingPtr ms = modesettingPTR(xf86ScreenToScrn(screen));
         /*
-         * When copying from the master framebuffer to the shared pixmap,
-         * we must ensure the copy is complete before the slave starts a
-         * copy to its own framebuffer (some slaves scanout directly from
+         * When copying from the primary framebuffer to the shared pixmap,
+         * we must ensure the copy is complete before the secondary starts a
+         * copy to its own framebuffer (some secondarys scanout directly from
          * the shared pixmap, but not all).
          */
         if (ms->drmmode.glamor)
-            glamor_finish(screen);
+            ms->glamor.finish(screen);
 #endif
-        /* Ensure the slave processes the damage immediately */
+        /* Ensure the secondary processes the damage immediately */
         if (timeout)
             *timeout = 0;
     }
 
-    DamageRegionProcessPending(&dirty->slave_dst->drawable);
+    DamageRegionProcessPending(&dirty->secondary_dst->drawable);
     RegionUninit(&pixregion);
 }
 
@@ -644,13 +656,13 @@ ms_dirty_update(ScreenPtr screen, int *timeout)
         if (RegionNotEmpty(region)) {
             if (!screen->isGPU) {
                    msPixmapPrivPtr ppriv =
-                    msGetPixmapPriv(&ms->drmmode, ent->slave_dst->master_pixmap);
+                    msGetPixmapPriv(&ms->drmmode, ent->secondary_dst->primary_pixmap);
 
                 if (ppriv->notify_on_damage) {
                     ppriv->notify_on_damage = FALSE;
 
-                    ent->slave_dst->drawable.pScreen->
-                        SharedPixmapNotifyDamage(ent->slave_dst);
+                    ent->secondary_dst->drawable.pScreen->
+                        SharedPixmapNotifyDamage(ent->secondary_dst);
                 }
 
                 /* Requested manual updating */
@@ -665,7 +677,7 @@ ms_dirty_update(ScreenPtr screen, int *timeout)
 }
 
 static PixmapDirtyUpdatePtr
-ms_dirty_get_ent(ScreenPtr screen, PixmapPtr slave_dst)
+ms_dirty_get_ent(ScreenPtr screen, PixmapPtr secondary_dst)
 {
     PixmapDirtyUpdatePtr ent;
 
@@ -673,7 +685,7 @@ ms_dirty_get_ent(ScreenPtr screen, PixmapPtr slave_dst)
         return NULL;
 
     xorg_list_for_each_entry(ent, &screen->pixmap_dirty_list, ent) {
-        if (ent->slave_dst == slave_dst)
+        if (ent->secondary_dst == secondary_dst)
             return ent;
     }
 
@@ -690,7 +702,7 @@ msBlockHandler(ScreenPtr pScreen, void *timeout)
     ms->BlockHandler = pScreen->BlockHandler;
     pScreen->BlockHandler = msBlockHandler;
     if (pScreen->isGPU && !ms->drmmode.reverse_prime_offload_mode)
-        dispatch_slave_dirty(pScreen);
+        dispatch_secondary_dirty(pScreen);
     else if (ms->dirty_enabled)
         dispatch_dirty(pScreen);
 
@@ -708,6 +720,133 @@ msBlockHandler_oneshot(ScreenPtr pScreen, void *pTimeout)
     drmmode_set_desired_modes(pScrn, &ms->drmmode, TRUE, FALSE);
 }
 
+Bool
+ms_window_has_variable_refresh(modesettingPtr ms, WindowPtr win) {
+	struct ms_vrr_priv *priv = dixLookupPrivate(&win->devPrivates, &ms->drmmode.vrrPrivateKeyRec);
+
+	return priv->variable_refresh;
+}
+
+static void
+ms_vrr_property_update(WindowPtr window, Bool variable_refresh)
+{
+    ScrnInfoPtr scrn = xf86ScreenToScrn(window->drawable.pScreen);
+    modesettingPtr ms = modesettingPTR(scrn);
+
+    struct ms_vrr_priv *priv = dixLookupPrivate(&window->devPrivates,
+                                                &ms->drmmode.vrrPrivateKeyRec);
+    priv->variable_refresh = variable_refresh;
+
+    if (ms->flip_window == window && ms->drmmode.present_flipping)
+        ms_present_set_screen_vrr(scrn, variable_refresh);
+}
+
+/* Wrapper for xserver/dix/property.c:ProcChangeProperty */
+static int
+ms_change_property(ClientPtr client)
+{
+    WindowPtr window = NULL;
+    int ret = 0;
+
+    REQUEST(xChangePropertyReq);
+
+    client->requestVector[X_ChangeProperty] = saved_change_property;
+    ret = saved_change_property(client);
+
+    if (restore_property_vector)
+        return ret;
+
+    client->requestVector[X_ChangeProperty] = ms_change_property;
+
+    if (ret != Success)
+        return ret;
+
+    ret = dixLookupWindow(&window, stuff->window, client, DixSetPropAccess);
+    if (ret != Success)
+        return ret;
+
+    // Checking for the VRR property change on the window
+    if (stuff->property == vrr_atom &&
+        xf86ScreenToScrn(window->drawable.pScreen)->PreInit == PreInit &&
+        stuff->format == 32 && stuff->nUnits == 1) {
+        uint32_t *value = (uint32_t *)(stuff + 1);
+        ms_vrr_property_update(window, *value != 0);
+    }
+
+    return ret;
+}
+
+/* Wrapper for xserver/dix/property.c:ProcDeleteProperty */
+static int
+ms_delete_property(ClientPtr client)
+{
+    WindowPtr window;
+    int ret;
+
+    REQUEST(xDeletePropertyReq);
+
+    client->requestVector[X_DeleteProperty] = saved_delete_property;
+    ret = saved_delete_property(client);
+
+    if (restore_property_vector)
+        return ret;
+
+    client->requestVector[X_DeleteProperty] = ms_delete_property;
+
+    if (ret != Success)
+        return ret;
+
+    ret = dixLookupWindow(&window, stuff->window, client, DixSetPropAccess);
+    if (ret != Success)
+        return ret;
+
+    if (stuff->property == vrr_atom &&
+        xf86ScreenToScrn(window->drawable.pScreen)->PreInit == PreInit)
+        ms_vrr_property_update(window, FALSE);
+
+    return ret;
+}
+
+static void
+ms_unwrap_property_requests(ScrnInfoPtr scrn)
+{
+    int i;
+
+    if (!property_vectors_wrapped)
+        return;
+
+    if (ProcVector[X_ChangeProperty] == ms_change_property)
+        ProcVector[X_ChangeProperty] = saved_change_property;
+    else
+        restore_property_vector = TRUE;
+
+    if (ProcVector[X_DeleteProperty] == ms_delete_property)
+        ProcVector[X_DeleteProperty] = saved_delete_property;
+    else
+        restore_property_vector = TRUE;
+
+    for (i = 0; i < currentMaxClients; i++) {
+        if (clients[i]->requestVector[X_ChangeProperty] == ms_change_property) {
+            clients[i]->requestVector[X_ChangeProperty] = saved_change_property;
+        } else {
+            restore_property_vector = TRUE;
+        }
+
+        if (clients[i]->requestVector[X_DeleteProperty] == ms_delete_property) {
+            clients[i]->requestVector[X_DeleteProperty] = saved_delete_property;
+        } else {
+            restore_property_vector = TRUE;
+        }
+    }
+
+    if (restore_property_vector) {
+        xf86DrvMsg(scrn->scrnIndex, X_WARNING,
+                   "Couldn't unwrap some window property request vectors\n");
+    }
+
+    property_vectors_wrapped = FALSE;
+}
+
 static void
 FreeRec(ScrnInfoPtr pScrn)
 {
@@ -727,6 +866,7 @@ FreeRec(ScrnInfoPtr pScrn)
         ms_ent = ms_ent_priv(pScrn);
         ms_ent->fd_ref--;
         if (!ms_ent->fd_ref) {
+            ms_unwrap_property_requests(pScrn);
             if (ms->pEnt->location.type == BUS_PCI)
                 ret = drmClose(ms->fd);
             else
@@ -745,6 +885,40 @@ FreeRec(ScrnInfoPtr pScrn)
 
 }
 
+#ifdef GLAMOR_HAS_GBM
+
+static Bool
+load_glamor(ScrnInfoPtr pScrn)
+{
+    void *mod = xf86LoadSubModule(pScrn, GLAMOR_EGL_MODULE_NAME);
+    modesettingPtr ms = modesettingPTR(pScrn);
+
+    if (!mod)
+        return FALSE;
+
+    ms->glamor.back_pixmap_from_fd = LoaderSymbolFromModule(mod, "glamor_back_pixmap_from_fd");
+    ms->glamor.block_handler = LoaderSymbolFromModule(mod, "glamor_block_handler");
+    ms->glamor.clear_pixmap = LoaderSymbolFromModule(mod, "glamor_clear_pixmap");
+    ms->glamor.egl_create_textured_pixmap = LoaderSymbolFromModule(mod, "glamor_egl_create_textured_pixmap");
+    ms->glamor.egl_create_textured_pixmap_from_gbm_bo = LoaderSymbolFromModule(mod, "glamor_egl_create_textured_pixmap_from_gbm_bo");
+    ms->glamor.egl_exchange_buffers = LoaderSymbolFromModule(mod, "glamor_egl_exchange_buffers");
+    ms->glamor.egl_get_gbm_device = LoaderSymbolFromModule(mod, "glamor_egl_get_gbm_device");
+    ms->glamor.egl_init = LoaderSymbolFromModule(mod, "glamor_egl_init");
+    ms->glamor.finish = LoaderSymbolFromModule(mod, "glamor_finish");
+    ms->glamor.gbm_bo_from_pixmap = LoaderSymbolFromModule(mod, "glamor_gbm_bo_from_pixmap");
+    ms->glamor.init = LoaderSymbolFromModule(mod, "glamor_init");
+    ms->glamor.name_from_pixmap = LoaderSymbolFromModule(mod, "glamor_name_from_pixmap");
+    ms->glamor.set_drawable_modifiers_func = LoaderSymbolFromModule(mod, "glamor_set_drawable_modifiers_func");
+    ms->glamor.shareable_fd_from_pixmap = LoaderSymbolFromModule(mod, "glamor_shareable_fd_from_pixmap");
+    ms->glamor.supports_pixmap_import_export = LoaderSymbolFromModule(mod, "glamor_supports_pixmap_import_export");
+    ms->glamor.xv_init = LoaderSymbolFromModule(mod, "glamor_xv_init");
+    ms->glamor.egl_get_driver_name = LoaderSymbolFromModule(mod, "glamor_egl_get_driver_name");
+
+    return TRUE;
+}
+
+#endif
+
 static void
 try_enable_glamor(ScrnInfoPtr pScrn)
 {
@@ -767,12 +941,12 @@ try_enable_glamor(ScrnInfoPtr pScrn)
         return;
     }
 
-    if (xf86LoadSubModule(pScrn, GLAMOR_EGL_MODULE_NAME)) {
-        if (glamor_egl_init(pScrn, ms->fd)) {
+    if (load_glamor(pScrn)) {
+        if (ms->glamor.egl_init(pScrn, ms->fd)) {
             xf86DrvMsg(pScrn->scrnIndex, X_INFO, "glamor initialized\n");
             ms->drmmode.glamor = TRUE;
         } else {
-            xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+            xf86DrvMsg(pScrn->scrnIndex, X_INFO,
                        "glamor initialization failed\n");
         }
     } else {
@@ -1021,6 +1195,19 @@ PreInit(ScrnInfoPtr pScrn, int flags)
                    ms->drmmode.shadow_enable ? "YES" : "NO");
 
         ms->drmmode.shadow_enable2 = msShouldDoubleShadow(pScrn, ms);
+    } else {
+        if (!pScrn->is_gpu) {
+            MessageType from = xf86GetOptValBool(ms->drmmode.Options, OPTION_VARIABLE_REFRESH,
+                                                 &ms->vrr_support) ? X_CONFIG : X_DEFAULT;
+            xf86DrvMsg(pScrn->scrnIndex, from, "VariableRefresh: %sabled\n",
+                       ms->vrr_support ? "en" : "dis");
+
+            ms->drmmode.async_flip_secondaries = FALSE;
+            from = xf86GetOptValBool(ms->drmmode.Options, OPTION_ASYNC_FLIP_SECONDARIES,
+                                     &ms->drmmode.async_flip_secondaries) ? X_CONFIG : X_DEFAULT;
+            xf86DrvMsg(pScrn->scrnIndex, from, "AsyncFlipSecondaries: %sabled\n",
+                       ms->drmmode.async_flip_secondaries ? "en" : "dis");
+        }
     }
 
     ms->drmmode.pageflip =
@@ -1040,6 +1227,14 @@ PreInit(ScrnInfoPtr pScrn, int flags)
 #endif
     }
 
+    /*
+     * Use "atomic modesetting disable" request to detect if the kms driver is
+     * atomic capable, regardless if we will actually use atomic modesetting.
+     * This is effectively a no-op, we only care about the return status code.
+     */
+    ret = drmSetClientCap(ms->fd, DRM_CLIENT_CAP_ATOMIC, 0);
+    ms->atomic_modeset_capable = (ret == 0);
+
     if (xf86ReturnOptValBool(ms->drmmode.Options, OPTION_ATOMIC, FALSE)) {
         ret = drmSetClientCap(ms->fd, DRM_CLIENT_CAP_ATOMIC, 1);
         ms->atomic_modeset = (ret == 0);
@@ -1084,9 +1279,16 @@ PreInit(ScrnInfoPtr pScrn, int flags)
     }
 
     if (ms->drmmode.shadow_enable) {
-        if (!xf86LoadSubModule(pScrn, "shadow")) {
+        void *mod = xf86LoadSubModule(pScrn, "shadow");
+
+        if (!mod)
             return FALSE;
-        }
+
+        ms->shadow.Setup        = LoaderSymbolFromModule(mod, "shadowSetup");
+        ms->shadow.Add          = LoaderSymbolFromModule(mod, "shadowAdd");
+        ms->shadow.Remove       = LoaderSymbolFromModule(mod, "shadowRemove");
+        ms->shadow.Update32to24 = LoaderSymbolFromModule(mod, "shadowUpdate32to24");
+        ms->shadow.UpdatePacked = LoaderSymbolFromModule(mod, "shadowUpdatePacked");
     }
 
     return TRUE;
@@ -1191,9 +1393,9 @@ msUpdatePacked(ScreenPtr pScreen, shadowBufPtr pBuf)
     } while (0);
 
     if (use_3224)
-        shadowUpdate32to24(pScreen, pBuf);
+        ms->shadow.Update32to24(pScreen, pBuf);
     else
-        shadowUpdatePacked(pScreen, pBuf);
+        ms->shadow.UpdatePacked(pScreen, pBuf);
 }
 
 static Bool
@@ -1228,7 +1430,7 @@ msEnableSharedPixmapFlipping(RRCrtcPtr crtc, PixmapPtr front, PixmapPtr back)
             return FALSE;
 
         /* EVDI uses USB transport but is platform device, not usb.
-         * Blacklist it explicitly */
+         * Exclude it explicitly. */
         if (syspath && strstr(syspath, "evdi"))
             return FALSE;
     }
@@ -1252,32 +1454,32 @@ msDisableSharedPixmapFlipping(RRCrtcPtr crtc)
 
 static Bool
 msStartFlippingPixmapTracking(RRCrtcPtr crtc, DrawablePtr src,
-                              PixmapPtr slave_dst1, PixmapPtr slave_dst2,
+                              PixmapPtr secondary_dst1, PixmapPtr secondary_dst2,
                               int x, int y, int dst_x, int dst_y,
                               Rotation rotation)
 {
     ScreenPtr pScreen = src->pScreen;
     modesettingPtr ms = modesettingPTR(xf86ScreenToScrn(pScreen));
 
-    msPixmapPrivPtr ppriv1 = msGetPixmapPriv(&ms->drmmode, slave_dst1->master_pixmap),
-                    ppriv2 = msGetPixmapPriv(&ms->drmmode, slave_dst2->master_pixmap);
+    msPixmapPrivPtr ppriv1 = msGetPixmapPriv(&ms->drmmode, secondary_dst1->primary_pixmap),
+                    ppriv2 = msGetPixmapPriv(&ms->drmmode, secondary_dst2->primary_pixmap);
 
-    if (!PixmapStartDirtyTracking(src, slave_dst1, x, y,
+    if (!PixmapStartDirtyTracking(src, secondary_dst1, x, y,
                                   dst_x, dst_y, rotation)) {
         return FALSE;
     }
 
-    if (!PixmapStartDirtyTracking(src, slave_dst2, x, y,
+    if (!PixmapStartDirtyTracking(src, secondary_dst2, x, y,
                                   dst_x, dst_y, rotation)) {
-        PixmapStopDirtyTracking(src, slave_dst1);
+        PixmapStopDirtyTracking(src, secondary_dst1);
         return FALSE;
     }
 
-    ppriv1->slave_src = src;
-    ppriv2->slave_src = src;
+    ppriv1->secondary_src = src;
+    ppriv2->secondary_src = src;
 
-    ppriv1->dirty = ms_dirty_get_ent(pScreen, slave_dst1);
-    ppriv2->dirty = ms_dirty_get_ent(pScreen, slave_dst2);
+    ppriv1->dirty = ms_dirty_get_ent(pScreen, secondary_dst1);
+    ppriv2->dirty = ms_dirty_get_ent(pScreen, secondary_dst2);
 
     ppriv1->defer_dirty_update = TRUE;
     ppriv2->defer_dirty_update = TRUE;
@@ -1286,17 +1488,17 @@ msStartFlippingPixmapTracking(RRCrtcPtr crtc, DrawablePtr src,
 }
 
 static Bool
-msPresentSharedPixmap(PixmapPtr slave_dst)
+msPresentSharedPixmap(PixmapPtr secondary_dst)
 {
-    ScreenPtr pScreen = slave_dst->master_pixmap->drawable.pScreen;
+    ScreenPtr pScreen = secondary_dst->primary_pixmap->drawable.pScreen;
     modesettingPtr ms = modesettingPTR(xf86ScreenToScrn(pScreen));
 
-    msPixmapPrivPtr ppriv = msGetPixmapPriv(&ms->drmmode, slave_dst->master_pixmap);
+    msPixmapPrivPtr ppriv = msGetPixmapPriv(&ms->drmmode, secondary_dst->primary_pixmap);
 
     RegionPtr region = DamageRegion(ppriv->dirty->damage);
 
     if (RegionNotEmpty(region)) {
-        redisplay_dirty(ppriv->slave_src->pScreen, ppriv->dirty, NULL);
+        redisplay_dirty(ppriv->secondary_src->pScreen, ppriv->dirty, NULL);
         DamageEmpty(ppriv->dirty->damage);
 
         return TRUE;
@@ -1307,22 +1509,22 @@ msPresentSharedPixmap(PixmapPtr slave_dst)
 
 static Bool
 msStopFlippingPixmapTracking(DrawablePtr src,
-                             PixmapPtr slave_dst1, PixmapPtr slave_dst2)
+                             PixmapPtr secondary_dst1, PixmapPtr secondary_dst2)
 {
     ScreenPtr pScreen = src->pScreen;
     modesettingPtr ms = modesettingPTR(xf86ScreenToScrn(pScreen));
 
-    msPixmapPrivPtr ppriv1 = msGetPixmapPriv(&ms->drmmode, slave_dst1->master_pixmap),
-                    ppriv2 = msGetPixmapPriv(&ms->drmmode, slave_dst2->master_pixmap);
+    msPixmapPrivPtr ppriv1 = msGetPixmapPriv(&ms->drmmode, secondary_dst1->primary_pixmap),
+                    ppriv2 = msGetPixmapPriv(&ms->drmmode, secondary_dst2->primary_pixmap);
 
     Bool ret = TRUE;
 
-    ret &= PixmapStopDirtyTracking(src, slave_dst1);
-    ret &= PixmapStopDirtyTracking(src, slave_dst2);
+    ret &= PixmapStopDirtyTracking(src, secondary_dst1);
+    ret &= PixmapStopDirtyTracking(src, secondary_dst2);
 
     if (ret) {
-        ppriv1->slave_src = NULL;
-        ppriv2->slave_src = NULL;
+        ppriv1->secondary_src = NULL;
+        ppriv2->secondary_src = NULL;
 
         ppriv1->dirty = NULL;
         ppriv2->dirty = NULL;
@@ -1380,8 +1582,8 @@ CreateScreenResources(ScreenPtr pScreen)
         FatalError("Couldn't adjust screen pixmap\n");
 
     if (ms->drmmode.shadow_enable) {
-        if (!shadowAdd(pScreen, rootPixmap, msUpdatePacked, msShadowWindow,
-                       0, 0))
+        if (!ms->shadow.Add(pScreen, rootPixmap, msUpdatePacked, msShadowWindow,
+                            0, 0))
             return FALSE;
     }
 
@@ -1412,27 +1614,26 @@ CreateScreenResources(ScreenPtr pScreen)
         pScrPriv->rrStartFlippingPixmapTracking = msStartFlippingPixmapTracking;
     }
 
-    return ret;
-}
+    if (ms->vrr_support &&
+        !dixRegisterPrivateKey(&ms->drmmode.vrrPrivateKeyRec,
+                               PRIVATE_WINDOW,
+                               sizeof(struct ms_vrr_priv)))
+            return FALSE;
 
-static Bool
-msShadowInit(ScreenPtr pScreen)
-{
-    if (!shadowSetup(pScreen)) {
-        return FALSE;
-    }
-    return TRUE;
+    return ret;
 }
 
 static Bool
-msSharePixmapBacking(PixmapPtr ppix, ScreenPtr screen, void **handle)
+msSharePixmapBacking(PixmapPtr ppix, ScreenPtr secondary, void **handle)
 {
 #ifdef GLAMOR_HAS_GBM
+    modesettingPtr ms =
+        modesettingPTR(xf86ScreenToScrn(ppix->drawable.pScreen));
     int ret;
     CARD16 stride;
     CARD32 size;
-    ret = glamor_shareable_fd_from_pixmap(ppix->drawable.pScreen, ppix,
-                                          &stride, &size);
+    ret = ms->glamor.shareable_fd_from_pixmap(ppix->drawable.pScreen, ppix,
+                                              &stride, &size);
     if (ret == -1)
         return FALSE;
 
@@ -1457,11 +1658,12 @@ msSetSharedPixmapBacking(PixmapPtr ppix, void *fd_handle)
            return drmmode_SetSlaveBO(ppix, &ms->drmmode, ihandle, 0, 0);
 
     if (ms->drmmode.reverse_prime_offload_mode) {
-        ret = glamor_back_pixmap_from_fd(ppix, ihandle,
-                                         ppix->drawable.width,
-                                         ppix->drawable.height,
-                                         ppix->devKind, ppix->drawable.depth,
-                                         ppix->drawable.bitsPerPixel);
+        ret = ms->glamor.back_pixmap_from_fd(ppix, ihandle,
+                                             ppix->drawable.width,
+                                             ppix->drawable.height,
+                                             ppix->devKind,
+                                             ppix->drawable.depth,
+                                             ppix->drawable.bitsPerPixel);
     } else {
         int size = ppix->devKind * ppix->drawable.height;
         ret = drmmode_SetSlaveBO(ppix, &ms->drmmode, ihandle, ppix->devKind, size);
@@ -1482,7 +1684,7 @@ msRequestSharedPixmapNotifyDamage(PixmapPtr ppix)
     ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
     modesettingPtr ms = modesettingPTR(scrn);
 
-    msPixmapPrivPtr ppriv = msGetPixmapPriv(&ms->drmmode, ppix->master_pixmap);
+    msPixmapPrivPtr ppriv = msGetPixmapPriv(&ms->drmmode, ppix->primary_pixmap);
 
     ppriv->notify_on_damage = TRUE;
 
@@ -1515,7 +1717,7 @@ msSharedPixmapNotifyDamage(PixmapPtr ppix)
         if (!(drmmode_crtc->prime_pixmap && drmmode_crtc->prime_pixmap_back))
             continue;
 
-        // Received damage on master screen pixmap, schedule present on vblank
+        // Received damage on primary screen pixmap, schedule present on vblank
         ret |= drmmode_SharedPixmapPresentOnVBlank(ppix, crtc, &ms->drmmode);
     }
 
@@ -1578,7 +1780,7 @@ ScreenInit(ScreenPtr pScreen, int argc, char **argv)
 
 #ifdef GLAMOR_HAS_GBM
     if (ms->drmmode.glamor)
-        ms->drmmode.gbm = glamor_egl_get_gbm_device(pScreen);
+        ms->drmmode.gbm = ms->glamor.egl_get_gbm_device(pScreen);
 #endif
 
     /* HW dependent - FIXME */
@@ -1643,7 +1845,7 @@ ScreenInit(ScreenPtr pScreen, int argc, char **argv)
         return FALSE;
     }
 
-    if (ms->drmmode.shadow_enable && !msShadowInit(pScreen)) {
+    if (ms->drmmode.shadow_enable && !ms->shadow.Setup(pScreen)) {
         xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "shadow fb init failed\n");
         return FALSE;
     }
@@ -1658,7 +1860,7 @@ ScreenInit(ScreenPtr pScreen, int argc, char **argv)
     miDCInitialize(pScreen, xf86GetPointerScreenFuncs());
 
     /* If pageflip is enabled hook the screen's cursor-sprite (swcursor) funcs.
-     * So that we can disabe page-flipping on fallback to a swcursor. */
+     * So that we can disable page-flipping on fallback to a swcursor. */
     if (ms->drmmode.pageflip) {
         miPointerScreenPtr PointPriv =
             dixLookupPrivate(&pScreen->devPrivates, miPointerScreenKey);
@@ -1722,7 +1924,7 @@ ScreenInit(ScreenPtr pScreen, int argc, char **argv)
     if (ms->drmmode.glamor) {
         XF86VideoAdaptorPtr     glamor_adaptor;
 
-        glamor_adaptor = glamor_xv_init(pScreen, 16);
+        glamor_adaptor = ms->glamor.xv_init(pScreen, 16);
         if (glamor_adaptor != NULL)
             xf86XVScreenInit(pScreen, &glamor_adaptor, 1);
         else
@@ -1747,31 +1949,56 @@ ScreenInit(ScreenPtr pScreen, int argc, char **argv)
                        "Failed to initialize the DRI2 extension.\n");
         }
 
-        if (!(ms->drmmode.present_enable = ms_present_screen_init(pScreen))) {
-            xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
-                       "Failed to initialize the Present extension.\n");
-        }
         /* enable reverse prime if we are a GPU screen, and accelerated, and not
-         * i915. i915 is happy scanning out from sysmem. */
+         * i915, evdi or udl. i915 is happy scanning out from sysmem.
+         * evdi and udl are virtual drivers scanning out from sysmem
+         * backed dumb buffers.
+         */
         if (pScreen->isGPU) {
             drmVersionPtr version;
 
             /* enable if we are an accelerated GPU screen */
             ms->drmmode.reverse_prime_offload_mode = TRUE;
 
-            /* disable if we detect i915 */
             if ((version = drmGetVersion(ms->drmmode.fd))) {
                 if (!strncmp("i915", version->name, version->name_len)) {
                     ms->drmmode.reverse_prime_offload_mode = FALSE;
                 }
+                if (!strncmp("evdi", version->name, version->name_len)) {
+                    ms->drmmode.reverse_prime_offload_mode = FALSE;
+                }
+                if (!strncmp("udl", version->name, version->name_len)) {
+                    ms->drmmode.reverse_prime_offload_mode = FALSE;
+                }
+                if (!ms->drmmode.reverse_prime_offload_mode) {
+                    xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+                       "Disable reverse prime offload mode for %s.\n", version->name);
+                }
                 drmFreeVersion(version);
             }
         }
     }
 #endif
+    if (!(ms->drmmode.present_enable = ms_present_screen_init(pScreen))) {
+        xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+                   "Failed to initialize the Present extension.\n");
+    }
+
 
     pScrn->vtSema = TRUE;
 
+    if (ms->vrr_support) {
+        if (!property_vectors_wrapped) {
+            saved_change_property = ProcVector[X_ChangeProperty];
+            ProcVector[X_ChangeProperty] = ms_change_property;
+            saved_delete_property = ProcVector[X_DeleteProperty];
+            ProcVector[X_DeleteProperty] = ms_delete_property;
+            property_vectors_wrapped = TRUE;
+        }
+        vrr_atom = MakeAtom("_VARIABLE_REFRESH",
+                             strlen("_VARIABLE_REFRESH"), TRUE);
+    }
+
     return TRUE;
 }
 
@@ -1874,7 +2101,7 @@ CloseScreen(ScreenPtr pScreen)
     }
 
     if (ms->drmmode.shadow_enable) {
-        shadowRemove(pScreen, pScreen->GetScreenPixmap(pScreen));
+        ms->shadow.Remove(pScreen, pScreen->GetScreenPixmap(pScreen));
         free(ms->drmmode.shadow_fb);
         ms->drmmode.shadow_fb = NULL;
         free(ms->drmmode.shadow_fb2);
diff --git a/hw/xfree86/drivers/modesetting/driver.h b/hw/xfree86/drivers/modesetting/driver.h
index f2e7889..71aa873 100644
--- a/hw/xfree86/drivers/modesetting/driver.h
+++ b/hw/xfree86/drivers/modesetting/driver.h
@@ -1,5 +1,6 @@
 /*
  * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * Copyright 2019 NVIDIA CORPORATION
  * All Rights Reserved.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
@@ -24,7 +25,8 @@
  *
  *
  * Author: Alan Hourihane <alanh@tungstengraphics.com>
- *
+ * Additional contributors:
+ *   Aaron Plattner <aplattner@nvidia.com>
  */
 
 #include <errno.h>
@@ -33,7 +35,7 @@
 #include <xf86Crtc.h>
 #include <damage.h>
 #include <X11/extensions/dpmsconst.h>
-
+#include <shadow.h>
 #ifdef GLAMOR_HAS_GBM
 #define GLAMOR_FOR_XORG 1
 #include "glamor.h"
@@ -43,6 +45,10 @@
 #include "drmmode_display.h"
 #define MS_LOGLEVEL_DEBUG 4
 
+struct ms_vrr_priv {
+    Bool variable_refresh;
+};
+
 typedef enum {
     OPTION_SW_CURSOR,
     OPTION_DEVICE_PATH,
@@ -52,6 +58,9 @@ typedef enum {
     OPTION_ZAPHOD_HEADS,
     OPTION_DOUBLE_SHADOW,
     OPTION_ATOMIC,
+    OPTION_VARIABLE_REFRESH,
+    OPTION_USE_GAMMA_LUT,
+    OPTION_ASYNC_FLIP_SECONDARIES,
 } modesettingOpts;
 
 typedef struct
@@ -108,6 +117,7 @@ typedef struct _modesettingRec {
      * Page flipping stuff.
      *  @{
      */
+    Bool atomic_modeset_capable;
     Bool atomic_modeset;
     Bool pending_modeset;
     /** @} */
@@ -122,8 +132,54 @@ typedef struct _modesettingRec {
 
     Bool kms_has_modifiers;
 
+    /* VRR support */
+    Bool vrr_support;
+    WindowPtr flip_window;
+
+    Bool is_connector_vrr_capable;
+    uint32_t connector_prop_id;
+
+    /* shadow API */
+    struct {
+        Bool (*Setup)(ScreenPtr);
+        Bool (*Add)(ScreenPtr, PixmapPtr, ShadowUpdateProc, ShadowWindowProc,
+                    int, void *);
+        void (*Remove)(ScreenPtr, PixmapPtr);
+        void (*Update32to24)(ScreenPtr, shadowBufPtr);
+        void (*UpdatePacked)(ScreenPtr, shadowBufPtr);
+    } shadow;
+
+#ifdef GLAMOR_HAS_GBM
+    /* glamor API */
+    struct {
+        Bool (*back_pixmap_from_fd)(PixmapPtr, int, CARD16, CARD16, CARD16,
+                                    CARD8, CARD8);
+        void (*block_handler)(ScreenPtr);
+        void (*clear_pixmap)(PixmapPtr);
+        Bool (*egl_create_textured_pixmap)(PixmapPtr, int, int);
+        Bool (*egl_create_textured_pixmap_from_gbm_bo)(PixmapPtr,
+                                                       struct gbm_bo *,
+                                                       Bool);
+        void (*egl_exchange_buffers)(PixmapPtr, PixmapPtr);
+        struct gbm_device *(*egl_get_gbm_device)(ScreenPtr);
+        Bool (*egl_init)(ScrnInfoPtr, int);
+        void (*finish)(ScreenPtr);
+        struct gbm_bo *(*gbm_bo_from_pixmap)(ScreenPtr, PixmapPtr);
+        Bool (*init)(ScreenPtr, unsigned int);
+        int (*name_from_pixmap)(PixmapPtr, CARD16 *, CARD32 *);
+        void (*set_drawable_modifiers_func)(ScreenPtr,
+                                            GetDrawableModifiersFuncPtr);
+        int (*shareable_fd_from_pixmap)(ScreenPtr, PixmapPtr, CARD16 *,
+                                        CARD32 *);
+        Bool (*supports_pixmap_import_export)(ScreenPtr);
+        XF86VideoAdaptorPtr (*xv_init)(ScreenPtr, int);
+        const char *(*egl_get_driver_name)(ScreenPtr);
+    } glamor;
+#endif
 } modesettingRec, *modesettingPtr;
 
+#define glamor_finish(screen) ms->glamor.finish(screen)
+
 #define modesettingPTR(p) ((modesettingPtr)((p)->driverPrivate))
 modesettingEntPtr ms_ent_priv(ScrnInfoPtr scrn);
 
@@ -146,7 +202,7 @@ void ms_drm_abort(ScrnInfoPtr scrn,
                   void *match_data);
 void ms_drm_abort_seq(ScrnInfoPtr scrn, uint32_t seq);
 
-Bool ms_crtc_on(xf86CrtcPtr crtc);
+Bool xf86_crtc_on(xf86CrtcPtr crtc);
 
 xf86CrtcPtr ms_dri2_crtc_covering_drawable(DrawablePtr pDraw);
 RRCrtcPtr   ms_randr_crtc_covering_drawable(DrawablePtr pDraw);
@@ -179,8 +235,11 @@ Bool ms_do_pageflip(ScreenPtr screen,
                     int ref_crtc_vblank_pipe,
                     Bool async,
                     ms_pageflip_handler_proc pageflip_handler,
-                    ms_pageflip_abort_proc pageflip_abort);
+                    ms_pageflip_abort_proc pageflip_abort,
+                    const char *log_prefix);
 
 #endif
 
 int ms_flush_drm_events(ScreenPtr screen);
+Bool ms_window_has_variable_refresh(modesettingPtr ms, WindowPtr win);
+void ms_present_set_screen_vrr(ScrnInfoPtr scrn, Bool vrr_enabled);
diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c
index 88992f5..48dccad 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -1,5 +1,6 @@
 /*
  * Copyright © 2007 Red Hat, Inc.
+ * Copyright © 2019 NVIDIA CORPORATION
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
@@ -22,6 +23,7 @@
  *
  * Authors:
  *    Dave Airlie <airlied@redhat.com>
+ *    Aaron Plattner <aplattner@nvidia.com>
  *
  */
 
@@ -60,6 +62,32 @@ static PixmapPtr drmmode_create_pixmap_header(ScreenPtr pScreen, int width, int
                                               int depth, int bitsPerPixel, int devKind,
                                               void *pPixData);
 
+static const struct drm_color_ctm ctm_identity = { {
+    1UL << 32, 0, 0,
+    0, 1UL << 32, 0,
+    0, 0, 1UL << 32
+} };
+
+static Bool ctm_is_identity(const struct drm_color_ctm *ctm)
+{
+    const size_t matrix_len = sizeof(ctm->matrix) / sizeof(ctm->matrix[0]);
+    const uint64_t one = 1ULL << 32;
+    const uint64_t neg_zero = 1ULL << 63;
+    int i;
+
+    for (i = 0; i < matrix_len; i++) {
+        const Bool diagonal = i / 3 == i % 3;
+        const uint64_t val = ctm->matrix[i];
+
+        if ((diagonal && val != one) ||
+            (!diagonal && val != 0 && val != neg_zero)) {
+            return FALSE;
+        }
+    }
+
+    return TRUE;
+}
+
 static inline uint32_t *
 formats_ptr(struct drm_format_modifier_blob *blob)
 {
@@ -321,6 +349,7 @@ drmmode_prop_info_update(drmmode_ptr drmmode,
         }
 
         info[j].prop_id = props->props[i];
+        info[j].value = props->prop_values[i];
         valid_mask |= 1U << j;
 
         if (info[j].num_enum_values == 0) {
@@ -749,6 +778,39 @@ drmmode_crtc_disable(xf86CrtcPtr crtc)
     return ret;
 }
 
+static void
+drmmode_set_ctm(xf86CrtcPtr crtc, const struct drm_color_ctm *ctm)
+{
+    drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
+    drmmode_ptr drmmode = drmmode_crtc->drmmode;
+    drmmode_prop_info_ptr ctm_info =
+        &drmmode_crtc->props[DRMMODE_CRTC_CTM];
+    int ret;
+    uint32_t blob_id = 0;
+
+    if (ctm_info->prop_id == 0)
+        return;
+
+    if (ctm && drmmode_crtc->use_gamma_lut && !ctm_is_identity(ctm)) {
+        ret = drmModeCreatePropertyBlob(drmmode->fd, ctm, sizeof(*ctm), &blob_id);
+        if (ret != 0) {
+            xf86DrvMsg(crtc->scrn->scrnIndex, X_ERROR,
+                       "Failed to create CTM property blob: %d\n", ret);
+            blob_id = 0;
+        }
+    }
+
+    ret = drmModeObjectSetProperty(drmmode->fd,
+                                   drmmode_crtc->mode_crtc->crtc_id,
+                                   DRM_MODE_OBJECT_CRTC, ctm_info->prop_id,
+                                   blob_id);
+    if (ret != 0)
+        xf86DrvMsg(crtc->scrn->scrnIndex, X_ERROR,
+                   "Failed to set CTM property: %d\n", ret);
+
+    drmModeDestroyPropertyBlob(drmmode->fd, blob_id);
+}
+
 static int
 drmmode_crtc_set_mode(xf86CrtcPtr crtc, Bool test_only)
 {
@@ -756,13 +818,13 @@ drmmode_crtc_set_mode(xf86CrtcPtr crtc, Bool test_only)
     xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(crtc->scrn);
     drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
     drmmode_ptr drmmode = drmmode_crtc->drmmode;
-    ScreenPtr screen = crtc->scrn->pScreen;
     drmModeModeInfo kmode;
     int output_count = 0;
     uint32_t *output_ids = NULL;
     uint32_t fb_id;
     int x, y;
     int i, ret = 0;
+    const struct drm_color_ctm *ctm = NULL;
 
     if (!drmmode_crtc_get_fb_id(crtc, &fb_id, &x, &y))
         return 1;
@@ -770,7 +832,7 @@ drmmode_crtc_set_mode(xf86CrtcPtr crtc, Bool test_only)
 #ifdef GLAMOR_HAS_GBM
     /* Make sure any pending drawing will be visible in a new scanout buffer */
     if (drmmode->glamor)
-        glamor_finish(screen);
+        glamor_finish(crtc->scrn->pScreen);
 #endif
 
     if (ms->atomic_modeset) {
@@ -853,12 +915,16 @@ drmmode_crtc_set_mode(xf86CrtcPtr crtc, Bool test_only)
             continue;
         output_ids[output_count] = drmmode_output->output_id;
         output_count++;
+
+        ctm = &drmmode_output->ctm;
     }
 
     drmmode_ConvertToKMode(crtc->scrn, &kmode, &crtc->mode);
     ret = drmModeSetCrtc(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id,
                          fb_id, x, y, output_ids, output_count, &kmode);
 
+    drmmode_set_ctm(crtc, ctm);
+
     free(output_ids);
     return ret;
 }
@@ -1017,17 +1083,28 @@ drmmode_create_bo(drmmode_ptr drmmode, drmmode_bo *bo,
 
 #ifdef GLAMOR_HAS_GBM
     if (drmmode->glamor) {
+#ifdef GBM_BO_WITH_MODIFIERS
+        uint32_t num_modifiers;
+        uint64_t *modifiers = NULL;
+#endif
         uint32_t format;
 
-        if (drmmode->scrn->depth == 30)
+        switch (drmmode->scrn->depth) {
+        case 15:
+            format = GBM_FORMAT_ARGB1555;
+            break;
+        case 16:
+            format = GBM_FORMAT_RGB565;
+            break;
+        case 30:
             format = GBM_FORMAT_ARGB2101010;
-        else
+            break;
+        default:
             format = GBM_FORMAT_ARGB8888;
+            break;
+        }
 
 #ifdef GBM_BO_WITH_MODIFIERS
-        uint32_t num_modifiers;
-        uint64_t *modifiers = NULL;
-
         num_modifiers = get_modifiers_set(drmmode->scrn, format, &modifiers,
                                           FALSE, TRUE);
         if (num_modifiers > 0 &&
@@ -1079,9 +1156,9 @@ static Bool
 drmmode_SharedPixmapPresent(PixmapPtr ppix, xf86CrtcPtr crtc,
                             drmmode_ptr drmmode)
 {
-    ScreenPtr master = crtc->randr_crtc->pScreen->current_master;
+    ScreenPtr primary = crtc->randr_crtc->pScreen->current_primary;
 
-    if (master->PresentSharedPixmap(ppix)) {
+    if (primary->PresentSharedPixmap(ppix)) {
         /* Success, queue flip to back target */
         if (drmmode_SharedPixmapFlip(ppix, crtc, drmmode))
             return TRUE;
@@ -1093,13 +1170,13 @@ drmmode_SharedPixmapPresent(PixmapPtr ppix, xf86CrtcPtr crtc,
     }
 
     /* Failed to present, try again on next vblank after damage */
-    if (master->RequestSharedPixmapNotifyDamage) {
+    if (primary->RequestSharedPixmapNotifyDamage) {
         msPixmapPrivPtr ppriv = msGetPixmapPriv(drmmode, ppix);
 
         /* Set flag first in case we are immediately notified */
         ppriv->wait_for_damage = TRUE;
 
-        if (master->RequestSharedPixmapNotifyDamage(ppix))
+        if (primary->RequestSharedPixmapNotifyDamage(ppix))
             return TRUE;
         else
             ppriv->wait_for_damage = FALSE;
@@ -1385,6 +1462,7 @@ create_pixmap_for_fbcon(drmmode_ptr drmmode, ScrnInfoPtr pScrn, int fbcon_id)
     PixmapPtr pixmap = drmmode->fbcon_pixmap;
     drmModeFBPtr fbcon;
     ScreenPtr pScreen = xf86ScrnToScreen(pScrn);
+    modesettingPtr ms = modesettingPTR(pScrn);
     Bool ret;
 
     if (pixmap)
@@ -1405,7 +1483,8 @@ create_pixmap_for_fbcon(drmmode_ptr drmmode, ScrnInfoPtr pScrn, int fbcon_id)
     if (!pixmap)
         goto out_free_fb;
 
-    ret = glamor_egl_create_textured_pixmap(pixmap, fbcon->handle, fbcon->pitch);
+    ret = ms->glamor.egl_create_textured_pixmap(pixmap, fbcon->handle,
+                                                fbcon->pitch);
     if (!ret) {
       FreePixmap(pixmap);
       pixmap = NULL;
@@ -1656,6 +1735,35 @@ drmmode_show_cursor(xf86CrtcPtr crtc)
     return drmmode_set_cursor(crtc);
 }
 
+static void
+drmmode_set_gamma_lut(drmmode_crtc_private_ptr drmmode_crtc,
+                      uint16_t * red, uint16_t * green, uint16_t * blue,
+                      int size)
+{
+    drmmode_ptr drmmode = drmmode_crtc->drmmode;
+    drmmode_prop_info_ptr gamma_lut_info =
+        &drmmode_crtc->props[DRMMODE_CRTC_GAMMA_LUT];
+    const uint32_t crtc_id = drmmode_crtc->mode_crtc->crtc_id;
+    uint32_t blob_id;
+    struct drm_color_lut lut[size];
+
+    assert(gamma_lut_info->prop_id != 0);
+
+    for (int i = 0; i < size; i++) {
+        lut[i].red = red[i];
+        lut[i].green = green[i];
+        lut[i].blue = blue[i];
+    }
+
+    if (drmModeCreatePropertyBlob(drmmode->fd, lut, sizeof(lut), &blob_id))
+        return;
+
+    drmModeObjectSetProperty(drmmode->fd, crtc_id, DRM_MODE_OBJECT_CRTC,
+                             gamma_lut_info->prop_id, blob_id);
+
+    drmModeDestroyPropertyBlob(drmmode->fd, blob_id);
+}
+
 static void
 drmmode_crtc_gamma_set(xf86CrtcPtr crtc, uint16_t * red, uint16_t * green,
                        uint16_t * blue, int size)
@@ -1663,8 +1771,12 @@ drmmode_crtc_gamma_set(xf86CrtcPtr crtc, uint16_t * red, uint16_t * green,
     drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
     drmmode_ptr drmmode = drmmode_crtc->drmmode;
 
-    drmModeCrtcSetGamma(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id,
-                        size, red, green, blue);
+    if (drmmode_crtc->use_gamma_lut) {
+        drmmode_set_gamma_lut(drmmode_crtc, red, green, blue, size);
+    } else {
+        drmModeCrtcSetGamma(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id,
+                            size, red, green, blue);
+    }
 }
 
 static Bool
@@ -1738,9 +1850,9 @@ drmmode_set_target_scanout_pixmap_cpu(xf86CrtcPtr crtc, PixmapPtr ppix,
         ppriv = msGetPixmapPriv(drmmode, *target);
         drmModeRmFB(drmmode->fd, ppriv->fb_id);
         ppriv->fb_id = 0;
-        if (ppriv->slave_damage) {
-            DamageUnregister(ppriv->slave_damage);
-            ppriv->slave_damage = NULL;
+        if (ppriv->secondary_damage) {
+            DamageUnregister(ppriv->secondary_damage);
+            ppriv->secondary_damage = NULL;
         }
         *target = NULL;
     }
@@ -1749,16 +1861,16 @@ drmmode_set_target_scanout_pixmap_cpu(xf86CrtcPtr crtc, PixmapPtr ppix,
         return TRUE;
 
     ppriv = msGetPixmapPriv(drmmode, ppix);
-    if (!ppriv->slave_damage) {
-        ppriv->slave_damage = DamageCreate(NULL, NULL,
+    if (!ppriv->secondary_damage) {
+        ppriv->secondary_damage = DamageCreate(NULL, NULL,
                                            DamageReportNone,
                                            TRUE,
                                            crtc->randr_crtc->pScreen,
                                            NULL);
     }
-    ptr = drmmode_map_slave_bo(drmmode, ppriv);
+    ptr = drmmode_map_secondary_bo(drmmode, ppriv);
     ppix->devPrivate.ptr = ptr;
-    DamageRegister(&ppix->drawable, ppriv->slave_damage);
+    DamageRegister(&ppix->drawable, ppriv->secondary_damage);
 
     if (ppriv->fb_id == 0) {
         drmModeAddFB(drmmode->fd, ppix->drawable.width,
@@ -1802,6 +1914,14 @@ drmmode_clear_pixmap(PixmapPtr pixmap)
 {
     ScreenPtr screen = pixmap->drawable.pScreen;
     GCPtr gc;
+#ifdef GLAMOR_HAS_GBM
+    modesettingPtr ms = modesettingPTR(xf86ScreenToScrn(screen));
+
+    if (ms->drmmode.glamor) {
+        ms->glamor.clear_pixmap(pixmap);
+        return;
+    }
+#endif
 
     gc = GetScratchGC(pixmap->drawable.depth, screen);
     if (gc) {
@@ -1888,7 +2008,7 @@ drmmode_shadow_create(xf86CrtcPtr crtc, void *data, int width, int height)
     }
 
     pPixData = drmmode_bo_map(drmmode, &drmmode_crtc->rotate_bo);
-    rotate_pitch = drmmode_bo_get_pitch(&drmmode_crtc->rotate_bo),
+    rotate_pitch = drmmode_bo_get_pitch(&drmmode_crtc->rotate_bo);
 
     rotate_pixmap = drmmode_create_pixmap_header(scrn->pScreen,
                                                  width, height,
@@ -2188,17 +2308,66 @@ drmmode_crtc_create_planes(xf86CrtcPtr crtc, int num)
     drmModeFreePlaneResources(kplane_res);
 }
 
+static uint32_t
+drmmode_crtc_get_prop_id(uint32_t drm_fd,
+                         drmModeObjectPropertiesPtr props,
+                         char const* name)
+{
+    uint32_t i, prop_id = 0;
+
+    for (i = 0; !prop_id && i < props->count_props; ++i) {
+        drmModePropertyPtr drm_prop =
+                     drmModeGetProperty(drm_fd, props->props[i]);
+
+        if (!drm_prop)
+            continue;
+
+        if (strcmp(drm_prop->name, name) == 0)
+            prop_id = drm_prop->prop_id;
+
+        drmModeFreeProperty(drm_prop);
+    }
+
+    return prop_id;
+}
+
+static void
+drmmode_crtc_vrr_init(int drm_fd, xf86CrtcPtr crtc)
+{
+    drmModeObjectPropertiesPtr drm_props;
+    drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
+    drmmode_ptr drmmode = drmmode_crtc->drmmode;
+
+    if (drmmode->vrr_prop_id)
+        return;
+
+    drm_props = drmModeObjectGetProperties(drm_fd,
+                                           drmmode_crtc->mode_crtc->crtc_id,
+                                           DRM_MODE_OBJECT_CRTC);
+
+    if (!drm_props)
+        return;
+
+    drmmode->vrr_prop_id = drmmode_crtc_get_prop_id(drm_fd,
+                                                    drm_props,
+                                                    "VRR_ENABLED");
+
+    drmModeFreeObjectProperties(drm_props);
+}
+
 static unsigned int
 drmmode_crtc_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, drmModeResPtr mode_res, int num)
 {
     xf86CrtcPtr crtc;
     drmmode_crtc_private_ptr drmmode_crtc;
     modesettingEntPtr ms_ent = ms_ent_priv(pScrn);
-    modesettingPtr ms = modesettingPTR(pScrn);
     drmModeObjectPropertiesPtr props;
     static const drmmode_prop_info_rec crtc_props[] = {
         [DRMMODE_CRTC_ACTIVE] = { .name = "ACTIVE" },
         [DRMMODE_CRTC_MODE_ID] = { .name = "MODE_ID" },
+        [DRMMODE_CRTC_GAMMA_LUT] = { .name = "GAMMA_LUT" },
+        [DRMMODE_CRTC_GAMMA_LUT_SIZE] = { .name = "GAMMA_LUT_SIZE" },
+        [DRMMODE_CRTC_CTM] = { .name = "CTM" },
     };
 
     crtc = xf86CrtcCreate(pScrn, &drmmode_crtc_funcs);
@@ -2212,29 +2381,52 @@ drmmode_crtc_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, drmModeResPtr mode_res
     drmmode_crtc->vblank_pipe = drmmode_crtc_vblank_pipe(num);
     xorg_list_init(&drmmode_crtc->mode_list);
 
-    if (ms->atomic_modeset) {
-        props = drmModeObjectGetProperties(drmmode->fd, mode_res->crtcs[num],
-                                           DRM_MODE_OBJECT_CRTC);
-        if (!props || !drmmode_prop_info_copy(drmmode_crtc->props, crtc_props,
-                                              DRMMODE_CRTC__COUNT, 0)) {
-            xf86CrtcDestroy(crtc);
-            return 0;
-        }
-
-        drmmode_prop_info_update(drmmode, drmmode_crtc->props,
-                                 DRMMODE_CRTC__COUNT, props);
-        drmModeFreeObjectProperties(props);
-        drmmode_crtc_create_planes(crtc, num);
+    props = drmModeObjectGetProperties(drmmode->fd, mode_res->crtcs[num],
+                                       DRM_MODE_OBJECT_CRTC);
+    if (!props || !drmmode_prop_info_copy(drmmode_crtc->props, crtc_props,
+                                          DRMMODE_CRTC__COUNT, 0)) {
+        xf86CrtcDestroy(crtc);
+        return 0;
     }
 
+    drmmode_prop_info_update(drmmode, drmmode_crtc->props,
+                             DRMMODE_CRTC__COUNT, props);
+    drmModeFreeObjectProperties(props);
+    drmmode_crtc_create_planes(crtc, num);
+
     /* Hide any cursors which may be active from previous users */
     drmModeSetCursor(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id, 0, 0, 0);
 
+    drmmode_crtc_vrr_init(drmmode->fd, crtc);
+
     /* Mark num'th crtc as in use on this device. */
     ms_ent->assigned_crtcs |= (1 << num);
     xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, MS_LOGLEVEL_DEBUG,
                    "Allocated crtc nr. %d to this screen.\n", num);
 
+    if (drmmode_crtc->props[DRMMODE_CRTC_GAMMA_LUT_SIZE].prop_id &&
+        drmmode_crtc->props[DRMMODE_CRTC_GAMMA_LUT_SIZE].value) {
+        /*
+         * GAMMA_LUT property supported, and so far tested to be safe to use by
+         * default for lut sizes up to 4096 slots. Intel Tigerlake+ has some
+         * issues, and a large GAMMA_LUT with 262145 slots, so keep GAMMA_LUT
+         * off for large lut sizes by default for now.
+         */
+        drmmode_crtc->use_gamma_lut = drmmode_crtc->props[DRMMODE_CRTC_GAMMA_LUT_SIZE].value <= 4096;
+
+        /* Allow config override. */
+        drmmode_crtc->use_gamma_lut = xf86ReturnOptValBool(drmmode->Options,
+                                                           OPTION_USE_GAMMA_LUT,
+                                                           drmmode_crtc->use_gamma_lut);
+    } else {
+        drmmode_crtc->use_gamma_lut = FALSE;
+    }
+
+    if (drmmode_crtc->use_gamma_lut &&
+        drmmode_crtc->props[DRMMODE_CRTC_CTM].prop_id) {
+        drmmode->use_ctm = TRUE;
+    }
+
     return 1;
 }
 
@@ -2297,6 +2489,20 @@ drmmode_output_update_properties(xf86OutputPtr output)
             }
         }
     }
+
+    /* Update the CTM property */
+    if (drmmode_output->ctm_atom) {
+        err = RRChangeOutputProperty(output->randr_output,
+                                     drmmode_output->ctm_atom,
+                                     XA_INTEGER, 32, PropModeReplace, 18,
+                                     &drmmode_output->ctm,
+                                     FALSE, TRUE);
+        if (err != 0) {
+            xf86DrvMsg(output->scrn->scrnIndex, X_ERROR,
+                       "RRChangeOutputProperty error, %d\n", err);
+        }
+    }
+
 }
 
 static xf86OutputStatus
@@ -2649,6 +2855,31 @@ drmmode_output_create_resources(xf86OutputPtr output)
         }
     }
 
+    if (drmmode->use_ctm) {
+        Atom name = MakeAtom("CTM", 3, TRUE);
+
+        if (name != BAD_RESOURCE) {
+            drmmode_output->ctm_atom = name;
+
+            err = RRConfigureOutputProperty(output->randr_output, name,
+                                            FALSE, FALSE, TRUE, 0, NULL);
+            if (err != 0) {
+                xf86DrvMsg(output->scrn->scrnIndex, X_ERROR,
+                           "RRConfigureOutputProperty error, %d\n", err);
+            }
+
+            err = RRChangeOutputProperty(output->randr_output, name,
+                                         XA_INTEGER, 32, PropModeReplace, 18,
+                                         &ctm_identity, FALSE, FALSE);
+            if (err != 0) {
+                xf86DrvMsg(output->scrn->scrnIndex, X_ERROR,
+                           "RRChangeOutputProperty error, %d\n", err);
+            }
+
+            drmmode_output->ctm = ctm_identity;
+        }
+    }
+
     for (i = 0; i < drmmode_output->num_props; i++) {
         drmmode_prop_ptr p = &drmmode_output->props[i];
 
@@ -2771,6 +3002,21 @@ drmmode_output_set_property(xf86OutputPtr output, Atom property,
         }
     }
 
+    if (property == drmmode_output->ctm_atom) {
+        const size_t matrix_size = sizeof(drmmode_output->ctm);
+
+        if (value->type != XA_INTEGER || value->format != 32 ||
+            value->size * 4 != matrix_size)
+            return FALSE;
+
+        memcpy(&drmmode_output->ctm, value->data, matrix_size);
+
+        // Update the CRTC if there is one bound to this output.
+        if (output->crtc) {
+            drmmode_set_ctm(output->crtc, &drmmode_output->ctm);
+        }
+    }
+
     return TRUE;
 }
 
@@ -2898,6 +3144,40 @@ drmmode_create_name(ScrnInfoPtr pScrn, drmModeConnectorPtr koutput, char *name,
         snprintf(name, 32, "%s-%d", output_names[koutput->connector_type], koutput->connector_type_id);
 }
 
+static Bool
+drmmode_connector_check_vrr_capable(uint32_t drm_fd, int connector_id)
+{
+    uint32_t i;
+    Bool found = FALSE;
+    uint64_t prop_value = 0;
+    drmModeObjectPropertiesPtr props;
+    const char* prop_name = "VRR_CAPABLE";
+
+    props = drmModeObjectGetProperties(drm_fd, connector_id,
+                                    DRM_MODE_OBJECT_CONNECTOR);
+
+    for (i = 0; !found && i < props->count_props; ++i) {
+        drmModePropertyPtr drm_prop = drmModeGetProperty(drm_fd, props->props[i]);
+
+        if (!drm_prop)
+            continue;
+
+        if (strcasecmp(drm_prop->name, prop_name) == 0) {
+            prop_value = props->prop_values[i];
+            found = TRUE;
+        }
+
+        drmModeFreeProperty(drm_prop);
+    }
+
+    drmModeFreeObjectProperties(props);
+
+    if(found)
+        return prop_value ? TRUE : FALSE;
+
+    return FALSE;
+}
+
 static unsigned int
 drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, drmModeResPtr mode_res, int num, Bool dynamic, int crtcshift)
 {
@@ -2997,9 +3277,9 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, drmModeResPtr mode_r
     output->driver_private = drmmode_output;
     output->non_desktop = nonDesktop;
 
-    output->possible_crtcs = 0x7f;
+    output->possible_crtcs = 0;
     for (i = 0; i < koutput->count_encoders; i++) {
-        output->possible_crtcs &= kencoders[i]->possible_crtcs >> crtcshift;
+        output->possible_crtcs |= (kencoders[i]->possible_crtcs >> crtcshift) & 0x7f;
     }
     /* work out the possible clones later */
     output->possible_clones = 0;
@@ -3021,8 +3301,17 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, drmModeResPtr mode_r
                                 "DPMS");
     }
 
-    if (dynamic)
+    if (dynamic) {
         output->randr_output = RROutputCreate(xf86ScrnToScreen(pScrn), output->name, strlen(output->name), output);
+        if (output->randr_output) {
+            drmmode_output_create_resources(output);
+            RRPostPendingProperties(output->randr_output);
+        }
+    }
+
+    ms->is_connector_vrr_capable |=
+	         drmmode_connector_check_vrr_capable(drmmode->fd,
+                                                  drmmode_output->output_id);
     return 1;
 
  out_free_encoders:
@@ -3102,12 +3391,13 @@ drmmode_set_pixmap_bo(drmmode_ptr drmmode, PixmapPtr pixmap, drmmode_bo *bo)
 {
 #ifdef GLAMOR_HAS_GBM
     ScrnInfoPtr scrn = drmmode->scrn;
+    modesettingPtr ms = modesettingPTR(scrn);
 
     if (!drmmode->glamor)
         return TRUE;
 
-    if (!glamor_egl_create_textured_pixmap_from_gbm_bo(pixmap, bo->gbm,
-                                                       bo->used_modifiers)) {
+    if (!ms->glamor.egl_create_textured_pixmap_from_gbm_bo(pixmap, bo->gbm,
+                                                           bo->used_modifiers)) {
         xf86DrvMsg(scrn->scrnIndex, X_ERROR, "Failed to create pixmap\n");
         return FALSE;
     }
@@ -3430,13 +3720,14 @@ drmmode_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode)
 {
 #ifdef GLAMOR_HAS_GBM
     ScreenPtr pScreen = xf86ScrnToScreen(pScrn);
+    modesettingPtr ms = modesettingPTR(pScrn);
 
     if (drmmode->glamor) {
-        if (!glamor_init(pScreen, GLAMOR_USE_EGL_SCREEN)) {
+        if (!ms->glamor.init(pScreen, GLAMOR_USE_EGL_SCREEN)) {
             return FALSE;
         }
 #ifdef GBM_BO_WITH_MODIFIERS
-        glamor_set_drawable_modifiers_func(pScreen, get_drawable_modifiers);
+        ms->glamor.set_drawable_modifiers_func(pScreen, get_drawable_modifiers);
 #endif
     }
 #endif
@@ -3600,15 +3891,64 @@ drmmode_load_palette(ScrnInfoPtr pScrn, int numColors,
     }
 }
 
+static Bool
+drmmode_crtc_upgrade_lut(xf86CrtcPtr crtc, int num)
+{
+    drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
+    uint64_t size;
+
+    if (!drmmode_crtc->use_gamma_lut)
+        return TRUE;
+
+    assert(drmmode_crtc->props[DRMMODE_CRTC_GAMMA_LUT_SIZE].prop_id);
+
+    size = drmmode_crtc->props[DRMMODE_CRTC_GAMMA_LUT_SIZE].value;
+
+    if (size != crtc->gamma_size) {
+        ScrnInfoPtr pScrn = crtc->scrn;
+        uint16_t *gamma = malloc(3 * size * sizeof(uint16_t));
+
+        if (gamma) {
+            free(crtc->gamma_red);
+
+            crtc->gamma_size = size;
+            crtc->gamma_red = gamma;
+            crtc->gamma_green = gamma + size;
+            crtc->gamma_blue = gamma + size * 2;
+
+            xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, MS_LOGLEVEL_DEBUG,
+                           "Gamma ramp set to %ld entries on CRTC %d\n",
+                           size, num);
+        } else {
+            xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+                       "Failed to allocate memory for %ld gamma ramp entries "
+                       "on CRTC %d.\n",
+                       size, num);
+            return FALSE;
+        }
+    }
+
+    return TRUE;
+}
+
 Bool
 drmmode_setup_colormap(ScreenPtr pScreen, ScrnInfoPtr pScrn)
 {
-    xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 0,
-                   "Initializing kms color map for depth %d, %d bpc.\n",
-                   pScrn->depth, pScrn->rgbBits);
+    xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
+    int i;
+
+    xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+              "Initializing kms color map for depth %d, %d bpc.\n",
+              pScrn->depth, pScrn->rgbBits);
     if (!miCreateDefColormap(pScreen))
         return FALSE;
 
+    /* If the GAMMA_LUT property is available, replace the server's default
+     * gamma ramps with ones of the appropriate size. */
+    for (i = 0; i < xf86_config->num_crtc; i++)
+        if (!drmmode_crtc_upgrade_lut(xf86_config->crtc[i], i))
+            return FALSE;
+
     /* Adapt color map size and depth to color depth of screen. */
     if (!xf86HandleColormaps(pScreen, 1 << pScrn->rgbBits, 10,
                              drmmode_load_palette, NULL,
@@ -3853,7 +4193,7 @@ drmmode_map_front_bo(drmmode_ptr drmmode)
 }
 
 void *
-drmmode_map_slave_bo(drmmode_ptr drmmode, msPixmapPrivPtr ppriv)
+drmmode_map_secondary_bo(drmmode_ptr drmmode, msPixmapPrivPtr ppriv)
 {
     int ret;
 
@@ -3959,9 +4299,26 @@ drmmode_get_default_bpp(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int *depth,
     return;
 }
 
+void
+drmmode_crtc_set_vrr(xf86CrtcPtr crtc, Bool enabled)
+{
+    ScrnInfoPtr pScrn = crtc->scrn;
+    modesettingPtr ms = modesettingPTR(pScrn);
+    drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
+    drmmode_ptr drmmode = drmmode_crtc->drmmode;
+
+    if (drmmode->vrr_prop_id && drmmode_crtc->vrr_enabled != enabled &&
+        drmModeObjectSetProperty(ms->fd,
+                                 drmmode_crtc->mode_crtc->crtc_id,
+                                 DRM_MODE_OBJECT_CRTC,
+                                 drmmode->vrr_prop_id,
+                                 enabled) == 0)
+        drmmode_crtc->vrr_enabled = enabled;
+}
+
 /*
  * We hook the screen's cursor-sprite (swcursor) functions to see if a swcursor
- * is active. When a swcursor is active we disabe page-flipping.
+ * is active. When a swcursor is active we disable page-flipping.
  */
 
 static void drmmode_sprite_do_set_cursor(msSpritePrivPtr sprite_priv,
diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.h b/hw/xfree86/drivers/modesetting/drmmode_display.h
index 59d79e9..29f9b8f 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.h
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.h
@@ -1,5 +1,6 @@
 /*
  * Copyright © 2007 Red Hat, Inc.
+ * Copyright © 2019 NVIDIA CORPORATION
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
@@ -22,6 +23,7 @@
  *
  * Authors:
  *     Dave Airlie <airlied@redhat.com>
+ *     Aaron Plattner <aplattner@nvidia.com>
  *
  */
 #ifndef DRMMODE_DISPLAY_H
@@ -67,6 +69,9 @@ enum drmmode_connector_property {
 enum drmmode_crtc_property {
     DRMMODE_CRTC_ACTIVE,
     DRMMODE_CRTC_MODE_ID,
+    DRMMODE_CRTC_GAMMA_LUT,
+    DRMMODE_CRTC_GAMMA_LUT_SIZE,
+    DRMMODE_CRTC_CTM,
     DRMMODE_CRTC__COUNT
 };
 
@@ -112,6 +117,7 @@ typedef struct {
 
     DevPrivateKeyRec pixmapPrivateKeyRec;
     DevScreenPrivateKeyRec spritePrivateKeyRec;
+    DevPrivateKeyRec vrrPrivateKeyRec;
     /* Number of SW cursors currently visible on this screen */
     int sprites_visible;
 
@@ -123,9 +129,15 @@ typedef struct {
 
     Bool dri2_flipping;
     Bool present_flipping;
+    Bool flip_bo_import_failed;
 
+    Bool can_async_flip;
+    Bool async_flip_secondaries;
     Bool dri2_enable;
     Bool present_enable;
+
+    uint32_t vrr_prop_id;
+    Bool use_ctm;
 } drmmode_rec, *drmmode_ptr;
 
 typedef struct {
@@ -137,6 +149,7 @@ typedef struct {
 typedef struct {
     const char *name;
     uint32_t prop_id;
+    uint64_t value;
     unsigned int num_enum_values;
     drmmode_prop_enum_info_rec *enum_values;
 } drmmode_prop_info_rec, *drmmode_prop_info_ptr;
@@ -192,6 +205,9 @@ typedef struct {
 
     Bool enable_flipping;
     Bool flipping_active;
+
+    Bool vrr_enabled;
+    Bool use_gamma_lut;
 } drmmode_crtc_private_rec, *drmmode_crtc_private_ptr;
 
 typedef struct {
@@ -216,6 +232,8 @@ typedef struct {
     int enc_mask;
     int enc_clone_mask;
     xf86CrtcPtr current_crtc;
+    Atom ctm_atom;
+    struct drm_color_ctm ctm;
 } drmmode_output_private_rec, *drmmode_output_private_ptr;
 
 typedef struct {
@@ -226,7 +244,7 @@ typedef struct _msPixmapPriv {
     uint32_t fb_id;
     struct dumb_bo *backing_bo; /* if this pixmap is backed by a dumb bo */
 
-    DamagePtr slave_damage;
+    DamagePtr secondary_damage;
 
     /** Sink fields for flipping shared pixmaps */
     int flip_seq; /* seq of current page flip event handler */
@@ -235,14 +253,10 @@ typedef struct _msPixmapPriv {
     /** Source fields for flipping shared pixmaps */
     Bool defer_dirty_update; /* if we want to manually update */
     PixmapDirtyUpdatePtr dirty; /* cached dirty ent to avoid searching list */
-    DrawablePtr slave_src; /* if we exported shared pixmap, dirty tracking src */
+    DrawablePtr secondary_src; /* if we exported shared pixmap, dirty tracking src */
     Bool notify_on_damage; /* if sink has requested damage notification */
 } msPixmapPrivRec, *msPixmapPrivPtr;
 
-extern DevPrivateKeyRec msPixmapPrivateKeyRec;
-
-#define msPixmapPrivateKey (&msPixmapPrivateKeyRec)
-
 #define msGetPixmapPriv(drmmode, p) ((msPixmapPrivPtr)dixGetPrivateAddr(&(p)->devPrivates, &(drmmode)->pixmapPrivateKeyRec))
 
 typedef struct _msSpritePriv {
@@ -262,7 +276,7 @@ int drmmode_bo_destroy(drmmode_ptr drmmode, drmmode_bo *bo);
 uint32_t drmmode_bo_get_pitch(drmmode_bo *bo);
 uint32_t drmmode_bo_get_handle(drmmode_bo *bo);
 Bool drmmode_glamor_handle_new_screen_pixmap(drmmode_ptr drmmode);
-void *drmmode_map_slave_bo(drmmode_ptr drmmode, msPixmapPrivPtr ppriv);
+void *drmmode_map_secondary_bo(drmmode_ptr drmmode, msPixmapPrivPtr ppriv);
 Bool drmmode_SetSlaveBO(PixmapPtr ppix,
                         drmmode_ptr drmmode,
                         int fd_handle, int pitch, int size);
@@ -298,5 +312,6 @@ void drmmode_copy_fb(ScrnInfoPtr pScrn, drmmode_ptr drmmode);
 int drmmode_crtc_flip(xf86CrtcPtr crtc, uint32_t fb_id, uint32_t flags, void *data);
 
 void drmmode_set_dpms(ScrnInfoPtr scrn, int PowerManagementMode, int flags);
+void drmmode_crtc_set_vrr(xf86CrtcPtr crtc, Bool enabled);
 
 #endif
diff --git a/hw/xfree86/drivers/modesetting/meson.build b/hw/xfree86/drivers/modesetting/meson.build
index 5e13f1a..02852a7 100644
--- a/hw/xfree86/drivers/modesetting/meson.build
+++ b/hw/xfree86/drivers/modesetting/meson.build
@@ -30,7 +30,6 @@ shared_module(
 xorg_build_root = join_paths(meson.build_root(), 'hw', 'xfree86')
 symbol_test_args = []
 symbol_test_args += join_paths(xorg_build_root, 'libxorgserver.so')
-symbol_test_args += join_paths(xorg_build_root, 'dixmods', 'libfb.so')
 symbol_test_args += join_paths(xorg_build_root, 'dixmods', 'libshadow.so')
 if gbm_dep.found()
     symbol_test_args += join_paths(xorg_build_root, 'glamor_egl', 'libglamoregl.so')
diff --git a/hw/xfree86/drivers/modesetting/modesetting.man b/hw/xfree86/drivers/modesetting/modesetting.man
index d530d7c..7179001 100644
--- a/hw/xfree86/drivers/modesetting/modesetting.man
+++ b/hw/xfree86/drivers/modesetting/modesetting.man
@@ -71,6 +71,28 @@ One of \*qglamor\*q or \*qnone\*q.  Default: glamor.
 Enable DRI3 page flipping.  The default is
 .B on.
 .TP
+.BI "Option \*qVariableRefresh\*q \*q" boolean \*q
+Enables support for enabling variable refresh on the Screen's CRTCs
+when an suitable application is flipping via the Present extension.
+.br
+The default is
+.B off.
+.TP
+.BI "Option \*qAsyncFlipSecondaries\*q \*q" boolean \*q
+Use async flips for secondary video outputs on multi-display setups. If a screen
+has multiple displays attached and DRI3 page flipping is used, then only one of
+the displays will have its page flip synchronized to vblank for tear-free
+presentation. This is the display that is used for presentation timing and
+timestamping, usually the one covering the biggest pixel area of the screen.
+All other displays ("Secondaries") will not synchronize their flips. This may
+cause some tearing on these displays, but it prevents a permanent or periodic
+slowdown or irritating judder of animations if not all video outputs are running
+synchronized with each other and with the same refresh rate. There is no perfect
+solution apart from perfectly synchronized outputs, but this option may give
+preferrable results if the displays in a multi-display setup mirror or clone
+each other.  The default is
+.B off.
+.TP
 .BI "Option \*qZaphodHeads\*q \*q" string \*q
 Specify the RandR output(s) to use with zaphod mode for a particular driver
 instance.  If you use this option you must use this option for all instances
@@ -81,6 +103,12 @@ For example:
 Option \*qZaphodHeads\*q \*qLVDS,VGA-0\*q
 will assign xrandr outputs LVDS and VGA-0 to this instance of the driver.
 .TP
+.BI "Option \*qUseGammaLUT\*q \*q" boolean \*q
+Enable or disable use of the GAMMA_LUT property, when available.
+When enabled, this option allows the driver to use gamma ramps with more
+entries, if supported by the kernel. By default, GAMMA_LUT will be used for
+kms drivers which are known to be safe for use of GAMMA_LUT.
+.TP
 .SH "SEE ALSO"
 @xservername@(@appmansuffix@), @xconfigfile@(@filemansuffix@), Xserver(@appmansuffix@),
 X(@miscmansuffix@)
diff --git a/hw/xfree86/drivers/modesetting/pageflip.c b/hw/xfree86/drivers/modesetting/pageflip.c
index 9667f13..23ee95f 100644
--- a/hw/xfree86/drivers/modesetting/pageflip.c
+++ b/hw/xfree86/drivers/modesetting/pageflip.c
@@ -85,7 +85,7 @@ struct ms_flipdata {
 };
 
 /*
- * Per crtc pageflipping infomation,
+ * Per crtc pageflipping information,
  * These are submitted to the queuing code
  * one of them per crtc per flip.
  */
@@ -167,7 +167,14 @@ do_queue_flip_on_crtc(modesettingPtr ms, xf86CrtcPtr crtc,
                              (void *) (uintptr_t) seq);
 }
 
-static Bool
+enum queue_flip_status {
+    QUEUE_FLIP_SUCCESS,
+    QUEUE_FLIP_ALLOC_FAILED,
+    QUEUE_FLIP_QUEUE_ALLOC_FAILED,
+    QUEUE_FLIP_DRM_FLUSH_FAILED,
+};
+
+static int
 queue_flip_on_crtc(ScreenPtr screen, xf86CrtcPtr crtc,
                    struct ms_flipdata *flipdata,
                    int ref_crtc_vblank_pipe, uint32_t flags)
@@ -177,13 +184,10 @@ queue_flip_on_crtc(ScreenPtr screen, xf86CrtcPtr crtc,
     drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
     struct ms_crtc_pageflip *flip;
     uint32_t seq;
-    int err;
 
     flip = calloc(1, sizeof(struct ms_crtc_pageflip));
     if (flip == NULL) {
-        xf86DrvMsg(scrn->scrnIndex, X_WARNING,
-                   "flip queue: carrier alloc failed.\n");
-        return FALSE;
+        return QUEUE_FLIP_ALLOC_FAILED;
     }
 
     /* Only the reference crtc will finally deliver its page flip
@@ -195,32 +199,99 @@ queue_flip_on_crtc(ScreenPtr screen, xf86CrtcPtr crtc,
     seq = ms_drm_queue_alloc(crtc, flip, ms_pageflip_handler, ms_pageflip_abort);
     if (!seq) {
         free(flip);
-        return FALSE;
+        return QUEUE_FLIP_QUEUE_ALLOC_FAILED;
     }
 
     /* take a reference on flipdata for use in flip */
     flipdata->flip_count++;
 
     while (do_queue_flip_on_crtc(ms, crtc, flags, seq)) {
-        err = errno;
         /* We may have failed because the event queue was full.  Flush it
          * and retry.  If there was nothing to flush, then we failed for
          * some other reason and should just return an error.
          */
         if (ms_flush_drm_events(screen) <= 0) {
-            xf86DrvMsg(scrn->scrnIndex, X_WARNING,
-                       "flip queue failed: %s\n", strerror(err));
             /* Aborting will also decrement flip_count and free(flip). */
             ms_drm_abort_seq(scrn, seq);
-            return FALSE;
+            return QUEUE_FLIP_DRM_FLUSH_FAILED;
         }
 
         /* We flushed some events, so try again. */
         xf86DrvMsg(scrn->scrnIndex, X_WARNING, "flip queue retry\n");
     }
 
-    /* The page flip succeded. */
-    return TRUE;
+    /* The page flip succeeded. */
+    return QUEUE_FLIP_SUCCESS;
+}
+
+
+#define MS_ASYNC_FLIP_LOG_ENABLE_LOGS_INTERVAL_MS 10000
+#define MS_ASYNC_FLIP_LOG_FREQUENT_LOGS_INTERVAL_MS 1000
+#define MS_ASYNC_FLIP_FREQUENT_LOG_COUNT 10
+
+static void
+ms_print_pageflip_error(int screen_index, const char *log_prefix,
+                        int crtc_index, int flags, int err)
+{
+    /* In certain circumstances we will have a lot of flip errors without a
+     * reasonable way to prevent them. In such case we reduce the number of
+     * logged messages to at least not fill the error logs.
+     *
+     * The details are as follows:
+     *
+     * At least on i915 hardware support for async page flip support depends
+     * on the used modifiers which themselves can change dynamically for a
+     * screen. This results in the following problems:
+     *
+     *  - We can't know about whether a particular CRTC will be able to do an
+     *    async flip without hardcoding the same logic as the kernel as there's
+     *    no interface to query this information.
+     *
+     *  - There is no way to give this information to an application, because
+     *    the protocol of the present extension does not specify anything about
+     *    changing of the capabilities on runtime or the need to re-query them.
+     *
+     * Even if the above was solved, the only benefit would be avoiding a
+     * roundtrip to the kernel and reduced amount of error logs. The former
+     * does not seem to be a good enough benefit compared to the amount of work
+     * that would need to be done. The latter is solved below. */
+
+    static CARD32 error_last_time_ms;
+    static int frequent_logs;
+    static Bool logs_disabled;
+
+    if (flags & DRM_MODE_PAGE_FLIP_ASYNC) {
+        CARD32 curr_time_ms = GetTimeInMillis();
+        int clocks_since_last_log = curr_time_ms - error_last_time_ms;
+
+        if (clocks_since_last_log >
+                MS_ASYNC_FLIP_LOG_ENABLE_LOGS_INTERVAL_MS) {
+            frequent_logs = 0;
+            logs_disabled = FALSE;
+        }
+        if (!logs_disabled) {
+            if (clocks_since_last_log <
+                    MS_ASYNC_FLIP_LOG_FREQUENT_LOGS_INTERVAL_MS) {
+                frequent_logs++;
+            }
+
+            if (frequent_logs > MS_ASYNC_FLIP_FREQUENT_LOG_COUNT) {
+                xf86DrvMsg(screen_index, X_WARNING,
+                           "%s: detected too frequent flip errors, disabling "
+                           "logs until frequency is reduced\n", log_prefix);
+                logs_disabled = TRUE;
+            } else {
+                xf86DrvMsg(screen_index, X_WARNING,
+                           "%s: queue async flip during flip on CRTC %d failed: %s\n",
+                           log_prefix, crtc_index, strerror(err));
+            }
+        }
+        error_last_time_ms = curr_time_ms;
+    } else {
+        xf86DrvMsg(screen_index, X_WARNING,
+                   "%s: queue flip during flip on CRTC %d failed: %s\n",
+                   log_prefix, crtc_index, strerror(err));
+    }
 }
 
 
@@ -231,7 +302,8 @@ ms_do_pageflip(ScreenPtr screen,
                int ref_crtc_vblank_pipe,
                Bool async,
                ms_pageflip_handler_proc pageflip_handler,
-               ms_pageflip_abort_proc pageflip_abort)
+               ms_pageflip_abort_proc pageflip_abort,
+               const char *log_prefix)
 {
 #ifndef GLAMOR_HAS_GBM
     return FALSE;
@@ -243,14 +315,15 @@ ms_do_pageflip(ScreenPtr screen,
     uint32_t flags;
     int i;
     struct ms_flipdata *flipdata;
-    glamor_block_handler(screen);
+    ms->glamor.block_handler(screen);
 
-    new_front_bo.gbm = glamor_gbm_bo_from_pixmap(screen, new_front);
+    new_front_bo.gbm = ms->glamor.gbm_bo_from_pixmap(screen, new_front);
     new_front_bo.dumb = NULL;
 
     if (!new_front_bo.gbm) {
         xf86DrvMsg(scrn->scrnIndex, X_ERROR,
-                   "Failed to get GBM bo for flip to new front.\n");
+                   "%s: Failed to get GBM BO for flip to new front.\n",
+                   log_prefix);
         return FALSE;
     }
 
@@ -258,7 +331,7 @@ ms_do_pageflip(ScreenPtr screen,
     if (!flipdata) {
         drmmode_bo_destroy(&ms->drmmode, &new_front_bo);
         xf86DrvMsg(scrn->scrnIndex, X_ERROR,
-                   "Failed to allocate flipdata.\n");
+                   "%s: Failed to allocate flipdata.\n", log_prefix);
         return FALSE;
     }
 
@@ -271,7 +344,7 @@ ms_do_pageflip(ScreenPtr screen,
      * Take a local reference on flipdata.
      * if the first flip fails, the sequence abort
      * code will free the crtc flip data, and drop
-     * it's reference which would cause this to be
+     * its reference which would cause this to be
      * freed when we still required it.
      */
     flipdata->flip_count++;
@@ -282,12 +355,18 @@ ms_do_pageflip(ScreenPtr screen,
     new_front_bo.width = new_front->drawable.width;
     new_front_bo.height = new_front->drawable.height;
     if (drmmode_bo_import(&ms->drmmode, &new_front_bo,
-                          &ms->drmmode.fb_id))
+                          &ms->drmmode.fb_id)) {
+        if (!ms->drmmode.flip_bo_import_failed) {
+            xf86DrvMsg(scrn->scrnIndex, X_WARNING, "%s: Import BO failed: %s\n",
+                       log_prefix, strerror(errno));
+            ms->drmmode.flip_bo_import_failed = TRUE;
+        }
         goto error_out;
-
-    flags = DRM_MODE_PAGE_FLIP_EVENT;
-    if (async)
-        flags |= DRM_MODE_PAGE_FLIP_ASYNC;
+    } else {
+        if (ms->drmmode.flip_bo_import_failed &&
+            new_front != screen->GetScreenPixmap(screen))
+            ms->drmmode.flip_bo_import_failed = FALSE;
+    }
 
     /* Queue flips on all enabled CRTCs.
      *
@@ -299,15 +378,53 @@ ms_do_pageflip(ScreenPtr screen,
      * may never complete; this is a configuration error.
      */
     for (i = 0; i < config->num_crtc; i++) {
+        enum queue_flip_status flip_status;
         xf86CrtcPtr crtc = config->crtc[i];
+        drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
 
-        if (!ms_crtc_on(crtc))
+        if (!xf86_crtc_on(crtc))
             continue;
 
-        if (!queue_flip_on_crtc(screen, crtc, flipdata,
-                                ref_crtc_vblank_pipe,
-                                flags)) {
-            goto error_undo;
+        flags = DRM_MODE_PAGE_FLIP_EVENT;
+        if (ms->drmmode.can_async_flip && async)
+            flags |= DRM_MODE_PAGE_FLIP_ASYNC;
+
+        /*
+         * If this is not the reference crtc used for flip timing and flip event
+         * delivery and timestamping, ie. not the one whose presentation timing
+         * we do really care about, and async flips are possible, and requested
+         * by an xorg.conf option, then we flip this "secondary" crtc without
+         * sync to vblank. This may cause tearing on such "secondary" outputs,
+         * but it will prevent throttling of multi-display flips to the refresh
+         * cycle of any of the secondary crtcs, avoiding periodic slowdowns and
+         * judder caused by unsynchronized outputs. This is especially useful for
+         * outputs in a "clone-mode" or "mirror-mode" configuration.
+         */
+        if (ms->drmmode.can_async_flip && ms->drmmode.async_flip_secondaries &&
+            (drmmode_crtc->vblank_pipe != ref_crtc_vblank_pipe) &&
+            (ref_crtc_vblank_pipe >= 0))
+            flags |= DRM_MODE_PAGE_FLIP_ASYNC;
+
+        flip_status = queue_flip_on_crtc(screen, crtc, flipdata,
+                                         ref_crtc_vblank_pipe,
+                                         flags);
+
+        switch (flip_status) {
+            case QUEUE_FLIP_ALLOC_FAILED:
+                xf86DrvMsg(scrn->scrnIndex, X_WARNING,
+                           "%s: carrier alloc for queue flip on CRTC %d failed.\n",
+                           log_prefix, i);
+                goto error_undo;
+            case QUEUE_FLIP_QUEUE_ALLOC_FAILED:
+                xf86DrvMsg(scrn->scrnIndex, X_WARNING,
+                           "%s: entry alloc for queue flip on CRTC %d failed.\n",
+                           log_prefix, i);
+                goto error_undo;
+            case QUEUE_FLIP_DRM_FLUSH_FAILED:
+                ms_print_pageflip_error(scrn->scrnIndex, log_prefix, i, flags, errno);
+                goto error_undo;
+            case QUEUE_FLIP_SUCCESS:
+                break;
         }
     }
 
@@ -336,8 +453,6 @@ error_undo:
     }
 
 error_out:
-    xf86DrvMsg(scrn->scrnIndex, X_WARNING, "Page flip failed: %s\n",
-               strerror(errno));
     drmmode_bo_destroy(&ms->drmmode, &new_front_bo);
     /* if only the local reference - free the structure,
      * else drop the local reference and return */
diff --git a/hw/xfree86/drivers/modesetting/present.c b/hw/xfree86/drivers/modesetting/present.c
index 009a079..c3266d8 100644
--- a/hw/xfree86/drivers/modesetting/present.c
+++ b/hw/xfree86/drivers/modesetting/present.c
@@ -70,6 +70,22 @@ ms_present_get_ust_msc(RRCrtcPtr crtc, CARD64 *ust, CARD64 *msc)
     return ms_get_crtc_ust_msc(xf86_crtc, ust, msc);
 }
 
+/*
+ * Changes the variable refresh state for every CRTC on the screen.
+ */
+void
+ms_present_set_screen_vrr(ScrnInfoPtr scrn, Bool vrr_enabled)
+{
+    xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn);
+    xf86CrtcPtr crtc;
+    int i;
+
+    for (i = 0; i < config->num_crtc; i++) {
+        crtc = config->crtc[i];
+        drmmode_crtc_set_vrr(crtc, vrr_enabled);
+    }
+}
+
 /*
  * Called when the queued vblank event has occurred
  */
@@ -126,9 +142,8 @@ ms_present_queue_vblank(RRCrtcPtr crtc,
     if (!ms_queue_vblank(xf86_crtc, MS_QUEUE_ABSOLUTE, msc, NULL, seq))
         return BadAlloc;
 
-    DebugPresent(("\t\tmq %lld seq %u msc %llu (hw msc %u)\n",
-                 (long long) event_id, seq, (long long) msc,
-                 vbl.request.sequence));
+    DebugPresent(("\t\tmq %lld seq %u msc %llu\n",
+                 (long long) event_id, seq, (long long) msc));
     return Success;
 }
 
@@ -166,7 +181,7 @@ ms_present_flush(WindowPtr window)
     modesettingPtr ms = modesettingPTR(scrn);
 
     if (ms->drmmode.glamor)
-        glamor_block_handler(screen);
+        ms->glamor.block_handler(screen);
 #endif
 }
 
@@ -244,7 +259,7 @@ ms_present_check_unflip(RRCrtcPtr crtc,
         if (drmmode_crtc->rotate_bo.gbm)
             return FALSE;
 
-        if (ms_crtc_on(config->crtc[i]))
+        if (xf86_crtc_on(config->crtc[i]))
             num_crtcs_on++;
     }
 
@@ -252,14 +267,20 @@ ms_present_check_unflip(RRCrtcPtr crtc,
     if (num_crtcs_on == 0)
         return FALSE;
 
-    /* Check stride, can't change that on flip */
-    if (!ms->atomic_modeset &&
+    /*
+     * Check stride, can't change that reliably on flip on some drivers, unless
+     * the kms driver is atomic_modeset_capable.
+     */
+    if (!ms->atomic_modeset_capable &&
         pixmap->devKind != drmmode_bo_get_pitch(&ms->drmmode.front_bo))
         return FALSE;
 
+    if (!ms->drmmode.glamor)
+        return FALSE;
+
 #ifdef GBM_BO_WITH_MODIFIERS
     /* Check if buffer format/modifier is supported by all active CRTCs */
-    gbm = glamor_gbm_bo_from_pixmap(screen, pixmap);
+    gbm = ms->glamor.gbm_bo_from_pixmap(screen, pixmap);
     if (gbm) {
         uint32_t format;
         uint64_t modifier;
@@ -299,7 +320,12 @@ ms_present_check_flip(RRCrtcPtr crtc,
     if (ms->drmmode.sprites_visible > 0)
         return FALSE;
 
-    return ms_present_check_unflip(crtc, window, pixmap, sync_flip, reason);
+    if(!ms_present_check_unflip(crtc, window, pixmap, sync_flip, reason))
+        return FALSE;
+
+    ms->flip_window = window;
+
+    return TRUE;
 }
 
 /*
@@ -321,7 +347,7 @@ ms_present_flip(RRCrtcPtr crtc,
     Bool ret;
     struct ms_present_vblank_event *event;
 
-    if (!ms_present_check_flip(crtc, screen->root, pixmap, sync_flip, NULL))
+    if (!ms_present_check_flip(crtc, ms->flip_window, pixmap, sync_flip, NULL))
         return FALSE;
 
     event = calloc(1, sizeof(struct ms_present_vblank_event));
@@ -334,11 +360,21 @@ ms_present_flip(RRCrtcPtr crtc,
     event->event_id = event_id;
     event->unflip = FALSE;
 
+    /* A window can only flip if it covers the entire X screen.
+     * Only one window can flip at a time.
+     *
+     * If the window also has the variable refresh property then
+     * variable refresh supported can be enabled on every CRTC.
+     */
+    if (ms->vrr_support && ms->is_connector_vrr_capable &&
+          ms_window_has_variable_refresh(ms, ms->flip_window)) {
+        ms_present_set_screen_vrr(scrn, TRUE);
+    }
+
     ret = ms_do_pageflip(screen, pixmap, event, drmmode_crtc->vblank_pipe, !sync_flip,
-                         ms_present_flip_handler, ms_present_flip_abort);
-    if (!ret)
-        xf86DrvMsg(scrn->scrnIndex, X_ERROR, "present flip failed\n");
-    else
+                         ms_present_flip_handler, ms_present_flip_abort,
+                         "Present-flip");
+    if (ret)
         ms->drmmode.present_flipping = TRUE;
 
     return ret;
@@ -357,6 +393,8 @@ ms_present_unflip(ScreenPtr screen, uint64_t event_id)
     int i;
     struct ms_present_vblank_event *event;
 
+    ms_present_set_screen_vrr(scrn, FALSE);
+
     event = calloc(1, sizeof(struct ms_present_vblank_event));
     if (!event)
         return;
@@ -366,7 +404,8 @@ ms_present_unflip(ScreenPtr screen, uint64_t event_id)
 
     if (ms_present_check_unflip(NULL, screen->root, pixmap, TRUE, NULL) &&
         ms_do_pageflip(screen, pixmap, event, -1, FALSE,
-                       ms_present_flip_handler, ms_present_flip_abort)) {
+                       ms_present_flip_handler, ms_present_flip_abort,
+                       "Present-unflip")) {
         return;
     }
 
@@ -425,8 +464,10 @@ ms_present_screen_init(ScreenPtr screen)
     int ret;
 
     ret = drmGetCap(ms->fd, DRM_CAP_ASYNC_PAGE_FLIP, &value);
-    if (ret == 0 && value == 1)
+    if (ret == 0 && value == 1) {
         ms_present_screen_info.capabilities |= PresentCapabilityAsync;
+        ms->drmmode.can_async_flip = TRUE;
+    }
 
     return present_screen_init(screen, &ms_present_screen_info);
 }
diff --git a/hw/xfree86/drivers/modesetting/vblank.c b/hw/xfree86/drivers/modesetting/vblank.c
index 50d2fd3..ea9e7a8 100644
--- a/hw/xfree86/drivers/modesetting/vblank.c
+++ b/hw/xfree86/drivers/modesetting/vblank.c
@@ -49,7 +49,7 @@
 static struct xorg_list ms_drm_queue;
 static uint32_t ms_drm_seq;
 
-static void ms_box_intersect(BoxPtr dest, BoxPtr a, BoxPtr b)
+static void box_intersect(BoxPtr dest, BoxPtr a, BoxPtr b)
 {
     dest->x1 = a->x1 > b->x1 ? a->x1 : b->x1;
     dest->x2 = a->x2 < b->x2 ? a->x2 : b->x2;
@@ -64,20 +64,7 @@ static void ms_box_intersect(BoxPtr dest, BoxPtr a, BoxPtr b)
         dest->x1 = dest->x2 = dest->y1 = dest->y2 = 0;
 }
 
-static void ms_crtc_box(xf86CrtcPtr crtc, BoxPtr crtc_box)
-{
-    if (crtc->enabled) {
-        crtc_box->x1 = crtc->x;
-        crtc_box->x2 =
-            crtc->x + xf86ModeWidth(&crtc->mode, crtc->rotation);
-        crtc_box->y1 = crtc->y;
-        crtc_box->y2 =
-            crtc->y + xf86ModeHeight(&crtc->mode, crtc->rotation);
-    } else
-        crtc_box->x1 = crtc_box->x2 = crtc_box->y1 = crtc_box->y2 = 0;
-}
-
-static void ms_randr_crtc_box(RRCrtcPtr crtc, BoxPtr crtc_box)
+static void rr_crtc_box(RRCrtcPtr crtc, BoxPtr crtc_box)
 {
     if (crtc->mode) {
         crtc_box->x1 = crtc->x;
@@ -99,133 +86,45 @@ static void ms_randr_crtc_box(RRCrtcPtr crtc, BoxPtr crtc_box)
         crtc_box->x1 = crtc_box->x2 = crtc_box->y1 = crtc_box->y2 = 0;
 }
 
-static int ms_box_area(BoxPtr box)
+static int box_area(BoxPtr box)
 {
     return (int)(box->x2 - box->x1) * (int)(box->y2 - box->y1);
 }
 
+static Bool rr_crtc_on(RRCrtcPtr crtc, Bool crtc_is_xf86_hint)
+{
+    if (!crtc) {
+        return FALSE;
+    }
+    if (crtc_is_xf86_hint && crtc->devPrivate) {
+         return xf86_crtc_on(crtc->devPrivate);
+    } else {
+        return !!crtc->mode;
+    }
+}
+
 Bool
-ms_crtc_on(xf86CrtcPtr crtc)
+xf86_crtc_on(xf86CrtcPtr crtc)
 {
     drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
 
     return crtc->enabled && drmmode_crtc->dpms_mode == DPMSModeOn;
 }
 
-/*
- * Return the first output which is connected to an active CRTC on this screen.
- *
- * RRFirstOutput() will return an output from a slave screen if it is primary,
- * which is not the behavior that ms_covering_crtc() wants.
- */
-
-static RROutputPtr ms_first_output(ScreenPtr pScreen)
-{
-    rrScrPriv(pScreen);
-    RROutputPtr output;
-    int i, j;
-
-    if (!pScrPriv)
-        return NULL;
-
-    if (pScrPriv->primaryOutput && pScrPriv->primaryOutput->crtc &&
-        (pScrPriv->primaryOutput->pScreen == pScreen)) {
-        return pScrPriv->primaryOutput;
-    }
-
-    for (i = 0; i < pScrPriv->numCrtcs; i++) {
-        RRCrtcPtr crtc = pScrPriv->crtcs[i];
-
-        for (j = 0; j < pScrPriv->numOutputs; j++) {
-            output = pScrPriv->outputs[j];
-            if (output->crtc == crtc)
-                return output;
-        }
-    }
-    return NULL;
-}
 
 /*
  * Return the crtc covering 'box'. If two crtcs cover a portion of
  * 'box', then prefer the crtc with greater coverage.
  */
-
-static xf86CrtcPtr
-ms_covering_xf86_crtc(ScreenPtr pScreen, BoxPtr box, Bool screen_is_ms)
-{
-    ScrnInfoPtr scrn = xf86ScreenToScrn(pScreen);
-    xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
-    xf86CrtcPtr crtc, best_crtc;
-    int coverage, best_coverage;
-    int c;
-    BoxRec crtc_box, cover_box;
-    Bool crtc_on;
-
-    best_crtc = NULL;
-    best_coverage = 0;
-
-    if (!xf86_config)
-        return NULL;
-
-    for (c = 0; c < xf86_config->num_crtc; c++) {
-        crtc = xf86_config->crtc[c];
-
-        if (screen_is_ms)
-            crtc_on = ms_crtc_on(crtc);
-        else
-            crtc_on = crtc->enabled;
-
-        /* If the CRTC is off, treat it as not covering */
-        if (!crtc_on)
-            continue;
-
-        ms_crtc_box(crtc, &crtc_box);
-        ms_box_intersect(&cover_box, &crtc_box, box);
-        coverage = ms_box_area(&cover_box);
-        if (coverage > best_coverage) {
-            best_crtc = crtc;
-            best_coverage = coverage;
-        }
-    }
-
-    /* Fallback to primary crtc for drawable's on slave outputs */
-    if (best_crtc == NULL && !pScreen->isGPU) {
-        RROutputPtr primary_output = NULL;
-        ScreenPtr slave;
-
-        if (dixPrivateKeyRegistered(rrPrivKey))
-            primary_output = ms_first_output(scrn->pScreen);
-        if (!primary_output || !primary_output->crtc)
-            return NULL;
-
-        crtc = primary_output->crtc->devPrivate;
-        if (!ms_crtc_on(crtc))
-            return NULL;
-
-        xorg_list_for_each_entry(slave, &pScreen->slave_list, slave_head) {
-            if (!slave->is_output_slave)
-                continue;
-
-            if (ms_covering_xf86_crtc(slave, box, FALSE)) {
-                /* The drawable is on a slave output, return primary crtc */
-                return crtc;
-            }
-        }
-    }
-
-    return best_crtc;
-}
-
 static RRCrtcPtr
-ms_covering_randr_crtc(ScreenPtr pScreen, BoxPtr box, Bool screen_is_ms)
+rr_crtc_covering_box(ScreenPtr pScreen, BoxPtr box, Bool screen_is_xf86_hint)
 {
-    ScrnInfoPtr scrn = xf86ScreenToScrn(pScreen);
     rrScrPrivPtr pScrPriv;
-    RRCrtcPtr crtc, best_crtc;
+    RROutputPtr primary_output;
+    RRCrtcPtr crtc, best_crtc, primary_crtc;
     int coverage, best_coverage;
     int c;
     BoxRec crtc_box, cover_box;
-    Bool crtc_on;
 
     best_crtc = NULL;
     best_coverage = 0;
@@ -238,60 +137,56 @@ ms_covering_randr_crtc(ScreenPtr pScreen, BoxPtr box, Bool screen_is_ms)
     if (!pScrPriv)
         return NULL;
 
+    primary_crtc = NULL;
+    primary_output = RRFirstOutput(pScreen);
+    if (primary_output)
+        primary_crtc = primary_output->crtc;
+
     for (c = 0; c < pScrPriv->numCrtcs; c++) {
         crtc = pScrPriv->crtcs[c];
 
-        if (screen_is_ms) {
-            crtc_on = ms_crtc_on((xf86CrtcPtr) crtc->devPrivate);
-        } else {
-            crtc_on = !!crtc->mode;
-        }
-
         /* If the CRTC is off, treat it as not covering */
-        if (!crtc_on)
+        if (!rr_crtc_on(crtc, screen_is_xf86_hint))
             continue;
 
-        ms_randr_crtc_box(crtc, &crtc_box);
-        ms_box_intersect(&cover_box, &crtc_box, box);
-        coverage = ms_box_area(&cover_box);
-        if (coverage > best_coverage) {
+        rr_crtc_box(crtc, &crtc_box);
+        box_intersect(&cover_box, &crtc_box, box);
+        coverage = box_area(&cover_box);
+        if ((coverage > best_coverage) ||
+            (coverage == best_coverage && crtc == primary_crtc)) {
             best_crtc = crtc;
             best_coverage = coverage;
         }
     }
 
-    /* Fallback to primary crtc for drawable's on slave outputs */
-    if (best_crtc == NULL && !pScreen->isGPU) {
-        RROutputPtr primary_output = NULL;
-        ScreenPtr slave;
-
-        if (dixPrivateKeyRegistered(rrPrivKey))
-            primary_output = ms_first_output(scrn->pScreen);
-        if (!primary_output || !primary_output->crtc)
-            return NULL;
+    return best_crtc;
+}
 
-        crtc = primary_output->crtc;
-        if (!ms_crtc_on((xf86CrtcPtr) crtc->devPrivate))
-            return NULL;
+static RRCrtcPtr
+rr_crtc_covering_box_on_secondary(ScreenPtr pScreen, BoxPtr box)
+{
+    if (!pScreen->isGPU) {
+        ScreenPtr secondary;
+        RRCrtcPtr crtc = NULL;
 
-        xorg_list_for_each_entry(slave, &pScreen->slave_list, slave_head) {
-            if (!slave->is_output_slave)
+        xorg_list_for_each_entry(secondary, &pScreen->secondary_list, secondary_head) {
+            if (!secondary->is_output_secondary)
                 continue;
 
-            if (ms_covering_randr_crtc(slave, box, FALSE)) {
-                /* The drawable is on a slave output, return primary crtc */
+            crtc = rr_crtc_covering_box(secondary, box, FALSE);
+            if (crtc)
                 return crtc;
-            }
         }
     }
 
-    return best_crtc;
+    return NULL;
 }
 
 xf86CrtcPtr
 ms_dri2_crtc_covering_drawable(DrawablePtr pDraw)
 {
     ScreenPtr pScreen = pDraw->pScreen;
+    RRCrtcPtr crtc = NULL;
     BoxRec box;
 
     box.x1 = pDraw->x;
@@ -299,13 +194,18 @@ ms_dri2_crtc_covering_drawable(DrawablePtr pDraw)
     box.x2 = box.x1 + pDraw->width;
     box.y2 = box.y1 + pDraw->height;
 
-    return ms_covering_xf86_crtc(pScreen, &box, TRUE);
+    crtc = rr_crtc_covering_box(pScreen, &box, TRUE);
+    if (crtc) {
+        return crtc->devPrivate;
+    }
+    return NULL;
 }
 
 RRCrtcPtr
 ms_randr_crtc_covering_drawable(DrawablePtr pDraw)
 {
     ScreenPtr pScreen = pDraw->pScreen;
+    RRCrtcPtr crtc = NULL;
     BoxRec box;
 
     box.x1 = pDraw->x;
@@ -313,7 +213,11 @@ ms_randr_crtc_covering_drawable(DrawablePtr pDraw)
     box.x2 = box.x1 + pDraw->width;
     box.y2 = box.y1 + pDraw->height;
 
-    return ms_covering_randr_crtc(pScreen, &box, TRUE);
+    crtc = rr_crtc_covering_box(pScreen, &box, TRUE);
+    if (!crtc) {
+        crtc = rr_crtc_covering_box_on_secondary(pScreen, &box);
+    }
+    return crtc;
 }
 
 static Bool
@@ -452,7 +356,7 @@ ms_kernel_msc_to_crtc_msc(xf86CrtcPtr crtc, uint64_t sequence, Bool is64bit)
      * but update the 32-bit tracking variables with reliable ground truth.
      *
      * With 64-Bit api in use, the only !is64bit input is from pageflip events,
-     * and any pageflip event is usually preceeded by some is64bit input from
+     * and any pageflip event is usually preceded by some is64bit input from
      * swap scheduling, so this should provide reliable mapping for pageflip
      * events based on true 64-bit input as baseline as well.
      */
diff --git a/hw/xfree86/exa/Makefile.in b/hw/xfree86/exa/Makefile.in
index f34c8c3..1252594 100644
--- a/hw/xfree86/exa/Makefile.in
+++ b/hw/xfree86/exa/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -105,7 +105,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -224,8 +223,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 DIST_SUBDIRS = $(SUBDIRS)
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -271,8 +268,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -286,6 +281,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -304,14 +301,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -328,8 +317,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -385,6 +376,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -437,7 +430,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -461,29 +453,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -521,8 +497,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -533,14 +507,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -838,7 +806,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/hw/xfree86/exa/man/Makefile.in b/hw/xfree86/exa/man/Makefile.in
index a317aaf..e58ec60 100644
--- a/hw/xfree86/exa/man/Makefile.in
+++ b/hw/xfree86/exa/man/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -105,7 +105,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -178,8 +177,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -193,6 +190,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -211,14 +210,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -235,8 +226,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -292,6 +285,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -375,7 +370,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -399,29 +393,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -459,8 +437,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -471,14 +447,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -676,7 +646,6 @@ ctags CTAGS:
 
 cscope cscopelist:
 
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/hw/xfree86/fbdevhw/Makefile.in b/hw/xfree86/fbdevhw/Makefile.in
index 9283c33..eed41ba 100644
--- a/hw/xfree86/fbdevhw/Makefile.in
+++ b/hw/xfree86/fbdevhw/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -106,7 +106,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -228,8 +227,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 DIST_SUBDIRS = $(SUBDIRS)
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp README
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -275,8 +272,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -290,6 +285,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -308,14 +305,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -332,8 +321,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -389,6 +380,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -441,7 +434,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -465,29 +457,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -525,8 +501,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -537,14 +511,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -859,7 +827,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/hw/xfree86/fbdevhw/fbdevhw.c b/hw/xfree86/fbdevhw/fbdevhw.c
index 9508951..3d8b92e 100644
--- a/hw/xfree86/fbdevhw/fbdevhw.c
+++ b/hw/xfree86/fbdevhw/fbdevhw.c
@@ -1,4 +1,4 @@
-/* all driver need this */
+/* all drivers need this */
 #ifdef HAVE_XORG_CONFIG_H
 #include <xorg-config.h>
 #endif
@@ -118,7 +118,7 @@ fbdevHWGetFD(ScrnInfoPtr pScrn)
 }
 
 /* -------------------------------------------------------------------- */
-/* some helpers for printing debug informations                         */
+/* some helpers for printing debug information                          */
 
 #ifdef DEBUG
 static void
@@ -331,12 +331,12 @@ fbdev_open(int scrnIndex, const char *dev, char **namep)
 
     /* only touch non-PCI devices on this path */
     {
-        char buf[PATH_MAX];
+        char buf[PATH_MAX] = {0};
         char *sysfs_path = NULL;
         char *node = strrchr(dev, '/') + 1;
 
         if (asprintf(&sysfs_path, "/sys/class/graphics/%s", node) < 0 ||
-            readlink(sysfs_path, buf, sizeof(buf)) < 0 ||
+            readlink(sysfs_path, buf, sizeof(buf) - 1) < 0 ||
             strstr(buf, "devices/pci")) {
             free(sysfs_path);
             close(fd);
diff --git a/hw/xfree86/fbdevhw/fbpriv.h b/hw/xfree86/fbdevhw/fbpriv.h
index 340a442..8d224ae 100644
--- a/hw/xfree86/fbdevhw/fbpriv.h
+++ b/hw/xfree86/fbdevhw/fbpriv.h
@@ -1,5 +1,5 @@
 /*
- * copyed from from linux kernel 2.2.4
+ * copied from from linux kernel 2.2.4
  * removed internal stuff (#ifdef __KERNEL__)
  */
 
diff --git a/hw/xfree86/fbdevhw/man/Makefile.in b/hw/xfree86/fbdevhw/man/Makefile.in
index b3e3b27..2618aaa 100644
--- a/hw/xfree86/fbdevhw/man/Makefile.in
+++ b/hw/xfree86/fbdevhw/man/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -105,7 +105,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -178,8 +177,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -193,6 +190,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -211,14 +210,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -235,8 +226,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -292,6 +285,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -375,7 +370,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -399,29 +393,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -459,8 +437,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -471,14 +447,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -676,7 +646,6 @@ ctags CTAGS:
 
 cscope cscopelist:
 
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/hw/xfree86/glamor_egl/Makefile.in b/hw/xfree86/glamor_egl/Makefile.in
index fc4bfa5..44c30d1 100644
--- a/hw/xfree86/glamor_egl/Makefile.in
+++ b/hw/xfree86/glamor_egl/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -126,7 +126,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -232,8 +231,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
@@ -253,8 +250,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -268,6 +263,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -286,14 +283,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -310,8 +299,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -367,6 +358,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -419,7 +412,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -443,29 +435,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -503,8 +479,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -515,14 +489,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -797,7 +765,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/hw/xfree86/i2c/Makefile.in b/hw/xfree86/i2c/Makefile.in
index f8e396b..817f7e4 100644
--- a/hw/xfree86/i2c/Makefile.in
+++ b/hw/xfree86/i2c/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -106,7 +106,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -206,8 +205,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
@@ -227,8 +224,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -242,6 +237,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -260,14 +257,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -284,8 +273,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -341,6 +332,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -393,7 +386,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -417,29 +409,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -477,8 +453,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -489,14 +463,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -735,7 +703,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/hw/xfree86/i2c/xf86i2c.c b/hw/xfree86/i2c/xf86i2c.c
index 22109cf..59733b0 100644
--- a/hw/xfree86/i2c/xf86i2c.c
+++ b/hw/xfree86/i2c/xf86i2c.c
@@ -401,8 +401,8 @@ xf86I2CProbeAddress(I2CBusPtr b, I2CSlaveAddr addr)
  * 3rd, if a Start condition has been successfully sent,
  *   Send a Stop condition.
  *
- * The functions exits immediately when an error occures,
- * not proceeding any data left. However, step 3 will
+ * The function exits immediately when an error occurs,
+ * not processing any data left. However, step 3 will
  * be executed anyway to leave the bus in clean idle state.
  */
 
@@ -440,7 +440,7 @@ I2CWriteRead(I2CDevPtr d,
     return r;
 }
 
-/* wrapper - for compatibility and convinience */
+/* wrapper - for compatibility and convenience */
 
 Bool
 xf86I2CWriteRead(I2CDevPtr d,
@@ -592,7 +592,7 @@ xf86I2CWriteVec(I2CDevPtr d, I2CByte * vec, int nValues)
  * =========================
  */
 
-/* Allocates an I2CDevRec for you and initializes with propper defaults
+/* Allocates an I2CDevRec for you and initializes with proper defaults
  * you may modify before calling xf86I2CDevInit. Your I2CDevRec must
  * contain at least a SlaveAddr, and a pI2CBus pointer to the bus this
  * device shall be linked to.
@@ -692,7 +692,7 @@ xf86I2CFindDev(I2CBusPtr b, I2CSlaveAddr addr)
 
 static I2CBusPtr I2CBusList;
 
-/* Allocates an I2CBusRec for you and initializes with propper defaults
+/* Allocates an I2CBusRec for you and initializes with proper defaults
  * you may modify before calling xf86I2CBusInit. Your I2CBusRec must
  * contain at least a BusName, a scrnIndex (or -1), and a complete set
  * of either high or low level I2C function pointers. You may pass
diff --git a/hw/xfree86/int10/INT10.HOWTO b/hw/xfree86/int10/INT10.HOWTO
index e2154c1..13477ce 100644
--- a/hw/xfree86/int10/INT10.HOWTO
+++ b/hw/xfree86/int10/INT10.HOWTO
@@ -96,7 +96,7 @@ for the INT10 executor:
  starting at address  0 in the process virtual  memory space.  Thus if
  this mode is to be used, the OS environment has to be able to provide
  that, ie. it must be able to remap the processes virtual memory space
- onto itself.  If the  emulator is able  to handle memory  access thru
+ onto itself.  If the emulator is able to handle memory access through
  externally  provided functions the  real mode  process memory  can be
  located anywhere  in the processes  virtual memory. It does  not even
  have to be consecutive.
@@ -304,7 +304,7 @@ FALSE. Otherwise TRUE is returned.
 
 Note: This  function is  currently based on  the Linux vm86  call.  It
 might have  to be modified  or even rewritten  for other OS.   So your
-milage may vary.
+mileage may vary.
 
 Functions to dump memory, code, xf86 CPU register values and stack are
 also provided.  Take a  look at  helper.c To view  a memory  range the
diff --git a/hw/xfree86/int10/Makefile.am b/hw/xfree86/int10/Makefile.am
index 66cb14d..0248dc7 100644
--- a/hw/xfree86/int10/Makefile.am
+++ b/hw/xfree86/int10/Makefile.am
@@ -1,6 +1,6 @@
 module_LTLIBRARIES = libint10.la
 
-sdk_HEADERS = xf86int10.h
+sdk_HEADERS = xf86int10.h vbe.h vbeModes.h
 
 EXTRA_CFLAGS =
 
@@ -8,6 +8,8 @@ libint10_la_LDFLAGS = -avoid-version
 libint10_la_LIBADD = $(PCIACCESS_LIBS)
 
 COMMON_SOURCES = \
+	vbe.c \
+	vbeModes.c \
 	helper_exec.c \
 	helper_mem.c \
 	xf86int10.c \
@@ -17,7 +19,8 @@ if I386_VIDEO
 I386_VIDEO_CFLAGS = -D_PC
 endif
 
-AM_CPPFLAGS = $(XORG_INCS)
+AM_CPPFLAGS = $(XORG_INCS) -I$(srcdir)/../ddc -I$(srcdir)/../modes -I$(srcdir)/../i2c \
+	      -I$(srcdir)/../parser
 
 if INT10_VM86
 AM_CFLAGS = $(I386_VIDEO_CFLAGS) -D_VM86_LINUX $(DIX_CFLAGS) $(XORG_CFLAGS) $(EXTRA_CFLAGS)
diff --git a/hw/xfree86/int10/Makefile.in b/hw/xfree86/int10/Makefile.in
index 8961c89..2996550 100644
--- a/hw/xfree86/int10/Makefile.in
+++ b/hw/xfree86/int10/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -107,7 +107,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -142,13 +141,13 @@ am__installdirs = "$(DESTDIR)$(moduledir)" "$(DESTDIR)$(sdkdir)"
 LTLIBRARIES = $(module_LTLIBRARIES)
 am__DEPENDENCIES_1 =
 libint10_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__libint10_la_SOURCES_DIST = stub.c xf86int10module.c helper_exec.c \
-	helper_mem.c xf86int10.c \
+am__libint10_la_SOURCES_DIST = stub.c xf86int10module.c vbe.c \
+	vbeModes.c helper_exec.c helper_mem.c xf86int10.c \
 	$(srcdir)/../os-support/linux/int10/vm86/linux_vm86.c \
 	$(srcdir)/../os-support/linux/int10/linux.c xf86x86emu.c \
 	generic.c x86emu.c
-am__objects_1 = helper_exec.lo helper_mem.lo xf86int10.lo \
-	xf86int10module.lo
+am__objects_1 = vbe.lo vbeModes.lo helper_exec.lo helper_mem.lo \
+	xf86int10.lo xf86int10module.lo
 @INT10_STUB_FALSE@@INT10_VM86_FALSE@@INT10_X86EMU_TRUE@am_libint10_la_OBJECTS = $(am__objects_1) \
 @INT10_STUB_FALSE@@INT10_VM86_FALSE@@INT10_X86EMU_TRUE@	xf86x86emu.lo \
 @INT10_STUB_FALSE@@INT10_VM86_FALSE@@INT10_X86EMU_TRUE@	generic.lo \
@@ -183,7 +182,8 @@ am__maybe_remake_depfiles = depfiles
 am__depfiles_remade = ./$(DEPDIR)/generic.Plo \
 	./$(DEPDIR)/helper_exec.Plo ./$(DEPDIR)/helper_mem.Plo \
 	./$(DEPDIR)/linux.Plo ./$(DEPDIR)/linux_vm86.Plo \
-	./$(DEPDIR)/stub.Plo ./$(DEPDIR)/x86emu.Plo \
+	./$(DEPDIR)/stub.Plo ./$(DEPDIR)/vbe.Plo \
+	./$(DEPDIR)/vbeModes.Plo ./$(DEPDIR)/x86emu.Plo \
 	./$(DEPDIR)/xf86int10.Plo ./$(DEPDIR)/xf86int10module.Plo \
 	./$(DEPDIR)/xf86x86emu.Plo
 am__mv = mv -f
@@ -230,8 +230,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
@@ -251,8 +249,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -266,6 +262,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -284,14 +282,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -308,8 +298,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -365,6 +357,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -417,7 +411,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -441,29 +434,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -501,8 +478,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -513,14 +488,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -594,18 +563,21 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 module_LTLIBRARIES = libint10.la
-sdk_HEADERS = xf86int10.h
+sdk_HEADERS = xf86int10.h vbe.h vbeModes.h
 EXTRA_CFLAGS = 
 libint10_la_LDFLAGS = -avoid-version
 libint10_la_LIBADD = $(PCIACCESS_LIBS)
 COMMON_SOURCES = \
+	vbe.c \
+	vbeModes.c \
 	helper_exec.c \
 	helper_mem.c \
 	xf86int10.c \
 	xf86int10module.c
 
 @I386_VIDEO_TRUE@I386_VIDEO_CFLAGS = -D_PC
-AM_CPPFLAGS = $(XORG_INCS) $(am__append_1)
+AM_CPPFLAGS = $(XORG_INCS) -I$(srcdir)/../ddc -I$(srcdir)/../modes \
+	-I$(srcdir)/../i2c -I$(srcdir)/../parser $(am__append_1)
 @INT10_STUB_TRUE@AM_CFLAGS = $(I386_VIDEO_CFLAGS) -D_VM86_LINUX $(DIX_CFLAGS) $(XORG_CFLAGS) $(EXTRA_CFLAGS)
 @INT10_VM86_TRUE@AM_CFLAGS = $(I386_VIDEO_CFLAGS) -D_VM86_LINUX $(DIX_CFLAGS) $(XORG_CFLAGS) $(EXTRA_CFLAGS)
 @INT10_X86EMU_TRUE@AM_CFLAGS = $(I386_VIDEO_CFLAGS) -D_X86EMU -DNO_SYS_HEADERS \
@@ -708,6 +680,8 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/linux.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/linux_vm86.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stub.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vbe.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vbeModes.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/x86emu.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86int10.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86int10module.Plo@am__quote@ # am--include-marker
@@ -832,7 +806,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
@@ -915,6 +888,8 @@ distclean: distclean-am
 	-rm -f ./$(DEPDIR)/linux.Plo
 	-rm -f ./$(DEPDIR)/linux_vm86.Plo
 	-rm -f ./$(DEPDIR)/stub.Plo
+	-rm -f ./$(DEPDIR)/vbe.Plo
+	-rm -f ./$(DEPDIR)/vbeModes.Plo
 	-rm -f ./$(DEPDIR)/x86emu.Plo
 	-rm -f ./$(DEPDIR)/xf86int10.Plo
 	-rm -f ./$(DEPDIR)/xf86int10module.Plo
@@ -970,6 +945,8 @@ maintainer-clean: maintainer-clean-am
 	-rm -f ./$(DEPDIR)/linux.Plo
 	-rm -f ./$(DEPDIR)/linux_vm86.Plo
 	-rm -f ./$(DEPDIR)/stub.Plo
+	-rm -f ./$(DEPDIR)/vbe.Plo
+	-rm -f ./$(DEPDIR)/vbeModes.Plo
 	-rm -f ./$(DEPDIR)/x86emu.Plo
 	-rm -f ./$(DEPDIR)/xf86int10.Plo
 	-rm -f ./$(DEPDIR)/xf86int10module.Plo
diff --git a/hw/xfree86/int10/generic.c b/hw/xfree86/int10/generic.c
index 8d5c4da..1915711 100644
--- a/hw/xfree86/int10/generic.c
+++ b/hw/xfree86/int10/generic.c
@@ -223,7 +223,7 @@ xf86ExtendedInitInt10(int entityIndex, int Flags)
     setup_int_vect(pInt);
     set_return_trap(pInt);
 
-    /* Retrieve the entire legacy video BIOS segment.  This can be upto
+    /* Retrieve the entire legacy video BIOS segment.  This can be up to
      * 128KiB.
      */
     vbiosMem = (char *) base + V_BIOS;
@@ -389,14 +389,14 @@ xf86Int10FreePages(xf86Int10InfoPtr pInt, void *pbase, int num)
 
 #define VRAM(addr) ((addr >= V_RAM) && (addr < (V_RAM + VRAM_SIZE)))
 #define V_ADDR_RB(addr) \
-	(VRAM(addr)) ? MMIO_IN8((uint8_t*)VRAM_BASE,VRAM_ADDR(addr)) \
-	   : *(uint8_t*) V_ADDR(addr)
+	((VRAM(addr)) ? MMIO_IN8((uint8_t*)VRAM_BASE,VRAM_ADDR(addr)) \
+	   : *(uint8_t*) V_ADDR(addr))
 #define V_ADDR_RW(addr) \
-	(VRAM(addr)) ? MMIO_IN16((uint16_t*)VRAM_BASE,VRAM_ADDR(addr)) \
-	   : ldw_u((void *)V_ADDR(addr))
+	((VRAM(addr)) ? MMIO_IN16((uint16_t*)VRAM_BASE,VRAM_ADDR(addr)) \
+	   : ldw_u((void *)V_ADDR(addr)))
 #define V_ADDR_RL(addr) \
-	(VRAM(addr)) ? MMIO_IN32((uint32_t*)VRAM_BASE,VRAM_ADDR(addr)) \
-	   : ldl_u((void *)V_ADDR(addr))
+	((VRAM(addr)) ? MMIO_IN32((uint32_t*)VRAM_BASE,VRAM_ADDR(addr)) \
+	   : ldl_u((void *)V_ADDR(addr)))
 
 #define V_ADDR_WB(addr,val) \
 	if(VRAM(addr)) \
diff --git a/hw/xfree86/int10/helper_exec.c b/hw/xfree86/int10/helper_exec.c
index 6a83f42..12000bf 100644
--- a/hw/xfree86/int10/helper_exec.c
+++ b/hw/xfree86/int10/helper_exec.c
@@ -660,10 +660,10 @@ bios_checksum(const uint8_t *start, int size)
  * an attempt to detect a legacy ISA card. If they find one they might
  * act very strange: for example they might configure the card as a
  * monochrome card. This might cause some drivers to choke.
- * To avoid this we attempt legacy VGA by writing to all know VGA
+ * To avoid this we attempt legacy VGA by writing to all known VGA
  * disable registers before we call the BIOS initialization and
- * restore the original values afterwards. In beween we hold our
- * breath. To get to a (possibly exising) ISA card need to disable
+ * restore the original values afterwards. In between we hold our
+ * breath. To get to a (possibly existing) ISA card need to disable
  * our current PCI card.
  */
 /*
diff --git a/hw/xfree86/int10/meson.build b/hw/xfree86/int10/meson.build
index b1ead9c..a309e9b 100644
--- a/hw/xfree86/int10/meson.build
+++ b/hw/xfree86/int10/meson.build
@@ -1,4 +1,6 @@
 srcs_xorg_int10 = [
+    'vbe.c',
+    'vbeModes.c',
     'helper_exec.c',
     'helper_mem.c',
     'xf86int10.c',
@@ -58,3 +60,5 @@ xorg_int10 = shared_module('int10',
 )
 
 install_data('xf86int10.h', install_dir: xorgsdkdir)
+install_data('vbe.h', install_dir: xorgsdkdir)
+install_data('vbeModes.h', install_dir: xorgsdkdir)
diff --git a/hw/xfree86/vbe/vbe.c b/hw/xfree86/int10/vbe.c
similarity index 99%
rename from hw/xfree86/vbe/vbe.c
rename to hw/xfree86/int10/vbe.c
index d23e0f5..26efdd7 100644
--- a/hw/xfree86/vbe/vbe.c
+++ b/hw/xfree86/int10/vbe.c
@@ -169,7 +169,7 @@ vbeFree(vbeInfoPtr pVbe)
         return;
 
     xf86Int10FreePages(pVbe->pInt10, pVbe->memory, pVbe->num_pages);
-    /* If we have initalized int10 we ought to free it, too */
+    /* If we have initialized int10 we ought to free it, too */
     if (pVbe->init_int10)
         xf86FreeInt10(pVbe->pInt10);
     free(pVbe);
@@ -309,7 +309,7 @@ vbeReadEDID(vbeInfoPtr pVbe)
         xf86DrvMsgVerb(screen, X_INFO, 3, "VESA VBE DDC read failed\n");
         break;
     default:
-        xf86DrvMsgVerb(screen, X_INFO, 3, "VESA VBE DDC unkown failure %i\n",
+        xf86DrvMsgVerb(screen, X_INFO, 3, "VESA VBE DDC unknown failure %i\n",
                        pVbe->pInt10->ax & 0xff00);
         break;
     }
@@ -846,7 +846,7 @@ VBEGetVBEpmi(vbeInfoPtr pVbe)
        AX    := Status
        ES    := Real Mode Segment of Table
        DI    := Offset of Table
-       CX    := Lenght of Table including protected mode code in bytes (for copying purposes)
+       CX    := Length of Table including protected mode code in bytes (for copying purposes)
        (All other registers are preserved)
      */
 
diff --git a/hw/xfree86/vbe/vbe.h b/hw/xfree86/int10/vbe.h
similarity index 99%
rename from hw/xfree86/vbe/vbe.h
rename to hw/xfree86/int10/vbe.h
index c8fb4e4..8024f51 100644
--- a/hw/xfree86/vbe/vbe.h
+++ b/hw/xfree86/int10/vbe.h
@@ -225,8 +225,7 @@ typedef enum {
 } vbeSaveRestoreFunction;
 
 extern _X_EXPORT Bool
-
-VBESaveRestore(vbeInfoPtr pVbe, vbeSaveRestoreFunction fuction,
+VBESaveRestore(vbeInfoPtr pVbe, vbeSaveRestoreFunction function,
                void **memory, int *size, int *real_mode_pages);
 
 /*
diff --git a/hw/xfree86/vbe/vbeModes.c b/hw/xfree86/int10/vbeModes.c
similarity index 99%
rename from hw/xfree86/vbe/vbeModes.c
rename to hw/xfree86/int10/vbeModes.c
index 50ac50d..980e40b 100644
--- a/hw/xfree86/vbe/vbeModes.c
+++ b/hw/xfree86/int10/vbeModes.c
@@ -431,7 +431,7 @@ VBESetModeParameters(ScrnInfoPtr pScrn, vbeInfoPtr pVbe)
 }
 
 /*
- * These wrappers are to allow (temporary) funtionality divergences.
+ * These wrappers are to allow (temporary) functionality divergences.
  */
 int
 VBEValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes,
diff --git a/hw/xfree86/vbe/vbeModes.h b/hw/xfree86/int10/vbeModes.h
similarity index 100%
rename from hw/xfree86/vbe/vbeModes.h
rename to hw/xfree86/int10/vbeModes.h
diff --git a/hw/xfree86/int10/xf86int10.c b/hw/xfree86/int10/xf86int10.c
index 5ead44f..578f461 100644
--- a/hw/xfree86/int10/xf86int10.c
+++ b/hw/xfree86/int10/xf86int10.c
@@ -598,7 +598,7 @@ int42_handler(xf86Int10InfoPtr pInt)
 /**
  * These functions are meant to be used by the PCI BIOS emulation. Some
  * BIOSes need to see if there are \b other chips of the same type around so
- * by setting \c exclude one PCI device can be explicitely excluded, if
+ * by setting \c exclude one PCI device can be explicitly excluded, if
  * required.
  */
 static struct pci_device *
diff --git a/hw/xfree86/loader/Makefile.in b/hw/xfree86/loader/Makefile.in
index cd4b2ad..ac3b3de 100644
--- a/hw/xfree86/loader/Makefile.in
+++ b/hw/xfree86/loader/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -105,7 +105,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -177,8 +176,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
@@ -198,8 +195,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -213,6 +208,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -231,14 +228,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -255,8 +244,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -312,6 +303,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -364,7 +357,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -388,29 +380,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -448,8 +424,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -460,14 +434,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -699,7 +667,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/hw/xfree86/loader/loader.c b/hw/xfree86/loader/loader.c
index 503c47e..2580e93 100644
--- a/hw/xfree86/loader/loader.c
+++ b/hw/xfree86/loader/loader.c
@@ -135,7 +135,8 @@ LoaderSymbol(const char *name)
 void *
 LoaderSymbolFromModule(void *handle, const char *name)
 {
-    return dlsym(handle, name);
+    ModuleDescPtr mod = handle;
+    return dlsym(mod->handle, name);
 }
 
 void
diff --git a/hw/xfree86/loader/loader.h b/hw/xfree86/loader/loader.h
index 5a2fe6c..4e83730 100644
--- a/hw/xfree86/loader/loader.h
+++ b/hw/xfree86/loader/loader.h
@@ -72,6 +72,5 @@ extern unsigned long LoaderOptions;
 
 /* Internal Functions */
 void *LoaderOpen(const char *, int *);
-void *LoaderSymbolFromModule(void *, const char *);
 
 #endif                          /* _LOADER_H */
diff --git a/hw/xfree86/loader/loadmod.c b/hw/xfree86/loader/loadmod.c
index a6356bd..f8a4482 100644
--- a/hw/xfree86/loader/loadmod.c
+++ b/hw/xfree86/loader/loadmod.c
@@ -621,6 +621,7 @@ DuplicateModule(ModuleDescPtr mod, ModuleDescPtr parent)
 
 static const char *compiled_in_modules[] = {
     "ddc",
+    "fb",
     "i2c",
     "ramdac",
     "dbe",
@@ -696,6 +697,10 @@ LoadModule(const char *module, void *options, const XF86ModReqInfo *modreq,
         m = (char *) module;
     }
 
+    /* Backward compatibility, vbe and int10 are merged into int10 now */
+    if (!strcmp(m, "vbe"))
+        m = name = strdup("int10");
+
     for (cim = compiled_in_modules; *cim; cim++)
         if (!strcmp(m, *cim)) {
             LogMessageVerb(X_INFO, 3, "Module \"%s\" already built-in\n", m);
@@ -771,7 +776,7 @@ LoadModule(const char *module, void *options, const XF86ModReqInfo *modreq,
             *errmaj = LDR_NOMEM;
         goto LoadModule_fail;
     }
-    initdata = LoaderSymbolFromModule(ret->handle, p);
+    initdata = LoaderSymbolFromModule(ret, p);
     if (initdata) {
         ModuleSetupProc setup;
         ModuleTearDownProc teardown;
diff --git a/hw/xfree86/man/Makefile.in b/hw/xfree86/man/Makefile.in
index 144e512..5d50122 100644
--- a/hw/xfree86/man/Makefile.in
+++ b/hw/xfree86/man/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -108,7 +108,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -181,8 +180,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -196,6 +193,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -214,14 +213,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -238,8 +229,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -295,6 +288,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -378,7 +373,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -402,29 +396,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -462,8 +440,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -474,14 +450,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -681,7 +651,6 @@ ctags CTAGS:
 
 cscope cscopelist:
 
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/hw/xfree86/man/Xorg.man b/hw/xfree86/man/Xorg.man
index 888e87b..3ec6e2c 100644
--- a/hw/xfree86/man/Xorg.man
+++ b/hw/xfree86/man/Xorg.man
@@ -171,9 +171,6 @@ bpp framebuffer rather than the (possibly default) 32 bpp framebuffer
 (or vice versa).  Legal values are 1, 8, 16, 24, 32.  Not all drivers
 support all values.
 .TP 8
-.B \-flipPixels
-Swap the default values for the black and white pixels.
-.TP 8
 .BI \-gamma " value"
 Set the gamma correction.
 .I value
@@ -283,6 +280,13 @@ is a comma separated list of directories to search for
 server modules.  This option is only available when the server is run
 as root (i.e, with real-uid 0).
 .TP 8
+.B \-noautoBindGPU
+Disable automatically setting secondary GPUs up as output sinks and offload
+sources. This is equivalent to setting the
+.B AutoBindGPU
+xorg.conf(__filemansuffix__) file option. To
+.B false.
+.TP 8
 .B \-nosilk
 Disable Silken Mouse support.
 .TP 8
diff --git a/hw/xfree86/man/xorg.conf.man b/hw/xfree86/man/xorg.conf.man
index 80215ea..ac88d7e 100644
--- a/hw/xfree86/man/xorg.conf.man
+++ b/hw/xfree86/man/xorg.conf.man
@@ -509,15 +509,6 @@ section to use in the absence of the
 .B \-layout
 command line option.
 .TP 7
-.BI "Option \*qNoTrapSignals\*q  \*q" boolean \*q
-This prevents the Xorg server from trapping a range of unexpected fatal
-signals and exiting cleanly.
-Instead, the Xorg server will die and drop core where the fault occurred.
-The default behaviour is for the Xorg server to exit cleanly, but still drop a
-core file.
-In general you never want to use this option unless you are debugging an Xorg
-server problem and know how to deal with the consequences.
-.TP 7
 .BI "Option \*qDontVTSwitch\*q  \*q" boolean \*q
 This disallows the use of the
 .BI Ctrl+Alt+F n
@@ -672,6 +663,12 @@ Enabled by default.
 If this option is disabled, then no GPU devices will be added from the udev
 backend. Enabled by default. (May need to be disabled to setup Xinerama).
 .TP 7
+.BI "Option \*qAutoBindGPU\*q  \*q" boolean \*q
+If enabled then secondary GPUs will be automatically set up as output-sinks and
+offload-sources. Making e.g. laptop outputs connected only to the secondary
+GPU directly available for use without needing to run
+"xrandr --setprovideroutputsource". Enabled by default.
+.TP 7
 .BI "Option \*qLog\*q \*q" string \*q
 This option controls whether the log is flushed and/or synced to disk after
 each message.
@@ -1503,6 +1500,17 @@ option.
 Enable printing of additional debugging information about modesetting to
 the server log.
 .TP 7
+.BI "Option \*qNoOutputInitialSize\*q \*q" width " " height \*q
+Normally, the X server infers the initial screen size based on any
+connected outputs.
+However, if no outputs are connected, the X server picks a default screen size
+of 1024 x 768.
+This option overrides the default screen size to use when no outputs are
+connected.
+In contrast to the \*qVirtual\*q Display SubSection entry, which applies
+unconditionally, \*qNoOutputInitialSize\*q is only used if no outputs are
+detected when the X server starts.
+.TP 7
 .BI "Option \*qPreferCloneMode\*q \*q" boolean \*q
 If enabled, bring up monitors of a screen in clone mode instead of horizontal
 extended layout by default. (Defaults to off; the video driver can change the
diff --git a/hw/xfree86/meson.build b/hw/xfree86/meson.build
index cacf56d..c4db85c 100644
--- a/hw/xfree86/meson.build
+++ b/hw/xfree86/meson.build
@@ -10,7 +10,6 @@ xorg_inc = include_directories(
     'os-support/bus',
     'parser',
     'ramdac',
-    'vbe',
     'vgahw',
 )
 
@@ -41,7 +40,8 @@ subdir('ramdac')
 subdir('xkb')
 
 srcs_xorg = [
-    '../../mi/miinitext.c'
+    '../../mi/miinitext.c',
+    '../../mi/miinitext.h',
 ]
 
 # Extract all the objects so that all symbols get brought into the
@@ -61,6 +61,7 @@ xorg_link = [
     xorg_os_support,
     xorg_parser,
     xorg_ramdac,
+    libxserver_fb,
     libxserver_xext_vidmode,
     libxserver_main,
     libxserver_config,
@@ -74,6 +75,8 @@ endif
 
 if host_machine.system() == 'cygwin' or host_machine.system() == 'windows'
     linker_export_flags = '-Wl,--export-all-symbols'
+elif host_machine.system() == 'sunos' or host_machine.system() == 'darwin'
+    linker_export_flags = []
 else
     linker_export_flags = '-Wl,--export-dynamic'
 endif
@@ -125,15 +128,21 @@ if int10 != 'false'
     subdir('int10')
 endif
 subdir('shadowfb')
-if build_vbe
-    subdir('vbe')
-endif
 if build_vgahw
     subdir('vgahw')
 endif
 if build_modesetting
    subdir('drivers/modesetting')
 endif
+if get_option('xf86-input-inputtest')
+    subdir('drivers/inputtest')
+endif
+
+meson.add_install_script(
+    'sh', '-c',
+    'ln -fs Xorg @0@@1@'.format(
+        '${DESTDIR}',
+        join_paths(get_option('prefix'), get_option('bindir'), 'X')))
 
 if get_option('suid_wrapper')
     executable('Xorg.wrap',
@@ -143,25 +152,25 @@ if get_option('suid_wrapper')
         c_args: xorg_c_args,
         install: true,
         install_dir: get_option('libexecdir'),
-        # install_mode: ['r-sr-xr-x', 0, 0],
+        install_mode: ['r-sr-xr-x', 0, 0],
     )
-    configure_file(
+
+    # meson gets confused when there are two targets of the same name
+    # within the same directory, so we use a different intermediate name.
+    xorg_sh = configure_file(
         input: 'Xorg.sh.in',
-        output: 'Xorg',
+        output: 'Xorg.sh',
         configuration: conf_data,
+    )
+
+    install_data(
+        xorg_sh,
+        install_mode: 'rwxr-xr-x',
         install_dir: join_paths(get_option('prefix'), get_option('bindir')),
+        rename: ['Xorg']
     )
 endif
 
-executable('cvt',
-    ['utils/cvt/cvt.c', 'modes/xf86cvt.c'],
-    include_directories: [inc, xorg_inc],
-    dependencies: xorg_deps,
-    link_with: libxserver_os,
-    c_args: xorg_c_args,
-    install: true,
-)
-
 executable('gtf',
     'utils/gtf/gtf.c',
     include_directories: [inc, xorg_inc],
@@ -216,14 +225,10 @@ install_man(configure_file(
     configuration: manpage_config,
 ))
 
-install_man(configure_file(
-    input: 'utils/man/cvt.man',
-    output: 'cvt.1',
-    configuration: manpage_config,
-))
-
 install_man(configure_file(
     input: 'utils/man/gtf.man',
     output: 'gtf.1',
     configuration: manpage_config,
 ))
+
+subdir('doc')
diff --git a/hw/xfree86/modes/Makefile.am b/hw/xfree86/modes/Makefile.am
index 6eb162a..35a174b 100644
--- a/hw/xfree86/modes/Makefile.am
+++ b/hw/xfree86/modes/Makefile.am
@@ -8,7 +8,6 @@ libxf86modes_la_SOURCES = \
 	xf86Crtc.c \
 	xf86Crtc.h \
 	xf86Cursors.c \
-	xf86cvt.c \
 	xf86gtf.c \
 	xf86EdidModes.c \
 	xf86Modes.c \
diff --git a/hw/xfree86/modes/Makefile.in b/hw/xfree86/modes/Makefile.in
index a4bb946..09fb357 100644
--- a/hw/xfree86/modes/Makefile.in
+++ b/hw/xfree86/modes/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -106,19 +106,18 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 LTLIBRARIES = $(noinst_LTLIBRARIES)
 libxf86modes_la_LIBADD =
 am__libxf86modes_la_SOURCES_DIST = xf86Crtc.c xf86Crtc.h xf86Cursors.c \
-	xf86cvt.c xf86gtf.c xf86EdidModes.c xf86Modes.c xf86Modes.h \
+	xf86gtf.c xf86EdidModes.c xf86Modes.c xf86Modes.h \
 	xf86RandR12.c xf86RandR12.h xf86Rotate.c xf86DiDGA.c
 @DGA_TRUE@am__objects_1 = xf86DiDGA.lo
-am_libxf86modes_la_OBJECTS = xf86Crtc.lo xf86Cursors.lo xf86cvt.lo \
-	xf86gtf.lo xf86EdidModes.lo xf86Modes.lo xf86RandR12.lo \
-	xf86Rotate.lo $(am__objects_1)
+am_libxf86modes_la_OBJECTS = xf86Crtc.lo xf86Cursors.lo xf86gtf.lo \
+	xf86EdidModes.lo xf86Modes.lo xf86RandR12.lo xf86Rotate.lo \
+	$(am__objects_1)
 libxf86modes_la_OBJECTS = $(am_libxf86modes_la_OBJECTS)
 AM_V_lt = $(am__v_lt_@AM_V@)
 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
@@ -143,7 +142,7 @@ am__depfiles_remade = ./$(DEPDIR)/xf86Crtc.Plo \
 	./$(DEPDIR)/xf86Cursors.Plo ./$(DEPDIR)/xf86DiDGA.Plo \
 	./$(DEPDIR)/xf86EdidModes.Plo ./$(DEPDIR)/xf86Modes.Plo \
 	./$(DEPDIR)/xf86RandR12.Plo ./$(DEPDIR)/xf86Rotate.Plo \
-	./$(DEPDIR)/xf86cvt.Plo ./$(DEPDIR)/xf86gtf.Plo
+	./$(DEPDIR)/xf86gtf.Plo
 am__mv = mv -f
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@@ -216,8 +215,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
@@ -237,8 +234,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -252,6 +247,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -270,14 +267,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -294,8 +283,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -351,6 +342,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -403,7 +396,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -427,29 +419,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -487,8 +463,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -499,14 +473,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -585,7 +553,6 @@ libxf86modes_la_SOURCES = \
 	xf86Crtc.c \
 	xf86Crtc.h \
 	xf86Cursors.c \
-	xf86cvt.c \
 	xf86gtf.c \
 	xf86EdidModes.c \
 	xf86Modes.c \
@@ -668,7 +635,6 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Modes.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86RandR12.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Rotate.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86cvt.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86gtf.Plo@am__quote@ # am--include-marker
 
 $(am__depfiles_remade):
@@ -776,7 +742,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
@@ -860,7 +825,6 @@ distclean: distclean-am
 	-rm -f ./$(DEPDIR)/xf86Modes.Plo
 	-rm -f ./$(DEPDIR)/xf86RandR12.Plo
 	-rm -f ./$(DEPDIR)/xf86Rotate.Plo
-	-rm -f ./$(DEPDIR)/xf86cvt.Plo
 	-rm -f ./$(DEPDIR)/xf86gtf.Plo
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
@@ -914,7 +878,6 @@ maintainer-clean: maintainer-clean-am
 	-rm -f ./$(DEPDIR)/xf86Modes.Plo
 	-rm -f ./$(DEPDIR)/xf86RandR12.Plo
 	-rm -f ./$(DEPDIR)/xf86Rotate.Plo
-	-rm -f ./$(DEPDIR)/xf86cvt.Plo
 	-rm -f ./$(DEPDIR)/xf86gtf.Plo
 	-rm -f Makefile
 maintainer-clean-am: distclean-am maintainer-clean-generic
diff --git a/hw/xfree86/modes/meson.build b/hw/xfree86/modes/meson.build
index ddacca1..8a40018 100644
--- a/hw/xfree86/modes/meson.build
+++ b/hw/xfree86/modes/meson.build
@@ -1,7 +1,6 @@
 srcs_xorg_modes = [
     'xf86Crtc.c',
     'xf86Cursors.c',
-    'xf86cvt.c',
     'xf86gtf.c',
     'xf86EdidModes.c',
     'xf86Modes.c',
@@ -15,8 +14,8 @@ endif
 
 xorg_modes = static_library('xorg_modes',
     srcs_xorg_modes,
-    include_directories: [inc, xorg_inc],
-    dependencies: common_dep,
+    include_directories: [ inc, xorg_inc ],
+    dependencies: [ common_dep, libxcvt_dep ],
     c_args: xorg_c_args,
 )
 
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index 17d4ef1..c6e89e6 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -500,11 +500,13 @@ static OptionInfoRec xf86OutputOptions[] = {
 enum {
     OPTION_MODEDEBUG,
     OPTION_PREFER_CLONEMODE,
+    OPTION_NO_OUTPUT_INITIAL_SIZE,
 };
 
 static OptionInfoRec xf86DeviceOptions[] = {
     {OPTION_MODEDEBUG, "ModeDebug", OPTV_BOOLEAN, {0}, FALSE},
     {OPTION_PREFER_CLONEMODE, "PreferCloneMode", OPTV_BOOLEAN, {0}, FALSE},
+    {OPTION_NO_OUTPUT_INITIAL_SIZE, "NoOutputInitialSize", OPTV_STRING, {0}, FALSE},
     {-1, NULL, OPTV_NONE, {0}, FALSE},
 };
 
@@ -550,6 +552,16 @@ xf86OutputSetMonitor(xf86OutputPtr output)
                    "Output %s has no monitor section\n", output->name);
 }
 
+Bool
+xf86OutputForceEnabled(xf86OutputPtr output)
+{
+    Bool enable;
+
+    if (xf86GetOptValBool(output->options, OPTION_ENABLE, &enable) && enable)
+        return TRUE;
+    return FALSE;
+}
+
 static Bool
 xf86OutputEnabled(xf86OutputPtr output, Bool strict)
 {
@@ -2483,6 +2495,32 @@ xf86TargetUserpref(ScrnInfoPtr scrn, xf86CrtcConfigPtr config,
     return FALSE;
 }
 
+void
+xf86AssignNoOutputInitialSize(ScrnInfoPtr scrn, const OptionInfoRec *options,
+                              int *no_output_width, int *no_output_height)
+{
+    int width = 0, height = 0;
+    const char *no_output_size =
+        xf86GetOptValString(options, OPTION_NO_OUTPUT_INITIAL_SIZE);
+
+    *no_output_width = NO_OUTPUT_DEFAULT_WIDTH;
+    *no_output_height = NO_OUTPUT_DEFAULT_HEIGHT;
+
+    if (no_output_size == NULL) {
+        return;
+    }
+
+    if (sscanf(no_output_size, "%d %d", &width, &height) != 2) {
+        xf86DrvMsg(scrn->scrnIndex, X_ERROR,
+                   "\"NoOutputInitialSize\" string \"%s\" not of form "
+                   "\"width height\"\n", no_output_size);
+        return;
+    }
+
+    *no_output_width = width;
+    *no_output_height = height;
+}
+
 /**
  * Construct default screen configuration
  *
@@ -2506,6 +2544,7 @@ xf86InitialConfiguration(ScrnInfoPtr scrn, Bool canGrow)
     DisplayModePtr *modes;
     Bool *enabled;
     int width, height;
+    int no_output_width, no_output_height;
     int i = scrn->scrnIndex;
     Bool have_outputs = TRUE;
     Bool ret;
@@ -2527,6 +2566,9 @@ xf86InitialConfiguration(ScrnInfoPtr scrn, Bool canGrow)
     else
         height = config->maxHeight;
 
+    xf86AssignNoOutputInitialSize(scrn, config->options,
+                                  &no_output_width, &no_output_height);
+
     xf86ProbeOutputModes(scrn, width, height);
 
     crtcs = xnfcalloc(config->num_output, sizeof(xf86CrtcPtr));
@@ -2539,7 +2581,7 @@ xf86InitialConfiguration(ScrnInfoPtr scrn, Bool canGrow)
             xf86DrvMsg(i, X_WARNING,
 		       "Unable to find connected outputs - setting %dx%d "
                        "initial framebuffer\n",
-                       NO_OUTPUT_DEFAULT_WIDTH, NO_OUTPUT_DEFAULT_HEIGHT);
+                       no_output_width, no_output_height);
         have_outputs = FALSE;
     }
     else {
@@ -2640,10 +2682,10 @@ xf86InitialConfiguration(ScrnInfoPtr scrn, Bool canGrow)
         xf86DefaultScreenLimits(scrn, &width, &height, canGrow);
 
         if (have_outputs == FALSE) {
-            if (width < NO_OUTPUT_DEFAULT_WIDTH &&
-                height < NO_OUTPUT_DEFAULT_HEIGHT) {
-                width = NO_OUTPUT_DEFAULT_WIDTH;
-                height = NO_OUTPUT_DEFAULT_HEIGHT;
+            if (width < no_output_width &&
+                height < no_output_height) {
+                width = no_output_width;
+                height = no_output_height;
             }
         }
 
@@ -2695,7 +2737,7 @@ xf86DisableCrtc(xf86CrtcPtr crtc)
 }
 
 /*
- * Check the CRTC we're going to map each output to vs. it's current
+ * Check the CRTC we're going to map each output to vs. its current
  * CRTC.  If they don't match, we have to disable the output and the CRTC
  * since the driver will have to re-route things.
  */
@@ -3068,7 +3110,7 @@ xf86DisableUnusedFunctions(ScrnInfoPtr pScrn)
         pScrn->ModeSet(pScrn);
     if (pScrn->pScreen) {
         if (pScrn->pScreen->isGPU)
-            xf86CursorResetCursor(pScrn->pScreen->current_master);
+            xf86CursorResetCursor(pScrn->pScreen->current_primary);
         else
             xf86CursorResetCursor(pScrn->pScreen);
     }
@@ -3122,7 +3164,7 @@ xf86OutputSetTileProperty(xf86OutputPtr output)
 
 #endif
 
-/* Pull out a phyiscal size from a detailed timing if available. */
+/* Pull out a physical size from a detailed timing if available. */
 struct det_phySize_parameter {
     xf86OutputPtr output;
     ddc_quirk_t quirks;
diff --git a/hw/xfree86/modes/xf86Crtc.h b/hw/xfree86/modes/xf86Crtc.h
index 1d1124a..7a56287 100644
--- a/hw/xfree86/modes/xf86Crtc.h
+++ b/hw/xfree86/modes/xf86Crtc.h
@@ -839,6 +839,9 @@ xf86CompatOutput(ScrnInfoPtr pScrn)
 {
     xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
 
+    if (xf86CrtcConfigPrivateIndex == -1)
+        return NULL;
+
     if (config->compat_output < 0)
         return NULL;
     return config->output[config->compat_output];
@@ -964,6 +967,10 @@ extern _X_EXPORT void
 
 extern _X_EXPORT ScreenInitRetType xf86CrtcScreenInit(ScreenPtr pScreen);
 
+extern _X_EXPORT void
+xf86AssignNoOutputInitialSize(ScrnInfoPtr scrn, const OptionInfoRec *options,
+                              int *no_output_width, int *no_output_height);
+
 extern _X_EXPORT Bool
  xf86InitialConfiguration(ScrnInfoPtr pScrn, Bool canGrow);
 
@@ -1062,7 +1069,7 @@ extern _X_EXPORT Bool
  xf86_cursors_init(ScreenPtr screen, int max_width, int max_height, int flags);
 
 /**
- * Superseeded by xf86CursorResetCursor, which is getting called
+ * Superseded by xf86CursorResetCursor, which is getting called
  * automatically when necessary.
  */
 static _X_INLINE _X_DEPRECATED void xf86_reload_cursors(ScreenPtr screen) {}
@@ -1140,4 +1147,5 @@ xf86ProviderSetup(ScrnInfoPtr scrn,
 extern _X_EXPORT void
 xf86DetachAllCrtc(ScrnInfoPtr scrn);
 
+Bool xf86OutputForceEnabled(xf86OutputPtr output);
 #endif                          /* _XF86CRTC_H_ */
diff --git a/hw/xfree86/modes/xf86EdidModes.c b/hw/xfree86/modes/xf86EdidModes.c
index 96249ac..1ac5738 100644
--- a/hw/xfree86/modes/xf86EdidModes.c
+++ b/hw/xfree86/modes/xf86EdidModes.c
@@ -573,7 +573,7 @@ DDCModeFromDetailedTiming(int scrnIndex, struct detailed_timings *timing,
      * Refuse to create modes that are insufficiently large.  64 is a random
      * number, maybe the spec says something about what the minimum is.  In
      * particular I see this frequently with _old_ EDID, 1.0 or so, so maybe
-     * our parser is just being too aggresive there.
+     * our parser is just being too aggressive there.
      */
     if (timing->h_active < 64 || timing->v_active < 64) {
         xf86DrvMsg(scrnIndex, X_INFO,
@@ -589,7 +589,7 @@ DDCModeFromDetailedTiming(int scrnIndex, struct detailed_timings *timing,
         return NULL;
     }
 
-    /* We only do seperate sync currently */
+    /* We only do separate sync currently */
     if (timing->sync != 0x03) {
         xf86DrvMsg(scrnIndex, X_INFO,
                    "%s: %dx%d Warning: We only handle separate"
diff --git a/hw/xfree86/modes/xf86Modes.c b/hw/xfree86/modes/xf86Modes.c
index 5651f1e..3849967 100644
--- a/hw/xfree86/modes/xf86Modes.c
+++ b/hw/xfree86/modes/xf86Modes.c
@@ -29,6 +29,7 @@
 #include <xorg-config.h>
 #endif
 
+#include <libxcvt/libxcvt.h>
 #include "xf86Modes.h"
 #include "xf86Priv.h"
 
@@ -792,3 +793,33 @@ xf86PruneDuplicateModes(DisplayModePtr modes)
 
     return modes;
 }
+
+/*
+ * Generate a CVT standard mode from HDisplay, VDisplay and VRefresh.
+ */
+DisplayModePtr
+xf86CVTMode(int HDisplay, int VDisplay, float VRefresh, Bool Reduced,
+            Bool Interlaced)
+{
+    struct libxcvt_mode_info *libxcvt_mode_info;
+    DisplayModeRec *Mode = xnfcalloc(1, sizeof(DisplayModeRec));
+
+    libxcvt_mode_info =
+        libxcvt_gen_mode_info(HDisplay, VDisplay, VRefresh, Reduced, Interlaced);
+
+    Mode->VDisplay   = libxcvt_mode_info->vdisplay;
+    Mode->HDisplay   = libxcvt_mode_info->hdisplay;
+    Mode->Clock      = libxcvt_mode_info->dot_clock;
+    Mode->HSyncStart = libxcvt_mode_info->hsync_start;
+    Mode->HSyncEnd   = libxcvt_mode_info->hsync_end;
+    Mode->HTotal     = libxcvt_mode_info->htotal;
+    Mode->VSyncStart = libxcvt_mode_info->vsync_start;
+    Mode->VSyncEnd   = libxcvt_mode_info->vsync_end;
+    Mode->VTotal     = libxcvt_mode_info->vtotal;
+    Mode->VRefresh   = libxcvt_mode_info->vrefresh;
+    Mode->Flags      = libxcvt_mode_info->mode_flags;
+
+    free(libxcvt_mode_info);
+
+    return Mode;
+}
diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c
index f220ef1..39a38c7 100644
--- a/hw/xfree86/modes/xf86RandR12.c
+++ b/hw/xfree86/modes/xf86RandR12.c
@@ -78,10 +78,9 @@ static Bool xf86RandR12CreateScreenResources12(ScreenPtr pScreen);
 static int xf86RandR12Generation;
 
 static DevPrivateKeyRec xf86RandR12KeyRec;
-static DevPrivateKey xf86RandR12Key;
 
 #define XF86RANDRINFO(p) ((XF86RandRInfoPtr) \
-    dixLookupPrivate(&(p)->devPrivates, xf86RandR12Key))
+    dixLookupPrivate(&(p)->devPrivates, &xf86RandR12KeyRec))
 
 static int
 xf86RandR12ModeRefresh(DisplayModePtr mode)
@@ -551,7 +550,7 @@ xf86RandR12SetMode(ScreenPtr pScreen,
     }
     /*
      * We know that if the driver failed to SwitchMode to the rotated
-     * version, then it should revert back to it's prior mode.
+     * version, then it should revert back to its prior mode.
      */
     if (!xf86SwitchMode(pScreen, mode)) {
         ret = FALSE;
@@ -859,7 +858,6 @@ xf86RandR12Init(ScreenPtr pScreen)
     if (xf86RandR12Generation != serverGeneration)
         xf86RandR12Generation = serverGeneration;
 
-    xf86RandR12Key = &xf86RandR12KeyRec;
     if (!dixRegisterPrivateKey(&xf86RandR12KeyRec, PRIVATE_SCREEN, 0))
         return FALSE;
 
@@ -889,7 +887,7 @@ xf86RandR12Init(ScreenPtr pScreen)
     randrp->palette_size = 0;
     randrp->palette = NULL;
 
-    dixSetPrivate(&pScreen->devPrivates, xf86RandR12Key, randrp);
+    dixSetPrivate(&pScreen->devPrivates, &xf86RandR12KeyRec, randrp);
 
 #if RANDR_12_INTERFACE
     if (!xf86RandR12Init12(pScreen))
@@ -903,7 +901,7 @@ xf86RandR12CloseScreen(ScreenPtr pScreen)
 {
     XF86RandRInfoPtr randrp;
 
-    if (xf86RandR12Key == NULL)
+    if (!dixPrivateKeyRegistered(&xf86RandR12KeyRec))
         return;
 
     randrp = XF86RANDRINFO(pScreen);
@@ -927,7 +925,7 @@ xf86RandR12SetRotations(ScreenPtr pScreen, Rotation rotations)
     xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
 #endif
 
-    if (xf86RandR12Key == NULL)
+    if (!dixPrivateKeyRegistered(&xf86RandR12KeyRec))
         return;
 
     randrp = XF86RANDRINFO(pScreen);
@@ -948,12 +946,10 @@ xf86RandR12SetTransformSupport(ScreenPtr pScreen, Bool transforms)
     ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
     int c;
     xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
-#endif
 
-    if (xf86RandR12Key == NULL)
+    if (!dixPrivateKeyRegistered(&xf86RandR12KeyRec))
         return;
 
-#if RANDR_13_INTERFACE
     for (c = 0; c < config->num_crtc; c++) {
         xf86CrtcPtr crtc = config->crtc[c];
 
@@ -1253,8 +1249,8 @@ xf86RandR12CrtcComputeGamma(xf86CrtcPtr crtc, LOCO *palette,
 {
     int gamma_slots;
     unsigned shift;
-    CARD32 value;
     int i, j;
+    CARD32 value = 0;
 
     for (shift = 0; (gamma_size << shift) < (1 << 16); shift++);
 
@@ -1271,6 +1267,10 @@ xf86RandR12CrtcComputeGamma(xf86CrtcPtr crtc, LOCO *palette,
             for (j = 0; j < gamma_slots; j++)
                 crtc->gamma_red[i * gamma_slots + j] = value;
         }
+
+        /* Replicate last value until end of crtc for gamma_size not a power of 2 */
+        for (j = i * gamma_slots; j < crtc->gamma_size; j++)
+                crtc->gamma_red[j] = value;
     } else {
         /* Downsampling of larger palette to smaller hw lut size */
         for (i = 0; i < crtc->gamma_size; i++) {
@@ -1297,6 +1297,10 @@ xf86RandR12CrtcComputeGamma(xf86CrtcPtr crtc, LOCO *palette,
             for (j = 0; j < gamma_slots; j++)
                 crtc->gamma_green[i * gamma_slots + j] = value;
         }
+
+        /* Replicate last value until end of crtc for gamma_size not a power of 2 */
+        for (j = i * gamma_slots; j < crtc->gamma_size; j++)
+            crtc->gamma_green[j] = value;
     } else {
         /* Downsampling of larger palette to smaller hw lut size */
         for (i = 0; i < crtc->gamma_size; i++) {
@@ -1323,6 +1327,10 @@ xf86RandR12CrtcComputeGamma(xf86CrtcPtr crtc, LOCO *palette,
             for (j = 0; j < gamma_slots; j++)
                 crtc->gamma_blue[i * gamma_slots + j] = value;
         }
+
+        /* Replicate last value until end of crtc for gamma_size not a power of 2 */
+        for (j = i * gamma_slots; j < crtc->gamma_size; j++)
+            crtc->gamma_blue[j] = value;
     } else {
         /* Downsampling of larger palette to smaller hw lut size */
         for (i = 0; i < crtc->gamma_size; i++) {
@@ -1356,6 +1364,7 @@ xf86RandR12CrtcSetGamma(ScreenPtr pScreen, RRCrtcPtr randr_crtc)
 {
     XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
     xf86CrtcPtr crtc = randr_crtc->devPrivate;
+    int max_size = crtc->gamma_size;
 
     if (crtc->funcs->gamma_set == NULL)
         return FALSE;
@@ -1370,12 +1379,15 @@ xf86RandR12CrtcSetGamma(ScreenPtr pScreen, RRCrtcPtr randr_crtc)
                                     randr_crtc->gammaBlue,
                                     randr_crtc->gammaSize);
     } else {
+        if (max_size > randr_crtc->gammaSize)
+            max_size = randr_crtc->gammaSize;
+
         memcpy(crtc->gamma_red, randr_crtc->gammaRed,
-               crtc->gamma_size * sizeof(crtc->gamma_red[0]));
+               max_size * sizeof(crtc->gamma_red[0]));
         memcpy(crtc->gamma_green, randr_crtc->gammaGreen,
-               crtc->gamma_size * sizeof(crtc->gamma_green[0]));
+               max_size * sizeof(crtc->gamma_green[0]));
         memcpy(crtc->gamma_blue, randr_crtc->gammaBlue,
-               crtc->gamma_size * sizeof(crtc->gamma_blue[0]));
+               max_size * sizeof(crtc->gamma_blue[0]));
     }
 
     xf86RandR12CrtcReloadGamma(crtc);
@@ -1660,7 +1672,10 @@ xf86RandR12SetInfo12(ScreenPtr pScreen)
             RROutputSetConnection(output->randr_output, RR_Connected);
             break;
         case XF86OutputStatusDisconnected:
-            RROutputSetConnection(output->randr_output, RR_Disconnected);
+	    if (xf86OutputForceEnabled(output))
+                RROutputSetConnection(output->randr_output, RR_Connected);
+	    else
+                RROutputSetConnection(output->randr_output, RR_Disconnected);
             break;
         case XF86OutputStatusUnknown:
             RROutputSetConnection(output->randr_output, RR_UnknownConnection);
@@ -1821,9 +1836,6 @@ xf86RandR12CreateScreenResources12(ScreenPtr pScreen)
     rrScrPrivPtr rp = rrGetScrPriv(pScreen);
     xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
 
-    if (xf86RandR12Key == NULL)
-        return TRUE;
-
     for (c = 0; c < config->num_crtc; c++)
         xf86RandR12CrtcNotify(config->crtc[c]->randr_crtc);
 
@@ -1853,9 +1865,6 @@ xf86RandR12TellChanged(ScreenPtr pScreen)
     xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
     int c;
 
-    if (xf86RandR12Key == NULL)
-        return;
-
     xf86RandR12SetInfo12(pScreen);
     for (c = 0; c < config->num_crtc; c++)
         xf86RandR12CrtcNotify(config->crtc[c]->randr_crtc);
@@ -2199,7 +2208,7 @@ xf86RandR14ProviderDestroy(ScreenPtr screen, RRProviderPtr provider)
             config->randr_provider->output_source = NULL;
             RRSetChanged(screen);
         }
-        if (screen->current_master)
+        if (screen->current_primary)
             DetachUnboundGPU(screen);
     }
     config->randr_provider = NULL;
diff --git a/hw/xfree86/modes/xf86Rotate.c b/hw/xfree86/modes/xf86Rotate.c
index 5415ed9..ea9c43c 100644
--- a/hw/xfree86/modes/xf86Rotate.c
+++ b/hw/xfree86/modes/xf86Rotate.c
@@ -315,8 +315,8 @@ xf86CrtcFitsScreen(xf86CrtcPtr crtc, struct pict_f_transform *crtc_to_fb)
      */
     if (pScrn->is_gpu) {
 	ScreenPtr pScreen = xf86ScrnToScreen(pScrn);
-	if (pScreen->current_master)
-	    pScrn = xf86ScreenToScrn(pScreen->current_master);
+	if (pScreen->current_primary)
+	    pScrn = xf86ScreenToScrn(pScreen->current_primary);
     }
 
     if (pScrn->virtualX == 0 || pScrn->virtualY == 0)
diff --git a/hw/xfree86/modes/xf86cvt.c b/hw/xfree86/modes/xf86cvt.c
deleted file mode 100644
index c0a3420..0000000
--- a/hw/xfree86/modes/xf86cvt.c
+++ /dev/null
@@ -1,295 +0,0 @@
-/*
- * Copyright 2005-2006 Luc Verhaegen.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/*
- * The reason for having this function in a file of its own is
- * so that ../utils/cvt/cvt can link to it, and that xf86CVTMode
- * code is shared directly.
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include "xf86.h"
-#include "xf86Modes.h"
-
-#include <string.h>
-
-/*
- * Generate a CVT standard mode from HDisplay, VDisplay and VRefresh.
- *
- * These calculations are stolen from the CVT calculation spreadsheet written
- * by Graham Loveridge. He seems to be claiming no copyright and there seems to
- * be no license attached to this. He apparently just wants to see his name
- * mentioned.
- *
- * This file can be found at http://www.vesa.org/Public/CVT/CVTd6r1.xls
- *
- * Comments and structure corresponds to the comments and structure of the xls.
- * This should ease importing of future changes to the standard (not very
- * likely though).
- *
- * About margins; i'm sure that they are to be the bit between HDisplay and
- * HBlankStart, HBlankEnd and HTotal, VDisplay and VBlankStart, VBlankEnd and
- * VTotal, where the overscan colour is shown. FB seems to call _all_ blanking
- * outside sync "margin" for some reason. Since we prefer seeing proper
- * blanking instead of the overscan colour, and since the Crtc* values will
- * probably get altered after us, we will disable margins altogether. With
- * these calculations, Margins will plainly expand H/VDisplay, and we don't
- * want that. -- libv
- *
- */
-DisplayModePtr
-xf86CVTMode(int HDisplay, int VDisplay, float VRefresh, Bool Reduced,
-            Bool Interlaced)
-{
-    DisplayModeRec *Mode = xnfcalloc(1, sizeof(DisplayModeRec));
-
-    /* 1) top/bottom margin size (% of height) - default: 1.8 */
-#define CVT_MARGIN_PERCENTAGE 1.8
-
-    /* 2) character cell horizontal granularity (pixels) - default 8 */
-#define CVT_H_GRANULARITY 8
-
-    /* 4) Minimum vertical porch (lines) - default 3 */
-#define CVT_MIN_V_PORCH 3
-
-    /* 4) Minimum number of vertical back porch lines - default 6 */
-#define CVT_MIN_V_BPORCH 6
-
-    /* Pixel Clock step (kHz) */
-#define CVT_CLOCK_STEP 250
-
-    Bool Margins = FALSE;
-    float VFieldRate, HPeriod;
-    int HDisplayRnd, HMargin;
-    int VDisplayRnd, VMargin, VSync;
-    float Interlace;            /* Please rename this */
-    char *tmp;
-
-    /* CVT default is 60.0Hz */
-    if (!VRefresh)
-        VRefresh = 60.0;
-
-    /* 1. Required field rate */
-    if (Interlaced)
-        VFieldRate = VRefresh * 2;
-    else
-        VFieldRate = VRefresh;
-
-    /* 2. Horizontal pixels */
-    HDisplayRnd = HDisplay - (HDisplay % CVT_H_GRANULARITY);
-
-    /* 3. Determine left and right borders */
-    if (Margins) {
-        /* right margin is actually exactly the same as left */
-        HMargin = (((float) HDisplayRnd) * CVT_MARGIN_PERCENTAGE / 100.0);
-        HMargin -= HMargin % CVT_H_GRANULARITY;
-    }
-    else
-        HMargin = 0;
-
-    /* 4. Find total active pixels */
-    Mode->HDisplay = HDisplayRnd + 2 * HMargin;
-
-    /* 5. Find number of lines per field */
-    if (Interlaced)
-        VDisplayRnd = VDisplay / 2;
-    else
-        VDisplayRnd = VDisplay;
-
-    /* 6. Find top and bottom margins */
-    /* nope. */
-    if (Margins)
-        /* top and bottom margins are equal again. */
-        VMargin = (((float) VDisplayRnd) * CVT_MARGIN_PERCENTAGE / 100.0);
-    else
-        VMargin = 0;
-
-    Mode->VDisplay = VDisplay + 2 * VMargin;
-
-    /* 7. Interlace */
-    if (Interlaced)
-        Interlace = 0.5;
-    else
-        Interlace = 0.0;
-
-    /* Determine VSync Width from aspect ratio */
-    if (!(VDisplay % 3) && ((VDisplay * 4 / 3) == HDisplay))
-        VSync = 4;
-    else if (!(VDisplay % 9) && ((VDisplay * 16 / 9) == HDisplay))
-        VSync = 5;
-    else if (!(VDisplay % 10) && ((VDisplay * 16 / 10) == HDisplay))
-        VSync = 6;
-    else if (!(VDisplay % 4) && ((VDisplay * 5 / 4) == HDisplay))
-        VSync = 7;
-    else if (!(VDisplay % 9) && ((VDisplay * 15 / 9) == HDisplay))
-        VSync = 7;
-    else                        /* Custom */
-        VSync = 10;
-
-    if (!Reduced) {             /* simplified GTF calculation */
-
-        /* 4) Minimum time of vertical sync + back porch interval (µs)
-         * default 550.0 */
-#define CVT_MIN_VSYNC_BP 550.0
-
-        /* 3) Nominal HSync width (% of line period) - default 8 */
-#define CVT_HSYNC_PERCENTAGE 8
-
-        float HBlankPercentage;
-        int VSyncAndBackPorch, VBackPorch;
-        int HBlank;
-
-        /* 8. Estimated Horizontal period */
-        HPeriod = ((float) (1000000.0 / VFieldRate - CVT_MIN_VSYNC_BP)) /
-            (VDisplayRnd + 2 * VMargin + CVT_MIN_V_PORCH + Interlace);
-
-        /* 9. Find number of lines in sync + backporch */
-        if (((int) (CVT_MIN_VSYNC_BP / HPeriod) + 1) <
-            (VSync + CVT_MIN_V_PORCH))
-            VSyncAndBackPorch = VSync + CVT_MIN_V_PORCH;
-        else
-            VSyncAndBackPorch = (int) (CVT_MIN_VSYNC_BP / HPeriod) + 1;
-
-        /* 10. Find number of lines in back porch */
-        VBackPorch = VSyncAndBackPorch - VSync;
-        (void) VBackPorch;
-
-        /* 11. Find total number of lines in vertical field */
-        Mode->VTotal = VDisplayRnd + 2 * VMargin + VSyncAndBackPorch + Interlace
-            + CVT_MIN_V_PORCH;
-
-        /* 5) Definition of Horizontal blanking time limitation */
-        /* Gradient (%/kHz) - default 600 */
-#define CVT_M_FACTOR 600
-
-        /* Offset (%) - default 40 */
-#define CVT_C_FACTOR 40
-
-        /* Blanking time scaling factor - default 128 */
-#define CVT_K_FACTOR 128
-
-        /* Scaling factor weighting - default 20 */
-#define CVT_J_FACTOR 20
-
-#define CVT_M_PRIME CVT_M_FACTOR * CVT_K_FACTOR / 256
-#define CVT_C_PRIME (CVT_C_FACTOR - CVT_J_FACTOR) * CVT_K_FACTOR / 256 + \
-        CVT_J_FACTOR
-
-        /* 12. Find ideal blanking duty cycle from formula */
-        HBlankPercentage = CVT_C_PRIME - CVT_M_PRIME * HPeriod / 1000.0;
-
-        /* 13. Blanking time */
-        if (HBlankPercentage < 20)
-            HBlankPercentage = 20;
-
-        HBlank = Mode->HDisplay * HBlankPercentage / (100.0 - HBlankPercentage);
-        HBlank -= HBlank % (2 * CVT_H_GRANULARITY);
-
-        /* 14. Find total number of pixels in a line. */
-        Mode->HTotal = Mode->HDisplay + HBlank;
-
-        /* Fill in HSync values */
-        Mode->HSyncEnd = Mode->HDisplay + HBlank / 2;
-
-        Mode->HSyncStart = Mode->HSyncEnd -
-            (Mode->HTotal * CVT_HSYNC_PERCENTAGE) / 100;
-        Mode->HSyncStart += CVT_H_GRANULARITY -
-            Mode->HSyncStart % CVT_H_GRANULARITY;
-
-        /* Fill in VSync values */
-        Mode->VSyncStart = Mode->VDisplay + CVT_MIN_V_PORCH;
-        Mode->VSyncEnd = Mode->VSyncStart + VSync;
-
-    }
-    else {                      /* Reduced blanking */
-        /* Minimum vertical blanking interval time (µs) - default 460 */
-#define CVT_RB_MIN_VBLANK 460.0
-
-        /* Fixed number of clocks for horizontal sync */
-#define CVT_RB_H_SYNC 32.0
-
-        /* Fixed number of clocks for horizontal blanking */
-#define CVT_RB_H_BLANK 160.0
-
-        /* Fixed number of lines for vertical front porch - default 3 */
-#define CVT_RB_VFPORCH 3
-
-        int VBILines;
-
-        /* 8. Estimate Horizontal period. */
-        HPeriod = ((float) (1000000.0 / VFieldRate - CVT_RB_MIN_VBLANK)) /
-            (VDisplayRnd + 2 * VMargin);
-
-        /* 9. Find number of lines in vertical blanking */
-        VBILines = ((float) CVT_RB_MIN_VBLANK) / HPeriod + 1;
-
-        /* 10. Check if vertical blanking is sufficient */
-        if (VBILines < (CVT_RB_VFPORCH + VSync + CVT_MIN_V_BPORCH))
-            VBILines = CVT_RB_VFPORCH + VSync + CVT_MIN_V_BPORCH;
-
-        /* 11. Find total number of lines in vertical field */
-        Mode->VTotal = VDisplayRnd + 2 * VMargin + Interlace + VBILines;
-
-        /* 12. Find total number of pixels in a line */
-        Mode->HTotal = Mode->HDisplay + CVT_RB_H_BLANK;
-
-        /* Fill in HSync values */
-        Mode->HSyncEnd = Mode->HDisplay + CVT_RB_H_BLANK / 2;
-        Mode->HSyncStart = Mode->HSyncEnd - CVT_RB_H_SYNC;
-
-        /* Fill in VSync values */
-        Mode->VSyncStart = Mode->VDisplay + CVT_RB_VFPORCH;
-        Mode->VSyncEnd = Mode->VSyncStart + VSync;
-    }
-
-    /* 15/13. Find pixel clock frequency (kHz for xf86) */
-    Mode->Clock = Mode->HTotal * 1000.0 / HPeriod;
-    Mode->Clock -= Mode->Clock % CVT_CLOCK_STEP;
-
-    /* 16/14. Find actual Horizontal Frequency (kHz) */
-    Mode->HSync = ((float) Mode->Clock) / ((float) Mode->HTotal);
-
-    /* 17/15. Find actual Field rate */
-    Mode->VRefresh = (1000.0 * ((float) Mode->Clock)) /
-        ((float) (Mode->HTotal * Mode->VTotal));
-
-    /* 18/16. Find actual vertical frame frequency */
-    /* ignore - just set the mode flag for interlaced */
-    if (Interlaced)
-        Mode->VTotal *= 2;
-
-    XNFasprintf(&tmp, "%dx%d", HDisplay, VDisplay);
-    Mode->name = tmp;
-
-    if (Reduced)
-        Mode->Flags |= V_PHSYNC | V_NVSYNC;
-    else
-        Mode->Flags |= V_NHSYNC | V_PVSYNC;
-
-    if (Interlaced)
-        Mode->Flags |= V_INTERLACE;
-
-    return Mode;
-}
diff --git a/hw/xfree86/os-support/Makefile.in b/hw/xfree86/os-support/Makefile.in
index 951ec2c..66eade5 100644
--- a/hw/xfree86/os-support/Makefile.in
+++ b/hw/xfree86/os-support/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -106,7 +106,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -219,8 +218,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 am__relativize = \
@@ -265,8 +262,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -280,6 +275,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -298,14 +295,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -322,8 +311,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -379,6 +370,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -431,7 +424,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -455,29 +447,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -515,8 +491,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -527,14 +501,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -800,7 +768,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/hw/xfree86/os-support/bsd/Makefile.am b/hw/xfree86/os-support/bsd/Makefile.am
index 66ac838..2311dc2 100644
--- a/hw/xfree86/os-support/bsd/Makefile.am
+++ b/hw/xfree86/os-support/bsd/Makefile.am
@@ -1,15 +1,7 @@
 noinst_LTLIBRARIES = libbsd.la
 
-# APM support.
-if BSD_KQUEUE_APM
-APM_SOURCES = $(srcdir)/bsd_kqueue_apm.c
-else 
-if BSD_APM
-APM_SOURCES = $(srcdir)/bsd_apm.c
-else
+# No APM support.
 APM_SOURCES = $(srcdir)/../shared/pm_noop.c
-endif
-endif
 
 if FREEBSD_KLDLOAD
 KMOD_SOURCES = bsd_kmod.c
@@ -49,7 +41,7 @@ ARCH_SOURCES = \
 endif
 
 # FIXME: NetBSD Aperture defines (configure.ac)
-AM_CFLAGS = -DUSESTDRES $(XORG_CFLAGS) $(DIX_CFLAGS)
+AM_CFLAGS = $(XORG_CFLAGS) $(DIX_CFLAGS)
 
 AM_CPPFLAGS = $(XORG_INCS)
 
diff --git a/hw/xfree86/os-support/bsd/Makefile.in b/hw/xfree86/os-support/bsd/Makefile.in
index 21495a2..e674f31 100644
--- a/hw/xfree86/os-support/bsd/Makefile.in
+++ b/hw/xfree86/os-support/bsd/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -105,7 +105,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -117,8 +116,7 @@ am__libbsd_la_SOURCES_DIST = $(srcdir)/../shared/posix_tty.c \
 	i386_video.c ppc_video.c sparc64_video.c \
 	$(srcdir)/../shared/ioperm_noop.c \
 	$(srcdir)/../shared/agp_noop.c $(srcdir)/../linux/lnx_agp.c \
-	$(srcdir)/../shared/pm_noop.c $(srcdir)/bsd_apm.c \
-	$(srcdir)/bsd_kqueue_apm.c $(srcdir)/../shared/kmod_noop.c \
+	$(srcdir)/../shared/pm_noop.c $(srcdir)/../shared/kmod_noop.c \
 	bsd_kmod.c
 @ALPHA_VIDEO_FALSE@@ARM_VIDEO_FALSE@@I386_VIDEO_FALSE@@PPC_VIDEO_FALSE@@SPARC64_VIDEO_TRUE@am__objects_1 = sparc64_video.lo \
 @ALPHA_VIDEO_FALSE@@ARM_VIDEO_FALSE@@I386_VIDEO_FALSE@@PPC_VIDEO_FALSE@@SPARC64_VIDEO_TRUE@	ioperm_noop.lo
@@ -128,9 +126,7 @@ am__libbsd_la_SOURCES_DIST = $(srcdir)/../shared/posix_tty.c \
 @ALPHA_VIDEO_TRUE@am__objects_1 = alpha_video.lo
 @AGP_FALSE@am__objects_2 = agp_noop.lo
 @AGP_TRUE@am__objects_2 = lnx_agp.lo
-@BSD_APM_FALSE@@BSD_KQUEUE_APM_FALSE@am__objects_3 = pm_noop.lo
-@BSD_APM_TRUE@@BSD_KQUEUE_APM_FALSE@am__objects_3 = bsd_apm.lo
-@BSD_KQUEUE_APM_TRUE@am__objects_3 = bsd_kqueue_apm.lo
+am__objects_3 = pm_noop.lo
 @FREEBSD_KLDLOAD_FALSE@am__objects_4 = kmod_noop.lo
 @FREEBSD_KLDLOAD_TRUE@am__objects_4 = bsd_kmod.lo
 am_libbsd_la_OBJECTS = posix_tty.lo sigio.lo vidmem.lo bsd_VTsw.lo \
@@ -158,9 +154,8 @@ depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__maybe_remake_depfiles = depfiles
 am__depfiles_remade = ./$(DEPDIR)/agp_noop.Plo \
 	./$(DEPDIR)/alpha_video.Plo ./$(DEPDIR)/arm_video.Plo \
-	./$(DEPDIR)/bsd_VTsw.Plo ./$(DEPDIR)/bsd_apm.Plo \
-	./$(DEPDIR)/bsd_bell.Plo ./$(DEPDIR)/bsd_init.Plo \
-	./$(DEPDIR)/bsd_kmod.Plo ./$(DEPDIR)/bsd_kqueue_apm.Plo \
+	./$(DEPDIR)/bsd_VTsw.Plo ./$(DEPDIR)/bsd_bell.Plo \
+	./$(DEPDIR)/bsd_init.Plo ./$(DEPDIR)/bsd_kmod.Plo \
 	./$(DEPDIR)/i386_video.Plo ./$(DEPDIR)/ioperm_noop.Plo \
 	./$(DEPDIR)/kmod_noop.Plo ./$(DEPDIR)/lnx_agp.Plo \
 	./$(DEPDIR)/pm_noop.Plo ./$(DEPDIR)/posix_tty.Plo \
@@ -209,8 +204,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
@@ -230,8 +223,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -245,6 +236,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -263,14 +256,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -287,8 +272,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -344,6 +331,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -396,7 +385,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -420,29 +408,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -480,8 +452,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -492,14 +462,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -573,11 +537,9 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 noinst_LTLIBRARIES = libbsd.la
-@BSD_APM_FALSE@@BSD_KQUEUE_APM_FALSE@APM_SOURCES = $(srcdir)/../shared/pm_noop.c
-@BSD_APM_TRUE@@BSD_KQUEUE_APM_FALSE@APM_SOURCES = $(srcdir)/bsd_apm.c
 
-# APM support.
-@BSD_KQUEUE_APM_TRUE@APM_SOURCES = $(srcdir)/bsd_kqueue_apm.c
+# No APM support.
+APM_SOURCES = $(srcdir)/../shared/pm_noop.c
 @FREEBSD_KLDLOAD_FALSE@KMOD_SOURCES = $(srcdir)/../shared/kmod_noop.c
 @FREEBSD_KLDLOAD_TRUE@KMOD_SOURCES = bsd_kmod.c
 @AGP_FALSE@AGP_SOURCES = $(srcdir)/../shared/agp_noop.c
@@ -598,7 +560,7 @@ noinst_LTLIBRARIES = libbsd.la
 
 
 # FIXME: NetBSD Aperture defines (configure.ac)
-AM_CFLAGS = -DUSESTDRES $(XORG_CFLAGS) $(DIX_CFLAGS)
+AM_CFLAGS = $(XORG_CFLAGS) $(DIX_CFLAGS)
 AM_CPPFLAGS = $(XORG_INCS)
 libbsd_la_SOURCES = \
 	$(srcdir)/../shared/posix_tty.c \
@@ -678,11 +640,9 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alpha_video.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arm_video.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsd_VTsw.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsd_apm.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsd_bell.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsd_init.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsd_kmod.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsd_kqueue_apm.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i386_video.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioperm_noop.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kmod_noop.Plo@am__quote@ # am--include-marker
@@ -770,20 +730,6 @@ pm_noop.lo: $(srcdir)/../shared/pm_noop.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pm_noop.lo `test -f '$(srcdir)/../shared/pm_noop.c' || echo '$(srcdir)/'`$(srcdir)/../shared/pm_noop.c
 
-bsd_apm.lo: $(srcdir)/bsd_apm.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bsd_apm.lo -MD -MP -MF $(DEPDIR)/bsd_apm.Tpo -c -o bsd_apm.lo `test -f '$(srcdir)/bsd_apm.c' || echo '$(srcdir)/'`$(srcdir)/bsd_apm.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bsd_apm.Tpo $(DEPDIR)/bsd_apm.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$(srcdir)/bsd_apm.c' object='bsd_apm.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bsd_apm.lo `test -f '$(srcdir)/bsd_apm.c' || echo '$(srcdir)/'`$(srcdir)/bsd_apm.c
-
-bsd_kqueue_apm.lo: $(srcdir)/bsd_kqueue_apm.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bsd_kqueue_apm.lo -MD -MP -MF $(DEPDIR)/bsd_kqueue_apm.Tpo -c -o bsd_kqueue_apm.lo `test -f '$(srcdir)/bsd_kqueue_apm.c' || echo '$(srcdir)/'`$(srcdir)/bsd_kqueue_apm.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/bsd_kqueue_apm.Tpo $(DEPDIR)/bsd_kqueue_apm.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$(srcdir)/bsd_kqueue_apm.c' object='bsd_kqueue_apm.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bsd_kqueue_apm.lo `test -f '$(srcdir)/bsd_kqueue_apm.c' || echo '$(srcdir)/'`$(srcdir)/bsd_kqueue_apm.c
-
 kmod_noop.lo: $(srcdir)/../shared/kmod_noop.c
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT kmod_noop.lo -MD -MP -MF $(DEPDIR)/kmod_noop.Tpo -c -o kmod_noop.lo `test -f '$(srcdir)/../shared/kmod_noop.c' || echo '$(srcdir)/'`$(srcdir)/../shared/kmod_noop.c
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/kmod_noop.Tpo $(DEPDIR)/kmod_noop.Plo
@@ -848,7 +794,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
@@ -926,11 +871,9 @@ distclean: distclean-am
 	-rm -f ./$(DEPDIR)/alpha_video.Plo
 	-rm -f ./$(DEPDIR)/arm_video.Plo
 	-rm -f ./$(DEPDIR)/bsd_VTsw.Plo
-	-rm -f ./$(DEPDIR)/bsd_apm.Plo
 	-rm -f ./$(DEPDIR)/bsd_bell.Plo
 	-rm -f ./$(DEPDIR)/bsd_init.Plo
 	-rm -f ./$(DEPDIR)/bsd_kmod.Plo
-	-rm -f ./$(DEPDIR)/bsd_kqueue_apm.Plo
 	-rm -f ./$(DEPDIR)/i386_video.Plo
 	-rm -f ./$(DEPDIR)/ioperm_noop.Plo
 	-rm -f ./$(DEPDIR)/kmod_noop.Plo
@@ -990,11 +933,9 @@ maintainer-clean: maintainer-clean-am
 	-rm -f ./$(DEPDIR)/alpha_video.Plo
 	-rm -f ./$(DEPDIR)/arm_video.Plo
 	-rm -f ./$(DEPDIR)/bsd_VTsw.Plo
-	-rm -f ./$(DEPDIR)/bsd_apm.Plo
 	-rm -f ./$(DEPDIR)/bsd_bell.Plo
 	-rm -f ./$(DEPDIR)/bsd_init.Plo
 	-rm -f ./$(DEPDIR)/bsd_kmod.Plo
-	-rm -f ./$(DEPDIR)/bsd_kqueue_apm.Plo
 	-rm -f ./$(DEPDIR)/i386_video.Plo
 	-rm -f ./$(DEPDIR)/ioperm_noop.Plo
 	-rm -f ./$(DEPDIR)/kmod_noop.Plo
diff --git a/hw/xfree86/os-support/bsd/arm_video.c b/hw/xfree86/os-support/bsd/arm_video.c
index dd1020e..180d705 100644
--- a/hw/xfree86/os-support/bsd/arm_video.c
+++ b/hw/xfree86/os-support/bsd/arm_video.c
@@ -65,6 +65,7 @@
 #include "xf86Priv.h"
 #include "xf86_OSlib.h"
 #include "xf86OSpriv.h"
+#include "compiler.h"
 
 #if defined(__NetBSD__) && !defined(MAP_FILE)
 #define MAP_FLAGS MAP_SHARED
@@ -162,6 +163,8 @@ xf86DisableIO()
 
 #if defined(USE_ARC_MMAP) || defined(__arm32__)
 
+unsigned int IOPortBase;
+
 Bool
 xf86EnableIO()
 {
diff --git a/hw/xfree86/os-support/bsd/bsd_apm.c b/hw/xfree86/os-support/bsd/bsd_apm.c
deleted file mode 100644
index dab0a9a..0000000
--- a/hw/xfree86/os-support/bsd/bsd_apm.c
+++ /dev/null
@@ -1,137 +0,0 @@
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <X11/X.h>
-#include "os.h"
-#include "xf86.h"
-#include "xf86Priv.h"
-#define XF86_OS_PRIVS
-#include "xf86_OSproc.h"
-#include "xf86_OSlib.h"
-
-#include <machine/apmvar.h>
-
-#define APM_DEVICE "/dev/apm"
-
-static void *APMihPtr = NULL;
-static void bsdCloseAPM(void);
-
-static struct {
-    u_int apmBsd;
-    pmEvent xf86;
-} bsdToXF86Array[] = {
-    {APM_STANDBY_REQ, XF86_APM_SYS_STANDBY},
-    {APM_SUSPEND_REQ, XF86_APM_SYS_SUSPEND},
-    {APM_NORMAL_RESUME, XF86_APM_NORMAL_RESUME},
-    {APM_CRIT_RESUME, XF86_APM_CRITICAL_RESUME},
-    {APM_BATTERY_LOW, XF86_APM_LOW_BATTERY},
-    {APM_POWER_CHANGE, XF86_APM_POWER_STATUS_CHANGE},
-    {APM_UPDATE_TIME, XF86_APM_UPDATE_TIME},
-    {APM_CRIT_SUSPEND_REQ, XF86_APM_CRITICAL_SUSPEND},
-    {APM_USER_STANDBY_REQ, XF86_APM_USER_STANDBY},
-    {APM_USER_SUSPEND_REQ, XF86_APM_USER_SUSPEND},
-    {APM_SYS_STANDBY_RESUME, XF86_APM_STANDBY_RESUME},
-#ifdef APM_CAPABILITY_CHANGE
-    {APM_CAPABILITY_CHANGE, XF86_APM_CAPABILITY_CHANGED},
-#endif
-};
-
-static pmEvent
-bsdToXF86(int type)
-{
-    int i;
-
-    for (i = 0; i < ARRAY_SIZE(bsdToXF86Array); i++) {
-        if (type == bsdToXF86Array[i].apmBsd) {
-            return bsdToXF86Array[i].xf86;
-        }
-    }
-    return XF86_APM_UNKNOWN;
-}
-
-/*
- * APM events can be requested direclty from /dev/apm
- */
-static int
-bsdPMGetEventFromOS(int fd, pmEvent * events, int num)
-{
-    struct apm_event_info bsdEvent;
-    int i;
-
-    for (i = 0; i < num; i++) {
-
-        if (ioctl(fd, APM_IOC_NEXTEVENT, &bsdEvent) < 0) {
-            if (errno != EAGAIN) {
-                xf86Msg(X_WARNING, "bsdPMGetEventFromOS: APM_IOC_NEXTEVENT"
-                        " %s\n", strerror(errno));
-            }
-            break;
-        }
-        events[i] = bsdToXF86(bsdEvent.type);
-    }
-    return i;
-}
-
-/*
- * XXX This won't work on /dev/apm !
- *     We should either use /dev/apm_ctl (and kill apmd(8))
- *     or talk to apmd (but its protocol is not publically available)...
- */
-static pmWait
-bsdPMConfirmEventToOs(int fd, pmEvent event)
-{
-    switch (event) {
-    case XF86_APM_SYS_STANDBY:
-    case XF86_APM_USER_STANDBY:
-        if (ioctl(fd, APM_IOC_STANDBY, NULL) == 0)
-            return PM_WAIT;     /* should we stop the Xserver in standby, too? */
-        else
-            return PM_NONE;
-    case XF86_APM_SYS_SUSPEND:
-    case XF86_APM_CRITICAL_SUSPEND:
-    case XF86_APM_USER_SUSPEND:
-        if (ioctl(fd, APM_IOC_SUSPEND, NULL) == 0)
-            return PM_WAIT;
-        else
-            return PM_NONE;
-    case XF86_APM_STANDBY_RESUME:
-    case XF86_APM_NORMAL_RESUME:
-    case XF86_APM_CRITICAL_RESUME:
-    case XF86_APM_STANDBY_FAILED:
-    case XF86_APM_SUSPEND_FAILED:
-        return PM_CONTINUE;
-    default:
-        return PM_NONE;
-    }
-}
-
-PMClose
-xf86OSPMOpen(void)
-{
-    int fd;
-
-    if (APMihPtr || !xf86Info.pmFlag) {
-        return NULL;
-    }
-
-    if ((fd = open(APM_DEVICE, O_RDWR)) == -1) {
-        return NULL;
-    }
-    xf86PMGetEventFromOs = bsdPMGetEventFromOS;
-    xf86PMConfirmEventToOs = bsdPMConfirmEventToOs;
-    APMihPtr = xf86AddGeneralHandler(fd, xf86HandlePMEvents, NULL);
-    return bsdCloseAPM;
-}
-
-static void
-bsdCloseAPM(void)
-{
-    int fd;
-
-    if (APMihPtr) {
-        fd = xf86RemoveGeneralHandler(APMihPtr);
-        close(fd);
-        APMihPtr = NULL;
-    }
-}
diff --git a/hw/xfree86/os-support/bsd/bsd_init.c b/hw/xfree86/os-support/bsd/bsd_init.c
index 6fdf6d4..46536f8 100644
--- a/hw/xfree86/os-support/bsd/bsd_init.c
+++ b/hw/xfree86/os-support/bsd/bsd_init.c
@@ -102,9 +102,9 @@ static char *supported_drivers[] = {
 };
 
 /*
- * Functions to probe for the existance of a supported console driver.
+ * Functions to probe for the existence of a supported console driver.
  * Any function returns either a valid file descriptor (driver probed
- * succesfully), -1 (driver not found), or uses FatalError() if the
+ * successfully), -1 (driver not found), or uses FatalError() if the
  * driver was found but proved to not support the required mode to run
  * an X server.
  */
@@ -131,7 +131,7 @@ static int xf86OpenWScons(void);
  * The sequence of the driver probes is important; start with the
  * driver that is best distinguishable, and end with the most generic
  * driver.  (Otherwise, pcvt would also probe as syscons, and either
- * pcvt or syscons might succesfully probe as pccons.)
+ * pcvt or syscons might successfully probe as pccons.)
  */
 static xf86ConsOpen_t xf86ConsTab[] = {
 #ifdef PCVT_SUPPORT
diff --git a/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c b/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c
deleted file mode 100644
index b046a1a..0000000
--- a/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c
+++ /dev/null
@@ -1,199 +0,0 @@
-/*
- * Copyright (C) 2001 The XFree86 Project, Inc.  All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject to
- * the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES
- * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
- * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project
- * shall not be used in advertising or otherwise to promote the sale, use
- * or other dealings in this Software without prior written authorization
- * from the XFree86 Project.
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <X11/X.h>
-#include "os.h"
-#include "xf86.h"
-#include "xf86Priv.h"
-#define XF86_OS_PRIVS
-#include "xf86_OSproc.h"
-#include "xf86_OSlib.h"
-
-#include <sys/event.h>
-#include <machine/apmvar.h>
-
-#define _PATH_APM_SOCKET	"/var/run/apmdev"
-#define _PATH_APM_DEV		"/dev/apm"
-#define _PATH_APM_CTLDEV	"/dev/apmctl"
-
-static void *APMihPtr = NULL;
-static int devFd = -1;
-static int ctlFd = -1;
-static void bsdCloseAPM(void);
-
-static struct {
-    u_int apmBsd;
-    pmEvent xf86;
-} bsdToXF86Array[] = {
-    {APM_STANDBY_REQ, XF86_APM_SYS_STANDBY},
-    {APM_SUSPEND_REQ, XF86_APM_SYS_SUSPEND},
-    {APM_NORMAL_RESUME, XF86_APM_NORMAL_RESUME},
-    {APM_CRIT_RESUME, XF86_APM_CRITICAL_RESUME},
-    {APM_BATTERY_LOW, XF86_APM_LOW_BATTERY},
-    {APM_POWER_CHANGE, XF86_APM_POWER_STATUS_CHANGE},
-    {APM_UPDATE_TIME, XF86_APM_UPDATE_TIME},
-    {APM_CRIT_SUSPEND_REQ, XF86_APM_CRITICAL_SUSPEND},
-    {APM_USER_STANDBY_REQ, XF86_APM_USER_STANDBY},
-    {APM_USER_SUSPEND_REQ, XF86_APM_USER_SUSPEND},
-    {APM_SYS_STANDBY_RESUME, XF86_APM_STANDBY_RESUME},
-#ifdef APM_CAPABILITY_CHANGE
-    {APM_CAPABILITY_CHANGE, XF86_APM_CAPABILITY_CHANGED},
-#endif
-};
-
-static pmEvent
-bsdToXF86(int type)
-{
-    int i;
-
-    for (i = 0; i < ARRAY_SIZE(bsdToXF86Array); i++) {
-        if (type == bsdToXF86Array[i].apmBsd) {
-            return bsdToXF86Array[i].xf86;
-        }
-    }
-    return XF86_APM_UNKNOWN;
-}
-
-/*
- * APM events can be requested direclty from /dev/apm
- */
-static int
-bsdPMGetEventFromOS(int kq, pmEvent * events, int num)
-{
-    struct kevent ev;
-    int i, result;
-    struct timespec ts = { 0, 0 };
-
-    for (i = 0; i < num; i++) {
-        result = kevent(kq, NULL, 0, &ev, 1, &ts);
-        if (result == 0 || APM_EVENT_TYPE(ev.data) == APM_NOEVENT) {
-            /* no event */
-            break;
-        }
-        else if (result < 0) {
-            xf86Msg(X_WARNING, "bsdPMGetEventFromOS: kevent returns"
-                    " %s\n", strerror(errno));
-            break;
-        }
-        events[i] = bsdToXF86(APM_EVENT_TYPE(ev.data));
-    }
-    return i;
-}
-
-/*
- * If apmd(8) is running, he will get the events and handle them,
- * so, we've nothing to do here.
- * Otherwise, opening /dev/apmctl will succeed and we have to send the
- * confirmations to /dev/apmctl.
- */
-static pmWait
-bsdPMConfirmEventToOs(int dummyfd, pmEvent event)
-{
-    if (ctlFd < 0) {
-        if ((ctlFd = open(_PATH_APM_CTLDEV, O_RDWR)) < 0) {
-            return PM_NONE;
-        }
-    }
-    /* apmctl open succeedeed */
-    switch (event) {
-    case XF86_APM_SYS_STANDBY:
-    case XF86_APM_USER_STANDBY:
-        if (ioctl(ctlFd, APM_IOC_STANDBY, NULL) == 0)
-            return PM_WAIT;     /* should we stop the Xserver in standby, too? */
-        else
-            return PM_NONE;
-
-    case XF86_APM_SYS_SUSPEND:
-    case XF86_APM_CRITICAL_SUSPEND:
-    case XF86_APM_USER_SUSPEND:
-        if (ioctl(ctlFd, APM_IOC_SUSPEND, NULL) == 0)
-            return PM_WAIT;
-        else
-            return PM_NONE;
-        break;
-    case XF86_APM_STANDBY_RESUME:
-    case XF86_APM_NORMAL_RESUME:
-    case XF86_APM_CRITICAL_RESUME:
-    case XF86_APM_STANDBY_FAILED:
-    case XF86_APM_SUSPEND_FAILED:
-        return PM_CONTINUE;
-        break;
-    default:
-        return PM_NONE;
-    }
-}
-
-PMClose
-xf86OSPMOpen(void)
-{
-    int kq;
-    struct kevent ev;
-
-    if (APMihPtr || !xf86Info.pmFlag) {
-        return NULL;
-    }
-    if ((devFd = open(_PATH_APM_DEV, O_RDONLY)) == -1) {
-        return NULL;
-    }
-    if ((kq = kqueue()) <= 0) {
-        close(devFd);
-        return NULL;
-    }
-    EV_SET(&ev, devFd, EVFILT_READ, EV_ADD | EV_ENABLE | EV_CLEAR, 0, 0, NULL);
-    if (kevent(kq, &ev, 1, NULL, 0, NULL) < 0) {
-        close(devFd);
-        return NULL;
-    }
-
-    xf86PMGetEventFromOs = bsdPMGetEventFromOS;
-    xf86PMConfirmEventToOs = bsdPMConfirmEventToOs;
-    APMihPtr = xf86AddGeneralHandler(kq, xf86HandlePMEvents, NULL);
-    return bsdCloseAPM;
-}
-
-static void
-bsdCloseAPM(void)
-{
-    int kq;
-
-    if (APMihPtr) {
-        kq = xf86RemoveGeneralHandler(APMihPtr);
-        close(devFd);
-        devFd = -1;
-        close(kq);
-        if (ctlFd >= 0) {
-            close(ctlFd);
-            ctlFd = -1;
-        }
-        APMihPtr = NULL;
-    }
-}
diff --git a/hw/xfree86/os-support/bsd/memrange.h b/hw/xfree86/os-support/bsd/memrange.h
index bacd4aa..49d5627 100644
--- a/hw/xfree86/os-support/bsd/memrange.h
+++ b/hw/xfree86/os-support/bsd/memrange.h
@@ -1,5 +1,5 @@
 /*
- * Memory range attribute operations, peformed on /dev/mem
+ * Memory range attribute operations, performed on /dev/mem
  */
 
 #ifdef HAVE_XORG_CONFIG_H
diff --git a/hw/xfree86/os-support/bus/Makefile.in b/hw/xfree86/os-support/bus/Makefile.in
index 4c01846..00d7991 100644
--- a/hw/xfree86/os-support/bus/Makefile.in
+++ b/hw/xfree86/os-support/bus/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -110,7 +110,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -217,8 +216,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
@@ -238,8 +235,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -253,6 +248,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -271,14 +268,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -295,8 +284,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -352,6 +343,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -404,7 +397,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -428,29 +420,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -488,8 +464,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -500,14 +474,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -752,7 +720,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/hw/xfree86/os-support/hurd/Makefile.am b/hw/xfree86/os-support/hurd/Makefile.am
index 3866054..33857f4 100644
--- a/hw/xfree86/os-support/hurd/Makefile.am
+++ b/hw/xfree86/os-support/hurd/Makefile.am
@@ -10,6 +10,6 @@ libhurd_la_SOURCES = hurd_bell.c hurd_init.c \
 		$(srcdir)/../shared/kmod_noop.c \
 		$(srcdir)/../shared/agp_noop.c
 
-AM_CFLAGS = -DUSESTDRES -DHAVE_SYSV_IPC $(XORG_CFLAGS) $(DIX_CFLAGS)
+AM_CFLAGS = -DHAVE_SYSV_IPC $(XORG_CFLAGS) $(DIX_CFLAGS)
 
 AM_CPPFLAGS = $(XORG_INCS)
diff --git a/hw/xfree86/os-support/hurd/Makefile.in b/hw/xfree86/os-support/hurd/Makefile.in
index 3737677..9a86372 100644
--- a/hw/xfree86/os-support/hurd/Makefile.in
+++ b/hw/xfree86/os-support/hurd/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -105,7 +105,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -183,8 +182,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
@@ -204,8 +201,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -219,6 +214,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -237,14 +234,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -261,8 +250,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -318,6 +309,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -370,7 +363,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -394,29 +386,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -454,8 +430,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -466,14 +440,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -557,7 +525,7 @@ libhurd_la_SOURCES = hurd_bell.c hurd_init.c \
 		$(srcdir)/../shared/kmod_noop.c \
 		$(srcdir)/../shared/agp_noop.c
 
-AM_CFLAGS = -DUSESTDRES -DHAVE_SYSV_IPC $(XORG_CFLAGS) $(DIX_CFLAGS)
+AM_CFLAGS = -DHAVE_SYSV_IPC $(XORG_CFLAGS) $(DIX_CFLAGS)
 AM_CPPFLAGS = $(XORG_INCS)
 all: all-am
 
@@ -757,7 +725,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/hw/xfree86/os-support/linux/Makefile.am b/hw/xfree86/os-support/linux/Makefile.am
index 9b4535b..4392fe8 100644
--- a/hw/xfree86/os-support/linux/Makefile.am
+++ b/hw/xfree86/os-support/linux/Makefile.am
@@ -13,21 +13,32 @@ APM_SRCS = lnx_apm.c
 XORG_CFLAGS += -DHAVE_APM
 endif
 
+if !LNXAPM
+if !LNXACPI
+ACPI_SRCS = $(srcdir)/../shared/pm_noop.c
+endif
+endif
+
 if SYSTEMD_LOGIND
 LOGIND_SRCS = systemd-logind.c
 XORG_CFLAGS += $(DBUS_CFLAGS)
 endif
 
+if AGP
+AGP_SRCS = lnx_agp.c
+endif
+
 liblinux_la_SOURCES = linux.h lnx_init.c lnx_video.c \
-                     lnx_agp.c lnx_kmod.c lnx_bell.c lnx_platform.c \
+                      lnx_kmod.c lnx_bell.c lnx_platform.c \
 		     $(srcdir)/../shared/VTsw_usl.c \
 		     $(srcdir)/../shared/posix_tty.c \
                      $(srcdir)/../shared/vidmem.c \
 		     $(srcdir)/../shared/sigio.c \
                      $(ACPI_SRCS) \
                      $(APM_SRCS) \
-                     $(LOGIND_SRCS)
+                     $(LOGIND_SRCS) \
+		     $(AGP_SRCS)
 
-AM_CFLAGS = -DUSESTDRES -DHAVE_SYSV_IPC $(DIX_CFLAGS) $(XORG_CFLAGS) $(PLATFORM_DEFINES)
+AM_CFLAGS = -DHAVE_SYSV_IPC $(DIX_CFLAGS) $(XORG_CFLAGS) $(PLATFORM_DEFINES)
 
 AM_CPPFLAGS = $(XORG_INCS) $(PLATFORM_INCLUDES) $(LIBDRM_CFLAGS)
diff --git a/hw/xfree86/os-support/linux/Makefile.in b/hw/xfree86/os-support/linux/Makefile.in
index cb0dfc4..7f96c1f 100644
--- a/hw/xfree86/os-support/linux/Makefile.in
+++ b/hw/xfree86/os-support/linux/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -109,25 +109,27 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 LTLIBRARIES = $(noinst_LTLIBRARIES)
 liblinux_la_LIBADD =
 am__liblinux_la_SOURCES_DIST = linux.h lnx_init.c lnx_video.c \
-	lnx_agp.c lnx_kmod.c lnx_bell.c lnx_platform.c \
+	lnx_kmod.c lnx_bell.c lnx_platform.c \
 	$(srcdir)/../shared/VTsw_usl.c $(srcdir)/../shared/posix_tty.c \
 	$(srcdir)/../shared/vidmem.c $(srcdir)/../shared/sigio.c \
-	lnx_acpi.c lnx_apm.c systemd-logind.c
+	$(srcdir)/../shared/pm_noop.c lnx_acpi.c lnx_apm.c \
+	systemd-logind.c lnx_agp.c
 @LNXACPI_TRUE@@LNXAPM_FALSE@am__objects_1 = lnx_apm.lo
+@LNXACPI_FALSE@@LNXAPM_FALSE@am__objects_2 = pm_noop.lo
 @LNXACPI_TRUE@am__objects_2 = lnx_acpi.lo $(am__objects_1)
 @LNXAPM_TRUE@am__objects_3 = lnx_apm.lo
 @SYSTEMD_LOGIND_TRUE@am__objects_4 = systemd-logind.lo
-am_liblinux_la_OBJECTS = lnx_init.lo lnx_video.lo lnx_agp.lo \
-	lnx_kmod.lo lnx_bell.lo lnx_platform.lo VTsw_usl.lo \
-	posix_tty.lo vidmem.lo sigio.lo $(am__objects_2) \
-	$(am__objects_3) $(am__objects_4)
+@AGP_TRUE@am__objects_5 = lnx_agp.lo
+am_liblinux_la_OBJECTS = lnx_init.lo lnx_video.lo lnx_kmod.lo \
+	lnx_bell.lo lnx_platform.lo VTsw_usl.lo posix_tty.lo vidmem.lo \
+	sigio.lo $(am__objects_2) $(am__objects_3) $(am__objects_4) \
+	$(am__objects_5)
 liblinux_la_OBJECTS = $(am_liblinux_la_OBJECTS)
 AM_V_lt = $(am__v_lt_@AM_V@)
 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
@@ -153,8 +155,9 @@ am__depfiles_remade = ./$(DEPDIR)/VTsw_usl.Plo \
 	./$(DEPDIR)/lnx_apm.Plo ./$(DEPDIR)/lnx_bell.Plo \
 	./$(DEPDIR)/lnx_init.Plo ./$(DEPDIR)/lnx_kmod.Plo \
 	./$(DEPDIR)/lnx_platform.Plo ./$(DEPDIR)/lnx_video.Plo \
-	./$(DEPDIR)/posix_tty.Plo ./$(DEPDIR)/sigio.Plo \
-	./$(DEPDIR)/systemd-logind.Plo ./$(DEPDIR)/vidmem.Plo
+	./$(DEPDIR)/pm_noop.Plo ./$(DEPDIR)/posix_tty.Plo \
+	./$(DEPDIR)/sigio.Plo ./$(DEPDIR)/systemd-logind.Plo \
+	./$(DEPDIR)/vidmem.Plo
 am__mv = mv -f
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@@ -198,8 +201,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
@@ -219,8 +220,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -234,6 +233,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -252,14 +253,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -276,8 +269,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -333,6 +328,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -385,7 +382,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -409,29 +405,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -470,8 +450,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -482,14 +460,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -563,20 +535,23 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 noinst_LTLIBRARIES = liblinux.la
+@LNXACPI_FALSE@@LNXAPM_FALSE@ACPI_SRCS = $(srcdir)/../shared/pm_noop.c
 @LNXACPI_TRUE@ACPI_SRCS = lnx_acpi.c $(am__append_1)
 @LNXAPM_TRUE@APM_SRCS = lnx_apm.c
 @SYSTEMD_LOGIND_TRUE@LOGIND_SRCS = systemd-logind.c
+@AGP_TRUE@AGP_SRCS = lnx_agp.c
 liblinux_la_SOURCES = linux.h lnx_init.c lnx_video.c \
-                     lnx_agp.c lnx_kmod.c lnx_bell.c lnx_platform.c \
+                      lnx_kmod.c lnx_bell.c lnx_platform.c \
 		     $(srcdir)/../shared/VTsw_usl.c \
 		     $(srcdir)/../shared/posix_tty.c \
                      $(srcdir)/../shared/vidmem.c \
 		     $(srcdir)/../shared/sigio.c \
                      $(ACPI_SRCS) \
                      $(APM_SRCS) \
-                     $(LOGIND_SRCS)
+                     $(LOGIND_SRCS) \
+		     $(AGP_SRCS)
 
-AM_CFLAGS = -DUSESTDRES -DHAVE_SYSV_IPC $(DIX_CFLAGS) $(XORG_CFLAGS) $(PLATFORM_DEFINES)
+AM_CFLAGS = -DHAVE_SYSV_IPC $(DIX_CFLAGS) $(XORG_CFLAGS) $(PLATFORM_DEFINES)
 AM_CPPFLAGS = $(XORG_INCS) $(PLATFORM_INCLUDES) $(LIBDRM_CFLAGS)
 all: all-am
 
@@ -641,6 +616,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lnx_kmod.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lnx_platform.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lnx_video.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pm_noop.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/posix_tty.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigio.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/systemd-logind.Plo@am__quote@ # am--include-marker
@@ -701,6 +677,13 @@ sigio.lo: $(srcdir)/../shared/sigio.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sigio.lo `test -f '$(srcdir)/../shared/sigio.c' || echo '$(srcdir)/'`$(srcdir)/../shared/sigio.c
 
+pm_noop.lo: $(srcdir)/../shared/pm_noop.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pm_noop.lo -MD -MP -MF $(DEPDIR)/pm_noop.Tpo -c -o pm_noop.lo `test -f '$(srcdir)/../shared/pm_noop.c' || echo '$(srcdir)/'`$(srcdir)/../shared/pm_noop.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/pm_noop.Tpo $(DEPDIR)/pm_noop.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$(srcdir)/../shared/pm_noop.c' object='pm_noop.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pm_noop.lo `test -f '$(srcdir)/../shared/pm_noop.c' || echo '$(srcdir)/'`$(srcdir)/../shared/pm_noop.c
+
 mostlyclean-libtool:
 	-rm -f *.lo
 
@@ -758,7 +741,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
@@ -841,6 +823,7 @@ distclean: distclean-am
 	-rm -f ./$(DEPDIR)/lnx_kmod.Plo
 	-rm -f ./$(DEPDIR)/lnx_platform.Plo
 	-rm -f ./$(DEPDIR)/lnx_video.Plo
+	-rm -f ./$(DEPDIR)/pm_noop.Plo
 	-rm -f ./$(DEPDIR)/posix_tty.Plo
 	-rm -f ./$(DEPDIR)/sigio.Plo
 	-rm -f ./$(DEPDIR)/systemd-logind.Plo
@@ -899,6 +882,7 @@ maintainer-clean: maintainer-clean-am
 	-rm -f ./$(DEPDIR)/lnx_kmod.Plo
 	-rm -f ./$(DEPDIR)/lnx_platform.Plo
 	-rm -f ./$(DEPDIR)/lnx_video.Plo
+	-rm -f ./$(DEPDIR)/pm_noop.Plo
 	-rm -f ./$(DEPDIR)/posix_tty.Plo
 	-rm -f ./$(DEPDIR)/sigio.Plo
 	-rm -f ./$(DEPDIR)/systemd-logind.Plo
diff --git a/hw/xfree86/os-support/linux/lnx_agp.c b/hw/xfree86/os-support/linux/lnx_agp.c
index e47bbfa..3aec539 100644
--- a/hw/xfree86/os-support/linux/lnx_agp.c
+++ b/hw/xfree86/os-support/linux/lnx_agp.c
@@ -143,6 +143,7 @@ xf86GetAGPInfo(int screenNum)
         xf86DrvMsg(screenNum, X_ERROR,
                    "xf86GetAGPInfo: AGPIOC_INFO failed (%s)\n",
                    strerror(errno));
+        free(info);
         return NULL;
     }
 
diff --git a/hw/xfree86/os-support/linux/lnx_apm.c b/hw/xfree86/os-support/linux/lnx_apm.c
index 29c3633..b928feb 100644
--- a/hw/xfree86/os-support/linux/lnx_apm.c
+++ b/hw/xfree86/os-support/linux/lnx_apm.c
@@ -138,13 +138,14 @@ xf86OSPMOpen(void)
 #ifdef HAVE_ACPI
     /* Favour ACPI over APM, but only when enabled */
 
-    if (!xf86acpiDisableFlag)
+    if (!xf86acpiDisableFlag) {
         ret = lnxACPIOpen();
-
-    if (!ret)
+        if (ret)
+            return ret;
+    }
 #endif
 #ifdef HAVE_APM
-        ret = lnxAPMOpen();
+    ret = lnxAPMOpen();
 #endif
 
     return ret;
diff --git a/hw/xfree86/os-support/linux/lnx_init.c b/hw/xfree86/os-support/linux/lnx_init.c
index 011d8da..111b3b4 100644
--- a/hw/xfree86/os-support/linux/lnx_init.c
+++ b/hw/xfree86/os-support/linux/lnx_init.c
@@ -299,6 +299,7 @@ void
 xf86CloseConsole(void)
 {
     struct vt_mode VT;
+    struct vt_stat vts;
     int ret;
 
     if (xf86Info.ShareVTs) {
@@ -336,10 +337,19 @@ xf86CloseConsole(void)
 
     if (xf86Info.autoVTSwitch) {
         /*
-         * Perform a switch back to the active VT when we were started
-         */
+        * Perform a switch back to the active VT when we were started if our
+        * vt is active now.
+        */
         if (activeVT >= 0) {
-            switch_to(activeVT, "xf86CloseConsole");
+            SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_GETSTATE, &vts));
+            if (ret < 0) {
+                xf86Msg(X_WARNING, "xf86OpenConsole: VT_GETSTATE failed: %s\n",
+                        strerror(errno));
+            } else {
+                if (vts.v_active == xf86Info.vtno) {
+                    switch_to(activeVT, "xf86CloseConsole");
+                }
+            }
             activeVT = -1;
         }
     }
diff --git a/hw/xfree86/os-support/linux/lnx_platform.c b/hw/xfree86/os-support/linux/lnx_platform.c
index 70374ac..8a6be97 100644
--- a/hw/xfree86/os-support/linux/lnx_platform.c
+++ b/hw/xfree86/os-support/linux/lnx_platform.c
@@ -23,13 +23,13 @@
 static Bool
 get_drm_info(struct OdevAttributes *attribs, char *path, int delayed_index)
 {
-    drmSetVersion sv;
     drmVersionPtr v;
-    char *buf;
     int fd;
     int err = 0;
     Bool paused, server_fd = FALSE;
 
+    LogMessage(X_INFO, "Platform probe for %s\n", attribs->syspath);
+
     fd = systemd_logind_take_fd(attribs->major, attribs->minor, path, &paused);
     if (fd != -1) {
         if (paused) {
@@ -48,18 +48,6 @@ get_drm_info(struct OdevAttributes *attribs, char *path, int delayed_index)
     if (fd == -1)
         return FALSE;
 
-    sv.drm_di_major = 1;
-    sv.drm_di_minor = 4;
-    sv.drm_dd_major = -1;       /* Don't care */
-    sv.drm_dd_minor = -1;       /* Don't care */
-
-    err = drmSetInterfaceVersion(fd, &sv);
-    if (err) {
-        xf86Msg(X_ERROR, "%s: failed to set DRM interface version 1.4: %s\n",
-                path, strerror(-err));
-        goto out;
-    }
-
     /* for a delayed probe we've already added the device */
     if (delayed_index == -1) {
             xf86_add_platform_device(attribs, FALSE);
@@ -69,10 +57,6 @@ get_drm_info(struct OdevAttributes *attribs, char *path, int delayed_index)
     if (server_fd)
         xf86_platform_devices[delayed_index].flags |= XF86_PDEV_SERVER_FD;
 
-    buf = drmGetBusid(fd);
-    xf86_platform_odev_attributes(delayed_index)->busid = XNFstrdup(buf);
-    drmFreeBusid(buf);
-
     v = drmGetVersion(fd);
     if (!v) {
         xf86Msg(X_ERROR, "%s: failed to query DRM version\n", path);
@@ -101,6 +85,9 @@ xf86PlatformDeviceCheckBusID(struct xf86_platform_device *device, const char *bu
     bustype = StringToBusType(busid, &id);
     if (bustype == BUS_PCI) {
         struct pci_device *pPci = device->pdev;
+        if (!pPci)
+            return FALSE;
+
         if (xf86ComparePciBusString(busid,
                                     ((pPci->domain << 8)
                                      | pPci->bus),
@@ -119,6 +106,11 @@ xf86PlatformDeviceCheckBusID(struct xf86_platform_device *device, const char *bu
             return FALSE;
         return TRUE;
     }
+    else if (bustype == BUS_USB) {
+        if (strcasecmp(busid, device->attribs->busid))
+            return FALSE;
+        return TRUE;
+    }
     return FALSE;
 }
 
diff --git a/hw/xfree86/os-support/linux/lnx_video.c b/hw/xfree86/os-support/linux/lnx_video.c
index 04e4509..fd83022 100644
--- a/hw/xfree86/os-support/linux/lnx_video.c
+++ b/hw/xfree86/os-support/linux/lnx_video.c
@@ -116,16 +116,38 @@ hwDisableIO(void)
 static Bool
 hwEnableIO(void)
 {
-    if (ioperm(0, 1024, 1) || iopl(3)) {
-        ErrorF("xf86EnableIOPorts: failed to set IOPL for I/O (%s)\n",
+    short i;
+    size_t n=0;
+    int begin, end;
+    char *buf=NULL, target[5];
+    FILE *fp;
+
+    if (ioperm(0, 1024, 1)) {
+        ErrorF("xf86EnableIO: failed to enable I/O ports 0000-03ff (%s)\n",
                strerror(errno));
         return FALSE;
     }
+
 #if !defined(__alpha__)
-    /* XXX: this is actually not trapping anything because of iopl(3)
-     * above */
-    ioperm(0x40, 4, 0);         /* trap access to the timer chip */
-    ioperm(0x60, 4, 0);         /* trap access to the keyboard controller */
+    target[4] = '\0';
+
+    /* trap access to the keyboard controller(s) and timer chip(s) */
+    fp = fopen("/proc/ioports", "r");
+    while (getline(&buf, &n, fp) != -1) {
+        if ((strstr(buf, "keyboard") != NULL) || (strstr(buf, "timer") != NULL)) {
+            for (i=0; i<4; i++)
+                target[i] = buf[i+2];
+            begin = atoi(target);
+
+            for (i=0; i<4; i++)
+                target[i] = buf[i+7];
+            end = atoi(target);
+
+            ioperm(begin, end-begin+1, 0);
+        }
+    }
+    free(buf);
+    fclose(fp);
 #endif
 
     return TRUE;
diff --git a/hw/xfree86/os-support/linux/systemd-logind.c b/hw/xfree86/os-support/linux/systemd-logind.c
index 13784d1..dbb00cd 100644
--- a/hw/xfree86/os-support/linux/systemd-logind.c
+++ b/hw/xfree86/os-support/linux/systemd-logind.c
@@ -38,6 +38,7 @@
 #include "xf86.h"
 #include "xf86platformBus.h"
 #include "xf86Xinput.h"
+#include "xf86Priv.h"
 #include "globals.h"
 
 #include "systemd-logind.h"
@@ -302,6 +303,37 @@ cleanup:
     dbus_error_free(&error);
 }
 
+/*
+ * Send a message to logind, to pause the drm device
+ * and ensure the drm_drop_master is done before
+ * VT_RELDISP when switching VT
+ */
+void systemd_logind_drop_master(void)
+{
+    int i;
+    for (i = 0; i < xf86_num_platform_devices; i++) {
+        if (xf86_platform_devices[i].flags & XF86_PDEV_SERVER_FD) {
+            dbus_int32_t major, minor;
+            struct systemd_logind_info *info = &logind_info;
+
+            xf86_platform_devices[i].flags |= XF86_PDEV_PAUSED;
+            major = xf86_platform_odev_attributes(i)->major;
+            minor = xf86_platform_odev_attributes(i)->minor;
+            systemd_logind_ack_pause(info, minor, major);
+        }
+    }
+}
+
+static Bool are_platform_devices_resumed(void) {
+    int i;
+    for (i = 0; i < xf86_num_platform_devices; i++) {
+        if (xf86_platform_devices[i].flags & XF86_PDEV_PAUSED) {
+            return FALSE;
+        }
+    }
+    return TRUE;
+}
+
 static DBusHandlerResult
 message_filter(DBusConnection * connection, DBusMessage * message, void *data)
 {
@@ -313,35 +345,11 @@ message_filter(DBusConnection * connection, DBusMessage * message, void *data)
     dbus_int32_t major, minor;
     char *pause_str;
 
-    if (dbus_message_get_type (message) != DBUS_MESSAGE_TYPE_SIGNAL)
+    if (strcmp(dbus_message_get_path(message), info->session) != 0)
         return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
 
     dbus_error_init(&error);
 
-    if (dbus_message_is_signal(message,
-                               "org.freedesktop.DBus", "NameOwnerChanged")) {
-        char *name, *old_owner, *new_owner;
-
-        dbus_message_get_args(message, &error,
-                              DBUS_TYPE_STRING, &name,
-                              DBUS_TYPE_STRING, &old_owner,
-                              DBUS_TYPE_STRING, &new_owner, DBUS_TYPE_INVALID);
-        if (dbus_error_is_set(&error)) {
-            LogMessage(X_ERROR, "systemd-logind: NameOwnerChanged: %s\n",
-                       error.message);
-            dbus_error_free(&error);
-            return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
-        }
-
-        if (name && strcmp(name, "org.freedesktop.login1") == 0)
-            FatalError("systemd-logind disappeared (stopped/restarted?)\n");
-
-        return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
-    }
-
-    if (strcmp(dbus_message_get_path(message), info->session) != 0)
-        return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
-
     if (dbus_message_is_signal(message, "org.freedesktop.login1.Session",
                                "PauseDevice")) {
         if (!dbus_message_get_args(message, &error,
@@ -417,14 +425,14 @@ message_filter(DBusConnection * connection, DBusMessage * message, void *data)
         /* info->vt_active gets set by systemd_logind_vtenter() */
         info->active = TRUE;
 
-        if (pdev)
+        if (pdev) {
             pdev->flags &= ~XF86_PDEV_PAUSED;
-        else
+        } else
             systemd_logind_set_input_fd_for_all_devs(major, minor, fd,
                                                      info->vt_active);
-
-        /* Always call vtenter(), in case there are only legacy video devs */
-        systemd_logind_vtenter();
+        /* Call vtenter if all platform devices are resumed, or if there are no platform device */
+        if (are_platform_devices_resumed())
+            systemd_logind_vtenter();
     }
     return DBUS_HANDLER_RESULT_HANDLED;
 }
@@ -499,15 +507,6 @@ connect_hook(DBusConnection *connection, void *data)
         goto cleanup;
     }
 
-    dbus_bus_add_match(connection,
-        "type='signal',sender='org.freedesktop.DBus',interface='org.freedesktop.DBus',member='NameOwnerChanged',path='/org/freedesktop/DBus'",
-        &error);
-    if (dbus_error_is_set(&error)) {
-        LogMessage(X_ERROR, "systemd-logind: could not add match: %s\n",
-                   error.message);
-        goto cleanup;
-    }
-
     dbus_bus_add_match(connection,
         "type='signal',sender='org.freedesktop.login1',interface='org.freedesktop.login1.Session',member='PauseDevice'",
         &error);
@@ -616,7 +615,7 @@ static struct dbus_core_hook core_hook = {
 int
 systemd_logind_init(void)
 {
-    if (!ServerIsNotSeat0() && linux_parse_vt_settings(TRUE) && !linux_get_keeptty()) {
+    if (!ServerIsNotSeat0() && xf86HasTTYs() && linux_parse_vt_settings(TRUE) && !linux_get_keeptty()) {
         LogMessage(X_INFO,
             "systemd-logind: logind integration requires -keeptty and "
             "-keeptty was not provided, disabling logind integration\n");
diff --git a/hw/xfree86/os-support/meson.build b/hw/xfree86/os-support/meson.build
index b6e5c97..b6069ee 100644
--- a/hw/xfree86/os-support/meson.build
+++ b/hw/xfree86/os-support/meson.build
@@ -11,22 +11,28 @@ hdrs_xorg_os_support = [
     'xf86_OSproc.h'
 ]
 
-os_support_flags = ['-DUSESTDRES']
+os_dep = []
+os_c_args = []
 
 if get_option('pciaccess')
     srcs_xorg_os_support += 'bus/Pci.c'
-    if host_machine.system() != 'linux' and host_machine.system() != 'solaris'
+    if host_machine.system() != 'linux'
         srcs_xorg_os_support += 'bus/bsd_pci.c'
     endif
-    if host_machine.cpu() == 'sparc'
+    if host_machine.cpu() == 'sparc' or host_machine.cpu() == 'sparc64'
         srcs_xorg_os_support += 'bus/Sbus.c'
         install_data('bus/xf86Sbus.h', install_dir: xorgsdkdir)
     endif
 endif
 
+if get_option('agp') == 'auto'
+    build_agp = cc.has_header('sys/agpio.h') or cc.has_header('sys/agpgart.h') or cc.has_header('linux/agpgart.h')
+else
+    build_agp = get_option('agp') == 'true'
+endif
+
 if host_machine.system() == 'linux'
     srcs_xorg_os_support += [
-        'linux/lnx_agp.c',
         'linux/lnx_bell.c',
         'linux/lnx_init.c',
         'linux/lnx_kmod.c',
@@ -35,6 +41,11 @@ if host_machine.system() == 'linux'
         'misc/SlowBcopy.c',
         'shared/VTsw_usl.c',
     ]
+    if build_agp
+        srcs_xorg_os_support += 'linux/lnx_agp.c'
+    else
+        srcs_xorg_os_support += 'shared/agp_noop.c'
+    endif
     if build_systemd_logind
         srcs_xorg_os_support += 'linux/systemd-logind.c'
     endif
@@ -45,9 +56,11 @@ if host_machine.system() == 'linux'
         if build_acpi
             srcs_xorg_os_support += 'linux/lnx_acpi.c'
         endif
+    else
+        srcs_xorg_os_support += 'shared/pm_noop.c'
     endif
 
-elif host_machine.system() == 'solaris'
+elif host_machine.system() == 'sunos'
     srcs_xorg_os_support += [
         'solaris/sun_apm.c',
         'solaris/sun_bell.c',
@@ -62,7 +75,7 @@ elif host_machine.system() == 'solaris'
         srcs_xorg_os_support += 'shared/VTsw_noop.c'
     endif
 
-    if cc.has_header('sys/agpio.h') or cc.has_header('sys/agpgart.h')
+    if build_agp
         srcs_xorg_os_support += 'solaris/sun_agp.c'
     else
         srcs_xorg_os_support += 'shared/agp_noop.c'
@@ -83,14 +96,21 @@ elif host_machine.system().endswith('bsd')
         'bsd/bsd_VTsw.c',
         'bsd/bsd_bell.c',
         'bsd/bsd_init.c',
+	'shared/pm_noop.c'
     ]
 
-    # XXX: APM
-
     if host_machine.cpu_family() == 'x86_64'
         srcs_xorg_os_support += 'bsd/i386_video.c'
+        if host_machine.system() == 'netbsd'
+            os_dep += cc.find_library('x86_64')
+        elif host_machine.system() == 'openbsd'
+            os_dep += cc.find_library('amd64')
+        endif
     elif host_machine.cpu_family() == 'x86'
         srcs_xorg_os_support += 'bsd/i386_video.c'
+        if host_machine.system() == 'netbsd' or host_machine.system() == 'openbsd'
+            os_dep += cc.find_library('i386')
+        endif
     elif host_machine.cpu_family() == 'arm'
         srcs_xorg_os_support += 'bsd/arm_video.c'
     elif host_machine.cpu_family() == 'powerpc'
@@ -100,6 +120,11 @@ elif host_machine.system().endswith('bsd')
         srcs_xorg_os_support += 'shared/ioperm_noop.c'
     elif host_machine.cpu_family() == 'alpha'
         srcs_xorg_os_support += 'bsd/alpha_video.c'
+        if host_machine.system() == 'freebsd'
+            os_dep += cc.find_library('io')
+        elif host_machine.system() == 'netbsd'
+            os_c_args += '-DUSE_ALPHA_PIO'
+        endif
     endif
 
     if host_machine.system() == 'freebsd'
@@ -108,7 +133,7 @@ elif host_machine.system().endswith('bsd')
         srcs_xorg_os_support += 'shared/kmod_noop.c'
     endif
 
-    if cc.has_header('sys/agpio.h') or cc.has_header('sys/agpgart.h')
+    if build_agp
         srcs_xorg_os_support += 'linux/lnx_agp.c'
     else
         srcs_xorg_os_support += 'shared/agp_noop.c'
@@ -137,8 +162,9 @@ xorg_os_support = static_library('xorg_os_support',
         common_dep,
         dbus_dep,
         libdrm_dep,
+        os_dep,
     ],
-    c_args: xorg_c_args,
+    c_args: xorg_c_args + os_c_args,
 )
 
 install_data(hdrs_xorg_os_support, install_dir: xorgsdkdir)
diff --git a/hw/xfree86/os-support/misc/Makefile.in b/hw/xfree86/os-support/misc/Makefile.in
index 932eedc..64c6eae 100644
--- a/hw/xfree86/os-support/misc/Makefile.in
+++ b/hw/xfree86/os-support/misc/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -105,7 +105,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -176,8 +175,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
@@ -197,8 +194,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -212,6 +207,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -230,14 +227,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -254,8 +243,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -311,6 +302,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -363,7 +356,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -387,29 +379,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -447,8 +423,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -459,14 +433,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -686,7 +654,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/hw/xfree86/os-support/shared/sigio.c b/hw/xfree86/os-support/shared/sigio.c
index 247bec7..ad8af60 100644
--- a/hw/xfree86/os-support/shared/sigio.c
+++ b/hw/xfree86/os-support/shared/sigio.c
@@ -68,7 +68,7 @@
 #endif
 
 #ifdef MAXDEVICES
-/* MAXDEVICES represents the maximimum number of input devices usable
+/* MAXDEVICES represents the maximum number of input devices usable
  * at the same time plus one entry for DRM support.
  */
 #define MAX_FUNCS   (MAXDEVICES + 1)
@@ -185,9 +185,6 @@ xf86InstallSIGIOHandler(int fd, void (*f) (int, void *), void *closure)
     int i;
     int installed = FALSE;
 
-    if (!xf86Info.useSIGIO)
-        return 0;
-
     for (i = 0; i < MAX_FUNCS; i++) {
         if (!xf86SigIOFuncs[i].f) {
             if (xf86IsPipe(fd))
@@ -257,9 +254,6 @@ xf86RemoveSIGIOHandler(int fd)
     int max;
     int ret;
 
-    if (!xf86Info.useSIGIO)
-        return 0;
-
     max = 0;
     ret = 0;
     for (i = 0; i < MAX_FUNCS; i++) {
diff --git a/hw/xfree86/os-support/solaris/Makefile.am b/hw/xfree86/os-support/solaris/Makefile.am
index e534bc8..ae109ff 100644
--- a/hw/xfree86/os-support/solaris/Makefile.am
+++ b/hw/xfree86/os-support/solaris/Makefile.am
@@ -29,7 +29,7 @@ nodist_libsolaris_la_SOURCES = $(SOLARIS_INOUT_SRC)
 sdk_HEADERS =
 nodist_sdk_HEADERS = solaris-@SOLARIS_INOUT_ARCH@.il
 
-AM_CFLAGS = -DUSESTDRES -DHAVE_SYSV_IPC $(XORG_CFLAGS) $(DIX_CFLAGS)
+AM_CFLAGS = -DHAVE_SYSV_IPC $(XORG_CFLAGS) $(DIX_CFLAGS)
 
 AM_CPPFLAGS = $(XORG_INCS) 
 
diff --git a/hw/xfree86/os-support/solaris/Makefile.in b/hw/xfree86/os-support/solaris/Makefile.in
index 8555606..b8fd14d 100644
--- a/hw/xfree86/os-support/solaris/Makefile.in
+++ b/hw/xfree86/os-support/solaris/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -106,7 +106,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -238,8 +237,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
@@ -259,8 +256,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -274,6 +269,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -292,14 +289,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -316,8 +305,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -373,6 +364,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -425,7 +418,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -449,29 +441,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -509,8 +485,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -521,14 +495,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -619,7 +587,7 @@ libsolaris_la_SOURCES = sun_init.c \
 nodist_libsolaris_la_SOURCES = $(SOLARIS_INOUT_SRC)
 sdk_HEADERS = 
 nodist_sdk_HEADERS = solaris-@SOLARIS_INOUT_ARCH@.il
-AM_CFLAGS = -DUSESTDRES -DHAVE_SYSV_IPC $(XORG_CFLAGS) $(DIX_CFLAGS)
+AM_CFLAGS = -DHAVE_SYSV_IPC $(XORG_CFLAGS) $(DIX_CFLAGS)
 AM_CPPFLAGS = $(XORG_INCS) 
 EXTRA_DIST = solaris-amd64.S solaris-ia32.S solaris-sparcv8plus.S sun_inout.s
 all: all-am
@@ -879,7 +847,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/hw/xfree86/os-support/solaris/sun_apm.c b/hw/xfree86/os-support/solaris/sun_apm.c
index dbdc4b6..368f21e 100644
--- a/hw/xfree86/os-support/solaris/sun_apm.c
+++ b/hw/xfree86/os-support/solaris/sun_apm.c
@@ -127,7 +127,7 @@ sunToXF86(int type)
 }
 
 /*
- * APM events can be requested direclty from /dev/apm
+ * APM events can be requested directly from /dev/apm
  */
 static int
 sunPMGetEventFromOS(int fd, pmEvent * events, int num)
diff --git a/hw/xfree86/os-support/stub/Makefile.in b/hw/xfree86/os-support/stub/Makefile.in
index c4dc417..5f7819f 100644
--- a/hw/xfree86/os-support/stub/Makefile.in
+++ b/hw/xfree86/os-support/stub/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -105,7 +105,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -183,8 +182,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
@@ -204,8 +201,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -219,6 +214,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -237,14 +234,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -261,8 +250,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -318,6 +309,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -370,7 +363,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -394,29 +386,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -454,8 +430,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -466,14 +440,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -768,7 +736,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/hw/xfree86/os-support/xf86_OSproc.h b/hw/xfree86/os-support/xf86_OSproc.h
index 17607b0..05a7cd8 100644
--- a/hw/xfree86/os-support/xf86_OSproc.h
+++ b/hw/xfree86/os-support/xf86_OSproc.h
@@ -68,9 +68,9 @@
 #define _XF86_OSPROC_H
 
 /*
- * The actual prototypes have been pulled into this seperate file so
+ * The actual prototypes have been pulled into this separate file so
  * that they can can be used without pulling in all of the OS specific
- * stuff like sys/stat.h, etc. This casues problem for loadable modules.
+ * stuff like sys/stat.h, etc. that causes problems for loadable modules.
  */
 
 /*
@@ -90,7 +90,7 @@
 #ifndef NO_OSLIB_PROTOTYPES
 /*
  * This is to prevent re-entrancy to FatalError() when aborting.
- * Anything that can be called as a result of AbortDDX() should use this
+ * Anything that can be called as a result of ddxGiveUp() should use this
  * instead of FatalError().
  */
 
diff --git a/hw/xfree86/parser/Configint.h b/hw/xfree86/parser/Configint.h
index e5fa6ce..0a8e4fe 100644
--- a/hw/xfree86/parser/Configint.h
+++ b/hw/xfree86/parser/Configint.h
@@ -124,10 +124,10 @@ else\
 
 /*
  * These are defines for error messages to promote consistency.
- * error messages are preceded by the line number, section and file name,
+ * Error messages are preceded by the line number, section and file name,
  * so these messages should be about the specific keyword and syntax in error.
- * To help limit namespace polution, end each with _MSG.
- * limit messages to 70 characters if possible.
+ * To help limit namespace pollution, end each with _MSG.
+ * Limit messages to 70 characters if possible.
  */
 
 #define BAD_OPTION_MSG \
diff --git a/hw/xfree86/parser/Flags.c b/hw/xfree86/parser/Flags.c
index 0f69734..d677cf1 100644
--- a/hw/xfree86/parser/Flags.c
+++ b/hw/xfree86/parser/Flags.c
@@ -65,7 +65,6 @@
 
 static const xf86ConfigSymTabRec ServerFlagsTab[] = {
     {ENDSECTION, "endsection"},
-    {NOTRAPSIGNALS, "notrapsignals"},
     {DONTZAP, "dontzap"},
     {DONTZOOM, "dontzoom"},
     {DISABLEVIDMODE, "disablevidmodeextension"},
@@ -111,7 +110,6 @@ xf86parseFlagsSection(void)
         case SUSPENDTIME:
         case OFFTIME:
             hasvalue = TRUE;
-        case NOTRAPSIGNALS:
         case DONTZAP:
         case DONTZOOM:
         case DISABLEVIDMODE:
diff --git a/hw/xfree86/parser/Makefile.in b/hw/xfree86/parser/Makefile.in
index 2f83db7..f1b049e 100644
--- a/hw/xfree86/parser/Makefile.in
+++ b/hw/xfree86/parser/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -106,7 +106,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -218,8 +217,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
@@ -239,8 +236,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -254,6 +249,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -272,14 +269,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -296,8 +285,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -353,6 +344,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -405,7 +398,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -429,29 +421,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -489,8 +465,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -501,14 +475,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -798,7 +766,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/hw/xfree86/parser/Monitor.c b/hw/xfree86/parser/Monitor.c
index a33c968..1d63a44 100644
--- a/hw/xfree86/parser/Monitor.c
+++ b/hw/xfree86/parser/Monitor.c
@@ -381,7 +381,7 @@ xf86parseVerboseMode(void)
             Error(UNEXPECTED_EOF_MSG);
             break;
         default:
-            Error("Unexepcted token in verbose \"Mode\" entry\n");
+            Error("Unexpected token in verbose \"Mode\" entry\n");
         }
     }
     if (!had_dotclock)
diff --git a/hw/xfree86/parser/write.c b/hw/xfree86/parser/write.c
index 122e967..6e96ba0 100644
--- a/hw/xfree86/parser/write.c
+++ b/hw/xfree86/parser/write.c
@@ -139,7 +139,7 @@ xf86writeConfigFile(const char *filename, XF86ConfigPtr cptr)
         int status;
         void (*csig) (int);
 
-        /* Need to fork to change ruid without loosing euid */
+        /* Need to fork to change ruid without losing euid */
         csig = OsSignal(SIGCHLD, SIG_DFL);
         switch ((pid = fork())) {
         case -1:
diff --git a/hw/xfree86/parser/xf86tokens.h b/hw/xfree86/parser/xf86tokens.h
index 15792c6..4abff0d 100644
--- a/hw/xfree86/parser/xf86tokens.h
+++ b/hw/xfree86/parser/xf86tokens.h
@@ -103,7 +103,6 @@ typedef enum {
     XKBDIR,
 
     /* Server Flag tokens.  These are deprecated in favour of generic Options */
-    NOTRAPSIGNALS,
     DONTZAP,
     DONTZOOM,
     DISABLEVIDMODE,
diff --git a/hw/xfree86/ramdac/BT.c b/hw/xfree86/ramdac/BT.c
deleted file mode 100644
index 5333445..0000000
--- a/hw/xfree86/ramdac/BT.c
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- * Copyright 1998 by Alan Hourihane, Wigan, England.
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of Alan Hourihane not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission.  Alan Hourihane makes no representations
- * about the suitability of this software for any purpose.  It is provided
- * "as is" without express or implied warranty.
- *
- * ALAN HOURIHANE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL ALAN HOURIHANE BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- *
- * Authors:  Alan Hourihane, <alanh@fairlite.demon.co.uk>
- *
- * BT RAMDAC routines.
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include "xf86.h"
-#include "xf86_OSproc.h"
-
-#define INIT_BT_RAMDAC_INFO
-#include "BTPriv.h"
-#include "xf86RamDacPriv.h"
-
-void
-BTramdacRestore(ScrnInfoPtr pScrn, RamDacRecPtr ramdacPtr,
-                RamDacRegRecPtr ramdacReg)
-{
-    int i;
-
-    /* Here we pass a short, so that we can evaluate a mask too */
-    /* So that the mask is the high byte and the data the low byte */
-    /* Just the command/status registers */
-    for (i = 0x06; i < 0x0A; i++)
-        (*ramdacPtr->WriteDAC)
-            (pScrn, i, (ramdacReg->DacRegs[i] & 0xFF00) >> 8,
-             ramdacReg->DacRegs[i]);
-}
-
-void
-BTramdacSave(ScrnInfoPtr pScrn, RamDacRecPtr ramdacPtr,
-             RamDacRegRecPtr ramdacReg)
-{
-    int i;
-
-    (*ramdacPtr->ReadAddress) (pScrn, 0);       /* Start at index 0 */
-    for (i = 0; i < 768; i++)
-        ramdacReg->DAC[i] = (*ramdacPtr->ReadData) (pScrn);
-
-    /* Just the command/status registers */
-    for (i = 0x06; i < 0x0A; i++)
-        ramdacReg->DacRegs[i] = (*ramdacPtr->ReadDAC) (pScrn, i);
-}
-
-RamDacHelperRecPtr
-BTramdacProbe(ScrnInfoPtr pScrn,
-              RamDacSupportedInfoRecPtr ramdacs /*, RamDacRecPtr ramdacPtr */ )
-{
-    RamDacRecPtr ramdacPtr = RAMDACSCRPTR(pScrn);
-    Bool RamDacIsSupported = FALSE;
-    RamDacHelperRecPtr ramdacHelperPtr = NULL;
-    int BTramdac_ID = -1;
-    int i, status, cmd0;
-
-    /* Save COMMAND Register 0 */
-    cmd0 = (*ramdacPtr->ReadDAC) (pScrn, BT_COMMAND_REG_0);
-    /* Ensure were going to access the STATUS Register on next read */
-    (*ramdacPtr->WriteDAC) (pScrn, BT_COMMAND_REG_0, 0x7F, 0x00);
-
-    status = (*ramdacPtr->ReadDAC) (pScrn, BT_STATUS_REG);
-    switch (status) {
-    case 0x40:
-        BTramdac_ID = ATT20C504_RAMDAC;
-        break;
-    case 0xD0:
-        BTramdac_ID = ATT20C505_RAMDAC;
-        break;
-    default:
-        xf86DrvMsg(pScrn->scrnIndex, X_PROBED,
-                   "Unknown BT RAMDAC type (0x%x), assuming BT485\n", status);
-    case 0x80:
-    case 0x90:
-    case 0xA0:
-    case 0xB0:
-    case 0x28:                 /* This is for the DEC TGA - Questionable ? */
-        BTramdac_ID = BT485_RAMDAC;
-        break;
-    }
-
-    /* Restore COMMAND Register 0 */
-    (*ramdacPtr->WriteDAC) (pScrn, BT_COMMAND_REG_0, 0x00, cmd0);
-
-    if (BTramdac_ID == -1) {
-        xf86DrvMsg(pScrn->scrnIndex, X_PROBED,
-                   "Cannot determine BT RAMDAC type, aborting\n");
-        return NULL;
-    }
-    else {
-        xf86DrvMsg(pScrn->scrnIndex, X_PROBED,
-                   "Attached RAMDAC is %s\n",
-                   BTramdacDeviceInfo[BTramdac_ID & 0xFFFF].DeviceName);
-    }
-
-    for (i = 0; ramdacs[i].token != -1; i++) {
-        if (ramdacs[i].token == BTramdac_ID)
-            RamDacIsSupported = TRUE;
-    }
-
-    if (!RamDacIsSupported) {
-        xf86DrvMsg(pScrn->scrnIndex, X_PROBED,
-                   "This BT RAMDAC is NOT supported by this driver, aborting\n");
-        return NULL;
-    }
-
-    ramdacHelperPtr = RamDacHelperCreateInfoRec();
-    switch (BTramdac_ID) {
-    case BT485_RAMDAC:
-        ramdacHelperPtr->SetBpp = BTramdacSetBpp;
-        break;
-    }
-    ramdacPtr->RamDacType = BTramdac_ID;
-    ramdacHelperPtr->RamDacType = BTramdac_ID;
-    ramdacHelperPtr->Save = BTramdacSave;
-    ramdacHelperPtr->Restore = BTramdacRestore;
-
-    return ramdacHelperPtr;
-}
-
-void
-BTramdacSetBpp(ScrnInfoPtr pScrn, RamDacRegRecPtr ramdacReg)
-{
-    /* We need to deal with Direct Colour visuals for 8bpp and other
-     * good stuff for colours */
-    switch (pScrn->bitsPerPixel) {
-    case 32:
-        ramdacReg->DacRegs[BT_COMMAND_REG_1] = 0x10;
-        break;
-    case 24:
-        ramdacReg->DacRegs[BT_COMMAND_REG_1] = 0x10;
-        break;
-    case 16:
-        ramdacReg->DacRegs[BT_COMMAND_REG_1] = 0x38;
-        break;
-    case 15:
-        ramdacReg->DacRegs[BT_COMMAND_REG_1] = 0x30;
-        break;
-    case 8:
-        ramdacReg->DacRegs[BT_COMMAND_REG_1] = 0x40;
-        break;
-    case 4:
-        ramdacReg->DacRegs[BT_COMMAND_REG_1] = 0x60;
-        break;
-    }
-}
diff --git a/hw/xfree86/ramdac/BT.h b/hw/xfree86/ramdac/BT.h
deleted file mode 100644
index 6eeaf5d..0000000
--- a/hw/xfree86/ramdac/BT.h
+++ /dev/null
@@ -1,37 +0,0 @@
-
-#include "xf86RamDac.h"
-
-extern _X_EXPORT RamDacHelperRecPtr BTramdacProbe(ScrnInfoPtr pScrn,
-                                                  RamDacSupportedInfoRecPtr
-                                                  ramdacs);
-extern _X_EXPORT void BTramdacSave(ScrnInfoPtr pScrn, RamDacRecPtr RamDacRec,
-                                   RamDacRegRecPtr RamDacRegRec);
-extern _X_EXPORT void BTramdacRestore(ScrnInfoPtr pScrn, RamDacRecPtr RamDacRec,
-                                      RamDacRegRecPtr RamDacRegRec);
-extern _X_EXPORT void BTramdacSetBpp(ScrnInfoPtr pScrn,
-                                     RamDacRegRecPtr RamDacRegRec);
-
-#define ATT20C504_RAMDAC 	(VENDOR_BT << 16) | 0x00
-#define ATT20C505_RAMDAC 	(VENDOR_BT << 16) | 0x01
-#define BT485_RAMDAC		(VENDOR_BT << 16) | 0x02
-
-/*
- * BT registers
- */
-
-#define BT_WRITE_ADDR		0x00
-#define BT_RAMDAC_DATA		0x01
-#define BT_PIXEL_MASK		0x02
-#define BT_READ_ADDR		0x03
-#define BT_CURS_WR_ADDR		0x04
-#define BT_CURS_DATA		0x05
-#define BT_COMMAND_REG_0	0x06
-#define BT_CURS_RD_ADDR		0x07
-#define BT_COMMAND_REG_1	0x08
-#define BT_COMMAND_REG_2	0x09
-#define BT_STATUS_REG		0x0A
-#define BT_CURS_RAM_DATA	0x0B
-#define BT_CURS_X_LOW		0x0C
-#define BT_CURS_X_HIGH		0x0D
-#define BT_CURS_Y_LOW		0x0E
-#define BT_CURS_Y_HIGH		0x0F
diff --git a/hw/xfree86/ramdac/BTPriv.h b/hw/xfree86/ramdac/BTPriv.h
deleted file mode 100644
index 95f2880..0000000
--- a/hw/xfree86/ramdac/BTPriv.h
+++ /dev/null
@@ -1,20 +0,0 @@
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include "BT.h"
-
-typedef struct {
-    const char *DeviceName;
-} xf86BTramdacInfo;
-
-extern xf86BTramdacInfo BTramdacDeviceInfo[];
-
-#ifdef INIT_BT_RAMDAC_INFO
-xf86BTramdacInfo BTramdacDeviceInfo[] = {
-    {"AT&T 20C504"},
-    {"AT&T 20C505"},
-    {"BT485/484"}
-};
-#endif
diff --git a/hw/xfree86/ramdac/CURSOR.NOTES b/hw/xfree86/ramdac/CURSOR.NOTES
index 726e2ed..3be79a1 100644
--- a/hw/xfree86/ramdac/CURSOR.NOTES
+++ b/hw/xfree86/ramdac/CURSOR.NOTES
@@ -9,9 +9,9 @@ cursor management is separate from the rest of the module.
 
    All relevant prototypes and defines are in xf86Cursor.h.
 
-  To initialize the cursor, the driver should allocate an 
-xf86CursorInfoRec via xf86CreateCursorInfoRec(), fill it out as described 
-later in this  document and pass it to xf86InitCursor().  xf86InitCursor() 
+  To initialize the cursor, the driver should allocate an
+xf86CursorInfoRec via xf86CreateCursorInfoRec(), fill it out as described
+later in this  document and pass it to xf86InitCursor().  xf86InitCursor()
 must be called _after_ the software cursor initialization (usually
 miDCInitialize).
 
@@ -21,7 +21,7 @@ structure in its CloseScreen function via xf86DestroyCursorInfoRec().
 
 2) FILLING OUT THE xf86CursorInfoRec
 
-   The driver informs the ramdac module of it's hardware cursor capablities by
+   The driver informs the ramdac module of its hardware cursor capabilities by
 filling out an xf86CursorInfoRec structure and passing it to xf86InitCursor().
 The xf86CursorInfoRec contains the following function pointers:
 
@@ -46,10 +46,10 @@ void SetCursorPosition(ScrnInfoPtr pScrn, int x, int y)
 void SetCursorColors(ScrnInfoPtr pScrn, int bg, int fg)
 
     Set the cursor foreground and background colors.  In 8bpp, fg and
-    bg are indicies into the current colormap unless the 
+    bg are indices into the current colormap unless the
     HARDWARE_CURSOR_TRUECOLOR_AT_8BPP flag is set.  In that case
     and in all other bpps the fg and bg are in 8-8-8 RGB format.
-    
+
 void LoadCursorImage(ScrnInfoPtr pScrn, unsigned char *bits)
 
     LoadCursorImage is how the hardware cursor bits computed by the
@@ -59,14 +59,14 @@ void LoadCursorImage(ScrnInfoPtr pScrn, unsigned char *bits)
 
 /**** These functions are optional ****/
 
-    
-unsigned char* RealizeCursor(xf86CursorInfoPtr infoPtr, CursorPtr pCurs) 
+
+unsigned char* RealizeCursor(xf86CursorInfoPtr infoPtr, CursorPtr pCurs)
 
     If RealizeCursor is not provided by the driver, one will be provided
     for you based on the Flags field described below.  The driver must
     provide this function if the hardware cursor format is not one of
     the common ones supported by this module.
-  
+
 
 Bool UseHWCursor(ScreenPtr pScreen, CursorPtr pCurs)
 
@@ -122,7 +122,7 @@ Flags
    /* Cursor data packing flags */
 
    Hardware cursor data consists of two pieces, a source and a mask.
-   The mask is a bitmap indicating which parts of the cursor are 
+   The mask is a bitmap indicating which parts of the cursor are
    transparent and which parts are drawn.  The source is a bitmap
    indicating which parts of the non-transparent portion of the the
    cursor should be painted in the foreground color and which should
@@ -142,8 +142,8 @@ Flags
 
    HARDWARE_CURSOR_AND_SOURCE_WITH_MASK
 
-   This flag will have the module logical AND the source with the mask to make  
-   sure there are no source bits set if the corresponding mask bits 
+   This flag will have the module logical AND the source with the mask to make
+   sure there are no source bits set if the corresponding mask bits
    aren't set.  Some hardware will not care if source bits are set where
    there are supposed to be transparent areas, but some hardware will
    interpret this as a third cursor color or similar.  That type of
@@ -170,21 +170,21 @@ Flags
    until the entire pattern is stored.  The following flags describe the
    bit interleave.
 
-   HARDWARE_CURSOR_SOURCE_MASK_NOT_INTERLEAVED   
+   HARDWARE_CURSOR_SOURCE_MASK_NOT_INTERLEAVED
 
    This one is the default.
- 
+
    The following are for interleaved cursors.
-    
-   HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_1        
-   HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_8        
-   HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_16       
-   HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_32       
-   HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_64   
+
+   HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_1
+   HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_8
+   HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_16
+   HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_32
+   HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_64
 
    And once again, if your hardware requires something different than
    these packing styles, your driver can supply its own RealizeCursor
-   function.   
+   function.
 
 
 
diff --git a/hw/xfree86/ramdac/IBM.c b/hw/xfree86/ramdac/IBM.c
deleted file mode 100644
index 6822be5..0000000
--- a/hw/xfree86/ramdac/IBM.c
+++ /dev/null
@@ -1,645 +0,0 @@
-/*
- * Copyright 1998 by Alan Hourihane, Wigan, England.
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of Alan Hourihane not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission.  Alan Hourihane makes no representations
- * about the suitability of this software for any purpose.  It is provided
- * "as is" without express or implied warranty.
- *
- * ALAN HOURIHANE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL ALAN HOURIHANE BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- *
- * Authors:  Alan Hourihane, <alanh@fairlite.demon.co.uk>
- *
- * IBM RAMDAC routines.
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include "xf86.h"
-#include "xf86_OSproc.h"
-
-#include "xf86Cursor.h"
-
-#define INIT_IBM_RAMDAC_INFO
-#include "IBMPriv.h"
-#include "xf86RamDacPriv.h"
-
-#define INITIALFREQERR 100000
-
-unsigned long
-IBMramdac640CalculateMNPCForClock(unsigned long RefClock,       /* In 100Hz units */
-                                  unsigned long ReqClock,       /* In 100Hz units */
-                                  char IsPixClock,      /* boolean, is this the pixel or the sys clock */
-                                  unsigned long MinClock,       /* Min VCO rating */
-                                  unsigned long MaxClock,       /* Max VCO rating */
-                                  unsigned long *rM,    /* M Out */
-                                  unsigned long *rN,    /* N Out */
-                                  unsigned long *rP,    /* Min P In, P Out */
-                                  unsigned long *rC     /* C Out */
-    )
-{
-    unsigned long M, N, P, iP = *rP;
-    unsigned long IntRef, VCO, Clock;
-    long freqErr, lowestFreqErr = INITIALFREQERR;
-    unsigned long ActualClock = 0;
-
-    for (N = 0; N <= 63; N++) {
-        IntRef = RefClock / (N + 1);
-        if (IntRef < 10000)
-            break;              /* IntRef needs to be >= 1MHz */
-        for (M = 2; M <= 127; M++) {
-            VCO = IntRef * (M + 1);
-            if ((VCO < MinClock) || (VCO > MaxClock))
-                continue;
-            for (P = iP; P <= 4; P++) {
-                if (P != 0)
-                    Clock = (RefClock * (M + 1)) / ((N + 1) * 2 * P);
-                else
-                    Clock = (RefClock * (M + 1)) / (N + 1);
-
-                freqErr = (Clock - ReqClock);
-
-                if (freqErr < 0) {
-                    /* PixelClock gets rounded up always so monitor reports
-                       correct frequency. */
-                    if (IsPixClock)
-                        continue;
-                    freqErr = -freqErr;
-                }
-
-                if (freqErr < lowestFreqErr) {
-                    *rM = M;
-                    *rN = N;
-                    *rP = P;
-                    *rC = (VCO <= 1280000 ? 1 : 2);
-                    ActualClock = Clock;
-
-                    lowestFreqErr = freqErr;
-                    /* Return if we found an exact match */
-                    if (freqErr == 0)
-                        return ActualClock;
-                }
-            }
-        }
-    }
-
-    return ActualClock;
-}
-
-unsigned long
-IBMramdac526CalculateMNPCForClock(unsigned long RefClock,       /* In 100Hz units */
-                                  unsigned long ReqClock,       /* In 100Hz units */
-                                  char IsPixClock,      /* boolean, is this the pixel or the sys clock */
-                                  unsigned long MinClock,       /* Min VCO rating */
-                                  unsigned long MaxClock,       /* Max VCO rating */
-                                  unsigned long *rM,    /* M Out */
-                                  unsigned long *rN,    /* N Out */
-                                  unsigned long *rP,    /* Min P In, P Out */
-                                  unsigned long *rC     /* C Out */
-    )
-{
-    unsigned long M, N, P, iP = *rP;
-    unsigned long IntRef, VCO, Clock;
-    long freqErr, lowestFreqErr = INITIALFREQERR;
-    unsigned long ActualClock = 0;
-
-    for (N = 0; N <= 63; N++) {
-        IntRef = RefClock / (N + 1);
-        if (IntRef < 10000)
-            break;              /* IntRef needs to be >= 1MHz */
-        for (M = 0; M <= 63; M++) {
-            VCO = IntRef * (M + 1);
-            if ((VCO < MinClock) || (VCO > MaxClock))
-                continue;
-            for (P = iP; P <= 4; P++) {
-                if (P)
-                    Clock = (RefClock * (M + 1)) / ((N + 1) * 2 * P);
-                else
-                    Clock = VCO;
-
-                freqErr = (Clock - ReqClock);
-
-                if (freqErr < 0) {
-                    /* PixelClock gets rounded up always so monitor reports
-                       correct frequency. */
-                    if (IsPixClock)
-                        continue;
-                    freqErr = -freqErr;
-                }
-
-                if (freqErr < lowestFreqErr) {
-                    *rM = M;
-                    *rN = N;
-                    *rP = P;
-                    *rC = (VCO <= 1280000 ? 1 : 2);
-                    ActualClock = Clock;
-
-                    lowestFreqErr = freqErr;
-                    /* Return if we found an exact match */
-                    if (freqErr == 0)
-                        return ActualClock;
-                }
-            }
-        }
-    }
-
-    return ActualClock;
-}
-
-void
-IBMramdacRestore(ScrnInfoPtr pScrn, RamDacRecPtr ramdacPtr,
-                 RamDacRegRecPtr ramdacReg)
-{
-    int i, maxreg, dacreg;
-
-    switch (ramdacPtr->RamDacType) {
-    case IBM640_RAMDAC:
-        maxreg = 0x300;
-        dacreg = 1024;
-        break;
-    default:
-        maxreg = 0x100;
-        dacreg = 768;
-        break;
-    }
-
-    /* Here we pass a short, so that we can evaluate a mask too */
-    /* So that the mask is the high byte and the data the low byte */
-    for (i = 0; i < maxreg; i++)
-        (*ramdacPtr->WriteDAC)
-            (pScrn, i, (ramdacReg->DacRegs[i] & 0xFF00) >> 8,
-             ramdacReg->DacRegs[i]);
-
-    (*ramdacPtr->WriteAddress) (pScrn, 0);
-    for (i = 0; i < dacreg; i++)
-        (*ramdacPtr->WriteData) (pScrn, ramdacReg->DAC[i]);
-}
-
-void
-IBMramdacSave(ScrnInfoPtr pScrn, RamDacRecPtr ramdacPtr,
-              RamDacRegRecPtr ramdacReg)
-{
-    int i, maxreg, dacreg;
-
-    switch (ramdacPtr->RamDacType) {
-    case IBM640_RAMDAC:
-        maxreg = 0x300;
-        dacreg = 1024;
-        break;
-    default:
-        maxreg = 0x100;
-        dacreg = 768;
-        break;
-    }
-
-    (*ramdacPtr->ReadAddress) (pScrn, 0);
-    for (i = 0; i < dacreg; i++)
-        ramdacReg->DAC[i] = (*ramdacPtr->ReadData) (pScrn);
-
-    for (i = 0; i < maxreg; i++)
-        ramdacReg->DacRegs[i] = (*ramdacPtr->ReadDAC) (pScrn, i);
-}
-
-RamDacHelperRecPtr
-IBMramdacProbe(ScrnInfoPtr pScrn,
-               RamDacSupportedInfoRecPtr ramdacs /* , RamDacRecPtr ramdacPtr */
-               )
-{
-    RamDacRecPtr ramdacPtr = RAMDACSCRPTR(pScrn);
-    RamDacHelperRecPtr ramdacHelperPtr = NULL;
-    Bool RamDacIsSupported = FALSE;
-    int IBMramdac_ID = -1;
-    int i;
-    unsigned char id, rev, id2, rev2;
-
-    /* read ID and revision */
-    rev = (*ramdacPtr->ReadDAC) (pScrn, IBMRGB_rev);
-    id = (*ramdacPtr->ReadDAC) (pScrn, IBMRGB_id);
-
-    /* check if ID and revision are read only */
-    (*ramdacPtr->WriteDAC) (pScrn, ~rev, 0, IBMRGB_rev);
-    (*ramdacPtr->WriteDAC) (pScrn, ~id, 0, IBMRGB_id);
-    rev2 = (*ramdacPtr->ReadDAC) (pScrn, IBMRGB_rev);
-    id2 = (*ramdacPtr->ReadDAC) (pScrn, IBMRGB_id);
-
-    switch (id) {
-    case 0x30:
-        if (rev == 0xc0)
-            IBMramdac_ID = IBM624_RAMDAC;
-        if (rev == 0x80)
-            IBMramdac_ID = IBM624DB_RAMDAC;
-        break;
-    case 0x12:
-        if (rev == 0x1c)
-            IBMramdac_ID = IBM640_RAMDAC;
-        break;
-    case 0x01:
-        IBMramdac_ID = IBM525_RAMDAC;
-        break;
-    case 0x02:
-        if (rev == 0xf0)
-            IBMramdac_ID = IBM524_RAMDAC;
-        if (rev == 0xe0)
-            IBMramdac_ID = IBM524A_RAMDAC;
-        if (rev == 0xc0)
-            IBMramdac_ID = IBM526_RAMDAC;
-        if (rev == 0x80)
-            IBMramdac_ID = IBM526DB_RAMDAC;
-        break;
-    }
-
-    if (id == 1 || id == 2) {
-        if (id == id2 && rev == rev2) { /* IBM RGB52x found */
-            /* check for 128bit VRAM -> RGB528 */
-            if (((*ramdacPtr->ReadDAC) (pScrn, IBMRGB_misc1) & 0x03) == 0x03) {
-                IBMramdac_ID = IBM528_RAMDAC;   /* 128bit DAC found */
-                if (rev == 0xe0)
-                    IBMramdac_ID = IBM528A_RAMDAC;
-            }
-        }
-    }
-
-    (*ramdacPtr->WriteDAC) (pScrn, rev, 0, IBMRGB_rev);
-    (*ramdacPtr->WriteDAC) (pScrn, id, 0, IBMRGB_id);
-
-    if (IBMramdac_ID == -1) {
-        xf86DrvMsg(pScrn->scrnIndex, X_PROBED,
-                   "Cannot determine IBM RAMDAC type, aborting\n");
-        return NULL;
-    }
-    else {
-        xf86DrvMsg(pScrn->scrnIndex, X_PROBED,
-                   "Attached RAMDAC is %s\n",
-                   IBMramdacDeviceInfo[IBMramdac_ID & 0xFFFF].DeviceName);
-    }
-
-    for (i = 0; ramdacs[i].token != -1; i++) {
-        if (ramdacs[i].token == IBMramdac_ID)
-            RamDacIsSupported = TRUE;
-    }
-
-    if (!RamDacIsSupported) {
-        xf86DrvMsg(pScrn->scrnIndex, X_PROBED,
-                   "This IBM RAMDAC is NOT supported by this driver, aborting\n");
-        return NULL;
-    }
-
-    ramdacHelperPtr = RamDacHelperCreateInfoRec();
-    switch (IBMramdac_ID) {
-    case IBM526_RAMDAC:
-    case IBM526DB_RAMDAC:
-        ramdacHelperPtr->SetBpp = IBMramdac526SetBpp;
-        ramdacHelperPtr->HWCursorInit = IBMramdac526HWCursorInit;
-        break;
-    case IBM640_RAMDAC:
-        ramdacHelperPtr->SetBpp = IBMramdac640SetBpp;
-        ramdacHelperPtr->HWCursorInit = IBMramdac640HWCursorInit;
-        break;
-    }
-    ramdacPtr->RamDacType = IBMramdac_ID;
-    ramdacHelperPtr->RamDacType = IBMramdac_ID;
-    ramdacHelperPtr->Save = IBMramdacSave;
-    ramdacHelperPtr->Restore = IBMramdacRestore;
-
-    return ramdacHelperPtr;
-}
-
-void
-IBMramdac526SetBpp(ScrnInfoPtr pScrn, RamDacRegRecPtr ramdacReg)
-{
-    ramdacReg->DacRegs[IBMRGB_key_control] = 0x00;      /* Disable Chroma Key */
-
-    switch (pScrn->bitsPerPixel) {
-    case 32:
-        ramdacReg->DacRegs[IBMRGB_pix_fmt] = PIXEL_FORMAT_32BPP;
-        ramdacReg->DacRegs[IBMRGB_32bpp] = B32_DCOL_DIRECT;
-        ramdacReg->DacRegs[IBMRGB_24bpp] = 0;
-        ramdacReg->DacRegs[IBMRGB_16bpp] = 0;
-        ramdacReg->DacRegs[IBMRGB_8bpp] = 0;
-        if (pScrn->overlayFlags & OVERLAY_8_32_PLANAR) {
-            ramdacReg->DacRegs[IBMRGB_key_control] = 0x01;      /* Enable Key */
-            ramdacReg->DacRegs[IBMRGB_key] = 0xFF;
-            ramdacReg->DacRegs[IBMRGB_key_mask] = 0xFF;
-        }
-        break;
-    case 24:
-        ramdacReg->DacRegs[IBMRGB_pix_fmt] = PIXEL_FORMAT_24BPP;
-        ramdacReg->DacRegs[IBMRGB_32bpp] = 0;
-        ramdacReg->DacRegs[IBMRGB_24bpp] = B24_DCOL_DIRECT;
-        ramdacReg->DacRegs[IBMRGB_16bpp] = 0;
-        ramdacReg->DacRegs[IBMRGB_8bpp] = 0;
-        break;
-    case 16:
-        if (pScrn->depth == 16) {
-            ramdacReg->DacRegs[IBMRGB_pix_fmt] = PIXEL_FORMAT_16BPP;
-            ramdacReg->DacRegs[IBMRGB_32bpp] = 0;
-            ramdacReg->DacRegs[IBMRGB_24bpp] = 0;
-            ramdacReg->DacRegs[IBMRGB_16bpp] = B16_DCOL_DIRECT | B16_LINEAR |
-                B16_CONTIGUOUS | B16_565;
-            ramdacReg->DacRegs[IBMRGB_8bpp] = 0;
-        }
-        else {
-            ramdacReg->DacRegs[IBMRGB_pix_fmt] = PIXEL_FORMAT_16BPP;
-            ramdacReg->DacRegs[IBMRGB_32bpp] = 0;
-            ramdacReg->DacRegs[IBMRGB_24bpp] = 0;
-            ramdacReg->DacRegs[IBMRGB_16bpp] = B16_DCOL_DIRECT | B16_LINEAR |
-                B16_CONTIGUOUS | B16_555;
-            ramdacReg->DacRegs[IBMRGB_8bpp] = 0;
-        }
-        break;
-    case 8:
-        ramdacReg->DacRegs[IBMRGB_pix_fmt] = PIXEL_FORMAT_8BPP;
-        ramdacReg->DacRegs[IBMRGB_32bpp] = 0;
-        ramdacReg->DacRegs[IBMRGB_24bpp] = 0;
-        ramdacReg->DacRegs[IBMRGB_16bpp] = 0;
-        ramdacReg->DacRegs[IBMRGB_8bpp] = B8_DCOL_INDIRECT;
-        break;
-    case 4:
-        ramdacReg->DacRegs[IBMRGB_pix_fmt] = PIXEL_FORMAT_4BPP;
-        ramdacReg->DacRegs[IBMRGB_32bpp] = 0;
-        ramdacReg->DacRegs[IBMRGB_24bpp] = 0;
-        ramdacReg->DacRegs[IBMRGB_16bpp] = 0;
-        ramdacReg->DacRegs[IBMRGB_8bpp] = 0;
-    }
-}
-
-IBMramdac526SetBppProc *
-IBMramdac526SetBppWeak(void)
-{
-    return IBMramdac526SetBpp;
-}
-
-void
-IBMramdac640SetBpp(ScrnInfoPtr pScrn, RamDacRegRecPtr ramdacReg)
-{
-    unsigned char bpp = 0x00;
-    unsigned char overlaybpp = 0x00;
-    unsigned char offset = 0x00;
-    unsigned char dispcont = 0x44;
-
-    ramdacReg->DacRegs[RGB640_SER_WID_03_00] = 0x00;
-    ramdacReg->DacRegs[RGB640_SER_WID_07_04] = 0x00;
-    ramdacReg->DacRegs[RGB640_DIAGS] = 0x07;
-
-    switch (pScrn->depth) {
-    case 8:
-        ramdacReg->DacRegs[RGB640_SER_07_00] = 0x00;
-        ramdacReg->DacRegs[RGB640_SER_15_08] = 0x00;
-        ramdacReg->DacRegs[RGB640_SER_23_16] = 0x00;
-        ramdacReg->DacRegs[RGB640_SER_31_24] = 0x00;
-        ramdacReg->DacRegs[RGB640_SER_MODE] = IBM640_SER_16_1;  /*16:1 Mux */
-        ramdacReg->DacRegs[RGB640_MISC_CONF] = IBM640_PCLK_8;   /* pll / 8 */
-        bpp = 0x03;
-        break;
-    case 15:
-        ramdacReg->DacRegs[RGB640_SER_07_00] = 0x10;
-        ramdacReg->DacRegs[RGB640_SER_15_08] = 0x11;
-        ramdacReg->DacRegs[RGB640_SER_23_16] = 0x00;
-        ramdacReg->DacRegs[RGB640_SER_31_24] = 0x00;
-        ramdacReg->DacRegs[RGB640_SER_MODE] = IBM640_SER_8_1;   /* 8:1 Mux */
-        ramdacReg->DacRegs[RGB640_MISC_CONF] = IBM640_PCLK_8;   /* pll / 8 */
-        bpp = 0x0E;
-        break;
-    case 16:
-        ramdacReg->DacRegs[RGB640_SER_07_00] = 0x10;
-        ramdacReg->DacRegs[RGB640_SER_15_08] = 0x11;
-        ramdacReg->DacRegs[RGB640_SER_23_16] = 0x00;
-        ramdacReg->DacRegs[RGB640_SER_31_24] = 0x00;
-        ramdacReg->DacRegs[RGB640_SER_MODE] = IBM640_SER_8_1;   /* 8:1 Mux */
-        ramdacReg->DacRegs[RGB640_MISC_CONF] = IBM640_PCLK_8;   /* pll / 8 */
-        bpp = 0x05;
-        break;
-    case 24:
-        ramdacReg->DacRegs[RGB640_SER_07_00] = 0x30;
-        ramdacReg->DacRegs[RGB640_SER_15_08] = 0x31;
-        ramdacReg->DacRegs[RGB640_SER_23_16] = 0x32;
-        ramdacReg->DacRegs[RGB640_SER_31_24] = 0x33;
-        ramdacReg->DacRegs[RGB640_SER_MODE] = IBM640_SER_4_1;   /* 4:1 Mux */
-        ramdacReg->DacRegs[RGB640_MISC_CONF] = IBM640_PCLK_8;   /* pll / 8 */
-        bpp = 0x09;
-        if (pScrn->overlayFlags & OVERLAY_8_32_PLANAR) {
-            ramdacReg->DacRegs[RGB640_SER_WID_07_04] = 0x04;
-            ramdacReg->DacRegs[RGB640_CHROMA_KEY0] = 0xFF;
-            ramdacReg->DacRegs[RGB640_CHROMA_MASK0] = 0xFF;
-            offset = 0x04;
-            overlaybpp = 0x04;
-            dispcont = 0x48;
-        }
-        break;
-    case 30:                   /* 10 bit dac */
-        ramdacReg->DacRegs[RGB640_SER_07_00] = 0x30;
-        ramdacReg->DacRegs[RGB640_SER_15_08] = 0x31;
-        ramdacReg->DacRegs[RGB640_SER_23_16] = 0x32;
-        ramdacReg->DacRegs[RGB640_SER_31_24] = 0x33;
-        ramdacReg->DacRegs[RGB640_SER_MODE] = IBM640_SER_4_1;   /* 4:1 Mux */
-        ramdacReg->DacRegs[RGB640_MISC_CONF] = IBM640_PSIZE10 | IBM640_PCLK_8;  /* pll / 8 */
-        bpp = 0x0D;
-        break;
-    }
-
-    {
-        int i;
-
-        for (i = 0x100; i < 0x140; i += 4) {
-            /* Initialize FrameBuffer Window Attribute Table */
-            ramdacReg->DacRegs[i + 0] = bpp;
-            ramdacReg->DacRegs[i + 1] = offset;
-            ramdacReg->DacRegs[i + 2] = 0x00;
-            ramdacReg->DacRegs[i + 3] = 0x00;
-            /* Initialize Overlay Window Attribute Table */
-            ramdacReg->DacRegs[i + 0x100] = overlaybpp;
-            ramdacReg->DacRegs[i + 0x101] = 0x00;
-            ramdacReg->DacRegs[i + 0x102] = 0x00;
-            ramdacReg->DacRegs[i + 0x103] = dispcont;
-        }
-    }
-}
-
-static void
-IBMramdac526ShowCursor(ScrnInfoPtr pScrn)
-{
-    RamDacRecPtr ramdacPtr = RAMDACSCRPTR(pScrn);
-
-    /* Enable cursor - X11 mode */
-    (*ramdacPtr->WriteDAC) (pScrn, IBMRGB_curs, 0x00, 0x07);
-}
-
-static void
-IBMramdac640ShowCursor(ScrnInfoPtr pScrn)
-{
-    RamDacRecPtr ramdacPtr = RAMDACSCRPTR(pScrn);
-
-    /* Enable cursor - mode2 (x11 mode) */
-    (*ramdacPtr->WriteDAC) (pScrn, RGB640_CURSOR_CONTROL, 0x00, 0x0B);
-    (*ramdacPtr->WriteDAC) (pScrn, RGB640_CROSSHAIR_CONTROL, 0x00, 0x00);
-}
-
-static void
-IBMramdac526HideCursor(ScrnInfoPtr pScrn)
-{
-    RamDacRecPtr ramdacPtr = RAMDACSCRPTR(pScrn);
-
-    /* Disable cursor - X11 mode */
-    (*ramdacPtr->WriteDAC) (pScrn, IBMRGB_curs, 0x00, 0x24);
-}
-
-static void
-IBMramdac640HideCursor(ScrnInfoPtr pScrn)
-{
-    RamDacRecPtr ramdacPtr = RAMDACSCRPTR(pScrn);
-
-    /* Disable cursor - mode2 (x11 mode) */
-    (*ramdacPtr->WriteDAC) (pScrn, RGB640_CURSOR_CONTROL, 0x00, 0x08);
-}
-
-static void
-IBMramdac526SetCursorPosition(ScrnInfoPtr pScrn, int x, int y)
-{
-    RamDacRecPtr ramdacPtr = RAMDACSCRPTR(pScrn);
-
-    x += 64;
-    y += 64;
-
-    (*ramdacPtr->WriteDAC) (pScrn, IBMRGB_curs_hot_x, 0x00, 0x3f);
-    (*ramdacPtr->WriteDAC) (pScrn, IBMRGB_curs_hot_y, 0x00, 0x3f);
-    (*ramdacPtr->WriteDAC) (pScrn, IBMRGB_curs_xl, 0x00, x & 0xff);
-    (*ramdacPtr->WriteDAC) (pScrn, IBMRGB_curs_xh, 0x00, (x >> 8) & 0xf);
-    (*ramdacPtr->WriteDAC) (pScrn, IBMRGB_curs_yl, 0x00, y & 0xff);
-    (*ramdacPtr->WriteDAC) (pScrn, IBMRGB_curs_yh, 0x00, (y >> 8) & 0xf);
-}
-
-static void
-IBMramdac640SetCursorPosition(ScrnInfoPtr pScrn, int x, int y)
-{
-    RamDacRecPtr ramdacPtr = RAMDACSCRPTR(pScrn);
-
-    x += 64;
-    y += 64;
-
-    (*ramdacPtr->WriteDAC) (pScrn, RGB640_CURS_OFFSETX, 0x00, 0x3f);
-    (*ramdacPtr->WriteDAC) (pScrn, RGB640_CURS_OFFSETY, 0x00, 0x3f);
-    (*ramdacPtr->WriteDAC) (pScrn, RGB640_CURS_X_LOW, 0x00, x & 0xff);
-    (*ramdacPtr->WriteDAC) (pScrn, RGB640_CURS_X_HIGH, 0x00, (x >> 8) & 0xf);
-    (*ramdacPtr->WriteDAC) (pScrn, RGB640_CURS_Y_LOW, 0x00, y & 0xff);
-    (*ramdacPtr->WriteDAC) (pScrn, RGB640_CURS_Y_HIGH, 0x00, (y >> 8) & 0xf);
-}
-
-static void
-IBMramdac526SetCursorColors(ScrnInfoPtr pScrn, int bg, int fg)
-{
-    RamDacRecPtr ramdacPtr = RAMDACSCRPTR(pScrn);
-
-    (*ramdacPtr->WriteDAC) (pScrn, IBMRGB_curs_col1_r, 0x00, bg >> 16);
-    (*ramdacPtr->WriteDAC) (pScrn, IBMRGB_curs_col1_g, 0x00, bg >> 8);
-    (*ramdacPtr->WriteDAC) (pScrn, IBMRGB_curs_col1_b, 0x00, bg);
-    (*ramdacPtr->WriteDAC) (pScrn, IBMRGB_curs_col2_r, 0x00, fg >> 16);
-    (*ramdacPtr->WriteDAC) (pScrn, IBMRGB_curs_col2_g, 0x00, fg >> 8);
-    (*ramdacPtr->WriteDAC) (pScrn, IBMRGB_curs_col2_b, 0x00, fg);
-}
-
-static void
-IBMramdac640SetCursorColors(ScrnInfoPtr pScrn, int bg, int fg)
-{
-    RamDacRecPtr ramdacPtr = RAMDACSCRPTR(pScrn);
-
-    (*ramdacPtr->WriteDAC) (pScrn, RGB640_CURS_COL0, 0x00, 0);
-    (*ramdacPtr->WriteData) (pScrn, fg >> 16);
-    (*ramdacPtr->WriteData) (pScrn, fg >> 8);
-    (*ramdacPtr->WriteData) (pScrn, fg);
-    (*ramdacPtr->WriteData) (pScrn, bg >> 16);
-    (*ramdacPtr->WriteData) (pScrn, bg >> 8);
-    (*ramdacPtr->WriteData) (pScrn, bg);
-    (*ramdacPtr->WriteData) (pScrn, fg >> 16);
-    (*ramdacPtr->WriteData) (pScrn, fg >> 8);
-    (*ramdacPtr->WriteData) (pScrn, fg);
-    (*ramdacPtr->WriteData) (pScrn, bg >> 16);
-    (*ramdacPtr->WriteData) (pScrn, bg >> 8);
-    (*ramdacPtr->WriteData) (pScrn, bg);
-}
-
-static Bool
-IBMramdac526LoadCursorImage(ScrnInfoPtr pScrn, unsigned char *src)
-{
-    RamDacRecPtr ramdacPtr = RAMDACSCRPTR(pScrn);
-    int i;
-
-    /*
-     * Output the cursor data.  The realize function has put the planes into
-     * their correct order, so we can just blast this out.
-     */
-    for (i = 0; i < 1024; i++)
-        (*ramdacPtr->WriteDAC) (pScrn, IBMRGB_curs_array + i, 0x00, (*src++));
-    return TRUE;
-}
-
-static Bool
-IBMramdac640LoadCursorImage(ScrnInfoPtr pScrn, unsigned char *src)
-{
-    RamDacRecPtr ramdacPtr = RAMDACSCRPTR(pScrn);
-    int i;
-
-    /*
-     * Output the cursor data.  The realize function has put the planes into
-     * their correct order, so we can just blast this out.
-     */
-    for (i = 0; i < 1024; i++)
-        (*ramdacPtr->WriteDAC) (pScrn, RGB640_CURS_WRITE + i, 0x00, (*src++));
-    return TRUE;
-}
-
-static Bool
-IBMramdac526UseHWCursor(ScreenPtr pScr, CursorPtr pCurs)
-{
-    return TRUE;
-}
-
-static Bool
-IBMramdac640UseHWCursor(ScreenPtr pScr, CursorPtr pCurs)
-{
-    return TRUE;
-}
-
-void
-IBMramdac526HWCursorInit(xf86CursorInfoPtr infoPtr)
-{
-    infoPtr->MaxWidth = 64;
-    infoPtr->MaxHeight = 64;
-    infoPtr->Flags = HARDWARE_CURSOR_TRUECOLOR_AT_8BPP |
-        HARDWARE_CURSOR_AND_SOURCE_WITH_MASK |
-        HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_1;
-    infoPtr->SetCursorColors = IBMramdac526SetCursorColors;
-    infoPtr->SetCursorPosition = IBMramdac526SetCursorPosition;
-    infoPtr->LoadCursorImageCheck = IBMramdac526LoadCursorImage;
-    infoPtr->HideCursor = IBMramdac526HideCursor;
-    infoPtr->ShowCursor = IBMramdac526ShowCursor;
-    infoPtr->UseHWCursor = IBMramdac526UseHWCursor;
-}
-
-void
-IBMramdac640HWCursorInit(xf86CursorInfoPtr infoPtr)
-{
-    infoPtr->MaxWidth = 64;
-    infoPtr->MaxHeight = 64;
-    infoPtr->Flags = HARDWARE_CURSOR_TRUECOLOR_AT_8BPP |
-        HARDWARE_CURSOR_AND_SOURCE_WITH_MASK |
-        HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_1;
-    infoPtr->SetCursorColors = IBMramdac640SetCursorColors;
-    infoPtr->SetCursorPosition = IBMramdac640SetCursorPosition;
-    infoPtr->LoadCursorImageCheck = IBMramdac640LoadCursorImage;
-    infoPtr->HideCursor = IBMramdac640HideCursor;
-    infoPtr->ShowCursor = IBMramdac640ShowCursor;
-    infoPtr->UseHWCursor = IBMramdac640UseHWCursor;
-}
diff --git a/hw/xfree86/ramdac/IBM.h b/hw/xfree86/ramdac/IBM.h
deleted file mode 100644
index 986be2f..0000000
--- a/hw/xfree86/ramdac/IBM.h
+++ /dev/null
@@ -1,418 +0,0 @@
-
-#include <xf86RamDac.h>
-
-extern _X_EXPORT RamDacHelperRecPtr IBMramdacProbe(ScrnInfoPtr pScrn,
-                                                   RamDacSupportedInfoRecPtr
-                                                   ramdacs);
-extern _X_EXPORT void IBMramdacSave(ScrnInfoPtr pScrn, RamDacRecPtr RamDacRec,
-                                    RamDacRegRecPtr RamDacRegRec);
-extern _X_EXPORT void IBMramdacRestore(ScrnInfoPtr pScrn,
-                                       RamDacRecPtr RamDacRec,
-                                       RamDacRegRecPtr RamDacRegRec);
-extern _X_EXPORT void IBMramdac526SetBpp(ScrnInfoPtr pScrn,
-                                         RamDacRegRecPtr RamDacRegRec);
-extern _X_EXPORT void IBMramdac640SetBpp(ScrnInfoPtr pScrn,
-                                         RamDacRegRecPtr RamDacRegRec);
-extern _X_EXPORT unsigned long IBMramdac526CalculateMNPCForClock(unsigned long
-                                                                 RefClock,
-                                                                 unsigned long
-                                                                 ReqClock,
-                                                                 char
-                                                                 IsPixClock,
-                                                                 unsigned long
-                                                                 MinClock,
-                                                                 unsigned long
-                                                                 MaxClock,
-                                                                 unsigned long
-                                                                 *rM,
-                                                                 unsigned long
-                                                                 *rN,
-                                                                 unsigned long
-                                                                 *rP,
-                                                                 unsigned long
-                                                                 *rC);
-extern _X_EXPORT unsigned long IBMramdac640CalculateMNPCForClock(unsigned long
-                                                                 RefClock,
-                                                                 unsigned long
-                                                                 ReqClock,
-                                                                 char
-                                                                 IsPixClock,
-                                                                 unsigned long
-                                                                 MinClock,
-                                                                 unsigned long
-                                                                 MaxClock,
-                                                                 unsigned long
-                                                                 *rM,
-                                                                 unsigned long
-                                                                 *rN,
-                                                                 unsigned long
-                                                                 *rP,
-                                                                 unsigned long
-                                                                 *rC);
-extern _X_EXPORT void IBMramdac526HWCursorInit(xf86CursorInfoPtr infoPtr);
-extern _X_EXPORT void IBMramdac640HWCursorInit(xf86CursorInfoPtr infoPtr);
-
-typedef void IBMramdac526SetBppProc(ScrnInfoPtr, RamDacRegRecPtr);
-extern _X_EXPORT IBMramdac526SetBppProc *IBMramdac526SetBppWeak(void);
-
-#define IBM524_RAMDAC		((VENDOR_IBM << 16) | 0x00)
-#define IBM524A_RAMDAC		((VENDOR_IBM << 16) | 0x01)
-#define IBM525_RAMDAC		((VENDOR_IBM << 16) | 0x02)
-#define IBM526_RAMDAC		((VENDOR_IBM << 16) | 0x03)
-#define IBM526DB_RAMDAC		((VENDOR_IBM << 16) | 0x04)
-#define IBM528_RAMDAC		((VENDOR_IBM << 16) | 0x05)
-#define IBM528A_RAMDAC		((VENDOR_IBM << 16) | 0x06)
-#define IBM624_RAMDAC		((VENDOR_IBM << 16) | 0x07)
-#define IBM624DB_RAMDAC		((VENDOR_IBM << 16) | 0x08)
-#define IBM640_RAMDAC		((VENDOR_IBM << 16) | 0x09)
-
-/*
- * IBM Ramdac registers
- */
-
-#define IBMRGB_REF_FREQ_1       14.31818
-#define IBMRGB_REF_FREQ_2       50.00000
-
-#define IBMRGB_rev		0x00
-#define IBMRGB_id		0x01
-#define IBMRGB_misc_clock	0x02
-#define IBMRGB_sync		0x03
-#define IBMRGB_hsync_pos	0x04
-#define IBMRGB_pwr_mgmt		0x05
-#define IBMRGB_dac_op		0x06
-#define IBMRGB_pal_ctrl		0x07
-#define IBMRGB_sysclk		0x08    /* not RGB525 */
-#define IBMRGB_pix_fmt		0x0a
-#define IBMRGB_8bpp		0x0b
-#define IBMRGB_16bpp		0x0c
-#define IBMRGB_24bpp		0x0d
-#define IBMRGB_32bpp		0x0e
-#define IBMRGB_pll_ctrl1	0x10
-#define IBMRGB_pll_ctrl2	0x11
-#define IBMRGB_pll_ref_div_fix	0x14
-#define IBMRGB_sysclk_ref_div	0x15    /* not RGB525 */
-#define IBMRGB_sysclk_vco_div	0x16    /* not RGB525 */
-/* #define IBMRGB_f0		0x20 */
-
-#define IBMRGB_sysclk_n		0x15
-#define IBMRGB_sysclk_m		0x16
-#define IBMRGB_sysclk_p		0x17
-#define IBMRGB_sysclk_c		0x18
-
-#define IBMRGB_m0		0x20
-#define IBMRGB_n0		0x21
-#define IBMRGB_p0		0x22
-#define IBMRGB_c0		0x23
-#define IBMRGB_m1		0x24
-#define IBMRGB_n1		0x25
-#define IBMRGB_p1		0x26
-#define IBMRGB_c1		0x27
-#define IBMRGB_m2		0x28
-#define IBMRGB_n2		0x29
-#define IBMRGB_p2		0x2a
-#define IBMRGB_c2		0x2b
-#define IBMRGB_m3		0x2c
-#define IBMRGB_n3		0x2d
-#define IBMRGB_p3		0x2e
-#define IBMRGB_c3		0x2f
-
-#define IBMRGB_curs		0x30
-#define IBMRGB_curs_xl		0x31
-#define IBMRGB_curs_xh		0x32
-#define IBMRGB_curs_yl		0x33
-#define IBMRGB_curs_yh		0x34
-#define IBMRGB_curs_hot_x	0x35
-#define IBMRGB_curs_hot_y	0x36
-#define IBMRGB_curs_col1_r	0x40
-#define IBMRGB_curs_col1_g	0x41
-#define IBMRGB_curs_col1_b	0x42
-#define IBMRGB_curs_col2_r	0x43
-#define IBMRGB_curs_col2_g	0x44
-#define IBMRGB_curs_col2_b	0x45
-#define IBMRGB_curs_col3_r	0x46
-#define IBMRGB_curs_col3_g	0x47
-#define IBMRGB_curs_col3_b	0x48
-#define IBMRGB_border_col_r	0x60
-#define IBMRGB_border_col_g	0x61
-#define IBMRGB_botder_col_b	0x62
-#define IBMRGB_key		0x68
-#define IBMRGB_key_mask		0x6C
-#define IBMRGB_misc1		0x70
-#define IBMRGB_misc2		0x71
-#define IBMRGB_misc3		0x72
-#define IBMRGB_misc4		0x73    /* not RGB525 */
-#define IBMRGB_key_control	0x78
-#define IBMRGB_dac_sense	0x82
-#define IBMRGB_misr_r		0x84
-#define IBMRGB_misr_g		0x86
-#define IBMRGB_misr_b		0x88
-#define IBMRGB_pll_vco_div_in	0x8e
-#define IBMRGB_pll_ref_div_in	0x8f
-#define IBMRGB_vram_mask_0	0x90
-#define IBMRGB_vram_mask_1	0x91
-#define IBMRGB_vram_mask_2	0x92
-#define IBMRGB_vram_mask_3	0x93
-#define IBMRGB_curs_array	0x100
-
-/* Constants rgb525.h */
-
-/* RGB525_REVISION_LEVEL */
-#define RGB525_PRODUCT_REV_LEVEL        0xf0
-
-/* RGB525_ID */
-#define RGB525_PRODUCT_ID               0x01
-
-/* RGB525_MISC_CTRL_1 */
-#define MISR_CNTL_ENABLE                0x80
-#define VMSK_CNTL_ENABLE                0x40
-#define PADR_RDMT_RDADDR                0x0
-#define PADR_RDMT_PAL_STATE             0x20
-#define SENS_DSAB_DISABLE               0x10
-#define SENS_SEL_BIT3                   0x0
-#define SENS_SEL_BIT7                   0x08
-#define VRAM_SIZE_32                    0x0
-#define VRAM_SIZE_64                    0x01
-
-/* RGB525_MISC_CTRL_2 */
-#define PCLK_SEL_LCLK                   0x0
-#define PCLK_SEL_PLL                    0x40
-#define PCLK_SEL_EXT                    0x80
-#define INTL_MODE_ENABLE                0x20
-#define BLANK_CNTL_ENABLE               0x10
-#define COL_RES_6BIT                    0x0
-#define COL_RES_8BIT                    0x04
-#define PORT_SEL_VGA                    0x0
-#define PORT_SEL_VRAM                   0x01
-
-/* RGB525_MISC_CTRL_3 */
-#define SWAP_RB                         0x80
-#define SWAP_WORD_LOHI                  0x0
-#define SWAP_WORD_HILO                  0x10
-#define SWAP_NIB_HILO                   0x0
-#define SWAP_NIB_LOHI                   0x02
-
-/* RGB525_MISC_CLK_CTRL */
-#define DDOT_CLK_ENABLE                 0x0
-#define DDOT_CLK_DISABLE                0x80
-#define SCLK_ENABLE                     0x0
-#define SCLK_DISABLE                    0x40
-#define B24P_DDOT_PLL                   0x0
-#define B24P_DDOT_SCLK                  0x20
-#define DDOT_DIV_PLL_1                  0x0
-#define DDOT_DIV_PLL_2                  0x02
-#define DDOT_DIV_PLL_4                  0x04
-#define DDOT_DIV_PLL_8                  0x06
-#define DDOT_DIV_PLL_16                 0x08
-#define PLL_DISABLE                     0x0
-#define PLL_ENABLE                      0x01
-
-/* RGB525_SYNC_CTRL */
-#define DLY_CNTL_ADD                    0x0
-#define DLY_SYNC_NOADD                  0x80
-#define CSYN_INVT_DISABLE               0x0
-#define CSYN_INVT_ENABLE                0x40
-#define VSYN_INVT_DISABLE               0x0
-#define VSYN_INVT_ENABLE                0x20
-#define HSYN_INVT_DISABLE               0x0
-#define HSYN_INVT_ENABLE                0x10
-#define VSYN_CNTL_NORMAL                0x0
-#define VSYN_CNTL_HIGH                  0x04
-#define VSYN_CNTL_LOW                   0x08
-#define VSYN_CNTL_DISABLE               0x0C
-#define HSYN_CNTL_NORMAL                0x0
-#define HSYN_CNTL_HIGH                  0x01
-#define HSYN_CNTL_LOW                   0x02
-#define HSYN_CNTL_DISABLE               0x03
-
-/* RGB525_HSYNC_CTRL */
-#define HSYN_POS(n)                     (n)
-
-/* RGB525_POWER_MANAGEMENT */
-#define SCLK_PWR_NORMAL                 0x0
-#define SCLK_PWR_DISABLE                0x10
-#define DDOT_PWR_NORMAL                 0x0
-#define DDOT_PWR_DISABLE                0x08
-#define SYNC_PWR_NORMAL                 0x0
-#define SYNC_PWR_DISABLE                0x04
-#define ICLK_PWR_NORMAL                 0x0
-#define ICLK_PWR_DISABLE                0x02
-#define DAC_PWR_NORMAL                  0x0
-#define DAC_PWR_DISABLE                 0x01
-
-/* RGB525_DAC_OPERATION */
-#define SOG_DISABLE                     0x0
-#define SOG_ENABLE                      0x08
-#define BRB_NORMAL                      0x0
-#define BRB_ALWAYS                      0x04
-#define DSR_DAC_SLOW                    0x02
-#define DSR_DAC_FAST                    0x0
-#define DPE_DISABLE                     0x0
-#define DPE_ENABLE                      0x01
-
-/* RGB525_PALETTE_CTRL */
-#define SIXBIT_LINEAR_ENABLE            0x0
-#define SIXBIT_LINEAR_DISABLE           0x80
-#define PALETTE_PARITION(n)             (n)
-
-/* RGB525_PIXEL_FORMAT */
-#define PIXEL_FORMAT_4BPP               0x02
-#define PIXEL_FORMAT_8BPP               0x03
-#define PIXEL_FORMAT_16BPP              0x04
-#define PIXEL_FORMAT_24BPP              0x05
-#define PIXEL_FORMAT_32BPP              0x06
-
-/* RGB525_8BPP_CTRL */
-#define B8_DCOL_INDIRECT                0x0
-#define B8_DCOL_DIRECT                  0x01
-
-/* RGB525_16BPP_CTRL */
-#define B16_DCOL_INDIRECT               0x0
-#define B16_DCOL_DYNAMIC                0x40
-#define B16_DCOL_DIRECT                 0xC0
-#define B16_POL_FORCE_BYPASS            0x0
-#define B16_POL_FORCE_LOOKUP            0x20
-#define B16_ZIB                         0x0
-#define B16_LINEAR                      0x04
-#define B16_555                         0x0
-#define B16_565                         0x02
-#define B16_SPARSE                      0x0
-#define B16_CONTIGUOUS                  0x01
-
-/* RGB525_24BPP_CTRL */
-#define B24_DCOL_INDIRECT               0x0
-#define B24_DCOL_DIRECT                 0x01
-
-/* RGB525_32BPP_CTRL */
-#define B32_POL_FORCE_BYPASS            0x0
-#define B32_POL_FORCE_LOOKUP            0x04
-#define B32_DCOL_INDIRECT               0x0
-#define B32_DCOL_DYNAMIC                0x01
-#define B32_DCOL_DIRECT                 0x03
-
-/* RGB525_PLL_CTRL_1 */
-#define REF_SRC_REFCLK                  0x0
-#define REF_SRC_EXTCLK                  0x10
-#define PLL_EXT_FS_3_0                  0x0
-#define PLL_EXT_FS_2_0                  0x01
-#define PLL_CNTL2_3_0                   0x02
-#define PLL_CNTL2_2_0                   0x03
-
-/* RGB525_PLL_CTRL_2 */
-#define PLL_INT_FS_3_0(n)               (n)
-#define PLL_INT_FS_2_0(n)               (n)
-
-/* RGB525_PLL_REF_DIV_COUNT */
-#define REF_DIV_COUNT(n)                (n)
-
-/* RGB525_F0 - RGB525_F15 */
-#define VCO_DIV_COUNT(n)                (n)
-
-/* RGB525_PLL_REFCLK values */
-#define RGB525_PLL_REFCLK_MHz(n)        ((n)/2)
-
-/* RGB525_CURSOR_CONTROL */
-#define SMLC_PART_0                     0x0
-#define SMLC_PART_1                     0x40
-#define SMLC_PART_2                     0x80
-#define SMLC_PART_3                     0xC0
-#define PIX_ORDER_RL                    0x0
-#define PIX_ORDER_LR                    0x20
-#define LOC_READ_LAST                   0x0
-#define LOC_READ_ACTUAL                 0x10
-#define UPDT_CNTL_DELAYED               0x0
-#define UPDT_CNTL_IMMEDIATE             0x08
-#define CURSOR_SIZE_32                  0x0
-#define CURSOR_SIZE_64                  0x40
-#define CURSOR_MODE_OFF                 0x0
-#define CURSOR_MODE_3_COLOR             0x01
-#define CURSOR_MODE_2_COLOR_HL          0x02
-#define CURSOR_MODE_2_COLOR             0x03
-
-/* RGB525_REVISION_LEVEL */
-#define REVISION_LEVEL                  0xF0    /* predefined */
-
-/* RGB525_ID */
-#define ID_CODE                         0x01    /* predefined */
-
-/* MISR status */
-#define RGB525_MISR_DONE                0x01
-
-/* the IBMRGB640 is rather different from the rest of the RAMDACs,
-   so we define a completely new set of register names for it */
-#define RGB640_SER_07_00		0x02
-#define RGB640_SER_15_08		0x03
-#define RGB640_SER_23_16		0x04
-#define RGB640_SER_31_24		0x05
-#define RGB640_SER_WID_03_00		0x06
-#define RGB640_SER_WID_07_04		0x07
-#define RGB640_SER_MODE			0x08
-#define		IBM640_SER_2_1	0x00
-#define		IBM640_SER_4_1	0x01
-#define		IBM640_SER_8_1	0x02
-#define		IBM640_SER_16_1	0x03
-#define		IBM640_SER_16_3	0x05
-#define		IBM640_SER_5_1	0x06
-#define RGB640_PIXEL_INTERLEAVE		0x09
-#define RGB640_MISC_CONF		0x0a
-#define		IBM640_PCLK		0x00
-#define		IBM640_PCLK_2		0x40
-#define		IBM640_PCLK_4		0x80
-#define		IBM640_PCLK_8		0xc0
-#define		IBM640_PSIZE10		0x10
-#define		IBM640_LCI		0x08
-#define		IBM640_WIDCTL_MASK	0x07
-#define RGB640_VGA_CONTROL		0x0b
-#define 	IBM640_RDBK	0x04
-#define 	IBM640_PSIZE8	0x02
-#define		IBM640_VRAM	0x01
-#define RGB640_DAC_CONTROL		0x0d
-#define		IBM640_MONO	0x08
-#define		IBM640_DACENBL	0x04
-#define		IBM640_SHUNT	0x02
-#define		IBM640_SLOWSLEW	0x01
-#define RGB640_OUTPUT_CONTROL		0x0e
-#define		IBM640_RDAI	0x04
-#define		IBM640_WDAI	0x02
-#define		IBM640_WATCTL	0x01
-#define RGB640_SYNC_CONTROL		0x0f
-#define		IBM640_PWR	0x20
-#define		IBM640_VSP	0x10
-#define		IBM640_HSP	0x08
-#define		IBM640_CSE	0x04
-#define		IBM640_CSG	0x02
-#define		IBM640_BPE	0x01
-#define RGB640_PLL_N			0x10
-#define RGB640_PLL_M			0x11
-#define RGB640_PLL_P			0x12
-#define RGB640_PLL_CTL			0x13
-#define 	IBM640_PLL_EN	0x04
-#define		IBM640_PLL_HIGH	0x10
-#define		IBM640_PLL_LOW	0x01
-#define RGB640_AUX_PLL_CTL		0x17
-#define		IBM640_AUXPLL	0x04
-#define		IBM640_AUX_HI	0x02
-#define		IBM640_AUX_LO	0x01
-#define RGB640_CHROMA_KEY0		0x20
-#define RGB640_CHROMA_MASK0		0x21
-#define RGB640_CURS_X_LOW		0x40
-#define RGB640_CURS_X_HIGH		0x41
-#define RGB640_CURS_Y_LOW		0x42
-#define RGB640_CURS_Y_HIGH		0x43
-#define RGB640_CURS_OFFSETX		0x44
-#define RGB640_CURS_OFFSETY		0x45
-#define RGB640_CURSOR_CONTROL		0x4B
-#define		IBM640_CURS_OFF		0x00
-#define		IBM640_CURS_MODE0	0x01
-#define		IBM640_CURS_MODE1	0x02
-#define		IBM640_CURS_MODE2	0x03
-#define		IBM640_CURS_ADV		0x04
-#define RGB640_CROSSHAIR_CONTROL	0x57
-#define RGB640_VRAM_MASK0		0xf0
-#define RGB640_VRAM_MASK1		0xf1
-#define RGB640_VRAM_MASK2		0xf2
-#define RGB640_DIAGS			0xfa
-#define RGB640_CURS_WRITE		0x1000
-#define RGB640_CURS_COL0		0x4800
-#define RGB640_CURS_COL1		0x4801
-#define RGB640_CURS_COL2		0x4802
-#define RGB640_CURS_COL3		0x4803
diff --git a/hw/xfree86/ramdac/IBMPriv.h b/hw/xfree86/ramdac/IBMPriv.h
deleted file mode 100644
index 48588c8..0000000
--- a/hw/xfree86/ramdac/IBMPriv.h
+++ /dev/null
@@ -1,27 +0,0 @@
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include "IBM.h"
-
-typedef struct {
-    const char *DeviceName;
-} xf86IBMramdacInfo;
-
-extern xf86IBMramdacInfo IBMramdacDeviceInfo[];
-
-#ifdef INIT_IBM_RAMDAC_INFO
-xf86IBMramdacInfo IBMramdacDeviceInfo[] = {
-    {"IBM 524"},
-    {"IBM 524A"},
-    {"IBM 525"},
-    {"IBM 526"},
-    {"IBM 526DB(DoubleBuffer)"},
-    {"IBM 528"},
-    {"IBM 528A"},
-    {"IBM 624"},
-    {"IBM 624DB(DoubleBuffer)"},
-    {"IBM 640"}
-};
-#endif
diff --git a/hw/xfree86/ramdac/Makefile.am b/hw/xfree86/ramdac/Makefile.am
index 59e0996..ffae2c3 100644
--- a/hw/xfree86/ramdac/Makefile.am
+++ b/hw/xfree86/ramdac/Makefile.am
@@ -1,12 +1,10 @@
 noinst_LTLIBRARIES = libramdac.la
 
-libramdac_la_SOURCES = xf86RamDac.c xf86RamDacCmap.c \
-                       xf86CursorRD.c xf86HWCurs.c IBM.c BT.c TI.c
+libramdac_la_SOURCES = xf86CursorRD.c xf86HWCurs.c
 
-sdk_HEADERS = BT.h IBM.h TI.h xf86Cursor.h xf86RamDac.h
+sdk_HEADERS = xf86Cursor.h
 
-EXTRA_DIST = BTPriv.h IBMPriv.h TIPriv.h xf86CursorPriv.h xf86RamDacPriv.h \
-	CURSOR.NOTES
+EXTRA_DIST = xf86CursorPriv.h CURSOR.NOTES
 
 AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS)
 AM_CPPFLAGS = $(XORG_INCS)
diff --git a/hw/xfree86/ramdac/Makefile.in b/hw/xfree86/ramdac/Makefile.in
index 2c951ef..759f1b0 100644
--- a/hw/xfree86/ramdac/Makefile.in
+++ b/hw/xfree86/ramdac/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -106,14 +106,12 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 LTLIBRARIES = $(noinst_LTLIBRARIES)
 libramdac_la_LIBADD =
-am_libramdac_la_OBJECTS = xf86RamDac.lo xf86RamDacCmap.lo \
-	xf86CursorRD.lo xf86HWCurs.lo IBM.lo BT.lo TI.lo
+am_libramdac_la_OBJECTS = xf86CursorRD.lo xf86HWCurs.lo
 libramdac_la_OBJECTS = $(am_libramdac_la_OBJECTS)
 AM_V_lt = $(am__v_lt_@AM_V@)
 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
@@ -134,10 +132,8 @@ am__v_at_1 =
 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__maybe_remake_depfiles = depfiles
-am__depfiles_remade = ./$(DEPDIR)/BT.Plo ./$(DEPDIR)/IBM.Plo \
-	./$(DEPDIR)/TI.Plo ./$(DEPDIR)/xf86CursorRD.Plo \
-	./$(DEPDIR)/xf86HWCurs.Plo ./$(DEPDIR)/xf86RamDac.Plo \
-	./$(DEPDIR)/xf86RamDacCmap.Plo
+am__depfiles_remade = ./$(DEPDIR)/xf86CursorRD.Plo \
+	./$(DEPDIR)/xf86HWCurs.Plo
 am__mv = mv -f
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@@ -210,8 +206,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
@@ -231,8 +225,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -246,6 +238,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -264,14 +258,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -288,8 +274,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -345,6 +333,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -397,7 +387,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -421,29 +410,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -481,8 +454,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -493,14 +464,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -574,13 +539,9 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 noinst_LTLIBRARIES = libramdac.la
-libramdac_la_SOURCES = xf86RamDac.c xf86RamDacCmap.c \
-                       xf86CursorRD.c xf86HWCurs.c IBM.c BT.c TI.c
-
-sdk_HEADERS = BT.h IBM.h TI.h xf86Cursor.h xf86RamDac.h
-EXTRA_DIST = BTPriv.h IBMPriv.h TIPriv.h xf86CursorPriv.h xf86RamDacPriv.h \
-	CURSOR.NOTES
-
+libramdac_la_SOURCES = xf86CursorRD.c xf86HWCurs.c
+sdk_HEADERS = xf86Cursor.h
+EXTRA_DIST = xf86CursorPriv.h CURSOR.NOTES
 AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS)
 AM_CPPFLAGS = $(XORG_INCS)
 all: all-am
@@ -637,13 +598,8 @@ mostlyclean-compile:
 distclean-compile:
 	-rm -f *.tab.c
 
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BT.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/IBM.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TI.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86CursorRD.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86HWCurs.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86RamDac.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86RamDacCmap.Plo@am__quote@ # am--include-marker
 
 $(am__depfiles_remade):
 	@$(MKDIR_P) $(@D)
@@ -750,7 +706,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
@@ -827,13 +782,8 @@ clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
 	mostlyclean-am
 
 distclean: distclean-am
-		-rm -f ./$(DEPDIR)/BT.Plo
-	-rm -f ./$(DEPDIR)/IBM.Plo
-	-rm -f ./$(DEPDIR)/TI.Plo
-	-rm -f ./$(DEPDIR)/xf86CursorRD.Plo
+		-rm -f ./$(DEPDIR)/xf86CursorRD.Plo
 	-rm -f ./$(DEPDIR)/xf86HWCurs.Plo
-	-rm -f ./$(DEPDIR)/xf86RamDac.Plo
-	-rm -f ./$(DEPDIR)/xf86RamDacCmap.Plo
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
 	distclean-tags
@@ -879,13 +829,8 @@ install-ps-am:
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
-		-rm -f ./$(DEPDIR)/BT.Plo
-	-rm -f ./$(DEPDIR)/IBM.Plo
-	-rm -f ./$(DEPDIR)/TI.Plo
-	-rm -f ./$(DEPDIR)/xf86CursorRD.Plo
+		-rm -f ./$(DEPDIR)/xf86CursorRD.Plo
 	-rm -f ./$(DEPDIR)/xf86HWCurs.Plo
-	-rm -f ./$(DEPDIR)/xf86RamDac.Plo
-	-rm -f ./$(DEPDIR)/xf86RamDacCmap.Plo
 	-rm -f Makefile
 maintainer-clean-am: distclean-am maintainer-clean-generic
 
diff --git a/hw/xfree86/ramdac/TI.c b/hw/xfree86/ramdac/TI.c
deleted file mode 100644
index 0ae1db5..0000000
--- a/hw/xfree86/ramdac/TI.c
+++ /dev/null
@@ -1,726 +0,0 @@
-/*
- * Copyright 1998 by Alan Hourihane, Wigan, England.
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of Alan Hourihane not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission.  Alan Hourihane makes no representations
- * about the suitability of this software for any purpose.  It is provided
- * "as is" without express or implied warranty.
- *
- * ALAN HOURIHANE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL ALAN HOURIHANE BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- *
- * Authors:  Alan Hourihane, <alanh@fairlite.demon.co.uk>
- *
- * Modified from IBM.c to support TI RAMDAC routines
- *   by Jens Owen, <jens@tungstengraphics.com>.
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include "xf86.h"
-#include "xf86_OSproc.h"
-
-#include "xf86Cursor.h"
-
-#define INIT_TI_RAMDAC_INFO
-#include "TIPriv.h"
-#include "xf86RamDacPriv.h"
-
-/* The following values are in kHz */
-#define TI_MIN_VCO_FREQ  110000
-#define TI_MAX_VCO_FREQ  220000
-
-unsigned long
-TIramdacCalculateMNPForClock(unsigned long RefClock,    /* In 100Hz units */
-                             unsigned long ReqClock,    /* In 100Hz units */
-                             char IsPixClock,   /* boolean, is this the pixel or the sys clock */
-                             unsigned long MinClock,    /* Min VCO rating */
-                             unsigned long MaxClock,    /* Max VCO rating */
-                             unsigned long *rM, /* M Out */
-                             unsigned long *rN, /* N Out */
-                             unsigned long *rP  /* Min P In, P Out */
-    )
-{
-    unsigned long n, p;
-    unsigned long best_m = 0, best_n = 0;
-    double VCO, IntRef = (double) RefClock;
-    double m_err, inc_m, calc_m;
-    unsigned long ActualClock;
-
-    /* Make sure that MinClock <= ReqClock <= MaxClock */
-    if (ReqClock < MinClock)
-        ReqClock = MinClock;
-    if (ReqClock > MaxClock)
-        ReqClock = MaxClock;
-
-    /*
-     * ActualClock = VCO / 2 ^ p
-     * Choose p so that TI_MIN_VCO_FREQ <= VCO <= TI_MAX_VCO_FREQ
-     * Note that since TI_MAX_VCO_FREQ = 2 * TI_MIN_VCO_FREQ
-     * we don't have to bother checking for this maximum limit.
-     */
-    VCO = (double) ReqClock;
-    for (p = 0; p < 3 && VCO < TI_MIN_VCO_FREQ; (p)++)
-        VCO *= 2.0;
-
-    /*
-     * We avoid doing multiplications by ( 65 - n ),
-     * and add an increment instead - this keeps any error small.
-     */
-    inc_m = VCO / (IntRef * 8.0);
-
-    /* Initial value of calc_m for the loop */
-    calc_m = inc_m + inc_m + inc_m;
-
-    /* Initial amount of error for an integer - impossibly large */
-    m_err = 2.0;
-
-    /* Search for the closest INTEGER value of ( 65 - m ) */
-    for (n = 3; n <= 25; (n)++, calc_m += inc_m) {
-
-        /* Ignore values of ( 65 - m ) which we can't use */
-        if (calc_m < 3.0 || calc_m > 64.0)
-            continue;
-
-        /*
-         * Pick the closest INTEGER (has smallest fractional part).
-         * The optimizer should clean this up for us.
-         */
-        if ((calc_m - (int) calc_m) < m_err) {
-            m_err = calc_m - (int) calc_m;
-            best_m = (int) calc_m;
-            best_n = n;
-        }
-    }
-
-    /* 65 - ( 65 - x ) = x */
-    *rM = 65 - best_m;
-    *rN = 65 - best_n;
-    *rP = p;
-
-    /* Now all the calculations can be completed */
-    VCO = 8.0 * IntRef * best_m / best_n;
-    ActualClock = VCO / (1 << p);
-
-    DebugF("f_out=%ld f_vco=%.1f n=%lu m=%lu p=%lu\n",
-           ActualClock, VCO, *rN, *rM, *rP);
-
-    return ActualClock;
-}
-
-void
-TIramdacRestore(ScrnInfoPtr pScrn, RamDacRecPtr ramdacPtr,
-                RamDacRegRecPtr ramdacReg)
-{
-    int i;
-    unsigned long status;
-
-    /* Here we pass a short, so that we can evaluate a mask too
-     * So that the mask is the high byte and the data the low byte
-     * Order is important
-     */
-    TIRESTORE(TIDAC_latch_ctrl);
-    TIRESTORE(TIDAC_true_color_ctrl);
-    TIRESTORE(TIDAC_multiplex_ctrl);
-    TIRESTORE(TIDAC_clock_select);
-    TIRESTORE(TIDAC_palette_page);
-    TIRESTORE(TIDAC_general_ctrl);
-    TIRESTORE(TIDAC_misc_ctrl);
-    /* 0x2A & 0x2B are reserved */
-    TIRESTORE(TIDAC_key_over_low);
-    TIRESTORE(TIDAC_key_over_high);
-    TIRESTORE(TIDAC_key_red_low);
-    TIRESTORE(TIDAC_key_red_high);
-    TIRESTORE(TIDAC_key_green_low);
-    TIRESTORE(TIDAC_key_green_high);
-    TIRESTORE(TIDAC_key_blue_low);
-    TIRESTORE(TIDAC_key_blue_high);
-    TIRESTORE(TIDAC_key_ctrl);
-    (*ramdacPtr->WriteDAC) (pScrn, TIDAC_clock_ctrl, 0, 0x30);
-    (*ramdacPtr->WriteDAC) (pScrn, TIDAC_clock_ctrl, 0, 0x38);
-    TIRESTORE(TIDAC_clock_ctrl);
-    TIRESTORE(TIDAC_sense_test);
-    TIRESTORE(TIDAC_ind_curs_ctrl);
-
-    /* only restore clocks if they were valid to begin with */
-
-    if (ramdacReg->DacRegs[TIDAC_PIXEL_VALID]) {
-        /* Reset pixel clock */
-        (*ramdacPtr->WriteDAC) (pScrn, TIDAC_pll_addr, 0, 0x22);
-        (*ramdacPtr->WriteDAC) (pScrn, TIDAC_pll_pixel_data, 0, 0x3c);
-
-        /* Restore N, M & P values for pixel clocks */
-        (*ramdacPtr->WriteDAC) (pScrn, TIDAC_pll_addr, 0, 0);
-        (*ramdacPtr->WriteDAC) (pScrn, TIDAC_pll_pixel_data, 0,
-                                ramdacReg->DacRegs[TIDAC_PIXEL_N]);
-        (*ramdacPtr->WriteDAC) (pScrn, TIDAC_pll_pixel_data, 0,
-                                ramdacReg->DacRegs[TIDAC_PIXEL_M]);
-        (*ramdacPtr->WriteDAC) (pScrn, TIDAC_pll_pixel_data, 0,
-                                ramdacReg->DacRegs[TIDAC_PIXEL_P]);
-
-        /* wait for pixel clock to lock */
-        i = 1000000;
-        do {
-            status = (*ramdacPtr->ReadDAC) (pScrn, TIDAC_pll_pixel_data);
-        } while ((!(status & 0x40)) && (--i));
-        if (!(status & 0x40)) {
-            xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
-                       "Pixel clock setup timed out\n");
-            return;
-        }
-    }
-
-    if (ramdacReg->DacRegs[TIDAC_LOOP_VALID]) {
-        /* Reset loop clock */
-        (*ramdacPtr->WriteDAC) (pScrn, TIDAC_pll_addr, 0, 0x22);
-        (*ramdacPtr->WriteDAC) (pScrn, TIDAC_pll_loop_data, 0, 0x70);
-
-        /* Restore N, M & P values for pixel clocks */
-        (*ramdacPtr->WriteDAC) (pScrn, TIDAC_pll_addr, 0, 0);
-        (*ramdacPtr->WriteDAC) (pScrn, TIDAC_pll_loop_data, 0,
-                                ramdacReg->DacRegs[TIDAC_LOOP_N]);
-        (*ramdacPtr->WriteDAC) (pScrn, TIDAC_pll_loop_data, 0,
-                                ramdacReg->DacRegs[TIDAC_LOOP_M]);
-        (*ramdacPtr->WriteDAC) (pScrn, TIDAC_pll_loop_data, 0,
-                                ramdacReg->DacRegs[TIDAC_LOOP_P]);
-
-        /* wait for loop clock to lock */
-        i = 1000000;
-        do {
-            status = (*ramdacPtr->ReadDAC) (pScrn, TIDAC_pll_loop_data);
-        } while ((!(status & 0x40)) && (--i));
-        if (!(status & 0x40)) {
-            xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
-                       "Loop clock setup timed out\n");
-            return;
-        }
-    }
-
-    /* restore palette */
-    (*ramdacPtr->WriteAddress) (pScrn, 0);
-#ifndef NOT_DONE
-    for (i = 0; i < 768; i++)
-        (*ramdacPtr->WriteData) (pScrn, ramdacReg->DAC[i]);
-#else
-    (*ramdacPtr->WriteData) (pScrn, 0);
-    (*ramdacPtr->WriteData) (pScrn, 0);
-    (*ramdacPtr->WriteData) (pScrn, 0);
-    for (i = 0; i < 765; i++)
-        (*ramdacPtr->WriteData) (pScrn, 0xff);
-#endif
-}
-
-void
-TIramdacSave(ScrnInfoPtr pScrn, RamDacRecPtr ramdacPtr,
-             RamDacRegRecPtr ramdacReg)
-{
-    int i;
-
-    (*ramdacPtr->ReadAddress) (pScrn, 0);
-    for (i = 0; i < 768; i++)
-        ramdacReg->DAC[i] = (*ramdacPtr->ReadData) (pScrn);
-
-    /* Read back N,M and P values for pixel clock */
-    (*ramdacPtr->WriteDAC) (pScrn, TIDAC_pll_addr, 0, 0);
-    ramdacReg->DacRegs[TIDAC_PIXEL_N] =
-        (*ramdacPtr->ReadDAC) (pScrn, TIDAC_pll_pixel_data);
-    (*ramdacPtr->WriteDAC) (pScrn, TIDAC_pll_addr, 0, 0x11);
-    ramdacReg->DacRegs[TIDAC_PIXEL_M] =
-        (*ramdacPtr->ReadDAC) (pScrn, TIDAC_pll_pixel_data);
-    (*ramdacPtr->WriteDAC) (pScrn, TIDAC_pll_addr, 0, 0x22);
-    ramdacReg->DacRegs[TIDAC_PIXEL_P] =
-        (*ramdacPtr->ReadDAC) (pScrn, TIDAC_pll_pixel_data);
-
-    /* Read back N,M and P values for loop clock */
-    (*ramdacPtr->WriteDAC) (pScrn, TIDAC_pll_addr, 0, 0);
-    ramdacReg->DacRegs[TIDAC_LOOP_N] =
-        (*ramdacPtr->ReadDAC) (pScrn, TIDAC_pll_loop_data);
-    (*ramdacPtr->WriteDAC) (pScrn, TIDAC_pll_addr, 0, 0x11);
-    ramdacReg->DacRegs[TIDAC_LOOP_M] =
-        (*ramdacPtr->ReadDAC) (pScrn, TIDAC_pll_loop_data);
-    (*ramdacPtr->WriteDAC) (pScrn, TIDAC_pll_addr, 0, 0x22);
-    ramdacReg->DacRegs[TIDAC_LOOP_P] =
-        (*ramdacPtr->ReadDAC) (pScrn, TIDAC_pll_loop_data);
-
-    /* Order is important */
-    TISAVE(TIDAC_latch_ctrl);
-    TISAVE(TIDAC_true_color_ctrl);
-    TISAVE(TIDAC_multiplex_ctrl);
-    TISAVE(TIDAC_clock_select);
-    TISAVE(TIDAC_palette_page);
-    TISAVE(TIDAC_general_ctrl);
-    TISAVE(TIDAC_misc_ctrl);
-    /* 0x2A & 0x2B are reserved */
-    TISAVE(TIDAC_key_over_low);
-    TISAVE(TIDAC_key_over_high);
-    TISAVE(TIDAC_key_red_low);
-    TISAVE(TIDAC_key_red_high);
-    TISAVE(TIDAC_key_green_low);
-    TISAVE(TIDAC_key_green_high);
-    TISAVE(TIDAC_key_blue_low);
-    TISAVE(TIDAC_key_blue_high);
-    TISAVE(TIDAC_key_ctrl);
-    TISAVE(TIDAC_clock_ctrl);
-    TISAVE(TIDAC_sense_test);
-    TISAVE(TIDAC_ind_curs_ctrl);
-}
-
-RamDacHelperRecPtr
-TIramdacProbe(ScrnInfoPtr pScrn, RamDacSupportedInfoRecPtr ramdacs)
-{
-    RamDacRecPtr ramdacPtr = RAMDACSCRPTR(pScrn);
-    RamDacHelperRecPtr ramdacHelperPtr = NULL;
-    Bool RamDacIsSupported = FALSE;
-    int TIramdac_ID = -1;
-    int i;
-    unsigned char id, rev, rev2, id2;
-
-    /* read ID and revision */
-    rev = (*ramdacPtr->ReadDAC) (pScrn, TIDAC_rev);
-    id = (*ramdacPtr->ReadDAC) (pScrn, TIDAC_id);
-
-    /* check if ID and revision are read only */
-    (*ramdacPtr->WriteDAC) (pScrn, ~rev, 0, TIDAC_rev);
-    (*ramdacPtr->WriteDAC) (pScrn, ~id, 0, TIDAC_id);
-    rev2 = (*ramdacPtr->ReadDAC) (pScrn, TIDAC_rev);
-    id2 = (*ramdacPtr->ReadDAC) (pScrn, TIDAC_id);
-
-    switch (id) {
-    case TIDAC_TVP_3030_ID:
-        if (id == id2 && rev == rev2)   /* check for READ ONLY */
-            TIramdac_ID = TI3030_RAMDAC;
-        break;
-    case TIDAC_TVP_3026_ID:
-        if (id == id2 && rev == rev2)   /* check for READ ONLY */
-            TIramdac_ID = TI3026_RAMDAC;
-        break;
-    }
-
-    (*ramdacPtr->WriteDAC) (pScrn, rev, 0, TIDAC_rev);
-    (*ramdacPtr->WriteDAC) (pScrn, id, 0, TIDAC_id);
-
-    if (TIramdac_ID == -1) {
-        xf86DrvMsg(pScrn->scrnIndex, X_PROBED,
-                   "Cannot determine TI RAMDAC type, aborting\n");
-        return NULL;
-    }
-    else {
-        xf86DrvMsg(pScrn->scrnIndex, X_PROBED,
-                   "Attached RAMDAC is %s\n",
-                   TIramdacDeviceInfo[TIramdac_ID & 0xFFFF].DeviceName);
-    }
-
-    for (i = 0; ramdacs[i].token != -1; i++) {
-        if (ramdacs[i].token == TIramdac_ID)
-            RamDacIsSupported = TRUE;
-    }
-
-    if (!RamDacIsSupported) {
-        xf86DrvMsg(pScrn->scrnIndex, X_PROBED,
-                   "This TI RAMDAC is NOT supported by this driver, aborting\n");
-        return NULL;
-    }
-
-    ramdacHelperPtr = RamDacHelperCreateInfoRec();
-    switch (TIramdac_ID) {
-    case TI3030_RAMDAC:
-        ramdacHelperPtr->SetBpp = TIramdac3030SetBpp;
-        ramdacHelperPtr->HWCursorInit = TIramdacHWCursorInit;
-        break;
-    case TI3026_RAMDAC:
-        ramdacHelperPtr->SetBpp = TIramdac3026SetBpp;
-        ramdacHelperPtr->HWCursorInit = TIramdacHWCursorInit;
-        break;
-    }
-    ramdacPtr->RamDacType = TIramdac_ID;
-    ramdacHelperPtr->RamDacType = TIramdac_ID;
-    ramdacHelperPtr->Save = TIramdacSave;
-    ramdacHelperPtr->Restore = TIramdacRestore;
-
-    return ramdacHelperPtr;
-}
-
-void
-TIramdac3026SetBpp(ScrnInfoPtr pScrn, RamDacRegRecPtr ramdacReg)
-{
-    switch (pScrn->bitsPerPixel) {
-    case 32:
-        /* order is important */
-        ramdacReg->DacRegs[TIDAC_latch_ctrl] = 0x06;
-        ramdacReg->DacRegs[TIDAC_true_color_ctrl] = 0x46;
-        ramdacReg->DacRegs[TIDAC_multiplex_ctrl] = 0x5c;
-        ramdacReg->DacRegs[TIDAC_clock_select] = 0x05;
-        ramdacReg->DacRegs[TIDAC_palette_page] = 0x00;
-        ramdacReg->DacRegs[TIDAC_general_ctrl] = 0x10;
-        ramdacReg->DacRegs[TIDAC_misc_ctrl] = 0x3C;
-        /* 0x2A & 0x2B are reserved */
-        ramdacReg->DacRegs[TIDAC_key_over_low] = 0xFF;
-        ramdacReg->DacRegs[TIDAC_key_over_high] = 0xFF;
-        ramdacReg->DacRegs[TIDAC_key_red_low] = 0xFF;
-        ramdacReg->DacRegs[TIDAC_key_red_high] = 0xFF;
-        ramdacReg->DacRegs[TIDAC_key_green_low] = 0xFF;
-        ramdacReg->DacRegs[TIDAC_key_green_high] = 0xFF;
-        ramdacReg->DacRegs[TIDAC_key_blue_low] = 0xFF;
-        ramdacReg->DacRegs[TIDAC_key_blue_high] = 0x00;
-        ramdacReg->DacRegs[TIDAC_key_ctrl] = 0x10;
-        ramdacReg->DacRegs[TIDAC_sense_test] = 0x00;
-        if (pScrn->overlayFlags & OVERLAY_8_32_PLANAR) {
-            ramdacReg->DacRegs[TIDAC_true_color_ctrl] = 0x06;
-            ramdacReg->DacRegs[TIDAC_misc_ctrl] = 0x3C;
-            ramdacReg->DacRegs[TIDAC_key_ctrl] = 0x01;
-        }
-        ramdacReg->DacRegs[TIDAC_ind_curs_ctrl] = 0x00;
-        break;
-    case 24:
-        /* order is important */
-        ramdacReg->DacRegs[TIDAC_latch_ctrl] = 0x06;
-        ramdacReg->DacRegs[TIDAC_true_color_ctrl] = 0x56;
-        ramdacReg->DacRegs[TIDAC_multiplex_ctrl] = 0x58;
-        ramdacReg->DacRegs[TIDAC_clock_select] = 0x25;
-        ramdacReg->DacRegs[TIDAC_palette_page] = 0x00;
-        ramdacReg->DacRegs[TIDAC_general_ctrl] = 0x00;
-        ramdacReg->DacRegs[TIDAC_misc_ctrl] = 0x2C;
-        /* 0x2A & 0x2B are reserved */
-        ramdacReg->DacRegs[TIDAC_key_over_low] = 0xFF;
-        ramdacReg->DacRegs[TIDAC_key_over_high] = 0xFF;
-        ramdacReg->DacRegs[TIDAC_key_red_low] = 0xFF;
-        ramdacReg->DacRegs[TIDAC_key_red_high] = 0xFF;
-        ramdacReg->DacRegs[TIDAC_key_green_low] = 0xFF;
-        ramdacReg->DacRegs[TIDAC_key_green_high] = 0xFF;
-        ramdacReg->DacRegs[TIDAC_key_blue_low] = 0xFF;
-        ramdacReg->DacRegs[TIDAC_key_blue_high] = 0x00;
-        ramdacReg->DacRegs[TIDAC_key_ctrl] = 0x10;
-        ramdacReg->DacRegs[TIDAC_sense_test] = 0x00;
-        ramdacReg->DacRegs[TIDAC_ind_curs_ctrl] = 0x00;
-        break;
-    case 16:
-        /* order is important */
-#if 0
-        /* Matrox driver uses this */
-        ramdacReg->DacRegs[TIDAC_latch_ctrl] = 0x07;
-#else
-        ramdacReg->DacRegs[TIDAC_latch_ctrl] = 0x06;
-#endif
-        if (pScrn->depth == 16) {
-            ramdacReg->DacRegs[TIDAC_true_color_ctrl] = 0x45;
-        }
-        else {
-            ramdacReg->DacRegs[TIDAC_true_color_ctrl] = 0x44;
-        }
-#if 0
-        /* Matrox driver uses this */
-        ramdacReg->DacRegs[TIDAC_multiplex_ctrl] = 0x50;
-        ramdacReg->DacRegs[TIDAC_clock_select] = 0x15;
-        ramdacReg->DacRegs[TIDAC_palette_page] = 0x00;
-        ramdacReg->DacRegs[TIDAC_general_ctrl] = 0x00;
-#else
-        ramdacReg->DacRegs[TIDAC_multiplex_ctrl] = 0x54;
-        ramdacReg->DacRegs[TIDAC_clock_select] = 0x05;
-        ramdacReg->DacRegs[TIDAC_palette_page] = 0x00;
-        ramdacReg->DacRegs[TIDAC_general_ctrl] = 0x10;
-#endif
-        ramdacReg->DacRegs[TIDAC_misc_ctrl] = 0x2C;
-        /* 0x2A & 0x2B are reserved */
-        ramdacReg->DacRegs[TIDAC_key_over_low] = 0xFF;
-        ramdacReg->DacRegs[TIDAC_key_over_high] = 0xFF;
-        ramdacReg->DacRegs[TIDAC_key_red_low] = 0xFF;
-        ramdacReg->DacRegs[TIDAC_key_red_high] = 0xFF;
-        ramdacReg->DacRegs[TIDAC_key_green_low] = 0xFF;
-        ramdacReg->DacRegs[TIDAC_key_green_high] = 0xFF;
-        ramdacReg->DacRegs[TIDAC_key_blue_low] = 0xFF;
-        ramdacReg->DacRegs[TIDAC_key_blue_high] = 0x00;
-        ramdacReg->DacRegs[TIDAC_key_ctrl] = 0x10;
-        ramdacReg->DacRegs[TIDAC_sense_test] = 0x00;
-        ramdacReg->DacRegs[TIDAC_ind_curs_ctrl] = 0x00;
-        break;
-    case 8:
-        /* order is important */
-        ramdacReg->DacRegs[TIDAC_latch_ctrl] = 0x06;
-        ramdacReg->DacRegs[TIDAC_true_color_ctrl] = 0x80;
-        ramdacReg->DacRegs[TIDAC_multiplex_ctrl] = 0x4c;
-        ramdacReg->DacRegs[TIDAC_clock_select] = 0x05;
-        ramdacReg->DacRegs[TIDAC_palette_page] = 0x00;
-        ramdacReg->DacRegs[TIDAC_general_ctrl] = 0x10;
-        ramdacReg->DacRegs[TIDAC_misc_ctrl] = 0x1C;
-        /* 0x2A & 0x2B are reserved */
-        ramdacReg->DacRegs[TIDAC_key_over_low] = 0xFF;
-        ramdacReg->DacRegs[TIDAC_key_over_high] = 0xFF;
-        ramdacReg->DacRegs[TIDAC_key_red_low] = 0xFF;
-        ramdacReg->DacRegs[TIDAC_key_red_high] = 0xFF;
-        ramdacReg->DacRegs[TIDAC_key_green_low] = 0xFF;
-        ramdacReg->DacRegs[TIDAC_key_green_high] = 0xFF;
-        ramdacReg->DacRegs[TIDAC_key_blue_low] = 0x00;
-        ramdacReg->DacRegs[TIDAC_key_blue_high] = 0x00;
-        ramdacReg->DacRegs[TIDAC_key_ctrl] = 0x00;
-        ramdacReg->DacRegs[TIDAC_sense_test] = 0x00;
-        ramdacReg->DacRegs[TIDAC_ind_curs_ctrl] = 0x00;
-        break;
-    }
-}
-
-void
-TIramdac3030SetBpp(ScrnInfoPtr pScrn, RamDacRegRecPtr ramdacReg)
-{
-    switch (pScrn->bitsPerPixel) {
-    case 32:
-        /* order is important */
-        ramdacReg->DacRegs[TIDAC_latch_ctrl] = 0x06;
-        ramdacReg->DacRegs[TIDAC_true_color_ctrl] = 0x46;
-        ramdacReg->DacRegs[TIDAC_multiplex_ctrl] = 0x5D;
-        ramdacReg->DacRegs[TIDAC_clock_select] = 0x05;
-        ramdacReg->DacRegs[TIDAC_palette_page] = 0x00;
-        ramdacReg->DacRegs[TIDAC_general_ctrl] = 0x10;
-        ramdacReg->DacRegs[TIDAC_misc_ctrl] = 0x3C;
-        /* 0x2A & 0x2B are reserved */
-        ramdacReg->DacRegs[TIDAC_key_over_low] = 0xFF;
-        ramdacReg->DacRegs[TIDAC_key_over_high] = 0xFF;
-        ramdacReg->DacRegs[TIDAC_key_red_low] = 0xFF;
-        ramdacReg->DacRegs[TIDAC_key_red_high] = 0xFF;
-        ramdacReg->DacRegs[TIDAC_key_green_low] = 0xFF;
-        ramdacReg->DacRegs[TIDAC_key_green_high] = 0xFF;
-        ramdacReg->DacRegs[TIDAC_key_blue_low] = 0xFF;
-        ramdacReg->DacRegs[TIDAC_key_blue_high] = 0x00;
-        ramdacReg->DacRegs[TIDAC_key_ctrl] = 0x10;
-        ramdacReg->DacRegs[TIDAC_sense_test] = 0x00;
-        if (pScrn->overlayFlags & OVERLAY_8_32_PLANAR) {
-            ramdacReg->DacRegs[TIDAC_true_color_ctrl] = 0x06;
-            ramdacReg->DacRegs[TIDAC_misc_ctrl] = 0x3C;
-            ramdacReg->DacRegs[TIDAC_key_ctrl] = 0x01;
-        }
-        ramdacReg->DacRegs[TIDAC_ind_curs_ctrl] = 0x00;
-        break;
-    case 24:
-        /* order is important */
-        ramdacReg->DacRegs[TIDAC_latch_ctrl] = 0x06;
-        ramdacReg->DacRegs[TIDAC_true_color_ctrl] = 0x56;
-        ramdacReg->DacRegs[TIDAC_multiplex_ctrl] = 0x58;
-        ramdacReg->DacRegs[TIDAC_clock_select] = 0x25;
-        ramdacReg->DacRegs[TIDAC_palette_page] = 0x00;
-        ramdacReg->DacRegs[TIDAC_general_ctrl] = 0x00;
-        ramdacReg->DacRegs[TIDAC_misc_ctrl] = 0x2C;
-        /* 0x2A & 0x2B are reserved */
-        ramdacReg->DacRegs[TIDAC_key_over_low] = 0xFF;
-        ramdacReg->DacRegs[TIDAC_key_over_high] = 0xFF;
-        ramdacReg->DacRegs[TIDAC_key_red_low] = 0xFF;
-        ramdacReg->DacRegs[TIDAC_key_red_high] = 0xFF;
-        ramdacReg->DacRegs[TIDAC_key_green_low] = 0xFF;
-        ramdacReg->DacRegs[TIDAC_key_green_high] = 0xFF;
-        ramdacReg->DacRegs[TIDAC_key_blue_low] = 0xFF;
-        ramdacReg->DacRegs[TIDAC_key_blue_high] = 0x00;
-        ramdacReg->DacRegs[TIDAC_key_ctrl] = 0x10;
-        ramdacReg->DacRegs[TIDAC_sense_test] = 0x00;
-        ramdacReg->DacRegs[TIDAC_ind_curs_ctrl] = 0x00;
-        break;
-    case 16:
-        /* order is important */
-#if 0
-        /* Matrox driver uses this */
-        ramdacReg->DacRegs[TIDAC_latch_ctrl] = 0x07;
-#else
-        ramdacReg->DacRegs[TIDAC_latch_ctrl] = 0x06;
-#endif
-        if (pScrn->depth == 16) {
-            ramdacReg->DacRegs[TIDAC_true_color_ctrl] = 0x45;
-        }
-        else {
-            ramdacReg->DacRegs[TIDAC_true_color_ctrl] = 0x44;
-        }
-#if 0
-        /* Matrox driver uses this */
-        ramdacReg->DacRegs[TIDAC_multiplex_ctrl] = 0x50;
-        ramdacReg->DacRegs[TIDAC_clock_select] = 0x15;
-        ramdacReg->DacRegs[TIDAC_palette_page] = 0x00;
-        ramdacReg->DacRegs[TIDAC_general_ctrl] = 0x00;
-#else
-        ramdacReg->DacRegs[TIDAC_multiplex_ctrl] = 0x55;
-        ramdacReg->DacRegs[TIDAC_clock_select] = 0x85;
-        ramdacReg->DacRegs[TIDAC_palette_page] = 0x00;
-        ramdacReg->DacRegs[TIDAC_general_ctrl] = 0x10;
-#endif
-        ramdacReg->DacRegs[TIDAC_misc_ctrl] = 0x2C;
-        /* 0x2A & 0x2B are reserved */
-        ramdacReg->DacRegs[TIDAC_key_over_low] = 0xFF;
-        ramdacReg->DacRegs[TIDAC_key_over_high] = 0xFF;
-        ramdacReg->DacRegs[TIDAC_key_red_low] = 0xFF;
-        ramdacReg->DacRegs[TIDAC_key_red_high] = 0xFF;
-        ramdacReg->DacRegs[TIDAC_key_green_low] = 0xFF;
-        ramdacReg->DacRegs[TIDAC_key_green_high] = 0xFF;
-        ramdacReg->DacRegs[TIDAC_key_blue_low] = 0xFF;
-        ramdacReg->DacRegs[TIDAC_key_blue_high] = 0x00;
-        ramdacReg->DacRegs[TIDAC_key_ctrl] = 0x10;
-        ramdacReg->DacRegs[TIDAC_sense_test] = 0x00;
-        ramdacReg->DacRegs[TIDAC_ind_curs_ctrl] = 0x00;
-        break;
-    case 8:
-        /* order is important */
-        ramdacReg->DacRegs[TIDAC_latch_ctrl] = 0x06;
-        ramdacReg->DacRegs[TIDAC_true_color_ctrl] = 0x80;
-        ramdacReg->DacRegs[TIDAC_multiplex_ctrl] = 0x4d;
-        ramdacReg->DacRegs[TIDAC_clock_select] = 0x05;
-        ramdacReg->DacRegs[TIDAC_palette_page] = 0x00;
-        ramdacReg->DacRegs[TIDAC_general_ctrl] = 0x10;
-        ramdacReg->DacRegs[TIDAC_misc_ctrl] = 0x1C;
-        /* 0x2A & 0x2B are reserved */
-        ramdacReg->DacRegs[TIDAC_key_over_low] = 0xFF;
-        ramdacReg->DacRegs[TIDAC_key_over_high] = 0xFF;
-        ramdacReg->DacRegs[TIDAC_key_red_low] = 0xFF;
-        ramdacReg->DacRegs[TIDAC_key_red_high] = 0xFF;
-        ramdacReg->DacRegs[TIDAC_key_green_low] = 0xFF;
-        ramdacReg->DacRegs[TIDAC_key_green_high] = 0xFF;
-        ramdacReg->DacRegs[TIDAC_key_blue_low] = 0x00;
-        ramdacReg->DacRegs[TIDAC_key_blue_high] = 0x00;
-        ramdacReg->DacRegs[TIDAC_key_ctrl] = 0x00;
-        ramdacReg->DacRegs[TIDAC_sense_test] = 0x00;
-        ramdacReg->DacRegs[TIDAC_ind_curs_ctrl] = 0x00;
-        break;
-    }
-}
-
-static void
-TIramdacShowCursor(ScrnInfoPtr pScrn)
-{
-    RamDacRecPtr ramdacPtr = RAMDACSCRPTR(pScrn);
-
-    /* Enable cursor - X11 mode */
-    (*ramdacPtr->WriteDAC) (pScrn, TIDAC_ind_curs_ctrl, 0, 0x03);
-}
-
-static void
-TIramdacHideCursor(ScrnInfoPtr pScrn)
-{
-    RamDacRecPtr ramdacPtr = RAMDACSCRPTR(pScrn);
-
-    /* Disable cursor - X11 mode */
-    (*ramdacPtr->WriteDAC) (pScrn, TIDAC_ind_curs_ctrl, 0, 0x00);
-}
-
-static void
-TIramdacSetCursorPosition(ScrnInfoPtr pScrn, int x, int y)
-{
-    RamDacRecPtr ramdacPtr = RAMDACSCRPTR(pScrn);
-
-    x += 64;
-    y += 64;
-
-    (*ramdacPtr->WriteDAC) (pScrn, TIDAC_CURS_XLOW, 0, x & 0xff);
-    (*ramdacPtr->WriteDAC) (pScrn, TIDAC_CURS_XHIGH, 0, (x >> 8) & 0x0f);
-    (*ramdacPtr->WriteDAC) (pScrn, TIDAC_CURS_YLOW, 0, y & 0xff);
-    (*ramdacPtr->WriteDAC) (pScrn, TIDAC_CURS_YHIGH, 0, (y >> 8) & 0x0f);
-}
-
-static void
-TIramdacSetCursorColors(ScrnInfoPtr pScrn, int bg, int fg)
-{
-    RamDacRecPtr ramdacPtr = RAMDACSCRPTR(pScrn);
-
-    /* Background color */
-    (*ramdacPtr->WriteDAC) (pScrn, TIDAC_CURS_WRITE_ADDR, 0, 1);
-    (*ramdacPtr->WriteDAC) (pScrn, TIDAC_CURS_COLOR, 0,
-                            ((bg & 0x00ff0000) >> 16));
-    (*ramdacPtr->WriteDAC) (pScrn, TIDAC_CURS_COLOR, 0,
-                            ((bg & 0x0000ff00) >> 8));
-    (*ramdacPtr->WriteDAC) (pScrn, TIDAC_CURS_COLOR, 0, (bg & 0x000000ff));
-
-    /* Foreground color */
-    (*ramdacPtr->WriteDAC) (pScrn, TIDAC_CURS_WRITE_ADDR, 0, 2);
-    (*ramdacPtr->WriteDAC) (pScrn, TIDAC_CURS_COLOR, 0,
-                            ((fg & 0x00ff0000) >> 16));
-    (*ramdacPtr->WriteDAC) (pScrn, TIDAC_CURS_COLOR, 0,
-                            ((fg & 0x0000ff00) >> 8));
-    (*ramdacPtr->WriteDAC) (pScrn, TIDAC_CURS_COLOR, 0, (fg & 0x000000ff));
-}
-
-static Bool
-TIramdacLoadCursorImage(ScrnInfoPtr pScrn, unsigned char *src)
-{
-    RamDacRecPtr ramdacPtr = RAMDACSCRPTR(pScrn);
-    int i = 1024;
-
-    /* reset A9,A8 */
-    (*ramdacPtr->WriteDAC) (pScrn, TIDAC_ind_curs_ctrl, 0, 0x00);
-    /* reset cursor RAM load address A7..A0 */
-    (*ramdacPtr->WriteDAC) (pScrn, TIDAC_INDEX, 0x00, 0x00);
-
-    while (i--) {
-        /* NOT_DONE: might need a delay here */
-        (*ramdacPtr->WriteDAC) (pScrn, TIDAC_CURS_RAM_DATA, 0, *(src++));
-    }
-    return TRUE;
-}
-
-static Bool
-TIramdacUseHWCursor(ScreenPtr pScr, CursorPtr pCurs)
-{
-    return TRUE;
-}
-
-void
-TIramdacHWCursorInit(xf86CursorInfoPtr infoPtr)
-{
-    infoPtr->MaxWidth = 64;
-    infoPtr->MaxHeight = 64;
-    infoPtr->Flags = HARDWARE_CURSOR_BIT_ORDER_MSBFIRST |
-        HARDWARE_CURSOR_TRUECOLOR_AT_8BPP |
-        HARDWARE_CURSOR_SOURCE_MASK_NOT_INTERLEAVED;
-    infoPtr->SetCursorColors = TIramdacSetCursorColors;
-    infoPtr->SetCursorPosition = TIramdacSetCursorPosition;
-    infoPtr->LoadCursorImageCheck = TIramdacLoadCursorImage;
-    infoPtr->HideCursor = TIramdacHideCursor;
-    infoPtr->ShowCursor = TIramdacShowCursor;
-    infoPtr->UseHWCursor = TIramdacUseHWCursor;
-}
-
-void
-TIramdacLoadPalette(ScrnInfoPtr pScrn,
-                    int numColors,
-                    int *indices, LOCO * colors, VisualPtr pVisual)
-{
-    RamDacRecPtr hwp = RAMDACSCRPTR(pScrn);
-    int i, index, shift;
-
-    if (pScrn->depth == 16) {
-        for (i = 0; i < numColors; i++) {
-            index = indices[i];
-            (*hwp->WriteAddress) (pScrn, index << 2);
-            (*hwp->WriteData) (pScrn, colors[index >> 1].red);
-            (*hwp->WriteData) (pScrn, colors[index].green);
-            (*hwp->WriteData) (pScrn, colors[index >> 1].blue);
-
-            if (index <= 31) {
-                (*hwp->WriteAddress) (pScrn, index << 3);
-                (*hwp->WriteData) (pScrn, colors[index].red);
-                (*hwp->WriteData) (pScrn, colors[(index << 1) + 1].green);
-                (*hwp->WriteData) (pScrn, colors[index].blue);
-            }
-        }
-    }
-    else {
-        shift = (pScrn->depth == 15) ? 3 : 0;
-
-        for (i = 0; i < numColors; i++) {
-            index = indices[i];
-            (*hwp->WriteAddress) (pScrn, index << shift);
-            (*hwp->WriteData) (pScrn, colors[index].red);
-            (*hwp->WriteData) (pScrn, colors[index].green);
-            (*hwp->WriteData) (pScrn, colors[index].blue);
-        }
-    }
-}
-
-TIramdacLoadPaletteProc *
-TIramdacLoadPaletteWeak(void)
-{
-    return TIramdacLoadPalette;
-}
diff --git a/hw/xfree86/ramdac/TI.h b/hw/xfree86/ramdac/TI.h
deleted file mode 100644
index 3969ee7..0000000
--- a/hw/xfree86/ramdac/TI.h
+++ /dev/null
@@ -1,106 +0,0 @@
-
-#include <xf86RamDac.h>
-
-extern _X_EXPORT unsigned long TIramdacCalculateMNPForClock(unsigned long
-                                                            RefClock,
-                                                            unsigned long
-                                                            ReqClock,
-                                                            char IsPixClock,
-                                                            unsigned long
-                                                            MinClock,
-                                                            unsigned long
-                                                            MaxClock,
-                                                            unsigned long *rM,
-                                                            unsigned long *rN,
-                                                            unsigned long *rP);
-extern _X_EXPORT RamDacHelperRecPtr TIramdacProbe(ScrnInfoPtr pScrn,
-                                                  RamDacSupportedInfoRecPtr
-                                                  ramdacs);
-extern _X_EXPORT void TIramdacSave(ScrnInfoPtr pScrn, RamDacRecPtr RamDacRec,
-                                   RamDacRegRecPtr RamDacRegRec);
-extern _X_EXPORT void TIramdacRestore(ScrnInfoPtr pScrn, RamDacRecPtr RamDacRec,
-                                      RamDacRegRecPtr RamDacRegRec);
-extern _X_EXPORT void TIramdac3026SetBpp(ScrnInfoPtr pScrn,
-                                         RamDacRegRecPtr RamDacRegRec);
-extern _X_EXPORT void TIramdac3030SetBpp(ScrnInfoPtr pScrn,
-                                         RamDacRegRecPtr RamDacRegRec);
-extern _X_EXPORT void TIramdacHWCursorInit(xf86CursorInfoPtr infoPtr);
-extern _X_EXPORT void TIramdacLoadPalette(ScrnInfoPtr pScrn, int numColors,
-                                          int *indices, LOCO * colors,
-                                          VisualPtr pVisual);
-
-typedef void TIramdacLoadPaletteProc(ScrnInfoPtr, int, int *, LOCO *,
-                                     VisualPtr);
-extern _X_EXPORT TIramdacLoadPaletteProc *TIramdacLoadPaletteWeak(void);
-
-#define TI3030_RAMDAC		(VENDOR_TI << 16) | 0x00
-#define TI3026_RAMDAC		(VENDOR_TI << 16) | 0x01
-
-/*
- * TI Ramdac registers
- */
-
-#define TIDAC_rev		0x01
-#define TIDAC_ind_curs_ctrl	0x06
-#define TIDAC_byte_router_ctrl	0x07
-#define TIDAC_latch_ctrl	0x0f
-#define TIDAC_true_color_ctrl	0x18
-#define TIDAC_multiplex_ctrl	0x19
-#define TIDAC_clock_select	0x1a
-#define TIDAC_palette_page	0x1c
-#define TIDAC_general_ctrl	0x1d
-#define TIDAC_misc_ctrl		0x1e
-#define TIDAC_pll_addr		0x2c
-#define TIDAC_pll_pixel_data	0x2d
-#define TIDAC_pll_memory_data	0x2e
-#define TIDAC_pll_loop_data	0x2f
-#define TIDAC_key_over_low	0x30
-#define TIDAC_key_over_high	0x31
-#define TIDAC_key_red_low	0x32
-#define TIDAC_key_red_high	0x33
-#define TIDAC_key_green_low	0x34
-#define TIDAC_key_green_high	0x35
-#define TIDAC_key_blue_low	0x36
-#define TIDAC_key_blue_high	0x37
-#define TIDAC_key_ctrl		0x38
-#define TIDAC_clock_ctrl	0x39
-#define TIDAC_sense_test	0x3a
-#define TIDAC_test_mode_data	0x3b
-#define TIDAC_crc_remain_lsb	0x3c
-#define TIDAC_crc_remain_msb	0x3d
-#define TIDAC_crc_bit_select	0x3e
-#define TIDAC_id		0x3f
-
-/* These are pll values that are accessed via TIDAC_pll_pixel_data */
-#define TIDAC_PIXEL_N		0x80
-#define TIDAC_PIXEL_M		0x81
-#define TIDAC_PIXEL_P		0x82
-#define TIDAC_PIXEL_VALID	0x83
-
-/* These are pll values that are accessed via TIDAC_pll_loop_data */
-#define TIDAC_LOOP_N		0x90
-#define TIDAC_LOOP_M		0x91
-#define TIDAC_LOOP_P		0x92
-#define TIDAC_LOOP_VALID	0x93
-
-/* Direct mapping addresses */
-#define TIDAC_INDEX		0xa0
-#define TIDAC_PALETTE_DATA	0xa1
-#define TIDAC_READ_MASK		0xa2
-#define TIDAC_READ_ADDR		0xa3
-#define TIDAC_CURS_WRITE_ADDR	0xa4
-#define TIDAC_CURS_COLOR	0xa5
-#define TIDAC_CURS_READ_ADDR	0xa7
-#define TIDAC_CURS_CTL		0xa9
-#define TIDAC_INDEXED_DATA	0xaa
-#define TIDAC_CURS_RAM_DATA	0xab
-#define TIDAC_CURS_XLOW		0xac
-#define TIDAC_CURS_XHIGH	0xad
-#define TIDAC_CURS_YLOW		0xae
-#define TIDAC_CURS_YHIGH	0xaf
-
-#define TIDAC_sw_reset		0xff
-
-/* Constants */
-#define TIDAC_TVP_3026_ID       0x26
-#define TIDAC_TVP_3030_ID       0x30
diff --git a/hw/xfree86/ramdac/TIPriv.h b/hw/xfree86/ramdac/TIPriv.h
deleted file mode 100644
index ece0348..0000000
--- a/hw/xfree86/ramdac/TIPriv.h
+++ /dev/null
@@ -1,29 +0,0 @@
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include "TI.h"
-
-typedef struct {
-    const char *DeviceName;
-} xf86TIramdacInfo;
-
-extern xf86TIramdacInfo TIramdacDeviceInfo[];
-
-#ifdef INIT_TI_RAMDAC_INFO
-xf86TIramdacInfo TIramdacDeviceInfo[] = {
-    {"TI TVP3030"},
-    {"TI TVP3026"}
-};
-#endif
-
-#define TISAVE(_reg) do { 						\
-    ramdacReg->DacRegs[_reg] = (*ramdacPtr->ReadDAC)(pScrn, _reg);	\
-} while (0)
-
-#define TIRESTORE(_reg) do { 						\
-    (*ramdacPtr->WriteDAC)(pScrn, _reg, 				\
-	(ramdacReg->DacRegs[_reg] & 0xFF00) >> 8, 			\
-	ramdacReg->DacRegs[_reg]);					\
-} while (0)
diff --git a/hw/xfree86/ramdac/meson.build b/hw/xfree86/ramdac/meson.build
index babf2b8..0a2bb4b 100644
--- a/hw/xfree86/ramdac/meson.build
+++ b/hw/xfree86/ramdac/meson.build
@@ -1,11 +1,6 @@
 srcs_xorg_ramdac = [
-    'xf86RamDac.c',
-    'xf86RamDacCmap.c',
     'xf86CursorRD.c',
     'xf86HWCurs.c',
-    'IBM.c',
-    'BT.c',
-    'TI.c',
 ]
 
 xorg_ramdac = static_library('xorg_ramdac',
@@ -17,11 +12,7 @@ xorg_ramdac = static_library('xorg_ramdac',
 
 install_data(
     [
-        'BT.h',
-        'IBM.h',
-        'TI.h',
         'xf86Cursor.h',
-        'xf86RamDac.h',
     ],
     install_dir: xorgsdkdir,
 )
diff --git a/hw/xfree86/ramdac/xf86CursorRD.c b/hw/xfree86/ramdac/xf86CursorRD.c
index 02dab36..c8362d1 100644
--- a/hw/xfree86/ramdac/xf86CursorRD.c
+++ b/hw/xfree86/ramdac/xf86CursorRD.c
@@ -464,8 +464,8 @@ xf86CurrentCursor(ScreenPtr pScreen)
 {
     xf86CursorScreenPtr ScreenPriv;
 
-    if (pScreen->is_output_slave)
-        pScreen = pScreen->current_master;
+    if (pScreen->is_output_secondary)
+        pScreen = pScreen->current_primary;
 
     ScreenPriv = dixLookupPrivate(&pScreen->devPrivates, xf86CursorScreenKey);
     return ScreenPriv->CurrentCursor;
diff --git a/hw/xfree86/ramdac/xf86HWCurs.c b/hw/xfree86/ramdac/xf86HWCurs.c
index 366837c..ddba5e6 100644
--- a/hw/xfree86/ramdac/xf86HWCurs.c
+++ b/hw/xfree86/ramdac/xf86HWCurs.c
@@ -150,7 +150,7 @@ xf86CheckHWCursor(ScreenPtr pScreen, CursorPtr cursor, xf86CursorInfoPtr infoPtr
     }
 
     /* ask each driver consuming a pixmap if it can support HW cursor */
-    xorg_list_for_each_entry(pSlave, &pScreen->slave_list, slave_head) {
+    xorg_list_for_each_entry(pSlave, &pScreen->secondary_list, secondary_head) {
         xf86CursorScreenPtr sPriv;
 
         if (!RRHasScanoutPixmap(pSlave))
@@ -162,7 +162,7 @@ xf86CheckHWCursor(ScreenPtr pScreen, CursorPtr cursor, xf86CursorInfoPtr infoPtr
 	    break;
 	}
 
-        /* FALSE if HWCursor not supported by slave */
+        /* FALSE if HWCursor not supported by secondary */
         if (!xf86ScreenCheckHWCursor(pSlave, cursor, sPriv->CursorInfoPtr)) {
             use_hw_cursor = FALSE;
 	    break;
@@ -252,14 +252,14 @@ xf86SetCursor(ScreenPtr pScreen, CursorPtr pCurs, int x, int y)
     if (!xf86ScreenSetCursor(pScreen, pCurs, x, y))
         goto out;
 
-    /* ask each slave driver to set the cursor. */
-    xorg_list_for_each_entry(pSlave, &pScreen->slave_list, slave_head) {
+    /* ask each secondary driver to set the cursor. */
+    xorg_list_for_each_entry(pSlave, &pScreen->secondary_list, secondary_head) {
         if (!RRHasScanoutPixmap(pSlave))
             continue;
 
         if (!xf86ScreenSetCursor(pSlave, pCurs, x, y)) {
             /*
-             * hide the master (and successfully set slave) cursors,
+             * hide the primary (and successfully set secondary) cursors,
              * otherwise both the hw and sw cursor will show.
              */
             xf86SetCursor(pScreen, NullCursor, x, y);
@@ -328,8 +328,8 @@ xf86MoveCursor(ScreenPtr pScreen, int x, int y)
 
     xf86ScreenMoveCursor(pScreen, x, y);
 
-    /* ask each slave driver to move the cursor */
-    xorg_list_for_each_entry(pSlave, &pScreen->slave_list, slave_head) {
+    /* ask each secondary driver to move the cursor */
+    xorg_list_for_each_entry(pSlave, &pScreen->secondary_list, secondary_head) {
         if (!RRHasScanoutPixmap(pSlave))
             continue;
 
diff --git a/hw/xfree86/ramdac/xf86RamDac.c b/hw/xfree86/ramdac/xf86RamDac.c
deleted file mode 100644
index a671649..0000000
--- a/hw/xfree86/ramdac/xf86RamDac.c
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * Copyright 1998 by Alan Hourihane, Wigan, England.
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of Alan Hourihane not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission.  Alan Hourihane makes no representations
- * about the suitability of this software for any purpose.  It is provided
- * "as is" without express or implied warranty.
- *
- * ALAN HOURIHANE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL ALAN HOURIHANE BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- *
- * Authors:  Alan Hourihane, <alanh@fairlite.demon.co.uk>
- *
- * Generic RAMDAC access routines.
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include "xf86.h"
-#include "xf86_OSproc.h"
-
-#include "xf86RamDacPriv.h"
-
-int RamDacHWPrivateIndex = -1;
-int RamDacScreenPrivateIndex = -1;
-
-RamDacRecPtr
-RamDacCreateInfoRec(void)
-{
-    RamDacRecPtr infoRec;
-
-    infoRec = calloc(1, sizeof(RamDacRec));
-
-    return infoRec;
-}
-
-RamDacHelperRecPtr
-RamDacHelperCreateInfoRec(void)
-{
-    RamDacHelperRecPtr infoRec;
-
-    infoRec = calloc(1, sizeof(RamDacHelperRec));
-
-    return infoRec;
-}
-
-void
-RamDacDestroyInfoRec(RamDacRecPtr infoRec)
-{
-    free(infoRec);
-}
-
-void
-RamDacHelperDestroyInfoRec(RamDacHelperRecPtr infoRec)
-{
-    free(infoRec);
-}
-
-Bool
-RamDacInit(ScrnInfoPtr pScrn, RamDacRecPtr ramdacPriv)
-{
-    RamDacScreenRecPtr ramdacScrPtr;
-
-    /*
-     * make sure the RamDacRec is allocated
-     */
-    if (!RamDacGetRec(pScrn))
-        return FALSE;
-    ramdacScrPtr =
-        ((RamDacScreenRecPtr) (pScrn)->privates[RamDacGetScreenIndex()].ptr);
-    ramdacScrPtr->RamDacRec = ramdacPriv;
-
-    return TRUE;
-}
-
-void
-RamDacGetRecPrivate(void)
-{
-    if (RamDacHWPrivateIndex < 0)
-        RamDacHWPrivateIndex = xf86AllocateScrnInfoPrivateIndex();
-    if (RamDacScreenPrivateIndex < 0)
-        RamDacScreenPrivateIndex = xf86AllocateScrnInfoPrivateIndex();
-    return;
-}
-
-Bool
-RamDacGetRec(ScrnInfoPtr scrp)
-{
-    RamDacGetRecPrivate();
-    /*
-     * New privates are always set to NULL, so we can check if the allocation
-     * has already been done.
-     */
-    if (scrp->privates[RamDacHWPrivateIndex].ptr != NULL)
-        return TRUE;
-    if (scrp->privates[RamDacScreenPrivateIndex].ptr != NULL)
-        return TRUE;
-
-    scrp->privates[RamDacHWPrivateIndex].ptr =
-        xnfcalloc(sizeof(RamDacHWRec), 1);
-    scrp->privates[RamDacScreenPrivateIndex].ptr =
-        xnfcalloc(sizeof(RamDacScreenRec), 1);
-
-    return TRUE;
-}
-
-void
-RamDacFreeRec(ScrnInfoPtr pScrn)
-{
-    RamDacHWRecPtr ramdacHWPtr;
-    RamDacScreenRecPtr ramdacScrPtr;
-
-    if (RamDacHWPrivateIndex < 0)
-        return;
-
-    if (RamDacScreenPrivateIndex < 0)
-        return;
-
-    ramdacHWPtr = RAMDACHWPTR(pScrn);
-    ramdacScrPtr = ((RamDacScreenRecPtr)
-                    (pScrn)->privates[RamDacGetScreenIndex()].ptr);
-
-    free(ramdacHWPtr);
-    ramdacHWPtr = NULL;
-
-    free(ramdacScrPtr);
-    ramdacScrPtr = NULL;
-}
-
-int
-RamDacGetHWIndex(void)
-{
-    return RamDacHWPrivateIndex;
-}
-
-int
-RamDacGetScreenIndex(void)
-{
-    return RamDacScreenPrivateIndex;
-}
diff --git a/hw/xfree86/ramdac/xf86RamDac.h b/hw/xfree86/ramdac/xf86RamDac.h
deleted file mode 100644
index af16b7f..0000000
--- a/hw/xfree86/ramdac/xf86RamDac.h
+++ /dev/null
@@ -1,88 +0,0 @@
-
-#ifndef _XF86RAMDAC_H
-#define _XF86RAMDAC_H 1
-
-#include "colormapst.h"
-#include "xf86Cursor.h"
-
-/* Define unique vendor codes for RAMDAC's */
-#define VENDOR_IBM	0x0000
-#define VENDOR_BT	0x0001
-#define VENDOR_TI	0x0002
-
-typedef struct _RamDacRegRec {
-/* This is probably the nastiest assumption, we allocate 1024 slots for
- * ramdac registers, should be enough. I've checked IBM and TVP series
- * and they seem o.k
- * Then we allocate 768 entries for the DAC too. IBM640 needs 1024 -FIXME
- */
-    unsigned short DacRegs[0x400];      /* register set */
-    unsigned char DAC[0x300];   /* colour map */
-    Bool Overlay;
-} RamDacRegRec, *RamDacRegRecPtr;
-
-typedef struct _RamDacHWRegRec {
-    RamDacRegRec SavedReg;
-    RamDacRegRec ModeReg;
-} RamDacHWRec, *RamDacHWRecPtr;
-
-typedef struct _RamDacRec {
-    CARD32 RamDacType;
-
-    void (*LoadPalette) (ScrnInfoPtr pScrn,
-                         int numColors,
-                         int *indices, LOCO * colors, VisualPtr pVisual);
-
-    unsigned char (*ReadDAC) (ScrnInfoPtr pScrn, CARD32);
-
-    void (*WriteDAC) (ScrnInfoPtr pScrn, CARD32, unsigned char, unsigned char);
-
-    void (*WriteAddress) (ScrnInfoPtr pScrn, CARD32);
-
-    void (*WriteData) (ScrnInfoPtr pScrn, unsigned char);
-
-    void (*ReadAddress) (ScrnInfoPtr pScrn, CARD32);
-
-    unsigned char (*ReadData) (ScrnInfoPtr pScrn);
-} RamDacRec, *RamDacRecPtr;
-
-typedef struct _RamDacHelperRec {
-    CARD32 RamDacType;
-
-    void (*Restore) (ScrnInfoPtr pScrn,
-                     RamDacRecPtr ramdacPtr, RamDacRegRecPtr ramdacReg);
-
-    void (*Save) (ScrnInfoPtr pScrn,
-                  RamDacRecPtr ramdacPtr, RamDacRegRecPtr ramdacReg);
-
-    void (*SetBpp) (ScrnInfoPtr pScrn, RamDacRegRecPtr ramdacReg);
-
-    void (*HWCursorInit) (xf86CursorInfoPtr infoPtr);
-} RamDacHelperRec, *RamDacHelperRecPtr;
-
-#define RAMDACHWPTR(p) ((RamDacHWRecPtr)((p)->privates[RamDacGetHWIndex()].ptr))
-
-typedef struct _RamdacScreenRec {
-    RamDacRecPtr RamDacRec;
-} RamDacScreenRec, *RamDacScreenRecPtr;
-
-#define RAMDACSCRPTR(p) ((RamDacScreenRecPtr)((p)->privates[RamDacGetScreenIndex()].ptr))->RamDacRec
-
-extern _X_EXPORT int RamDacHWPrivateIndex;
-extern _X_EXPORT int RamDacScreenPrivateIndex;
-
-typedef struct {
-    int token;
-} RamDacSupportedInfoRec, *RamDacSupportedInfoRecPtr;
-
-extern _X_EXPORT RamDacRecPtr RamDacCreateInfoRec(void);
-extern _X_EXPORT RamDacHelperRecPtr RamDacHelperCreateInfoRec(void);
-extern _X_EXPORT void RamDacDestroyInfoRec(RamDacRecPtr RamDacRec);
-extern _X_EXPORT void RamDacHelperDestroyInfoRec(RamDacHelperRecPtr RamDacRec);
-extern _X_EXPORT Bool RamDacInit(ScrnInfoPtr pScrn, RamDacRecPtr RamDacRec);
-extern _X_EXPORT Bool RamDacHandleColormaps(ScreenPtr pScreen, int maxColors,
-                                            int sigRGBbits, unsigned int flags);
-extern _X_EXPORT void RamDacFreeRec(ScrnInfoPtr pScrn);
-extern _X_EXPORT int RamDacGetHWIndex(void);
-
-#endif                          /* _XF86RAMDAC_H */
diff --git a/hw/xfree86/ramdac/xf86RamDacCmap.c b/hw/xfree86/ramdac/xf86RamDacCmap.c
deleted file mode 100644
index 2a0f755..0000000
--- a/hw/xfree86/ramdac/xf86RamDacCmap.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright 1998 by Alan Hourihane, Wigan, England.
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of Alan Hourihane not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission.  Alan Hourihane makes no representations
- * about the suitability of this software for any purpose.  It is provided
- * "as is" without express or implied warranty.
- *
- * ALAN HOURIHANE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL ALAN HOURIHANE BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- *
- * Authors:  Alan Hourihane, <alanh@fairlite.demon.co.uk>
- *
- * Generic RAMDAC access to colormaps.
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <X11/X.h>
-#include <X11/Xproto.h>
-#include "windowstr.h"
-#include "mipointer.h"
-#include "micmap.h"
-
-#include "xf86.h"
-#include "colormapst.h"
-#include "xf86RamDacPriv.h"
-
-void
-RamDacLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices, LOCO * colors,
-                  VisualPtr pVisual)
-{
-    RamDacRecPtr hwp = RAMDACSCRPTR(pScrn);
-    int i, index;
-
-    for (i = 0; i < numColors; i++) {
-        index = indices[i];
-        (*hwp->WriteAddress) (pScrn, index);
-        (*hwp->WriteData) (pScrn, colors[index].red);
-        (*hwp->WriteData) (pScrn, colors[index].green);
-        (*hwp->WriteData) (pScrn, colors[index].blue);
-    }
-}
-
-Bool
-RamDacHandleColormaps(ScreenPtr pScreen, int maxColors, int sigRGBbits,
-                      unsigned int flags)
-{
-    ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
-    RamDacRecPtr hwp = RAMDACSCRPTR(pScrn);
-
-    if (hwp->LoadPalette == NULL)
-        return xf86HandleColormaps(pScreen, maxColors, sigRGBbits,
-                                   RamDacLoadPalette, NULL, flags);
-    else
-        return xf86HandleColormaps(pScreen, maxColors, sigRGBbits,
-                                   hwp->LoadPalette, NULL, flags);
-}
diff --git a/hw/xfree86/ramdac/xf86RamDacPriv.h b/hw/xfree86/ramdac/xf86RamDacPriv.h
deleted file mode 100644
index ae1c665..0000000
--- a/hw/xfree86/ramdac/xf86RamDacPriv.h
+++ /dev/null
@@ -1,13 +0,0 @@
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include "xf86RamDac.h"
-#include "xf86cmap.h"
-
-void RamDacGetRecPrivate(void);
-Bool RamDacGetRec(ScrnInfoPtr pScrn);
-int RamDacGetScreenIndex(void);
-void RamDacLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices,
-                       LOCO * colors, VisualPtr pVisual);
diff --git a/hw/xfree86/sdksyms.sh b/hw/xfree86/sdksyms.sh
index 7897aae..5fd5b5c 100755
--- a/hw/xfree86/sdksyms.sh
+++ b/hw/xfree86/sdksyms.sh
@@ -21,13 +21,13 @@ cat > sdksyms.c << EOF
 #include "picturestr.h"
 
 
-/* fb/Makefile.am -- module */
-/*
+/* fb/Makefile.am */
 #include "fb.h"
 #include "fbrop.h"
 #include "fboverlay.h"
-#include "wfbrename.h"
 #include "fbpict.h"
+/* wfb is still a module
+#include "wfbrename.h"
  */
 
 
@@ -71,6 +71,8 @@ cat > sdksyms.c << EOF
 /* hw/xfree86/int10/Makefile.am -- module */
 /*
 #include "xf86int10.h"
+#include "vbe.h"
+#include "vbeModes.h"
  */
 
 
@@ -121,7 +123,6 @@ cat > sdksyms.c << EOF
 
 /* hw/xfree86/common/Makefile.am */
 #include "compiler.h"
-#include "fourcc.h"
 #include "xf86.h"
 #include "xf86Module.h"
 #include "xf86Opt.h"
@@ -147,11 +148,7 @@ cat > sdksyms.c << EOF
 
 
 /* hw/xfree86/ramdac/Makefile.am */
-#include "BT.h"
-#include "IBM.h"
-#include "TI.h"
 #include "xf86Cursor.h"
-#include "xf86RamDac.h"
 
 
 /* hw/xfree86/shadowfb/Makefile.am -- module */
@@ -185,13 +182,6 @@ cat > sdksyms.c << EOF
 #include "xf86Optrec.h"
 
 
-/* hw/xfree86/vbe/Makefile.am -- module */
-/*
-#include "vbe.h"
-#include "vbeModes.h"
- */
-
-
 /* hw/xfree86/dri/Makefile.am -- module */
 #ifdef XF86DRI
 # include "dri.h"
@@ -260,6 +250,7 @@ cat > sdksyms.c << EOF
 #include "exevents.h"
 #include "extension.h"
 #include "extnsionst.h"
+#include "fourcc.h"
 #include "gc.h"
 #include "gcstruct.h"
 #include "globals.h"
@@ -287,7 +278,6 @@ cat > sdksyms.c << EOF
 #include "scrnintstr.h"
 #include "selection.h"
 #include "servermd.h"
-#include "site.h"
 #include "validate.h"
 #include "window.h"
 #include "windowstr.h"
@@ -306,13 +296,16 @@ LC_ALL=C
 export LC_ALL
 ${CPP:-cpp} "$@" sdksyms.c > /dev/null || exit $?
 ${CPP:-cpp} "$@" sdksyms.c | ${AWK:-awk} -v topdir=$topdir '
+function basename(file) {
+    sub(".*/", "", file)
+    return file
+}
 BEGIN {
     sdk = 0;
     print("/*");
     print(" * These symbols are referenced to ensure they");
     print(" * will be available in the X Server binary.");
     print(" */");
-    printf("/* topdir=%s */\n", topdir);
     print("_X_HIDDEN void *xorg_symbols[] = {");
 
     printf("sdksyms.c:") > "sdksyms.dep";
@@ -341,7 +334,7 @@ BEGIN {
 	# remove quotes
 	gsub(/"/, "", $3);
 	line = $2;
-	header = $3;
+	header = basename($3);
 	if (! headers[$3]) {
 	    printf(" \\\n  %s", $3) >> "sdksyms.dep";
 	    headers[$3] = 1;
diff --git a/hw/xfree86/shadowfb/Makefile.in b/hw/xfree86/shadowfb/Makefile.in
index 9479d6d..fb08dd8 100644
--- a/hw/xfree86/shadowfb/Makefile.in
+++ b/hw/xfree86/shadowfb/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -106,7 +106,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -212,8 +211,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
@@ -233,8 +230,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -248,6 +243,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -266,14 +263,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -290,8 +279,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -347,6 +338,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -399,7 +392,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -423,29 +415,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -483,8 +459,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -495,14 +469,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -768,7 +736,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/hw/xfree86/utils/Makefile.am b/hw/xfree86/utils/Makefile.am
index 71f9790..ce83bc3 100644
--- a/hw/xfree86/utils/Makefile.am
+++ b/hw/xfree86/utils/Makefile.am
@@ -1,4 +1,3 @@
 SUBDIRS = \
 	gtf \
-	cvt \
 	man
diff --git a/hw/xfree86/utils/Makefile.in b/hw/xfree86/utils/Makefile.in
index af6bcbe..2d5fab7 100644
--- a/hw/xfree86/utils/Makefile.in
+++ b/hw/xfree86/utils/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -104,7 +104,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -160,8 +159,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 DIST_SUBDIRS = $(SUBDIRS)
 am__DIST_COMMON = $(srcdir)/Makefile.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -207,8 +204,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -222,6 +217,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -240,14 +237,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -264,8 +253,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -321,6 +312,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -373,7 +366,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -397,29 +389,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -457,8 +433,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -469,14 +443,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -551,7 +519,6 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 SUBDIRS = \
 	gtf \
-	cvt \
 	man
 
 all: all-recursive
@@ -691,7 +658,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/hw/xfree86/utils/cvt/Makefile.am b/hw/xfree86/utils/cvt/Makefile.am
deleted file mode 100644
index 26abeb4..0000000
--- a/hw/xfree86/utils/cvt/Makefile.am
+++ /dev/null
@@ -1,35 +0,0 @@
-# Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice (including the next
-# paragraph) shall be included in all copies or substantial portions of the
-# Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-# DEALINGS IN THE SOFTWARE.
-# 
-
-bin_PROGRAMS = cvt
-
-AM_CPPFLAGS = $(XORG_INCS) \
-	   -I$(top_srcdir)/hw/xfree86/ddc \
-	   -I$(top_srcdir)/hw/xfree86/modes \
-	   -I$(top_srcdir)/hw/xfree86/parser
-
-# gah
-cvt_SOURCES = cvt.c \
-	$(top_srcdir)/hw/xfree86/modes/xf86cvt.c \
-	$(top_srcdir)/os/xprintf.c
-
-cvt_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS)
diff --git a/hw/xfree86/utils/cvt/Makefile.in b/hw/xfree86/utils/cvt/Makefile.in
deleted file mode 100644
index 4f49945..0000000
--- a/hw/xfree86/utils/cvt/Makefile.in
+++ /dev/null
@@ -1,972 +0,0 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
-
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-# Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice (including the next
-# paragraph) shall be included in all copies or substantial portions of the
-# Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-# DEALINGS IN THE SOFTWARE.
-# 
-
-VPATH = @srcdir@
-am__is_gnu_make = { \
-  if test -z '$(MAKELEVEL)'; then \
-    false; \
-  elif test -n '$(MAKE_HOST)'; then \
-    true; \
-  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
-    true; \
-  else \
-    false; \
-  fi; \
-}
-am__make_running_with_option = \
-  case $${target_option-} in \
-      ?) ;; \
-      *) echo "am__make_running_with_option: internal error: invalid" \
-              "target option '$${target_option-}' specified" >&2; \
-         exit 1;; \
-  esac; \
-  has_opt=no; \
-  sane_makeflags=$$MAKEFLAGS; \
-  if $(am__is_gnu_make); then \
-    sane_makeflags=$$MFLAGS; \
-  else \
-    case $$MAKEFLAGS in \
-      *\\[\ \	]*) \
-        bs=\\; \
-        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
-          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
-    esac; \
-  fi; \
-  skip_next=no; \
-  strip_trailopt () \
-  { \
-    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
-  }; \
-  for flg in $$sane_makeflags; do \
-    test $$skip_next = yes && { skip_next=no; continue; }; \
-    case $$flg in \
-      *=*|--*) continue;; \
-        -*I) strip_trailopt 'I'; skip_next=yes;; \
-      -*I?*) strip_trailopt 'I';; \
-        -*O) strip_trailopt 'O'; skip_next=yes;; \
-      -*O?*) strip_trailopt 'O';; \
-        -*l) strip_trailopt 'l'; skip_next=yes;; \
-      -*l?*) strip_trailopt 'l';; \
-      -[dEDm]) skip_next=yes;; \
-      -[JT]) skip_next=yes;; \
-    esac; \
-    case $$flg in \
-      *$$target_option*) has_opt=yes; break;; \
-    esac; \
-  done; \
-  test $$has_opt = yes
-am__make_dryrun = (target_option=n; $(am__make_running_with_option))
-am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-bin_PROGRAMS = cvt$(EXEEXT)
-subdir = hw/xfree86/utils/cvt
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \
-	$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \
-	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
-	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
-	$(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-	$(ACLOCAL_M4)
-DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
-	$(top_builddir)/include/xorg-server.h \
-	$(top_builddir)/include/dix-config.h \
-	$(top_builddir)/include/xorg-config.h \
-	$(top_builddir)/include/xkb-config.h \
-	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
-	$(top_builddir)/include/version-config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-am__installdirs = "$(DESTDIR)$(bindir)"
-PROGRAMS = $(bin_PROGRAMS)
-am_cvt_OBJECTS = cvt-cvt.$(OBJEXT) cvt-xf86cvt.$(OBJEXT) \
-	cvt-xprintf.$(OBJEXT)
-cvt_OBJECTS = $(am_cvt_OBJECTS)
-cvt_LDADD = $(LDADD)
-AM_V_lt = $(am__v_lt_@AM_V@)
-am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
-am__v_lt_0 = --silent
-am__v_lt_1 = 
-cvt_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(cvt_CFLAGS) $(CFLAGS) \
-	$(AM_LDFLAGS) $(LDFLAGS) -o $@
-AM_V_P = $(am__v_P_@AM_V@)
-am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
-am__v_P_0 = false
-am__v_P_1 = :
-AM_V_GEN = $(am__v_GEN_@AM_V@)
-am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo "  GEN     " $@;
-am__v_GEN_1 = 
-AM_V_at = $(am__v_at_@AM_V@)
-am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
-am__v_at_0 = @
-am__v_at_1 = 
-DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__maybe_remake_depfiles = depfiles
-am__depfiles_remade = ./$(DEPDIR)/cvt-cvt.Po \
-	./$(DEPDIR)/cvt-xf86cvt.Po ./$(DEPDIR)/cvt-xprintf.Po
-am__mv = mv -f
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
-	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
-	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-	$(AM_CFLAGS) $(CFLAGS)
-AM_V_CC = $(am__v_CC_@AM_V@)
-am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
-am__v_CC_0 = @echo "  CC      " $@;
-am__v_CC_1 = 
-CCLD = $(CC)
-LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-	$(AM_LDFLAGS) $(LDFLAGS) -o $@
-AM_V_CCLD = $(am__v_CCLD_@AM_V@)
-am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
-am__v_CCLD_0 = @echo "  CCLD    " $@;
-am__v_CCLD_1 = 
-SOURCES = $(cvt_SOURCES)
-DIST_SOURCES = $(cvt_SOURCES)
-am__can_run_installinfo = \
-  case $$AM_UPDATE_INFO_DIR in \
-    n|no|NO) false;; \
-    *) (install-info --version) >/dev/null 2>&1;; \
-  esac
-am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
-# Read a list of newline-separated strings from the standard input,
-# and print each of them once, without duplicates.  Input order is
-# *not* preserved.
-am__uniquify_input = $(AWK) '\
-  BEGIN { nonempty = 0; } \
-  { items[$$0] = 1; nonempty = 1; } \
-  END { if (nonempty) { for (i in items) print i; }; } \
-'
-# Make sure the list of sources is unique.  This is necessary because,
-# e.g., the same source file might be shared among _SOURCES variables
-# for different programs/libraries.
-am__define_uniq_tagged_files = \
-  list='$(am__tagged_files)'; \
-  unique=`for i in $$list; do \
-    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-  done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
-am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
-ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
-AMTAR = @AMTAR@
-AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
-APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@
-APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@
-APP_MAN_DIR = @APP_MAN_DIR@
-APP_MAN_SUFFIX = @APP_MAN_SUFFIX@
-AR = @AR@
-AS = @AS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-BASE_CFLAGS = @BASE_CFLAGS@
-BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
-BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
-BUNDLE_VERSION = @BUNDLE_VERSION@
-BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
-CC = @CC@
-CCAS = @CCAS@
-CCASDEPMODE = @CCASDEPMODE@
-CCASFLAGS = @CCASFLAGS@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CHANGELOG_CMD = @CHANGELOG_CMD@
-COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CWARNFLAGS = @CWARNFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DBUS_CFLAGS = @DBUS_CFLAGS@
-DBUS_LIBS = @DBUS_LIBS@
-DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@
-DEFAULT_LOGDIR = @DEFAULT_LOGDIR@
-DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@
-DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@
-DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@
-DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DGA_CFLAGS = @DGA_CFLAGS@
-DGA_LIBS = @DGA_LIBS@
-DIX_CFLAGS = @DIX_CFLAGS@
-DIX_LIB = @DIX_LIB@
-DLLTOOL = @DLLTOOL@
-DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
-DOT = @DOT@
-DOXYGEN = @DOXYGEN@
-DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
-DRI2PROTO_LIBS = @DRI2PROTO_LIBS@
-DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@
-DRI3PROTO_LIBS = @DRI3PROTO_LIBS@
-DRIVER_MAN_DIR = @DRIVER_MAN_DIR@
-DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
-DRI_DRIVER_PATH = @DRI_DRIVER_PATH@
-DSYMUTIL = @DSYMUTIL@
-DTRACE = @DTRACE@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-FILE_MAN_DIR = @FILE_MAN_DIR@
-FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
-FONT100DPIDIR = @FONT100DPIDIR@
-FONT75DPIDIR = @FONT75DPIDIR@
-FONTMISCDIR = @FONTMISCDIR@
-FONTOTFDIR = @FONTOTFDIR@
-FONTROOTDIR = @FONTROOTDIR@
-FONTTTFDIR = @FONTTTFDIR@
-FONTTYPE1DIR = @FONTTYPE1DIR@
-FOP = @FOP@
-GBM_CFLAGS = @GBM_CFLAGS@
-GBM_LIBS = @GBM_LIBS@
-GLAMOR_CFLAGS = @GLAMOR_CFLAGS@
-GLAMOR_LIBS = @GLAMOR_LIBS@
-GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@
-GLX_DEFINES = @GLX_DEFINES@
-GLX_SYS_LIBS = @GLX_SYS_LIBS@
-GL_CFLAGS = @GL_CFLAGS@
-GL_LIBS = @GL_LIBS@
-GREP = @GREP@
-HAL_CFLAGS = @HAL_CFLAGS@
-HAL_LIBS = @HAL_LIBS@
-HAVE_DOT = @HAVE_DOT@
-INSTALL = @INSTALL@
-INSTALL_CMD = @INSTALL_CMD@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-KDRIVE_CFLAGS = @KDRIVE_CFLAGS@
-KDRIVE_INCS = @KDRIVE_INCS@
-KDRIVE_LIBS = @KDRIVE_LIBS@
-KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@
-KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@
-KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@
-KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@
-KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@
-KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@
-KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@
-LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@
-LEX = @LEX@
-LEXLIB = @LEXLIB@
-LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
-LIBDRM_CFLAGS = @LIBDRM_CFLAGS@
-LIBDRM_LIBS = @LIBDRM_LIBS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@
-LIBSHA1_LIBS = @LIBSHA1_LIBS@
-LIBTOOL = @LIBTOOL@
-LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
-LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
-LIB_MAN_DIR = @LIB_MAN_DIR@
-LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
-MAIN_LIB = @MAIN_LIB@
-MAKEINFO = @MAKEINFO@
-MANIFEST_TOOL = @MANIFEST_TOOL@
-MAN_SUBSTS = @MAN_SUBSTS@
-MISC_MAN_DIR = @MISC_MAN_DIR@
-MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
-MKDIR_P = @MKDIR_P@
-NM = @NM@
-NMEDIT = @NMEDIT@
-OBJC = @OBJC@
-OBJCCLD = @OBJCCLD@
-OBJCDEPMODE = @OBJCDEPMODE@
-OBJCFLAGS = @OBJCFLAGS@
-OBJCLINK = @OBJCLINK@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
-OPENSSL_LIBS = @OPENSSL_LIBS@
-OS_LIB = @OS_LIB@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@
-PCIACCESS_LIBS = @PCIACCESS_LIBS@
-PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@
-PIXMAN_CFLAGS = @PIXMAN_CFLAGS@
-PIXMAN_LIBS = @PIXMAN_LIBS@
-PKG_CONFIG = @PKG_CONFIG@
-PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
-PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
-PROJECTROOT = @PROJECTROOT@
-PTHREAD_CC = @PTHREAD_CC@
-PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
-PTHREAD_LIBS = @PTHREAD_LIBS@
-PYTHON3 = @PYTHON3@
-RANLIB = @RANLIB@
-RAWCPP = @RAWCPP@
-RAWCPPFLAGS = @RAWCPPFLAGS@
-RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
-SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
-SED = @SED@
-SELINUX_CFLAGS = @SELINUX_CFLAGS@
-SELINUX_LIBS = @SELINUX_LIBS@
-SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@
-SET_MAKE = @SET_MAKE@
-SHA1_CFLAGS = @SHA1_CFLAGS@
-SHA1_LIBS = @SHA1_LIBS@
-SHELL = @SHELL@
-SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@
-STRICT_CFLAGS = @STRICT_CFLAGS@
-STRIP = @STRIP@
-STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@
-SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@
-SYSCONFDIR = @SYSCONFDIR@
-SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@
-SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@
-TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@
-UDEV_CFLAGS = @UDEV_CFLAGS@
-UDEV_LIBS = @UDEV_LIBS@
-UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
-VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
-VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
-WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
-WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
-WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
-XCONFIGDIR = @XCONFIGDIR@
-XCONFIGFILE = @XCONFIGFILE@
-XDMCP_CFLAGS = @XDMCP_CFLAGS@
-XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
-XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
-XEPHYR_INCS = @XEPHYR_INCS@
-XEPHYR_LIBS = @XEPHYR_LIBS@
-XF86CONFIGDIR = @XF86CONFIGDIR@
-XF86CONFIGFILE = @XF86CONFIGFILE@
-XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@
-XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@
-XKB_COMPILED_DIR = @XKB_COMPILED_DIR@
-XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@
-XKB_DFLT_MODEL = @XKB_DFLT_MODEL@
-XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@
-XKB_DFLT_RULES = @XKB_DFLT_RULES@
-XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@
-XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@
-XLIB_CFLAGS = @XLIB_CFLAGS@
-XLIB_LIBS = @XLIB_LIBS@
-XMLTO = @XMLTO@
-XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@
-XNESTMODULES_LIBS = @XNESTMODULES_LIBS@
-XNEST_LIBS = @XNEST_LIBS@
-XNEST_SYS_LIBS = @XNEST_SYS_LIBS@
-XORG_CFLAGS = @XORG_CFLAGS@
-XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@
-XORG_INCS = @XORG_INCS@
-XORG_LIBS = @XORG_LIBS@
-XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@
-XORG_MAN_PAGE = @XORG_MAN_PAGE@
-XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@
-XORG_MODULES_LIBS = @XORG_MODULES_LIBS@
-XORG_OS_SUBDIR = @XORG_OS_SUBDIR@
-XORG_SGML_PATH = @XORG_SGML_PATH@
-XORG_SYS_LIBS = @XORG_SYS_LIBS@
-XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@
-XPBPROXY_LIBS = @XPBPROXY_LIBS@
-XQUARTZ_LIBS = @XQUARTZ_LIBS@
-XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
-XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
-XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
-XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
-XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
-XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@
-XSERVER_LIBS = @XSERVER_LIBS@
-XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@
-XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
-XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
-XSLTPROC = @XSLTPROC@
-XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
-XVFB_LIBS = @XVFB_LIBS@
-XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
-XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
-XWINMODULES_LIBS = @XWINMODULES_LIBS@
-XWIN_LIBS = @XWIN_LIBS@
-XWIN_SERVER_NAME = @XWIN_SERVER_NAME@
-XWIN_SYS_LIBS = @XWIN_SYS_LIBS@
-YACC = @YACC@
-YFLAGS = @YFLAGS@
-abi_ansic = @abi_ansic@
-abi_extension = @abi_extension@
-abi_videodrv = @abi_videodrv@
-abi_xinput = @abi_xinput@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_AR = @ac_ct_AR@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-ax_pthread_config = @ax_pthread_config@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-driverdir = @driverdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-extdir = @extdir@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-logdir = @logdir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-moduledir = @moduledir@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-runstatedir = @runstatedir@
-sbindir = @sbindir@
-sdkdir = @sdkdir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-symbol_visibility = @symbol_visibility@
-sysconfdir = @sysconfdir@
-sysconfigdir = @sysconfigdir@
-target_alias = @target_alias@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-AM_CPPFLAGS = $(XORG_INCS) \
-	   -I$(top_srcdir)/hw/xfree86/ddc \
-	   -I$(top_srcdir)/hw/xfree86/modes \
-	   -I$(top_srcdir)/hw/xfree86/parser
-
-
-# gah
-cvt_SOURCES = cvt.c \
-	$(top_srcdir)/hw/xfree86/modes/xf86cvt.c \
-	$(top_srcdir)/os/xprintf.c
-
-cvt_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS)
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
-	@for dep in $?; do \
-	  case '$(am__configure_deps)' in \
-	    *$$dep*) \
-	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
-	        && { if test -f $@; then exit 0; else break; fi; }; \
-	      exit 1;; \
-	  esac; \
-	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xfree86/utils/cvt/Makefile'; \
-	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --foreign hw/xfree86/utils/cvt/Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	@case '$?' in \
-	  *config.status*) \
-	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
-	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
-	esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure:  $(am__configure_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-install-binPROGRAMS: $(bin_PROGRAMS)
-	@$(NORMAL_INSTALL)
-	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
-	if test -n "$$list"; then \
-	  echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
-	  $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
-	fi; \
-	for p in $$list; do echo "$$p $$p"; done | \
-	sed 's/$(EXEEXT)$$//' | \
-	while read p p1; do if test -f $$p \
-	 || test -f $$p1 \
-	  ; then echo "$$p"; echo "$$p"; else :; fi; \
-	done | \
-	sed -e 'p;s,.*/,,;n;h' \
-	    -e 's|.*|.|' \
-	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
-	sed 'N;N;N;s,\n, ,g' | \
-	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
-	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
-	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
-	    else { print "f", $$3 "/" $$4, $$1; } } \
-	  END { for (d in files) print "f", d, files[d] }' | \
-	while read type dir files; do \
-	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
-	    test -z "$$files" || { \
-	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
-	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
-	    } \
-	; done
-
-uninstall-binPROGRAMS:
-	@$(NORMAL_UNINSTALL)
-	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
-	files=`for p in $$list; do echo "$$p"; done | \
-	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
-	      -e 's/$$/$(EXEEXT)/' \
-	`; \
-	test -n "$$list" || exit 0; \
-	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
-	cd "$(DESTDIR)$(bindir)" && rm -f $$files
-
-clean-binPROGRAMS:
-	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
-	echo " rm -f" $$list; \
-	rm -f $$list || exit $$?; \
-	test -n "$(EXEEXT)" || exit 0; \
-	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
-	echo " rm -f" $$list; \
-	rm -f $$list
-
-cvt$(EXEEXT): $(cvt_OBJECTS) $(cvt_DEPENDENCIES) $(EXTRA_cvt_DEPENDENCIES) 
-	@rm -f cvt$(EXEEXT)
-	$(AM_V_CCLD)$(cvt_LINK) $(cvt_OBJECTS) $(cvt_LDADD) $(LIBS)
-
-mostlyclean-compile:
-	-rm -f *.$(OBJEXT)
-
-distclean-compile:
-	-rm -f *.tab.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cvt-cvt.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cvt-xf86cvt.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cvt-xprintf.Po@am__quote@ # am--include-marker
-
-$(am__depfiles_remade):
-	@$(MKDIR_P) $(@D)
-	@echo '# dummy' >$@-t && $(am__mv) $@-t $@
-
-am--depfiles: $(am__depfiles_remade)
-
-.c.o:
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
-
-.c.obj:
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
-
-.c.lo:
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
-
-cvt-cvt.o: cvt.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cvt_CFLAGS) $(CFLAGS) -MT cvt-cvt.o -MD -MP -MF $(DEPDIR)/cvt-cvt.Tpo -c -o cvt-cvt.o `test -f 'cvt.c' || echo '$(srcdir)/'`cvt.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cvt-cvt.Tpo $(DEPDIR)/cvt-cvt.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='cvt.c' object='cvt-cvt.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cvt_CFLAGS) $(CFLAGS) -c -o cvt-cvt.o `test -f 'cvt.c' || echo '$(srcdir)/'`cvt.c
-
-cvt-cvt.obj: cvt.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cvt_CFLAGS) $(CFLAGS) -MT cvt-cvt.obj -MD -MP -MF $(DEPDIR)/cvt-cvt.Tpo -c -o cvt-cvt.obj `if test -f 'cvt.c'; then $(CYGPATH_W) 'cvt.c'; else $(CYGPATH_W) '$(srcdir)/cvt.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cvt-cvt.Tpo $(DEPDIR)/cvt-cvt.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='cvt.c' object='cvt-cvt.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cvt_CFLAGS) $(CFLAGS) -c -o cvt-cvt.obj `if test -f 'cvt.c'; then $(CYGPATH_W) 'cvt.c'; else $(CYGPATH_W) '$(srcdir)/cvt.c'; fi`
-
-cvt-xf86cvt.o: $(top_srcdir)/hw/xfree86/modes/xf86cvt.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cvt_CFLAGS) $(CFLAGS) -MT cvt-xf86cvt.o -MD -MP -MF $(DEPDIR)/cvt-xf86cvt.Tpo -c -o cvt-xf86cvt.o `test -f '$(top_srcdir)/hw/xfree86/modes/xf86cvt.c' || echo '$(srcdir)/'`$(top_srcdir)/hw/xfree86/modes/xf86cvt.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cvt-xf86cvt.Tpo $(DEPDIR)/cvt-xf86cvt.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$(top_srcdir)/hw/xfree86/modes/xf86cvt.c' object='cvt-xf86cvt.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cvt_CFLAGS) $(CFLAGS) -c -o cvt-xf86cvt.o `test -f '$(top_srcdir)/hw/xfree86/modes/xf86cvt.c' || echo '$(srcdir)/'`$(top_srcdir)/hw/xfree86/modes/xf86cvt.c
-
-cvt-xf86cvt.obj: $(top_srcdir)/hw/xfree86/modes/xf86cvt.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cvt_CFLAGS) $(CFLAGS) -MT cvt-xf86cvt.obj -MD -MP -MF $(DEPDIR)/cvt-xf86cvt.Tpo -c -o cvt-xf86cvt.obj `if test -f '$(top_srcdir)/hw/xfree86/modes/xf86cvt.c'; then $(CYGPATH_W) '$(top_srcdir)/hw/xfree86/modes/xf86cvt.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/hw/xfree86/modes/xf86cvt.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cvt-xf86cvt.Tpo $(DEPDIR)/cvt-xf86cvt.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$(top_srcdir)/hw/xfree86/modes/xf86cvt.c' object='cvt-xf86cvt.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cvt_CFLAGS) $(CFLAGS) -c -o cvt-xf86cvt.obj `if test -f '$(top_srcdir)/hw/xfree86/modes/xf86cvt.c'; then $(CYGPATH_W) '$(top_srcdir)/hw/xfree86/modes/xf86cvt.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/hw/xfree86/modes/xf86cvt.c'; fi`
-
-cvt-xprintf.o: $(top_srcdir)/os/xprintf.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cvt_CFLAGS) $(CFLAGS) -MT cvt-xprintf.o -MD -MP -MF $(DEPDIR)/cvt-xprintf.Tpo -c -o cvt-xprintf.o `test -f '$(top_srcdir)/os/xprintf.c' || echo '$(srcdir)/'`$(top_srcdir)/os/xprintf.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cvt-xprintf.Tpo $(DEPDIR)/cvt-xprintf.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$(top_srcdir)/os/xprintf.c' object='cvt-xprintf.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cvt_CFLAGS) $(CFLAGS) -c -o cvt-xprintf.o `test -f '$(top_srcdir)/os/xprintf.c' || echo '$(srcdir)/'`$(top_srcdir)/os/xprintf.c
-
-cvt-xprintf.obj: $(top_srcdir)/os/xprintf.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cvt_CFLAGS) $(CFLAGS) -MT cvt-xprintf.obj -MD -MP -MF $(DEPDIR)/cvt-xprintf.Tpo -c -o cvt-xprintf.obj `if test -f '$(top_srcdir)/os/xprintf.c'; then $(CYGPATH_W) '$(top_srcdir)/os/xprintf.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/os/xprintf.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cvt-xprintf.Tpo $(DEPDIR)/cvt-xprintf.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$(top_srcdir)/os/xprintf.c' object='cvt-xprintf.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cvt_CFLAGS) $(CFLAGS) -c -o cvt-xprintf.obj `if test -f '$(top_srcdir)/os/xprintf.c'; then $(CYGPATH_W) '$(top_srcdir)/os/xprintf.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/os/xprintf.c'; fi`
-
-mostlyclean-libtool:
-	-rm -f *.lo
-
-clean-libtool:
-	-rm -rf .libs _libs
-
-ID: $(am__tagged_files)
-	$(am__define_uniq_tagged_files); mkid -fID $$unique
-tags: tags-am
-TAGS: tags
-
-tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
-	set x; \
-	here=`pwd`; \
-	$(am__define_uniq_tagged_files); \
-	shift; \
-	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
-	  test -n "$$unique" || unique=$$empty_fix; \
-	  if test $$# -gt 0; then \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      "$$@" $$unique; \
-	  else \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      $$unique; \
-	  fi; \
-	fi
-ctags: ctags-am
-
-CTAGS: ctags
-ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
-	$(am__define_uniq_tagged_files); \
-	test -z "$(CTAGS_ARGS)$$unique" \
-	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$unique
-
-GTAGS:
-	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && $(am__cd) $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) "$$here"
-cscopelist: cscopelist-am
-
-cscopelist-am: $(am__tagged_files)
-	list='$(am__tagged_files)'; \
-	case "$(srcdir)" in \
-	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
-	  *) sdir=$(subdir)/$(srcdir) ;; \
-	esac; \
-	for i in $$list; do \
-	  if test -f "$$i"; then \
-	    echo "$(subdir)/$$i"; \
-	  else \
-	    echo "$$sdir/$$i"; \
-	  fi; \
-	done >> $(top_builddir)/cscope.files
-
-distclean-tags:
-	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(BUILT_SOURCES)
-	$(MAKE) $(AM_MAKEFLAGS) distdir-am
-
-distdir-am: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	list='$(DISTFILES)'; \
-	  dist_files=`for file in $$list; do echo $$file; done | \
-	  sed -e "s|^$$srcdirstrip/||;t" \
-	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
-	case $$dist_files in \
-	  */*) $(MKDIR_P) `echo "$$dist_files" | \
-			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
-			   sort -u` ;; \
-	esac; \
-	for file in $$dist_files; do \
-	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  if test -d $$d/$$file; then \
-	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
-	    if test -d "$(distdir)/$$file"; then \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
-	  else \
-	    test -f "$(distdir)/$$file" \
-	    || cp -p $$d/$$file "$(distdir)/$$file" \
-	    || exit 1; \
-	  fi; \
-	done
-check-am: all-am
-check: check-am
-all-am: Makefile $(PROGRAMS)
-installdirs:
-	for dir in "$(DESTDIR)$(bindir)"; do \
-	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
-	done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
-	if test -z '$(STRIP)'; then \
-	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	      install; \
-	else \
-	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
-	fi
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
-	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
-	@echo "This command is intended for maintainers to use"
-	@echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-am
-		-rm -f ./$(DEPDIR)/cvt-cvt.Po
-	-rm -f ./$(DEPDIR)/cvt-xf86cvt.Po
-	-rm -f ./$(DEPDIR)/cvt-xprintf.Po
-	-rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
-	distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am: install-binPROGRAMS
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
-		-rm -f ./$(DEPDIR)/cvt-cvt.Po
-	-rm -f ./$(DEPDIR)/cvt-xf86cvt.Po
-	-rm -f ./$(DEPDIR)/cvt-xprintf.Po
-	-rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic \
-	mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-binPROGRAMS
-
-.MAKE: install-am install-strip
-
-.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
-	clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \
-	ctags ctags-am distclean distclean-compile distclean-generic \
-	distclean-libtool distclean-tags distdir dvi dvi-am html \
-	html-am info info-am install install-am install-binPROGRAMS \
-	install-data install-data-am install-dvi install-dvi-am \
-	install-exec install-exec-am install-html install-html-am \
-	install-info install-info-am install-man install-pdf \
-	install-pdf-am install-ps install-ps-am install-strip \
-	installcheck installcheck-am installdirs maintainer-clean \
-	maintainer-clean-generic mostlyclean mostlyclean-compile \
-	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-	tags tags-am uninstall uninstall-am uninstall-binPROGRAMS
-
-.PRECIOUS: Makefile
-
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/hw/xfree86/utils/cvt/cvt.c b/hw/xfree86/utils/cvt/cvt.c
deleted file mode 100644
index 9413c20..0000000
--- a/hw/xfree86/utils/cvt/cvt.c
+++ /dev/null
@@ -1,294 +0,0 @@
-/*
- * Copyright 2005-2006 Luc Verhaegen.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-/* Standalone VESA CVT standard timing modelines generator. */
-
-#include "xf86.h"
-#include "xf86Modes.h"
-
-/* FatalError implementation used by the server code we built in */
-void
-FatalError(const char *f, ...)
-{
-    va_list args;
-
-    va_start(args, f);
-    vfprintf(stderr, f, args);
-    va_end(args);
-    exit(1);
-}
-
-/* xnfalloc implementation used by the server code we built in */
-void *
-XNFalloc(unsigned long n)
-{
-    void *r;
-
-    r = malloc(n);
-    if (!r) {
-        perror("malloc failed");
-        exit(1);
-    }
-    return r;
-}
-
-/* xnfcalloc implementation used by the server code we built in */
-void *
-XNFcallocarray(size_t nmemb, size_t size)
-{
-    void *r;
-
-    r = calloc(nmemb, size);
-    if (!r) {
-        perror("calloc failed");
-        exit(1);
-    }
-    return r;
-}
-
-/*
- * Quickly check wether this is a CVT standard mode.
- */
-static Bool
-CVTCheckStandard(int HDisplay, int VDisplay, float VRefresh, Bool Reduced,
-                 Bool Verbose)
-{
-    Bool IsCVT = TRUE;
-
-    if ((!(VDisplay % 3) && ((VDisplay * 4 / 3) == HDisplay)) ||
-        (!(VDisplay % 9) && ((VDisplay * 16 / 9) == HDisplay)) ||
-        (!(VDisplay % 10) && ((VDisplay * 16 / 10) == HDisplay)) ||
-        (!(VDisplay % 4) && ((VDisplay * 5 / 4) == HDisplay)) ||
-        (!(VDisplay % 9) && ((VDisplay * 15 / 9) == HDisplay)));
-    else {
-        if (Verbose)
-            fprintf(stderr, "Warning: Aspect Ratio is not CVT standard.\n");
-        IsCVT = FALSE;
-    }
-
-    if ((VRefresh != 50.0) && (VRefresh != 60.0) &&
-        (VRefresh != 75.0) && (VRefresh != 85.0)) {
-        if (Verbose)
-            fprintf(stderr, "Warning: Refresh Rate is not CVT standard "
-                    "(50, 60, 75 or 85Hz).\n");
-        IsCVT = FALSE;
-    }
-
-    return IsCVT;
-}
-
-/*
- * I'm not documenting --interlaced for obvious reasons, even though I did
- * implement it. I also can't deny having looked at gtf here.
- */
-static void
-PrintUsage(char *Name)
-{
-    fprintf(stderr, "\n");
-    fprintf(stderr, "usage: %s [-v|--verbose] [-r|--reduced] X Y [refresh]\n",
-            Name);
-    fprintf(stderr, "\n");
-    fprintf(stderr, " -v|--verbose : Warn about CVT standard adherance.\n");
-    fprintf(stderr, " -r|--reduced : Create a mode with reduced blanking "
-            "(default: normal blanking).\n");
-    fprintf(stderr, "            X : Desired horizontal resolution "
-            "(multiple of 8, required).\n");
-    fprintf(stderr,
-            "            Y : Desired vertical resolution (required).\n");
-    fprintf(stderr,
-            "      refresh : Desired refresh rate (default: 60.0Hz).\n");
-    fprintf(stderr, "\n");
-
-    fprintf(stderr, "Calculates VESA CVT (Coordinated Video Timing) modelines"
-            " for use with X.\n");
-}
-
-/*
- *
- */
-static void
-PrintComment(DisplayModeRec * Mode, Bool CVT, Bool Reduced)
-{
-    printf("# %dx%d %.2f Hz ", Mode->HDisplay, Mode->VDisplay, Mode->VRefresh);
-
-    if (CVT) {
-        printf("(CVT %.2fM",
-               ((float) Mode->HDisplay * Mode->VDisplay) / 1000000.0);
-
-        if (!(Mode->VDisplay % 3) &&
-            ((Mode->VDisplay * 4 / 3) == Mode->HDisplay))
-            printf("3");
-        else if (!(Mode->VDisplay % 9) &&
-                 ((Mode->VDisplay * 16 / 9) == Mode->HDisplay))
-            printf("9");
-        else if (!(Mode->VDisplay % 10) &&
-                 ((Mode->VDisplay * 16 / 10) == Mode->HDisplay))
-            printf("A");
-        else if (!(Mode->VDisplay % 4) &&
-                 ((Mode->VDisplay * 5 / 4) == Mode->HDisplay))
-            printf("4");
-        else if (!(Mode->VDisplay % 9) &&
-                 ((Mode->VDisplay * 15 / 9) == Mode->HDisplay))
-            printf("9");
-
-        if (Reduced)
-            printf("-R");
-
-        printf(") ");
-    }
-    else
-        printf("(CVT) ");
-
-    printf("hsync: %.2f kHz; ", Mode->HSync);
-    printf("pclk: %.2f MHz", ((float) Mode->Clock) / 1000.0);
-
-    printf("\n");
-}
-
-/*
- * Originally grabbed from xf86Mode.c.
- *
- * Ignoring the actual Mode->name, as the user will want something solid
- * to grab hold of.
- */
-static void
-PrintModeline(DisplayModePtr Mode, int HDisplay, int VDisplay, float VRefresh,
-              Bool Reduced)
-{
-    if (Reduced)
-        printf("Modeline \"%dx%dR\"  ", HDisplay, VDisplay);
-    else
-        printf("Modeline \"%dx%d_%.2f\"  ", HDisplay, VDisplay, VRefresh);
-
-    printf("%6.2f  %i %i %i %i  %i %i %i %i", Mode->Clock / 1000.,
-           Mode->HDisplay, Mode->HSyncStart, Mode->HSyncEnd, Mode->HTotal,
-           Mode->VDisplay, Mode->VSyncStart, Mode->VSyncEnd, Mode->VTotal);
-
-    if (Mode->Flags & V_INTERLACE)
-        printf(" interlace");
-    if (Mode->Flags & V_PHSYNC)
-        printf(" +hsync");
-    if (Mode->Flags & V_NHSYNC)
-        printf(" -hsync");
-    if (Mode->Flags & V_PVSYNC)
-        printf(" +vsync");
-    if (Mode->Flags & V_NVSYNC)
-        printf(" -vsync");
-
-    printf("\n");
-}
-
-/*
- *
- */
-int
-main(int argc, char *argv[])
-{
-    DisplayModeRec *Mode;
-    int HDisplay = 0, VDisplay = 0;
-    float VRefresh = 0.0;
-    Bool Reduced = FALSE, Verbose = FALSE, IsCVT;
-    Bool Interlaced = FALSE;
-    int n;
-
-    if ((argc < 3) || (argc > 7)) {
-        PrintUsage(argv[0]);
-        return 1;
-    }
-
-    /* This doesn't filter out bad flags properly. Bad flags get passed down
-     * to atoi/atof, which then return 0, so that these variables can get
-     * filled next time round. So this is just a cosmetic problem.
-     */
-    for (n = 1; n < argc; n++) {
-        if (!strcmp(argv[n], "-r") || !strcmp(argv[n], "--reduced"))
-            Reduced = TRUE;
-        else if (!strcmp(argv[n], "-i") || !strcmp(argv[n], "--interlaced"))
-            Interlaced = TRUE;
-        else if (!strcmp(argv[n], "-v") || !strcmp(argv[n], "--verbose"))
-            Verbose = TRUE;
-        else if (!strcmp(argv[n], "-h") || !strcmp(argv[n], "--help")) {
-            PrintUsage(argv[0]);
-            return 0;
-        }
-        else if (!HDisplay) {
-            HDisplay = atoi(argv[n]);
-            if (!HDisplay) {
-                PrintUsage(argv[0]);
-                return 1;
-            }
-        }
-        else if (!VDisplay) {
-            VDisplay = atoi(argv[n]);
-            if (!VDisplay) {
-                PrintUsage(argv[0]);
-                return 1;
-            }
-        }
-        else if (!VRefresh) {
-            VRefresh = atof(argv[n]);
-            if (!VRefresh) {
-                PrintUsage(argv[0]);
-                return 1;
-            }
-        }
-        else {
-            PrintUsage(argv[0]);
-            return 1;
-        }
-    }
-
-    if (!HDisplay || !VDisplay) {
-        PrintUsage(argv[0]);
-        return 0;
-    }
-
-    /* Default to 60.0Hz */
-    if (!VRefresh)
-        VRefresh = 60.0;
-
-    /* Horizontal timing is always a multiple of 8: round up. */
-    if (HDisplay & 0x07) {
-        HDisplay &= ~0x07;
-        HDisplay += 8;
-    }
-
-    if (Reduced) {
-        if ((VRefresh / 60.0) != floor(VRefresh / 60.0)) {
-            fprintf(stderr,
-                    "\nERROR: Multiple of 60Hz refresh rate required for "
-                    " reduced blanking.\n");
-            PrintUsage(argv[0]);
-            return 0;
-        }
-    }
-
-    IsCVT = CVTCheckStandard(HDisplay, VDisplay, VRefresh, Reduced, Verbose);
-
-    Mode = xf86CVTMode(HDisplay, VDisplay, VRefresh, Reduced, Interlaced);
-
-    PrintComment(Mode, IsCVT, Reduced);
-    PrintModeline(Mode, HDisplay, VDisplay, VRefresh, Reduced);
-
-    return 0;
-}
diff --git a/hw/xfree86/utils/gtf/Makefile.in b/hw/xfree86/utils/gtf/Makefile.in
index a85c9d0..3934451 100644
--- a/hw/xfree86/utils/gtf/Makefile.in
+++ b/hw/xfree86/utils/gtf/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -128,7 +128,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -203,8 +202,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
@@ -224,8 +221,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -239,6 +234,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -257,14 +254,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -281,8 +270,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -338,6 +329,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -390,7 +383,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -414,29 +406,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -474,8 +450,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -486,14 +460,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -762,7 +730,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/hw/xfree86/utils/man/Makefile.am b/hw/xfree86/utils/man/Makefile.am
index 7afc5bc..25b3b6a 100644
--- a/hw/xfree86/utils/man/Makefile.am
+++ b/hw/xfree86/utils/man/Makefile.am
@@ -1,2 +1,2 @@
 include $(top_srcdir)/manpages.am
-appman_PRE = cvt.man gtf.man
+appman_PRE = gtf.man
diff --git a/hw/xfree86/utils/man/Makefile.in b/hw/xfree86/utils/man/Makefile.in
index 9b44f38..9e427a1 100644
--- a/hw/xfree86/utils/man/Makefile.in
+++ b/hw/xfree86/utils/man/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -105,7 +105,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -178,8 +177,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -193,6 +190,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -211,14 +210,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -235,8 +226,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -292,6 +285,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -375,7 +370,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -399,29 +393,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -459,8 +437,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -471,14 +447,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -566,7 +536,7 @@ fileman_DATA = $(fileman_PRE:man=$(FILE_MAN_SUFFIX))
 EXTRA_DIST = $(appman_PRE) $(driverman_PRE) $(fileman_PRE)
 CLEANFILES = $(appman_DATA) $(driverman_DATA) $(fileman_DATA)
 SUFFIXES = .$(APP_MAN_SUFFIX) .$(DRIVER_MAN_SUFFIX) .$(FILE_MAN_SUFFIX) .man
-appman_PRE = cvt.man gtf.man
+appman_PRE = gtf.man
 all: all-am
 
 .SUFFIXES:
@@ -676,7 +646,6 @@ ctags CTAGS:
 
 cscope cscopelist:
 
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/hw/xfree86/utils/man/cvt.man b/hw/xfree86/utils/man/cvt.man
deleted file mode 100644
index 009ab65..0000000
--- a/hw/xfree86/utils/man/cvt.man
+++ /dev/null
@@ -1,41 +0,0 @@
-.TH CVT 1 @vendorversion@
-.SH NAME
-cvt - calculate VESA CVT mode lines
-.SH SYNOPSIS
-.B cvt
-.RB [ \-v | \-\-verbose ]
-.RB [ \-r | \-\-reduced ]
-.I h-resolution
-.I v-resolution
-.RB [ refresh ]
-.SH DESCRIPTION
-.I Cvt
-is a utility for calculating VESA Coordinated Video Timing modes.  Given the
-desired horizontal and vertical resolutions, a modeline adhering to the CVT
-standard is printed. This modeline can be included in Xorg
-.B xorg.conf(@filemansuffix@)
-.
-
-.SH OPTIONS
-.TP 8
-.BR refresh
-Provide a vertical refresh rate in Hz.  The CVT standard prefers either 50.0,
-60.0, 75.0 or 85.0Hz.  The default is 60.0Hz.
-.TP 8
-.BR \-v | \-\-verbose
-Warn verbosely when a given mode does not completely correspond with CVT
-standards.
-.TP 8
-.BR \-r | \-\-reduced
-Create a mode with reduced blanking.  This allows for higher frequency signals,
-with a lower or equal dotclock. Not for Cathode Ray Tube based displays though.
-
-.SH "SEE ALSO"
-xorg.conf(@filemansuffix@), gtf(@appmansuffix@)
-.SH AUTHOR
-Luc Verhaegen.
-.PP
-This program is based on the Coordinated Video Timing sample
-implementation written by Graham Loveridge. This file is publicly
-available at <http://www.vesa.org/Public/CVT/CVTd6r1.xls>. CVT is a
-VESA trademark.
diff --git a/hw/xfree86/vbe/Makefile.am b/hw/xfree86/vbe/Makefile.am
deleted file mode 100644
index 041b47a..0000000
--- a/hw/xfree86/vbe/Makefile.am
+++ /dev/null
@@ -1,14 +0,0 @@
-module_LTLIBRARIES = libvbe.la
-libvbe_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG)
-libvbe_la_SOURCES = vbe.c vbeModes.c vbe_module.c
-if NO_UNDEFINED
-libvbe_la_LIBADD = ../int10/libint10.la
-endif
-
-sdk_HEADERS = vbe.h vbeModes.h
-
-AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS)
-
-AM_CPPFLAGS = $(XORG_INCS) -I$(srcdir)/../ddc -I$(srcdir)/../i2c \
-           -I$(srcdir)/../modes -I$(srcdir)/../parser \
-           -I$(srcdir)/../int10
diff --git a/hw/xfree86/vbe/meson.build b/hw/xfree86/vbe/meson.build
deleted file mode 100644
index d13991e..0000000
--- a/hw/xfree86/vbe/meson.build
+++ /dev/null
@@ -1,10 +0,0 @@
-shared_module('vbe',
-    [ 'vbe.c', 'vbeModes.c', 'vbe_module.c' ],
-    include_directories: [ inc, xorg_inc ],
-    dependencies: common_dep,
-    c_args: xorg_c_args,
-    install: true,
-    install_dir: module_dir,
-)
-
-install_data(['vbe.h', 'vbeModes.h'], install_dir: xorgsdkdir)
diff --git a/hw/xfree86/vbe/vbe_module.c b/hw/xfree86/vbe/vbe_module.c
deleted file mode 100644
index 3fb8695..0000000
--- a/hw/xfree86/vbe/vbe_module.c
+++ /dev/null
@@ -1,22 +0,0 @@
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include "xf86.h"
-#include "xf86str.h"
-#include "vbe.h"
-
-static XF86ModuleVersionInfo vbeVersRec = {
-    "vbe",
-    MODULEVENDORSTRING,
-    MODINFOSTRING1,
-    MODINFOSTRING2,
-    XORG_VERSION_CURRENT,
-    1, 1, 0,
-    ABI_CLASS_VIDEODRV,         /* needs the video driver ABI */
-    ABI_VIDEODRV_VERSION,
-    MOD_CLASS_NONE,
-    {0, 0, 0, 0}
-};
-
-_X_EXPORT XF86ModuleData vbeModuleData = { &vbeVersRec, NULL, NULL };
diff --git a/hw/xfree86/vgahw/Makefile.in b/hw/xfree86/vgahw/Makefile.in
index a1c4f86..d4b28eb 100644
--- a/hw/xfree86/vgahw/Makefile.in
+++ b/hw/xfree86/vgahw/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -106,7 +106,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -211,8 +210,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
@@ -232,8 +229,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -247,6 +242,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -265,14 +262,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -289,8 +278,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -346,6 +337,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -398,7 +391,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -422,29 +414,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -482,8 +458,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -494,14 +468,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -767,7 +735,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/hw/xfree86/vgahw/vgaHW.c b/hw/xfree86/vgahw/vgaHW.c
index 7223fc0..f688800 100644
--- a/hw/xfree86/vgahw/vgaHW.c
+++ b/hw/xfree86/vgahw/vgaHW.c
@@ -591,12 +591,12 @@ vgaHWProtect(ScrnInfoPtr pScrn, Bool on)
         }
         else {
             /*
-             * Reenable sequencer, then turn on screen.
+             * Re-enable sequencer, then turn on screen.
              */
 
             tmp = hwp->readSeq(hwp, 0x01);
 
-            hwp->writeSeq(hwp, 0x01, tmp & ~0x20);      /* reenable display */
+            hwp->writeSeq(hwp, 0x01, tmp & ~0x20);      /* re-enable display */
             vgaHWSeqReset(hwp, FALSE);  /* clear synchronousreset */
 
             hwp->disablePalette(hwp);
@@ -1314,10 +1314,8 @@ vgaHWInit(ScrnInfoPtr scrninfp, DisplayModePtr mode)
     if (depth == 1) {
         /* Initialise the Mono map according to which bit-plane gets used */
 
-        Bool flipPixels = xf86GetFlipPixels();
-
         for (i = 0; i < 16; i++)
-            if (((i & (1 << BIT_PLANE)) != 0) != flipPixels)
+            if ((i & (1 << BIT_PLANE)) != 0)
                 regp->Attribute[i] = WHITE_VALUE;
             else
                 regp->Attribute[i] = BLACK_VALUE;
@@ -1948,7 +1946,7 @@ vgaHWddc1SetSpeed(ScrnInfoPtr pScrn, xf86ddcSpeed speed)
         hwp->writeCrtc(hwp, 0x09, (save->cr09 & 0xDF));
         save->cr07 = hwp->readCrtc(hwp, 0x07);
         hwp->writeCrtc(hwp, 0x07, (save->cr07 & 0x10));
-        /* vsync polarity negativ & ensure a 25MHz clock */
+        /* vsync polarity negative & ensure a 25MHz clock */
         save->msr = hwp->readMiscOut(hwp);
         hwp->writeMiscOut(hwp, ((save->msr & 0xF3) | 0x80));
         break;
diff --git a/hw/xfree86/vgahw/vgaHW.h b/hw/xfree86/vgahw/vgaHW.h
index b979b85..0fa80da 100644
--- a/hw/xfree86/vgahw/vgaHW.h
+++ b/hw/xfree86/vgahw/vgaHW.h
@@ -83,7 +83,7 @@ typedef struct {
     unsigned char *CRTC;        /* Crtc Controller */
     unsigned char *Sequencer;   /* Video Sequencer */
     unsigned char *Graphics;    /* Video Graphics */
-    unsigned char *Attribute;   /* Video Atribute */
+    unsigned char *Attribute;   /* Video Attribute */
     unsigned char DAC[768];     /* Internal Colorlookuptable */
     unsigned char numCRTC;      /* number of CRTC registers, def=VGA_NUM_CRTC */
     unsigned char numSequencer; /* number of seq registers, def=VGA_NUM_SEQ */
diff --git a/hw/xfree86/x86emu/Makefile.in b/hw/xfree86/x86emu/Makefile.in
index 7dcc6ae..b9634fa 100644
--- a/hw/xfree86/x86emu/Makefile.in
+++ b/hw/xfree86/x86emu/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -105,7 +105,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -180,8 +179,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
@@ -201,8 +198,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -216,6 +211,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -234,14 +231,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -258,8 +247,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -315,6 +306,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -367,7 +360,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -391,29 +383,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -451,8 +427,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -463,14 +437,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -714,7 +682,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/hw/xfree86/x86emu/decode.c b/hw/xfree86/x86emu/decode.c
index 08a07b1..261d67b 100644
--- a/hw/xfree86/x86emu/decode.c
+++ b/hw/xfree86/x86emu/decode.c
@@ -269,7 +269,7 @@ cpu-state-varible M.x86.mode. There are several potential states:
 	gs segment override
 	ss segment override
 
-	ds/ss select (in absense of override)
+	ds/ss select (in absence of override)
 
 Each of the above 7 items are handled with a bit in the mode field.
 ****************************************************************************/
diff --git a/hw/xfree86/x86emu/ops.c b/hw/xfree86/x86emu/ops.c
index 210f8ce..8846db0 100644
--- a/hw/xfree86/x86emu/ops.c
+++ b/hw/xfree86/x86emu/ops.c
@@ -39,7 +39,7 @@
 * to the 256 byte-"opcodes" found on the 8086.  The table which
 * dispatches this is found in the files optab.[ch].
 *
-* Each opcode proc has a comment preceeding it which gives it's table
+* Each opcode proc has a comment preceding it which gives its table
 * address.  Several opcodes are missing (undefined) in the table.
 *
 * Each proc includes information for decoding (DECODE_PRINTF and
@@ -7590,8 +7590,8 @@ x86emuOp_lahf(u8 X86EMU_UNUSED(op1))
     DECODE_PRINTF("LAHF\n");
     TRACE_AND_STEP();
     M.x86.R_AH = (u8) (M.x86.R_FLG & 0xff);
-    /*undocumented TC++ behavior??? Nope.  It's documented, but
-       you have too look real hard to notice it. */
+    /* Undocumented TC++ behavior??? Nope.  It's documented, but
+       you have to look real hard to notice it. */
     M.x86.R_AH |= 0x2;
     DECODE_CLEAR_SEGOVR();
     END_OF_INSTR();
@@ -7711,7 +7711,7 @@ x86emuOp_movs_byte(u8 X86EMU_UNUSED(op1))
     TRACE_AND_STEP();
     count = 1;
     if (M.x86.mode & (SYSMODE_PREFIX_REPE | SYSMODE_PREFIX_REPNE)) {
-        /* dont care whether REPE or REPNE */
+        /* don't care whether REPE or REPNE */
         /* move them until CX is ZERO. */
         count = M.x86.R_CX;
         M.x86.R_CX = 0;
@@ -7756,7 +7756,7 @@ x86emuOp_movs_word(u8 X86EMU_UNUSED(op1))
     TRACE_AND_STEP();
     count = 1;
     if (M.x86.mode & (SYSMODE_PREFIX_REPE | SYSMODE_PREFIX_REPNE)) {
-        /* dont care whether REPE or REPNE */
+        /* don't care whether REPE or REPNE */
         /* move them until CX is ZERO. */
         count = M.x86.R_CX;
         M.x86.R_CX = 0;
@@ -7991,7 +7991,7 @@ x86emuOp_stos_byte(u8 X86EMU_UNUSED(op1))
         inc = 1;
     TRACE_AND_STEP();
     if (M.x86.mode & (SYSMODE_PREFIX_REPE | SYSMODE_PREFIX_REPNE)) {
-        /* dont care whether REPE or REPNE */
+        /* don't care whether REPE or REPNE */
         /* move them until CX is ZERO. */
         while (M.x86.R_CX != 0) {
             store_data_byte_abs(M.x86.R_ES, M.x86.R_DI, M.x86.R_AL);
@@ -8036,7 +8036,7 @@ x86emuOp_stos_word(u8 X86EMU_UNUSED(op1))
     TRACE_AND_STEP();
     count = 1;
     if (M.x86.mode & (SYSMODE_PREFIX_REPE | SYSMODE_PREFIX_REPNE)) {
-        /* dont care whether REPE or REPNE */
+        /* don't care whether REPE or REPNE */
         /* move them until CX is ZERO. */
         count = M.x86.R_CX;
         M.x86.R_CX = 0;
@@ -8072,7 +8072,7 @@ x86emuOp_lods_byte(u8 X86EMU_UNUSED(op1))
     else
         inc = 1;
     if (M.x86.mode & (SYSMODE_PREFIX_REPE | SYSMODE_PREFIX_REPNE)) {
-        /* dont care whether REPE or REPNE */
+        /* don't care whether REPE or REPNE */
         /* move them until CX is ZERO. */
         while (M.x86.R_CX != 0) {
             M.x86.R_AL = fetch_data_byte(M.x86.R_SI);
@@ -8117,7 +8117,7 @@ x86emuOp_lods_word(u8 X86EMU_UNUSED(op1))
     TRACE_AND_STEP();
     count = 1;
     if (M.x86.mode & (SYSMODE_PREFIX_REPE | SYSMODE_PREFIX_REPNE)) {
-        /* dont care whether REPE or REPNE */
+        /* don't care whether REPE or REPNE */
         /* move them until CX is ZERO. */
         count = M.x86.R_CX;
         M.x86.R_CX = 0;
diff --git a/hw/xfree86/x86emu/prim_ops.c b/hw/xfree86/x86emu/prim_ops.c
index 5604c7e..35ef947 100644
--- a/hw/xfree86/x86emu/prim_ops.c
+++ b/hw/xfree86/x86emu/prim_ops.c
@@ -68,7 +68,7 @@
 *
 * By inspection, one gets:  cc = ab +  r'(a + b)
 *
-* That represents alot of operations, but NO CHOICE....
+* That represents a lot of operations, but NO CHOICE....
 *
 * Borrow Chain Calculation.
 *
@@ -2050,7 +2050,7 @@ test_byte(u8 d, u8 s)
     CONDITIONAL_SET_FLAG(res & 0x80, F_SF);
     CONDITIONAL_SET_FLAG(res == 0, F_ZF);
     CONDITIONAL_SET_FLAG(PARITY(res & 0xff), F_PF);
-    /* AF == dont care */
+    /* AF == don't care */
     CLEAR_FLAG(F_CF);
 }
 
@@ -2069,7 +2069,7 @@ test_word(u16 d, u16 s)
     CONDITIONAL_SET_FLAG(res & 0x8000, F_SF);
     CONDITIONAL_SET_FLAG(res == 0, F_ZF);
     CONDITIONAL_SET_FLAG(PARITY(res & 0xff), F_PF);
-    /* AF == dont care */
+    /* AF == don't care */
     CLEAR_FLAG(F_CF);
 }
 
@@ -2088,7 +2088,7 @@ test_long(u32 d, u32 s)
     CONDITIONAL_SET_FLAG(res & 0x80000000, F_SF);
     CONDITIONAL_SET_FLAG(res == 0, F_ZF);
     CONDITIONAL_SET_FLAG(PARITY(res & 0xff), F_PF);
-    /* AF == dont care */
+    /* AF == don't care */
     CLEAR_FLAG(F_CF);
 }
 
@@ -2597,7 +2597,7 @@ ins(int size)
         inc = -size;
     }
     if (M.x86.mode & (SYSMODE_PREFIX_REPE | SYSMODE_PREFIX_REPNE)) {
-        /* dont care whether REPE or REPNE */
+        /* don't care whether REPE or REPNE */
         /* in until CX is ZERO. */
         u32 count = ((M.x86.mode & SYSMODE_PREFIX_DATA) ?
                      M.x86.R_ECX : M.x86.R_CX);
@@ -2663,7 +2663,7 @@ outs(int size)
         inc = -size;
     }
     if (M.x86.mode & (SYSMODE_PREFIX_REPE | SYSMODE_PREFIX_REPNE)) {
-        /* dont care whether REPE or REPNE */
+        /* don't care whether REPE or REPNE */
         /* out until CX is ZERO. */
         u32 count = ((M.x86.mode & SYSMODE_PREFIX_DATA) ?
                      M.x86.R_ECX : M.x86.R_CX);
@@ -2818,7 +2818,7 @@ cpuid(void)
     switch (feature) {
     case 0:
         /* Regardless if we have real data from the hardware, the emulator
-         * will only support upto feature 1, which we set in register EAX.
+         * will only support up to feature 1, which we set in register EAX.
          * Registers EBX:EDX:ECX contain a string identifying the CPU.
          */
         M.x86.R_EAX = 1;
diff --git a/hw/xfree86/x86emu/sys.c b/hw/xfree86/x86emu/sys.c
index ccce540..6a648bf 100644
--- a/hw/xfree86/x86emu/sys.c
+++ b/hw/xfree86/x86emu/sys.c
@@ -35,7 +35,7 @@
 * Description:  This file includes subroutines which are related to
 *				programmed I/O and memory access. Included in this module
 *				are default functions with limited usefulness. For real
-*				uses these functions will most likely be overriden by the
+*				uses these functions will most likely be overridden by the
 *				user library.
 *
 ****************************************************************************/
@@ -529,7 +529,7 @@ PARAMETERS:
 int	- New software interrupt to prepare for
 
 REMARKS:
-This function is used to set up the emulator state to exceute a software
+This function is used to set up the emulator state to execute a software
 interrupt. This can be used by the user application code to allow an
 interrupt to be hooked, examined and then reflected back to the emulator
 so that the code in the emulator will continue processing the software
diff --git a/hw/xfree86/x86emu/x86emu/debug.h b/hw/xfree86/x86emu/x86emu/debug.h
index 1f04b7b..8660ebc 100644
--- a/hw/xfree86/x86emu/x86emu/debug.h
+++ b/hw/xfree86/x86emu/x86emu/debug.h
@@ -107,8 +107,8 @@
 									x86emu_decode_printf(x,y)
 
 /*
- * The following allow us to look at the bytes of an instruction.  The
- * first INCR_INSTRN_LEN, is called everytime bytes are consumed in
+ * The following allows us to look at the bytes of an instruction.  The
+ * first INCR_INSTRN_LEN, is called every time bytes are consumed in
  * the decoding process.  The SAVE_IP_CS is called initially when the
  * major opcode of the instruction is accessed.
  */
diff --git a/hw/xfree86/x86emu/x86emu/regs.h b/hw/xfree86/x86emu/x86emu/regs.h
index 3c9469f..edf9be3 100644
--- a/hw/xfree86/x86emu/x86emu/regs.h
+++ b/hw/xfree86/x86emu/x86emu/regs.h
@@ -58,7 +58,7 @@
  * EAX & 0xff  === AL
  * EAX & 0xffff == AX
  *
- * etc.  The result is that alot of the calculations can then be
+ * etc.  The result is that a lot of the calculations can then be
  * done using the native instruction set fully.
  */
 
diff --git a/hw/xfree86/x86emu/x86emu/x86emui.h b/hw/xfree86/x86emu/x86emu/x86emui.h
index 01bd92a..aa2074a 100644
--- a/hw/xfree86/x86emu/x86emu/x86emui.h
+++ b/hw/xfree86/x86emu/x86emu/x86emui.h
@@ -33,8 +33,8 @@
 * Developer:    Kendall Bennett
 *
 * Description:  Header file for system specific functions. These functions
-*				are always compiled and linked in the OS depedent libraries,
-*				and never in a binary portable driver.
+*		are always compiled and linked in the OS dependent libraries,
+*		and never in a binary portable driver.
 *
 ****************************************************************************/
 
diff --git a/hw/xfree86/xkb/Makefile.in b/hw/xfree86/xkb/Makefile.in
index 4dfffec..72b656e 100644
--- a/hw/xfree86/xkb/Makefile.in
+++ b/hw/xfree86/xkb/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -105,7 +105,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -177,8 +176,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
@@ -198,8 +195,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -213,6 +208,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -231,14 +228,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -255,8 +244,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -312,6 +303,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -364,7 +357,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -388,29 +380,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -448,8 +424,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -460,14 +434,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -686,7 +654,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/hw/xfree86/xkb/xkbPrivate.c b/hw/xfree86/xkb/xkbPrivate.c
index 4b9ef33..0096108 100644
--- a/hw/xfree86/xkb/xkbPrivate.c
+++ b/hw/xfree86/xkb/xkbPrivate.c
@@ -30,23 +30,6 @@ XkbDDXPrivate(DeviceIntPtr dev, KeyCode key, XkbAction *act)
             xf86ProcessActionEvent(ACTION_PREV_MODE, NULL);
         else if (strcasecmp(msgbuf, "+vmode") == 0)
             xf86ProcessActionEvent(ACTION_NEXT_MODE, NULL);
-        else if (strcasecmp(msgbuf, "prgrbs") == 0) {
-            DeviceIntPtr tmp;
-
-            xf86Msg(X_INFO, "Printing all currently active device grabs:\n");
-            for (tmp = inputInfo.devices; tmp; tmp = tmp->next)
-                if (tmp->deviceGrab.grab)
-                    PrintDeviceGrabInfo(tmp);
-            xf86Msg(X_INFO, "End list of active device grabs\n");
-
-            PrintPassiveGrabs();
-        }
-        else if (strcasecmp(msgbuf, "ungrab") == 0)
-            UngrabAllDevices(FALSE);
-        else if (strcasecmp(msgbuf, "clsgrb") == 0)
-            UngrabAllDevices(TRUE);
-        else if (strcasecmp(msgbuf, "prwins") == 0)
-            PrintWindowTree();
     }
 
     return 0;
diff --git a/hw/xfree86/xorg-wrapper.c b/hw/xfree86/xorg-wrapper.c
index c5e4a27..6c10223 100644
--- a/hw/xfree86/xorg-wrapper.c
+++ b/hw/xfree86/xorg-wrapper.c
@@ -231,7 +231,7 @@ int main(int argc, char *argv[])
     }
 
 #ifdef WITH_LIBDRM
-    /* Detect if we need root rights, except when overriden by the config */
+    /* Detect if we need root rights, except when overridden by the config */
     if (needs_root_rights == -1) {
         for (i = 0; i < 16; i++) {
             snprintf(buf, sizeof(buf), DRM_DEV_NAME, DRM_DIR_NAME, i);
diff --git a/hw/xfree86/xorgconf.cpp b/hw/xfree86/xorgconf.cpp
index a903438..4cf677f 100644
--- a/hw/xfree86/xorgconf.cpp
+++ b/hw/xfree86/xorgconf.cpp
@@ -82,12 +82,6 @@ EndSection
 
 Section "ServerFlags"
 
-# Uncomment this to cause a core dump at the spot where a signal is
-# received.  This may leave the console in an unusable state, but may
-# provide a better stack trace in the core dump to aid in debugging
-
-#    Option	"NoTrapSignals"
-
 # Uncomment this to disable the <Ctrl><Alt><Fn> VT switch sequence
 # (where n is 1 through 12).  This allows clients to receive these key
 # events.
@@ -148,7 +142,7 @@ Section "InputDevice"
 
     Option	"AutoRepeat"	"500 5"
 
-# Specifiy which keyboard LEDs can be user-controlled (eg, with xset(1)).
+# Specify which keyboard LEDs can be user-controlled (eg, with xset(1)).
 
 #    Option	"Xleds"	"1 2 3"
 
diff --git a/hw/xnest/Args.c b/hw/xnest/Args.c
index 21faf2e..f54dbd6 100644
--- a/hw/xnest/Args.c
+++ b/hw/xnest/Args.c
@@ -188,5 +188,5 @@ ddxUseMsg(void)
     ErrorF("-bw int                window border width\n");
     ErrorF("-name string           window name\n");
     ErrorF("-scrns int             number of screens to generate\n");
-    ErrorF("-install               instal colormaps directly\n");
+    ErrorF("-install               install colormaps directly\n");
 }
diff --git a/hw/xnest/Display.c b/hw/xnest/Display.c
index e6d07df..dc59c6b 100644
--- a/hw/xnest/Display.c
+++ b/hw/xnest/Display.c
@@ -41,7 +41,7 @@ XVisualInfo *xnestVisuals;
 int xnestNumVisuals;
 int xnestDefaultVisualIndex;
 Colormap *xnestDefaultColormaps;
-static int xnestNumDefaultColormaps;
+static unsigned int xnestNumDefaultColormaps;
 int *xnestDepths;
 int xnestNumDepths;
 XPixmapFormatValues *xnestPixmapFormats;
diff --git a/hw/xnest/Handlers.c b/hw/xnest/Handlers.c
index e90a616..27ea30a 100644
--- a/hw/xnest/Handlers.c
+++ b/hw/xnest/Handlers.c
@@ -32,7 +32,7 @@ is" without express or implied warranty.
 #include "Handlers.h"
 
 void
-xnestBlockHandler(void *blockData, void *timout)
+xnestBlockHandler(void *blockData, void *timeout)
 {
     xnestCollectExposures();
     XFlush(xnestDisplay);
diff --git a/hw/xnest/Init.c b/hw/xnest/Init.c
index c3afadf..cd4ee61 100644
--- a/hw/xnest/Init.c
+++ b/hw/xnest/Init.c
@@ -126,23 +126,13 @@ CloseInput(void)
     mieqFini();
 }
 
-/*
- * DDX - specific abort routine.  Called by AbortServer().
- */
 void
-AbortDDX(enum ExitCode error)
+ddxGiveUp(enum ExitCode error)
 {
     xnestDoFullGeneration = True;
     xnestCloseDisplay();
 }
 
-/* Called by GiveUp(). */
-void
-ddxGiveUp(enum ExitCode error)
-{
-    AbortDDX(error);
-}
-
 #ifdef __APPLE__
 void
 DarwinHandleGUI(int argc, char *argv[])
diff --git a/hw/xnest/Keyboard.c b/hw/xnest/Keyboard.c
index 85deaba..46f257c 100644
--- a/hw/xnest/Keyboard.c
+++ b/hw/xnest/Keyboard.c
@@ -217,12 +217,6 @@ xnestKeyboardProc(DeviceIntPtr pDev, int onoff)
     return Success;
 }
 
-Bool
-LegalModifier(unsigned int key, DeviceIntPtr pDev)
-{
-    return TRUE;
-}
-
 void
 xnestUpdateModifierState(unsigned int state)
 {
@@ -244,8 +238,7 @@ xnestUpdateModifierState(unsigned int state)
     for (i = 0, mask = 1; i < 8; i++, mask <<= 1) {
         int key;
 
-        /* Modifier is down, but shouldn't be
-         */
+        /* Modifier is down, but shouldn't be */
         if ((xkb_state & mask) && !(state & mask)) {
             int count = keyc->modifierKeyCount[i];
 
@@ -263,8 +256,7 @@ xnestUpdateModifierState(unsigned int state)
                 }
         }
 
-        /* Modifier shoud be down, but isn't
-         */
+        /* Modifier should be down, but isn't */
         if (!(xkb_state & mask) && (state & mask))
             for (key = 0; key < MAP_LENGTH; key++)
                 if (keyc->xkbInfo->desc->map->modmap[key] & mask) {
diff --git a/hw/xnest/Makefile.am b/hw/xnest/Makefile.am
index c77da64..3342f9e 100644
--- a/hw/xnest/Makefile.am
+++ b/hw/xnest/Makefile.am
@@ -41,7 +41,8 @@ SRCS =	Args.c \
 	XNPixmap.h \
 	XNWindow.h \
 	xnest-config.h \
-	$(top_srcdir)/mi/miinitext.c
+	$(top_srcdir)/mi/miinitext.c \
+	$(top_srcdir)/mi/miinitext.h
 
 XNEST_LIBS = \
         @XNEST_LIBS@ \
diff --git a/hw/xnest/Makefile.in b/hw/xnest/Makefile.in
index 675e796..3c04c34 100644
--- a/hw/xnest/Makefile.in
+++ b/hw/xnest/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -106,7 +106,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -211,8 +210,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 DIST_SUBDIRS = $(SUBDIRS)
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -258,8 +255,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -273,6 +268,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -291,14 +288,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -315,8 +304,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -372,6 +363,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -424,7 +417,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -448,29 +440,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -511,8 +487,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -523,14 +497,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -643,7 +611,8 @@ SRCS = Args.c \
 	XNPixmap.h \
 	XNWindow.h \
 	xnest-config.h \
-	$(top_srcdir)/mi/miinitext.c
+	$(top_srcdir)/mi/miinitext.c \
+	$(top_srcdir)/mi/miinitext.h
 
 Xnest_SOURCES = $(SRCS)
 Xnest_DEPENDENCIES = $(XNEST_LIBS)
@@ -908,7 +877,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/hw/xnest/Window.c b/hw/xnest/Window.c
index 8d9c672..d6f44a2 100644
--- a/hw/xnest/Window.c
+++ b/hw/xnest/Window.c
@@ -339,7 +339,7 @@ xnestChangeWindowAttributes(WindowPtr pWin, unsigned long mask)
         xnestSetInstalledColormapWindows(pWin->drawable.pScreen);
     }
 
-    if (mask & CWCursor)        /* this is handeled in cursor code */
+    if (mask & CWCursor)        /* this is handled in cursor code */
         mask &= ~CWCursor;
 
     if (mask)
diff --git a/hw/xnest/man/Makefile.in b/hw/xnest/man/Makefile.in
index 40645eb..e00ab36 100644
--- a/hw/xnest/man/Makefile.in
+++ b/hw/xnest/man/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -105,7 +105,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -178,8 +177,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -193,6 +190,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -211,14 +210,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -235,8 +226,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -292,6 +285,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -375,7 +370,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -399,29 +393,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -459,8 +437,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -471,14 +447,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -676,7 +646,6 @@ ctags CTAGS:
 
 cscope cscopelist:
 
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/hw/xnest/man/Xnest.man b/hw/xnest/man/Xnest.man
index e287b8e..1057e2d 100644
--- a/hw/xnest/man/Xnest.man
+++ b/hw/xnest/man/Xnest.man
@@ -150,7 +150,7 @@ This option specifies the geometry parameters for the top-level
 window.
 See \(lqGEOMETRY SPECIFICATIONS\(rq in
 .BR X (@miscmansuffix@)
-for a discusson of this option's syntax.
+for a discussion of this option's syntax.
 This window corresponds to the root window of the nested server.
 The width
 .I W
diff --git a/hw/xnest/meson.build b/hw/xnest/meson.build
index f143aff..37ac5a6 100644
--- a/hw/xnest/meson.build
+++ b/hw/xnest/meson.build
@@ -16,6 +16,7 @@ srcs = [
     'Visual.c',
     'Window.c',
     '../../mi/miinitext.c',
+    '../../mi/miinitext.h',
 ]
 
 executable(
diff --git a/hw/xquartz/GL/Makefile.in b/hw/xquartz/GL/Makefile.in
index ed4f051..099c0ae 100644
--- a/hw/xquartz/GL/Makefile.in
+++ b/hw/xquartz/GL/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -105,7 +105,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -178,8 +177,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
@@ -199,8 +196,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -214,6 +209,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -232,14 +229,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -256,8 +245,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -313,6 +304,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -365,7 +358,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -389,29 +381,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -449,8 +425,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -461,14 +435,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -701,7 +669,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/hw/xquartz/GL/meson.build b/hw/xquartz/GL/meson.build
new file mode 100644
index 0000000..5564175
--- /dev/null
+++ b/hw/xquartz/GL/meson.build
@@ -0,0 +1,5 @@
+libcglcore = static_library('CGLCore',
+     ['indirect.c', 'capabilities.c', 'visualConfigs.c'],
+     include_directories: [inc, glx_inc, '..', '../xpr'],
+     dependencies: [xproto_dep, pixman_dep],
+)
diff --git a/hw/xquartz/Makefile.am b/hw/xquartz/Makefile.am
index e3fb225..130e76f 100644
--- a/hw/xquartz/Makefile.am
+++ b/hw/xquartz/Makefile.am
@@ -2,14 +2,14 @@ noinst_LTLIBRARIES = libXquartz.la
 AM_CFLAGS = $(DIX_CFLAGS)
 AM_OBJCFLAGS = $(DIX_CFLAGS)
 AM_CPPFLAGS = \
-	-DBUILD_DATE=\"$(BUILD_DATE)\" \
+	-DXQUARTZ_DATA_DIR=\"$(datadir)/X11/XQuartz\" \
 	-DXSERVER_VERSION=\"$(VERSION)\" \
-	-DINXQUARTZ \
+	-DBUNDLE_ID_PREFIX=\"$(BUNDLE_ID_PREFIX)\" \
 	-DUSE_NEW_CLUT \
 	-DXFree86Server \
 	-I$(top_srcdir)/miext/rootless \
 	-I$(top_builddir)/pseudoramiX \
-	-DX11LIBDIR=\"$(libdir)\"
+	-I$(top_builddir)
 
 if GLX
 GL_DIR = GL
@@ -21,6 +21,8 @@ DIST_SUBDIRS = bundle . GL xpr pbproxy mach-startup man
 
 libXquartz_la_SOURCES = \
 	$(top_srcdir)/mi/miinitext.c \
+	$(top_srcdir)/mi/miinitext.h \
+	NSUserDefaults+XQuartzDefaults.m \
 	X11Application.m \
 	X11Controller.m \
 	applewm.c \
@@ -36,12 +38,14 @@ libXquartz_la_SOURCES = \
 libXquartz_la_LIBADD = $(top_builddir)/pseudoramiX/libPseudoramiX.la
 
 EXTRA_DIST = \
+	NSUserDefaults+XQuartzDefaults.h \
 	X11Application.h \
 	X11Controller.h \
 	applewmExt.h \
 	darwin.h \
 	darwinfb.h \
 	darwinEvents.h \
+	defaults.plist \
 	keysym2ucs.h \
 	quartz.h \
 	quartzKeyboard.h \
diff --git a/hw/xquartz/Makefile.in b/hw/xquartz/Makefile.in
index 140de25..f1ddc21 100644
--- a/hw/xquartz/Makefile.in
+++ b/hw/xquartz/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -105,14 +105,14 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 LTLIBRARIES = $(noinst_LTLIBRARIES)
 libXquartz_la_DEPENDENCIES =  \
 	$(top_builddir)/pseudoramiX/libPseudoramiX.la
-am_libXquartz_la_OBJECTS = miinitext.lo X11Application.lo \
+am_libXquartz_la_OBJECTS = miinitext.lo \
+	NSUserDefaults+XQuartzDefaults.lo X11Application.lo \
 	X11Controller.lo applewm.lo darwin.lo darwinEvents.lo \
 	darwinXinput.lo keysym2ucs.lo quartz.lo quartzKeyboard.lo \
 	quartzStartup.lo quartzRandR.lo
@@ -136,13 +136,13 @@ am__v_at_1 =
 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__maybe_remake_depfiles = depfiles
-am__depfiles_remade = ./$(DEPDIR)/X11Application.Plo \
-	./$(DEPDIR)/X11Controller.Plo ./$(DEPDIR)/applewm.Plo \
-	./$(DEPDIR)/darwin.Plo ./$(DEPDIR)/darwinEvents.Plo \
-	./$(DEPDIR)/darwinXinput.Plo ./$(DEPDIR)/keysym2ucs.Plo \
-	./$(DEPDIR)/miinitext.Plo ./$(DEPDIR)/quartz.Plo \
-	./$(DEPDIR)/quartzKeyboard.Plo ./$(DEPDIR)/quartzRandR.Plo \
-	./$(DEPDIR)/quartzStartup.Plo
+am__depfiles_remade = ./$(DEPDIR)/NSUserDefaults+XQuartzDefaults.Plo \
+	./$(DEPDIR)/X11Application.Plo ./$(DEPDIR)/X11Controller.Plo \
+	./$(DEPDIR)/applewm.Plo ./$(DEPDIR)/darwin.Plo \
+	./$(DEPDIR)/darwinEvents.Plo ./$(DEPDIR)/darwinXinput.Plo \
+	./$(DEPDIR)/keysym2ucs.Plo ./$(DEPDIR)/miinitext.Plo \
+	./$(DEPDIR)/quartz.Plo ./$(DEPDIR)/quartzKeyboard.Plo \
+	./$(DEPDIR)/quartzRandR.Plo ./$(DEPDIR)/quartzStartup.Plo
 am__mv = mv -f
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@@ -217,8 +217,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 am__relativize = \
@@ -263,8 +261,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -278,6 +274,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -296,14 +294,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -320,8 +310,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -377,6 +369,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -429,7 +423,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -453,29 +446,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -513,8 +490,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -525,14 +500,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -609,20 +578,22 @@ noinst_LTLIBRARIES = libXquartz.la
 AM_CFLAGS = $(DIX_CFLAGS)
 AM_OBJCFLAGS = $(DIX_CFLAGS)
 AM_CPPFLAGS = \
-	-DBUILD_DATE=\"$(BUILD_DATE)\" \
+	-DXQUARTZ_DATA_DIR=\"$(datadir)/X11/XQuartz\" \
 	-DXSERVER_VERSION=\"$(VERSION)\" \
-	-DINXQUARTZ \
+	-DBUNDLE_ID_PREFIX=\"$(BUNDLE_ID_PREFIX)\" \
 	-DUSE_NEW_CLUT \
 	-DXFree86Server \
 	-I$(top_srcdir)/miext/rootless \
 	-I$(top_builddir)/pseudoramiX \
-	-DX11LIBDIR=\"$(libdir)\"
+	-I$(top_builddir)
 
 @GLX_TRUE@GL_DIR = GL
 SUBDIRS = bundle . $(GL_DIR) xpr pbproxy mach-startup man
 DIST_SUBDIRS = bundle . GL xpr pbproxy mach-startup man
 libXquartz_la_SOURCES = \
 	$(top_srcdir)/mi/miinitext.c \
+	$(top_srcdir)/mi/miinitext.h \
+	NSUserDefaults+XQuartzDefaults.m \
 	X11Application.m \
 	X11Controller.m \
 	applewm.c \
@@ -637,12 +608,14 @@ libXquartz_la_SOURCES = \
 
 libXquartz_la_LIBADD = $(top_builddir)/pseudoramiX/libPseudoramiX.la
 EXTRA_DIST = \
+	NSUserDefaults+XQuartzDefaults.h \
 	X11Application.h \
 	X11Controller.h \
 	applewmExt.h \
 	darwin.h \
 	darwinfb.h \
 	darwinEvents.h \
+	defaults.plist \
 	keysym2ucs.h \
 	quartz.h \
 	quartzKeyboard.h \
@@ -704,6 +677,7 @@ mostlyclean-compile:
 distclean-compile:
 	-rm -f *.tab.c
 
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NSUserDefaults+XQuartzDefaults.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/X11Application.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/X11Controller.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/applewm.Plo@am__quote@ # am--include-marker
@@ -876,7 +850,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
@@ -976,7 +949,8 @@ clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
 	mostlyclean-am
 
 distclean: distclean-recursive
-		-rm -f ./$(DEPDIR)/X11Application.Plo
+		-rm -f ./$(DEPDIR)/NSUserDefaults+XQuartzDefaults.Plo
+	-rm -f ./$(DEPDIR)/X11Application.Plo
 	-rm -f ./$(DEPDIR)/X11Controller.Plo
 	-rm -f ./$(DEPDIR)/applewm.Plo
 	-rm -f ./$(DEPDIR)/darwin.Plo
@@ -1033,7 +1007,8 @@ install-ps-am:
 installcheck-am:
 
 maintainer-clean: maintainer-clean-recursive
-		-rm -f ./$(DEPDIR)/X11Application.Plo
+		-rm -f ./$(DEPDIR)/NSUserDefaults+XQuartzDefaults.Plo
+	-rm -f ./$(DEPDIR)/X11Application.Plo
 	-rm -f ./$(DEPDIR)/X11Controller.Plo
 	-rm -f ./$(DEPDIR)/applewm.Plo
 	-rm -f ./$(DEPDIR)/darwin.Plo
diff --git a/hw/xquartz/NSUserDefaults+XQuartzDefaults.h b/hw/xquartz/NSUserDefaults+XQuartzDefaults.h
new file mode 100644
index 0000000..2f180b2
--- /dev/null
+++ b/hw/xquartz/NSUserDefaults+XQuartzDefaults.h
@@ -0,0 +1,49 @@
+//
+//  NSUserDefaults+XQuartzDefaults.h
+//  XQuartz
+//
+//  Created by Jeremy Huddleston Sequoia on 2021.02.19.
+//  Copyright (c) 2021 Apple Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+extern NSString * const XQuartzPrefKeyAppsMenu;
+extern NSString * const XQuartzPrefKeyFakeButtons;
+extern NSString * const XQuartzPrefKeyFakeButton2;
+extern NSString * const XQuartzPrefKeyFakeButton3;
+extern NSString * const XQuartzPrefKeyKeyEquivs;
+extern NSString * const XQuartzPrefKeyFullscreenHotkeys;
+extern NSString * const XQuartzPrefKeyFullscreenMenu;
+extern NSString * const XQuartzPrefKeySyncKeymap;
+extern NSString * const XQuartzPrefKeyDepth;
+extern NSString * const XQuartzPrefKeyNoAuth;
+extern NSString * const XQuartzPrefKeyNoTCP;
+extern NSString * const XQuartzPrefKeyDoneXinitCheck;
+extern NSString * const XQuartzPrefKeyNoQuitAlert;
+extern NSString * const XQuartzPrefKeyNoRANDRAlert;
+extern NSString * const XQuartzPrefKeyOptionSendsAlt;
+extern NSString * const XQuartzPrefKeyAppKitModifiers;
+extern NSString * const XQuartzPrefKeyWindowItemModifiers;
+extern NSString * const XQuartzPrefKeyRootless;
+extern NSString * const XQuartzPrefKeyRENDERExtension;
+extern NSString * const XQuartzPrefKeyTESTExtension;
+extern NSString * const XQuartzPrefKeyLoginShell;
+extern NSString * const XQuartzPrefKeyClickThrough;
+extern NSString * const XQuartzPrefKeyFocusFollowsMouse;
+extern NSString * const XQuartzPrefKeyFocusOnNewWindow;
+
+extern NSString * const XQuartzPrefKeyScrollInDeviceDirection;
+extern NSString * const XQuartzPrefKeySyncPasteboard;
+extern NSString * const XQuartzPrefKeySyncPasteboardToClipboard;
+extern NSString * const XQuartzPrefKeySyncPasteboardToPrimary;
+extern NSString * const XQuartzPrefKeySyncClipboardToPasteBoard;
+extern NSString * const XQuartzPrefKeySyncPrimaryOnSelect;
+
+@interface NSUserDefaults (XQuartzDefaults)
+
++ (NSUserDefaults *)globalDefaults;
++ (NSUserDefaults *)dockDefaults;
++ (NSUserDefaults *)xquartzDefaults;
+
+@end
diff --git a/hw/xquartz/NSUserDefaults+XQuartzDefaults.m b/hw/xquartz/NSUserDefaults+XQuartzDefaults.m
new file mode 100644
index 0000000..ecc1921
--- /dev/null
+++ b/hw/xquartz/NSUserDefaults+XQuartzDefaults.m
@@ -0,0 +1,148 @@
+//
+//  NSUserDefaults+XQuartzDefaults.m
+//  XQuartz
+//
+//  Created by Jeremy Huddleston Sequoia on 2021.02.19.
+//  Copyright (c) 2021 Apple Inc. All rights reserved.
+//
+
+#import "NSUserDefaults+XQuartzDefaults.h"
+#import <dispatch/dispatch.h>
+
+NSString * const XQuartzPrefKeyAppsMenu = @"apps_menu";
+NSString * const XQuartzPrefKeyFakeButtons = @"enable_fake_buttons";
+NSString * const XQuartzPrefKeyFakeButton2 = @"fake_button2";
+NSString * const XQuartzPrefKeyFakeButton3 = @"fake_button3";
+NSString * const XQuartzPrefKeyKeyEquivs = @"enable_key_equivalents";
+NSString * const XQuartzPrefKeyFullscreenHotkeys = @"fullscreen_hotkeys";
+NSString * const XQuartzPrefKeyFullscreenMenu = @"fullscreen_menu";
+NSString * const XQuartzPrefKeySyncKeymap = @"sync_keymap";
+NSString * const XQuartzPrefKeyDepth = @"depth";
+NSString * const XQuartzPrefKeyNoAuth = @"no_auth";
+NSString * const XQuartzPrefKeyNoTCP = @"nolisten_tcp";
+NSString * const XQuartzPrefKeyDoneXinitCheck = @"done_xinit_check";
+NSString * const XQuartzPrefKeyNoQuitAlert = @"no_quit_alert";
+NSString * const XQuartzPrefKeyNoRANDRAlert = @"no_randr_alert";
+NSString * const XQuartzPrefKeyOptionSendsAlt = @"option_sends_alt";
+NSString * const XQuartzPrefKeyAppKitModifiers = @"appkit_modifiers";
+NSString * const XQuartzPrefKeyWindowItemModifiers = @"window_item_modifiers";
+NSString * const XQuartzPrefKeyRootless = @"rootless";
+NSString * const XQuartzPrefKeyRENDERExtension = @"enable_render_extension";
+NSString * const XQuartzPrefKeyTESTExtension = @"enable_test_extensions";
+NSString * const XQuartzPrefKeyLoginShell = @"login_shell";
+NSString * const XQuartzPrefKeyUpdateFeed = @"update_feed";
+NSString * const XQuartzPrefKeyClickThrough = @"wm_click_through";
+NSString * const XQuartzPrefKeyFocusFollowsMouse = @"wm_ffm";
+NSString * const XQuartzPrefKeyFocusOnNewWindow = @"wm_focus_on_new_window";
+
+NSString * const XQuartzPrefKeyScrollInDeviceDirection = @"scroll_in_device_direction";
+NSString * const XQuartzPrefKeySyncPasteboard = @"sync_pasteboard";
+NSString * const XQuartzPrefKeySyncPasteboardToClipboard = @"sync_pasteboard_to_clipboard";
+NSString * const XQuartzPrefKeySyncPasteboardToPrimary = @"sync_pasteboard_to_primary";
+NSString * const XQuartzPrefKeySyncClipboardToPasteBoard = @"sync_clipboard_to_pasteboard";
+NSString * const XQuartzPrefKeySyncPrimaryOnSelect = @"sync_primary_on_select";
+
+@implementation NSUserDefaults (XQuartzDefaults)
+
++ (NSUserDefaults *)globalDefaults
+{
+    static dispatch_once_t once;
+    static NSUserDefaults *defaults;
+
+    dispatch_once(&once, ^{
+        NSString * const defaultsDomain = @".GlobalPreferences";
+        defaults = [[[NSUserDefaults alloc] initWithSuiteName:defaultsDomain] retain];
+
+        NSDictionary<NSString *, id> * const defaultDefaultsDict = @{
+            @"AppleSpacesSwitchOnActivate" : @(YES),
+        };
+
+        [defaults registerDefaults:defaultDefaultsDict];
+    });
+
+    return defaults;
+}
+
++ (NSUserDefaults *)dockDefaults
+{
+    static dispatch_once_t once;
+    static NSUserDefaults *defaults;
+
+    dispatch_once(&once, ^{
+        NSString * const defaultsDomain = @"com.apple.dock";
+        defaults = [[[NSUserDefaults alloc] initWithSuiteName:defaultsDomain] retain];
+
+        NSDictionary<NSString *, id> * const defaultDefaultsDict = @{
+            @"workspaces" : @(NO),
+        };
+
+        [defaults registerDefaults:defaultDefaultsDict];
+    });
+
+    return defaults;
+}
+
++ (NSUserDefaults *)xquartzDefaults
+{
+    static dispatch_once_t once;
+    static NSUserDefaults *defaults;
+
+    dispatch_once(&once, ^{
+        NSString * const defaultsDomain = @(BUNDLE_ID_PREFIX ".X11");
+        NSString * const defaultDefaultsDomain = NSBundle.mainBundle.bundleIdentifier;
+        if ([defaultsDomain isEqualToString:defaultDefaultsDomain]) {
+            defaults = [NSUserDefaults.standardUserDefaults retain];
+        } else {
+            defaults = [[[NSUserDefaults alloc] initWithSuiteName:defaultsDomain] retain];
+        }
+
+        NSString *defaultWindowItemModifiers = @"command";
+        NSString * const defaultWindowItemModifiersLocalized = NSLocalizedString(@"window item modifiers", @"window item modifiers");
+        if (![defaultWindowItemModifiersLocalized isEqualToString:@"window item modifiers"]) {
+            defaultWindowItemModifiers = defaultWindowItemModifiersLocalized;
+        }
+
+        NSDictionary<NSString *, id> * const defaultDefaultsDict = @{
+            XQuartzPrefKeyFakeButtons : @(NO),
+            // XQuartzPrefKeyFakeButton2 nil default
+            // XQuartzPrefKeyFakeButton3 nil default
+            XQuartzPrefKeyKeyEquivs : @(YES),
+            XQuartzPrefKeyFullscreenHotkeys : @(NO),
+            XQuartzPrefKeyFullscreenMenu : @(NO),
+            XQuartzPrefKeySyncKeymap : @(NO),
+            XQuartzPrefKeyDepth : @(-1),
+            XQuartzPrefKeyNoAuth : @(NO),
+            XQuartzPrefKeyNoTCP : @(NO),
+            XQuartzPrefKeyDoneXinitCheck : @(NO),
+            XQuartzPrefKeyNoQuitAlert : @(NO),
+            XQuartzPrefKeyNoRANDRAlert : @(NO),
+            XQuartzPrefKeyOptionSendsAlt : @(NO),
+            // XQuartzPrefKeyAppKitModifiers nil default
+            XQuartzPrefKeyWindowItemModifiers : defaultWindowItemModifiers,
+            XQuartzPrefKeyRootless : @(YES),
+            XQuartzPrefKeyRENDERExtension : @(YES),
+            XQuartzPrefKeyTESTExtension : @(NO),
+            XQuartzPrefKeyLoginShell : @"/bin/sh",
+            XQuartzPrefKeyClickThrough : @(NO),
+            XQuartzPrefKeyFocusFollowsMouse : @(NO),
+            XQuartzPrefKeyFocusOnNewWindow : @(YES),
+
+            XQuartzPrefKeyScrollInDeviceDirection : @(NO),
+            XQuartzPrefKeySyncPasteboard : @(YES),
+            XQuartzPrefKeySyncPasteboardToClipboard : @(YES),
+            XQuartzPrefKeySyncPasteboardToPrimary : @(YES),
+            XQuartzPrefKeySyncClipboardToPasteBoard : @(YES),
+            XQuartzPrefKeySyncPrimaryOnSelect : @(NO),
+        };
+
+        [defaults registerDefaults:defaultDefaultsDict];
+
+        NSString * const systemDefaultsPlistPath = [@(XQUARTZ_DATA_DIR) stringByAppendingPathComponent:@"defaults.plist"];
+        NSDictionary <NSString *, id> * const systemDefaultsDict = [NSDictionary dictionaryWithContentsOfFile:systemDefaultsPlistPath];
+        [defaults registerDefaults:systemDefaultsDict];
+    });
+
+    return defaults;
+}
+
+@end
diff --git a/hw/xquartz/X11Application.h b/hw/xquartz/X11Application.h
index d3ff4eb..1ef98be 100644
--- a/hw/xquartz/X11Application.h
+++ b/hw/xquartz/X11Application.h
@@ -42,20 +42,6 @@
 @property (nonatomic, readwrite, strong) X11Controller *controller;
 @property (nonatomic, readonly, assign) OSX_BOOL x_active;
 
-- (CFPropertyListRef)prefs_get_copy:(NSString *)key CF_RETURNS_RETAINED;
-- (int)prefs_get_integer:(NSString *)key default:(int)def;
-- (const char *)prefs_get_string:(NSString *)key default:(const char *)def;
-- (float)prefs_get_float:(NSString *)key default:(float)def;
-- (int)prefs_get_boolean:(NSString *)key default:(int)def;
-- (NSURL *)prefs_copy_url:(NSString *)key default:(NSURL *)def
-   NS_RETURNS_RETAINED;
-- (NSArray *)prefs_get_array:(NSString *)key;
-- (void)prefs_set_integer:(NSString *)key value:(int)value;
-- (void)prefs_set_float:(NSString *)key value:(float)value;
-- (void)prefs_set_boolean:(NSString *)key value:(int)value;
-- (void)prefs_set_array:(NSString *)key value:(NSArray *)value;
-- (void)prefs_set_string:(NSString *)key value:(NSString *)value;
-- (void)prefs_synchronize;
 @end
 
 extern X11Application * X11App;
@@ -84,40 +70,6 @@ X11ApplicationCanEnterRandR(void);
 void
 X11ApplicationMain(int argc, char **argv, char **envp);
 
-#define PREFS_APPSMENU                "apps_menu"
-#define PREFS_FAKEBUTTONS             "enable_fake_buttons"
-#define PREFS_KEYEQUIVS               "enable_key_equivalents"
-#define PREFS_FULLSCREEN_HOTKEYS      "fullscreen_hotkeys"
-#define PREFS_FULLSCREEN_MENU         "fullscreen_menu"
-#define PREFS_SYNC_KEYMAP             "sync_keymap"
-#define PREFS_DEPTH                   "depth"
-#define PREFS_NO_AUTH                 "no_auth"
-#define PREFS_NO_TCP                  "nolisten_tcp"
-#define PREFS_DONE_XINIT_CHECK        "done_xinit_check"
-#define PREFS_NO_QUIT_ALERT           "no_quit_alert"
-#define PREFS_NO_RANDR_ALERT          "no_randr_alert"
-#define PREFS_OPTION_SENDS_ALT        "option_sends_alt"
-#define PREFS_FAKE_BUTTON2            "fake_button2"
-#define PREFS_FAKE_BUTTON3            "fake_button3"
-#define PREFS_APPKIT_MODIFIERS        "appkit_modifiers"
-#define PREFS_WINDOW_ITEM_MODIFIERS   "window_item_modifiers"
-#define PREFS_ROOTLESS                "rootless"
-#define PREFS_RENDER_EXTENSION        "enable_render_extension"
-#define PREFS_TEST_EXTENSIONS         "enable_test_extensions"
-#define PREFS_XP_OPTIONS              "xp_options"
-#define PREFS_LOGIN_SHELL             "login_shell"
-#define PREFS_UPDATE_FEED             "update_feed"
-#define PREFS_CLICK_THROUGH           "wm_click_through"
-#define PREFS_FFM                     "wm_ffm"
-#define PREFS_FOCUS_ON_NEW_WINDOW     "wm_focus_on_new_window"
-
-#define PREFS_SCROLL_IN_DEV_DIRECTION "scroll_in_device_direction"
 extern Bool XQuartzScrollInDeviceDirection;
 
-#define PREFS_SYNC_PB                "sync_pasteboard"
-#define PREFS_SYNC_PB_TO_CLIPBOARD   "sync_pasteboard_to_clipboard"
-#define PREFS_SYNC_PB_TO_PRIMARY     "sync_pasteboard_to_primary"
-#define PREFS_SYNC_CLIPBOARD_TO_PB   "sync_clipboard_to_pasteboard"
-#define PREFS_SYNC_PRIMARY_ON_SELECT "sync_primary_on_select"
-
 #endif /* X11APPLICATION_H */
diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m
index 8779818..dd96e89 100644
--- a/hw/xquartz/X11Application.m
+++ b/hw/xquartz/X11Application.m
@@ -35,6 +35,7 @@
 #endif
 
 #import "X11Application.h"
+#import "NSUserDefaults+XQuartzDefaults.h"
 
 #include "darwin.h"
 #include "quartz.h"
@@ -55,8 +56,6 @@
 extern int
 xpbproxy_run(void);
 
-#define DEFAULTS_FILE X11LIBDIR "/X11/xserver/Xquartz.plist"
-
 #ifndef XSERVER_VERSION
 #define XSERVER_VERSION "?"
 #endif
@@ -77,6 +76,10 @@ static dispatch_queue_t eventTranslationQueue;
 #endif
 #endif
 
+#ifndef APPKIT_APPFLAGS_HACK
+#define APPKIT_APPFLAGS_HACK 1
+#endif
+
 extern Bool noTestExtensions;
 extern Bool noRenderExtension;
 
@@ -97,11 +100,53 @@ static BOOL bgMouseLocationUpdated = FALSE;
 
 X11Application *X11App;
 
-CFStringRef app_prefs_domain_cfstr = NULL;
-
 #define ALL_KEY_MASKS (NSShiftKeyMask | NSControlKeyMask | \
                        NSAlternateKeyMask | NSCommandKeyMask)
 
+#if APPKIT_APPFLAGS_HACK && __MAC_OS_X_VERSION_MAX_ALLOWED >= 101500
+// This was removed from the SDK in 10.15
+@interface NSApplication () {
+@protected
+    /* All instance variables are private */
+    short               _running;
+    struct __appFlags {
+        unsigned int        _hidden:1;
+        unsigned int        _appleEventActivationInProgress:1;
+        unsigned int        _active:1;
+        unsigned int        _hasBeenRun:1;
+        unsigned int        _doingUnhide:1;
+        unsigned int        _delegateReturnsValidRequestor:1;
+        unsigned int        _deactPending:1;
+        unsigned int        _invalidState:1;
+        unsigned int        _invalidEvent:1;
+        unsigned int        _postedWindowsNeedUpdateNote:1;
+        unsigned int        _wantsToActivate:1;
+        unsigned int        _doingHide:1;
+        unsigned int        _dontSendShouldTerminate:1;
+        unsigned int        _ignoresFullScreen:1;
+        unsigned int        _finishedLaunching:1;
+        unsigned int        _hasEventDelegate:1;
+        unsigned int        _appTerminating:1;
+        unsigned int        _didNSOpenOrPrint:1;
+        unsigned int        _inDealloc:1;
+        unsigned int        _pendingDidFinish:1;
+        unsigned int        _hasKeyFocus:1;
+        unsigned int        _panelsNonactivating:1;
+        unsigned int        _hiddenOnLaunch:1;
+        unsigned int        _openStatus:2;
+        unsigned int        _batchOrdering:1;
+        unsigned int        _waitingForTerminationReply:1;
+        unsigned int        _unused:1;
+        unsigned int        _enumeratingMemoryPressureHandlers:1;
+        unsigned int        _didTryRestoringPersistentState:1;
+        unsigned int        _windowDragging:1;
+        unsigned int        _mightBeSwitching:1;
+    }                   _appFlags;
+    id                  _mainMenu;
+}
+@end
+#endif
+
 @interface NSApplication (Internal)
 - (void)_setKeyWindow:(id)window;
 - (void)_setMainWindow:(id)window;
@@ -222,6 +267,8 @@ QuartzModeBundleInit(void);
     case NSLeftMouseUp:
     case NSRightMouseUp:
     case NSOtherMouseUp:
+    case NSScrollWheel:
+
         if ([e window] != nil) {
             /* Pointer event has an (AppKit) window. Probably something for the kit. */
             for_x = NO;
@@ -372,37 +419,22 @@ QuartzModeBundleInit(void);
         case NSApplicationActivatedEventType:
             for_x = NO;
             if ([e window] == nil && x_was_active) {
-                BOOL order_all_windows = YES, workspaces, ok;
+                BOOL order_all_windows = YES;
                 for_appkit = NO;
 
+#if APPKIT_APPFLAGS_HACK
                 /* FIXME: This is a hack to avoid passing the event to AppKit which
                  *        would result in it raising one of its windows.
                  */
                 _appFlags._active = YES;
+#endif
 
                 [self set_front_process:nil];
 
                 /* Get the Spaces preference for SwitchOnActivate */
-                (void)CFPreferencesAppSynchronize(CFSTR("com.apple.dock"));
-                workspaces =
-                    CFPreferencesGetAppBooleanValue(CFSTR("workspaces"),
-                                                    CFSTR(
-                                                        "com.apple.dock"),
-                                                    &ok);
-                if (!ok)
-                    workspaces = NO;
-
+                BOOL const workspaces = [NSUserDefaults.dockDefaults boolForKey:@"workspaces"];
                 if (workspaces) {
-                    (void)CFPreferencesAppSynchronize(CFSTR(
-                                                          ".GlobalPreferences"));
-                    order_all_windows =
-                        CFPreferencesGetAppBooleanValue(CFSTR(
-                                                            "AppleSpacesSwitchOnActivate"),
-                                                        CFSTR(
-                                                            ".GlobalPreferences"),
-                                                        &ok);
-                    if (!ok)
-                        order_all_windows = YES;
+                    order_all_windows = [NSUserDefaults.globalDefaults boolForKey:@"AppleSpacesSwitchOnActivate"];
                 }
 
                 /* TODO: In the workspaces && !AppleSpacesSwitchOnActivate case, the windows are ordered
@@ -413,8 +445,7 @@ QuartzModeBundleInit(void);
                  *       be restoring one of them.
                  */
                 if ([e data2] & 0x10) {         // 0x10 (bfCPSOrderAllWindowsForward) is set when we use cmd-tab or the dock icon
-                    DarwinSendDDXEvent(kXquartzBringAllToFront, 1,
-                                       order_all_windows);
+                    DarwinSendDDXEvent(kXquartzBringAllToFront, 1, order_all_windows);
                 }
             }
             break;
@@ -437,12 +468,14 @@ QuartzModeBundleInit(void);
         break;          /* for gcc */
     }
 
-    if (for_appkit) [super sendEvent:e];
+    if (for_appkit) {
+        [super sendEvent:e];
+    }
 
     if (for_x) {
         dispatch_async(eventTranslationQueue, ^{
-                           [self sendX11NSEvent:e];
-                       });
+            [self sendX11NSEvent:e];
+        });
     }
 }
 
@@ -474,404 +507,50 @@ QuartzModeBundleInit(void);
     (void)[self.controller application:self openFile:cmd];
 }
 
-/* user preferences */
-
-/* Note that these functions only work for arrays whose elements
-   can be toll-free-bridged between NS and CF worlds. */
-
-static const void *
-cfretain(CFAllocatorRef a, const void *b)
-{
-    return CFRetain(b);
-}
 
-static void
-cfrelease(CFAllocatorRef a, const void *b)
-{
-    CFRelease(b);
-}
-
-CF_RETURNS_RETAINED
-static CFMutableArrayRef
-nsarray_to_cfarray(NSArray *in)
-{
-    CFMutableArrayRef out;
-    CFArrayCallBacks cb;
-    NSObject *ns;
-    const CFTypeRef *cf;
-    int i, count;
-
-    memset(&cb, 0, sizeof(cb));
-    cb.version = 0;
-    cb.retain = cfretain;
-    cb.release = cfrelease;
-
-    count = [in count];
-    out = CFArrayCreateMutable(NULL, count, &cb);
-
-    for (i = 0; i < count; i++) {
-        ns = [in objectAtIndex:i];
-
-        if ([ns isKindOfClass:[NSArray class]])
-            cf = (CFTypeRef)nsarray_to_cfarray((NSArray *)ns);
-        else
-            cf = CFRetain((CFTypeRef)ns);
-
-        CFArrayAppendValue(out, cf);
-        CFRelease(cf);
-    }
-
-    return out;
-}
-
-static NSMutableArray *
-cfarray_to_nsarray(CFArrayRef in)
+- (void) read_defaults
 {
-    NSMutableArray *out;
-    const CFTypeRef *cf;
-    NSObject *ns;
-    int i, count;
+    NSUserDefaults * const defaults = NSUserDefaults.xquartzDefaults;
 
-    count = CFArrayGetCount(in);
-    out = [[NSMutableArray alloc] initWithCapacity:count];
+    XQuartzRootlessDefault = [defaults boolForKey:XQuartzPrefKeyRootless];
+    XQuartzFullscreenMenu = [defaults boolForKey:XQuartzPrefKeyFullscreenMenu];
+    XQuartzFullscreenDisableHotkeys = ![defaults boolForKey:XQuartzPrefKeyFullscreenHotkeys];
 
-    for (i = 0; i < count; i++) {
-        cf = CFArrayGetValueAtIndex(in, i);
-
-        if (CFGetTypeID(cf) == CFArrayGetTypeID())
-            ns = cfarray_to_nsarray((CFArrayRef)cf);
-        else
-            ns = [(id) cf retain];
+    darwinFakeButtons = [defaults boolForKey:XQuartzPrefKeyFakeButtons];
+    XQuartzOptionSendsAlt = [defaults boolForKey:XQuartzPrefKeyOptionSendsAlt];
 
-        [out addObject:ns];
-        [ns release];
-    }
-
-    return out;
-}
-
-- (CFPropertyListRef) prefs_get_copy:(NSString *)key
-{
-    CFPropertyListRef value;
-
-    value = CFPreferencesCopyAppValue((CFStringRef)key,
-                                      app_prefs_domain_cfstr);
-
-    if (value == NULL) {
-        static CFDictionaryRef defaults;
-
-        if (defaults == NULL) {
-            CFStringRef error = NULL;
-            CFDataRef data;
-            CFURLRef url;
-            SInt32 error_code;
-
-            url = (CFURLCreateFromFileSystemRepresentation
-                       (NULL, (unsigned char *)DEFAULTS_FILE,
-                       strlen(DEFAULTS_FILE), false));
-            if (CFURLCreateDataAndPropertiesFromResource(NULL, url, &data,
-                                                         NULL, NULL,
-                                                         &error_code)) {
-                defaults = (CFPropertyListCreateFromXMLData
-                                (NULL, data,
-                                kCFPropertyListMutableContainersAndLeaves,
-                                &error));
-                if (error != NULL) CFRelease(error);
-                CFRelease(data);
-            }
-            CFRelease(url);
-
-            if (defaults != NULL) {
-                NSMutableArray *apps, *elt;
-                int count, i;
-                NSString *name, *nname;
-
-                /* Localize the names in the default apps menu. */
-
-                apps =
-                    [(NSDictionary *) defaults objectForKey:@PREFS_APPSMENU];
-                if (apps != nil) {
-                    count = [apps count];
-                    for (i = 0; i < count; i++) {
-                        elt = [apps objectAtIndex:i];
-                        if (elt != nil &&
-                            [elt isKindOfClass:[NSArray class]]) {
-                            name = [elt objectAtIndex:0];
-                            if (name != nil) {
-                                nname = NSLocalizedString(name, nil);
-                                if (nname != nil && nname != name)
-                                    [elt replaceObjectAtIndex:0 withObject:
-                                     nname];
-                            }
-                        }
-                    }
-                }
-            }
+    if (darwinFakeButtons) {
+        NSString * const fake2 = [defaults stringForKey:XQuartzPrefKeyFakeButton2];
+        if (fake2) {
+            darwinFakeMouse2Mask = DarwinParseModifierList(fake2.UTF8String, TRUE);
         }
 
-        if (defaults != NULL) value = CFDictionaryGetValue(defaults, key);
-        if (value != NULL) CFRetain(value);
-    }
-
-    return value;
-}
-
-- (int) prefs_get_integer:(NSString *)key default:(int)def
-{
-    CFPropertyListRef value;
-    int ret;
-
-    value = [self prefs_get_copy:key];
-
-    if (value != NULL && CFGetTypeID(value) == CFNumberGetTypeID())
-        CFNumberGetValue(value, kCFNumberIntType, &ret);
-    else if (value != NULL && CFGetTypeID(value) == CFStringGetTypeID())
-        ret = CFStringGetIntValue(value);
-    else
-        ret = def;
-
-    if (value != NULL) CFRelease(value);
-
-    return ret;
-}
-
-- (const char *) prefs_get_string:(NSString *)key default:(const char *)def
-{
-    CFPropertyListRef value;
-    const char *ret = NULL;
-
-    value = [self prefs_get_copy:key];
-
-    if (value != NULL && CFGetTypeID(value) == CFStringGetTypeID()) {
-        NSString *s = (NSString *)value;
-
-        ret = [s UTF8String];
-    }
-
-    if (value != NULL) CFRelease(value);
-
-    return ret != NULL ? ret : def;
-}
-
-- (NSURL *) prefs_copy_url:(NSString *)key default:(NSURL *)def
-{
-    CFPropertyListRef value;
-    NSURL *ret = NULL;
-
-    value = [self prefs_get_copy:key];
-
-    if (value != NULL && CFGetTypeID(value) == CFStringGetTypeID()) {
-        NSString *s = (NSString *)value;
-
-        ret = [NSURL URLWithString:s];
-        [ret retain];
-    }
-
-    if (value != NULL) CFRelease(value);
-
-    return ret != NULL ? ret : def;
-}
-
-- (float) prefs_get_float:(NSString *)key default:(float)def
-{
-    CFPropertyListRef value;
-    float ret = def;
-
-    value = [self prefs_get_copy:key];
-
-    if (value != NULL
-        && CFGetTypeID(value) == CFNumberGetTypeID()
-        && CFNumberIsFloatType(value))
-        CFNumberGetValue(value, kCFNumberFloatType, &ret);
-    else if (value != NULL && CFGetTypeID(value) == CFStringGetTypeID())
-        ret = CFStringGetDoubleValue(value);
-
-    if (value != NULL) CFRelease(value);
-
-    return ret;
-}
-
-- (int) prefs_get_boolean:(NSString *)key default:(int)def
-{
-    CFPropertyListRef value;
-    int ret = def;
-
-    value = [self prefs_get_copy:key];
-
-    if (value != NULL) {
-        if (CFGetTypeID(value) == CFNumberGetTypeID())
-            CFNumberGetValue(value, kCFNumberIntType, &ret);
-        else if (CFGetTypeID(value) == CFBooleanGetTypeID())
-            ret = CFBooleanGetValue(value);
-        else if (CFGetTypeID(value) == CFStringGetTypeID()) {
-            const char *tem = [(NSString *) value UTF8String];
-            if (strcasecmp(tem, "true") == 0 || strcasecmp(tem, "yes") == 0)
-                ret = YES;
-            else
-                ret = NO;
+        NSString * const fake3 = [defaults stringForKey:XQuartzPrefKeyFakeButton3];
+        if (fake3) {
+            darwinFakeMouse3Mask = DarwinParseModifierList(fake3.UTF8String, TRUE);
         }
-
-        CFRelease(value);
     }
-    return ret;
-}
-
-- (NSArray *) prefs_get_array:(NSString *)key
-{
-    NSArray *ret = nil;
-    CFPropertyListRef value;
-
-    value = [self prefs_get_copy:key];
-
-    if (value != NULL) {
-        if (CFGetTypeID(value) == CFArrayGetTypeID())
-            ret = [cfarray_to_nsarray (value)autorelease];
 
-        CFRelease(value);
+    NSString * const appKitModifiers = [defaults stringForKey:XQuartzPrefKeyAppKitModifiers];
+    if (appKitModifiers) {
+        darwinAppKitModMask = DarwinParseModifierList(appKitModifiers.UTF8String, TRUE);
     }
 
-    return ret;
-}
-
-- (void) prefs_set_integer:(NSString *)key value:(int)value
-{
-    CFNumberRef x;
-
-    x = CFNumberCreate(NULL, kCFNumberIntType, &value);
-
-    CFPreferencesSetValue((CFStringRef)key, (CFTypeRef)x,
-                          app_prefs_domain_cfstr,
-                          kCFPreferencesCurrentUser,
-                          kCFPreferencesAnyHost);
-
-    CFRelease(x);
-}
-
-- (void) prefs_set_float:(NSString *)key value:(float)value
-{
-    CFNumberRef x;
-
-    x = CFNumberCreate(NULL, kCFNumberFloatType, &value);
-
-    CFPreferencesSetValue((CFStringRef)key, (CFTypeRef)x,
-                          app_prefs_domain_cfstr,
-                          kCFPreferencesCurrentUser,
-                          kCFPreferencesAnyHost);
-
-    CFRelease(x);
-}
-
-- (void) prefs_set_boolean:(NSString *)key value:(int)value
-{
-    CFPreferencesSetValue(
-        (CFStringRef)key,
-        (CFTypeRef)(value ? kCFBooleanTrue
-                    : kCFBooleanFalse),
-        app_prefs_domain_cfstr,
-        kCFPreferencesCurrentUser, kCFPreferencesAnyHost);
-
-}
-
-- (void) prefs_set_array:(NSString *)key value:(NSArray *)value
-{
-    CFArrayRef cfarray;
-
-    cfarray = nsarray_to_cfarray(value);
-    CFPreferencesSetValue((CFStringRef)key,
-                          (CFTypeRef)cfarray,
-                          app_prefs_domain_cfstr,
-                          kCFPreferencesCurrentUser, kCFPreferencesAnyHost);
-    CFRelease(cfarray);
-}
-
-- (void) prefs_set_string:(NSString *)key value:(NSString *)value
-{
-    CFPreferencesSetValue((CFStringRef)key, (CFTypeRef)value,
-                          app_prefs_domain_cfstr, kCFPreferencesCurrentUser,
-                          kCFPreferencesAnyHost);
-}
-
-- (void) prefs_synchronize
-{
-    CFPreferencesAppSynchronize(kCFPreferencesCurrentApplication);
-}
-
-- (void) read_defaults
-{
-    NSString *nsstr;
-    const char *tem;
-
-    XQuartzRootlessDefault = [self prefs_get_boolean:@PREFS_ROOTLESS
-                              default               :XQuartzRootlessDefault];
-    XQuartzFullscreenMenu = [self prefs_get_boolean:@PREFS_FULLSCREEN_MENU
-                             default               :XQuartzFullscreenMenu];
-    XQuartzFullscreenDisableHotkeys =
-        ![self prefs_get_boolean:@PREFS_FULLSCREEN_HOTKEYS
-          default               :!
-          XQuartzFullscreenDisableHotkeys];
-    darwinFakeButtons = [self prefs_get_boolean:@PREFS_FAKEBUTTONS
-                         default               :darwinFakeButtons];
-    XQuartzOptionSendsAlt = [self prefs_get_boolean:@PREFS_OPTION_SENDS_ALT
-                             default               :XQuartzOptionSendsAlt];
-
-    if (darwinFakeButtons) {
-        const char *fake2, *fake3;
-
-        fake2 = [self prefs_get_string:@PREFS_FAKE_BUTTON2 default:NULL];
-        fake3 = [self prefs_get_string:@PREFS_FAKE_BUTTON3 default:NULL];
-
-        if (fake2 != NULL) darwinFakeMouse2Mask = DarwinParseModifierList(
-                fake2, TRUE);
-        if (fake3 != NULL) darwinFakeMouse3Mask = DarwinParseModifierList(
-                fake3, TRUE);
-    }
-
-    tem = [self prefs_get_string:@PREFS_APPKIT_MODIFIERS default:NULL];
-    if (tem != NULL) darwinAppKitModMask = DarwinParseModifierList(tem, TRUE);
-
-    tem = [self prefs_get_string:@PREFS_WINDOW_ITEM_MODIFIERS default:NULL];
-    if (tem != NULL) {
-        windowItemModMask = DarwinParseModifierList(tem, FALSE);
+    NSString * const windowItemModifiers = [defaults stringForKey:XQuartzPrefKeyWindowItemModifiers];
+    if (windowItemModifiers) {
+        windowItemModMask = DarwinParseModifierList(windowItemModifiers.UTF8String, FALSE);
     }
-    else {
-        nsstr = NSLocalizedString(@"window item modifiers",
-                                  @"window item modifiers");
-        if (nsstr != NULL) {
-            tem = [nsstr UTF8String];
-            if ((tem != NULL) && strcmp(tem, "window item modifiers")) {
-                windowItemModMask = DarwinParseModifierList(tem, FALSE);
-            }
-        }
-    }
-
-    XQuartzEnableKeyEquivalents = [self prefs_get_boolean:@PREFS_KEYEQUIVS
-                                   default               :
-                                   XQuartzEnableKeyEquivalents];
 
-    darwinSyncKeymap = [self prefs_get_boolean:@PREFS_SYNC_KEYMAP
-                        default               :darwinSyncKeymap];
+    XQuartzEnableKeyEquivalents = [defaults boolForKey:XQuartzPrefKeyKeyEquivs];
 
-    darwinDesiredDepth = [self prefs_get_integer:@PREFS_DEPTH
-                          default               :darwinDesiredDepth];
+    darwinSyncKeymap = [defaults boolForKey:XQuartzPrefKeySyncKeymap];
 
-    noTestExtensions = ![self prefs_get_boolean:@PREFS_TEST_EXTENSIONS
-                         default               :FALSE];
+    darwinDesiredDepth = [defaults integerForKey:XQuartzPrefKeyDepth];
 
-    noRenderExtension = ![self prefs_get_boolean:@PREFS_RENDER_EXTENSION
-                          default               :TRUE];
+    noTestExtensions = ![defaults boolForKey:XQuartzPrefKeyTESTExtension];
+    noRenderExtension = ![defaults boolForKey:XQuartzPrefKeyRENDERExtension];
 
-    XQuartzScrollInDeviceDirection =
-        [self prefs_get_boolean:@PREFS_SCROLL_IN_DEV_DIRECTION
-         default               :
-         XQuartzScrollInDeviceDirection];
-
-#if XQUARTZ_SPARKLE
-    NSURL *url = [self prefs_copy_url:@PREFS_UPDATE_FEED default:nil];
-    if (url) {
-        [[SUUpdater sharedUpdater] setFeedURL:url];
-        [url release];
-    }
-#endif
+    XQuartzScrollInDeviceDirection = [defaults boolForKey:XQuartzPrefKeyScrollInDeviceDirection];
 }
 
 /* This will end up at the end of the responder chain. */
@@ -968,8 +647,9 @@ Bool
 X11ApplicationCanEnterRandR(void)
 {
     NSString *title, *msg;
+    NSUserDefaults * const defaults = NSUserDefaults.xquartzDefaults;
 
-    if ([X11App prefs_get_boolean:@PREFS_NO_RANDR_ALERT default:NO] ||
+    if ([defaults boolForKey:XQuartzPrefKeyNoRANDRAlert] ||
         XQuartzShieldingWindowLevel != 0)
         return TRUE;
 
@@ -992,8 +672,7 @@ X11ApplicationCanEnterRandR(void)
 
     switch (alert_result) {
     case NSAlertOtherReturn:
-        [X11App prefs_set_boolean:@PREFS_NO_RANDR_ALERT value:YES];
-        [X11App prefs_synchronize];
+        [defaults setBool:YES forKey:XQuartzPrefKeyNoRANDRAlert];
 
     case NSAlertDefaultReturn:
         return YES;
@@ -1008,8 +687,9 @@ check_xinitrc(void)
 {
     char *tem, buf[1024];
     NSString *msg;
+    NSUserDefaults * const defaults = NSUserDefaults.xquartzDefaults;
 
-    if ([X11App prefs_get_boolean:@PREFS_DONE_XINIT_CHECK default:NO])
+    if ([defaults boolForKey:XQuartzPrefKeyDoneXinitCheck])
         return;
 
     tem = getenv("HOME");
@@ -1043,8 +723,7 @@ check_xinitrc(void)
     }
 
 done:
-    [X11App prefs_set_boolean:@PREFS_DONE_XINIT_CHECK value:YES];
-    [X11App prefs_synchronize];
+    [defaults setBool:YES forKey:XQuartzPrefKeyDoneXinitCheck];
 }
 
 static inline pthread_t
@@ -1080,15 +759,8 @@ X11ApplicationMain(int argc, char **argv, char **envp)
 
     @autoreleasepool {
         X11App = (X11Application *)[X11Application sharedApplication];
+        [X11App read_defaults];
 
-        app_prefs_domain_cfstr = (CFStringRef)[[NSBundle mainBundle] bundleIdentifier];
-
-        if (app_prefs_domain_cfstr == NULL) {
-            ErrorF("X11ApplicationMain: Unable to determine bundle identifier.  Your installation of XQuartz may be broken.\n");
-            app_prefs_domain_cfstr = CFSTR(BUNDLE_ID_PREFIX ".X11");
-        }
-
-        [NSApp read_defaults];
         [NSBundle loadNibNamed:@"main" owner:NSApp];
         [NSNotificationCenter.defaultCenter addObserver:NSApp
                                                selector:@selector (became_key:)
@@ -1342,7 +1014,16 @@ wait_for_mieq_init(void);
         goto handle_mouse;
 
     case NSOtherMouseDown:
-        ev_button = 2;
+        // Get the AppKit button number, and convert it from 0-based to 1-based
+        ev_button = [e buttonNumber] + 1;
+
+        /* Translate middle mouse button (3 in AppKit) to button 2 in X11,
+         * and translate additional mouse buttons (4 and higher in AppKit)
+         * to buttons 8 and higher in X11, to match default behavior of X11
+         * on other platforms
+         */
+        ev_button = (ev_button == 3) ? 2 : (ev_button + 4);
+
         ev_type = ButtonPress;
         goto handle_mouse;
 
@@ -1357,7 +1038,9 @@ wait_for_mieq_init(void);
         goto handle_mouse;
 
     case NSOtherMouseUp:
-        ev_button = 2;
+        // See above comments for NSOtherMouseDown
+        ev_button = [e buttonNumber] + 1;
+        ev_button = (ev_button == 3) ? 2 : (ev_button + 4);
         ev_type = ButtonRelease;
         goto handle_mouse;
 
@@ -1372,7 +1055,9 @@ wait_for_mieq_init(void);
         goto handle_mouse;
 
     case NSOtherMouseDragged:
-        ev_button = 2;
+        // See above comments for NSOtherMouseDown
+        ev_button = [e buttonNumber] + 1;
+        ev_button = (ev_button == 3) ? 2 : (ev_button + 4);
         ev_type = MotionNotify;
         goto handle_mouse;
 
@@ -1638,8 +1323,17 @@ handle_mouse:
     }
 
         if (darwinSyncKeymap) {
-            TISInputSourceRef key_layout = 
-                TISCopyCurrentKeyboardLayoutInputSource();
+            __block TISInputSourceRef key_layout;
+            dispatch_block_t copyCurrentKeyboardLayoutInputSource = ^{
+                key_layout = TISCopyCurrentKeyboardLayoutInputSource();
+            };
+            /* This is an ugly ant-pattern, but it is more expedient to address the problem right now. */
+            if (pthread_main_np()) {
+                copyCurrentKeyboardLayoutInputSource();
+            } else {
+                dispatch_sync(dispatch_get_main_queue(), copyCurrentKeyboardLayoutInputSource);
+            }
+
             TISInputSourceRef clear;
             if (CFEqual(key_layout, last_key_layout)) {
                 CFRelease(key_layout);
diff --git a/hw/xquartz/X11Controller.m b/hw/xquartz/X11Controller.m
index 3efda50..e21aed0 100644
--- a/hw/xquartz/X11Controller.m
+++ b/hw/xquartz/X11Controller.m
@@ -36,6 +36,7 @@
 
 #import "X11Controller.h"
 #import "X11Application.h"
+#import "NSUserDefaults+XQuartzDefaults.h"
 
 #include "opaque.h"
 #include "darwin.h"
@@ -61,8 +62,8 @@ extern char *bundle_id_prefix;
 @property (nonatomic, readwrite, strong) NSMenuItem *check_for_updates_item; // Programatically enabled
 #endif
 
-@property (nonatomic, readwrite, strong) NSArray *apps;
-@property (nonatomic, readwrite, strong) NSMutableArray *table_apps;
+@property (nonatomic, readwrite, strong) NSArray <NSArray <NSString *> *> *apps;
+@property (nonatomic, readwrite, strong) NSMutableArray <NSMutableArray <NSString *> *> *table_apps;
 @property (nonatomic, readwrite, assign) NSInteger windows_menu_nitems;
 @property (nonatomic, readwrite, assign) int checked_window_item;
 @property (nonatomic, readwrite, assign) x_list *pending_apps;
@@ -74,21 +75,19 @@ extern char *bundle_id_prefix;
 - (void) awakeFromNib
 {
     X11Application *xapp = NSApp;
-    NSArray *array;
 
     /* Point X11Application at ourself. */
     xapp.controller = self;
 
-    array = [xapp prefs_get_array:@PREFS_APPSMENU];
-    if (array != nil) {
-        int count;
+    NSUserDefaults * const defaults = NSUserDefaults.xquartzDefaults;
+    NSArray *appsMenu = [defaults arrayForKey:XQuartzPrefKeyAppsMenu];
+
+    if (appsMenu) {
+        int count = appsMenu.count;
 
         /* convert from [TITLE1 COMMAND1 TITLE2 COMMAND2 ...]
            to [[TITLE1 COMMAND1] [TITLE2 COMMAND2] ...] format. */
-
-        count = [array count];
-        if (count > 0
-            && ![[array objectAtIndex:0] isKindOfClass:[NSArray class]]) {
+        if (count > 0 && ![appsMenu[0] isKindOfClass:NSArray.class]) {
             int i;
             NSMutableArray *copy, *sub;
 
@@ -96,24 +95,24 @@ extern char *bundle_id_prefix;
 
             for (i = 0; i < count / 2; i++) {
                 sub = [[NSMutableArray alloc] initWithCapacity:3];
-                [sub addObject:[array objectAtIndex:i * 2]];
-                [sub addObject:[array objectAtIndex:i * 2 + 1]];
+                [sub addObject:appsMenu[i * 2]];
+                [sub addObject:appsMenu[i * 2 + 1]];
                 [sub addObject:@""];
                 [copy addObject:sub];
                 [sub release];
             }
 
-            array = copy;
+            appsMenu = copy;
+            [defaults setObject:appsMenu forKey:XQuartzPrefKeyAppsMenu];
         }
 
-        [self set_apps_menu:array];
+        [self set_apps_menu:appsMenu];
     }
 
-    [[NSNotificationCenter defaultCenter]
-     addObserver: self
-        selector: @selector(apps_table_done:)
-            name: NSWindowWillCloseNotification
-          object: self.apps_table.window];
+    [NSNotificationCenter.defaultCenter addObserver:self
+                                           selector:@selector(apps_table_done:)
+                                               name:NSWindowWillCloseNotification
+                                             object:self.apps_table.window];
 }
 
 - (void) item_selected:sender
@@ -156,10 +155,10 @@ extern char *bundle_id_prefix;
     self.apps = nil;
 }
 
-- (void) prepend_apps_item:(NSArray *)list index:(int)i menu:(NSMenu *)menu
+- (void) prepend_apps_item:(NSArray <NSArray <NSString *> *> *)list index:(int)i menu:(NSMenu *)menu
 {
     NSString *title, *shortcut = @"";
-    NSArray *group;
+    NSArray <NSString *> *group;
     NSMenuItem *item;
 
     group = [list objectAtIndex:i];
@@ -183,7 +182,7 @@ extern char *bundle_id_prefix;
     [item setTag:i + 1];                  /* can't be zero, so add one */
 }
 
-- (void) install_apps_menu:(NSArray *)list
+- (void) install_apps_menu:(NSArray <NSArray <NSString *> *> *)list
 {
     NSMenu *menu;
     int i, count;
@@ -207,7 +206,7 @@ extern char *bundle_id_prefix;
     self.apps = list;
 }
 
-- (void) set_window_menu:(NSArray *)list
+- (void) set_window_menu:(NSArray <NSArray <NSString *> *> *)list
 {
     NSMenu * const menu = X11App.windowsMenu;
     NSMenu * const dock_menu = self.dock_menu;
@@ -303,7 +302,7 @@ extern char *bundle_id_prefix;
     self.checked_window_item = n;
 }
 
-- (void) set_apps_menu:(NSArray *)list
+- (void) set_apps_menu:(NSArray <NSArray <NSString *> *> *)list
 {
     [self remove_apps_menu];
     [self install_apps_menu:list];
@@ -349,9 +348,12 @@ extern char *bundle_id_prefix;
     int stdout_pipe[2];
     int stderr_pipe[2];
 
-    newargv[0] = [X11App prefs_get_string:@PREFS_LOGIN_SHELL default:"/bin/sh"];
+    NSUserDefaults * const defaults = NSUserDefaults.xquartzDefaults;
+    NSString * const shell = [defaults stringForKey:XQuartzPrefKeyLoginShell];
+
+    newargv[0] = shell.fileSystemRepresentation;
     newargv[1] = "-c";
-    newargv[2] = [filename UTF8String];
+    newargv[2] = filename.fileSystemRepresentation;
     newargv[3] = NULL;
 
     s = getenv("DISPLAY");
@@ -446,7 +448,7 @@ extern char *bundle_id_prefix;
 {
     int tag;
     NSString *item;
-    NSArray * const apps = self.apps;
+    NSArray <NSArray <NSString *> *> * const apps = self.apps;
 
     tag = [sender tag] - 1;
     if (apps == nil || tag < 0 || tag >= [apps count])
@@ -460,15 +462,18 @@ extern char *bundle_id_prefix;
 - (IBAction) apps_table_show:sender
 {
     NSArray *columns;
-    NSMutableArray *oldapps = self.table_apps;
+    NSMutableArray <NSMutableArray <NSString *> *> * const oldapps = self.table_apps;
     NSTableView * const apps_table = self.apps_table;
 
-    NSMutableArray * const table_apps = [[NSMutableArray alloc] initWithCapacity:1];
+    NSMutableArray <NSMutableArray <NSString *> *> * const table_apps = [[NSMutableArray alloc] initWithCapacity:1];
     self.table_apps = table_apps;
 
-    NSArray * const apps = self.apps;
-    if (apps != nil)
-        [table_apps addObjectsFromArray:apps];
+    NSArray <NSArray <NSString *> *> * const apps = self.apps;
+    if (apps != nil) {
+        for (NSArray <NSString *> * row in apps) {
+            [table_apps addObject:row.mutableCopy];
+        }
+    }
 
     columns = [apps_table tableColumns];
     [[columns objectAtIndex:0] setIdentifier:@"0"];
@@ -487,15 +492,15 @@ extern char *bundle_id_prefix;
 
 - (IBAction) apps_table_done:sender
 {
-    NSMutableArray * const table_apps = self.table_apps;
+    NSMutableArray <NSMutableArray <NSString *> *> * const table_apps = self.table_apps;
     NSTableView * const apps_table = self.apps_table;
     [apps_table deselectAll:sender];    /* flush edits? */
 
     [self remove_apps_menu];
     [self install_apps_menu:table_apps];
 
-    [NSApp prefs_set_array:@PREFS_APPSMENU value:table_apps];
-    [NSApp prefs_synchronize];
+    NSUserDefaults * const defaults = NSUserDefaults.xquartzDefaults;
+    [defaults setObject:table_apps forKey:XQuartzPrefKeyAppsMenu];
 
     [[apps_table window] orderOut:sender];
 
@@ -505,7 +510,7 @@ extern char *bundle_id_prefix;
 - (IBAction) apps_table_new:sender
 {
     NSMutableArray *item;
-    NSMutableArray * const table_apps = self.table_apps;
+    NSMutableArray <NSMutableArray <NSString *> *> * const table_apps = self.table_apps;
     NSTableView * const apps_table = self.apps_table;
 
     int row = [apps_table selectedRow], i;
@@ -534,10 +539,10 @@ extern char *bundle_id_prefix;
 
 - (IBAction) apps_table_duplicate:sender
 {
-    NSMutableArray * const table_apps = self.table_apps;
+    NSMutableArray <NSMutableArray <NSString *> *> * const table_apps = self.table_apps;
     NSTableView * const apps_table = self.apps_table;
     int row = [apps_table selectedRow], i;
-    NSObject *item;
+    NSMutableArray <NSString *> *item;
 
     if (row < 0) {
         [self apps_table_new:sender];
@@ -560,7 +565,7 @@ extern char *bundle_id_prefix;
 
 - (IBAction) apps_table_delete:sender
 {
-    NSMutableArray * const table_apps = self.table_apps;
+    NSMutableArray <NSMutableArray <NSString *> *> * const table_apps = self.table_apps;
     NSTableView * const apps_table = self.apps_table;
     int row = [apps_table selectedRow];
 
@@ -584,7 +589,7 @@ extern char *bundle_id_prefix;
 
 - (NSInteger) numberOfRowsInTableView:(NSTableView *)tableView
 {
-    NSMutableArray * const table_apps = self.table_apps;
+    NSMutableArray <NSMutableArray <NSString *> *> * const table_apps = self.table_apps;
     if (table_apps == nil) return 0;
 
     return [table_apps count];
@@ -593,7 +598,7 @@ extern char *bundle_id_prefix;
 - (id)             tableView:(NSTableView *)tableView
    objectValueForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row
 {
-    NSMutableArray * const table_apps = self.table_apps;
+    NSMutableArray <NSMutableArray <NSString *> *> * const table_apps = self.table_apps;
     NSArray *item;
     int col;
 
@@ -611,8 +616,8 @@ extern char *bundle_id_prefix;
 - (void) tableView:(NSTableView *)tableView setObjectValue:(id)object
     forTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row
 {
-    NSMutableArray * const table_apps = self.table_apps;
-    NSMutableArray *item;
+    NSMutableArray <NSMutableArray <NSString *> *> * const table_apps = self.table_apps;
+    NSMutableArray <NSString *> *item;
     int col;
 
     if (table_apps == nil) return;
@@ -672,15 +677,15 @@ extern char *bundle_id_prefix;
 
 - (IBAction) enable_fullscreen_changed:sender
 {
-    XQuartzRootlessDefault = !self.enable_fullscreen.intValue;
+    XQuartzRootlessDefault = !self.enable_fullscreen.state;
 
     [self.enable_fullscreen_menu setEnabled:!XQuartzRootlessDefault];
     [self.enable_fullscreen_menu_text setTextColor:XQuartzRootlessDefault ? NSColor.disabledControlTextColor : NSColor.controlTextColor];
 
     DarwinSendDDXEvent(kXquartzSetRootless, 1, XQuartzRootlessDefault);
 
-    [NSApp prefs_set_boolean:@PREFS_ROOTLESS value:XQuartzRootlessDefault];
-    [NSApp prefs_synchronize];
+    NSUserDefaults * const defaults = NSUserDefaults.xquartzDefaults;
+    [defaults setBool:XQuartzRootlessDefault forKey:XQuartzPrefKeyRootless];
 }
 
 - (IBAction) toggle_fullscreen:sender
@@ -693,55 +698,43 @@ extern char *bundle_id_prefix;
     if (!sender)
         return;
 
+    NSUserDefaults * const defaults = NSUserDefaults.xquartzDefaults;
+
     if (sender == self.fake_buttons) {
-        darwinFakeButtons = self.fake_buttons.intValue;
-        [NSApp prefs_set_boolean:@PREFS_FAKEBUTTONS value:darwinFakeButtons];
-    }
-    else if (sender == self.enable_keyequivs) {
-        XQuartzEnableKeyEquivalents = self.enable_keyequivs.intValue;
-        [NSApp prefs_set_boolean:@PREFS_KEYEQUIVS value:
-         XQuartzEnableKeyEquivalents];
-    }
-    else if (sender == self.sync_keymap) {
-        darwinSyncKeymap = self.sync_keymap.intValue;
-        [NSApp prefs_set_boolean:@PREFS_SYNC_KEYMAP value:darwinSyncKeymap];
-    }
-    else if (sender == self.enable_fullscreen_menu) {
-        XQuartzFullscreenMenu = self.enable_fullscreen_menu.intValue;
-        [NSApp prefs_set_boolean:@PREFS_FULLSCREEN_MENU value:
-         XQuartzFullscreenMenu];
-    }
-    else if (sender == self.option_sends_alt) {
+        darwinFakeButtons = !!self.fake_buttons.state;
+        [defaults setBool:darwinFakeButtons forKey:XQuartzPrefKeyFakeButtons];
+    } else if (sender == self.enable_keyequivs) {
+        XQuartzEnableKeyEquivalents = !!self.enable_keyequivs.state;
+        [defaults setBool:XQuartzEnableKeyEquivalents forKey:XQuartzPrefKeyKeyEquivs];
+    } else if (sender == self.sync_keymap) {
+        darwinSyncKeymap = !!self.sync_keymap.state;
+        [defaults setBool:darwinSyncKeymap forKey:XQuartzPrefKeySyncKeymap];
+    } else if (sender == self.enable_fullscreen_menu) {
+        XQuartzFullscreenMenu = !!self.enable_fullscreen_menu.state;
+        [defaults setBool:XQuartzFullscreenMenu forKey:XQuartzPrefKeyFullscreenMenu];
+    } else if (sender == self.option_sends_alt) {
         BOOL prev_opt_sends_alt = XQuartzOptionSendsAlt;
 
-        XQuartzOptionSendsAlt = self.option_sends_alt.intValue;
-        [NSApp prefs_set_boolean:@PREFS_OPTION_SENDS_ALT value:
-         XQuartzOptionSendsAlt];
+        XQuartzOptionSendsAlt = !!self.option_sends_alt.state;
+        [defaults setBool:XQuartzOptionSendsAlt forKey:XQuartzPrefKeyOptionSendsAlt];
 
         if (prev_opt_sends_alt != XQuartzOptionSendsAlt)
             QuartsResyncKeymap(TRUE);
-    }
-    else if (sender == self.click_through) {
-        [NSApp prefs_set_boolean:@PREFS_CLICK_THROUGH value:self.click_through.intValue];
-    }
-    else if (sender == self.focus_follows_mouse) {
-        [NSApp prefs_set_boolean:@PREFS_FFM value:self.focus_follows_mouse.intValue];
-    }
-    else if (sender == self.focus_on_new_window) {
-        [NSApp prefs_set_boolean:@PREFS_FOCUS_ON_NEW_WINDOW value:self.focus_on_new_window.intValue];
-    }
-    else if (sender == self.enable_auth) {
-        [NSApp prefs_set_boolean:@PREFS_NO_AUTH value:!self.enable_auth.intValue];
-    }
-    else if (sender == self.enable_tcp) {
-        [NSApp prefs_set_boolean:@PREFS_NO_TCP value:!self.enable_tcp.intValue];
-    }
-    else if (sender == self.depth) {
-        [NSApp prefs_set_integer:@PREFS_DEPTH value:self.depth.selectedTag];
-    }
-    else if (sender == self.sync_pasteboard) {
+    } else if (sender == self.click_through) {
+        [defaults setBool:!!self.click_through.state forKey:XQuartzPrefKeyClickThrough];
+    } else if (sender == self.focus_follows_mouse) {
+        [defaults setBool:!!self.focus_follows_mouse.state forKey:XQuartzPrefKeyFocusFollowsMouse];
+    } else if (sender == self.focus_on_new_window) {
+        [defaults setBool:!!self.focus_on_new_window.state forKey:XQuartzPrefKeyFocusOnNewWindow];
+    } else if (sender == self.enable_auth) {
+        [defaults setBool:!self.enable_auth.state forKey:XQuartzPrefKeyNoAuth];
+    } else if (sender == self.enable_tcp) {
+        [defaults setBool:!self.enable_tcp.state forKey:XQuartzPrefKeyNoTCP];
+    } else if (sender == self.depth) {
+        [defaults setInteger:self.depth.selectedTag forKey:XQuartzPrefKeyDepth];
+    } else if (sender == self.sync_pasteboard) {
         BOOL pbproxy_active = self.sync_pasteboard.intValue;
-        [NSApp prefs_set_boolean:@PREFS_SYNC_PB value:pbproxy_active];
+        [defaults setBool:pbproxy_active forKey:XQuartzPrefKeySyncPasteboard];
 
         [self.sync_pasteboard_to_clipboard setEnabled:pbproxy_active];
         [self.sync_pasteboard_to_primary setEnabled:pbproxy_active];
@@ -751,33 +744,27 @@ extern char *bundle_id_prefix;
         // setEnabled doesn't do this...
         [self.sync_text1 setTextColor:pbproxy_active ? NSColor.controlTextColor : NSColor.disabledControlTextColor];
         [self.sync_text2 setTextColor:pbproxy_active ? NSColor.controlTextColor : NSColor.disabledControlTextColor];
-    }
-    else if (sender == self.sync_pasteboard_to_clipboard) {
-        [NSApp prefs_set_boolean:@PREFS_SYNC_PB_TO_CLIPBOARD value:self.sync_pasteboard_to_clipboard.intValue];
-    }
-    else if (sender == self.sync_pasteboard_to_primary) {
-        [NSApp prefs_set_boolean:@PREFS_SYNC_PB_TO_PRIMARY value:self.sync_pasteboard_to_primary.intValue];
-    }
-    else if (sender == self.sync_clipboard_to_pasteboard) {
-        [NSApp prefs_set_boolean:@PREFS_SYNC_CLIPBOARD_TO_PB value:self.sync_clipboard_to_pasteboard.intValue];
-    }
-    else if (sender == self.sync_primary_immediately) {
-        [NSApp prefs_set_boolean:@PREFS_SYNC_PRIMARY_ON_SELECT value:self.sync_primary_immediately.intValue];
-    }
-    else if (sender == self.scroll_in_device_direction) {
-        XQuartzScrollInDeviceDirection = self.scroll_in_device_direction.intValue;
-        [NSApp prefs_set_boolean:@PREFS_SCROLL_IN_DEV_DIRECTION value:XQuartzScrollInDeviceDirection];
+    } else if (sender == self.sync_pasteboard_to_clipboard) {
+        [defaults setBool:!!self.sync_pasteboard_to_clipboard.state forKey:XQuartzPrefKeySyncPasteboardToClipboard];
+    } else if (sender == self.sync_pasteboard_to_primary) {
+        [defaults setBool:!!self.sync_pasteboard_to_primary.state forKey:XQuartzPrefKeySyncPasteboardToPrimary];
+    } else if (sender == self.sync_clipboard_to_pasteboard) {
+        [defaults setBool:!!self.sync_clipboard_to_pasteboard.state forKey:XQuartzPrefKeySyncClipboardToPasteBoard];
+    } else if (sender == self.sync_primary_immediately) {
+        [defaults setBool:!!self.sync_primary_immediately.state forKey:XQuartzPrefKeySyncPrimaryOnSelect];
+    } else if (sender == self.scroll_in_device_direction) {
+        XQuartzScrollInDeviceDirection = !!self.scroll_in_device_direction.state;
+        [defaults setBool:XQuartzScrollInDeviceDirection forKey:XQuartzPrefKeyScrollInDeviceDirection];
     }
 
-    [NSApp prefs_synchronize];
-
     DarwinSendDDXEvent(kXquartzReloadPreferences, 0);
 }
 
 - (IBAction) prefs_show:sender
 {
-    BOOL pbproxy_active =
-        [NSApp prefs_get_boolean:@PREFS_SYNC_PB default:YES];
+    NSUserDefaults * const defaults = NSUserDefaults.xquartzDefaults;
+
+    BOOL pbproxy_active = [defaults boolForKey:XQuartzPrefKeySyncPasteboard];
 
     [self.scroll_in_device_direction setIntValue:XQuartzScrollInDeviceDirection];
 
@@ -785,20 +772,20 @@ extern char *bundle_id_prefix;
     [self.enable_keyequivs setIntValue:XQuartzEnableKeyEquivalents];
     [self.sync_keymap setIntValue:darwinSyncKeymap];
     [self.option_sends_alt setIntValue:XQuartzOptionSendsAlt];
-    [self.click_through setIntValue:[NSApp prefs_get_boolean:@PREFS_CLICK_THROUGH default:NO]];
-    [self.focus_follows_mouse setIntValue:[NSApp prefs_get_boolean:@PREFS_FFM default:NO]];
-    [self.focus_on_new_window setIntValue:[NSApp prefs_get_boolean:@PREFS_FOCUS_ON_NEW_WINDOW default:YES]];
+    [self.click_through setIntValue:[defaults boolForKey:XQuartzPrefKeyClickThrough]];
+    [self.focus_follows_mouse setIntValue:[defaults boolForKey:XQuartzPrefKeyFocusFollowsMouse]];
+    [self.focus_on_new_window setIntValue:[defaults boolForKey:XQuartzPrefKeyFocusOnNewWindow]];
 
-    [self.enable_auth setIntValue:![NSApp prefs_get_boolean:@PREFS_NO_AUTH default:NO]];
-    [self.enable_tcp setIntValue:![NSApp prefs_get_boolean:@PREFS_NO_TCP default:NO]];
+    [self.enable_auth setIntValue:![defaults boolForKey:XQuartzPrefKeyNoAuth]];
+    [self.enable_tcp setIntValue:![defaults boolForKey:XQuartzPrefKeyNoTCP]];
 
-    [self.depth selectItemAtIndex:[self.depth indexOfItemWithTag:[NSApp prefs_get_integer:@PREFS_DEPTH default:-1]]];
+    [self.depth selectItemAtIndex:[self.depth indexOfItemWithTag:[defaults integerForKey:XQuartzPrefKeyDepth]]];
 
     [self.sync_pasteboard setIntValue:pbproxy_active];
-    [self.sync_pasteboard_to_clipboard setIntValue:[NSApp prefs_get_boolean:@PREFS_SYNC_PB_TO_CLIPBOARD default:YES]];
-    [self.sync_pasteboard_to_primary setIntValue:[NSApp prefs_get_boolean:@PREFS_SYNC_PB_TO_PRIMARY default:YES]];
-    [self.sync_clipboard_to_pasteboard setIntValue:[NSApp prefs_get_boolean:@PREFS_SYNC_CLIPBOARD_TO_PB default:YES]];
-    [self.sync_primary_immediately setIntValue:[NSApp prefs_get_boolean:@PREFS_SYNC_PRIMARY_ON_SELECT default:NO]];
+    [self.sync_pasteboard_to_clipboard setIntValue:[defaults boolForKey:XQuartzPrefKeySyncPasteboardToClipboard]];
+    [self.sync_pasteboard_to_primary setIntValue:[defaults boolForKey:XQuartzPrefKeySyncPasteboardToPrimary]];
+    [self.sync_clipboard_to_pasteboard setIntValue:[defaults boolForKey:XQuartzPrefKeySyncClipboardToPasteBoard]];
+    [self.sync_primary_immediately setIntValue:[defaults boolForKey:XQuartzPrefKeySyncPrimaryOnSelect]];
 
     [self.sync_pasteboard_to_clipboard setEnabled:pbproxy_active];
     [self.sync_pasteboard_to_primary setEnabled:pbproxy_active];
@@ -863,9 +850,11 @@ extern char *bundle_id_prefix;
     NSString *msg;
     NSString *title;
 
-    if (self.can_quit ||
-        [X11App prefs_get_boolean:@PREFS_NO_QUIT_ALERT default:NO])
+    NSUserDefaults * const defaults = NSUserDefaults.xquartzDefaults;
+
+    if (self.can_quit || [defaults boolForKey:XQuartzPrefKeyNoQuitAlert]) {
         return NSTerminateNow;
+    }
 
     /* Make sure we're frontmost. */
     [NSApp activateIgnoringOtherApps:YES];
@@ -887,8 +876,6 @@ extern char *bundle_id_prefix;
 
 - (void) applicationWillTerminate:(NSNotification *)aNotification _X_NORETURN
 {
-    [X11App prefs_synchronize];
-
     /* shutdown the X server, it will exit () for us. */
     DarwinSendDDXEvent(kXquartzQuit, 0);
 
diff --git a/hw/xquartz/bundle/Info.plist.cpp b/hw/xquartz/bundle/Info.plist.cpp
index 6314c71..f576f7e 100644
--- a/hw/xquartz/bundle/Info.plist.cpp
+++ b/hw/xquartz/bundle/Info.plist.cpp
@@ -28,20 +28,45 @@
 		<true/>
 	<key>NSSupportsAutomaticGraphicsSwitching</key>
 		<true/>
+
+	<!-- Add generic usage descriptions for TCC
+	     https://github.com/XQuartz/XQuartz/issues/245
+	  -->
+	<key>NSAppleEventsUsageDescription</key>
+	<string>A process launched by APPLE_APPLICATION_NAME wants to use AppleScript.</string>
+	<key>NSCalendarsUsageDescription</key>
+	<string>A process launched by APPLE_APPLICATION_NAME wants access to your calendar data.</string>
+	<key>NSCameraUsageDescription</key>
+	<string>A process launched by APPLE_APPLICATION_NAME wants access to your camera.</string>
+	<key>NSContactsUsageDescription</key>
+	<string>A process launched by APPLE_APPLICATION_NAME wants access to your contacts.</string>
+	<key>NSLocationAlwaysUsageDescription</key>
+	<string>A process launched by APPLE_APPLICATION_NAME wants access to your location information, even when not in use.</string>
+	<key>NSLocationUsageDescription</key>
+	<string>A process launched by APPLE_APPLICATION_NAME wants access to your location information.</string>
+	<key>NSLocationWhenInUseUsageDescription</key>
+	<string>A process launched by APPLE_APPLICATION_NAME wants access to your location information when in use.</string>
+	<key>NSMicrophoneUsageDescription</key>
+	<string>A process launched by APPLE_APPLICATION_NAME wants access to your microphone.</string>
+	<key>NSRemindersUsageDescription</key>
+	<string>A process launched by APPLE_APPLICATION_NAME wants access to your reminders.</string>
+	<key>NSSystemAdministrationUsageDescription</key>
+	<string>A process launched by APPLE_APPLICATION_NAME wants admin privileges.</string>
+
 #ifdef XQUARTZ_SPARKLE
 	<key>SUEnableAutomaticChecks</key>
 		<true/>
-	<key>SUPublicDSAKeyFile</key>
-		<string>sparkle.pem</string>
+	<key>SUPublicEDKey</key>
+		<string>XQUARTZ_SPARKLE_PUBLIC_EDKEY</string>
         <key>SUFeedURL</key>
                 <string>XQUARTZ_SPARKLE_FEED_URL</string>
 #endif
 	<key>LSApplicationCategoryType</key>
 		<string>public.app-category.utilities</string>
 	<key>NSHumanReadableCopyright</key>
-		<string>© 2003-2021 Apple Inc.
+		<string>© 2003-2023 Apple Inc.
 © 2003 XFree86 Project, Inc.
-© 2003-2021 X.org Foundation, Inc.
+© 2003-2023 X.org Foundation, Inc.
 </string>
 	<key>NSMainNibFile</key>
 		<string>main</string>
diff --git a/hw/xquartz/bundle/Makefile.am b/hw/xquartz/bundle/Makefile.am
index d97de1e..be7d28b 100644
--- a/hw/xquartz/bundle/Makefile.am
+++ b/hw/xquartz/bundle/Makefile.am
@@ -23,10 +23,8 @@ noinst_DATA = $(noinst_PRE:plist.cpp=plist)
 
 CLEANFILES = $(noinst_DATA)
 
-resourcedir=$(libdir)/X11/xserver
-resource_DATA = Xquartz.plist
-
 EXTRA_DIST = \
+	chown-bundle.sh \
 	mk_bundke.sh \
 	X11.sh \
 	Info.plist.cpp \
@@ -181,5 +179,5 @@ EXTRA_DIST = \
 	Resources/zh_TW.lproj/Localizable.strings \
 	Resources/zh_TW.lproj/locversion.plist \
 	Resources/zh_TW.lproj/main.nib/designable.nib \
-	Resources/zh_TW.lproj/main.nib/keyedobjects.nib
+	Resources/zh_TW.lproj/main.nib/keyedobjects.nib \
 	Resources/zh_TW.lproj/main.nib/keyedobjects-110000.nib
diff --git a/hw/xquartz/bundle/Makefile.in b/hw/xquartz/bundle/Makefile.in
index a718196..10d37c7 100644
--- a/hw/xquartz/bundle/Makefile.in
+++ b/hw/xquartz/bundle/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -113,7 +113,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -136,35 +135,7 @@ am__can_run_installinfo = \
     n|no|NO) false;; \
     *) (install-info --version) >/dev/null 2>&1;; \
   esac
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
-    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
-    *) f=$$p;; \
-  esac;
-am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
-am__install_max = 40
-am__nobase_strip_setup = \
-  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
-am__nobase_strip = \
-  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
-am__nobase_list = $(am__nobase_strip_setup); \
-  for p in $$list; do echo "$$p $$p"; done | \
-  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
-  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
-    if (++n[$$2] == $(am__install_max)) \
-      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
-    END { for (dir in files) print dir, files[dir] }'
-am__base_list = \
-  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
-  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-am__uninstall_files_from_dir = { \
-  test -z "$$files" \
-    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
-    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
-         $(am__cd) "$$dir" && rm -f $$files; }; \
-  }
-am__installdirs = "$(DESTDIR)$(resourcedir)"
-DATA = $(noinst_DATA) $(resource_DATA)
+DATA = $(noinst_DATA)
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
 am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/cpprules.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -185,8 +156,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -200,6 +169,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -218,14 +189,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -242,8 +205,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -299,6 +264,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -351,7 +318,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -375,29 +341,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -435,8 +385,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -447,14 +395,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -545,9 +487,8 @@ CPP_FILES_FLAGS =  \
 noinst_PRE = Info.plist.cpp
 noinst_DATA = $(noinst_PRE:plist.cpp=plist)
 CLEANFILES = $(noinst_DATA)
-resourcedir = $(libdir)/X11/xserver
-resource_DATA = Xquartz.plist
 EXTRA_DIST = \
+	chown-bundle.sh \
 	mk_bundke.sh \
 	X11.sh \
 	Info.plist.cpp \
@@ -702,7 +643,8 @@ EXTRA_DIST = \
 	Resources/zh_TW.lproj/Localizable.strings \
 	Resources/zh_TW.lproj/locversion.plist \
 	Resources/zh_TW.lproj/main.nib/designable.nib \
-	Resources/zh_TW.lproj/main.nib/keyedobjects.nib
+	Resources/zh_TW.lproj/main.nib/keyedobjects.nib \
+	Resources/zh_TW.lproj/main.nib/keyedobjects-110000.nib
 
 all: all-am
 
@@ -744,34 +686,12 @@ mostlyclean-libtool:
 
 clean-libtool:
 	-rm -rf .libs _libs
-install-resourceDATA: $(resource_DATA)
-	@$(NORMAL_INSTALL)
-	@list='$(resource_DATA)'; test -n "$(resourcedir)" || list=; \
-	if test -n "$$list"; then \
-	  echo " $(MKDIR_P) '$(DESTDIR)$(resourcedir)'"; \
-	  $(MKDIR_P) "$(DESTDIR)$(resourcedir)" || exit 1; \
-	fi; \
-	for p in $$list; do \
-	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-	  echo "$$d$$p"; \
-	done | $(am__base_list) | \
-	while read files; do \
-	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(resourcedir)'"; \
-	  $(INSTALL_DATA) $$files "$(DESTDIR)$(resourcedir)" || exit $$?; \
-	done
-
-uninstall-resourceDATA:
-	@$(NORMAL_UNINSTALL)
-	@list='$(resource_DATA)'; test -n "$(resourcedir)" || list=; \
-	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-	dir='$(DESTDIR)$(resourcedir)'; $(am__uninstall_files_from_dir)
 tags TAGS:
 
 ctags CTAGS:
 
 cscope cscopelist:
 
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
@@ -809,9 +729,6 @@ check-am: all-am
 check: check-am
 all-am: Makefile $(DATA)
 installdirs:
-	for dir in "$(DESTDIR)$(resourcedir)"; do \
-	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
-	done
 install: install-am
 install-exec: install-exec-am
 install-data: install-data-am
@@ -863,7 +780,7 @@ info: info-am
 
 info-am:
 
-install-data-am: install-resourceDATA
+install-data-am:
 	@$(NORMAL_INSTALL)
 	$(MAKE) $(AM_MAKEFLAGS) install-data-hook
 install-dvi: install-dvi-am
@@ -908,7 +825,7 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am: uninstall-resourceDATA
+uninstall-am:
 	@$(NORMAL_INSTALL)
 	$(MAKE) $(AM_MAKEFLAGS) uninstall-hook
 .MAKE: install-am install-data-am install-strip uninstall-am
@@ -920,11 +837,11 @@ uninstall-am: uninstall-resourceDATA
 	install-data-hook install-dvi install-dvi-am install-exec \
 	install-exec-am install-html install-html-am install-info \
 	install-info-am install-man install-pdf install-pdf-am \
-	install-ps install-ps-am install-resourceDATA install-strip \
-	installcheck installcheck-am installdirs maintainer-clean \
+	install-ps install-ps-am install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
 	maintainer-clean-generic mostlyclean mostlyclean-generic \
 	mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \
-	uninstall-am uninstall-hook uninstall-resourceDATA
+	uninstall-am uninstall-hook
 
 .PRECIOUS: Makefile
 
@@ -939,7 +856,6 @@ uninstall-hook:
 	$(RM) -rf $(DESTDIR)$(APPLE_APPLICATIONS_DIR)/$(APPLE_APPLICATION_NAME).app/Contents/Resources
 	$(RM) -rf $(DESTDIR)$(APPLE_APPLICATIONS_DIR)/$(APPLE_APPLICATION_NAME).app/Contents/Info.plist
 	$(RM) -rf $(DESTDIR)$(APPLE_APPLICATIONS_DIR)/$(APPLE_APPLICATION_NAME).app/Contents/PkgInfo
-	Resources/zh_TW.lproj/main.nib/keyedobjects-110000.nib
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/hw/xquartz/bundle/Resources/French.lproj/main.nib/designable.nib b/hw/xquartz/bundle/Resources/French.lproj/main.nib/designable.nib
index 00a4c2f..8ef2213 100644
--- a/hw/xquartz/bundle/Resources/French.lproj/main.nib/designable.nib
+++ b/hw/xquartz/bundle/Resources/French.lproj/main.nib/designable.nib
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="17701" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="15702" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
     <dependencies>
         <deployment version="1040" identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="17701"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="15702"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
@@ -196,7 +196,7 @@
             <windowStyleMask key="styleMask" titled="YES" closable="YES"/>
             <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
             <rect key="contentRect" x="414" y="417.03906000000001" width="580" height="341"/>
-            <rect key="screenRect" x="0.0" y="0.0" width="1680" height="1025"/>
+            <rect key="screenRect" x="0.0" y="0.0" width="2560" height="1417"/>
             <value key="minSize" type="size" width="320" height="240"/>
             <view key="contentView" id="245" colorLabel="IBBuiltInLabel-Red">
                 <rect key="frame" x="0.0" y="0.0" width="580" height="341"/>
@@ -205,39 +205,39 @@
                     <tabView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="348" colorLabel="IBBuiltInLabel-Red">
                         <rect key="frame" x="13" y="10" width="554" height="325"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                        <font key="font" metaFont="system"/>
+                        <font key="font" metaFont="message"/>
                         <tabViewItems>
                             <tabViewItem label="Entrée" identifier="1" id="349">
-                                <view key="view" id="351" colorLabel="IBBuiltInLabel-Red">
+                                <view key="view" ambiguous="YES" id="351" colorLabel="IBBuiltInLabel-Red">
                                     <rect key="frame" x="10" y="33" width="534" height="279"/>
-                                    <autoresizingMask key="autoresizingMask"/>
+                                    <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                     <subviews>
                                         <button fixedFrame="YES" imageHugsTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="363" colorLabel="IBBuiltInLabel-Red">
                                             <rect key="frame" x="18" y="243" width="402" height="18"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <buttonCell key="cell" type="check" title="Émuler une souris à trois boutons" bezelStyle="regularSquare" imagePosition="leading" alignment="left" inset="2" id="100363">
                                                 <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
-                                                <font key="font" metaFont="system"/>
+                                                <font key="font" metaFont="message"/>
                                             </buttonCell>
                                             <connections>
                                                 <action selector="prefs_changed:" target="196" id="394"/>
                                             </connections>
                                         </button>
                                         <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" preferredMaxLayoutWidth="480" translatesAutoresizingMaskIntoConstraints="NO" id="364" colorLabel="IBBuiltInLabel-Red">
-                                            <rect key="frame" x="36" y="82" width="484" height="42"/>
+                                            <rect key="frame" x="36" y="96" width="461" height="28"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="left" placeholderString="" id="100364">
-                                                <font key="font" metaFont="smallSystem"/>
-                                                <string key="title">Quand cette option est activée, les touches équivalentes de la barre des menus peuvent perturber les applications X11 qui utilisent le modificateur d’instructions virtuelles.</string>
+                                                <font key="font" metaFont="controlContent" size="11"/>
+                                                <string key="title">Quand cette option est activée, les raccourcis système (ex. ⌘Q) qui gênent parfois les applications X11 ne sont pas interprétés localement, mais transmis en l'état à X11.</string>
                                                 <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
                                                 <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
                                             </textFieldCell>
                                         </textField>
                                         <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" preferredMaxLayoutWidth="480" translatesAutoresizingMaskIntoConstraints="NO" id="365" colorLabel="IBBuiltInLabel-Red">
-                                            <rect key="frame" x="36" y="203" width="484" height="34"/>
+                                            <rect key="frame" x="36" y="205" width="484" height="34"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="left" placeholderString="" id="100365">
-                                                <font key="font" metaFont="smallSystem"/>
+                                                <font key="font" metaFont="controlContent" size="11"/>
                                                 <string key="title">Maintenez la touche Option ou Commande enfoncée tout en cliquant pour activer le bouton droit ou central de la souris.
 </string>
                                                 <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
@@ -245,41 +245,32 @@
                                             </textFieldCell>
                                         </textField>
                                         <button fixedFrame="YES" imageHugsTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="368" colorLabel="IBBuiltInLabel-Red">
-                                            <rect key="frame" x="18" y="130" width="402" height="18"/>
+                                            <rect key="frame" x="18" y="126" width="456" height="18"/>
                                             <autoresizingMask key="autoresizingMask"/>
-                                            <buttonCell key="cell" type="check" title="Activer les touches équivalentes sous X11" bezelStyle="regularSquare" imagePosition="leading" alignment="left" inset="2" id="100368">
+                                            <buttonCell key="cell" type="check" title="Echappe les raccourcis système et envoi les touches équivalentes à X11" bezelStyle="regularSquare" imagePosition="leading" alignment="left" inset="2" id="100368">
                                                 <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
-                                                <font key="font" metaFont="system"/>
+                                                <font key="font" metaFont="message"/>
                                             </buttonCell>
                                             <connections>
                                                 <action selector="prefs_changed:" target="196" id="396"/>
                                             </connections>
                                         </button>
-                                        <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" preferredMaxLayoutWidth="480" translatesAutoresizingMaskIntoConstraints="NO" id="369" colorLabel="IBBuiltInLabel-Red">
-                                            <rect key="frame" x="36" y="144" width="484" height="29"/>
-                                            <autoresizingMask key="autoresizingMask"/>
-                                            <textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="left" title="Autorise les modifications du menu d’entrée pour remplacer la disposition des touches du clavier X11." placeholderString="" id="100369">
-                                                <font key="font" metaFont="smallSystem"/>
-                                                <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
-                                                <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
-                                            </textFieldCell>
-                                        </textField>
                                         <button fixedFrame="YES" imageHugsTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="370" colorLabel="IBBuiltInLabel-Red">
                                             <rect key="frame" x="18" y="179" width="402" height="18"/>
                                             <autoresizingMask key="autoresizingMask"/>
-                                            <buttonCell key="cell" type="check" title="Utiliser la disposition des touches du clavier du système" bezelStyle="regularSquare" imagePosition="leading" alignment="left" inset="2" id="100370">
+                                            <buttonCell key="cell" type="check" title="Suivre la disposition des touches du clavier du système" bezelStyle="regularSquare" imagePosition="leading" alignment="left" inset="2" id="100370">
                                                 <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
-                                                <font key="font" metaFont="system"/>
+                                                <font key="font" metaFont="message"/>
                                             </buttonCell>
                                             <connections>
                                                 <action selector="prefs_changed:" target="196" id="395"/>
                                             </connections>
                                         </button>
                                         <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" preferredMaxLayoutWidth="480" translatesAutoresizingMaskIntoConstraints="NO" id="300476" colorLabel="IBBuiltInLabel-Red">
-                                            <rect key="frame" x="36" y="35" width="484" height="28"/>
+                                            <rect key="frame" x="36" y="37" width="484" height="28"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="left" title="Une fois activées, les touches option envoient les symboles Alt_L et Alt_R au lieu de Mode_switch." id="300479">
-                                                <font key="font" metaFont="smallSystem"/>
+                                                <font key="font" metaFont="controlContent" size="11"/>
                                                 <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
                                                 <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
                                             </textFieldCell>
@@ -289,7 +280,7 @@
                                             <autoresizingMask key="autoresizingMask"/>
                                             <buttonCell key="cell" type="check" title="Les touches option envoient Alt_L et Alt_R" bezelStyle="regularSquare" imagePosition="leading" alignment="left" inset="2" id="300478">
                                                 <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
-                                                <font key="font" metaFont="system"/>
+                                                <font key="font" metaFont="message"/>
                                             </buttonCell>
                                             <connections>
                                                 <action selector="prefs_changed:" target="196" id="300480"/>
@@ -300,12 +291,22 @@
                                             <autoresizingMask key="autoresizingMask"/>
                                             <buttonCell key="cell" type="check" title="Faire toujours défiler dans le sens du mouvement des doigts" bezelStyle="regularSquare" imagePosition="leading" alignment="left" inset="2" id="300483" colorLabel="IBBuiltInLabel-Red">
                                                 <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
-                                                <font key="font" metaFont="system"/>
+                                                <font key="font" metaFont="message"/>
                                             </buttonCell>
                                             <connections>
                                                 <action selector="prefs_changed:" target="196" id="300484"/>
                                             </connections>
                                         </button>
+                                        <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" preferredMaxLayoutWidth="480" translatesAutoresizingMaskIntoConstraints="NO" id="369" colorLabel="IBBuiltInLabel-Red">
+                                            <rect key="frame" x="36" y="150" width="484" height="29"/>
+                                            <autoresizingMask key="autoresizingMask"/>
+                                            <textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="left" placeholderString="" id="100369">
+                                                <font key="font" metaFont="controlContent" size="11"/>
+                                                <string key="title">Quand cette option est activée, les modifications du menu d’entrée pour remplacer la disposition des touches du clavier à prise en compte par X11.</string>
+                                                <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+                                                <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+                                            </textFieldCell>
+                                        </textField>
                                     </subviews>
                                 </view>
                             </tabViewItem>
@@ -314,12 +315,12 @@
                                     <rect key="frame" x="10" y="33" width="534" height="279"/>
                                     <autoresizingMask key="autoresizingMask"/>
                                     <subviews>
-                                        <popUpButton verticalHuggingPriority="750" imageHugsTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="382" colorLabel="IBBuiltInLabel-Red">
+                                        <popUpButton verticalHuggingPriority="750" fixedFrame="YES" imageHugsTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="382" colorLabel="IBBuiltInLabel-Red">
                                             <rect key="frame" x="90" y="234" width="128" height="26"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <popUpButtonCell key="cell" type="push" title="du moniteur" bezelStyle="rounded" alignment="left" lineBreakMode="clipping" state="on" borderStyle="borderAndBezel" tag="-1" inset="2" arrowPosition="arrowAtCenter" preferredEdge="maxY" selectedItem="384" id="100382">
                                                 <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
-                                                <font key="font" metaFont="menu"/>
+                                                <font key="font" metaFont="message"/>
                                                 <menu key="menu" title="OtherViews" id="380">
                                                     <items>
                                                         <menuItem title="du moniteur" state="on" tag="-1" id="384"/>
@@ -333,60 +334,60 @@
                                                 <action selector="prefs_changed:" target="196" id="398"/>
                                             </connections>
                                         </popUpButton>
-                                        <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" preferredMaxLayoutWidth="67" translatesAutoresizingMaskIntoConstraints="NO" id="385" colorLabel="IBBuiltInLabel-Red">
+                                        <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" preferredMaxLayoutWidth="67" translatesAutoresizingMaskIntoConstraints="NO" id="385" colorLabel="IBBuiltInLabel-Red">
                                             <rect key="frame" x="17" y="238" width="71" height="20"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="left" title="Couleurs :" placeholderString="" id="100385">
-                                                <font key="font" metaFont="system"/>
+                                                <font key="font" metaFont="message"/>
                                                 <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
                                                 <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
                                             </textFieldCell>
                                         </textField>
-                                        <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" preferredMaxLayoutWidth="388" translatesAutoresizingMaskIntoConstraints="NO" id="386" colorLabel="IBBuiltInLabel-Red">
+                                        <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" preferredMaxLayoutWidth="388" translatesAutoresizingMaskIntoConstraints="NO" id="386" colorLabel="IBBuiltInLabel-Red">
                                             <rect key="frame" x="36" y="216" width="392" height="14"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="left" title="Cette option prend effet au prochain lancement d’X11." placeholderString="" id="100386">
-                                                <font key="font" metaFont="smallSystem"/>
+                                                <font key="font" metaFont="controlContent" size="11"/>
                                                 <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
                                                 <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
                                             </textFieldCell>
                                         </textField>
-                                        <button imageHugsTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="541" colorLabel="IBBuiltInLabel-Red">
+                                        <button fixedFrame="YES" imageHugsTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="541" colorLabel="IBBuiltInLabel-Red">
                                             <rect key="frame" x="18" y="182" width="409" height="23"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <buttonCell key="cell" type="check" title="Mode plein écran" bezelStyle="regularSquare" imagePosition="leading" alignment="left" inset="2" id="100541">
                                                 <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
-                                                <font key="font" metaFont="system"/>
+                                                <font key="font" metaFont="message"/>
                                             </buttonCell>
                                             <connections>
                                                 <action selector="enable_fullscreen_changed:" target="196" id="547"/>
                                             </connections>
                                         </button>
-                                        <button imageHugsTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="300472" colorLabel="IBBuiltInLabel-Red">
+                                        <button fixedFrame="YES" imageHugsTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="300472" colorLabel="IBBuiltInLabel-Red">
                                             <rect key="frame" x="37" y="116" width="468" height="18"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <buttonCell key="cell" type="check" title="Autoriser un accès à la barre des menus en mode plein écran" bezelStyle="regularSquare" imagePosition="leading" alignment="left" inset="2" id="300473" colorLabel="IBBuiltInLabel-Red">
                                                 <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
-                                                <font key="font" metaFont="system"/>
+                                                <font key="font" metaFont="message"/>
                                             </buttonCell>
                                             <connections>
                                                 <action selector="prefs_changed:" target="196" id="300475"/>
                                             </connections>
                                         </button>
-                                        <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" preferredMaxLayoutWidth="480" translatesAutoresizingMaskIntoConstraints="NO" id="543" colorLabel="IBBuiltInLabel-Red">
+                                        <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" preferredMaxLayoutWidth="480" translatesAutoresizingMaskIntoConstraints="NO" id="543" colorLabel="IBBuiltInLabel-Red">
                                             <rect key="frame" x="36" y="145" width="484" height="31"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="left" title="Active la fenêtre root X11. Utilisez le raccourci clavier Commande + Option + A pour ouvrir et fermer le mode plein écran." placeholderString="" id="100543">
-                                                <font key="font" metaFont="smallSystem"/>
+                                                <font key="font" metaFont="controlContent" size="11"/>
                                                 <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
                                                 <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
                                             </textFieldCell>
                                         </textField>
-                                        <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" preferredMaxLayoutWidth="462" translatesAutoresizingMaskIntoConstraints="NO" id="300487" colorLabel="IBBuiltInLabel-Red">
+                                        <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" preferredMaxLayoutWidth="462" translatesAutoresizingMaskIntoConstraints="NO" id="300487" colorLabel="IBBuiltInLabel-Red">
                                             <rect key="frame" x="54" y="79" width="466" height="31"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="left" title="La barre des menus sera visible lorsque le curseur de souris est placé en haut de votre affichage principal." id="300488" colorLabel="IBBuiltInLabel-Red">
-                                                <font key="font" metaFont="smallSystem"/>
+                                                <font key="font" metaFont="controlContent" size="11"/>
                                                 <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
                                                 <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
                                             </textFieldCell>
@@ -399,85 +400,85 @@
                                     <rect key="frame" x="10" y="33" width="534" height="279"/>
                                     <autoresizingMask key="autoresizingMask"/>
                                     <subviews>
-                                        <button imageHugsTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="300424" colorLabel="IBBuiltInLabel-Red">
+                                        <button fixedFrame="YES" imageHugsTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="300424" colorLabel="IBBuiltInLabel-Red">
                                             <rect key="frame" x="18" y="255" width="409" height="23"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <buttonCell key="cell" type="check" title="Activer la synchronisation" bezelStyle="regularSquare" imagePosition="leading" alignment="left" inset="2" id="300440">
                                                 <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
-                                                <font key="font" metaFont="system"/>
+                                                <font key="font" metaFont="message"/>
                                             </buttonCell>
                                             <connections>
                                                 <action selector="prefs_changed:" target="196" id="300465"/>
                                             </connections>
                                         </button>
-                                        <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" preferredMaxLayoutWidth="490" translatesAutoresizingMaskIntoConstraints="NO" id="300423" colorLabel="IBBuiltInLabel-Red">
+                                        <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" preferredMaxLayoutWidth="490" translatesAutoresizingMaskIntoConstraints="NO" id="300423" colorLabel="IBBuiltInLabel-Red">
                                             <rect key="frame" x="36" y="207" width="494" height="42"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="left" id="300441">
-                                                <font key="font" metaFont="smallSystem"/>
+                                                <font key="font" metaFont="controlContent" size="11"/>
                                                 <string key="title">Active la commande de menu « Copier » et permet la synchronisation entre le presse-papiers de OSX, celui de X11 (CLIPBOARD) et les mémoires tampons principales (PRIMARY).</string>
                                                 <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
                                                 <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
                                             </textFieldCell>
                                         </textField>
-                                        <button imageHugsTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="300447" colorLabel="IBBuiltInLabel-Red">
+                                        <button fixedFrame="YES" imageHugsTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="300447" colorLabel="IBBuiltInLabel-Red">
                                             <rect key="frame" x="34" y="129" width="458" height="18"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <buttonCell key="cell" type="check" title="Mettre à jour CLIPBOARD lorsque le presse-papiers est modifié" bezelStyle="regularSquare" imagePosition="leading" alignment="left" inset="2" id="300450">
                                                 <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
-                                                <font key="font" metaFont="system"/>
+                                                <font key="font" metaFont="message"/>
                                             </buttonCell>
                                             <connections>
                                                 <action selector="prefs_changed:" target="196" id="300467"/>
                                             </connections>
                                         </button>
-                                        <button imageHugsTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="300451" colorLabel="IBBuiltInLabel-Red">
+                                        <button fixedFrame="YES" imageHugsTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="300451" colorLabel="IBBuiltInLabel-Red">
                                             <rect key="frame" x="34" y="104" width="495" height="18"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <buttonCell key="cell" type="check" title="Mettre à jour PRIMARY (clic central) lorsque le presse-papiers est modifié" bezelStyle="regularSquare" imagePosition="leading" alignment="left" inset="2" id="300452">
                                                 <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
-                                                <font key="font" metaFont="system"/>
+                                                <font key="font" metaFont="message"/>
                                             </buttonCell>
                                             <connections>
                                                 <action selector="prefs_changed:" target="196" id="300468"/>
                                             </connections>
                                         </button>
-                                        <button imageHugsTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="300457" colorLabel="IBBuiltInLabel-Red">
+                                        <button fixedFrame="YES" imageHugsTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="300457" colorLabel="IBBuiltInLabel-Red">
                                             <rect key="frame" x="34" y="79" width="437" height="18"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <buttonCell key="cell" type="check" title="Mettre à jour le presse-papiers dès la sélection de nouveau texte" bezelStyle="regularSquare" imagePosition="leading" alignment="left" inset="2" id="300458">
                                                 <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
-                                                <font key="font" metaFont="system"/>
+                                                <font key="font" metaFont="message"/>
                                             </buttonCell>
                                             <connections>
                                                 <action selector="prefs_changed:" target="196" id="300469"/>
                                             </connections>
                                         </button>
-                                        <button imageHugsTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="300453" colorLabel="IBBuiltInLabel-Red">
+                                        <button fixedFrame="YES" imageHugsTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="300453" colorLabel="IBBuiltInLabel-Red">
                                             <rect key="frame" x="34" y="192" width="474" height="18"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <buttonCell key="cell" type="check" title="Mettre à jour le presse-papiers lorsque CLIPBOARD est modifié" bezelStyle="regularSquare" imagePosition="leading" alignment="left" inset="2" id="300454">
                                                 <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
-                                                <font key="font" metaFont="system"/>
+                                                <font key="font" metaFont="message"/>
                                             </buttonCell>
                                             <connections>
                                                 <action selector="prefs_changed:" target="196" id="300466"/>
                                             </connections>
                                         </button>
-                                        <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" preferredMaxLayoutWidth="478" translatesAutoresizingMaskIntoConstraints="NO" id="300455" colorLabel="IBBuiltInLabel-Red">
+                                        <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" preferredMaxLayoutWidth="478" translatesAutoresizingMaskIntoConstraints="NO" id="300455" colorLabel="IBBuiltInLabel-Red">
                                             <rect key="frame" x="48" y="158" width="482" height="28"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="left" title="Désactivez cette option si vous voulez utiliser xclipboard, klipper, ou tout autre gestionnaire de presse-papiers X11." id="300456">
-                                                <font key="font" metaFont="smallSystem"/>
+                                                <font key="font" metaFont="controlContent" size="11"/>
                                                 <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
                                                 <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
                                             </textFieldCell>
                                         </textField>
-                                        <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" preferredMaxLayoutWidth="478" translatesAutoresizingMaskIntoConstraints="NO" id="300459" colorLabel="IBBuiltInLabel-Red">
+                                        <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" preferredMaxLayoutWidth="478" translatesAutoresizingMaskIntoConstraints="NO" id="300459" colorLabel="IBBuiltInLabel-Red">
                                             <rect key="frame" x="48" y="47" width="482" height="28"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="left" title="En raison de limitations du protocole X11, cette option ne fonctionnera pas toujours dans certaines applications." id="300460">
-                                                <font key="font" metaFont="smallSystem"/>
+                                                <font key="font" metaFont="controlContent" size="11"/>
                                                 <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
                                                 <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
                                             </textFieldCell>
@@ -490,63 +491,63 @@
                                     <rect key="frame" x="10" y="33" width="534" height="279"/>
                                     <autoresizingMask key="autoresizingMask"/>
                                     <subviews>
-                                        <button imageHugsTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="300359" colorLabel="IBBuiltInLabel-Red">
+                                        <button fixedFrame="YES" imageHugsTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="300359" colorLabel="IBBuiltInLabel-Red">
                                             <rect key="frame" x="15" y="245" width="402" height="18"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <buttonCell key="cell" type="check" title="Activation des fenêtres inactives en un clic" bezelStyle="regularSquare" imagePosition="leading" alignment="left" inset="2" id="300360">
                                                 <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
-                                                <font key="font" metaFont="system"/>
+                                                <font key="font" metaFont="message"/>
                                             </buttonCell>
                                             <connections>
                                                 <action selector="prefs_changed:" target="196" id="300389"/>
                                             </connections>
                                         </button>
-                                        <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" preferredMaxLayoutWidth="501" translatesAutoresizingMaskIntoConstraints="NO" id="300358" colorLabel="IBBuiltInLabel-Red">
+                                        <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" preferredMaxLayoutWidth="501" translatesAutoresizingMaskIntoConstraints="NO" id="300358" colorLabel="IBBuiltInLabel-Red">
                                             <rect key="frame" x="23" y="208" width="505" height="31"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="left" placeholderString="" id="300361">
-                                                <font key="font" metaFont="smallSystem"/>
+                                                <font key="font" metaFont="controlContent" size="11"/>
                                                 <string key="title">En cas d’activation de cette option, si vous cliquez sur une fenêtre inactive, celle-ci deviendra active et le clic sera effectif.</string>
                                                 <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
                                                 <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
                                             </textFieldCell>
                                         </textField>
-                                        <button imageHugsTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="300362" colorLabel="IBBuiltInLabel-Red">
+                                        <button fixedFrame="YES" imageHugsTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="300362" colorLabel="IBBuiltInLabel-Red">
                                             <rect key="frame" x="15" y="184" width="402" height="18"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <buttonCell key="cell" type="check" title="Activation des fenêtres survolées par la souris" bezelStyle="regularSquare" imagePosition="leading" alignment="left" inset="2" id="300363">
                                                 <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
-                                                <font key="font" metaFont="system"/>
+                                                <font key="font" metaFont="message"/>
                                             </buttonCell>
                                             <connections>
                                                 <action selector="prefs_changed:" target="196" id="300390"/>
                                             </connections>
                                         </button>
-                                        <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" preferredMaxLayoutWidth="501" translatesAutoresizingMaskIntoConstraints="NO" id="300364" colorLabel="IBBuiltInLabel-Red">
+                                        <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" preferredMaxLayoutWidth="501" translatesAutoresizingMaskIntoConstraints="NO" id="300364" colorLabel="IBBuiltInLabel-Red">
                                             <rect key="frame" x="23" y="150" width="505" height="28"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="left" title="L’activation des fenêtres X11 suit le curseur. Ceci comporte des effets adverses." placeholderString="" id="300365">
-                                                <font key="font" metaFont="smallSystem"/>
+                                                <font key="font" metaFont="controlContent" size="11"/>
                                                 <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
                                                 <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
                                             </textFieldCell>
                                         </textField>
-                                        <button imageHugsTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="300368" colorLabel="IBBuiltInLabel-Red">
+                                        <button fixedFrame="YES" imageHugsTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="300368" colorLabel="IBBuiltInLabel-Red">
                                             <rect key="frame" x="15" y="140" width="402" height="18"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <buttonCell key="cell" type="check" title="Activation des nouvelles fenêtres" bezelStyle="regularSquare" imagePosition="leading" alignment="left" inset="2" id="300369">
                                                 <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
-                                                <font key="font" metaFont="system"/>
+                                                <font key="font" metaFont="message"/>
                                             </buttonCell>
                                             <connections>
                                                 <action selector="prefs_changed:" target="196" id="300391"/>
                                             </connections>
                                         </button>
-                                        <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" preferredMaxLayoutWidth="501" translatesAutoresizingMaskIntoConstraints="NO" id="300370" colorLabel="IBBuiltInLabel-Red">
+                                        <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" preferredMaxLayoutWidth="501" translatesAutoresizingMaskIntoConstraints="NO" id="300370" colorLabel="IBBuiltInLabel-Red">
                                             <rect key="frame" x="23" y="92" width="505" height="42"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="left" placeholderString="" id="300371">
-                                                <font key="font" metaFont="smallSystem"/>
+                                                <font key="font" metaFont="controlContent" size="11"/>
                                                 <string key="title">Lorsque cette option est activée, la création d’une nouvelle fenêtre X11 fait passer X11.app au premier plan (au lieu de Finder.app, Terminal.app, etc.)</string>
                                                 <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
                                                 <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
@@ -560,53 +561,53 @@
                                     <rect key="frame" x="10" y="33" width="534" height="279"/>
                                     <autoresizingMask key="autoresizingMask"/>
                                     <subviews>
-                                        <button imageHugsTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="374" colorLabel="IBBuiltInLabel-Red">
+                                        <button fixedFrame="YES" imageHugsTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="374" colorLabel="IBBuiltInLabel-Red">
                                             <rect key="frame" x="18" y="243" width="402" height="18"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <buttonCell key="cell" type="check" title="Authentifier les connexions" bezelStyle="regularSquare" imagePosition="leading" alignment="left" inset="2" id="100374">
                                                 <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
-                                                <font key="font" metaFont="system"/>
+                                                <font key="font" metaFont="message"/>
                                             </buttonCell>
                                             <connections>
                                                 <action selector="prefs_changed:" target="196" id="399"/>
                                             </connections>
                                         </button>
-                                        <button imageHugsTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="375" colorLabel="IBBuiltInLabel-Red">
+                                        <button fixedFrame="YES" imageHugsTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="375" colorLabel="IBBuiltInLabel-Red">
                                             <rect key="frame" x="18" y="166" width="402" height="18"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <buttonCell key="cell" type="check" title="Autoriser les connexions de clients réseau" bezelStyle="regularSquare" imagePosition="leading" alignment="left" inset="2" id="100375">
                                                 <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
-                                                <font key="font" metaFont="system"/>
+                                                <font key="font" metaFont="message"/>
                                             </buttonCell>
                                             <connections>
                                                 <action selector="prefs_changed:" target="196" id="401"/>
                                             </connections>
                                         </button>
-                                        <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" preferredMaxLayoutWidth="480" translatesAutoresizingMaskIntoConstraints="NO" id="376" colorLabel="IBBuiltInLabel-Red">
+                                        <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" preferredMaxLayoutWidth="480" translatesAutoresizingMaskIntoConstraints="NO" id="376" colorLabel="IBBuiltInLabel-Red">
                                             <rect key="frame" x="36" y="195" width="484" height="42"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="left" placeholderString="" id="100376">
-                                                <font key="font" metaFont="smallSystem"/>
+                                                <font key="font" metaFont="controlContent" size="11"/>
                                                 <string key="title">Le lancement d’X11 créera des touches de contrôle d’accès Xauthority. Si l’adresse IP du système change, ces touches ne seront plus valides, ce qui risquera d’empêcher le lancement des applications X11.</string>
                                                 <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
                                                 <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
                                             </textFieldCell>
                                         </textField>
-                                        <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" preferredMaxLayoutWidth="480" translatesAutoresizingMaskIntoConstraints="NO" id="377" colorLabel="IBBuiltInLabel-Red">
+                                        <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" preferredMaxLayoutWidth="480" translatesAutoresizingMaskIntoConstraints="NO" id="377" colorLabel="IBBuiltInLabel-Red">
                                             <rect key="frame" x="36" y="104" width="484" height="56"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="left" placeholderString="" id="100377">
-                                                <font key="font" metaFont="smallSystem"/>
+                                                <font key="font" metaFont="controlContent" size="11"/>
                                                 <string key="title">En cas d’activation de cette option, « Authentifier les connexions » doit aussi être activée pour garantir la sécurité du système. En cas de désactivation, les connexions à partir d’applications distantes sont interdites.</string>
                                                 <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
                                                 <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
                                             </textFieldCell>
                                         </textField>
-                                        <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" preferredMaxLayoutWidth="400" translatesAutoresizingMaskIntoConstraints="NO" id="379" colorLabel="IBBuiltInLabel-Red">
+                                        <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" preferredMaxLayoutWidth="400" translatesAutoresizingMaskIntoConstraints="NO" id="379" colorLabel="IBBuiltInLabel-Red">
                                             <rect key="frame" x="17" y="17" width="404" height="14"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="left" title="Ces options prennent effet au prochain lancement d’X11." placeholderString="" id="100379">
-                                                <font key="font" metaFont="smallSystem"/>
+                                                <font key="font" metaFont="controlContent" size="11"/>
                                                 <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
                                                 <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
                                             </textFieldCell>
@@ -618,12 +619,13 @@
                     </tabView>
                 </subviews>
             </view>
+            <point key="canvasLocation" x="132" y="-151"/>
         </window>
         <window title="Menu de l’application X11" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" deferred="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" frameAutosaveName="x11_apps" animationBehavior="default" id="285" userLabel="EditPrograms" customClass="NSPanel" colorLabel="IBBuiltInLabel-Red">
             <windowStyleMask key="styleMask" titled="YES" closable="YES" resizable="YES"/>
             <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
             <rect key="contentRect" x="302" y="440" width="548" height="271"/>
-            <rect key="screenRect" x="0.0" y="0.0" width="1680" height="1025"/>
+            <rect key="screenRect" x="0.0" y="0.0" width="2560" height="1417"/>
             <value key="minSize" type="size" width="320" height="240"/>
             <view key="contentView" id="286">
                 <rect key="frame" x="0.0" y="0.0" width="548" height="271"/>
@@ -634,7 +636,7 @@
                         <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/>
                         <buttonCell key="cell" type="push" title="Dupliquer" bezelStyle="rounded" alignment="center" borderStyle="border" inset="2" id="100292">
                             <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                            <font key="font" metaFont="system"/>
+                            <font key="font" metaFont="message"/>
                         </buttonCell>
                         <connections>
                             <action selector="apps_table_duplicate:" target="196" id="304"/>
@@ -645,7 +647,7 @@
                         <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/>
                         <buttonCell key="cell" type="push" title="Supprimer" bezelStyle="rounded" alignment="center" borderStyle="border" inset="2" id="100293">
                             <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                            <font key="font" metaFont="system"/>
+                            <font key="font" metaFont="message"/>
                         </buttonCell>
                         <connections>
                             <action selector="apps_table_delete:" target="196" id="303"/>
@@ -654,12 +656,12 @@
                     <scrollView fixedFrame="YES" horizontalLineScroll="19" horizontalPageScroll="10" verticalLineScroll="19" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="295">
                         <rect key="frame" x="20" y="20" width="350" height="231"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                        <clipView key="contentView" id="dk6-mg-gE4">
-                            <rect key="frame" x="1" y="1" width="333" height="214"/>
-                            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <clipView key="contentView" ambiguous="YES" id="dk6-mg-gE4">
+                            <rect key="frame" x="1" y="0.0" width="348" height="230"/>
+                            <autoresizingMask key="autoresizingMask"/>
                             <subviews>
-                                <tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnReordering="NO" multipleSelection="NO" autosaveColumns="NO" headerView="300295" id="296">
-                                    <rect key="frame" x="0.0" y="0.0" width="333" height="186"/>
+                                <tableView verticalHuggingPriority="750" ambiguous="YES" allowsExpansionToolTips="YES" columnReordering="NO" multipleSelection="NO" autosaveColumns="NO" headerView="300295" id="296">
+                                    <rect key="frame" x="0.0" y="0.0" width="348" height="202"/>
                                     <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                     <size key="intercellSpacing" width="3" height="2"/>
                                     <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
@@ -671,7 +673,7 @@
                                                 <color key="backgroundColor" white="0.33333298560000002" alpha="1" colorSpace="calibratedWhite"/>
                                             </tableHeaderCell>
                                             <textFieldCell key="dataCell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" alignment="left" title="Text Cell" placeholderString="" id="573">
-                                                <font key="font" metaFont="system"/>
+                                                <font key="font" metaFont="message"/>
                                                 <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
                                                 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                                             </textFieldCell>
@@ -683,7 +685,7 @@
                                                 <color key="backgroundColor" white="0.33333298560000002" alpha="1" colorSpace="calibratedWhite"/>
                                             </tableHeaderCell>
                                             <textFieldCell key="dataCell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" alignment="left" title="Text Cell" placeholderString="" id="574">
-                                                <font key="font" metaFont="system"/>
+                                                <font key="font" metaFont="message"/>
                                                 <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
                                                 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                                             </textFieldCell>
@@ -695,7 +697,7 @@
                                                 <color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/>
                                             </tableHeaderCell>
                                             <textFieldCell key="dataCell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" alignment="left" title="Text Cell" placeholderString="" drawsBackground="YES" id="575">
-                                                <font key="font" metaFont="cellTitle"/>
+                                                <font key="font" metaFont="label" size="12"/>
                                                 <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
                                                 <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
                                             </textFieldCell>
@@ -705,16 +707,16 @@
                                 </tableView>
                             </subviews>
                         </clipView>
-                        <scroller key="horizontalScroller" verticalHuggingPriority="750" horizontal="YES" id="200295">
-                            <rect key="frame" x="1" y="215" width="333" height="15"/>
+                        <scroller key="horizontalScroller" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="200295">
+                            <rect key="frame" x="1" y="214" width="348" height="16"/>
                             <autoresizingMask key="autoresizingMask"/>
                         </scroller>
-                        <scroller key="verticalScroller" verticalHuggingPriority="750" horizontal="NO" id="100295">
-                            <rect key="frame" x="334" y="29" width="15" height="186"/>
+                        <scroller key="verticalScroller" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="100295">
+                            <rect key="frame" x="333" y="28" width="16" height="202"/>
                             <autoresizingMask key="autoresizingMask"/>
                         </scroller>
                         <tableHeaderView key="headerView" wantsLayer="YES" id="300295">
-                            <rect key="frame" x="0.0" y="0.0" width="333" height="28"/>
+                            <rect key="frame" x="0.0" y="0.0" width="348" height="28"/>
                             <autoresizingMask key="autoresizingMask"/>
                         </tableHeaderView>
                     </scrollView>
@@ -723,7 +725,7 @@
                         <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/>
                         <buttonCell key="cell" type="push" title="Ajouter un élément" bezelStyle="rounded" alignment="center" state="on" borderStyle="border" inset="2" id="100310">
                             <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                            <font key="font" metaFont="system"/>
+                            <font key="font" metaFont="message"/>
                         </buttonCell>
                         <connections>
                             <action selector="apps_table_new:" target="196" id="311"/>
diff --git a/hw/xquartz/bundle/Resources/French.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/Resources/French.lproj/main.nib/keyedobjects.nib
index ab5f199e9cae59a061035a4ca81bf776e4204594..b2e1634ff70f98f9b3f146fc9f3600ab02786e83 100644
GIT binary patch
literal 46612
zcmeEvcYG8@*#GS8wY|%3HlZV6AV`yv1VS$fp?3(OLkP){1d?3HCG@g`2m&gIiWHHK
z3MeW?QBc7OVgV^O1Up!<7c9T;vwN3Z8n62L`Mm%92zR%)H#0l)^m(3VW+vt5Wcv$a
zVoo!OaV9exvoi;CvanGNr+W+h*}lBd4buwJv$FARc*8<p{-}n&NmIP(h5kq;E#8!>
zhYw2b@15n%NDLG@#av8bZstkVYxnKm(m%^z=*{ir%PUOD&qyouj<6aXkDsh|a5GJp
z3~5h<9L-dwu^U)Z){MolHmp5c$ZlmT*h+Q>yPK_No7on2KYNlr#g4F}>^b%#JI-EV
zud#R8d+a=WpMA(aV^`SE>=*Vs`%7YyLkg2rshV`X6eZmtwUIhWouwqHhtyLVB#n|r
zOB19tX_7Qm@=JwMku+agBHbb_l~zi3NNc3E(iZ7KX{WSH+ASTBo|K-EUY1^$-jLpr
z-jyy$7p0G-FQhM}ucV))U!*^zKe@tn9>F7dEnb^n#~biy-ki7QZFoHI!n^X`d=MYZ
zhww3cEKlX>d<vh+b9gTI^FltGKfzz;Z}4~dr~EVi75|?9z<=g{$dPhgxt<&?H<DY)
zF><WjUQUn`<(_hXd6Ya_PLn6eUU{;dE$7KTd74}(&zEnK7s*TH74lm7K6#_OP2Mi=
zl=sO8<)`Im<mcsM@^Plhugh=Br{#C#%kmZZTbsk?w0Ue{ws2ddt(vX6t&Xj(E!q}m
z>tO3_>tY*f8*59oO|+%iCfTxWep{h!zHNbRsco6<cH14cRkk&@wYH76O|~7j`)v=|
zp0pjY9km^|y<$6IJ7v3IyJ)*)yKMX1cE$FG?N7VI?zFq?nmx*1-`>F9%zmRi#vX5P
zYwuw1Xiu;YvX8WnvS-=z?bGZ9_L=sZ?ThWV+gI3E+E?4R*|*#G*$>$d+n=^SZ$D{2
zWq-&1uKhjxhxTvmSM0yof3^SSU=Ga@?x^Qz<Y??@;%Mm@;uz`}=16u7cZ_wUI;J^_
z9Kx~CvCOgDajRpUV~b;}W1C~I<0;1>$6?1Sj#G{|9j6`dInF!YcYNyj%yG%_x#J7R
z_l`dte>(nha;M^SJF7aQoeiDMoh_W5on4$goxPmHohi=o&I!&`=R{|wGtW88x!AeH
zxx%^9xzV}FdB5`k=YHn_=hMz-oF|;GI?p)IIzMuL?EKRCmGd{}RhR6txvIFTx~_B8
zaW!+@=!$c-cC~TEyE?mix`w+_T;p96Tsf{>SCMPFYmw__*KMxbT`OEGU8`O9xpuoA
za_x5=a6RvO!S$-^HP?C9`>s!2pSdo%F1x;TedYSv^^NO_>s!}%t{+`Lxqf&3p~#9&
zaVs7rLWxvrDz%jBl_;f=(pYJsv{c$C@k%G9v(jBjQu-);m4V7IC0QAzj8-NnsY-_8
zRi-FYm3(EIGF_RW%u(hlLRqLRQEpLgQ|?o?D-S3SDtncE%6{cZ<(P6pc~v>BoKemy
z?<(&pA1GIp@0A~v-<3a<Ki#t1=2qNpceq=3S94c)U+1pluJ3N(ZtQO2ZsBg}ZtZU4
z?%?j|?&eN#_jLDi_jeC)4|NZ7k93c6k9SXSr@J%U+3qQBpF7`O<eu)H<DTml?uG6p
z?pr+3o<^R=p7x#&o{pYQp6;Gh&t%UO&s0y2$LH~T3O$QGOFXxDmV4HF?)7Z&Z1(K-
zJmh)Iv(NLm=Lye2&y${~!bYeanA_Gu_Q;=Tb>!yC!#1B*SF7h~r(Lf_Y4vThwFX+W
z)=;}aYos;SnrKaJH*3wb8@1+I3$3NrN{i8AwK%P{)<%oh+G_2z_F4z6qqIotq;=N1
zXkE2#T7s6Sb=Q)#9$HVWm)2YBqxIGLY5lbU+CXiPHdq^?4b_He$=Yx&MH``w)JAEe
zwK4K<+E{IzHeQ>crD_wkG;NZWu4QOmZL*fBWog;k6m6=OqvdLOnorBurfCJ5Un|s#
zwCUOmZKgI$o2|{!=4$h_`Pu@_(1f;7yGdK5-K;IvmT0$VOSNU%a_v^_Htlw8g|<?=
zLtCZYsokaBt*zGX(bi~dwRPHh?OttzcAvIU+oWyQwrE?mZQ6EihjzdAfcBuaQ`@EO
z)*jLx*7j(RXpd@-X?wMO+J5bT_PF+hc2Ij#drCW`9oC-Kp3$Dwj%Y`<=d|aw7ql0(
zm$a9)W7=`;743xfs`i@py7q>4Qah!+sh!r&XlJ!^+FRP&+B@32+I!l0?S1Wnc2WC4
z`%wEx`&j!#`&9c(yQE##KG(j`zSO?bzSh3cu4vzDKczIxE6T}vmxVK(MX*R#g;izM
zSanu|)nv6;ZFU{2!|Jkn?0Oc3R|6K!8jcv0Jj~}S96u;I$(NT0?FPN)A2%p@aCU}&
zL|RUf*KaDi!ItK;?x1ksJM<rZuQez+F+JVu_h(Pa&dDyE6<SvxlsqCEKje5vX6I%2
zW}tYD3W`_UP@qe`0{@7H={aeB{}`)dRNCN%Q}AwrcM-gfkn0<Eya_o<$PEPVdWto|
zm>aVuV=*wQIVdgHYsiKTeNW7X=1)(fk)C2VvgWJ>YdOYhKM$owS(je_1XL~Z7y5Fo
z!EQmhR-=MLKgDA4fH>9~T?*)P|0cs>H5kv@0)zvL3ezy|WN+bC7SGzTRw;v$@x`jy
zfr&kOZ`P4@Vx3tR)|GW*2`rIyXGyFF>&bet-mDMn%lfhYYyca`2C>0x2ph_Vv1B%!
zrLYlfBpby>voUNe8^^}82`rUOWNB;?OJ^C(%O<l-mc_E!6gHLRuw0hMd@P?$V+G95
z3Rw}G&StQgY!;i%=CHYJ9-Ge=FvD;es?o@pVazi28qXL<jI+jD#yiG)#z)3w;~V2Q
zA#owOgcL5MYC^hBNDYMappbS6=^-KQ5z?bV+AE~}LV8?C2Zi*MkPZv!86h1N((^)k
zQAjTf>9~+i2<bH;y&<GiLOLy^vqE}bNS_GlGa-E~q$@)DPDnop=_eumA|yQYcOm^L
zI1`);ZWG)gxJz)i;9-Jmg6o1u3SL$4>Vnr4ytWa228g+dEn+vb#cT<vekohVmIHCg
zzM_J3F9@KA*I$^OXA;23LCFKsCV6vG^&5cgtn8c&&|G1GFDJ)akW}C`%Orbqz!$y(
zlZ3)RcZ%ULm_=c?u_lHaR5dC#wxr^y4AjVk$!Af+Dt2e8UUg9NpzKM5iwbkRg~epO
zm91iTu~r~7{8oIoZ2#A=wQRXT57vwu4E83wmu<ih?_(R;CiH)JHrfQ45A^00^@YXh
zH^L3wXgHj{TeP;7i7jj!+ipY{0M9$@0rnu<i57OT-RvRuFxuP09${<PV{9+m$M&-W
zct5}n0#XC>yt%%-?DPS?bO;J+F;$N+&EB5Vin6B<^koc8^G`*=zW!uyep*2qz%&{x
zlGiskEz=9u0H>NI!47@>J+l485E;Z9*)zQvW}(OhfBp5Bp+!PuF{74ZR52nIBhsib
z<V|)6eLT#bX3wx^L)jSM8s_zz$TU$>)u?V%10c-iOld_OP0I47Pt8p$m}(*6dG<o8
z4q;?*bg=#w_B?A9`k-S5wN}$CO0AgvOfD?O<q7sGMn%66sJE~atkt{4@FZxy&fWk#
zPliBrKRd(D;_of?HaiG19G+H?=`945l8Ywgq9NQ$G{r8^TMNUlW7Nanbw*vI#<&ns
z<sUM^Z&k2LcMQ_OTkIm+g!0!L4J~wkMCksQePToz^(#mB*|O-yLqov-R;f{06k=7O
z@%+dRQgO4l4U8IjkWF4ww)h}v@*szDAbb3DFRGCR|6kc}z*|5hCKeQ=&DzR-Wmj1%
zAkO@175jtz86dPR><@_B3}5<Gf_536kYvdg;EBe@bc3A+rEFmLN=~*(QY5$JK_ez@
zG&GtTO^l*Z1Jknes2vkRlE%b#DO}Q}2q{vkVl*@Q8AFUwhR=wu6q%B2!V80!YU8gC
zA=79a06}x3xp5;QEE#ejv@Z>$I#NTUq0s_A_qCqgh>6`&W2uSMRB9&OC^eT_NG+vS
zQj8QU#ThM)7^Ah(#^_*lG`bjFjYK2K=xOvaqR(M~4+14bVuXynQf;s-^`-;*Q47x}
z!f8dQcoxb%AIKnq?*kH|SVmMWD2rGYTLDth4zc}yDM3m^OU=y@#Tl_ijT|7gfL(?v
zxr|RQ(3*~Se^jHP%_|Whfwn?K2(?$j(v<@@&<PAD8Gk7zaILP?G1}rUo`5?l*;_C@
z8+Jx0gvUxL(s)3)9m=$~Ae_p?CL<bxAeHp3RfTZ>FMC}f(4<@wX!+7K0$L=n1K|Z6
zbT&E}HGFy<DDpJGJ{_tyhu8pEAP7c575hvDO*o=ovdz1fQL+Fv@`k4U%U-@6%CFJ_
zOQshi_a<qPbTc~$17vtwW&p_vdNZS&QDZD5__QK#K@>=LXx6m`dy{l~F@+=;-HjTl
zdStM2j@KWRR#aHv^<T3iK=2}Ib#W_oj2=df@xy&Zg;8mfCugT;c?<sK@GI<hfU<W;
z_ZL60kI@@L9$J)LSQr@cv~eI4lCxf-k;+N5g#RCv9<_vdG5_~B`db3KSSCwPm@;`l
zKqgC1K_*Lwq{GHQV^F0s8SR!)!Du&xe<~WJRfPn>s~9ATn}T5Q{~(k9&M?nNXQXqb
z#N04rm@$+%F_Rqw5og1a%mz8<1x78sC!NQrla1j<!!ji-#{7VZ&C-WPiV<DWNX`V%
zbxFF6kqk3OGSV1f)EJTE%g^=}3{C$#z5Y)6PWqu#ug4f;jL}xFdzno5Ir<HO7Ai%4
zldej?LyC+u#u|B<u)c{|1Ldr~|HZ@uoN<YBE^`~Va|d@C<Bf?%y5Th@8`;KGBd6kV
zeP@k}t6aml#+c(uH6~zOy}Sjv7}t!7pb@N9o!2O?HOWXLrmHd}CoLV+n~|31kIL~z
z^?;5XntP2#*cl#G+(;cGgCvxWsl;U<u?Q$6>D~&`C)1KaCTc5XM5|+=G9E)Jk@45)
z29M#f#ofp<GN~K20qe9t7oez2b(38zGD$#^0-GF)59S{_vBIbDb|jPWluq=NNER88
z$yvq}dQ`K2^QdCEO~y=~*%^}9)A5a_Qr^nM)xU=lkTswfN_C7}!gw81L>6Fjng_h6
z6-DJ2cyqxLQTaJ(c@rSN0(0xXDZzLO{zjH!l4-^?BcGULcw%;jH^9(*Bp(lk&Nm7I
zVvJ7&2lF(;Um>OQ6pPX^f-H<+T0j;RLUU82q+rIPuR&96I7U;(u3IV{;?qpKPJy7D
zX|M@t`T71-e{gD1+6r9CXYiSU(zA`n40b_}=5zR5K9A4m3%G&l;zE8CU&L?bi}@0M
z3t!5Yv6_52zm?y{Z|5ucN`41l#qZ>I@w@qIeh**6*Yb6IJ-?T4;P>&3Y&qY|_VKNF
zZQvXE4t_s>0Ph>|w-Z;p=^k_A&K|r!!XM?2@x8dWkMBo~jcgyLIX&Rwx2B!2@~8L8
zNy~))qdI0G)+BR4cAmF8W|>nlk)nwyW`V$TdRF(e0vOA~X|j~$%PGpuL#;;SNb$}X
znU+`R?~Vy9O<{71$cZsH-<#KaKyp#RWQYYkG|5*0GNHmy(9mr;IdHoSpOp_!1WjZy
zf9VmJpPH_lKwm}{WMfjC*(1Baasoll6!(*gWakz6iqMamm}uoed8T`Fa+34Y(ov_6
zH#;+{5L2||qI|Nq=)v`Z4<6vlgtH}QK-w&*`H<GHM>h)6GBZ)%f)LFldtsLC%foCl
zEeGHT^ej1hw%4524f4*UVdwkuGQ0(NTrc7X>(>&P4o9KHob1dzkXNDEk3ciSypxOk
zUVpFb0uy*vE9Q7iKoh)r7x;?uhxukC7tYGTBd;s&LJBG-qo+AuLK$JpoCkMLOP`vF
zI(hIK<oF5#;3R}47GWmr^=Hqf;ZbXt?+p(UK%Gj4ZjRgZkClb+$n1>5ER48!L3Z#_
z(E$RXeg^>=;@B`B3S#KvO#`r~5UOKn7Ov2no_Xe6+<aUR(B8ZZYjR1rNY$f?$8XV4
z&zbp9IiR@VK3~r8?0moR2qsWEGnlbRF@$0~;)+gS)<0v8%Xrk7W6X8AjGd9gq6}6A
z^L+DPbb>2T<{@KVbV984MN!`82l<m=+o$*;ewaTER$T&SUe2H4&w`=%@S|X>=fU$Y
z;`K5=#*g!3xbrGoj?r}QZDIgi)}7Gd$E|b=+{9KO2{<AM2$*e}RD<84Ht9~P4oDKZ
za^dU&-Q~<m%$NeVpPzsN66%}h_ZE`l5!3bQDDO9R3f@G~ZN_ZD8`E1;!5c<M@J}^V
z1aD-pF>_kCY2Q35E+%f?+Zcp_AuQo1F@(90Jg4}Z==2$W20oVM7{c2eJ*Z~!c3(fZ
z1i{7vueXoSPYhK|nFgFr^NslmK)t}2{Vtk4jE0{zn?7VV{WRe8GCz;TF90^jxYhhV
zw$JR~jp$l4^br4zd1z#wGTQ28Y`b~p%$r~0mra^BA6Y^*+xX}F3;rc*Rnd=_Wd|uM
z$d+eK`D*a_=;B<A@EdcS-|^#k=tAoLO{3<-#uIb`&;61AG#*-^L}+c}KUz;T4KMx+
z6I=PO{5O8pxY^iXY{49z|H=Q7nJmei)s$t~Cfj8PKgIURE?JS?2xEldT9d<NozDOZ
z^!4}5$Sx#mC(#FqoCMKT%o_BCTsmnpO(wIPOD5kE6X0uKKV%L>5H(<mAqzMG9sog^
z^{9#LJo8d9RvC+<6ILXcgsscQy^3*9bVAx2=J)7?!Q=0kh)ZMkS-FZ_6>z#kt|nKP
zYsfX_T5@gqI=K!oPu(*01yKR$*CcOry7+z^o){oef27S|3C1$x4&#;x7c-V55Ax-{
zDPJ!~0Y3Esj|SAstn5NdJ3vyA;PwuTY1x|o#dT;O-<BCmO*)Vp$~U02`M51|L)Hp9
zS8gmv$xY;@as&BBxw+gzZb=;^iAO#b64U@{jxUqG1?w71jazkxvD~<AM6wwO2k5d)
zSyVilGw5L)T5gRew2|Y{&$e;{8lo>3!WpawZ3F#fdF;%`nceOl!;)g6VvXC4rKjZ%
za!0un>UWmA$X(@b!-1|InC13ON<v3SPUq-~u>vA$<=}{jEXE?TU{U07fIk;*-rmC!
zM~@mkCd&C9LiaTgHfhPi)6)I<i9?1AKoORQZqR4xe?Of?#sL1k*@D_C{oDWe&7R@)
zr=!%fc+JZ2r{^*zb!N<YDLucSkTInp?nlok%%|%<xUM>N_^>2gk7LXg7O0Ec?E2nh
z3udQB^@b}gs&`s$Zdz1a%ebf^1-{AIITiGpD*bQ%<>nMozv<ugc!l|=Cill@OZ0zH
zMp_TLZjbB7($jh-2d+P#o;_j^t`ivJ4e|@S55sjoTu&;Rnv#g?=D6NHxu91HuDjy;
zt*oLxblrwAx%%v^;UjTf57+(jCJh>l>yEh2O7|y?!F3Z{Z^`oZB|HIU^6~7#zQb{i
z=gD6e_=ZvWW{lZ7XLx(`wC>v`PxbYuJ~Y7neg5gmbl>dr?5rf}C!S?HJ0-2(5L`FH
z^$*^h-c%m#*lXt(4xu*j-QFWFXAnI%0oSX&esjF|Za-U?HJor3$C#r*VZm^!i@rIA
zPtNYu7uUUTJu|DI58cOj9Z%=ym~;l1IDRiE8b)Ks7@fVmc_{=#q6;Ifpl5Gf16IyM
zY=o4CnTHQy9xpsbdF%rgg;_{8<|A~KiK$dBUQy^lbG&++a~7JZkTZ6wS)zb_Qv7?c
z2Gy}VhLce;2lc2Ot0f91Q8}v(%b%EOwtLCEmmYXtOFS>B-ge9<qY!xd5`D|U)j;^B
z>CQ~_FBhLlxLbtZGI1UHlsM2)T)>HJ^?`n;85j8;voTg5YGjztvg*+&t-dAU_dEo$
z$ln$ixvhpR#?~6IPPPHa=7=$$M*g)~tc7{Mvw1K0RPvPupPGp$2A?_&eGMIbD7=C&
zJ_2|ZqU9Wnkb-Q~2S0lAJNi8}P`d=0<`Y-eE^3mWzxwu}eJAWNdrV`GT3C>po&NfY
zE7!o9h2KyNw<v|T!J%|vQc6ZSy1=uLNAiaKefwz^h0l-eXY7}7MR_If+21bi5BYwB
zP$Ae`6p#s6Ti*yb7G(u-;{^<IObnIpX9>=%cBs9O7T{bD!ZXoqg?`P&i!f`s0D7Z8
zX~2gSzO)<yEldw}u$N^i3LNm#+(R{4)Y)5~J;tJT>jz&h9$nNK+Y{s740~zr<h+%&
z^YbU{n0wWmU-B#A!MkM8PlMRP<}r`Nd>OMXW_Qf@G4Gd@h&dPYRm_=~&G_XD`A&Ji
zd>GkAPs%4)6uvzvACV85SG(my_<OXto)so3p|$c9PV|-@plJHFFhEnGv>!?V1g{{p
zsC*DpQ%p)MkBLx<A&mXK9)-43S|V83G35<%L}E23GDG5#?ICIP@fU~84+-}hAk(7;
ze(i(&ksjK0#qh9roccl7BTf%uu|$fE#;-w2pz&pa4hl@^1b;cchxW~qdr^qgm&h}c
zXxX7$C8^*{>q(YO2tG3iSCbz@TF61bJr6ZzpdaM*A#TruED6S0g7_r9r@r~5u_g{H
z=$oycE!Nf-l4&rDvL)K$Z3%&El2)DZN3zNqMGIRu{Myyl!`7bUSm+4Qx&<$iXchN9
zlz+XBj>rz{>1b@WZH~^-!_mjli$ytN>As_tqaUt2P^m%~o6t85PS;rlG_Q{`o#Rn`
z^U_<A*&Yk+Mm7_bVeI>%rY$5@KapNkFx|RmqYpb0A;Xb=QVUu&8rr%AM%50<4hcwZ
z=!ay6;YePXfN^92lLdh6TqY2%Uyh8&yV*KKwznbN^)UQNk0T0v1o@7yAg+1_`HmN%
zzrH}O<4^3WBuP$WIaZNsA<yv!#M0uV_EJ~mI1Z48A;)o|lquyQyK$~`leAn~C9RV-
zBd_sM>7aB(IwqZz-j+U)F2h^=8yvb}yehBD8}U}WJx}EQ`EWj-XYy&tP+SC0(Hg!5
z-kt;e2!91Lw~Lsa{D|p?2R3_s7{l%5Bzdqr1{sM3$V6Nwua>vS4?_mLgnYw`@|W_j
z$Th5Di?X!<7W>#zZ0WXX$R@niw$Ao|?SSoh+ncrzkSX}5UA5OiZeT}yU*rR3+GijS
zaJ7AheZTz$Na#=OKRFzZ>cCGs;BB;HienD)`8GKAIG%N!bbRFa(dl&7a^8siyur>i
zXCd<O);f11|L&CY6X!23kL!A5+4XXbapk!dB9CsT>uJ|1WX)Ywbma!6qcRw|ZnKmX
z$~NS&y{>$sTy;kvGp&nzI5N(JdyV^H_Y3a#+~0dVo(9M=8|umS7@jqrM?5ckKJfe+
z78%woEGcYUSW(#RVfTkU8}@eC_o}KkQWMlMYN2|&`k?xp`o8*$Rt33YeUZPl09jQB
zkn8kyxDtLtcw+d3@Y&(3!}o^29{#1S=#BIwJx!mluh$Ri=ky;Vszk&_435Z+xHV#D
z#IcA=k<Q3Qkv$_bA{Rw&jeIWhqbhQh=qgE7(yQE5Wm}aOs(ez_QMGZ^zE!7GU0(H}
zs;^bOQZ2Gtn`$Gf&8)V*+Tm&!tIO3JRqtCpr}~QOk5xZg{kIx*Yb4h2)>vBO;TorE
z{9N<8nh7<%HJ8=gQ}ayC-)cqG>RD@QtvhNxUh8~qTkU4Ght{4^`@Y&Q)c*3is@HY8
zF8#V?*FARKJ9T)SW_5<unNw$LofCC_tXr>c@4ESQ*VcWm?w9qd*Gs53rQTijp00QK
z`YP9Vy*~T;yRLuc`p=`PMI}b%M6HQ>KI%&SI`#Y1FRH(}{%iHGHfY=+rNP1mdm5aN
zc1O35o*aEw^wH=m4X<xFu;JW>yBfZ8gK|Ur8?tV==Z2SV__<NzMk5<7Y4mubOO0zb
z?%Q~F<6Vv4Yoa#k)?`|fElo~0bu?|?bZXNLP2Xt7o5eTFYPP=F>o@Wn+uoRc<Axhg
zHn%tL&^)jCmgeVLgtbU)F}=mE79X^%-f}?8g)JX%`E{#?t;V#vqt#2T{)~x_$$@rz
zH#Rc1U+luzCu6^hYZjLtw?6K4YqfQ+)(cuc(fZpqH@5M%xv$Mz@m1mn#xIFK8vjSz
zc5MsVKHT<lyN2y1w!638x%O4t4{3jE`<FY|J9O``pu?dKzjkcfv9RM~9lz<+qSMq)
zJ3C$K+_<y1^R~_(b!pHgt;^;v7rRDvo!E6#*NfficT4NGrQ3%I(Fqv|I}$!iY??SF
zad+a^-DA2Jbl>0o=cJBF^OBzJA@}IrV_A>adPeq4>A9}w`@I_U%IvkP*OlJ!z323P
zwvW9}|2}v0IoG#t-}Jr@_Px@tUB7w#p6?&lKe_+9{vQr#HlSd@lLPs{egp3u_}-u!
z2IUQUd@vi_ckrEq&kt!lWZICYhB}508M=Pxr^8~0%^mhqa+T!N<ekYs4evgD#qf7i
znxqt^932rpV%&%aNBlgp$H-M9FOF(8YTl?<M%NylJ^G0;&M_m#>=^Uo*q&qW9{b6-
z_;HKJogLqJ{LJykCe)sgGvRP*cxqbe-ih{!BPZ^h_<P#mv@K~rPU<`9-bq)|lhW@=
z{~{wH<F1U$-Y(u%-p?j?nY?Q9rOYmwcV=GB>Xx-S>&xt<>~-1SPU$mc<CLGL4xW1d
z)W32@=IqIJ<xb2!m=~EhHSc*}J>N{<$^0Ah7w2D`)^Xb1)2<ZsFWBLi{Nw#k6jsFq
z^F&dTqMM68nBH~z`su&S7%^k-%!rwJGf&KFHf!mu&t~_Uy?u^tPWqgqbL-C)b3d4u
zIB)ZOY5t`7M;AmdShV01gi#+5ZZTE7x-e$ps)aw?H1eh=7u8*4Ec)o?-Z$@BtSv5B
zd~QjnB^z(C-I9IFYfD=%UAy$pWf{wkFOONidin3Srr&z}w%FU&-1gV)lW%`*McWnk
zt#qu+TY2`5Zg)JeDq_{_RUh3s@XiBwMcuXRt{?7Bz5CeeHmf(@<G!cpo{MV+ta)N>
z!?i2d{=P12-I?{>*YCNv&b>?T{dq&ihEw+?-1qRtx*L~o{B2YArnfft-h5z7qb;kq
zI<`*V`sub2+g{q<e*1$vYVTOS<B$9E?!WlJum_%hu-$_X?yR$O#V)?9XxHW4<95IC
zP>+Y6c(}#GoA*@Tv-}bENYNvoKRWTzvyb(E?C9S1dmr9+!@hg>SJ}VpfOKHifh&(^
zJ$~_t(NCN_*ze%cCp$g4|EZQw-G8Y5q4kHW9bWOY`{_kb|Mkr5XMTJ(|Jg5(WFGnG
zXzI~-pBweu>F0+&|Jn=vUwHY&UN1iPQsPU`yxisGL&rKEJ9xbP@yB0j`^te6@hA4b
z8vpA4*V?{z;PrN|Kk-I~H=aD%`Q+25x}7@mW{)>tJl*&7D`y6sIe9ka>|5u?oxAu}
z##@)(&UyRWcc#B{^<4u-{Ic`<`PJ{&d4J1=rWf{HY<uzW2R%MG@nQ0Z?|zj2(H9^4
zKmPrbMW3pluKw)$&mO!Kcj?gOUYFnaeC+3+e3Adf)h`!+74g-*UpM)B-!}>0oVYUT
z$|v6zeEZjTw|-yi`}==r^TW{}hy3{dPq{x`{dw6hwSIZv*Y>}@^xMeaKD#>OcjxbG
z{%HEglYjRA^S!@v|N6`FBz2dQOm9xm-?T;U!CIBNW0mVA_b%&PBrn%?xtH8W?ko2r
z-y_yqkl(0Rwig+Cmix}~RMQu@A?f37xYGu}7c@{F1eaQMxhmXhgZT`3s5}hbz~OR=
zJVG8>5>_D3CEUP>S>*c)5Gg>o!wjru`EuYfPcAHg>prq-3`;a-8|#g`jC+hV#+}C6
z2pbzsU5TPco`&8ZE04oN$IBDsRCyx0LIDZ*p(mT(JA5avSabq>2=p()QQf%PSPjQk
zOVg~fd}AqnX_<%xjdVE!mFW8xIi0l{67=I`k{_>oEc|q(J#temj~x7M>&V-N%(ZmX
zMFwNBpUrBwkDR|P2v6%yf$Rq~On)!DYY19wkqeN{R;hP&x;!JqyE;dn%V#LYX5+qq
ze>3HxIl}0K9_D8y{!Ib@=0ej|xyjf#3a-A~G(>ZPgS?prS=KN4xA0mTNtF-c4tZ6`
zAXdxw&>$W#wgv_<AR#aa_-*K4#ZKCLF^CQ3AhsLZMh{C%Pp53e?9zzYY$9eW5VHe_
zxqqzX{WSfUp`Onj^8FYzJfFaAQmp0Ie5aU_ca@{%hsn3i_gK_y@(rRtGyEl?C=(J7
z!sTr2Bzi3&(f#rPBGKps_|E8Ggy%Y<#nQcg%Ix)F^m-S1y&KWW06CRBpxh9i#eCNs
z!ho2TZDZov#m2X8*P0E&m*Bs4*0@SP>P7QWFXK@U<57D?X9j~?q2PH%K4G;Ds%R6}
zrfs{p)@|eCSkIW2@m8A_Ex#e33=NlTm*0?2Sy2SAIJwEe5M$u3^{1MF0CXfIMR=)v
zPJW9~imhVoGoGeEawJ~{(|;WT#ReiRx5)1zh-^ipZbx`|J)HLQ5kB6?A4R+cp<elY
zzC*r<*N6N#UI-G)pU9sg{IMe-n-s-3;4&U}8T*a>F2s%w8_b2AzTzm(Ts~j^T>b(r
zeMMm*wp>U_Lb_cMl0eLa0S$Akut}TvdCjBdw26sp9u?bu-n{qa??5Zx%Rk6JLfZW#
z4}jeJ*_465$iK?J$yepyF>N{k-}qnhIh!PVY+N2@v)SyXYkdej$i9s1bTiyI-Hf?*
zFDfkb<pm<u5Q&L7i1i{@8i8mt90s4fweHPK>rKlsgRID_EiPA*g_~G3(`t=k&t|pY
z^ALYdn}yIy$iw3F{*g3sjO^2XXcSTzBaMT=#S_LM<E{v4rOthNbEL<o!yiK4&NTCr
zl1(iyU<FAc_=UVjX~lIcPle?pAs;09S;#Yxe#+)zHEoK`4GJ=QPZHaB(s&9|Jb6ZT
zVS1KHV>Z>MnOef?wOP`NTyL?dtd&(pw?#n1StUq8Y_sW>3bTH$Vyj9aN)yK0ZB>Fa
zIzAl>5~ijWW+9fGnN@~3r4Mbj1H_qPJd2!&bj-|CDS09l5uMyJr7_X0A1Hm)I76gd
zr5q^}A>WKRok_}OaCId}v6z@`jra~*6I)Y6CwJg|2UZ4sVrxmnY>NdQzu+=nG@f(e
zzs`;4LC41Fa+GXq!}i(QhEVcoQ1SqxWHYE|>ljGU1XXv4fmfk*8=~siI0~D#oi`7i
zmcO%gm8;mgfwI2`ZT}3)u4YSM4??^D0>?>rTN0?8DBJ@FNl$jh)|(yR8*NeYNIbbe
z(KrH+`>?EOux*G%dj;Of-hu*eM$Zg0GkqWcNIBeCtcgfb;0t9JApIdEe*gg}3jR~c
zUIo5fDhQ=%QoG;G3pX1_2D5L*5T73@6uvw&(7h-D5xJL)I*|?|Aqv!dR54yQ?gIGU
z)TQ^3AHLHz3~9U%vfaoSuZg7I2PkLLmJE-Fn;o?EXZvkUkj-?4A+N+X2C*#jS;ldr
z2AZh?1k?hL91G;>*v8o?Pv;fmgwb$pMo|={>=$~AkdF|Nn(xa`$*0~2vc|^@E<~0k
z**<;?73oZDv-PxjZIf-8=<ut?>&D4)dC+D;shQM{u9^A5fOr#|&z6raA4Hd|w8Iy5
zm+=~Pa$H<|+bAf-9Q49pCT*{hwr1PrlxZv6c!Sy+m7ATDgJh?_+0M<j#bw&5X`Cu)
z2dkSbR$Oko)zqFt2tXwayTi8Jc3Y5XA)<nmLCkDbTwz-Y3J9sT!?vP?l~Xdj`GsX!
zn4Pt)4lrds;~ZF+(%Mr^b(9N&D#OBTjcr4qv}U|*u+e7eiVAMCZ3`5PFy19CQOztm
z!(3@qY1))+r)^iD+Ii!{f1&Mck3bYWhSxrR9Ip^<2l~F?GA_D|_l@^m6)QR0Au#CE
zA)?_vh=w~#lpKkGHm(1ylEc_uDp7I)J#yaofb<9wdXVRl1&x(GnUd!yXBoy#o_8jg
z)<4#3Cd8y7i@7ZNY_Hqi2mtJ3<I=wY*ckxp9A1#ABvDJu0|4w3m+>j2DT!3F3M^F*
zD8#mpv!Kv{1mr(b_2}>?<)HAf@fksZQa=YGs9?GAD@;NMUj%?L8OsU%>BvXPD?_8U
zuWVljK=Qfq^}hkh_W;L_m4M_6m+@s;khE?Gki@n%LDJR)&p!jnS9ZA^NIo~dvOv-a
zwndQ{Yq8>-<mZnvBb8C61(D7!nemj1xNF6@CgFYo{wQ8Upd<@~B35~3jOuS@`vceI
z0BvgaGSIer>|p_DUon0qXjij`+jXe%^-$!uK$S0o0$&DO^)^_ihheSGhwZwA-)@iK
zD{U?8k+4cX0of4&K5DN{7Aw^KMte<rEx6qG5lPzX@g3$OxZ-Jcu@W2xjc8>-1-3A-
zR(yhuC{qJjZj=%>1ePQ+2xpnU4GHR6WYt)Se`aEg@g0)Eo-=+?jBkza4W@wPqZ8&{
zgw@B0?yJq26W^wJRJ#rqj@vemY8^Xo-k3RY@h}nE#mCHhD>yB}^u8(#-D>hxyGI^s
zzro%}9${}{Z)#k@O#MgWCu6PgLnMXgeR>X-Pf{%Df5Ml!Sjj9o9X27w)F%Pcgxwr4
z3q^f`(O~N?t?Zz?Uh^{;i}s@|-KQ3a1}Iu-t@I!}^s;%6EKiDI5xoWLO-DU5DIIsx
z5R0aW62(R+C!6{}(JZoNDKeOkyE&|7@x0F7+}^^P*EKRB$s*jf%gyWTamDkxpAF3G
z#sy||=3LIyYxZ{b_JLd@)625m-Y#gKLU2}0rm2N+gp{S#F7~bgTD>YHiHJ4S0;SZx
z|8Y8HPqOy_N%q344?m7qX^Hu#@rTR!%Vqp-{BFriO0z4I4<~<aAHw$8huM?ymjZQj
zpE;xI4rS9^NX^XuNJlG?wy-;CVigavqlwi8y}DhuhyOhm<A>~#wiZDqLw`e=EY&`d
zn2bhY_u`dlvcd0Q10l5#QcGfl-@yp;E$m@^ZJmEGtFw2p=a!Re06en<TQ7v$EJDf$
z;aKEs2`dVHrsK~dSRyPdbzzoCw3kd_MkGu`N@9&jl!B(goO}vQ7nyBa?Oiq*#G0H@
z846unzmU*0m!H8m6`-T3*f)h1kowCKPmz7PMLa^1h2;Dfip4$$FrEidSAlUNBpbkM
z4>3<l@ZZ+L|G$`6+l%bW%c8*SzQe*nvkH|<5RQZaS~KZIl8m{U#>9iAovjI~1xvyX
zEyp8~1K}|y0LjAi{IW1ivELPhAxKR7cO1CZz7BA_7q1F9P)HsjxdF<s5GE`JWm)s>
zzhkA{_J>Nb(%ukOiV;{pX|fXf75h&(D8+uTJo*4R)k0r=EOyETsT0D2Rsk_mX<1K1
zP7<7$gitlfWDjBztQr|NIc=&pb&@&lFGuo6>_>y>(uGv@-;n%EK+~~`yiW>-5dnBa
zT8^g>0~0B@vF*)S_rLKa*^k)Im4_L+U&Vr1tAFgP@tb;+giH>I+!7q5=?LPM#T5c?
zxM3#y(y<z0G8XF7o)WoOn&2(V2N&!YgMh6rq}u-murQkJpH&9f8USp~3IW?D#<JZ1
zxs%R*!Tw`;z@q!Lg2b2znOnINj8f2OcLysO%K~GW)l<d5^W~-HA^+W)EtUmdrv1+#
z@ahPu{=X6;4%uPjI~<P6gh)Lh)ddW%FC|1^1;)a>Z);hBL2>+_$q*z_)CiR!j=CW-
zq`i<j7R!(h|3rplI-<*?4S<Uxw596J24JpPNK1S0>B}cCQIt1tx-T1((I_~RQU^qN
zt&3q$l2!rC-?5M(H7%#Ch2^->(L9KoXdyjd5;jtJVvx)e=V<L{<A`^(MWRT1M+a6D
zsXv_@ogG~qT^-#V32eEeyCVt7KRuEBvk$2xeevq=7+`DR80Z+ppvK_6v=)<*)t{=@
zHQiqYrh}N47m+8aZ$@wm4L^ugcsT7r0Z%*ZeF}dSHxh`kAv2zCgYp8)FKE4mKW(~~
zJgw&57*;c8sy!CYSgH2pm&?xUg(+yVIRy=PpaT!E?peL0l4&z5ED5a?>|~&RacAJi
zwjN8N4Fvnp|B=H@&v)^-%&lW!71KD(Ytv<9)iPJu&>8_DH8hxzZV=KoAvF=wRv~SN
z+}$ChE#~|ELTVhDFq5H7BeFOf&zaLE789K|vF%#MwC)hoHYV^dmZU~}d(3uPx53QE
zr$?9xj^&o%LnIb2>4$4@NLrpZ2a8VP$dd}uL*7`!TpNO@0>4%M9GD(yIb0lLU<IRZ
zP08OPq|K%a&@m3H`s~RtiH+zBdbnevBMtRos5>T6%mc06$(K9Q<z3_|c4RobWXw9U
z<YA5;{65E2xvQfG`C1)5w%lCGVl6ZCW+1Xia3hj|BQ4~cKM>$Fabqqm8eUM8haGvm
z8Rljzej)V|Qcsx0Lh51MWdd~*-btI?7;qsw3aHb4Fb9aX1~Hw92kj}CIjn_Ayw@Sy
zGaYpu3xuQ?f5KcbU=qg)2@(fP*+EG0v_SwwO>3C@9Rf~;Sbz_fe?{TOtM(+CXUdwr
zk>eK3HJciLnlsIN4D3?V%2?~ucVcs%BIv6;cmpW1K!!6Jz)=v$`KG|Oq7@{P$)qOZ
z+Y;lX?V96G&>;MKhItdznu)CGsOXw_a#Pf&`6(IbnOL|?<|G;5G;<^!IvKsN?2_P9
zDC3))KQzxQiKdX{Vw&psq&6%or=%tNo#vr5vI5j6gS5~zO09V^wM9>`JRybVxG1aA
zdN$cd1R+0ux9(6csb*ud9qLCEGW>#lXbA$bP!tzqg}vH?Z4fJ<06|Dp<8RF=9Sa;Q
zp^R2lri|i+)CS6^ZHO|em=e|&Q^F>q1R^eSI+&!;nn+;={A)C13rqyY+2$b04G}tP
zib5J>C~1)9rWAP}z(YVIQX&)(kO+Y^{U>4xwi29~1p`?`094CDyEU&1B{a)?CG?aw
zPss^k8Lm{*>ID%nwL}P`<Xo#K<qR<ppxZ<esqEN*=jOlH*}ELOLv^;jONh?yCZvRb
z&Ni<86P3N!@kDu*4H?nSvb5S^r!8Wr>3{)2%o;oGdf*4vDAB)o|APR0h&e*>OW$dM
zy@j7Nw3LmO$e^|E`jNa#!oZws7fYko?M&N|D4nFyzo2w`vf~IS{kh609nO!=p!6;w
zlwN^n%^?RpYmSpd<@JKDH6eBK>66TqXo5?LXelky{H26iS-6xHib4NEP;3Ro6u~Ih
zoJ<ApBmxtKEER6Opm!p8XBh5~Ta9o<kftk(ZiD{rRKR<Ni8u0zK)h77jLr5Y$W0pl
zXEAlCn77Ll5%fz}i-<av+H=4H!W5Im$ahHHBjsMQ;Q?j&Te}QcY)X@T>$^oVw0n$Y
z-UlVDHAJf|lJS`U4r25Hxfu(uDS5R_YU)slZgVUsmS`Va5-q+&q9u|<TlJqQH*5Qw
zY;(|M6;E)8G-MNZQMJtBlN7S#9`PNySIHAXN`@2|QC(27k%awkIFyu-<#Z(!STdOS
zm}E1_Y`Pbmo>~giQdY5KyqVFf_}0Y15Q%|xu3tDVZw;=brDTrQ5SS)%;>qdVIxe0H
zVoyQGm)M*NR@T>!ZyZ+~-<qaSKOv13k|Cs(M)X;^DGL3-Zg%|W_zC97FR;aa1Izyo
zqbgu-2TUzk;U%Uz87h6rpz33~K6?+1oebBYCE@{G(*^8gP6?)Oh^4m0$ylp$Pqa04
zI_$|#m(}KTLV{HZq0)b7oH+ughl%@bQBKvVArSSIGs5mMum#{iAq_P?Ha-_p3jFl2
zH2;$rhVwdS9nuXH!*JH;J50?$F$N(G64GGO3>0M;@~r7ywW18M2qnd}HkrO18GSL8
zFosjLatG~=oXsr87zoCoOh5p0h_QBxsjMx}kQEKs#5(?0<7(rKFCJINQsWvXq~zeZ
zW+nv36||JB5LxRE<a>anRG|&y)PfxEOtJ<xw1ne_6UWD6XqB0;#23V)Wa!dPljL6@
z%fXVp^s5h?Lct5Nfh^5wZ5|dPw7}Z|zWJ{JHqeO)Y#^8gKYIuvj1baD3t(1sm5lz_
zKq8fCQDU-HF`Ocb;WXBQQ%VV(MiHE5hd8=Qtc21Y7m`*!{1J=-W5!hqzFSL^NWxea
zBDGN7{4Z}ml(i8zVH?xZ)}(bO5qC>urlmS4kVF#H!Ws3H7E=W!DD}XS(UycGHDqD&
zGH_~{@0Cls5y{A;&GwcP7|wKOMzO#U(l{YuVn!09T;h;3o9%N>4ap9e4@MqOvsFv9
z_^=I=Gv7JQS>W_zolB8(x^sq*CJ1SgkR}UhijeYzR3N13LYhr7<{#$qIp;!(%*QL8
zAIGay*hxsKu$m^~h5nB#6ReMm59H<j^I$!Ob8C4U0z*o(d`Gn@a|e6SN9CkN`Df*&
zBS|a|8)=dc>0h%B#ugHya^B-yL##t1c5bj(2SYT4Xu6Oxz&kWzgs3)^l{PV!wb}tH
ztWDg!iXybmX+b;Exr6M;NhSv&L@OjOO`8)zSJp(hgnukO8#)KF>^Mt)kZrJwZ8C*#
zKB&{8-KUCan&Mm*O%ulj=Pa`zi%2RFFVbQ@TE<7u4Nl7~RcQ6WqJ5Hbe*AgO<%Be0
zww`4fTU2H+<_M!qJC|&b9M~o_0k`@ZoJKc6KL=nZ-yzr%a4<$YjP)?5>lXh7t=e2z
zIK+3>W?b|HT2xH72KA4=Th>Tu2-x!OHbKk7(EdQP?a^qv<v%C;T|oRpm63fWNIt7P
z*^_+}8)vy`<NtX=1~~Ys@?;Ml&bCbFE*O!efvou#S!6-enP$mlVM>^;C{S-{tIF^g
zbjO6+rI-IX{Eh;4&sPS&seoNhCGd-}LNFc7aLhkSXo37YRUUp2fVmd@`dt%#rD-M#
z3p4}Cuz+&uxqnmK`9Fm0+koo3l|j}AsOFb}EIIW+nE_vfnKks!=5$aim&*edYGs-Q
z*u-lB)|$6no9HqE*+fCnbQu8l2E?Exjw}&U63nqoE1Gu9gkbRga{|2r5Pnw~82tcY
zVHq%zIY|uO!Ae4FN7w%ljzumkk`3mYTd8=aZZ7&e4E}fESe7g+5(<?t_`jTcl-8SA
zSc|kQOK-X&O6yHnCD^|%pf~4T4AGmkH&krA<#K2bE1kSN75HDA(}Q}`Rh#tY^b)-}
z%coC=7P)NduoCS_HYD+G#g1q4S4Ejw9JGl-@QT1p^(Yys#2O|0aArUv<eT0Xaw2D#
znvV99rz9jx%aY^T@)%mqjo>_h=Io>)DSe52T$Y}tbbL$01-0b08RdUFLnwo;Xjj9^
z&^1R$a|7tI=7@x)HUU@MHIRhWWmfu`E0&N%E5*$GGa=1O)u;8$iz-OV_9NJb?GJOZ
zbFm8*nQi_kBx&at_zHdLKJ4F#eG!{SrF*d>Z7?*L=Z%`|%QH6x$0k2%QTb_R^l%DR
z8KEw1`-%NO3$dj&qKU{N4xVP<uiP@9fRsGH-`gTTjkZ$tm$T624_zIKEp!80_^+@G
zbkpi~bzx$Me9qO)e#Dh%zu-zT_6cdBkPz=*ETrl}TK2z~&SSYuh$-qC;2KCcqD3^W
zVS!oPe$x`YNl1%m7PlXU=mOfJ$4nZ8oQi`hB`(HfsQ4HtQpy^va60Ge7M#wx0@JyL
zCDXZ^X*##i^obA~S-Z(ln61RE8EP<E61p;WBep2ZaF&9#vIvRgtc(XM%amB9?4*&V
zT_w-9VnmjiNle=UeGD3#mSdSF<TODm?eY&!^elN=qU6b}wMqx4@RlH%Oy=Xil#XRk
z>2*!61eHsKbc=;bYeG&K47e&y3|1P3b0rpI&~Hu17nfjgDPeFZ8*ojWk?1Q8X}S|M
z)(I!%)+dvPa8f$U6VW!)En-1F=nN#I({czBO;Bq=h{6+#Z)w0w@qV$m^Pj<Yo@;(3
z@Wtw}TZ`cfgNWd3DRL9MG*hdXL5icCuH_bZmz99`HUjS&*xjYA?8;bxz)*RplgO0(
z36}w$pmu;x0P1LI7J<IR_@QluDq@fz(k7z~3u)w$wJd$oU;*ucd!(&G{Zr&S4$d1b
zA2Ru=nxJGw(Su$nYsKOU5bv^DBL*LiUeP?$VpOE$hWtiaI30JITG6ozyuw)s4UiWt
zu*)=~yfDkHD>rrgV%z7s6N#&h$Z7k&kTyaZ8$VgX_#XI&Z9DBnu63^Uu6vF1W~$*T
zA*~kDy8ne7M!saI9NzBQLBvJNJ1A?_^rpRU%HcbObQclV`>qggT8EPOY~|Fou9$iE
zTGX|wgu3n~>N*bUB21HET)D?ENI5|P7G%4!F{Yr1CX<@%ksktd6cp;gr2bJR-V5Oy
zAj&36ngz^7VQx<XHpdhvBwC4{t!Mzv=E;H~YAF@P!*|Q`Nn4zih-?xAWqTJ4uhS^3
z9?~42d<ayUmN=4~WsQxfjrgo2$Zw^XTgt=|<1{KOCi1!22WmGc#wvuTIUeGQYbOHy
zdvR5Uq7J*T>Zd}Ax<^QB%28BcW=#Iscq|F5SYE9!rl?meidtPlQEQ2!&i{uBoqSG-
zzz<OhaW2U%3f`4KnlMLdp=>_yCLG*I^g{lfpoL7dMD!Kp|4_Ak8EuAoZfT1v!m{;D
z3$G+W{g9uQilTNeo6jgulSIoD>Y=^`%o?+O3O<q-EI5NGk;FuABy%epkCmih#lHv&
z)FX?lDx)PUDn~vo8iUm`C3Moa(3BGEQ~~<^Kcl-duCqb9bHS4kBFWYZ>0XQOq7!DB
z24!Fw3I&L;F)l?;V`$=ASscZ6Z!!G^BB$$0=x+njUpv!aAUK9byy?3&^RXz!f<lSe
z5UQ*GQ7q*e+9tU)t(XBn*XOP;ko6V__-%6qw)!1Yl7wb92<>G?DzT^&m$ArOqh&c(
zzFFHiOmwhxH<-g_exgvR@AF2_jEzmjQlZKI5p&GetjB-v`oTPDDUd|y&BcE9h2AZ$
z?^&y{X6aOHIPJ|Tlbh<O>-sI2|A<igPRgmPja6#M1y0S*OU>}oAu*{L!Hvwz)OHpr
zQm{4x1-q$s9rCNEVi9)!Bwt!VMrxrC560=O=C?BS?Rynhus*Uy9yZumvo@AA<ffI)
z#dqc_;laZ2=s!Xa3pa~b+P<?usUEBXZz#645B9I53U#o!w`Kb0^ec6P_2CWNXF-R?
zSGs<FK{igunpL)TA$FiOcS0~DDF>)_O{>FJ`PA&(TyI7;(3DfI?sVnGU|qytp1@An
zW=&co6kGN=GnBYs+1WyRGPG=5nX*!IrGr)0=qRK^)TQc$zD#V!o?5a#v7)u`Qey=f
zujaN6Ero=A9VQSNrcJ^|^k(tXfjuB<awl7=^ip~oIR-p7&kE@X&@_oQfFVdvM!==8
zqe-z!Kc#;vZP#s`*G9WaAgh#)P4pFP#g7BZ9p+Z@3<=K|f@e&mXCP>fXXv@vdGHD#
zGj@i#WVd5+X{j-*t&BkFmN>>hdciDR*H?gzX|M`CuMn%j^D;oGi8K~7|1+d&6Fg`f
zs>aZRUP9FXFZr{4GeU~B#1kf=SXX+&F%(P5!YK_Q1>#U33k7;nfmcvq47P$mkAeG;
zQms%b52X^R)T?Gkt5ZYfI&<3NCUDfEKcr3!>J*|*64iO#s#BClwU7;3s?M80(ao%;
z^dUB=>usb6=_GZOc0ed;jx!8+0e&7&1AY?)u%Cj@UmmEOqu|Xbm`(-Hpy0UKK3{G*
z;44c}Zn@H1Nav^^EbJo}^s4{!QZT+!xt%|&tgzNvDy#UT@~5=c5=+B2Dt9Yb0?zi~
z?hcsLk;(=$mAFq)CY^u~Ts;{fDK0o--!cy4x$g)Gi@I^~7M4wZC#1J4NbFTMTd`6F
zsmDm{<<VwhFYjPZ6_g!;Z5C?4ncI#M0y>x}#<6X2-5Qg?^QCqVp*<F=hwdGs?8F8H
z2b71Dhn1zuBLPqD5OaHj#RhgYz%Ct;F6d3&2}lX)J@V_0?okAk(}7ap6LW=op_$E{
zLANQzw*+s>0f6}l0`mm|^T+=Qn4eXSlmhe1CGh+};P9akcwV%Cbi6E(;?0=WzW~w!
z<zx^@1RIP?NFSL%p-rYBKM5$2p+Lbo9H9`A4g(@@gFpunKt2UPAR|J`m*!yQJW5|6
z_+6snU;QWW`%Jl13Vz>|!0&S*eGv-3%NG2;Ed#$eELMl*^!MPW{1`%H=apZB@U!;N
z0Bu=-yd<PAt*AjHOmHg<NM<A%p4MJ26hom9s%e-*dWS#_i(E>G4r@V|x+MadLO}Zl
zK$~Eh8tGYSd70jfkfL2s)Cp`{rIN_Rs=VZ0lvJtFSStGcHHzAHqG%N~dY(%Dc#V?w
zB9yE}jmlK?=W7(TMWN{RX!IzR{Ph|oc^XRIfRcVHiKO@=rfHVt&B-qrIJQ__>b?<$
z>QkXVQ0Q7@$ZaSci_(*+^j|1F4qGY|mXoU7j&ki#E*s^zWVH&=PtT@vWy&f*+v_OZ
z1*Jcx(z02)cKKDv<&Y*dN4+G}>qzzNX1&OA)<Vfx<#Q<C7v=X+c_+$ON)AU*axmdT
zr=l2Z<wY-`XbKgrPDQa;veKf?d=wo^MJG^E^;$&>P&AE-5~O+fwTk*tG?R)>p`sDj
zDoSLQOGOK)Xq9UfEksd270sif)vi(0_7#ef%Kn^6*0@GVdnQUkdt+q=6|HrRqK>*K
z3jK{098~nW@<mOF<X-A&ut#6xUWQXb!*Nz;@UYEfY!O`QxJ?`Y`Y0XBhhsp`NFU-T
z(C^Bg@FrEkNm*bSEV=4|9Lo%QA1pDs7mG|LVwuT9SZLA<OHEc`om&koH*p{v_&F>y
z*zNe*))f0NHL>*%Zmfe`$U08V8IOF(bJ#lLM`wg{5H@wF<@g4vQTfjKNN8GvgouX_
z)PElF=Xa6V^qq6ME6h2=)zEQ8{tz3KU37JG4aB<3W3EKkWGoZ>%$4Mt@A%fX4_lr*
zh9$`J;1ApZkKog;dtGNeE@c&T_G;yTas+3=Jb)8(ewAJPH+ee0D&OI$;i<{@Dd!>T
z*I=XN?Kqqk$HfX>*Jx}sGn&KZv`!&yTkagvenx+TPB0vT^Z8P6V(OT3N8tI4X_jn>
zHka)*L;fmdoq}7!Xdw>laBxE$L@ESDES6iCYjR-L*TFhKb7f8!EY3knzmWQ2tB9l6
z>FDL)u0&=E>0o4$QvTz|#;2gIFNKss$$eK0$lS4JW)`Md6U}t63^OAv%S;N(F=sRR
zX85_#%nqB0U>#z9$g0JbZ2OGI&4AV-Go}T_y%+%sGqP0^!7Vt`Df9Myi0q4|vlUWh
z6`Y`^%XJOBu5cp=j^4jznnCZHdjCT@X=e`h;=38A!EC@biCeH?DsL`$j4=-in^dW0
zp2u9zh%)L6-p)Kv+S8CV5xid6W6BZl|2ymZJWbegPcui7vdYuK(~{Qrd17gOpQlZ5
zeV?bD;89rl#p|1k)!q`kli;0!oE?G#2|I*zzu*nbb!xf?Ge6jkw3?%hwV*ZLJl3e4
zxiqbonFSF@)P~j#I!Y^Y00ms}L6-p<Gx^lh8Cy?*N)Pa33T$jxkQV?nvSyIDSH+X$
z=|RiTJU#hgPcK%})7#pB&(p`#*VB(b>*>$udj@z0dIn)LlLxRX^)S2-_tb=eeIH(D
zJfl5hJYzjr?CF^RtIJ#=I4~_U4}1T>3`G<cMgrXoxr43Q{K55qfyIK9QBCXru-ec(
z6WnxHSO)+l!CgQ<BhA|SH8D4EVhvUpmTDIb^eJfoCxQ3I`E5l7UMybp;qkK(kd02z
zEeBL|w=33#V$6wT+!ZHyoH0l6_MjY-!rn6G57za>D8|g!8hqjv-R%vln&3Bp%m~G;
zEg(+>kRbrh5YvMo=Ld+;S~cg%qyznCfK0I*jut}%JU!L{R;`g39drP-Kuiu+UC9sT
zeAtug$)j_K0-)ID$qhNW$&*iw?=$96<5kKwj;x0ZdUf`Ca9ZUlqHSzEJ<W}5P6oHK
z!2-r5>?C%oTj`ljM}ApTEAxP>jkY14xir19HnZ_8z)a|vXCY0mJPS?a5)Oej>%i^M
zJJw!kAT}7c=9yT6x5DB=-h$xPQ1F&?AHj55i;UPZ{C~lrBfEOuxYP_^5S^A=z_Zk|
z3}6V}-0oQ#+&TrZ)UreT`vWXBJnZREGQ9F#k1f-6%HL^CfpHUUvB-F)^T;f8nhQlu
zk6vrqS|^SI<`%Ks=V`Fnvr+Ii5J;G9dbW7BdbWACdv<v4_dI}84maY3!^J$iQuUVR
z!qak;+%m5ycapbY@MQBKLod$G!ag6^buU$~Ur7aPTLkOGxf?3rjg~l*%{K$fNon~s
zZ6%52Em-hd{>g>r!RqjqRrDiHg7Ri!`dLZcG&9*k@U}sEh(|&4K90;T%qsV&0M;M&
z>;ZdJJglwQAOBI>xww+w!4Va7(_|`k)w6dC9gS|W*nZD}Vi7~~W}9cf#bj{P1_g4E
zORwdo9c4Pdum!4x>O-cH#A>tJ0W*n?HLr~`$*s?lciA+P9z`iKlVmcJ%KXV>CQ(bJ
z%%narlls6+>H{;Wk9{wesmS=u#AjW+7Qmb;F_ZekRO*jqB`RJTjHlP}`U=+(wx%$X
zk^^Q^I?SYWm`Uj{lhR=(rNc~0M+SJha|X&-X3~d9^7znx1o<q9_`HD6B>ZNXN&D<Y
zh^wx{Ydv1~vf2SNX%)<*RY5ZerqXYCT{UIQF_=;3F|sxIBQxo&0l^folIYO)<~Xa}
z`Yd^GjML=lK<LJ%mDJd@lIRTLlE20VSxIO~NM)=fENA|c%q0&luF^#;z15?)I`r0o
z-e4ZVtST{&UWSSEvhf_uBYGPOv*}~JKBq4!xVT~#FE)<GnZ^;`C!6Nd6!RU~jkr@_
zzQc8kYZym(h-Dn@hjBzXK{~xHrnl<!2EzzNEW-#fYMBDntLSYty{*IWN{k|yMi)qZ
z6&ppfVHC|awglM?Y9B=|0Vo>&Y8&;8dZtZ;1yNxmiBd1J+W+66|7Qk0&Jyc{GsL>!
ztg&t^0e+M22uAflD6kjKlIeq#@qVm70`3EGX4+r`w1*;%JQ+z1DQpBAiR6jVYz!OA
z#<B5i0+w4&MCfi3LWLBNo{Zpj7Q%j0aE?w6d@hu#k&pG~w5G8T{+Q`(2GR#-A+c}{
z&UKl`=CcLNAaeNs6O8|>35MY^RHKnG!<c34HJ&k!7-x;QjCYLpjE{`V#y7@qLV_@I
z2?<VxYC^)y8k2wrg|tgZ4+&|HkRBD%ULk?$F;O}wq^E>*SV+$Z>8OyN7t)JDdRa)v
zg>*tluL<c5A)OM^X(62z5+uPVLi$WdUkeG6=sO|(Af%s!^ox-2(BFmhr{FNUKpZx~
z9fHH~atj_NxF)zRc%<M}1+Ol6O~GpiC4$<~ln81kwX@nq?W%UeSu=@hcQr}vq4rdJ
zslC-cYG1XV+Fu=@4paxJgViDGP<5D^tPWRG)Dh}Pb(A_9r_+p8$EoAh32Lf3QB6}P
zsp)El>QyJJnQE4rtxi#=syS+|ny32Ie07>yp!#v1O_4fXouSTDXQ{K*IqF<>o;qJ$
zpc<-B7pga@i`1Ld#p)9E7Imq*OkJ+ts@{eZa8{@*)jQNx>YeIc>fP#U^&WMNx>jAM
zu2=6>H>mfi8`VwfW_63YRo$j;S9hrQs}JDRoSo_}b+`JE`mnl3eMEg!eN5e}?o;=x
z2h_*aC)9)Llj>9IA@#8OwEB$tta?N}igR|JS6@(HR9{kGR*$L2)mPLL>Z|H&>g(zo
z>PhvK`lfnXJ)@pg&#7;zZ>#U9@2c;q=W#aA1@)r(f%>8Pk@~UviTbJfnR-dRtbVS3
zp?;};rGBk`qh3+JRlifeSAS4{RDV)`R)0}{Rew{js=up$sDG+|X$+@)aZT22nq70?
z3^13bXl~7;g=wm$Y2li#MQD*Y0jR20O{<QRz-nr>G@vs<@I=A83!Wr+55ap1-b?V_
zg7*=;ui*Uz?=ScO!3PRHNbtde4-tH*;KKw@7JRtiDT0p>e5Bx`1RpK<7{SL1K2GrQ
zf=>`URq%;|rwKku@N~g51osL)S@2B3vjoo;e2U;x1<w&YSMWT+eS+r;K27if!To|4
z3SK1mbiro`K2z{ng5#)POvL62K2LB=qZSBm2rh8QxZpPlzDV$!1z#-q62Wf~e5v5e
z1Ya)rt%Bbs`0awP5PYTJcL=^p@H+*+OYpk|UoH4Og0B&Lt>EhfUoSXZ2^$2zPjHyw
zn*`r1_!hyp3cgM7?Sk(R95eI>1b<NQor3QYe7E2a3I4F)djx+(@J9uIOz^#e?-P8#
z;0FYMT<|9ZKPdQ<f<GnrA;Av|{<PrF2>z_#M+84A_;Z3kFZc_BzbN=ig1;>IF~N@u
z{)*ry1b<cV*93oE@HYfMDflVD-xU0`;AaFsEBHCV-xB<7!QT=5UBTZI{Jh}r3w}ZH
zi-Lb3_=kdjB>2aIe<Jv&f`2CXCBZKX{<+{^2>zwuUkU!T;NJ*-MeuJ0|4#7l1^+?t
z9|iwO@Sg?$Mett*|4s0#g8we~AA<iW_+LV1LY9Qgg)9r%CS<#i9YS^r*(GE}$ZjEf
zgd8ShRmhr<!-cF1IYP*hLarj@szR<N<my7MA>^7ut|jE!IGaMqb%b13$n}JLJ;aS}
z$B|TSJxo`1P1p4ZJyNftSJkWO)%6;BExopWonA+;tJl-7*Q50MdILRLZ>ZmZL#!I>
zP4uSvje2vvh2BzcrN`*8dYs-`Z==WSZS{6~d%c6+QSYR8*1PCk^=^8Co~U=n(N{h6
zo_a66x86tZtM}6f=mYgZ`e1#CK2#s3C+oxY6n%s~QXi#{*2m~$^>O-meS)5<PsEW~
zlk{{wL-*>F^-MiW&(^2tQ}rA@SI^UZdcHnQFVOvZp<bj<*JtQ6^;!CCeU3g?pNFHi
z7U+g9^o9CO`Xc>ieX+hozeQiFFVmOnx9Yd)x9cnPmHHj}D*aCVF8ywOwSJGjMqjJ1
z!x3Hg>KpX?^o{x^eY3tr->PrZx9dCf`}GI(2lbu$E`7KDkp8f~M}I_rRDVq0tMAkI
z>j(75^(Sz+*OU5F`XT+W{<Qv#{;YmPKdL{cKd--_zo@^YzpNkAkL$1KC-hhK*Ywx*
zH}sSGDg90Tw0=fEi(|pw(%;tK(cjhI)6eVg>lbt@lBZdbD06zF{orW;?txeBM%G;W
zS^I?!a_&BO(iDX1=?Lg8+Rv;N4*jjg8emmJEKH?tFo4FuaJiW+fxq`n$J<T^ytdal
zn>af<`#3Y4Gn{w8Kf4cysvU7Y=X}w5%z483y7Q#-wDX+v9p`!Hr|{VR;QYyDbE&SH
zuKKPRSG=pMtG8>IE7_Ien&6u1Dsato2_;ggs#I5MDz%k5N<Ae?X`nPz8YxYbW=eCV
zr4pmWDe+2srIXTCNmP0$y^&Nf5NQL+NCp^<sD3I!_FhEgry}M)4Kef?%4}sGB3U;n
zi{VMT6^FR3LZo?(vR=7Q*^C3-?pJmqe*1{B7gL;r$|2<$<*4$4^0M-Z@|to|Ijx*S
zxbbV{XSdz0y5rsL+#TGVaPV6<cOQ2@_W<`8ce*>reUp2cdo2!ud&K>id!PG&`w1Ke
z_p1AC_q*=%?hEdZ-Cw!CbN}G}$^DC`zNeL^t*4)7lxGq=L$f_gJhyso_uT2Z+p`)6
z#;x<L_iXTN^lb7x<T;4L<BoeycwY0I^<46N8)ger!m5YW467YhC#+RidmJd&2M5Z{
z54$Doj<7q!?hd;rY;D;3unl1w!#0O)4SOW)Q5-b)YS`;xC&S(hdoS#Ru#dt%3Hwad
z)kw9fT1~B?)>3P$b<}z=4H97%^n^*!7v?|~)VKllyaEb%Bb4n!P@2y}VZIDyc>=2N
zV<^8%P<&rP&HV`#=7IVOhw7>VwbdO5SN6gImi=&)<sfZ{HcT6?jncBUsame))23;&
zwL7)DwR^O+INol9wo%)xZPm7G_iGPoyR?V2<Jt-BHSG-?dv{tpt9>6{HN1Lw&G6dc
zb;9d~M}>C??-ZU9J~=!qJUe`9cy4%Jcz$?6_{Q+f;akJEhu<ImVEC@^hr;)SKN|jI
z_$%SB;;6in;cte&7k)ncLio3kLUl|DRNs_7jUajY>ir=zhCyD8fUFn;uDu65cGTpr
zmrUL|0lxZP|5d-L|DpdCAw|d$_6R2q+p8AQHllq*$B51mT_X}Ax<`zRm>V%a!iZQH
zu_$73#4Qo4Bc6#k67gKb|EuY~-<mqZK7d#2UX>&eAqi=%yDmZ!LKcJo2_YmHW(Y&3
z2|*Agdl63vk)C+YF=x29;vT5gI;z%D_eATq?men?uQ%8GUhnh6^ZXCb_x|3WgAs=#
zj)XzJ;}It#o=3clcop$q#M_AX5g$oCNWDmrq!dyrDV-!IDM(6^ij+;#ka9`oq)JjX
zX%cA)$wab{Y$OM1IcX(n6=^kTEonVz18EbfgLIyBf%G@&GU+PmI_W0qGkGNW7xEbL
zIC300p3EU9kQ2!QvVvSd){=GP5^^2cM7EOcWG8t6c@cRDc^P>Hxt+Y4youaFzDd4C
zzC*r8en5UienNgmenI}1@*O3DLZ(DgsFY~R2ud6!g_251r^qP^ijtzDWK%ShT#AWe
zq1Y%6ii_f*cqsu&8)a>n65L4HOxZ%&M%hj|NjXh<NqI&2kMfrCp7N3MIg%MEk5oh|
zBeNpakrN^{k-1@T&=P5jbVRx$J(1o>AaZBq?#SzrHzV&x-j943`8e`v<nySssQRcW
zQB$L)MVX>3QPwDXlrw5U)S{>*QOlxMM72k)jye+cH?<qJ2elWq549h40CgahM5R!p
zs5I&b>L}`H>R4(5l}{B?#ndutIkhqj8BU@as77iNwVB#NolBihT}WL_T}oX}-9kM=
zJw`o2Jw-i3JvXR)Q2ijwAb8NiLF)%y9CT;U`{?hZnbDl+?C9cXSM;Lj_0fByk4N8)
z=^pcAj5tOUQy*iEA!0Vi?1{M(^D^c$tq1K#nv|AClhYJ5B~3+B(<aa~v|L&qt&}#A
zRvxAit7(&HdYXY|q)nmOXwzvvnx6*IU>ZU@M(d<qr#+y(p?#tEq>rKV=zO|}E~Y2b
zQ|M`Q8C^loqG!`{=(+R)x|Uu=pFv+jUr*mi-$d`AZ>4XeZ>RrG-$j2&e?oswe?fmm
ze?xyy|49E#|4RSH=*=K8hB3x5qznZkpV7c*WK3f;G0Y4r!^>!6%w{ZMtYK_sY+-C;
zY-jw=xX*aa_!`?c%rp*-Wyhw+s$#XVMX|-PrLmJ@4Y9`9y4d<yOZXdNdhEQ|_Sh}4
z`(lsBo{2pd+ZlT?_Hyji*qgCWWB+4zVgA63V8$>9Glw&UOgS^3S<0NqtYB6#YnXaw
z1JldInah|vn7hLC<9_A=W+(G9^Ct5F^AYn2^BMC+oGz{^t})IW2gHGKi{sYD?TI@U
zcQ)=Vs~c+oYY1y3>lfA-);LxiE4&|umB8Y&QdxPdVpcV)j%8w5S$39_g|OzbmatZ`
z+F4s!+gZP}PO;9g&apaK7g>*3uUMbryTy~@sqv}tY4Ni7jQGrWWxOiBAbw(eMZ6>4
z6=od0@jyHnKPSFDes%n*_%re6;ydFn#$SrR5`T@|o85=qk3E1rkR8D$v+3-i?BVQW
zb_zR{oz9lCHS9@j1KY@+%x+*i*f2Z9CfIY>^VkR3m)KX>*Vs4MH`%w?ci8vX57_TH
zT{zu1JvhBM3=Wg?6X$2nP>z_B!<oow;52fkaRQt+4#=6wfjM(I8##M82RMf~e{s%m
zu5li4{^fk;MsUg8NG_Ed&82Z`xRbf{+y-uAn3`<jnz$COjceyRxo&PV*UMeVUBX??
zUBO+&UBg|+J;eQ*Ku-86At50np*W#Fp*aCcKoanTc?k;=79}i6SeCFNp*>-B!n%YF
zyxu$#FP8TsZ!qr{9-F7&sd<IGYF<6h!fWRJ%A3R6z}v*@;BDpo#@oUBi+7E8gZB^b
zHt#O)ej+E4o0yQ8n8;5QCW;f25+z~mGBq(hQJ$EQn3<?gG$z(3HY83>Y)UkT5zOYq
z>520aA18k1_v8=ZC-P-{Ex&?a#joKT`IGq#{3-mYVItGSH}kE0JAW;I3x6AbJO6k7
zF8&_=UjBam0sa~OIesVqBL6o3t)PpbkAN(Q6i@}x0-As!PzaO)l^|Q75#$Q;1%-kl
zL9xIfzy-4fa|QDS3k8b>O9jgXD+Q|rn*}!n{|Igi?h5V;9ts`{o(i4|UJ5=4y9%R(
zKMPqxfiOduFDw=|3a1H8LW|HQbO_soi-b#r%Y-Y0?ZVZ<Ey5$hW5N@{Q^GUCbHc~M
zZ=x=u??v53Jw?4mxuQH#zNk>773oC9qEgYsFz;C@sutCV0FhrbL)0b;iXagpS|hq6
zx+i)ddL()xdM0`y`d9pem?j=CW{KHiu9zq0i(ABgajSTSxJ?X-gJMXGh-ZmWF)k*=
zo5YXAPsGo}FU0?fUyI*}-zCK)jZKm!r6tLdGLkZrvXW*e%}JV@G(TxU(xRlrVNP^;
z(u$<^q}54lk`5$&PWl=~db%ceOYV`}E4fcHkUT$mbMlttZOPk{e^1^eAxZd>e92Tv
zlf)!3ORN&R#36A>JQA;Dy2K}Gk<64pl6Fal<h<m9<ZsDk$yLd9$xX@Kl)WiuQZA=l
zOSzHqPs*E=cPSrIKBat-_K}jMOz9}8Tv{S6la@;>r8QE$bh~ti^mpkl=^p7H(tXnX
z(gV^%(!<gt(qq!&(wEZL(znug(vQ+Fso#a6)9$IUskT%{sx#G<>PhvcPETz~4TSO2
zUsHprGgFDw*{SnVJ5w*FUP`@^dM)*4>aEl}X;af$!Yu0iw1sI)(w3*KO#3(ORod&c
zw`uRvKBj$2`;zu8{k!z8>D|)1r^lujq-)c4=_TnC(<{@f!;I=5=||IVr2mtCJN;hz
z!}Q0pL>XTukcnjyS&A%8mM)Xa6tYZNmP{?nmKkIRWrt;d$&Sd5$xg^l%Ff8n%Pz<+
z$}Y(+%dW_-%cJCj<S}x(oGBkHA0i(nH_EN@pd1S0tf-uj&ynAi-;>{$KaxL|Ka)R~
zzm&g{zm~s|zmvbuh{#Z6C^J+U*%>(*`5A>7MH#y?&Su=tc$o1x<5|Ybj8_VgLaazq
zq$s3{bcIZjp~zGy6)HuxVuGSpu}rZ-(XLpnSf|*i*sR#1c%L~S^XJT=nZq+jWsb=l
zm+8**g#YS+On+u;W?Sa3nZZmb6V9BKiDqJ%>y^EfeUyEb{geZg1C<d<ijt~~R>mml
zN`^94`IE9pS*$EoPE=MZYm|Crt&&i#QSMdlR~}FvRvuLz&x*?WIZK)~AxoE~&zhPQ
z$Xb-OJL_oH{j6`Q2o+5=QpHhasFW&|YJw_PRiG+Tm8eQp<*F*xBvq|yvTCZzq_U`%
zs1B=6sV;{p`VXp)sxPW<>MrVT>i+71YO*>~ovW@>JJi$F^VAE~OVmr%%hm1b)#`QX
zjp`2d7WG#3cJ=S-Kh=lSf2ohE&#CXJAF3a#pQ&G{U#Z`y->W~Vzh-}zJt$k0os=!f
zmS(4A%d!>O$_dLR?AG+v^wad$4AhV{6b)4~NE4%>YZw})<|oZyjZCA^C^afgwnn4L
z(-efW?ed)6Ie+Br&DodpXU@T#Lpeusj^~`rIhAuJ=WNcooX*_-xj*Da<dSova-(x;
zxs2SIxhr$u<i5>)m-{jIOYYaaE_q$^y5;rA>zUU(uWw$zyfJy>^H_Q8JZ>H@Pmtd=
zKRRENpPQebUzo4UFU_BrUy*+`|G$Fh0(wDg!H)%l3x*U7FBn;vU1%trT4*brRXDG3
zW#Q_=b%h%XI|{cIZZAAj_;=y0!smrA3ttz$DSTh}sqm}zJ8ge$ly-=Aq&7vHs+DOo
zv`Vd7tI_6aOSE;`dTpb&No&?xwGORI>(O4+UeaFHUeR9D-q7CE-qzmJKF~hYKGr_b
z{-=FY)W3*T#3@QBN-Po-iHeeoQi=+SHWY0t+FaC8w6*BBqU}XHi}n=lE!tP~XVHP8
z6GbPB?(6#M2IvOrNIHrxN*Ar8=>oc&x?8&2x;wgix(B+4x+l8lx|h0tb+2{*>E09%
zD2^}Y7W0bv#lm87v7}g9!Y|1wDJq#(VhWSOjuLl?x5QVnq-1$Xd&#PjwI%CIHkRxt
zIa+d}<aEiok_#o5O0JgND7jT~r*v%TxYF^Z@ulq2gi>Cqpj2F%R4OTzmZp}Ll;Wkc
zOXrr(FI`l+v~+pt%F+X6F=g~JMp<mxPh~%s4JjL5HmYoN*_g8NWpQQvGC^5xnW@ZL
zW-oJ=xyzc%fQeVihn5d3A6`DH{Fm~v<>Sg(<(zVEIj@{wE-23}50*paNO`CnFP~FB
zuY5s8Oht7?O~s^&+6rSueMLjX)CyCDxx!juuW(eL6(=iBSDdXlUvaVGa>dn(>y=HF
zdn@-<?yo#pd8qP8<<ZI$m8UDuRGzEsth`Y9tZG=*h^kRlqpQYMv8vcr+^SvGJ*s<F
z_p0t&-LLwG>Vehd>ZodJb#yhYnqJMRuCJa_JvBUeYpJ$ZJFDH*pK3HUxixt;`8C=a
zT}^RKSxrSvRZVq`zQ#~9wPsokShK!nQ%y(B)|%gHcGT>ev_{`W|GmDOzPrAczK_1I
zet<qgPu5fPRQ(`*v_4L+(dX$4^jf`6U!tF=@6<oje>OxKsD>B=-M};qHVie4H3$qM
zLvomLPB&y2lm?Yyg`wTB%COq7*0A2N!LZq|)$p5PyWw}kPQwAiLBsXhuC?83d)D@@
z?OWTwc3>^Z7;T(loNAnAY%-dSR-?`6G<u9)<8-6X*kbe>7a0#4|1usm9ygveo;IE{
zcGlVI&eWZ&J73pXcd_nL-Q~J#bvNs7)!nYUTX(PSe%;r}KTjSudBo&VlSfY;J2`H0
ze0@#5ryj0fQNOBwP5t`%P4yl1yXp_uAE`fHf2#g$eP{i}hA|D}8pb!oHN-b?8n_LK
z4Z;R-LsEmJA*DguP~6~c@HO}w0u5~qU<1^EG>&NWG<qASHv)|<jjfG=#$Ov}Ho}ca
zW2g}g<J21(&o^FdywrH5@mk}J##@bdrY)ZKZrX=wAE$kq_GQ|)@JfsCn|d_$YU<t8
zx2a!KWK&er*l-CVzp1dPsHwQAG`v@#vZ=G_S<_cjPg8^`#x&F<Hf5OVOlFhI<TuSR
zEi|n$?KSN;9WWg>9W@;{Jv4nWeKU74cQf}i_co6(i_A%8i8<9QGiR9d%(dn^bG^CI
z++;SJ1Lg(hMdl^u<>q$tYV#5Eb@NU0E%ROT1M?$G4-3u0urMuyEkiBCEh&})i`JsE
zlv>Iym6m!7U}>?mTG}i@3uKvV*=X5p*<#sd*<smfId6Grd2D%Vd2adF^4i+fO14H?
zsn!@P!#d8&vu0ZhtTk4P)n;{A-Bzy^wXU$XTUT4xSvOiwTmP}%w%)Zqus*iFwe__1
zw)M3QutnIYwh>{td$etwjb#(rRJLrJ#+GL*v^CnM+k7^EnDhp1D{LLMt+ws9owj|p
zv$pfL3${zPtF}kBkG9XYul6qXZuSWKVEa(}aQi6x7<;oFwG;N)_Br<X_J#IE_NDd}
z_ICR!`&#=t`+ECEdx!nB{ha;0{i6Mn{fhm%{l5Ky{gLB)2hSmKNF8Yog+u93J2Z}5
zN4{gC!|Isf039<Ohy!&za6EK8ay)fBcf4@Ca=dZ8bG&zaa(s4taeQ-jb@p}ka}IEh
zaF#gBoaN3c=Om}WX>^*LZO(bl1<pmzrOp-39nPc96V6l4v(8S}aMuXeNY`lBSl2ig
z%f)dexOgssOXw20l3XdSOqbH7a_L<QTq|9xTx(qGU7K7TuC1=Cu4k^VVbJ`0cMo@O
z_aOI3_b=`-?(yz;cZxg5o$oGm>)fU8$!@p1**)Fe;tse8_bT^V_j>mx_ZIh`?(^;o
z?!Vnv+}GVt-Cx|_JY789JUu-Tp240Wo?)Jmp3$BpPqs(n$@LU?iae7%R*&7|^mshe
zJ(y>uXO(A-XT4{W=cMO`=O52)&pppW&zErSJ+PV79N9c5JUYN@7Bq{Rlfw-eO}MR6
z)2wecHrIzIsb)4KVbm8716QlUK<e%=R=dCXVDtHK;{PBV<UI{Xd0)Lhcu8K0m+Fo2
zj`Z@qB5#s6#hd2M^;UZ)c@5q=Z-dwEg}k%8sF(20^{)2r^zQNQ_5SHS<n8oc2L=LU
zAQGSg(Etr#08HQ~;AdbcFdP^O`~r*t#sP6aJiq}GfJ8t5h=3$O0!V>0Kn7$0nLrkx
z1||SGKwg-G*8)1A1egd^0yTgEFaq^JBQOmx12(`3xPfK>0Q|rV00bal7Jvb>fqB3}
zU<t4cSOK&HtAVw^dSD~48Q2PJ2X+E`fW5$e-~ez4I0768P6DTabHD}Q5^xo`0o(%a
z0uO-4z%$?_@EUjvd;mTJ-+Wzt-F>}$eSH0V1AGxaijV4x3G?(n`hNBe^NsY4_Kow!
z`Qm*XAI~T7iG31Zs!!%q__BQ2z8qh^PwOl8mH8@sRlXXZ-dF3Z^VR#N_@??yKC92}
zbA_4v={}#&?+f_ae4r2V&GyanE%2@Nz4d+Yee!*6>C)1zrDsc@mcA_mS|VB~E!38n
z7DfxR<);>5OJj?(rKM$N3(|tN5G`|C=C?fYf9EIpY5tLZj$iK2^Vj;#{-7WCFY+(;
zFZH+k*Z9}@H~KsL+x$EHJN+m97yXz0*Zep9xBQR&ul;ZQ@BAPAU;N)%d$sm$?ce%C
z>#)|OR(WeqYjJCJtG>0iwXSt~>-E+bfi8h=f$o7Gf!=|Bfgb_`0}%mAASw_Ypa&R%
z*uYPL#6WsL9ViM^2X+Vc2KEK^2Mz}Q3LFa@51a^`4x9~i2L29Q3S16c3%r>zU<P$Y
z%nZhiA7_YW)X$hTW9N*&XS{7Aw?(x@x6#{}ZNj#+w$irhHg_A^wxDfk+uF7rZTs6!
zwB2ia+4kYrt{?|Y024t0C<2o}2`B~AKpB_;W`bFu8k_*;fO%j6s0DRk30MY}gOy-4
zI0-a>MsPCN05*ctKoe*IZJ+~mfgaEc0-zt90fHa|A|MLl;B0U%xBy%PE&-Q;E5TLZ
zT5vtM3G4v3f!o2I;2v-v_$PP}JPaNIkAWw^Q{Wl!Ja_@T1YQBJfj7W^z}w(G@B#P;
zd<wn*Ux9DH_uwb+Yp_eOTd-%aPq2S*V2~V)3PuO%L1u7paA<INaAfe8;Mm~!V0@4h
z<OTUbQ7|c(5=;xqgNmRss0vO9<^=PDg+X1gBseix5v&gCgT`Qeurb&av;=KIN6;1Y
z1ie8Z*b)o`e+|wIB0)5W2WJQ82ImJC1{VjH1=m3hP$Sd?nIS7=hn$cbYKEpmKFALR
zpf(7EW<oGD3qm0rnhni`=0gji#n4h{IkXa51+9VBK^ve=PzSUX`VHCv?Sytie?a@8
zgV0~lG3W$z8afAcLVrV7pzF|0=oWMrdH_9!o<T36*U($&1N0gC28Ss@xCh(|?gRIO
z2fzbi5*!H+f@yFp{3ARV9s&=8N5Z4wvG8~}9_GS{un<myQ{XgM4rjtDcmkXY7r;eu
z2|N+5glk{}Y=kGn4e(Uh1Y2PT?1sIt4{n9q;2;dcvtSg);W_YpcoDo5UIDLy*TNg%
z&G1%uJG>L#1Mh<mz=z<!;G^(y_#}K9J`10RFT$7MtMCo@7JLW32S0!x!B604@C*1~
z_%-|neg}VmKfzz%Z%7y9d!#$k6X}igMfxKH5i$~mL?d*Bi3~=DA|sGrkg-S{!bTDh
zJ|aSr5h;?6WFSgJjcAZOq!7^|rARqag-k+fk;%vuWEx^dY={%_Ak&c+B!K*i%tR0b
zMF?arvH)3(EJIcztC4lcMx+DThWruohJ2ycP+KS%f<vJY9-0%HA6gVz8d?!r6<QnG
z5ZWBt8rmM(8QK%t7dj9+96B005jq_@7rGF-6uKI^5xNz+8+s6W9C{Xd8G0Rh8~PCX
z9QuZKMZ2TD(7xyZGy<idR5S)<pg*ENqr=dV=xB5t%0f9P4;7$dRD!0WGE{+Pq1k8-
znvZJHVzdmcK&w$bYDDYNMzjgFpmx-SHlqOQM`xfQ3Zb)544sY6Ll>e;(B)`5x&~d3
zZbG-9zoEaQyV1SqpXed<2zneng`Pz_(ZA6v=ymiT^bUF-eS|(mU!bqhH|Trx6Z#eF
zf_1}sVtugw*g%YoMPbnx9b;mHv7y)q>=$e-7KgF11dNY~uw+b%rDGYG5>sOuEDtNh
zbXX}?j#Xikuv%;~HU*o8nK2vY#5~w^tOW~TzhW~n1Vb?bn~N>L7Guk>mDp-*9kvnc
zz_wvKuwB?6*naFF_7`>xJBgja&SMv`%h)ySCUzUUhdsoeV9&9CvH!4l*hlOO{vG~3
z-UIKA_rrg{Nq8ha2&dt(_)qu{d>B3gABB&`$KvC07S6`GI1lIJLR^d|<0*J5o{r0L
z1+K(Zcs8!VbMbt<5HG@u@lt#uUV&HPHMkzH#q02Td<s4lZ^F&E6}RI~+>JNm({Uf}
z#{+m94&pO$7@visIF8T8=i>A6h4^B8DZU(EiLb)f;Op=W_$Isq--`c+@4$EByYWBp
zefXdFLHsa&1V4tKz)#_4@N;-4ei6TfU%{{8H}HS(+xT7lKK>AYj6cPn<1g`7_<#6Y
z{5}2=|BQbnz9YI4-H0AUFQO08j~GA<BuE5>h$03NF$A56C4M9Z6GMn$#0X*(F`5`l
zj3-zGo8S^Wf=>tuF_BE95UE5uAtw}sl28%Zgoel^@`*yCh$tpXiHSr7QAN}cdZL!7
zBkGAM#8je*FcVh7PB;lS(M(Jye1x9}5N!lV%p_o97J(8tF`Jl6%qJESi;1Pga$+U1
zidaLeBQ_A5hz?>a@f)#&*h%ar{vh@de-a0Y!^9Ed7;%EQKwKm)5x0oj#699U@#X(!
U<ikDS|2+df{NMZk_w26!13bSUzyJUM

literal 48881
zcmeFacYG98_Xj+4XSU2HnH@rpltAb;2^|CyLJJ)dIub&%Nfwf9$R>1TE{Y2Hh!qh~
zkt&E{0R*ukHbg|K1r<9eb^#U3`#pDdvzr1x_3`<<?;kJAZf0lC+;Z-@=bn1+)S`T^
zza&2Xm?TR~QY2NfNp{I0MUHDS(^KsC`U=N4$t=#w^Ws~2lM-LixF)`-(>z%v{%A?Q
zVQq%t9+o!PGslyi8~{2ZIVDYUNf8-FOlqHY{yF{<PeFfQVae#C?939+7^~20@RL;z
zZe|*?DQ~Z)w3nhJU1}<|lv+vgQb(z)v`D&HS}xrx-6q{7t(G2;)=8VCr=-2oE7Ggd
zYtoz2Vd<!JLV92NK>A4fSo%!*LHbepNjfk6BK;vdWL<X4)#X}pZMnW2CpVGX$erab
z^40QSd6b+cPmm|dlVp$VlZ)h1dA2-9UL-G-m&rHFcggq3_seVL&GLitcKK0xkNmv+
zg1k?DQGP>yOFkigD1R=0A%8FbAYYI#%9j{p3R9WR+^hzx$zoY^)`GQU@hpKQvTm$9
zOJRf9U^axMv(aoa^ROJ2%Vw}*Hj~X|oGoJ4vFq7Vwv64zPO|UV_v{ZPLWxwOm8+B<
z%GFA5rJpiE$yM@{V#Tk_QWh!KDc36n%3>u=xj|W?{71P}xl388JfN&o)+<|;$CW3P
zCzWTE*OUXwo62G3sPeY*j`E)JfpSLqM)_9xLHSixRhJr}8frDQmKv)zRa>d8)p)g&
z+F6QHd#JtDB(=XfM$J&CsHN&mb*?&3y;kMw_3C1EnR>H&yZV5-ReeZ(PJK~*Lw!p<
zq8?R`sqd+ush_Lgso$%Y)Zc89O|hvqmo36p%@%E|W2<XxXlrNdV(V&4vL)O4*aq6h
z+Q!+Y*fMQXZF#m?w%In*#%+siH`&(M?zP=#+hp5pd&u^v?J?U9+fLhF+v~Oywv)EA
zw(o5}*nYJAVt3j#do_Esy}G@wy`{aCy@x%;-q+sGKG;6NKGB|K&$fH))9rKZ^X%8z
zueUF@FSD<<udzRD-)Y}vf71Sp{UiIw_D}4e+CQ^@WB<Wnceot29JL)S9Py3>N1~&T
zV~}I8V~8W&G1@W4G1-yfnBpjM%yP_j%yDqXBFA-(#f}>sw>VZh?s2Sg-0Rrj*yz~q
zc;4}X<2A<t$9s-bj!zw*InFySIR0?_>6DzZ)9I|{tmka)Y~$?c?Bwk49N--09PXU#
z%y8y9^PIDsvz?}sJ8yN~=Df$b%DKh4)%m#d3Fm(2OU{GNH=OS~KX88L{M`A4^NjOb
z=g*p^xwL4lx)!H3(b{NjwVqlpt-m%v8>ppf!?m$mu9l}2X)`pgEz*{1%d|Dxz1l`?
zleSrVP<u$*rai1ZqHWh6)gIG!XgjsN+SA%T?M3Z1?SOVzdrLd1y{&zqeW-n=eXgC;
zzSe%!e$sx`F1chEb2(g2SEQ?&E811tRmWA|)xZ_!YT|0?YUOJ0ig$H#b#`@k^>8J*
zl3o2>16)H~lU=#4JXf*H?<#T4aV>Ezb=~H=-F1g+rRyHoeXd7b+g(q(cDweto^?Iv
z+V6VFb-?wy>#*xB*9q52*D2Tgu8&=xxX!rFy1sFJ>-x!c-u0{NQiK#CN7y4A5s?v5
z5z!IVBkDxdjc5?jFrrCB(}-3Pts~+i5+XWBbcwh+qGv>(h?IyAB0h@vIO3;>^AQ&!
zE=K$jX^(V8MnpzNx+AMc)`)B#*&?!KWShvIk-Z{&N2Wv$iyR)A9yum*eB^}4iII~c
zuZjFQ>OC;DL+rTzta6{rr+%bAr#~O@qyB=vPk&K8r|;Ka(qGnJ(O=bH(+}vcs~7cy
z`WyNo{Z0L_{+513KdK+okLxG&llt5GJNmo&d-^GPwf?^Tf&QU>TK`D@SpP)-RR2u>
zT>nBpqo38k)W6ct>0j&L=-=w!>EG)==s)T|>F4ze`bGU`{TKaL{gVEh>eYYO|Iq(*
zOK#cC+=^Ru+uU}y!|ilyZkId49qEp8>u$H(a949jyQ{lvxNEv=xof-Yxa+!O+*i5l
zx$C<dxEs1--HqIh-Er<F?xyZ$?&j_m?w0OW?$+)$?zZlB?)L6@cY-_7-ND__-O1hA
z-NoJ2-Ob(I-NSvgyQjOCySF>Zo$T)8PI32j_jC7m4{#53r@9BZ2fK&3hq{Nkhr36(
zN4iJ3)7<Iq(e5$svF>s1@$L!kiS9}6YuuCF8SW|WO!riGmOI<+ap$;m-Fa@WdzyQ?
zJKtU4E_D0cMeZ5yVz=L2;x2X1bkB0ncF%Fob<cCpcQ0^X>t5(K-Q2y%eVzMy_hR=A
z?i<}VxtF+?x|g|ccK^qHi+j2IR`+f0+ue7$SB`E{Sel>zp5&GcshSimRhMc=HKkfo
zZK;k_SBjCYlIltIr3O+%DHiX>Qk>Le%&@dkK3~Z-!_rcGg@su4upas+4NDvD&GwJU
z%rEu$#R53oS`n=~01kY|x`^NF4ogeU%JTUA-l^VvZ^@kSXN_TLW4!nw-!s-*nC+Vd
z@Y+>?S6xt`NxowLm?l~InSTESt6>CfGSk7?5Y7g1)`}}_!CaNLTxr9VcAO19A~i#w
zn@cSwqGR;ru*?FFshBF-o?HZpAS;u4dPHh1wUOFN?Iu{|7XoUWb?Na>#-pYF5?_JU
z*>!+xKQ7qyBT@n?NR&FDNr83Vzt*%{1$L4;1BF9NOES^#G*8KTsgu-2YCn2d8opRh
zc9ZyaV}R6M>LFb%^^|%^y`>~6S?VLDNPVS#Qh#ZHG*C*F21$dZA<|H3m^54(A&rzq
zNoi8LG+G)Xjg`hp<E07GL}`+AjWk)xkfunP(o`u+%9cD*j+86qNnUB1G+oM<3Zz2G
zClyIEq+-c0l}M%1Olg)hTbd)ymF7wFr3KQp(n85Joo1BT+MI7*YwkA>n@7wq%(LcK
z=GW#==C53qxE#Ud>RhhN<ybB^<8m7=ci{3<Tz;C%&vN;BF7M;=elEYv<yX0UfXfHD
ze2B}3xqOt%$GLox%kOacJubh`<qx_15tl#V@@HKBg3I4<`6n)4;PP)={)01#Gsq1p
zXLin<oVhrQ<V@$x;4GT68l2VQtPW=}oYmv30cWwCHRh}dXU#ZkVYWDqp}9`FURo^O
zAl(SMUm`7)mSO19e5J)%9*{s^kH5rQC`e%Ju(TnWQ$6_^MpKM;o;N=mR98~$%g^@|
zrxbexOqwSjGs9Obh$s@2r<oC^WYO4vq!y+NbTuv^A@tz5Y&?+*VbG$7+od})j2gqz
zhIywBFD=RUl#~(ndg*rQPN_Xe4ZoG$t=RsR(mm2LlPcEDRwg9EHPXH4;(gNn(pt1X
z-HS3o=tDh)rKylb{ifSA%$Di&-J-Vj5??26kT#mt%!X!*ccllVEz(w$@Q}1kdRTe{
z<!zT9l~ziROHW8Uq@B_(eD0F=08>K?Jq5l(Z`KfB7FY$9m|;{C0&%|?rQVrCec3}Z
z{nG)M>QD0&Wfo@wP2(|13R4R*b3K?Gn5zO36C%~$*XyS#kxjG1JKK{jfT9=v`RAXe
z9u1}?nGH0vx*4sR(Pqqu6VlVtGt#rtbJFu@>kHC8X_>Si@0TZ~_Q42xa|_eFbE)HH
zGh9gI)=#2nU^K^@TZ&d;vIEJZJbpm}G>{O`>5soCGs~0O*Q{mMFeS4l-gSXe@wDK4
z)a8^sPuBE;%;M=sr2}Zm>(W8#4e1cgd_Nj6Gc#XY7J0I~nfYdIvyQ>W%}eOmCN`nN
z0*e6Nl8&HI!9CYWZ%OT~yT_#C83q`n#bttRTPGcp+L!P8NzwIpsq1Dv(ax)=o#J6?
zpTK2W3Fs}@zz?Z`W_`2HSkaJ<fp&Z%eTt^iBSa_bq)(*w@0Ae)k;3QF7a)c+VdSt=
zIwyUN*SFGl(jLsA^vvR1PYH%Nt#oPu3c{^qv1))e8({1jnQ?f<nvKnvNnxDUKVq`q
zdccD29wg##rHj&9z&9~lTD1Br(ds4XH?yhP?DDkwbwyf5rD3%5cDY_z<ZV5I{>YKi
z9s(DwZEnUCg0*@CYxIFp7J`lDgLV4pUTiZlRI(vg1Nj6vdUA1b=A8Ao7cI5Nu!^r1
zSPi*mV3w?tYhbm=_GL{cY*(1ja*TXcU_!Ss=b0GrI+)OF<Ob4OIaY2YH%1|X*R(X-
znQhIv<A!E>3#lA|A-So<H_FZA=5h<UrQFJFZw@y{o7b2nW{b-XrW_;iMV(K;s{;+D
z*(QL31T(>mrvXa?6AN!kH@Sn{!)$3L;^$#j-906~P3|T4mXqXUxsRM8_m%s}{pA7j
zKsnXyV0JRQn%&G^W^c2PnPT=g2bzP-!Dfq-=-?I%36U5L#uIV^_zksY1lrL6^%LQA
zq@j2ovPlsJgVrk_1|e3;j;)KeE<sADVo*^I@vNQlSa}>uN)SEjVs<uT@-e8z(pjv8
zXYtpAVa>v)KepM(HkaXlfwIE*AC(v4N0&!#pb_ZKG`#W!a;>H`GJD|Fosc^&%~L$n
z3o$7i!^LvGTmlSV4Va!5hG$BAt=R&+CxgTV>k%6Jf7t3OktSa+kanYd6Co`cqXW*1
zF-SI(%ov|h4{}H*aGwQ9A)lrJMu9LG3rWH!<O>=j`o$~mo&{tvo+uod`43z9PWXJ4
zS6B;D+2F2{SIcXpJ&>Q$Gjjuj+|Oub_BCTBV)>a->M4!|>5k01QfF7m8_Ou9pE<yc
z$uOdW59fRQv6-bM#UB3^8-f8|Ek9gVN+UDXjJYP=S6ULAnUmwq%JUTe!|qqv?f_*!
zBR^YK<4|)5x;(PfTT&9}@{CC!6XLTTqLIs!XlVYwD!*zm^RoFr!W>~S>@uD#zbSa~
z$N*24kANr3N9AMYC^PM{JQ?LykRMQP*!-!glhz}|2tGw80WKIp`v1X`|4KK{$>-#6
z%CWhz=2&wK&BR<-*0MpmC3u752YN04DF1|Bk2A-cEh|7+6Z2<@KOp~NPB2?k)su69
z;rf$F=*d{olS$@8GiFSRugL2u9+~wQTFo@PBFeQo!^|)zTdnRdCgGQ8HyBzN7h%;{
zG^-9Sl4(vc{kc#cXtD<2MB7;{i9g6{vpTFUi(yx>daOQcU`{nXW}Z3CoNgAHMdpku
z`^7Y?U#tmhihgB?er20k=vRMFaRK@@s|swCJ=K=AD|;%}%%MqFeMCMauHxA2%tC)`
zz9+UX*2s|sS13d}$GVgi(#Z4@hcciEoy8!QVhD-5w+HvhwRn&i+RIJEK*Pd$Jh~L(
z@mFXD8^8vZHKV}Hr)I<e*O`GPV4)Jrjkk<t5`&}#EGK+CB>%`MRo23W5l==fqo|f>
zDLTND3rrtX)#{&ARmQhTm?;#EA&xy0-$)bmT!vl!7g)kzWtCy6ky%V5UQe*dVhG!X
z828N5*rH-j0j5N3QGRCOWbm(mY2Yt%FqV&3VYx{%)0}CR(j-Yw_GWtm6PgvW5=`h)
zb5?+jv00eGY_>VOYD&+yC>=dmh#t%g@S-_bxv5ZEU?!riK~XFny{RDAEs>A1n}l4a
zfl)3nrOBB^Mg9zbP%kPk1ukK?u;l^hh31Q<^r6v$-Olb{ce1<K3U)VJ$?jpR*lM<h
z-OKJ{_p`O^0k%%6!`8D6Y$MymHnRuW7Pgf=#I~`A*&}Q_dz3xK9%oOm9c(At#hzrl
z*&g;3+bb<&&qzDib9nDzd)YqrB7+)*zkBg|h3#jr(Ot=fI|uRk27Y^!9cFK_BkU-i
zAt-tsmv%sJ>kDs&rAI^ZpV>b@GZ!YET2Nvvt$B#I(9;KM^K@v2q-jH~#pq|{^~o%T
z0G&?SUy3ikw4e}AH6z=QXV%!v!V-TUXyl{;<(HDGHoVAFIABOxX>kr%1u9MP6@zpL
z7>hR6yZn4ulG5iC!MH-2Idq!70fk#wqXKOiTkM6FpWD}4Y}vKId&=5LAl|}KUn$yA
z2l`$i7St?HetsI%K|C|i<IT-0fohpnT0}A!Ra^@SBWwk8u-*@a667uP4=4p;WEc&C
zEgIs>g<&b*f(fg(A=+1*nTtnqE!2_D+#mJ?Um^7B%zWS}&}33*h1xmHGn?>H<SWef
z6r&yeY5G{dhLD{OpyYh$!Jx$w(T+edqdYmKeviMuw^(4+Dn)cui~u2WK(Vj1Xq0bO
zTFIPzRC!fd6Gr2~G_*9|Lt{z9C^Y^)nOW0w@k}A?Bl*7K0G??ilS`rVLmi(>-J{Z=
z9Hs{;qc$NeEi=cH45F|Q6Tn)%%OFKyL|6$c4$4?>c1a#^F`(FMH3F0|(31%SQHSsY
zx?>F-TF|dhSQ;{nxB%G^OmGy!>_4K#AkDA=NEEdPZ+Hr`EtQo94XB_FrQ~~y{OP_v
zgbol8boes72JjhMR-#3${bm<oy#r~d`+WK7c-nlSnjCFN(BqeC<_((pf-^2jvi_N-
zDLKu3_`{t}b8qyhBtS{kVI>j&;*y*JxM$5paY+f*7tK($4~=S=_iwXzz&+k&@3B+t
zeejF>z*E+Pe|*3`1gE$QGx;F<2=n?Dygp-}voF{gc9xxibzukl8lTI6y*>lPC}WCS
zeWaNTVuLY<&<Fsm+H?i=S5PMIWCe#D2q%&#fYAlCoj)fzdm7BBe!?fnG_}z0DIr5H
z><2SZg5TWBStre0XfEWeqXC;=XY<BtvSi+9N*ZS!sOuBvb?DFm=9I3T7o0)|?`A)U
zZvBXE-2rBJztt_#r3>sL{$50fex<HR%Rm-oW0PUjv{+86AEXF(Z?VTS(C06q+83MG
zY36n2^;DlJeITlN4_G`^6$Vko5q3mj;kZ+rRGnrnG8b{yRdgfJhb~m&_&^`JSf&^y
zO3}r<5{(N{@dm}M7)mv%eN{igEI>#nN)NJzchUD#>~1u27qCG?eHXi5TBg*Hb||$l
z)MsdLsbOftO`5p`O#)(Rv8k=pV|OU^fxY!?o6<n4qcl`vl}7AtrLhu+GFPIc`;;bZ
zm(mny_z=s)Q%ZA`+!F8BN*kpuy9j^w4kbZJR61aB!7oY|wpZ!O_AA{391Y_gXz;+a
zEX$?}lJW;u4RG?InX`vx<`#OPJqa6~m`fHmXpYgtg5wW`{UaO>C>RqgQJ7W-VErg9
z_Kfmm`B2<k_~5}DEQsWS63kI}@ynHf$;G;vFlwJQA!;#aB4_>Ll3;?Qf97>@y$@TL
zpuwJ;C2`i<yg`5uH;m+1NfPgs_=|U3@9!*NDiqwK#yku*+5Z-_iJh0wxlL?h*9C!L
z@2T{<22w<5LEE78v<6%V>PnKt*DJ|NA0@?HW<Fv*0h^A}Um2hbR8o~e7^A_;5M`(`
z3^QPdGC~=tjDn9m9oJ)&vC24h3p$<Z@0aZ@A?8QRB3A1ZENf+)lD?1$FmtxxreJ&^
zCBeFhz2R%BU)=Ce0Rn5*Xav|6=DT=~itrYSOU>M9-W->-JV~IyP|Sxl^TD{JtSRDq
zT+;AsZlg<c;oHhYbYK!>mL1A9%48)&nWAJWQ<W?bO}64uaxkdWJV6~`C|G)ne8sf5
z2Uv%n<}$dDU`^;z8E|5>YD!7w2J;qkwfP_O-fB)MZJ4j%xZ+i&DbtmFR9m1FDn6x1
znSnV(%P7b&CqRba2~?_J+*la0ioHcx&;Um!xVWTdq92lBn75kC%~c@Bc0%7y6LBA-
zQz`P}2x=%%N|l)~K!YRVPN<;dl9FQY)Y1}<-@M1X?Wi)FJV(kLWr4zh&34n_%UZ9@
zRpu%4&D+g8%sbaB*D4DY)4a=EVcu=76haG?NUbg_ORVK7=_2YRb+jL*_OPGo12y6&
zdL#u_;ap$woUq^Pj83(FFY7jVaUK>@VZ>B!RBi%t`+9{{H?w%oI_1WI#adaaEE6-d
zd=J+tHxs|YDp>x$RopGga^RAFS*P40wLhxdrrZt$+yTP9lgKI0TVjcLkSa*}@(hh{
z2X^0~Lt?kCojObA8mpKU%H4n#L%&X0A+?7vt=yyBuB=j4D|agQD)%Y(D{F~@NIDVr
zeO!b3^L@GWE%>at#=PIKoA;S($5;ah8mF#fF$hxDakOv)O5TVXHYuCY&Igq{iQIez
z5TwA;z)irqEUUe!PBgnuyp$3jn_xa*t~sVWq-;|j#`BLT+m%O^$I>yc`oesbnv#Ns
zkW7_tXy!UB|LccWtF}gxs;z;lkPp*=Q~>AGfKkcg$Bmy5>o|o_quOxiwv*hMS^lEr
z5hI2WH5Q^77FC9SUO0gWC;U6wmdXnM<u6>@vO)QPdmisO+5W5oNs_OYBxg)kQE`bR
zY2$D|ZdOSVUC+mLjp^y5QgD4MU?Kz0;<nUq04aIitk?mtk;e|mEGWo~O>CDKJEGW^
z<IS(4)%4JR^RFPkl-f=I8sZ)4pPn`tf7_w`*Jo$;rR(mvempC)UmC8v;`-c7@0ek@
zPLd?nq^P9NC|nQ1b$03W(aE@OgX>3fiu;eobuV1Mn^!uJt~*MSQfF>n`dD1Y;Cje(
z-(Y&SF|Kn8rw$vAYt*IOl;uyEfa?~x-k0Y|r7>%Q>o1FaqX?#zB&m9~r*A)8qaA8j
zZ%Jx;;Q9vt%rv@>cB;qb=A}?OQI{=pTIQe;xCS?}HS^>Tpn6e`ZAekc2r3ibZ8Hn=
zhf!TgxPH~+7yZR|yR#%OeIV{9;yS&gIGvtFd+aylc>AZ~x<9VB<`oa5`{=LzyP|wS
zXTXW0U1o8=0k{vGIA#}@jv_pukB$wV!qJ3J(1_y$X^fl+lY$TKXAexlg@{#)g?YgX
zLjzsq!bVbncPv`a2JZpF7(pfo^0G`95XFdX3;rH_f}Uv`a0cW6HXlz?Nmg0p<|at1
z6w6hRD@r~i?qvmPY=;_C8f=8AC>Ad9b7);2u7*md#huw`VFA9U;BF~?%f)qgEs3C{
z#DIUuY6JaF#uRcZc+p!Qp2!w;S<g{Ft+u7$_d>YX$&?=Gn_3%DXdUqGp$<`ds_~*W
zGM&$n+KT&Ei+jOZ$qf>$H5WAoYn_3%hW9=kV?ivw0DP68<b3py-2c=DKU(t}+C4q+
zbO@WG##>`bTND+oxMgJO<W1-`dcLSQ!<+Ty^6y@m|8yNG_QcK4zb3_QGxoeH`a_tB
zJ+AJabTsmn`BxZKYy870p!}!~52qVJN!gX?26fqv*bdu1upN_P@%K~PaoZVOy=Oax
z*E?nH35|h88H5=cEsNT+WJN#{6($2S`Qq0C{7NHbS?dM>KbgR<6)0iZ?%E1xQfMs7
zQwWtt&Zgk+L=jf)xhU8A7S;xFhbV;VCu*sTpT9FhEN7XZlAOX@V~UC<Z<>F}Q)G=F
zjh*MlVHbu;i`v9L8h<W+L;SY*ALBnL!&hwl$@s71kH<fNU%tYkyc2Pidz7b?gHkNM
zJ*B*$>=9Snl&A4}tn4|<V;Z8($}@uKGb=Cy=+}|}4TjH^aGId;ps}LSAow5-rwPif
zjH7TGB3%Bp7KN8no`YDUFF2GQrzhwRy_MccPu69<5nhRU60YL(#`+MwHhvwbH`n{>
zSC!!-IAZy@Lloo{f6Mc|@n~g`(x`uV82w_w&EPu2_wcq^oHDi?|053Q4WDOn6lStj
zlf^@-;$1;^sx?-lQIi+JKb8TQxI-a$Pk9)NPf*)@@<cI)RkY3C-QFD0sLk=L#jRoy
zojTCoUy8LS(0zM*`ygC*BPg|jnxLkF>kXG;)nr8BCIzmE6JCuM@j<J{ZAENuFSW1Q
zm3U-$Z_yG9x5O>0?rHcegsf2lkq&E=1P{!dVlwE(3dub-wJ@t4l(P5)tcWCM5sW1L
zI8w+@a;<||rNuL?dn*00AvV&DP`bJZor}Y&-WF}`g21gL1ZoXJU{*Q;u_mK+c^J!L
z;C8;m5qPu=QQdb*s}Q5J0lx1?U|fC@@hmS$FC%{BuykB{4=d1T(pRu!Uyv@zGNQSo
z5X)UxZYVdETg!=ZSGd{x$wLsyJzkz7=gNhM;hryFhxqN=<yG<n@)r3q#BIMIzb3yW
zzaxJnpGCCxuZYu*M2vQQ){M1hU0E`sveVf$A{u)xVz6(4R=*AwgI(+e_BuPxPP4Dr
zc|}4rb}glm(pKrJq$tA?i=Bf=>}w(IuRz50Bj5tBAjbN%a!&b0wX4+;Pu&({Gf*9^
zW~nm}H+{3ZN_|k>rS3<R^hbz~{=*h!t7mI%>uyU$1avN9pKq|OK)mx#+e_fupV=<h
z?e<!ri!Pv-@%CwmV7}RYuYJ4ydHY+4SU&G?IO;lDJ9;{XJ2D+5h(f-{vCZ+E;|Su7
ze|APV8#)saT|B{A=v?Gnfhgi<oktKgd`UC3rdoHz24`z?wB_0c?J4a|#P?o8ByV$9
zPglBYnu{YQ_Yp+ko^t&d5fRZiqFcns2ycWLu`=S(h*uFo`%7eWWGlqSPKqpzyd`pT
z<nxj5ME)2R71b;%DQZGgNz^S-TcTc!`XK6Oy}I5`Pt~*ah5BlJ7vf*PK}2d(M2SvD
z+~x}R6Ye+N=M2qgW~3OI#<j+3V~=stIA5)LwS;QJs})qcx!TrhuT?t}?TBs`-7h*j
z`ugbg(Jw}SQeCMYS3RYAR`u(uZ>auK_0MY9Yc#KsT4P#`Wi=kIaj3?3HKS{GtU0FU
z?3$}<K2!5_Eu~hoTB)`2Yb~$!c&!t)eyv@<c5-b`?IpDzsePpO#X48jNvh+iv$W3k
zI>+n$S~s?Czq-@w-d6X?y6?xRF|A@o#>|SjFXp9~b63^4s>fAXS1rBj@vGjg$Lh7J
zH>%#edh6>QtarYCgZcyN7uCO~{)_d`HK^4fsll`ccQ$yo!P$n@8}@4GZFpzH=Nf()
zTQfE}Ha~V{?EcvA8r5qwuu*BF2O1q}bg6Ok#-kfAYP`Mi`*E(gu5meWcgF3D`>sjD
zCPSOdZ}L!+cbjTWyEe^hdUw-TnqF+yyxG`hH#U2+*_q~bnx{6O+x(&Cr&>g{=-pyQ
zi*+rIwY0bF+H!i!ds`lE#aeZ0mDg%@t2bM-)}32>Ti@IItv0qc-P#nkS=Z)d+sL-b
zZD+Q9sO?AXYPB2EZc)1@+kMl%N&5-yZ)^Wb`#<74#ph#vdoLk6VNk-Ngr^dINNkmu
zmAE?bScj+%{W~n|u)D+e9b0$wbiA+Q+nuU+8rtc`PWw9j-nmQX;?9qBKHH^9mnmJ=
zbUE3zM%NKtZ|?ePH(R$p-4=Fxy4x?^J9jVX{&@Fqd$jE_y~oxbXRdC3wdd*$SAWv8
zanH=25A;0UE4J5^UTb@u?%k+&X76>qKTe8E%1+vp^hI*Z<Y~#<lE3K_->10G&OR4Y
zx~D8idA_gGcR=5zeGm1E?l-#Ms(v5zZ`?n(|3m%18_;RMyaCS-v<)0Q@V0>`Q|qT@
zrEW?6Zcvv&3kK~U962~`@T$Qd4{0@|c*s*j+0a2l?-+V&SkqyJ!=4;24No0@$ME+@
zG#@cz#NLtikt0T~9{KsGgi-THy^>ZvEhBAf+J*E!>C4mK8{J}b>F9l9++!w<*)rzh
z*uG<LAA5RS`*91#y*@r>ym$QW362S4CTyB;eqz6gcTN0kQm08bOgeE*^J`{b^V;N?
z$@!C?$#7?6W;`*)Hf8LTty6x>9G<x@^ZeA*scWWwmz9!rch*<gN!fR1pY`<g-0t}z
zr)SRXIcIWv=H8KeHm`TyioA2)6z?kU_tOSWyMNln>BFaQp8jY4*!=AU&VnfgdkUiq
zrx)(`HSo>$y;an@=!T-xGrG^XYsPoQgNrx$W&bt)-6b`klpZW?QM$PFqnW*CuAcex
ztTD5mm|bml;p~HRTFqH9=Zm@h=Wd**&dZv&Z+@fseEvrZk{3L1t$gj&YxgaTTX_A#
z&kzgpAb0WU{EbENi*8@^({*F7d+Pf7*PGXWvUtGahi=esD8Aw3jXiF>|0eY&?@fo6
zbXaoFl0TMaFFmj<e%Xp;zula5^MU^){AcBV{=6mUmP5-sFTd|r`>lnyp17^|Z4cgF
z?e@91e{#prJ9ga}d*{+Sf4VE<uGdy{Tyg*1uDeU`KD~0t%H8)gx#!k<ep{8d>iFtD
ztGBPIw`R$ji}z;Vd*r^P`yRQ!{{74D|8=c*?b{CwcwpDMX6sh0x38bM{__oEHoUU2
z>&7jcVm2+?^!w(*&8Ht6_2B+3UAAo5T5s#}huA}<51rjMY1`q4`#!w;k+zRKu)Wsy
zWsgdamOlFBV^bbG@%Z4!_dU_|iAQ!c-LYn8^_@$1$-Cz4`tHfRCr|Glzx%B{gZAuu
zs>f41_qN-+`RPVauYRWHGs~ZKJ$wDLe?B+&x%1B#J%8?n+!sFCm$C1?7stJLZ2!pp
zhh7@|(yK4`fBD5%l3#i5)t;|D{aW|e_8jPX;K|oJzrO2Wr-M7+==8?UL!A%pdb7)$
zyAO9e{M1`lzxC{q-bY?I+V|+o$5M~Ietg*Rw@!>c@%G6{Cr`hf{q~u6^56OX-I?!R
zde4Mlzw~|M{S_b7`(WLNEkE3Ty7TF0KI;3?!H?5Ee(#g4Prmxp|LJd^UH^I1=PSNw
z_{EkpiD#ZZ+yCt0FDHKa*;hqhT{?He*VVpW^G%Cyc6^)k?ZNNHefQb-#ozz=!_7a|
z{c-b89e>()e#H3?E)-n2baCm=b$@>Fm#)9O^6S`NzqmB(H^*-)e{cEwQ-2Kp<J6x8
zfBtD%pLQrag#{>RqgtozlG>NMW5MlK_Ea?7la+F#vKy=DUgc@Blfe>Awx<4G4`Pii
z+pOhaqAxI&(VusfiORFEA5Bu8BWo$!BJ8Elvs;vX%8SYvSWI71UdFQgYRGkH*~;PJ
z6!8^#zI@oU(qMWl%#E%QFD1jpvCZ6UK4@+-x0qY2snU3AL@ZTyOxQ`uO8UBTkZh!J
zNiZ$YziMg?vU!dO8tvX9qg|f_80E^F-;P`6HyGC*BGVddfmyKk!QfwJRI||Yl=AL|
zAR??gr<C{61>ppNDGlDlb;>COrC!$NeOmb_%;x=>@;SRjGaom%2dvKHt#-#H^|dZ8
zZ*~3(I6OyIXOqmvkC~5}_l|>wuOJf+*I;+QqwZETNB-rZDUb2Xcj-6f_fVHqS!L9v
zJ?4%;mqsRuuEZt5WJCWh+a=Y(_NvaZF6}aRn)i+$m6?@AA<y1&1ExmNfT?Z_*pnEr
z-4iVns4!-RnLpKNwYp{g#F(cfSjNrwf~2X|u1uV24EZ96JlR1aPca$bb)Dr8`Hux&
zo`RDAq`24IT1I_pBek(beK4HSziQR16ZMsEd2`Y7mT39YX!$d6%Lhm;R6(U~v{Bny
z-53(zu5)~1mxN9ox^$3+;Y;ve7prgOt4b7AbwpLqp{nP{=LY@G;V9~&cD2d|opem>
z*ttt$ht8c6rGD}4I$323I){$ale`z?RiTNx5jT2Sejj)`$iIQfG68m5e}-_~pdnHy
zgJFr9qV^4hio9gLN#46!@buk}(2%v{y+e@5PIv&<!85uM;UlNm4s`&$caOs#xC?<I
z50VEE!5#b5!6LNdxH=R;AtJCt9S)iq0bON>IvCzUzyuf&JkU<_Wq1k?Y33{DtMJ8|
zFFTzfZ{vrk_kQ7R+$Akj$Km-2>O_>YOw_fPJZ1N5Tu$fm?I;8<4Ai`N37w#Jb?iiL
zv5xVH<k4NQ;6uZ$W-1fasn8~}l?>IRJWDK3%~2+)xl$c9PxY$P)akI??NT093)K{~
zxCkhJQ7u;eD#9LMiyr}#voG75B_ak8j}Mm8r?jNRR~T^dfGZ~FBf<kI9|%7YerU@j
z7|c${%oh<9aAB0eg;D^LOJ`f9QN)Sh-@*D2b&@#;PP4Ge5{<#pDu_3FVAqkc2x^Wt
z5122RubG>x$+wzs7|dt1f$1p=<`6QEW{STELWDv~=7=i7#qbLmr!vc)v7jsy37IU(
z%tD5NtRw0y;A^%z2b3mSFJj1FHxI(ul{U*;l9gxC;(T?1@G4oY7LZn0$~tv^z|*5H
zR81^z76h#k8`Oo?`ehZdNWG3?0|bsYs*8fOd`%WItEOj^<RMTbH?IN_%fF~g0z^E)
zd<)T0Sy0O}D2yrtE}()6(CTva)&TTT^YedB@+$%)ztSRk>5#e#1hiU^{0fWY1+5<g
zk$$F`$ITN&>&Grn>+1!rZz@mg(=1xQCXCj*#e>#6bQCV&#ICsROtfA@c~;#fZBcX8
zspJk-Gu4OHN7U`0dr&{-Z62sTM}1U%OkJ*|sZW5$cc?p|TYHg_gO~Cu%>#7cY4sU=
zJ}bE_dMx(jc#4ZX+5NI}De6iPv0r3_i1|S=J(Tg$zt~qWln_pCO1hw%6ia{rsj@&K
z^6dtG5``nb!8dD!&yQd#U!i%_d?(s&CdG<yl<Sk=cKsB|x<u&6aX)FkUB=Fp*VX5V
zomaEfG{MDBA**Dox*x&+TaX6uIr!Vd(t{M~t-b`)h)dd|BKi^I@&r2gD0@>q2uGRd
zfcc&oW4?p9;1h_*Yh=C~i0)GlsT8Dq%6#8!IWfC5ma>#eJf#Rss+LjYD;ixyT?^!z
zOc-8**lgmve&J<Tk4t=m`mB0VeOrCUeB1oMJZ*klDSJYMp^H=)G)-g~NaxhmuyA~g
zChtL$tYGC6hSU6z8aXMkQ|DMLw)tp<ze2F@Wy(6IeqEs~xA_s3HLk#$pN|m9zgW&i
z_2&xZ)G<E^m4lQ{Yuf&<{vlT65rm-7<ldzIuKpRE;9zIL;iri&9<<3e2C@o!Y?Dn6
zP5aT=o}!Y9(_Q-7hKLwst!c=$IfLm=$uJpWi7NnkRhaJ5N}D?Xt(#vWTt+}w1-QXh
zD*#x{JV)zFO#wPfq?cYc*b)Y*`hmy3F@OBW?8FvVaRs$CXM1feh@IHt!q~~T-~?DY
zzcarlcJl3I*@-Ql*omz}d3LhhVkhgu*hvDhkd7Vxo2AoM4^8bES~>%((>LZ1Pz>Hc
z3?Ra`@~{pf8VA9-loJ8bs?akV)80SPBjV{YkR?%Zpl$tZ{R5~yZ~pR+QL6?yb(wHt
z8-ezYB-E-EIW<sw!MqsY)Rt%g{3LWuwD8l7SnuB!Eo}Wz-!+x+bKd-!@Iyi8L*c`)
zyarXKzhG_!(3FEbY($cHJcSkL+~%?61dw&f{PW*LRuLLM<8sLQ&HOzaSsl6nSqYs5
zvN{XI{e5J4P~U<|$hu_yVIivrq?}UW^syYY<Zy@;F4kBf%Vc3aAZh0`-j*9|D()BK
zMUJDOEJV(rLg9@2iy26ug-SypWQ>aAu-FC@J#i;4%UpKRNYu40u`T^Oa<y%l?Plpv
znRFc>VB76M>DqQDaCBGrnAlcZ>GGIl6i!l1N%OwK5s+RHt2{^KAeY$&$`)h<wFSZ^
z1AEJeGDZZ~e8h5DfwdwWi_1z-p5d~F-Z3t#fw7NEntvLisYFb3-n>qTQ0vmoq5;IH
zbx2sSV8Xn_P7qtVbc$c_PEgGY#cQe4Y>SnBwg+tM(5>~#E4Gcmow<$6b}l=(Y%{k;
z!zUv7jC|y*lVkJ$8c~sADIjM;ex-ncsh|ZK|9ng|%1{V8x~;pEk0$aK#NVKs-49s0
zPbCnQkmJ_MPa~Q6thg6+w-H4KpPPy2L@EvLWWvo(4l;7$P$mhrfgGzOd6N^f2zT?P
zb|K-W!1kaJZX)ZM6;)K*!$B35%TCf!Cj~TAp_f|g>EpI10>Ny;47Abqcu<4}8?Ksw
zGfH5usYu1UZF_=L9LeQqqT<?rhk_B=8PE-Fh~Pxnf0%A)dlAD-`PMsZ&si&*?EsM$
zm!rhu#$}z$21pAx=&sv}%`G1?8wfc@8E@DQVWB(B&e{%3%WOwc?lL?X!{s!gCidV+
zHHFsLlh(WtNAD0{Va1F2`;(Nt8$L~g9SxhNr_s@m%60S$+nK;b61}x%QhzQF2zECv
z=~^+9(Big#Q-ihbMs?p*<eXf_09LbjXUi}R(c+uIR3dVsmkKJiw7|1shFF>;!H}EX
z`o)?RG$TarEKG6%vO>V2hf??b6=~^$?P8FYYH+#EKVF+E%Sd*a?X@$3;L0)*muqsl
z7I7#@Nuh!7Y^_fJ&`MytfExA6I7Y{6TR3i2<@yxFGllg~D!2!`WQZg|!CS1Q-_o`%
zToZmN%a}MBf<`6;a9omAR1v#x*lP!|3z~2Eug+9^BlNa$I04&Rl%J_rak+kwbh%uw
z49%4#%KyRqvUfo9I)*pT_JzHB<@wcz%Y8$QO!>Rh>J8MARC&mO?FQD6H$vWL0j3WP
za!?o{MqhpbA%TRJ1s?{UhIgu%ay0RfKsPBTbGj#Es<3-hoIvnqrv`_(5tp0(;|WyR
zOlMC+-_i+#K{K6L<1PCfmm70AjwTQ+bk@ki%$Cqqm>&MAnaw^BHBPCFO?0e@h0XS1
zOzN+hvHW70re!xDQ^sObw6M}xSR!E9NWems<I6&NRt~mep?!l2kgMgXFstl&c5e{n
z&AHtA-$c0|2q?KM%3E-`WhIn%thiYHEz71o4>g*VQI3wa3KH;@Er%55M|=BNp=B0=
zD<q$mq19KIQHbOUOKq-zR@)hSz*2|RjmwGuF0;A=-MllL8`xKsXIAaF93SEX@R&hZ
zCH1$nC9H;)g#QJv+KASXaW5qFd|`)(D}?GWS)dn}lR|Cm{dalQ8PxK4<)H?$6KJS2
zj8;RSewR?@B>wt}$n+NLDV*u^LO+j%c`su~tjD?-g{9pBfboOU(K7QZii!58>_`H&
zl%0-T-b3SA-TtioIfUH2VBcqd(Z1jQlKo}-EB05VI`-G>2kfug58B_bAF{t`hp=Wp
zVn1p>W<PE}A?>igZGQ*v_w1*nL-zOW9{^M5lr)%%tsGubRWgkF!_r`JEEd*y%HSkZ
zTxxdEvH(Mp1)NU%7Qy`i1%@&e$_gPv9o_bd{e6U~S|piKR+&F@riaYhBI(B}Mr5oY
zW5dc=A;YG(us`%~WdA__4w(A`6<GJIRuW|9>?$F_MT3nDJYUurcyFz0$=?L$DjGUA
zUAP&_`X#m_f_P8;5Z59%!g>ms7A4eeVTKFbqMS*}zTt8wl7KsNc_){<ad`)qcR@sc
zlFLts&)r<^8l5y-0!$Z3$&E6M=JV!tq>Y9;CUj{R-=SN4=lH-sk$KdqD|ERI9ii9x
zjA|l6wbFJd;JjtqtH9toBD2twk8Ha{vR#9l!QTVF(%s1ZD)aWR4e<9&03kqc2zq<$
zUsJo&(bn#k#fr<13qz~@TV!0@umM;Pv&Dx-wEai6%l?x{PCR8lPuXfHol1Vle!)sk
zRBPKWVru+M)6afMdC`81J!SvHehk@Vk4ifnBtv3qiab6m_1BXPpBf>WXbh&yuy6iA
z+KCuUk%gIFTv~`cGf%eI@ypNUv0NTQ>I;`go0|pBAH%1Z*H=?dG|>x(gL?5C&HfhF
zjR=WvvAtnmWp82IZ99Na$ZfVW4#<{}HQGbG60*FT%PCy$EjZ{<+Rz1DtONAyfQ_mv
z4O=3aUH%7L%n{4>IvNqG%2c;6sC^Z=*bpuc3vscbRl2s-Y4%m5^^;rI(bl%k()-&B
zy&r)yax#>EbF0sI1l!Y<Vl^*>@rGPd9!OE7jKpG5D#Dc|Mu!yikVA`Pfi^-0u$HX9
zuH;w(`Cl_16`>YuaU>;))O(TwX*0ZH5r1w;Ayx}A@he&Q$RH4sZOW7>JWYlPio7L*
zf)$r*ZLvTllYAN6D#sfzD^Mv^Kh;7rjtmQAs3^ug%NZ!-OZ-Zv5UX9GWxSmb>xg<1
z<1G^~kq?|pAfJCt-*<G!0QV?IG`q_$%&A-+6e5?%%aKcqGIALZB$s++<kBxdF0)`v
zrL8k8jg>U5xdL@$Hwq_!SOnOHlMhKal&;}}C{N+zL~ev`(#LXem+Un}P{C4YK<Kxi
zmy`yMp0Y^5vK(0!Ny{S}(znZt{$w?>lmdFvY6THFl|;eU6!;xZj$xuK5-H%OgZrBX
zFrlL*m(u_yc3ZIEGDx%?C`01NAQIhWNE{eIqNkD)Yf&Fjs<l;9IQ@kyvV_E-an+*8
zU{@^U(dJtgwUR-$K+Fc3u|f3EFwq`5e*8kYC1tzm1kgY&2p>lJPTRFu!;mSc+$u|$
zCnSr)Ny<wI*d#+@-rtj=iHavy7OlXG2U}8fH|(DoK50Yh$G_7dtDAlVsnY~MLuf8z
z{vE8?2Ql~}_Tk@~z0e*UP=>--{^9bocLbM5hGuV%Dh<5$Z9xOCqts&by+a1x;l$>r
z0(&%DX<M71id>$R`>)8%D=r4K8x56Xkza^>34aAb`3~A-C_$tI`<xCz-L$yGg7~dF
zqi{_rJM=V_L|4{a3_5HwFcz}}k&=ZM#D)}YBDSu=x+uu*?}wr|Y5?WeRwlKfTpneS
zT90y@_E_^_8oEm}%bF1+k<t2L%>~Mhv9{^4)(~q=3C$gv)7Bbh&0RtQb<~0&H0A;^
z2yLNQ8xsD+V$q3m(GxMP0y*f0<NEc%O$G>%wpI|DYbSCEbV%$(fJjny+=z_^?H3(O
z97`R`95)MbX(E^NxqKU!A23^-P*wwIxwP1EtK&A?I>#Nh=Nxz04m<9K;1!VJ1L7D&
z`;h!EoCOnv)HNQGA(zLEOvsV?1vn|#k1&xtRy)=}q7IYi);U&VW6X+msw*6jFdgfy
zQq5yrh8&GTCyh+BI<ZOOo7Lrx2OV4BsPs6t*%q5exjdQ6Q_b_{B`)WX69dxezwZ5U
zz|QM{c|PR6bU=oz;GN0f@)S%;3OI>N8u7faDO(CJTy%*Y1buc%pmqPUONHaXU{I*z
z<=|2=*$VdLa;8`*rilg9vV2*zw^r)@zv%K&bQ!{WSeM_e)a5KLXP0$(c2c0rf#osL
z@=A8-M$uuAZ!WVuI<}N8j~@m5Jhg0j^aPg2PU!aK#8C3?5YHiDmG(;}I|)rEi;q}I
zb(S}XWEA2oG&N}f44Zlo<O0jr{{orc0GZ#0Bh&UpC1mDuIWK_BFcBlP%8*y@ayS&c
zUWoOVf;h}6!=X2T!?|H*KH~b8uwCA&L^g0AUWC5@K5$ijm9?ZhDuJY>EW9i>NZz%|
zLP16OZY?(IE-wjMcam{8B&t}<k-T=ard#7lEu|#8px{C+utX!es?v=g6h^9GpkvZ}
z#U)-(B`)Mtowg7c;&K6(Z?)LaWkM#MF3gb$&L|9TSjgmZD5L3IF0{00!M~i**t*YI
z-C4s~(^<<|+gZn1*9kS#$7SfRv$#Bu%L}=D9hYz9@-pIM|0pulsaEv<Ih(M(&Zb0t
zPBj$Qf}WvmhtSL-F3%9sL_yH#jO8@3Qy{kUp9NqztE0|@$_pwwTWp!dVkn{u2eriJ
zXU6*H6lNjNun>DnlX>jFo`FFegdBs;UT9D6a2z<Hz66wLAi{DBmT<W=hzYm_*H&O?
z@m++B(G5#0>HAfRUCtUovCBEc61)5%v1=xYU0bW1hBS%Ft3j67W3ea_gC3IB3f^CY
zNnuTay=7Cw(trt;CT`FIKS!{+JTavySJaQ`8m_%t3XjDKtSLl{)Q^`(WUG?yY}I8+
zB?L1Z+t!a0Vj(fme8?~~>8-X}3?mkKl_?PIQemg+1Nda@XwX+`S=QE|5Lf`^j;61*
z?IYDdIqsyN1oh|2ZhK2UYJrkRq5Pqu?C~hO-M=?k#)44Bg%gS;dIu-VY%b3Ul8D8o
zK@AB||0oc;6Dd7^U;1>`M4j1{CkuGOTub`wiN0FPpA}R?o~@wt8CwOmi3X|)yReqZ
z%Z)H$m*~f0s+PWa_TR%S!kU~Stf^`?G@r{0Dq}X@(y_Y<KiJ<6ZF1H^os~kH1gpK)
z!t9_cVzxY;5oHGgw1Fj}|B%Um===YJIA4PP<HUr^v3`@wJcM&HYl4~sTDyoW`v=5a
z8&$5TOw3r?7Fj4yz9Pykb?M54njMHZ3o^R1Ks{|&5@K!^LkfA(ELo5Yce4TI`S*w#
z0aVWQmq+mRTwWYPFiFP5F1lI4ja}&aA7Ho+>fBx#!;l<q_$%z<uVA<$DOYCbB$ZXk
zF8)jHtBSSzY4rD*a2z{dth{#L#N{PHOvfcHI2~HMI}%s!WZ4J0LK&eg+^Sx?>z1wE
z2duUG#?acml-BN<Sji|vBxEMBjGe>_s<x4nJ&i2EB+$|tXI;?{kQiOw=1ijQ>;Q);
z5(X3UsAr4SmJWZR;5BQdCmTDJ7_`g<)tz7v9EH8n;8=D-N;$Ds+2Bfj<>~crDMD2Y
z<p~Vs$^UC8VW0R<a43ZaO(WRR627iHfH7qQ_=z=u%R&Qqi@7z!n9;8=wm8%4hYuDT
z0q1)Qu)iLOoc>rO9uyV(N_<&9>|~7{g4@Jqd9XKo&|_QZiOum9ijCB;D^_M~QKoR}
zPD4f>o}~@2u@iO)4tIc)mp1JR?1JbISVOB&Kqe#X)9?4REy|=##r>5O5p}ThTu2cy
zU*_^!OAoP>iSH!7NlkJ7U?1rG$)4xDV7|oVJGhLfj=Q<soXe~K4NJ&iOP2`A(Hi2v
zG!g$53}4ZlK}{AhES4C3CztQS_)!o`T+%|?>x$x3!Tb_opGu4uGqF=VR`e^Vw9X%b
zW&zC|RB7)hQ)yQORN6(t*hFiwwKEg>V?uK?T-vo3gv-rSnokvHs<qNvVXHJ(t(X@p
z@R=mxii$HC7eaMgelSZ$rrF*WZ6r=W?I6F9Ww0Oxy1dIGsO(xyIwWn7Om0C3O&r#8
zmqW7ef5~!#QA%OMjQj!(Sr(xvr7DJbC716B40GA&CLrDzlCT(E;<J}ASU7(w8{L+{
z(Y?EDbXNsNcce7risMQAwEQU0ouC#%<3+v<lFMkk%7+}c!<`h|4;n2<`y$PQ{B;CP
z<3yzeu?<@+zGdQm*_P|L^FP6TXW+ie|AG58T)wvq_mJCYW?52&Ks~9amqY!9GSsI8
zQNOwj_4fr(zY+>uc?IHfQzs+`goq!O-+<?U$eT_SISbSUmm?q-!%F#%gy@irMw@6=
zHL-#Nnu9W|0i{qgONpT+Gq7CY9xadIc0aQ41(jv850TxEg!rmG4E+IX`5=qo=d(&9
z#*mIyk=@Cf;D{X$`;C_UEZk`+W<XVj`aC!eXtD<magZq1&><}C%4*oz<Fp~z18p6b
zCz#)I`BA~)9fHGaBVe;fveN}EO-t8Co8NG`2A9`!c{7(E`WKjcFt|5t)=vTDWfJ8D
z6QDw7N@PJ<%zXowHxlIqLwtoNv|Gqbc?Htb(#lA$AV_-a%Sdlifb<T4^oR_s;UcoL
zY#=m~%OYHGZIM-wD+cFlWltrQMb;HdSNkbIWWkjpn7lGh5Jd@GN<{WVW^*vCv9NX!
z*UlGwh}_1+6^Iwd3i}4}36jFfxd`#yGB?v6grRkS_(#RoSyRB`?N$pdLuOD`BxkfY
zz>A0!2^*n^1uId)TA{49fqG^6c)t{Fu<S(Ew5k%HfVTMBm7^s7dp=hMwao>!&HF#7
z4N)muDp6a&CP1#&PDsVQ45QQ1%c$+fAhm5SqqeO9YJ2}*lpx4LmkfF!Dza<?mJKB|
z3WRHm7HQ-|0qJXTPBhUHS;K;|Jkc4^UXXEw%L&9_!_DQi-yBf@(YR$Y52?o1x<}=n
z6?IgmSEBQNc$V50kfTKTbP7tit`lP6M2kdKm+Oy}3}!_H2U}##xXaO*<*+9UAoam2
znF259o0T?CcS#$fp3v|A6PiStmnPD@f*ep=9TacNIN&xeKOCURxTHBky0y}<5-1nX
zQd8ndwZFX6OB-EAo9lwK`A`{cJ`$kKE<!>f9EZEw>AR)BS!oRxhC*^m_yXt?T)+y>
z`M)^o<u#Q&aKW=EiTsU%j)YrR+oEkn$Yj8+yFuGxIie@bD+^W>Ya%osArdBZrWnSA
zc=AaH;}Sb}#r6f*S3MZ(DE<;q_`e0?XD1|NAi*xjKW3gN&8q%!?TN5x%ydry&Y&sr
ztkWKs+D{bF891lGlV2eq+EGI*%d>)aAKP0XgC6;v2u;uM7G`97=wP>u?BGEo6`pq1
z(Vh>6-@@GT3_V?sycZeRE}>|uFS9s1qr``bage<DR^fSjckPwn^C?_@&XgvKr;*81
zkXbR&#93WC6a<Ff<OQnCEx<2ZzO$xwJopH#$1jH37kY#mSk~GK?Q_=BP6eNbJL)A1
zJJi4O&leSYafs%eici<pJ_$YzbKfiUbRDa~7JP=cpum&u#W3YpdbY0iW$;<}zh1*p
z5#mWol}o5tPmK0`5Ox`tUk`^(tN<&gXg^!9W^XRPK~1Vv;>*REC>f#5-l}%3kb7x=
z1|ICdW$e^4naD76D$a}%;Kw9uSC=}hfwaVBbJ@)ql!5vdmyckWrqXUrgy|f(wMx1R
zigjr&7t9&hjb0oOOZ&tiB$-ZX_7$(kj}etlj}6sP2X(knhllDoCh9N>yoIn|;FOtJ
zB4NIJ8MNF>igDEhbO)1h`GkP3?<>YGQrI;D+s~I^XCzQ+GWA8o35Pw}8x>uJM>|nP
zZ{yLxT=M7nW`%+ELk*1pmO?ckFyP4OJRG1C29OGX<^UK>0H**j0h_j<#TffAsQ!Rz
z3#k4C^?_(;Eh<Rt@<2O$2F)m8&kVpb9q`ORdgiqCOlcuKg~;G?&m6@NEtcxYzqq;r
zegc<2riRj9C86S2ZFIO7ex6Dl{uBV%`NZe1j8s+^fPDd&M}VILaME0#ub>k0T>}9(
z$Ytm983OzofPXWx(>2sJ40adn;G?t*_vPY1r@gK*c#kEaNog6#<h)q~pbsn+hY|(z
zkE_X=<+nN;aPof1<*%@4;gAeU@Kml44(^(Y;sc&+S56=toF!O}Y|i>;7`0)>?m|%=
z-2%sA;JO1e&JV(O|G~~b&(hvMwDlSGND+JgxV+dBWS1)+eHiE}#Od^YvG>o@Vh55N
z%%oV_#~|8?B^B7?@;Sp{zF}@2-?tQmKu1Gj_K004N<@M{Hr=Km@X%<wN`d@Yg#2#_
z`9J>4$meMIqVmWukLB;UOuIw`u^fh~PQpW&(D@&rs?>E$2vvk3^p49v2-MKY8sM#j
zn&@!U;0&#ByvWCZmlYu1G(yXHpan~37<~EJ?OFxsHH5{B1dhn6f0cwc0gIcjgvFmZ
z4ri<ii;36@LY%|$*Rbe%G>qU@xpsuGXl;1|I<wGuk;}glI(<eo1bEA_YKfb{eGbUO
zMDA)K)`P!?;SRZ1Ap*3$0n|NBsEZ-g{SMSkwuF(ayv)K}Pj(pSZh-D1P_cEvpH~32
zcL(UJ1e$_UnS2FMTRngt!bpEZkjj-HF97lw6<UKpZC3zQmjm=&6nc~(9an&4vjKS;
zkh2LA7&s!Nw>(dNQK;wGxPFQ2a{x6XARI-1MQUVM0s0)ErxSD(peJD`lafk|mr>7u
z09+x#xvf%x`<Y%k8m{6RY3m2*p8<WIpsNY!n9Aw;l}1fY!E=A$x!&|#b@5zuC4nN;
zR~7IPD&Sutc;rW4mLBX_I3ip$9*qdJ_LV^M0BR6ua{{e<1yE;ofYu^VAAw$VCD57x
ztw*4<2(<o{Kx+ZCF@eq_(1uq6h3FE|f<Uh$Q1~Y<ivcIr;)r$xx{yHQt^jKD0JI~}
zdWj&LUJ3FHAiGncZ3(pb6+j&|0GdRgLkYBHWl&+5i|8Bi{&r(!L_Zw<-3&)?2hY%+
zR`C>Voa_B6owbY8z0b+N$SrXqY=whc<yJTV6H^9heaCEv?H6s&As4AJvXM5~Ti81y
zBWb_wfbAoDcSjHVHb)~QbKdEw;qW?^s4K9k+G=bn7TEa;F|m6bTO7v_7dsOB(#*g%
z+uzz2+wO8KML1h^XH&$S^+wd$IK-XJK;+p{#Gb83^w~4c80SgHGIcO^B^=@WL1RdK
zPIvyK)kijNiSvTi#c{JO4kpMJ*yx+V44DZ-<UDP(c2~rUN=q!^V_l`LML3phKXx-s
z#vxXHu(f!K@|)6JNnl4@tH9+~V$1Z6ICCDSz;o8xY=a}t6Uq)3?_pLvUVOMY0_Sa}
z;Slt(<^=N^98x<KB5(M~wk76F!CT~xBFU?V2xSISKp-6mwmot=Mb=hdk+@}GD+}!O
z0Je#A7m>j=OeAr|V}ubx&*h2cG4Qk#*a0lCb(jbzo`Q&CiflcPeTgoa;Ndw4&E&MX
zj4EQL3q;V~3=y|iDnj?>h>(&6B7l#J7{0|KjBg1d`QXe%m^F4_e93%OxajT@UOG@W
z9Ch~yUmYlIH4OR`iv2AZ_xHlmTT2*wHwt_27MOftb>OTmL<=DseI<l|@68)=w%|f@
znYj^1j6IG+#`fSWG@NsWlj~%xYQLDeS<P%{#+gmcW}Njsf>USeM0_Z<;H-_QA}BjK
zBxC>OMA8T-c@dx4k18!A&P1H0MAC?Jlt>!!Z77j6;z!QfL3U&qk)70LHjuMajglW3
z#^XsY@8%4{AhI8g2<VBBDJf5+qm_BxiCn(e-jfm@>xy_0+B=9$WMufV%&}FOk^<g<
zpn(B}SyL7#K5qcQma;Q0c$Xkserw)H;*FIB81W}e?V#d|N^|y{k^q!m2Q->D5F#yz
zNJ<=Jw*b{h|D%ipNWUbCh|>%c$<h-vcC>}ttK1Jl_lt~*)Ug|1@Fctqkx`blM6@o_
zpu&&fyg?LRy<*`aK%}npd2lnB$eKvBT#c<lchXUR;ai2$F@Mq-YopM}TGnxaq(<Nh
zS;~;<kE>5dHo%qGFf<aGg}8SnGO&?HWE|w0vK>s*aW1L{3BaK{)((6iINDECoIS|d
z)nJp9D0(AjJ)l>x9#+6RhAu&P1O$3;xnNR8whtM*u(EiHEo~V4^S1^@f;TrtwhHc>
z^Py3vs^0$HzJ~P_9<}m4t=x-V<$FPqIwIG?65B=e8BEP$kVQ(ZuxWLmEtV3=i*1c#
zQpEcYL?&~F|9wwNbt3yl_KWNvIUsUiWNPFfQs3~#SVRuZFxrU}-AZR2wks?xnCdAW
zo+FOh_22|QZ195JATx|cmwCY2!NNMxv?)$ht$2E3I~?5Un}y_B%0Q=WPmxoCeCf(?
zC4mvISJjU==FF1|RqHa(W{SWF&QgdlIO_v2vc8S=mgH5cC@}mZB1Zz7Rd;HA<fzCr
z+F<)Kzl%ijN(GCFCPzn(UMEKfHb0FV8#xXcD;AMaBFl!zv1Mk;Ad3mk+$)(W#|h&P
zHubdzda{rJaGY06Kn6&F9FQO<i%;v?`iv1Wz^i~F86ZZ;0CX~Z*$ej|15iofG5}Jh
zSK-|P^1yDq58%2x-rI0}2B|qU5El}X0iJ*y@C1@)9>jZ#y292EZx61w;qPKVS~7qN
z89;>$ph5;vAp@w80aVBUsxt;KmJBf1`GY#xJ`j;7KjCj4{$9XumJASQy8vfp8s6!6
zkCtLA831xXDNGRo831xXAG}ip$2o)FR-tDr@gf=EYm?z+i2w-@0}{+`;?ugeKHHci
z0*n9@i2!Yc2#^6WAoOZuk_dp3coiZ*ln?>%iNtMuMv6~}0Jw$-fKS)}@!3{<4i(PU
zkO=S&#DI4w?PxN6OoeE09`8%^C5Jw+{zKeA&QyU||MBS;*R#auJn^|ud|oF$vA_TZ
z>pz~d*8i8W{!<`NBl@_TKAO`9)_#CkYyY>Tj^SfHeQc(WhtSo~x{uW#_s(LTS?m5n
ztosYG?h`{sh4}d*kfY;8tA3nV^N|1+`3q6(X^h(cFSY(HsTD`$^}x}1J#m~~Zz&1Z
zfj)4`^o6^uKMph+2q*9$X)qktLvj4yaD=6gL|}RvA_hiFW2CW&Oc*askS0o#q-&(f
z$akCq_tsQ6Qb>x)fpa(y?v!ab_$eQj1&V_xLNYp~6H+SsOk_FEh7)?OG!MrREs(C2
z7D^_O!v8Nt|Gz3ln@%&zY;DdruQm6Zhs`7A7v@>>EAwmfC-YY>!*ChFWtat^lgDzo
z8JF8|xdWG<;_}m6ewNG6b9o<^_j4KZ9_qjWE+6FbAub>0@=-1y=kiG|zr*GCxcoks
zKjiX9T>ga1pK<vME+YcuCoW&$@^4)JgEL6iAO{??ZRZTKmy5GV&UDTU&Z0T1!C5WN
z>TnjrSv}4ga2Cs1W6qjz22B780F(hRhNx45F+{x|^?_nWosRk_>f@+SqCSoKEb8;9
zFQU#wosIf3>Z_=8QC~-W6ZLJ>cTwL*{SftI)K5|8qb@{UjQTn1m#AN(E=Bzo^?TGG
zQGe<ZPF7>OqN}=1x8vM3r>^NPJwlJvqjX(&>xN!UkH(oxHT0T#Eu6kqN3W~L=vV3W
z^!j=Oy`dh9^Vu5fae5QIsoo6dvbE4#;_SB8dK<kh&S`3|$K$-VM7@LF5$Cye*1PCk
z^=^81y@!6a-c#?T_r}R?$$B3>1?Rc-)BEcKaJE~jK1d&olir5v!}Q_$2z{hJN>9_%
z_0jqmeXKrCAFof)C+d^*YxK!_hCW5l)TioMI1kFB=jge5p6=DB>C^Rmy+AM2eR`2T
zLoe3-dWl}D&(vq>v-LUpTz#HCUtgeKi!-E5o$HJA>-6jO#rh5UjrvXc5`C$@Out$G
zkA923T)$PnO}|~gL%&nMOJAYit*_MY(O2Q*sWtk&`hEKS`da+~eVx8u-=J^QH|d-8
z2lXxbR{bG;oBpu=h`wEaRDVo=Tz^8}q3^_LRZr@>^*#Di`d<BM&W3U}%)Fbk;hc@&
zY$Ru+I7{O!owL!Ljp1x8XX7{<&)EddCUQ23vuik;%vlC!Q#i}yY$|72oMm(7;Vg%<
zT+Z@1^Kv$gv+11Wb5_7vA!k0$ia49WSutmR&Pq5d<!mNrvpAd0*&NR1ayE~%`J64_
z>{`xn7QD$B=WG#Y(5kNIY%yohtRN=d#Mu(gmU6a?vzs~l4`;V<ww$wDIlGOs+c~>~
zvpYGvi?bD+p=&ESyN9z?oUP_;4QKaqb{}W=bGDYV2RK{D*?P`4aJG@NO`L7!>_N`9
zaJH4RhdA5D8Pw-TINQ$Iqntg)+2fo&!PySZc5=3hvnM&*&DkE#o`RL1Ghp-?&YtD$
zInJKv>;=yDarPo-`#F1wvzIx0g|k;VdyTULoW0K3LC)Ub>=0*fa(0-rw>Ue(*-_4p
zadw=u6P%so>}}58;p|<`-s9{PXYX_N0cRg_cAB$~IQy8hPdNLOv(GsDoU<=DJHy#o
z&c5XAE6&bw_BChUaP}={-*NUmXFqWEBWFKxcAm2foL%JXXU=}%>{re%arPT$zjO8n
zXMb`<;)=`_#ubGtDpzb=v2(@26(?6TuDG}o!Iem^L~%vuikmA2SE_L(nk&`0QiCfs
zxl)TOwYgG<D|NXN!<DPJQjaV3xzd0u4Y?A_l}21?%#}E<G~r59t~BFHbFQ@DN=vS^
z;!1098^eZk)LcfS5oPFxVN^4sjp{}Xqoz^IsBP3WVvMVddPaStfzi;2H5wU>jX0x;
z(G(}IH8)xqEsfSj8>6k!&S-DM8wp0D(ZT3wbTT>{U5u_qH>11J!?@b$Y4kFB8%aj8
z(Ff<X^)>n#{fz;}KqJ){WDGHe8pDj?#t37iG0I3Y(v8u^7-Ot4&KPe@FeVz4jBAX^
zMuss3=e$idvW#rQW8@gQMxNm{rWw<Xe51f9G<-&pF~cY}{6>jUYRoid8MBQ!#$02b
zG2d8#^Whd6rooLx#&yQ^#$w|J<3{5qV~MfUSZ3U8{KvS(SZ>^E+-BTv++o~l+-0mV
z?lx8$_ZX{iuG|{qUgJLFeq*iifU(Y4Z)`9&8k>yG#)HNdW2^CyvCVkcc*NLlJZd~<
zJZ?N;>@ap3yNoA|-8hl%DPynkwDFAbtnr-jyzzpu&v?<;Z@gr@Y`kK;YP@C~FkUwf
z8gCefj5m$L##_b_<EU}WIBuN4S$1z5?-=hI?-{3z_l*yX4~^4eRdC-S@wEZdhkHfD
z`<P)^E?P@%-1oRw(b4jKhEJUa$2A>Fzs`M+)LwE*b*07#`b>bp)Ei>Z1c)z-r5j<|
z{L22lqk*HTqk|*KG0HK;G2gKqrplKb2OTFJ?>OFbeBk)V@u}kr$63cY$G46j9OoT>
zI9<+2r|zr=!)3g)n{%LZsB?@n!#T}4-C5wA>AVgG%v+uJXsxt1T01RXOVm1Qowcqw
zGw^DymzJdU(fVrrwNz~g&JY|0bLBW~qBa@E%WN%Io2C_LMVeomiL(XgYYVkS+G6b{
zZJBn9cAIvmcDJ@lyH{JQt=Bdoyk(oVU3*;HsqNPGYR_sfX#2HSv;*23+F|Xec0zkc
zJEeW7eT<U{&uCw1-)P@!Kf0Vaqp%_T-osrZU1_e-Fp!RSO?73va$F^@1+E)h_qsN?
zo`5Ikfa@TfG>2XPPfhpzm*oEc5B#(TAhJXg71XBf1x`?0s3<BznhLnmoJ49a5D@{n
z5S7cW%dSD4b{*T}blP<~b?UVD-ovswt<yTym(O|MzQ0_rzu@tFyl$`SbzS!hqwkJ>
zI{Mw{52HVh{yh3SVFZCla3i=AsDx00h#(;p5Ec;{2_^zaSV34rSV!n1Y<3BU+Xy=d
zI|;i9dkDV~E)wn$28g4Gp2Ts)39d7h$;7F|>BO1D5MmNBlUP8kB&vxTmx8DznuvBH
zNW_R+h&zdAi06nGh?j_0h}VcWh%bp>i2oA5lZKPXq%kBvQW7bHq#zZO7Lv+H6{ITC
zBA1w0Ls~+rCz(iQ5=2@>T0>e#+CbV)`jzw>X&>o;Yp2lv-!9?Re>;SCqz|rk_jENo
z%hl>^SEKV?O)PgcY>}%&Yg~QV>gqkj)p<@=->r1D*<QE(ZU@~CyB&4=%k8q;J+}vL
zkKCTPJ#%~RHbC|wdy{?0eq;_gz$G(|Cr=~?k*ARb<S249IhGtxP9-lSmys*TRpdqF
z#pD|D5|`ZANY;{@$t~no@(S`w@@n#0@_O<{av%95`33nU`8D|s`5pNK`J-zNQC*WG
z{J*IY_20yZb4`mHSE}n>iPpN(+~P`dn=8d#u2imaC32lBjsKUvU9M!kaewFj!Tlfi
zPwrpbzq)^O|3P6>{3+up6DdKIDU@k0BeINAL4hc}6oi6OaLRJZ3d%~#YRXB<Im!jf
zCCU}bHOdXjEy^9rbIJgfL?u%xR2r2*Wm3JUQ>p3H462-(Nu5v4p(?25)TLCIx{QiY
zF{+cgocc3$74;bPIQ38JDe7tJS?YP}ZR%a>0L_c$P4l7o(KxgK+F06n+C*9qjYkWi
zh0!8takL~_GEG8DqczZ)XgXRmt%cS~Gtx{n3vC1K7uqJ;7TPx24%#l-Mfy+l!Stan
zw{j$XG@VFyqr20obPjzgeL8(6eKuW4Pok&LQ|amS#q=8b5_&zok*=jT(@k^>eHZ;#
z`fv1o^aJ!m^dt1&>3`5q(67>;(Vx=?=&$I1(|<5VGQ1ex3?GIcgTn}5jAe{xOk@Nx
zk{HPh2_uamb;+3X7z&1p(ZXnDv@y(#b_T%cV60-SVH{`t$vDM0%{a?A&$!6=$HUKq
z;}PHy=<+iscue#N@|fb0>>=?;^N@PTJmz_1d31R=Ja%~O^4ROK-{YXiVUMF8$CxZ;
z3^R@?VkR(?n90l(W-2qCxtLkQT*9npHZrx$W~S36Z{B3yX5MAqXFg;;W<F*1GhZ-Y
zGT$<Pcn<O$;yKLI&6DCu^JI9=_2hYmc!qgKxQxyy&qPnTXSS!>Q{!3fS?gKn+2B$;
zot`T^S9-4YT<f{sE6FR<E6=OJ%i;xl9rilo_0a3pn9*a{V?xKojZu!#k6Afp>zJcs
z&W?HJJ<2=KJIY(;y~w-Kd#U$M@3Y=Fy`Oo%_x{cbWX)oUSt{0I7R2ghp)8!Wob|KI
z`CQFf!&=8$&)UY?!P>>z&Dz7-%i7O6z&gk}%=&|Mf_0vCgLR8_hxL^8jP;!L!e^#W
zm`{vPx=)Tzp--hxkI!<SpM6&Qtnpdrv%#m&XS2^XpB+BCefIe5_1Wih(C4tr4n5=Z
z!<XP2;2Y>W&Ub?EB;O$4DZbNuXZX(Yo#R{KTj{Iz)%e!<*7-L0Hu>s&n|%$wMqiU}
zm+vy)O}@K*Px)T(z2i5+Z<HUwkLc&-=k7=Kqx*UIRr?wI?0&FcpWh+B%YOI$KCy?f
znQSjMi|xziumji=*g@>s?73_{Tfi2wW7#5hB3sOsu=Ckv><YG;ZDx0|o$Ph&t?Xaf
zzp?kR53mohU$Vb&hH<DIAI@Y>C`Zi6;3zpNPCloQQ^Bd?EaGTfx~Z09;#fEvIJ-E9
zIHx#QIgdE~oEMyzoY$N;oOhgmIA8q9{vQ5*{#^eE|2Th<f1<zGKgGYmzudpwAMo$+
zNBmd%Z}9)cf0O?f|K0w3{P+6r_dn==+5hhV_kf^)*#VIOu>mOoc>xOo>H`b`?E&@x
zG+<T0)_{WnhXYOqTnM-tFc9!5aCo3wpnD)SkRIp}=;=~bX9UIurUw=WmIhV^sslBF
zt$~(6dmt3p8;AsAfzG-7x$$!|=4Q=ZFt=)M>s<TX6)x3u=iEDU2e^Z|Be<iu1TKk7
z=2EycE`#gI_2<swhH?4aNUo3@%}wP>xiW4kx13waRdY4mHm;oub60RTb9Zp>b02UY
zai4IXar?P1xbL~&xIcJoo<A>;H;y-fH;FfkC*UQ!%+xww1Fwmv<LP+@o{?wb?cnX?
z?dI*_?d9#`9pD}3o#S2Lz2kl0edK-SedT=%9udq6_6=qS`v(UGPY;d>jt@=>P7am?
zHwAYEJA!+Hp<p<8Suh%m2QLra8vI-E{@{bbhl8&KUkknwd@J})@W&8hh*!vjkVzqv
zLn1?jAu%CwA)=7<km8V<kj4;gNOOoKq$gx~$cB)eAtyur3ON&UF62VUrO;`ib3=Kd
z!J#3cVWAPBg3!oNVQ5TfTxfh~LTF-WQfPH(ZD@UHL#Q@XA8H6ShMGc`hu#f+A2vA5
zGi*{=cvwo9Dy%AOQCMwQW0*FqIjkkDHLNYn9A*u(h1tWNhrJ8?5k4q<NH{T^5grsi
zJv=x(HasPKp390Y3$G8ihj)cL!h6D@@ZRus;rqi6h93?;8h$MNc!YmMV8qynaS;<D
zCPhq+m=ZB9Vn)QQh}jWyBe)T~2vtOWL{Y?oh=md55tR|@2u%bKaW~>k#1B55KZ75}
zPv%SbX?!_f$<O2G^9%Te{000Heks44U&(Lg8~8@PiT^AA5dR4Ocm5yz6a16>zxZeP
z=lHkzclr1E5BaYJLj-ODrhqN*7X%8%2_^_83FLxI!F)lEKp{{G@&$#01%eVmjbNo<
zwP3Aay<nrDPq10ARj^&KQ*c1=Lhw@XTJT2jPVhnSQSe#tRq!oxcqBP8AaZ&nKQca2
z7MUMe5~+=Bj%<l+jckiFM?x+ecT?n+$Ze53B6md|io6_oHS&7o&B)u4cOySW5u@Cq
z+@q*b^eB%gb(AJ*aa46wZB$)ULsVmwHmW(QCCU(GjB1NAMQw@N=F)X{MeT{&7j+=&
zP}GsAo5C?dme5zo7WxYVh2w-1gt5Xj;R0cauvAzstQ4w+e+kbB&kD~8F9<IQuL!RS
zuM2MqZwv1T?+Nb<9|*rjheU@(M??#vqoSjuW257vOQUtsVD!>xIC@z$8jVMPj{X|`
zZ}hk5A2EYshQthw86Gn-W^@c8h7{u#LynmcvmmA<rZlEJrZPqyqlu}Gc@;Y%mKEz8
z%Z?3*9Tz(x*6tF2FUG!(eH;5e_CxGHv7chU#D0tY9ycg%Xx#9)5pkp9M#mB2=y8+d
zxN+HWia1qVLEM74g>hwZ>iDGioOoq?UVK4(U3^2lHoiH&CEgwn$FGXt9Dh3gLHwim
zC-MF91M#m!Vo{1nB1#oWMKaMmQKl$cq!6h@d7?s5k!XQvp$HM7BB$tQ(Q45;(MD09
zXp3l@Xou)@0xuynAv_@>fu9hS5S<X05TB5kkenb%NKKF?WF*KE6bX3=D-u>FtWH>)
zupyx@VRORP#NmlviBl7&C(cZqlgLX9N$g3465+(&L?jVQbS5rOT$#8gab4p2#Epr+
zB=#l#ku)r6MAE1vLXuk&C5e{ANGeOJO#+fSk~)(dNlTO9q>o9TlfEQ<P5LhW$>kjn
z5f2xS5);HkF<I;`rikg{DPmZRh%qrPc8Y%%uM)2nuM=++ZxU}2Zx!zl?-cJ6?-73z
ze-ZyH{+>K2d1&(R<dMnZ<gDb%WOcG8xhA<Txgq&V^0nma$v2X3CErQDmwZ3@QS#H|
z{^aM$1IaIwU!{yliA{-5Nk~abNl8gdk*3H}cBh<9d64ob<w;6^%0S91iAa(tNs@>q
zDUwu4x<o3GOR^-{k{pRbqLip4^^!f3y^{TsgOVeXW0K>NKU3XO15<-jLsP?31*yW+
znABCNYf{&yu1npR+LyXHbxZ2@)Lp5+rtV4Im%2aoK<eSt>uJ$xacQEogtWx8<TOcI
zdYUv%o|cuCotBfPOjD)hr4^>FN?Vh*E^R|vU)q+mZD~8w?x(#^AC*o>C#Ac)^k+tT
zLApA<E8UsCK7CjEq4X>1FQucUOzCW?SgMegNNc4A=~C$iX`ghnbenXi^jGO#=>h3M
z=@IEM=?Up6=^5!o=@scU>5Yt`851*RWQ1iDW-Q29m{FQhkx`YgC}VL(ZANp3A)_tB
zoN+PZMaCD|AlVq1kBlwj$O2{KWfNtSWz%FcWwT{-WIS1jEKC+Ii<OCFNwQ>_T((eF
zE~}DhWHqunS))uRYmpgcCYe({T27La<?eEdoG$l}d&$ShedKJpzdS%bPCi~fK^`QR
z%H{G*dA2-Pu96qXi{>4hcPBGElb<QbjLeMAjLnSC6lEr5revmOre$Vi$};7dS(%2+
zwoG%THPe>and!*v$!g1TW}V17m32DnT-JrG%URd5Zp>dh|Iqv&*@Lo&WDm<8nN7$h
zWs|d8v(fCY+269iXaC3<oHI0Mc+QBN(K)0Xa*lfrEr*`N$nnex&k^KA<;3K~=OpHc
zbLqK3xeIg4aw~GHay7X%xl3~EbKfb53WkEEn4^eLh!jbR6h)dMLorX0rO+tq6|IUc
z1*m`&%M_SmxniYawPKrMui{U|8O2k@bHz)=YsFi|2gN7F7v&HoRY_Mem1C4FrLU5s
z3{;L&+LWEjZlyyBDwir@C89)?PUX+aRm#=MwaRtM^~!C^lgf9>f0Un;UzGnUf2anl
zhN`?&%_@V+sA^N0R2G$0)uFPhx>Y?YNCm5wsSp*aTCF;uda8P^8c@Afy-~eaeN=tU
zE6O{acP{Tj-o?C2c~|nT<=xD?m3KGqLEfXh$9Yflp5^uD56%zDpPD~Ce^&mSd|rNN
zet5y`0&#(~puC`}KvPgtP*>1cpetBcu%V!@U{k@?f*l3B3Vtp4t>9?ErGl#kHwtbS
z+$(rk@T8!>V4&btp{OviFsV>nC@D-Ulon<b&MTZ>m{XWrs4C1W%r9&#+*`Q6@L=KL
z!ru#z7yemzs_<D+N>N&ov?!xUR+L#ZzbLmzQIuCyShS$1xTv(Ktf;)GrpR8jqiA>0
zo}zt42aApr{a)-{TvNQHxURUqxT#oItS@dUHWr(U+l#Hm9mV$I&f@jO&x)TH4-~&D
zepCFu_@ClWCDkS8N-mUKEV)#2wd8uq&5~OscS|0WJSury@~ou4<oUuO3!@fBFN}3r
z=ZOoG7fKeUE$lCiE{!dXD~&HrEET)-b4h7>sjPHfX=Z75X-;WwX-(<Q(%q$dO81r?
zC_P+ywDee6LfPuFwPowd)|dTKwyA7O+19chWxLDvl>Jt=zwAKS!Ln=R%yO@C?{c4V
zc6mVg*z)n^t11W;ZWZno6qlyXs9;u%sqn7wt>9DyR0LLxub5CVv0`RLVntPjrlPuH
zNkv12wxYSRvhqsh^~#%-w<>Q}-m832`MB~)Wq;*B<*Ulqm2WHGRlctxR?VoIT{X8V
zxGJoQUlm!kv+7LM?W%vOK3Dx)^<6zkJybnH?XLDw`>FlaW7QMXLF%dM>1s&5OpU5B
zHLhN+{#m_Ry+*xW{fl~&db4_~dYgK?dY}5T`un0mi-s&3zG&nk!Xh`<u^CgN)#x<_
zO{>PJF=;FsKx5N%Y8;v#%~B1l>D4ULY}ee<+|}IIJkmVT^lJt*uNFHNe_8x(@sH}C
zss~jMsUB86vU*fCv6@^>sis!bs~OcE)l;kG)mhcq)rx9WbwTw4mxzPb?5z2t=4Q>E
zntL@5Yo65f*SxLyR`a8FaP6?#k+p<cQtjf}+S<C>`r3xtrdnNXORb@{t=3X&tp#d3
zYVEb1wd-py)LyQ=T6?4RR_)!|2epst8tNX@J+6CN_pGkJ?nT|py1(n*)V;6!SogW^
zOWnV9-|D{CGwTKQ!upu{`1*u;alNEIt&!YV(^%Ko(Ae16)Tncb^{tJ@MsuUJ(bm|}
z*xA_C*xiUUZg0HRc(?I><D<qWjs1-Sjjx&%O-q_AP2Ejs)9R)zO@B6BYWnC>?ni1V
z+Cc3@?Hp}_Hc6YTP1Q=ZGOb2y*0yT_tzFx#1-09?C$uNEe`(KZFK91m?`c11KWaZ~
z|JDA`4bstc6LgbwlXcT{Gj+3d>AGUwLS31zQnyIASl6Xnqg$ujpzG6Z(QVV6);-WY
z(mm1j>jreMbpLmU%)Ob~%xLy>@ttFvLz=@}_x1#?Pd{RsbDK5I)y=idb^pB&v$=?@
z<;_34?xL-0{;m0_ORaq1y300LKU6<lKT1#3`{}3aXX<C`x%v=&mcCS9uCLTD(pT&C
z`ffd_U#jobqxzrq+x0v3yY;{6_v=sSuj_B>Z|m>rAL{>YA+?ZOC@u6BX3O-J@D_ec
zR7*@tVoP>QZi})dzon>Uaf`9V)M9A?TI?-oOJB>DmTfINTYfb#4MB#fhUtbGhM9&r
z2CgC45Ml^72n<mMp&`}~XNWf>8WtOB40VQjLz6*g&>IYfHp6nmb;AS0Bf}HJ3&ShJ
z8^b%p2gAqKL9Je`lUk>=PHUanI;RzEUD^t@!mUUv*6M6s-nz1NP3yYW^{v0O_O)(m
z-P(G}IMg`YIMPTkx*6S#R3pnc!x&|ZHpUu7#w4S{SY^~0tBp&H4aOVBTgKbQJI4FQ
zhsMXoC&qr`fbo^_wehX-o$<Z#V;iL{p)I{FqfOqH)t1wyXj8SB+m^L$Y}?efrEPoL
zuC`-sSK6+(-E6zlcE9a!(;(AO({R%$6Vc>tnrxbCnr@n9nrn(N$xNB1`KDZx%2Z|2
zn+ztS$!xNkmYFu1`b?Wm+e|x62TkWp7fhE-S4}reFHPUgKbZ%chnYv38Rl{33Fb-W
zDdy>Bp;>B{ndh13n{&+#X29HG?le2hOU)b2`^*Q-hs;OKf0!?upP2j2FU+sZZ!AAq
zC>FZK!{TLOS%NHK7QQ9Y5^agI$Seyi3oT`qO3NaP-qLO9u|Sq(7R>UCWxwT+<%s2&
z<%H#`<(cJ$<)!6s%e(f$?X-4AJF|UEyHES%_V9K=dsKT&dwjdRy|}%!y}Z4uUDMvu
zZnYk;9=0B}9<v^|{%JjBJ#9T}J#W2ey==W|y>7i}y=}c~y>ESJeQbSd?YF+LzO=r!
zzOlZuez1PDeztzKezX1n1_48WVZaDr6hHvn017|{n7|mo2VesMz&KzcFd3Kz%mn5D
zJRlT^03v~CAPz_X#DD}y2QmOTkO|BOasUOO0`h?(padubDgia10jhyopdM%fngIjQ
z23P<9umjyd4*&xQfCDRlRlr(c1JDO-0k#9XfIYxI-~ez4I0764P5`HXGr)P^5^xo`
z0o(@e0S|%4z*C?f7yw=aZ-EcMC*Uja-8RTJ)HcF4+D5Xu+h{h1jcN0;dE0z!em0IR
zz&6%4!4_njVw-N8Wt(H;+JbGNws0HY7G+DcCEFynTw9-Qi*1{2r|nnUUfTiNVcQYg
zG202-Dcc#_dD|u1727r24cmu~NgZ=KB0Aza5<0{kDIIAY(vF;t;*NzKWgV3r>W;-7
zH66N+mX6krwhpXgSI5DQlN}d3Zgt%4xZm-x<Fj39Uu18!x7p2hi@n_r*gNc<c849b
zL-t-fV#n=H`*QnA`(FDA`+55<`_s;Z&ZN%d&Xi6`XIiJUQ`VW;nbn!ospwR77IYSN
z7Il_%wsaz$t2)<qZs_dmJlXlR%dac0tDwu!wY+O(*XpjdT^qWNcb)6%@A|uYRJULE
zgzhQbbGwDzN!{}9s_usF)^3~QkmHEscgG)&6ONOPzZ_>A=NuOtmmF6d*Bmz-w;XpI
z_Z$x#j~q`N&m7Mk1CCdYza4KK?;Za*J~_TP{&jo@e*y=CL&4$TNN_Yr1l>RiNC%nV
z7|;h~g8|?;a3VMvoCeMW=YTvg6pR2P!DuiJOaR581WX5I;5;x3%m#BoC71^mfJI;l
zSPE8vRp26UF<1jG0UN+3uo*OfZJ-4NKs(qC_JA;mfH=4UTm`NLH-LTM7H~Vb3)}<l
z0}p_Qz$4%>@Hlu9{0lq_o(C_1SHSDwE$}XQAAATt2A_e?!I$7`@GbZr{0M#q{{?^a
z4DK1$GqQ)!L+T;-P<m)Rj2>o>SC4m(Pmf;@rzfyye9y$5pq?o`(|Ts~%<7rj!-ob#
zL!lASD2M=&ATmUOXb=NpLSB$J<OBIZ94G)93yp^+LP5|JXc{yFngz{)xKJ<@3WY;_
zC=wDvF;E;Nf)XJylmewfQb-PEK{=2T%7==e5~vKSgcd>7&=RNt(n5Nu6*58XkPYgD
z9MDpz7eXKmazZPhmC$NvEwmo`1=<X4gLXo@p*_%EXg_oaItu*({R#aAorNwym!WIW
zP3R7EA9@5mg`Pt%p}(Pb&_B>;=wIjuJQyAd4~Iv>1lSFxz;u`ikAZz)HXHztgD1j4
z@Dz9&JQJP+^Wac80*-{E;W#(}7Q+%a9hSkF@O(H2R=_GaA1;I!z$I`gTmh?L4O|1)
z!3}T|tb_Hi0XD)W*aBN&8*GQWU<cd-LvSyQz!>a=SHP>_weSYG58eWAhj+ny;C=8x
z_y~LqJ^`PC&%o#5OYl|r27DX72S0?L!2R$5{2G1>e}F&1U*Ye)gL;Sdj_4iTOX_v+
zrS*FBdiAn;{d)a-$M#O>4eFiRJEM1YFSj?OH@sKSE9{N!74;_dru5E3yb)i7g9ISs
zkcr4-WEwIPnS=0<P$UA0M52*6Bmog45+ogwA(==vqCoPHLZlceMJf<AvKXmF>X9a-
z88IMjhy?)<JJOBxATWX;II;p+g{(z3AbrRdWIM78*@Nsu4kAa8W5@~Q6mkYRk6c2o
zA~%rR$UWpC@&xHe29VdtTjT@s3HgeAM+c!p(Gloql!UsYG}Ht2LRqLE>W_{^C!j&-
zRCES98|9)QXgDfBg=j1)LX*%GG!4x_=b`h_TvUY?pbOB2XgOMiYS0?A4sAqrXbWmY
z&8QXaK)X;7h0tXvhAu}}qHECg=r8DIbQ`)8{T1Dd9zYMHzoW;|ljv#m9C{JGf?h{&
zp?A>-=wtL5`T~80zCqukAJH%9H|!^D2sRuWg%L3_M#UJIC+3a$VjL_G8;?!GreM>t
zS=d}G7z@MrSQHk6#bb$BGM0)-F*%ln<zPxIA1lI2urjO?TZC0(ORxq^i|Mge%!IXL
zHmnnKU`w%H48@$-&)8~g9kvnMgl)xkV7sy3u>IIU>@ao|JBA&{{=`mUr?IoxdF&!~
z8M}&I$8KV`vAfuP>>>6Tdy4gAFR+)`YwQj74*P(8#6DwRv2WN9d=NeaABK;>N8tpV
zgp+X!PQw{E6ZgWsaUa|d=imYOSbRJ_5f8$r;M4FK_$+)5&c%cAP&^#x<B_-!kHO<`
z5uS*P@f182PscNGIi88n$8&H6uEO*2LVN*Uf|ugucqOjJHFz~%i`U@|coVL}^|%2y
z;wIdJTX7q1$GdO`-h)GUFOJ|C?!;H%EAiF%T6{ge5%0q{<6H6V_)dH`z6aln@5c|~
zhw-EMG5k3GCw>Y)ji1HO;}`ME_*MKmeiOfq-^K6a5AnzNQ@kI4fxpCG<8SbH_y_zW
z{u%#@f5U$`2RVm0hdD<$M>z>jl9TMDIB8CXlj-zwdOLlbeol@vz&X}A-Z{}3<ecK1
z=A7Z2<(%W>I)j~|&TuE+8R--{W1MkLku%XLcBVK}o$1aDr`(z8obSwWDx4~3zO&F-
i;jDD3o%PNJr`Bn5F8$xXBL)xt-%3XQxBma96ZwCw7p>v|

diff --git a/hw/xquartz/bundle/Resources/zh_TW.lproj/main.nib/keyedobjects-110000.nib b/hw/xquartz/bundle/Resources/zh_TW.lproj/main.nib/keyedobjects-110000.nib
new file mode 100644
index 0000000000000000000000000000000000000000..cfc33e07f37f4ffb34745887b3198c3acc18a693
GIT binary patch
literal 44697
zcmeFa2Y3`!7e736XSU3inMvrO1wyYWgkBN?gisPv=q03V3aO+)sB;lenxgckQl&^y
z5CuVsA|i;Q6bnre1w};>Q4#rmcV;(*fd5xt-{<?D@A>aOyE{8`ZaeqfbIv{I+<Oyq
zGt=`6{QXaJJV!Wz6FC!S<}93JNP{9*UVeH`_Rt0ic}Z#M_!rlpASZW7gPg=MuB3u|
zZ;qe&e7vee#`bj;yOKlQKp%2ePU38wJzn*R=-w*7IKRM^)hj2vU|?=?LV;_Lk?BZ0
zGV;OA1eMqL?OsAK=j3FrA=i{^#`$w?xc1yMZZ7u}H=lc&Tg0v4R&#5(7r4FL>)cW9
z9qt(SKKB9l5qFlmz+L1%=f2>sazAmmxSzS(+;80P+<o54E4<2A=Bx45`8s?9z9HX|
zZ^yUiyYT(^SU!#)&X3?n@+o{SKb9}z$MF;RiTreaE<cZdl3&6<&#&g!@SFI}{7d}H
z{OkN-{!RWZ{s{j*{{erRKf`~@U*W&uzvXZ9zwp2FclrCoOf1Aoyh$Zeozx%=NORJH
zv?OgvFlkG=kgg=0M3N{nfD9o+$uN>c#*hq>Ns7ogGLcLo8hM;NL1vNJWIlPCEFqtf
zpUG{32#TNzRfW1jHz7m_6C#8WLb@<UC=d#TVqv;4LzpS#2#*VcgeQbK!c)RC!V+P*
zuvS<ntQTGsb_uTtdxQhRap8n;O88JXBYY}+CR`9M3)h7ogqy-G;jSo(HqkDsqL)}z
z^c5S5&BW%SzZfjG<(y(Cv6~no_7Vq+qs0WVNE|0l6eo#O#cARUai%y|oF^_2*N9uh
z7sZ3(TjELaL-8Z=w0K55FMcI{E&eF}B>o}ZGw~+TWHQ-J4wJX3lBtHt$K-2jZEA1o
zU<x&LH-(uZOhZgVO$nw%Q<5p&G~QHfqNZu4$4s+Kt4z<Do-@5*+Gu*w^pfdi(<`Rk
zrhTRprgNr`P2ZS)GTk!$Z2H|SnQdlob0u?SvyZu%xw*NMIn3O{+|%6GJj^`YoMcWm
zyUZEp3Fe9B$IR2sGt6_$E6gj++swPoubN*ozhVBue8v2w`KtLV^AF}*7K_Dhsb;Be
z@wL>m1X_YDJuLk!{VkD}L6*UmA(qjW1WTeN&r)oeV3}xn%rf0F!}7T03Cn!Ta?1+K
zO3QPW4VD)yFIf&*4qM)}9JideT(DfVd}X;~`PIr<c`LCBR-3hwwT`u=wUxE4wVgHG
z+S?js9bk>Oj<%**)2-vJ#a3#aW_{ZFjCHwng>|!ai*=`Um-Q{{5$g%-d)ABAOV+Qf
zUt6zPuUl_gf0HE1CV5HTQhmu!Y9=+8I!j%o9#T)KmlQ7bmj+5MDMiYbawJWn(kyAV
zv_e`bt&`SE8>APc&C(X>MQN+FP1-K)kakMDq`lJX(jn=v^p12)dSCiLIxC%%E=U)p
zFQu!}x6%#iC+U{-oAkSlv+*{w&0@3LRGXKrs;!!>maVp}zRl0p#Mac-%GTP}#ujYr
zVC!h>W(%?PwDq#}wT-l;*ivm{ZF#nQ+j!d(wpq6Mwx?~+*p}Fq+E&@N+P2wt+g`Q3
zX4`Lj!}g}_E!#2MySDdjAK1>=&e}e+owt2%`@;6M?V9a7+xNCxwx4ak*?za(w{v!r
z-E6np9d<9fx4oLZy1ll&j@{4Rz~0o}%--7WZx6P&wRf_2wujog+b`HJ+dsG8vj1$q
zZU4o7&tY;%4x7X7kR9HRN{&X3#*QYA=8n#eE{?8_?vDPBNJp$=pks(*sAHI8xMPIl
zj`LG6x07OjdB5<yEnECTenUQB|4BY5ACeD?-^p*vZ^=jGx8<YqJMuC4UGZ1>xO_r>
zPd+KXFMlAPl0TF`l26NL<g@ZQ`D6JL`BV8bewBP)z93(eFUgnX&*d-VEAp4}RrxFV
zYx$adUH(S?R=y#BCx0*hAm5aKlz)<M$v?}t<zM7G@~`r5^6&Cpag6+jd{6#UzOQf!
zuMkC0M8%|-6^mk3B*muK6^G(fWJOU_#Y^#4Dk+tfDoRzQno?b<q4+2@m0C(|rH)cp
z@m1<6^%Xy*fznWEq%>BVC{2}SN^_-!(o$)qv{w9;03}cfQralNN?WC!(q8GHbW}Pi
zos}+1SEZX0qJ%2ll`y4;(o^ZBge$$32&IqGSLvtpS0a@tWq=Z`#3->!oH9@uqzqPu
zC_|ND%5Y_bGEy0(#4Dqf1SL^PQj!&ylA@$4X-c{>M#)ezl`JJ&$x(8Zu}YqjuM{YS
zN|7>78Lt#86O@U{BxSNPMVYE-3RR{lk15lY8OluMapehRmNHwJqs&$2DNia-Df5-5
zm4(WZfeo??Gc!Nq6i(&5IB%{JSDCBARpqL2)wvp+4_A|`#ntBOaCJFfeCl(4T!TT8
zu`xM01tTM4!*a5-Aps#9^G8I+Mx`g`4@$@^bmi;9Fv^gQ#vK5=|3gONd5y@}(4-_+
zetvpldS-e-aoMzLWbB}HJjiqnPR~xx83*uc4*`F8M(!%*<mC@)kd&E_pFhl~7=zY`
zW}zg8k^z+XQz1w*;fo4^RA@s<^oLv{w7D_YWH=heQbs0Zximo&QTNbXXa`9Ntfe1v
z&AAp_ORm*0BmZnb4KXfV`J<4uFux!t%V_Kxz_lLYY5Ip;0161?f>0&5%+G&bGaDHO
zb8Ugb{)GhzXm_luU@aHSwc}b3jEuz}BV`AUZdb#(j$9|MGuMUd%5~#HxKOS;7smDA
zdUCzEaIQBO!S&(#a{ajeTqGC84d9}=7%rBJ;|6krxWU{IZYVd58_td3MslOLcy2V8
zz$J1?Tr%h4Qn*wujZ5doa2Z@Cm&IjsIb1F`mdoSvxdN_`E8@m+<GEsP0ymMH#7*X=
za8o%=vuaMQg*Hu_uDz?B)jrm~(|*u?)NX0NQ=X%|netwguR-~`ly5}&7L*U9d<V)O
zr2JvZzeV}CDgO@T-=+Ks%AchC2bBMi@~0_(mhzua{xiy7p!_Aue@^);l)p;(uPJ|>
z^50VaJIen|d6e=8C4>@@5;G-MN^F!kD3K{qDe<PHG9^_hsZNOxCABE2Ly0dX^(kpU
zNh3;{P|}Q&7L>Honw~-5JjPAuW^gmP$3ghBxY^ts^j&ODVP298G|<D9Uyz=y)4<@!
z*nSC#uFQC~Av!!QJu?|(SCE&Jnd!<4%X8^4v93%EjhsB4iX0$4NwaI5L1go|CYlX|
zH6$RQG~tkBq)3HkXb{9R+=6(ua%5~|dSX;zL8hyqgtFIi&u|O5)}S>!E4lk%{g-mf
zxH%dtSk{_rP!CsftI)(}x#zg&QUADf<Oxde@5(NWfMS}jDVnM^OPoJ`;5LKY)^c<W
zw~kw{d1-aErk`>fxlP<=<gkT%k=x2`Lw?)29o$mxWo{?8i+hFJjqlyu9$>0}wks<q
zJ3XmiP7-(pD<NL>(zWBBV++%Z`sXC~Psq;zU_^ebD>or80caYEQIZ{zm5}Pf=)hpr
zAu%E%@_VG`voVp(hDZ8%SF#S|J@x+m`<m<xuEl9}B(0L>Eot7G&w#VsK5jqv26uov
zh`Ju)4s&z3xA1v;L_~M=V0vnHZ2AP&@RA{}tLMfeJ!@bzB|WtewZdozl4D%?Itj3j
zgtpFp@^cfCToFCAs#;}@)2iT811Qx~>#UD8IV{bUl#!K?m+=wzE^2a|JHfrjon%8l
z9~CG{$kZ=$T}kN)nOZfix=Myj3~1BBHy~)TK>(+?50R<PKG$%kxYowq)7+VO6&%uF
zGoHGw;ZAd{%QyX;-t<pd)3sW9J!`Uh>WNwXbX>+3fZjY6yu>P~)z+#H)+^G+U5_i=
zm#C_TPS$W&xYnPQ5CbEHueh&44A;t#!z<hk?mN7H;BInzFoxn1@={#|=;GMI#4MDJ
zTcNtx0BzPm-__In@b=Z}Yd*;d#|oQFu*WL{M&%p824qJM0sq3?;hxtTXbrVyC9np;
z-em;)2X{|vq&0pt!G8B3!J_0c1oUyarWrJDBtfHiC%1=z>s4-|`6SVAhA*%GgWfZ|
z7w-*fadYs{yu5_swYXP_YmHvi{~BOb_^R$fv4*b#>5!b0l);eu!1(2B^0nOKx1~lk
z^lx>H-<5n_?s>i*U!V6wCOT_rrnS~uY1)wf3F+A^9~~EbBaW`;8}m*0rhGHLx#q7$
zYeTgJtypXN$iCxi>X>2848*$)>pQKbyRm^<pccUTCl)-bY+X9?ZTQYwGc5>@2N-2{
z<>-riH$H?9<-7A?d=I`S--{3Dd-D-|AFYknR_ma3)IzjSt%ufA>#g<C`f2^OrsvSW
zO+Y@QD2Dc(d?45ht4%cOQ3vHSItkW%QWl+e?SnQl1mZN{A>D;^j3vFo58;O*WuV@I
z_F6m5$2A~o=;YZgS(in(cmzXpr!K?LSPrEO=F#YL7mEsK;GLzT&nUc})*0_k41I~I
z&X`Zi;xC^s;0uAju38tZoBq^5;&_feuQdfXiDw!>UQs%fCDy(Fu-XsB6F*bO(=2{A
z!;?2U0K61v4%4~=SuvKR&!W>FUo&c8bizL@^^>xLiC=1njFSFY$*<y{<@P|uiAzXz
z_fxpqOzVX{Ui{LG_dR_ao%UC?U&+5v(#zpm1ULvw8(kE6_Ag6EH?88gm!zzx^+n31
zImI2L)8=3Mhs}LxHQmH`fInDLSd<otCQcrZ8eh`Hu_MsWOv`k!PJT3zm5$MO`FHsf
z<;G~N7OTaS<DqVz$)Dms1ka4q20q9$`Lp1e{5k$(ZICwjkvx-sw*t?MEjuP2)@~yS
z8@|`jZh-5<cSs4({7;&AlfTLTRIZ7`wc*+@eH=}`_Ec+6^X~A!qIn~<k<ee*ePaau
z!O_+HJ#CcM^kMb8Y4i&bh=}?P*XuW0i^m8}yfb%IbkcuNKjOq&DObNFElEq%>o;rh
zge7IhIjKUbl4=;|E-hIbpU9r-wIn_q-AHPZTBJ6qL+TP=QjgTvQnYj}Q_I$Jv^=d)
zD|%=Ph|}GICZs7^kfgUDO-n@!7M))-D|*~RT3wPRfCQGL$<W4t^ry6n@lWMODA8Ge
zk&e4TI+diWr)8n6DXm;xA2D3qrIlr+sAVZD{fmM~U(&Cnps`vmhD-eBf*oVl%v#J)
z7d`r+X-N#@XJjB5#L{|m-fn(Ypyg{mX|eCcd6mm#%D-Q4ASkV*-u1L`nos5kOGYx&
zXA(nFC06(1yYyBn7t?<f2E2QI`yUQ@G8XUra`ZM)o2X6Dhx}8OV>Zp+oFco&1Q}0?
zF(xKylQHBy&kTy2jB!DxXj2|eRbvgRLPKVtArsx>b}H~^2wcwBliP4Kz@v1;WmV8%
zX7T69lez{Yfw?@UaibD)bMxc#Jqmw$eP<R~NEW%FXK2SX?vmP=EG5gxa<YP~B&*1?
z<T>&@SxwfEwPYPxPd1Pj$VRR@*+e#zE#yVAm24y1$qw=od711ayT~hKH+hx3M)r`s
z<aM%->?d!K1LPn#haBd1k+<-9gB&DB$vfm2?j6PTL2`l|BPZEi&W1au@ckj4ohE0<
zS#pkij5G`iZ*CVRBRycRHztQrXN!7eCZxhpQ5BlGF%|5Wp6%+6xnKsSJ8b%hxmsLK
zVNzQ6ggmH;acoKxmXleSm5o%5n8m|2Zg4_&L4J2kGnrbSS;*!eQMs<{@P4s{c`2B2
zpwO_Kylht<1CCd{Au%#DVIPSr&V|W<O*f&a_i)c5bsLMjE`#&ZF?CJtk)CH*YvR>P
zCG}(=>Dh%jg{Vh$Ok%PNT$t}>X2xQUgEYNe>8WW2m@mZ^<}x*e6<igwAWVRZa|#Rk
zL$goM&JQn4Pj<ztbv!ldmy-%}Nu~i)rr5fuUtU5glB61_V-vw%m?Y<9W3rf#2|T&0
z%w}o&Tq@Evp5Y@mCp+1dhkEqN!vxHDT8ivA0EK2^atAsr(CgvOCdQRgnD5H(m7b?#
z)yPF}sNMq%k>Pncg}E^~<6;YnGf`yCk}3>D!dTQa)5ZFdb)!Cw?Vga7k%~0gnDl4n
z<hk+8dNQ;S6IskLC$Q$R+%V&b^H4@LhP2p(6jvyS!a$50YqcJM6dfbF?d!o#8JwP6
zkOo|Y=cOB!0A=)cB>+LJL3n`X7#)Wi^vu?$&+)3Co9q~jrx(f?HS`*TG|O~ApkBJ?
zhATVSn2WJa11ea9!ZOoy^W$>5GjxD}d`prWl-YB9ZbCNmoyFzkWX1thJBn$N%4wW7
zU()7E+EJ@t2xq*snHp!+-oek~R;zZ%JH{7KTqVr&^_O3W)eZNS_Jm(ZfbmC?E~#D^
z-si~$Fo}!g61hx12U}PN*0Bj};tO&G3}FQZ?J05<19&0c*U2~JTXKVZM{Zztyo>yZ
z?>RtJ_i(*KF`A9$ut5vDf-!<&3;;b~&%hPtb2<^?PLij0fm_!5Suh%aj5CWvlgGdg
zn9ooLij2t4cNH*8B<8<G$RS@lL`f$}o1x91q@xPsRcCFU7td+)G)|(V18exOi9!AW
zFbA}6JNY~sxQhIuH|q|XwG2FOz0oYaNxzf3_`Qn;{mGib%>f0JkaxUV#o#Ux`Jg)Z
zF7sTj-Z}XNtn@kBEJ>TC&1U6k+(o^ZOTgmghhY#!oFnH1b6MO84py9`J)u28NmsoY
z?lyE`ISzHVp`Bq$5WEC$eF*85D<#-<LM5THfXVQ~9%7!$kj{wO!v#J?+b<JXvryqp
zdRMO?>$y2Xb#9m7gRZ{8I+s-pb$C+Jo<fy?SSC}d3BF{RP!HJKL|zu^bJYbup@Gnl
ztP&atjgjZGAeD7O6S7Ze3N&1SJUAdUN6szrX)X8*0pzX_gi?Zqwn95d5j+t(k%K~K
za!lyzW?txTcZGY$CK)zCkW{`~K!9oYPZ-}nAvHTa#cfg6O)>^H*l=Qrb>`k56Z*1n
zK*1nSj=E_u9HOEy&lTfJ%0YG$;7|r1Fd#y+3NReuk}j8nHj|QW8tk$^Xi$!bHIS0N
zejzZSv6nW>uiFR4C1@~=l3tYb)aL5oQK}m1%W?W=DSq+s>vq!sW|_7}eI}x_13|Ep
zTlh{4XxqX!u>E9rw}%SdM?zUBm0jzEP@}_jjYR0d(X~QPp_dS@J+1B1_Fy6+^bz_B
z{e=EPB>E^y7$8K0{&xwnLYy!VF5bbo9x4nY3(??+{GQ3_1&qfr=?9@42I*D85ZNDQ
zzDgLcGfnU}kde-z85hIfh<yEqi)Db3twXT{>Dl_Fq;1ij@e6q>L~pDrXgejpkl|0h
za}fXiLZU`KJsKC<jE{wpsOTuDAbW*)VYHASBnnAFvfu)7qzI`3<JPPyIu(F%K$_;}
z<S}{eW)b;p%!1qKEC{tP0S@#QH7-QktS!`5YYVisUREwK&N(6AjF2H@3Ryxn%FPjS
zg|R}OkdMK_L?h@e#Z7M*{486Yxr5m!<)!CBNCA!+kNiR!q4s#Gs<v2Lq#=sIyOll*
zjn$(S21c-Wg%43ekuXje4@)UnAMTW96k1S_m!4Qy;L6vY)0TWBOkh3^VWKcqcnrvF
zl>x8IT49nfS(u_N)s|_?*9w|Ig=yLfZKbwKdsbIOSdOgLC3)%cIV?_(m53Oa51VkA
zN40?){SiwN2J>ZVPF``D=hX*B7|%<Z4W^q0;i#M6gjvFDV7EuQZhlP2D_$eaa+_9#
zxxzesD3)*G8sSOCm|$`(f8WS%zVI|~$)2nc=5wt-5*7#xfq+Gz(Z!6K($WhIwGEmA
z)2Lj1{aXdGS73(@oVLcuWT~(WuzJt05teeTp&AP-goVONVU@60cusg;SS_q!1jO_W
z)^Ci{fY38@QrSOGT5XNCUNvj$v<-ud?gIm04F}Kn5Y`#gZv%3E0VQk{HldcAg~g28
za<ZTrfpdXrfI}I^WxY7P(%t>JFn`|w?FDVkX<@6dP1ug~JA{{nmxY~i7(zW@!-)tB
zLq(XDl&MPEM#%V0QC?mvInHY(6#q;DD$9b8Bs?Z`=#Zhqd@bh@9#ai&$5xz@kd&Vr
zI$%IQMv2*|2Kz1l`sFO5a`5`7CCjV)v;X5iQ!?ltPzUiTPR>ut;yAuD$60-na`Or}
zP8x#ye&Y&q+4Uq`SI&rw3B&b#z&PA#aht0f?t<=}p5z-2+pceTLRMCSZ(yrH-vN0!
zDe0LHsWnUV-@LLi3t7F{t1do{{EXPX_-%#yPft$h!LB>v`sJjAp0T)YkLw#n>4PG1
z9l~*>L2g0!7+m+kb#h_Gz))Pb!1cD2yj}xw-4)lLrWN*P*KIgXs6HVrZZNKWaNRE>
zr!PxeAJ-|_iIGvbMp?oWN%>*JaNPvghtpgUtj`+Y`kTC*7zWdf<3u^x)uSh_Q4g_w
zdO<{-`+8=6Q7pTUdWxqfq=m71qAZhROhTUlxCSpWHF9N!vvQG-sb6lv0G22In~JhC
zBUxD?xPHf#ueTTf&DMgnxZb!Qi0in5yf~H?^)b&(N$(Yb>t49toR-&{-A8-PH*+&}
zIs;BDtrGHjhT}ePVi})T7{l;@Hd@xXvIjDJf<`PCxj}paoTE8#le*w2%|?8cFC3!j
zaEG$1R5(zx@bN_rTHq57sBC=l0Fe(zDuc*FJeKFVCk0E>67JPJ<eUQ7Or&Hv8F?{x
ztdWxCl7kQX$8x@==bYp&u@y=TtFs=?SzowrZ{T?vuKIJA^*iHH!z}y{!`(tWOT~5B
zQUXCqfp8JC+8T9W&sizg-KFFpMY3L&k&d;~s9PB7oDElSf?hYh?P4`VO9kQ6N$e+f
z5&iYj@&HlHwbbu-*6(>rEp0h#+x3!C$D*!fTVEDq9xNULz6y|YCR)hc)C@oQsLda!
zcZNH4DK_;I=lc{k$<1B-WOT%+4QMr5J}oakJ?Z_YZXTVquR7;@cJ9GrobQY3o_CO!
zQAgi1;%g&5avYuX7rkoqe_0AB->Xq&=|-od<O+0yx|lvRePFt1I?egw_e;|m(=}Xu
zW;&1eCnfbM?E^+r>9}vugh6ddyr4reDhvf?GWDlfzy|9nmyV-wq)PyP4TpXT?q-7u
z2jH%U3Lm5pmRs59j3SKEQ<1Onuax4G^gE0~Sow@vD&ptwjF2+pBPDyjPj2q04U_J=
za*h6Bedl^S@|Q?%S_}Uj{x|&B`M>CY%m1Q|1xDGv{^$I^^FQOi8c)83;Cn^bj~Kwc
z!U@h7|Mm)pggyGzi^4v<Un)sgenc2JE<Yj|eI~g_0Be1Ln+D5{m9jL!`h(@edV|4x
za5zTqm5MkjOG6Bo|5=U7=2M=77`?BLQrS-qkS%gEIam&rdAT0mfpQ40{N(y_Ke-y7
z_LdvVJ>;4t`0(^tChjl_Vw6`(iw55tiduRojkPZgy`QIZvjlg0%Z^7zRleo;ALD@O
zWycv@tr_l;3?AYs(}P#Nhs$x$fhZ{*K`LxK<fHsd{4Yj1WvB@M7@uHu%i)LXefSU>
zHFq>OM$}|uK)X2sq9}WtdvU(z0CwNp+S~`%9T=2YM+^`n!1bayUojNXq9N{U#tA#)
z&G?{!qn3IMX;-m_*q-sovaLl;4BRqq`S6yO9fi;}3ZT+KMsZ;|xy5<RMCYsP?Y<G&
zNv$yV@(+MSWO^2Z;kaATy8gshJ&{zHS7h81*^db^d<sIoY9PeR4^q7)>e>zgMj;3&
z>Vp8HI0OuhLhaJfmwCYLB#t6JW)32e7jerGO0o_<+ifrzzlyMnL)_a4bNGNe!+iz`
zbd~!Srs`j~yFAZZcqd<puff+v<Z*NOmfQ1P;S}!2$M8e>(R?bO%@^{M_{aD;{4@M=
zel=o^U*h-hhxlXgTz$fS&R^$$;(v#$#z88>Ptu6AChbWmd<1c1BuRx)d;*zHo`ku0
z4Gh7%$suwaCfm!fQ`{Cf!H$^WdYGoSN6c`PFbuP?JYkA38;bQBD6)Hnqryjs0=^;q
zCYr@ci2H4czUeIv6qCfU;uJ*oE*Ce7yAjj-k@&fIQ~cB9G}SUSH+9rwbyH2_OfyZ3
zO&bu8djwqjs_7TA*<2NL(GK)7)I0`}wsXy^%-hWe&8HAsdmAyeH7w07T`W<Eo-MG<
zv@El{XgOf{5RtLJTJ6@l)<A17>o99JqFxsx-t`UZhlp>zE2&aLsiPDnB}>K9Q;1pJ
zi-^>#(p|)xHnw%K#o5N#C?ZF<*^VGK^cEsO>)SinqwVQ-&A!yW!~PE9Jbyz}XER3_
z;x-E%PdZ+39CUo*xaD*@8#zOq!<+@qC!L#|Z#pkJf0ZlAt>g$fS)MAdkar_W^LxZi
zHbgArC`1=7R(2}yD>qb0ZKQ^&3F;Jeg}O&Qr{4Ce<Q3o*<(1_%*K4!aF|TXh7Vk#h
zJ-w5?r+csUe$)F(C83gErLam#l^(0KuF{c8S1X$<H?AB}c}(RwmA6(tS@~ua?<#Go
z45~7|%8Dxct6Z)sRBco>qH1Q<r>eeO^=#GOtJSU+TFq5$R<&)_KCE`9dd=z~)m_zR
zSKnU!O!ePu_}1uIBcsOCHD0Z8!AJCI<`eBR&gWU5BR)53R<7BpW>U@BHD9jzX)RK#
zS*@5_6Kk!lb)weo+I4D&*UqiItoEC=Z`7$;C#24pIt%N(QRjNyN_D%|O|QGK?t!}B
z_*U@^_09BM>id@O&3d)!^{!V~Z*{$s_3qYhTz_EwY4x|)zu;%{Ywwrhx6tpf-^~Vf
z8}x55slk>8pEi^lwr`l$a7n|X4evB++-Pv4#~Z!c=vw3IjUyUQXuPHI`6kXL-I|PT
zvZl%Drsk&Yn`Sg!)%1gAq*-vYv}P-sz2BTPZ`(Y*`KsopT9{gNXp!AwO^b6a9W6s!
z7PZ{c^7B?zTlH%-t<|fozHi;2^|01Yw?5kXPyb;5Ovty-0=xtI1WXIq8}L(Lv%sXl
z6@jONoI$;UrUtzh^kbXmZCq`hZS!$(rQrU-j|U$PzSp*0+q|~h+Fozhpxx+pE8CrG
zU%CB&_H*06)4|lCdxxnV_I3EJW801e9bfMFL#LLVGCFPUbggsa&aTeuI$!Bhze_@w
z)m<)k_3b*k>+@YNcdOSeq1&2nUxfIDB!_GW`8u>|=$OzKL%;9t-#xGUE8Xvebqt#v
zcCd%gBfQ7#9w&Qx_Z--BdC!Zz>i0_RwWZh1@Zj)?;Rk!0diU-9bnkN!wIh-uHbva*
z)2`3tK5zAP^o{MiyzdwNn)S=;x3@p(->3hA{^uhbMrKF88pTCLL@kKAFre{(u>)R@
zHb)PLUJ?COOhC+}n4__kV&h{s$Nm!6J?^Qv&jvObSUB+TAZ5^qL7N8M8Qf#=GlMS=
zX+31}kmEyrhNcgFZJ1@)pkW(^-5%a^_@d!gM+A?UIpXZd#v{j%JT}T_ROYDt@k)F`
z{Lay)(St{C9{oo`RKl8s+ldj0D-&-fg(WRX`ZhTvd13N(R~OeauCG(Nq&$;yEwxMP
zg4FA2-O?7P-AE5hU!MNsnBHTa8*?WkD&vKW`<a6?w`W<iMrZBG_Rh}8ek-R=&iI^D
zxy^HD=3XA#aqOb8H}m@DZOG^IN9Mm)P#Kfb6NOC*XB2*3)U{|u(XZnMjoUfiYkc<j
z6UEJnXBB@vq1S}<6UB*16Aw?SH;GRAd~)dI)l>K>iBk?w^_x0<>QyaV+emFRgT6P-
zf7&zCetvB5V|%C9o~}*5G9!G(mYMR*yqV`7@AUX{Pl!*XKXGza(5z*%{+yjW``tPI
za~99}V{X#icjpDnTRQLllPOQ0e5&nJ&(1f`&z^tw>26PNe8%gU3C~<v(0{@1g}w`C
zFZ_8?{Gwxv+bn)=iET;YlFLi`Eq!fSgJtuV{jof4`I!~nS8QKdYvrt!cUC2@`taG1
zXSY39`?)#K{r-IV^B=DcU%h)xqcw}yn%5Ss{c7Eybw}5?U%zRC&xSc0?!A!x!sU%I
z8{gX0ZqugCwKhMsg={I@a{a{-FMhDK$JW=jwcNIPd)4i8c5piicYO2G=$FpE-1p_f
zJKOKvwyWW;m9JEKW%h1<ck%9<ucp0v`L&_1o!Zl9&*8nD_P+9ZtJh!HS8v~n{Z;lq
z^@i<@>2KUWFyX-MgSiK997;WO<#7Dr&)yvJ=IOVh-#U4u?~!-j?)CPYM?;Suc&E!d
z`;K)yw&&gU@4kAx?eX0wf=|5iUhsRboNRk?_xtVMf9-<~AM8EV`P3U9cKh(qM?F4z
z`*g(V<7XnzoH{%3?8oOuoV)yS^2gUc$^7KUPm4ai`<VvCe)a|R!s3gyF0Q%M^wRdr
zZ7=WtyvOG!zKH$evnxqgzWp-)%RjD8|H}E*;;-v|z3E!uwSCunUH{;l;on^SHuu}R
zH)ek4_1((vn|#0Phmapm+#GWA>W_Ip-v4Rtts1vp__@u`hi?zKeesv9U+&(S{cDY1
zH~!ZCx1+xg{{8E_<NmPxvGiWkdwc)v`{()lS@-W7)~DUVtGWfqW1(6jyvDUIcgKL+
zE4==oeV!R9*F%QxgJ%5(vy#E!%xq1)(p?CNHO#Pv%ZUAfp^W`}DvT5mn<<PE4l!dX
z*)EKRx%4nuD7+;c5#ENu^r-NTa7=jDZBK^@-7ty6XE`7fCbYDiOxUzyVR+0=^{(vC
zg~F5ZvbI&*roE_b*LHY`+)!2tUsl*@-Ac-Ar0)qQnT6CZ1f~V{@)9dEi{}83$?hX&
zvg;lIqg;9O+d0Gh2IJaG8cb`j1SY}Shf0+g)eQ9P6V9*mAi}tFQMiOA=)Mk^(%>Il
zBV6QKKgzWIg>a?BwEdOvHCZTWuW7I7=H`Ky^&0zy^w59*!rXiV*!zx|n{|8ftJ-dD
zZDNuo@=H%6e`Jj;Z-V@fyQ4goAJvR|!k?aIh`dNxGY)8b^=9-7aW?}78uogm)m*fY
zgQB&h8T+)?wY5p{-_EbQfJI4`nnpz@>l;x)-|R=<yfNIccItM^GL}x!TdZVQI?=sh
z0frs(GY=Jt)hg1V=mY<PPKo3cqePwV;W8bUU+VnT(Q#1HsqT=rqlD1JdSZQp&|o8D
zFRx0K7@?J~d1JliO;Pj1sQH`lsk^DFw15iDXd$*Vn$gd{Ra^hSb^*ab?Si;S{PDcn
z8Eq?HRG?l|8x(Z}MZG;V)#EfSi=uX7dn51u{;k>swrSfgFsN;CAlK8sRj`q#PSTjp
zbYXr9<||=iay@QzH9R@+X)sR)#>Ft0X!GNBhYTuGCZ>Lt7$){`$9Npq&M<#mRroU3
zLv7!{{BelxcpW~yjqr7DLEOh>vR4d;KkhYn`1V1u-^P4;h|4%C_GM8SVt+A`AQFSc
zV~7LriN>^Km)IBo0psR1@F-ig6B?(A+G$C9Pdf?!s&>L^E%hK?LCNb;ixp%aH%A<b
z9EOV{kkcH!w1dq1wO*q9Fv>60IQB+YO`I4Ij5$`DVCL#-qdUFe>$;>WVxlk-6NhBc
zB_xO`!a>I0#8hFFn8sBX)5S4jhL{O6-EQG!F-HtToyP*{N5p)wKtzZ<4DSPAU(QKR
zPtqO!h!F?>=w4V*kdy89=70r;W+FfX%McJfqWhK&H=ieBJ|R;NfPlB61g<nJJ+yGV
zksAvb(V4ZUJOqs-6vG)-rm#S@ueS*D_3qt1+82?x-r5J+aqWF=s~10C`$#3}6Q<5r
z5X#hSV0>YdqUm}>n>ZfrEEXq#M)XpdcS1X*eF%S4?6~xTq%?zyCW}*a$B$8(4rxS#
ztPv->oiU;&Qpg|!f-&-SqGkvgBa6qx>C8{B<7U11n1>2SCSjRQMtngU;xkgy9w0yd
zo`@wKSP~&2DDWHtl9DiYj%Sfe@$k}QJpe7v7oT=Rf1=&^=ft|iO{~j^POMllhiC+G
zrB19%3}V%(^ivSmw~_|kfYIoukEYReI*q<io<?&G8cixgqrr?ugLE1V2x9)&wv0wA
z3kSum+$J$iOkyreF;UzmZWnieUO}}Oap|DeRPiP8WpTbRNZbY5d<E0rSH&?{-GR68
zE~8&GV84j?De(YjGw3MKmEy|Fb0zmoPG#OHo%r(g)df0Tvrrng%A{9bPF8=0aOO#5
z7wjhU>mx3yBz}i^U)_)N%n>}FGj2dmK4O@1vb9gNOWtNJ#8(dtnH~by=r>sT$p{pS
zr!Qz1OBk{6o_L5cVlPt_#(&SlcD`9Wg2?hsh%x^PoM|h!k;Np7Z^M3J<MxOMR7Ah*
zL<4t#y}So+mfisEbInJ)gz(k#S{)Q~*&SggzAt`&2)i$|D~Pa*nn}N5k<t(p@wqv<
z19Mrs+zS_mMHQqOfjRlQyIVxe?K<&*__6qj_^EbL`%?Q#yH+7CUyqj7*HoZhdOSOK
zLtH6-Aznd!_n<yTK<#<es$FF@Ooiblm}|@VPH43>YFgd{;j53x?K|=N2Xa%iuUT#`
z*ZAoz{!UK6ioZROQ+4gSo>Od?Cnsa%{wdzq#pwWsrqc1f0j3qsGseM*JQTpjzMjxT
zOadsYOtK9oQabVnCcAPA9vt!9cP7a_hW)hfG2+=`i+Ei=Wr4yT81dXvlj??+wVQ}u
z(V-s(xXx6~4d|u)#6&_B9dw+&T=9`1j;7kCI__jYYrp+tj$&%?p!hR2AqP!O8AmZS
zD8o^1gBd{T{i5Ar9Od>SIf^NOaTHUV@*L$AgQILL!%+g-GpQH!-$*@EZB(^usnl}|
zmY=m>p}>EXJbT`pi1~h#KOOGUgVy2`3M=%fsh26-jm5j#{eO%_(ZiQZln7HasuuH5
zz6>n>q1|)yWkUe~DgxRE8mQ>N813Iy08G75-lz(wxU2oiP~kF`UW};+1BB}3Mn?*k
z>LP^0<;s45bWJIyR0AoL=P7UcH_<W{)y#VYS}0E_FO)@0P&*(dpzVK!m=u&a<w3;g
z4HFq^vZF(12MlgfilE4rv1bdLu$7B3)zCW?kfqD`2QfC&^tcCO7Rsv(V>L{(O>_Q^
zMrxXCn#Y|i(M#PVWm;f}dbDB@K8wrZ&a~24`;3@d7ITruRzT-u4}jK(5Zz*ZJ!#1V
zx<nu%z{?#%=-xC$&trf`<|4Mqh$qzpmMAZI^a;u<7{pe}+uS|m7g97DDjml-*2Iay
zSZ&y@1M8`vwg}t`3Ya{3*u=nKf7}iBpZtkuf>avQBxaaq3U8U#nAW0M>x5&b4V1TN
zFH_z@c_-!V+755#pwCgOjj&{&dd@ey{g@h4vt9clJI$hOY0aRtqUn(~*PfK_BP{H{
z(PRFkRAlFvHt8bUQLDm~$+XQgWum;y=1e2pGbVkWWQd5Jrd{qZD%}FH-n7%B7$UCs
z;bakC08_z(w6Vvu*FziLl&{WcquSr03&ak(=PD)^ab9k&VtNb6JHlwfbkJbdrsJ%`
zC|^nE*OaeJ`KstJ++cUB7}1~QgEHMgt;pk~>3#6-Q{+3-DQ*rN$e6hxr7z`&>XVjG
z%7?N!Oc-P1rJSq6)WzrTlRmjvmiRplEkpdDqoH4vYv?u8bvJqHtu^Sg2jzQun(G%b
zeuqw=ln?rw^C{CF6!$|#u7M7$rgIH8Pl0buUpC13M%s&}CrJwmM>rFXEr33%y2%3(
zYc94(IsZYLxMTX&LlZufuk(*NY(?>HCgh-5&=FNpd{e$A<!iC=3jto*fo<I!mIYk?
z{kf;<4oXxi;tCC`&2Tk_aoG50C%-)Jhr%X_Z72M|Wb!aKh6<8$AH>Z`b9E1HKzR-S
z)$wAkkGlGmB_ngw^5dl*<^4PaMEUw9NUEr+{A+{Q9E3_Sg{fo^n>&`TR21b0lvXPI
z?-DbXp_oG|b`Y@JfOSyHn0m=KB0;{4&5lS($Z*9c>T}@-$rf(N2v65ErdSF5?-^ap
zv8ZDl!-2=>qRSmvTcCAPz6s^gPr9|m=n+gu1KPLwZ<I%KZ<IK?B396_W(+H7V;ent
zaq-6KgBeze@5Y>gl_4c32`gJtur&kQNF)o(TwD)OuQ|<}?m<yY$_M<LD9T5L3m%E0
zR+MjD0Y%Ux{|l><ISnOh6;XtS`Rgc}v%s~3*=l0X#xG&$DnU_Bc6>Gh&y6|E11K_G
zH_!5*D2Vdy|J?x&b;-Q2+*n#(ek`@2eB08o6s#*RY%bE_K_>V=kYeWbsNIHgwR_RL
zwW1V@p?sXDj(#EIK5$F1*uOjQucNq~75fiZZ^!yCNA;Pr08%UpQ7r|CcFAGUH46#{
z?3~ZzE{iiNz_u>^IN!LrW&X!NzUAaH^9d%WY@tp<=7Tzq`E@f4pv*W%`Hqx7z`D4S
z`2YeJ4w(;|-!#8vK4N~`eAN7o`50H-{I2=9`GomB^GWmj<`2x!Jj@@NPn*w}&zjG1
zyUd@MKgH*~`2u&+e9?Rf$h#p7f;G=r?#Q&+c(rz9EQ~^Vx}lS;ZDR(Lh-4Tqu`I%s
zhl#!c9LKgPfo&N&E{pdr$%I*-+3j?FI}hEOsISRki*WK2id@X{sIQSQveAS55%<mv
z*M{vWJ-ZhsQ&=p4$&}lY>Mp>zXVj8esS?IN6cS9$Q%QIFlFGmfW)#be`EXL9qJ!gf
z3vNlf^xa3GtFm_J*LsAxkqYtZ1+3Y+nZ$jIttMj&7AW6|sdJqv|2pNnQGPGw_o2u3
zQ+|*B{RZW`dWVeX0K-<`)I%se)@1}>hKh)Dow2ls)*sX+aPs7m1)ZK<5n%8dkdW=l
z#LA;UOacPi_)mtN92WUiSP4^NB`2F<Cm)Vp{s#T(wvwA+TY<WXii9vdll^&3w{@9s
zVzH^|6jMT*UQ)fyKa+jt+xkMS%jRF$${pm+a(>Bt$5^N(Rx|&K5%3!mtmZ$2Bjz*Y
zfcd`p3|88_%<Zx;EeQfgU(;l)cyuMh8^N&12ncqgGXL0W2o{;I_msXKEiSJxI|-)q
zWPSIZe9Dic{0P*#66J?$7}P-MtN7N(ad*}ZNpFS4%35)d>8wqS8xD?cg6e(T+|jhh
z;$?1XUJe$C41A%lQ$C#X&^jZai%>oonk?mG*;Wql8!$U;K%j1u4eEeS31~BU@<SbP
zm}(toQ!VC&veY)MH6~kC^vRaCjq<%P<I;BIs7(utm|mOG{l3GPO);IeXu6@*#{Qt)
zOBEJ(Dy|VVRo8v{BQ}o3&HB!no$@n-1CMa)!=7zd{K+Ntf51j9&CrhKtnWOt9`lP9
zYz?K)Rm)5UdQ-lShm8V-B}fbOHzum>nNeF;c>fob?2JlwDPKtw#?^zB>__?jrIqx4
zL<gEXmULi*rvt-FI<T+11DhpDQ3xF@&(IUA;!YTtyAcqcji77aqUmvtl<rAVBo}GF
z?})t0x}E7cm{PY~v>>r+?5+8;lcZ;=_!DN6_t089UEvC1X!{FVvv`$MHP%zrh?1&C
zx~p1)%?h4sAMMIK!)UE&ddkl+XJ*YD{%z6sG5yQZl4oA!PxOi~Q613XztjAhqGv`{
z6pI*O(Yjg_wQ6kYq`Q;Hf~dcY>OCSv*Adug3ofM_X5jc2C-Rmts8dE+YB8NEueS`M
z{NPeL34N$V#k|~OQL&6O26=F)MP(ox;_XX^I4Gi=*iRMyPlCU6fU{1S*l1?_eTU|V
zbf&b%lm5t$1q#O_D0Uo_i2@er$vO?jA=YVz^Qev9e}8|HY2FI_JVX_ZrTh@qXIYu;
z=Z|Lnme@DR!nF0G>8?F-UP*bg78_&(85CqF!$GJ_V0(Yhdcw+<nQJ`@Mwv4<2=wKz
z3%6iaYv$-O*z_#yf@J>HGRHF4GSBj)&h8T^pGWy6lz%~MdRD+1Qp?la49hc?1*Wx@
zMW%z6C8krBWe^;01;Z^)pm&riC%Um~v@SK`A=xNDDmoyMjSJlfWm#o;7Gl1P99m;p
zh0VDhEK6KsS&OpP8@XwpQhuzSSz>gcQTdG=eL<XW*=*SYlXr?`n`x$oE%A~mpQhc_
zjiH&$`UbK3ubV9`d(m^RGs+g-9!lYBHy704rZmhpF3P8XxS6NYAQ%{a1B2S@-2fFM
z5WV#X#%S5>iS)4?^>CYHBZ7zWsXDVsVm_?<KL3lhokrWBPL#IIf?Wo64qw`~bjpu$
zw+$94m^AS!;i-X!bvvj7v%Nf8ep|Mb@YF9ntxPN7sZiu}`CTa^dH(pNrV*A@VQ?Ai
zRP?-zdIRGzft_1e*VUWJ<bS`De*hwGmP5oZ6%dg{`Ro!zjC;O3A_Cgzy&cpZh+s1L
zQQf_*1QGW<h{!BKM2;H~?aG_ySb#p>1)MLNtojqT0`q`O#8#XSNKXAuD4P-$eL1;D
zoHc6Z{J>~e+}y=qESgj5Fz^Vb2RICj;gi`w{=LFrwVJJ#(!ol3sE&(`(fWu;603vx
z)T|2dTPBiZ5p>OAlrJ!pWPO-hD`Nv7YZYr%Yc*?iYYnT9wWhTe<qIiaO!>)_r<9*T
z`B{{oNBO7OX#YncGgkA1W@u|8a?skCb-&eI>N7;kP&a12DWd#1U3TS{F*^nZyF*_7
zna9go1!V?Rl;UXYcqS227!AZZGF&mwY4`qXlJ~T^)FN#SLHVI&+iZTZM7u-74aPQs
z@)OIoTo0ZI)YrA^iWH;uhsttmRgWyU_BUjCaj7hy#AJCV)<WM}Y>O%1+DwUBYAX63
z+FT>1TIsYL%MJ0Z6*Fe;zSOC{wWnE1<u~-fe%Rf00M{M5Vkj0x_J9$)@1g}vFU)W;
zjWG6IKo7u^2uOAYF_iP2eEo@$jD7rDR5Jt^99kBGhQ{Nenkkf@S{`?7M@#q2)Bhh*
zO*NG1sz@~$9GYPgsZv-}inElTT^&-o<9i3NQ2}TF9wy)xwd!ushmW6Wlz*%uCj8x6
z@IS;vb(HxK$0&HjbORGL9*K!^baCIx<_ynXOp@+P{~ktWqjviA{NWgxN%_Z1F#;7c
zsKo!+=AV*A4HUVgB58nQK4BoltFUPP_}H_q9j?cR4`#FE3CCme8F7>n%)f^KxJ9k&
z9z8f_Q+`e<0@w_V4UP`~RS<y{`<+;KRKx%T##{pfRSSzAHV`=9(t%PI7yqT6@eroF
zA2ocVELI-IbfKI-RSq|8*rYMotzft({SRllHA|T8y9U#pSITtfGo~9j?ds@_qi?xY
zi1C=@u(gJ{SecunuLMl?=dsq%xR;CRP#))-ST*u))Ihe0WGMqSnDWHc1!lIL+kMCE
z;{!$%HZk<Ke?dcg2<FZLbLYxp&U&GuxO#^23p|*EfB&*uN5lAHC~VV?Dda)zm_6^2
zVyjjO2EQ~g_;e`-7cvaiD-3XzY`Mz$&i9#Zi;Ww;ylDF30WodwI}98!Ytz_znP&z!
zN&O&lg~y)s#ODm}f1z+C8F;Ora*2Jd@M)LKk4{j2gQ0O5YSWJ#-5`cpZ<%{rZ=2Js
zceLY_Uq*Sjf>u$!CFNKD8#AN6hSpT7K}c}bO1i7o<MS#ZW)@~_C=kmjzXCnN;*8^&
zAtn&>(?I`HQf79Dhm-OxPe(|K(Gkl^J7T5L5hdn6!xB_B{FY53qNXyN5S!~8;kmOh
zo1U;Fve5`jw4U-`AXHEIbs4PG1XgM>Lj4P@JWKiK9>hvO+fuD6pxvXea=Qd8O$@B8
zD#gn43@f!fMoiXL=G00R=3QF6k%gZyyMjNNUt^44s*uWTXIMlP`yMO}y;E2IZ*b8D
zxCkzb3#pT5T2(?JYbd|gjSIh!;sK>YmXS((!%nY@#77R<J0&>jZs25fDNfcgoOCF)
z8o721dA6*1j$z55l@jLG3XCw9%e`+cu?_VCi)403#tz+2{rSn=C;Tub-t(XHofvUn
z^6Y2%7eid%?i4OX!_*?If}y2>)W>wnw3hOtwcC{6t&eP{KC;nCbUi{P??};7j1;S3
zmwzA1Z=yWR>o5HagW3~+QHFd+q08b~mwCb`O9wS#D2+kAnetm$mwBQv^hv=3M(IaP
zfTd{GS<I3zWq2mQoAmBtmVC@WbW1=lHs3Gl5MS0oPuz<dq2FP9HWXkDb`Cm&ndz`b
zoJG7Py%5uu4RwDq?J6^V>YdD{2)<GM2Zu20EW83WB3B^F1-Xr_=jzS=8(x9PFH6hv
z@M^}rSuOsBf$<P5k4O89%VJrY>KPa%SOz|}yRi(zi#{$&4KD#fx~de^UbhB5(%vA&
zl%RX22i;ps(7nTr?v~SZ3;KPBZ!J&Isc-H0BTKE3@lR}Fv$Uw0<M&2gU}zmaD;ieO
z!XhT_nF<-{OcmICjRk$rA3fm*5BiFxvoM+e4f5b4mkb}dJ48r=lrgMUCCGc3@;ghA
zSL{I^v*ogwOkELZ<IhyiM;ooA*b>~W_TcWN65Q=_<E}Czs)w1aBJJhPR=W5Lc!-rH
ziQ#l~W8GjXZIm{_L+Un|u9G$zrrlxCUr<@*s?@VVF1n33ply3x2Kd8^hHyp0Q`xpX
zV6f|)f7urUD*Ku|bbLTSJVGv0@&`@Sb2Ey6NqV`A^EJ+um756{;Tq{BuJv#oIv#si
z!sk(bEt7ex^qR+C4vY377G39q*jxmf#HVM+C%f2=?eWQ;9akSnZS|23cv3@Ef0L!I
zm0z5l6psZgxrsRmdCBnwIVc!s#_9haNN;W`z3oX4AIK4n8?L8D^jcQJgW*}$D$;u%
zV3=BtvceP{{E_)vt4XIlNifeoR$9N(B&>oZwSAy|*6Pw{p7fZVBEXShhqbSK`rN#9
z9FbA{VCotY;s%Xa1We`LW2vhfsSWt}^sFpbayq&xvqIXM(sfT-n9SbCMw)s`7Umi7
zU^%rU7(k73o~As!H>I$F55V$0q&o(z7E1Y#Se2?4<fLMA*!a?@?1!x*;=4)Ml~Z4J
zggBNnScJgHFd-3}=j!06-7Dm(llt5&n`kp>MJxv69OXYoHzl$~t_;&DdGKU+)G5|x
zwMj6!V+%k1_!qY34iO0KAf}wWwRmW&a5hY78MRP`j55+$8K3H9s9EXR=~)P_aL4|1
zEP>{`aXz-nfNrA^%AePvYv<%)@h#TzV9&mSgzRKcYA9=q9yw4ZX$T7PLDIIYpo>WA
z9!vRYIpfNJ^+E~00PD$0xD2p?Y1m1)3_u?MGy*_>2Ji&{hGF>|YK*=w0~HRa7J%x_
zpuW^AT9sv_FTG(Kqqw))%rBFsH_`+mO&^x#D<e%|HcN$AfpTd+LKn^8s`K}3?EpWD
z^4C~J+3K;<>_|;CxC<Vqum*nv0IWsJ$*+i1QX7C_0L)~7Hvl+dLQYOr1?1bp0T*F2
zQT}@dcng4k(|Kv@XX}p%3|2$3{Yy)ukg>1zLEAul1~F+Yv~))y&(q^gdKc=uGkYS^
zy*$qEAKZ4~o0R_%LIzuivfyOtF9Jkt3CP}U{I<E69)$oA($27bQ_?S9t;S3sjG1>Z
zHVyU1HDvtci)GhQVh!a%wu+Li7{{tLeHEpRZFaWXmVq{e+p=)@T!Frda=*SNY^E0C
z%a)aRTOk60J<9*2TC|U}t%<WNPu#=6DP5l$pIm5=Mj2YN6#(x=4DYuY-hca-@vfoH
zv^?Go6RHQnaKf<lIvxa<!II(1hEV(aSSqm1E5#B+4q8X~Uv;b$-(8%HMS5kif-S_$
z4X=-Zl0_id!3-mCK7uo;W#G$?Y1=YDuV4tg2XMmw%Lqg~o=uO(D<$0W2>g@s_aBPD
zKqIvBKSiKzdl@oYX4_ecKx644sLR0QJxVx+$>f;lqg~9P558RnJBX?*WfP{8K+fw7
zIlc@z0+2JxP%@Iz60%cW$z?$I0Q3+8^=6>>eI%&4DL{`h(E1G2@)w{c#(v&IU;fM>
z(VdUX)N}`sAF)h*7^wX(K*jk0{REkQ!XTZ00ZFC+@)97YFh~WEx>lCv%FHcoId>00
zR{_+R0U=80FX@fc1@yOo&SB7%06iib!oC7SCBA_B5pa17u8NT>a9@<p_P!sduiY!H
zgQ*vw?*RHPgRZ7S`&3*)QlZ!Q9!Pf&=|Wk$8hSeK3W`E$Ibs+$%Ps)^ID@YV_(#!$
zxi=ss)*m`rYX22z8bB2W+LGm3_b))LRRCIrffh2*dVd944WKm{=wt@!_gA3R0a}lN
zQU==auRw9sp1m;xoy9<5z<VSHtTh1Il7Y@(piTb*)RY3yAO^}a(B^*ydL5u07-$d!
zh3)W>6)<lFXg3BL%RpOK1l3I#_AvYT?dno{4;<pv7~7qB&ce#zA2<yQ=X1TwPT#>P
zT{roAd^4OU^T1Isd~<AXhB1Ti+%u+A=3h+*O()HMrsJkB%pEPwO?ym7EMAr_2taIO
zUT)riAjE~{t(FYS9B~QOudl@VZTC83gps^%*<v|^P?8ud7R<A3v)p7`ms#e*wOz&9
z82;x_c%X;E2b~8m^c?u1*TED0hP9UUoMoQa7h5+(TW?7M))T~8Z%efhG+$u7BL!QY
zG&O*+rm5+US%ASN9wwV&DOOr&KP<F_Y#wAQz=4c6u#fseZ15e6Exx}H!i9T6b0L_V
zvn>N7U&`T#K^zr_bK58hz<Fc-I0?#gNLXhr1mmdeF=5d-N{Ag*G*laoMf?d`67;R|
zXXO;*&=SU6SQInjIiakN)I)WAu}Vab&g`iNX!g-#G^--U5W#$Uq~-uUSTjzK*KCU(
zM(`Hp6A%>g308hz@+{QWBXCj>gu_Ba?rQfyU|0c3`AkGgARY&6?eqYneBFgVPWR$Z
z)E)USc2M{Pb$9;bx<`MG?$mz@etnqm5t9T9@^S5?ZpL1rTe3mmt6(+N?b)EU)vy|}
zxTV|R-FI}W7y<=0!7ioS#<s&e1_J;kK~NoZwdY4&$lt-<_cOH_+SAy`d>6Kq*`po6
zCh(MmVat9V)yFA{`U#JI8jj7Qq>p|=rTrp@voQm4L?zbpm#WYIaY(ow^EdmK=F>t;
z``7ksEF|3iEei>^e_t9BZvTmrHc$&mupZ3(10|7^M4{vMQ-U7ZPx&_}K}YCu%qmV%
zXOYZpq5QP*cL#gHJb+zLCQlyYvHyB3G0d~>u?--K*%*{}u<RZrSwL>s;3)W>>38#(
zj$(xL+W&;v5p;T2XinY|f`PJGY_I&e3{eJz!^{rOSqM}jmKVF-v%?v5=L$QfA&?nW
zJa&qfaJ4Y6OUVO$+U9ULoY>kR%)Q0`I)}qBbm+BnC@k}HI7k7RS9&mWn1K-v!F}af
zgXpM?sOi<%G39juXBd>-F@>F9z+E%;OL0^&&Ou-^0R2n^tVP7GDf=B*gKg}a;;4(O
zIpl_;zA*=IVDS`!*I7I}+u%q)wXy6SV@CrJ6x&usKU9H|?qGx=8jh}@BotEu5^6+)
zF_ai_&iW}9FxHHSPtHMXy?#ilF_CpNbu<G;JU7=nntGONUQ(++thIl)tz}vo{9sEf
zwxUP*Rxk%G+uOy6USK=Eu(LRfPS)e&bt(*E(UF17rDODCH~ab3ju1-1F_dtmA+}uX
z;ppk;<p_85c0{n57d|+j!hz{eD?Q%6!XXZ=vJ0~kU3pO{`f))n98ZAth}c>qUaj|t
z1jf=Y<5U(LNLw*SoJf*04w3Tg{2{jY3-*k`%7%(?1@0cN^{|JY<7pp}HbLJ}pOOeh
z7?kt|7&Dv=PA^ESP>{R(qZ|V;WFFqAwT@^<4BJxd5zqA{9~Cmz2O3|=5x0gNylD)(
zL5{%)-!zDfMRl%o3@WiOvL(=rg?L8pUs)K3=yn_IZDe%xNL|KrKAewR%Ckc=199S|
z@mu;`Q<w7Z0*Xobn!1#CLeiJKaSu|S<y2P6L((6|8i<bg-GjJPFI+dpXF2{~$M077
zMoXpqE=YO=Yg#trvqfBD>V;1VuD9WLCLj$dZ-$gNL&}>W<;{@tW=MH6q`cW$3owS1
z?`yp!_BHp0_w_b@)9`x-&kQNwz;p+Wn`nGu@QLMo3@HyuUx3M&TgpSy_rfP!=Qua;
zY#Ca%6mKTwztafbhLC4RiUw*O^>5?a_-=`_O4(6{Ep;K^QWx^<T)onFOPpgmk>&I-
zAzw)s^7szd#Xe@bxQ39&cYXaE;s)12`gg3ZAe0LEOAz#zSS)Tb`$~iGzsoLo_La%L
zAmE`<<mnNBh5C1~{yka$hJer41w6iI>DQ1jxQ2j7Dnr1-k-bdAS7Y|IihZ?YUl8s9
zF@*bVHs!+CCib<JeZ7RXmI`)=cij5{1I-ZZGa%S!K(I58i~{la9<U?hT^Fa-`sqR)
z$8tD+Wh8qU-S&SK)4!#d;#7eDFCDoKQux1$^8d?<^8a7Xz4!12=Vv-^aGrNw5T-dV
zIWIducYfi#;{4Ki)%lh4Yv(oRb>}zEZ=E-s-#Nc`{@}dn{L%T7^Oo~x=WXXN&O6Ru
zoxeGMciwgW;k@Vk(|KR!u%kSY1zD6$vKjl$TV+YM$#&TxJ7rl`WL5T(y|LGHWx0x6
z6}!$?mutvAa!t9GTwAUq*Oh&-FMWONN#8(jC^y1>^iAZZ*t5R5+(K@N{i$2a{@ABJ
zP!5vYU?2Ooayz-b+(GUrcal5HUF5EEH|%I1DtDK|u#bIDxtAP{J?$gpK5}2|aNl2!
zl%wPUa<m*H$I5Z?KzWcnSRNt|m50g0<q`5od6XP4kCqeUL^%ojV7ufLIaN-R)8#R8
zhMXy9$=Py_oGXu&^W=QFKrWPv<Z<$NxmcbcPn0LgljSMcJ6n^fJWYN~o-WUjXUdPu
zPsp?6+43BDt~^hEQhrLFFF!3mBQKB_%8TU1@)CKeyi8t>9k*A?tK?_p=j7+*)$$s7
zt-MZNFK>`vkT=Sk<jwLH`9*oFyiMLN?~q@TUzT^uyX04}OZThtYw{j>ulzbCv6RGV
zt0);r$skGwQ!<2-p_B}xWH==wC>cq~C`#ff8BIw7C5e<IQIbrFi;@&dQYlHJB%P8m
zlw?qnNl6wZ*_7l^l1s^0O7bYlr=)<ALQ0A#8Ar)@N{T6&K*>Z(CQ&k(k|~r-r9`8I
zQZkK_$0(Uj$qY(xPT1p=;Gj6ntY%X(hZ4-LpejB|$y1cfr{rl$o}pv`B?~E8M9E@G
zmQb>kl4X=Er(^{sD=9(Ko~7hDN}i`=H6?2(Sxd<}O4d`dfsz*}*+|JIN;Xrng_0L3
z*-FVaO14w7gOZmhd6^PSk#|w@3MIQKd6kmaDA_~FUP^$xeU$8{1k=s~lpLhw5G98x
zd6Sa2C^<sO+msxo<Q+<mQSvS&$0<2M$$ONXq~v`{KA_|jB_C4q5hbT7IYY@=O3qR8
zF(sc+@+l>sQF5M=3zS@><Ps&9Dfyg|FDSV}$(NK|rQ|D0zNX|FCD$qWhLUe#IHBY_
zO1`J$2TE>I@*^cbQF4otpDDRb$uE@Lq2yOeexu}fO72qf2PO9?`ID0SRN$z<Q-M$c
z=WU5pFj2uw1q&6dRFJ4(qk^3Z4k|dQAX7o1f=UH1DtJ?&5)~>_p$ZkMQlT0Zs#Bo`
z6?~{rlM1z{P@4*Ms8E**zEr43h5A(Rqe25JG^9c!Dm11-6Dl;NLNh8fr$P%Vw4_2S
zDzv78KNSMNZB!F>kGH7~)v3y=s(Pv3Y9+O@T1Bm@R#R)JK59+1mReh_qt;b@)p}}u
z)lY4pHpG7OjnyV<Q?<F;LT#zGQd_J3YJeK32B~e-V70B<PHnGtP&=xf)Xr)bwX51q
z4N*hY?%1WihuTx^rG~4$)d;nZ+E4ATMygTj05w{TQDfCOb)Y&(9jp#fhpNNW;pzx=
zq&iBCS4U%a`$RQKO;%lMikhmXsp;w%HABr*v(#)gN6l5os(EU@TA&uHMd~<pyjrYI
zP$#OB)XCTtf2yjfRGp?ircPI9s58~a)hE<h>TGq6I#->iKB+#X&R3sSpHUa63)MyH
zVs(kSR9&Vn$8P#7)m7@V>T~Mz>S}e3x>jAMu2(mxFQ^;UP3mTKi~6FvRo$j;S9ho{
zsV}QL)m`c<>TdN_^)>9nzgK---KXwX-%t;z2h~IBVf9V*E%k`{wt7^3M?I##s~%TR
zsPCyK)%Vp8)Klt*>PPBn^^AHJJNSRBexiP=ex{yRFQ^yQOX_8PlA}DsQJg|=TraYp
z$C!hCs5#d{S*k2!XXkZ~N*n{fGdp!}je?WQI4e$)sE?D70-!T><D$7?SXelNdmIML
zJLY?qW|ja;H%mXuC`+d03Cjx0E0$B1k1bbl`oY(hZ!F(gZdz_xZd-n}+_n5^<*hbM
zSE^%*(!?5I?QHF7je~hI(VAf`vW~MB<Aj8#a7MyP>w2lJ)E=iJbe6hGAyRj#htx~z
zE%lN5Ns-b3m?8&BL!}WgOeRV$DNV|dvZb+7fizB<AWfDu=`m@hG)tO`Qx%?(7D-E`
z71FcPYMij}g0xxMD(#SVO1q^!(mv^cbXYnfy(1l$PD-bw)6zNVQ|W?qS-K*9C0&<p
zNIytFNw=k6rMuFfHqKVXRtN6rHntJAQMS>xL|d{g#g=0mYs<$u4YO?vY@2N_*$&#y
z*v`Re@|o=d93nStKifGwv5R&y&Tpt}uVJrguWheu?`<DsA88+JpK70FUua)#-)7%w
zf5pDnzR$kje!zane%St&{cZbE`(^ugIOCzJqoE_n5$tH^=-}w&=;G)Gv%^qFies!}
zl4A<ieNJ=CaV&JKbgXu4cI<Z?c6{cz;JD=Y+;PQm)$z6Ccc;ZEIql9$&RWjK&KAz0
z&O~RXv(P!tS?rwXoa~(Hq|V2jGn|h*=R2QvKJVP>-0pnIxzoANdBpjy^Mv!H^8;uB
zcbNtN`Ol=k36j4F<aP_lY=6k>HjvOgAa#d9wq`(nj)R<B1nIX7l5Z8H-VR8zJ@V`F
ze))j>j(kc!FJF`|%U{S}%3sOXlqyO!rG`>dsjbvi>M4FWm7=lIT<NTIRYH{RN)M&K
zlA@$3W0XuKTgg@Olmewl8IMydCMi=CO<AQpr>s`iD(jUOlugQR<(%?~@|ki$xukrq
zTv5JPZi4&N)H#o@&UG4s<HUhC3;|yl0iG}#{2&>;AOmB33dZ*|jO|(a7+!?&`2j`~
z8%yW(adaMI=)M>4W%jaq*}NQHvX|;r)2p^uFR$KSeZ2a5^~YHm1H59q;=GEzrg~AY
z$Gm2EJ?=HjYmV1EujO7Vz4m(@@H*u6rq>a#qc~0DL$5ntzj@vDy61J@oA(yH9p1s-
z?Yuj9cl7S;-POCBcc^z5PTENEPV*k)o#~zJo$Ec>d#d+b?>*kHd++x?;C%=ua2)YI
z>V3@nxc6!A&%LjBU-kal`=<AA-hWo&Dv|%Eru%+N>wF(L-t5tAh651P*o<Z;f(QbF
zpbQtHGDL9?lp$LV5_3*CC!S&U-f7aLX79cCo@VdWCQX_&&1y5gT-WFNK0iG7AMxDp
z=SAvD8c7;W8cP~Snm}TcI3zBKM=Bx}lT4&CQU$4sR70|o7Lpc|mXel-^^R4f)ui7@
zYf0-#TSx~<he=0C$4O^MS4r1NH%YfiUr67`Kae|<yM~32p5(sd{$xH`Ko*h3<TSF3
zoIzHQRpcyk9=U>CMXm|^AN6EAxhbrG;N&*)H1Z7cEb<)kJn{naBJzInLGoepQSx!}
zN%Cp(1@a~G-{gPDAIP7`|B}CuzfpQndQpZ`Mo>mk#!$wE^$<3NN2#DxQEDi)6f>oP
zVxib5jg%RbS(G`Hd0|&%5oHNwEoD9B0_75=gK~p%i*ko@kMe->mhz5Dr^ZlO)L3df
zH6bjI45bdIDyf;&Y-%nwkD5;{q}r%K>RRf0>c+4~vX#1>x|6z_x|h12dV+eD+CjZR
zy+wUY{ge6^^)2;X1UZ5l5g8F3L63-uU`33LNQn?f6h`PG3=zhNl8Dj>Tg2oDIBc1q
z5qLyf<fuqqWLl&#(j3_oxgv67<gv($k$*;Yj$%X&ixNkbM@^2J5w$XEQ`G6Gm(ks$
z2S+DGYod#zz0q@`H%0G@J{{c={eae;Mxl+SNoZBH8k(8bK(o^9v__hf=AwCMURnzc
zq)n!UXh>K>!Du**piQOCqRpW#rLCd0)7H_p({|8y(!SGs(Ff64VI^f8olh^LH_)y0
zM!JLUqI>8~bbubDx6mPah>p;w&@nnepGsd4mQ-%g-_YOE-_hUGKhi(Z|D}JSe`EZ>
z=*-|T_zVF<#E>v#j0}c?p<-k*au{lchEdF@X80KpV=iL}qn&Y;(ZRUExXHN9xXZZD
zc*uAhBaX?5DT=9#X^O#PmdC7*ITmv{=1I)6m_K4(#=MSs6Z1ai6SEVu3$qWiFLOZH
zYoRhDnbAxJa}1Nq<c0N?d}cATp6OyXGbb})<`gE%#F^WfN0{fCx0%nF?^#`0eOM8!
zNLDn9&PrenVGUyqXN_m^SprrG%gl1ICbBTrJl0~?Qr2?TFRWFp)vR{bM%FRbS=Key
zE7m`(udMH}onpJhc8iUUjgJ+@ieuAab7OU}rr5IBirA{yhFEK?J=PJ{V$j%CvBzT{
z#=eOC82crzTU=xuBW_F_H%=5MjZ??z<ErBvajv-LxKJD#w=`~T-0rx;aYy5h$DNEj
z9d|bFO5D@9f8%?^)8m=(@$m`qL&DZfO1vaq8J`)S9iJPYH{socFNwVp`z6v62PY;a
zN)q!E%Mxo7rzb8=+@826abMzr#6yWk5|1UGNIaEzHnAh|dE%SIcZu&4KPG-+cVqWt
z_hvKMvFvzu0(%HMnJr<f*!k>ob`5(Pdpdh2dp3J6dmei^yPds`eV%=heVKig-NC-W
zzRP~W{=ojkiRHv|5;#LR!#F>4Msh}Tv>YABz%g=4!k$bmr;+32%;L=9%;PNJEaEKT
ztm5q9?Bg8Z9O4||T;M$6Jm<XRyyE<oL{A!%G%jgE5<7{L#7*KQr6dW%4vj9UD5*Hf
zl;leCB>9s3Nr9x<N$p8HlTIX^N;;GDAn8%klcZ-!zbF08?ZKsRX<P=E$sNj_z!h@k
zTn)FDYvwj^tz0|T!9CBt#=XwH!M(}7&ArRL&wa>!#C^hj#{Hf92lplSPwuN^YI0;U
zEt#IoOpZ$)ocvSr(B#zQiOI8)S0wLBK9hVe`3<i#Zy=Avi{vqQOkON6o|nKI!W+gL
z!5hUJ!;|n-JS|VpE8<o1EIf!eg*TnIgtwZviMN|~jCY0iJMRVWPu^?Z8{XgiPJAjq
zk{`{d^JDldzMmi9H}ix17Cy+I%n$Jqek&j2<NP-MRQ@#nZvI~W0scY$5&m)hN&ad6
zS^m?Mq!dMpHl-n@HDy-HuPJL%+EX^B>`K{_vNvU4%KnstDTh;zrW{W>nQ}AbPRhNo
z&ofXEC7=ly0;V8V5HCm&3=s?yumwqiWC33w73c&Nf(C(G;1x6p070{0qF|k1gJ6?j
zi(s2zhhUdrk6@qRfZ)8~KfzbQcVQ=C7hyMH4`DCikHWsfNTF1iE|d$E!c1YdFjtr-
z%oi34%Y<fOP>2Z^2!9c779J2D6W$Wu5#AF%5Izz<5xx`k6!jMM5%m)d5DgO1MPo(d
zMTsJgh%4fW@<cVFI#IpIBC?4ZMdw5pL>EPuL{~)DMAt<(M7KnDME6AZMGr-fM2}PZ
zr1nc4m^vtxk{X#Bok~xQN#&%vQ@yE8sX%IT>crGZsZc7OIxls7>c-T~sasRGr|uM!
z#1t`A93hSp)5HvMjF=^k6Au<Ah=+)Wiie5C;ubL|o-BsNQ^cqk7q^M$i`R>fh>wX+
zh);{pi7!ZoOGZdWN=8Y>NXAJfND?JU5}qVQB9MqAsS>foAek>&C|N97Dp?^}C0Q-`
zO>#o=K=NMlQSw>xMe;qZQ(8?Ll(shQWZIdub7|+(E~H&byOP$Cc0KJ@+TFDKX%EsK
zr9Do2lJ-j4O*%lDC{2<kOH-sGsYEK3Dx`iXCT){Wlg^N?mi{JPC*2_3B;7APA-y8K
zC;cKDC?m-zvPc<C#*hKBW?4`+Q3lE;%U~HILuG_)s%)BUrfimMwrrm4wCs%RyzG+f
zs_eS#mh6t~zU-mwvFuBFb$VTTeR@N>CEcFxNOz}u(wou)>B01g>0mmPJ~^F8pO$_x
z{c`%%^p5nK>37oar9VjjnlT_FA!A6!u#6EIqcg^4U>QV4TgKFk=@~OKW@pUFn4hsI
zV@bx+jO7_CGJeU}m+>XzoBRiPXL&byPkC>7A9<{NggjL)kxS(na-}>|zE-|ozCpfG
zzD2%GzC*rKzDK@aeo%f$epG%;eq4S^{z#FkkSNj=QbmSBp-?F@6*-DLMZTgyp;PD;
z21T)Akz$ErnPP=vm12#eU9nEFTX8~hM{!T_K=D}dO!2!?qLeCS%5<e%sZ?evvy{0?
zjj}*lsMIO-N`um=+@jp3+@aj1+^amGJfu9LysCVm{I2Sx>Z0nd>ZSToRi&y?)vD@L
z^(u?Xrn0M?Dv!#iYEl8JfT~$FN7bRap}M8Iqq?tpq<W%yruvxKH#07CaOO{$!!k!?
zj>^O{+cKwSPRpE`IXiQ1=Df^>nM*R4WiHQLnYk+S*UaBC4`+?c8k03HYkby(EKU|T
zi=UN}CCZXyNwZ{G@+?J`GE0+Hm^C|VZr1#)g;`6omS_EvwJPgw)|>2Z**&s*W%tSM
zpFJ?!l--bxXD`TJnY}rCZ}#QvKXSU~kaEW4$a4%il{t=_V9xZMRXJ;N+H=<DY|7c1
zvm<AB&Yqn8IfrtN=A6hmopT}Qa?aJ9j-0o-opXEVQgQ{kqFhOCT5fu-JXe{U8CJG*
zxkb4pxuv;lbC2d;$-R~PF84$3=iGmDzp8&wcUE^(_f-F=?yK&n9;ha%DQc>ksg6@8
zsE4S>s3mHdTCP^9v(;*KzFMm`sEgGmwNJfVy;A+F`Zx7j^#=83_13&zdCojfo-eN{
z&!5*Eeg^{cpgcIQH4n?f^QPua%bT7zD{s9fN<-JgXqXz7CSH@E8LAnk8KD`i8LJtm
zNz|}498I#OTvMf~(U>(28k@$UacRzKp62(<ADB<dr{+iI)AD2TS^4?-mi%@38}c{h
zZ^_@Dzbk)F{=WS4`OgZZ1?dGD1@Zz_K~_OdL2iMjps+w!pf4~M6c>~floh}Qtp!*?
zTfy{#Sp{<ndl$wPmKK&5Ru)zl))h7sS_|!kSmDaT^@ZCC&lg@Vd{p?f@b|)(g|7?W
z7QWN=(UP<b?Qrc#?HKKNEnCag^0fl3M61&3wIy1w)~{{WPSk?hkamg|)y~we(5}?3
z*0yWcX*X)OXt!&3>X^DX-C$jU?kC+)-EiGV-6-8y-2@$5$I)?h$vU1cPY39Nx)vR%
zo2)~0s1Dc7)cvRXrvE|TN#9xDRo`9TOW#}HS3f{MNKevJ^i+L>o~7sN%k-7{YJHu)
zUT@Vm>Ye&UhOUMlhF*r=h93=m4gC#+3?u{95M`hl=!O^r)4(zeGl&glgT-JoI1Da>
z*Wfn<46loN6!j@eC>mPybJ3`xu|*S#I7OzSvZBhOs-oJW`XWn_t*EicUxXF46-_Ui
zRW!F~LDAx(WktUftul5phW!*{H)Bs@Z(|>0U*iBH$w)C$jZwyEBh5I$=rFpB9;43)
z7=y+ZBWRpz{Am2w_{I3u_^r58ahKxm#XX997xyjhUp%0gR7@_W6pt#-D=sM378{C-
zi%W~ki|>?hO1LG-CA<<riKs+eA}NuT$V-$Zs*>!IoRZv<x{@^|?Ir6<Hk52G*;cZn
zWLL>EQ>sZ~N;64K8775EWy&<=nDR{drUH}Bq&FE%PSY0CHq#E%F4JDq0n;JV5!0vA
zywd#Ag3`iLeQ8l?acOwjzqGQny0oU$Tv}h+P&&EvXzB6NlclFi&y`**y<B>=^mCb}
zte~v0Oj~9sGnSQ<naaw`s>*80YRl@&8p<qXaM|&)lVzvN&X!#$yIgj)tfRbJd40LH
z++N;T?kIPcd&~XhKzXoyQaMyUxg05<Qr=p=qWom}neubx7t61dca-0#5LT?JSX0qn
zv9@Ae#m0)w727JdSL~|TTd}|5K*iyTBNaz0&Q(0E>|NQnvVY~EN=jv9WprgprMEIz
zIk$2_<>Jbvl`AS&Rj#SrTzR1KQ039e6P2ec&sAQmyj;bt;#Uc(gjJ&Ow+m@i=~Wq3
z%BrlYoT}WayedsqewC$aM%C=9xm63Q7FR8+S`ilVva8kAn(F-Of@*EGzS>w_TwPjS
zQC(GCU0qvUS8c9_s@GJntzKWfsd{Vmj_O_2|I`?2ifc?Yr8Q+W6*W~gwKa7$4K=o!
z#u`VBtHxd9shL<aw`O0>!J5N0$7)X2oT)iiE3P%vnrdCO-rA<xK<&g@uokPGQ#-GA
zVeOLI<+Uqof353RH?WRWN3NsPMbt&r(d!s>th)HRgu0*VhSm+M8(t@=tFN=x+3TEj
z?mAx`P}gkkYj&DFW}msq>^BF@LGvUtXbzdDm{BukCd_T-spfg+&F0(Yd*%n`$L6Qz
z-_0-0uj&=`o9egLZ?E4`zq5XK{oeWm^#|*Z)E}=uS%0ejO#RvVbM+nduNxv7q8sQ9
z%!b&8!3{$ihBas!8XBApfd;r?YQutttqlhn9yR>g@UG#DrN4!2VObI_91GXNw+Jn%
zmST&;;<9)wO_qQqXjyF8V%cWdVcBijXE|UwV|ieCWO-tFZh2w()AG$qvQn%O)@Uok
z%CrisdDeVup;d1+T1%{eb((dCb(VFmb%Aw}b*J^5^@8=1^{Vx{^``ZS^|SRq>(_82
z+Qrt*Ho%r(8)6$4Rtrbj#@OVxVw=fUW~;DO+iGoI+Y}pW!);S-Gi)nu>utwv=WKUu
zuWWzW-rD}LeYE$s)9eg8(;jC}uuJU)cCB4+H`-11dV9bgw71wHJ8Z}8i|tG8%k3-e
ztL<CtNA1V$C+%nK=k3q!pX~qIzu3Pwc5b9K4s9IXII?j}BfBxZQ65$kvl??7OB!vB
zjg8JmPh(Rf+&H&!LF1yvrHv~bogGw1l!NA=I~Wd@BhE3{k>D8W_}MYiG0HL4G0rjG
z!FH55N*xtpsHVnI=cspB9CiolIO;g(xZt?t=y2S0+;QA<Ja9a6Ja>F|4sep36lbK9
z=4^5T&VaMo+2RD9lbs>w6es2+oNdnO&Kb^`&N<Fa&KJ%<ov)p5o&PvLI6pbRx(2!8
zT?wusuHmkcE|DwOrEwLwbgm-T9@jqCe%ArlVb@XDan}jgY1cW|1=mH_71veQHP;Q-
z-|nB?6WnZflA9OSAVqGmTj@5sEpEHp;dZ-yZp1y$z0kebz0CcKdyD(1`-J<H`>gwd
z`=0wR_gnWn_Xqc9Pft&jhwh2-#CisM#(UB{GEas_>B;gKJr<A6)97(|yq-y(8J=05
zIiC5RMV^hGL!Kj^W1f?qGoBlsKRhozuRL!&@4Vf;5#A^-%^Ty5^$NV%-dt~<x4^3l
z%alQHix>2Uyi>e$y=%N{z3aW3yj#6TyjQ)~y*Isgy!XAYz2AMEeO-M$e7${9VaIZ$
zZ?tcmFVUCg%lB!0dY{o}@>zWoeV}i$5AmVC`M!4Fdf!Ih7T<Q?F<*!8rth}zp6{XW
zO;e|)u1(#WdNuWFqBV_Z8r?LuX+jexY+`2nC;2D)VgD3A>c{<U{%QUh{#pJx{(1fd
z{zd*J{$>6Z{+0e;{cHT~{&oHh{!RWZ{%!sp{$2h({(b%f{zLvF{$u_V{!{)l{&W5d
z{>%Pr{u}<={(Jt1{wMzD{ulmN{x|-2{ty1o{xAOTKxd#E&=dF(=m!i0$Up=T1<(Kn
zzzmz5@jwDF1Q-sC1jYd4fkc1<Bm*gc2#^3WKn|#YY(Nd<16sfU6a%F|1yBvt0S$l+
zZ~$(=2LM12m;^vT2tWW7Ab@GWOkfT$A6Nt|1y%s7fHgonunyP&YzDRgJApmGe&7&r
z6gUB#2F?K&fh#}<a1*!<+y(9f4}r(PQ{Xx92k;Vj4ZH>30Uv<Rz<<D3;CrA`pi7`z
zpl4uUfE=I(1_vAgcfcF)2bu#d0Vn_mkN_GW0@DIB19JlN0}BI-14{#Y0v7|f15X04
z0&fEE0`CK#0{=F5Y3|oNpm|U;r8%NGx|!ab&^)wxc=L#6Npn$iWwWi>*F33tax>gK
zrFluPdoVIMJUAjaDmXegCO9rQA;=DLgUP{^pfH#kObbebvY<Rz8ngsG!AU_p_$K&w
z@SouO;D_L+;J?8y!EoU*vCG766MIbTJ@LnIT-Sf%(D0_PBAkikgja`b6PJatyH{cP
zbXbe5Mc$%p$!y7KX=rh`w6)A`+0b&V<$TMPmOCwfwEW%jbrN+_?4;q7#)DO04Oj=(
zgBH*RHiAyj4SK;Q5CEIOiQps<0z)7Iwt^T)fK$Qg;7o8fI2W7`E(8~YOTp#fFW@S0
zHTWC27F-W*1UG|Q!5!dka36ROJOUmEPl0E_3*cq&8h8V|4c-GEf=|Hb;0y2-_y&9j
zegHp%U%+qB4^U^QE7Tq83H65hK>eYC5E-IEkx+ElY-K`m&|qi?G#nZUje*8PY={f-
zAt5A&q)-N=gtDMqNCOo@ddLWwpmL}Zs)lNzddLFVAqV7!ypSIXgymNd3PA|e3Sm$i
zG!2>w&4%Vd3!uf&QfLLV3R(lLg*HH&p{>w%XeYEA+6(Q64nl{aqtJ2aBy<Kk4_$;V
zLsy{==mvBPx(huEtqHY<)`vERHix!`wug3xc8B(c_J<CJ4u_70j)zW$PKVBh&WA3B
zE{Cp$Izl%>w?cP9_d*Xsk3vsE&qBY4UWEP(y$-zz{T=!z^da;q^k3*3+zIXq_kerD
zec=Hx38unPFdb&Xac}}W6#f|=1&@U%z#KRkPJu<R7*2y_a0aY^Rd5!Z1Lwg7unsPQ
zi(wO74p+goa6N2=8(|mhh5c|d+yX-|47b8KJQbb+&xYs03*ja3a(E@Y8g7Tz!5iRB
z@K$&Syc^yJAB2y<$Kg}(S@;5c8NLd4z&GIA@ICk;`~-duzkpxCZ{T<E2lzAm1^$k7
z4lBCdk)B9zqz}>$8GsBz$VdbdjnEM$5{C>%enN&K!;ullC}a#W4w-<kkt8G;;UfY>
zgou$eM22J_N+b)(MKnkuqDPE~2`NXa!ZL3?VnrGe7ve?yNHfxcKnRSqA~-S?nSsnk
z<{=A_CCGAQC9)c6N7f^okgdoLWH+)8IfxuVjw7d#v&aSHGI9;Mf!s#!ArFx!$aCZc
z@(Ou_yhA=9pQm(gJ=S`%^-Sxz){CuIT02^Aw%%#I-}<QaY3uK;FI!)?zHR-d^<(S5
ztzW}IUl+7H+6(Q2_D2Vy6f_d0p)qJIIv5>-4o63Z-Qe*k8|9*WREUaEDVl*Q(JV9<
z)u4r_9yOvSv>dHMYteetiZ-Gy)QkGjX0!!`P#A4Radav=BP<WkLl>e;(B<e#bT!(J
zu17baThSfpZgd}d5Iuq(M^B+=(F^Eh^cs2ty^Y>OAEHmt=jaRc75WB!hkigmqhHYP
zSZAyo))V^?>xT`*$XEmxjWIA57LWae4Z}uYqp@*VB9?^lFaef|rD5rq0?Wj5uso~)
z(_uwe308(xVl|i<vtV}2iFvRlEPzeKKrDn!!7!{1n~u%G=3)!5#n>|J7wlK;H*6iY
z5!-@o$97?Ru>;s)>=<?uJA<9aE@4-(>)0*qF7^O>j6K8t!2ZPk!v4nIW1q19uy1%L
zyer-V?~V7x2jC=}ibvseoQcQb3HVU_XM9xHV4i?;@MJs%7vU0IhRbmko{g*Vd|Zng
z@M63aufVJETHK5`;8xs@J8&27!F{+N58y$(1qboTIE+uhQ5?tH@M-uAd=@?jpNB8N
z7vW3rW%vqwCH^bE25-mL;T!Nx_!fK{z60Nd@4@%s2k=Aq5&Rf_0zZYH!O!6r@Jsj=
z{2G28zlq<*@8b9IhxlXsDgGS)1AmFX!vDhG;_vYH_(%LR{vZA|Y)5w@x)9xn9z-wV
zN1`v$pBPAx2nrEFL=iNCK`@C}BA!Sfh7iMupNWygXksieo=7A(1ef3uDTI(nB_xED
zNGIfklE@^oiCiL&$R`R39bq7hL<vz!loORiHBn2Li3Y+-*a-*WB0PkT@Dl+dNVE_j
zF`0mgDFjO3L>n=Um_f`U<`DCU1;ip^39*b=L98TxCDst_#5!UFv5DA1Y$J9MyNEr+
zKH>mzh&VzVBTf*fh%>}F;sSArxI$bbt`j$j+r(YsKJk!vOgtr?6MqmdiC4s5#9QJW
z@t*idd?x-Qz7pTtI<<9a>(<tztykNRZGGGNw?(!^wb9xJw<WX<Z5!Jr3U`Fz)4B8i
OX8-yBoBw~eN&gQMcn!e-

literal 0
HcmV?d00001

diff --git a/hw/xquartz/bundle/chown-bundle.sh b/hw/xquartz/bundle/chown-bundle.sh
new file mode 100755
index 0000000..ac62f28
--- /dev/null
+++ b/hw/xquartz/bundle/chown-bundle.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+BUNDLE_ROOT=$1
+
+if [[ $(id -u) == 0 ]] ; then
+	chown -R root:admin ${BUNDLE_ROOT}
+fi
diff --git a/hw/xquartz/bundle/meson.build b/hw/xquartz/bundle/meson.build
new file mode 100644
index 0000000..2294120
--- /dev/null
+++ b/hw/xquartz/bundle/meson.build
@@ -0,0 +1,59 @@
+# generate Info.plist
+# https://github.com/mesonbuild/meson/issues/8434
+#cpp = find_program('cpp')
+cpp = '/usr/bin/cpp'
+cpp_defs = [
+    '-DAPPLE_APPLICATION_NAME=@0@'.format(apple_application_name),
+    '-DBUNDLE_ID_PREFIX=@0@'.format(bundle_id_prefix),
+    '-DBUNDLE_VERSION=@0@'.format(bundle_version),
+    '-DBUNDLE_VERSION_STRING=@0@'.format(bundle_version_string),
+]
+
+if build_sparkle
+cpp_defs += sparkle_defs
+endif
+
+# bundle data
+localities = [
+    'Dutch', 'English', 'French', 'German', 'Italian', 'Japanese', 'Spanish',
+    'ar','ca','cs','da','el','fi','he','hr','hu','ko','no','pl','pt','pt_PT',
+    'ro','ru','sk','sv','th','tr','uk','zh_CN','zh_TW'
+]
+foreach lang : localities
+    install_data(join_paths('Resources', lang + '.lproj', 'Localizable.strings'),
+        install_dir: join_paths(bundle_root, 'Contents/Resources', lang + '.lproj'),
+        install_mode: 'rw-r--r--')
+
+    install_data(join_paths('Resources', lang + '.lproj', 'main.nib/keyedobjects.nib'),
+        install_dir: join_paths(bundle_root, 'Contents/Resources', lang + '.lproj', 'main.nib'),
+        install_mode: 'rw-r--r--')
+endforeach
+
+install_data('Resources/English.lproj/main.nib/designable.nib',
+    install_dir: join_paths(bundle_root, 'Contents/Resources/English.lproj/main.nib'),
+    install_mode: 'rw-r--r--')
+
+install_data('Resources/X11.icns',
+    install_dir: join_paths(bundle_root, 'Contents/Resources'),
+    install_mode: 'rw-r--r--')
+
+custom_target('Info.plist',
+    command: [cpp, '-P', cpp_defs, '@INPUT@'],
+    capture: true,
+    input: 'Info.plist.cpp',
+    output: 'Info.plist',
+    install: true,
+    install_dir: join_paths(bundle_root, 'Contents'),
+    install_mode: 'rw-r--r--',
+    build_by_default: true,
+)
+
+install_data('PkgInfo',
+    install_dir: join_paths(bundle_root, 'Contents'),
+    install_mode: 'rw-r--r--')
+
+install_data('X11.sh',
+    install_dir: join_paths(bundle_root, 'Contents/MacOS'),
+    install_mode: 'rwxr-xr-x')
+
+meson.add_install_script('chown-bundle.sh', bundle_root)
diff --git a/hw/xquartz/darwin.c b/hw/xquartz/darwin.c
index d72da09..e349946 100644
--- a/hw/xquartz/darwin.c
+++ b/hw/xquartz/darwin.c
@@ -41,7 +41,6 @@
 #include "mipointer.h"          // mi software cursor
 #include "micmap.h"             // mi colormap code
 #include "fb.h"                 // fb framebuffer code
-#include "site.h"
 #include "globals.h"
 #include "dix.h"
 #include "xkbsrv.h"
@@ -168,21 +167,6 @@ DarwinPrintBanner(void)
 {
     ErrorF("Xquartz starting:\n");
     ErrorF("X.Org X Server %s\n", XSERVER_VERSION);
-    ErrorF("Build Date: %s\n", BUILD_DATE);
-}
-
-/*
- * DarwinSaveScreen
- *  X screensaver support. Not implemented.
- */
-static Bool
-DarwinSaveScreen(ScreenPtr pScreen, int on)
-{
-    // FIXME
-    if (on == SCREEN_SAVER_FORCER) {}
-    else if (on == SCREEN_SAVER_ON) {}
-    else {}
-    return TRUE;
 }
 
 /*
@@ -271,9 +255,6 @@ DarwinScreenInit(ScreenPtr pScreen, int argc, char **argv)
     ShmRegisterFbFuncs(pScreen);
 #endif
 
-    // this must be initialized (why doesn't X have a default?)
-    pScreen->SaveScreen = DarwinSaveScreen;
-
     // finish mode dependent screen setup including cursor support
     if (!QuartzSetupScreen(pScreen->myNum, pScreen)) {
         return FALSE;
@@ -844,20 +825,6 @@ ddxGiveUp(enum ExitCode error)
     LogClose(error);
 }
 
-/*
- * AbortDDX --
- *      DDX - specific abort routine.  Called by AbortServer(). The attempt is
- *      made to restore all original setting of the displays. Also all devices
- *      are closed.
- */
-_X_NORETURN
-void
-AbortDDX(enum ExitCode error)
-{
-    ErrorF("   AbortDDX\n");
-    OsAbort();
-}
-
 #if INPUTTHREAD
 /** This function is called in Xserver/os/inputthread.c when starting
     the input thread. */
diff --git a/hw/xquartz/bundle/Xquartz.plist b/hw/xquartz/defaults.plist
similarity index 56%
rename from hw/xquartz/bundle/Xquartz.plist
rename to hw/xquartz/defaults.plist
index e157045..957b1e0 100644
--- a/hw/xquartz/bundle/Xquartz.plist
+++ b/hw/xquartz/defaults.plist
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 
-<!-- This file contains system-wide defaults for the Apple X11 server -->
+<!-- This file contains system-wide defaults for XQuartz -->
 
 <plist version="1.0">
 <dict>
@@ -12,16 +12,6 @@
 			<string>xterm</string>
 			<string>n</string>
 		</array>
-		<array>
-			<string>xman</string>
-			<string>xman</string>
-			<string></string>
-		</array>
-		<array>
-			<string>xlogo</string>
-			<string>xlogo</string>
-			<string></string>
-		</array>
 	</array>
 </dict>
 </plist>
diff --git a/hw/xquartz/mach-startup/Makefile.am b/hw/xquartz/mach-startup/Makefile.am
index 557cbc1..e250b28 100644
--- a/hw/xquartz/mach-startup/Makefile.am
+++ b/hw/xquartz/mach-startup/Makefile.am
@@ -1,6 +1,6 @@
 AM_CPPFLAGS = \
 	-I$(srcdir)/.. \
-	-DBUILD_DATE=\"$(BUILD_DATE)\" \
+	-I$(top_builddir) \
 	-DXSERVER_VERSION=\"$(VERSION)\" \
 	-DX11BINDIR=\"$(bindir)\"
 
diff --git a/hw/xquartz/mach-startup/Makefile.in b/hw/xquartz/mach-startup/Makefile.in
index b3b8006..a989365 100644
--- a/hw/xquartz/mach-startup/Makefile.in
+++ b/hw/xquartz/mach-startup/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -121,7 +121,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -221,8 +220,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
@@ -242,8 +239,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -257,6 +252,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -275,14 +272,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -299,8 +288,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -356,6 +347,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -408,7 +401,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -432,29 +424,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -492,8 +468,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -504,14 +478,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -586,7 +554,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AM_CPPFLAGS = \
 	-I$(srcdir)/.. \
-	-DBUILD_DATE=\"$(BUILD_DATE)\" \
+	-I$(top_builddir) \
 	-DXSERVER_VERSION=\"$(VERSION)\" \
 	-DX11BINDIR=\"$(bindir)\"
 
@@ -883,7 +851,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
@@ -927,7 +894,8 @@ installdirs:
 	done
 install: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) install-am
-install-exec: install-exec-am
+install-exec: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-exec-am
 install-data: install-data-am
 uninstall: uninstall-am
 
@@ -1039,7 +1007,7 @@ ps-am:
 
 uninstall-am: uninstall-binPROGRAMS uninstall-x11appPROGRAMS
 
-.MAKE: all check install install-am install-strip
+.MAKE: all check install install-am install-exec install-strip
 
 .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
 	clean-binPROGRAMS clean-generic clean-libtool \
diff --git a/hw/xquartz/mach-startup/bundle-main.c b/hw/xquartz/mach-startup/bundle-main.c
index 42530cb..de82e22 100644
--- a/hw/xquartz/mach-startup/bundle-main.c
+++ b/hw/xquartz/mach-startup/bundle-main.c
@@ -72,13 +72,17 @@ FatalError(const char *f, ...) _X_ATTRIBUTE_PRINTF(1, 2) _X_NORETURN;
 
 extern int noPanoramiXExtension;
 
+#ifdef COMPOSITE
+extern Bool noCompositeExtension;
+#endif
+
 #define DEFAULT_CLIENT X11BINDIR "/xterm"
 #define DEFAULT_STARTX X11BINDIR "/startx -- " X11BINDIR "/Xquartz"
 #define DEFAULT_SHELL  "/bin/sh"
 
-#ifndef BUILD_DATE
-#define BUILD_DATE ""
-#endif
+#define _STRINGIZE(s) #s
+#define STRINGIZE(s) _STRINGIZE(s)
+
 #ifndef XSERVER_VERSION
 #define XSERVER_VERSION "?"
 #endif
@@ -90,7 +94,7 @@ static const char *__crashreporter_info__ __attribute__((__used__)) =
 asm (".desc ___crashreporter_info__, 0x10");
 
 static const char *__crashreporter_info__base =
-    "X.Org X Server " XSERVER_VERSION " Build Date: " BUILD_DATE;
+    "X.Org X Server " XSERVER_VERSION;
 
 char *bundle_id_prefix = NULL;
 static char *server_bootstrap_name = NULL;
@@ -626,12 +630,20 @@ main(int argc, char **argv, char **envp)
     mach_port_t mp;
     kern_return_t kr;
 
+    /* Ignore SIGPIPE */
+    signal(SIGPIPE, SIG_IGN);
+
     /* Setup our environment for our children */
     setup_env();
 
     /* The server must not run the PanoramiX operations. */
     noPanoramiXExtension = TRUE;
 
+#ifdef COMPOSITE
+    /* https://gitlab.freedesktop.org/xorg/xserver/-/issues/1409 */
+    noCompositeExtension = TRUE;
+#endif
+
     /* Setup the initial crasherporter info */
     strlcpy(__crashreporter_info_buff__, __crashreporter_info__base,
             sizeof(__crashreporter_info_buff__));
diff --git a/hw/xquartz/mach-startup/meson.build b/hw/xquartz/mach-startup/meson.build
new file mode 100644
index 0000000..2f76942
--- /dev/null
+++ b/hw/xquartz/mach-startup/meson.build
@@ -0,0 +1,99 @@
+# mach interface
+mig = find_program('mig')
+mach_startup = custom_target('mach_startup',
+    command: [mig,
+              '-sheader', '@OUTPUT0@', '-header', '@OUTPUT2@',
+              '-server', '@OUTPUT1@', '-user', '@OUTPUT3@',
+              '@INPUT@'],
+    input: 'mach_startup.defs',
+    output: ['mach_startupServer.h',
+             'mach_startupServer.c',
+             'mach_startup.h',
+             'mach_startupUser.c'],
+)
+
+mach_startup_dep = declare_dependency(
+    sources: mach_startup[2] # mach_startup.h
+)
+
+# common defines
+xquartz_defs = [
+    bundle_id_def,
+    '-DXSERVER_VERSION="@0@"'.format(meson.project_version()),
+    '-DX11BINDIR="@0@"'.format(join_paths(get_option('prefix'), get_option('bindir'))),
+]
+
+# X11.bin
+x11appdir = join_paths(bundle_root, 'Contents/MacOS')
+
+x11_bin_deps = [
+     meson.get_compiler('c').find_library('Xplugin'),
+     dependency('Carbon', method: 'extraframework'),
+     cocoa,
+     dependency('CoreAudio', method: 'extraframework'),
+     dependency('IOKit', method: 'extraframework')
+]
+
+if build_glx
+    x11_bin_deps += [dependency('OpenGL', method: 'extraframework')]
+endif
+
+if build_sparkle
+    x11_bin_deps += sparkle
+endif
+
+x11_bin_libs = [
+    libXquartz,
+    libXquartzXpr,
+    libxpbproxy,
+    libxserver_fb,
+    libxserver,
+    libxserver_xkb_stubs,
+]
+
+if build_glx
+   x11_bin_libs += [libcglcore, libxserver_glx, libglxvnd]
+endif
+
+x11_bin = executable('X11.bin',
+     [
+      'bundle-main.c',
+      mach_startup[1], # mach_startupServer.c
+      mach_startup[3], # mach_startupUser.c
+     ],
+     link_with: x11_bin_libs,
+     dependencies: [xproto_dep, x11_bin_deps, mach_startup_dep],
+     include_directories: [inc, '..', top_dir_inc],
+     c_args: xquartz_defs,
+     link_args: ['-Objc'],
+     install: true,
+     install_dir: x11appdir,
+)
+
+# X11 (Bundle trampoline)
+x11 = executable('X11',
+     [
+      'bundle_trampoline.c',
+     ],
+     c_args: xquartz_defs,
+     link_args: ['-Objc'],
+     install: true,
+     install_dir: x11appdir,
+)
+
+# Xquartz
+xquartz_deps = [
+    dependency('CoreServices', method: 'extraframework'),
+]
+
+xquartz = executable('Xquartz',
+    [
+     'stub.c',
+     'launchd_fd.c',
+     mach_startup[3], # mach_startupUser.c
+    ],
+    include_directories: inc,
+    c_args: xquartz_defs,
+    dependencies: [xquartz_deps, mach_startup_dep],
+    install: true,
+)
diff --git a/hw/xquartz/mach-startup/stub.c b/hw/xquartz/mach-startup/stub.c
index f5fef90..83252e8 100644
--- a/hw/xquartz/mach-startup/stub.c
+++ b/hw/xquartz/mach-startup/stub.c
@@ -52,39 +52,25 @@
 
 #include "launchd_fd.h"
 
-static char x11_path[PATH_MAX + 1];
+static CFURLRef x11appURL;
+static FSRef x11_appRef;
 static pid_t x11app_pid = 0;
 aslclient aslc;
 
 static void
 set_x11_path(void)
 {
-    CFURLRef appURL = NULL;
-    OSStatus osstatus =
-        LSFindApplicationForInfo(kLSUnknownCreator, CFSTR(
-                                     kX11AppBundleId), nil, nil, &appURL);
+    OSStatus osstatus = LSFindApplicationForInfo(kLSUnknownCreator, CFSTR(kX11AppBundleId),
+                                                 nil, &x11_appRef, &x11appURL);
 
     switch (osstatus) {
     case noErr:
-        if (appURL == NULL) {
-            asl_log(
-                aslc, NULL, ASL_LEVEL_ERR,
-                "Xquartz: Invalid response from LSFindApplicationForInfo(%s)",
-                kX11AppBundleId);
-            exit(1);
-        }
-
-        if (!CFURLGetFileSystemRepresentation(appURL, true,
-                                              (unsigned char *)x11_path,
-                                              sizeof(x11_path))) {
+        if (x11appURL == NULL) {
             asl_log(aslc, NULL, ASL_LEVEL_ERR,
-                    "Xquartz: Error resolving URL for %s",
+                    "Xquartz: Invalid response from LSFindApplicationForInfo(%s)",
                     kX11AppBundleId);
-            exit(3);
+            exit(1);
         }
-
-        strlcat(x11_path, kX11AppBundlePath, sizeof(x11_path));
-        asl_log(aslc, NULL, ASL_LEVEL_INFO, "Xquartz: X11.app = %s", x11_path);
         break;
 
     case kLSApplicationNotFoundErr:
@@ -96,8 +82,7 @@ set_x11_path(void)
     default:
         asl_log(aslc, NULL, ASL_LEVEL_ERR,
                 "Xquartz: Unable to find application for %s, error code = %d",
-                kX11AppBundleId,
-                (int)osstatus);
+                kX11AppBundleId, (int)osstatus);
         exit(11);
     }
 }
@@ -122,18 +107,15 @@ connect_to_socket(const char *filename)
     ret_fd = socket(PF_UNIX, SOCK_STREAM, 0);
     if (ret_fd == -1) {
         asl_log(aslc, NULL, ASL_LEVEL_ERR,
-                "Xquartz: Failed to create socket: %s - %s", filename,
-                strerror(
-                    errno));
+                "Xquartz: Failed to create socket: %s - %d - %s",
+                filename, errno, strerror(errno));
         return -1;
     }
 
     if (connect(ret_fd, servaddr, servaddr_len) < 0) {
         asl_log(aslc, NULL, ASL_LEVEL_ERR,
                 "Xquartz: Failed to connect to socket: %s - %d - %s",
-                filename, errno,
-                strerror(
-                    errno));
+                filename, errno, strerror(errno));
         close(ret_fd);
         return -1;
     }
@@ -176,10 +158,9 @@ send_fd_handoff(int connected_fd, int launchd_fd)
     *((int *)CMSG_DATA(cmsg)) = launchd_fd;
 
     if (sendmsg(connected_fd, &msg, 0) < 0) {
-        asl_log(
-            aslc, NULL, ASL_LEVEL_ERR,
-            "Xquartz: Error sending $DISPLAY file descriptor over fd %d: %d -- %s",
-            connected_fd, errno, strerror(errno));
+        asl_log(aslc, NULL, ASL_LEVEL_ERR,
+                "Xquartz: Error sending $DISPLAY file descriptor over fd %d: %d -- %s",
+                connected_fd, errno, strerror(errno));
         return;
     }
 
@@ -253,26 +234,25 @@ main(int argc, char **argv, char **envp)
                 server_bootstrap_name);
         set_x11_path();
 
-        /* This forking is ugly and will be cleaned up later */
-        child = fork();
-        if (child == -1) {
-            asl_log(aslc, NULL, ASL_LEVEL_ERR, "Xquartz: Could not fork: %s",
-                    strerror(
-                        errno));
+        char *listenOnlyArg = "--listenonly";
+        CFStringRef silentLaunchArg = CFStringCreateWithCString(NULL, listenOnlyArg, kCFStringEncodingUTF8);
+        CFStringRef args[] = { silentLaunchArg };
+        CFArrayRef passArgv = CFArrayCreate(NULL, (const void**) args, 1, NULL);
+        LSApplicationParameters params = { 0, /* CFIndex version == 0 */
+                                           kLSLaunchDefaults, /* LSLaunchFlags flags */
+                                           &x11_appRef, /* FSRef application */
+                                           NULL, /* void* asyncLaunchRefCon*/
+                                           NULL, /* CFDictionaryRef environment */
+                                           passArgv, /* CFArrayRef arguments */
+                                           NULL /* AppleEvent* initialEvent */
+        };
+
+        OSStatus status = LSOpenApplication(&params, NULL);
+        if (status != noErr) {
+            asl_log(aslc, NULL, ASL_LEVEL_ERR, "Xquartz: Unable to launch: %d", (int)status);
             return EXIT_FAILURE;
         }
 
-        if (child == 0) {
-            char *_argv[3];
-            _argv[0] = x11_path;
-            _argv[1] = "--listenonly";
-            _argv[2] = NULL;
-            asl_log(aslc, NULL, ASL_LEVEL_NOTICE,
-                    "Xquartz: Starting X server: %s --listenonly",
-                    x11_path);
-            return execvp(x11_path, _argv);
-        }
-
         /* Try connecting for 10 seconds */
         for (i = 0; i < 80; i++) {
             usleep(250000);
@@ -283,8 +263,7 @@ main(int argc, char **argv, char **envp)
 
         if (kr != KERN_SUCCESS) {
             asl_log(aslc, NULL, ASL_LEVEL_ERR,
-                    "Xquartz: bootstrap_look_up(): %s", bootstrap_strerror(
-                        kr));
+                    "Xquartz: bootstrap_look_up(): %s", bootstrap_strerror(kr));
             return EXIT_FAILURE;
         }
     }
@@ -298,13 +277,10 @@ main(int argc, char **argv, char **envp)
         int handoff_fd = -1;
 
         for (try = 0, try_max = 5; try < try_max; try++) {
-            if (request_fd_handoff_socket(mp,
-                                          handoff_socket_filename) !=
-                KERN_SUCCESS) {
-                asl_log(
-                    aslc, NULL, ASL_LEVEL_INFO,
-                    "Xquartz: Failed to request a socket from the server to send the $DISPLAY fd over (try %d of %d)",
-                    (int)try + 1, (int)try_max);
+            if (request_fd_handoff_socket(mp, handoff_socket_filename) != KERN_SUCCESS) {
+                asl_log(aslc, NULL, ASL_LEVEL_INFO,
+                        "Xquartz: Failed to request a socket from the server to send the $DISPLAY fd over (try %d of %d)",
+                        (int)try + 1, (int)try_max);
                 continue;
             }
 
@@ -312,16 +288,13 @@ main(int argc, char **argv, char **envp)
             if (handoff_fd == -1) {
                 asl_log(aslc, NULL, ASL_LEVEL_ERR,
                         "Xquartz: Failed to connect to socket (try %d of %d)",
-                        (int)try + 1,
-                        (int)try_max);
+                        (int)try + 1, (int)try_max);
                 continue;
             }
 
-            asl_log(
-                aslc, NULL, ASL_LEVEL_INFO,
-                "Xquartz: Handoff connection established (try %d of %d) on fd %d, \"%s\".  Sending message.",
-                (int)try + 1, (int)try_max, handoff_fd,
-                handoff_socket_filename);
+            asl_log(aslc, NULL, ASL_LEVEL_INFO,
+                    "Xquartz: Handoff connection established (try %d of %d) on fd %d, \"%s\".  Sending message.",
+                    (int)try + 1, (int)try_max, handoff_fd, handoff_socket_filename);
             send_fd_handoff(handoff_fd, launchd_fd);
             close(handoff_fd);
             break;
@@ -342,8 +315,7 @@ main(int argc, char **argv, char **envp)
         free(newargv);
         free(newenvp);
 
-        asl_log(aslc, NULL, ASL_LEVEL_ERR,
-                "Xquartz: Memory allocation failure");
+        asl_log(aslc, NULL, ASL_LEVEL_ERR, "Xquartz: Memory allocation failure");
         return EXIT_FAILURE;
     }
 
@@ -361,8 +333,7 @@ main(int argc, char **argv, char **envp)
 
     if (kr != KERN_SUCCESS) {
         asl_log(aslc, NULL, ASL_LEVEL_ERR, "Xquartz: start_x11_server: %s",
-                mach_error_string(
-                    kr));
+                mach_error_string(kr));
         return EXIT_FAILURE;
     }
     return EXIT_SUCCESS;
diff --git a/hw/xquartz/man/Makefile.in b/hw/xquartz/man/Makefile.in
index d2de993..b14658f 100644
--- a/hw/xquartz/man/Makefile.in
+++ b/hw/xquartz/man/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -105,7 +105,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -178,8 +177,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -193,6 +190,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -211,14 +210,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -235,8 +226,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -292,6 +285,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -375,7 +370,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -399,29 +393,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -459,8 +437,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -471,14 +447,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -676,7 +646,6 @@ ctags CTAGS:
 
 cscope cscopelist:
 
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/hw/xquartz/man/Xquartz.man b/hw/xquartz/man/Xquartz.man
index 0560868..643bea9 100644
--- a/hw/xquartz/man/Xquartz.man
+++ b/hw/xquartz/man/Xquartz.man
@@ -84,7 +84,7 @@ This option defaults to false and is provided only "for experts."  It updates th
 .B defaults write @bundle_id_prefix@.X11 enable_test_extensions -boolean true
 This option defaults to false and is only accessible through the command line.  Enable this option to turn on the DEC-XTRAP, RECORD, and XTEST extensions in the server.
 .TP 8
-.B defaults write @laucnd_id_prefix@.X11 scroll_in_device_direction -boolean true
+.B defaults write @bundle_id_prefix@.X11 scroll_in_device_direction -boolean true
 This option defaults to false.  Enable this option to ensure that X11 scroll events are always in the direction of the device.  This overrides the related option in the Mouse/Trackpad section of System Preferences.
 .SH OPTIONS
 .PP
diff --git a/hw/xquartz/meson.build b/hw/xquartz/meson.build
index f92fbc9..83e79ea 100644
--- a/hw/xquartz/meson.build
+++ b/hw/xquartz/meson.build
@@ -1,6 +1,47 @@
 add_languages('objc')
 
-srcs = [
+apple_applications_dir = get_option('apple-applications-dir')
+apple_application_name = get_option('apple-application-name')
+bundle_id_prefix = get_option('bundle-id-prefix')
+xquartz_sparkle_feed_url = get_option('sparkle-feed-url')
+xquartz_sparkle_public_edkey = get_option('sparkle-public-edkey')
+
+bundle_version_string = get_option('bundle-version-string') # CFBundleShortVersionString
+if bundle_version_string == 'auto'
+    bundle_version_string = meson.project_version()
+endif
+
+bundle_version = get_option('bundle-version') # CFBundleVersion
+if bundle_version == 'auto'
+    version_arr = bundle_version_string.split('.')
+    version_major = version_arr[0].to_int()
+    version_minor = version_arr[1].to_int()
+    version_tiny = version_arr[2].to_int()
+    bundle_version = '@0@.@1@.@2@'.format(version_major, version_minor, version_tiny)
+endif
+
+bundle_id_def = '-DBUNDLE_ID_PREFIX="@0@"'.format(bundle_id_prefix)
+
+bundle_root = join_paths(apple_applications_dir, apple_application_name + '.app')
+xquartz_data_dir = join_paths(get_option('prefix'), get_option('datadir'),'X11', 'XQuartz')
+
+# using sparkle update framework?
+build_sparkle = xquartz_sparkle_feed_url != '' and xquartz_sparkle_public_edkey != ''
+if build_sparkle
+    sparkle = dependency('Sparkle', method: 'extraframework')
+
+    sparkle_defs = [
+        '-DXQUARTZ_SPARKLE',
+        '-DXQUARTZ_SPARKLE_FEED_URL=@0@'.format(xquartz_sparkle_feed_url),
+        '-DXQUARTZ_SPARKLE_PUBLIC_EDKEY=@0@'.format(xquartz_sparkle_public_edkey),
+    ]
+else
+    sparkle_defs = []
+endif
+
+# libxquartz
+srcs_libxquartz = [
+    'NSUserDefaults+XQuartzDefaults.m',
     'X11Application.m',
     'X11Controller.m',
     'applewm.c',
@@ -9,32 +50,52 @@ srcs = [
     'darwinXinput.c',
     'keysym2ucs.c',
     'quartz.c',
-    'quartzCocoa.m',
     'quartzKeyboard.c',
     'quartzStartup.c',
     'quartzRandR.c',
-    'console_redirect.c',
     '../../mi/miinitext.c',
+    '../../mi/miinitext.h',
 ]
 
-executable(
-    'Xquartz',
-    srcs,
-    include_directories: inc,
-    link_with: [
-        libxserver_main,
-        libxserver,
-        libxserver_xkb_stubs,
-        libxserver_xi_stubs,
-        libxserver_glx,
-        libxserver_pseudoramix,
-    ],
-    c_args: [
-        '-DXFree86Server',
-        # XXXX: BUILD_DATE
-        '-DXSERVER_VERSION="' + meson_project.version() + '"',
-        '-DINXQUARTZ',
-        '-DUSE_NEW_CLUT',
-    ],
-    install: true,
+libxquartz_defs = [
+    '-DUSE_NEW_CLUT',
+    '-DXFree86Server',
+    '-DXQUARTZ',
+    '-DXQUARTZ_DATA_DIR="@0@"'.format(xquartz_data_dir),
+    '-DXSERVER_VERSION="@0@"'.format(meson.project_version()),
+    bundle_id_def,
+    sparkle_defs,
+]
+
+if cc.has_function('dispatch_async')
+    libxquartz_defs += '-DHAVE_LIBDISPATCH'
+endif
+
+libXquartz = static_library('Xquartz',
+    srcs_libxquartz,
+    c_args: libxquartz_defs,
+    objc_args: libxquartz_defs,
+    include_directories: [inc, '../../pseudoramiX', '../../miext/rootless', top_dir_inc],
+    dependencies: [xproto_dep, pixman_dep],
+    link_with: [libxserver_pseudoramix, libxserver_miext_rootless],
 )
+
+subdir('bundle')
+if build_glx
+    subdir('GL')
+endif
+subdir('pbproxy')
+subdir('xpr')
+subdir('mach-startup')
+
+# manpage
+xquartz_man = configure_file(
+    input: 'man/Xquartz.man',
+    output: 'Xquartz.1',
+    configuration: manpage_config,
+)
+install_man(xquartz_man)
+
+install_data('defaults.plist',
+    install_dir: xquartz_data_dir,
+    install_mode: 'rw-r--r--')
diff --git a/hw/xquartz/pbproxy/Makefile.am b/hw/xquartz/pbproxy/Makefile.am
index 9429ea2..b26b8e2 100644
--- a/hw/xquartz/pbproxy/Makefile.am
+++ b/hw/xquartz/pbproxy/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS=-DBUNDLE_ID_PREFIX=\"$(BUNDLE_ID_PREFIX)\"
+AM_CPPFLAGS=-I.. -DXQUARTZ_DATA_DIR=\"$(datadir)/X11/XQuartz\"
 
 AM_CFLAGS=$(XPBPROXY_CFLAGS)
 AM_OBJCFLAGS=$(XPBPROXY_CFLAGS)
@@ -15,7 +15,7 @@ libxpbproxy_la_LDFLAGS=$(XPBPROXY_LIBS)
 if STANDALONE_XPBPROXY
 
 bin_PROGRAMS = xpbproxy
-xpbproxy_SOURCES = app-main.m
+xpbproxy_SOURCES = app-main.m ../NSUserDefaults+XQuartzDefaults.m
 xpbproxy_LDADD = libxpbproxy.la
 xpbproxy_LDFLAGS = -Wl,-framework,Cocoa
 
diff --git a/hw/xquartz/pbproxy/Makefile.in b/hw/xquartz/pbproxy/Makefile.in
index 41cfbe5..e88fc9d 100644
--- a/hw/xquartz/pbproxy/Makefile.in
+++ b/hw/xquartz/pbproxy/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -108,7 +108,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -126,8 +125,10 @@ am__v_lt_1 =
 libxpbproxy_la_LINK = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \
 	$(LIBTOOLFLAGS) --mode=link $(OBJCLD) $(AM_OBJCFLAGS) \
 	$(OBJCFLAGS) $(libxpbproxy_la_LDFLAGS) $(LDFLAGS) -o $@
-am__xpbproxy_SOURCES_DIST = app-main.m
-@STANDALONE_XPBPROXY_TRUE@am_xpbproxy_OBJECTS = app-main.$(OBJEXT)
+am__xpbproxy_SOURCES_DIST = app-main.m \
+	../NSUserDefaults+XQuartzDefaults.m
+@STANDALONE_XPBPROXY_TRUE@am_xpbproxy_OBJECTS = app-main.$(OBJEXT) \
+@STANDALONE_XPBPROXY_TRUE@	NSUserDefaults+XQuartzDefaults.$(OBJEXT)
 xpbproxy_OBJECTS = $(am_xpbproxy_OBJECTS)
 @STANDALONE_XPBPROXY_TRUE@xpbproxy_DEPENDENCIES = libxpbproxy.la
 xpbproxy_LINK = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \
@@ -148,7 +149,8 @@ am__v_at_1 =
 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__maybe_remake_depfiles = depfiles
-am__depfiles_remade = ./$(DEPDIR)/app-main.Po ./$(DEPDIR)/main.Plo \
+am__depfiles_remade = ./$(DEPDIR)/NSUserDefaults+XQuartzDefaults.Po \
+	./$(DEPDIR)/app-main.Po ./$(DEPDIR)/main.Plo \
 	./$(DEPDIR)/trick_autotools.Plo ./$(DEPDIR)/x-input.Plo \
 	./$(DEPDIR)/x-selection.Plo
 am__mv = mv -f
@@ -209,8 +211,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
@@ -230,8 +230,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -245,6 +243,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -263,14 +263,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -287,8 +279,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -344,6 +338,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -396,7 +392,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -420,29 +415,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -480,8 +459,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -492,14 +469,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -572,7 +543,7 @@ target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-AM_CPPFLAGS = -DBUNDLE_ID_PREFIX=\"$(BUNDLE_ID_PREFIX)\" \
+AM_CPPFLAGS = -I.. -DXQUARTZ_DATA_DIR=\"$(datadir)/X11/XQuartz\" \
 	$(am__append_1)
 AM_CFLAGS = $(XPBPROXY_CFLAGS)
 AM_OBJCFLAGS = $(XPBPROXY_CFLAGS)
@@ -584,7 +555,7 @@ libxpbproxy_la_SOURCES = \
 	x-selection.m
 
 libxpbproxy_la_LDFLAGS = $(XPBPROXY_LIBS)
-@STANDALONE_XPBPROXY_TRUE@xpbproxy_SOURCES = app-main.m
+@STANDALONE_XPBPROXY_TRUE@xpbproxy_SOURCES = app-main.m ../NSUserDefaults+XQuartzDefaults.m
 @STANDALONE_XPBPROXY_TRUE@xpbproxy_LDADD = libxpbproxy.la
 @STANDALONE_XPBPROXY_TRUE@xpbproxy_LDFLAGS = -Wl,-framework,Cocoa
 EXTRA_DIST = \
@@ -698,6 +669,7 @@ mostlyclean-compile:
 distclean-compile:
 	-rm -f *.tab.c
 
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NSUserDefaults+XQuartzDefaults.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/app-main.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trick_autotools.Plo@am__quote@ # am--include-marker
@@ -752,6 +724,20 @@ am--depfiles: $(am__depfiles_remade)
 @AMDEP_TRUE@@am__fastdepOBJC_FALSE@	DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepOBJC_FALSE@	$(AM_V_OBJC@am__nodep@)$(LTOBJCCOMPILE) -c -o $@ $<
 
+NSUserDefaults+XQuartzDefaults.o: ../NSUserDefaults+XQuartzDefaults.m
+@am__fastdepOBJC_TRUE@	$(AM_V_OBJC)$(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) -MT NSUserDefaults+XQuartzDefaults.o -MD -MP -MF $(DEPDIR)/NSUserDefaults+XQuartzDefaults.Tpo -c -o NSUserDefaults+XQuartzDefaults.o `test -f '../NSUserDefaults+XQuartzDefaults.m' || echo '$(srcdir)/'`../NSUserDefaults+XQuartzDefaults.m
+@am__fastdepOBJC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/NSUserDefaults+XQuartzDefaults.Tpo $(DEPDIR)/NSUserDefaults+XQuartzDefaults.Po
+@AMDEP_TRUE@@am__fastdepOBJC_FALSE@	$(AM_V_OBJC)source='../NSUserDefaults+XQuartzDefaults.m' object='NSUserDefaults+XQuartzDefaults.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepOBJC_FALSE@	DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepOBJC_FALSE@	$(AM_V_OBJC@am__nodep@)$(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) -c -o NSUserDefaults+XQuartzDefaults.o `test -f '../NSUserDefaults+XQuartzDefaults.m' || echo '$(srcdir)/'`../NSUserDefaults+XQuartzDefaults.m
+
+NSUserDefaults+XQuartzDefaults.obj: ../NSUserDefaults+XQuartzDefaults.m
+@am__fastdepOBJC_TRUE@	$(AM_V_OBJC)$(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) -MT NSUserDefaults+XQuartzDefaults.obj -MD -MP -MF $(DEPDIR)/NSUserDefaults+XQuartzDefaults.Tpo -c -o NSUserDefaults+XQuartzDefaults.obj `if test -f '../NSUserDefaults+XQuartzDefaults.m'; then $(CYGPATH_W) '../NSUserDefaults+XQuartzDefaults.m'; else $(CYGPATH_W) '$(srcdir)/../NSUserDefaults+XQuartzDefaults.m'; fi`
+@am__fastdepOBJC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/NSUserDefaults+XQuartzDefaults.Tpo $(DEPDIR)/NSUserDefaults+XQuartzDefaults.Po
+@AMDEP_TRUE@@am__fastdepOBJC_FALSE@	$(AM_V_OBJC)source='../NSUserDefaults+XQuartzDefaults.m' object='NSUserDefaults+XQuartzDefaults.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepOBJC_FALSE@	DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepOBJC_FALSE@	$(AM_V_OBJC@am__nodep@)$(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) -c -o NSUserDefaults+XQuartzDefaults.obj `if test -f '../NSUserDefaults+XQuartzDefaults.m'; then $(CYGPATH_W) '../NSUserDefaults+XQuartzDefaults.m'; else $(CYGPATH_W) '$(srcdir)/../NSUserDefaults+XQuartzDefaults.m'; fi`
+
 mostlyclean-libtool:
 	-rm -f *.lo
 
@@ -809,7 +795,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
@@ -886,7 +871,8 @@ clean-am: clean-binPROGRAMS clean-generic clean-libtool \
 	clean-noinstLTLIBRARIES mostlyclean-am
 
 distclean: distclean-am
-		-rm -f ./$(DEPDIR)/app-main.Po
+		-rm -f ./$(DEPDIR)/NSUserDefaults+XQuartzDefaults.Po
+	-rm -f ./$(DEPDIR)/app-main.Po
 	-rm -f ./$(DEPDIR)/main.Plo
 	-rm -f ./$(DEPDIR)/trick_autotools.Plo
 	-rm -f ./$(DEPDIR)/x-input.Plo
@@ -936,7 +922,8 @@ install-ps-am:
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
-		-rm -f ./$(DEPDIR)/app-main.Po
+		-rm -f ./$(DEPDIR)/NSUserDefaults+XQuartzDefaults.Po
+	-rm -f ./$(DEPDIR)/app-main.Po
 	-rm -f ./$(DEPDIR)/main.Plo
 	-rm -f ./$(DEPDIR)/trick_autotools.Plo
 	-rm -f ./$(DEPDIR)/x-input.Plo
diff --git a/hw/xquartz/pbproxy/app-main.m b/hw/xquartz/pbproxy/app-main.m
index eda9a9e..825980c 100644
--- a/hw/xquartz/pbproxy/app-main.m
+++ b/hw/xquartz/pbproxy/app-main.m
@@ -31,13 +31,6 @@
 #include "pbproxy.h"
 #import "x-selection.h"
 
-#include <pthread.h>
-#include <unistd.h> /*for getpid*/
-#include <Cocoa/Cocoa.h>
-
-static const char *app_prefs_domain = BUNDLE_ID_PREFIX ".xpbproxy";
-CFStringRef app_prefs_domain_cfstr;
-
 /* Stubs */
 char *display = NULL;
 
@@ -82,41 +75,8 @@ xq_asl_log(int level, const char *subsystem, const char *file,
 int
 main(int argc, const char *argv[])
 {
-    const char *s;
-    int i;
-
-#ifdef DEBUG
-    ErrorF("pid: %u\n", getpid());
-#endif
-
     xpbproxy_is_standalone = YES;
 
-    if ((s = getenv("X11_PREFS_DOMAIN")))
-        app_prefs_domain = s;
-
-    for (i = 1; i < argc; i++) {
-        if (strcmp(argv[i], "--prefs-domain") == 0 && i + 1 < argc) {
-            app_prefs_domain = argv[++i];
-        }
-        else if (strcmp(argv[i], "--help") == 0) {
-            ErrorF(
-                "usage: xpbproxy OPTIONS\n"
-                "Pasteboard proxying for X11.\n\n"
-                "--prefs-domain <domain>   Change the domain used for reading preferences\n"
-                "                          (default: %s)\n",
-                app_prefs_domain);
-            return 0;
-        }
-        else {
-            ErrorF("usage: xpbproxy OPTIONS...\n"
-                   "Try 'xpbproxy --help' for more information.\n");
-            return 1;
-        }
-    }
-
-    app_prefs_domain_cfstr = CFStringCreateWithCString(NULL, app_prefs_domain,
-                                                       kCFStringEncodingUTF8);
-
     signal(SIGINT, signal_handler);
     signal(SIGTERM, signal_handler);
     signal(SIGHUP, signal_handler);
diff --git a/hw/xquartz/pbproxy/meson.build b/hw/xquartz/pbproxy/meson.build
new file mode 100644
index 0000000..206cbdc
--- /dev/null
+++ b/hw/xquartz/pbproxy/meson.build
@@ -0,0 +1,34 @@
+build_standalone_pbproxy = get_option('xpbproxy')
+
+pbproxy_defs = [
+    '-DXQUARTZ_DATA_DIR="@0@"'.format(xquartz_data_dir),
+    bundle_id_def
+]
+if build_standalone_pbproxy
+    pbproxy_defs += ['-DSTANDALONE_XPBPROXY']
+endif
+
+libapplewm_dep = dependency('applewm', version: '>=1.4')
+
+libxpbproxy = static_library('xpbproxy',
+    ['../NSUserDefaults+XQuartzDefaults.m',
+     'main.m',
+     'x-input.m',
+     'x-selection.m'],
+    include_directories: ['..'],
+    dependencies: [applewmproto_dep, libapplewm_dep, dependency('xfixes'), dependency('x11')],
+    objc_args: pbproxy_defs,
+)
+
+cocoa = dependency('Cocoa', method: 'extraframework')
+
+# standalone xpbproxy
+if build_standalone_pbproxy
+    executable('xpbproxy',
+        'app-main.m',
+        link_with: libxpbproxy,
+        dependencies: [cocoa, dependency('x11')],
+        objc_args: pbproxy_defs,
+        install: true,
+    )
+endif
diff --git a/hw/xquartz/pbproxy/x-selection.m b/hw/xquartz/pbproxy/x-selection.m
index 21b5b31..f4f2b9a 100644
--- a/hw/xquartz/pbproxy/x-selection.m
+++ b/hw/xquartz/pbproxy/x-selection.m
@@ -38,6 +38,8 @@
 #import <AppKit/NSImage.h>
 #import <AppKit/NSBitmapImageRep.h>
 
+#import "NSUserDefaults+XQuartzDefaults.h"
+
 /*
  * The basic design of the pbproxy code is as follows.
  *
@@ -99,18 +101,6 @@ dump_prefs()
 }
 #endif
 
-extern CFStringRef app_prefs_domain_cfstr;
-
-static BOOL
-prefs_get_bool(CFStringRef key, BOOL defaultValue)
-{
-    Boolean value, ok;
-
-    value = CFPreferencesGetAppBooleanValue(key, app_prefs_domain_cfstr, &ok);
-
-    return ok ? (BOOL)value : defaultValue;
-}
-
 static void
 init_propdata(struct propdata *pdata)
 {
@@ -1394,35 +1384,18 @@ get_property(Window win, Atom property, struct propdata *pdata, Bool delete,
 
 - (void) reload_preferences
 {
-    /*
-     * It's uncertain how we could handle the synchronization failing, so cast to void.
-     * The prefs_get_bool should fall back to defaults if the org.x.X11 plist doesn't exist or is invalid.
-     */
-    (void)CFPreferencesAppSynchronize(app_prefs_domain_cfstr);
+    NSUserDefaults * const defaults = NSUserDefaults.xquartzDefaults;
+
 #ifdef STANDALONE_XPBPROXY
     if (xpbproxy_is_standalone)
         pbproxy_prefs.active = YES;
     else
 #endif
-    pbproxy_prefs.active = prefs_get_bool(CFSTR(
-                                              "sync_pasteboard"),
-                                          pbproxy_prefs.active);
-    pbproxy_prefs.primary_on_grab =
-        prefs_get_bool(CFSTR(
-                           "sync_primary_on_select"),
-                       pbproxy_prefs.primary_on_grab);
-    pbproxy_prefs.clipboard_to_pasteboard =
-        prefs_get_bool(CFSTR(
-                           "sync_clipboard_to_pasteboard"),
-                       pbproxy_prefs.clipboard_to_pasteboard);
-    pbproxy_prefs.pasteboard_to_primary =
-        prefs_get_bool(CFSTR(
-                           "sync_pasteboard_to_primary"),
-                       pbproxy_prefs.pasteboard_to_primary);
-    pbproxy_prefs.pasteboard_to_clipboard =
-        prefs_get_bool(CFSTR(
-                           "sync_pasteboard_to_clipboard"),
-                       pbproxy_prefs.pasteboard_to_clipboard);
+    pbproxy_prefs.active = [defaults boolForKey:XQuartzPrefKeySyncPasteboard];
+    pbproxy_prefs.primary_on_grab = [defaults boolForKey:XQuartzPrefKeySyncPrimaryOnSelect];
+    pbproxy_prefs.clipboard_to_pasteboard = [defaults boolForKey:XQuartzPrefKeySyncClipboardToPasteBoard];
+    pbproxy_prefs.pasteboard_to_primary = [defaults boolForKey:XQuartzPrefKeySyncPasteboardToPrimary];
+    pbproxy_prefs.pasteboard_to_clipboard = [defaults boolForKey:XQuartzPrefKeySyncPasteboardToClipboard];
 
     /* This is used for debugging. */
     //dump_prefs();
diff --git a/hw/xquartz/quartz.c b/hw/xquartz/quartz.c
index 233570a..4bbe56b 100644
--- a/hw/xquartz/quartz.c
+++ b/hw/xquartz/quartz.c
@@ -85,14 +85,16 @@ int aquaMenuBarHeight = 0;
 QuartzModeProcsPtr quartzProcs = NULL;
 const char             *quartzOpenGLBundle = NULL;
 
-Bool XQuartzFullscreenDisableHotkeys = TRUE;
-Bool XQuartzOptionSendsAlt = FALSE;
-Bool XQuartzEnableKeyEquivalents = TRUE;
+/* These are initialized by X11Application with default values set in NSUserDefaults+XQuartzDefaults */
+Bool XQuartzFullscreenDisableHotkeys;
+Bool XQuartzOptionSendsAlt;
+Bool XQuartzEnableKeyEquivalents;
+Bool XQuartzFullscreenMenu;
+Bool XQuartzRootlessDefault;
+
 Bool XQuartzFullscreenVisible = FALSE;
-Bool XQuartzRootlessDefault = TRUE;
 Bool XQuartzIsRootless = TRUE;
 Bool XQuartzServerVisible = FALSE;
-Bool XQuartzFullscreenMenu = FALSE;
 
 int32_t XQuartzShieldingWindowLevel = 0;
 
diff --git a/hw/xquartz/quartzKeyboard.c b/hw/xquartz/quartzKeyboard.c
index 1399da7..c35a2d1 100644
--- a/hw/xquartz/quartzKeyboard.c
+++ b/hw/xquartz/quartzKeyboard.c
@@ -732,17 +732,6 @@ DarwinModifierStringToNXMask(const char *str, int separatelr)
     return 0;
 }
 
-/*
- * LegalModifier
- *      This allows the ddx layer to prevent some keys from being remapped
- *      as modifier keys.
- */
-Bool
-LegalModifier(unsigned int key, DeviceIntPtr pDev)
-{
-    return 1;
-}
-
 static KeySym
 make_dead_key(KeySym in)
 {
diff --git a/hw/xquartz/xpr/Makefile.in b/hw/xquartz/xpr/Makefile.in
index bd01b3c..66bfb07 100644
--- a/hw/xquartz/xpr/Makefile.in
+++ b/hw/xquartz/xpr/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -105,7 +105,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -183,8 +182,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
@@ -204,8 +201,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -219,6 +214,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -237,14 +234,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -261,8 +250,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -318,6 +309,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -370,7 +363,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -394,29 +386,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -454,8 +430,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -466,14 +440,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -729,7 +697,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/hw/xquartz/xpr/appledristr.h b/hw/xquartz/xpr/appledristr.h
index 71346c4..341d72b 100644
--- a/hw/xquartz/xpr/appledristr.h
+++ b/hw/xquartz/xpr/appledristr.h
@@ -50,126 +50,126 @@
 typedef struct _AppleDRIQueryVersion {
     CARD8 reqType;               /* always DRIReqCode */
     CARD8 driReqType;            /* always X_DRIQueryVersion */
-    CARD16 length B16;
+    CARD16 length;
 } xAppleDRIQueryVersionReq;
 #define sz_xAppleDRIQueryVersionReq 4
 
 typedef struct {
     BYTE type;                   /* X_Reply */
     BOOL pad1;
-    CARD16 sequenceNumber B16;
-    CARD32 length B32;
-    CARD16 majorVersion B16;     /* major version of DRI protocol */
-    CARD16 minorVersion B16;     /* minor version of DRI protocol */
-    CARD32 patchVersion B32;     /* patch version of DRI protocol */
-    CARD32 pad3 B32;
-    CARD32 pad4 B32;
-    CARD32 pad5 B32;
-    CARD32 pad6 B32;
+    CARD16 sequenceNumber;
+    CARD32 length;
+    CARD16 majorVersion;         /* major version of DRI protocol */
+    CARD16 minorVersion;         /* minor version of DRI protocol */
+    CARD32 patchVersion;         /* patch version of DRI protocol */
+    CARD32 pad3;
+    CARD32 pad4;
+    CARD32 pad5;
+    CARD32 pad6;
 } xAppleDRIQueryVersionReply;
 #define sz_xAppleDRIQueryVersionReply 32
 
 typedef struct _AppleDRIQueryDirectRenderingCapable {
     CARD8 reqType;               /* always DRIReqCode */
     CARD8 driReqType;            /* X_DRIQueryDirectRenderingCapable */
-    CARD16 length B16;
-    CARD32 screen B32;
+    CARD16 length;
+    CARD32 screen;
 } xAppleDRIQueryDirectRenderingCapableReq;
 #define sz_xAppleDRIQueryDirectRenderingCapableReq 8
 
 typedef struct {
     BYTE type;                   /* X_Reply */
     BOOL pad1;
-    CARD16 sequenceNumber B16;
-    CARD32 length B32;
+    CARD16 sequenceNumber;
+    CARD32 length;
     BOOL isCapable;
     BOOL pad2;
     BOOL pad3;
     BOOL pad4;
-    CARD32 pad5 B32;
-    CARD32 pad6 B32;
-    CARD32 pad7 B32;
-    CARD32 pad8 B32;
-    CARD32 pad9 B32;
+    CARD32 pad5;
+    CARD32 pad6;
+    CARD32 pad7;
+    CARD32 pad8;
+    CARD32 pad9;
 } xAppleDRIQueryDirectRenderingCapableReply;
 #define sz_xAppleDRIQueryDirectRenderingCapableReply 32
 
 typedef struct _AppleDRIAuthConnection {
     CARD8 reqType;               /* always DRIReqCode */
     CARD8 driReqType;            /* always X_DRICloseConnection */
-    CARD16 length B16;
-    CARD32 screen B32;
-    CARD32 magic B32;
+    CARD16 length;
+    CARD32 screen;
+    CARD32 magic;
 } xAppleDRIAuthConnectionReq;
 #define sz_xAppleDRIAuthConnectionReq 12
 
 typedef struct {
     BYTE type;
     BOOL pad1;
-    CARD16 sequenceNumber B16;
-    CARD32 length B32;
-    CARD32 authenticated B32;
-    CARD32 pad2 B32;
-    CARD32 pad3 B32;
-    CARD32 pad4 B32;
-    CARD32 pad5 B32;
-    CARD32 pad6 B32;
+    CARD16 sequenceNumber;
+    CARD32 length;
+    CARD32 authenticated;
+    CARD32 pad2;
+    CARD32 pad3;
+    CARD32 pad4;
+    CARD32 pad5;
+    CARD32 pad6;
 } xAppleDRIAuthConnectionReply;
 #define zx_xAppleDRIAuthConnectionReply 32
 
 typedef struct _AppleDRICreateSurface {
     CARD8 reqType;               /* always DRIReqCode */
     CARD8 driReqType;            /* always X_DRICreateSurface */
-    CARD16 length B16;
-    CARD32 screen B32;
-    CARD32 drawable B32;
-    CARD32 client_id B32;
+    CARD16 length;
+    CARD32 screen;
+    CARD32 drawable;
+    CARD32 client_id;
 } xAppleDRICreateSurfaceReq;
 #define sz_xAppleDRICreateSurfaceReq 16
 
 typedef struct {
     BYTE type;                   /* X_Reply */
     BOOL pad1;
-    CARD16 sequenceNumber B16;
-    CARD32 length B32;
-    CARD32 key_0 B32;
-    CARD32 key_1 B32;
-    CARD32 uid B32;
-    CARD32 pad4 B32;
-    CARD32 pad5 B32;
-    CARD32 pad6 B32;
+    CARD16 sequenceNumber;
+    CARD32 length;
+    CARD32 key_0;
+    CARD32 key_1;
+    CARD32 uid;
+    CARD32 pad4;
+    CARD32 pad5;
+    CARD32 pad6;
 } xAppleDRICreateSurfaceReply;
 #define sz_xAppleDRICreateSurfaceReply 32
 
 typedef struct _AppleDRIDestroySurface {
     CARD8 reqType;               /* always DRIReqCode */
     CARD8 driReqType;            /* always X_DRIDestroySurface */
-    CARD16 length B16;
-    CARD32 screen B32;
-    CARD32 drawable B32;
+    CARD16 length;
+    CARD32 screen;
+    CARD32 drawable;
 } xAppleDRIDestroySurfaceReq;
 #define sz_xAppleDRIDestroySurfaceReq 12
 
 typedef struct _AppleDRINotify {
     BYTE type;                   /* always eventBase + event type */
     BYTE kind;
-    CARD16 sequenceNumber B16;
-    CARD32 time B32;             /* time of change */
-    CARD32 pad1 B32;
-    CARD32 arg B32;
-    CARD32 pad3 B32;
-    CARD32 pad4 B32;
-    CARD32 pad5 B32;
-    CARD32 pad6 B32;
+    CARD16 sequenceNumber;
+    CARD32 time;                 /* time of change */
+    CARD32 pad1;
+    CARD32 arg;
+    CARD32 pad3;
+    CARD32 pad4;
+    CARD32 pad5;
+    CARD32 pad6;
 } xAppleDRINotifyEvent;
 #define sz_xAppleDRINotifyEvent 32
 
 typedef struct {
     CARD8 reqType;
     CARD8 driReqType;
-    CARD16 length B16;
-    CARD32 screen B32;
-    CARD32 drawable B32;
+    CARD16 length;
+    CARD32 screen;
+    CARD32 drawable;
     BOOL doubleSwap;
     CARD8 pad1, pad2, pad3;
 } xAppleDRICreateSharedBufferReq;
@@ -179,14 +179,14 @@ typedef struct {
 typedef struct {
     BYTE type;
     BYTE data1;
-    CARD16 sequenceNumber B16;
-    CARD32 length B32;
-    CARD32 stringLength B32;     /* 0 on error */
-    CARD32 width B32;
-    CARD32 height B32;
-    CARD32 pad1 B32;
-    CARD32 pad2 B32;
-    CARD32 pad3 B32;
+    CARD16 sequenceNumber;
+    CARD32 length;
+    CARD32 stringLength;         /* 0 on error */
+    CARD32 width;
+    CARD32 height;
+    CARD32 pad1;
+    CARD32 pad2;
+    CARD32 pad3;
 } xAppleDRICreateSharedBufferReply;
 
 #define sz_xAppleDRICreateSharedBufferReply 32
@@ -194,9 +194,9 @@ typedef struct {
 typedef struct {
     CARD8 reqType;
     CARD8 driReqType;
-    CARD16 length B16;
-    CARD32 screen B32;
-    CARD32 drawable B32;
+    CARD16 length;
+    CARD32 screen;
+    CARD32 drawable;
 } xAppleDRISwapBuffersReq;
 
 #define sz_xAppleDRISwapBuffersReq 12
@@ -204,9 +204,9 @@ typedef struct {
 typedef struct {
     CARD8 reqType;               /*1 */
     CARD8 driReqType;            /*2 */
-    CARD16 length B16;           /*4 */
-    CARD32 screen B32;           /*8 */
-    CARD32 drawable B32;         /*12 */
+    CARD16 length;               /*4 */
+    CARD32 screen;               /*8 */
+    CARD32 drawable;             /*12 */
 } xAppleDRICreatePixmapReq;
 
 #define sz_xAppleDRICreatePixmapReq 12
@@ -214,14 +214,14 @@ typedef struct {
 typedef struct {
     BYTE type;                   /*1 */
     BOOL pad1;                   /*2 */
-    CARD16 sequenceNumber B16;   /*4 */
-    CARD32 length B32;           /*8 */
-    CARD32 width B32;            /*12 */
-    CARD32 height B32;           /*16 */
-    CARD32 pitch B32;            /*20 */
-    CARD32 bpp B32;              /*24 */
-    CARD32 size B32;             /*28 */
-    CARD32 stringLength B32;     /*32 */
+    CARD16 sequenceNumber;       /*4 */
+    CARD32 length;               /*8 */
+    CARD32 width;                /*12 */
+    CARD32 height;               /*16 */
+    CARD32 pitch;                /*20 */
+    CARD32 bpp;                  /*24 */
+    CARD32 size;                 /*28 */
+    CARD32 stringLength;         /*32 */
 } xAppleDRICreatePixmapReply;
 
 #define sz_xAppleDRICreatePixmapReply 32
@@ -229,8 +229,8 @@ typedef struct {
 typedef struct {
     CARD8 reqType;               /*1 */
     CARD8 driReqType;            /*2 */
-    CARD16 length B16;           /*4 */
-    CARD32 drawable B32;         /*8 */
+    CARD16 length;               /*4 */
+    CARD32 drawable;             /*8 */
 } xAppleDRIDestroyPixmapReq;
 
 #define sz_xAppleDRIDestroyPixmapReq 8
diff --git a/hw/xquartz/xpr/meson.build b/hw/xquartz/xpr/meson.build
new file mode 100644
index 0000000..590727f
--- /dev/null
+++ b/hw/xquartz/xpr/meson.build
@@ -0,0 +1,18 @@
+libXquartzXpr = static_library('XquartzXpr',
+    [
+     'appledri.c',
+     'dri.c',
+     'driWrap.c',
+     'xprAppleWM.c',
+     'xprCursor.c',
+     'xprEvent.c',
+     'xprFrame.c',
+     'xprScreen.c',
+     'x-hash.c',
+     'x-hook.c',
+     'x-list.c',
+    ],
+    include_directories: [inc, '..', '../../../pseudoramiX', '../../../miext/rootless'],
+    c_args: [bundle_id_def, '-DXQUARTZ'],
+    dependencies: [xproto_dep, pixman_dep],
+)
diff --git a/hw/xquartz/xpr/x-list.c b/hw/xquartz/xpr/x-list.c
index 29543d4..1716576 100644
--- a/hw/xquartz/xpr/x-list.c
+++ b/hw/xquartz/xpr/x-list.c
@@ -281,7 +281,8 @@ list_sort_1(x_list *lst, int length,
 
     /* Then merge them back together. */
 
-    assert(lst != NULL && mid != NULL);
+    assert(lst != NULL);
+    assert(mid != NULL);
 
     if ((*less)(mid->data, lst->data))
         out = out_head = mid, mid = mid->next;
diff --git a/hw/xquartz/xpr/xprCursor.c b/hw/xquartz/xpr/xprCursor.c
index 5e89348..ff6cf4d 100644
--- a/hw/xquartz/xpr/xprCursor.c
+++ b/hw/xquartz/xpr/xprCursor.c
@@ -380,7 +380,9 @@ QuartzInitCursor(ScreenPtr pScreen)
  */
 void
 QuartzSuspendXCursor(ScreenPtr pScreen)
-{}
+{
+    xp_show_cursor();
+}
 
 /*
  * QuartzResumeXCursor
diff --git a/hw/xquartz/xpr/xprFrame.c b/hw/xquartz/xpr/xprFrame.c
index ba84548..57d16d4 100644
--- a/hw/xquartz/xpr/xprFrame.c
+++ b/hw/xquartz/xpr/xprFrame.c
@@ -45,10 +45,6 @@
 
 #include <dispatch/dispatch.h>
 
-#ifdef DEBUG_XP_LOCK_WINDOW
-#include <execinfo.h>
-#endif
-
 #define DEFINE_ATOM_HELPER(func, atom_name)                      \
     static Atom func(void) {                                       \
         static int generation;                                      \
@@ -353,15 +349,8 @@ xprStartDrawing(RootlessFrameID wid, char **pixelData, int *bytesPerRow)
     xp_error err;
 
 #ifdef DEBUG_XP_LOCK_WINDOW
-    void* callstack[128];
-    int i, frames = backtrace(callstack, 128);
-    char** strs = backtrace_symbols(callstack, frames);
-
     ErrorF("=== LOCK %d ===\n", (int)x_cvt_vptr_to_uint(wid));
-    for (i = 0; i < frames; ++i) {
-        ErrorF("    %s\n", strs[i]);
-    }
-    free(strs);
+    xorg_backtrace();
 #endif
 
     err = xp_lock_window(x_cvt_vptr_to_uint(
@@ -371,6 +360,10 @@ xprStartDrawing(RootlessFrameID wid, char **pixelData, int *bytesPerRow)
                    (int)x_cvt_vptr_to_uint(
                        wid), (int)err);
 
+#ifdef DEBUG_XP_LOCK_WINDOW
+    ErrorF("  bits: %p\n", *data);
+#endif
+
     *pixelData = data[0];
     *bytesPerRow = rowbytes[0];
 }
@@ -384,15 +377,8 @@ xprStopDrawing(RootlessFrameID wid, Bool flush)
     xp_error err;
 
 #ifdef DEBUG_XP_LOCK_WINDOW
-    void* callstack[128];
-    int i, frames = backtrace(callstack, 128);
-    char** strs = backtrace_symbols(callstack, frames);
-
     ErrorF("=== UNLOCK %d ===\n", (int)x_cvt_vptr_to_uint(wid));
-    for (i = 0; i < frames; ++i) {
-        ErrorF("    %s\n", strs[i]);
-    }
-    free(strs);
+    xorg_backtrace();
 #endif
 
     err = xp_unlock_window(x_cvt_vptr_to_uint(wid), flush);
diff --git a/hw/xquartz/xpr/xprScreen.c b/hw/xquartz/xpr/xprScreen.c
index 270d6eb..562d6a0 100644
--- a/hw/xquartz/xpr/xprScreen.c
+++ b/hw/xquartz/xpr/xprScreen.c
@@ -281,10 +281,12 @@ xprDisplayInit(void)
     /* With PseudoramiX, the X server only sees one screen; only PseudoramiX
        itself knows about all of the screens. */
 
-    if (noPseudoramiXExtension)
+    if (noPseudoramiXExtension) {
         darwinScreensFound = displayCount;
-    else
+    } else {
+        PseudoramiXExtensionInit();
         darwinScreensFound = 1;
+    }
 
     if (xp_init(XP_BACKGROUND_EVENTS | XP_NO_DEFERRED_UPDATES) != Success)
         FatalError("Could not initialize the Xplugin library.");
diff --git a/hw/xwayland/Makefile.am b/hw/xwayland/Makefile.am
deleted file mode 100644
index bc1cb85..0000000
--- a/hw/xwayland/Makefile.am
+++ /dev/null
@@ -1,137 +0,0 @@
-bin_PROGRAMS = Xwayland
-
-Xwayland_CFLAGS =				\
-	-I$(top_srcdir)/glamor			\
-	-I$(top_srcdir)/dri3			\
-	-DHAVE_DIX_CONFIG_H			\
-	$(XWAYLANDMODULES_CFLAGS)		\
-	$(DIX_CFLAGS)				\
-	$(GLAMOR_CFLAGS)			\
-	$(GBM_CFLAGS)
-
-Xwayland_SOURCES =				\
-	xwayland.c				\
-	xwayland-input.c			\
-	xwayland-cursor.c			\
-	xwayland-shm.c				\
-	xwayland-output.c			\
-	xwayland-cvt.c				\
-	xwayland-vidmode.c			\
-	xwayland.h				\
-	$(top_srcdir)/Xi/stubs.c		\
-	$(top_srcdir)/mi/miinitext.c
-
-Xwayland_LDADD =				\
-	$(glamor_lib)				\
-	$(XWAYLAND_LIBS)			\
-	$(top_builddir)/glx/libglxvnd.la	\
-	$(XWAYLAND_SYS_LIBS)			\
-	$(top_builddir)/Xext/libXvidmode.la	\
-	$(XSERVER_SYS_LIBS)
-Xwayland_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
-
-Xwayland_built_sources =
-
-if GLAMOR_EGL
-Xwayland_SOURCES += 				\
-	xwayland-glamor.c			\
-	xwayland-glamor-gbm.c			\
-	xwayland-present.c
-if XV
-Xwayland_SOURCES += 				\
-	xwayland-glamor-xv.c
-endif
-
-if XWAYLAND_EGLSTREAM
-Xwayland_SOURCES +=				\
-	xwayland-glamor-eglstream.c
-endif
-
-glamor_built_sources =				\
-	drm-client-protocol.h			\
-	drm-protocol.c
-
-Xwayland_built_sources += $(glamor_built_sources)
-
-glamor_lib = $(top_builddir)/glamor/libglamor.la
-
-Xwayland_LDADD += $(GLAMOR_LIBS) $(GBM_LIBS) -lEGL -lGL
-Xwayland_DEPENDENCIES = $(glamor_lib) $(XWAYLAND_LIBS)
-endif
-
-Xwayland_built_sources +=					\
-	relative-pointer-unstable-v1-client-protocol.h		\
-	relative-pointer-unstable-v1-protocol.c			\
-	pointer-constraints-unstable-v1-client-protocol.h	\
-	pointer-constraints-unstable-v1-protocol.c		\
-	tablet-unstable-v2-client-protocol.h			\
-	tablet-unstable-v2-protocol.c				\
-	xwayland-keyboard-grab-unstable-v1-protocol.c		\
-	xwayland-keyboard-grab-unstable-v1-client-protocol.h	\
-	xdg-output-unstable-v1-protocol.c			\
-	xdg-output-unstable-v1-client-protocol.h		\
-	linux-dmabuf-unstable-v1-client-protocol.h		\
-	linux-dmabuf-unstable-v1-protocol.c
-
-if XWAYLAND_EGLSTREAM
-Xwayland_built_sources +=					\
-	wayland-eglstream-client-protocol.h			\
-	wayland-eglstream-protocol.c				\
-	wayland-eglstream-controller-client-protocol.h		\
-	wayland-eglstream-controller-protocol.c
-endif
-
-nodist_Xwayland_SOURCES = $(Xwayland_built_sources)
-CLEANFILES = $(Xwayland_built_sources)
-
-EXTRA_DIST = drm.xml
-
-$(Xwayland_SOURCES): $(Xwayland_built_sources)
-
-relink:
-	$(AM_V_at)rm -f Xwayland$(EXEEXT) && $(MAKE) Xwayland$(EXEEXT)
-
-relative-pointer-unstable-v1-protocol.c : $(WAYLAND_PROTOCOLS_DATADIR)/unstable/relative-pointer/relative-pointer-unstable-v1.xml
-	$(AM_V_GEN)$(WAYLAND_SCANNER) @SCANNER_ARG@ < $< > $@
-relative-pointer-unstable-v1-client-protocol.h : $(WAYLAND_PROTOCOLS_DATADIR)/unstable/relative-pointer/relative-pointer-unstable-v1.xml
-	$(AM_V_GEN)$(WAYLAND_SCANNER) client-header < $< > $@
-
-pointer-constraints-unstable-v1-protocol.c : $(WAYLAND_PROTOCOLS_DATADIR)/unstable/pointer-constraints/pointer-constraints-unstable-v1.xml
-	$(AM_V_GEN)$(WAYLAND_SCANNER) @SCANNER_ARG@ < $< > $@
-pointer-constraints-unstable-v1-client-protocol.h : $(WAYLAND_PROTOCOLS_DATADIR)/unstable/pointer-constraints/pointer-constraints-unstable-v1.xml
-	$(AM_V_GEN)$(WAYLAND_SCANNER) client-header < $< > $@
-
-tablet-unstable-v2-protocol.c: $(WAYLAND_PROTOCOLS_DATADIR)/unstable/tablet/tablet-unstable-v2.xml
-	$(AM_V_GEN)$(WAYLAND_SCANNER) @SCANNER_ARG@ < $< > $@
-tablet-unstable-v2-client-protocol.h: $(WAYLAND_PROTOCOLS_DATADIR)/unstable/tablet/tablet-unstable-v2.xml
-	$(AM_V_GEN)$(WAYLAND_SCANNER) client-header < $< > $@
-
-xwayland-keyboard-grab-unstable-v1-protocol.c : $(WAYLAND_PROTOCOLS_DATADIR)/unstable/xwayland-keyboard-grab/xwayland-keyboard-grab-unstable-v1.xml
-	$(AM_V_GEN)$(WAYLAND_SCANNER) @SCANNER_ARG@ < $< > $@
-xwayland-keyboard-grab-unstable-v1-client-protocol.h : $(WAYLAND_PROTOCOLS_DATADIR)/unstable/xwayland-keyboard-grab/xwayland-keyboard-grab-unstable-v1.xml
-	$(AM_V_GEN)$(WAYLAND_SCANNER) client-header < $< > $@
-xdg-output-unstable-v1-protocol.c : $(WAYLAND_PROTOCOLS_DATADIR)/unstable/xdg-output/xdg-output-unstable-v1.xml
-	$(AM_V_GEN)$(WAYLAND_SCANNER) @SCANNER_ARG@ < $< > $@
-xdg-output-unstable-v1-client-protocol.h : $(WAYLAND_PROTOCOLS_DATADIR)/unstable/xdg-output/xdg-output-unstable-v1.xml
-	$(AM_V_GEN)$(WAYLAND_SCANNER) client-header < $< > $@
-
-linux-dmabuf-unstable-v1-protocol.c : $(WAYLAND_PROTOCOLS_DATADIR)/unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml
-	$(AM_V_GEN)$(WAYLAND_SCANNER) @SCANNER_ARG@ < $< > $@
-linux-dmabuf-unstable-v1-client-protocol.h : $(WAYLAND_PROTOCOLS_DATADIR)/unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml
-	$(AM_V_GEN)$(WAYLAND_SCANNER) client-header < $< > $@
-
-wayland-eglstream-client-protocol.h : $(WAYLAND_EGLSTREAM_DATADIR)/wayland-eglstream.xml
-	$(AM_V_GEN)$(WAYLAND_SCANNER) client-header < $< > $@
-wayland-eglstream-controller-client-protocol.h : $(WAYLAND_EGLSTREAM_DATADIR)/wayland-eglstream-controller.xml
-	$(AM_V_GEN)$(WAYLAND_SCANNER) client-header < $< > $@
-
-wayland-eglstream-protocol.c : $(WAYLAND_EGLSTREAM_DATADIR)/wayland-eglstream.xml
-	$(AM_V_GEN)$(WAYLAND_SCANNER) code < $< > $@
-wayland-eglstream-controller-protocol.c : $(WAYLAND_EGLSTREAM_DATADIR)/wayland-eglstream-controller.xml
-	$(AM_V_GEN)$(WAYLAND_SCANNER) code < $< > $@
-
-%-protocol.c : %.xml
-	$(AM_V_GEN)$(WAYLAND_SCANNER) @SCANNER_ARG@ < $< > $@
-
-%-client-protocol.h : %.xml
-	$(AM_V_GEN)$(WAYLAND_SCANNER) client-header < $< > $@
diff --git a/hw/xwayland/Makefile.in b/hw/xwayland/Makefile.in
deleted file mode 100644
index cabd6b9..0000000
--- a/hw/xwayland/Makefile.in
+++ /dev/null
@@ -1,1449 +0,0 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
-
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-VPATH = @srcdir@
-am__is_gnu_make = { \
-  if test -z '$(MAKELEVEL)'; then \
-    false; \
-  elif test -n '$(MAKE_HOST)'; then \
-    true; \
-  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
-    true; \
-  else \
-    false; \
-  fi; \
-}
-am__make_running_with_option = \
-  case $${target_option-} in \
-      ?) ;; \
-      *) echo "am__make_running_with_option: internal error: invalid" \
-              "target option '$${target_option-}' specified" >&2; \
-         exit 1;; \
-  esac; \
-  has_opt=no; \
-  sane_makeflags=$$MAKEFLAGS; \
-  if $(am__is_gnu_make); then \
-    sane_makeflags=$$MFLAGS; \
-  else \
-    case $$MAKEFLAGS in \
-      *\\[\ \	]*) \
-        bs=\\; \
-        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
-          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
-    esac; \
-  fi; \
-  skip_next=no; \
-  strip_trailopt () \
-  { \
-    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
-  }; \
-  for flg in $$sane_makeflags; do \
-    test $$skip_next = yes && { skip_next=no; continue; }; \
-    case $$flg in \
-      *=*|--*) continue;; \
-        -*I) strip_trailopt 'I'; skip_next=yes;; \
-      -*I?*) strip_trailopt 'I';; \
-        -*O) strip_trailopt 'O'; skip_next=yes;; \
-      -*O?*) strip_trailopt 'O';; \
-        -*l) strip_trailopt 'l'; skip_next=yes;; \
-      -*l?*) strip_trailopt 'l';; \
-      -[dEDm]) skip_next=yes;; \
-      -[JT]) skip_next=yes;; \
-    esac; \
-    case $$flg in \
-      *$$target_option*) has_opt=yes; break;; \
-    esac; \
-  done; \
-  test $$has_opt = yes
-am__make_dryrun = (target_option=n; $(am__make_running_with_option))
-am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-bin_PROGRAMS = Xwayland$(EXEEXT)
-@GLAMOR_EGL_TRUE@am__append_1 = \
-@GLAMOR_EGL_TRUE@	xwayland-glamor.c			\
-@GLAMOR_EGL_TRUE@	xwayland-glamor-gbm.c			\
-@GLAMOR_EGL_TRUE@	xwayland-present.c
-
-@GLAMOR_EGL_TRUE@@XV_TRUE@am__append_2 = \
-@GLAMOR_EGL_TRUE@@XV_TRUE@	xwayland-glamor-xv.c
-
-@GLAMOR_EGL_TRUE@@XWAYLAND_EGLSTREAM_TRUE@am__append_3 = \
-@GLAMOR_EGL_TRUE@@XWAYLAND_EGLSTREAM_TRUE@	xwayland-glamor-eglstream.c
-
-@GLAMOR_EGL_TRUE@am__append_4 = $(glamor_built_sources)
-@GLAMOR_EGL_TRUE@am__append_5 = $(GLAMOR_LIBS) $(GBM_LIBS) -lEGL -lGL
-@GLAMOR_EGL_FALSE@Xwayland_DEPENDENCIES = $(glamor_lib) \
-@GLAMOR_EGL_FALSE@	$(am__DEPENDENCIES_1) \
-@GLAMOR_EGL_FALSE@	$(top_builddir)/glx/libglxvnd.la \
-@GLAMOR_EGL_FALSE@	$(am__DEPENDENCIES_1) \
-@GLAMOR_EGL_FALSE@	$(top_builddir)/Xext/libXvidmode.la \
-@GLAMOR_EGL_FALSE@	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
-@XWAYLAND_EGLSTREAM_TRUE@am__append_6 = \
-@XWAYLAND_EGLSTREAM_TRUE@	wayland-eglstream-client-protocol.h			\
-@XWAYLAND_EGLSTREAM_TRUE@	wayland-eglstream-protocol.c				\
-@XWAYLAND_EGLSTREAM_TRUE@	wayland-eglstream-controller-client-protocol.h		\
-@XWAYLAND_EGLSTREAM_TRUE@	wayland-eglstream-controller-protocol.c
-
-subdir = hw/xwayland
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \
-	$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \
-	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
-	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
-	$(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-	$(ACLOCAL_M4)
-DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
-	$(top_builddir)/include/xorg-server.h \
-	$(top_builddir)/include/dix-config.h \
-	$(top_builddir)/include/xorg-config.h \
-	$(top_builddir)/include/xkb-config.h \
-	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
-	$(top_builddir)/include/version-config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-am__installdirs = "$(DESTDIR)$(bindir)"
-PROGRAMS = $(bin_PROGRAMS)
-am__Xwayland_SOURCES_DIST = xwayland.c xwayland-input.c \
-	xwayland-cursor.c xwayland-shm.c xwayland-output.c \
-	xwayland-cvt.c xwayland-vidmode.c xwayland.h \
-	$(top_srcdir)/Xi/stubs.c $(top_srcdir)/mi/miinitext.c \
-	xwayland-glamor.c xwayland-glamor-gbm.c xwayland-present.c \
-	xwayland-glamor-xv.c xwayland-glamor-eglstream.c
-@GLAMOR_EGL_TRUE@am__objects_1 = Xwayland-xwayland-glamor.$(OBJEXT) \
-@GLAMOR_EGL_TRUE@	Xwayland-xwayland-glamor-gbm.$(OBJEXT) \
-@GLAMOR_EGL_TRUE@	Xwayland-xwayland-present.$(OBJEXT)
-@GLAMOR_EGL_TRUE@@XV_TRUE@am__objects_2 = Xwayland-xwayland-glamor-xv.$(OBJEXT)
-@GLAMOR_EGL_TRUE@@XWAYLAND_EGLSTREAM_TRUE@am__objects_3 = Xwayland-xwayland-glamor-eglstream.$(OBJEXT)
-am_Xwayland_OBJECTS = Xwayland-xwayland.$(OBJEXT) \
-	Xwayland-xwayland-input.$(OBJEXT) \
-	Xwayland-xwayland-cursor.$(OBJEXT) \
-	Xwayland-xwayland-shm.$(OBJEXT) \
-	Xwayland-xwayland-output.$(OBJEXT) \
-	Xwayland-xwayland-cvt.$(OBJEXT) \
-	Xwayland-xwayland-vidmode.$(OBJEXT) Xwayland-stubs.$(OBJEXT) \
-	Xwayland-miinitext.$(OBJEXT) $(am__objects_1) $(am__objects_2) \
-	$(am__objects_3)
-@GLAMOR_EGL_TRUE@am__objects_4 = Xwayland-drm-protocol.$(OBJEXT)
-@GLAMOR_EGL_TRUE@am__objects_5 = $(am__objects_4)
-@XWAYLAND_EGLSTREAM_TRUE@am__objects_6 = Xwayland-wayland-eglstream-protocol.$(OBJEXT) \
-@XWAYLAND_EGLSTREAM_TRUE@	Xwayland-wayland-eglstream-controller-protocol.$(OBJEXT)
-am__objects_7 = $(am__objects_5) \
-	Xwayland-relative-pointer-unstable-v1-protocol.$(OBJEXT) \
-	Xwayland-pointer-constraints-unstable-v1-protocol.$(OBJEXT) \
-	Xwayland-tablet-unstable-v2-protocol.$(OBJEXT) \
-	Xwayland-xwayland-keyboard-grab-unstable-v1-protocol.$(OBJEXT) \
-	Xwayland-xdg-output-unstable-v1-protocol.$(OBJEXT) \
-	Xwayland-linux-dmabuf-unstable-v1-protocol.$(OBJEXT) \
-	$(am__objects_6)
-nodist_Xwayland_OBJECTS = $(am__objects_7)
-Xwayland_OBJECTS = $(am_Xwayland_OBJECTS) $(nodist_Xwayland_OBJECTS)
-am__DEPENDENCIES_1 =
-@GLAMOR_EGL_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) \
-@GLAMOR_EGL_TRUE@	$(am__DEPENDENCIES_1)
-AM_V_lt = $(am__v_lt_@AM_V@)
-am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
-am__v_lt_0 = --silent
-am__v_lt_1 = 
-Xwayland_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(Xwayland_CFLAGS) \
-	$(CFLAGS) $(Xwayland_LDFLAGS) $(LDFLAGS) -o $@
-AM_V_P = $(am__v_P_@AM_V@)
-am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
-am__v_P_0 = false
-am__v_P_1 = :
-AM_V_GEN = $(am__v_GEN_@AM_V@)
-am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo "  GEN     " $@;
-am__v_GEN_1 = 
-AM_V_at = $(am__v_at_@AM_V@)
-am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
-am__v_at_0 = @
-am__v_at_1 = 
-DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__maybe_remake_depfiles = depfiles
-am__depfiles_remade = ./$(DEPDIR)/Xwayland-drm-protocol.Po \
-	./$(DEPDIR)/Xwayland-linux-dmabuf-unstable-v1-protocol.Po \
-	./$(DEPDIR)/Xwayland-miinitext.Po \
-	./$(DEPDIR)/Xwayland-pointer-constraints-unstable-v1-protocol.Po \
-	./$(DEPDIR)/Xwayland-relative-pointer-unstable-v1-protocol.Po \
-	./$(DEPDIR)/Xwayland-stubs.Po \
-	./$(DEPDIR)/Xwayland-tablet-unstable-v2-protocol.Po \
-	./$(DEPDIR)/Xwayland-wayland-eglstream-controller-protocol.Po \
-	./$(DEPDIR)/Xwayland-wayland-eglstream-protocol.Po \
-	./$(DEPDIR)/Xwayland-xdg-output-unstable-v1-protocol.Po \
-	./$(DEPDIR)/Xwayland-xwayland-cursor.Po \
-	./$(DEPDIR)/Xwayland-xwayland-cvt.Po \
-	./$(DEPDIR)/Xwayland-xwayland-glamor-eglstream.Po \
-	./$(DEPDIR)/Xwayland-xwayland-glamor-gbm.Po \
-	./$(DEPDIR)/Xwayland-xwayland-glamor-xv.Po \
-	./$(DEPDIR)/Xwayland-xwayland-glamor.Po \
-	./$(DEPDIR)/Xwayland-xwayland-input.Po \
-	./$(DEPDIR)/Xwayland-xwayland-keyboard-grab-unstable-v1-protocol.Po \
-	./$(DEPDIR)/Xwayland-xwayland-output.Po \
-	./$(DEPDIR)/Xwayland-xwayland-present.Po \
-	./$(DEPDIR)/Xwayland-xwayland-shm.Po \
-	./$(DEPDIR)/Xwayland-xwayland-vidmode.Po \
-	./$(DEPDIR)/Xwayland-xwayland.Po
-am__mv = mv -f
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
-	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
-	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-	$(AM_CFLAGS) $(CFLAGS)
-AM_V_CC = $(am__v_CC_@AM_V@)
-am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
-am__v_CC_0 = @echo "  CC      " $@;
-am__v_CC_1 = 
-CCLD = $(CC)
-LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-	$(AM_LDFLAGS) $(LDFLAGS) -o $@
-AM_V_CCLD = $(am__v_CCLD_@AM_V@)
-am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
-am__v_CCLD_0 = @echo "  CCLD    " $@;
-am__v_CCLD_1 = 
-SOURCES = $(Xwayland_SOURCES) $(nodist_Xwayland_SOURCES)
-DIST_SOURCES = $(am__Xwayland_SOURCES_DIST)
-am__can_run_installinfo = \
-  case $$AM_UPDATE_INFO_DIR in \
-    n|no|NO) false;; \
-    *) (install-info --version) >/dev/null 2>&1;; \
-  esac
-am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
-# Read a list of newline-separated strings from the standard input,
-# and print each of them once, without duplicates.  Input order is
-# *not* preserved.
-am__uniquify_input = $(AWK) '\
-  BEGIN { nonempty = 0; } \
-  { items[$$0] = 1; nonempty = 1; } \
-  END { if (nonempty) { for (i in items) print i; }; } \
-'
-# Make sure the list of sources is unique.  This is necessary because,
-# e.g., the same source file might be shared among _SOURCES variables
-# for different programs/libraries.
-am__define_uniq_tagged_files = \
-  list='$(am__tagged_files)'; \
-  unique=`for i in $$list; do \
-    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-  done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
-am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
-ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
-AMTAR = @AMTAR@
-AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
-APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@
-APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@
-APP_MAN_DIR = @APP_MAN_DIR@
-APP_MAN_SUFFIX = @APP_MAN_SUFFIX@
-AR = @AR@
-AS = @AS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-BASE_CFLAGS = @BASE_CFLAGS@
-BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
-BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
-BUNDLE_VERSION = @BUNDLE_VERSION@
-BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
-CC = @CC@
-CCAS = @CCAS@
-CCASDEPMODE = @CCASDEPMODE@
-CCASFLAGS = @CCASFLAGS@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CHANGELOG_CMD = @CHANGELOG_CMD@
-COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CWARNFLAGS = @CWARNFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DBUS_CFLAGS = @DBUS_CFLAGS@
-DBUS_LIBS = @DBUS_LIBS@
-DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@
-DEFAULT_LOGDIR = @DEFAULT_LOGDIR@
-DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@
-DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@
-DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@
-DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DGA_CFLAGS = @DGA_CFLAGS@
-DGA_LIBS = @DGA_LIBS@
-DIX_CFLAGS = @DIX_CFLAGS@
-DIX_LIB = @DIX_LIB@
-DLLTOOL = @DLLTOOL@
-DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
-DOT = @DOT@
-DOXYGEN = @DOXYGEN@
-DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
-DRI2PROTO_LIBS = @DRI2PROTO_LIBS@
-DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@
-DRI3PROTO_LIBS = @DRI3PROTO_LIBS@
-DRIVER_MAN_DIR = @DRIVER_MAN_DIR@
-DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
-DRI_DRIVER_PATH = @DRI_DRIVER_PATH@
-DSYMUTIL = @DSYMUTIL@
-DTRACE = @DTRACE@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-FILE_MAN_DIR = @FILE_MAN_DIR@
-FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
-FONT100DPIDIR = @FONT100DPIDIR@
-FONT75DPIDIR = @FONT75DPIDIR@
-FONTMISCDIR = @FONTMISCDIR@
-FONTOTFDIR = @FONTOTFDIR@
-FONTROOTDIR = @FONTROOTDIR@
-FONTTTFDIR = @FONTTTFDIR@
-FONTTYPE1DIR = @FONTTYPE1DIR@
-FOP = @FOP@
-GBM_CFLAGS = @GBM_CFLAGS@
-GBM_LIBS = @GBM_LIBS@
-GLAMOR_CFLAGS = @GLAMOR_CFLAGS@
-GLAMOR_LIBS = @GLAMOR_LIBS@
-GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@
-GLX_DEFINES = @GLX_DEFINES@
-GLX_SYS_LIBS = @GLX_SYS_LIBS@
-GL_CFLAGS = @GL_CFLAGS@
-GL_LIBS = @GL_LIBS@
-GREP = @GREP@
-HAL_CFLAGS = @HAL_CFLAGS@
-HAL_LIBS = @HAL_LIBS@
-HAVE_DOT = @HAVE_DOT@
-INSTALL = @INSTALL@
-INSTALL_CMD = @INSTALL_CMD@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-KDRIVE_CFLAGS = @KDRIVE_CFLAGS@
-KDRIVE_INCS = @KDRIVE_INCS@
-KDRIVE_LIBS = @KDRIVE_LIBS@
-KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@
-KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@
-KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@
-KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@
-KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@
-KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@
-KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@
-LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@
-LEX = @LEX@
-LEXLIB = @LEXLIB@
-LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
-LIBDRM_CFLAGS = @LIBDRM_CFLAGS@
-LIBDRM_LIBS = @LIBDRM_LIBS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@
-LIBSHA1_LIBS = @LIBSHA1_LIBS@
-LIBTOOL = @LIBTOOL@
-LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
-LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
-LIB_MAN_DIR = @LIB_MAN_DIR@
-LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
-MAIN_LIB = @MAIN_LIB@
-MAKEINFO = @MAKEINFO@
-MANIFEST_TOOL = @MANIFEST_TOOL@
-MAN_SUBSTS = @MAN_SUBSTS@
-MISC_MAN_DIR = @MISC_MAN_DIR@
-MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
-MKDIR_P = @MKDIR_P@
-NM = @NM@
-NMEDIT = @NMEDIT@
-OBJC = @OBJC@
-OBJCCLD = @OBJCCLD@
-OBJCDEPMODE = @OBJCDEPMODE@
-OBJCFLAGS = @OBJCFLAGS@
-OBJCLINK = @OBJCLINK@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
-OPENSSL_LIBS = @OPENSSL_LIBS@
-OS_LIB = @OS_LIB@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@
-PCIACCESS_LIBS = @PCIACCESS_LIBS@
-PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@
-PIXMAN_CFLAGS = @PIXMAN_CFLAGS@
-PIXMAN_LIBS = @PIXMAN_LIBS@
-PKG_CONFIG = @PKG_CONFIG@
-PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
-PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
-PROJECTROOT = @PROJECTROOT@
-PTHREAD_CC = @PTHREAD_CC@
-PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
-PTHREAD_LIBS = @PTHREAD_LIBS@
-PYTHON3 = @PYTHON3@
-RANLIB = @RANLIB@
-RAWCPP = @RAWCPP@
-RAWCPPFLAGS = @RAWCPPFLAGS@
-RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
-SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
-SED = @SED@
-SELINUX_CFLAGS = @SELINUX_CFLAGS@
-SELINUX_LIBS = @SELINUX_LIBS@
-SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@
-SET_MAKE = @SET_MAKE@
-SHA1_CFLAGS = @SHA1_CFLAGS@
-SHA1_LIBS = @SHA1_LIBS@
-SHELL = @SHELL@
-SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@
-STRICT_CFLAGS = @STRICT_CFLAGS@
-STRIP = @STRIP@
-STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@
-SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@
-SYSCONFDIR = @SYSCONFDIR@
-SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@
-SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@
-TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@
-UDEV_CFLAGS = @UDEV_CFLAGS@
-UDEV_LIBS = @UDEV_LIBS@
-UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
-VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
-VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
-WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
-WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
-WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
-XCONFIGDIR = @XCONFIGDIR@
-XCONFIGFILE = @XCONFIGFILE@
-XDMCP_CFLAGS = @XDMCP_CFLAGS@
-XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
-XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
-XEPHYR_INCS = @XEPHYR_INCS@
-XEPHYR_LIBS = @XEPHYR_LIBS@
-XF86CONFIGDIR = @XF86CONFIGDIR@
-XF86CONFIGFILE = @XF86CONFIGFILE@
-XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@
-XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@
-XKB_COMPILED_DIR = @XKB_COMPILED_DIR@
-XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@
-XKB_DFLT_MODEL = @XKB_DFLT_MODEL@
-XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@
-XKB_DFLT_RULES = @XKB_DFLT_RULES@
-XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@
-XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@
-XLIB_CFLAGS = @XLIB_CFLAGS@
-XLIB_LIBS = @XLIB_LIBS@
-XMLTO = @XMLTO@
-XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@
-XNESTMODULES_LIBS = @XNESTMODULES_LIBS@
-XNEST_LIBS = @XNEST_LIBS@
-XNEST_SYS_LIBS = @XNEST_SYS_LIBS@
-XORG_CFLAGS = @XORG_CFLAGS@
-XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@
-XORG_INCS = @XORG_INCS@
-XORG_LIBS = @XORG_LIBS@
-XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@
-XORG_MAN_PAGE = @XORG_MAN_PAGE@
-XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@
-XORG_MODULES_LIBS = @XORG_MODULES_LIBS@
-XORG_OS_SUBDIR = @XORG_OS_SUBDIR@
-XORG_SGML_PATH = @XORG_SGML_PATH@
-XORG_SYS_LIBS = @XORG_SYS_LIBS@
-XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@
-XPBPROXY_LIBS = @XPBPROXY_LIBS@
-XQUARTZ_LIBS = @XQUARTZ_LIBS@
-XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
-XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
-XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
-XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
-XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
-XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@
-XSERVER_LIBS = @XSERVER_LIBS@
-XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@
-XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
-XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
-XSLTPROC = @XSLTPROC@
-XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
-XVFB_LIBS = @XVFB_LIBS@
-XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
-XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
-XWINMODULES_LIBS = @XWINMODULES_LIBS@
-XWIN_LIBS = @XWIN_LIBS@
-XWIN_SERVER_NAME = @XWIN_SERVER_NAME@
-XWIN_SYS_LIBS = @XWIN_SYS_LIBS@
-YACC = @YACC@
-YFLAGS = @YFLAGS@
-abi_ansic = @abi_ansic@
-abi_extension = @abi_extension@
-abi_videodrv = @abi_videodrv@
-abi_xinput = @abi_xinput@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_AR = @ac_ct_AR@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-ax_pthread_config = @ax_pthread_config@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-driverdir = @driverdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-extdir = @extdir@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-logdir = @logdir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-moduledir = @moduledir@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-runstatedir = @runstatedir@
-sbindir = @sbindir@
-sdkdir = @sdkdir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-symbol_visibility = @symbol_visibility@
-sysconfdir = @sysconfdir@
-sysconfigdir = @sysconfigdir@
-target_alias = @target_alias@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-Xwayland_CFLAGS = \
-	-I$(top_srcdir)/glamor			\
-	-I$(top_srcdir)/dri3			\
-	-DHAVE_DIX_CONFIG_H			\
-	$(XWAYLANDMODULES_CFLAGS)		\
-	$(DIX_CFLAGS)				\
-	$(GLAMOR_CFLAGS)			\
-	$(GBM_CFLAGS)
-
-Xwayland_SOURCES = xwayland.c xwayland-input.c xwayland-cursor.c \
-	xwayland-shm.c xwayland-output.c xwayland-cvt.c \
-	xwayland-vidmode.c xwayland.h $(top_srcdir)/Xi/stubs.c \
-	$(top_srcdir)/mi/miinitext.c $(am__append_1) $(am__append_2) \
-	$(am__append_3)
-Xwayland_LDADD = $(glamor_lib) $(XWAYLAND_LIBS) \
-	$(top_builddir)/glx/libglxvnd.la $(XWAYLAND_SYS_LIBS) \
-	$(top_builddir)/Xext/libXvidmode.la $(XSERVER_SYS_LIBS) \
-	$(am__append_5)
-Xwayland_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
-Xwayland_built_sources = $(am__append_4) \
-	relative-pointer-unstable-v1-client-protocol.h \
-	relative-pointer-unstable-v1-protocol.c \
-	pointer-constraints-unstable-v1-client-protocol.h \
-	pointer-constraints-unstable-v1-protocol.c \
-	tablet-unstable-v2-client-protocol.h \
-	tablet-unstable-v2-protocol.c \
-	xwayland-keyboard-grab-unstable-v1-protocol.c \
-	xwayland-keyboard-grab-unstable-v1-client-protocol.h \
-	xdg-output-unstable-v1-protocol.c \
-	xdg-output-unstable-v1-client-protocol.h \
-	linux-dmabuf-unstable-v1-client-protocol.h \
-	linux-dmabuf-unstable-v1-protocol.c $(am__append_6)
-@GLAMOR_EGL_TRUE@glamor_built_sources = \
-@GLAMOR_EGL_TRUE@	drm-client-protocol.h			\
-@GLAMOR_EGL_TRUE@	drm-protocol.c
-
-@GLAMOR_EGL_TRUE@glamor_lib = $(top_builddir)/glamor/libglamor.la
-@GLAMOR_EGL_TRUE@Xwayland_DEPENDENCIES = $(glamor_lib) $(XWAYLAND_LIBS)
-nodist_Xwayland_SOURCES = $(Xwayland_built_sources)
-CLEANFILES = $(Xwayland_built_sources)
-EXTRA_DIST = drm.xml
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
-	@for dep in $?; do \
-	  case '$(am__configure_deps)' in \
-	    *$$dep*) \
-	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
-	        && { if test -f $@; then exit 0; else break; fi; }; \
-	      exit 1;; \
-	  esac; \
-	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xwayland/Makefile'; \
-	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --foreign hw/xwayland/Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	@case '$?' in \
-	  *config.status*) \
-	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
-	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
-	esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure:  $(am__configure_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-install-binPROGRAMS: $(bin_PROGRAMS)
-	@$(NORMAL_INSTALL)
-	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
-	if test -n "$$list"; then \
-	  echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
-	  $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
-	fi; \
-	for p in $$list; do echo "$$p $$p"; done | \
-	sed 's/$(EXEEXT)$$//' | \
-	while read p p1; do if test -f $$p \
-	 || test -f $$p1 \
-	  ; then echo "$$p"; echo "$$p"; else :; fi; \
-	done | \
-	sed -e 'p;s,.*/,,;n;h' \
-	    -e 's|.*|.|' \
-	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
-	sed 'N;N;N;s,\n, ,g' | \
-	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
-	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
-	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
-	    else { print "f", $$3 "/" $$4, $$1; } } \
-	  END { for (d in files) print "f", d, files[d] }' | \
-	while read type dir files; do \
-	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
-	    test -z "$$files" || { \
-	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
-	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
-	    } \
-	; done
-
-uninstall-binPROGRAMS:
-	@$(NORMAL_UNINSTALL)
-	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
-	files=`for p in $$list; do echo "$$p"; done | \
-	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
-	      -e 's/$$/$(EXEEXT)/' \
-	`; \
-	test -n "$$list" || exit 0; \
-	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
-	cd "$(DESTDIR)$(bindir)" && rm -f $$files
-
-clean-binPROGRAMS:
-	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
-	echo " rm -f" $$list; \
-	rm -f $$list || exit $$?; \
-	test -n "$(EXEEXT)" || exit 0; \
-	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
-	echo " rm -f" $$list; \
-	rm -f $$list
-
-Xwayland$(EXEEXT): $(Xwayland_OBJECTS) $(Xwayland_DEPENDENCIES) $(EXTRA_Xwayland_DEPENDENCIES) 
-	@rm -f Xwayland$(EXEEXT)
-	$(AM_V_CCLD)$(Xwayland_LINK) $(Xwayland_OBJECTS) $(Xwayland_LDADD) $(LIBS)
-
-mostlyclean-compile:
-	-rm -f *.$(OBJEXT)
-
-distclean-compile:
-	-rm -f *.tab.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Xwayland-drm-protocol.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Xwayland-linux-dmabuf-unstable-v1-protocol.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Xwayland-miinitext.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Xwayland-pointer-constraints-unstable-v1-protocol.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Xwayland-relative-pointer-unstable-v1-protocol.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Xwayland-stubs.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Xwayland-tablet-unstable-v2-protocol.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Xwayland-wayland-eglstream-controller-protocol.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Xwayland-wayland-eglstream-protocol.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Xwayland-xdg-output-unstable-v1-protocol.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Xwayland-xwayland-cursor.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Xwayland-xwayland-cvt.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Xwayland-xwayland-glamor-eglstream.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Xwayland-xwayland-glamor-gbm.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Xwayland-xwayland-glamor-xv.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Xwayland-xwayland-glamor.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Xwayland-xwayland-input.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Xwayland-xwayland-keyboard-grab-unstable-v1-protocol.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Xwayland-xwayland-output.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Xwayland-xwayland-present.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Xwayland-xwayland-shm.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Xwayland-xwayland-vidmode.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Xwayland-xwayland.Po@am__quote@ # am--include-marker
-
-$(am__depfiles_remade):
-	@$(MKDIR_P) $(@D)
-	@echo '# dummy' >$@-t && $(am__mv) $@-t $@
-
-am--depfiles: $(am__depfiles_remade)
-
-.c.o:
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
-
-.c.obj:
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
-
-.c.lo:
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
-
-Xwayland-xwayland.o: xwayland.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-xwayland.o -MD -MP -MF $(DEPDIR)/Xwayland-xwayland.Tpo -c -o Xwayland-xwayland.o `test -f 'xwayland.c' || echo '$(srcdir)/'`xwayland.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-xwayland.Tpo $(DEPDIR)/Xwayland-xwayland.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='xwayland.c' object='Xwayland-xwayland.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-xwayland.o `test -f 'xwayland.c' || echo '$(srcdir)/'`xwayland.c
-
-Xwayland-xwayland.obj: xwayland.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-xwayland.obj -MD -MP -MF $(DEPDIR)/Xwayland-xwayland.Tpo -c -o Xwayland-xwayland.obj `if test -f 'xwayland.c'; then $(CYGPATH_W) 'xwayland.c'; else $(CYGPATH_W) '$(srcdir)/xwayland.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-xwayland.Tpo $(DEPDIR)/Xwayland-xwayland.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='xwayland.c' object='Xwayland-xwayland.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-xwayland.obj `if test -f 'xwayland.c'; then $(CYGPATH_W) 'xwayland.c'; else $(CYGPATH_W) '$(srcdir)/xwayland.c'; fi`
-
-Xwayland-xwayland-input.o: xwayland-input.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-xwayland-input.o -MD -MP -MF $(DEPDIR)/Xwayland-xwayland-input.Tpo -c -o Xwayland-xwayland-input.o `test -f 'xwayland-input.c' || echo '$(srcdir)/'`xwayland-input.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-xwayland-input.Tpo $(DEPDIR)/Xwayland-xwayland-input.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='xwayland-input.c' object='Xwayland-xwayland-input.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-xwayland-input.o `test -f 'xwayland-input.c' || echo '$(srcdir)/'`xwayland-input.c
-
-Xwayland-xwayland-input.obj: xwayland-input.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-xwayland-input.obj -MD -MP -MF $(DEPDIR)/Xwayland-xwayland-input.Tpo -c -o Xwayland-xwayland-input.obj `if test -f 'xwayland-input.c'; then $(CYGPATH_W) 'xwayland-input.c'; else $(CYGPATH_W) '$(srcdir)/xwayland-input.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-xwayland-input.Tpo $(DEPDIR)/Xwayland-xwayland-input.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='xwayland-input.c' object='Xwayland-xwayland-input.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-xwayland-input.obj `if test -f 'xwayland-input.c'; then $(CYGPATH_W) 'xwayland-input.c'; else $(CYGPATH_W) '$(srcdir)/xwayland-input.c'; fi`
-
-Xwayland-xwayland-cursor.o: xwayland-cursor.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-xwayland-cursor.o -MD -MP -MF $(DEPDIR)/Xwayland-xwayland-cursor.Tpo -c -o Xwayland-xwayland-cursor.o `test -f 'xwayland-cursor.c' || echo '$(srcdir)/'`xwayland-cursor.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-xwayland-cursor.Tpo $(DEPDIR)/Xwayland-xwayland-cursor.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='xwayland-cursor.c' object='Xwayland-xwayland-cursor.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-xwayland-cursor.o `test -f 'xwayland-cursor.c' || echo '$(srcdir)/'`xwayland-cursor.c
-
-Xwayland-xwayland-cursor.obj: xwayland-cursor.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-xwayland-cursor.obj -MD -MP -MF $(DEPDIR)/Xwayland-xwayland-cursor.Tpo -c -o Xwayland-xwayland-cursor.obj `if test -f 'xwayland-cursor.c'; then $(CYGPATH_W) 'xwayland-cursor.c'; else $(CYGPATH_W) '$(srcdir)/xwayland-cursor.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-xwayland-cursor.Tpo $(DEPDIR)/Xwayland-xwayland-cursor.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='xwayland-cursor.c' object='Xwayland-xwayland-cursor.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-xwayland-cursor.obj `if test -f 'xwayland-cursor.c'; then $(CYGPATH_W) 'xwayland-cursor.c'; else $(CYGPATH_W) '$(srcdir)/xwayland-cursor.c'; fi`
-
-Xwayland-xwayland-shm.o: xwayland-shm.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-xwayland-shm.o -MD -MP -MF $(DEPDIR)/Xwayland-xwayland-shm.Tpo -c -o Xwayland-xwayland-shm.o `test -f 'xwayland-shm.c' || echo '$(srcdir)/'`xwayland-shm.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-xwayland-shm.Tpo $(DEPDIR)/Xwayland-xwayland-shm.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='xwayland-shm.c' object='Xwayland-xwayland-shm.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-xwayland-shm.o `test -f 'xwayland-shm.c' || echo '$(srcdir)/'`xwayland-shm.c
-
-Xwayland-xwayland-shm.obj: xwayland-shm.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-xwayland-shm.obj -MD -MP -MF $(DEPDIR)/Xwayland-xwayland-shm.Tpo -c -o Xwayland-xwayland-shm.obj `if test -f 'xwayland-shm.c'; then $(CYGPATH_W) 'xwayland-shm.c'; else $(CYGPATH_W) '$(srcdir)/xwayland-shm.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-xwayland-shm.Tpo $(DEPDIR)/Xwayland-xwayland-shm.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='xwayland-shm.c' object='Xwayland-xwayland-shm.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-xwayland-shm.obj `if test -f 'xwayland-shm.c'; then $(CYGPATH_W) 'xwayland-shm.c'; else $(CYGPATH_W) '$(srcdir)/xwayland-shm.c'; fi`
-
-Xwayland-xwayland-output.o: xwayland-output.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-xwayland-output.o -MD -MP -MF $(DEPDIR)/Xwayland-xwayland-output.Tpo -c -o Xwayland-xwayland-output.o `test -f 'xwayland-output.c' || echo '$(srcdir)/'`xwayland-output.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-xwayland-output.Tpo $(DEPDIR)/Xwayland-xwayland-output.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='xwayland-output.c' object='Xwayland-xwayland-output.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-xwayland-output.o `test -f 'xwayland-output.c' || echo '$(srcdir)/'`xwayland-output.c
-
-Xwayland-xwayland-output.obj: xwayland-output.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-xwayland-output.obj -MD -MP -MF $(DEPDIR)/Xwayland-xwayland-output.Tpo -c -o Xwayland-xwayland-output.obj `if test -f 'xwayland-output.c'; then $(CYGPATH_W) 'xwayland-output.c'; else $(CYGPATH_W) '$(srcdir)/xwayland-output.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-xwayland-output.Tpo $(DEPDIR)/Xwayland-xwayland-output.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='xwayland-output.c' object='Xwayland-xwayland-output.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-xwayland-output.obj `if test -f 'xwayland-output.c'; then $(CYGPATH_W) 'xwayland-output.c'; else $(CYGPATH_W) '$(srcdir)/xwayland-output.c'; fi`
-
-Xwayland-xwayland-cvt.o: xwayland-cvt.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-xwayland-cvt.o -MD -MP -MF $(DEPDIR)/Xwayland-xwayland-cvt.Tpo -c -o Xwayland-xwayland-cvt.o `test -f 'xwayland-cvt.c' || echo '$(srcdir)/'`xwayland-cvt.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-xwayland-cvt.Tpo $(DEPDIR)/Xwayland-xwayland-cvt.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='xwayland-cvt.c' object='Xwayland-xwayland-cvt.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-xwayland-cvt.o `test -f 'xwayland-cvt.c' || echo '$(srcdir)/'`xwayland-cvt.c
-
-Xwayland-xwayland-cvt.obj: xwayland-cvt.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-xwayland-cvt.obj -MD -MP -MF $(DEPDIR)/Xwayland-xwayland-cvt.Tpo -c -o Xwayland-xwayland-cvt.obj `if test -f 'xwayland-cvt.c'; then $(CYGPATH_W) 'xwayland-cvt.c'; else $(CYGPATH_W) '$(srcdir)/xwayland-cvt.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-xwayland-cvt.Tpo $(DEPDIR)/Xwayland-xwayland-cvt.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='xwayland-cvt.c' object='Xwayland-xwayland-cvt.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-xwayland-cvt.obj `if test -f 'xwayland-cvt.c'; then $(CYGPATH_W) 'xwayland-cvt.c'; else $(CYGPATH_W) '$(srcdir)/xwayland-cvt.c'; fi`
-
-Xwayland-xwayland-vidmode.o: xwayland-vidmode.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-xwayland-vidmode.o -MD -MP -MF $(DEPDIR)/Xwayland-xwayland-vidmode.Tpo -c -o Xwayland-xwayland-vidmode.o `test -f 'xwayland-vidmode.c' || echo '$(srcdir)/'`xwayland-vidmode.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-xwayland-vidmode.Tpo $(DEPDIR)/Xwayland-xwayland-vidmode.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='xwayland-vidmode.c' object='Xwayland-xwayland-vidmode.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-xwayland-vidmode.o `test -f 'xwayland-vidmode.c' || echo '$(srcdir)/'`xwayland-vidmode.c
-
-Xwayland-xwayland-vidmode.obj: xwayland-vidmode.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-xwayland-vidmode.obj -MD -MP -MF $(DEPDIR)/Xwayland-xwayland-vidmode.Tpo -c -o Xwayland-xwayland-vidmode.obj `if test -f 'xwayland-vidmode.c'; then $(CYGPATH_W) 'xwayland-vidmode.c'; else $(CYGPATH_W) '$(srcdir)/xwayland-vidmode.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-xwayland-vidmode.Tpo $(DEPDIR)/Xwayland-xwayland-vidmode.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='xwayland-vidmode.c' object='Xwayland-xwayland-vidmode.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-xwayland-vidmode.obj `if test -f 'xwayland-vidmode.c'; then $(CYGPATH_W) 'xwayland-vidmode.c'; else $(CYGPATH_W) '$(srcdir)/xwayland-vidmode.c'; fi`
-
-Xwayland-stubs.o: $(top_srcdir)/Xi/stubs.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-stubs.o -MD -MP -MF $(DEPDIR)/Xwayland-stubs.Tpo -c -o Xwayland-stubs.o `test -f '$(top_srcdir)/Xi/stubs.c' || echo '$(srcdir)/'`$(top_srcdir)/Xi/stubs.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-stubs.Tpo $(DEPDIR)/Xwayland-stubs.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$(top_srcdir)/Xi/stubs.c' object='Xwayland-stubs.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-stubs.o `test -f '$(top_srcdir)/Xi/stubs.c' || echo '$(srcdir)/'`$(top_srcdir)/Xi/stubs.c
-
-Xwayland-stubs.obj: $(top_srcdir)/Xi/stubs.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-stubs.obj -MD -MP -MF $(DEPDIR)/Xwayland-stubs.Tpo -c -o Xwayland-stubs.obj `if test -f '$(top_srcdir)/Xi/stubs.c'; then $(CYGPATH_W) '$(top_srcdir)/Xi/stubs.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/Xi/stubs.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-stubs.Tpo $(DEPDIR)/Xwayland-stubs.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$(top_srcdir)/Xi/stubs.c' object='Xwayland-stubs.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-stubs.obj `if test -f '$(top_srcdir)/Xi/stubs.c'; then $(CYGPATH_W) '$(top_srcdir)/Xi/stubs.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/Xi/stubs.c'; fi`
-
-Xwayland-miinitext.o: $(top_srcdir)/mi/miinitext.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-miinitext.o -MD -MP -MF $(DEPDIR)/Xwayland-miinitext.Tpo -c -o Xwayland-miinitext.o `test -f '$(top_srcdir)/mi/miinitext.c' || echo '$(srcdir)/'`$(top_srcdir)/mi/miinitext.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-miinitext.Tpo $(DEPDIR)/Xwayland-miinitext.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$(top_srcdir)/mi/miinitext.c' object='Xwayland-miinitext.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-miinitext.o `test -f '$(top_srcdir)/mi/miinitext.c' || echo '$(srcdir)/'`$(top_srcdir)/mi/miinitext.c
-
-Xwayland-miinitext.obj: $(top_srcdir)/mi/miinitext.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-miinitext.obj -MD -MP -MF $(DEPDIR)/Xwayland-miinitext.Tpo -c -o Xwayland-miinitext.obj `if test -f '$(top_srcdir)/mi/miinitext.c'; then $(CYGPATH_W) '$(top_srcdir)/mi/miinitext.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/mi/miinitext.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-miinitext.Tpo $(DEPDIR)/Xwayland-miinitext.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$(top_srcdir)/mi/miinitext.c' object='Xwayland-miinitext.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-miinitext.obj `if test -f '$(top_srcdir)/mi/miinitext.c'; then $(CYGPATH_W) '$(top_srcdir)/mi/miinitext.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/mi/miinitext.c'; fi`
-
-Xwayland-xwayland-glamor.o: xwayland-glamor.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-xwayland-glamor.o -MD -MP -MF $(DEPDIR)/Xwayland-xwayland-glamor.Tpo -c -o Xwayland-xwayland-glamor.o `test -f 'xwayland-glamor.c' || echo '$(srcdir)/'`xwayland-glamor.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-xwayland-glamor.Tpo $(DEPDIR)/Xwayland-xwayland-glamor.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='xwayland-glamor.c' object='Xwayland-xwayland-glamor.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-xwayland-glamor.o `test -f 'xwayland-glamor.c' || echo '$(srcdir)/'`xwayland-glamor.c
-
-Xwayland-xwayland-glamor.obj: xwayland-glamor.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-xwayland-glamor.obj -MD -MP -MF $(DEPDIR)/Xwayland-xwayland-glamor.Tpo -c -o Xwayland-xwayland-glamor.obj `if test -f 'xwayland-glamor.c'; then $(CYGPATH_W) 'xwayland-glamor.c'; else $(CYGPATH_W) '$(srcdir)/xwayland-glamor.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-xwayland-glamor.Tpo $(DEPDIR)/Xwayland-xwayland-glamor.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='xwayland-glamor.c' object='Xwayland-xwayland-glamor.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-xwayland-glamor.obj `if test -f 'xwayland-glamor.c'; then $(CYGPATH_W) 'xwayland-glamor.c'; else $(CYGPATH_W) '$(srcdir)/xwayland-glamor.c'; fi`
-
-Xwayland-xwayland-glamor-gbm.o: xwayland-glamor-gbm.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-xwayland-glamor-gbm.o -MD -MP -MF $(DEPDIR)/Xwayland-xwayland-glamor-gbm.Tpo -c -o Xwayland-xwayland-glamor-gbm.o `test -f 'xwayland-glamor-gbm.c' || echo '$(srcdir)/'`xwayland-glamor-gbm.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-xwayland-glamor-gbm.Tpo $(DEPDIR)/Xwayland-xwayland-glamor-gbm.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='xwayland-glamor-gbm.c' object='Xwayland-xwayland-glamor-gbm.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-xwayland-glamor-gbm.o `test -f 'xwayland-glamor-gbm.c' || echo '$(srcdir)/'`xwayland-glamor-gbm.c
-
-Xwayland-xwayland-glamor-gbm.obj: xwayland-glamor-gbm.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-xwayland-glamor-gbm.obj -MD -MP -MF $(DEPDIR)/Xwayland-xwayland-glamor-gbm.Tpo -c -o Xwayland-xwayland-glamor-gbm.obj `if test -f 'xwayland-glamor-gbm.c'; then $(CYGPATH_W) 'xwayland-glamor-gbm.c'; else $(CYGPATH_W) '$(srcdir)/xwayland-glamor-gbm.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-xwayland-glamor-gbm.Tpo $(DEPDIR)/Xwayland-xwayland-glamor-gbm.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='xwayland-glamor-gbm.c' object='Xwayland-xwayland-glamor-gbm.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-xwayland-glamor-gbm.obj `if test -f 'xwayland-glamor-gbm.c'; then $(CYGPATH_W) 'xwayland-glamor-gbm.c'; else $(CYGPATH_W) '$(srcdir)/xwayland-glamor-gbm.c'; fi`
-
-Xwayland-xwayland-present.o: xwayland-present.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-xwayland-present.o -MD -MP -MF $(DEPDIR)/Xwayland-xwayland-present.Tpo -c -o Xwayland-xwayland-present.o `test -f 'xwayland-present.c' || echo '$(srcdir)/'`xwayland-present.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-xwayland-present.Tpo $(DEPDIR)/Xwayland-xwayland-present.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='xwayland-present.c' object='Xwayland-xwayland-present.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-xwayland-present.o `test -f 'xwayland-present.c' || echo '$(srcdir)/'`xwayland-present.c
-
-Xwayland-xwayland-present.obj: xwayland-present.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-xwayland-present.obj -MD -MP -MF $(DEPDIR)/Xwayland-xwayland-present.Tpo -c -o Xwayland-xwayland-present.obj `if test -f 'xwayland-present.c'; then $(CYGPATH_W) 'xwayland-present.c'; else $(CYGPATH_W) '$(srcdir)/xwayland-present.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-xwayland-present.Tpo $(DEPDIR)/Xwayland-xwayland-present.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='xwayland-present.c' object='Xwayland-xwayland-present.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-xwayland-present.obj `if test -f 'xwayland-present.c'; then $(CYGPATH_W) 'xwayland-present.c'; else $(CYGPATH_W) '$(srcdir)/xwayland-present.c'; fi`
-
-Xwayland-xwayland-glamor-xv.o: xwayland-glamor-xv.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-xwayland-glamor-xv.o -MD -MP -MF $(DEPDIR)/Xwayland-xwayland-glamor-xv.Tpo -c -o Xwayland-xwayland-glamor-xv.o `test -f 'xwayland-glamor-xv.c' || echo '$(srcdir)/'`xwayland-glamor-xv.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-xwayland-glamor-xv.Tpo $(DEPDIR)/Xwayland-xwayland-glamor-xv.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='xwayland-glamor-xv.c' object='Xwayland-xwayland-glamor-xv.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-xwayland-glamor-xv.o `test -f 'xwayland-glamor-xv.c' || echo '$(srcdir)/'`xwayland-glamor-xv.c
-
-Xwayland-xwayland-glamor-xv.obj: xwayland-glamor-xv.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-xwayland-glamor-xv.obj -MD -MP -MF $(DEPDIR)/Xwayland-xwayland-glamor-xv.Tpo -c -o Xwayland-xwayland-glamor-xv.obj `if test -f 'xwayland-glamor-xv.c'; then $(CYGPATH_W) 'xwayland-glamor-xv.c'; else $(CYGPATH_W) '$(srcdir)/xwayland-glamor-xv.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-xwayland-glamor-xv.Tpo $(DEPDIR)/Xwayland-xwayland-glamor-xv.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='xwayland-glamor-xv.c' object='Xwayland-xwayland-glamor-xv.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-xwayland-glamor-xv.obj `if test -f 'xwayland-glamor-xv.c'; then $(CYGPATH_W) 'xwayland-glamor-xv.c'; else $(CYGPATH_W) '$(srcdir)/xwayland-glamor-xv.c'; fi`
-
-Xwayland-xwayland-glamor-eglstream.o: xwayland-glamor-eglstream.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-xwayland-glamor-eglstream.o -MD -MP -MF $(DEPDIR)/Xwayland-xwayland-glamor-eglstream.Tpo -c -o Xwayland-xwayland-glamor-eglstream.o `test -f 'xwayland-glamor-eglstream.c' || echo '$(srcdir)/'`xwayland-glamor-eglstream.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-xwayland-glamor-eglstream.Tpo $(DEPDIR)/Xwayland-xwayland-glamor-eglstream.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='xwayland-glamor-eglstream.c' object='Xwayland-xwayland-glamor-eglstream.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-xwayland-glamor-eglstream.o `test -f 'xwayland-glamor-eglstream.c' || echo '$(srcdir)/'`xwayland-glamor-eglstream.c
-
-Xwayland-xwayland-glamor-eglstream.obj: xwayland-glamor-eglstream.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-xwayland-glamor-eglstream.obj -MD -MP -MF $(DEPDIR)/Xwayland-xwayland-glamor-eglstream.Tpo -c -o Xwayland-xwayland-glamor-eglstream.obj `if test -f 'xwayland-glamor-eglstream.c'; then $(CYGPATH_W) 'xwayland-glamor-eglstream.c'; else $(CYGPATH_W) '$(srcdir)/xwayland-glamor-eglstream.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-xwayland-glamor-eglstream.Tpo $(DEPDIR)/Xwayland-xwayland-glamor-eglstream.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='xwayland-glamor-eglstream.c' object='Xwayland-xwayland-glamor-eglstream.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-xwayland-glamor-eglstream.obj `if test -f 'xwayland-glamor-eglstream.c'; then $(CYGPATH_W) 'xwayland-glamor-eglstream.c'; else $(CYGPATH_W) '$(srcdir)/xwayland-glamor-eglstream.c'; fi`
-
-Xwayland-drm-protocol.o: drm-protocol.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-drm-protocol.o -MD -MP -MF $(DEPDIR)/Xwayland-drm-protocol.Tpo -c -o Xwayland-drm-protocol.o `test -f 'drm-protocol.c' || echo '$(srcdir)/'`drm-protocol.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-drm-protocol.Tpo $(DEPDIR)/Xwayland-drm-protocol.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='drm-protocol.c' object='Xwayland-drm-protocol.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-drm-protocol.o `test -f 'drm-protocol.c' || echo '$(srcdir)/'`drm-protocol.c
-
-Xwayland-drm-protocol.obj: drm-protocol.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-drm-protocol.obj -MD -MP -MF $(DEPDIR)/Xwayland-drm-protocol.Tpo -c -o Xwayland-drm-protocol.obj `if test -f 'drm-protocol.c'; then $(CYGPATH_W) 'drm-protocol.c'; else $(CYGPATH_W) '$(srcdir)/drm-protocol.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-drm-protocol.Tpo $(DEPDIR)/Xwayland-drm-protocol.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='drm-protocol.c' object='Xwayland-drm-protocol.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-drm-protocol.obj `if test -f 'drm-protocol.c'; then $(CYGPATH_W) 'drm-protocol.c'; else $(CYGPATH_W) '$(srcdir)/drm-protocol.c'; fi`
-
-Xwayland-relative-pointer-unstable-v1-protocol.o: relative-pointer-unstable-v1-protocol.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-relative-pointer-unstable-v1-protocol.o -MD -MP -MF $(DEPDIR)/Xwayland-relative-pointer-unstable-v1-protocol.Tpo -c -o Xwayland-relative-pointer-unstable-v1-protocol.o `test -f 'relative-pointer-unstable-v1-protocol.c' || echo '$(srcdir)/'`relative-pointer-unstable-v1-protocol.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-relative-pointer-unstable-v1-protocol.Tpo $(DEPDIR)/Xwayland-relative-pointer-unstable-v1-protocol.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='relative-pointer-unstable-v1-protocol.c' object='Xwayland-relative-pointer-unstable-v1-protocol.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-relative-pointer-unstable-v1-protocol.o `test -f 'relative-pointer-unstable-v1-protocol.c' || echo '$(srcdir)/'`relative-pointer-unstable-v1-protocol.c
-
-Xwayland-relative-pointer-unstable-v1-protocol.obj: relative-pointer-unstable-v1-protocol.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-relative-pointer-unstable-v1-protocol.obj -MD -MP -MF $(DEPDIR)/Xwayland-relative-pointer-unstable-v1-protocol.Tpo -c -o Xwayland-relative-pointer-unstable-v1-protocol.obj `if test -f 'relative-pointer-unstable-v1-protocol.c'; then $(CYGPATH_W) 'relative-pointer-unstable-v1-protocol.c'; else $(CYGPATH_W) '$(srcdir)/relative-pointer-unstable-v1-protocol.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-relative-pointer-unstable-v1-protocol.Tpo $(DEPDIR)/Xwayland-relative-pointer-unstable-v1-protocol.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='relative-pointer-unstable-v1-protocol.c' object='Xwayland-relative-pointer-unstable-v1-protocol.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-relative-pointer-unstable-v1-protocol.obj `if test -f 'relative-pointer-unstable-v1-protocol.c'; then $(CYGPATH_W) 'relative-pointer-unstable-v1-protocol.c'; else $(CYGPATH_W) '$(srcdir)/relative-pointer-unstable-v1-protocol.c'; fi`
-
-Xwayland-pointer-constraints-unstable-v1-protocol.o: pointer-constraints-unstable-v1-protocol.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-pointer-constraints-unstable-v1-protocol.o -MD -MP -MF $(DEPDIR)/Xwayland-pointer-constraints-unstable-v1-protocol.Tpo -c -o Xwayland-pointer-constraints-unstable-v1-protocol.o `test -f 'pointer-constraints-unstable-v1-protocol.c' || echo '$(srcdir)/'`pointer-constraints-unstable-v1-protocol.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-pointer-constraints-unstable-v1-protocol.Tpo $(DEPDIR)/Xwayland-pointer-constraints-unstable-v1-protocol.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='pointer-constraints-unstable-v1-protocol.c' object='Xwayland-pointer-constraints-unstable-v1-protocol.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-pointer-constraints-unstable-v1-protocol.o `test -f 'pointer-constraints-unstable-v1-protocol.c' || echo '$(srcdir)/'`pointer-constraints-unstable-v1-protocol.c
-
-Xwayland-pointer-constraints-unstable-v1-protocol.obj: pointer-constraints-unstable-v1-protocol.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-pointer-constraints-unstable-v1-protocol.obj -MD -MP -MF $(DEPDIR)/Xwayland-pointer-constraints-unstable-v1-protocol.Tpo -c -o Xwayland-pointer-constraints-unstable-v1-protocol.obj `if test -f 'pointer-constraints-unstable-v1-protocol.c'; then $(CYGPATH_W) 'pointer-constraints-unstable-v1-protocol.c'; else $(CYGPATH_W) '$(srcdir)/pointer-constraints-unstable-v1-protocol.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-pointer-constraints-unstable-v1-protocol.Tpo $(DEPDIR)/Xwayland-pointer-constraints-unstable-v1-protocol.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='pointer-constraints-unstable-v1-protocol.c' object='Xwayland-pointer-constraints-unstable-v1-protocol.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-pointer-constraints-unstable-v1-protocol.obj `if test -f 'pointer-constraints-unstable-v1-protocol.c'; then $(CYGPATH_W) 'pointer-constraints-unstable-v1-protocol.c'; else $(CYGPATH_W) '$(srcdir)/pointer-constraints-unstable-v1-protocol.c'; fi`
-
-Xwayland-tablet-unstable-v2-protocol.o: tablet-unstable-v2-protocol.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-tablet-unstable-v2-protocol.o -MD -MP -MF $(DEPDIR)/Xwayland-tablet-unstable-v2-protocol.Tpo -c -o Xwayland-tablet-unstable-v2-protocol.o `test -f 'tablet-unstable-v2-protocol.c' || echo '$(srcdir)/'`tablet-unstable-v2-protocol.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-tablet-unstable-v2-protocol.Tpo $(DEPDIR)/Xwayland-tablet-unstable-v2-protocol.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='tablet-unstable-v2-protocol.c' object='Xwayland-tablet-unstable-v2-protocol.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-tablet-unstable-v2-protocol.o `test -f 'tablet-unstable-v2-protocol.c' || echo '$(srcdir)/'`tablet-unstable-v2-protocol.c
-
-Xwayland-tablet-unstable-v2-protocol.obj: tablet-unstable-v2-protocol.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-tablet-unstable-v2-protocol.obj -MD -MP -MF $(DEPDIR)/Xwayland-tablet-unstable-v2-protocol.Tpo -c -o Xwayland-tablet-unstable-v2-protocol.obj `if test -f 'tablet-unstable-v2-protocol.c'; then $(CYGPATH_W) 'tablet-unstable-v2-protocol.c'; else $(CYGPATH_W) '$(srcdir)/tablet-unstable-v2-protocol.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-tablet-unstable-v2-protocol.Tpo $(DEPDIR)/Xwayland-tablet-unstable-v2-protocol.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='tablet-unstable-v2-protocol.c' object='Xwayland-tablet-unstable-v2-protocol.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-tablet-unstable-v2-protocol.obj `if test -f 'tablet-unstable-v2-protocol.c'; then $(CYGPATH_W) 'tablet-unstable-v2-protocol.c'; else $(CYGPATH_W) '$(srcdir)/tablet-unstable-v2-protocol.c'; fi`
-
-Xwayland-xwayland-keyboard-grab-unstable-v1-protocol.o: xwayland-keyboard-grab-unstable-v1-protocol.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-xwayland-keyboard-grab-unstable-v1-protocol.o -MD -MP -MF $(DEPDIR)/Xwayland-xwayland-keyboard-grab-unstable-v1-protocol.Tpo -c -o Xwayland-xwayland-keyboard-grab-unstable-v1-protocol.o `test -f 'xwayland-keyboard-grab-unstable-v1-protocol.c' || echo '$(srcdir)/'`xwayland-keyboard-grab-unstable-v1-protocol.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-xwayland-keyboard-grab-unstable-v1-protocol.Tpo $(DEPDIR)/Xwayland-xwayland-keyboard-grab-unstable-v1-protocol.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='xwayland-keyboard-grab-unstable-v1-protocol.c' object='Xwayland-xwayland-keyboard-grab-unstable-v1-protocol.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-xwayland-keyboard-grab-unstable-v1-protocol.o `test -f 'xwayland-keyboard-grab-unstable-v1-protocol.c' || echo '$(srcdir)/'`xwayland-keyboard-grab-unstable-v1-protocol.c
-
-Xwayland-xwayland-keyboard-grab-unstable-v1-protocol.obj: xwayland-keyboard-grab-unstable-v1-protocol.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-xwayland-keyboard-grab-unstable-v1-protocol.obj -MD -MP -MF $(DEPDIR)/Xwayland-xwayland-keyboard-grab-unstable-v1-protocol.Tpo -c -o Xwayland-xwayland-keyboard-grab-unstable-v1-protocol.obj `if test -f 'xwayland-keyboard-grab-unstable-v1-protocol.c'; then $(CYGPATH_W) 'xwayland-keyboard-grab-unstable-v1-protocol.c'; else $(CYGPATH_W) '$(srcdir)/xwayland-keyboard-grab-unstable-v1-protocol.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-xwayland-keyboard-grab-unstable-v1-protocol.Tpo $(DEPDIR)/Xwayland-xwayland-keyboard-grab-unstable-v1-protocol.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='xwayland-keyboard-grab-unstable-v1-protocol.c' object='Xwayland-xwayland-keyboard-grab-unstable-v1-protocol.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-xwayland-keyboard-grab-unstable-v1-protocol.obj `if test -f 'xwayland-keyboard-grab-unstable-v1-protocol.c'; then $(CYGPATH_W) 'xwayland-keyboard-grab-unstable-v1-protocol.c'; else $(CYGPATH_W) '$(srcdir)/xwayland-keyboard-grab-unstable-v1-protocol.c'; fi`
-
-Xwayland-xdg-output-unstable-v1-protocol.o: xdg-output-unstable-v1-protocol.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-xdg-output-unstable-v1-protocol.o -MD -MP -MF $(DEPDIR)/Xwayland-xdg-output-unstable-v1-protocol.Tpo -c -o Xwayland-xdg-output-unstable-v1-protocol.o `test -f 'xdg-output-unstable-v1-protocol.c' || echo '$(srcdir)/'`xdg-output-unstable-v1-protocol.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-xdg-output-unstable-v1-protocol.Tpo $(DEPDIR)/Xwayland-xdg-output-unstable-v1-protocol.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='xdg-output-unstable-v1-protocol.c' object='Xwayland-xdg-output-unstable-v1-protocol.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-xdg-output-unstable-v1-protocol.o `test -f 'xdg-output-unstable-v1-protocol.c' || echo '$(srcdir)/'`xdg-output-unstable-v1-protocol.c
-
-Xwayland-xdg-output-unstable-v1-protocol.obj: xdg-output-unstable-v1-protocol.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-xdg-output-unstable-v1-protocol.obj -MD -MP -MF $(DEPDIR)/Xwayland-xdg-output-unstable-v1-protocol.Tpo -c -o Xwayland-xdg-output-unstable-v1-protocol.obj `if test -f 'xdg-output-unstable-v1-protocol.c'; then $(CYGPATH_W) 'xdg-output-unstable-v1-protocol.c'; else $(CYGPATH_W) '$(srcdir)/xdg-output-unstable-v1-protocol.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-xdg-output-unstable-v1-protocol.Tpo $(DEPDIR)/Xwayland-xdg-output-unstable-v1-protocol.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='xdg-output-unstable-v1-protocol.c' object='Xwayland-xdg-output-unstable-v1-protocol.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-xdg-output-unstable-v1-protocol.obj `if test -f 'xdg-output-unstable-v1-protocol.c'; then $(CYGPATH_W) 'xdg-output-unstable-v1-protocol.c'; else $(CYGPATH_W) '$(srcdir)/xdg-output-unstable-v1-protocol.c'; fi`
-
-Xwayland-linux-dmabuf-unstable-v1-protocol.o: linux-dmabuf-unstable-v1-protocol.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-linux-dmabuf-unstable-v1-protocol.o -MD -MP -MF $(DEPDIR)/Xwayland-linux-dmabuf-unstable-v1-protocol.Tpo -c -o Xwayland-linux-dmabuf-unstable-v1-protocol.o `test -f 'linux-dmabuf-unstable-v1-protocol.c' || echo '$(srcdir)/'`linux-dmabuf-unstable-v1-protocol.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-linux-dmabuf-unstable-v1-protocol.Tpo $(DEPDIR)/Xwayland-linux-dmabuf-unstable-v1-protocol.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='linux-dmabuf-unstable-v1-protocol.c' object='Xwayland-linux-dmabuf-unstable-v1-protocol.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-linux-dmabuf-unstable-v1-protocol.o `test -f 'linux-dmabuf-unstable-v1-protocol.c' || echo '$(srcdir)/'`linux-dmabuf-unstable-v1-protocol.c
-
-Xwayland-linux-dmabuf-unstable-v1-protocol.obj: linux-dmabuf-unstable-v1-protocol.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-linux-dmabuf-unstable-v1-protocol.obj -MD -MP -MF $(DEPDIR)/Xwayland-linux-dmabuf-unstable-v1-protocol.Tpo -c -o Xwayland-linux-dmabuf-unstable-v1-protocol.obj `if test -f 'linux-dmabuf-unstable-v1-protocol.c'; then $(CYGPATH_W) 'linux-dmabuf-unstable-v1-protocol.c'; else $(CYGPATH_W) '$(srcdir)/linux-dmabuf-unstable-v1-protocol.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-linux-dmabuf-unstable-v1-protocol.Tpo $(DEPDIR)/Xwayland-linux-dmabuf-unstable-v1-protocol.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='linux-dmabuf-unstable-v1-protocol.c' object='Xwayland-linux-dmabuf-unstable-v1-protocol.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-linux-dmabuf-unstable-v1-protocol.obj `if test -f 'linux-dmabuf-unstable-v1-protocol.c'; then $(CYGPATH_W) 'linux-dmabuf-unstable-v1-protocol.c'; else $(CYGPATH_W) '$(srcdir)/linux-dmabuf-unstable-v1-protocol.c'; fi`
-
-Xwayland-wayland-eglstream-protocol.o: wayland-eglstream-protocol.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-wayland-eglstream-protocol.o -MD -MP -MF $(DEPDIR)/Xwayland-wayland-eglstream-protocol.Tpo -c -o Xwayland-wayland-eglstream-protocol.o `test -f 'wayland-eglstream-protocol.c' || echo '$(srcdir)/'`wayland-eglstream-protocol.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-wayland-eglstream-protocol.Tpo $(DEPDIR)/Xwayland-wayland-eglstream-protocol.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='wayland-eglstream-protocol.c' object='Xwayland-wayland-eglstream-protocol.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-wayland-eglstream-protocol.o `test -f 'wayland-eglstream-protocol.c' || echo '$(srcdir)/'`wayland-eglstream-protocol.c
-
-Xwayland-wayland-eglstream-protocol.obj: wayland-eglstream-protocol.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-wayland-eglstream-protocol.obj -MD -MP -MF $(DEPDIR)/Xwayland-wayland-eglstream-protocol.Tpo -c -o Xwayland-wayland-eglstream-protocol.obj `if test -f 'wayland-eglstream-protocol.c'; then $(CYGPATH_W) 'wayland-eglstream-protocol.c'; else $(CYGPATH_W) '$(srcdir)/wayland-eglstream-protocol.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-wayland-eglstream-protocol.Tpo $(DEPDIR)/Xwayland-wayland-eglstream-protocol.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='wayland-eglstream-protocol.c' object='Xwayland-wayland-eglstream-protocol.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-wayland-eglstream-protocol.obj `if test -f 'wayland-eglstream-protocol.c'; then $(CYGPATH_W) 'wayland-eglstream-protocol.c'; else $(CYGPATH_W) '$(srcdir)/wayland-eglstream-protocol.c'; fi`
-
-Xwayland-wayland-eglstream-controller-protocol.o: wayland-eglstream-controller-protocol.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-wayland-eglstream-controller-protocol.o -MD -MP -MF $(DEPDIR)/Xwayland-wayland-eglstream-controller-protocol.Tpo -c -o Xwayland-wayland-eglstream-controller-protocol.o `test -f 'wayland-eglstream-controller-protocol.c' || echo '$(srcdir)/'`wayland-eglstream-controller-protocol.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-wayland-eglstream-controller-protocol.Tpo $(DEPDIR)/Xwayland-wayland-eglstream-controller-protocol.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='wayland-eglstream-controller-protocol.c' object='Xwayland-wayland-eglstream-controller-protocol.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-wayland-eglstream-controller-protocol.o `test -f 'wayland-eglstream-controller-protocol.c' || echo '$(srcdir)/'`wayland-eglstream-controller-protocol.c
-
-Xwayland-wayland-eglstream-controller-protocol.obj: wayland-eglstream-controller-protocol.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-wayland-eglstream-controller-protocol.obj -MD -MP -MF $(DEPDIR)/Xwayland-wayland-eglstream-controller-protocol.Tpo -c -o Xwayland-wayland-eglstream-controller-protocol.obj `if test -f 'wayland-eglstream-controller-protocol.c'; then $(CYGPATH_W) 'wayland-eglstream-controller-protocol.c'; else $(CYGPATH_W) '$(srcdir)/wayland-eglstream-controller-protocol.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-wayland-eglstream-controller-protocol.Tpo $(DEPDIR)/Xwayland-wayland-eglstream-controller-protocol.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='wayland-eglstream-controller-protocol.c' object='Xwayland-wayland-eglstream-controller-protocol.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-wayland-eglstream-controller-protocol.obj `if test -f 'wayland-eglstream-controller-protocol.c'; then $(CYGPATH_W) 'wayland-eglstream-controller-protocol.c'; else $(CYGPATH_W) '$(srcdir)/wayland-eglstream-controller-protocol.c'; fi`
-
-mostlyclean-libtool:
-	-rm -f *.lo
-
-clean-libtool:
-	-rm -rf .libs _libs
-
-ID: $(am__tagged_files)
-	$(am__define_uniq_tagged_files); mkid -fID $$unique
-tags: tags-am
-TAGS: tags
-
-tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
-	set x; \
-	here=`pwd`; \
-	$(am__define_uniq_tagged_files); \
-	shift; \
-	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
-	  test -n "$$unique" || unique=$$empty_fix; \
-	  if test $$# -gt 0; then \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      "$$@" $$unique; \
-	  else \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      $$unique; \
-	  fi; \
-	fi
-ctags: ctags-am
-
-CTAGS: ctags
-ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
-	$(am__define_uniq_tagged_files); \
-	test -z "$(CTAGS_ARGS)$$unique" \
-	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$unique
-
-GTAGS:
-	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && $(am__cd) $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) "$$here"
-cscopelist: cscopelist-am
-
-cscopelist-am: $(am__tagged_files)
-	list='$(am__tagged_files)'; \
-	case "$(srcdir)" in \
-	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
-	  *) sdir=$(subdir)/$(srcdir) ;; \
-	esac; \
-	for i in $$list; do \
-	  if test -f "$$i"; then \
-	    echo "$(subdir)/$$i"; \
-	  else \
-	    echo "$$sdir/$$i"; \
-	  fi; \
-	done >> $(top_builddir)/cscope.files
-
-distclean-tags:
-	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(BUILT_SOURCES)
-	$(MAKE) $(AM_MAKEFLAGS) distdir-am
-
-distdir-am: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	list='$(DISTFILES)'; \
-	  dist_files=`for file in $$list; do echo $$file; done | \
-	  sed -e "s|^$$srcdirstrip/||;t" \
-	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
-	case $$dist_files in \
-	  */*) $(MKDIR_P) `echo "$$dist_files" | \
-			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
-			   sort -u` ;; \
-	esac; \
-	for file in $$dist_files; do \
-	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  if test -d $$d/$$file; then \
-	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
-	    if test -d "$(distdir)/$$file"; then \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
-	  else \
-	    test -f "$(distdir)/$$file" \
-	    || cp -p $$d/$$file "$(distdir)/$$file" \
-	    || exit 1; \
-	  fi; \
-	done
-check-am: all-am
-check: check-am
-all-am: Makefile $(PROGRAMS)
-installdirs:
-	for dir in "$(DESTDIR)$(bindir)"; do \
-	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
-	done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
-	if test -z '$(STRIP)'; then \
-	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	      install; \
-	else \
-	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
-	fi
-mostlyclean-generic:
-
-clean-generic:
-	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean-generic:
-	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
-	@echo "This command is intended for maintainers to use"
-	@echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-am
-		-rm -f ./$(DEPDIR)/Xwayland-drm-protocol.Po
-	-rm -f ./$(DEPDIR)/Xwayland-linux-dmabuf-unstable-v1-protocol.Po
-	-rm -f ./$(DEPDIR)/Xwayland-miinitext.Po
-	-rm -f ./$(DEPDIR)/Xwayland-pointer-constraints-unstable-v1-protocol.Po
-	-rm -f ./$(DEPDIR)/Xwayland-relative-pointer-unstable-v1-protocol.Po
-	-rm -f ./$(DEPDIR)/Xwayland-stubs.Po
-	-rm -f ./$(DEPDIR)/Xwayland-tablet-unstable-v2-protocol.Po
-	-rm -f ./$(DEPDIR)/Xwayland-wayland-eglstream-controller-protocol.Po
-	-rm -f ./$(DEPDIR)/Xwayland-wayland-eglstream-protocol.Po
-	-rm -f ./$(DEPDIR)/Xwayland-xdg-output-unstable-v1-protocol.Po
-	-rm -f ./$(DEPDIR)/Xwayland-xwayland-cursor.Po
-	-rm -f ./$(DEPDIR)/Xwayland-xwayland-cvt.Po
-	-rm -f ./$(DEPDIR)/Xwayland-xwayland-glamor-eglstream.Po
-	-rm -f ./$(DEPDIR)/Xwayland-xwayland-glamor-gbm.Po
-	-rm -f ./$(DEPDIR)/Xwayland-xwayland-glamor-xv.Po
-	-rm -f ./$(DEPDIR)/Xwayland-xwayland-glamor.Po
-	-rm -f ./$(DEPDIR)/Xwayland-xwayland-input.Po
-	-rm -f ./$(DEPDIR)/Xwayland-xwayland-keyboard-grab-unstable-v1-protocol.Po
-	-rm -f ./$(DEPDIR)/Xwayland-xwayland-output.Po
-	-rm -f ./$(DEPDIR)/Xwayland-xwayland-present.Po
-	-rm -f ./$(DEPDIR)/Xwayland-xwayland-shm.Po
-	-rm -f ./$(DEPDIR)/Xwayland-xwayland-vidmode.Po
-	-rm -f ./$(DEPDIR)/Xwayland-xwayland.Po
-	-rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
-	distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am: install-binPROGRAMS
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
-		-rm -f ./$(DEPDIR)/Xwayland-drm-protocol.Po
-	-rm -f ./$(DEPDIR)/Xwayland-linux-dmabuf-unstable-v1-protocol.Po
-	-rm -f ./$(DEPDIR)/Xwayland-miinitext.Po
-	-rm -f ./$(DEPDIR)/Xwayland-pointer-constraints-unstable-v1-protocol.Po
-	-rm -f ./$(DEPDIR)/Xwayland-relative-pointer-unstable-v1-protocol.Po
-	-rm -f ./$(DEPDIR)/Xwayland-stubs.Po
-	-rm -f ./$(DEPDIR)/Xwayland-tablet-unstable-v2-protocol.Po
-	-rm -f ./$(DEPDIR)/Xwayland-wayland-eglstream-controller-protocol.Po
-	-rm -f ./$(DEPDIR)/Xwayland-wayland-eglstream-protocol.Po
-	-rm -f ./$(DEPDIR)/Xwayland-xdg-output-unstable-v1-protocol.Po
-	-rm -f ./$(DEPDIR)/Xwayland-xwayland-cursor.Po
-	-rm -f ./$(DEPDIR)/Xwayland-xwayland-cvt.Po
-	-rm -f ./$(DEPDIR)/Xwayland-xwayland-glamor-eglstream.Po
-	-rm -f ./$(DEPDIR)/Xwayland-xwayland-glamor-gbm.Po
-	-rm -f ./$(DEPDIR)/Xwayland-xwayland-glamor-xv.Po
-	-rm -f ./$(DEPDIR)/Xwayland-xwayland-glamor.Po
-	-rm -f ./$(DEPDIR)/Xwayland-xwayland-input.Po
-	-rm -f ./$(DEPDIR)/Xwayland-xwayland-keyboard-grab-unstable-v1-protocol.Po
-	-rm -f ./$(DEPDIR)/Xwayland-xwayland-output.Po
-	-rm -f ./$(DEPDIR)/Xwayland-xwayland-present.Po
-	-rm -f ./$(DEPDIR)/Xwayland-xwayland-shm.Po
-	-rm -f ./$(DEPDIR)/Xwayland-xwayland-vidmode.Po
-	-rm -f ./$(DEPDIR)/Xwayland-xwayland.Po
-	-rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic \
-	mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-binPROGRAMS
-
-.MAKE: install-am install-strip
-
-.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
-	clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \
-	ctags ctags-am distclean distclean-compile distclean-generic \
-	distclean-libtool distclean-tags distdir dvi dvi-am html \
-	html-am info info-am install install-am install-binPROGRAMS \
-	install-data install-data-am install-dvi install-dvi-am \
-	install-exec install-exec-am install-html install-html-am \
-	install-info install-info-am install-man install-pdf \
-	install-pdf-am install-ps install-ps-am install-strip \
-	installcheck installcheck-am installdirs maintainer-clean \
-	maintainer-clean-generic mostlyclean mostlyclean-compile \
-	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-	tags tags-am uninstall uninstall-am uninstall-binPROGRAMS
-
-.PRECIOUS: Makefile
-
-
-$(Xwayland_SOURCES): $(Xwayland_built_sources)
-
-relink:
-	$(AM_V_at)rm -f Xwayland$(EXEEXT) && $(MAKE) Xwayland$(EXEEXT)
-
-relative-pointer-unstable-v1-protocol.c : $(WAYLAND_PROTOCOLS_DATADIR)/unstable/relative-pointer/relative-pointer-unstable-v1.xml
-	$(AM_V_GEN)$(WAYLAND_SCANNER) @SCANNER_ARG@ < $< > $@
-relative-pointer-unstable-v1-client-protocol.h : $(WAYLAND_PROTOCOLS_DATADIR)/unstable/relative-pointer/relative-pointer-unstable-v1.xml
-	$(AM_V_GEN)$(WAYLAND_SCANNER) client-header < $< > $@
-
-pointer-constraints-unstable-v1-protocol.c : $(WAYLAND_PROTOCOLS_DATADIR)/unstable/pointer-constraints/pointer-constraints-unstable-v1.xml
-	$(AM_V_GEN)$(WAYLAND_SCANNER) @SCANNER_ARG@ < $< > $@
-pointer-constraints-unstable-v1-client-protocol.h : $(WAYLAND_PROTOCOLS_DATADIR)/unstable/pointer-constraints/pointer-constraints-unstable-v1.xml
-	$(AM_V_GEN)$(WAYLAND_SCANNER) client-header < $< > $@
-
-tablet-unstable-v2-protocol.c: $(WAYLAND_PROTOCOLS_DATADIR)/unstable/tablet/tablet-unstable-v2.xml
-	$(AM_V_GEN)$(WAYLAND_SCANNER) @SCANNER_ARG@ < $< > $@
-tablet-unstable-v2-client-protocol.h: $(WAYLAND_PROTOCOLS_DATADIR)/unstable/tablet/tablet-unstable-v2.xml
-	$(AM_V_GEN)$(WAYLAND_SCANNER) client-header < $< > $@
-
-xwayland-keyboard-grab-unstable-v1-protocol.c : $(WAYLAND_PROTOCOLS_DATADIR)/unstable/xwayland-keyboard-grab/xwayland-keyboard-grab-unstable-v1.xml
-	$(AM_V_GEN)$(WAYLAND_SCANNER) @SCANNER_ARG@ < $< > $@
-xwayland-keyboard-grab-unstable-v1-client-protocol.h : $(WAYLAND_PROTOCOLS_DATADIR)/unstable/xwayland-keyboard-grab/xwayland-keyboard-grab-unstable-v1.xml
-	$(AM_V_GEN)$(WAYLAND_SCANNER) client-header < $< > $@
-xdg-output-unstable-v1-protocol.c : $(WAYLAND_PROTOCOLS_DATADIR)/unstable/xdg-output/xdg-output-unstable-v1.xml
-	$(AM_V_GEN)$(WAYLAND_SCANNER) @SCANNER_ARG@ < $< > $@
-xdg-output-unstable-v1-client-protocol.h : $(WAYLAND_PROTOCOLS_DATADIR)/unstable/xdg-output/xdg-output-unstable-v1.xml
-	$(AM_V_GEN)$(WAYLAND_SCANNER) client-header < $< > $@
-
-linux-dmabuf-unstable-v1-protocol.c : $(WAYLAND_PROTOCOLS_DATADIR)/unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml
-	$(AM_V_GEN)$(WAYLAND_SCANNER) @SCANNER_ARG@ < $< > $@
-linux-dmabuf-unstable-v1-client-protocol.h : $(WAYLAND_PROTOCOLS_DATADIR)/unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml
-	$(AM_V_GEN)$(WAYLAND_SCANNER) client-header < $< > $@
-
-wayland-eglstream-client-protocol.h : $(WAYLAND_EGLSTREAM_DATADIR)/wayland-eglstream.xml
-	$(AM_V_GEN)$(WAYLAND_SCANNER) client-header < $< > $@
-wayland-eglstream-controller-client-protocol.h : $(WAYLAND_EGLSTREAM_DATADIR)/wayland-eglstream-controller.xml
-	$(AM_V_GEN)$(WAYLAND_SCANNER) client-header < $< > $@
-
-wayland-eglstream-protocol.c : $(WAYLAND_EGLSTREAM_DATADIR)/wayland-eglstream.xml
-	$(AM_V_GEN)$(WAYLAND_SCANNER) code < $< > $@
-wayland-eglstream-controller-protocol.c : $(WAYLAND_EGLSTREAM_DATADIR)/wayland-eglstream-controller.xml
-	$(AM_V_GEN)$(WAYLAND_SCANNER) code < $< > $@
-
-%-protocol.c : %.xml
-	$(AM_V_GEN)$(WAYLAND_SCANNER) @SCANNER_ARG@ < $< > $@
-
-%-client-protocol.h : %.xml
-	$(AM_V_GEN)$(WAYLAND_SCANNER) client-header < $< > $@
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/hw/xwayland/drm.xml b/hw/xwayland/drm.xml
deleted file mode 100644
index 5e64622..0000000
--- a/hw/xwayland/drm.xml
+++ /dev/null
@@ -1,185 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<protocol name="drm">
-
-  <copyright>
-    Copyright © 2008-2011 Kristian Høgsberg
-    Copyright © 2010-2011 Intel Corporation
-
-    Permission to use, copy, modify, distribute, and sell this
-    software and its documentation for any purpose is hereby granted
-    without fee, provided that\n the above copyright notice appear in
-    all copies and that both that copyright notice and this permission
-    notice appear in supporting documentation, and that the name of
-    the copyright holders not be used in advertising or publicity
-    pertaining to distribution of the software without specific,
-    written prior permission.  The copyright holders make no
-    representations about the suitability of this software for any
-    purpose.  It is provided "as is" without express or implied
-    warranty.
-
-    THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
-    SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
-    FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
-    SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-    WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
-    AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-    ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
-    THIS SOFTWARE.
-  </copyright>
-
-  <!-- drm support. This object is created by the server and published
-       using the display's global event. -->
-  <interface name="wl_drm" version="2">
-    <enum name="error">
-      <entry name="authenticate_fail" value="0"/>
-      <entry name="invalid_format" value="1"/>
-      <entry name="invalid_name" value="2"/>
-    </enum>
-
-    <enum name="format">
-      <!-- The drm format codes match the #defines in drm_fourcc.h.
-           The formats actually supported by the compositor will be
-           reported by the format event. -->
-      <entry name="c8" value="0x20203843"/>
-      <entry name="rgb332" value="0x38424752"/>
-      <entry name="bgr233" value="0x38524742"/>
-      <entry name="xrgb4444" value="0x32315258"/>
-      <entry name="xbgr4444" value="0x32314258"/>
-      <entry name="rgbx4444" value="0x32315852"/>
-      <entry name="bgrx4444" value="0x32315842"/>
-      <entry name="argb4444" value="0x32315241"/>
-      <entry name="abgr4444" value="0x32314241"/>
-      <entry name="rgba4444" value="0x32314152"/>
-      <entry name="bgra4444" value="0x32314142"/>
-      <entry name="xrgb1555" value="0x35315258"/>
-      <entry name="xbgr1555" value="0x35314258"/>
-      <entry name="rgbx5551" value="0x35315852"/>
-      <entry name="bgrx5551" value="0x35315842"/>
-      <entry name="argb1555" value="0x35315241"/>
-      <entry name="abgr1555" value="0x35314241"/>
-      <entry name="rgba5551" value="0x35314152"/>
-      <entry name="bgra5551" value="0x35314142"/>
-      <entry name="rgb565" value="0x36314752"/>
-      <entry name="bgr565" value="0x36314742"/>
-      <entry name="rgb888" value="0x34324752"/>
-      <entry name="bgr888" value="0x34324742"/>
-      <entry name="xrgb8888" value="0x34325258"/>
-      <entry name="xbgr8888" value="0x34324258"/>
-      <entry name="rgbx8888" value="0x34325852"/>
-      <entry name="bgrx8888" value="0x34325842"/>
-      <entry name="argb8888" value="0x34325241"/>
-      <entry name="abgr8888" value="0x34324241"/>
-      <entry name="rgba8888" value="0x34324152"/>
-      <entry name="bgra8888" value="0x34324142"/>
-      <entry name="xrgb2101010" value="0x30335258"/>
-      <entry name="xbgr2101010" value="0x30334258"/>
-      <entry name="rgbx1010102" value="0x30335852"/>
-      <entry name="bgrx1010102" value="0x30335842"/>
-      <entry name="argb2101010" value="0x30335241"/>
-      <entry name="abgr2101010" value="0x30334241"/>
-      <entry name="rgba1010102" value="0x30334152"/>
-      <entry name="bgra1010102" value="0x30334142"/>
-      <entry name="yuyv" value="0x56595559"/>
-      <entry name="yvyu" value="0x55595659"/>
-      <entry name="uyvy" value="0x59565955"/>
-      <entry name="vyuy" value="0x59555956"/>
-      <entry name="ayuv" value="0x56555941"/>
-      <entry name="nv12" value="0x3231564e"/>
-      <entry name="nv21" value="0x3132564e"/>
-      <entry name="nv16" value="0x3631564e"/>
-      <entry name="nv61" value="0x3136564e"/>
-      <entry name="yuv410" value="0x39565559"/>
-      <entry name="yvu410" value="0x39555659"/>
-      <entry name="yuv411" value="0x31315559"/>
-      <entry name="yvu411" value="0x31315659"/>
-      <entry name="yuv420" value="0x32315559"/>
-      <entry name="yvu420" value="0x32315659"/>
-      <entry name="yuv422" value="0x36315559"/>
-      <entry name="yvu422" value="0x36315659"/>
-      <entry name="yuv444" value="0x34325559"/>
-      <entry name="yvu444" value="0x34325659"/>
-    </enum>
-
-    <!-- Call this request with the magic received from drmGetMagic().
-         It will be passed on to the drmAuthMagic() or
-         DRIAuthConnection() call.  This authentication must be
-         completed before create_buffer could be used. -->
-    <request name="authenticate">
-      <arg name="id" type="uint"/>
-    </request>
-
-    <!-- Create a wayland buffer for the named DRM buffer.  The DRM
-         surface must have a name using the flink ioctl -->
-    <request name="create_buffer">
-      <arg name="id" type="new_id" interface="wl_buffer"/>
-      <arg name="name" type="uint"/>
-      <arg name="width" type="int"/>
-      <arg name="height" type="int"/>
-      <arg name="stride" type="uint"/>
-      <arg name="format" type="uint"/>
-    </request>
-
-    <!-- Create a wayland buffer for the named DRM buffer.  The DRM
-         surface must have a name using the flink ioctl -->
-    <request name="create_planar_buffer">
-      <arg name="id" type="new_id" interface="wl_buffer"/>
-      <arg name="name" type="uint"/>
-      <arg name="width" type="int"/>
-      <arg name="height" type="int"/>
-      <arg name="format" type="uint"/>
-      <arg name="offset0" type="int"/>
-      <arg name="stride0" type="int"/>
-      <arg name="offset1" type="int"/>
-      <arg name="stride1" type="int"/>
-      <arg name="offset2" type="int"/>
-      <arg name="stride2" type="int"/>
-    </request>
-
-    <!-- Notification of the path of the drm device which is used by
-         the server.  The client should use this device for creating
-         local buffers.  Only buffers created from this device should
-         be be passed to the server using this drm object's
-         create_buffer request. -->
-    <event name="device">
-      <arg name="name" type="string"/>
-    </event>
-
-    <event name="format">
-      <arg name="format" type="uint"/>
-    </event>
-
-    <!-- Raised if the authenticate request succeeded -->
-    <event name="authenticated"/>
-
-    <enum name="capability" since="2">
-      <description summary="wl_drm capability bitmask">
-        Bitmask of capabilities.
-      </description>
-      <entry name="prime" value="1" summary="wl_drm prime available"/>
-    </enum>
-
-    <event name="capabilities">
-      <arg name="value" type="uint"/>
-    </event>
-
-    <!-- Version 2 additions -->
-
-    <!-- Create a wayland buffer for the prime fd.  Use for regular and planar
-         buffers.  Pass 0 for offset and stride for unused planes. -->
-    <request name="create_prime_buffer" since="2">
-      <arg name="id" type="new_id" interface="wl_buffer"/>
-      <arg name="name" type="fd"/>
-      <arg name="width" type="int"/>
-      <arg name="height" type="int"/>
-      <arg name="format" type="uint"/>
-      <arg name="offset0" type="int"/>
-      <arg name="stride0" type="int"/>
-      <arg name="offset1" type="int"/>
-      <arg name="stride1" type="int"/>
-      <arg name="offset2" type="int"/>
-      <arg name="stride2" type="int"/>
-    </request>
-
-  </interface>
-
-</protocol>
diff --git a/hw/xwayland/meson.build b/hw/xwayland/meson.build
deleted file mode 100644
index 36bf213..0000000
--- a/hw/xwayland/meson.build
+++ /dev/null
@@ -1,103 +0,0 @@
-srcs = [
-    'xwayland.c',
-    'xwayland-input.c',
-    'xwayland-cursor.c',
-    'xwayland-shm.c',
-    'xwayland-output.c',
-    'xwayland-cvt.c',
-    'xwayland-vidmode.c',
-    '../../mi/miinitext.c',
-]
-
-scanner_dep = dependency('wayland-scanner', native: true)
-scanner = find_program(scanner_dep.get_pkgconfig_variable('wayland_scanner'))
-
-protocols_dep = dependency('wayland-protocols', version: '>= 1.8')
-protodir = protocols_dep.get_pkgconfig_variable('pkgdatadir')
-
-pointer_xml = join_paths(protodir, 'unstable', 'pointer-constraints', 'pointer-constraints-unstable-v1.xml')
-relative_xml = join_paths(protodir, 'unstable', 'relative-pointer', 'relative-pointer-unstable-v1.xml')
-tablet_xml = join_paths(protodir, 'unstable', 'tablet', 'tablet-unstable-v2.xml')
-kbgrab_xml = join_paths(protodir, 'unstable', 'xwayland-keyboard-grab', 'xwayland-keyboard-grab-unstable-v1.xml')
-xdg_output_xml = join_paths(protodir, 'unstable', 'xdg-output', 'xdg-output-unstable-v1.xml')
-dmabuf_xml = join_paths(protodir, 'unstable', 'linux-dmabuf', 'linux-dmabuf-unstable-v1.xml')
-
-client_header = generator(scanner,
-    output : '@BASENAME@-client-protocol.h',
-    arguments : ['client-header', '@INPUT@', '@OUTPUT@']
-)
-
-if scanner_dep.version().version_compare('>= 1.14.91')
-    scanner_argument = 'private-code'
-else
-    scanner_argument = 'code'
-endif
-
-code = generator(scanner,
-    output : '@BASENAME@-protocol.c',
-    arguments : [scanner_argument, '@INPUT@', '@OUTPUT@']
-)
-srcs += client_header.process(relative_xml)
-srcs += client_header.process(pointer_xml)
-srcs += client_header.process(tablet_xml)
-srcs += client_header.process(kbgrab_xml)
-srcs += client_header.process(xdg_output_xml)
-srcs += client_header.process(dmabuf_xml)
-srcs += code.process(relative_xml)
-srcs += code.process(pointer_xml)
-srcs += code.process(tablet_xml)
-srcs += code.process(kbgrab_xml)
-srcs += code.process(xdg_output_xml)
-srcs += code.process(dmabuf_xml)
-
-xwayland_glamor = []
-eglstream_srcs = []
-if build_glamor
-    srcs += 'xwayland-glamor.c'
-    if gbm_dep.found()
-        srcs += 'xwayland-glamor-gbm.c'
-    endif
-    if build_eglstream
-        eglstream_protodir = eglstream_dep.get_pkgconfig_variable('pkgdatadir')
-        eglstream_xml = join_paths(eglstream_protodir, 'wayland-eglstream.xml')
-        eglstream_controller_xml = join_paths(eglstream_protodir, 'wayland-eglstream-controller.xml')
-
-        srcs += client_header.process(eglstream_xml)
-        srcs += client_header.process(eglstream_controller_xml)
-        srcs += code.process(eglstream_xml)
-        srcs += code.process(eglstream_controller_xml)
-
-        srcs += 'xwayland-glamor-eglstream.c'
-    endif
-    srcs += 'xwayland-present.c'
-    if build_xv
-        srcs += 'xwayland-glamor-xv.c'
-    endif
-
-    srcs += client_header.process('drm.xml')
-    srcs += code.process('drm.xml')
-    xwayland_dep += gbm_dep
-    xwayland_glamor += glamor
-endif
-
-executable(
-    'Xwayland',
-    srcs,
-    include_directories: inc,
-    dependencies: [
-        common_dep,
-        xwayland_dep,
-    ],
-    link_with: [
-        libxserver_main,
-        xwayland_glamor,
-        libxserver_fb,
-        libxserver,
-        libxserver_xext_vidmode,
-        libxserver_xkb_stubs,
-        libxserver_xi_stubs,
-        libxserver_glx,
-        libglxvnd,
-    ],
-    install: true,
-)
diff --git a/hw/xwayland/xwayland-cursor.c b/hw/xwayland/xwayland-cursor.c
deleted file mode 100644
index 66720bc..0000000
--- a/hw/xwayland/xwayland-cursor.c
+++ /dev/null
@@ -1,314 +0,0 @@
-/*
- * Copyright © 2014 Intel Corporation
- * Copyright © 2011 Kristian Høgsberg
- *
- * Permission to use, copy, modify, distribute, and sell this software
- * and its documentation for any purpose is hereby granted without
- * fee, provided that the above copyright notice appear in all copies
- * and that both that copyright notice and this permission notice
- * appear in supporting documentation, and that the name of the
- * copyright holders not be used in advertising or publicity
- * pertaining to distribution of the software without specific,
- * written prior permission.  The copyright holders make no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied
- * warranty.
- *
- * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
- * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
- * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#include "xwayland.h"
-
-#include <mipointer.h>
-
-static DevPrivateKeyRec xwl_cursor_private_key;
-
-static void
-expand_source_and_mask(CursorPtr cursor, CARD32 *data)
-{
-    CARD32 *p, d, fg, bg;
-    CursorBitsPtr bits = cursor->bits;
-    int x, y, stride, i, bit;
-
-    p = data;
-    fg = ((cursor->foreRed & 0xff00) << 8) |
-        (cursor->foreGreen & 0xff00) | (cursor->foreGreen >> 8);
-    bg = ((cursor->backRed & 0xff00) << 8) |
-        (cursor->backGreen & 0xff00) | (cursor->backGreen >> 8);
-    stride = BitmapBytePad(bits->width);
-    for (y = 0; y < bits->height; y++)
-        for (x = 0; x < bits->width; x++) {
-            i = y * stride + x / 8;
-            bit = 1 << (x & 7);
-            if (bits->source[i] & bit)
-                d = fg;
-            else
-                d = bg;
-            if (bits->mask[i] & bit)
-                d |= 0xff000000;
-            else
-                d = 0x00000000;
-
-            *p++ = d;
-        }
-}
-
-static Bool
-xwl_realize_cursor(DeviceIntPtr device, ScreenPtr screen, CursorPtr cursor)
-{
-    PixmapPtr pixmap;
-
-    pixmap = xwl_shm_create_pixmap(screen, cursor->bits->width,
-                                   cursor->bits->height, 32, 0);
-    dixSetPrivate(&cursor->devPrivates, &xwl_cursor_private_key, pixmap);
-
-    return TRUE;
-}
-
-static Bool
-xwl_unrealize_cursor(DeviceIntPtr device, ScreenPtr screen, CursorPtr cursor)
-{
-    PixmapPtr pixmap;
-    struct xwl_screen *xwl_screen;
-    struct xwl_seat *xwl_seat;
-
-    pixmap = dixGetPrivate(&cursor->devPrivates, &xwl_cursor_private_key);
-    if (!pixmap)
-        return TRUE;
-
-    dixSetPrivate(&cursor->devPrivates, &xwl_cursor_private_key, NULL);
-
-    /* When called from FreeCursor(), device is always NULL */
-    xwl_screen = xwl_screen_get(screen);
-    xorg_list_for_each_entry(xwl_seat, &xwl_screen->seat_list, link) {
-        if (cursor == xwl_seat->x_cursor)
-            xwl_seat->x_cursor = NULL;
-    }
-
-    return xwl_shm_destroy_pixmap(pixmap);
-}
-
-static void
-clear_cursor_frame_callback(struct xwl_cursor *xwl_cursor)
-{
-   if (xwl_cursor->frame_cb) {
-       wl_callback_destroy (xwl_cursor->frame_cb);
-       xwl_cursor->frame_cb = NULL;
-   }
-}
-
-static void
-frame_callback(void *data,
-               struct wl_callback *callback,
-               uint32_t time)
-{
-    struct xwl_cursor *xwl_cursor = data;
-
-    clear_cursor_frame_callback(xwl_cursor);
-    if (xwl_cursor->needs_update) {
-        xwl_cursor->needs_update = FALSE;
-        xwl_cursor->update_proc(xwl_cursor);
-    }
-}
-
-static const struct wl_callback_listener frame_listener = {
-    frame_callback
-};
-
-void
-xwl_seat_set_cursor(struct xwl_seat *xwl_seat)
-{
-    struct xwl_cursor *xwl_cursor = &xwl_seat->cursor;
-    PixmapPtr pixmap;
-    CursorPtr cursor;
-    int stride;
-
-    if (!xwl_seat->wl_pointer)
-        return;
-
-    if (!xwl_seat->x_cursor) {
-        wl_pointer_set_cursor(xwl_seat->wl_pointer,
-                              xwl_seat->pointer_enter_serial, NULL, 0, 0);
-        clear_cursor_frame_callback(xwl_cursor);
-        xwl_cursor->needs_update = FALSE;
-        return;
-    }
-
-    if (xwl_cursor->frame_cb) {
-        xwl_cursor->needs_update = TRUE;
-        return;
-    }
-
-    cursor = xwl_seat->x_cursor;
-    pixmap = dixGetPrivate(&cursor->devPrivates, &xwl_cursor_private_key);
-    if (!pixmap)
-        return;
-
-    stride = cursor->bits->width * 4;
-    if (cursor->bits->argb)
-        memcpy(pixmap->devPrivate.ptr,
-               cursor->bits->argb, cursor->bits->height * stride);
-    else
-        expand_source_and_mask(cursor, pixmap->devPrivate.ptr);
-
-    wl_pointer_set_cursor(xwl_seat->wl_pointer,
-                          xwl_seat->pointer_enter_serial,
-                          xwl_cursor->surface,
-                          xwl_seat->x_cursor->bits->xhot,
-                          xwl_seat->x_cursor->bits->yhot);
-    wl_surface_attach(xwl_cursor->surface,
-                      xwl_shm_pixmap_get_wl_buffer(pixmap), 0, 0);
-    wl_surface_damage(xwl_cursor->surface, 0, 0,
-                      xwl_seat->x_cursor->bits->width,
-                      xwl_seat->x_cursor->bits->height);
-
-    xwl_cursor->frame_cb = wl_surface_frame(xwl_cursor->surface);
-    wl_callback_add_listener(xwl_cursor->frame_cb, &frame_listener, xwl_cursor);
-
-    wl_surface_commit(xwl_cursor->surface);
-}
-
-void
-xwl_tablet_tool_set_cursor(struct xwl_tablet_tool *xwl_tablet_tool)
-{
-    struct xwl_seat *xwl_seat = xwl_tablet_tool->seat;
-    struct xwl_cursor *xwl_cursor = &xwl_tablet_tool->cursor;
-    PixmapPtr pixmap;
-    CursorPtr cursor;
-    int stride;
-
-    if (!xwl_seat->x_cursor) {
-        zwp_tablet_tool_v2_set_cursor(xwl_tablet_tool->tool,
-                                      xwl_tablet_tool->proximity_in_serial,
-                                      NULL, 0, 0);
-        clear_cursor_frame_callback(xwl_cursor);
-        xwl_cursor->needs_update = FALSE;
-        return;
-    }
-
-    if (xwl_cursor->frame_cb) {
-        xwl_cursor->needs_update = TRUE;
-        return;
-    }
-
-    cursor = xwl_seat->x_cursor;
-    pixmap = dixGetPrivate(&cursor->devPrivates, &xwl_cursor_private_key);
-    if (!pixmap)
-        return;
-
-    stride = cursor->bits->width * 4;
-    if (cursor->bits->argb)
-        memcpy(pixmap->devPrivate.ptr,
-               cursor->bits->argb, cursor->bits->height * stride);
-    else
-        expand_source_and_mask(cursor, pixmap->devPrivate.ptr);
-
-    zwp_tablet_tool_v2_set_cursor(xwl_tablet_tool->tool,
-                                  xwl_tablet_tool->proximity_in_serial,
-                                  xwl_cursor->surface,
-                                  xwl_seat->x_cursor->bits->xhot,
-                                  xwl_seat->x_cursor->bits->yhot);
-    wl_surface_attach(xwl_cursor->surface,
-                      xwl_shm_pixmap_get_wl_buffer(pixmap), 0, 0);
-    wl_surface_damage(xwl_cursor->surface, 0, 0,
-                      xwl_seat->x_cursor->bits->width,
-                      xwl_seat->x_cursor->bits->height);
-
-    xwl_cursor->frame_cb = wl_surface_frame(xwl_cursor->surface);
-    wl_callback_add_listener(xwl_cursor->frame_cb, &frame_listener, xwl_cursor);
-
-    wl_surface_commit(xwl_cursor->surface);
-}
-
-static void
-xwl_set_cursor(DeviceIntPtr device,
-               ScreenPtr screen, CursorPtr cursor, int x, int y)
-{
-    struct xwl_seat *xwl_seat;
-    struct xwl_tablet_tool *xwl_tablet_tool;
-    Bool cursor_visibility_changed;
-
-    xwl_seat = device->public.devicePrivate;
-    if (xwl_seat == NULL)
-        return;
-
-    cursor_visibility_changed = !!xwl_seat->x_cursor ^ !!cursor;
-
-    xwl_seat->x_cursor = cursor;
-
-    if (cursor_visibility_changed)
-        xwl_seat_cursor_visibility_changed(xwl_seat);
-
-    xwl_seat_set_cursor(xwl_seat);
-
-    xorg_list_for_each_entry(xwl_tablet_tool, &xwl_seat->tablet_tools, link) {
-        if (xwl_tablet_tool->proximity_in_serial != 0)
-            xwl_tablet_tool_set_cursor(xwl_tablet_tool);
-    }
-}
-
-static void
-xwl_move_cursor(DeviceIntPtr device, ScreenPtr screen, int x, int y)
-{
-}
-
-static Bool
-xwl_device_cursor_initialize(DeviceIntPtr device, ScreenPtr screen)
-{
-    return TRUE;
-}
-
-static void
-xwl_device_cursor_cleanup(DeviceIntPtr device, ScreenPtr screen)
-{
-}
-
-static miPointerSpriteFuncRec xwl_pointer_sprite_funcs = {
-    xwl_realize_cursor,
-    xwl_unrealize_cursor,
-    xwl_set_cursor,
-    xwl_move_cursor,
-    xwl_device_cursor_initialize,
-    xwl_device_cursor_cleanup
-};
-
-static Bool
-xwl_cursor_off_screen(ScreenPtr *ppScreen, int *x, int *y)
-{
-    return FALSE;
-}
-
-static void
-xwl_cross_screen(ScreenPtr pScreen, Bool entering)
-{
-}
-
-static void
-xwl_pointer_warp_cursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y)
-{
-    miPointerWarpCursor(pDev, pScreen, x, y);
-}
-
-static miPointerScreenFuncRec xwl_pointer_screen_funcs = {
-    xwl_cursor_off_screen,
-    xwl_cross_screen,
-    xwl_pointer_warp_cursor
-};
-
-Bool
-xwl_screen_init_cursor(struct xwl_screen *xwl_screen)
-{
-    if (!dixRegisterPrivateKey(&xwl_cursor_private_key, PRIVATE_CURSOR_BITS, 0))
-        return FALSE;
-
-    return miPointerInitialize(xwl_screen->screen,
-                               &xwl_pointer_sprite_funcs,
-                               &xwl_pointer_screen_funcs, TRUE);
-}
diff --git a/hw/xwayland/xwayland-cvt.c b/hw/xwayland/xwayland-cvt.c
deleted file mode 100644
index 8564fdb..0000000
--- a/hw/xwayland/xwayland-cvt.c
+++ /dev/null
@@ -1,311 +0,0 @@
-/* Copied from hw/xfree86/modes/xf86cvt.c into xwayland DDX and
- * changed to generate an RRMode */
-
-/*
- * Copyright 2005-2006 Luc Verhaegen.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/*
- * The reason for having this function in a file of its own is
- * so that ../utils/cvt/cvt can link to it, and that xf86CVTMode
- * code is shared directly.
- */
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <string.h>
-#include <randrstr.h>
-#include "xwayland.h"
-
-/*
- * Generate a CVT standard mode from HDisplay, VDisplay and VRefresh.
- *
- * These calculations are stolen from the CVT calculation spreadsheet written
- * by Graham Loveridge. He seems to be claiming no copyright and there seems to
- * be no license attached to this. He apparently just wants to see his name
- * mentioned.
- *
- * This file can be found at http://www.vesa.org/Public/CVT/CVTd6r1.xls
- *
- * Comments and structure corresponds to the comments and structure of the xls.
- * This should ease importing of future changes to the standard (not very
- * likely though).
- *
- * About margins; i'm sure that they are to be the bit between HDisplay and
- * HBlankStart, HBlankEnd and HTotal, VDisplay and VBlankStart, VBlankEnd and
- * VTotal, where the overscan colour is shown. FB seems to call _all_ blanking
- * outside sync "margin" for some reason. Since we prefer seeing proper
- * blanking instead of the overscan colour, and since the Crtc* values will
- * probably get altered after us, we will disable margins altogether. With
- * these calculations, Margins will plainly expand H/VDisplay, and we don't
- * want that. -- libv
- *
- */
-RRModePtr
-xwayland_cvt(int HDisplay, int VDisplay, float VRefresh, Bool Reduced,
-             Bool Interlaced)
-{
-    /* 1) top/bottom margin size (% of height) - default: 1.8 */
-#define CVT_MARGIN_PERCENTAGE 1.8
-
-    /* 2) character cell horizontal granularity (pixels) - default 8 */
-#define CVT_H_GRANULARITY 8
-
-    /* 4) Minimum vertical porch (lines) - default 3 */
-#define CVT_MIN_V_PORCH 3
-
-    /* 4) Minimum number of vertical back porch lines - default 6 */
-#define CVT_MIN_V_BPORCH 6
-
-    /* Pixel Clock step (kHz) */
-#define CVT_CLOCK_STEP 250
-
-    Bool Margins = FALSE;
-    float VFieldRate, HPeriod;
-    int HDisplayRnd, HMargin;
-    int VDisplayRnd, VMargin, VSync;
-    float Interlace;            /* Please rename this */
-    char name[128];
-    xRRModeInfo modeinfo;
-
-    memset(&modeinfo, 0, sizeof modeinfo);
-
-    /* CVT default is 60.0Hz */
-    if (!VRefresh)
-        VRefresh = 60.0;
-
-    /* 1. Required field rate */
-    if (Interlaced)
-        VFieldRate = VRefresh * 2;
-    else
-        VFieldRate = VRefresh;
-
-    /* 2. Horizontal pixels */
-    HDisplayRnd = HDisplay - (HDisplay % CVT_H_GRANULARITY);
-
-    /* 3. Determine left and right borders */
-    if (Margins) {
-        /* right margin is actually exactly the same as left */
-        HMargin = (((float) HDisplayRnd) * CVT_MARGIN_PERCENTAGE / 100.0);
-        HMargin -= HMargin % CVT_H_GRANULARITY;
-    }
-    else
-        HMargin = 0;
-
-    /* 4. Find total active pixels */
-    modeinfo.width = HDisplayRnd + 2 * HMargin;
-
-    /* 5. Find number of lines per field */
-    if (Interlaced)
-        VDisplayRnd = VDisplay / 2;
-    else
-        VDisplayRnd = VDisplay;
-
-    /* 6. Find top and bottom margins */
-    /* nope. */
-    if (Margins)
-        /* top and bottom margins are equal again. */
-        VMargin = (((float) VDisplayRnd) * CVT_MARGIN_PERCENTAGE / 100.0);
-    else
-        VMargin = 0;
-
-    modeinfo.height = VDisplay + 2 * VMargin;
-
-    /* 7. Interlace */
-    if (Interlaced)
-        Interlace = 0.5;
-    else
-        Interlace = 0.0;
-
-    /* Determine VSync Width from aspect ratio */
-    if (!(VDisplay % 3) && ((VDisplay * 4 / 3) == HDisplay))
-        VSync = 4;
-    else if (!(VDisplay % 9) && ((VDisplay * 16 / 9) == HDisplay))
-        VSync = 5;
-    else if (!(VDisplay % 10) && ((VDisplay * 16 / 10) == HDisplay))
-        VSync = 6;
-    else if (!(VDisplay % 4) && ((VDisplay * 5 / 4) == HDisplay))
-        VSync = 7;
-    else if (!(VDisplay % 9) && ((VDisplay * 15 / 9) == HDisplay))
-        VSync = 7;
-    else                        /* Custom */
-        VSync = 10;
-
-    if (!Reduced) {             /* simplified GTF calculation */
-
-        /* 4) Minimum time of vertical sync + back porch interval (µs)
-         * default 550.0 */
-#define CVT_MIN_VSYNC_BP 550.0
-
-        /* 3) Nominal HSync width (% of line period) - default 8 */
-#define CVT_HSYNC_PERCENTAGE 8
-
-        float HBlankPercentage;
-        int VSyncAndBackPorch, VBackPorch;
-        int HBlank;
-
-        /* 8. Estimated Horizontal period */
-        HPeriod = ((float) (1000000.0 / VFieldRate - CVT_MIN_VSYNC_BP)) /
-            (VDisplayRnd + 2 * VMargin + CVT_MIN_V_PORCH + Interlace);
-
-        /* 9. Find number of lines in sync + backporch */
-        if (((int) (CVT_MIN_VSYNC_BP / HPeriod) + 1) <
-            (VSync + CVT_MIN_V_PORCH))
-            VSyncAndBackPorch = VSync + CVT_MIN_V_PORCH;
-        else
-            VSyncAndBackPorch = (int) (CVT_MIN_VSYNC_BP / HPeriod) + 1;
-
-        /* 10. Find number of lines in back porch */
-        VBackPorch = VSyncAndBackPorch - VSync;
-        (void) VBackPorch;
-
-        /* 11. Find total number of lines in vertical field */
-        modeinfo.vTotal =
-            VDisplayRnd + 2 * VMargin + VSyncAndBackPorch + Interlace +
-            CVT_MIN_V_PORCH;
-
-        /* 5) Definition of Horizontal blanking time limitation */
-        /* Gradient (%/kHz) - default 600 */
-#define CVT_M_FACTOR 600
-
-        /* Offset (%) - default 40 */
-#define CVT_C_FACTOR 40
-
-        /* Blanking time scaling factor - default 128 */
-#define CVT_K_FACTOR 128
-
-        /* Scaling factor weighting - default 20 */
-#define CVT_J_FACTOR 20
-
-#define CVT_M_PRIME CVT_M_FACTOR * CVT_K_FACTOR / 256
-#define CVT_C_PRIME (CVT_C_FACTOR - CVT_J_FACTOR) * CVT_K_FACTOR / 256 + \
-        CVT_J_FACTOR
-
-        /* 12. Find ideal blanking duty cycle from formula */
-        HBlankPercentage = CVT_C_PRIME - CVT_M_PRIME * HPeriod / 1000.0;
-
-        /* 13. Blanking time */
-        if (HBlankPercentage < 20)
-            HBlankPercentage = 20;
-
-        HBlank = modeinfo.width * HBlankPercentage / (100.0 - HBlankPercentage);
-        HBlank -= HBlank % (2 * CVT_H_GRANULARITY);
-
-        /* 14. Find total number of pixels in a line. */
-        modeinfo.hTotal = modeinfo.width + HBlank;
-
-        /* Fill in HSync values */
-        modeinfo.hSyncEnd = modeinfo.width + HBlank / 2;
-
-        modeinfo.hSyncStart = modeinfo.hSyncEnd -
-            (modeinfo.hTotal * CVT_HSYNC_PERCENTAGE) / 100;
-        modeinfo.hSyncStart += CVT_H_GRANULARITY -
-            modeinfo.hSyncStart % CVT_H_GRANULARITY;
-
-        /* Fill in VSync values */
-        modeinfo.vSyncStart = modeinfo.height + CVT_MIN_V_PORCH;
-        modeinfo.vSyncEnd = modeinfo.vSyncStart + VSync;
-
-    }
-    else {                      /* Reduced blanking */
-        /* Minimum vertical blanking interval time (µs) - default 460 */
-#define CVT_RB_MIN_VBLANK 460.0
-
-        /* Fixed number of clocks for horizontal sync */
-#define CVT_RB_H_SYNC 32.0
-
-        /* Fixed number of clocks for horizontal blanking */
-#define CVT_RB_H_BLANK 160.0
-
-        /* Fixed number of lines for vertical front porch - default 3 */
-#define CVT_RB_VFPORCH 3
-
-        int VBILines;
-
-        /* 8. Estimate Horizontal period. */
-        HPeriod = ((float) (1000000.0 / VFieldRate - CVT_RB_MIN_VBLANK)) /
-            (VDisplayRnd + 2 * VMargin);
-
-        /* 9. Find number of lines in vertical blanking */
-        VBILines = ((float) CVT_RB_MIN_VBLANK) / HPeriod + 1;
-
-        /* 10. Check if vertical blanking is sufficient */
-        if (VBILines < (CVT_RB_VFPORCH + VSync + CVT_MIN_V_BPORCH))
-            VBILines = CVT_RB_VFPORCH + VSync + CVT_MIN_V_BPORCH;
-
-        /* 11. Find total number of lines in vertical field */
-        modeinfo.vTotal = VDisplayRnd + 2 * VMargin + Interlace + VBILines;
-
-        /* 12. Find total number of pixels in a line */
-        modeinfo.hTotal = modeinfo.width + CVT_RB_H_BLANK;
-
-        /* Fill in HSync values */
-        modeinfo.hSyncEnd = modeinfo.width + CVT_RB_H_BLANK / 2;
-        modeinfo.hSyncStart = modeinfo.hSyncEnd - CVT_RB_H_SYNC;
-
-        /* Fill in VSync values */
-        modeinfo.vSyncStart = modeinfo.height + CVT_RB_VFPORCH;
-        modeinfo.vSyncEnd = modeinfo.vSyncStart + VSync;
-    }
-
-    /* 15/13. Find pixel clock frequency (kHz for xf86) */
-    modeinfo.dotClock = modeinfo.hTotal * 1000.0 / HPeriod;
-    modeinfo.dotClock -= modeinfo.dotClock % CVT_CLOCK_STEP;
-    modeinfo.dotClock *= 1000.0;
-#if 0
-    /* 16/14. Find actual Horizontal Frequency (kHz) */
-    modeinfo.hSync = ((float) modeinfo.dotClock) / ((float) modeinfo.hTotal);
-#endif
-
-#if 0
-    /* 17/15. Find actual Field rate */
-    modeinfo.vRefresh = (1000.0 * ((float) modeinfo.dotClock)) /
-        ((float) (modeinfo.hTotal * modeinfo.vTotal));
-#endif
-
-    /* 18/16. Find actual vertical frame frequency */
-    /* ignore - just set the mode flag for interlaced */
-    if (Interlaced)
-        modeinfo.vTotal *= 2;
-
-    if (Reduced)
-        modeinfo.modeFlags |= RR_HSyncPositive | RR_VSyncNegative;
-    else
-        modeinfo.modeFlags |= RR_HSyncNegative | RR_VSyncPositive;
-
-    if (Interlaced)
-        modeinfo.modeFlags |= RR_Interlace;
-
-    /* FWXGA hack adapted from hw/xfree86/modes/xf86EdidModes.c, because you can't say 1366 */
-    if (HDisplay == 1366 && VDisplay == 768) {
-         modeinfo.width = 1366;
-         modeinfo.hSyncStart--;
-         modeinfo.hSyncEnd--;
-    }
-
-    snprintf(name, sizeof name, "%dx%d",
-             modeinfo.width, modeinfo.height);
-    modeinfo.nameLength = strlen(name);
-
-    return RRModeGet(&modeinfo, name);
-}
diff --git a/hw/xwayland/xwayland-glamor-eglstream.c b/hw/xwayland/xwayland-glamor-eglstream.c
deleted file mode 100644
index 0c32fff..0000000
--- a/hw/xwayland/xwayland-glamor-eglstream.c
+++ /dev/null
@@ -1,933 +0,0 @@
-/*
- * Copyright © 2017 Red Hat Inc.
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use, copy,
- * modify, merge, publish, distribute, sublicense, and/or sell copies
- * of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including
- * the next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT.  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Authors:
- *    Lyude Paul <lyude@redhat.com>
- *
- */
-
-#include "xwayland.h"
-
-#include "wayland-eglstream-client-protocol.h"
-#include "wayland-eglstream-controller-client-protocol.h"
-
-#define MESA_EGL_NO_X11_HEADERS
-#define EGL_NO_X11
-#include <glamor_egl.h>
-#include <glamor.h>
-#include <glamor_transform.h>
-#include <glamor_transfer.h>
-
-#include <xf86drm.h>
-
-#include <epoxy/egl.h>
-
-struct xwl_eglstream_pending_stream {
-    PixmapPtr pixmap;
-    WindowPtr window;
-
-    struct xwl_pixmap *xwl_pixmap;
-    struct wl_callback *cb;
-
-    Bool is_valid;
-
-    struct xorg_list link;
-};
-
-struct xwl_eglstream_private {
-    EGLDeviceEXT egl_device;
-    struct wl_eglstream_display *display;
-    struct wl_eglstream_controller *controller;
-    uint32_t display_caps;
-
-    EGLConfig config;
-
-    SetWindowPixmapProcPtr SetWindowPixmap;
-
-    struct xorg_list pending_streams;
-
-    Bool have_egl_damage;
-
-    GLint blit_prog;
-    GLuint blit_vao;
-    GLuint blit_vbo;
-    GLuint blit_is_rgba_pos;
-};
-
-struct xwl_pixmap {
-    struct wl_buffer *buffer;
-    struct xwl_screen *xwl_screen;
-
-    /* The stream and associated resources have their own lifetime seperate
-     * from the pixmap's */
-    int refcount;
-
-    EGLStreamKHR stream;
-    EGLSurface surface;
-};
-
-static DevPrivateKeyRec xwl_eglstream_private_key;
-static DevPrivateKeyRec xwl_eglstream_window_private_key;
-
-static inline struct xwl_eglstream_private *
-xwl_eglstream_get(struct xwl_screen *xwl_screen)
-{
-    return dixLookupPrivate(&xwl_screen->screen->devPrivates,
-                            &xwl_eglstream_private_key);
-}
-
-static inline struct xwl_eglstream_pending_stream *
-xwl_eglstream_window_get_pending(WindowPtr window)
-{
-    return dixLookupPrivate(&window->devPrivates,
-                            &xwl_eglstream_window_private_key);
-}
-
-static inline void
-xwl_eglstream_window_set_pending(WindowPtr window,
-                                 struct xwl_eglstream_pending_stream *stream)
-{
-    dixSetPrivate(&window->devPrivates,
-                  &xwl_eglstream_window_private_key, stream);
-}
-
-static GLint
-xwl_eglstream_compile_glsl_prog(GLenum type, const char *source)
-{
-    GLint ok;
-    GLint prog;
-
-    prog = glCreateShader(type);
-    glShaderSource(prog, 1, (const GLchar **) &source, NULL);
-    glCompileShader(prog);
-    glGetShaderiv(prog, GL_COMPILE_STATUS, &ok);
-    if (!ok) {
-        GLchar *info;
-        GLint size;
-
-        glGetShaderiv(prog, GL_INFO_LOG_LENGTH, &size);
-        info = malloc(size);
-        if (info) {
-            glGetShaderInfoLog(prog, size, NULL, info);
-            ErrorF("Failed to compile %s: %s\n",
-                   type == GL_FRAGMENT_SHADER ? "FS" : "VS", info);
-            ErrorF("Program source:\n%s", source);
-            free(info);
-        }
-        else
-            ErrorF("Failed to get shader compilation info.\n");
-        FatalError("GLSL compile failure\n");
-    }
-
-    return prog;
-}
-
-static GLuint
-xwl_eglstream_build_glsl_prog(GLuint vs, GLuint fs)
-{
-    GLint ok;
-    GLuint prog;
-
-    prog = glCreateProgram();
-    glAttachShader(prog, vs);
-    glAttachShader(prog, fs);
-
-    glLinkProgram(prog);
-    glGetProgramiv(prog, GL_LINK_STATUS, &ok);
-    if (!ok) {
-        GLchar *info;
-        GLint size;
-
-        glGetProgramiv(prog, GL_INFO_LOG_LENGTH, &size);
-        info = malloc(size);
-
-        glGetProgramInfoLog(prog, size, NULL, info);
-        ErrorF("Failed to link: %s\n", info);
-        FatalError("GLSL link failure\n");
-    }
-
-    return prog;
-}
-
-static void
-xwl_eglstream_cleanup(struct xwl_screen *xwl_screen)
-{
-    struct xwl_eglstream_private *xwl_eglstream =
-        xwl_eglstream_get(xwl_screen);
-
-    if (xwl_eglstream->display)
-        wl_eglstream_display_destroy(xwl_eglstream->display);
-    if (xwl_eglstream->controller)
-        wl_eglstream_controller_destroy(xwl_eglstream->controller);
-    if (xwl_eglstream->blit_prog) {
-        glDeleteProgram(xwl_eglstream->blit_prog);
-        glDeleteBuffers(1, &xwl_eglstream->blit_vbo);
-    }
-
-    free(xwl_eglstream);
-}
-
-static Bool
-xwl_glamor_egl_supports_device_probing(void)
-{
-    return epoxy_has_egl_extension(NULL, "EGL_EXT_device_base");
-}
-
-static void **
-xwl_glamor_egl_get_devices(int *num_devices)
-{
-    EGLDeviceEXT *devices, *tmp;
-    Bool ret;
-    int drm_dev_count = 0;
-    int i;
-
-    if (!xwl_glamor_egl_supports_device_probing())
-        return NULL;
-
-    /* Get the number of devices */
-    ret = eglQueryDevicesEXT(0, NULL, num_devices);
-    if (!ret || *num_devices < 1)
-        return NULL;
-
-    devices = calloc(*num_devices, sizeof(EGLDeviceEXT));
-    if (!devices)
-        return NULL;
-
-    ret = eglQueryDevicesEXT(*num_devices, devices, num_devices);
-    if (!ret)
-        goto error;
-
-    /* We're only ever going to care about devices that support
-     * EGL_EXT_device_drm, so filter out the ones that don't
-     */
-    for (i = 0; i < *num_devices; i++) {
-        const char *extension_str =
-            eglQueryDeviceStringEXT(devices[i], EGL_EXTENSIONS);
-
-        if (!epoxy_extension_in_string(extension_str, "EGL_EXT_device_drm"))
-            continue;
-
-        devices[drm_dev_count++] = devices[i];
-    }
-    if (!drm_dev_count)
-        goto error;
-
-    *num_devices = drm_dev_count;
-    tmp = realloc(devices, sizeof(EGLDeviceEXT) * drm_dev_count);
-    if (!tmp)
-        goto error;
-
-    devices = tmp;
-
-    return devices;
-
-error:
-    free(devices);
-
-    return NULL;
-}
-
-static Bool
-xwl_glamor_egl_device_has_egl_extensions(void *device,
-                                         const char **ext_list, size_t size)
-{
-    EGLDisplay egl_display;
-    int i;
-    Bool has_exts = TRUE;
-
-    egl_display = glamor_egl_get_display(EGL_PLATFORM_DEVICE_EXT, device);
-    if (!egl_display || !eglInitialize(egl_display, NULL, NULL))
-        return FALSE;
-
-    for (i = 0; i < size; i++) {
-        if (!epoxy_has_egl_extension(egl_display, ext_list[i])) {
-            has_exts = FALSE;
-            break;
-        }
-    }
-
-    eglTerminate(egl_display);
-    return has_exts;
-}
-
-static void
-xwl_eglstream_unref_pixmap_stream(struct xwl_pixmap *xwl_pixmap)
-{
-    struct xwl_screen *xwl_screen = xwl_pixmap->xwl_screen;
-
-    if (--xwl_pixmap->refcount >= 1)
-        return;
-
-    /* If we're using this stream in the current egl context, unbind it so the
-     * driver doesn't keep it around until the next eglMakeCurrent()
-     * don't have to keep it around until something else changes the surface
-     */
-    xwl_glamor_egl_make_current(xwl_screen);
-    if (eglGetCurrentSurface(EGL_READ) == xwl_pixmap->surface ||
-        eglGetCurrentSurface(EGL_DRAW) == xwl_pixmap->surface) {
-        eglMakeCurrent(xwl_screen->egl_display,
-                       EGL_NO_SURFACE, EGL_NO_SURFACE,
-                       xwl_screen->egl_context);
-    }
-
-    if (xwl_pixmap->surface)
-        eglDestroySurface(xwl_screen->egl_display, xwl_pixmap->surface);
-
-    eglDestroyStreamKHR(xwl_screen->egl_display, xwl_pixmap->stream);
-
-    wl_buffer_destroy(xwl_pixmap->buffer);
-    free(xwl_pixmap);
-}
-
-static Bool
-xwl_glamor_eglstream_destroy_pixmap(PixmapPtr pixmap)
-{
-    struct xwl_pixmap *xwl_pixmap = xwl_pixmap_get(pixmap);
-
-    if (xwl_pixmap && pixmap->refcnt == 1)
-        xwl_eglstream_unref_pixmap_stream(xwl_pixmap);
-
-    return glamor_destroy_pixmap(pixmap);
-}
-
-static struct wl_buffer *
-xwl_glamor_eglstream_get_wl_buffer_for_pixmap(PixmapPtr pixmap,
-                                              Bool *created)
-{
-    /* XXX created? */
-    return xwl_pixmap_get(pixmap)->buffer;
-}
-
-static void
-xwl_eglstream_set_window_pixmap(WindowPtr window, PixmapPtr pixmap)
-{
-    struct xwl_screen *xwl_screen = xwl_screen_get(window->drawable.pScreen);
-    struct xwl_eglstream_private *xwl_eglstream =
-        xwl_eglstream_get(xwl_screen);
-    struct xwl_eglstream_pending_stream *pending;
-
-    pending = xwl_eglstream_window_get_pending(window);
-    if (pending) {
-        /* The pixmap for this window has changed before the compositor
-         * finished attaching the consumer for the window's pixmap's original
-         * eglstream. A producer can no longer be attached, so the stream's
-         * useless
-         */
-        pending->is_valid = FALSE;
-
-        /* The compositor may still be using the stream, so we can't destroy
-         * it yet. We'll only have a guarantee that the stream is safe to
-         * destroy once we receive the pending wl_display_sync() for this
-         * stream
-         */
-        pending->xwl_pixmap->refcount++;
-    }
-
-    xwl_screen->screen->SetWindowPixmap = xwl_eglstream->SetWindowPixmap;
-    (*xwl_screen->screen->SetWindowPixmap)(window, pixmap);
-    xwl_eglstream->SetWindowPixmap = xwl_screen->screen->SetWindowPixmap;
-    xwl_screen->screen->SetWindowPixmap = xwl_eglstream_set_window_pixmap;
-}
-
-/* Because we run asynchronously with our wayland compositor, it's possible
- * that an X client event could cause us to begin creating a stream for a
- * pixmap/window combo before the stream for the pixmap this window
- * previously used has been fully initialized. An example:
- *
- * - Start processing X client events.
- * - X window receives resize event, causing us to create a new pixmap and
- *   begin creating the corresponding eglstream. This pixmap is known as
- *   pixmap A.
- * - X window receives another resize event, and again changes it's current
- *   pixmap causing us to create another corresponding eglstream for the same
- *   window. This pixmap is known as pixmap B.
- * - Start handling events from the wayland compositor.
- *
- * Since both pixmap A and B will have scheduled wl_display_sync events to
- * indicate when their respective streams are connected, we will receive each
- * callback in the original order the pixmaps were created. This means the
- * following would happen:
- *
- * - Receive pixmap A's stream callback, attach it's stream to the surface of
- *   the window that just orphaned it.
- * - Receive pixmap B's stream callback, fall over and fail because the
- *   window's surface now incorrectly has pixmap A's stream attached to it.
- *
- * We work around this problem by keeping a queue of pending streams, and
- * only allowing one queue entry to exist for each window. In the scenario
- * listed above, this should happen:
- *
- * - Begin processing X events...
- * - A window is resized, causing us to add an eglstream (known as eglstream
- *   A) waiting for it's consumer to finish attachment to be added to the
- *   queue.
- * - Resize on same window happens. We invalidate the previously pending
- *   stream and add another one to the pending queue (known as eglstream B).
- * - Begin processing Wayland events...
- * - Receive invalidated callback from compositor for eglstream A, destroy
- *   stream.
- * - Receive callback from compositor for eglstream B, create producer.
- * - Success!
- */
-static void
-xwl_eglstream_consumer_ready_callback(void *data,
-                                      struct wl_callback *callback,
-                                      uint32_t time)
-{
-    struct xwl_screen *xwl_screen = data;
-    struct xwl_eglstream_private *xwl_eglstream =
-        xwl_eglstream_get(xwl_screen);
-    struct xwl_pixmap *xwl_pixmap;
-    struct xwl_eglstream_pending_stream *pending;
-    Bool found = FALSE;
-
-    wl_callback_destroy(callback);
-
-    xorg_list_for_each_entry(pending, &xwl_eglstream->pending_streams, link) {
-        if (pending->cb == callback) {
-            found = TRUE;
-            break;
-        }
-    }
-    assert(found);
-
-    if (!pending->is_valid) {
-        xwl_eglstream_unref_pixmap_stream(pending->xwl_pixmap);
-        goto out;
-    }
-
-    xwl_glamor_egl_make_current(xwl_screen);
-
-    xwl_pixmap = pending->xwl_pixmap;
-    xwl_pixmap->surface = eglCreateStreamProducerSurfaceKHR(
-        xwl_screen->egl_display, xwl_eglstream->config,
-        xwl_pixmap->stream, (int[]) {
-            EGL_WIDTH,  pending->pixmap->drawable.width,
-            EGL_HEIGHT, pending->pixmap->drawable.height,
-            EGL_NONE
-        });
-
-    DebugF("eglstream: win %d completes eglstream for pixmap %p, congrats!\n",
-           pending->window->drawable.id, pending->pixmap);
-
-out:
-    xwl_eglstream_window_set_pending(pending->window, NULL);
-    xorg_list_del(&pending->link);
-    free(pending);
-}
-
-static const struct wl_callback_listener consumer_ready_listener = {
-    xwl_eglstream_consumer_ready_callback
-};
-
-static void
-xwl_eglstream_queue_pending_stream(struct xwl_screen *xwl_screen,
-                                   WindowPtr window, PixmapPtr pixmap)
-{
-    struct xwl_eglstream_private *xwl_eglstream =
-        xwl_eglstream_get(xwl_screen);
-    struct xwl_eglstream_pending_stream *pending_stream;
-
-#ifdef DEBUG
-    if (!xwl_eglstream_window_get_pending(window))
-        DebugF("eglstream: win %d begins new eglstream for pixmap %p\n",
-               window->drawable.id, pixmap);
-    else
-        DebugF("eglstream: win %d interrupts and replaces pending eglstream for pixmap %p\n",
-               window->drawable.id, pixmap);
-#endif
-
-    pending_stream = malloc(sizeof(*pending_stream));
-    pending_stream->window = window;
-    pending_stream->pixmap = pixmap;
-    pending_stream->xwl_pixmap = xwl_pixmap_get(pixmap);
-    pending_stream->is_valid = TRUE;
-    xorg_list_init(&pending_stream->link);
-    xorg_list_add(&pending_stream->link, &xwl_eglstream->pending_streams);
-    xwl_eglstream_window_set_pending(window, pending_stream);
-
-    pending_stream->cb = wl_display_sync(xwl_screen->display);
-    wl_callback_add_listener(pending_stream->cb, &consumer_ready_listener,
-                             xwl_screen);
-}
-
-static void
-xwl_eglstream_buffer_release_callback(void *data, struct wl_buffer *wl_buffer)
-{
-    xwl_eglstream_unref_pixmap_stream(data);
-}
-
-static const struct wl_buffer_listener xwl_eglstream_buffer_release_listener = {
-    xwl_eglstream_buffer_release_callback
-};
-
-static void
-xwl_eglstream_create_pending_stream(struct xwl_screen *xwl_screen,
-                                    WindowPtr window, PixmapPtr pixmap)
-{
-    struct xwl_eglstream_private *xwl_eglstream =
-        xwl_eglstream_get(xwl_screen);
-    struct xwl_pixmap *xwl_pixmap;
-    struct xwl_window *xwl_window = xwl_window_from_window(window);
-    struct wl_array stream_attribs;
-    int stream_fd = -1;
-
-    xwl_pixmap = calloc(sizeof(*xwl_pixmap), 1);
-    if (!xwl_pixmap)
-        FatalError("Not enough memory to create pixmap\n");
-    xwl_pixmap_set_private(pixmap, xwl_pixmap);
-
-    xwl_glamor_egl_make_current(xwl_screen);
-
-    xwl_pixmap->xwl_screen = xwl_screen;
-    xwl_pixmap->refcount = 1;
-    xwl_pixmap->stream = eglCreateStreamKHR(xwl_screen->egl_display, NULL);
-    stream_fd = eglGetStreamFileDescriptorKHR(xwl_screen->egl_display,
-                                              xwl_pixmap->stream);
-
-    wl_array_init(&stream_attribs);
-    xwl_pixmap->buffer =
-        wl_eglstream_display_create_stream(xwl_eglstream->display,
-                                           pixmap->drawable.width,
-                                           pixmap->drawable.height,
-                                           stream_fd,
-                                           WL_EGLSTREAM_HANDLE_TYPE_FD,
-                                           &stream_attribs);
-
-    wl_buffer_add_listener(xwl_pixmap->buffer,
-                           &xwl_eglstream_buffer_release_listener,
-                           xwl_pixmap);
-
-    wl_eglstream_controller_attach_eglstream_consumer(
-        xwl_eglstream->controller, xwl_window->surface, xwl_pixmap->buffer);
-
-    xwl_eglstream_queue_pending_stream(xwl_screen, window, pixmap);
-
-    close(stream_fd);
-}
-
-static Bool
-xwl_glamor_eglstream_allow_commits(struct xwl_window *xwl_window)
-{
-    struct xwl_screen *xwl_screen = xwl_window->xwl_screen;
-    struct xwl_eglstream_pending_stream *pending =
-        xwl_eglstream_window_get_pending(xwl_window->window);
-    PixmapPtr pixmap =
-        (*xwl_screen->screen->GetWindowPixmap)(xwl_window->window);
-    struct xwl_pixmap *xwl_pixmap = xwl_pixmap_get(pixmap);
-
-    if (xwl_pixmap) {
-        if (pending) {
-            /* Wait for the compositor to finish connecting the consumer for
-             * this eglstream */
-            if (pending->is_valid)
-                return FALSE;
-
-            /* The pixmap for this window was changed before the compositor
-             * finished connecting the eglstream for the window's previous
-             * pixmap. Begin creating a new eglstream. */
-        } else {
-            return TRUE;
-        }
-    }
-
-    /* Glamor pixmap has no backing stream yet; begin making one and disallow
-     * commits until then
-     */
-    xwl_eglstream_create_pending_stream(xwl_screen, xwl_window->window,
-                                        pixmap);
-
-    return FALSE;
-}
-
-static void
-xwl_glamor_eglstream_post_damage(struct xwl_window *xwl_window,
-                                 PixmapPtr pixmap, RegionPtr region)
-{
-    struct xwl_screen *xwl_screen = xwl_window->xwl_screen;
-    struct xwl_eglstream_private *xwl_eglstream =
-        xwl_eglstream_get(xwl_screen);
-    struct xwl_pixmap *xwl_pixmap = xwl_pixmap_get(pixmap);
-    BoxPtr box = RegionExtents(region);
-    EGLint egl_damage[] = {
-        box->x1,           box->y1,
-        box->x2 - box->x1, box->y2 - box->y1
-    };
-    GLint saved_vao;
-
-    /* Unbind the framebuffer BEFORE binding the EGLSurface, otherwise we
-     * won't actually draw to it
-     */
-    xwl_glamor_egl_make_current(xwl_screen);
-    glBindFramebuffer(GL_FRAMEBUFFER, 0);
-
-    if (eglGetCurrentSurface(EGL_READ) != xwl_pixmap->surface ||
-        eglGetCurrentSurface(EGL_DRAW) != xwl_pixmap->surface)
-        eglMakeCurrent(xwl_screen->egl_display,
-                       xwl_pixmap->surface, xwl_pixmap->surface,
-                       xwl_screen->egl_context);
-
-    /* Save current GL state */
-    glGetIntegerv(GL_VERTEX_ARRAY_BINDING, &saved_vao);
-
-    /* Setup our GL state */
-    glUseProgram(xwl_eglstream->blit_prog);
-    glViewport(0, 0, pixmap->drawable.width, pixmap->drawable.height);
-    glActiveTexture(GL_TEXTURE0);
-    glBindVertexArray(xwl_eglstream->blit_vao);
-    glBindTexture(GL_TEXTURE_2D, glamor_get_pixmap_texture(pixmap));
-
-    glUniform1i(xwl_eglstream->blit_is_rgba_pos,
-                pixmap->drawable.depth >= 32);
-
-    /* Blit rendered image into EGLStream surface */
-    glDrawBuffer(GL_BACK);
-    glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
-
-    if (xwl_eglstream->have_egl_damage)
-        eglSwapBuffersWithDamageKHR(xwl_screen->egl_display,
-                                    xwl_pixmap->surface, egl_damage, 1);
-    else
-        eglSwapBuffers(xwl_screen->egl_display, xwl_pixmap->surface);
-
-    /* Restore previous state */
-    glBindVertexArray(saved_vao);
-    glBindTexture(GL_TEXTURE_2D, 0);
-
-    /* After this we will hand off the eglstream's wl_buffer to the
-     * compositor, which will own it until it sends a release() event. */
-    xwl_pixmap->refcount++;
-}
-
-static void
-xwl_eglstream_display_handle_caps(void *data,
-                                  struct wl_eglstream_display *disp,
-                                  int32_t caps)
-{
-    xwl_eglstream_get(data)->display_caps = caps;
-}
-
-static void
-xwl_eglstream_display_handle_swapinterval_override(void *data,
-                                                   struct wl_eglstream_display *disp,
-                                                   int32_t swapinterval,
-                                                   struct wl_buffer *stream)
-{
-}
-
-const struct wl_eglstream_display_listener eglstream_display_listener = {
-    .caps = xwl_eglstream_display_handle_caps,
-    .swapinterval_override = xwl_eglstream_display_handle_swapinterval_override,
-};
-
-static Bool
-xwl_glamor_eglstream_init_wl_registry(struct xwl_screen *xwl_screen,
-                                      struct wl_registry *wl_registry,
-                                      uint32_t id, const char *name,
-                                      uint32_t version)
-{
-    struct xwl_eglstream_private *xwl_eglstream =
-        xwl_eglstream_get(xwl_screen);
-
-    if (strcmp(name, "wl_eglstream_display") == 0) {
-        xwl_eglstream->display = wl_registry_bind(
-            wl_registry, id, &wl_eglstream_display_interface, version);
-
-        wl_eglstream_display_add_listener(xwl_eglstream->display,
-                                          &eglstream_display_listener,
-                                          xwl_screen);
-        return TRUE;
-    } else if (strcmp(name, "wl_eglstream_controller") == 0) {
-        xwl_eglstream->controller = wl_registry_bind(
-            wl_registry, id, &wl_eglstream_controller_interface, version);
-        return TRUE;
-    }
-
-    /* no match */
-    return FALSE;
-}
-
-static Bool
-xwl_glamor_eglstream_has_wl_interfaces(struct xwl_screen *xwl_screen)
-{
-    struct xwl_eglstream_private *xwl_eglstream =
-        xwl_eglstream_get(xwl_screen);
-
-    if (xwl_eglstream->display == NULL) {
-        ErrorF("glamor: 'wl_eglstream_display' not supported\n");
-        return FALSE;
-    }
-
-    if (xwl_eglstream->controller == NULL) {
-        ErrorF("glamor: 'wl_eglstream_controller' not supported\n");
-        return FALSE;
-    }
-
-    return TRUE;
-}
-
-static inline void
-xwl_eglstream_init_shaders(struct xwl_screen *xwl_screen)
-{
-    struct xwl_eglstream_private *xwl_eglstream =
-        xwl_eglstream_get(xwl_screen);
-    GLint fs, vs, attrib;
-    GLuint vbo;
-
-    const char *blit_vs_src =
-        "attribute vec2 texcoord;\n"
-        "attribute vec2 position;\n"
-        "varying vec2 t;\n"
-        "void main() {\n"
-        "    t = texcoord;\n"
-        "    gl_Position = vec4(position, 0, 1);\n"
-        "}";
-
-    const char *blit_fs_src =
-        "varying vec2 t;\n"
-        "uniform sampler2D s;\n"
-        "uniform bool is_rgba;\n"
-        "void main() {\n"
-        "    if (is_rgba)\n"
-        "        gl_FragColor = texture2D(s, t);\n"
-        "    else\n"
-        "        gl_FragColor = vec4(texture2D(s, t).rgb, 1.0);\n"
-        "}";
-
-    static const float position[] = {
-        /* position */
-        -1, -1,
-         1, -1,
-         1,  1,
-        -1,  1,
-        /* texcoord */
-         0,  1,
-         1,  1,
-         1,  0,
-         0,  0,
-    };
-
-    vs = xwl_eglstream_compile_glsl_prog(GL_VERTEX_SHADER, blit_vs_src);
-    fs = xwl_eglstream_compile_glsl_prog(GL_FRAGMENT_SHADER, blit_fs_src);
-
-    xwl_eglstream->blit_prog = xwl_eglstream_build_glsl_prog(vs, fs);
-    glDeleteShader(vs);
-    glDeleteShader(fs);
-
-    /* Create the blitter's vao */
-    glGenVertexArrays(1, &xwl_eglstream->blit_vao);
-    glBindVertexArray(xwl_eglstream->blit_vao);
-
-    /* Set the data for both position and texcoord in the vbo */
-    glGenBuffers(1, &vbo);
-    glBindBuffer(GL_ARRAY_BUFFER, vbo);
-    glBufferData(GL_ARRAY_BUFFER, sizeof(position), position, GL_STATIC_DRAW);
-    xwl_eglstream->blit_vbo = vbo;
-
-    /* Define each shader attribute's data location in our vbo */
-    attrib = glGetAttribLocation(xwl_eglstream->blit_prog, "position");
-    glVertexAttribPointer(attrib, 2, GL_FLOAT, TRUE, 0, NULL);
-    glEnableVertexAttribArray(attrib);
-
-    attrib = glGetAttribLocation(xwl_eglstream->blit_prog, "texcoord");
-    glVertexAttribPointer(attrib, 2, GL_FLOAT, TRUE, 0,
-                          (void*)(sizeof(float) * 8));
-    glEnableVertexAttribArray(attrib);
-
-    /* Save the location of uniforms we'll set later */
-    xwl_eglstream->blit_is_rgba_pos =
-        glGetUniformLocation(xwl_eglstream->blit_prog, "is_rgba");
-}
-
-static Bool
-xwl_glamor_eglstream_init_egl(struct xwl_screen *xwl_screen)
-{
-    struct xwl_eglstream_private *xwl_eglstream =
-        xwl_eglstream_get(xwl_screen);
-    EGLConfig config;
-    const EGLint attrib_list[] = {
-        EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR,
-        EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR,
-        EGL_CONTEXT_MAJOR_VERSION_KHR,
-        GLAMOR_GL_CORE_VER_MAJOR,
-        EGL_CONTEXT_MINOR_VERSION_KHR,
-        GLAMOR_GL_CORE_VER_MINOR,
-        EGL_CONTEXT_PRIORITY_LEVEL_IMG, EGL_CONTEXT_PRIORITY_HIGH_IMG,
-        EGL_NONE
-    };
-    const EGLint config_attribs[] = {
-        EGL_SURFACE_TYPE, EGL_STREAM_BIT_KHR,
-        EGL_RENDERABLE_TYPE, EGL_OPENGL_BIT,
-        EGL_RED_SIZE, 8,
-        EGL_GREEN_SIZE, 8,
-        EGL_BLUE_SIZE, 8,
-        EGL_ALPHA_SIZE, 8,
-        EGL_NONE,
-    };
-    int n;
-
-    xwl_screen->egl_display = glamor_egl_get_display(
-        EGL_PLATFORM_DEVICE_EXT, xwl_eglstream->egl_device);
-    if (!xwl_screen->egl_display)
-        goto error;
-
-    if (!eglInitialize(xwl_screen->egl_display, NULL, NULL)) {
-        xwl_screen->egl_display = NULL;
-        goto error;
-    }
-
-    if (!epoxy_has_egl_extension(xwl_screen->egl_display,
-                                 "EGL_IMG_context_priority")) {
-        ErrorF("EGL_IMG_context_priority not available\n");
-        goto error;
-    }
-
-    eglChooseConfig(xwl_screen->egl_display, config_attribs, &config, 1, &n);
-    if (!n) {
-        ErrorF("No acceptable EGL configs found\n");
-        goto error;
-    }
-
-    xwl_eglstream->config = config;
-#if 0
-    xwl_screen->formats =
-        XWL_FORMAT_RGB565 | XWL_FORMAT_XRGB8888 | XWL_FORMAT_ARGB8888;
-#endif
-
-    eglBindAPI(EGL_OPENGL_API);
-    xwl_screen->egl_context = eglCreateContext(
-        xwl_screen->egl_display, config, EGL_NO_CONTEXT, attrib_list);
-    if (xwl_screen->egl_context == EGL_NO_CONTEXT) {
-        ErrorF("Failed to create main EGL context: 0x%x\n", eglGetError());
-        goto error;
-    }
-
-    if (!eglMakeCurrent(xwl_screen->egl_display,
-                        EGL_NO_SURFACE, EGL_NO_SURFACE,
-                        xwl_screen->egl_context)) {
-        ErrorF("Failed to make EGL context current\n");
-        goto error;
-    }
-
-    xwl_eglstream->have_egl_damage =
-        epoxy_has_egl_extension(xwl_screen->egl_display,
-                                "EGL_KHR_swap_buffers_with_damage");
-    if (!xwl_eglstream->have_egl_damage)
-        ErrorF("Driver lacks EGL_KHR_swap_buffers_with_damage, performance "
-               "will be affected\n");
-
-    xwl_eglstream_init_shaders(xwl_screen);
-
-    return TRUE;
-error:
-    xwl_eglstream_cleanup(xwl_screen);
-    return FALSE;
-}
-
-static Bool
-xwl_glamor_eglstream_init_screen(struct xwl_screen *xwl_screen)
-{
-    struct xwl_eglstream_private *xwl_eglstream =
-        xwl_eglstream_get(xwl_screen);
-    ScreenPtr screen = xwl_screen->screen;
-
-    /* We can just let glamor handle CreatePixmap */
-    screen->DestroyPixmap = xwl_glamor_eglstream_destroy_pixmap;
-
-    xwl_eglstream->SetWindowPixmap = screen->SetWindowPixmap;
-    screen->SetWindowPixmap = xwl_eglstream_set_window_pixmap;
-
-    if (!dixRegisterPrivateKey(&xwl_eglstream_window_private_key,
-                               PRIVATE_WINDOW, 0))
-        return FALSE;
-
-    return TRUE;
-}
-
-static EGLDeviceEXT
-xwl_eglstream_get_device(struct xwl_screen *xwl_screen)
-{
-    void **devices = NULL;
-    const char *exts[] = {
-        "EGL_KHR_stream",
-        "EGL_KHR_stream_producer_eglsurface",
-    };
-    int num_devices, i;
-    EGLDeviceEXT device = EGL_NO_DEVICE_EXT;
-
-    /* No device specified by the user, so find one ourselves */
-    devices = xwl_glamor_egl_get_devices(&num_devices);
-    if (!devices)
-        goto out;
-
-    for (i = 0; i < num_devices; i++) {
-        if (xwl_glamor_egl_device_has_egl_extensions(devices[i], exts,
-                                                     ARRAY_SIZE(exts))) {
-            device = devices[i];
-            break;
-        }
-    }
-
-    free(devices);
-out:
-    if (!device)
-        ErrorF("glamor: No eglstream capable devices found\n");
-    return device;
-}
-
-void
-xwl_glamor_init_eglstream(struct xwl_screen *xwl_screen)
-{
-    struct xwl_eglstream_private *xwl_eglstream;
-    EGLDeviceEXT egl_device;
-
-    xwl_screen->eglstream_backend.is_available = FALSE;
-    egl_device = xwl_eglstream_get_device(xwl_screen);
-    if (egl_device == EGL_NO_DEVICE_EXT)
-        return;
-
-    if (!dixRegisterPrivateKey(&xwl_eglstream_private_key, PRIVATE_SCREEN, 0))
-        return;
-
-    xwl_eglstream = calloc(sizeof(*xwl_eglstream), 1);
-    if (!xwl_eglstream) {
-        ErrorF("Failed to allocate memory required to init EGLStream support\n");
-        return;
-    }
-
-    dixSetPrivate(&xwl_screen->screen->devPrivates,
-                  &xwl_eglstream_private_key, xwl_eglstream);
-
-    xwl_eglstream->egl_device = egl_device;
-    xorg_list_init(&xwl_eglstream->pending_streams);
-
-    xwl_screen->eglstream_backend.init_egl = xwl_glamor_eglstream_init_egl;
-    xwl_screen->eglstream_backend.init_wl_registry = xwl_glamor_eglstream_init_wl_registry;
-    xwl_screen->eglstream_backend.has_wl_interfaces = xwl_glamor_eglstream_has_wl_interfaces;
-    xwl_screen->eglstream_backend.init_screen = xwl_glamor_eglstream_init_screen;
-    xwl_screen->eglstream_backend.get_wl_buffer_for_pixmap = xwl_glamor_eglstream_get_wl_buffer_for_pixmap;
-    xwl_screen->eglstream_backend.post_damage = xwl_glamor_eglstream_post_damage;
-    xwl_screen->eglstream_backend.allow_commits = xwl_glamor_eglstream_allow_commits;
-    xwl_screen->eglstream_backend.is_available = TRUE;
-}
diff --git a/hw/xwayland/xwayland-glamor-gbm.c b/hw/xwayland/xwayland-glamor-gbm.c
deleted file mode 100644
index b519492..0000000
--- a/hw/xwayland/xwayland-glamor-gbm.c
+++ /dev/null
@@ -1,1077 +0,0 @@
-/*
- * Copyright © 2011-2014 Intel Corporation
- * Copyright © 2017 Red Hat Inc.
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use, copy,
- * modify, merge, publish, distribute, sublicense, and/or sell copies
- * of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including
- * the next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT.  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Authors:
- *    Lyude Paul <lyude@redhat.com>
- *
- */
-
-#include "xwayland.h"
-
-#include <fcntl.h>
-#include <sys/stat.h>
-#include <xf86drm.h>
-#include <drm_fourcc.h>
-
-#define MESA_EGL_NO_X11_HEADERS
-#define EGL_NO_X11
-#include <gbm.h>
-#include <glamor_egl.h>
-
-#include <glamor.h>
-#include <glamor_context.h>
-#include <dri3.h>
-#include "drm-client-protocol.h"
-
-struct xwl_gbm_private {
-    char *device_name;
-    struct gbm_device *gbm;
-    struct wl_drm *drm;
-    struct zwp_linux_dmabuf_v1 *dmabuf;
-    int drm_fd;
-    int fd_render_node;
-    Bool drm_authenticated;
-    uint32_t capabilities;
-    int dmabuf_capable;
-};
-
-struct xwl_pixmap {
-    struct wl_buffer *buffer;
-    EGLImage image;
-    unsigned int texture;
-    struct gbm_bo *bo;
-};
-
-static DevPrivateKeyRec xwl_gbm_private_key;
-static DevPrivateKeyRec xwl_auth_state_private_key;
-
-static inline struct xwl_gbm_private *
-xwl_gbm_get(struct xwl_screen *xwl_screen)
-{
-    return dixLookupPrivate(&xwl_screen->screen->devPrivates,
-                            &xwl_gbm_private_key);
-}
-
-static uint32_t
-gbm_format_for_depth(int depth)
-{
-    switch (depth) {
-    case 16:
-        return GBM_FORMAT_RGB565;
-    case 24:
-        return GBM_FORMAT_XRGB8888;
-    case 30:
-        return GBM_FORMAT_ARGB2101010;
-    default:
-        ErrorF("unexpected depth: %d\n", depth);
-    case 32:
-        return GBM_FORMAT_ARGB8888;
-    }
-}
-
-static uint32_t
-wl_drm_format_for_depth(int depth)
-{
-    switch (depth) {
-    case 15:
-        return WL_DRM_FORMAT_XRGB1555;
-    case 16:
-        return WL_DRM_FORMAT_RGB565;
-    case 24:
-        return WL_DRM_FORMAT_XRGB8888;
-    case 30:
-        return WL_DRM_FORMAT_ARGB2101010;
-    default:
-        ErrorF("unexpected depth: %d\n", depth);
-    case 32:
-        return WL_DRM_FORMAT_ARGB8888;
-    }
-}
-
-static char
-is_device_path_render_node (const char *device_path)
-{
-    char is_render_node;
-    int fd;
-
-    fd = open(device_path, O_RDWR | O_CLOEXEC);
-    if (fd < 0)
-        return 0;
-
-    is_render_node = (drmGetNodeTypeFromFd(fd) == DRM_NODE_RENDER);
-    close(fd);
-
-    return is_render_node;
-}
-
-static PixmapPtr
-xwl_glamor_gbm_create_pixmap_for_bo(ScreenPtr screen, struct gbm_bo *bo,
-                                    int depth)
-{
-    PixmapPtr pixmap;
-    struct xwl_pixmap *xwl_pixmap;
-    struct xwl_screen *xwl_screen = xwl_screen_get(screen);
-
-    xwl_pixmap = malloc(sizeof *xwl_pixmap);
-    if (xwl_pixmap == NULL)
-        return NULL;
-
-    pixmap = glamor_create_pixmap(screen,
-                                  gbm_bo_get_width(bo),
-                                  gbm_bo_get_height(bo),
-                                  depth,
-                                  GLAMOR_CREATE_PIXMAP_NO_TEXTURE);
-    if (!pixmap) {
-        free(xwl_pixmap);
-        return NULL;
-    }
-
-    xwl_glamor_egl_make_current(xwl_screen);
-    xwl_pixmap->bo = bo;
-    xwl_pixmap->buffer = NULL;
-    xwl_pixmap->image = eglCreateImageKHR(xwl_screen->egl_display,
-                                          xwl_screen->egl_context,
-                                          EGL_NATIVE_PIXMAP_KHR,
-                                          xwl_pixmap->bo, NULL);
-    if (xwl_pixmap->image == EGL_NO_IMAGE_KHR)
-      goto error;
-
-    glGenTextures(1, &xwl_pixmap->texture);
-    glBindTexture(GL_TEXTURE_2D, xwl_pixmap->texture);
-    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
-    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
-
-    glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, xwl_pixmap->image);
-    if (eglGetError() != EGL_SUCCESS)
-      goto error;
-
-    glBindTexture(GL_TEXTURE_2D, 0);
-
-    glamor_set_pixmap_texture(pixmap, xwl_pixmap->texture);
-    /* `set_pixmap_texture()` may fail silently if the FBO creation failed,
-     * so we check again the texture to be sure it worked.
-     */
-    if (!glamor_get_pixmap_texture(pixmap))
-      goto error;
-
-    glamor_set_pixmap_type(pixmap, GLAMOR_TEXTURE_DRM);
-    xwl_pixmap_set_private(pixmap, xwl_pixmap);
-
-    return pixmap;
-
-error:
-    if (xwl_pixmap->image != EGL_NO_IMAGE_KHR)
-      eglDestroyImageKHR(xwl_screen->egl_display, xwl_pixmap->image);
-    if (pixmap)
-      glamor_destroy_pixmap(pixmap);
-    free(xwl_pixmap);
-
-    return NULL;
-}
-
-static PixmapPtr
-xwl_glamor_gbm_create_pixmap(ScreenPtr screen,
-                             int width, int height, int depth,
-                             unsigned int hint)
-{
-    struct xwl_screen *xwl_screen = xwl_screen_get(screen);
-    struct xwl_gbm_private *xwl_gbm = xwl_gbm_get(xwl_screen);
-    struct gbm_bo *bo;
-    PixmapPtr pixmap = NULL;
-
-    if (width > 0 && height > 0 && depth >= 15 &&
-        (hint == 0 ||
-         hint == CREATE_PIXMAP_USAGE_BACKING_PIXMAP ||
-         hint == CREATE_PIXMAP_USAGE_SHARED)) {
-        uint32_t format = gbm_format_for_depth(depth);
-
-#ifdef GBM_BO_WITH_MODIFIERS
-        if (xwl_gbm->dmabuf_capable) {
-            uint32_t num_modifiers;
-            uint64_t *modifiers = NULL;
-
-            glamor_get_modifiers(screen, format, &num_modifiers, &modifiers);
-            bo = gbm_bo_create_with_modifiers(xwl_gbm->gbm, width, height,
-                                              format, modifiers, num_modifiers);
-            free(modifiers);
-        }
-        else
-#endif
-        {
-            bo = gbm_bo_create(xwl_gbm->gbm, width, height, format,
-                               GBM_BO_USE_SCANOUT | GBM_BO_USE_RENDERING);
-        }
-
-        if (bo) {
-            pixmap = xwl_glamor_gbm_create_pixmap_for_bo(screen, bo, depth);
-
-            if (!pixmap) {
-                gbm_bo_destroy(bo);
-            }
-            else if (xwl_screen->rootless && hint == CREATE_PIXMAP_USAGE_BACKING_PIXMAP) {
-                glamor_clear_pixmap(pixmap);
-            }
-        }
-    }
-
-    if (!pixmap)
-        pixmap = glamor_create_pixmap(screen, width, height, depth, hint);
-
-    return pixmap;
-}
-
-static Bool
-xwl_glamor_gbm_destroy_pixmap(PixmapPtr pixmap)
-{
-    struct xwl_screen *xwl_screen = xwl_screen_get(pixmap->drawable.pScreen);
-    struct xwl_pixmap *xwl_pixmap = xwl_pixmap_get(pixmap);
-
-    if (xwl_pixmap && pixmap->refcnt == 1) {
-        if (xwl_pixmap->buffer)
-            wl_buffer_destroy(xwl_pixmap->buffer);
-
-        eglDestroyImageKHR(xwl_screen->egl_display, xwl_pixmap->image);
-        if (xwl_pixmap->bo)
-           gbm_bo_destroy(xwl_pixmap->bo);
-        free(xwl_pixmap);
-    }
-
-    return glamor_destroy_pixmap(pixmap);
-}
-
-static struct wl_buffer *
-xwl_glamor_gbm_get_wl_buffer_for_pixmap(PixmapPtr pixmap,
-                                        Bool *created)
-{
-    struct xwl_screen *xwl_screen = xwl_screen_get(pixmap->drawable.pScreen);
-    struct xwl_pixmap *xwl_pixmap = xwl_pixmap_get(pixmap);
-    struct xwl_gbm_private *xwl_gbm = xwl_gbm_get(xwl_screen);
-    unsigned short width = pixmap->drawable.width;
-    unsigned short height = pixmap->drawable.height;
-    uint32_t format;
-    struct xwl_format *xwl_format = NULL;
-    Bool modifier_supported = FALSE;
-    int prime_fd;
-    int num_planes;
-    uint32_t strides[4];
-    uint32_t offsets[4];
-    uint64_t modifier;
-    int i;
-
-    if (xwl_pixmap == NULL)
-       return NULL;
-
-    if (xwl_pixmap->buffer) {
-        /* Buffer already exists. Return it and inform caller if interested. */
-        if (created)
-            *created = FALSE;
-        return xwl_pixmap->buffer;
-    }
-
-    /* Buffer does not exist yet. Create now and inform caller if interested. */
-    if (created)
-        *created = TRUE;
-
-    if (!xwl_pixmap->bo)
-       return NULL;
-
-    format = wl_drm_format_for_depth(pixmap->drawable.depth);
-
-    prime_fd = gbm_bo_get_fd(xwl_pixmap->bo);
-    if (prime_fd == -1)
-        return NULL;
-
-#ifdef GBM_BO_WITH_MODIFIERS
-    num_planes = gbm_bo_get_plane_count(xwl_pixmap->bo);
-    modifier = gbm_bo_get_modifier(xwl_pixmap->bo);
-    for (i = 0; i < num_planes; i++) {
-        strides[i] = gbm_bo_get_stride_for_plane(xwl_pixmap->bo, i);
-        offsets[i] = gbm_bo_get_offset(xwl_pixmap->bo, i);
-    }
-#else
-    num_planes = 1;
-    modifier = DRM_FORMAT_MOD_INVALID;
-    strides[0] = gbm_bo_get_stride(xwl_pixmap->bo);
-    offsets[0] = 0;
-#endif
-
-    for (i = 0; i < xwl_screen->num_formats; i++) {
-       if (xwl_screen->formats[i].format == format) {
-          xwl_format = &xwl_screen->formats[i];
-          break;
-       }
-    }
-
-    if (xwl_format) {
-        for (i = 0; i < xwl_format->num_modifiers; i++) {
-            if (xwl_format->modifiers[i] == modifier) {
-                modifier_supported = TRUE;
-                break;
-            }
-        }
-    }
-
-    if (xwl_gbm->dmabuf && modifier_supported) {
-        struct zwp_linux_buffer_params_v1 *params;
-
-        params = zwp_linux_dmabuf_v1_create_params(xwl_gbm->dmabuf);
-        for (i = 0; i < num_planes; i++) {
-            zwp_linux_buffer_params_v1_add(params, prime_fd, i,
-                                           offsets[i], strides[i],
-                                           modifier >> 32, modifier & 0xffffffff);
-        }
-
-        xwl_pixmap->buffer =
-           zwp_linux_buffer_params_v1_create_immed(params, width, height,
-                                                   format, 0);
-        zwp_linux_buffer_params_v1_destroy(params);
-    } else if (num_planes == 1) {
-        xwl_pixmap->buffer =
-            wl_drm_create_prime_buffer(xwl_gbm->drm, prime_fd, width, height,
-                                       format,
-                                       0, gbm_bo_get_stride(xwl_pixmap->bo),
-                                       0, 0,
-                                       0, 0);
-    }
-
-    close(prime_fd);
-    return xwl_pixmap->buffer;
-}
-
-static void
-xwl_glamor_gbm_cleanup(struct xwl_screen *xwl_screen)
-{
-    struct xwl_gbm_private *xwl_gbm = xwl_gbm_get(xwl_screen);
-
-    if (xwl_gbm->device_name)
-        free(xwl_gbm->device_name);
-    if (xwl_gbm->drm_fd)
-        close(xwl_gbm->drm_fd);
-    if (xwl_gbm->drm)
-        wl_drm_destroy(xwl_gbm->drm);
-    if (xwl_gbm->gbm)
-        gbm_device_destroy(xwl_gbm->gbm);
-
-    free(xwl_gbm);
-}
-
-struct xwl_auth_state {
-    int fd;
-    ClientPtr client;
-    struct wl_callback *callback;
-};
-
-static void
-free_xwl_auth_state(ClientPtr pClient, struct xwl_auth_state *state)
-{
-    dixSetPrivate(&pClient->devPrivates, &xwl_auth_state_private_key, NULL);
-    if (state) {
-        wl_callback_destroy(state->callback);
-        free(state);
-    }
-}
-
-static void
-xwl_auth_state_client_callback(CallbackListPtr *pcbl, void *unused, void *data)
-{
-    NewClientInfoRec *clientinfo = (NewClientInfoRec *) data;
-    ClientPtr pClient = clientinfo->client;
-    struct xwl_auth_state *state;
-
-    switch (pClient->clientState) {
-    case ClientStateGone:
-    case ClientStateRetained:
-        state = dixLookupPrivate(&pClient->devPrivates,
-                                 &xwl_auth_state_private_key);
-        free_xwl_auth_state(pClient, state);
-        break;
-    default:
-        break;
-    }
-}
-
-static void
-sync_callback(void *data, struct wl_callback *callback, uint32_t serial)
-{
-    struct xwl_auth_state *state = data;
-    ClientPtr client = state->client;
-
-    /* if the client is gone, the callback is cancelled so it's safe to
-     * assume the client is still in ClientStateRunning at this point...
-     */
-    dri3_send_open_reply(client, state->fd);
-    AttendClient(client);
-    free_xwl_auth_state(client, state);
-}
-
-static const struct wl_callback_listener sync_listener = {
-   sync_callback
-};
-
-static int
-xwl_dri3_open_client(ClientPtr client,
-                     ScreenPtr screen,
-                     RRProviderPtr provider,
-                     int *pfd)
-{
-    struct xwl_screen *xwl_screen = xwl_screen_get(screen);
-    struct xwl_gbm_private *xwl_gbm = xwl_gbm_get(xwl_screen);
-    struct xwl_auth_state *state;
-    drm_magic_t magic;
-    int fd;
-
-    fd = open(xwl_gbm->device_name, O_RDWR | O_CLOEXEC);
-    if (fd < 0)
-        return BadAlloc;
-    if (xwl_gbm->fd_render_node) {
-        *pfd = fd;
-        return Success;
-    }
-
-    state = malloc(sizeof *state);
-    if (state == NULL) {
-        close(fd);
-        return BadAlloc;
-    }
-
-    state->client = client;
-    state->fd = fd;
-
-    if (drmGetMagic(state->fd, &magic) < 0) {
-        close(state->fd);
-        free(state);
-        return BadMatch;
-    }
-
-    wl_drm_authenticate(xwl_gbm->drm, magic);
-    state->callback = wl_display_sync(xwl_screen->display);
-    wl_callback_add_listener(state->callback, &sync_listener, state);
-    dixSetPrivate(&client->devPrivates, &xwl_auth_state_private_key, state);
-
-    IgnoreClient(client);
-
-    return Success;
-}
-
-_X_EXPORT PixmapPtr
-glamor_pixmap_from_fds(ScreenPtr screen, CARD8 num_fds, const int *fds,
-                       CARD16 width, CARD16 height,
-                       const CARD32 *strides, const CARD32 *offsets,
-                       CARD8 depth, CARD8 bpp, uint64_t modifier)
-{
-    struct xwl_screen *xwl_screen = xwl_screen_get(screen);
-    struct xwl_gbm_private *xwl_gbm = xwl_gbm_get(xwl_screen);
-    struct gbm_bo *bo = NULL;
-    PixmapPtr pixmap;
-    int i;
-
-    if (width == 0 || height == 0 || num_fds == 0 ||
-        depth < 15 || bpp != BitsPerPixel(depth) ||
-        strides[0] < width * bpp / 8)
-       goto error;
-
-    if (xwl_gbm->dmabuf_capable && modifier != DRM_FORMAT_MOD_INVALID) {
-#ifdef GBM_BO_WITH_MODIFIERS
-       struct gbm_import_fd_modifier_data data;
-
-       data.width = width;
-       data.height = height;
-       data.num_fds = num_fds;
-       data.format = gbm_format_for_depth(depth);
-       data.modifier = modifier;
-       for (i = 0; i < num_fds; i++) {
-          data.fds[i] = fds[i];
-          data.strides[i] = strides[i];
-          data.offsets[i] = offsets[i];
-       }
-       bo = gbm_bo_import(xwl_gbm->gbm, GBM_BO_IMPORT_FD_MODIFIER, &data,
-                          GBM_BO_USE_RENDERING);
-#endif
-    } else if (num_fds == 1) {
-       struct gbm_import_fd_data data;
-
-       data.fd = fds[0];
-       data.width = width;
-       data.height = height;
-       data.stride = strides[0];
-       data.format = gbm_format_for_depth(depth);
-       bo = gbm_bo_import(xwl_gbm->gbm, GBM_BO_IMPORT_FD, &data,
-                          GBM_BO_USE_RENDERING);
-    } else {
-       goto error;
-    }
-
-    if (bo == NULL)
-       goto error;
-
-    pixmap = xwl_glamor_gbm_create_pixmap_for_bo(screen, bo, depth);
-    if (pixmap == NULL) {
-       gbm_bo_destroy(bo);
-       goto error;
-    }
-
-    return pixmap;
-
-error:
-    return NULL;
-}
-
-_X_EXPORT int
-glamor_egl_fds_from_pixmap(ScreenPtr screen, PixmapPtr pixmap, int *fds,
-                           uint32_t *strides, uint32_t *offsets,
-                           uint64_t *modifier)
-{
-    struct xwl_pixmap *xwl_pixmap;
-#ifdef GBM_BO_WITH_MODIFIERS
-    uint32_t num_fds;
-    int i;
-#endif
-
-    xwl_pixmap = xwl_pixmap_get(pixmap);
-
-    if (xwl_pixmap == NULL)
-       return 0;
-
-    if (!xwl_pixmap->bo)
-       return 0;
-
-#ifdef GBM_BO_WITH_MODIFIERS
-    num_fds = gbm_bo_get_plane_count(xwl_pixmap->bo);
-    *modifier = gbm_bo_get_modifier(xwl_pixmap->bo);
-
-    for (i = 0; i < num_fds; i++) {
-        fds[i] = gbm_bo_get_fd(xwl_pixmap->bo);
-        strides[i] = gbm_bo_get_stride_for_plane(xwl_pixmap->bo, i);
-        offsets[i] = gbm_bo_get_offset(xwl_pixmap->bo, i);
-    }
-
-    return num_fds;
-#else
-    *modifier = DRM_FORMAT_MOD_INVALID;
-    fds[0] = gbm_bo_get_fd(xwl_pixmap->bo);
-    strides[0] = gbm_bo_get_stride(xwl_pixmap->bo);
-    offsets[0] = 0;
-    return 1;
-#endif
-}
-
-/* Not actually used, just defined here so there's something for
- * _glamor_egl_fds_from_pixmap() to link against
- */
-_X_EXPORT int
-glamor_egl_fd_from_pixmap(ScreenPtr screen, PixmapPtr pixmap,
-                          CARD16 *stride, CARD32 *size)
-{
-    return -1;
-}
-
-_X_EXPORT Bool
-glamor_get_formats(ScreenPtr screen,
-                   CARD32 *num_formats, CARD32 **formats)
-{
-    struct xwl_screen *xwl_screen = xwl_screen_get(screen);
-    struct xwl_gbm_private *xwl_gbm = xwl_gbm_get(xwl_screen);
-    int i;
-
-    /* Explicitly zero the count as the caller may ignore the return value */
-    *num_formats = 0;
-
-    if (!xwl_gbm->dmabuf_capable || !xwl_gbm->dmabuf)
-        return FALSE;
-
-    if (xwl_screen->num_formats == 0)
-       return TRUE;
-
-    *formats = calloc(xwl_screen->num_formats, sizeof(CARD32));
-    if (*formats == NULL)
-        return FALSE;
-
-    for (i = 0; i < xwl_screen->num_formats; i++)
-       (*formats)[i] = xwl_screen->formats[i].format;
-    *num_formats = xwl_screen->num_formats;
-
-    return TRUE;
-}
-
-_X_EXPORT Bool
-glamor_get_modifiers(ScreenPtr screen, uint32_t format,
-                     uint32_t *num_modifiers, uint64_t **modifiers)
-{
-    struct xwl_screen *xwl_screen = xwl_screen_get(screen);
-    struct xwl_gbm_private *xwl_gbm = xwl_gbm_get(xwl_screen);
-    struct xwl_format *xwl_format = NULL;
-    int i;
-
-    /* Explicitly zero the count as the caller may ignore the return value */
-    *num_modifiers = 0;
-
-    if (!xwl_gbm->dmabuf_capable || !xwl_gbm->dmabuf)
-        return FALSE;
-
-    if (xwl_screen->num_formats == 0)
-       return TRUE;
-
-    for (i = 0; i < xwl_screen->num_formats; i++) {
-       if (xwl_screen->formats[i].format == format) {
-          xwl_format = &xwl_screen->formats[i];
-          break;
-       }
-    }
-
-    if (!xwl_format)
-        return FALSE;
-
-    *modifiers = calloc(xwl_format->num_modifiers, sizeof(uint64_t));
-    if (*modifiers == NULL)
-        return FALSE;
-
-    for (i = 0; i < xwl_format->num_modifiers; i++)
-       (*modifiers)[i] = xwl_format->modifiers[i];
-    *num_modifiers = xwl_format->num_modifiers;
-
-    return TRUE;
-}
-
-static const dri3_screen_info_rec xwl_dri3_info = {
-    .version = 2,
-    .open = NULL,
-    .pixmap_from_fds = glamor_pixmap_from_fds,
-    .fds_from_pixmap = glamor_fds_from_pixmap,
-    .open_client = xwl_dri3_open_client,
-    .get_formats = glamor_get_formats,
-    .get_modifiers = glamor_get_modifiers,
-    .get_drawable_modifiers = glamor_get_drawable_modifiers,
-};
-
-static const char *
-get_render_node_path_for_device(const drmDevicePtr drm_device,
-                                const char *device_path)
-{
-    char *render_node_path = NULL;
-    char device_found = 0;
-    int i;
-
-    for (i = 0; i < DRM_NODE_MAX; i++) {
-        if ((drm_device->available_nodes & (1 << i)) == 0)
-           continue;
-
-        if (!strcmp (device_path, drm_device->nodes[i]))
-            device_found = 1;
-
-        if (is_device_path_render_node(drm_device->nodes[i]))
-            render_node_path = drm_device->nodes[i];
-
-        if (device_found && render_node_path)
-            return render_node_path;
-    }
-
-    return NULL;
-}
-
-static char *
-get_render_node_path(const char *device_path)
-{
-    drmDevicePtr *devices = NULL;
-    char *render_node_path = NULL;
-    int i, n_devices, max_devices;
-
-    max_devices = drmGetDevices2(0, NULL, 0);
-    if (max_devices <= 0)
-        goto out;
-
-    devices = calloc(max_devices, sizeof(drmDevicePtr));
-    if (!devices)
-        goto out;
-
-    n_devices = drmGetDevices2(0, devices, max_devices);
-    if (n_devices < 0)
-        goto out;
-
-    for (i = 0; i < n_devices; i++) {
-       const char *node_path = get_render_node_path_for_device(devices[i],
-                                                               device_path);
-       if (node_path) {
-           render_node_path = strdup(node_path);
-           break;
-       }
-    }
-
-out:
-    free(devices);
-    return render_node_path;
-}
-
-static void
-xwl_drm_handle_device(void *data, struct wl_drm *drm, const char *device)
-{
-   struct xwl_screen *xwl_screen = data;
-   struct xwl_gbm_private *xwl_gbm = xwl_gbm_get(xwl_screen);
-   drm_magic_t magic;
-   char *render_node_path = NULL;
-
-   if (!is_device_path_render_node(device))
-       render_node_path = get_render_node_path(device);
-
-   if (render_node_path)
-       xwl_gbm->device_name = render_node_path;
-   else
-       xwl_gbm->device_name = strdup(device);
-
-   if (!xwl_gbm->device_name) {
-       xwl_glamor_gbm_cleanup(xwl_screen);
-       return;
-   }
-
-   xwl_gbm->drm_fd = open(xwl_gbm->device_name, O_RDWR | O_CLOEXEC);
-   if (xwl_gbm->drm_fd == -1) {
-       ErrorF("wayland-egl: could not open %s (%s)\n",
-              xwl_gbm->device_name, strerror(errno));
-       xwl_glamor_gbm_cleanup(xwl_screen);
-       return;
-   }
-
-   if (drmGetNodeTypeFromFd(xwl_gbm->drm_fd) == DRM_NODE_RENDER) {
-       xwl_gbm->fd_render_node = 1;
-       xwl_screen->expecting_event--;
-   } else {
-       drmGetMagic(xwl_gbm->drm_fd, &magic);
-       wl_drm_authenticate(xwl_gbm->drm, magic);
-   }
-}
-
-static void
-xwl_drm_handle_format(void *data, struct wl_drm *drm, uint32_t format)
-{
-}
-
-static void
-xwl_drm_handle_authenticated(void *data, struct wl_drm *drm)
-{
-    struct xwl_screen *xwl_screen = data;
-    struct xwl_gbm_private *xwl_gbm = xwl_gbm_get(xwl_screen);
-
-    xwl_gbm->drm_authenticated = TRUE;
-    xwl_screen->expecting_event--;
-}
-
-static void
-xwl_drm_handle_capabilities(void *data, struct wl_drm *drm, uint32_t value)
-{
-    xwl_gbm_get(data)->capabilities = value;
-}
-
-static const struct wl_drm_listener xwl_drm_listener = {
-    xwl_drm_handle_device,
-    xwl_drm_handle_format,
-    xwl_drm_handle_authenticated,
-    xwl_drm_handle_capabilities
-};
-
-static void
-xwl_dmabuf_handle_format(void *data, struct zwp_linux_dmabuf_v1 *dmabuf,
-                         uint32_t format)
-{
-}
-
-static void
-xwl_dmabuf_handle_modifier(void *data, struct zwp_linux_dmabuf_v1 *dmabuf,
-                           uint32_t format, uint32_t modifier_hi,
-                           uint32_t modifier_lo)
-{
-   struct xwl_screen *xwl_screen = data;
-    struct xwl_format *xwl_format = NULL;
-    int i;
-
-    if (modifier_hi == (DRM_FORMAT_MOD_INVALID >> 32) &&
-        modifier_lo == (DRM_FORMAT_MOD_INVALID & 0xffffffff))
-        return;
-
-    for (i = 0; i < xwl_screen->num_formats; i++) {
-        if (xwl_screen->formats[i].format == format) {
-            xwl_format = &xwl_screen->formats[i];
-            break;
-        }
-    }
-
-    if (xwl_format == NULL) {
-       xwl_screen->num_formats++;
-       xwl_screen->formats = realloc(xwl_screen->formats,
-                                     xwl_screen->num_formats * sizeof(*xwl_format));
-       if (!xwl_screen->formats)
-          return;
-       xwl_format = &xwl_screen->formats[xwl_screen->num_formats - 1];
-       xwl_format->format = format;
-       xwl_format->num_modifiers = 0;
-       xwl_format->modifiers = NULL;
-    }
-
-    xwl_format->num_modifiers++;
-    xwl_format->modifiers = realloc(xwl_format->modifiers,
-                                    xwl_format->num_modifiers * sizeof(uint64_t));
-    if (!xwl_format->modifiers)
-       return;
-    xwl_format->modifiers[xwl_format->num_modifiers - 1]  = (uint64_t) modifier_lo;
-    xwl_format->modifiers[xwl_format->num_modifiers - 1] |= (uint64_t) modifier_hi << 32;
-}
-
-static const struct zwp_linux_dmabuf_v1_listener xwl_dmabuf_listener = {
-    .format   = xwl_dmabuf_handle_format,
-    .modifier = xwl_dmabuf_handle_modifier
-};
-
-Bool
-xwl_screen_set_drm_interface(struct xwl_screen *xwl_screen,
-                             uint32_t id, uint32_t version)
-{
-    struct xwl_gbm_private *xwl_gbm = xwl_gbm_get(xwl_screen);
-
-    if (version < 2)
-        return FALSE;
-
-    xwl_gbm->drm =
-        wl_registry_bind(xwl_screen->registry, id, &wl_drm_interface, 2);
-    wl_drm_add_listener(xwl_gbm->drm, &xwl_drm_listener, xwl_screen);
-    xwl_screen->expecting_event++;
-
-    return TRUE;
-}
-
-Bool
-xwl_screen_set_dmabuf_interface(struct xwl_screen *xwl_screen,
-                                uint32_t id, uint32_t version)
-{
-    struct xwl_gbm_private *xwl_gbm = xwl_gbm_get(xwl_screen);
-
-    if (version < 3)
-        return FALSE;
-
-    xwl_gbm->dmabuf =
-        wl_registry_bind(xwl_screen->registry, id, &zwp_linux_dmabuf_v1_interface, 3);
-    zwp_linux_dmabuf_v1_add_listener(xwl_gbm->dmabuf, &xwl_dmabuf_listener, xwl_screen);
-
-    return TRUE;
-}
-
-static Bool
-xwl_glamor_gbm_init_wl_registry(struct xwl_screen *xwl_screen,
-                                struct wl_registry *wl_registry,
-                                uint32_t id, const char *name,
-                                uint32_t version)
-{
-    if (strcmp(name, "wl_drm") == 0) {
-        xwl_screen_set_drm_interface(xwl_screen, id, version);
-        return TRUE;
-    } else if (strcmp(name, "zwp_linux_dmabuf_v1") == 0) {
-        xwl_screen_set_dmabuf_interface(xwl_screen, id, version);
-        return TRUE;
-    }
-
-    /* no match */
-    return FALSE;
-}
-
-static Bool
-xwl_glamor_gbm_has_egl_extension(void)
-{
-    return (epoxy_has_egl_extension(NULL, "EGL_MESA_platform_gbm") ||
-            epoxy_has_egl_extension(NULL, "EGL_KHR_platform_gbm"));
-}
-
-static Bool
-xwl_glamor_gbm_has_wl_interfaces(struct xwl_screen *xwl_screen)
-{
-    struct xwl_gbm_private *xwl_gbm = xwl_gbm_get(xwl_screen);
-
-    if (xwl_gbm->drm == NULL) {
-        ErrorF("glamor: 'wl_drm' not supported\n");
-        return FALSE;
-    }
-
-    return TRUE;
-}
-
-static Bool
-xwl_glamor_gbm_init_egl(struct xwl_screen *xwl_screen)
-{
-    struct xwl_gbm_private *xwl_gbm = xwl_gbm_get(xwl_screen);
-    EGLint major, minor;
-    Bool egl_initialized = FALSE;
-    static const EGLint config_attribs_core[] = {
-        EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR,
-        EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR,
-        EGL_CONTEXT_MAJOR_VERSION_KHR,
-        GLAMOR_GL_CORE_VER_MAJOR,
-        EGL_CONTEXT_MINOR_VERSION_KHR,
-        GLAMOR_GL_CORE_VER_MINOR,
-        EGL_NONE
-    };
-    const GLubyte *renderer;
-
-    if (!xwl_gbm->fd_render_node && !xwl_gbm->drm_authenticated) {
-        ErrorF("Failed to get wl_drm, disabling Glamor and DRI3\n");
-	return FALSE;
-    }
-
-    xwl_gbm->gbm = gbm_create_device(xwl_gbm->drm_fd);
-    if (!xwl_gbm->gbm) {
-        ErrorF("couldn't create gbm device\n");
-        goto error;
-    }
-
-    xwl_screen->egl_display = glamor_egl_get_display(EGL_PLATFORM_GBM_MESA,
-                                                     xwl_gbm->gbm);
-    if (xwl_screen->egl_display == EGL_NO_DISPLAY) {
-        ErrorF("glamor_egl_get_display() failed\n");
-        goto error;
-    }
-
-    egl_initialized = eglInitialize(xwl_screen->egl_display, &major, &minor);
-    if (!egl_initialized) {
-        ErrorF("eglInitialize() failed\n");
-        goto error;
-    }
-
-    eglBindAPI(EGL_OPENGL_API);
-
-    xwl_screen->egl_context = eglCreateContext(
-        xwl_screen->egl_display, NULL, EGL_NO_CONTEXT, config_attribs_core);
-    if (xwl_screen->egl_context == EGL_NO_CONTEXT) {
-        xwl_screen->egl_context = eglCreateContext(
-            xwl_screen->egl_display, NULL, EGL_NO_CONTEXT, NULL);
-    }
-
-    if (xwl_screen->egl_context == EGL_NO_CONTEXT) {
-        ErrorF("Failed to create EGL context\n");
-        goto error;
-    }
-
-    if (!eglMakeCurrent(xwl_screen->egl_display,
-                        EGL_NO_SURFACE, EGL_NO_SURFACE,
-                        xwl_screen->egl_context)) {
-        ErrorF("Failed to make EGL context current\n");
-        goto error;
-    }
-
-    renderer = glGetString(GL_RENDERER);
-    if (!renderer) {
-        ErrorF("glGetString() returned NULL, your GL is broken\n");
-        goto error;
-    }
-    if (strstr((const char *)renderer, "llvmpipe")) {
-        ErrorF("Refusing to try glamor on llvmpipe\n");
-        goto error;
-    }
-
-    if (!epoxy_has_gl_extension("GL_OES_EGL_image")) {
-        ErrorF("GL_OES_EGL_image not available\n");
-        goto error;
-    }
-
-    if (epoxy_has_egl_extension(xwl_screen->egl_display,
-                                "EXT_image_dma_buf_import") &&
-        epoxy_has_egl_extension(xwl_screen->egl_display,
-                                "EXT_image_dma_buf_import_modifiers"))
-       xwl_gbm->dmabuf_capable = TRUE;
-
-    return TRUE;
-error:
-    if (xwl_screen->egl_context != EGL_NO_CONTEXT) {
-        eglDestroyContext(xwl_screen->egl_display, xwl_screen->egl_context);
-        xwl_screen->egl_context = EGL_NO_CONTEXT;
-    }
-
-    if (xwl_screen->egl_display != EGL_NO_DISPLAY) {
-        eglTerminate(xwl_screen->egl_display);
-        xwl_screen->egl_display = EGL_NO_DISPLAY;
-    }
-
-    xwl_glamor_gbm_cleanup(xwl_screen);
-    return FALSE;
-}
-
-static Bool
-xwl_glamor_gbm_init_screen(struct xwl_screen *xwl_screen)
-{
-    struct xwl_gbm_private *xwl_gbm = xwl_gbm_get(xwl_screen);
-
-    if (!dri3_screen_init(xwl_screen->screen, &xwl_dri3_info)) {
-        ErrorF("Failed to initialize dri3\n");
-        goto error;
-    }
-
-    if (xwl_gbm->fd_render_node)
-        goto skip_drm_auth;
-
-    if (!dixRegisterPrivateKey(&xwl_auth_state_private_key, PRIVATE_CLIENT,
-                               0)) {
-        ErrorF("Failed to register private key\n");
-        goto error;
-    }
-
-    if (!AddCallback(&ClientStateCallback, xwl_auth_state_client_callback,
-                     NULL)) {
-        ErrorF("Failed to add client state callback\n");
-        goto error;
-    }
-
-skip_drm_auth:
-    xwl_screen->screen->CreatePixmap = xwl_glamor_gbm_create_pixmap;
-    xwl_screen->screen->DestroyPixmap = xwl_glamor_gbm_destroy_pixmap;
-
-    return TRUE;
-error:
-    xwl_glamor_gbm_cleanup(xwl_screen);
-    return FALSE;
-}
-
-void
-xwl_glamor_init_gbm(struct xwl_screen *xwl_screen)
-{
-    struct xwl_gbm_private *xwl_gbm;
-
-    xwl_screen->gbm_backend.is_available = FALSE;
-
-    if (!xwl_glamor_gbm_has_egl_extension())
-        return;
-
-    if (!dixRegisterPrivateKey(&xwl_gbm_private_key, PRIVATE_SCREEN, 0))
-        return;
-
-    xwl_gbm = calloc(sizeof(*xwl_gbm), 1);
-    if (!xwl_gbm) {
-        ErrorF("glamor: Not enough memory to setup GBM, disabling\n");
-        return;
-    }
-
-    dixSetPrivate(&xwl_screen->screen->devPrivates, &xwl_gbm_private_key,
-                  xwl_gbm);
-
-    xwl_screen->gbm_backend.init_wl_registry = xwl_glamor_gbm_init_wl_registry;
-    xwl_screen->gbm_backend.has_wl_interfaces = xwl_glamor_gbm_has_wl_interfaces;
-    xwl_screen->gbm_backend.init_egl = xwl_glamor_gbm_init_egl;
-    xwl_screen->gbm_backend.init_screen = xwl_glamor_gbm_init_screen;
-    xwl_screen->gbm_backend.get_wl_buffer_for_pixmap = xwl_glamor_gbm_get_wl_buffer_for_pixmap;
-    xwl_screen->gbm_backend.is_available = TRUE;
-}
diff --git a/hw/xwayland/xwayland-glamor-xv.c b/hw/xwayland/xwayland-glamor-xv.c
deleted file mode 100644
index 8e0f8da..0000000
--- a/hw/xwayland/xwayland-glamor-xv.c
+++ /dev/null
@@ -1,412 +0,0 @@
-/*
- * Copyright (c) 1998-2003 by The XFree86 Project, Inc.
- * Copyright © 2013 Red Hat
- * Copyright © 2014 Intel Corporation
- * Copyright © 2016 Red Hat
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- *
- * Authors:
- *      Olivier Fourdan <ofourdan@redhat.com>
- *
- * Derived from the glamor_xf86_xv, ephyr_glamor_xv and xf86xv
- * implementations
- */
-
-#include "xwayland.h"
-#include "glamor_priv.h"
-
-#include <X11/extensions/Xv.h>
-
-#define NUM_FORMATS    3
-#define NUM_PORTS      16
-#define ADAPTOR_NAME   "glamor textured video"
-#define ENCODER_NAME   "XV_IMAGE"
-
-static DevPrivateKeyRec xwlXvScreenPrivateKeyRec;
-#define xwlXvScreenPrivateKey (&xwlXvScreenPrivateKeyRec)
-
-typedef struct {
-    XvAdaptorPtr glxv_adaptor; /* We have only one adaptor, glamor Xv */
-    glamor_port_private *port_privates;
-
-    CloseScreenProcPtr CloseScreen;
-} xwlXvScreenRec, *xwlXvScreenPtr;
-
-typedef struct {
-    char depth;
-    short class;
-} xwlVideoFormatRec, *xwlVideoFormatPtr;
-
-static xwlVideoFormatRec Formats[NUM_FORMATS] = {
-    {15, TrueColor},
-    {16, TrueColor},
-    {24, TrueColor}
-};
-
-static int
-xwl_glamor_xv_stop_video(XvPortPtr   pPort,
-                         DrawablePtr pDraw)
-{
-    glamor_port_private *gpp = (glamor_port_private *) (pPort->devPriv.ptr);
-
-    if (pDraw->type != DRAWABLE_WINDOW)
-        return BadAlloc;
-
-    glamor_xv_stop_video(gpp);
-
-    return Success;
-}
-
-static int
-xwl_glamor_xv_set_port_attribute(XvPortPtr pPort,
-                                 Atom      attribute,
-                                 INT32     value)
-{
-    glamor_port_private *gpp = (glamor_port_private *) (pPort->devPriv.ptr);
-
-    return glamor_xv_set_port_attribute(gpp, attribute, value);
-}
-
-static int
-xwl_glamor_xv_get_port_attribute(XvPortPtr pPort,
-                                 Atom      attribute,
-                                 INT32    *pValue)
-{
-    glamor_port_private *gpp = (glamor_port_private *) (pPort->devPriv.ptr);
-
-    return glamor_xv_get_port_attribute(gpp, attribute, pValue);
-}
-
-static int
-xwl_glamor_xv_query_best_size(XvPortPtr     pPort,
-                              CARD8         motion,
-                              CARD16        vid_w,
-                              CARD16        vid_h,
-                              CARD16        drw_w,
-                              CARD16        drw_h,
-                              unsigned int *p_w,
-                              unsigned int *p_h)
-{
-    *p_w = drw_w;
-    *p_h = drw_h;
-
-    return Success;
-}
-
-static int
-xwl_glamor_xv_query_image_attributes(XvPortPtr  pPort,
-                                     XvImagePtr format,
-                                     CARD16    *width,
-                                     CARD16    *height,
-                                     int       *pitches,
-                                     int       *offsets)
-{
-    return glamor_xv_query_image_attributes(format->id,
-                                            width,
-                                            height,
-                                            pitches,
-                                            offsets);
-}
-
-static int
-xwl_glamor_xv_put_image(DrawablePtr    pDrawable,
-                        XvPortPtr      pPort,
-                        GCPtr          pGC,
-                        INT16          src_x,
-                        INT16          src_y,
-                        CARD16         src_w,
-                        CARD16         src_h,
-                        INT16          drw_x,
-                        INT16          drw_y,
-                        CARD16         drw_w,
-                        CARD16         drw_h,
-                        XvImagePtr     format,
-                        unsigned char *data,
-                        Bool           sync,
-                        CARD16         width,
-                        CARD16         height)
-{
-    glamor_port_private *gpp = (glamor_port_private *) (pPort->devPriv.ptr);
-
-    RegionRec WinRegion;
-    RegionRec ClipRegion;
-    BoxRec WinBox;
-    int ret = Success;
-
-    if (pDrawable->type != DRAWABLE_WINDOW)
-        return BadWindow;
-
-    WinBox.x1 = pDrawable->x + drw_x;
-    WinBox.y1 = pDrawable->y + drw_y;
-    WinBox.x2 = WinBox.x1 + drw_w;
-    WinBox.y2 = WinBox.y1 + drw_h;
-
-    RegionInit(&WinRegion, &WinBox, 1);
-    RegionInit(&ClipRegion, NullBox, 1);
-    RegionIntersect(&ClipRegion, &WinRegion, pGC->pCompositeClip);
-
-    if (RegionNotEmpty(&ClipRegion))
-        ret = glamor_xv_put_image(gpp,
-                                  pDrawable,
-                                  src_x,
-                                  src_y,
-                                  pDrawable->x + drw_x,
-                                  pDrawable->y + drw_y,
-                                  src_w,
-                                  src_h,
-                                  drw_w,
-                                  drw_h,
-                                  format->id,
-                                  data,
-                                  width,
-                                  height,
-                                  sync,
-                                  &ClipRegion);
-
-     RegionUninit(&WinRegion);
-     RegionUninit(&ClipRegion);
-
-     return ret;
-
-}
-
-static Bool
-xwl_glamor_xv_add_formats(XvAdaptorPtr pa)
-{
-    ScreenPtr pScreen;
-    XvFormatPtr pFormat, pf;
-    VisualPtr pVisual;
-    int numFormat;
-    int totFormat;
-    int numVisuals;
-    int i;
-
-    totFormat = NUM_FORMATS;
-    pFormat = xnfcalloc(totFormat, sizeof(XvFormatRec));
-    pScreen = pa->pScreen;
-    for (pf = pFormat, i = 0, numFormat = 0; i < NUM_FORMATS; i++) {
-        numVisuals = pScreen->numVisuals;
-        pVisual = pScreen->visuals;
-
-        while (numVisuals--) {
-           if ((pVisual->class == Formats[i].class) &&
-               (pVisual->nplanes == Formats[i].depth)) {
-                    if (numFormat >= totFormat) {
-                        void *moreSpace;
-
-                        totFormat *= 2;
-                        moreSpace = xnfreallocarray(pFormat, totFormat,
-                                                    sizeof(XvFormatRec));
-                        pFormat = moreSpace;
-                        pf = pFormat + numFormat;
-                    }
-
-                    pf->visual = pVisual->vid;
-                    pf->depth = Formats[i].depth;
-
-                    pf++;
-                    numFormat++;
-                }
-            pVisual++;
-        }
-    }
-    pa->nFormats = numFormat;
-    pa->pFormats = pFormat;
-
-    return numFormat != 0;
-}
-
-static Bool
-xwl_glamor_xv_add_ports(XvAdaptorPtr pa)
-{
-    XvPortPtr pPorts, pp;
-    xwlXvScreenPtr xwlXvScreen;
-    unsigned long PortResource = 0;
-    int nPorts;
-    int i;
-
-    pPorts = xnfcalloc(NUM_PORTS, sizeof(XvPortRec));
-    xwlXvScreen = dixLookupPrivate(&(pa->pScreen)->devPrivates,
-                                   xwlXvScreenPrivateKey);
-    xwlXvScreen->port_privates = xnfcalloc(NUM_PORTS,
-                                           sizeof(glamor_port_private));
-
-    PortResource = XvGetRTPort();
-    for (pp = pPorts, i = 0, nPorts = 0; i < NUM_PORTS; i++) {
-        if (!(pp->id = FakeClientID(0)))
-            continue;
-
-        pp->pAdaptor = pa;
-
-        glamor_xv_init_port(&xwlXvScreen->port_privates[i]);
-        pp->devPriv.ptr = &xwlXvScreen->port_privates[i];
-
-        if (AddResource(pp->id, PortResource, pp)) {
-            pp++;
-            nPorts++;
-        }
-    }
-
-    pa->base_id = pPorts->id;
-    pa->nPorts = nPorts;
-    pa->pPorts = pPorts;
-
-    return nPorts != 0;
-}
-
-static void
-xwl_glamor_xv_add_attributes(XvAdaptorPtr pa)
-{
-    int i;
-
-    pa->pAttributes = xnfcalloc(glamor_xv_num_attributes, sizeof(XvAttributeRec));
-    memcpy(pa->pAttributes, glamor_xv_attributes,
-           glamor_xv_num_attributes * sizeof(XvAttributeRec));
-
-    for (i = 0; i < glamor_xv_num_attributes; i++)
-        pa->pAttributes[i].name = strdup(glamor_xv_attributes[i].name);
-
-    pa->nAttributes = glamor_xv_num_attributes;
-}
-
-static void
-xwl_glamor_xv_add_images(XvAdaptorPtr pa)
-{
-    pa->pImages = xnfcalloc(glamor_xv_num_images, sizeof(XvImageRec));
-    memcpy(pa->pImages, glamor_xv_images, glamor_xv_num_images * sizeof(XvImageRec));
-
-    pa->nImages = glamor_xv_num_images;
-}
-
-static void
-xwl_glamor_xv_add_encodings(XvAdaptorPtr pa)
-{
-    XvEncodingPtr pe;
-    GLint texsize;
-
-    glGetIntegerv(GL_MAX_TEXTURE_SIZE, &texsize);
-
-    pe = xnfcalloc(1, sizeof(XvEncodingRec));
-    pe->id = 0;
-    pe->pScreen = pa->pScreen;
-    pe->name = strdup(ENCODER_NAME);
-    pe->width = texsize;
-    pe->height = texsize;
-    pe->rate.numerator = 1;
-    pe->rate.denominator = 1;
-
-    pa->pEncodings = pe;
-    pa->nEncodings = 1;
-}
-
-static Bool
-xwl_glamor_xv_add_adaptors(ScreenPtr pScreen)
-{
-    DevPrivateKey XvScreenKey;
-    XvScreenPtr XvScreen;
-    xwlXvScreenPtr xwlXvScreen;
-    XvAdaptorPtr pa;
-
-    if (XvScreenInit(pScreen) != Success)
-        return FALSE;
-
-    XvScreenKey = XvGetScreenKey();
-    XvScreen = dixLookupPrivate(&(pScreen)->devPrivates, XvScreenKey);
-
-    XvScreen->nAdaptors = 0;
-    XvScreen->pAdaptors = NULL;
-
-    pa = xnfcalloc(1, sizeof(XvAdaptorRec));
-    pa->pScreen = pScreen;
-    pa->type = (unsigned char) (XvInputMask | XvImageMask);
-    pa->ddStopVideo = xwl_glamor_xv_stop_video;
-    pa->ddPutImage = xwl_glamor_xv_put_image;
-    pa->ddSetPortAttribute = xwl_glamor_xv_set_port_attribute;
-    pa->ddGetPortAttribute = xwl_glamor_xv_get_port_attribute;
-    pa->ddQueryBestSize = xwl_glamor_xv_query_best_size;
-    pa->ddQueryImageAttributes = xwl_glamor_xv_query_image_attributes;
-    pa->name = strdup(ADAPTOR_NAME);
-
-    xwl_glamor_xv_add_encodings(pa);
-    xwl_glamor_xv_add_images(pa);
-    xwl_glamor_xv_add_attributes(pa);
-    if (!xwl_glamor_xv_add_formats(pa))
-        goto failed;
-    if (!xwl_glamor_xv_add_ports(pa))
-        goto failed;
-
-    /* We're good now with out Xv adaptor */
-    XvScreen->nAdaptors = 1;
-    XvScreen->pAdaptors = pa;
-
-    xwlXvScreen = dixLookupPrivate(&(pa->pScreen)->devPrivates,
-                                   xwlXvScreenPrivateKey);
-    xwlXvScreen->glxv_adaptor = pa;
-
-    return TRUE;
-
-failed:
-    XvFreeAdaptor(pa);
-    free(pa);
-
-    return FALSE;
-}
-
-static Bool
-xwl_glamor_xv_close_screen(ScreenPtr pScreen)
-{
-    xwlXvScreenPtr xwlXvScreen;
-
-    xwlXvScreen = dixLookupPrivate(&(pScreen)->devPrivates,
-                                   xwlXvScreenPrivateKey);
-
-    if (xwlXvScreen->glxv_adaptor) {
-        XvFreeAdaptor(xwlXvScreen->glxv_adaptor);
-        free(xwlXvScreen->glxv_adaptor);
-    }
-    free(xwlXvScreen->port_privates);
-
-    pScreen->CloseScreen = xwlXvScreen->CloseScreen;
-
-    return pScreen->CloseScreen(pScreen);
-}
-
-Bool
-xwl_glamor_xv_init(ScreenPtr pScreen)
-{
-    xwlXvScreenPtr xwlXvScreen;
-
-    if (!dixRegisterPrivateKey(xwlXvScreenPrivateKey, PRIVATE_SCREEN,
-                               sizeof(xwlXvScreenRec)))
-        return FALSE;
-
-    xwlXvScreen = dixLookupPrivate(&(pScreen)->devPrivates,
-                                    xwlXvScreenPrivateKey);
-
-    xwlXvScreen->port_privates = NULL;
-    xwlXvScreen->glxv_adaptor = NULL;
-    xwlXvScreen->CloseScreen = pScreen->CloseScreen;
-    pScreen->CloseScreen = xwl_glamor_xv_close_screen;
-
-    glamor_xv_core_init(pScreen);
-
-    return xwl_glamor_xv_add_adaptors(pScreen);
-}
diff --git a/hw/xwayland/xwayland-glamor.c b/hw/xwayland/xwayland-glamor.c
deleted file mode 100644
index 48e330a..0000000
--- a/hw/xwayland/xwayland-glamor.c
+++ /dev/null
@@ -1,266 +0,0 @@
-/*
- * Copyright © 2011-2014 Intel Corporation
- *
- * Permission to use, copy, modify, distribute, and sell this software
- * and its documentation for any purpose is hereby granted without
- * fee, provided that the above copyright notice appear in all copies
- * and that both that copyright notice and this permission notice
- * appear in supporting documentation, and that the name of the
- * copyright holders not be used in advertising or publicity
- * pertaining to distribution of the software without specific,
- * written prior permission.  The copyright holders make no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied
- * warranty.
- *
- * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
- * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
- * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#include "xwayland.h"
-
-#define MESA_EGL_NO_X11_HEADERS
-#define EGL_NO_X11
-#include <glamor_egl.h>
-
-#include <glamor.h>
-#include <glamor_context.h>
-
-static void
-glamor_egl_make_current(struct glamor_context *glamor_ctx)
-{
-    eglMakeCurrent(glamor_ctx->display, EGL_NO_SURFACE,
-                   EGL_NO_SURFACE, EGL_NO_CONTEXT);
-    if (!eglMakeCurrent(glamor_ctx->display,
-                        EGL_NO_SURFACE, EGL_NO_SURFACE,
-                        glamor_ctx->ctx))
-        FatalError("Failed to make EGL context current\n");
-}
-
-void
-xwl_glamor_egl_make_current(struct xwl_screen *xwl_screen)
-{
-    if (lastGLContext == xwl_screen->glamor_ctx)
-        return;
-
-    lastGLContext = xwl_screen->glamor_ctx;
-    xwl_screen->glamor_ctx->make_current(xwl_screen->glamor_ctx);
-}
-
-void
-glamor_egl_screen_init(ScreenPtr screen, struct glamor_context *glamor_ctx)
-{
-    struct xwl_screen *xwl_screen = xwl_screen_get(screen);
-
-    glamor_enable_dri3(screen);
-    glamor_ctx->ctx = xwl_screen->egl_context;
-    glamor_ctx->display = xwl_screen->egl_display;
-
-    glamor_ctx->make_current = glamor_egl_make_current;
-
-    xwl_screen->glamor_ctx = glamor_ctx;
-}
-
-void
-xwl_glamor_init_wl_registry(struct xwl_screen *xwl_screen,
-                            struct wl_registry *registry,
-                            uint32_t id, const char *interface,
-                            uint32_t version)
-{
-    if (xwl_screen->gbm_backend.is_available &&
-        xwl_screen->gbm_backend.init_wl_registry(xwl_screen,
-                                                 registry,
-                                                 id,
-                                                 interface,
-                                                 version)); /* no-op */
-    else if (xwl_screen->eglstream_backend.is_available &&
-             xwl_screen->eglstream_backend.init_wl_registry(xwl_screen,
-                                                            registry,
-                                                            id,
-                                                            interface,
-                                                            version)); /* no-op */
-}
-
-Bool
-xwl_glamor_has_wl_interfaces(struct xwl_screen *xwl_screen,
-                            struct xwl_egl_backend *xwl_egl_backend)
-{
-    return xwl_egl_backend->has_wl_interfaces(xwl_screen);
-}
-
-struct wl_buffer *
-xwl_glamor_pixmap_get_wl_buffer(PixmapPtr pixmap,
-                                Bool *created)
-{
-    struct xwl_screen *xwl_screen = xwl_screen_get(pixmap->drawable.pScreen);
-
-    if (xwl_screen->egl_backend->get_wl_buffer_for_pixmap)
-        return xwl_screen->egl_backend->get_wl_buffer_for_pixmap(pixmap,
-                                                                 created);
-
-    return NULL;
-}
-
-void
-xwl_glamor_post_damage(struct xwl_window *xwl_window,
-                       PixmapPtr pixmap, RegionPtr region)
-{
-    struct xwl_screen *xwl_screen = xwl_window->xwl_screen;
-
-    if (xwl_screen->egl_backend->post_damage)
-        xwl_screen->egl_backend->post_damage(xwl_window, pixmap, region);
-}
-
-Bool
-xwl_glamor_allow_commits(struct xwl_window *xwl_window)
-{
-    struct xwl_screen *xwl_screen = xwl_window->xwl_screen;
-
-    if (xwl_screen->egl_backend->allow_commits)
-        return xwl_screen->egl_backend->allow_commits(xwl_window);
-    else
-        return TRUE;
-}
-
-static Bool
-xwl_glamor_create_screen_resources(ScreenPtr screen)
-{
-    struct xwl_screen *xwl_screen = xwl_screen_get(screen);
-    int ret;
-
-    screen->CreateScreenResources = xwl_screen->CreateScreenResources;
-    ret = (*screen->CreateScreenResources) (screen);
-    xwl_screen->CreateScreenResources = screen->CreateScreenResources;
-    screen->CreateScreenResources = xwl_glamor_create_screen_resources;
-
-    if (!ret)
-        return ret;
-
-    if (xwl_screen->rootless) {
-        screen->devPrivate =
-            fbCreatePixmap(screen, 0, 0, screen->rootDepth, 0);
-    }
-    else {
-        screen->devPrivate = screen->CreatePixmap(
-            screen, screen->width, screen->height, screen->rootDepth,
-            CREATE_PIXMAP_USAGE_BACKING_PIXMAP);
-    }
-
-    SetRootClip(screen, xwl_screen->root_clip_mode);
-
-    return screen->devPrivate != NULL;
-}
-
-int
-glamor_egl_fd_name_from_pixmap(ScreenPtr screen,
-                               PixmapPtr pixmap,
-                               CARD16 *stride, CARD32 *size)
-{
-    return 0;
-}
-
-void
-xwl_glamor_init_backends(struct xwl_screen *xwl_screen, Bool use_eglstream)
-{
-#ifdef GLAMOR_HAS_GBM
-    xwl_glamor_init_gbm(xwl_screen);
-    if (!xwl_screen->gbm_backend.is_available && !use_eglstream)
-        ErrorF("xwayland glamor: GBM backend (default) is not available\n");
-#endif
-#ifdef XWL_HAS_EGLSTREAM
-    xwl_glamor_init_eglstream(xwl_screen);
-    if (!xwl_screen->eglstream_backend.is_available && use_eglstream)
-        ErrorF("xwayland glamor: EGLStream backend requested but not available\n");
-#endif
-}
-
-static Bool
-xwl_glamor_select_gbm_backend(struct xwl_screen *xwl_screen)
-{
-#ifdef GLAMOR_HAS_GBM
-    if (xwl_screen->gbm_backend.is_available &&
-        xwl_glamor_has_wl_interfaces(xwl_screen, &xwl_screen->gbm_backend)) {
-        xwl_screen->egl_backend = &xwl_screen->gbm_backend;
-        return TRUE;
-    }
-    else
-        ErrorF("Missing Wayland requirements for glamor GBM backend\n");
-#endif
-
-    return FALSE;
-}
-
-static Bool
-xwl_glamor_select_eglstream_backend(struct xwl_screen *xwl_screen)
-{
-#ifdef XWL_HAS_EGLSTREAM
-    if (xwl_screen->eglstream_backend.is_available &&
-        xwl_glamor_has_wl_interfaces(xwl_screen, &xwl_screen->eglstream_backend)) {
-        ErrorF("glamor: Using nvidia's EGLStream interface, direct rendering impossible.\n");
-        ErrorF("glamor: Performance may be affected. Ask your vendor to support GBM!\n");
-        xwl_screen->egl_backend = &xwl_screen->eglstream_backend;
-        return TRUE;
-    }
-    else
-        ErrorF("Missing Wayland requirements for glamor EGLStream backend\n");
-#endif
-
-    return FALSE;
-}
-
-void
-xwl_glamor_select_backend(struct xwl_screen *xwl_screen, Bool use_eglstream)
-{
-    if (use_eglstream) {
-        if (!xwl_glamor_select_eglstream_backend(xwl_screen))
-            xwl_glamor_select_gbm_backend(xwl_screen);
-    }
-    else {
-        if (!xwl_glamor_select_gbm_backend(xwl_screen))
-            xwl_glamor_select_eglstream_backend(xwl_screen);
-    }
-}
-
-Bool
-xwl_glamor_init(struct xwl_screen *xwl_screen)
-{
-    ScreenPtr screen = xwl_screen->screen;
-    const char *no_glamor_env;
-
-    no_glamor_env = getenv("XWAYLAND_NO_GLAMOR");
-    if (no_glamor_env && *no_glamor_env != '0') {
-        ErrorF("Disabling glamor and dri3 support, XWAYLAND_NO_GLAMOR is set\n");
-        return FALSE;
-    }
-
-    if (!xwl_screen->egl_backend->init_egl(xwl_screen)) {
-        ErrorF("EGL setup failed, disabling glamor\n");
-        return FALSE;
-    }
-
-    if (!glamor_init(xwl_screen->screen, GLAMOR_USE_EGL_SCREEN)) {
-        ErrorF("Failed to initialize glamor\n");
-        return FALSE;
-    }
-
-    if (!xwl_screen->egl_backend->init_screen(xwl_screen)) {
-        ErrorF("EGL backend init_screen() failed, disabling glamor\n");
-        return FALSE;
-    }
-
-    xwl_screen->CreateScreenResources = screen->CreateScreenResources;
-    screen->CreateScreenResources = xwl_glamor_create_screen_resources;
-
-#ifdef XV
-    if (!xwl_glamor_xv_init(screen))
-        ErrorF("Failed to initialize glamor Xv extension\n");
-#endif
-
-    return TRUE;
-}
diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c
deleted file mode 100644
index a05d178..0000000
--- a/hw/xwayland/xwayland-input.c
+++ /dev/null
@@ -1,2956 +0,0 @@
-/*
- * Copyright © 2014 Intel Corporation
- * Copyright © 2008 Kristian Høgsberg
- *
- * Permission to use, copy, modify, distribute, and sell this software
- * and its documentation for any purpose is hereby granted without
- * fee, provided that the above copyright notice appear in all copies
- * and that both that copyright notice and this permission notice
- * appear in supporting documentation, and that the name of the
- * copyright holders not be used in advertising or publicity
- * pertaining to distribution of the software without specific,
- * written prior permission.  The copyright holders make no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied
- * warranty.
- *
- * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
- * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
- * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#include "xwayland.h"
-
-#include <linux/input.h>
-
-#include <sys/mman.h>
-#include <xkbsrv.h>
-#include <xserver-properties.h>
-#include <inpututils.h>
-#include <mipointer.h>
-#include <mipointrst.h>
-#include <misc.h>
-#include "tablet-unstable-v2-client-protocol.h"
-
-struct axis_discrete_pending {
-    struct xorg_list l;
-    uint32_t axis;
-    int32_t discrete;
-};
-
-struct sync_pending {
-    struct xorg_list l;
-    DeviceIntPtr pending_dev;
-};
-
-static DevPrivateKeyRec xwl_tablet_private_key;
-
-static void
-xwl_pointer_warp_emulator_handle_motion(struct xwl_pointer_warp_emulator *warp_emulator,
-                                        double dx,
-                                        double dy,
-                                        double dx_unaccel,
-                                        double dy_unaccel);
-static void
-xwl_pointer_warp_emulator_maybe_lock(struct xwl_pointer_warp_emulator *warp_emulator,
-                                     struct xwl_window *xwl_window,
-                                     SpritePtr sprite,
-                                     int x, int y);
-
-static void
-xwl_seat_destroy_confined_pointer(struct xwl_seat *xwl_seat);
-
-static void
-init_tablet_manager_seat(struct xwl_screen *xwl_screen,
-                         struct xwl_seat *xwl_seat);
-static void
-release_tablet_manager_seat(struct xwl_seat *xwl_seat);
-
-static void
-xwl_pointer_control(DeviceIntPtr device, PtrCtrl *ctrl)
-{
-    /* Nothing to do, dix handles all settings */
-}
-
-static Bool
-init_pointer_buttons(DeviceIntPtr device)
-{
-#define NBUTTONS 10
-    BYTE map[NBUTTONS + 1];
-    int i = 0;
-    Atom btn_labels[NBUTTONS] = { 0 };
-
-    for (i = 1; i <= NBUTTONS; i++)
-        map[i] = i;
-
-    btn_labels[0] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_LEFT);
-    btn_labels[1] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_MIDDLE);
-    btn_labels[2] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_RIGHT);
-    btn_labels[3] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_WHEEL_UP);
-    btn_labels[4] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_WHEEL_DOWN);
-    btn_labels[5] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_HWHEEL_LEFT);
-    btn_labels[6] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_HWHEEL_RIGHT);
-    /* don't know about the rest */
-
-    if (!InitButtonClassDeviceStruct(device, NBUTTONS, btn_labels, map))
-        return FALSE;
-
-    return TRUE;
-}
-
-static int
-xwl_pointer_proc(DeviceIntPtr device, int what)
-{
-#define NAXES 4
-    Atom axes_labels[NAXES] = { 0 };
-
-    switch (what) {
-    case DEVICE_INIT:
-        device->public.on = FALSE;
-
-        if (!init_pointer_buttons(device))
-            return BadValue;
-
-        axes_labels[0] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_X);
-        axes_labels[1] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_Y);
-        axes_labels[2] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_HWHEEL);
-        axes_labels[3] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_WHEEL);
-
-        if (!InitValuatorClassDeviceStruct(device, NAXES, axes_labels,
-                                           GetMotionHistorySize(), Absolute))
-            return BadValue;
-
-        /* Valuators */
-        InitValuatorAxisStruct(device, 0, axes_labels[0],
-                               0, 0xFFFF, 10000, 0, 10000, Absolute);
-        InitValuatorAxisStruct(device, 1, axes_labels[1],
-                               0, 0xFFFF, 10000, 0, 10000, Absolute);
-        InitValuatorAxisStruct(device, 2, axes_labels[2],
-                               NO_AXIS_LIMITS, NO_AXIS_LIMITS, 0, 0, 0, Relative);
-        InitValuatorAxisStruct(device, 3, axes_labels[3],
-                               NO_AXIS_LIMITS, NO_AXIS_LIMITS, 0, 0, 0, Relative);
-
-        SetScrollValuator(device, 2, SCROLL_TYPE_HORIZONTAL, 1.0, SCROLL_FLAG_NONE);
-        SetScrollValuator(device, 3, SCROLL_TYPE_VERTICAL, 1.0, SCROLL_FLAG_PREFERRED);
-
-        if (!InitPtrFeedbackClassDeviceStruct(device, xwl_pointer_control))
-            return BadValue;
-
-        return Success;
-
-    case DEVICE_ON:
-        device->public.on = TRUE;
-        return Success;
-
-    case DEVICE_OFF:
-    case DEVICE_CLOSE:
-        device->public.on = FALSE;
-        return Success;
-    }
-
-    return BadMatch;
-
-#undef NBUTTONS
-#undef NAXES
-}
-
-static int
-xwl_pointer_proc_relative(DeviceIntPtr device, int what)
-{
-#define NAXES 2
-    Atom axes_labels[NAXES] = { 0 };
-
-    switch (what) {
-    case DEVICE_INIT:
-        device->public.on = FALSE;
-
-        axes_labels[0] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_X);
-        axes_labels[1] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_Y);
-
-        /*
-         * We'll never send buttons, but XGetPointerMapping might in certain
-         * situations make the client think we have no buttons.
-         */
-        if (!init_pointer_buttons(device))
-            return BadValue;
-
-        if (!InitValuatorClassDeviceStruct(device, NAXES, axes_labels,
-                                           GetMotionHistorySize(), Relative))
-            return BadValue;
-
-        /* Valuators */
-        InitValuatorAxisStruct(device, 0, axes_labels[0],
-                               NO_AXIS_LIMITS, NO_AXIS_LIMITS, 1, 0, 1, Relative);
-        InitValuatorAxisStruct(device, 1, axes_labels[1],
-                               NO_AXIS_LIMITS, NO_AXIS_LIMITS, 1, 0, 1, Relative);
-
-        if (!InitPtrFeedbackClassDeviceStruct(device, xwl_pointer_control))
-            return BadValue;
-
-        return Success;
-
-    case DEVICE_ON:
-        device->public.on = TRUE;
-        return Success;
-
-    case DEVICE_OFF:
-    case DEVICE_CLOSE:
-        device->public.on = FALSE;
-        return Success;
-    }
-
-    return BadMatch;
-
-#undef NAXES
-}
-
-static void
-xwl_keyboard_control(DeviceIntPtr device, KeybdCtrl *ctrl)
-{
-}
-
-static int
-xwl_keyboard_proc(DeviceIntPtr device, int what)
-{
-    struct xwl_seat *xwl_seat = device->public.devicePrivate;
-    int len;
-
-    switch (what) {
-    case DEVICE_INIT:
-        device->public.on = FALSE;
-        if (xwl_seat->keymap)
-            len = strnlen(xwl_seat->keymap, xwl_seat->keymap_size);
-        else
-            len = 0;
-        if (!InitKeyboardDeviceStructFromString(device, xwl_seat->keymap,
-                                                len,
-                                                NULL, xwl_keyboard_control))
-            return BadValue;
-
-        return Success;
-    case DEVICE_ON:
-        device->public.on = TRUE;
-        return Success;
-
-    case DEVICE_OFF:
-    case DEVICE_CLOSE:
-        device->public.on = FALSE;
-        return Success;
-    }
-
-    return BadMatch;
-}
-
-static int
-xwl_touch_proc(DeviceIntPtr device, int what)
-{
-#define NTOUCHPOINTS 20
-#define NBUTTONS 1
-#define NAXES 2
-    Atom btn_labels[NBUTTONS] = { 0 };
-    Atom axes_labels[NAXES] = { 0 };
-    BYTE map[NBUTTONS + 1] = { 0 };
-
-    switch (what) {
-    case DEVICE_INIT:
-        device->public.on = FALSE;
-
-        axes_labels[0] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_MT_POSITION_X);
-        axes_labels[1] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_MT_POSITION_Y);
-
-        if (!InitValuatorClassDeviceStruct(device, NAXES, axes_labels,
-                                           GetMotionHistorySize(), Absolute))
-            return BadValue;
-
-        if (!InitButtonClassDeviceStruct(device, NBUTTONS, btn_labels, map))
-            return BadValue;
-
-        if (!InitTouchClassDeviceStruct(device, NTOUCHPOINTS,
-                                        XIDirectTouch, NAXES))
-            return BadValue;
-
-        /* Valuators */
-        InitValuatorAxisStruct(device, 0, axes_labels[0],
-                               0, 0xFFFF, 10000, 0, 10000, Absolute);
-        InitValuatorAxisStruct(device, 1, axes_labels[1],
-                               0, 0xFFFF, 10000, 0, 10000, Absolute);
-        return Success;
-
-    case DEVICE_ON:
-        device->public.on = TRUE;
-        return Success;
-
-    case DEVICE_OFF:
-    case DEVICE_CLOSE:
-        device->public.on = FALSE;
-        return Success;
-    }
-
-    return BadMatch;
-#undef NAXES
-#undef NBUTTONS
-#undef NTOUCHPOINTS
-}
-
-static int
-xwl_tablet_proc(DeviceIntPtr device, int what)
-{
-#define NBUTTONS 9
-#define NAXES 6
-    Atom btn_labels[NBUTTONS] = { 0 };
-    Atom axes_labels[NAXES] = { 0 };
-    BYTE map[NBUTTONS + 1] = { 0 };
-    int i;
-
-    switch (what) {
-    case DEVICE_INIT:
-        device->public.on = FALSE;
-
-        for (i = 1; i <= NBUTTONS; i++)
-            map[i] = i;
-
-        axes_labels[0] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_X);
-        axes_labels[1] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_Y);
-        axes_labels[2] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_PRESSURE);
-        axes_labels[3] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_TILT_X);
-        axes_labels[4] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_TILT_Y);
-        axes_labels[5] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_WHEEL);
-
-        if (!InitValuatorClassDeviceStruct(device, NAXES, axes_labels,
-                                           GetMotionHistorySize(), Absolute))
-            return BadValue;
-
-        /* Valuators - match the xf86-input-wacom ranges */
-        InitValuatorAxisStruct(device, 0, axes_labels[0],
-                               0, 262143, 10000, 0, 10000, Absolute);
-        InitValuatorAxisStruct(device, 1, axes_labels[1],
-                               0, 262143, 10000, 0, 10000, Absolute);
-        /* pressure */
-        InitValuatorAxisStruct(device, 2, axes_labels[2],
-                               0, 65535, 1, 0, 1, Absolute);
-        /* tilt x */
-        InitValuatorAxisStruct(device, 3, axes_labels[3],
-                               -64, 63, 57, 0, 57, Absolute);
-        /* tilt y */
-        InitValuatorAxisStruct(device, 4, axes_labels[4],
-                               -64, 63, 57, 0, 57, Absolute);
-        /* abs wheel (airbrush) or rotation (artpen) */
-        InitValuatorAxisStruct(device, 5, axes_labels[5],
-                               -900, 899, 1, 0, 1, Absolute);
-
-        if (!InitPtrFeedbackClassDeviceStruct(device, xwl_pointer_control))
-            return BadValue;
-
-        if (!InitButtonClassDeviceStruct(device, NBUTTONS, btn_labels, map))
-            return BadValue;
-
-        return Success;
-
-    case DEVICE_ON:
-        device->public.on = TRUE;
-        return Success;
-
-    case DEVICE_OFF:
-    case DEVICE_CLOSE:
-        device->public.on = FALSE;
-        return Success;
-    }
-
-    return BadMatch;
-#undef NAXES
-#undef NBUTTONS
-}
-
-static void
-pointer_handle_enter(void *data, struct wl_pointer *pointer,
-                     uint32_t serial, struct wl_surface *surface,
-                     wl_fixed_t sx_w, wl_fixed_t sy_w)
-{
-    struct xwl_seat *xwl_seat = data;
-    DeviceIntPtr dev = xwl_seat->pointer;
-    DeviceIntPtr master;
-    int i;
-    int sx = wl_fixed_to_int(sx_w);
-    int sy = wl_fixed_to_int(sy_w);
-    int dx, dy;
-    ScreenPtr pScreen = xwl_seat->xwl_screen->screen;
-    ValuatorMask mask;
-
-    /* There's a race here where if we create and then immediately
-     * destroy a surface, we might end up in a state where the Wayland
-     * compositor sends us an event for a surface that doesn't exist.
-     *
-     * Don't process enter events in this case.
-     */
-    if (surface == NULL)
-        return;
-
-    xwl_seat->xwl_screen->serial = serial;
-    xwl_seat->pointer_enter_serial = serial;
-
-    xwl_seat->focus_window = wl_surface_get_user_data(surface);
-    dx = xwl_seat->focus_window->window->drawable.x;
-    dy = xwl_seat->focus_window->window->drawable.y;
-
-    /* We just entered a new xwindow, forget about the old last xwindow */
-    xwl_seat->last_xwindow = NullWindow;
-
-    master = GetMaster(dev, POINTER_OR_FLOAT);
-    (*pScreen->SetCursorPosition) (dev, pScreen, dx + sx, dy + sy, TRUE);
-
-    miPointerInvalidateSprite(master);
-
-    CheckMotion(NULL, master);
-
-    /* Ideally, X clients shouldn't see these button releases.  When
-     * the pointer leaves a window with buttons down, it means that
-     * the wayland compositor has grabbed the pointer.  The button
-     * release event is consumed by whatever grab in the compositor
-     * and won't be sent to clients (the X server is a client).
-     * However, we need to reset X's idea of which buttons are up and
-     * down, and they're all up (by definition) when the pointer
-     * enters a window.  We should figure out a way to swallow these
-     * events, perhaps using an X grab whenever the pointer is not in
-     * any X window, but for now just send the events. */
-    valuator_mask_zero(&mask);
-    for (i = 0; i < dev->button->numButtons; i++)
-        if (BitIsOn(dev->button->down, i))
-            QueuePointerEvents(dev, ButtonRelease, i, 0, &mask);
-
-    /* The last cursor frame we commited before the pointer left one
-     * of our surfaces might not have been shown. In that case we'll
-     * have a cursor surface frame callback pending which we need to
-     * clear so that we can continue submitting new cursor frames. */
-    if (xwl_seat->cursor.frame_cb) {
-        wl_callback_destroy(xwl_seat->cursor.frame_cb);
-        xwl_seat->cursor.frame_cb = NULL;
-        xwl_seat_set_cursor(xwl_seat);
-    }
-
-    if (xwl_seat->pointer_warp_emulator) {
-        xwl_pointer_warp_emulator_maybe_lock(xwl_seat->pointer_warp_emulator,
-                                             xwl_seat->focus_window,
-                                             NULL, 0, 0);
-    }
-}
-
-static void
-pointer_handle_leave(void *data, struct wl_pointer *pointer,
-                     uint32_t serial, struct wl_surface *surface)
-{
-    struct xwl_seat *xwl_seat = data;
-    DeviceIntPtr dev = xwl_seat->pointer;
-
-    xwl_seat->xwl_screen->serial = serial;
-
-    /* The pointer has left a known xwindow, save it for a possible match
-     * in sprite_check_lost_focus()
-     */
-    if (xwl_seat->focus_window) {
-        xwl_seat->last_xwindow = xwl_seat->focus_window->window;
-        xwl_seat->focus_window = NULL;
-        CheckMotion(NULL, GetMaster(dev, POINTER_OR_FLOAT));
-    }
-}
-
-static void
-dispatch_pointer_motion_event(struct xwl_seat *xwl_seat)
-{
-    ValuatorMask mask;
-
-    if (xwl_seat->pointer_warp_emulator &&
-        xwl_seat->pending_pointer_event.has_relative) {
-        double dx;
-        double dy;
-        double dx_unaccel;
-        double dy_unaccel;
-
-        dx = xwl_seat->pending_pointer_event.dx;
-        dy = xwl_seat->pending_pointer_event.dy;
-        dx_unaccel = xwl_seat->pending_pointer_event.dx_unaccel;
-        dy_unaccel = xwl_seat->pending_pointer_event.dy_unaccel;
-        xwl_pointer_warp_emulator_handle_motion(xwl_seat->pointer_warp_emulator,
-                                                dx, dy,
-                                                dx_unaccel, dy_unaccel);
-    } else if (xwl_seat->pending_pointer_event.has_absolute ||
-               xwl_seat->pending_pointer_event.has_relative) {
-        int x;
-        int y;
-
-        if (xwl_seat->pending_pointer_event.has_absolute) {
-            int sx = wl_fixed_to_int(xwl_seat->pending_pointer_event.x);
-            int sy = wl_fixed_to_int(xwl_seat->pending_pointer_event.y);
-            int dx = xwl_seat->focus_window->window->drawable.x;
-            int dy = xwl_seat->focus_window->window->drawable.y;
-
-            x = dx + sx;
-            y = dy + sy;
-        } else {
-            miPointerGetPosition(xwl_seat->pointer, &x, &y);
-        }
-
-        valuator_mask_zero(&mask);
-        if (xwl_seat->pending_pointer_event.has_relative) {
-            double dx_unaccel;
-            double dy_unaccel;
-
-            dx_unaccel = xwl_seat->pending_pointer_event.dx_unaccel;
-            dy_unaccel = xwl_seat->pending_pointer_event.dy_unaccel;
-            valuator_mask_set_absolute_unaccelerated(&mask, 0, x, dx_unaccel);
-            valuator_mask_set_absolute_unaccelerated(&mask, 1, y, dy_unaccel);
-        } else {
-            valuator_mask_set(&mask, 0, x);
-            valuator_mask_set(&mask, 1, y);
-        }
-
-        QueuePointerEvents(xwl_seat->pointer, MotionNotify, 0,
-                           POINTER_ABSOLUTE | POINTER_SCREEN, &mask);
-    }
-
-    xwl_seat->pending_pointer_event.has_absolute = FALSE;
-    xwl_seat->pending_pointer_event.has_relative = FALSE;
-}
-
-static void
-pointer_handle_motion(void *data, struct wl_pointer *pointer,
-                      uint32_t time, wl_fixed_t sx_w, wl_fixed_t sy_w)
-{
-    struct xwl_seat *xwl_seat = data;
-
-    if (!xwl_seat->focus_window)
-        return;
-
-    xwl_seat->pending_pointer_event.has_absolute = TRUE;
-    xwl_seat->pending_pointer_event.x = sx_w;
-    xwl_seat->pending_pointer_event.y = sy_w;
-
-    if (wl_proxy_get_version((struct wl_proxy *) xwl_seat->wl_pointer) < 5)
-        dispatch_pointer_motion_event(xwl_seat);
-}
-
-static void
-pointer_handle_button(void *data, struct wl_pointer *pointer, uint32_t serial,
-                      uint32_t time, uint32_t button, uint32_t state)
-{
-    struct xwl_seat *xwl_seat = data;
-    int index;
-    ValuatorMask mask;
-
-    xwl_seat->xwl_screen->serial = serial;
-
-    switch (button) {
-    case BTN_LEFT:
-        index = 1;
-        break;
-    case BTN_MIDDLE:
-        index = 2;
-        break;
-    case BTN_RIGHT:
-        index = 3;
-        break;
-    default:
-        /* Skip indexes 4-7: they are used for vertical and horizontal scroll.
-           The rest of the buttons go in order: BTN_SIDE becomes 8, etc. */
-        index = 8 + button - BTN_SIDE;
-        break;
-    }
-
-    valuator_mask_zero(&mask);
-    QueuePointerEvents(xwl_seat->pointer,
-                       state ? ButtonPress : ButtonRelease, index, 0, &mask);
-}
-
-static void
-pointer_handle_axis(void *data, struct wl_pointer *pointer,
-                    uint32_t time, uint32_t axis, wl_fixed_t value)
-{
-    struct xwl_seat *xwl_seat = data;
-    int index;
-    const int divisor = 10;
-    ValuatorMask mask;
-    struct axis_discrete_pending *pending = NULL;
-    struct axis_discrete_pending *iter;
-
-    switch (axis) {
-    case WL_POINTER_AXIS_VERTICAL_SCROLL:
-        index = 3;
-        break;
-    case WL_POINTER_AXIS_HORIZONTAL_SCROLL:
-        index = 2;
-        break;
-    default:
-        return;
-    }
-
-    xorg_list_for_each_entry(iter, &xwl_seat->axis_discrete_pending, l) {
-        if (iter->axis == axis) {
-            pending = iter;
-            break;
-        }
-    }
-
-    valuator_mask_zero(&mask);
-
-    if (pending) {
-        valuator_mask_set(&mask, index, pending->discrete);
-        xorg_list_del(&pending->l);
-        free(pending);
-    } else {
-        valuator_mask_set_double(&mask, index, wl_fixed_to_double(value) / divisor);
-    }
-    QueuePointerEvents(xwl_seat->pointer, MotionNotify, 0, POINTER_RELATIVE, &mask);
-}
-
-static void
-pointer_handle_frame(void *data, struct wl_pointer *wl_pointer)
-{
-    struct xwl_seat *xwl_seat = data;
-
-    if (!xwl_seat->focus_window)
-        return;
-
-    dispatch_pointer_motion_event(xwl_seat);
-}
-
-static void
-pointer_handle_axis_source(void *data, struct wl_pointer *wl_pointer, uint32_t axis_source)
-{
-}
-
-static void
-pointer_handle_axis_stop(void *data, struct wl_pointer *wl_pointer,
-                         uint32_t time, uint32_t axis)
-{
-}
-
-static void
-pointer_handle_axis_discrete(void *data, struct wl_pointer *wl_pointer,
-                             uint32_t axis, int32_t discrete)
-{
-    struct xwl_seat *xwl_seat = data;
-
-    struct axis_discrete_pending *pending = malloc(sizeof *pending);
-    if (!pending)
-        return;
-
-    pending->axis = axis;
-    pending->discrete = discrete;
-
-    xorg_list_add(&pending->l, &xwl_seat->axis_discrete_pending);
-}
-
-static const struct wl_pointer_listener pointer_listener = {
-    pointer_handle_enter,
-    pointer_handle_leave,
-    pointer_handle_motion,
-    pointer_handle_button,
-    pointer_handle_axis,
-    pointer_handle_frame,
-    pointer_handle_axis_source,
-    pointer_handle_axis_stop,
-    pointer_handle_axis_discrete,
-};
-
-static void
-relative_pointer_handle_relative_motion(void *data,
-                                        struct zwp_relative_pointer_v1 *zwp_relative_pointer_v1,
-                                        uint32_t utime_hi,
-                                        uint32_t utime_lo,
-                                        wl_fixed_t dxf,
-                                        wl_fixed_t dyf,
-                                        wl_fixed_t dx_unaccelf,
-                                        wl_fixed_t dy_unaccelf)
-{
-    struct xwl_seat *xwl_seat = data;
-
-    xwl_seat->pending_pointer_event.has_relative = TRUE;
-    xwl_seat->pending_pointer_event.dx = wl_fixed_to_double(dxf);
-    xwl_seat->pending_pointer_event.dy = wl_fixed_to_double(dyf);
-    xwl_seat->pending_pointer_event.dx_unaccel = wl_fixed_to_double(dx_unaccelf);
-    xwl_seat->pending_pointer_event.dy_unaccel = wl_fixed_to_double(dy_unaccelf);
-
-    if (!xwl_seat->focus_window)
-        return;
-
-    if (wl_proxy_get_version((struct wl_proxy *) xwl_seat->wl_pointer) < 5)
-        dispatch_pointer_motion_event(xwl_seat);
-}
-
-static const struct zwp_relative_pointer_v1_listener relative_pointer_listener = {
-    relative_pointer_handle_relative_motion,
-};
-
-static void
-keyboard_handle_key(void *data, struct wl_keyboard *keyboard, uint32_t serial,
-                    uint32_t time, uint32_t key, uint32_t state)
-{
-    struct xwl_seat *xwl_seat = data;
-    uint32_t *k, *end;
-
-    xwl_seat->xwl_screen->serial = serial;
-
-    end = (uint32_t *) ((char *) xwl_seat->keys.data + xwl_seat->keys.size);
-    for (k = xwl_seat->keys.data; k < end; k++) {
-        if (*k == key)
-            *k = *--end;
-    }
-    xwl_seat->keys.size = (char *) end - (char *) xwl_seat->keys.data;
-    if (state) {
-        k = wl_array_add(&xwl_seat->keys, sizeof *k);
-        *k = key;
-    }
-
-    QueueKeyboardEvents(xwl_seat->keyboard,
-                        state ? KeyPress : KeyRelease, key + 8);
-}
-
-static void
-keyboard_handle_keymap(void *data, struct wl_keyboard *keyboard,
-                       uint32_t format, int fd, uint32_t size)
-{
-    struct xwl_seat *xwl_seat = data;
-    DeviceIntPtr master;
-    XkbDescPtr xkb;
-    XkbChangesRec changes = { 0 };
-
-    if (xwl_seat->keymap)
-        munmap(xwl_seat->keymap, xwl_seat->keymap_size);
-
-    xwl_seat->keymap_size = size;
-    xwl_seat->keymap = mmap(NULL, size, PROT_READ, MAP_SHARED, fd, 0);
-    if (xwl_seat->keymap == MAP_FAILED) {
-        xwl_seat->keymap_size = 0;
-        xwl_seat->keymap = NULL;
-        goto out;
-    }
-
-    xkb = XkbCompileKeymapFromString(xwl_seat->keyboard, xwl_seat->keymap,
-                                     strnlen(xwl_seat->keymap,
-                                             xwl_seat->keymap_size));
-    if (!xkb)
-        goto out;
-
-    XkbUpdateDescActions(xkb, xkb->min_key_code, XkbNumKeys(xkb), &changes);
-
-    if (xwl_seat->keyboard->key)
-        /* Keep the current controls */
-        XkbCopyControls(xkb, xwl_seat->keyboard->key->xkbInfo->desc);
-
-    XkbDeviceApplyKeymap(xwl_seat->keyboard, xkb);
-
-    master = GetMaster(xwl_seat->keyboard, MASTER_KEYBOARD);
-    if (master)
-        XkbDeviceApplyKeymap(master, xkb);
-
-    XkbFreeKeyboard(xkb, XkbAllComponentsMask, TRUE);
-
- out:
-    close(fd);
-}
-
-static void
-keyboard_handle_enter(void *data, struct wl_keyboard *keyboard,
-                      uint32_t serial,
-                      struct wl_surface *surface, struct wl_array *keys)
-{
-    struct xwl_seat *xwl_seat = data;
-    uint32_t *k;
-
-    xwl_seat->xwl_screen->serial = serial;
-    xwl_seat->keyboard_focus = surface;
-
-    wl_array_copy(&xwl_seat->keys, keys);
-    wl_array_for_each(k, &xwl_seat->keys)
-        QueueKeyboardEvents(xwl_seat->keyboard, EnterNotify, *k + 8);
-}
-
-static void
-keyboard_handle_leave(void *data, struct wl_keyboard *keyboard,
-                      uint32_t serial, struct wl_surface *surface)
-{
-    struct xwl_seat *xwl_seat = data;
-    uint32_t *k;
-
-    xwl_seat->xwl_screen->serial = serial;
-
-    wl_array_for_each(k, &xwl_seat->keys)
-        QueueKeyboardEvents(xwl_seat->keyboard, LeaveNotify, *k + 8);
-
-    xwl_seat->keyboard_focus = NULL;
-}
-
-static void
-keyboard_handle_modifiers(void *data, struct wl_keyboard *keyboard,
-                          uint32_t serial, uint32_t mods_depressed,
-                          uint32_t mods_latched, uint32_t mods_locked,
-                          uint32_t group)
-{
-    struct xwl_seat *xwl_seat = data;
-    DeviceIntPtr dev;
-    XkbStateRec old_state, *new_state;
-    xkbStateNotify sn;
-    CARD16 changed;
-
-    mieqProcessInputEvents();
-
-    for (dev = inputInfo.devices; dev; dev = dev->next) {
-        if (dev != xwl_seat->keyboard &&
-            dev != GetMaster(xwl_seat->keyboard, MASTER_KEYBOARD))
-            continue;
-
-        old_state = dev->key->xkbInfo->state;
-        new_state = &dev->key->xkbInfo->state;
-
-        new_state->locked_group = group & XkbAllGroupsMask;
-        new_state->base_mods = mods_depressed & XkbAllModifiersMask;
-        new_state->locked_mods = mods_locked & XkbAllModifiersMask;
-        XkbLatchModifiers(dev, XkbAllModifiersMask,
-                          mods_latched & XkbAllModifiersMask);
-
-        XkbComputeDerivedState(dev->key->xkbInfo);
-
-        changed = XkbStateChangedFlags(&old_state, new_state);
-        if (!changed)
-            continue;
-
-        sn.keycode = 0;
-        sn.eventType = 0;
-        sn.requestMajor = XkbReqCode;
-        sn.requestMinor = X_kbLatchLockState;   /* close enough */
-        sn.changed = changed;
-        XkbSendStateNotify(dev, &sn);
-    }
-}
-
-static void
-remove_sync_pending(DeviceIntPtr dev)
-{
-    struct xwl_seat *xwl_seat = dev->public.devicePrivate;
-    struct sync_pending *p, *npd;
-
-    if (!xwl_seat)
-        return;
-
-    xorg_list_for_each_entry_safe(p, npd, &xwl_seat->sync_pending, l) {
-        if (p->pending_dev == dev) {
-            xorg_list_del(&xwl_seat->sync_pending);
-            free (p);
-            return;
-        }
-    }
-}
-
-static void
-sync_callback(void *data, struct wl_callback *callback, uint32_t serial)
-{
-    DeviceIntPtr dev = (DeviceIntPtr) data;
-
-    remove_sync_pending(dev);
-    wl_callback_destroy(callback);
-}
-
-static const struct wl_callback_listener sync_listener = {
-   sync_callback
-};
-
-static Bool
-keyboard_check_repeat (DeviceIntPtr dev, XkbSrvInfoPtr xkbi, unsigned key)
-{
-    struct xwl_seat *xwl_seat = dev->public.devicePrivate;
-    struct xwl_screen *xwl_screen;
-    struct wl_callback *callback;
-    struct sync_pending *p;
-
-    if (!xwl_seat)
-        return FALSE;
-
-    /* Make sure we didn't miss a possible reply from the compositor */
-    xwl_screen = xwl_seat->xwl_screen;
-    xwl_sync_events (xwl_screen);
-
-    xorg_list_for_each_entry(p, &xwl_seat->sync_pending, l) {
-        if (p->pending_dev == dev) {
-            ErrorF("Key repeat discarded, Wayland compositor doesn't "
-                   "seem to be processing events fast enough!\n");
-
-            return FALSE;
-        }
-    }
-
-    p = xnfalloc(sizeof(struct sync_pending));
-    p->pending_dev = dev;
-    callback = wl_display_sync (xwl_screen->display);
-    xorg_list_add(&p->l, &xwl_seat->sync_pending);
-
-    wl_callback_add_listener(callback, &sync_listener, dev);
-
-    return TRUE;
-}
-
-static void
-keyboard_handle_repeat_info (void *data, struct wl_keyboard *keyboard,
-                             int32_t rate, int32_t delay)
-{
-    struct xwl_seat *xwl_seat = data;
-    DeviceIntPtr dev;
-    XkbControlsPtr ctrl;
-
-    if (rate < 0 || delay < 0) {
-        ErrorF("Wrong rate/delay: %d, %d\n", rate, delay);
-        return;
-    }
-
-    for (dev = inputInfo.devices; dev; dev = dev->next) {
-        if (dev != xwl_seat->keyboard &&
-            dev != GetMaster(xwl_seat->keyboard, MASTER_KEYBOARD))
-            continue;
-
-        if (rate != 0) {
-            ctrl = dev->key->xkbInfo->desc->ctrls;
-            ctrl->repeat_delay = delay;
-            /* rate is number of keys per second */
-            ctrl->repeat_interval = 1000 / rate;
-
-            XkbSetRepeatKeys(dev, -1, AutoRepeatModeOn);
-        } else
-            XkbSetRepeatKeys(dev, -1, AutoRepeatModeOff);
-    }
-}
-
-static const struct wl_keyboard_listener keyboard_listener = {
-    keyboard_handle_keymap,
-    keyboard_handle_enter,
-    keyboard_handle_leave,
-    keyboard_handle_key,
-    keyboard_handle_modifiers,
-    keyboard_handle_repeat_info,
-};
-
-static struct xwl_touch *
-xwl_seat_lookup_touch(struct xwl_seat *xwl_seat, int32_t id)
-{
-    struct xwl_touch *xwl_touch, *next_xwl_touch;
-
-    xorg_list_for_each_entry_safe(xwl_touch, next_xwl_touch,
-                                  &xwl_seat->touches, link_touch) {
-        if (xwl_touch->id == id)
-            return xwl_touch;
-    }
-
-    return NULL;
-}
-
-static void
-xwl_touch_send_event(struct xwl_touch *xwl_touch,
-                     struct xwl_seat *xwl_seat, int type)
-{
-    double dx, dy, x, y;
-    ValuatorMask mask;
-
-    dx = xwl_touch->window->window->drawable.x;
-    dy = xwl_touch->window->window->drawable.y;
-
-    x = (dx + xwl_touch->x) * 0xFFFF / xwl_seat->xwl_screen->width;
-    y = (dy + xwl_touch->y) * 0xFFFF / xwl_seat->xwl_screen->height;
-
-    valuator_mask_zero(&mask);
-    valuator_mask_set_double(&mask, 0, x);
-    valuator_mask_set_double(&mask, 1, y);
-    QueueTouchEvents(xwl_seat->touch, type, xwl_touch->id, 0, &mask);
-}
-
-static void
-touch_handle_down(void *data, struct wl_touch *wl_touch,
-                  uint32_t serial, uint32_t time,
-                  struct wl_surface *surface,
-                  int32_t id, wl_fixed_t sx_w, wl_fixed_t sy_w)
-{
-    struct xwl_seat *xwl_seat = data;
-    struct xwl_touch *xwl_touch;
-
-    if (surface == NULL)
-        return;
-
-    xwl_touch = calloc(1, sizeof *xwl_touch);
-    if (xwl_touch == NULL) {
-        ErrorF("%s: ENOMEM\n", __func__);
-        return;
-    }
-
-    xwl_touch->window = wl_surface_get_user_data(surface);
-    xwl_touch->id = id;
-    xwl_touch->x = wl_fixed_to_int(sx_w);
-    xwl_touch->y = wl_fixed_to_int(sy_w);
-    xorg_list_add(&xwl_touch->link_touch, &xwl_seat->touches);
-
-    xwl_touch_send_event(xwl_touch, xwl_seat, XI_TouchBegin);
-}
-
-static void
-touch_handle_up(void *data, struct wl_touch *wl_touch,
-                uint32_t serial, uint32_t time, int32_t id)
-{
-    struct xwl_touch *xwl_touch;
-    struct xwl_seat *xwl_seat = data;
-
-    xwl_touch = xwl_seat_lookup_touch(xwl_seat, id);
-
-    if (!xwl_touch)
-        return;
-
-    xwl_touch_send_event(xwl_touch, xwl_seat, XI_TouchEnd);
-    xorg_list_del(&xwl_touch->link_touch);
-    free(xwl_touch);
-}
-
-static void
-touch_handle_motion(void *data, struct wl_touch *wl_touch,
-                    uint32_t time, int32_t id,
-                    wl_fixed_t sx_w, wl_fixed_t sy_w)
-{
-    struct xwl_seat *xwl_seat = data;
-    struct xwl_touch *xwl_touch;
-
-    xwl_touch = xwl_seat_lookup_touch(xwl_seat, id);
-
-    if (!xwl_touch)
-        return;
-
-    xwl_touch->x = wl_fixed_to_int(sx_w);
-    xwl_touch->y = wl_fixed_to_int(sy_w);
-    xwl_touch_send_event(xwl_touch, xwl_seat, XI_TouchUpdate);
-}
-
-static void
-touch_handle_frame(void *data, struct wl_touch *wl_touch)
-{
-}
-
-static void
-touch_handle_cancel(void *data, struct wl_touch *wl_touch)
-{
-    struct xwl_seat *xwl_seat = data;
-    struct xwl_touch *xwl_touch, *next_xwl_touch;
-
-    xorg_list_for_each_entry_safe(xwl_touch, next_xwl_touch,
-                                  &xwl_seat->touches, link_touch) {
-        /* We can't properly notify of cancellation to the X client
-         * once it thinks it has the ownership, send at least a
-         * TouchEnd event.
-         */
-        xwl_touch_send_event(xwl_touch, xwl_seat, XI_TouchEnd);
-        xorg_list_del(&xwl_touch->link_touch);
-        free(xwl_touch);
-    }
-}
-
-static const struct wl_touch_listener touch_listener = {
-    touch_handle_down,
-    touch_handle_up,
-    touch_handle_motion,
-    touch_handle_frame,
-    touch_handle_cancel
-};
-
-static struct xwl_seat *
-find_matching_seat(DeviceIntPtr device)
-{
-    DeviceIntPtr dev;
-
-    for (dev = inputInfo.devices; dev; dev = dev->next)
-        if (dev->deviceProc == xwl_keyboard_proc &&
-            device == GetMaster(dev, MASTER_KEYBOARD))
-                return (struct xwl_seat *) dev->public.devicePrivate;
-
-    return NULL;
-}
-
-static void
-release_grab(struct xwl_seat *xwl_seat)
-{
-    if (xwl_seat->keyboard_grab)
-        zwp_xwayland_keyboard_grab_v1_destroy(xwl_seat->keyboard_grab);
-    xwl_seat->keyboard_grab = NULL;
-}
-
-static void
-set_grab(struct xwl_seat *xwl_seat, struct xwl_window *xwl_window)
-{
-    struct xwl_screen *xwl_screen;
-
-    if (!xwl_window)
-        return;
-
-    /* We already have a grab */
-    if (xwl_seat->keyboard_grab)
-        release_grab (xwl_seat);
-
-    xwl_screen = xwl_seat->xwl_screen;
-    xwl_seat->keyboard_grab =
-        zwp_xwayland_keyboard_grab_manager_v1_grab_keyboard(xwl_screen->wp_grab,
-                                                            xwl_window->surface,
-                                                            xwl_seat->seat);
-}
-
-static void
-xwl_keyboard_activate_grab(DeviceIntPtr device, GrabPtr grab, TimeStamp time, Bool passive)
-{
-    struct xwl_seat *xwl_seat = device->public.devicePrivate;
-
-    /* We are not interested in passive grabs */
-    if (!passive) {
-        /* If the device is the MASTER_KEYBOARD, we don't have an xwl_seat */
-        if (xwl_seat == NULL)
-            xwl_seat = find_matching_seat(device);
-        if (xwl_seat)
-            set_grab(xwl_seat, xwl_window_from_window(grab->window));
-    }
-
-    ActivateKeyboardGrab(device, grab, time, passive);
-}
-
-static void
-xwl_keyboard_deactivate_grab(DeviceIntPtr device)
-{
-    struct xwl_seat *xwl_seat = device->public.devicePrivate;
-
-    /* If the device is the MASTER_KEYBOARD, we don't have an xwl_seat */
-    if (xwl_seat == NULL)
-        xwl_seat = find_matching_seat(device);
-    if (xwl_seat)
-        release_grab (xwl_seat);
-
-    DeactivateKeyboardGrab(device);
-}
-
-static void
-setup_keyboard_grab_handler (DeviceIntPtr device)
-{
-    device->deviceGrab.ActivateGrab = xwl_keyboard_activate_grab;
-    device->deviceGrab.DeactivateGrab = xwl_keyboard_deactivate_grab;
-}
-
-static DeviceIntPtr
-add_device(struct xwl_seat *xwl_seat,
-           const char *driver, DeviceProc device_proc)
-{
-    DeviceIntPtr dev = NULL;
-    static Atom type_atom;
-    char name[32];
-
-    dev = AddInputDevice(serverClient, device_proc, TRUE);
-    if (dev == NULL)
-        return NULL;
-
-    if (type_atom == None)
-        type_atom = MakeAtom(driver, strlen(driver), TRUE);
-    snprintf(name, sizeof name, "%s:%d", driver, xwl_seat->id);
-    AssignTypeAndName(dev, type_atom, name);
-    dev->public.devicePrivate = xwl_seat;
-    dev->type = SLAVE;
-    dev->spriteInfo->spriteOwner = FALSE;
-
-    return dev;
-}
-
-static void
-disable_device(DeviceIntPtr dev)
-{
-    DisableDevice(dev, TRUE);
-    dev->public.devicePrivate = NULL;
-}
-
-static void
-enable_device(struct xwl_seat *xwl_seat, DeviceIntPtr dev)
-{
-    dev->public.devicePrivate = xwl_seat;
-    EnableDevice(dev, TRUE);
-}
-
-
-static void
-init_pointer(struct xwl_seat *xwl_seat)
-{
-    xwl_seat->wl_pointer = wl_seat_get_pointer(xwl_seat->seat);
-    wl_pointer_add_listener(xwl_seat->wl_pointer,
-                            &pointer_listener, xwl_seat);
-
-    if (xwl_seat->pointer == NULL) {
-        xwl_seat_set_cursor(xwl_seat);
-        xwl_seat->pointer =
-            add_device(xwl_seat, "xwayland-pointer", xwl_pointer_proc);
-        ActivateDevice(xwl_seat->pointer, TRUE);
-    }
-    enable_device(xwl_seat, xwl_seat->pointer);
-}
-
-static void
-release_pointer(struct xwl_seat *xwl_seat)
-{
-    wl_pointer_release(xwl_seat->wl_pointer);
-    xwl_seat->wl_pointer = NULL;
-
-    if (xwl_seat->pointer)
-        disable_device(xwl_seat->pointer);
-}
-
-static void
-init_relative_pointer(struct xwl_seat *xwl_seat)
-{
-    struct zwp_relative_pointer_manager_v1 *relative_pointer_manager =
-        xwl_seat->xwl_screen->relative_pointer_manager;
-
-    if (relative_pointer_manager) {
-        xwl_seat->wp_relative_pointer =
-            zwp_relative_pointer_manager_v1_get_relative_pointer(
-                relative_pointer_manager, xwl_seat->wl_pointer);
-        zwp_relative_pointer_v1_add_listener(xwl_seat->wp_relative_pointer,
-                                             &relative_pointer_listener,
-                                             xwl_seat);
-    }
-
-    if (xwl_seat->relative_pointer == NULL) {
-        xwl_seat->relative_pointer =
-            add_device(xwl_seat, "xwayland-relative-pointer",
-                       xwl_pointer_proc_relative);
-        ActivateDevice(xwl_seat->relative_pointer, TRUE);
-    }
-    enable_device(xwl_seat, xwl_seat->relative_pointer);
-}
-
-static void
-release_relative_pointer(struct xwl_seat *xwl_seat)
-{
-    if (xwl_seat->wp_relative_pointer) {
-        zwp_relative_pointer_v1_destroy(xwl_seat->wp_relative_pointer);
-        xwl_seat->wp_relative_pointer = NULL;
-    }
-
-    if (xwl_seat->relative_pointer)
-        disable_device(xwl_seat->relative_pointer);
-}
-
-static void
-init_keyboard(struct xwl_seat *xwl_seat)
-{
-    DeviceIntPtr master;
-
-    xwl_seat->wl_keyboard = wl_seat_get_keyboard(xwl_seat->seat);
-    wl_keyboard_add_listener(xwl_seat->wl_keyboard,
-                             &keyboard_listener, xwl_seat);
-
-    if (xwl_seat->keyboard == NULL) {
-        xwl_seat->keyboard =
-            add_device(xwl_seat, "xwayland-keyboard", xwl_keyboard_proc);
-        ActivateDevice(xwl_seat->keyboard, TRUE);
-    }
-    enable_device(xwl_seat, xwl_seat->keyboard);
-    xwl_seat->keyboard->key->xkbInfo->checkRepeat = keyboard_check_repeat;
-
-    if (xwl_seat->xwl_screen->wp_grab) {
-        /* We have Xwayland grab protocol supported by the compositor */
-        master = GetMaster(xwl_seat->keyboard, MASTER_KEYBOARD);
-        if (master)
-            setup_keyboard_grab_handler(master);
-    }
-}
-
-static void
-release_keyboard(struct xwl_seat *xwl_seat)
-{
-    release_grab(xwl_seat);
-    wl_keyboard_release(xwl_seat->wl_keyboard);
-    xwl_seat->wl_keyboard = NULL;
-
-    if (xwl_seat->keyboard) {
-        remove_sync_pending(xwl_seat->keyboard);
-        disable_device(xwl_seat->keyboard);
-    }
-}
-
-static void
-init_touch(struct xwl_seat *xwl_seat)
-{
-    xwl_seat->wl_touch = wl_seat_get_touch(xwl_seat->seat);
-    wl_touch_add_listener(xwl_seat->wl_touch,
-                          &touch_listener, xwl_seat);
-
-    if (xwl_seat->touch == NULL) {
-        xwl_seat->touch =
-            add_device(xwl_seat, "xwayland-touch", xwl_touch_proc);
-        ActivateDevice(xwl_seat->touch, TRUE);
-    }
-    enable_device(xwl_seat, xwl_seat->touch);
-}
-
-static void
-release_touch(struct xwl_seat *xwl_seat)
-{
-    wl_touch_release(xwl_seat->wl_touch);
-    xwl_seat->wl_touch = NULL;
-
-    if (xwl_seat->touch)
-        disable_device(xwl_seat->touch);
-}
-
-static void
-seat_handle_capabilities(void *data, struct wl_seat *seat,
-                         enum wl_seat_capability caps)
-{
-    struct xwl_seat *xwl_seat = data;
-
-    if (caps & WL_SEAT_CAPABILITY_POINTER && xwl_seat->wl_pointer == NULL) {
-        init_pointer(xwl_seat);
-        init_relative_pointer(xwl_seat);
-    } else if (!(caps & WL_SEAT_CAPABILITY_POINTER) && xwl_seat->wl_pointer) {
-        release_pointer(xwl_seat);
-        release_relative_pointer(xwl_seat);
-    }
-
-    if (caps & WL_SEAT_CAPABILITY_KEYBOARD && xwl_seat->wl_keyboard == NULL) {
-        init_keyboard(xwl_seat);
-    } else if (!(caps & WL_SEAT_CAPABILITY_KEYBOARD) && xwl_seat->wl_keyboard) {
-        release_keyboard(xwl_seat);
-    }
-
-    if (caps & WL_SEAT_CAPABILITY_TOUCH && xwl_seat->wl_touch == NULL) {
-        init_touch(xwl_seat);
-    } else if (!(caps & WL_SEAT_CAPABILITY_TOUCH) && xwl_seat->wl_touch) {
-        release_touch(xwl_seat);
-    }
-
-    xwl_seat->xwl_screen->expecting_event--;
-}
-
-static void
-seat_handle_name(void *data, struct wl_seat *seat,
-                 const char *name)
-{
-
-}
-
-static const struct wl_seat_listener seat_listener = {
-    seat_handle_capabilities,
-    seat_handle_name
-};
-
-static void
-xwl_cursor_init(struct xwl_cursor *xwl_cursor, struct xwl_screen *xwl_screen,
-                void (* update_proc)(struct xwl_cursor *))
-{
-    xwl_cursor->surface = wl_compositor_create_surface(xwl_screen->compositor);
-    xwl_cursor->update_proc = update_proc;
-    xwl_cursor->frame_cb = NULL;
-    xwl_cursor->needs_update = FALSE;
-}
-
-static void
-xwl_cursor_release(struct xwl_cursor *xwl_cursor)
-{
-    wl_surface_destroy(xwl_cursor->surface);
-    if (xwl_cursor->frame_cb)
-        wl_callback_destroy(xwl_cursor->frame_cb);
-}
-
-static void
-xwl_seat_update_cursor(struct xwl_cursor *xwl_cursor)
-{
-    struct xwl_seat *xwl_seat = wl_container_of(xwl_cursor, xwl_seat, cursor);
-    xwl_seat_set_cursor(xwl_seat);
-}
-
-static void
-create_input_device(struct xwl_screen *xwl_screen, uint32_t id, uint32_t version)
-{
-    struct xwl_seat *xwl_seat;
-
-    xwl_seat = calloc(1, sizeof *xwl_seat);
-    if (xwl_seat == NULL) {
-        ErrorF("%s: ENOMEM\n", __func__);
-        return;
-    }
-
-    xwl_seat->xwl_screen = xwl_screen;
-    xorg_list_add(&xwl_seat->link, &xwl_screen->seat_list);
-
-    xwl_seat->seat =
-        wl_registry_bind(xwl_screen->registry, id,
-                         &wl_seat_interface, min(version, 5));
-    xwl_seat->id = id;
-
-    xwl_cursor_init(&xwl_seat->cursor, xwl_seat->xwl_screen,
-                    xwl_seat_update_cursor);
-    wl_seat_add_listener(xwl_seat->seat, &seat_listener, xwl_seat);
-
-    init_tablet_manager_seat(xwl_screen, xwl_seat);
-
-    wl_array_init(&xwl_seat->keys);
-
-    xorg_list_init(&xwl_seat->touches);
-    xorg_list_init(&xwl_seat->axis_discrete_pending);
-    xorg_list_init(&xwl_seat->sync_pending);
-}
-
-void
-xwl_seat_destroy(struct xwl_seat *xwl_seat)
-{
-    struct xwl_touch *xwl_touch, *next_xwl_touch;
-    struct sync_pending *p, *npd;
-    struct axis_discrete_pending *ad, *ad_next;
-
-    xorg_list_for_each_entry_safe(xwl_touch, next_xwl_touch,
-                                  &xwl_seat->touches, link_touch) {
-        xorg_list_del(&xwl_touch->link_touch);
-        free(xwl_touch);
-    }
-
-    xorg_list_for_each_entry_safe(p, npd, &xwl_seat->sync_pending, l) {
-        xorg_list_del(&xwl_seat->sync_pending);
-        free (p);
-    }
-
-    xorg_list_for_each_entry_safe(ad, ad_next, &xwl_seat->axis_discrete_pending, l) {
-        xorg_list_del(&ad->l);
-        free(ad);
-    }
-
-    release_tablet_manager_seat(xwl_seat);
-
-    release_grab(xwl_seat);
-    wl_seat_destroy(xwl_seat->seat);
-    xwl_cursor_release(&xwl_seat->cursor);
-    wl_array_release(&xwl_seat->keys);
-    free(xwl_seat);
-}
-
-static void
-tablet_handle_name(void *data, struct zwp_tablet_v2 *tablet, const char *name)
-{
-}
-
-static void
-tablet_handle_id(void *data, struct zwp_tablet_v2 *tablet, uint32_t vid,
-                  uint32_t pid)
-{
-}
-
-static void
-tablet_handle_path(void *data, struct zwp_tablet_v2 *tablet, const char *path)
-{
-}
-
-static void
-tablet_handle_done(void *data, struct zwp_tablet_v2 *tablet)
-{
-    struct xwl_tablet *xwl_tablet = data;
-    struct xwl_seat *xwl_seat = xwl_tablet->seat;
-
-    if (xwl_seat->stylus == NULL) {
-        xwl_seat->stylus = add_device(xwl_seat, "xwayland-stylus", xwl_tablet_proc);
-        ActivateDevice(xwl_seat->stylus, TRUE);
-    }
-    enable_device(xwl_seat, xwl_seat->stylus);
-
-    if (xwl_seat->eraser == NULL) {
-        xwl_seat->eraser = add_device(xwl_seat, "xwayland-eraser", xwl_tablet_proc);
-        ActivateDevice(xwl_seat->eraser, TRUE);
-    }
-    enable_device(xwl_seat, xwl_seat->eraser);
-
-    if (xwl_seat->puck == NULL) {
-        xwl_seat->puck = add_device(xwl_seat, "xwayland-cursor", xwl_tablet_proc);
-        ActivateDevice(xwl_seat->puck, TRUE);
-    }
-    enable_device(xwl_seat, xwl_seat->puck);
-}
-
-static void
-tablet_handle_removed(void *data, struct zwp_tablet_v2 *tablet)
-{
-    struct xwl_tablet *xwl_tablet = data;
-    struct xwl_seat *xwl_seat = xwl_tablet->seat;
-
-    xorg_list_del(&xwl_tablet->link);
-
-    /* The tablet is merely disabled, not removed. The next tablet
-       will re-use the same X devices */
-    if (xorg_list_is_empty(&xwl_seat->tablets)) {
-        if (xwl_seat->stylus)
-            disable_device(xwl_seat->stylus);
-        if (xwl_seat->eraser)
-            disable_device(xwl_seat->eraser);
-        if (xwl_seat->puck)
-            disable_device(xwl_seat->puck);
-        /* pads are removed separately */
-    }
-
-    zwp_tablet_v2_destroy(tablet);
-    free(xwl_tablet);
-}
-
-static const struct zwp_tablet_v2_listener tablet_listener = {
-    tablet_handle_name,
-    tablet_handle_id,
-    tablet_handle_path,
-    tablet_handle_done,
-    tablet_handle_removed
-};
-
-static void
-tablet_tool_receive_type(void *data, struct zwp_tablet_tool_v2 *tool,
-                         uint32_t type)
-{
-    struct xwl_tablet_tool *xwl_tablet_tool = data;
-    struct xwl_seat *xwl_seat = xwl_tablet_tool->seat;
-
-    switch (type) {
-        case ZWP_TABLET_TOOL_V2_TYPE_ERASER:
-            xwl_tablet_tool->xdevice = xwl_seat->eraser;
-            break;
-        case ZWP_TABLET_TOOL_V2_TYPE_MOUSE:
-        case ZWP_TABLET_TOOL_V2_TYPE_LENS:
-            xwl_tablet_tool->xdevice = xwl_seat->puck;
-            break;
-        default:
-            xwl_tablet_tool->xdevice = xwl_seat->stylus;
-            break;
-    }
-}
-
-static void
-tablet_tool_receive_hardware_serial(void *data, struct zwp_tablet_tool_v2 *tool,
-                                    uint32_t hi, uint32_t low)
-{
-}
-
-static void
-tablet_tool_receive_hardware_id_wacom(void *data, struct zwp_tablet_tool_v2 *tool,
-                                      uint32_t hi, uint32_t low)
-{
-}
-
-static void
-tablet_tool_receive_capability(void *data, struct zwp_tablet_tool_v2 *tool,
-                               uint32_t capability)
-{
-}
-
-static void
-tablet_tool_receive_done(void *data, struct zwp_tablet_tool_v2 *tool)
-{
-}
-
-static void
-tablet_tool_receive_removed(void *data, struct zwp_tablet_tool_v2 *tool)
-{
-    struct xwl_tablet_tool *xwl_tablet_tool = data;
-
-    xorg_list_del(&xwl_tablet_tool->link);
-    xwl_cursor_release(&xwl_tablet_tool->cursor);
-    zwp_tablet_tool_v2_destroy(tool);
-    free(xwl_tablet_tool);
-}
-
-static void
-tablet_tool_proximity_in(void *data, struct zwp_tablet_tool_v2 *tool,
-                         uint32_t serial, struct zwp_tablet_v2 *tablet,
-                         struct wl_surface *wl_surface)
-{
-    struct xwl_tablet_tool *xwl_tablet_tool = data;
-    struct xwl_seat *xwl_seat = xwl_tablet_tool->seat;
-
-    /* There's a race here where if we create and then immediately
-     * destroy a surface, we might end up in a state where the Wayland
-     * compositor sends us an event for a surface that doesn't exist.
-     *
-     * Don't process enter events in this case.
-     *
-     * see pointer_handle_enter()
-     */
-    if (wl_surface == NULL)
-        return;
-
-    xwl_tablet_tool->proximity_in_serial = serial;
-    xwl_seat->tablet_focus_window = wl_surface_get_user_data(wl_surface);
-
-    xwl_tablet_tool_set_cursor(xwl_tablet_tool);
-}
-
-static void
-tablet_tool_proximity_out(void *data, struct zwp_tablet_tool_v2 *tool)
-{
-    struct xwl_tablet_tool *xwl_tablet_tool = data;
-    struct xwl_seat *xwl_seat = xwl_tablet_tool->seat;
-
-    xwl_tablet_tool->proximity_in_serial = 0;
-    xwl_seat->tablet_focus_window = NULL;
-
-    xwl_tablet_tool->pressure = 0;
-    xwl_tablet_tool->tilt_x = 0;
-    xwl_tablet_tool->tilt_y = 0;
-    xwl_tablet_tool->rotation = 0;
-    xwl_tablet_tool->slider = 0;
-}
-
-static void
-tablet_tool_down(void *data, struct zwp_tablet_tool_v2 *tool, uint32_t serial)
-{
-    struct xwl_tablet_tool *xwl_tablet_tool = data;
-    struct xwl_seat *xwl_seat = xwl_tablet_tool->seat;
-    ValuatorMask mask;
-
-    xwl_seat->xwl_screen->serial = serial;
-
-    valuator_mask_zero(&mask);
-    QueuePointerEvents(xwl_tablet_tool->xdevice, ButtonPress, 1, 0, &mask);
-}
-
-static void
-tablet_tool_up(void *data, struct zwp_tablet_tool_v2 *tool)
-{
-    struct xwl_tablet_tool *xwl_tablet_tool = data;
-    ValuatorMask mask;
-
-    valuator_mask_zero(&mask);
-    QueuePointerEvents(xwl_tablet_tool->xdevice, ButtonRelease, 1, 0, &mask);
-}
-
-static void
-tablet_tool_motion(void *data, struct zwp_tablet_tool_v2 *tool,
-                   wl_fixed_t x, wl_fixed_t y)
-{
-    struct xwl_tablet_tool *xwl_tablet_tool = data;
-    struct xwl_seat *xwl_seat = xwl_tablet_tool->seat;
-    int32_t dx, dy;
-    double sx = wl_fixed_to_double(x);
-    double sy = wl_fixed_to_double(y);
-
-    if (!xwl_seat->tablet_focus_window)
-        return;
-
-    dx = xwl_seat->tablet_focus_window->window->drawable.x;
-    dy = xwl_seat->tablet_focus_window->window->drawable.y;
-
-    xwl_tablet_tool->x = (double) dx + sx;
-    xwl_tablet_tool->y = (double) dy + sy;
-}
-
-static void
-tablet_tool_pressure(void *data, struct zwp_tablet_tool_v2 *tool,
-                     uint32_t pressure)
-{
-    struct xwl_tablet_tool *xwl_tablet_tool = data;
-    struct xwl_seat *xwl_seat = xwl_tablet_tool->seat;
-
-    if (!xwl_seat->tablet_focus_window)
-        return;
-
-    /* normalized to 65535 already */
-    xwl_tablet_tool->pressure = pressure;
-}
-
-static void
-tablet_tool_distance(void *data, struct zwp_tablet_tool_v2 *tool,
-                     uint32_t distance_raw)
-{
-}
-
-static void
-tablet_tool_tilt(void *data, struct zwp_tablet_tool_v2 *tool,
-                 wl_fixed_t tilt_x, wl_fixed_t tilt_y)
-{
-    struct xwl_tablet_tool *xwl_tablet_tool = data;
-    struct xwl_seat *xwl_seat = xwl_tablet_tool->seat;
-
-    if (!xwl_seat->tablet_focus_window)
-        return;
-
-    xwl_tablet_tool->tilt_x = wl_fixed_to_double(tilt_x);
-    xwl_tablet_tool->tilt_y = wl_fixed_to_double(tilt_y);
-}
-
-static void
-tablet_tool_rotation(void *data, struct zwp_tablet_tool_v2 *tool,
-                     wl_fixed_t angle)
-{
-    struct xwl_tablet_tool *xwl_tablet_tool = data;
-    struct xwl_seat *xwl_seat = xwl_tablet_tool->seat;
-    double rotation = wl_fixed_to_double(angle);
-
-    if (!xwl_seat->tablet_focus_window)
-        return;
-
-    /* change origin (buttons facing right [libinput +90 degrees]) and
-     * scaling (5 points per degree) to match wacom driver behavior
-     */
-    rotation = remainderf(rotation + 90.0f, 360.0f);
-    rotation *= 5.0f;
-    xwl_tablet_tool->rotation = rotation;
-}
-
-static void
-tablet_tool_slider(void *data, struct zwp_tablet_tool_v2 *tool,
-                   int32_t position_raw)
-{
-    struct xwl_tablet_tool *xwl_tablet_tool = data;
-    struct xwl_seat *xwl_seat = xwl_tablet_tool->seat;
-    float position = position_raw / 65535.0;
-
-    if (!xwl_seat->tablet_focus_window)
-        return;
-
-    xwl_tablet_tool->slider = (position * 1799.0f) - 900.0f;
-}
-
-static void
-tablet_tool_wheel(void *data, struct zwp_tablet_tool_v2 *tool,
-                  wl_fixed_t degrees, int32_t clicks)
-{
-    struct xwl_tablet_tool *xwl_tablet_tool = data;
-    struct xwl_seat *xwl_seat = xwl_tablet_tool->seat;
-
-    if (!xwl_seat->tablet_focus_window)
-        return;
-
-    xwl_tablet_tool->wheel_clicks = clicks;
-}
-
-static void
-tablet_tool_button_state(void *data, struct zwp_tablet_tool_v2 *tool,
-                         uint32_t serial, uint32_t button, uint32_t state)
-{
-    struct xwl_tablet_tool *xwl_tablet_tool = data;
-    struct xwl_seat *xwl_seat = xwl_tablet_tool->seat;
-    uint32_t *mask = &xwl_tablet_tool->buttons_now;
-    int xbtn = 0;
-
-    /* BTN_0 .. BTN_9 */
-    if (button >= 0x100 && button <= 0x109) {
-        xbtn = button - 0x100 + 1;
-    }
-    /* BTN_A .. BTN_Z */
-    else if (button >= 0x130 && button <= 0x135) {
-        xbtn = button - 0x130 + 10;
-    }
-    /* BTN_BASE .. BTN_BASE6 */
-    else if (button >= 0x126 && button <= 0x12b) {
-        xbtn = button - 0x126 + 16;
-    }
-    else {
-        switch (button) {
-        case 0x110: /* BTN_LEFT    */
-        case 0x14a: /* BTN_TOUCH   */
-            xbtn = 1;
-            break;
-
-        case 0x112: /* BTN_MIDDLE  */
-        case 0x14b: /* BTN_STYLUS  */
-            xbtn = 2;
-            break;
-
-        case 0x111: /* BTN_RIGHT   */
-        case 0x14c: /* BTN_STYLUS2 */
-            xbtn = 3;
-            break;
-
-        case 0x113: /* BTN_SIDE    */
-        case 0x116: /* BTN_BACK    */
-        case 0x149: /* BTN_STYLUS3 */
-            xbtn = 8;
-            break;
-
-        case 0x114: /* BTN_EXTRA   */
-        case 0x115: /* BTN_FORWARD */
-            xbtn = 9;
-            break;
-        }
-    }
-
-    if (!xbtn) {
-        ErrorF("unknown tablet button number %d\n", button);
-        return;
-    }
-
-    BUG_RETURN(xbtn >= 8 * sizeof(*mask));
-
-    if (state)
-        SetBit(mask, xbtn - 1);
-    else
-        ClearBit(mask, xbtn - 1);
-
-    xwl_seat->xwl_screen->serial = serial;
-}
-
-static void
-tablet_tool_frame(void *data, struct zwp_tablet_tool_v2 *tool, uint32_t time)
-{
-    struct xwl_tablet_tool *xwl_tablet_tool = data;
-    ValuatorMask mask;
-    uint32_t released, pressed, diff;
-    int button;
-
-    valuator_mask_zero(&mask);
-    valuator_mask_set_double(&mask, 0, xwl_tablet_tool->x);
-    valuator_mask_set_double(&mask, 1, xwl_tablet_tool->y);
-    valuator_mask_set(&mask, 2, xwl_tablet_tool->pressure);
-    valuator_mask_set_double(&mask, 3, xwl_tablet_tool->tilt_x);
-    valuator_mask_set_double(&mask, 4, xwl_tablet_tool->tilt_y);
-    valuator_mask_set_double(&mask, 5, xwl_tablet_tool->rotation + xwl_tablet_tool->slider);
-
-    QueuePointerEvents(xwl_tablet_tool->xdevice, MotionNotify, 0,
-               POINTER_ABSOLUTE | POINTER_DESKTOP, &mask);
-
-    valuator_mask_zero(&mask);
-
-    diff = xwl_tablet_tool->buttons_prev ^ xwl_tablet_tool->buttons_now;
-    released = diff & ~xwl_tablet_tool->buttons_now;
-    pressed = diff & xwl_tablet_tool->buttons_now;
-
-    button = 1;
-    while (released) {
-        if (released & 0x1)
-            QueuePointerEvents(xwl_tablet_tool->xdevice,
-                               ButtonRelease, button, 0, &mask);
-        button++;
-        released >>= 1;
-    }
-
-    button = 1;
-    while (pressed) {
-        if (pressed & 0x1)
-            QueuePointerEvents(xwl_tablet_tool->xdevice,
-                               ButtonPress, button, 0, &mask);
-        button++;
-        pressed >>= 1;
-    }
-
-    xwl_tablet_tool->buttons_prev = xwl_tablet_tool->buttons_now;
-
-    while (xwl_tablet_tool->wheel_clicks) {
-            if (xwl_tablet_tool->wheel_clicks < 0) {
-                button = 4;
-                xwl_tablet_tool->wheel_clicks++;
-            }
-            else {
-                button = 5;
-                xwl_tablet_tool->wheel_clicks--;
-            }
-
-            QueuePointerEvents(xwl_tablet_tool->xdevice,
-                               ButtonPress, button, 0, &mask);
-            QueuePointerEvents(xwl_tablet_tool->xdevice,
-                               ButtonRelease, button, 0, &mask);
-
-    }
-}
-
-static const struct zwp_tablet_tool_v2_listener tablet_tool_listener = {
-    tablet_tool_receive_type,
-    tablet_tool_receive_hardware_serial,
-    tablet_tool_receive_hardware_id_wacom,
-    tablet_tool_receive_capability,
-    tablet_tool_receive_done,
-    tablet_tool_receive_removed,
-    tablet_tool_proximity_in,
-    tablet_tool_proximity_out,
-    tablet_tool_down,
-    tablet_tool_up,
-    tablet_tool_motion,
-    tablet_tool_pressure,
-    tablet_tool_distance,
-    tablet_tool_tilt,
-    tablet_tool_rotation,
-    tablet_tool_slider,
-    tablet_tool_wheel,
-    tablet_tool_button_state,
-    tablet_tool_frame
-};
-
-static void
-tablet_pad_ring_destroy(struct xwl_tablet_pad_ring *ring)
-{
-    zwp_tablet_pad_ring_v2_destroy(ring->ring);
-    xorg_list_del(&ring->link);
-    free(ring);
-}
-
-static void
-tablet_pad_ring_source(void *data,
-                       struct zwp_tablet_pad_ring_v2 *zwp_tablet_pad_ring_v2,
-                       uint32_t source)
-{
-}
-
-static void
-tablet_pad_ring_angle(void *data,
-                      struct zwp_tablet_pad_ring_v2 *zwp_tablet_pad_ring_v2,
-                      wl_fixed_t degrees)
-{
-    struct xwl_tablet_pad_ring *ring = data;
-    struct xwl_tablet_pad *pad = ring->group->pad;
-    double deg = wl_fixed_to_double(degrees);
-    ValuatorMask mask;
-
-    valuator_mask_zero(&mask);
-    valuator_mask_set(&mask, 5 + ring->index, deg/360.0  * 71);
-    QueuePointerEvents(pad->xdevice, MotionNotify, 0, 0, &mask);
-}
-
-static void
-tablet_pad_ring_stop(void *data,
-                     struct zwp_tablet_pad_ring_v2 *zwp_tablet_pad_ring_v2)
-{
-}
-
-static void
-tablet_pad_ring_frame(void *data,
-                      struct zwp_tablet_pad_ring_v2 *zwp_tablet_pad_ring_v2,
-                      uint32_t time)
-{
-}
-
-static const struct zwp_tablet_pad_ring_v2_listener tablet_pad_ring_listener = {
-    tablet_pad_ring_source,
-    tablet_pad_ring_angle,
-    tablet_pad_ring_stop,
-    tablet_pad_ring_frame,
-};
-
-
-static void
-tablet_pad_strip_destroy(struct xwl_tablet_pad_strip *strip)
-{
-    zwp_tablet_pad_strip_v2_destroy(strip->strip);
-    xorg_list_del(&strip->link);
-    free(strip);
-}
-
-static void
-tablet_pad_strip_source(void *data,
-                        struct zwp_tablet_pad_strip_v2 *zwp_tablet_pad_strip_v2,
-                        uint32_t source)
-{
-}
-
-static void
-tablet_pad_strip_position(void *data,
-                          struct zwp_tablet_pad_strip_v2 *zwp_tablet_pad_strip_v2,
-                          uint32_t position)
-{
-    struct xwl_tablet_pad_strip *strip = data;
-    struct xwl_tablet_pad *pad = strip->group->pad;
-    ValuatorMask mask;
-
-    valuator_mask_zero(&mask);
-    valuator_mask_set(&mask, 3 + strip->index, position/65535.0 * 2048);
-    QueuePointerEvents(pad->xdevice, MotionNotify, 0, 0, &mask);
-}
-
-static void
-tablet_pad_strip_stop(void *data,
-                      struct zwp_tablet_pad_strip_v2 *zwp_tablet_pad_strip_v2)
-{
-}
-
-static void
-tablet_pad_strip_frame(void *data,
-                       struct zwp_tablet_pad_strip_v2 *zwp_tablet_pad_strip_v2,
-                       uint32_t time)
-{
-}
-
-static const struct zwp_tablet_pad_strip_v2_listener tablet_pad_strip_listener = {
-    tablet_pad_strip_source,
-    tablet_pad_strip_position,
-    tablet_pad_strip_stop,
-    tablet_pad_strip_frame,
-};
-
-static void
-tablet_pad_group_destroy(struct xwl_tablet_pad_group *group)
-{
-    struct xwl_tablet_pad_ring *r, *tr;
-    struct xwl_tablet_pad_strip *s, *ts;
-
-    xorg_list_for_each_entry_safe(r, tr,
-                                  &group->pad_group_ring_list,
-                                  link)
-        tablet_pad_ring_destroy(r);
-
-    xorg_list_for_each_entry_safe(s, ts,
-                                  &group->pad_group_strip_list,
-                                  link)
-        tablet_pad_strip_destroy(s);
-
-    zwp_tablet_pad_group_v2_destroy(group->group);
-    xorg_list_del(&group->link);
-    free(group);
-}
-
-static void
-tablet_pad_group_buttons(void *data,
-                         struct zwp_tablet_pad_group_v2 *zwp_tablet_pad_group_v2,
-                         struct wl_array *buttons)
-{
-
-}
-
-static void
-tablet_pad_group_ring(void *data,
-                      struct zwp_tablet_pad_group_v2 *zwp_tablet_pad_group_v2,
-                      struct zwp_tablet_pad_ring_v2 *wp_ring)
-{
-    static unsigned int ring_index = 0;
-    struct xwl_tablet_pad_group *group = data;
-    struct xwl_tablet_pad_ring *ring;
-
-    ring = calloc(1, sizeof *ring);
-    if (ring == NULL) {
-        ErrorF("%s ENOMEM\n", __func__);
-        return;
-    }
-
-    ring->index = ring_index++;
-    ring->group = group;
-    ring->ring = wp_ring;
-
-    xorg_list_add(&ring->link, &group->pad_group_ring_list);
-
-    zwp_tablet_pad_ring_v2_add_listener(wp_ring, &tablet_pad_ring_listener,
-                                        ring);
-}
-
-static void
-tablet_pad_group_strip(void *data,
-                       struct zwp_tablet_pad_group_v2 *zwp_tablet_pad_group_v2,
-                       struct zwp_tablet_pad_strip_v2 *wp_strip)
-{
-    static unsigned int strip_index = 0;
-    struct xwl_tablet_pad_group *group = data;
-    struct xwl_tablet_pad_strip *strip;
-
-    strip = calloc(1, sizeof *strip);
-    if (strip == NULL) {
-        ErrorF("%s ENOMEM\n", __func__);
-        return;
-    }
-
-    strip->index = strip_index++;
-    strip->group = group;
-    strip->strip = wp_strip;
-
-    xorg_list_add(&strip->link, &group->pad_group_strip_list);
-
-    zwp_tablet_pad_strip_v2_add_listener(wp_strip, &tablet_pad_strip_listener,
-                                         strip);
-}
-
-static void
-tablet_pad_group_modes(void *data,
-                       struct zwp_tablet_pad_group_v2 *zwp_tablet_pad_group_v2,
-                       uint32_t modes)
-{
-
-}
-
-static void
-tablet_pad_group_done(void *data,
-                      struct zwp_tablet_pad_group_v2 *zwp_tablet_pad_group_v2)
-{
-
-}
-
-static void
-tablet_pad_group_mode_switch(void *data,
-                             struct zwp_tablet_pad_group_v2 *zwp_tablet_pad_group_v2,
-                             uint32_t time,
-                             uint32_t serial,
-                             uint32_t mode)
-{
-
-}
-
-static struct zwp_tablet_pad_group_v2_listener tablet_pad_group_listener = {
-    tablet_pad_group_buttons,
-    tablet_pad_group_ring,
-    tablet_pad_group_strip,
-    tablet_pad_group_modes,
-    tablet_pad_group_done,
-    tablet_pad_group_mode_switch,
-};
-
-static int
-xwl_tablet_pad_proc(DeviceIntPtr device, int what)
-{
-    struct xwl_tablet_pad *pad = dixGetPrivate(&device->devPrivates,
-                                               &xwl_tablet_private_key);
-    /* Axis layout mirrors that of xf86-input-wacom to have better
-       compatibility with existing clients */
-#define NAXES 7
-    Atom axes_labels[NAXES] = { 0 };
-    BYTE map[MAX_BUTTONS + 1];
-    int i = 0;
-    Atom btn_labels[MAX_BUTTONS] = { 0 }; /* btn labels are meaningless */
-    int nbuttons;
-
-    switch (what) {
-    case DEVICE_INIT:
-        device->public.on = FALSE;
-
-        axes_labels[0] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_X);
-        axes_labels[1] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_Y);
-        /* The others have no good mapping */
-
-        if (!InitValuatorClassDeviceStruct(device, NAXES, axes_labels,
-                                           GetMotionHistorySize(), Absolute))
-            return BadValue;
-
-        for (i = 1; i <= MAX_BUTTONS; i++)
-            map[i] = i;
-
-        /* We need at least 7 buttons to allow scrolling */
-        nbuttons = min(max(pad->nbuttons + 4, 7), MAX_BUTTONS);
-
-        if (!InitButtonClassDeviceStruct(device, nbuttons,
-                                         btn_labels, map))
-            return BadValue;
-
-        /* Valuators */
-        InitValuatorAxisStruct(device, 0, axes_labels[0],
-                               0, 100, 1, 0, 1, Absolute);
-        InitValuatorAxisStruct(device, 1, axes_labels[1],
-                               0, 100, 1, 0, 1, Absolute);
-        /* Pressure - unused, for backwards compat only */
-        InitValuatorAxisStruct(device, 2, axes_labels[2],
-                               0, 2048, 1, 0, 1, Absolute);
-        /* strip x */
-        InitValuatorAxisStruct(device, 3, axes_labels[3],
-                               0, 2048, 1, 0, 1, Absolute);
-        /* strip y */
-        InitValuatorAxisStruct(device, 4, axes_labels[4],
-                               0, 2048, 1, 0, 1, Absolute);
-        /* ring */
-        InitValuatorAxisStruct(device, 5, axes_labels[5],
-                               0, 71, 1, 0, 1, Absolute);
-        /* ring2 */
-        InitValuatorAxisStruct(device, 6, axes_labels[6],
-                               0, 71, 1, 0, 1, Absolute);
-
-        if (!InitPtrFeedbackClassDeviceStruct(device, xwl_pointer_control))
-            return BadValue;
-
-        return Success;
-
-    case DEVICE_ON:
-        device->public.on = TRUE;
-        return Success;
-
-    case DEVICE_OFF:
-    case DEVICE_CLOSE:
-        device->public.on = FALSE;
-        return Success;
-    }
-
-    return BadMatch;
-#undef NAXES
-}
-
-static void
-tablet_pad_group(void *data,
-                 struct zwp_tablet_pad_v2 *zwp_tablet_pad_v2,
-                 struct zwp_tablet_pad_group_v2 *pad_group)
-{
-    struct xwl_tablet_pad *pad = data;
-    struct xwl_tablet_pad_group *group;
-
-    group = calloc(1, sizeof *group);
-    if (pad == NULL) {
-        ErrorF("%s ENOMEM\n", __func__);
-        return;
-    }
-
-    group->pad = pad;
-    group->group = pad_group;
-    xorg_list_init(&group->pad_group_ring_list);
-    xorg_list_init(&group->pad_group_strip_list);
-
-    xorg_list_add(&group->link, &pad->pad_group_list);
-
-    zwp_tablet_pad_group_v2_add_listener(pad_group,
-                                         &tablet_pad_group_listener,
-                                         group);
-}
-
-static void
-tablet_pad_path(void *data,
-                struct zwp_tablet_pad_v2 *zwp_tablet_pad_v2,
-                const char *path)
-{
-
-}
-
-static void
-tablet_pad_buttons(void *data,
-                   struct zwp_tablet_pad_v2 *zwp_tablet_pad_v2,
-                   uint32_t buttons)
-{
-    struct xwl_tablet_pad *pad = data;
-
-    pad->nbuttons = buttons;
-}
-
-static void
-tablet_pad_done(void *data,
-                struct zwp_tablet_pad_v2 *zwp_tablet_pad_v2)
-{
-    struct xwl_tablet_pad *pad = data;
-
-    pad->xdevice = add_device(pad->seat, "xwayland-pad",
-                              xwl_tablet_pad_proc);
-    dixSetPrivate(&pad->xdevice->devPrivates, &xwl_tablet_private_key, pad);
-    ActivateDevice(pad->xdevice, TRUE);
-    EnableDevice(pad->xdevice, TRUE);
-}
-
-static void
-tablet_pad_button(void *data,
-                  struct zwp_tablet_pad_v2 *zwp_tablet_pad_v2,
-                  uint32_t time,
-                  uint32_t button,
-                  uint32_t state)
-{
-    struct xwl_tablet_pad *pad = data;
-    ValuatorMask mask;
-
-    button++; /* wayland index vs X's 1-offset */
-    /* skip scroll wheel buttons 4-7 */
-    button = button > 3 ? button + 4 : button;
-
-    valuator_mask_zero(&mask);
-    QueuePointerEvents(pad->xdevice,
-                       state ? ButtonPress : ButtonRelease, button, 0, &mask);
-}
-
-static void
-tablet_pad_enter(void *data,
-                 struct zwp_tablet_pad_v2 *zwp_tablet_pad_v2,
-                 uint32_t serial,
-                 struct zwp_tablet_v2 *tablet,
-                 struct wl_surface *surface)
-{
-    /* pairs the pad with the tablet but also to set the focus. We
-     * don't care about the pairing and always use X's focus */
-}
-
-static void
-tablet_pad_leave(void *data,
-                 struct zwp_tablet_pad_v2 *zwp_tablet_pad_v2,
-                 uint32_t serial,
-                 struct wl_surface *surface)
-{
-    /* pairs the pad with the tablet but also to set the focus. We
-     * don't care about the pairing and always use X's focus */
-}
-
-static void
-tablet_pad_removed(void *data,
-                   struct zwp_tablet_pad_v2 *zwp_tablet_pad_v2)
-{
-    struct xwl_tablet_pad *pad = data;
-    struct xwl_tablet_pad_group *g, *tg;
-
-    xorg_list_for_each_entry_safe(g, tg, &pad->pad_group_list, link)
-        tablet_pad_group_destroy(g);
-
-    RemoveDevice(pad->xdevice, TRUE);
-    xorg_list_del(&pad->link);
-    zwp_tablet_pad_v2_destroy(pad->pad);
-    free(pad);
-}
-
-static const struct zwp_tablet_pad_v2_listener tablet_pad_listener = {
-    tablet_pad_group,
-    tablet_pad_path,
-    tablet_pad_buttons,
-    tablet_pad_done,
-    tablet_pad_button,
-    tablet_pad_enter,
-    tablet_pad_leave,
-    tablet_pad_removed,
-};
-
-static void
-tablet_seat_handle_add_tablet(void *data, struct zwp_tablet_seat_v2 *tablet_seat,
-                              struct zwp_tablet_v2 *tablet)
-{
-    struct xwl_seat *xwl_seat = data;
-    struct xwl_tablet *xwl_tablet;
-
-    xwl_tablet = calloc(sizeof *xwl_tablet, 1);
-    if (xwl_tablet == NULL) {
-        ErrorF("%s ENOMEM\n", __func__);
-        return;
-    }
-
-    xwl_tablet->tablet = tablet;
-    xwl_tablet->seat = xwl_seat;
-
-    xorg_list_add(&xwl_tablet->link, &xwl_seat->tablets);
-
-    zwp_tablet_v2_add_listener(tablet, &tablet_listener, xwl_tablet);
-}
-
-static void
-xwl_tablet_tool_update_cursor(struct xwl_cursor *xwl_cursor)
-{
-    struct xwl_tablet_tool *xwl_tablet_tool = wl_container_of(xwl_cursor,
-                                                              xwl_tablet_tool,
-                                                              cursor);
-    xwl_tablet_tool_set_cursor(xwl_tablet_tool);
-}
-
-static void
-tablet_seat_handle_add_tool(void *data, struct zwp_tablet_seat_v2 *tablet_seat,
-                            struct zwp_tablet_tool_v2 *tool)
-{
-    struct xwl_seat *xwl_seat = data;
-    struct xwl_screen *xwl_screen = xwl_seat->xwl_screen;
-    struct xwl_tablet_tool *xwl_tablet_tool;
-
-    xwl_tablet_tool = calloc(sizeof *xwl_tablet_tool, 1);
-    if (xwl_tablet_tool == NULL) {
-        ErrorF("%s ENOMEM\n", __func__);
-        return;
-    }
-
-    xwl_tablet_tool->tool = tool;
-    xwl_tablet_tool->seat = xwl_seat;
-    xwl_cursor_init(&xwl_tablet_tool->cursor, xwl_screen,
-                    xwl_tablet_tool_update_cursor);
-
-    xorg_list_add(&xwl_tablet_tool->link, &xwl_seat->tablet_tools);
-
-    zwp_tablet_tool_v2_add_listener(tool, &tablet_tool_listener, xwl_tablet_tool);
-}
-
-static void
-tablet_seat_handle_add_pad(void *data, struct zwp_tablet_seat_v2 *tablet_seat,
-                           struct zwp_tablet_pad_v2 *pad)
-{
-    struct xwl_seat *xwl_seat = data;
-    struct xwl_tablet_pad *xwl_tablet_pad;
-
-    xwl_tablet_pad = calloc(sizeof *xwl_tablet_pad, 1);
-    if (xwl_tablet_pad == NULL) {
-        ErrorF("%s ENOMEM\n", __func__);
-        return;
-    }
-
-    xwl_tablet_pad->pad = pad;
-    xwl_tablet_pad->seat = xwl_seat;
-    xorg_list_init(&xwl_tablet_pad->pad_group_list);
-
-    xorg_list_add(&xwl_tablet_pad->link, &xwl_seat->tablet_pads);
-
-    zwp_tablet_pad_v2_add_listener(pad, &tablet_pad_listener,
-                                   xwl_tablet_pad);
-}
-
-static const struct zwp_tablet_seat_v2_listener tablet_seat_listener = {
-    tablet_seat_handle_add_tablet,
-    tablet_seat_handle_add_tool,
-    tablet_seat_handle_add_pad
-};
-
-static void
-init_tablet_manager_seat(struct xwl_screen *xwl_screen,
-                         struct xwl_seat *xwl_seat)
-{
-    xorg_list_init(&xwl_seat->tablets);
-    xorg_list_init(&xwl_seat->tablet_tools);
-    xorg_list_init(&xwl_seat->tablet_pads);
-
-    if (!xwl_screen->tablet_manager)
-        return;
-
-    xwl_seat->tablet_seat =
-        zwp_tablet_manager_v2_get_tablet_seat(xwl_screen->tablet_manager,
-                                              xwl_seat->seat);
-
-    zwp_tablet_seat_v2_add_listener(xwl_seat->tablet_seat, &tablet_seat_listener, xwl_seat);
-}
-
-static void
-release_tablet_manager_seat(struct xwl_seat *xwl_seat)
-{
-    struct xwl_tablet *xwl_tablet, *next_xwl_tablet;
-    struct xwl_tablet_tool *xwl_tablet_tool, *next_xwl_tablet_tool;
-    struct xwl_tablet_pad *xwl_tablet_pad, *next_xwl_tablet_pad;
-
-    xorg_list_for_each_entry_safe(xwl_tablet_pad, next_xwl_tablet_pad,
-                                  &xwl_seat->tablet_pads, link) {
-        xorg_list_del(&xwl_tablet_pad->link);
-        zwp_tablet_pad_v2_destroy(xwl_tablet_pad->pad);
-        free(xwl_tablet_pad);
-    }
-
-    xorg_list_for_each_entry_safe(xwl_tablet_tool, next_xwl_tablet_tool,
-                                  &xwl_seat->tablet_tools, link) {
-        xorg_list_del(&xwl_tablet_tool->link);
-        zwp_tablet_tool_v2_destroy(xwl_tablet_tool->tool);
-        free(xwl_tablet_tool);
-    }
-
-    xorg_list_for_each_entry_safe(xwl_tablet, next_xwl_tablet,
-                                  &xwl_seat->tablets, link) {
-        xorg_list_del(&xwl_tablet->link);
-        zwp_tablet_v2_destroy(xwl_tablet->tablet);
-        free(xwl_tablet);
-    }
-
-    if (xwl_seat->tablet_seat) {
-        zwp_tablet_seat_v2_destroy(xwl_seat->tablet_seat);
-        xwl_seat->tablet_seat = NULL;
-    }
-}
-
-static void
-init_tablet_manager(struct xwl_screen *xwl_screen, uint32_t id, uint32_t version)
-{
-    struct xwl_seat *xwl_seat;
-
-    xwl_screen->tablet_manager = wl_registry_bind(xwl_screen->registry,
-                                                  id,
-                                                  &zwp_tablet_manager_v2_interface,
-                                                  min(version,1));
-
-    xorg_list_for_each_entry(xwl_seat, &xwl_screen->seat_list, link) {
-        init_tablet_manager_seat(xwl_screen, xwl_seat);
-    }
-}
-
-void
-xwl_screen_release_tablet_manager(struct xwl_screen *xwl_screen)
-{
-    if (xwl_screen->tablet_manager) {
-        zwp_tablet_manager_v2_destroy(xwl_screen->tablet_manager);
-        xwl_screen->tablet_manager = NULL;
-    }
-}
-
-static void
-init_relative_pointer_manager(struct xwl_screen *xwl_screen,
-                              uint32_t id, uint32_t version)
-{
-    xwl_screen->relative_pointer_manager =
-        wl_registry_bind(xwl_screen->registry, id,
-                         &zwp_relative_pointer_manager_v1_interface,
-                         1);
-}
-
-static void
-init_pointer_constraints(struct xwl_screen *xwl_screen,
-                         uint32_t id, uint32_t version)
-{
-    xwl_screen->pointer_constraints =
-        wl_registry_bind(xwl_screen->registry, id,
-                         &zwp_pointer_constraints_v1_interface,
-                         1);
-}
-
-static void
-init_keyboard_grab(struct xwl_screen *xwl_screen,
-                   uint32_t id, uint32_t version)
-{
-    struct xwl_seat *xwl_seat;
-    DeviceIntPtr master;
-
-    xwl_screen->wp_grab =
-         wl_registry_bind(xwl_screen->registry, id,
-                          &zwp_xwayland_keyboard_grab_manager_v1_interface,
-                          1);
-
-    xorg_list_for_each_entry(xwl_seat, &xwl_screen->seat_list, link) {
-        if (xwl_seat->keyboard) {
-            master = GetMaster(xwl_seat->keyboard, MASTER_KEYBOARD);
-            if (master)
-                setup_keyboard_grab_handler(master);
-        }
-    }
-}
-
-static void
-input_handler(void *data, struct wl_registry *registry, uint32_t id,
-              const char *interface, uint32_t version)
-{
-    struct xwl_screen *xwl_screen = data;
-
-    if (strcmp(interface, "wl_seat") == 0 && version >= 3) {
-        create_input_device(xwl_screen, id, version);
-        xwl_screen->expecting_event++;
-    } else if (strcmp(interface, "zwp_relative_pointer_manager_v1") == 0) {
-        init_relative_pointer_manager(xwl_screen, id, version);
-    } else if (strcmp(interface, "zwp_pointer_constraints_v1") == 0) {
-        init_pointer_constraints(xwl_screen, id, version);
-    } else if (strcmp(interface, "zwp_tablet_manager_v2") == 0) {
-        init_tablet_manager(xwl_screen, id, version);
-    } else if (strcmp(interface, "zwp_xwayland_keyboard_grab_manager_v1") == 0) {
-        init_keyboard_grab(xwl_screen, id, version);
-    }
-}
-
-static void
-global_remove(void *data, struct wl_registry *registry, uint32_t name)
-{
-}
-
-static const struct wl_registry_listener input_listener = {
-    input_handler,
-    global_remove,
-};
-
-Bool
-LegalModifier(unsigned int key, DeviceIntPtr pDev)
-{
-    return TRUE;
-}
-
-void
-ProcessInputEvents(void)
-{
-    mieqProcessInputEvents();
-}
-
-void
-DDXRingBell(int volume, int pitch, int duration)
-{
-}
-
-static Bool
-sprite_check_lost_focus(SpritePtr sprite, WindowPtr window)
-{
-    DeviceIntPtr device, master;
-    struct xwl_seat *xwl_seat;
-
-    for (device = inputInfo.devices; device; device = device->next) {
-        /* Ignore non-wayland devices */
-        if (device->deviceProc == xwl_pointer_proc &&
-            device->spriteInfo->sprite == sprite)
-            break;
-    }
-
-    if (!device)
-        return FALSE;
-
-    xwl_seat = device->public.devicePrivate;
-    if (!xwl_seat)
-        return FALSE;
-
-    master = GetMaster(device, POINTER_OR_FLOAT);
-    if (!master || !master->lastSlave)
-        return FALSE;
-
-    /* We do want the last active slave, we only check on slave xwayland
-     * devices so we can find out the xwl_seat, but those don't actually own
-     * their sprite, so the match doesn't mean a lot.
-     */
-    if (master->lastSlave == xwl_seat->pointer &&
-        xwl_seat->focus_window == NULL &&
-        xwl_seat->last_xwindow != NullWindow &&
-        IsParent(xwl_seat->last_xwindow, window))
-        return TRUE;
-
-    return FALSE;
-}
-
-static WindowPtr
-xwl_xy_to_window(ScreenPtr screen, SpritePtr sprite, int x, int y)
-{
-    struct xwl_screen *xwl_screen;
-    WindowPtr ret;
-
-    xwl_screen = xwl_screen_get(screen);
-
-    screen->XYToWindow = xwl_screen->XYToWindow;
-    ret = screen->XYToWindow(screen, sprite, x, y);
-    xwl_screen->XYToWindow = screen->XYToWindow;
-    screen->XYToWindow = xwl_xy_to_window;
-
-    /* If the device controlling the sprite has left the Wayland surface but
-     * the DIX still finds the pointer within the X11 window, it means that
-     * the pointer has crossed to another native Wayland window, in this
-     * case, pretend we entered the root window so that a LeaveNotify
-     * event is emitted.
-     */
-    if (sprite_check_lost_focus(sprite, ret)) {
-        sprite->spriteTraceGood = 1;
-        return sprite->spriteTrace[0];
-    }
-
-    return ret;
-}
-
-void
-xwl_seat_clear_touch(struct xwl_seat *xwl_seat, WindowPtr window)
-{
-    struct xwl_touch *xwl_touch, *next_xwl_touch;
-
-    xorg_list_for_each_entry_safe(xwl_touch, next_xwl_touch,
-                                  &xwl_seat->touches, link_touch) {
-        if (xwl_touch->window->window == window) {
-            xorg_list_del(&xwl_touch->link_touch);
-            free(xwl_touch);
-        }
-    }
-}
-
-static void
-xwl_pointer_warp_emulator_set_fake_pos(struct xwl_pointer_warp_emulator *warp_emulator,
-                                       int x,
-                                       int y)
-{
-    struct zwp_locked_pointer_v1 *locked_pointer =
-        warp_emulator->locked_pointer;
-    WindowPtr window;
-    int sx, sy;
-
-    if (!warp_emulator->locked_pointer)
-        return;
-
-    if (!warp_emulator->xwl_seat->focus_window)
-        return;
-
-    window = warp_emulator->xwl_seat->focus_window->window;
-    if (x >= window->drawable.x ||
-        y >= window->drawable.y ||
-        x < (window->drawable.x + window->drawable.width) ||
-        y < (window->drawable.y + window->drawable.height)) {
-        sx = x - window->drawable.x;
-        sy = y - window->drawable.y;
-        zwp_locked_pointer_v1_set_cursor_position_hint(locked_pointer,
-                                                       wl_fixed_from_int(sx),
-                                                       wl_fixed_from_int(sy));
-        wl_surface_commit(warp_emulator->xwl_seat->focus_window->surface);
-    }
-}
-
-static Bool
-xwl_pointer_warp_emulator_is_locked(struct xwl_pointer_warp_emulator *warp_emulator)
-{
-    if (warp_emulator->locked_pointer)
-        return TRUE;
-    else
-        return FALSE;
-}
-
-static void
-xwl_pointer_warp_emulator_lock(struct xwl_pointer_warp_emulator *warp_emulator)
-{
-    struct xwl_seat *xwl_seat = warp_emulator->xwl_seat;
-    struct xwl_screen *xwl_screen = xwl_seat->xwl_screen;
-    struct zwp_pointer_constraints_v1 *pointer_constraints =
-        xwl_screen->pointer_constraints;
-    struct xwl_window *lock_window = xwl_seat->focus_window;
-
-    warp_emulator->locked_window = lock_window;
-
-    warp_emulator->locked_pointer =
-        zwp_pointer_constraints_v1_lock_pointer(pointer_constraints,
-                                                lock_window->surface,
-                                                xwl_seat->wl_pointer,
-                                                NULL,
-                                                ZWP_POINTER_CONSTRAINTS_V1_LIFETIME_PERSISTENT);
-}
-
-static void
-xwl_pointer_warp_emulator_maybe_lock(struct xwl_pointer_warp_emulator *warp_emulator,
-                                     struct xwl_window *xwl_window,
-                                     SpritePtr sprite,
-                                     int x, int y)
-{
-    struct xwl_seat *xwl_seat = warp_emulator->xwl_seat;
-    GrabPtr pointer_grab = xwl_seat->pointer->deviceGrab.grab;
-
-    if (warp_emulator->locked_pointer)
-        return;
-
-    /*
-     * If there is no grab, and the window doesn't have pointer focus, ignore
-     * the warp, as under Wayland it won't receive input anyway.
-     */
-    if (!pointer_grab && xwl_seat->focus_window != xwl_window)
-        return;
-
-    /*
-     * If there is a grab, but it's not an ownerEvents grab and the destination
-     * is not the pointer focus, ignore it, as events wouldn't be delivered
-     * there anyway.
-     */
-    if (pointer_grab &&
-        !pointer_grab->ownerEvents &&
-        sprite &&
-        XYToWindow(sprite, x, y) != xwl_seat->focus_window->window)
-        return;
-
-    xwl_pointer_warp_emulator_lock(warp_emulator);
-}
-
-static void
-xwl_pointer_warp_emulator_warp(struct xwl_pointer_warp_emulator *warp_emulator,
-                               struct xwl_window *xwl_window,
-                               SpritePtr sprite,
-                               int x, int y)
-{
-    xwl_pointer_warp_emulator_maybe_lock(warp_emulator,
-                                         xwl_window,
-                                         sprite,
-                                         x, y);
-    xwl_pointer_warp_emulator_set_fake_pos(warp_emulator, x, y);
-}
-
-static void
-xwl_pointer_warp_emulator_handle_motion(struct xwl_pointer_warp_emulator *warp_emulator,
-                                        double dx,
-                                        double dy,
-                                        double dx_unaccel,
-                                        double dy_unaccel)
-{
-    struct xwl_seat *xwl_seat = warp_emulator->xwl_seat;
-    ValuatorMask mask;
-    WindowPtr window;
-    int x, y;
-
-    valuator_mask_zero(&mask);
-    valuator_mask_set_unaccelerated(&mask, 0, dx, dx_unaccel);
-    valuator_mask_set_unaccelerated(&mask, 1, dy, dy_unaccel);
-
-    QueuePointerEvents(xwl_seat->relative_pointer, MotionNotify, 0,
-                       POINTER_RELATIVE, &mask);
-
-    window = xwl_seat->focus_window->window;
-    miPointerGetPosition(xwl_seat->pointer, &x, &y);
-
-    if (xwl_pointer_warp_emulator_is_locked(warp_emulator) &&
-        xwl_seat->cursor_confinement_window != warp_emulator->locked_window &&
-        (x < window->drawable.x ||
-         y < window->drawable.y ||
-         x >= (window->drawable.x + window->drawable.width) ||
-         y >= (window->drawable.y + window->drawable.height)))
-        xwl_seat_destroy_pointer_warp_emulator(xwl_seat);
-    else
-        xwl_pointer_warp_emulator_set_fake_pos(warp_emulator, x, y);
-}
-
-static struct xwl_pointer_warp_emulator *
-xwl_pointer_warp_emulator_create(struct xwl_seat *xwl_seat)
-{
-    struct xwl_pointer_warp_emulator *warp_emulator;
-
-    warp_emulator = calloc(1, sizeof *warp_emulator);
-    if (!warp_emulator) {
-        ErrorF("%s: ENOMEM\n", __func__);
-        return NULL;
-    }
-
-    warp_emulator->xwl_seat = xwl_seat;
-
-    return warp_emulator;
-}
-
-static void
-xwl_pointer_warp_emulator_destroy(struct xwl_pointer_warp_emulator *warp_emulator)
-{
-    if (warp_emulator->locked_pointer)
-        zwp_locked_pointer_v1_destroy(warp_emulator->locked_pointer);
-    free(warp_emulator);
-}
-
-static void
-xwl_seat_create_pointer_warp_emulator(struct xwl_seat *xwl_seat)
-{
-    if (xwl_seat->confined_pointer)
-        xwl_seat_destroy_confined_pointer(xwl_seat);
-
-    xwl_seat->pointer_warp_emulator =
-        xwl_pointer_warp_emulator_create(xwl_seat);
-}
-
-static Bool
-xwl_seat_can_emulate_pointer_warp(struct xwl_seat *xwl_seat)
-{
-    struct xwl_screen *xwl_screen;
-
-    if (!xwl_seat)
-        return FALSE;
-
-    if (!xwl_seat->pointer)
-        return FALSE;
-
-    xwl_screen = xwl_seat->xwl_screen;
-
-    if (!xwl_screen->relative_pointer_manager)
-        return FALSE;
-
-    if (!xwl_screen->pointer_constraints)
-        return FALSE;
-
-    return TRUE;
-}
-
-void
-xwl_seat_emulate_pointer_warp(struct xwl_seat *xwl_seat,
-                              struct xwl_window *xwl_window,
-                              SpritePtr sprite,
-                              int x, int y)
-{
-    if (!xwl_seat_can_emulate_pointer_warp(xwl_seat))
-        return;
-
-    if (xwl_seat->x_cursor != NULL)
-        return;
-
-    if (!xwl_seat->pointer_warp_emulator)
-        xwl_seat_create_pointer_warp_emulator(xwl_seat);
-
-    if (!xwl_seat->pointer_warp_emulator)
-        return;
-
-    xwl_pointer_warp_emulator_warp(xwl_seat->pointer_warp_emulator,
-                                   xwl_window,
-                                   sprite,
-                                   x, y);
-}
-
-static Bool
-xwl_seat_maybe_lock_on_hidden_cursor(struct xwl_seat *xwl_seat)
-{
-    /* Some clients use hidden cursor+confineTo+relative motion
-     * to implement infinite panning (eg. 3D views), lock the
-     * pointer for so the relative pointer is used.
-     */
-    if (xwl_seat->x_cursor ||
-        !xwl_seat->cursor_confinement_window)
-        return FALSE;
-
-    if (!xwl_seat->focus_window)
-        return FALSE;
-
-    if (xwl_seat->confined_pointer)
-        xwl_seat_destroy_confined_pointer(xwl_seat);
-
-    xwl_seat_create_pointer_warp_emulator(xwl_seat);
-    xwl_pointer_warp_emulator_lock(xwl_seat->pointer_warp_emulator);
-    return TRUE;
-}
-
-void
-xwl_seat_cursor_visibility_changed(struct xwl_seat *xwl_seat)
-{
-    if (xwl_seat->pointer_warp_emulator && xwl_seat->x_cursor != NULL) {
-        xwl_seat_destroy_pointer_warp_emulator(xwl_seat);
-    } else if (!xwl_seat->x_cursor && xwl_seat->cursor_confinement_window) {
-        /* If the cursor goes hidden as is confined, lock it for
-         * relative motion to work. */
-        xwl_seat_maybe_lock_on_hidden_cursor(xwl_seat);
-    }
-}
-
-void
-xwl_seat_destroy_pointer_warp_emulator(struct xwl_seat *xwl_seat)
-{
-    if (!xwl_seat->pointer_warp_emulator)
-        return;
-
-    xwl_pointer_warp_emulator_destroy(xwl_seat->pointer_warp_emulator);
-    xwl_seat->pointer_warp_emulator = NULL;
-
-    if (xwl_seat->cursor_confinement_window) {
-        xwl_seat_confine_pointer(xwl_seat,
-                                 xwl_seat->cursor_confinement_window);
-    }
-}
-
-void
-xwl_seat_confine_pointer(struct xwl_seat *xwl_seat,
-                         struct xwl_window *xwl_window)
-{
-    struct zwp_pointer_constraints_v1 *pointer_constraints =
-        xwl_seat->xwl_screen->pointer_constraints;
-
-    if (!pointer_constraints)
-        return;
-
-    if (!xwl_seat->wl_pointer)
-        return;
-
-    if (xwl_seat->cursor_confinement_window == xwl_window &&
-        xwl_seat->confined_pointer)
-        return;
-
-    xwl_seat_unconfine_pointer(xwl_seat);
-
-    xwl_seat->cursor_confinement_window = xwl_window;
-
-    if (xwl_seat->pointer_warp_emulator)
-        return;
-
-    if (xwl_seat_maybe_lock_on_hidden_cursor(xwl_seat))
-        return;
-
-    xwl_seat->confined_pointer =
-        zwp_pointer_constraints_v1_confine_pointer(pointer_constraints,
-                                                   xwl_window->surface,
-                                                   xwl_seat->wl_pointer,
-                                                   NULL,
-                                                   ZWP_POINTER_CONSTRAINTS_V1_LIFETIME_PERSISTENT);
-}
-
-static void
-xwl_seat_destroy_confined_pointer(struct xwl_seat *xwl_seat)
-{
-    zwp_confined_pointer_v1_destroy(xwl_seat->confined_pointer);
-    xwl_seat->confined_pointer = NULL;
-}
-
-void
-xwl_seat_unconfine_pointer(struct xwl_seat *xwl_seat)
-{
-    xwl_seat->cursor_confinement_window = NULL;
-
-    if (xwl_seat->confined_pointer)
-        xwl_seat_destroy_confined_pointer(xwl_seat);
-}
-
-void
-InitInput(int argc, char *argv[])
-{
-    ScreenPtr pScreen = screenInfo.screens[0];
-    struct xwl_screen *xwl_screen = xwl_screen_get(pScreen);
-
-    if (!dixRegisterPrivateKey(&xwl_tablet_private_key, PRIVATE_DEVICE, 0)) {
-        ErrorF("Failed to register private key\n");
-        return;
-    }
-
-    mieqInit();
-
-    xwl_screen->input_registry = wl_display_get_registry(xwl_screen->display);
-    wl_registry_add_listener(xwl_screen->input_registry, &input_listener,
-                             xwl_screen);
-
-    xwl_screen->XYToWindow = pScreen->XYToWindow;
-    pScreen->XYToWindow = xwl_xy_to_window;
-
-    xwl_screen_roundtrip(xwl_screen);
-}
-
-void
-CloseInput(void)
-{
-    mieqFini();
-}
diff --git a/hw/xwayland/xwayland-output.c b/hw/xwayland/xwayland-output.c
deleted file mode 100644
index ae646c6..0000000
--- a/hw/xwayland/xwayland-output.c
+++ /dev/null
@@ -1,474 +0,0 @@
-/*
- * Copyright © 2011-2014 Intel Corporation
- *
- * Permission to use, copy, modify, distribute, and sell this software
- * and its documentation for any purpose is hereby granted without
- * fee, provided that the above copyright notice appear in all copies
- * and that both that copyright notice and this permission notice
- * appear in supporting documentation, and that the name of the
- * copyright holders not be used in advertising or publicity
- * pertaining to distribution of the software without specific,
- * written prior permission.  The copyright holders make no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied
- * warranty.
- *
- * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
- * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
- * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include "xwayland.h"
-#include <randrstr.h>
-
-#define ALL_ROTATIONS (RR_Rotate_0   | \
-                       RR_Rotate_90  | \
-                       RR_Rotate_180 | \
-                       RR_Rotate_270 | \
-                       RR_Reflect_X  | \
-                       RR_Reflect_Y)
-
-static void xwl_output_get_xdg_output(struct xwl_output *xwl_output);
-
-static Rotation
-wl_transform_to_xrandr(enum wl_output_transform transform)
-{
-    switch (transform) {
-    default:
-    case WL_OUTPUT_TRANSFORM_NORMAL:
-        return RR_Rotate_0;
-    case WL_OUTPUT_TRANSFORM_90:
-        return RR_Rotate_90;
-    case WL_OUTPUT_TRANSFORM_180:
-        return RR_Rotate_180;
-    case WL_OUTPUT_TRANSFORM_270:
-        return RR_Rotate_270;
-    case WL_OUTPUT_TRANSFORM_FLIPPED:
-        return RR_Reflect_X | RR_Rotate_0;
-    case WL_OUTPUT_TRANSFORM_FLIPPED_90:
-        return RR_Reflect_X | RR_Rotate_90;
-    case WL_OUTPUT_TRANSFORM_FLIPPED_180:
-        return RR_Reflect_X | RR_Rotate_180;
-    case WL_OUTPUT_TRANSFORM_FLIPPED_270:
-        return RR_Reflect_X | RR_Rotate_270;
-    }
-}
-
-static int
-wl_subpixel_to_xrandr(int subpixel)
-{
-    switch (subpixel) {
-    default:
-    case WL_OUTPUT_SUBPIXEL_UNKNOWN:
-        return SubPixelUnknown;
-    case WL_OUTPUT_SUBPIXEL_NONE:
-        return SubPixelNone;
-    case WL_OUTPUT_SUBPIXEL_HORIZONTAL_RGB:
-        return SubPixelHorizontalRGB;
-    case WL_OUTPUT_SUBPIXEL_HORIZONTAL_BGR:
-        return SubPixelHorizontalBGR;
-    case WL_OUTPUT_SUBPIXEL_VERTICAL_RGB:
-        return SubPixelVerticalRGB;
-    case WL_OUTPUT_SUBPIXEL_VERTICAL_BGR:
-        return SubPixelVerticalBGR;
-    }
-}
-
-static void
-output_handle_geometry(void *data, struct wl_output *wl_output, int x, int y,
-                       int physical_width, int physical_height, int subpixel,
-                       const char *make, const char *model, int transform)
-{
-    struct xwl_output *xwl_output = data;
-
-    RROutputSetPhysicalSize(xwl_output->randr_output,
-                            physical_width, physical_height);
-    RROutputSetSubpixelOrder(xwl_output->randr_output,
-                             wl_subpixel_to_xrandr(subpixel));
-
-    /* Apply the change from wl_output only if xdg-output is not supported */
-    if (!xwl_output->xdg_output) {
-        xwl_output->x = x;
-        xwl_output->y = y;
-    }
-    xwl_output->rotation = wl_transform_to_xrandr(transform);
-}
-
-static void
-output_handle_mode(void *data, struct wl_output *wl_output, uint32_t flags,
-                   int width, int height, int refresh)
-{
-    struct xwl_output *xwl_output = data;
-
-    if (!(flags & WL_OUTPUT_MODE_CURRENT))
-        return;
-
-    /* Apply the change from wl_output only if xdg-output is not supported */
-    if (!xwl_output->xdg_output) {
-        xwl_output->width = width;
-        xwl_output->height = height;
-    }
-    xwl_output->refresh = refresh;
-}
-
-static inline void
-output_get_new_size(struct xwl_output *xwl_output,
-                    Bool need_rotate,
-                    int *height, int *width)
-{
-    int output_width, output_height;
-
-    if (!need_rotate || (xwl_output->rotation & (RR_Rotate_0 | RR_Rotate_180))) {
-        output_width = xwl_output->width;
-        output_height = xwl_output->height;
-    } else {
-        output_width = xwl_output->height;
-        output_height = xwl_output->width;
-    }
-
-    if (*width < xwl_output->x + output_width)
-        *width = xwl_output->x + output_width;
-
-    if (*height < xwl_output->y + output_height)
-        *height = xwl_output->y + output_height;
-}
-
-static int
-xwl_set_pixmap_visit_window(WindowPtr window, void *data)
-{
-    ScreenPtr screen = window->drawable.pScreen;
-
-    if (screen->GetWindowPixmap(window) == data) {
-        screen->SetWindowPixmap(window, screen->GetScreenPixmap(screen));
-        return WT_WALKCHILDREN;
-    }
-
-    return WT_DONTWALKCHILDREN;
-}
-
-static void
-update_backing_pixmaps(struct xwl_screen *xwl_screen, int width, int height)
-{
-    ScreenPtr pScreen = xwl_screen->screen;
-    WindowPtr pRoot = pScreen->root;
-    PixmapPtr old_pixmap, new_pixmap;
-
-    old_pixmap = pScreen->GetScreenPixmap(pScreen);
-    new_pixmap = pScreen->CreatePixmap(pScreen, width, height,
-                                       pScreen->rootDepth,
-                                       CREATE_PIXMAP_USAGE_BACKING_PIXMAP);
-    pScreen->SetScreenPixmap(new_pixmap);
-
-    if (old_pixmap) {
-        TraverseTree(pRoot, xwl_set_pixmap_visit_window, old_pixmap);
-        pScreen->DestroyPixmap(old_pixmap);
-    }
-
-    pScreen->ResizeWindow(pRoot, 0, 0, width, height, NULL);
-}
-
-static void
-update_screen_size(struct xwl_output *xwl_output, int width, int height)
-{
-    struct xwl_screen *xwl_screen = xwl_output->xwl_screen;
-
-    if (xwl_screen->root_clip_mode == ROOT_CLIP_FULL)
-        SetRootClip(xwl_screen->screen, ROOT_CLIP_NONE);
-
-    if (!xwl_screen->rootless && xwl_screen->screen->root)
-        update_backing_pixmaps (xwl_screen, width, height);
-
-    xwl_screen->width = width;
-    xwl_screen->height = height;
-    xwl_screen->screen->width = width;
-    xwl_screen->screen->height = height;
-    xwl_screen->screen->mmWidth = (width * 25.4) / monitorResolution;
-    xwl_screen->screen->mmHeight = (height * 25.4) / monitorResolution;
-
-    SetRootClip(xwl_screen->screen, xwl_screen->root_clip_mode);
-
-    if (xwl_screen->screen->root) {
-        BoxRec box = { 0, 0, width, height };
-
-        xwl_screen->screen->root->drawable.width = width;
-        xwl_screen->screen->root->drawable.height = height;
-        RegionReset(&xwl_screen->screen->root->winSize, &box);
-        RRScreenSizeNotify(xwl_screen->screen);
-    }
-
-    update_desktop_dimensions();
-}
-
-static void
-apply_output_change(struct xwl_output *xwl_output)
-{
-    struct xwl_screen *xwl_screen = xwl_output->xwl_screen;
-    struct xwl_output *it;
-    int mode_width, mode_height;
-    int width = 0, height = 0, has_this_output = 0;
-    RRModePtr randr_mode;
-    Bool need_rotate;
-
-    /* Clear out the "done" received flags */
-    xwl_output->wl_output_done = FALSE;
-    xwl_output->xdg_output_done = FALSE;
-
-    /* xdg-output sends output size in compositor space. so already rotated */
-    need_rotate = (xwl_output->xdg_output == NULL);
-
-    /* We need to rotate back the logical size for the mode */
-    if (need_rotate || xwl_output->rotation & (RR_Rotate_0 | RR_Rotate_180)) {
-        mode_width = xwl_output->width;
-        mode_height = xwl_output->height;
-    } else {
-        mode_width = xwl_output->height;
-        mode_height = xwl_output->width;
-    }
-
-    randr_mode = xwayland_cvt(mode_width, mode_height,
-                              xwl_output->refresh / 1000.0, 0, 0);
-    RROutputSetModes(xwl_output->randr_output, &randr_mode, 1, 1);
-    RRCrtcNotify(xwl_output->randr_crtc, randr_mode,
-                 xwl_output->x, xwl_output->y,
-                 xwl_output->rotation, NULL, 1, &xwl_output->randr_output);
-
-    xorg_list_for_each_entry(it, &xwl_screen->output_list, link) {
-        /* output done event is sent even when some property
-         * of output is changed. That means that we may already
-         * have this output. If it is true, we must not add it
-         * into the output_list otherwise we'll corrupt it */
-        if (it == xwl_output)
-            has_this_output = 1;
-
-        output_get_new_size(it, need_rotate, &height, &width);
-    }
-
-    if (!has_this_output) {
-        xorg_list_append(&xwl_output->link, &xwl_screen->output_list);
-
-        /* we did not check this output for new screen size, do it now */
-        output_get_new_size(xwl_output, need_rotate, &height, &width);
-
-	--xwl_screen->expecting_event;
-    }
-
-    update_screen_size(xwl_output, width, height);
-}
-
-static void
-output_handle_done(void *data, struct wl_output *wl_output)
-{
-    struct xwl_output *xwl_output = data;
-
-    xwl_output->wl_output_done = TRUE;
-    /* Apply the changes from wl_output only if both "done" events are received,
-     * or if xdg-output is not supported.
-     */
-    if (xwl_output->xdg_output_done || !xwl_output->xdg_output)
-        apply_output_change(xwl_output);
-}
-
-static void
-output_handle_scale(void *data, struct wl_output *wl_output, int32_t factor)
-{
-}
-
-static const struct wl_output_listener output_listener = {
-    output_handle_geometry,
-    output_handle_mode,
-    output_handle_done,
-    output_handle_scale
-};
-
-static void
-xdg_output_handle_logical_position(void *data, struct zxdg_output_v1 *xdg_output,
-                                   int32_t x, int32_t y)
-{
-    struct xwl_output *xwl_output = data;
-
-    xwl_output->x = x;
-    xwl_output->y = y;
-}
-
-static void
-xdg_output_handle_logical_size(void *data, struct zxdg_output_v1 *xdg_output,
-                               int32_t width, int32_t height)
-{
-    struct xwl_output *xwl_output = data;
-
-    xwl_output->width = width;
-    xwl_output->height = height;
-}
-
-static void
-xdg_output_handle_done(void *data, struct zxdg_output_v1 *xdg_output)
-{
-    struct xwl_output *xwl_output = data;
-
-    xwl_output->xdg_output_done = TRUE;
-    if (xwl_output->wl_output_done)
-        apply_output_change(xwl_output);
-}
-
-static const struct zxdg_output_v1_listener xdg_output_listener = {
-    xdg_output_handle_logical_position,
-    xdg_output_handle_logical_size,
-    xdg_output_handle_done,
-};
-
-struct xwl_output *
-xwl_output_create(struct xwl_screen *xwl_screen, uint32_t id)
-{
-    struct xwl_output *xwl_output;
-    static int serial;
-    char name[256];
-
-    xwl_output = calloc(1, sizeof *xwl_output);
-    if (xwl_output == NULL) {
-        ErrorF("%s ENOMEM\n", __func__);
-        return NULL;
-    }
-
-    xwl_output->output = wl_registry_bind(xwl_screen->registry, id,
-                                          &wl_output_interface, 2);
-    if (!xwl_output->output) {
-        ErrorF("Failed binding wl_output\n");
-        goto err;
-    }
-
-    xwl_output->server_output_id = id;
-    wl_output_add_listener(xwl_output->output, &output_listener, xwl_output);
-
-    snprintf(name, sizeof name, "XWAYLAND%d", serial++);
-
-    xwl_output->xwl_screen = xwl_screen;
-    xwl_output->randr_crtc = RRCrtcCreate(xwl_screen->screen, xwl_output);
-    if (!xwl_output->randr_crtc) {
-        ErrorF("Failed creating RandR CRTC\n");
-        goto err;
-    }
-    RRCrtcSetRotations (xwl_output->randr_crtc, ALL_ROTATIONS);
-
-    xwl_output->randr_output = RROutputCreate(xwl_screen->screen, name,
-                                              strlen(name), xwl_output);
-    if (!xwl_output->randr_output) {
-        ErrorF("Failed creating RandR Output\n");
-        goto err;
-    }
-
-    RRCrtcGammaSetSize(xwl_output->randr_crtc, 256);
-    RROutputSetCrtcs(xwl_output->randr_output, &xwl_output->randr_crtc, 1);
-    RROutputSetConnection(xwl_output->randr_output, RR_Connected);
-
-    /* We want the output to be in the list as soon as created so we can
-     * use it when binding to the xdg-output protocol...
-     */
-    xorg_list_append(&xwl_output->link, &xwl_screen->output_list);
-    --xwl_screen->expecting_event;
-
-    if (xwl_screen->xdg_output_manager)
-        xwl_output_get_xdg_output(xwl_output);
-
-    return xwl_output;
-
-err:
-    if (xwl_output->randr_crtc)
-        RRCrtcDestroy(xwl_output->randr_crtc);
-    if (xwl_output->output)
-        wl_output_destroy(xwl_output->output);
-    free(xwl_output);
-    return NULL;
-}
-
-void
-xwl_output_destroy(struct xwl_output *xwl_output)
-{
-    wl_output_destroy(xwl_output->output);
-    free(xwl_output);
-}
-
-void
-xwl_output_remove(struct xwl_output *xwl_output)
-{
-    struct xwl_output *it;
-    struct xwl_screen *xwl_screen = xwl_output->xwl_screen;
-    int width = 0, height = 0;
-    Bool need_rotate = (xwl_output->xdg_output == NULL);
-
-    xorg_list_del(&xwl_output->link);
-
-    xorg_list_for_each_entry(it, &xwl_screen->output_list, link)
-        output_get_new_size(it, need_rotate, &height, &width);
-    update_screen_size(xwl_output, width, height);
-
-    RRCrtcDestroy(xwl_output->randr_crtc);
-    RROutputDestroy(xwl_output->randr_output);
-
-    xwl_output_destroy(xwl_output);
-}
-
-static Bool
-xwl_randr_get_info(ScreenPtr pScreen, Rotation * rotations)
-{
-    *rotations = ALL_ROTATIONS;
-
-    return TRUE;
-}
-
-static Bool
-xwl_randr_set_config(ScreenPtr pScreen,
-                     Rotation rotation, int rate, RRScreenSizePtr pSize)
-{
-    return FALSE;
-}
-
-Bool
-xwl_screen_init_output(struct xwl_screen *xwl_screen)
-{
-    rrScrPrivPtr rp;
-
-    if (!RRScreenInit(xwl_screen->screen))
-        return FALSE;
-
-    RRScreenSetSizeRange(xwl_screen->screen, 16, 16, 32767, 32767);
-
-    rp = rrGetScrPriv(xwl_screen->screen);
-    rp->rrGetInfo = xwl_randr_get_info;
-    rp->rrSetConfig = xwl_randr_set_config;
-
-    return TRUE;
-}
-
-static void
-xwl_output_get_xdg_output(struct xwl_output *xwl_output)
-{
-    struct xwl_screen *xwl_screen = xwl_output->xwl_screen;
-
-    xwl_output->xdg_output =
-        zxdg_output_manager_v1_get_xdg_output (xwl_screen->xdg_output_manager,
-                                               xwl_output->output);
-
-    zxdg_output_v1_add_listener(xwl_output->xdg_output,
-                                &xdg_output_listener,
-                                xwl_output);
-}
-
-void
-xwl_screen_init_xdg_output(struct xwl_screen *xwl_screen)
-{
-    struct xwl_output *it;
-
-    assert(xwl_screen->xdg_output_manager);
-
-    xorg_list_for_each_entry(it, &xwl_screen->output_list, link)
-        xwl_output_get_xdg_output(it);
-}
diff --git a/hw/xwayland/xwayland-present.c b/hw/xwayland/xwayland-present.c
deleted file mode 100644
index d177abd..0000000
--- a/hw/xwayland/xwayland-present.c
+++ /dev/null
@@ -1,579 +0,0 @@
-/*
- * Copyright © 2018 Roman Gilg
- *
- * Permission to use, copy, modify, distribute, and sell this software
- * and its documentation for any purpose is hereby granted without
- * fee, provided that the above copyright notice appear in all copies
- * and that both that copyright notice and this permission notice
- * appear in supporting documentation, and that the name of the
- * copyright holders not be used in advertising or publicity
- * pertaining to distribution of the software without specific,
- * written prior permission.  The copyright holders make no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied
- * warranty.
- *
- * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
- * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
- * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#include "xwayland.h"
-#include "glamor.h"
-
-#include <present.h>
-
-/*
- * When not flipping let Present copy with 60fps.
- * When flipping wait on frame_callback, otherwise
- * the surface is not visible, in this case update
- * with long interval.
- */
-#define TIMER_LEN_COPY      17  // ~60fps
-#define TIMER_LEN_FLIP    1000  // 1fps
-
-static DevPrivateKeyRec xwl_present_window_private_key;
-
-static struct xwl_present_window *
-xwl_present_window_priv(WindowPtr window)
-{
-    return dixGetPrivate(&window->devPrivates,
-                         &xwl_present_window_private_key);
-}
-
-static struct xwl_present_window *
-xwl_present_window_get_priv(WindowPtr window)
-{
-    struct xwl_present_window *xwl_present_window = xwl_present_window_priv(window);
-
-    if (xwl_present_window == NULL) {
-        xwl_present_window = calloc (1, sizeof (struct xwl_present_window));
-        if (!xwl_present_window)
-            return NULL;
-
-        xwl_present_window->window = window;
-        xwl_present_window->msc = 1;
-        xwl_present_window->ust = GetTimeInMicros();
-
-        xorg_list_init(&xwl_present_window->frame_callback_list);
-        xorg_list_init(&xwl_present_window->event_list);
-        xorg_list_init(&xwl_present_window->release_queue);
-
-        dixSetPrivate(&window->devPrivates,
-                      &xwl_present_window_private_key,
-                      xwl_present_window);
-    }
-
-    return xwl_present_window;
-}
-
-static void
-xwl_present_free_timer(struct xwl_present_window *xwl_present_window)
-{
-    TimerFree(xwl_present_window->frame_timer);
-    xwl_present_window->frame_timer = NULL;
-}
-
-static CARD32
-xwl_present_timer_callback(OsTimerPtr timer,
-                           CARD32 time,
-                           void *arg);
-
-static inline Bool
-xwl_present_has_events(struct xwl_present_window *xwl_present_window)
-{
-    return !!xwl_present_window->sync_flip ||
-           !xorg_list_is_empty(&xwl_present_window->event_list);
-}
-
-static void
-xwl_present_reset_timer(struct xwl_present_window *xwl_present_window)
-{
-    if (xwl_present_has_events(xwl_present_window)) {
-        CARD32 timeout;
-
-        if (!xorg_list_is_empty(&xwl_present_window->frame_callback_list))
-            timeout = TIMER_LEN_FLIP;
-        else
-            timeout = TIMER_LEN_COPY;
-
-        xwl_present_window->frame_timer = TimerSet(xwl_present_window->frame_timer,
-                                                   0, timeout,
-                                                   &xwl_present_timer_callback,
-                                                   xwl_present_window);
-    } else {
-        xwl_present_free_timer(xwl_present_window);
-    }
-}
-
-static void
-xwl_present_free_event(struct xwl_present_event *event)
-{
-    if (!event)
-        return;
-
-    if (event->pixmap) {
-        if (!event->buffer_released) {
-            struct wl_buffer *buffer =
-                xwl_glamor_pixmap_get_wl_buffer(event->pixmap, NULL);
-
-            wl_buffer_set_user_data(buffer, NULL);
-        }
-
-        dixDestroyPixmap(event->pixmap, event->pixmap->drawable.id);
-    }
-
-    xorg_list_del(&event->list);
-    free(event);
-}
-
-void
-xwl_present_cleanup(WindowPtr window)
-{
-    struct xwl_present_window *xwl_present_window = xwl_present_window_priv(window);
-    struct xwl_present_event *event, *tmp;
-
-    if (!xwl_present_window)
-        return;
-
-    xorg_list_del(&xwl_present_window->frame_callback_list);
-
-    if (xwl_present_window->sync_callback) {
-        wl_callback_destroy(xwl_present_window->sync_callback);
-        xwl_present_window->sync_callback = NULL;
-    }
-
-    /* Clear remaining events */
-    xorg_list_for_each_entry_safe(event, tmp, &xwl_present_window->event_list, list)
-        xwl_present_free_event(event);
-
-    xwl_present_free_event(xwl_present_window->sync_flip);
-
-    xorg_list_for_each_entry_safe(event, tmp, &xwl_present_window->release_queue, list)
-        xwl_present_free_event(event);
-
-    /* Clear timer */
-    xwl_present_free_timer(xwl_present_window);
-
-    /* Remove from privates so we don't try to access it later */
-    dixSetPrivate(&window->devPrivates,
-                  &xwl_present_window_private_key,
-                  NULL);
-
-    free(xwl_present_window);
-}
-
-static void
-xwl_present_buffer_release(void *data, struct wl_buffer *buffer)
-{
-    struct xwl_present_event *event = data;
-    if (!event)
-        return;
-
-    wl_buffer_set_user_data(buffer, NULL);
-    event->buffer_released = TRUE;
-
-    if (event->abort) {
-        if (!event->pending)
-            xwl_present_free_event(event);
-        return;
-    }
-
-    if (!event->pending) {
-        present_wnmd_event_notify(event->xwl_present_window->window,
-                                  event->event_id,
-                                  event->xwl_present_window->ust,
-                                  event->xwl_present_window->msc);
-        xwl_present_free_event(event);
-    }
-}
-
-static const struct wl_buffer_listener xwl_present_release_listener = {
-    xwl_present_buffer_release
-};
-
-static void
-xwl_present_msc_bump(struct xwl_present_window *xwl_present_window)
-{
-    uint64_t msc = ++xwl_present_window->msc;
-    struct xwl_present_event    *event, *tmp;
-
-    xwl_present_window->ust = GetTimeInMicros();
-
-    event = xwl_present_window->sync_flip;
-    xwl_present_window->sync_flip = NULL;
-    if (event) {
-        event->pending = FALSE;
-
-        present_wnmd_event_notify(xwl_present_window->window, event->event_id,
-                                  xwl_present_window->ust, msc);
-
-        if (event->buffer_released) {
-            /* If the buffer was already released, clean up now */
-            present_wnmd_event_notify(xwl_present_window->window, event->event_id,
-                                      xwl_present_window->ust, msc);
-            xwl_present_free_event(event);
-        } else {
-            xorg_list_add(&event->list, &xwl_present_window->release_queue);
-        }
-    }
-
-    xorg_list_for_each_entry_safe(event, tmp,
-                                  &xwl_present_window->event_list,
-                                  list) {
-        if (event->target_msc <= msc) {
-            present_wnmd_event_notify(xwl_present_window->window,
-                                      event->event_id,
-                                      xwl_present_window->ust,
-                                      msc);
-            xwl_present_free_event(event);
-        }
-    }
-}
-
-CARD32
-xwl_present_timer_callback(OsTimerPtr timer,
-                           CARD32 time,
-                           void *arg)
-{
-    struct xwl_present_window *xwl_present_window = arg;
-
-    /* If we were expecting a frame callback for this window, it didn't arrive
-     * in a second. Stop listening to it to avoid double-bumping the MSC
-     */
-    xorg_list_del(&xwl_present_window->frame_callback_list);
-
-    xwl_present_msc_bump(xwl_present_window);
-    xwl_present_reset_timer(xwl_present_window);
-
-    return 0;
-}
-
-void
-xwl_present_frame_callback(struct xwl_present_window *xwl_present_window)
-{
-    xorg_list_del(&xwl_present_window->frame_callback_list);
-
-    xwl_present_msc_bump(xwl_present_window);
-
-    /* we do not need the timer anymore for this frame,
-     * reset it for potentially the next one
-     */
-    xwl_present_reset_timer(xwl_present_window);
-}
-
-static void
-xwl_present_sync_callback(void *data,
-               struct wl_callback *callback,
-               uint32_t time)
-{
-    struct xwl_present_event *event = data;
-    struct xwl_present_window *xwl_present_window = event->xwl_present_window;
-
-    wl_callback_destroy(xwl_present_window->sync_callback);
-    xwl_present_window->sync_callback = NULL;
-
-    event->pending = FALSE;
-
-    if (event->abort) {
-        /* Event might have been aborted */
-        if (event->buffer_released)
-            /* Buffer was already released, cleanup now */
-            xwl_present_free_event(event);
-        return;
-    }
-
-    present_wnmd_event_notify(xwl_present_window->window,
-                              event->event_id,
-                              xwl_present_window->ust,
-                              xwl_present_window->msc);
-
-    if (event->buffer_released) {
-        /* If the buffer was already released, send the event now again */
-        present_wnmd_event_notify(xwl_present_window->window,
-                                  event->event_id,
-                                  xwl_present_window->ust,
-                                  xwl_present_window->msc);
-        xwl_present_free_event(event);
-    }
-}
-
-static const struct wl_callback_listener xwl_present_sync_listener = {
-    xwl_present_sync_callback
-};
-
-static RRCrtcPtr
-xwl_present_get_crtc(WindowPtr present_window)
-{
-    struct xwl_present_window *xwl_present_window = xwl_present_window_get_priv(present_window);
-    rrScrPrivPtr rr_private;
-
-    if (xwl_present_window == NULL)
-        return NULL;
-
-    rr_private = rrGetScrPriv(present_window->drawable.pScreen);
-
-    if (rr_private->numCrtcs == 0)
-        return NULL;
-
-    return rr_private->crtcs[0];
-}
-
-static int
-xwl_present_get_ust_msc(WindowPtr present_window, uint64_t *ust, uint64_t *msc)
-{
-    struct xwl_present_window *xwl_present_window = xwl_present_window_get_priv(present_window);
-    if (!xwl_present_window)
-        return BadAlloc;
-
-    *ust = xwl_present_window->ust;
-    *msc = xwl_present_window->msc;
-
-    return Success;
-}
-
-/*
- * Queue an event to report back to the Present extension when the specified
- * MSC has past
- */
-static int
-xwl_present_queue_vblank(WindowPtr present_window,
-                         RRCrtcPtr crtc,
-                         uint64_t event_id,
-                         uint64_t msc)
-{
-    struct xwl_present_window *xwl_present_window = xwl_present_window_get_priv(present_window);
-    struct xwl_window *xwl_window = xwl_window_from_window(present_window);
-    struct xwl_present_event *event;
-
-    event = malloc(sizeof *event);
-    if (!event)
-        return BadAlloc;
-
-    event->event_id = event_id;
-    event->pixmap = NULL;
-    event->xwl_present_window = xwl_present_window;
-    event->target_msc = msc;
-
-    xorg_list_append(&event->list, &xwl_present_window->event_list);
-
-    /* If there's a pending frame callback, use that */
-    if (xwl_window && xwl_window->frame_callback &&
-        xorg_list_is_empty(&xwl_present_window->frame_callback_list)) {
-        xorg_list_add(&xwl_present_window->frame_callback_list,
-                      &xwl_window->frame_callback_list);
-    }
-
-    if ((xwl_window && xwl_window->frame_callback) ||
-        !xwl_present_window->frame_timer)
-        xwl_present_reset_timer(xwl_present_window);
-
-    return Success;
-}
-
-/*
- * Remove a pending vblank event so that it is not reported
- * to the extension
- */
-static void
-xwl_present_abort_vblank(WindowPtr present_window,
-                         RRCrtcPtr crtc,
-                         uint64_t event_id,
-                         uint64_t msc)
-{
-    struct xwl_present_window *xwl_present_window = xwl_present_window_priv(present_window);
-    struct xwl_present_event *event, *tmp;
-
-    if (!xwl_present_window)
-        return;
-
-    xorg_list_for_each_entry_safe(event, tmp, &xwl_present_window->event_list, list) {
-        if (event->event_id == event_id) {
-            xwl_present_free_event(event);
-            return;
-        }
-    }
-
-    xorg_list_for_each_entry(event, &xwl_present_window->release_queue, list) {
-        if (event->event_id == event_id) {
-            event->abort = TRUE;
-            return;
-        }
-    }
-}
-
-static void
-xwl_present_flush(WindowPtr window)
-{
-    glamor_block_handler(window->drawable.pScreen);
-}
-
-static Bool
-xwl_present_check_flip2(RRCrtcPtr crtc,
-                        WindowPtr present_window,
-                        PixmapPtr pixmap,
-                        Bool sync_flip,
-                        PresentFlipReason *reason)
-{
-    struct xwl_window *xwl_window = xwl_window_from_window(present_window);
-    ScreenPtr screen = pixmap->drawable.pScreen;
-
-    if (!xwl_window)
-        return FALSE;
-
-    /* Can't flip if the window pixmap doesn't match the xwl_window parent
-     * window's, e.g. because a client redirected this window or one of its
-     * parents.
-     */
-    if (screen->GetWindowPixmap(xwl_window->window) != screen->GetWindowPixmap(present_window))
-        return FALSE;
-
-    /*
-     * We currently only allow flips of windows, that have the same
-     * dimensions as their xwl_window parent window. For the case of
-     * different sizes subsurfaces are presumably the way forward.
-     */
-    if (!RegionEqual(&xwl_window->window->winSize, &present_window->winSize))
-        return FALSE;
-
-    return TRUE;
-}
-
-static Bool
-xwl_present_flip(WindowPtr present_window,
-                 RRCrtcPtr crtc,
-                 uint64_t event_id,
-                 uint64_t target_msc,
-                 PixmapPtr pixmap,
-                 Bool sync_flip,
-                 RegionPtr damage)
-{
-    struct xwl_window           *xwl_window = xwl_window_from_window(present_window);
-    struct xwl_present_window   *xwl_present_window = xwl_present_window_priv(present_window);
-    BoxPtr                      damage_box;
-    Bool                        buffer_created;
-    struct wl_buffer            *buffer;
-    struct xwl_present_event    *event;
-
-    if (!xwl_window)
-        return FALSE;
-
-    damage_box = RegionExtents(damage);
-
-    event = malloc(sizeof *event);
-    if (!event)
-        return FALSE;
-
-    pixmap->refcnt++;
-    buffer = xwl_glamor_pixmap_get_wl_buffer(pixmap, &buffer_created);
-
-    event->event_id = event_id;
-    event->xwl_present_window = xwl_present_window;
-    event->pixmap = pixmap;
-    event->target_msc = target_msc;
-    event->pending = TRUE;
-    event->abort = FALSE;
-    event->buffer_released = FALSE;
-
-    if (sync_flip) {
-        xorg_list_init(&event->list);
-        xwl_present_window->sync_flip = event;
-    } else {
-        xorg_list_add(&event->list, &xwl_present_window->release_queue);
-    }
-
-    if (buffer_created)
-        wl_buffer_add_listener(buffer, &xwl_present_release_listener, NULL);
-    wl_buffer_set_user_data(buffer, event);
-
-    /* We can flip directly to the main surface (full screen window without clips) */
-    wl_surface_attach(xwl_window->surface, buffer, 0, 0);
-
-    if (!xwl_window->frame_callback)
-        xwl_window_create_frame_callback(xwl_window);
-
-    if (xorg_list_is_empty(&xwl_present_window->frame_callback_list)) {
-        xorg_list_add(&xwl_present_window->frame_callback_list,
-                      &xwl_window->frame_callback_list);
-    }
-
-    /* Realign timer */
-    xwl_present_reset_timer(xwl_present_window);
-
-    wl_surface_damage(xwl_window->surface,
-                      damage_box->x1 - present_window->drawable.x,
-                      damage_box->y1 - present_window->drawable.y,
-                      damage_box->x2 - damage_box->x1,
-                      damage_box->y2 - damage_box->y1);
-
-    wl_surface_commit(xwl_window->surface);
-
-    if (!sync_flip) {
-        xwl_present_window->sync_callback =
-            wl_display_sync(xwl_window->xwl_screen->display);
-        wl_callback_add_listener(xwl_present_window->sync_callback,
-                                 &xwl_present_sync_listener,
-                                 event);
-    }
-
-    wl_display_flush(xwl_window->xwl_screen->display);
-    xwl_window->present_flipped = TRUE;
-    return TRUE;
-}
-
-static void
-xwl_present_flips_stop(WindowPtr window)
-{
-    struct xwl_present_window   *xwl_present_window = xwl_present_window_priv(window);
-
-    /* Change back to the fast refresh rate */
-    xwl_present_reset_timer(xwl_present_window);
-}
-
-void
-xwl_present_unrealize_window(struct xwl_present_window *xwl_present_window)
-{
-    /* The pending frame callback may never be called, so drop it and shorten
-     * the frame timer interval.
-     */
-    xorg_list_del(&xwl_present_window->frame_callback_list);
-    xwl_present_reset_timer(xwl_present_window);
-}
-
-static present_wnmd_info_rec xwl_present_info = {
-    .version = PRESENT_SCREEN_INFO_VERSION,
-    .get_crtc = xwl_present_get_crtc,
-
-    .get_ust_msc = xwl_present_get_ust_msc,
-    .queue_vblank = xwl_present_queue_vblank,
-    .abort_vblank = xwl_present_abort_vblank,
-
-    .flush = xwl_present_flush,
-
-    .capabilities = PresentCapabilityAsync,
-    .check_flip2 = xwl_present_check_flip2,
-    .flip = xwl_present_flip,
-    .flips_stop = xwl_present_flips_stop
-};
-
-Bool
-xwl_present_init(ScreenPtr screen)
-{
-    struct xwl_screen *xwl_screen = xwl_screen_get(screen);
-
-    /*
-     * doesn't work with the EGLStream backend.
-     */
-    if (xwl_screen->egl_backend == &xwl_screen->eglstream_backend)
-        return FALSE;
-
-    if (!dixRegisterPrivateKey(&xwl_present_window_private_key, PRIVATE_WINDOW, 0))
-        return FALSE;
-
-    return present_wnmd_screen_init(screen, &xwl_present_info);
-}
diff --git a/hw/xwayland/xwayland-shm.c b/hw/xwayland/xwayland-shm.c
deleted file mode 100644
index 29732ea..0000000
--- a/hw/xwayland/xwayland-shm.c
+++ /dev/null
@@ -1,306 +0,0 @@
-/*
- * Copyright © 2014 Intel Corporation
- * Copyright © 2012 Collabora, Ltd.
- *
- * Permission to use, copy, modify, distribute, and sell this software
- * and its documentation for any purpose is hereby granted without
- * fee, provided that the above copyright notice appear in all copies
- * and that both that copyright notice and this permission notice
- * appear in supporting documentation, and that the name of the
- * copyright holders not be used in advertising or publicity
- * pertaining to distribution of the software without specific,
- * written prior permission.  The copyright holders make no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied
- * warranty.
- *
- * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
- * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
- * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include "os.h"
-
-#include "xwayland.h"
-
-#include <sys/mman.h>
-#include <sys/types.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <stdlib.h>
-
-struct xwl_pixmap {
-    struct wl_buffer *buffer;
-    void *data;
-    size_t size;
-};
-
-#ifndef HAVE_MKOSTEMP
-static int
-set_cloexec_or_close(int fd)
-{
-    long flags;
-
-    if (fd == -1)
-        return -1;
-
-    flags = fcntl(fd, F_GETFD);
-    if (flags == -1)
-        goto err;
-
-    if (fcntl(fd, F_SETFD, flags | FD_CLOEXEC) == -1)
-        goto err;
-
-    return fd;
-
- err:
-    close(fd);
-    return -1;
-}
-#endif
-
-static int
-create_tmpfile_cloexec(char *tmpname)
-{
-    int fd;
-
-#ifdef HAVE_MKOSTEMP
-    fd = mkostemp(tmpname, O_CLOEXEC);
-    if (fd >= 0)
-        unlink(tmpname);
-#else
-    fd = mkstemp(tmpname);
-    if (fd >= 0) {
-        fd = set_cloexec_or_close(fd);
-        unlink(tmpname);
-    }
-#endif
-
-    return os_move_fd(fd);
-}
-
-/*
- * Create a new, unique, anonymous file of the given size, and
- * return the file descriptor for it. The file descriptor is set
- * CLOEXEC. The file is immediately suitable for mmap()'ing
- * the given size at offset zero.
- *
- * The file should not have a permanent backing store like a disk,
- * but may have if XDG_RUNTIME_DIR is not properly implemented in OS.
- *
- * The file name is deleted from the file system.
- *
- * The file is suitable for buffer sharing between processes by
- * transmitting the file descriptor over Unix sockets using the
- * SCM_RIGHTS methods.
- *
- * If the C library implements posix_fallocate(), it is used to
- * guarantee that disk space is available for the file at the
- * given size. If disk space is insufficent, errno is set to ENOSPC.
- * If posix_fallocate() is not supported, program may receive
- * SIGBUS on accessing mmap()'ed file contents instead.
- */
-static int
-os_create_anonymous_file(off_t size)
-{
-    static const char template[] = "/xwayland-shared-XXXXXX";
-    const char *path;
-    char *name;
-    int fd;
-    int ret;
-
-    path = getenv("XDG_RUNTIME_DIR");
-    if (!path) {
-        errno = ENOENT;
-        return -1;
-    }
-
-    name = malloc(strlen(path) + sizeof(template));
-    if (!name)
-        return -1;
-
-    strcpy(name, path);
-    strcat(name, template);
-
-    fd = create_tmpfile_cloexec(name);
-
-    free(name);
-
-    if (fd < 0)
-        return -1;
-
-#ifdef HAVE_POSIX_FALLOCATE
-    /*
-     * posix_fallocate does an explicit rollback if it gets EINTR.
-     * Temporarily block signals to allow the call to succeed on
-     * slow systems where the smart scheduler's SIGALRM prevents
-     * large allocation attempts from ever succeeding.
-     */
-    OsBlockSignals();
-    do {
-        ret = posix_fallocate(fd, 0, size);
-    } while (ret == EINTR);
-    OsReleaseSignals();
-
-    if (ret != 0) {
-        close(fd);
-        errno = ret;
-        return -1;
-    }
-#else
-    do {
-        ret = ftruncate(fd, size);
-    } while (ret == -1 && errno == EINTR);
-
-    if (ret < 0) {
-        close(fd);
-        return -1;
-    }
-#endif
-
-    return fd;
-}
-
-static uint32_t
-shm_format_for_depth(int depth)
-{
-    switch (depth) {
-    case 32:
-        return WL_SHM_FORMAT_ARGB8888;
-    case 24:
-    default:
-        return WL_SHM_FORMAT_XRGB8888;
-#ifdef WL_SHM_FORMAT_RGB565
-    case 16:
-        /* XXX: Check run-time protocol version too */
-        return WL_SHM_FORMAT_RGB565;
-#endif
-    }
-}
-
-PixmapPtr
-xwl_shm_create_pixmap(ScreenPtr screen,
-                      int width, int height, int depth, unsigned int hint)
-{
-    struct xwl_screen *xwl_screen = xwl_screen_get(screen);
-    struct xwl_pixmap *xwl_pixmap;
-    struct wl_shm_pool *pool;
-    PixmapPtr pixmap;
-    size_t size, stride;
-    uint32_t format;
-    int fd;
-
-    if (hint == CREATE_PIXMAP_USAGE_GLYPH_PICTURE ||
-        (width == 0 && height == 0) || depth < 15)
-        return fbCreatePixmap(screen, width, height, depth, hint);
-
-    pixmap = fbCreatePixmap(screen, 0, 0, depth, hint);
-    if (!pixmap)
-        return NULL;
-
-    xwl_pixmap = malloc(sizeof *xwl_pixmap);
-    if (xwl_pixmap == NULL)
-        goto err_destroy_pixmap;
-
-    stride = PixmapBytePad(width, depth);
-    size = stride * height;
-    xwl_pixmap->buffer = NULL;
-    xwl_pixmap->size = size;
-    fd = os_create_anonymous_file(size);
-    if (fd < 0)
-        goto err_free_xwl_pixmap;
-
-    xwl_pixmap->data = mmap(NULL, size, PROT_READ | PROT_WRITE,
-                                  MAP_SHARED, fd, 0);
-    if (xwl_pixmap->data == MAP_FAILED)
-        goto err_close_fd;
-
-    if (!(*screen->ModifyPixmapHeader) (pixmap, width, height, depth,
-                                        BitsPerPixel(depth),
-                                        stride, xwl_pixmap->data))
-        goto err_munmap;
-
-    format = shm_format_for_depth(pixmap->drawable.depth);
-    pool = wl_shm_create_pool(xwl_screen->shm, fd, xwl_pixmap->size);
-    xwl_pixmap->buffer = wl_shm_pool_create_buffer(pool, 0,
-                                                   pixmap->drawable.width,
-                                                   pixmap->drawable.height,
-                                                   pixmap->devKind, format);
-    wl_shm_pool_destroy(pool);
-    close(fd);
-
-    xwl_pixmap_set_private(pixmap, xwl_pixmap);
-
-    return pixmap;
-
- err_munmap:
-    munmap(xwl_pixmap->data, size);
- err_close_fd:
-    close(fd);
- err_free_xwl_pixmap:
-    free(xwl_pixmap);
- err_destroy_pixmap:
-    fbDestroyPixmap(pixmap);
-
-    return NULL;
-}
-
-Bool
-xwl_shm_destroy_pixmap(PixmapPtr pixmap)
-{
-    struct xwl_pixmap *xwl_pixmap = xwl_pixmap_get(pixmap);
-
-    if (xwl_pixmap && pixmap->refcnt == 1) {
-        if (xwl_pixmap->buffer)
-            wl_buffer_destroy(xwl_pixmap->buffer);
-        munmap(xwl_pixmap->data, xwl_pixmap->size);
-        free(xwl_pixmap);
-    }
-
-    return fbDestroyPixmap(pixmap);
-}
-
-struct wl_buffer *
-xwl_shm_pixmap_get_wl_buffer(PixmapPtr pixmap)
-{
-    return xwl_pixmap_get(pixmap)->buffer;
-}
-
-Bool
-xwl_shm_create_screen_resources(ScreenPtr screen)
-{
-    struct xwl_screen *xwl_screen = xwl_screen_get(screen);
-    int ret;
-
-    screen->CreateScreenResources = xwl_screen->CreateScreenResources;
-    ret = (*screen->CreateScreenResources) (screen);
-    xwl_screen->CreateScreenResources = screen->CreateScreenResources;
-    screen->CreateScreenResources = xwl_shm_create_screen_resources;
-
-    if (!ret)
-        return ret;
-
-    if (xwl_screen->rootless)
-        screen->devPrivate =
-            fbCreatePixmap(screen, 0, 0, screen->rootDepth, 0);
-    else
-        screen->devPrivate =
-            xwl_shm_create_pixmap(screen, screen->width, screen->height,
-                                  screen->rootDepth,
-                                  CREATE_PIXMAP_USAGE_BACKING_PIXMAP);
-
-    SetRootClip(screen, xwl_screen->root_clip_mode);
-
-    return screen->devPrivate != NULL;
-}
diff --git a/hw/xwayland/xwayland-vidmode.c b/hw/xwayland/xwayland-vidmode.c
deleted file mode 100644
index d25d1ac..0000000
--- a/hw/xwayland/xwayland-vidmode.c
+++ /dev/null
@@ -1,420 +0,0 @@
-/*
- * Copyright (c) 1999-2003 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name of the copyright holder(s)
- * and author(s) shall not be used in advertising or otherwise to promote
- * the sale, use or other dealings in this Software without prior written
- * authorization from the copyright holder(s) and author(s).
- */
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <X11/X.h>
-#include "misc.h"
-#include "os.h"
-#include "extinit.h"
-
-#ifdef XF86VIDMODE
-#include "xwayland.h"
-#include "randrstr.h"
-#include "vidmodestr.h"
-
-static DevPrivateKeyRec xwlVidModePrivateKeyRec;
-#define xwlVidModePrivateKey (&xwlVidModePrivateKeyRec)
-
-/* Taken from xrandr, h sync frequency in KHz */
-static double
-mode_hsync(const xRRModeInfo *mode_info)
-{
-    double rate;
-
-    if (mode_info->hTotal)
-        rate = (double) mode_info->dotClock / (double) mode_info->hTotal;
-    else
-        rate = 0.0;
-
-    return rate / 1000.0;
-}
-
-/* Taken from xrandr, v refresh frequency in Hz */
-static double
-mode_refresh(const xRRModeInfo *mode_info)
-{
-    double rate;
-    double vTotal = mode_info->vTotal;
-
-    if (mode_info->modeFlags & RR_DoubleScan)
-	vTotal *= 2.0;
-
-    if (mode_info->modeFlags & RR_Interlace)
-	vTotal /= 2.0;
-
-    if (mode_info->hTotal > 0.0 && vTotal > 0.0)
-	rate = ((double) mode_info->dotClock /
-		((double) mode_info->hTotal * (double) vTotal));
-    else
-        rate = 0.0;
-
-    return rate;
-}
-
-static Bool
-xwlVidModeGetCurrentModeline(ScreenPtr pScreen, DisplayModePtr *mode, int *dotClock)
-{
-    DisplayModePtr pMod;
-    RROutputPtr output;
-    RRCrtcPtr crtc;
-    xRRModeInfo rrmode;
-
-    pMod = dixLookupPrivate(&pScreen->devPrivates, xwlVidModePrivateKey);
-    if (pMod == NULL)
-        return FALSE;
-
-    output = RRFirstOutput(pScreen);
-    if (output == NULL)
-        return FALSE;
-
-    crtc = output->crtc;
-    if (crtc == NULL)
-        return FALSE;
-
-    rrmode = crtc->mode->mode;
-
-    pMod->next = pMod;
-    pMod->prev = pMod;
-    pMod->name = "";
-    pMod->VScan = 1;
-    pMod->Private = NULL;
-    pMod->HDisplay = rrmode.width;
-    pMod->HSyncStart = rrmode.hSyncStart;
-    pMod->HSyncEnd = rrmode.hSyncEnd;
-    pMod->HTotal = rrmode.hTotal;
-    pMod->HSkew = rrmode.hSkew;
-    pMod->VDisplay = rrmode.height;
-    pMod->VSyncStart = rrmode.vSyncStart;
-    pMod->VSyncEnd = rrmode.vSyncEnd;
-    pMod->VTotal = rrmode.vTotal;
-    pMod->Flags = rrmode.modeFlags;
-    pMod->Clock = rrmode.dotClock / 1000.0;
-    pMod->VRefresh = mode_refresh(&rrmode); /* Or RRVerticalRefresh() */
-    pMod->HSync = mode_hsync(&rrmode);
-    *mode = pMod;
-
-    if (dotClock != NULL)
-        *dotClock = rrmode.dotClock / 1000.0;
-
-    return TRUE;
-}
-
-static vidMonitorValue
-xwlVidModeGetMonitorValue(ScreenPtr pScreen, int valtyp, int indx)
-{
-    vidMonitorValue ret = { NULL, };
-    DisplayModePtr pMod;
-
-    if (!xwlVidModeGetCurrentModeline(pScreen, &pMod, NULL))
-        return ret;
-
-    switch (valtyp) {
-    case VIDMODE_MON_VENDOR:
-        ret.ptr = XVENDORNAME;
-        break;
-    case VIDMODE_MON_MODEL:
-        ret.ptr = "XWAYLAND";
-        break;
-    case VIDMODE_MON_NHSYNC:
-        ret.i = 1;
-        break;
-    case VIDMODE_MON_NVREFRESH:
-        ret.i = 1;
-        break;
-    case VIDMODE_MON_HSYNC_LO:
-    case VIDMODE_MON_HSYNC_HI:
-        ret.f = 100.0 * pMod->HSync;
-        break;
-    case VIDMODE_MON_VREFRESH_LO:
-    case VIDMODE_MON_VREFRESH_HI:
-        ret.f = 100.0 * pMod->VRefresh;
-        break;
-    }
-    return ret;
-}
-
-static int
-xwlVidModeGetDotClock(ScreenPtr pScreen, int Clock)
-{
-    DisplayModePtr pMod;
-
-    if (!xwlVidModeGetCurrentModeline(pScreen, &pMod, NULL))
-        return 0;
-
-    return pMod->Clock;
-
-}
-
-static int
-xwlVidModeGetNumOfClocks(ScreenPtr pScreen, Bool *progClock)
-{
-    return 1;
-}
-
-static Bool
-xwlVidModeGetClocks(ScreenPtr pScreen, int *Clocks)
-{
-    *Clocks = xwlVidModeGetDotClock(pScreen, 0);
-
-    return TRUE;
-}
-
-static Bool
-xwlVidModeGetNextModeline(ScreenPtr pScreen, DisplayModePtr *mode, int *dotClock)
-{
-    return FALSE;
-}
-
-static Bool
-xwlVidModeGetFirstModeline(ScreenPtr pScreen, DisplayModePtr *mode, int *dotClock)
-{
-    return xwlVidModeGetCurrentModeline(pScreen, mode, dotClock);
-}
-
-static Bool
-xwlVidModeDeleteModeline(ScreenPtr pScreen, DisplayModePtr mode)
-{
-    /* Unsupported */
-    return FALSE;
-}
-
-static Bool
-xwlVidModeZoomViewport(ScreenPtr pScreen, int zoom)
-{
-    /* Support only no zoom */
-    return (zoom == 1);
-}
-
-static Bool
-xwlVidModeSetViewPort(ScreenPtr pScreen, int x, int y)
-{
-    RROutputPtr output;
-    RRCrtcPtr crtc;
-
-    output = RRFirstOutput(pScreen);
-    if (output == NULL)
-        return FALSE;
-
-    crtc = output->crtc;
-    if (crtc == NULL)
-        return FALSE;
-
-    /* Support only default viewport */
-    return (x == crtc->x && y == crtc->y);
-}
-
-static Bool
-xwlVidModeGetViewPort(ScreenPtr pScreen, int *x, int *y)
-{
-    RROutputPtr output;
-    RRCrtcPtr crtc;
-
-    output = RRFirstOutput(pScreen);
-    if (output == NULL)
-        return FALSE;
-
-    crtc = output->crtc;
-    if (crtc == NULL)
-        return FALSE;
-
-    *x = crtc->x;
-    *y = crtc->y;
-
-    return TRUE;
-}
-
-static Bool
-xwlVidModeSwitchMode(ScreenPtr pScreen, DisplayModePtr mode)
-{
-    /* Unsupported for now */
-    return FALSE;
-}
-
-static Bool
-xwlVidModeLockZoom(ScreenPtr pScreen, Bool lock)
-{
-    /* Unsupported for now, but pretend it works */
-    return TRUE;
-}
-
-static ModeStatus
-xwlVidModeCheckModeForMonitor(ScreenPtr pScreen, DisplayModePtr mode)
-{
-    DisplayModePtr pMod;
-
-    /* This should not happen */
-    if (!xwlVidModeGetCurrentModeline(pScreen, &pMod, NULL))
-        return MODE_ERROR;
-
-    /* Only support mode with the same HSync/VRefresh as we advertise */
-    if (mode->HSync == pMod->HSync && mode->VRefresh == pMod->VRefresh)
-        return MODE_OK;
-
-    /* All the rest is unsupported - If we want to succeed, return MODE_OK instead */
-    return MODE_ONE_SIZE;
-}
-
-static ModeStatus
-xwlVidModeCheckModeForDriver(ScreenPtr pScreen, DisplayModePtr mode)
-{
-    DisplayModePtr pMod;
-
-    /* This should not happen */
-    if (!xwlVidModeGetCurrentModeline(pScreen, &pMod, NULL))
-        return MODE_ERROR;
-
-    if (mode->HTotal != pMod->HTotal)
-        return MODE_BAD_HVALUE;
-
-    if (mode->VTotal != pMod->VTotal)
-        return MODE_BAD_VVALUE;
-
-    /* Unsupported for now, but pretend it works */
-    return MODE_OK;
-}
-
-static void
-xwlVidModeSetCrtcForMode(ScreenPtr pScreen, DisplayModePtr mode)
-{
-    /* Unsupported */
-    return;
-}
-
-static Bool
-xwlVidModeAddModeline(ScreenPtr pScreen, DisplayModePtr mode)
-{
-    /* Unsupported */
-    return FALSE;
-}
-
-static int
-xwlVidModeGetNumOfModes(ScreenPtr pScreen)
-{
-    /* We have only one mode */
-    return 1;
-}
-
-static Bool
-xwlVidModeSetGamma(ScreenPtr pScreen, float red, float green, float blue)
-{
-    /* Unsupported for now, but pretend it works */
-    return TRUE;
-}
-
-static Bool
-xwlVidModeGetGamma(ScreenPtr pScreen, float *red, float *green, float *blue)
-{
-    /* Unsupported for now, but pretend it works */
-    *red = *green = *blue = 1.0f;
-    return TRUE;
-}
-
-static Bool
-xwlVidModeSetGammaRamp(ScreenPtr pScreen, int size, CARD16 *r, CARD16 *g, CARD16 *b)
-{
-    /* Unsupported for now */
-    return FALSE;
-}
-
-static Bool
-xwlVidModeGetGammaRamp(ScreenPtr pScreen, int size, CARD16 *r, CARD16 *g, CARD16 *b)
-{
-    /* Unsupported for now */
-    return FALSE;
-}
-
-static int
-xwlVidModeGetGammaRampSize(ScreenPtr pScreen)
-{
-    /* Unsupported for now */
-    return 0;
-}
-
-static Bool
-xwlVidModeInit(ScreenPtr pScreen)
-{
-    VidModePtr pVidMode = NULL;
-
-    pVidMode = VidModeInit(pScreen);
-    if (!pVidMode)
-        return FALSE;
-
-    pVidMode->Flags = 0;
-    pVidMode->Next = NULL;
-
-    pVidMode->GetMonitorValue = xwlVidModeGetMonitorValue;
-    pVidMode->GetCurrentModeline = xwlVidModeGetCurrentModeline;
-    pVidMode->GetFirstModeline = xwlVidModeGetFirstModeline;
-    pVidMode->GetNextModeline = xwlVidModeGetNextModeline;
-    pVidMode->DeleteModeline = xwlVidModeDeleteModeline;
-    pVidMode->ZoomViewport = xwlVidModeZoomViewport;
-    pVidMode->GetViewPort = xwlVidModeGetViewPort;
-    pVidMode->SetViewPort = xwlVidModeSetViewPort;
-    pVidMode->SwitchMode = xwlVidModeSwitchMode;
-    pVidMode->LockZoom = xwlVidModeLockZoom;
-    pVidMode->GetNumOfClocks = xwlVidModeGetNumOfClocks;
-    pVidMode->GetClocks = xwlVidModeGetClocks;
-    pVidMode->CheckModeForMonitor = xwlVidModeCheckModeForMonitor;
-    pVidMode->CheckModeForDriver = xwlVidModeCheckModeForDriver;
-    pVidMode->SetCrtcForMode = xwlVidModeSetCrtcForMode;
-    pVidMode->AddModeline = xwlVidModeAddModeline;
-    pVidMode->GetDotClock = xwlVidModeGetDotClock;
-    pVidMode->GetNumOfModes = xwlVidModeGetNumOfModes;
-    pVidMode->SetGamma = xwlVidModeSetGamma;
-    pVidMode->GetGamma = xwlVidModeGetGamma;
-    pVidMode->SetGammaRamp = xwlVidModeSetGammaRamp;
-    pVidMode->GetGammaRamp = xwlVidModeGetGammaRamp;
-    pVidMode->GetGammaRampSize = xwlVidModeGetGammaRampSize;
-
-    return TRUE;
-}
-
-void
-xwlVidModeExtensionInit(void)
-{
-    int i;
-    Bool enabled = FALSE;
-
-    for (i = 0; i < screenInfo.numScreens; i++) {
-        if (xwlVidModeInit (screenInfo.screens[i]))
-            enabled = TRUE;
-    }
-    /* This means that the DDX doesn't want the vidmode extension enabled */
-    if (!enabled)
-        return;
-
-    if (!dixRegisterPrivateKey(xwlVidModePrivateKey, PRIVATE_SCREEN,
-                               sizeof(DisplayModeRec)))
-        return;
-
-    VidModeAddExtension(FALSE);
-}
-
-#endif                          /* XF86VIDMODE */
diff --git a/hw/xwayland/xwayland.c b/hw/xwayland/xwayland.c
deleted file mode 100644
index c126d95..0000000
--- a/hw/xwayland/xwayland.c
+++ /dev/null
@@ -1,1356 +0,0 @@
-/*
- * Copyright © 2011-2014 Intel Corporation
- *
- * Permission to use, copy, modify, distribute, and sell this software
- * and its documentation for any purpose is hereby granted without
- * fee, provided that the above copyright notice appear in all copies
- * and that both that copyright notice and this permission notice
- * appear in supporting documentation, and that the name of the
- * copyright holders not be used in advertising or publicity
- * pertaining to distribution of the software without specific,
- * written prior permission.  The copyright holders make no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied
- * warranty.
- *
- * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
- * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
- * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#include "xwayland.h"
-
-#include <stdio.h>
-
-#include <X11/Xatom.h>
-#include <selection.h>
-#include <micmap.h>
-#include <misyncshm.h>
-#include <compositeext.h>
-#include <compint.h>
-#include <glx_extinit.h>
-#include <os.h>
-#include <xserver_poll.h>
-#include <propertyst.h>
-
-#ifdef XF86VIDMODE
-#include <X11/extensions/xf86vmproto.h>
-extern _X_EXPORT Bool noXFree86VidModeExtension;
-#endif
-
-#ifdef XWL_HAS_GLAMOR
-#include <glamor.h>
-#endif
-
-void
-ddxGiveUp(enum ExitCode error)
-{
-}
-
-void
-AbortDDX(enum ExitCode error)
-{
-    ddxGiveUp(error);
-}
-
-void
-OsVendorInit(void)
-{
-    if (serverGeneration == 1)
-        ForceClockId(CLOCK_MONOTONIC);
-}
-
-void
-OsVendorFatalError(const char *f, va_list args)
-{
-}
-
-#if defined(DDXBEFORERESET)
-void
-ddxBeforeReset(void)
-{
-    return;
-}
-#endif
-
-#if INPUTTHREAD
-/** This function is called in Xserver/os/inputthread.c when starting
-    the input thread. */
-void
-ddxInputThreadInit(void)
-{
-}
-#endif
-
-#define DEFAULT_DPI 96
-
- _X_NORETURN
-static void _X_ATTRIBUTE_PRINTF(1, 2)
-xwl_give_up(const char *f, ...)
-{
-    va_list args;
-
-    va_start(args, f);
-    VErrorFSigSafe(f, args);
-    va_end(args);
-
-    CloseWellKnownConnections();
-    OsCleanup(TRUE);
-    fflush(stderr);
-    exit(1);
-}
-
-void
-ddxUseMsg(void)
-{
-    ErrorF("-rootless              run rootless, requires wm support\n");
-    ErrorF("-wm fd                 create X client for wm on given fd\n");
-    ErrorF("-listen fd             add give fd as a listen socket\n");
-    ErrorF("-eglstream             use eglstream backend for nvidia GPUs\n");
-}
-
-int
-ddxProcessArgument(int argc, char *argv[], int i)
-{
-    if (strcmp(argv[i], "-rootless") == 0) {
-        return 1;
-    }
-    else if (strcmp(argv[i], "-listen") == 0) {
-        NoListenAll = TRUE;
-        return 2;
-    }
-    else if (strcmp(argv[i], "-wm") == 0) {
-        return 2;
-    }
-    else if (strcmp(argv[i], "-shm") == 0) {
-        return 1;
-    }
-    else if (strcmp(argv[i], "-eglstream") == 0) {
-        return 1;
-    }
-
-    return 0;
-}
-
-static DevPrivateKeyRec xwl_window_private_key;
-static DevPrivateKeyRec xwl_screen_private_key;
-static DevPrivateKeyRec xwl_pixmap_private_key;
-static DevPrivateKeyRec xwl_damage_private_key;
-
-static struct xwl_window *
-xwl_window_get(WindowPtr window)
-{
-    return dixLookupPrivate(&window->devPrivates, &xwl_window_private_key);
-}
-
-struct xwl_screen *
-xwl_screen_get(ScreenPtr screen)
-{
-    return dixLookupPrivate(&screen->devPrivates, &xwl_screen_private_key);
-}
-
-static void
-xwl_window_set_allow_commits(struct xwl_window *xwl_window, Bool allow,
-                             const char *debug_msg)
-{
-    xwl_window->allow_commits = allow;
-    DebugF("xwayland: win %d allow_commits = %d (%s)\n",
-           xwl_window->window->drawable.id, allow, debug_msg);
-}
-
-static void
-xwl_window_set_allow_commits_from_property(struct xwl_window *xwl_window,
-                                           PropertyPtr prop)
-{
-    static Bool warned = FALSE;
-    CARD32 *propdata;
-
-    if (prop->propertyName != xwl_window->xwl_screen->allow_commits_prop)
-        FatalError("Xwayland internal error: prop mismatch in %s.\n", __func__);
-
-    if (prop->type != XA_CARDINAL || prop->format != 32 || prop->size != 1) {
-        /* Not properly set, so fall back to safe and glitchy */
-        xwl_window_set_allow_commits(xwl_window, TRUE, "WM fault");
-
-        if (!warned) {
-            LogMessageVerb(X_WARNING, 0, "Window manager is misusing property %s.\n",
-                           NameForAtom(prop->propertyName));
-            warned = TRUE;
-        }
-        return;
-    }
-
-    propdata = prop->data;
-    xwl_window_set_allow_commits(xwl_window, !!propdata[0], "from property");
-}
-
-static void
-xwl_window_property_allow_commits(struct xwl_window *xwl_window,
-                                  PropertyStateRec *propstate)
-{
-    switch (propstate->state) {
-    case PropertyNewValue:
-        xwl_window_set_allow_commits_from_property(xwl_window, propstate->prop);
-        break;
-
-    case PropertyDelete:
-        xwl_window_set_allow_commits(xwl_window, TRUE, "property deleted");
-        break;
-
-    default:
-        break;
-    }
-}
-
-static void
-xwl_property_callback(CallbackListPtr *pcbl, void *closure,
-                      void *calldata)
-{
-    ScreenPtr screen = closure;
-    PropertyStateRec *rec = calldata;
-    struct xwl_screen *xwl_screen;
-    struct xwl_window *xwl_window;
-
-    if (rec->win->drawable.pScreen != screen)
-        return;
-
-    xwl_window = xwl_window_get(rec->win);
-    if (!xwl_window)
-        return;
-
-    xwl_screen = xwl_screen_get(screen);
-
-    if (rec->prop->propertyName == xwl_screen->allow_commits_prop)
-        xwl_window_property_allow_commits(xwl_window, rec);
-}
-
-static Bool
-xwl_close_screen(ScreenPtr screen)
-{
-    struct xwl_screen *xwl_screen = xwl_screen_get(screen);
-    struct xwl_output *xwl_output, *next_xwl_output;
-    struct xwl_seat *xwl_seat, *next_xwl_seat;
-
-    DeleteCallback(&PropertyStateCallback, xwl_property_callback, screen);
-
-    xorg_list_for_each_entry_safe(xwl_output, next_xwl_output,
-                                  &xwl_screen->output_list, link)
-        xwl_output_destroy(xwl_output);
-
-    xorg_list_for_each_entry_safe(xwl_seat, next_xwl_seat,
-                                  &xwl_screen->seat_list, link)
-        xwl_seat_destroy(xwl_seat);
-
-    xwl_screen_release_tablet_manager(xwl_screen);
-
-    RemoveNotifyFd(xwl_screen->wayland_fd);
-
-    wl_display_disconnect(xwl_screen->display);
-
-    screen->CloseScreen = xwl_screen->CloseScreen;
-    free(xwl_screen);
-
-    return screen->CloseScreen(screen);
-}
-
-struct xwl_window *
-xwl_window_from_window(WindowPtr window)
-{
-    struct xwl_window *xwl_window;
-
-    while (window) {
-        xwl_window = xwl_window_get(window);
-        if (xwl_window)
-            return xwl_window;
-
-        window = window->parent;
-    }
-
-    return NULL;
-}
-
-static struct xwl_seat *
-xwl_screen_get_default_seat(struct xwl_screen *xwl_screen)
-{
-    if (xorg_list_is_empty(&xwl_screen->seat_list))
-        return NULL;
-
-    return container_of(xwl_screen->seat_list.prev,
-                        struct xwl_seat,
-                        link);
-}
-
-static void
-xwl_cursor_warped_to(DeviceIntPtr device,
-                     ScreenPtr screen,
-                     ClientPtr client,
-                     WindowPtr window,
-                     SpritePtr sprite,
-                     int x, int y)
-{
-    struct xwl_screen *xwl_screen = xwl_screen_get(screen);
-    struct xwl_seat *xwl_seat = device->public.devicePrivate;
-    struct xwl_window *xwl_window;
-    WindowPtr focus;
-
-    if (!xwl_seat)
-        xwl_seat = xwl_screen_get_default_seat(xwl_screen);
-
-    if (!window)
-        window = XYToWindow(sprite, x, y);
-
-    xwl_window = xwl_window_from_window(window);
-    if (!xwl_window && xwl_seat->focus_window) {
-        focus = xwl_seat->focus_window->window;
-
-        /* Warps on non wl_surface backed Windows are only allowed
-         * as long as the pointer stays within the focus window.
-         */
-        if (x >= focus->drawable.x &&
-            y >= focus->drawable.y &&
-            x < focus->drawable.x + focus->drawable.width &&
-            y < focus->drawable.y + focus->drawable.height) {
-            if (!window) {
-                DebugF("Warp relative to pointer, assuming pointer focus\n");
-                xwl_window = xwl_seat->focus_window;
-            } else if (window == screen->root) {
-                DebugF("Warp on root window, assuming pointer focus\n");
-                xwl_window = xwl_seat->focus_window;
-            }
-        }
-    }
-    if (!xwl_window)
-        return;
-
-    xwl_seat_emulate_pointer_warp(xwl_seat, xwl_window, sprite, x, y);
-}
-
-static void
-xwl_cursor_confined_to(DeviceIntPtr device,
-                       ScreenPtr screen,
-                       WindowPtr window)
-{
-    struct xwl_screen *xwl_screen = xwl_screen_get(screen);
-    struct xwl_seat *xwl_seat = device->public.devicePrivate;
-    struct xwl_window *xwl_window;
-
-    if (!xwl_seat)
-        xwl_seat = xwl_screen_get_default_seat(xwl_screen);
-
-    /* xwl_seat hasn't been setup yet, don't do anything just yet */
-    if (!xwl_seat)
-        return;
-
-    if (window == screen->root) {
-        xwl_seat_unconfine_pointer(xwl_seat);
-        return;
-    }
-
-    xwl_window = xwl_window_from_window(window);
-    if (!xwl_window && xwl_seat->focus_window) {
-        /* Allow confining on InputOnly windows, but only if the geometry
-         * is the same than the focus window.
-         */
-        if (window->drawable.class == InputOnly) {
-            DebugF("Confine on InputOnly window, assuming pointer focus\n");
-            xwl_window = xwl_seat->focus_window;
-        }
-    }
-    if (!xwl_window)
-        return;
-
-    xwl_seat_confine_pointer(xwl_seat, xwl_window);
-}
-
-static void
-damage_report(DamagePtr pDamage, RegionPtr pRegion, void *data)
-{
-    WindowPtr window = data;
-    struct xwl_window *xwl_window = xwl_window_get(window);
-    struct xwl_screen *xwl_screen;
-
-    if (!xwl_window)
-        return;
-
-    xwl_screen = xwl_window->xwl_screen;
-
-#ifdef GLAMOR_HAS_GBM
-    if (xwl_window->present_flipped) {
-        /* This damage is from a Present flip, which already committed a new
-         * buffer for the surface, so we don't need to do anything in response
-         */
-        RegionEmpty(DamageRegion(pDamage));
-        xorg_list_del(&xwl_window->link_damage);
-        xwl_window->present_flipped = FALSE;
-        return;
-    }
-#endif
-
-    xorg_list_add(&xwl_window->link_damage, &xwl_screen->damage_window_list);
-}
-
-static void
-damage_destroy(DamagePtr pDamage, void *data)
-{
-}
-
-static Bool
-register_damage(WindowPtr window)
-{
-    DamagePtr damage;
-
-    damage = DamageCreate(damage_report, damage_destroy, DamageReportNonEmpty,
-                          FALSE, window->drawable.pScreen, window);
-    if (damage == NULL) {
-        ErrorF("Failed creating damage\n");
-        return FALSE;
-    }
-
-    DamageRegister(&window->drawable, damage);
-    DamageSetReportAfterOp(damage, TRUE);
-
-    dixSetPrivate(&window->devPrivates, &xwl_damage_private_key, damage);
-
-    return TRUE;
-}
-
-static void
-unregister_damage(WindowPtr window)
-{
-    DamagePtr damage;
-
-    damage = dixLookupPrivate(&window->devPrivates, &xwl_damage_private_key);
-    if (!damage)
-        return;
-
-    DamageUnregister(damage);
-    DamageDestroy(damage);
-
-    dixSetPrivate(&window->devPrivates, &xwl_damage_private_key, NULL);
-}
-
-static DamagePtr
-window_get_damage(WindowPtr window)
-{
-    return dixLookupPrivate(&window->devPrivates, &xwl_damage_private_key);
-}
-
-static void
-shell_surface_ping(void *data,
-                   struct wl_shell_surface *shell_surface, uint32_t serial)
-{
-    wl_shell_surface_pong(shell_surface, serial);
-}
-
-static void
-shell_surface_configure(void *data,
-                        struct wl_shell_surface *wl_shell_surface,
-                        uint32_t edges, int32_t width, int32_t height)
-{
-}
-
-static void
-shell_surface_popup_done(void *data, struct wl_shell_surface *wl_shell_surface)
-{
-}
-
-static const struct wl_shell_surface_listener shell_surface_listener = {
-    shell_surface_ping,
-    shell_surface_configure,
-    shell_surface_popup_done
-};
-
-void
-xwl_pixmap_set_private(PixmapPtr pixmap, struct xwl_pixmap *xwl_pixmap)
-{
-    dixSetPrivate(&pixmap->devPrivates, &xwl_pixmap_private_key, xwl_pixmap);
-}
-
-struct xwl_pixmap *
-xwl_pixmap_get(PixmapPtr pixmap)
-{
-    return dixLookupPrivate(&pixmap->devPrivates, &xwl_pixmap_private_key);
-}
-
-static void
-xwl_window_init_allow_commits(struct xwl_window *xwl_window)
-{
-    PropertyPtr prop = NULL;
-    int ret;
-
-    ret = dixLookupProperty(&prop, xwl_window->window,
-                            xwl_window->xwl_screen->allow_commits_prop,
-                            serverClient, DixReadAccess);
-    if (ret == Success && prop)
-        xwl_window_set_allow_commits_from_property(xwl_window, prop);
-    else
-        xwl_window_set_allow_commits(xwl_window, TRUE, "no property");
-}
-
-static void
-send_surface_id_event(struct xwl_window *xwl_window)
-{
-    static const char atom_name[] = "WL_SURFACE_ID";
-    static Atom type_atom;
-    DeviceIntPtr dev;
-    xEvent e;
-
-    if (type_atom == None)
-        type_atom = MakeAtom(atom_name, strlen(atom_name), TRUE);
-
-    e.u.u.type = ClientMessage;
-    e.u.u.detail = 32;
-    e.u.clientMessage.window = xwl_window->window->drawable.id;
-    e.u.clientMessage.u.l.type = type_atom;
-    e.u.clientMessage.u.l.longs0 =
-        wl_proxy_get_id((struct wl_proxy *) xwl_window->surface);
-    e.u.clientMessage.u.l.longs1 = 0;
-    e.u.clientMessage.u.l.longs2 = 0;
-    e.u.clientMessage.u.l.longs3 = 0;
-    e.u.clientMessage.u.l.longs4 = 0;
-
-    dev = PickPointer(serverClient);
-    DeliverEventsToWindow(dev, xwl_window->xwl_screen->screen->root,
-                          &e, 1, SubstructureRedirectMask, NullGrab);
-}
-
-static Bool
-ensure_surface_for_window(WindowPtr window)
-{
-    ScreenPtr screen = window->drawable.pScreen;
-    struct xwl_screen *xwl_screen;
-    struct xwl_window *xwl_window;
-    struct wl_region *region;
-
-    if (xwl_window_from_window(window))
-        return TRUE;
-
-    xwl_screen = xwl_screen_get(screen);
-
-    if (xwl_screen->rootless) {
-        if (window->redirectDraw != RedirectDrawManual)
-            return TRUE;
-    }
-    else {
-        if (window->parent)
-            return TRUE;
-    }
-
-    xwl_window = calloc(1, sizeof *xwl_window);
-    if (xwl_window == NULL)
-        return FALSE;
-
-    xwl_window->xwl_screen = xwl_screen;
-    xwl_window->window = window;
-    xwl_window->surface = wl_compositor_create_surface(xwl_screen->compositor);
-    if (xwl_window->surface == NULL) {
-        ErrorF("wl_display_create_surface failed\n");
-        goto err;
-    }
-
-    if (!xwl_screen->rootless) {
-        xwl_window->shell_surface =
-            wl_shell_get_shell_surface(xwl_screen->shell, xwl_window->surface);
-        if (xwl_window->shell_surface == NULL) {
-            ErrorF("Failed creating shell surface\n");
-            goto err_surf;
-        }
-
-        wl_shell_surface_add_listener(xwl_window->shell_surface,
-                                      &shell_surface_listener, xwl_window);
-
-        wl_shell_surface_set_toplevel(xwl_window->shell_surface);
-
-        region = wl_compositor_create_region(xwl_screen->compositor);
-        if (region == NULL) {
-            ErrorF("Failed creating region\n");
-            goto err_surf;
-        }
-
-        wl_region_add(region, 0, 0,
-                      window->drawable.width, window->drawable.height);
-        wl_surface_set_opaque_region(xwl_window->surface, region);
-        wl_region_destroy(region);
-    }
-
-    wl_display_flush(xwl_screen->display);
-
-    send_surface_id_event(xwl_window);
-
-    wl_surface_set_user_data(xwl_window->surface, xwl_window);
-
-    compRedirectWindow(serverClient, window, CompositeRedirectManual);
-
-    dixSetPrivate(&window->devPrivates, &xwl_window_private_key, xwl_window);
-    xorg_list_init(&xwl_window->link_damage);
-
-#ifdef GLAMOR_HAS_GBM
-    xorg_list_init(&xwl_window->frame_callback_list);
-#endif
-
-    xwl_window_init_allow_commits(xwl_window);
-
-    return TRUE;
-
-err_surf:
-    if (xwl_window->shell_surface)
-        wl_shell_surface_destroy(xwl_window->shell_surface);
-    wl_surface_destroy(xwl_window->surface);
-err:
-    free(xwl_window);
-    return FALSE;
-}
-
-static Bool
-xwl_realize_window(WindowPtr window)
-{
-    ScreenPtr screen = window->drawable.pScreen;
-    struct xwl_screen *xwl_screen;
-    Bool ret;
-
-    xwl_screen = xwl_screen_get(screen);
-
-    screen->RealizeWindow = xwl_screen->RealizeWindow;
-    ret = (*screen->RealizeWindow) (window);
-    xwl_screen->RealizeWindow = screen->RealizeWindow;
-    screen->RealizeWindow = xwl_realize_window;
-
-    if (!ret)
-        return FALSE;
-
-    if (xwl_screen->rootless && !window->parent) {
-        BoxRec box = { 0, 0, xwl_screen->width, xwl_screen->height };
-
-        RegionReset(&window->winSize, &box);
-        RegionNull(&window->clipList);
-        RegionNull(&window->borderClip);
-    }
-
-    if (xwl_screen->rootless ?
-        (window->drawable.class == InputOutput &&
-         window->parent == window->drawable.pScreen->root) :
-        !window->parent) {
-        if (!register_damage(window))
-            return FALSE;
-    }
-
-    return ensure_surface_for_window(window);
-}
-
-static Bool
-xwl_unrealize_window(WindowPtr window)
-{
-    ScreenPtr screen = window->drawable.pScreen;
-    struct xwl_screen *xwl_screen;
-    struct xwl_window *xwl_window;
-    struct xwl_seat *xwl_seat;
-    Bool ret;
-
-    xwl_screen = xwl_screen_get(screen);
-
-    xorg_list_for_each_entry(xwl_seat, &xwl_screen->seat_list, link) {
-        if (xwl_seat->focus_window && xwl_seat->focus_window->window == window)
-            xwl_seat->focus_window = NULL;
-        if (xwl_seat->tablet_focus_window && xwl_seat->tablet_focus_window->window == window)
-            xwl_seat->tablet_focus_window = NULL;
-        if (xwl_seat->last_xwindow == window)
-            xwl_seat->last_xwindow = NullWindow;
-        if (xwl_seat->cursor_confinement_window &&
-            xwl_seat->cursor_confinement_window->window == window)
-            xwl_seat_unconfine_pointer(xwl_seat);
-        if (xwl_seat->pointer_warp_emulator &&
-            xwl_seat->pointer_warp_emulator->locked_window &&
-            xwl_seat->pointer_warp_emulator->locked_window->window == window)
-            xwl_seat_destroy_pointer_warp_emulator(xwl_seat);
-        xwl_seat_clear_touch(xwl_seat, window);
-    }
-
-    compUnredirectWindow(serverClient, window, CompositeRedirectManual);
-
-    screen->UnrealizeWindow = xwl_screen->UnrealizeWindow;
-    ret = (*screen->UnrealizeWindow) (window);
-    xwl_screen->UnrealizeWindow = screen->UnrealizeWindow;
-    screen->UnrealizeWindow = xwl_unrealize_window;
-
-    xwl_window = xwl_window_get(window);
-    if (!xwl_window)
-        return ret;
-
-    wl_surface_destroy(xwl_window->surface);
-    xorg_list_del(&xwl_window->link_damage);
-    unregister_damage(window);
-
-    if (xwl_window->frame_callback)
-        wl_callback_destroy(xwl_window->frame_callback);
-
-#ifdef GLAMOR_HAS_GBM
-    if (xwl_screen->present) {
-        struct xwl_present_window *xwl_present_window, *tmp;
-
-        xorg_list_for_each_entry_safe(xwl_present_window, tmp,
-                                      &xwl_window->frame_callback_list,
-                                      frame_callback_list) {
-            xwl_present_unrealize_window(xwl_present_window);
-        }
-    }
-#endif
-
-    free(xwl_window);
-    dixSetPrivate(&window->devPrivates, &xwl_window_private_key, NULL);
-
-    return ret;
-}
-
-static Bool
-xwl_save_screen(ScreenPtr pScreen, int on)
-{
-    return TRUE;
-}
-
-static void
-xwl_set_window_pixmap(WindowPtr window,
-                      PixmapPtr pixmap)
-{
-    ScreenPtr screen = window->drawable.pScreen;
-    struct xwl_screen *xwl_screen;
-
-    xwl_screen = xwl_screen_get(screen);
-
-    screen->SetWindowPixmap = xwl_screen->SetWindowPixmap;
-    (*screen->SetWindowPixmap) (window, pixmap);
-    xwl_screen->SetWindowPixmap = screen->SetWindowPixmap;
-    screen->SetWindowPixmap = xwl_set_window_pixmap;
-
-    if (!RegionNotEmpty(&window->winSize))
-        return;
-
-    ensure_surface_for_window(window);
-}
-
-static void
-frame_callback(void *data,
-               struct wl_callback *callback,
-               uint32_t time)
-{
-    struct xwl_window *xwl_window = data;
-
-    wl_callback_destroy (xwl_window->frame_callback);
-    xwl_window->frame_callback = NULL;
-
-#ifdef GLAMOR_HAS_GBM
-    if (xwl_window->xwl_screen->present) {
-        struct xwl_present_window *xwl_present_window, *tmp;
-
-        xorg_list_for_each_entry_safe(xwl_present_window, tmp,
-                                      &xwl_window->frame_callback_list,
-                                      frame_callback_list) {
-            xwl_present_frame_callback(xwl_present_window);
-        }
-    }
-#endif
-}
-
-static const struct wl_callback_listener frame_listener = {
-    frame_callback
-};
-
-void
-xwl_window_create_frame_callback(struct xwl_window *xwl_window)
-{
-    xwl_window->frame_callback = wl_surface_frame(xwl_window->surface);
-    wl_callback_add_listener(xwl_window->frame_callback, &frame_listener,
-                             xwl_window);
-}
-
-static Bool
-xwl_destroy_window(WindowPtr window)
-{
-    ScreenPtr screen = window->drawable.pScreen;
-    struct xwl_screen *xwl_screen = xwl_screen_get(screen);
-    Bool ret;
-
-#ifdef GLAMOR_HAS_GBM
-    if (xwl_screen->present)
-        xwl_present_cleanup(window);
-#endif
-
-    screen->DestroyWindow = xwl_screen->DestroyWindow;
-
-    if (screen->DestroyWindow)
-        ret = screen->DestroyWindow (window);
-    else
-        ret = TRUE;
-
-    xwl_screen->DestroyWindow = screen->DestroyWindow;
-    screen->DestroyWindow = xwl_destroy_window;
-
-    return ret;
-}
-
-static void
-xwl_window_post_damage(struct xwl_window *xwl_window)
-{
-    struct xwl_screen *xwl_screen = xwl_window->xwl_screen;
-    RegionPtr region;
-    BoxPtr box;
-    struct wl_buffer *buffer;
-    PixmapPtr pixmap;
-    int i;
-
-    assert(!xwl_window->frame_callback);
-
-    region = DamageRegion(window_get_damage(xwl_window->window));
-    pixmap = (*xwl_screen->screen->GetWindowPixmap) (xwl_window->window);
-
-#ifdef XWL_HAS_GLAMOR
-    if (xwl_screen->glamor)
-        buffer = xwl_glamor_pixmap_get_wl_buffer(pixmap,
-                                                 NULL);
-    else
-#endif
-        buffer = xwl_shm_pixmap_get_wl_buffer(pixmap);
-
-#ifdef XWL_HAS_GLAMOR
-    if (xwl_screen->glamor)
-        xwl_glamor_post_damage(xwl_window, pixmap, region);
-#endif
-
-    wl_surface_attach(xwl_window->surface, buffer, 0, 0);
-
-    /* Arbitrary limit to try to avoid flooding the Wayland
-     * connection. If we flood it too much anyway, this could
-     * abort in libwayland-client.
-     */
-    if (RegionNumRects(region) > 256) {
-        box = RegionExtents(region);
-        wl_surface_damage(xwl_window->surface, box->x1, box->y1,
-                          box->x2 - box->x1, box->y2 - box->y1);
-    } else {
-        box = RegionRects(region);
-        for (i = 0; i < RegionNumRects(region); i++, box++)
-            wl_surface_damage(xwl_window->surface, box->x1, box->y1,
-                              box->x2 - box->x1, box->y2 - box->y1);
-    }
-
-    xwl_window_create_frame_callback(xwl_window);
-    DamageEmpty(window_get_damage(xwl_window->window));
-}
-
-static void
-xwl_screen_post_damage(struct xwl_screen *xwl_screen)
-{
-    struct xwl_window *xwl_window, *next_xwl_window;
-    struct xorg_list commit_window_list;
-
-    xorg_list_init(&commit_window_list);
-
-    xorg_list_for_each_entry_safe(xwl_window, next_xwl_window,
-                                  &xwl_screen->damage_window_list, link_damage) {
-        /* If we're waiting on a frame callback from the server,
-         * don't attach a new buffer. */
-        if (xwl_window->frame_callback)
-            continue;
-
-        if (!xwl_window->allow_commits)
-            continue;
-
-#ifdef XWL_HAS_GLAMOR
-        if (xwl_screen->glamor && !xwl_glamor_allow_commits(xwl_window))
-            continue;
-#endif
-
-        xwl_window_post_damage(xwl_window);
-        xorg_list_del(&xwl_window->link_damage);
-        xorg_list_append(&xwl_window->link_damage, &commit_window_list);
-    }
-
-    if (xorg_list_is_empty(&commit_window_list))
-        return;
-
-#ifdef XWL_HAS_GLAMOR
-    if (xwl_screen->glamor &&
-        xwl_screen->egl_backend == &xwl_screen->gbm_backend) {
-        glamor_block_handler(xwl_screen->screen);
-    }
-#endif
-
-    xorg_list_for_each_entry_safe(xwl_window, next_xwl_window,
-                                  &commit_window_list, link_damage) {
-        wl_surface_commit(xwl_window->surface);
-        xorg_list_del(&xwl_window->link_damage);
-    }
-}
-
-static void
-registry_global(void *data, struct wl_registry *registry, uint32_t id,
-                const char *interface, uint32_t version)
-{
-    struct xwl_screen *xwl_screen = data;
-
-    if (strcmp(interface, "wl_compositor") == 0) {
-        xwl_screen->compositor =
-            wl_registry_bind(registry, id, &wl_compositor_interface, 1);
-    }
-    else if (strcmp(interface, "wl_shm") == 0) {
-        xwl_screen->shm = wl_registry_bind(registry, id, &wl_shm_interface, 1);
-    }
-    else if (strcmp(interface, "wl_shell") == 0) {
-        xwl_screen->shell =
-            wl_registry_bind(registry, id, &wl_shell_interface, 1);
-    }
-    else if (strcmp(interface, "wl_output") == 0 && version >= 2) {
-        if (xwl_output_create(xwl_screen, id))
-            xwl_screen->expecting_event++;
-    }
-    else if (strcmp(interface, "zxdg_output_manager_v1") == 0) {
-        xwl_screen->xdg_output_manager =
-            wl_registry_bind(registry, id, &zxdg_output_manager_v1_interface, 1);
-        xwl_screen_init_xdg_output(xwl_screen);
-    }
-#ifdef XWL_HAS_GLAMOR
-    else if (xwl_screen->glamor) {
-        xwl_glamor_init_wl_registry(xwl_screen, registry, id, interface,
-                                    version);
-    }
-#endif
-}
-
-static void
-global_remove(void *data, struct wl_registry *registry, uint32_t name)
-{
-    struct xwl_screen *xwl_screen = data;
-    struct xwl_output *xwl_output, *tmp_xwl_output;
-
-    xorg_list_for_each_entry_safe(xwl_output, tmp_xwl_output,
-                                  &xwl_screen->output_list, link) {
-        if (xwl_output->server_output_id == name) {
-            xwl_output_remove(xwl_output);
-            break;
-        }
-    }
-}
-
-static const struct wl_registry_listener registry_listener = {
-    registry_global,
-    global_remove
-};
-
-static void
-xwl_read_events (struct xwl_screen *xwl_screen)
-{
-    int ret;
-
-    if (xwl_screen->wait_flush)
-        return;
-
-    ret = wl_display_read_events(xwl_screen->display);
-    if (ret == -1)
-        xwl_give_up("failed to read Wayland events: %s\n", strerror(errno));
-
-    xwl_screen->prepare_read = 0;
-
-    ret = wl_display_dispatch_pending(xwl_screen->display);
-    if (ret == -1)
-        xwl_give_up("failed to dispatch Wayland events: %s\n", strerror(errno));
-}
-
-static int
-xwl_display_pollout (struct xwl_screen *xwl_screen, int timeout)
-{
-    struct pollfd poll_fd;
-
-    poll_fd.fd = wl_display_get_fd(xwl_screen->display);
-    poll_fd.events = POLLOUT;
-
-    return xserver_poll(&poll_fd, 1, timeout);
-}
-
-static void
-xwl_dispatch_events (struct xwl_screen *xwl_screen)
-{
-    int ret = 0;
-    int ready;
-
-    if (xwl_screen->wait_flush)
-        goto pollout;
-
-    while (xwl_screen->prepare_read == 0 &&
-           wl_display_prepare_read(xwl_screen->display) == -1) {
-        ret = wl_display_dispatch_pending(xwl_screen->display);
-        if (ret == -1)
-            xwl_give_up("failed to dispatch Wayland events: %s\n",
-                       strerror(errno));
-    }
-
-    xwl_screen->prepare_read = 1;
-
-pollout:
-    ready = xwl_display_pollout(xwl_screen, 5);
-    if (ready == -1 && errno != EINTR)
-        xwl_give_up("error polling on XWayland fd: %s\n", strerror(errno));
-
-    if (ready > 0)
-        ret = wl_display_flush(xwl_screen->display);
-
-    if (ret == -1 && errno != EAGAIN)
-        xwl_give_up("failed to write to XWayland fd: %s\n", strerror(errno));
-
-    xwl_screen->wait_flush = (ready == 0 || ready == -1 || ret == -1);
-}
-
-static void
-socket_handler(int fd, int ready, void *data)
-{
-    struct xwl_screen *xwl_screen = data;
-
-    xwl_read_events (xwl_screen);
-}
-
-static void
-wakeup_handler(void *data, int err)
-{
-}
-
-static void
-block_handler(void *data, void *timeout)
-{
-    struct xwl_screen *xwl_screen = data;
-
-    xwl_screen_post_damage(xwl_screen);
-    xwl_dispatch_events (xwl_screen);
-}
-
-void
-xwl_sync_events (struct xwl_screen *xwl_screen)
-{
-    xwl_dispatch_events (xwl_screen);
-    xwl_read_events (xwl_screen);
-}
-
-void
-xwl_screen_roundtrip(struct xwl_screen *xwl_screen)
-{
-    int ret;
-
-    ret = wl_display_roundtrip(xwl_screen->display);
-    while (ret >= 0 && xwl_screen->expecting_event)
-        ret = wl_display_roundtrip(xwl_screen->display);
-
-    if (ret < 0)
-        xwl_give_up("could not connect to wayland server\n");
-}
-
-static CARD32
-add_client_fd(OsTimerPtr timer, CARD32 time, void *arg)
-{
-    struct xwl_screen *xwl_screen = arg;
-
-    if (!AddClientOnOpenFD(xwl_screen->wm_fd))
-        FatalError("Failed to add wm client\n");
-
-    TimerFree(timer);
-
-    return 0;
-}
-
-static void
-listen_on_fds(struct xwl_screen *xwl_screen)
-{
-    int i;
-
-    for (i = 0; i < xwl_screen->listen_fd_count; i++)
-        ListenOnOpenFD(xwl_screen->listen_fds[i], FALSE);
-}
-
-static void
-wm_selection_callback(CallbackListPtr *p, void *data, void *arg)
-{
-    SelectionInfoRec *info = arg;
-    struct xwl_screen *xwl_screen = data;
-    static const char atom_name[] = "WM_S0";
-    static Atom atom_wm_s0;
-
-    if (atom_wm_s0 == None)
-        atom_wm_s0 = MakeAtom(atom_name, strlen(atom_name), TRUE);
-    if (info->selection->selection != atom_wm_s0 ||
-        info->kind != SelectionSetOwner)
-        return;
-
-    listen_on_fds(xwl_screen);
-
-    DeleteCallback(&SelectionCallback, wm_selection_callback, xwl_screen);
-}
-
-static Bool
-xwl_screen_init(ScreenPtr pScreen, int argc, char **argv)
-{
-    static const char allow_commits[] = "_XWAYLAND_ALLOW_COMMITS";
-    struct xwl_screen *xwl_screen;
-    Pixel red_mask, blue_mask, green_mask;
-    int ret, bpc, green_bpc, i;
-    Bool use_eglstreams = FALSE;
-
-    xwl_screen = calloc(1, sizeof *xwl_screen);
-    if (xwl_screen == NULL)
-        return FALSE;
-    xwl_screen->wm_fd = -1;
-
-    if (!dixRegisterPrivateKey(&xwl_screen_private_key, PRIVATE_SCREEN, 0))
-        return FALSE;
-    if (!dixRegisterPrivateKey(&xwl_window_private_key, PRIVATE_WINDOW, 0))
-        return FALSE;
-    if (!dixRegisterPrivateKey(&xwl_pixmap_private_key, PRIVATE_PIXMAP, 0))
-        return FALSE;
-    if (!dixRegisterPrivateKey(&xwl_damage_private_key, PRIVATE_WINDOW, 0))
-        return FALSE;
-
-    dixSetPrivate(&pScreen->devPrivates, &xwl_screen_private_key, xwl_screen);
-    xwl_screen->screen = pScreen;
-
-#ifdef XWL_HAS_GLAMOR
-    xwl_screen->glamor = 1;
-#endif
-
-    for (i = 1; i < argc; i++) {
-        if (strcmp(argv[i], "-rootless") == 0) {
-            xwl_screen->rootless = 1;
-
-            /* Disable the XSS extension on Xwayland rootless.
-             *
-             * Xwayland is just a Wayland client, no X11 screensaver
-             * should be expected to work reliably on Xwayland rootless.
-             */
-#ifdef SCREENSAVER
-            noScreenSaverExtension = TRUE;
-#endif
-            ScreenSaverTime = 0;
-            ScreenSaverInterval = 0;
-            defaultScreenSaverTime = 0;
-            defaultScreenSaverInterval = 0;
-        }
-        else if (strcmp(argv[i], "-wm") == 0) {
-            xwl_screen->wm_fd = atoi(argv[i + 1]);
-            i++;
-            TimerSet(NULL, 0, 1, add_client_fd, xwl_screen);
-        }
-        else if (strcmp(argv[i], "-listen") == 0) {
-            if (xwl_screen->listen_fd_count ==
-                ARRAY_SIZE(xwl_screen->listen_fds))
-                FatalError("Too many -listen arguments given, max is %zu\n",
-                           ARRAY_SIZE(xwl_screen->listen_fds));
-
-            xwl_screen->listen_fds[xwl_screen->listen_fd_count++] =
-                atoi(argv[i + 1]);
-            i++;
-        }
-        else if (strcmp(argv[i], "-shm") == 0) {
-            xwl_screen->glamor = 0;
-        }
-        else if (strcmp(argv[i], "-eglstream") == 0) {
-#ifdef XWL_HAS_EGLSTREAM
-            use_eglstreams = TRUE;
-#else
-            ErrorF("xwayland glamor: this build does not have EGLStream support\n");
-#endif
-        }
-    }
-
-#ifdef XWL_HAS_GLAMOR
-    if (xwl_screen->glamor)
-        xwl_glamor_init_backends(xwl_screen, use_eglstreams);
-#endif
-
-    /* In rootless mode, we don't have any screen storage, and the only
-     * rendering should be to redirected mode. */
-    if (xwl_screen->rootless)
-        xwl_screen->root_clip_mode = ROOT_CLIP_INPUT_ONLY;
-    else
-        xwl_screen->root_clip_mode = ROOT_CLIP_FULL;
-
-    if (xwl_screen->listen_fd_count > 0) {
-        if (xwl_screen->wm_fd >= 0)
-            AddCallback(&SelectionCallback, wm_selection_callback, xwl_screen);
-        else
-            listen_on_fds(xwl_screen);
-    }
-
-    xorg_list_init(&xwl_screen->output_list);
-    xorg_list_init(&xwl_screen->seat_list);
-    xorg_list_init(&xwl_screen->damage_window_list);
-    xwl_screen->depth = 24;
-
-    if (!monitorResolution)
-        monitorResolution = DEFAULT_DPI;
-
-    xwl_screen->display = wl_display_connect(NULL);
-    if (xwl_screen->display == NULL) {
-        ErrorF("could not connect to wayland server\n");
-        return FALSE;
-    }
-
-    if (!xwl_screen_init_output(xwl_screen))
-        return FALSE;
-
-    xwl_screen->expecting_event = 0;
-    xwl_screen->registry = wl_display_get_registry(xwl_screen->display);
-    wl_registry_add_listener(xwl_screen->registry,
-                             &registry_listener, xwl_screen);
-    xwl_screen_roundtrip(xwl_screen);
-
-    if (!xwl_screen->rootless && !xwl_screen->shell) {
-        ErrorF("missing wl_shell protocol\n");
-        return FALSE;
-    }
-
-    bpc = xwl_screen->depth / 3;
-    green_bpc = xwl_screen->depth - 2 * bpc;
-    blue_mask = (1 << bpc) - 1;
-    green_mask = ((1 << green_bpc) - 1) << bpc;
-    red_mask = blue_mask << (green_bpc + bpc);
-
-    miSetVisualTypesAndMasks(xwl_screen->depth,
-                             ((1 << TrueColor) | (1 << DirectColor)),
-                             green_bpc, TrueColor,
-                             red_mask, green_mask, blue_mask);
-
-    miSetPixmapDepths();
-
-    ret = fbScreenInit(pScreen, NULL,
-                       xwl_screen->width, xwl_screen->height,
-                       monitorResolution, monitorResolution, 0,
-                       BitsPerPixel(xwl_screen->depth));
-    if (!ret)
-        return FALSE;
-
-    fbPictureInit(pScreen, 0, 0);
-
-#ifdef HAVE_XSHMFENCE
-    if (!miSyncShmScreenInit(pScreen))
-        return FALSE;
-#endif
-
-    xwl_screen->wayland_fd = wl_display_get_fd(xwl_screen->display);
-    SetNotifyFd(xwl_screen->wayland_fd, socket_handler, X_NOTIFY_READ, xwl_screen);
-    RegisterBlockAndWakeupHandlers(block_handler, wakeup_handler, xwl_screen);
-
-    pScreen->SaveScreen = xwl_save_screen;
-
-    pScreen->blackPixel = 0;
-    pScreen->whitePixel = 1;
-
-    ret = fbCreateDefColormap(pScreen);
-
-    if (!xwl_screen_init_cursor(xwl_screen))
-        return FALSE;
-
-#ifdef XWL_HAS_GLAMOR
-    if (xwl_screen->glamor) {
-        xwl_glamor_select_backend(xwl_screen, use_eglstreams);
-
-        if (xwl_screen->egl_backend == NULL || !xwl_glamor_init(xwl_screen)) {
-           ErrorF("Failed to initialize glamor, falling back to sw\n");
-           xwl_screen->glamor = 0;
-        }
-    }
-
-    if (xwl_screen->glamor && xwl_screen->rootless)
-        xwl_screen->present = xwl_present_init(pScreen);
-#endif
-
-    if (!xwl_screen->glamor) {
-        xwl_screen->CreateScreenResources = pScreen->CreateScreenResources;
-        pScreen->CreateScreenResources = xwl_shm_create_screen_resources;
-        pScreen->CreatePixmap = xwl_shm_create_pixmap;
-        pScreen->DestroyPixmap = xwl_shm_destroy_pixmap;
-    }
-
-    xwl_screen->RealizeWindow = pScreen->RealizeWindow;
-    pScreen->RealizeWindow = xwl_realize_window;
-
-    xwl_screen->UnrealizeWindow = pScreen->UnrealizeWindow;
-    pScreen->UnrealizeWindow = xwl_unrealize_window;
-
-    xwl_screen->DestroyWindow = pScreen->DestroyWindow;
-    pScreen->DestroyWindow = xwl_destroy_window;
-
-    xwl_screen->CloseScreen = pScreen->CloseScreen;
-    pScreen->CloseScreen = xwl_close_screen;
-
-    if (xwl_screen->rootless) {
-        xwl_screen->SetWindowPixmap = pScreen->SetWindowPixmap;
-        pScreen->SetWindowPixmap = xwl_set_window_pixmap;
-    }
-
-    pScreen->CursorWarpedTo = xwl_cursor_warped_to;
-    pScreen->CursorConfinedTo = xwl_cursor_confined_to;
-
-    xwl_screen->allow_commits_prop = MakeAtom(allow_commits,
-                                              strlen(allow_commits),
-                                              TRUE);
-    if (xwl_screen->allow_commits_prop == BAD_RESOURCE)
-        return FALSE;
-
-    AddCallback(&PropertyStateCallback, xwl_property_callback, pScreen);
-
-    xwl_screen_roundtrip(xwl_screen);
-
-    return ret;
-}
-
-_X_NORETURN
-static void _X_ATTRIBUTE_PRINTF(1, 0)
-xwl_log_handler(const char *format, va_list args)
-{
-    char msg[256];
-
-    vsnprintf(msg, sizeof msg, format, args);
-    FatalError("%s", msg);
-}
-
-static const ExtensionModule xwayland_extensions[] = {
-#ifdef XF86VIDMODE
-    { xwlVidModeExtensionInit, XF86VIDMODENAME, &noXFree86VidModeExtension },
-#endif
-};
-
-void
-InitOutput(ScreenInfo * screen_info, int argc, char **argv)
-{
-    int depths[] = { 1, 4, 8, 15, 16, 24, 32 };
-    int bpp[] =    { 1, 8, 8, 16, 16, 32, 32 };
-    int i;
-
-    for (i = 0; i < ARRAY_SIZE(depths); i++) {
-        screen_info->formats[i].depth = depths[i];
-        screen_info->formats[i].bitsPerPixel = bpp[i];
-        screen_info->formats[i].scanlinePad = BITMAP_SCANLINE_PAD;
-    }
-
-    screen_info->imageByteOrder = IMAGE_BYTE_ORDER;
-    screen_info->bitmapScanlineUnit = BITMAP_SCANLINE_UNIT;
-    screen_info->bitmapScanlinePad = BITMAP_SCANLINE_PAD;
-    screen_info->bitmapBitOrder = BITMAP_BIT_ORDER;
-    screen_info->numPixmapFormats = ARRAY_SIZE(depths);
-
-    if (serverGeneration == 1)
-        LoadExtensionList(xwayland_extensions,
-                          ARRAY_SIZE(xwayland_extensions), FALSE);
-
-    /* Cast away warning from missing printf annotation for
-     * wl_log_func_t.  Wayland 1.5 will have the annotation, so we can
-     * remove the cast and require that when it's released. */
-    wl_log_set_handler_client((void *) xwl_log_handler);
-
-    if (AddScreen(xwl_screen_init, argc, argv) == -1) {
-        FatalError("Couldn't add screen\n");
-    }
-
-    xorgGlxCreateVendor();
-
-    LocalAccessScopeUser();
-}
diff --git a/hw/xwayland/xwayland.h b/hw/xwayland/xwayland.h
deleted file mode 100644
index b9495b3..0000000
--- a/hw/xwayland/xwayland.h
+++ /dev/null
@@ -1,495 +0,0 @@
-/*
- * Copyright © 2014 Intel Corporation
- *
- * Permission to use, copy, modify, distribute, and sell this software
- * and its documentation for any purpose is hereby granted without
- * fee, provided that the above copyright notice appear in all copies
- * and that both that copyright notice and this permission notice
- * appear in supporting documentation, and that the name of the
- * copyright holders not be used in advertising or publicity
- * pertaining to distribution of the software without specific,
- * written prior permission.  The copyright holders make no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied
- * warranty.
- *
- * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
- * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
- * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#ifndef XWAYLAND_H
-#define XWAYLAND_H
-
-#include <xwayland-config.h>
-
-#include <stdio.h>
-#include <unistd.h>
-#include <errno.h>
-
-#include <wayland-client.h>
-
-#include <X11/X.h>
-
-#include <fb.h>
-#include <input.h>
-#include <dix.h>
-#include <randrstr.h>
-#include <exevents.h>
-
-#include "relative-pointer-unstable-v1-client-protocol.h"
-#include "pointer-constraints-unstable-v1-client-protocol.h"
-#include "tablet-unstable-v2-client-protocol.h"
-#include "xwayland-keyboard-grab-unstable-v1-client-protocol.h"
-#include "xdg-output-unstable-v1-client-protocol.h"
-#include "linux-dmabuf-unstable-v1-client-protocol.h"
-
-struct xwl_format {
-    uint32_t format;
-    int num_modifiers;
-    uint64_t *modifiers;
-};
-
-struct xwl_pixmap;
-struct xwl_window;
-struct xwl_screen;
-
-struct xwl_egl_backend {
-    /* Set by the backend if available */
-    Bool is_available;
-
-    /* Called once for each interface in the global registry. Backends
-     * should use this to bind to any wayland interfaces they need.
-     */
-    Bool (*init_wl_registry)(struct xwl_screen *xwl_screen,
-                             struct wl_registry *wl_registry,
-                             uint32_t id, const char *name,
-                             uint32_t version);
-
-    /* Check that the required Wayland interfaces are available.
-     */
-    Bool (*has_wl_interfaces)(struct xwl_screen *xwl_screen);
-
-    /* Called before glamor has been initialized. Backends should setup a
-     * valid, glamor compatible EGL context in this hook.
-     */
-    Bool (*init_egl)(struct xwl_screen *xwl_screen);
-
-    /* Called after glamor has been initialized, and after all of the
-     * common Xwayland DDX hooks have been connected. Backends should use
-     * this to setup any required wraps around X server callbacks like
-     * CreatePixmap.
-     */
-     Bool (*init_screen)(struct xwl_screen *xwl_screen);
-
-     /* Called by Xwayland to retrieve a pointer to a valid wl_buffer for
-      * the given window/pixmap combo so that damage to the pixmap may be
-      * displayed on-screen. Backends should use this to create a new
-      * wl_buffer for a currently buffer-less pixmap, or simply return the
-      * pixmap they've prepared beforehand.
-      */
-     struct wl_buffer *(*get_wl_buffer_for_pixmap)(PixmapPtr pixmap,
-                                                   Bool *created);
-
-     /* Called by Xwayland to perform any pre-wl_surface damage routines
-      * that are required by the backend. If your backend is poorly
-      * designed and lacks the ability to render directly to a surface,
-      * you should implement blitting from the glamor pixmap to the wayland
-      * pixmap here. Otherwise, this callback is optional.
-      */
-     void (*post_damage)(struct xwl_window *xwl_window,
-                         PixmapPtr pixmap, RegionPtr region);
-
-     /* Called by Xwayland to confirm with the egl backend that the given
-      * pixmap is completely setup and ready for display on-screen. This
-      * callback is optional.
-      */
-     Bool (*allow_commits)(struct xwl_window *xwl_window);
-};
-
-struct xwl_screen {
-    int width;
-    int height;
-    int depth;
-    ScreenPtr screen;
-    int expecting_event;
-    enum RootClipMode root_clip_mode;
-
-    int wm_fd;
-    int listen_fds[5];
-    int listen_fd_count;
-    int rootless;
-    int glamor;
-    int present;
-
-    CreateScreenResourcesProcPtr CreateScreenResources;
-    CloseScreenProcPtr CloseScreen;
-    RealizeWindowProcPtr RealizeWindow;
-    UnrealizeWindowProcPtr UnrealizeWindow;
-    DestroyWindowProcPtr DestroyWindow;
-    XYToWindowProcPtr XYToWindow;
-    SetWindowPixmapProcPtr SetWindowPixmap;
-
-    struct xorg_list output_list;
-    struct xorg_list seat_list;
-    struct xorg_list damage_window_list;
-
-    int wayland_fd;
-    struct wl_display *display;
-    struct wl_registry *registry;
-    struct wl_registry *input_registry;
-    struct wl_compositor *compositor;
-    struct zwp_tablet_manager_v2 *tablet_manager;
-    struct wl_shm *shm;
-    struct wl_shell *shell;
-    struct zwp_relative_pointer_manager_v1 *relative_pointer_manager;
-    struct zwp_pointer_constraints_v1 *pointer_constraints;
-    struct zwp_xwayland_keyboard_grab_manager_v1 *wp_grab;
-    struct zxdg_output_manager_v1 *xdg_output_manager;
-    uint32_t serial;
-
-#define XWL_FORMAT_ARGB8888 (1 << 0)
-#define XWL_FORMAT_XRGB8888 (1 << 1)
-#define XWL_FORMAT_RGB565   (1 << 2)
-
-    int prepare_read;
-    int wait_flush;
-
-    uint32_t num_formats;
-    struct xwl_format *formats;
-    void *egl_display, *egl_context;
-
-    struct xwl_egl_backend gbm_backend;
-    struct xwl_egl_backend eglstream_backend;
-    /* pointer to the current backend for creating pixmaps on wayland */
-    struct xwl_egl_backend *egl_backend;
-
-    struct glamor_context *glamor_ctx;
-
-    Atom allow_commits_prop;
-};
-
-struct xwl_window {
-    struct xwl_screen *xwl_screen;
-    struct wl_surface *surface;
-    struct wl_shell_surface *shell_surface;
-    WindowPtr window;
-    struct xorg_list link_damage;
-    struct wl_callback *frame_callback;
-    Bool allow_commits;
-#ifdef GLAMOR_HAS_GBM
-    struct xorg_list frame_callback_list;
-    Bool present_flipped;
-#endif
-};
-
-#ifdef GLAMOR_HAS_GBM
-struct xwl_present_window {
-    struct xwl_screen *xwl_screen;
-    struct xwl_present_event *sync_flip;
-    WindowPtr window;
-    struct xorg_list frame_callback_list;
-
-    uint64_t msc;
-    uint64_t ust;
-
-    OsTimerPtr frame_timer;
-
-    struct wl_callback *sync_callback;
-
-    struct xorg_list event_list;
-    struct xorg_list release_queue;
-};
-
-struct xwl_present_event {
-    uint64_t event_id;
-    uint64_t target_msc;
-
-    Bool abort;
-    Bool pending;
-    Bool buffer_released;
-
-    struct xwl_present_window *xwl_present_window;
-    PixmapPtr pixmap;
-
-    struct xorg_list list;
-};
-#endif
-
-#define MODIFIER_META 0x01
-
-struct xwl_touch {
-    struct xwl_window *window;
-    int32_t id;
-    int x, y;
-    struct xorg_list link_touch;
-};
-
-struct xwl_pointer_warp_emulator {
-    struct xwl_seat *xwl_seat;
-    struct xwl_window *locked_window;
-    struct zwp_locked_pointer_v1 *locked_pointer;
-};
-
-struct xwl_cursor {
-    void (* update_proc) (struct xwl_cursor *);
-    struct wl_surface *surface;
-    struct wl_callback *frame_cb;
-    Bool needs_update;
-};
-
-struct xwl_seat {
-    DeviceIntPtr pointer;
-    DeviceIntPtr relative_pointer;
-    DeviceIntPtr keyboard;
-    DeviceIntPtr touch;
-    DeviceIntPtr stylus;
-    DeviceIntPtr eraser;
-    DeviceIntPtr puck;
-    struct xwl_screen *xwl_screen;
-    struct wl_seat *seat;
-    struct wl_pointer *wl_pointer;
-    struct zwp_relative_pointer_v1 *wp_relative_pointer;
-    struct wl_keyboard *wl_keyboard;
-    struct wl_touch *wl_touch;
-    struct zwp_tablet_seat_v2 *tablet_seat;
-    struct wl_array keys;
-    struct xwl_window *focus_window;
-    struct xwl_window *tablet_focus_window;
-    uint32_t id;
-    uint32_t pointer_enter_serial;
-    struct xorg_list link;
-    CursorPtr x_cursor;
-    struct xwl_cursor cursor;
-    WindowPtr last_xwindow;
-
-    struct xorg_list touches;
-
-    size_t keymap_size;
-    char *keymap;
-    struct wl_surface *keyboard_focus;
-
-    struct xorg_list axis_discrete_pending;
-    struct xorg_list sync_pending;
-
-    struct xwl_pointer_warp_emulator *pointer_warp_emulator;
-
-    struct xwl_window *cursor_confinement_window;
-    struct zwp_confined_pointer_v1 *confined_pointer;
-
-    struct {
-        Bool has_absolute;
-        wl_fixed_t x;
-        wl_fixed_t y;
-
-        Bool has_relative;
-        double dx;
-        double dy;
-        double dx_unaccel;
-        double dy_unaccel;
-    } pending_pointer_event;
-
-    struct xorg_list tablets;
-    struct xorg_list tablet_tools;
-    struct xorg_list tablet_pads;
-    struct zwp_xwayland_keyboard_grab_v1 *keyboard_grab;
-};
-
-struct xwl_tablet {
-    struct xorg_list link;
-    struct zwp_tablet_v2 *tablet;
-    struct xwl_seat *seat;
-};
-
-struct xwl_tablet_tool {
-    struct xorg_list link;
-    struct zwp_tablet_tool_v2 *tool;
-    struct xwl_seat *seat;
-
-    DeviceIntPtr xdevice;
-    uint32_t proximity_in_serial;
-    double x;
-    double y;
-    uint32_t pressure;
-    double tilt_x;
-    double tilt_y;
-    double rotation;
-    double slider;
-
-    uint32_t buttons_now,
-             buttons_prev;
-
-    int32_t wheel_clicks;
-
-    struct xwl_cursor cursor;
-};
-
-struct xwl_tablet_pad_ring {
-    unsigned int index;
-    struct xorg_list link;
-    struct xwl_tablet_pad_group *group;
-    struct zwp_tablet_pad_ring_v2 *ring;
-};
-
-struct xwl_tablet_pad_strip {
-    unsigned int index;
-    struct xorg_list link;
-    struct xwl_tablet_pad_group *group;
-    struct zwp_tablet_pad_strip_v2 *strip;
-};
-
-struct xwl_tablet_pad_group {
-    struct xorg_list link;
-    struct xwl_tablet_pad *pad;
-    struct zwp_tablet_pad_group_v2 *group;
-
-    struct xorg_list pad_group_ring_list;
-    struct xorg_list pad_group_strip_list;
-};
-
-struct xwl_tablet_pad {
-    struct xorg_list link;
-    struct zwp_tablet_pad_v2 *pad;
-    struct xwl_seat *seat;
-
-    DeviceIntPtr xdevice;
-
-    unsigned int nbuttons;
-    struct xorg_list pad_group_list;
-};
-
-struct xwl_output {
-    struct xorg_list link;
-    struct wl_output *output;
-    struct zxdg_output_v1 *xdg_output;
-    uint32_t server_output_id;
-    struct xwl_screen *xwl_screen;
-    RROutputPtr randr_output;
-    RRCrtcPtr randr_crtc;
-    int32_t x, y, width, height, refresh;
-    Rotation rotation;
-    Bool wl_output_done;
-    Bool xdg_output_done;
-};
-
-void xwl_window_create_frame_callback(struct xwl_window *xwl_window);
-
-void xwl_sync_events (struct xwl_screen *xwl_screen);
-
-void xwl_screen_roundtrip (struct xwl_screen *xwl_screen);
-
-Bool xwl_screen_init_cursor(struct xwl_screen *xwl_screen);
-
-struct xwl_screen *xwl_screen_get(ScreenPtr screen);
-
-void xwl_tablet_tool_set_cursor(struct xwl_tablet_tool *tool);
-void xwl_seat_set_cursor(struct xwl_seat *xwl_seat);
-
-void xwl_seat_destroy(struct xwl_seat *xwl_seat);
-
-void xwl_seat_clear_touch(struct xwl_seat *xwl_seat, WindowPtr window);
-
-void xwl_seat_emulate_pointer_warp(struct xwl_seat *xwl_seat,
-                                   struct xwl_window *xwl_window,
-                                   SpritePtr sprite,
-                                   int x, int y);
-
-void xwl_seat_destroy_pointer_warp_emulator(struct xwl_seat *xwl_seat);
-
-void xwl_seat_cursor_visibility_changed(struct xwl_seat *xwl_seat);
-
-void xwl_seat_confine_pointer(struct xwl_seat *xwl_seat,
-                              struct xwl_window *xwl_window);
-void xwl_seat_unconfine_pointer(struct xwl_seat *xwl_seat);
-
-Bool xwl_screen_init_output(struct xwl_screen *xwl_screen);
-
-struct xwl_output *xwl_output_create(struct xwl_screen *xwl_screen,
-                                     uint32_t id);
-
-void xwl_output_destroy(struct xwl_output *xwl_output);
-
-void xwl_output_remove(struct xwl_output *xwl_output);
-
-RRModePtr xwayland_cvt(int HDisplay, int VDisplay,
-                       float VRefresh, Bool Reduced, Bool Interlaced);
-
-void xwl_pixmap_set_private(PixmapPtr pixmap, struct xwl_pixmap *xwl_pixmap);
-struct xwl_pixmap *xwl_pixmap_get(PixmapPtr pixmap);
-
-struct xwl_window *xwl_window_from_window(WindowPtr window);
-
-Bool xwl_shm_create_screen_resources(ScreenPtr screen);
-PixmapPtr xwl_shm_create_pixmap(ScreenPtr screen, int width, int height,
-                                int depth, unsigned int hint);
-Bool xwl_shm_destroy_pixmap(PixmapPtr pixmap);
-struct wl_buffer *xwl_shm_pixmap_get_wl_buffer(PixmapPtr pixmap);
-
-#ifdef XWL_HAS_GLAMOR
-void xwl_glamor_init_backends(struct xwl_screen *xwl_screen,
-                              Bool use_eglstream);
-void xwl_glamor_select_backend(struct xwl_screen *xwl_screen,
-                               Bool use_eglstream);
-Bool xwl_glamor_init(struct xwl_screen *xwl_screen);
-
-Bool xwl_screen_set_drm_interface(struct xwl_screen *xwl_screen,
-                                  uint32_t id, uint32_t version);
-Bool xwl_screen_set_dmabuf_interface(struct xwl_screen *xwl_screen,
-                                     uint32_t id, uint32_t version);
-struct wl_buffer *xwl_glamor_pixmap_get_wl_buffer(PixmapPtr pixmap,
-                                                  Bool *created);
-void xwl_glamor_init_wl_registry(struct xwl_screen *xwl_screen,
-                                 struct wl_registry *registry,
-                                 uint32_t id, const char *interface,
-                                 uint32_t version);
-Bool xwl_glamor_has_wl_interfaces(struct xwl_screen *xwl_screen,
-                                 struct xwl_egl_backend *xwl_egl_backend);
-void xwl_glamor_post_damage(struct xwl_window *xwl_window,
-                            PixmapPtr pixmap, RegionPtr region);
-Bool xwl_glamor_allow_commits(struct xwl_window *xwl_window);
-void xwl_glamor_egl_make_current(struct xwl_screen *xwl_screen);
-
-#ifdef GLAMOR_HAS_GBM
-void xwl_present_frame_callback(struct xwl_present_window *xwl_present_window);
-Bool xwl_present_init(ScreenPtr screen);
-void xwl_present_cleanup(WindowPtr window);
-void xwl_present_unrealize_window(struct xwl_present_window *xwl_present_window);
-#endif /* GLAMOR_HAS_GBM */
-
-#ifdef XV
-/* glamor Xv Adaptor */
-Bool xwl_glamor_xv_init(ScreenPtr pScreen);
-#endif /* XV */
-
-#endif /* XWL_HAS_GLAMOR */
-
-void xwl_screen_release_tablet_manager(struct xwl_screen *xwl_screen);
-
-void xwl_screen_init_xdg_output(struct xwl_screen *xwl_screen);
-
-#ifdef XF86VIDMODE
-void xwlVidModeExtensionInit(void);
-#endif
-
-#ifdef GLAMOR_HAS_GBM
-void xwl_glamor_init_gbm(struct xwl_screen *xwl_screen);
-#else
-static inline void xwl_glamor_init_gbm(struct xwl_screen *xwl_screen)
-{
-}
-#endif
-
-#ifdef XWL_HAS_EGLSTREAM
-void xwl_glamor_init_eglstream(struct xwl_screen *xwl_screen);
-#else
-static inline void xwl_glamor_init_eglstream(struct xwl_screen *xwl_screen)
-{
-}
-#endif
-
-#endif
diff --git a/hw/xwin/InitInput.c b/hw/xwin/InitInput.c
index f121d05..04cd514 100644
--- a/hw/xwin/InitInput.c
+++ b/hw/xwin/InitInput.c
@@ -46,21 +46,6 @@ int winProcEstablishConnection(ClientPtr /* client */ );
 DeviceIntPtr g_pwinPointer;
 DeviceIntPtr g_pwinKeyboard;
 
-/* Called from dix/devices.c */
-/*
- * All of our keys generate up and down transition notifications,
- * so all of our keys can be used as modifiers.
- *
- * An example of a modifier is mapping the A key to the Control key.
- * A has to be a legal modifier.  I think.
- */
-
-Bool
-LegalModifier(unsigned int uiKey, DeviceIntPtr pDevice)
-{
-    return TRUE;
-}
-
 /* Called from dix/dispatch.c */
 /*
  * Run through the Windows message queue(s) one more time.
diff --git a/hw/xwin/InitOutput.c b/hw/xwin/InitOutput.c
index 1c6fa9f..7a03bfb 100644
--- a/hw/xwin/InitOutput.c
+++ b/hw/xwin/InitOutput.c
@@ -35,7 +35,6 @@ from The Open Group.
 #include "winmsg.h"
 #include "winconfig.h"
 #include "winprefs.h"
-#include "X11/Xlocale.h"
 #ifdef DPMSExtension
 #include "dpmsproc.h"
 #endif
@@ -66,6 +65,7 @@ typedef WINAPI HRESULT(*SHGETFOLDERPATHPROC) (HWND hwndOwner,
 #include "glx/glwindows.h"
 #include "dri/windowsdri.h"
 #endif
+#include "winauth.h"
 
 /*
  * References to external symbols
@@ -111,6 +111,8 @@ static PixmapFormatRec g_PixmapFormats[] = {
     {32, 32, BITMAP_SCANLINE_PAD}
 };
 
+static Bool noDriExtension;
+
 static const ExtensionModule xwinExtensions[] = {
 #ifdef GLXEXT
 #ifdef XWIN_WINDOWS_DRI
@@ -139,7 +141,7 @@ void XwinExtensionInit(void)
 #if defined(DDXBEFORERESET)
 /*
  * Called right before KillAllClients when the server is going to reset,
- * allows us to shutdown our seperate threads cleanly.
+ * allows us to shutdown our separate threads cleanly.
  */
 
 void
@@ -249,16 +251,6 @@ ddxGiveUp(enum ExitCode error)
     winDebug("ddxGiveUp - End\n");
 }
 
-/* See Porting Layer Definition - p. 57 */
-void
-AbortDDX(enum ExitCode error)
-{
-#if CYGDEBUG
-    winDebug("AbortDDX\n");
-#endif
-    ddxGiveUp(error);
-}
-
 #ifdef __CYGWIN__
 /* hasmntopt is currently not implemented for cygwin */
 static const char *
@@ -726,6 +718,13 @@ winUseMsg(void)
            "\tthe updated region when num_boxes, or more, are in the\n"
            "\tupdated region.\n");
 
+    ErrorF("-[no]compositealpha\n"
+           "\tX windows with per-pixel alpha are composited into the Windows desktop.\n");
+    ErrorF("-[no]compositewm\n"
+           "\tUse the Composite extension to keep a bitmap image of each top-level\n"
+           "\tX window, so window contents which are occluded show correctly in\n"
+           "\ttask bar and task switcher previews.\n");
+
 #ifdef XWIN_XF86CONFIG
     ErrorF("-config\n" "\tSpecify a configuration file.\n");
 
@@ -760,6 +759,8 @@ winUseMsg(void)
     ErrorF("-[no]hostintitle\n"
            "\tIn multiwindow mode, add remote host names to window titles.\n");
 
+    ErrorF("-icon icon_specifier\n" "\tSet screen window icon in windowed mode.\n");
+
     ErrorF("-ignoreinput\n" "\tIgnore keyboard and mouse input.\n");
 
 #ifdef XWIN_XF86CONFIG
@@ -793,18 +794,10 @@ winUseMsg(void)
 
     ErrorF("-multiwindow\n" "\tRun the server in multi-window mode.\n");
 
-#ifdef XWIN_MULTIWINDOWEXTWM
-    ErrorF("-mwextwm\n"
-           "\tRun the server in multi-window external window manager mode.\n");
-#endif
-
     ErrorF("-nodecoration\n"
            "\tDo not draw a window border, title bar, etc.  Windowed\n"
            "\tmode only.\n");
 
-    ErrorF("-nounicodeclipboard\n"
-           "\tDo not use Unicode clipboard even if on a NT-based platform.\n");
-
     ErrorF("-[no]primary\n"
            "\tWhen clipboard integration is enabled, map the X11 PRIMARY selection\n"
            "\tto the Windows clipboard. Default is enabled.\n");
@@ -813,7 +806,7 @@ winUseMsg(void)
            "\tSpecify an optional refresh rate to use in fullscreen mode\n"
            "\twith a DirectDraw engine.\n");
 
-    ErrorF("-resize=none|scrollbars|randr"
+    ErrorF("-resize=none|scrollbars|randr\n"
            "\tIn windowed mode, [don't] allow resizing of the window. 'scrollbars'\n"
            "\tmode gives the window scrollbars as needed, 'randr' mode uses the RANR\n"
            "\textension to resize the X screen.  'randr' is the default.\n");
@@ -989,8 +982,7 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char *argv[])
           for (iMonitor = 1; ; iMonitor++)
             {
               struct GetMonitorInfoData data;
-              QueryMonitor(iMonitor, &data);
-              if (data.bMonitorSpecifiedExists)
+              if (QueryMonitor(iMonitor, &data))
                 {
                   MONITORINFO mi;
                   mi.cbSize = sizeof(MONITORINFO);
@@ -1027,14 +1019,6 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char *argv[])
     if (g_fXdmcpEnabled || g_fAuthEnabled)
         winGenerateAuthorization();
 
-    /* Perform some one time initialization */
-    if (1 == serverGeneration) {
-        /*
-         * setlocale applies to all threads in the current process.
-         * Apply locale specified in LANG environment variable.
-         */
-        setlocale(LC_ALL, "");
-    }
 
 #if CYGDEBUG || YES
     winDebug("InitOutput - Returning.\n");
diff --git a/hw/xwin/Makefile.am b/hw/xwin/Makefile.am
index 5f67a6e..75c2b20 100644
--- a/hw/xwin/Makefile.am
+++ b/hw/xwin/Makefile.am
@@ -27,18 +27,7 @@ SRCS_MULTIWINDOW = \
 	winmultiwindowwndproc.c \
 	propertystore.h \
 	winSetAppUserModelID.c
-MULTIWINDOW_SYS_LIBS = -lshlwapi -lole32
-
-if XWIN_MULTIWINDOWEXTWM
-SRCS_MULTIWINDOWEXTWM = \
-	winwin32rootless.c \
-	winwin32rootlesswindow.c \
-	winwin32rootlesswndproc.c \
-	winwindowswm.c
-DEFS_MULTIWINDOWEXTWM = -DXWIN_MULTIWINDOWEXTWM
-MULTIWINDOWEXTWM_LIBS = $(top_builddir)/miext/rootless/librootless.la
-MULTIWINDOWEXTWM_CFLAGS = -I$(top_srcdir)/miext/rootless
-endif
+MULTIWINDOW_SYS_LIBS = -lshlwapi -lole32 -ldwmapi
 
 SRCS_RANDR = \
 	winrandr.c
@@ -99,9 +88,9 @@ SRCS =	InitInput.c \
 	windisplay.h \
 	XWin.rc \
 	$(top_srcdir)/mi/miinitext.c \
+	$(top_srcdir)/mi/miinitext.h \
 	$(SRCS_CLIPBOARD) \
 	$(SRCS_MULTIWINDOW) \
-	$(SRCS_MULTIWINDOWEXTWM) \
 	$(SRCS_RANDR)
 
 DEFS = \
@@ -117,7 +106,6 @@ XWIN_LIBS += \
 	$(top_builddir)/Xi/libXistubs.la
 
 XWin_DEPENDENCIES = \
-	$(MULTIWINDOWEXTWM_LIBS) \
 	$(XWIN_GLX_LIBS) \
 	$(XWIN_LIBS) \
 	$(CLIPBOARD_LIBS) \
@@ -125,7 +113,6 @@ XWin_DEPENDENCIES = \
 
 
 XWin_LDADD = \
-	$(MULTIWINDOWEXTWM_LIBS) \
 	$(XWIN_GLX_LIBS) \
 	$(XWIN_LIBS) \
 	$(CLIPBOARD_LIBS) \
@@ -154,7 +141,6 @@ AM_LFLAGS = -i
 AM_CFLAGS = -DHAVE_XWIN_CONFIG_H $(DIX_CFLAGS) \
             $(XWINMODULES_CFLAGS) \
             -I$(top_srcdir) \
-            $(MULTIWINDOWEXTWM_CFLAGS) \
             -Wno-bad-function-cast
 
 xwinconfigdir = $(sysconfdir)/X11
diff --git a/hw/xwin/Makefile.in b/hw/xwin/Makefile.in
index 3e90571..f61263c 100644
--- a/hw/xwin/Makefile.in
+++ b/hw/xwin/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -110,43 +110,18 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(xwinconfigdir)"
 PROGRAMS = $(bin_PROGRAMS)
-am__XWin_SOURCES_DIST = InitInput.c InitOutput.c winallpriv.c \
-	winauth.c winblock.c wincmap.c winconfig.c wincreatewnd.c \
-	wincursor.c windialogs.c winengine.c winerror.c winglobals.c \
-	winkeybd.c winkeyhook.c winmisc.c winmonitors.c winmouse.c \
-	winmsg.c winmsgwindow.c winmultiwindowclass.c \
-	winmultiwindowicons.c winos.c winprefs.c winprefsyacc.y \
-	winprefslex.l winprocarg.c winscrinit.c winshadddnl.c \
-	winshadgdi.c wintaskbar.c wintrayicon.c winvalargs.c \
-	winwakeup.c winwindow.c winwndproc.c ddraw.h winconfig.h win.h \
-	winglobals.h winkeybd.h winkeynames.h winlayouts.h \
-	winmessages.h winmonitors.h winmsg.h winms.h \
-	winmultiwindowclass.h winmultiwindowicons.h winprefs.h \
-	winresource.h winwindow.h windisplay.c windisplay.h XWin.rc \
-	$(top_srcdir)/mi/miinitext.c winclipboardinit.c \
-	winclipboardwrappers.c winmultiwindowshape.c \
-	winmultiwindowwindow.c winmultiwindowwm.c \
-	winmultiwindowwndproc.c propertystore.h winSetAppUserModelID.c \
-	winwin32rootless.c winwin32rootlesswindow.c \
-	winwin32rootlesswndproc.c winwindowswm.c winrandr.c
 am__objects_1 = winclipboardinit.$(OBJEXT) \
 	winclipboardwrappers.$(OBJEXT)
 am__objects_2 = winmultiwindowshape.$(OBJEXT) \
 	winmultiwindowwindow.$(OBJEXT) winmultiwindowwm.$(OBJEXT) \
 	winmultiwindowwndproc.$(OBJEXT) winSetAppUserModelID.$(OBJEXT)
-@XWIN_MULTIWINDOWEXTWM_TRUE@am__objects_3 =  \
-@XWIN_MULTIWINDOWEXTWM_TRUE@	winwin32rootless.$(OBJEXT) \
-@XWIN_MULTIWINDOWEXTWM_TRUE@	winwin32rootlesswindow.$(OBJEXT) \
-@XWIN_MULTIWINDOWEXTWM_TRUE@	winwin32rootlesswndproc.$(OBJEXT) \
-@XWIN_MULTIWINDOWEXTWM_TRUE@	winwindowswm.$(OBJEXT)
-am__objects_4 = winrandr.$(OBJEXT)
-am__objects_5 = InitInput.$(OBJEXT) InitOutput.$(OBJEXT) \
+am__objects_3 = winrandr.$(OBJEXT)
+am__objects_4 = InitInput.$(OBJEXT) InitOutput.$(OBJEXT) \
 	winallpriv.$(OBJEXT) winauth.$(OBJEXT) winblock.$(OBJEXT) \
 	wincmap.$(OBJEXT) winconfig.$(OBJEXT) wincreatewnd.$(OBJEXT) \
 	wincursor.$(OBJEXT) windialogs.$(OBJEXT) winengine.$(OBJEXT) \
@@ -161,8 +136,8 @@ am__objects_5 = InitInput.$(OBJEXT) InitOutput.$(OBJEXT) \
 	wintrayicon.$(OBJEXT) winvalargs.$(OBJEXT) winwakeup.$(OBJEXT) \
 	winwindow.$(OBJEXT) winwndproc.$(OBJEXT) windisplay.$(OBJEXT) \
 	XWin.$(OBJEXT) miinitext.$(OBJEXT) $(am__objects_1) \
-	$(am__objects_2) $(am__objects_3) $(am__objects_4)
-am_XWin_OBJECTS = $(am__objects_5)
+	$(am__objects_2) $(am__objects_3)
+am_XWin_OBJECTS = $(am__objects_4)
 XWin_OBJECTS = $(am_XWin_OBJECTS)
 am__DEPENDENCIES_1 = $(top_builddir)/pseudoramiX/libPseudoramiX.la \
 	$(top_builddir)/Xi/libXistubs.la
@@ -214,11 +189,7 @@ am__depfiles_remade = ./$(DEPDIR)/InitInput.Po \
 	./$(DEPDIR)/winshadddnl.Po ./$(DEPDIR)/winshadgdi.Po \
 	./$(DEPDIR)/wintaskbar.Po ./$(DEPDIR)/wintrayicon.Po \
 	./$(DEPDIR)/winvalargs.Po ./$(DEPDIR)/winwakeup.Po \
-	./$(DEPDIR)/winwin32rootless.Po \
-	./$(DEPDIR)/winwin32rootlesswindow.Po \
-	./$(DEPDIR)/winwin32rootlesswndproc.Po \
-	./$(DEPDIR)/winwindow.Po ./$(DEPDIR)/winwindowswm.Po \
-	./$(DEPDIR)/winwndproc.Po
+	./$(DEPDIR)/winwindow.Po ./$(DEPDIR)/winwndproc.Po
 am__mv = mv -f
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@@ -256,7 +227,7 @@ am__v_YACC_ = $(am__v_YACC_@AM_DEFAULT_V@)
 am__v_YACC_0 = @echo "  YACC    " $@;
 am__v_YACC_1 = 
 SOURCES = $(XWin_SOURCES)
-DIST_SOURCES = $(am__XWin_SOURCES_DIST)
+DIST_SOURCES = $(XWin_SOURCES)
 RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
 	ctags-recursive dvi-recursive html-recursive info-recursive \
 	install-data-recursive install-dvi-recursive \
@@ -323,8 +294,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \
 	$(top_srcdir)/ylwrap winprefslex.c winprefsyacc.c \
 	winprefsyacc.h
@@ -371,8 +340,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -386,6 +353,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -407,14 +376,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -431,8 +392,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -488,6 +451,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -540,7 +505,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -564,29 +528,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -624,8 +572,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -636,14 +582,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@ $(top_builddir)/pseudoramiX/libPseudoramiX.la \
@@ -736,16 +676,7 @@ SRCS_MULTIWINDOW = \
 	propertystore.h \
 	winSetAppUserModelID.c
 
-MULTIWINDOW_SYS_LIBS = -lshlwapi -lole32
-@XWIN_MULTIWINDOWEXTWM_TRUE@SRCS_MULTIWINDOWEXTWM = \
-@XWIN_MULTIWINDOWEXTWM_TRUE@	winwin32rootless.c \
-@XWIN_MULTIWINDOWEXTWM_TRUE@	winwin32rootlesswindow.c \
-@XWIN_MULTIWINDOWEXTWM_TRUE@	winwin32rootlesswndproc.c \
-@XWIN_MULTIWINDOWEXTWM_TRUE@	winwindowswm.c
-
-@XWIN_MULTIWINDOWEXTWM_TRUE@DEFS_MULTIWINDOWEXTWM = -DXWIN_MULTIWINDOWEXTWM
-@XWIN_MULTIWINDOWEXTWM_TRUE@MULTIWINDOWEXTWM_LIBS = $(top_builddir)/miext/rootless/librootless.la
-@XWIN_MULTIWINDOWEXTWM_TRUE@MULTIWINDOWEXTWM_CFLAGS = -I$(top_srcdir)/miext/rootless
+MULTIWINDOW_SYS_LIBS = -lshlwapi -lole32 -ldwmapi
 SRCS_RANDR = \
 	winrandr.c
 
@@ -805,21 +736,19 @@ SRCS = InitInput.c \
 	windisplay.h \
 	XWin.rc \
 	$(top_srcdir)/mi/miinitext.c \
+	$(top_srcdir)/mi/miinitext.h \
 	$(SRCS_CLIPBOARD) \
 	$(SRCS_MULTIWINDOW) \
-	$(SRCS_MULTIWINDOWEXTWM) \
 	$(SRCS_RANDR)
 
 XWin_SOURCES = $(SRCS)
 XWin_DEPENDENCIES = \
-	$(MULTIWINDOWEXTWM_LIBS) \
 	$(XWIN_GLX_LIBS) \
 	$(XWIN_LIBS) \
 	$(CLIPBOARD_LIBS) \
 	$(XSERVER_LIBS)
 
 XWin_LDADD = \
-	$(MULTIWINDOWEXTWM_LIBS) \
 	$(XWIN_GLX_LIBS) \
 	$(XWIN_LIBS) \
 	$(CLIPBOARD_LIBS) \
@@ -837,7 +766,6 @@ AM_LFLAGS = -i
 AM_CFLAGS = -DHAVE_XWIN_CONFIG_H $(DIX_CFLAGS) \
             $(XWINMODULES_CFLAGS) \
             -I$(top_srcdir) \
-            $(MULTIWINDOWEXTWM_CFLAGS) \
             -Wno-bad-function-cast
 
 xwinconfigdir = $(sysconfdir)/X11
@@ -988,11 +916,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wintrayicon.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/winvalargs.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/winwakeup.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/winwin32rootless.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/winwin32rootlesswindow.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/winwin32rootlesswndproc.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/winwindow.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/winwindowswm.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/winwndproc.Po@am__quote@ # am--include-marker
 
 $(am__depfiles_remade):
@@ -1167,7 +1091,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
@@ -1237,7 +1160,8 @@ installdirs-am:
 	done
 install: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) install-recursive
-install-exec: install-exec-recursive
+install-exec: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-exec-recursive
 install-data: install-data-recursive
 uninstall: uninstall-recursive
 
@@ -1320,11 +1244,7 @@ distclean: distclean-recursive
 	-rm -f ./$(DEPDIR)/wintrayicon.Po
 	-rm -f ./$(DEPDIR)/winvalargs.Po
 	-rm -f ./$(DEPDIR)/winwakeup.Po
-	-rm -f ./$(DEPDIR)/winwin32rootless.Po
-	-rm -f ./$(DEPDIR)/winwin32rootlesswindow.Po
-	-rm -f ./$(DEPDIR)/winwin32rootlesswndproc.Po
 	-rm -f ./$(DEPDIR)/winwindow.Po
-	-rm -f ./$(DEPDIR)/winwindowswm.Po
 	-rm -f ./$(DEPDIR)/winwndproc.Po
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
@@ -1416,11 +1336,7 @@ maintainer-clean: maintainer-clean-recursive
 	-rm -f ./$(DEPDIR)/wintrayicon.Po
 	-rm -f ./$(DEPDIR)/winvalargs.Po
 	-rm -f ./$(DEPDIR)/winwakeup.Po
-	-rm -f ./$(DEPDIR)/winwin32rootless.Po
-	-rm -f ./$(DEPDIR)/winwin32rootlesswindow.Po
-	-rm -f ./$(DEPDIR)/winwin32rootlesswndproc.Po
 	-rm -f ./$(DEPDIR)/winwindow.Po
-	-rm -f ./$(DEPDIR)/winwindowswm.Po
 	-rm -f ./$(DEPDIR)/winwndproc.Po
 	-rm -f Makefile
 maintainer-clean-am: distclean-am maintainer-clean-generic
@@ -1441,7 +1357,7 @@ ps-am:
 uninstall-am: uninstall-binPROGRAMS uninstall-xwinconfigDATA
 
 .MAKE: $(am__recursive_targets) all check install install-am \
-	install-exec-am install-strip
+	install-exec install-exec-am install-strip
 
 .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
 	am--depfiles check check-am clean clean-binPROGRAMS \
diff --git a/hw/xwin/ddraw.h b/hw/xwin/ddraw.h
index 4c9af77..720fa5a 100644
--- a/hw/xwin/ddraw.h
+++ b/hw/xwin/ddraw.h
@@ -344,7 +344,7 @@ extern "C" {
 #define DDSCAPS2_RESERVED2              0x00000040
 /* indicates surface will never be locked again */
 #define DDSCAPS2_OPAQUE                 0x00000080
-/* set at CreateSurface() time to indicate antialising will be used */
+/* set at CreateSurface() time to indicate antialiasing will be used */
 #define DDSCAPS2_HINTANTIALIASING       0x00000100
 /* set at CreateSurface() time to indicate cubic environment map */
 #define DDSCAPS2_CUBEMAP                0x00000200
@@ -383,9 +383,9 @@ extern "C" {
     typedef struct _DDCAPS_DX7 {        /* DirectX 7 version of caps struct */
         DWORD dwSize;           /* size of the DDDRIVERCAPS structure */
         DWORD dwCaps;           /* driver specific capabilities */
-        DWORD dwCaps2;          /* more driver specific capabilites */
+        DWORD dwCaps2;          /* more driver specific capabilities */
         DWORD dwCKeyCaps;       /* color key capabilities of the surface */
-        DWORD dwFXCaps;         /* driver specific stretching and effects capabilites */
+        DWORD dwFXCaps;         /* driver specific stretching and effects capabilities */
         DWORD dwFXAlphaCaps;    /* alpha driver specific capabilities */
         DWORD dwPalCaps;        /* palette capabilities */
         DWORD dwSVCaps;         /* stereo vision capabilities */
@@ -407,7 +407,7 @@ extern "C" {
         DWORD dwAlignSizeDest;  /* dest rectangle byte size */
         DWORD dwAlignStrideAlign;       /* stride alignment */
         DWORD dwRops[DD_ROP_SPACE];     /* ROPS supported */
-        DDSCAPS ddsOldCaps;     /* old DDSCAPS - superceded for DirectX6+ */
+        DDSCAPS ddsOldCaps;     /* old DDSCAPS - superseded for DirectX6+ */
         DWORD dwMinOverlayStretch;      /* minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
         DWORD dwMaxOverlayStretch;      /* maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
         DWORD dwMinLiveVideoStretch;    /* minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
@@ -443,9 +443,9 @@ extern "C" {
     typedef struct _DDCAPS_DX6 {        /* DirectX 6 version of caps struct */
         DWORD dwSize;           /* size of the DDDRIVERCAPS structure */
         DWORD dwCaps;           /* driver specific capabilities */
-        DWORD dwCaps2;          /* more driver specific capabilites */
+        DWORD dwCaps2;          /* more driver specific capabilities */
         DWORD dwCKeyCaps;       /* color key capabilities of the surface */
-        DWORD dwFXCaps;         /* driver specific stretching and effects capabilites */
+        DWORD dwFXCaps;         /* driver specific stretching and effects capabilities */
         DWORD dwFXAlphaCaps;    /* alpha driver specific capabilities */
         DWORD dwPalCaps;        /* palette capabilities */
         DWORD dwSVCaps;         /* stereo vision capabilities */
@@ -467,7 +467,7 @@ extern "C" {
         DWORD dwAlignSizeDest;  /* dest rectangle byte size */
         DWORD dwAlignStrideAlign;       /* stride alignment */
         DWORD dwRops[DD_ROP_SPACE];     /* ROPS supported */
-        DDSCAPS ddsOldCaps;     /* old DDSCAPS - superceded for DirectX6+ */
+        DDSCAPS ddsOldCaps;     /* old DDSCAPS - superseded for DirectX6+ */
         DWORD dwMinOverlayStretch;      /* minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
         DWORD dwMaxOverlayStretch;      /* maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
         DWORD dwMinLiveVideoStretch;    /* minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
@@ -504,9 +504,9 @@ extern "C" {
     typedef struct _DDCAPS_DX5 {        /* DirectX5 version of caps struct */
         DWORD dwSize;           /* size of the DDDRIVERCAPS structure */
         DWORD dwCaps;           /* driver specific capabilities */
-        DWORD dwCaps2;          /* more driver specific capabilites */
+        DWORD dwCaps2;          /* more driver specific capabilities */
         DWORD dwCKeyCaps;       /* color key capabilities of the surface */
-        DWORD dwFXCaps;         /* driver specific stretching and effects capabilites */
+        DWORD dwFXCaps;         /* driver specific stretching and effects capabilities */
         DWORD dwFXAlphaCaps;    /* alpha driver specific capabilities */
         DWORD dwPalCaps;        /* palette capabilities */
         DWORD dwSVCaps;         /* stereo vision capabilities */
@@ -564,9 +564,9 @@ extern "C" {
     typedef struct _DDCAPS_DX3 {        /* DirectX3 version of caps struct */
         DWORD dwSize;           /* size of the DDDRIVERCAPS structure */
         DWORD dwCaps;           /* driver specific capabilities */
-        DWORD dwCaps2;          /* more driver specific capabilites */
+        DWORD dwCaps2;          /* more driver specific capabilities */
         DWORD dwCKeyCaps;       /* color key capabilities of the surface */
-        DWORD dwFXCaps;         /* driver specific stretching and effects capabilites */
+        DWORD dwFXCaps;         /* driver specific stretching and effects capabilities */
         DWORD dwFXAlphaCaps;    /* alpha driver specific capabilities */
         DWORD dwPalCaps;        /* palette capabilities */
         DWORD dwSVCaps;         /* stereo vision capabilities */
@@ -827,7 +827,7 @@ extern "C" {
 
 /* DDCAPS.dwSVCaps */
 /* the first 4 of these are now obsolete */
-#if DIRECTDRAW_VERSION >= 0x700 /* FIXME: I'm not sure when this switch occured */
+#if DIRECTDRAW_VERSION >= 0x700 /* FIXME: I'm not sure when this switch occurred */
 #define DDSVCAPS_RESERVED1		0x00000001
 #define DDSVCAPS_RESERVED2		0x00000002
 #define DDSVCAPS_RESERVED3		0x00000004
diff --git a/hw/xwin/dri/Makefile.in b/hw/xwin/dri/Makefile.in
index f753d63..94e0537 100644
--- a/hw/xwin/dri/Makefile.in
+++ b/hw/xwin/dri/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -105,7 +105,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -176,8 +175,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
@@ -197,8 +194,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -212,6 +207,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -230,14 +227,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -254,8 +243,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -311,6 +302,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -363,7 +356,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -387,29 +379,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -447,8 +423,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -459,14 +433,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -688,7 +656,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/hw/xwin/dri/windowsdri.h b/hw/xwin/dri/windowsdri.h
index 852b716..ce5769f 100644
--- a/hw/xwin/dri/windowsdri.h
+++ b/hw/xwin/dri/windowsdri.h
@@ -25,6 +25,5 @@
 #define windowsdri_h
 
 void WindowsDRIExtensionInit(void);
-Bool noDriExtension;
 
 #endif /* windowsdri_h */
diff --git a/hw/xwin/glx/Makefile.am b/hw/xwin/glx/Makefile.am
index 119fee4..ae9debe 100644
--- a/hw/xwin/glx/Makefile.am
+++ b/hw/xwin/glx/Makefile.am
@@ -20,20 +20,13 @@ endif
 libnativeGLthunk_la_SOURCES = \
 	glthunk.c
 
-if XWIN_MULTIWINDOWEXTWM
-DEFS_MULTIWINDOWEXTWM = -DXWIN_MULTIWINDOWEXTWM
-endif
-
 if XWIN_GLX_WINDOWS
 DEFS_GLX_WINDOWS = -DXWIN_GLX_WINDOWS
 endif
 
 DEFS = \
-	$(DEFS_MULTIWINDOWEXTWM) \
 	$(DEFS_GLX_WINDOWS)
 
-AM_CPPFLAGS = -I$(top_srcdir)/miext/rootless
-
 AM_CFLAGS = -DHAVE_XWIN_CONFIG_H $(DIX_CFLAGS) \
             $(XWINMODULES_CFLAGS) \
             -I$(top_srcdir) \
diff --git a/hw/xwin/glx/Makefile.in b/hw/xwin/glx/Makefile.in
index b4dea85..c5db813 100644
--- a/hw/xwin/glx/Makefile.in
+++ b/hw/xwin/glx/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -109,7 +109,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -224,8 +223,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
@@ -245,8 +242,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -260,6 +255,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -271,7 +268,6 @@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@
 DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@
 DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@
 DEFS = \
-	$(DEFS_MULTIWINDOWEXTWM) \
 	$(DEFS_GLX_WINDOWS)
 
 DEPDIR = @DEPDIR@
@@ -281,14 +277,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -305,8 +293,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -362,6 +352,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -414,7 +406,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -438,29 +429,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -498,8 +473,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -510,14 +483,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -598,9 +565,7 @@ libXwinGLX_la_SOURCES = winpriv.c winpriv.h glwindows.h glshim.c \
 libnativeGLthunk_la_SOURCES = \
 	glthunk.c
 
-@XWIN_MULTIWINDOWEXTWM_TRUE@DEFS_MULTIWINDOWEXTWM = -DXWIN_MULTIWINDOWEXTWM
 @XWIN_GLX_WINDOWS_TRUE@DEFS_GLX_WINDOWS = -DXWIN_GLX_WINDOWS
-AM_CPPFLAGS = -I$(top_srcdir)/miext/rootless
 AM_CFLAGS = -DHAVE_XWIN_CONFIG_H $(DIX_CFLAGS) \
             $(XWINMODULES_CFLAGS) \
             -I$(top_srcdir) \
@@ -805,7 +770,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
@@ -849,7 +813,8 @@ installdirs:
 	done
 install: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) install-am
-install-exec: install-exec-am
+install-exec: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-exec-am
 install-data: install-data-am
 uninstall: uninstall-am
 
@@ -961,7 +926,7 @@ ps-am:
 
 uninstall-am: uninstall-libLTLIBRARIES
 
-.MAKE: all check install install-am install-strip
+.MAKE: all check install install-am install-exec install-strip
 
 .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
 	clean-generic clean-libLTLIBRARIES clean-libtool \
diff --git a/hw/xwin/glx/indirect.c b/hw/xwin/glx/indirect.c
index 1aaa87d..ff015f7 100644
--- a/hw/xwin/glx/indirect.c
+++ b/hw/xwin/glx/indirect.c
@@ -100,6 +100,12 @@
 #endif
 
 
+typedef struct  {
+    int notOpenGL;
+    int unknownPixelType;
+    int unaccelerated;
+} PixelFormatRejectStats;
+
 /* ---------------------------------------------------------------------- */
 /*
  * Various debug helpers
@@ -285,23 +291,29 @@ swap_method_name(int mthd)
 }
 
 static void
-fbConfigsDump(unsigned int n, __GLXconfig * c)
+fbConfigsDump(unsigned int n, __GLXconfig * c, PixelFormatRejectStats *rejects)
 {
     LogMessage(X_INFO, "%d fbConfigs\n", n);
+    LogMessage(X_INFO, "ignored pixel formats: %d not OpenGL, %d unknown pixel type, %d unaccelerated\n",
+               rejects->notOpenGL, rejects->unknownPixelType, rejects->unaccelerated);
 
     if (g_iLogVerbose < 3)
         return;
-    ErrorF("%d fbConfigs\n", n);
+
     ErrorF
-        ("pxf vis  fb                      render         Ste                     aux    accum        MS    drawable             Group/\n");
+        ("pxf vis  fb                      render         Ste                     aux    accum        MS    drawable             Group/ sRGB\n");
     ErrorF
-        ("idx  ID  ID VisualType Depth Lvl RGB CI DB Swap reo  R  G  B  A   Z  S  buf AR AG AB AA  bufs num  W P Pb  Float Trans Caveat\n");
+        ("idx  ID  ID VisualType Depth Lvl RGB CI DB Swap reo  R  G  B  A   Z  S  buf AR AG AB AA  bufs num  W P Pb  Float Trans Caveat cap \n");
     ErrorF
-        ("-----------------------------------------------------------------------------------------------------------------------------\n");
+        ("----------------------------------------------------------------------------------------------------------------------------------\n");
 
     while (c != NULL) {
         unsigned int i = ((GLXWinConfig *) c)->pixelFormatIndex;
 
+        const char *float_col = ".";
+        if (c->renderType & GLX_RGBA_FLOAT_BIT_ARB) float_col = "s";
+        if (c->renderType & GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT) float_col = "u";
+
         ErrorF("%3d %3x %3x "
                "%-11s"
                " %3d %3d   %s   %s  %s %s  %s  "
@@ -313,7 +325,8 @@ fbConfigsDump(unsigned int n, __GLXconfig * c)
                "  %s %s %s "
                "    %s   "
                "  %s   "
-               "  %d %s"
+               "  %d %s "
+               "  %s"
                "\n",
                i, c->visualID, c->fbconfigID,
                visual_class_name(c->visualType),
@@ -332,11 +345,11 @@ fbConfigsDump(unsigned int n, __GLXconfig * c)
                (c->drawableType & GLX_WINDOW_BIT) ? "y" : ".",
                (c->drawableType & GLX_PIXMAP_BIT) ? "y" : ".",
                (c->drawableType & GLX_PBUFFER_BIT) ? "y" : ".",
-               (c->renderType & (GLX_RGBA_FLOAT_BIT_ARB |
-                   GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT)) ? "y" : ".",
+               float_col,
                (c->transparentPixel != GLX_NONE_EXT) ? "y" : ".",
                c->visualSelectGroup,
-               (c->visualRating == GLX_SLOW_VISUAL_EXT) ? "*" : " ");
+               (c->visualRating == GLX_SLOW_VISUAL_EXT) ? "*" : " ",
+               c->sRGBCapable ? "y" : ".");
 
         c = c->next;
     }
@@ -371,7 +384,8 @@ static HDC glxWinMakeDC(__GLXWinContext * gc, __GLXWinDrawable * draw,
 static void glxWinReleaseDC(HWND hwnd, HDC hdc, __GLXWinDrawable * draw);
 
 static void glxWinCreateConfigs(HDC dc, glxWinScreen * screen);
-static void glxWinCreateConfigsExt(HDC hdc, glxWinScreen * screen);
+static void glxWinCreateConfigsExt(HDC hdc, glxWinScreen * screen,
+                                   PixelFormatRejectStats * rejects);
 static int fbConfigToPixelFormat(__GLXconfig * mode,
                                  PIXELFORMATDESCRIPTOR * pfdret,
                                  int drawableTypeOverride);
@@ -477,6 +491,7 @@ glxWinScreenProbe(ScreenPtr pScreen)
     HWND hwnd;
     HDC hdc;
     HGLRC hglrc;
+    PixelFormatRejectStats rejects;
 
     GLWIN_DEBUG_MSG("glxWinScreenProbe");
 
@@ -497,8 +512,10 @@ glxWinScreenProbe(ScreenPtr pScreen)
         return NULL;
 
     // Select the native GL implementation (WGL)
-    if (glWinSelectImplementation(1))
+    if (glWinSelectImplementation(1)) {
+        free(screen);
         return NULL;
+    }
 
     // create window class
 #define WIN_GL_TEST_WINDOW_CLASS "XWinGLTest"
@@ -572,47 +589,68 @@ glxWinScreenProbe(ScreenPtr pScreen)
     // might have completely different capabilities.  Of course, good luck getting
     // those screens to be accelerated in XP and earlier...
 
+
     {
+        int i;
+
+        const struct
+        {
+            const char *wglext;
+            const char *glxext;
+            Bool mandatory;
+        } extensionMap[] = {
+            { "WGL_ARB_make_current_read", "GLX_SGI_make_current_read", 1 },
+            { "WGL_EXT_swap_control", "GLX_SGI_swap_control", 0 },
+            { "WGL_EXT_swap_control", "GLX_MESA_swap_control", 0 },
+            //      { "WGL_ARB_render_texture", "GLX_EXT_texture_from_pixmap", 0 },
+            // Sufficiently different that it's not obvious if this can be done...
+            { "WGL_ARB_pbuffer", "GLX_SGIX_pbuffer", 1 },
+            { "WGL_ARB_multisample", "GLX_ARB_multisample", 1 },
+            { "WGL_ARB_multisample", "GLX_SGIS_multisample", 0 },
+            { "WGL_ARB_pixel_format_float", "GLX_ARB_fbconfig_float", 0 },
+            { "WGL_EXT_pixel_format_packed_float", "GLX_EXT_fbconfig_packed_float", 0 },
+            { "WGL_ARB_create_context", "GLX_ARB_create_context", 0 },
+            { "WGL_ARB_create_context_profile", "GLX_ARB_create_context_profile", 0 },
+            { "WGL_ARB_create_context_robustness", "GLX_ARB_create_context_robustness", 0 },
+            { "WGL_EXT_create_context_es2_profile", "GLX_EXT_create_context_es2_profile", 0 },
+            { "WGL_ARB_framebuffer_sRGB", "GLX_ARB_framebuffer_sRGB", 0 },
+        };
+
         //
         // Based on the WGL extensions available, enable various GLX extensions
-        // XXX: make this table-driven ?
         //
         __glXInitExtensionEnableBits(screen->base.glx_enable_bits);
 
-        if (strstr(wgl_extensions, "WGL_ARB_make_current_read"))
-            screen->has_WGL_ARB_make_current_read = TRUE;
-        else
-            LogMessage(X_WARNING, "AIGLX: missing WGL_ARB_make_current_read\n");
+        for (i = 0; i < sizeof(extensionMap)/sizeof(extensionMap[0]); i++) {
+            if (strstr(wgl_extensions, extensionMap[i].wglext)) {
+                __glXEnableExtension(screen->base.glx_enable_bits, extensionMap[i].glxext);
+                LogMessage(X_INFO, "GLX: enabled %s\n", extensionMap[i].glxext);
+            }
+            else if (extensionMap[i].mandatory) {
+                LogMessage(X_ERROR, "required WGL extension %s is missing\n", extensionMap[i].wglext);
+            }
+        }
 
+        // Because it pre-dates WGL_EXT_extensions_string, GL_WIN_swap_hint might
+        // only be in GL_EXTENSIONS
         if (strstr(gl_extensions, "GL_WIN_swap_hint")) {
             __glXEnableExtension(screen->base.glx_enable_bits,
                                  "GLX_MESA_copy_sub_buffer");
             LogMessage(X_INFO, "AIGLX: enabled GLX_MESA_copy_sub_buffer\n");
         }
 
-        if (strstr(wgl_extensions, "WGL_EXT_swap_control")) {
-            __glXEnableExtension(screen->base.glx_enable_bits,
-                                 "GLX_SGI_swap_control");
-            LogMessage(X_INFO, "AIGLX: enabled GLX_SGI_swap_control\n");
-        }
-
-/*       // Hmm?  screen->texOffset */
-/*       if (strstr(wgl_extensions, "WGL_ARB_render_texture")) */
-/*         { */
-/*           __glXEnableExtension(screen->base.glx_enable_bits, "GLX_EXT_texture_from_pixmap"); */
-/*           LogMessage(X_INFO, "AIGLX: GLX_EXT_texture_from_pixmap backed by buffer objects\n"); */
-/*           screen->has_WGL_ARB_render_texture = TRUE; */
-/*         } */
+        if (strstr(wgl_extensions, "WGL_ARB_make_current_read"))
+            screen->has_WGL_ARB_make_current_read = TRUE;
 
         if (strstr(wgl_extensions, "WGL_ARB_pbuffer"))
             screen->has_WGL_ARB_pbuffer = TRUE;
-        else
-            LogMessage(X_WARNING, "AIGLX: missing WGL_ARB_pbuffer\n");
 
         if (strstr(wgl_extensions, "WGL_ARB_multisample"))
             screen->has_WGL_ARB_multisample = TRUE;
-        else
-            LogMessage(X_WARNING, "AIGLX: missing WGL_ARB_multisample\n");
+
+        if (strstr(wgl_extensions, "WGL_ARB_framebuffer_sRGB")) {
+            screen->has_WGL_ARB_framebuffer_sRGB = TRUE;
+        }
 
         screen->base.destroy = glxWinScreenDestroy;
         screen->base.createContext = glxWinCreateContext;
@@ -621,8 +659,9 @@ glxWinScreenProbe(ScreenPtr pScreen)
         screen->base.pScreen = pScreen;
 
         // Creating the fbConfigs initializes screen->base.fbconfigs and screen->base.numFBConfigs
+        memset(&rejects, 0, sizeof(rejects));
         if (strstr(wgl_extensions, "WGL_ARB_pixel_format")) {
-            glxWinCreateConfigsExt(hdc, screen);
+            glxWinCreateConfigsExt(hdc, screen, &rejects);
 
             /*
                Some graphics drivers appear to advertise WGL_ARB_pixel_format,
@@ -635,6 +674,7 @@ glxWinScreenProbe(ScreenPtr pScreen)
         }
 
         if (screen->base.numFBConfigs <= 0) {
+            memset(&rejects, 0, sizeof(rejects));
             glxWinCreateConfigs(hdc, screen);
             screen->has_WGL_ARB_pixel_format = FALSE;
         }
@@ -662,7 +702,7 @@ glxWinScreenProbe(ScreenPtr pScreen)
     DestroyWindow(hwnd);
 
     // dump out fbConfigs now fbConfigIds and visualIDs have been assigned
-    fbConfigsDump(screen->base.numFBConfigs, screen->base.fbconfigs);
+    fbConfigsDump(screen->base.numFBConfigs, screen->base.fbconfigs, &rejects);
 
     /* Wrap RealizeWindow, UnrealizeWindow and CopyWindow on this screen */
     screen->RealizeWindow = pScreen->RealizeWindow;
@@ -723,7 +763,7 @@ glxWinCopyWindow(WindowPtr pWindow, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
        Discard any CopyWindow requests if a GL drawing context is pointing at the window
 
        For regions which are being drawn by GL, the shadow framebuffer doesn't have the
-       correct bits, so we wish to avoid shadow framebuffer damage occuring, which will
+       correct bits, so we wish to avoid shadow framebuffer damage occurring, which will
        cause those incorrect bits to be transferred to the display....
      */
     if (pGlxDraw && pGlxDraw->drawContext) {
@@ -1070,7 +1110,7 @@ glxWinReleaseTexImage(__GLXcontext * baseContext,
  *
  * WGL contexts are created for a specific HDC, so we cannot create the WGL
  * context in glxWinCreateContext(), we must defer creation until the context
- * is actually used on a specifc drawable which is connected to a native window,
+ * is actually used on a specific drawable which is connected to a native window,
  * pbuffer or DIB
  *
  * The WGL context may be used on other, compatible HDCs, so we don't need to
@@ -1133,7 +1173,30 @@ glxWinSetPixelFormat(HDC hdc, int bppOverride, int drawableTypeOverride,
          (config->redBits + config->greenBits + config->blueBits), bppOverride,
          config->drawableType, drawableTypeOverride);
 
-    if (!winScreen->has_WGL_ARB_pixel_format) {
+    if (winScreen->has_WGL_ARB_pixel_format) {
+        int pixelFormat =
+            fbConfigToPixelFormatIndex(hdc, config,
+                                       drawableTypeOverride, winScreen);
+        if (pixelFormat != 0) {
+            GLWIN_DEBUG_MSG("wglChoosePixelFormat: chose pixelFormatIndex %d",
+                            pixelFormat);
+            ErrorF
+                ("wglChoosePixelFormat: chose pixelFormatIndex %d (rather than %d as originally planned)\n",
+                 pixelFormat, winConfig->pixelFormatIndex);
+
+            if (!SetPixelFormat(hdc, pixelFormat, NULL)) {
+                ErrorF("SetPixelFormat error: %s\n", glxWinErrorMessage());
+                return FALSE;
+            }
+        }
+    }
+
+    /*
+      For some drivers, wglChoosePixelFormatARB() can fail when the provided
+      DC doesn't belong to the driver (e.g. it's a compatible DC for a bitmap,
+      so allow fallback to ChoosePixelFormat()
+     */
+    {
         PIXELFORMATDESCRIPTOR pfd;
         int pixelFormat;
 
@@ -1169,25 +1232,6 @@ glxWinSetPixelFormat(HDC hdc, int bppOverride, int drawableTypeOverride,
             return FALSE;
         }
     }
-    else {
-        int pixelFormat = fbConfigToPixelFormatIndex(hdc, config,
-                                                     drawableTypeOverride,
-                                                     winScreen);
-        if (pixelFormat == 0) {
-            return FALSE;
-        }
-
-        GLWIN_DEBUG_MSG("wglChoosePixelFormat: chose pixelFormatIndex %d",
-                        pixelFormat);
-        ErrorF
-            ("wglChoosePixelFormat: chose pixelFormatIndex %d (rather than %d as originally planned)\n",
-             pixelFormat, winConfig->pixelFormatIndex);
-
-        if (!SetPixelFormat(hdc, pixelFormat, NULL)) {
-            ErrorF("SetPixelFormat error: %s\n", glxWinErrorMessage());
-            return FALSE;
-        }
-    }
 
     return TRUE;
 }
@@ -1553,8 +1597,7 @@ static int
 GetShift(int mask)
 {
     int shift = 0;
-
-    while ((mask &1) == 0) {
+    while (mask > 1) {
         shift++;
         mask >>=1;
     }
@@ -1650,13 +1693,34 @@ fbConfigToPixelFormatIndex(HDC hdc, __GLXconfig * mode,
     int attribList[60];
 
     SET_ATTR_VALUE(WGL_SUPPORT_OPENGL_ARB, TRUE);
-    SET_ATTR_VALUE(WGL_PIXEL_TYPE_ARB,
-                   (mode->visualType ==
-                    GLX_TRUE_COLOR) ? WGL_TYPE_RGBA_ARB :
-                   WGL_TYPE_COLORINDEX_ARB);
-    SET_ATTR_VALUE(WGL_COLOR_BITS_ARB,
-                   (mode->visualType ==
-                    GLX_TRUE_COLOR) ? mode->rgbBits : mode->indexBits);
+
+    switch (mode->renderType)
+        {
+        case GLX_COLOR_INDEX_BIT:
+        case GLX_RGBA_BIT | GLX_COLOR_INDEX_BIT:
+            SET_ATTR_VALUE(WGL_PIXEL_TYPE_ARB, WGL_TYPE_COLORINDEX_ARB);
+            SET_ATTR_VALUE(WGL_COLOR_BITS_ARB, mode->indexBits);
+            break;
+
+        default:
+            ErrorF("unexpected renderType %x\n", mode->renderType);
+            /* fall-through */
+        case GLX_RGBA_BIT:
+            SET_ATTR_VALUE(WGL_PIXEL_TYPE_ARB, WGL_TYPE_RGBA_ARB);
+            SET_ATTR_VALUE(WGL_COLOR_BITS_ARB, mode->rgbBits);
+            break;
+
+        case GLX_RGBA_FLOAT_BIT_ARB:
+            SET_ATTR_VALUE(WGL_PIXEL_TYPE_ARB, WGL_TYPE_RGBA_FLOAT_ARB);
+            SET_ATTR_VALUE(WGL_COLOR_BITS_ARB, mode->rgbBits);
+            break;
+
+        case GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT:
+            SET_ATTR_VALUE(WGL_PIXEL_TYPE_ARB, WGL_TYPE_RGBA_UNSIGNED_FLOAT_EXT);
+            SET_ATTR_VALUE(WGL_COLOR_BITS_ARB, mode->rgbBits);
+            break;
+        }
+
     SET_ATTR_VALUE(WGL_RED_BITS_ARB, mode->redBits);
     SET_ATTR_VALUE(WGL_GREEN_BITS_ARB, mode->greenBits);
     SET_ATTR_VALUE(WGL_BLUE_BITS_ARB, mode->blueBits);
@@ -1686,6 +1750,11 @@ fbConfigToPixelFormatIndex(HDC hdc, __GLXconfig * mode,
     if (mode->visualRating == GLX_SLOW_VISUAL_EXT)
         SET_ATTR_VALUE(WGL_ACCELERATION_ARB, WGL_NO_ACCELERATION_ARB);
 
+    if (winScreen->has_WGL_ARB_multisample) {
+        SET_ATTR_VALUE(WGL_SAMPLE_BUFFERS_ARB, mode->sampleBuffers);
+        SET_ATTR_VALUE(WGL_SAMPLES_ARB, mode->samples);
+    }
+
     // must support all the drawable types the mode supports
     if ((mode->drawableType | drawableTypeOverride) & GLX_WINDOW_BIT)
         SET_ATTR_VALUE(WGL_DRAW_TO_WINDOW_ARB, TRUE);
@@ -1709,6 +1778,9 @@ fbConfigToPixelFormatIndex(HDC hdc, __GLXconfig * mode,
                 SET_ATTR_VALUE(WGL_DRAW_TO_PBUFFER_ARB, TRUE);
     }
 
+    if (winScreen->has_WGL_ARB_framebuffer_sRGB)
+        SET_ATTR_VALUE(WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB, TRUE);
+
     SET_ATTR_VALUE(0, 0);       // terminator
 
     /* choose the first match */
@@ -1839,9 +1911,11 @@ glxWinCreateConfigs(HDC hdc, glxWinScreen * screen)
         /* EXT_visual_rating / GLX 1.2 */
         if (pfd.dwFlags & PFD_GENERIC_FORMAT) {
             c->base.visualRating = GLX_SLOW_VISUAL_EXT;
+            GLWIN_DEBUG_MSG("pixelFormat %d is un-accelerated, skipping", i + 1);
+            continue;
         }
         else {
-            // PFD_GENERIC_ACCELERATED is not considered, so this may be MCD or ICD acclerated...
+            // PFD_GENERIC_ACCELERATED is not considered, so this may be MCD or ICD accelerated...
             c->base.visualRating = GLX_NONE_EXT;
         }
 
@@ -1983,7 +2057,7 @@ getAttrValue(const int attrs[], int values[], unsigned int num, int attr,
 // Create the GLXconfigs using wglGetPixelFormatAttribfvARB() extension
 //
 static void
-glxWinCreateConfigsExt(HDC hdc, glxWinScreen * screen)
+glxWinCreateConfigsExt(HDC hdc, glxWinScreen * screen, PixelFormatRejectStats * rejects)
 {
     GLXWinConfig *first = NULL, *prev = NULL;
     int i = 0;
@@ -2068,6 +2142,11 @@ glxWinCreateConfigsExt(HDC hdc, glxWinScreen * screen)
         ADD_ATTR(WGL_MAX_PBUFFER_HEIGHT_ARB);
     }
 
+    if (screen->has_WGL_ARB_framebuffer_sRGB) {
+        // we may not query these attrs if WGL_ARB_framebuffer_sRGB is not offered
+        ADD_ATTR(WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB);
+    }
+
     /* fill in configs */
     for (i = 0; i < numConfigs; i++) {
         int values[num_attrs];
@@ -2089,6 +2168,7 @@ glxWinCreateConfigsExt(HDC hdc, glxWinScreen * screen)
 #define ATTR_VALUE(a, d) getAttrValue(attrs, values, num_attrs, (a), (d))
 
         if (!ATTR_VALUE(WGL_SUPPORT_OPENGL_ARB, 0)) {
+            rejects->notOpenGL++;
             GLWIN_DEBUG_MSG
                 ("pixelFormat %d isn't WGL_SUPPORT_OPENGL_ARB, skipping",
                  i + 1);
@@ -2122,26 +2202,46 @@ glxWinCreateConfigsExt(HDC hdc, glxWinScreen * screen)
             c->base.indexBits = ATTR_VALUE(WGL_COLOR_BITS_ARB, 0);
             c->base.rgbBits = 0;
             c->base.visualType = GLX_STATIC_COLOR;
+            c->base.renderType = GLX_RGBA_BIT | GLX_COLOR_INDEX_BIT;
+
+            /*
+              Assume RGBA rendering is available on all single-channel visuals
+              (it is specified to render to red component in single-channel
+              visuals, if supported, but there doesn't seem to be any mechanism
+              to check if it is supported)
+
+              Color index rendering is only supported on single-channel visuals
+            */
+
+            break;
+
+        case WGL_TYPE_RGBA_ARB:
+            c->base.indexBits = 0;
+            c->base.rgbBits = ATTR_VALUE(WGL_COLOR_BITS_ARB, 0);
+            c->base.visualType = GLX_TRUE_COLOR;
+            c->base.renderType = GLX_RGBA_BIT;
             break;
 
         case WGL_TYPE_RGBA_FLOAT_ARB:
-            GLWIN_DEBUG_MSG
-                ("pixelFormat %d is WGL_TYPE_RGBA_FLOAT_ARB, skipping", i + 1);
-            continue;
+            c->base.indexBits = 0;
+            c->base.rgbBits = ATTR_VALUE(WGL_COLOR_BITS_ARB, 0);
+            c->base.visualType = GLX_TRUE_COLOR;
+            c->base.renderType = GLX_RGBA_FLOAT_BIT_ARB;
+            // assert pbuffer drawable
+            // assert WGL_ARB_pixel_format_float
+            break;
 
         case WGL_TYPE_RGBA_UNSIGNED_FLOAT_EXT:
-            GLWIN_DEBUG_MSG
-                ("pixelFormat %d is WGL_TYPE_RGBA_UNSIGNED_FLOAT_EXT, skipping",
-                 i + 1);
-            continue;
-
-        case WGL_TYPE_RGBA_ARB:
             c->base.indexBits = 0;
             c->base.rgbBits = ATTR_VALUE(WGL_COLOR_BITS_ARB, 0);
             c->base.visualType = GLX_TRUE_COLOR;
+            c->base.renderType = GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT;
+            // assert pbuffer drawable
+            // assert WGL_EXT_pixel_format_packed_float
             break;
 
         default:
+            rejects->unknownPixelType++;
             ErrorF
                 ("wglGetPixelFormatAttribivARB returned unknown value 0x%x for WGL_PIXEL_TYPE_ARB\n",
                  ATTR_VALUE(WGL_PIXEL_TYPE_ARB, 0));
@@ -2164,7 +2264,7 @@ glxWinCreateConfigsExt(HDC hdc, glxWinScreen * screen)
 
             if (layers > 0) {
                 ErrorF
-                    ("pixelFormat %d: has %d overlay, %d underlays which aren't currently handled",
+                    ("pixelFormat %d: has %d overlay, %d underlays which aren't currently handled\n",
                      i, ATTR_VALUE(WGL_NUMBER_OVERLAYS_ARB, 0),
                      ATTR_VALUE(WGL_NUMBER_UNDERLAYS_ARB, 0));
                 // XXX: need to iterate over layers?
@@ -2182,7 +2282,10 @@ glxWinCreateConfigsExt(HDC hdc, glxWinScreen * screen)
                  ATTR_VALUE(WGL_ACCELERATION_ARB, 0));
 
         case WGL_NO_ACCELERATION_ARB:
+            rejects->unaccelerated++;
             c->base.visualRating = GLX_SLOW_VISUAL_EXT;
+            GLWIN_DEBUG_MSG("pixelFormat %d is un-accelerated, skipping", i + 1);
+            continue;
             break;
 
         case WGL_GENERIC_ACCELERATION_ARB:
@@ -2234,21 +2337,6 @@ glxWinCreateConfigsExt(HDC hdc, glxWinScreen * screen)
              | (ATTR_VALUE(WGL_DRAW_TO_BITMAP_ARB, 0) ? GLX_PIXMAP_BIT : 0)
              | (ATTR_VALUE(WGL_DRAW_TO_PBUFFER_ARB, 0) ? GLX_PBUFFER_BIT : 0));
 
-        /*
-           Assume OpenGL RGBA rendering is available on all visuals
-           (it is specified to render to red component in single-channel visuals,
-           if supported, but there doesn't seem to be any mechanism to check if it
-           is supported)
-
-           Color index rendering is only supported on single-channel visuals
-         */
-        if (c->base.visualType == GLX_STATIC_COLOR) {
-            c->base.renderType = GLX_RGBA_BIT | GLX_COLOR_INDEX_BIT;
-        }
-        else {
-            c->base.renderType = GLX_RGBA_BIT;
-        }
-
         c->base.fbconfigID = -1;        // will be set by __glXScreenInit()
 
         /* SGIX_pbuffer / GLX 1.3 */
@@ -2324,7 +2412,12 @@ glxWinCreateConfigsExt(HDC hdc, glxWinScreen * screen)
             GLX_TEXTURE_1D_BIT_EXT | GLX_TEXTURE_2D_BIT_EXT |
             GLX_TEXTURE_RECTANGLE_BIT_EXT;
         c->base.yInverted = -1;
-        c->base.sRGBCapable = 0;
+
+        /* WGL_ARB_framebuffer_sRGB */
+        if (screen->has_WGL_ARB_framebuffer_sRGB)
+            c->base.sRGBCapable = ATTR_VALUE(WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB, 0);
+        else
+            c->base.sRGBCapable = 0;
 
         n++;
 
diff --git a/hw/xwin/glx/indirect.h b/hw/xwin/glx/indirect.h
index bcdef15..c32ce78 100644
--- a/hw/xwin/glx/indirect.h
+++ b/hw/xwin/glx/indirect.h
@@ -69,6 +69,7 @@ struct __GLXWinScreen {
     Bool has_WGL_ARB_pbuffer;
     Bool has_WGL_ARB_render_texture;
     Bool has_WGL_ARB_make_current_read;
+    Bool has_WGL_ARB_framebuffer_sRGB;
 
     /* wrapped screen functions */
     RealizeWindowProcPtr RealizeWindow;
diff --git a/hw/xwin/glx/meson.build b/hw/xwin/glx/meson.build
index 57cce03..95f2489 100644
--- a/hw/xwin/glx/meson.build
+++ b/hw/xwin/glx/meson.build
@@ -72,7 +72,7 @@ xwin_glx = static_library(
     srcs_windows_glx,
     include_directories: [
         inc,
-        top_srcdir_inc,
+        top_dir_inc,
         include_directories('../'),
     ],
     dependencies: common_dep,
@@ -89,7 +89,7 @@ WGLthunk = shared_library(
     srcs_wgl_thunk,
     include_directories: [
         inc,
-        top_srcdir_inc,
+        top_dir_inc,
     ],
     c_args: xwin_glx_c_args + [
       '-Wno-unused-function',
diff --git a/hw/xwin/glx/winpriv.c b/hw/xwin/glx/winpriv.c
index 8ed93ab..d72c047 100644
--- a/hw/xwin/glx/winpriv.c
+++ b/hw/xwin/glx/winpriv.c
@@ -63,24 +63,6 @@ winGetWindowInfo(WindowPtr pWin)
 
             return hwnd;
         }
-#ifdef XWIN_MULTIWINDOWEXTWM
-        /* check for multiwindow external wm mode */
-        if (pScreenInfo->fMWExtWM) {
-            win32RootlessWindowPtr pRLWinPriv
-                = (win32RootlessWindowPtr) RootlessFrameForWindow(pWin, FALSE);
-
-            if (pRLWinPriv == NULL) {
-                ErrorF("winGetWindowInfo: window has no privates\n");
-                return hwnd;
-            }
-
-            if (pRLWinPriv->hWnd != NULL) {
-                /* copy window handle */
-                hwnd = pRLWinPriv->hWnd;
-            }
-            return hwnd;
-        }
-#endif
     }
     else {
         ScreenPtr pScreen = g_ScreenInfo[0].pScreen;
@@ -108,11 +90,6 @@ winCheckScreenAiglxIsSupported(ScreenPtr pScreen)
     if (pScreenInfo->fMultiWindow)
         return TRUE;
 
-#ifdef XWIN_MULTIWINDOWEXTWM
-    if (pScreenInfo->fMWExtWM)
-        return TRUE;
-#endif
-
     return FALSE;
 }
 
diff --git a/hw/xwin/man/Makefile.in b/hw/xwin/man/Makefile.in
index a4f461e..6ac1eba 100644
--- a/hw/xwin/man/Makefile.in
+++ b/hw/xwin/man/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -105,7 +105,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -178,8 +177,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -193,6 +190,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -211,14 +210,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -235,8 +226,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -292,6 +285,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -375,7 +370,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -399,29 +393,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -459,8 +437,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -471,14 +447,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -677,7 +647,6 @@ ctags CTAGS:
 
 cscope cscopelist:
 
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/hw/xwin/man/XWin.man b/hw/xwin/man/XWin.man
index 2081ea1..8d4af41 100644
--- a/hw/xwin/man/XWin.man
+++ b/hw/xwin/man/XWin.man
@@ -51,11 +51,6 @@ Also start the integrated \fIWindows\fP-based window manager.
 Run the server in rootless mode.
 The X server works on a window covering the whole screen but the root window
 is hidden from view.
-.TP 8
-.B \-mwextwm
-Experimental.
-The mode combines \fB\-rootless\fP mode drawing with native \fIWindows\fP
-window frames managed by the experimental external window manager \fIxwinwm\fP.
 .PP
 \fBNOTE:\fP \fI-multiwindow\fP mode uses its own internal window manager.
 All other modes require an external window manager in order to move, resize, and perform other
@@ -71,7 +66,7 @@ Screen specific parameters can be applied as a
 default to all screens by placing those screen specific parameters
 before any \fB\-screen\fP parameter.  Screen specific parameters placed after
 the first \fB\-screen\fP parameter will apply only to the immediately
-preceeding \fB\-screen\fP parameter.
+preceding \fB\-screen\fP parameter.
 .TP 8
 .B \-[no]multimonitors or \-[no]multiplemonitors
 Create a screen 0 that covers all monitors [the primary monitor] on a system with
@@ -84,7 +79,7 @@ This option is currently enabled by default in \fB\-multiwindow\fP mode.
 .B "\-screen \fIscreen_number\fP [\fIW\fP \fIH\fP [\fIX\fP \fIY\fP] | [[\fIW\fPx\fIH\fP[+\fIX\fP+\fIY\fP]][@\fIM\fP]] ] "
 Create screen number
 .I screen_number
-and optionally specify it's
+and optionally specify its
 .I height,
 .I width
 and
@@ -113,6 +108,10 @@ The X server window takes the full screen, covering completely the
 \fIWindows\fP desktop.
 Currently \fB\-fullscreen\fP may only be applied to one X screen.
 .TP 8
+.B "\-icon" \fIicon-specifier\fP
+Override the window icon for the screen window from the default.
+The \fIicon-specifier\fP is as defined in \fIXWinrc(@filemansuffix@)\fP.
+.TP 8
 .B \-nodecoration
 Do not give the Cygwin/X window a \fIWindows\fP window border, title bar,
 etc.
@@ -175,6 +174,21 @@ on its own is equivalent to \fB\-resize=randr\fP
 Add the host name to the window title for X applications which are running
 on remote hosts, when that information is available and it's useful to do so.
 The default is enabled.
+.TP 8
+.B \-[no]compositewm
+Use Composite extension redirection to maintain a bitmap image of each top-level
+X window, so window contents which are occluded show correctly in task bar and
+task switcher previews.
+The default is enabled.
+.TP 8
+.B \-[no]compositealpha
+X windows with per-pixel alpha are composited into the \fIWindows\fP desktop
+(i.e. a \fIWindows\fP window can be seen through any transparency in an X window
+placed over it).
+
+This option has no effect on Windows 8 and 8.1.
+This option has no effect if \fB-compositewm\fP is disabled.
+The default is disabled.
 
 .SH OPTIONS CONTROLLING WINDOWS INTEGRATION
 .TP 8
@@ -211,6 +225,7 @@ The default is enabled.
 .TP 8
 .B \-swcursor
 Disable the usage of the \fIWindows\fP cursor and use the X11 software cursor instead.
+This option is ignored if \fB-compositewm\fP is also enabled.
 .TP 8
 .B \-[no]trayicon
 Do not create a tray icon.  Default is to create one
@@ -218,9 +233,6 @@ icon per screen.  You can globally disable tray icons with
 \fB\-notrayicon\fP, then enable it for specific screens with
 \fB\-trayicon\fP for those screens.
 .TP 8
-.B \-nounicodeclipboard
-Do not use Unicode clipboard even if on a NT-based platform.
-.TP 8
 .B \-[no]unixkill
 Enable or disable the \fICtrl-Alt-Backspace\fP key combination as a
 signal to exit the X Server.  The \fICtrl-Alt-Backspace\fP key combination
diff --git a/hw/xwin/man/XWinrc.man b/hw/xwin/man/XWinrc.man
index 0cc2d9d..3c1ed06 100644
--- a/hw/xwin/man/XWinrc.man
+++ b/hw/xwin/man/XWinrc.man
@@ -134,31 +134,34 @@ such items should be included at the start or at the end of the menu.
 
 
 .SH Icon Instructions
-When specifying an \fIicon-file\fP in the following commands several different formats are allowed:
-.br
-\fB"NAME.ICO"\fP\fI of an .ico format file\fP
-.br
-\t \t ("cygwin.ico", "apple.ico")
-.br
-\fB"NAME.DLL,nn"\fP\fI of a .DLL and icon index\fP
+When specifying an \fIicon-specifier\fP in the following commands several different formats are allowed:
+.PP
+.IP \fI"NAME.ICO"\fP 16
+filename of an .ico format file
 .br
-\t \t ("c:\\windows\\system32\\shell32.dll,4" is the default folder icon)
+(e.g. "cygwin.ico", "apple.ico", "C:\\icons\\cheese.ico", "/usr/share/icons/moon.ico")
+.IP \fI"NAME.DLL,nnn"\fP 16
+filename of a DLL with an index into its ICON resources
 .br
-\fB",nnn"\fP\fI index into XWin.EXE internal ICON resources\fP
+(e.g. "c:\\windows\\system32\\shell32.dll,4", the default folder icon,
+      "/usr/bin/cygicons-0.dll,10", the hippo icon)
+.IP \fI",nnn"\fP 16
+index into the XWin executable's internal ICON resources
 .br
-\t \t (",101" is the 1st icon inside \fIXWin.EXE\fP)
+(e.g. ",101" is the 1st icon in \fIXWin\fP)
 .TP 8
 .B ICONDIRECTORY \fIWindows-path-to-icon-directory\fP
-Defines the default directory to search for \ficon-file\fP files.
+Defines the default directory for the file when an \fIicon-specifier\fP doesn't
+contain an absolute path.
 It should be a \fIWindows\fP style path (e.g. C:\\cygwin\\usr\\local\\icons).
 .TP 8
-.B DEFAULTICON \fIicon-file\fP
+.B DEFAULTICON \fIicon-specifier\fP
 Defines a replacement for the standard X icon for applications without
 specified icons.
 .TP 8
 .B ICONS {
 .br
- \fIclass-or-name-of-window\fP \fIicon-file\fP
+ \fIclass-or-name-of-window\fP \fIicon-specifier\fP
 .br
   \fI...\fP
 .br
diff --git a/hw/xwin/meson.build b/hw/xwin/meson.build
index 7e1375c..e9940cc 100644
--- a/hw/xwin/meson.build
+++ b/hw/xwin/meson.build
@@ -24,6 +24,8 @@ srcs_windows = [
 ]
 subdir('winclipboard')
 
+xwin_glx = []
+xwin_windowsdri = []
 if build_glx
     if build_windowsdri
         xwin_c_args += '-DXWIN_WINDOWS_DRI'
@@ -42,7 +44,7 @@ srcs_windows += [
      'propertystore.h',
      'winSetAppUserModelID.c',
 ]
-xwin_sys_libs += ['-lshlwapi', '-lole32']
+xwin_sys_libs += ['-lshlwapi', '-lole32', '-ldwmapi']
 
 srcs_windows += [
      'winrandr.c',
@@ -102,6 +104,7 @@ srcs_windows += [
     'windisplay.c',
     'windisplay.h',
     '../../mi/miinitext.c',
+    '../../mi/miinitext.h',
 ]
 
 rsrc = windows.compile_resources('XWin.rc', include_directories: include_directories('../../include/'))
@@ -130,17 +133,17 @@ srcs_windows += pfiles
 
 xwin_dep = [
     common_dep,
-    dependency('x11-xcb'),
     dependency('xcb-aux'),
     dependency('xcb-image'),
     dependency('xcb-ewmh'),
     dependency('xcb-icccm'),
+    dependency('xcb-composite'),
 ]
 
 executable(
     server_name,
     srcs_windows,
-    include_directories: [inc, top_srcdir_inc],
+    include_directories: [inc, top_dir_inc],
     dependencies: xwin_dep,
     link_with: [
         xwin_windowsdri,
diff --git a/hw/xwin/system.XWinrc b/hw/xwin/system.XWinrc
index f0771c6..fb44be3 100644
--- a/hw/xwin/system.XWinrc
+++ b/hw/xwin/system.XWinrc
@@ -8,10 +8,6 @@
 
 # Comments begin with "#" or "//" and go to the end-of-line
 
-# Paths to commands are **cygwin** based (i.e. /usr/local/bin/xcalc)
-
-# Paths to icons are **WINDOWS** based (i.e. c:\windows\icons)
-
 # Menus are defined as...
 # MENU <name> {
 #	<Menu Text>	EXEC	<command>
@@ -55,15 +51,15 @@
 
 # To define where ICO files live (** Windows path**)
 # ICONDIRECTORY	<windows-path i.e. c:\cygwin\usr\icons>
-# NOTE: If you specify a fully qualified path to an ICON below
-#             (i.e. "c:\xxx" or "d:\xxxx")
+# NOTE: If you specify an absolute path in Windows or Cygwin format to an ICON below
+#             (i.e. "c:\icons\xxx.ico" or "/usr/share/icons/xxx.ico")
 #       this ICONDIRECTORY will not be prepended
 
 # To change the taskbar icon use...
-# TRAYICON       <name-of-windows-ico-file-in-icondirectory>
+# TRAYICON       <icon-specifier>
 
 # To define a replacement for the standard X icon for apps w/o specified icons
-# DEFAULTICON	<name-of-windows-ico-file-in-icondirectory>
+# DEFAULTICON	<icon-specifier>
 
 # To define substitute icons on a per-window basis use...
 # ICONS {
diff --git a/hw/xwin/win.h b/hw/xwin/win.h
index dda2cb5..48795a8 100644
--- a/hw/xwin/win.h
+++ b/hw/xwin/win.h
@@ -163,9 +163,6 @@
 #include "miline.h"
 #include "shadow.h"
 #include "fb.h"
-#ifdef XWIN_MULTIWINDOWEXTWM
-#include "rootless.h"
-#endif
 
 #include "mipict.h"
 #include "picturestr.h"
@@ -271,6 +268,8 @@ typedef Bool (*winFinishScreenInitProcPtr) (int, ScreenPtr, int, char **);
 
 typedef Bool (*winBltExposedRegionsProcPtr) (ScreenPtr);
 
+typedef Bool (*winBltExposedWindowRegionProcPtr) (ScreenPtr, WindowPtr);
+
 typedef Bool (*winActivateAppProcPtr) (ScreenPtr);
 
 typedef Bool (*winRedrawScreenProcPtr) (ScreenPtr pScreen);
@@ -297,11 +296,10 @@ typedef Bool (*winCreateScreenResourcesProc) (ScreenPtr);
  */
 
 typedef struct {
-    HDC hdcSelected;
     HBITMAP hBitmap;
-    BYTE *pbBits;
-    DWORD dwScanlineBytes;
+    void *pbBits;
     BITMAPINFOHEADER *pbmih;
+    BOOL owned;
 } winPrivPixmapRec, *winPrivPixmapPtr;
 
 /*
@@ -390,11 +388,9 @@ typedef struct {
 #endif
     Bool fFullScreen;
     Bool fDecoration;
-#ifdef XWIN_MULTIWINDOWEXTWM
-    Bool fMWExtWM;
-#endif
     Bool fRootless;
     Bool fMultiWindow;
+    Bool fCompositeWM;
     Bool fMultiMonitorOverride;
     Bool fMultipleMonitors;
     Bool fLessPointer;
@@ -408,6 +404,10 @@ typedef struct {
 
     /* Did the user explicitly set this screen? */
     Bool fExplicitScreen;
+
+    /* Icons for screen window */
+    HICON hIcon;
+    HICON hIconSm;
 } winScreenInfo, *winScreenInfoPtr;
 
 /*
@@ -464,21 +464,13 @@ typedef struct _winPrivScreenRec {
     LPDIRECTDRAWCLIPPER pddcPrimary;
     BOOL fRetryCreateSurface;
 
-#ifdef XWIN_MULTIWINDOWEXTWM
-    /* Privates used by multi-window external window manager */
-    RootlessFrameID widTop;
-    Bool fRestacking;
-#endif
-
     /* Privates used by multi-window */
     pthread_t ptWMProc;
     pthread_t ptXMsgProc;
     void *pWMInfo;
-
-    /* Privates used by both multi-window and rootless */
     Bool fRootWindowShown;
 
-    /* Privates used for any module running in a seperate thread */
+    /* Privates used for any module running in a separate thread */
     pthread_mutex_t pmServerStarted;
     Bool fServerStarted;
 
@@ -493,6 +485,7 @@ typedef struct _winPrivScreenRec {
     winCreateBoundingWindowProcPtr pwinCreateBoundingWindow;
     winFinishScreenInitProcPtr pwinFinishScreenInit;
     winBltExposedRegionsProcPtr pwinBltExposedRegions;
+    winBltExposedWindowRegionProcPtr pwinBltExposedWindowRegion;
     winActivateAppProcPtr pwinActivateApp;
     winRedrawScreenProcPtr pwinRedrawScreen;
     winRealizeInstalledPaletteProcPtr pwinRealizeInstalledPalette;
@@ -521,30 +514,13 @@ typedef struct _winPrivScreenRec {
     ResizeWindowProcPtr ResizeWindow;
     MoveWindowProcPtr MoveWindow;
     SetShapeProcPtr SetShape;
+    ModifyPixmapHeaderProcPtr ModifyPixmapHeader;
 
     winCursorRec cursor;
 
     Bool fNativeGlActive;
 } winPrivScreenRec;
 
-#ifdef XWIN_MULTIWINDOWEXTWM
-typedef struct {
-    RootlessWindowPtr pFrame;
-    HWND hWnd;
-    int dwWidthBytes;
-    BITMAPINFOHEADER *pbmihShadow;
-    HBITMAP hbmpShadow;
-    HDC hdcShadow;
-    HDC hdcScreen;
-    BOOL fResized;
-    BOOL fRestackingNow;
-    BOOL fClose;
-    BOOL fMovingOrSizing;
-    BOOL fDestroyed;            //for debug
-    char *pfb;
-} win32RootlessWindowRec, *win32RootlessWindowPtr;
-#endif
-
 typedef struct {
     void *value;
     XID id;
@@ -693,14 +669,6 @@ Bool
 Bool
  winAllocateCmapPrivates(ColormapPtr pCmap);
 
-/*
- * winauth.c
- */
-
-Bool
- winGenerateAuthorization(void);
-void winSetAuthorization(void);
-
 /*
  * winblock.c
  */
@@ -974,6 +942,19 @@ void
 winCopyWindowMultiWindow(WindowPtr pWin, DDXPointRec oldpt,
                          RegionPtr oldRegion);
 
+PixmapPtr
+winCreatePixmapMultiwindow(ScreenPtr pScreen, int width, int height, int depth,
+                           unsigned usage_hint);
+Bool
+winDestroyPixmapMultiwindow(PixmapPtr pPixmap);
+
+Bool
+winModifyPixmapHeaderMultiwindow(PixmapPtr pPixmap,
+                                 int width,
+                                 int height,
+                                 int depth,
+                                 int bitsPerPixel, int devKind, void *pPixData);
+
 XID
  winGetWindowID(WindowPtr pWin);
 
@@ -1009,105 +990,6 @@ winHandleIconMessage(HWND hwnd, UINT message,
 LRESULT CALLBACK
 winWindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
 
-#ifdef XWIN_MULTIWINDOWEXTWM
-/*
- * winwin32rootless.c
- */
-
-Bool
-
-winMWExtWMCreateFrame(RootlessWindowPtr pFrame, ScreenPtr pScreen,
-                      int newX, int newY, RegionPtr pShape);
-
-void
- winMWExtWMDestroyFrame(RootlessFrameID wid);
-
-void
-
-winMWExtWMMoveFrame(RootlessFrameID wid, ScreenPtr pScreen, int newX, int newY);
-
-void
-
-winMWExtWMResizeFrame(RootlessFrameID wid, ScreenPtr pScreen,
-                      int newX, int newY, unsigned int newW, unsigned int newH,
-                      unsigned int gravity);
-
-void
- winMWExtWMRestackFrame(RootlessFrameID wid, RootlessFrameID nextWid);
-
-void
- winMWExtWMReshapeFrame(RootlessFrameID wid, RegionPtr pShape);
-
-void
- winMWExtWMUnmapFrame(RootlessFrameID wid);
-
-void
-
-winMWExtWMStartDrawing(RootlessFrameID wid, char **pixelData, int *bytesPerRow);
-
-void
- winMWExtWMStopDrawing(RootlessFrameID wid, Bool flush);
-
-void
- winMWExtWMUpdateRegion(RootlessFrameID wid, RegionPtr pDamage);
-
-void
-
-winMWExtWMDamageRects(RootlessFrameID wid, int count, const BoxRec * rects,
-                      int shift_x, int shift_y);
-
-void
- winMWExtWMRootlessSwitchWindow(RootlessWindowPtr pFrame, WindowPtr oldWin);
-
-void
-
-winMWExtWMCopyBytes(unsigned int width, unsigned int height,
-                    const void *src, unsigned int srcRowBytes,
-                    void *dst, unsigned int dstRowBytes);
-
-void
-
-winMWExtWMCopyWindow(RootlessFrameID wid, int dstNrects,
-                     const BoxRec * dstRects, int dx, int dy);
-#endif
-
-#ifdef XWIN_MULTIWINDOWEXTWM
-/*
- * winwin32rootlesswindow.c
- */
-
-void
- winMWExtWMReorderWindows(ScreenPtr pScreen);
-
-void
- winMWExtWMMoveXWindow(WindowPtr pWin, int x, int y);
-
-void
- winMWExtWMResizeXWindow(WindowPtr pWin, int w, int h);
-
-void
- winMWExtWMMoveResizeXWindow(WindowPtr pWin, int x, int y, int w, int h);
-
-void
-
-winMWExtWMUpdateWindowDecoration(win32RootlessWindowPtr pRLWinPriv,
-                                 winScreenInfoPtr pScreenInfo);
-
-wBOOL CALLBACK winMWExtWMDecorateWindow(HWND hwnd, LPARAM lParam);
-
-void
- winMWExtWMRestackWindows(ScreenPtr pScreen);
-#endif
-
-#ifdef XWIN_MULTIWINDOWEXTWM
-/*
- * winwin32rootlesswndproc.c
- */
-
-LRESULT CALLBACK
-winMWExtWMWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
-#endif
-
 /*
  * winwindowswm.c
  */
diff --git a/hw/xwin/winallpriv.c b/hw/xwin/winallpriv.c
index e25e6bd..818805c 100644
--- a/hw/xwin/winallpriv.c
+++ b/hw/xwin/winallpriv.c
@@ -67,7 +67,7 @@ winAllocatePrivates(ScreenPtr pScreen)
     /* Initialize the memory of the private structure */
     ZeroMemory(pScreenPriv, sizeof(winPrivScreenRec));
 
-    /* Intialize private structure members */
+    /* Initialize private structure members */
     pScreenPriv->fActive = TRUE;
 
     /* Register our screen private */
diff --git a/hw/xwin/winauth.c b/hw/xwin/winauth.c
index 1427839..4e1b26d 100644
--- a/hw/xwin/winauth.c
+++ b/hw/xwin/winauth.c
@@ -32,7 +32,8 @@
 #include <xwin-config.h>
 #endif
 
-#include "win.h"
+#include "winauth.h"
+#include "winmsg.h"
 
 /* Includes for authorization */
 #include "securitysrv.h"
@@ -40,14 +41,6 @@
 
 #include <xcb/xcb.h>
 
-/* Need to get this from Xlib.h */
-extern void XSetAuthorization(
-    const char *                /* name */,
-    int                         /* namelen */,
-    const char *                /* data */,
-    int                         /* datalen */
-);
-
 /*
  * Constants
  */
@@ -68,9 +61,7 @@ static xcb_auth_info_t auth_info;
  */
 
 #ifndef XCSECURITY
-
-static
-    XID
+static XID
 GenerateAuthorization(unsigned name_length,
                       const char *name,
                       unsigned data_length,
@@ -86,10 +77,12 @@ GenerateAuthorization(unsigned name_length,
  * Generate authorization cookie for internal server clients
  */
 
-Bool
+BOOL
 winGenerateAuthorization(void)
 {
+#ifdef XCSECURITY
     SecurityAuthorizationPtr pAuth = NULL;
+#endif
 
     /* Call OS layer to generate authorization key */
     g_authId = GenerateAuthorization(strlen(AUTH_NAME),
@@ -106,7 +99,7 @@ winGenerateAuthorization(void)
                  g_uiAuthDataLen, g_pAuthData);
     }
 
-    auth_info.name = AUTH_NAME;
+    auth_info.name = strdup(AUTH_NAME);
     auth_info.namelen = strlen(AUTH_NAME);
     auth_info.data = g_pAuthData;
     auth_info.datalen = g_uiAuthDataLen;
@@ -141,14 +134,6 @@ winGenerateAuthorization(void)
     return TRUE;
 }
 
-/* Use our generated cookie for authentication */
-void
-winSetAuthorization(void)
-{
-    XSetAuthorization(AUTH_NAME,
-                      strlen(AUTH_NAME), g_pAuthData, g_uiAuthDataLen);
-}
-
 xcb_auth_info_t *
 winGetXcbAuthInfo(void)
 {
diff --git a/hw/xwin/winclipboard/Makefile.am b/hw/xwin/winclipboard/Makefile.am
index a1079ae..bfd3024 100644
--- a/hw/xwin/winclipboard/Makefile.am
+++ b/hw/xwin/winclipboard/Makefile.am
@@ -1,6 +1,7 @@
 noinst_LTLIBRARIES = libXWinclipboard.la
 
 libXWinclipboard_la_SOURCES = \
+	internal.h \
 	winclipboard.h \
 	textconv.c \
 	thread.c \
diff --git a/hw/xwin/winclipboard/Makefile.in b/hw/xwin/winclipboard/Makefile.in
index a66dee8..7e3e9c4 100644
--- a/hw/xwin/winclipboard/Makefile.in
+++ b/hw/xwin/winclipboard/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -108,7 +108,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -228,8 +227,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \
 	$(top_srcdir)/manpages.am
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -250,8 +247,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -265,6 +260,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -283,14 +280,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -307,8 +296,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -364,6 +355,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -447,7 +440,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -471,29 +463,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -531,8 +507,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -543,14 +517,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -625,6 +593,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 noinst_LTLIBRARIES = libXWinclipboard.la
 libXWinclipboard_la_SOURCES = \
+	internal.h \
 	winclipboard.h \
 	textconv.c \
 	thread.c \
@@ -973,7 +942,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/hw/xwin/winclipboard/internal.h b/hw/xwin/winclipboard/internal.h
new file mode 100644
index 0000000..368fa70
--- /dev/null
+++ b/hw/xwin/winclipboard/internal.h
@@ -0,0 +1,119 @@
+/*
+ *Copyright (C) 2003-2004 Harold L Hunt II All Rights Reserved.
+ *
+ *Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ *"Software"), to deal in the Software without restriction, including
+ *without limitation the rights to use, copy, modify, merge, publish,
+ *distribute, sublicense, and/or sell copies of the Software, and to
+ *permit persons to whom the Software is furnished to do so, subject to
+ *the following conditions:
+ *
+ *The above copyright notice and this permission notice shall be
+ *included in all copies or substantial portions of the Software.
+ *
+ *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ *MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *NONINFRINGEMENT. IN NO EVENT SHALL HAROLD L HUNT II BE LIABLE FOR
+ *ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ *CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ *WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ *Except as contained in this notice, the name of Harold L Hunt II
+ *shall not be used in advertising or otherwise to promote the sale, use
+ *or other dealings in this Software without prior written authorization
+ *from Harold L Hunt II.
+ *
+ * Authors:	Harold L Hunt II
+ */
+
+#ifndef WINCLIPBOARD_INTERNAL_H
+#define WINCLIPBOARD_INTERNAL_H
+
+#include <xcb/xproto.h>
+#include <X11/Xfuncproto.h> // for _X_ATTRIBUTE_PRINTF
+#include <X11/Xmd.h> // for BOOL
+
+/* Windows headers */
+#include <X11/Xwindows.h>
+
+#define WIN_XEVENTS_SUCCESS			0  // more like 'CONTINUE'
+#define WIN_XEVENTS_FAILED			1
+#define WIN_XEVENTS_NOTIFY_DATA			3
+#define WIN_XEVENTS_NOTIFY_TARGETS		4
+
+#define WM_WM_QUIT                             (WM_USER + 2)
+
+#define ARRAY_SIZE(a)  (sizeof((a)) / sizeof((a)[0]))
+
+/*
+ * References to external symbols
+ */
+
+extern void winDebug(const char *format, ...) _X_ATTRIBUTE_PRINTF(1, 2);
+extern void ErrorF(const char *format, ...) _X_ATTRIBUTE_PRINTF(1, 2);
+
+/*
+ * winclipboardtextconv.c
+ */
+
+void
+ winClipboardDOStoUNIX(char *pszData, int iLength);
+
+void
+ winClipboardUNIXtoDOS(char **ppszData, int iLength);
+
+/*
+ * winclipboardthread.c
+ */
+
+typedef struct
+{
+    xcb_atom_t atomClipboard;
+    xcb_atom_t atomLocalProperty;
+    xcb_atom_t atomUTF8String;
+    xcb_atom_t atomCompoundText;
+    xcb_atom_t atomTargets;
+    xcb_atom_t atomIncr;
+} ClipboardAtoms;
+
+/*
+ * winclipboardwndproc.c
+ */
+
+BOOL winClipboardFlushWindowsMessageQueue(HWND hwnd);
+
+LRESULT CALLBACK
+winClipboardWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
+
+typedef struct
+{
+  xcb_connection_t *pClipboardDisplay;
+  xcb_window_t iClipboardWindow;
+  ClipboardAtoms *atoms;
+} ClipboardWindowCreationParams;
+
+/*
+ * winclipboardxevents.c
+ */
+
+typedef struct
+{
+  xcb_atom_t *targetList;
+  unsigned char *incr;
+  unsigned long int incrsize;
+} ClipboardConversionData;
+
+int
+winClipboardFlushXEvents(HWND hwnd,
+                         xcb_window_t iWindow, xcb_connection_t * pDisplay,
+                         ClipboardConversionData *data, ClipboardAtoms *atoms);
+
+xcb_atom_t
+winClipboardGetLastOwnedSelectionAtom(ClipboardAtoms *atoms);
+
+void
+winClipboardInitMonitoredSelections(void);
+
+#endif
diff --git a/hw/xwin/winclipboard/meson.build b/hw/xwin/winclipboard/meson.build
index 0395eb3..2a46c67 100644
--- a/hw/xwin/winclipboard/meson.build
+++ b/hw/xwin/winclipboard/meson.build
@@ -12,8 +12,11 @@ xwin_clipboard = static_library(
     include_directories: inc,
     c_args: '-DHAVE_XWIN_CONFIG_H',
     dependencies: [
-        dependency('x11'),
-        dependency('xfixes'),
+        dependency('xcb'),
+        dependency('xcb-aux'),
+        dependency('xcb-icccm'),
+        dependency('xcb-xfixes'),
+        socket_dep,
     ],
 )
 
@@ -27,7 +30,6 @@ executable(
     srcs_xwinclip,
     link_with: xwin_clipboard,
     link_args: ['-lgdi32', '-lpthread'],
-    dependencies: [dependency('x11')],
     install: true,
 )
 
diff --git a/hw/xwin/winclipboard/textconv.c b/hw/xwin/winclipboard/textconv.c
index 9c9cb35..651ccc6 100644
--- a/hw/xwin/winclipboard/textconv.c
+++ b/hw/xwin/winclipboard/textconv.c
@@ -32,15 +32,6 @@
 #include <xwin-config.h>
 #endif
 
-/*
- * Including any server header might define the macro _XSERVER64 on 64 bit machines.
- * That macro must _NOT_ be defined for Xlib client code, otherwise bad things happen.
- * So let's undef that macro if necessary.
- */
-#ifdef _XSERVER64
-#undef _XSERVER64
-#endif
-
 #include <stdlib.h>
 #include "internal.h"
 
diff --git a/hw/xwin/winclipboard/thread.c b/hw/xwin/winclipboard/thread.c
index fa57ada..0e60c1b 100644
--- a/hw/xwin/winclipboard/thread.c
+++ b/hw/xwin/winclipboard/thread.c
@@ -36,19 +36,9 @@
 #define HAS_WINSOCK 1
 #endif
 
-/*
- * Including any server header might define the macro _XSERVER64 on 64 bit machines.
- * That macro must _NOT_ be defined for Xlib client code, otherwise bad things happen.
- * So let's undef that macro if necessary.
- */
-#ifdef _XSERVER64
-#undef _XSERVER64
-#endif
-
 #include <assert.h>
 #include <unistd.h>
 #include <fcntl.h>
-#include <setjmp.h>
 #include <pthread.h>
 #include <sys/param.h> // for MAX() macro
 
@@ -58,8 +48,11 @@
 #include <errno.h>
 #endif
 
-#include <X11/Xatom.h>
-#include <X11/extensions/Xfixes.h>
+#include <xcb/xcb.h>
+#include <xcb/xcb_aux.h>
+#include <xcb/xcb_icccm.h>
+#include <xcb/xfixes.h>
+
 #include "winclipboard.h"
 #include "internal.h"
 
@@ -77,29 +70,32 @@
  */
 
 static HWND g_hwndClipboard = NULL;
-static jmp_buf g_jmpEntry;
-static XIOErrorHandler g_winClipboardOldIOErrorHandler;
-static pthread_t g_winClipboardProcThread;
 
 int xfixes_event_base;
 int xfixes_error_base;
 
-Bool g_fHasModernClipboardApi = FALSE;
-ADDCLIPBOARDFORMATLISTENERPROC g_fpAddClipboardFormatListener;
-REMOVECLIPBOARDFORMATLISTENERPROC g_fpRemoveClipboardFormatListener;
-
 /*
  * Local function prototypes
  */
 
 static HWND
-winClipboardCreateMessagingWindow(Display *pDisplay, Window iWindow, ClipboardAtoms *atoms);
-
-static int
- winClipboardErrorHandler(Display * pDisplay, XErrorEvent * pErr);
+winClipboardCreateMessagingWindow(xcb_connection_t *conn, xcb_window_t iWindow, ClipboardAtoms *atoms);
 
-static int
- winClipboardIOErrorHandler(Display * pDisplay);
+static xcb_atom_t
+intern_atom(xcb_connection_t *conn, const char *atomName)
+{
+  xcb_intern_atom_reply_t *atom_reply;
+  xcb_intern_atom_cookie_t atom_cookie;
+  xcb_atom_t atom = XCB_ATOM_NONE;
+
+  atom_cookie = xcb_intern_atom(conn, 0, strlen(atomName), atomName);
+  atom_reply = xcb_intern_atom_reply(conn, atom_cookie, NULL);
+  if (atom_reply) {
+    atom = atom_reply->atom;
+    free(atom_reply);
+  }
+  return atom;
+}
 
 /*
  * Create X11 and Win32 messaging windows, and run message processing loop
@@ -107,14 +103,13 @@ static int
  * returns TRUE if shutdown was signalled to loop, FALSE if some error occurred
  */
 
-Bool
-winClipboardProc(Bool fUseUnicode, char *szDisplay)
+BOOL
+winClipboardProc(char *szDisplay, xcb_auth_info_t *auth_info)
 {
     ClipboardAtoms atoms;
     int iReturn;
     HWND hwnd = NULL;
     int iConnectionNumber = 0;
-
 #ifdef HAS_DEVWINDOWS
     int fdMessageQueue = 0;
 #else
@@ -122,59 +117,27 @@ winClipboardProc(Bool fUseUnicode, char *szDisplay)
 #endif
     fd_set fdsRead;
     int iMaxDescriptor;
-    Display *pDisplay = NULL;
-    Window iWindow = None;
+    xcb_connection_t *conn;
+    xcb_window_t iWindow = XCB_NONE;
     int iSelectError;
-    Bool fShutdown = FALSE;
-    static Bool fErrorHandlerSet = FALSE;
+    BOOL fShutdown = FALSE;
     ClipboardConversionData data;
+    int screen;
 
     winDebug("winClipboardProc - Hello\n");
 
-    /* Allow multiple threads to access Xlib */
-    if (XInitThreads() == 0) {
-        ErrorF("winClipboardProc - XInitThreads failed.\n");
-        goto winClipboardProc_Exit;
-    }
-
-    /* See if X supports the current locale */
-    if (XSupportsLocale() == False) {
-        ErrorF("winClipboardProc - Warning: Locale not supported by X.\n");
-    }
-
-    g_fpAddClipboardFormatListener = (ADDCLIPBOARDFORMATLISTENERPROC)GetProcAddress(GetModuleHandle("user32"),"AddClipboardFormatListener");
-    g_fpRemoveClipboardFormatListener = (REMOVECLIPBOARDFORMATLISTENERPROC)GetProcAddress(GetModuleHandle("user32"),"RemoveClipboardFormatListener");
-    g_fHasModernClipboardApi = g_fpAddClipboardFormatListener && g_fpRemoveClipboardFormatListener;
-    ErrorF("OS maintains clipboard viewer chain: %s\n", g_fHasModernClipboardApi ? "yes" : "no");
-
-    g_winClipboardProcThread = pthread_self();
-
-    /* Set error handler */
-    if (!fErrorHandlerSet) {
-      XSetErrorHandler(winClipboardErrorHandler);
-      g_winClipboardOldIOErrorHandler =
-         XSetIOErrorHandler(winClipboardIOErrorHandler);
-      fErrorHandlerSet = TRUE;
-    }
-
-    /* Set jump point for Error exits */
-    if (setjmp(g_jmpEntry)) {
-        ErrorF("winClipboardProc - setjmp returned for IO Error Handler.\n");
-        goto winClipboardProc_Done;
-    }
-
     /* Make sure that the display opened */
-    pDisplay = XOpenDisplay(szDisplay);
-    if (pDisplay == NULL) {
+    conn = xcb_connect_to_display_with_auth_info(szDisplay, auth_info, &screen);
+    if (xcb_connection_has_error(conn)) {
         ErrorF("winClipboardProc - Failed opening the display, giving up\n");
         goto winClipboardProc_Done;
     }
 
-    ErrorF("winClipboardProc - XOpenDisplay () returned and "
+    ErrorF("winClipboardProc - xcb_connect () returned and "
            "successfully opened the display.\n");
 
     /* Get our connection number */
-    iConnectionNumber = ConnectionNumber(pDisplay);
+    iConnectionNumber = xcb_get_file_descriptor(conn);
 
 #ifdef HAS_DEVWINDOWS
     /* Open a file descriptor for the windows message queue */
@@ -190,55 +153,75 @@ winClipboardProc(Bool fUseUnicode, char *szDisplay)
     iMaxDescriptor = iConnectionNumber + 1;
 #endif
 
-    if (!XFixesQueryExtension(pDisplay, &xfixes_event_base, &xfixes_error_base))
+    const xcb_query_extension_reply_t *xfixes_query;
+    xfixes_query = xcb_get_extension_data(conn, &xcb_xfixes_id);
+    if (!xfixes_query->present)
       ErrorF ("winClipboardProc - XFixes extension not present\n");
+    xfixes_event_base = xfixes_query->first_event;
+    xfixes_error_base = xfixes_query->first_error;
+    /* Must advise server of XFIXES version we require */
+    xcb_xfixes_query_version_unchecked(conn, 1, 0);
 
     /* Create atoms */
-    atoms.atomClipboard = XInternAtom(pDisplay, "CLIPBOARD", False);
-    atoms.atomLocalProperty = XInternAtom (pDisplay, "CYGX_CUT_BUFFER", False);
-    atoms.atomUTF8String = XInternAtom (pDisplay, "UTF8_STRING", False);
-    atoms.atomCompoundText = XInternAtom (pDisplay, "COMPOUND_TEXT", False);
-    atoms.atomTargets = XInternAtom (pDisplay, "TARGETS", False);
+    atoms.atomClipboard = intern_atom(conn, "CLIPBOARD");
+    atoms.atomLocalProperty = intern_atom(conn, "CYGX_CUT_BUFFER");
+    atoms.atomUTF8String = intern_atom(conn, "UTF8_STRING");
+    atoms.atomCompoundText = intern_atom(conn, "COMPOUND_TEXT");
+    atoms.atomTargets = intern_atom(conn, "TARGETS");
+    atoms.atomIncr = intern_atom(conn, "INCR");
+
+    xcb_screen_t *root_screen = xcb_aux_get_screen(conn, screen);
+    xcb_window_t root_window_id = root_screen->root;
 
     /* Create a messaging window */
-    iWindow = XCreateSimpleWindow(pDisplay,
-                                  DefaultRootWindow(pDisplay),
-                                  1, 1,
-                                  500, 500,
-                                  0,
-                                  BlackPixel(pDisplay, 0),
-                                  BlackPixel(pDisplay, 0));
-    if (iWindow == 0) {
+    iWindow = xcb_generate_id(conn);
+    xcb_void_cookie_t cookie = xcb_create_window_checked(conn,
+                                                         XCB_COPY_FROM_PARENT,
+                                                         iWindow,
+                                                         root_window_id,
+                                                         1, 1,
+                                                         500, 500,
+                                                         0,
+                                                         XCB_WINDOW_CLASS_INPUT_ONLY,
+                                                         XCB_COPY_FROM_PARENT,
+                                                         0,
+                                                         NULL);
+
+    xcb_generic_error_t *error;
+    if ((error = xcb_request_check(conn, cookie))) {
         ErrorF("winClipboardProc - Could not create an X window.\n");
+        free(error);
         goto winClipboardProc_Done;
     }
 
-    XStoreName(pDisplay, iWindow, "xwinclip");
+    xcb_icccm_set_wm_name(conn, iWindow, XCB_ATOM_STRING, 8, strlen("xwinclip"), "xwinclip");
 
     /* Select event types to watch */
-    if (XSelectInput(pDisplay, iWindow, PropertyChangeMask) == BadWindow)
-        ErrorF("winClipboardProc - XSelectInput generated BadWindow "
-               "on messaging window\n");
-
-    XFixesSelectSelectionInput (pDisplay,
-                                iWindow,
-                                XA_PRIMARY,
-                                XFixesSetSelectionOwnerNotifyMask |
-                                XFixesSelectionWindowDestroyNotifyMask |
-                                XFixesSelectionClientCloseNotifyMask);
+    const static uint32_t values[] = { XCB_EVENT_MASK_PROPERTY_CHANGE };
+    cookie = xcb_change_window_attributes_checked(conn, iWindow, XCB_CW_EVENT_MASK, values);
+    if ((error = xcb_request_check(conn, cookie))) {
+        ErrorF("winClipboardProc - Could not set event mask on messaging window\n");
+        free(error);
+    }
 
-    XFixesSelectSelectionInput (pDisplay,
-                                iWindow,
-                                atoms.atomClipboard,
-                                XFixesSetSelectionOwnerNotifyMask |
-                                XFixesSelectionWindowDestroyNotifyMask |
-                                XFixesSelectionClientCloseNotifyMask);
+    xcb_xfixes_select_selection_input(conn,
+                                      iWindow,
+                                      XCB_ATOM_PRIMARY,
+                                      XCB_XFIXES_SELECTION_EVENT_MASK_SET_SELECTION_OWNER |
+                                      XCB_XFIXES_SELECTION_EVENT_MASK_SELECTION_WINDOW_DESTROY |
+                                      XCB_XFIXES_SELECTION_EVENT_MASK_SELECTION_CLIENT_CLOSE);
 
+    xcb_xfixes_select_selection_input(conn,
+                                      iWindow,
+                                      atoms.atomClipboard,
+                                      XCB_XFIXES_SELECTION_EVENT_MASK_SET_SELECTION_OWNER |
+                                      XCB_XFIXES_SELECTION_EVENT_MASK_SELECTION_WINDOW_DESTROY |
+                                      XCB_XFIXES_SELECTION_EVENT_MASK_SELECTION_CLIENT_CLOSE);
 
     /* Initialize monitored selection state */
     winClipboardInitMonitoredSelections();
     /* Create Windows messaging window */
-    hwnd = winClipboardCreateMessagingWindow(pDisplay, iWindow, &atoms);
+    hwnd = winClipboardCreateMessagingWindow(conn, iWindow, &atoms);
 
     /* Save copy of HWND */
     g_hwndClipboard = hwnd;
@@ -246,32 +229,30 @@ winClipboardProc(Bool fUseUnicode, char *szDisplay)
     /* Assert ownership of selections if Win32 clipboard is owned */
     if (NULL != GetClipboardOwner()) {
         /* PRIMARY */
-        iReturn = XSetSelectionOwner(pDisplay, XA_PRIMARY,
-                                     iWindow, CurrentTime);
-        if (iReturn == BadAtom || iReturn == BadWindow ||
-            XGetSelectionOwner(pDisplay, XA_PRIMARY) != iWindow) {
+        cookie = xcb_set_selection_owner_checked(conn, iWindow, XCB_ATOM_PRIMARY, XCB_CURRENT_TIME);
+        if ((error = xcb_request_check(conn, cookie))) {
             ErrorF("winClipboardProc - Could not set PRIMARY owner\n");
+            free(error);
             goto winClipboardProc_Done;
         }
 
         /* CLIPBOARD */
-        iReturn = XSetSelectionOwner(pDisplay, atoms.atomClipboard,
-                                     iWindow, CurrentTime);
-        if (iReturn == BadAtom || iReturn == BadWindow ||
-            XGetSelectionOwner(pDisplay, atoms.atomClipboard) != iWindow) {
+        cookie = xcb_set_selection_owner_checked(conn, iWindow, atoms.atomClipboard, XCB_CURRENT_TIME);
+        if ((error = xcb_request_check(conn, cookie))) {
             ErrorF("winClipboardProc - Could not set CLIPBOARD owner\n");
+            free(error);
             goto winClipboardProc_Done;
         }
     }
 
-    data.fUseUnicode = fUseUnicode;
+    data.incr = NULL;
+    data.incrsize = 0;
 
     /* Loop for events */
     while (1) {
 
         /* Process X events */
-        winClipboardFlushXEvents(hwnd,
-                                 iWindow, pDisplay, &data, &atoms);
+        winClipboardFlushXEvents(hwnd, iWindow, conn, &data, &atoms);
 
         /* Process Windows messages */
         if (!winClipboardFlushWindowsMessageQueue(hwnd)) {
@@ -281,7 +262,7 @@ winClipboardProc(Bool fUseUnicode, char *szDisplay)
         }
 
         /* We need to ensure that all pending requests are sent */
-        XFlush(pDisplay);
+        xcb_flush(conn);
 
         /* Setup the file descriptor set */
         /*
@@ -353,7 +334,6 @@ winClipboardProc(Bool fUseUnicode, char *szDisplay)
 #endif
     }
 
- winClipboardProc_Exit:
     /* broke out of while loop on a shutdown message */
     fShutdown = TRUE;
 
@@ -364,12 +344,13 @@ winClipboardProc(Bool fUseUnicode, char *szDisplay)
     }
 
     /* Close our X window */
-    if (pDisplay && iWindow) {
-        iReturn = XDestroyWindow(pDisplay, iWindow);
-        if (iReturn == BadWindow)
-            ErrorF("winClipboardProc - XDestroyWindow returned BadWindow.\n");
+    if (!xcb_connection_has_error(conn) && iWindow) {
+        cookie = xcb_destroy_window_checked(conn, iWindow);
+        if ((error = xcb_request_check(conn, cookie)))
+            ErrorF("winClipboardProc - XDestroyWindow failed.\n");
         else
             ErrorF("winClipboardProc - XDestroyWindow succeeded.\n");
+        free(error);
     }
 
 #ifdef HAS_DEVWINDOWS
@@ -378,26 +359,15 @@ winClipboardProc(Bool fUseUnicode, char *szDisplay)
         close(fdMessageQueue);
 #endif
 
-#if 0
     /*
-     * FIXME: XCloseDisplay hangs if we call it
-     *
-     * XCloseDisplay() calls XSync(), so any outstanding errors are reported.
-     * If we are built into the server, this can deadlock if the server is
-     * in the process of exiting and waiting for this thread to exit.
+     * xcb_disconnect() does not sync, so is safe to call even when we are built
+     * into the server.  Unlike XCloseDisplay() there will be no deadlock if the
+     * server is in the process of exiting and waiting for this thread to exit.
      */
-
-    /* Discard any remaining events */
-    XSync(pDisplay, TRUE);
-
-    /* Select event types to watch */
-    XSelectInput(pDisplay, DefaultRootWindow(pDisplay), None);
-
-    /* Close our X display */
-    if (pDisplay) {
-        XCloseDisplay(pDisplay);
+    if (!xcb_connection_has_error(conn)) {
+        /* Close our X display */
+        xcb_disconnect(conn);
     }
-#endif
 
     /* global clipboard variable reset */
     g_hwndClipboard = NULL;
@@ -410,7 +380,7 @@ winClipboardProc(Bool fUseUnicode, char *szDisplay)
  */
 
 static HWND
-winClipboardCreateMessagingWindow(Display *pDisplay, Window iWindow, ClipboardAtoms *atoms)
+winClipboardCreateMessagingWindow(xcb_connection_t *conn, xcb_window_t iWindow, ClipboardAtoms *atoms)
 {
     WNDCLASSEX wc;
     ClipboardWindowCreationParams cwcp;
@@ -432,7 +402,7 @@ winClipboardCreateMessagingWindow(Display *pDisplay, Window iWindow, ClipboardAt
     RegisterClassEx(&wc);
 
     /* Information to be passed to WM_CREATE */
-    cwcp.pClipboardDisplay = pDisplay;
+    cwcp.pClipboardDisplay = conn;
     cwcp.iClipboardWindow = iWindow;
     cwcp.atoms = atoms;
 
@@ -460,42 +430,6 @@ winClipboardCreateMessagingWindow(Display *pDisplay, Window iWindow, ClipboardAt
     return hwnd;
 }
 
-/*
- * winClipboardErrorHandler - Our application specific error handler
- */
-
-static int
-winClipboardErrorHandler(Display * pDisplay, XErrorEvent * pErr)
-{
-    char pszErrorMsg[100];
-
-    XGetErrorText(pDisplay, pErr->error_code, pszErrorMsg, sizeof(pszErrorMsg));
-    ErrorF("winClipboardErrorHandler - ERROR: \n\t%s\n"
-           "\tSerial: %lu, Request Code: %d, Minor Code: %d\n",
-           pszErrorMsg, pErr->serial, pErr->request_code, pErr->minor_code);
-    return 0;
-}
-
-/*
- * winClipboardIOErrorHandler - Our application specific IO error handler
- */
-
-static int
-winClipboardIOErrorHandler(Display * pDisplay)
-{
-    ErrorF("winClipboardIOErrorHandler!\n");
-
-    if (pthread_equal(pthread_self(), g_winClipboardProcThread)) {
-        /* Restart at the main entry point */
-        longjmp(g_jmpEntry, 2);
-    }
-
-    if (g_winClipboardOldIOErrorHandler)
-        g_winClipboardOldIOErrorHandler(pDisplay);
-
-    return 0;
-}
-
 void
 winClipboardWindowDestroy(void)
 {
@@ -503,11 +437,3 @@ winClipboardWindowDestroy(void)
     SendMessage(g_hwndClipboard, WM_WM_QUIT, 0, 0);
   }
 }
-
-void
-winFixClipboardChain(void)
-{
-  if (g_hwndClipboard) {
-    PostMessage(g_hwndClipboard, WM_WM_REINIT, 0, 0);
-  }
-}
diff --git a/hw/xwin/winclipboard/winclipboard.h b/hw/xwin/winclipboard/winclipboard.h
index 9c5c568..243aa24 100644
--- a/hw/xwin/winclipboard/winclipboard.h
+++ b/hw/xwin/winclipboard/winclipboard.h
@@ -27,12 +27,15 @@
 #ifndef WINCLIPBOARD_H
 #define WINCLIPBOARD_H
 
-Bool winClipboardProc(Bool fUseUnicode, char *szDisplay);
+#include <xcb/xcb.h>
+#include <X11/Xmd.h> // for BOOL type
+
+BOOL winClipboardProc(char *szDisplay, xcb_auth_info_t *auth_info);
 
 void winFixClipboardChain(void);
 
 void winClipboardWindowDestroy(void);
 
-extern Bool fPrimarySelection;
+extern BOOL fPrimarySelection;
 
 #endif
diff --git a/hw/xwin/winclipboard/wndproc.c b/hw/xwin/winclipboard/wndproc.c
index c8d0064..63de4b9 100644
--- a/hw/xwin/winclipboard/wndproc.c
+++ b/hw/xwin/winclipboard/wndproc.c
@@ -30,24 +30,18 @@
  *              Colin Harrison
  */
 
+#define WINVER 0x0600
+
 #ifdef HAVE_XWIN_CONFIG_H
 #include <xwin-config.h>
 #endif
 
-/*
- * Including any server header might define the macro _XSERVER64 on 64 bit machines.
- * That macro must _NOT_ be defined for Xlib client code, otherwise bad things happen.
- * So let's undef that macro if necessary.
- */
-#ifdef _XSERVER64
-#undef _XSERVER64
-#endif
-
 #include <sys/types.h>
 #include <sys/time.h>
 #include <limits.h>
 
-#include <X11/Xatom.h>
+#include <xcb/xproto.h>
+#include <xcb/xcb_aux.h>
 
 #include "internal.h"
 #include "winclipboard.h"
@@ -58,28 +52,23 @@
 
 #define WIN_POLL_TIMEOUT	1
 
-#ifndef WM_CLIPBOARDUPDATE
-#define WM_CLIPBOARDUPDATE 0x031D
-#endif
-
 /*
  * Process X events up to specified timeout
  */
 
 static int
-winProcessXEventsTimeout(HWND hwnd, Window iWindow, Display * pDisplay,
+winProcessXEventsTimeout(HWND hwnd, xcb_window_t iWindow, xcb_connection_t *conn,
                          ClipboardConversionData *data, ClipboardAtoms *atoms, int iTimeoutSec)
 {
     int iConnNumber;
     struct timeval tv;
     int iReturn;
-    DWORD dwStopTime = GetTickCount() + iTimeoutSec * 1000;
 
-    winDebug("winProcessXEventsTimeout () - pumping X events for %d seconds\n",
+    winDebug("winProcessXEventsTimeout () - pumping X events, timeout %d seconds\n",
              iTimeoutSec);
 
     /* Get our connection number */
-    iConnNumber = ConnectionNumber(pDisplay);
+    iConnNumber = xcb_get_file_descriptor(conn);
 
     /* Loop for X events */
     while (1) {
@@ -87,7 +76,7 @@ winProcessXEventsTimeout(HWND hwnd, Window iWindow, Display * pDisplay,
         long remainingTime;
 
         /* Process X events */
-        iReturn = winClipboardFlushXEvents(hwnd, iWindow, pDisplay, data, atoms);
+        iReturn = winClipboardFlushXEvents(hwnd, iWindow, conn, data, atoms);
 
         winDebug("winProcessXEventsTimeout () - winClipboardFlushXEvents returned %d\n", iReturn);
 
@@ -97,18 +86,16 @@ winProcessXEventsTimeout(HWND hwnd, Window iWindow, Display * pDisplay,
         }
 
         /* We need to ensure that all pending requests are sent */
-        XFlush(pDisplay);
+        xcb_flush(conn);
 
         /* Setup the file descriptor set */
         FD_ZERO(&fdsRead);
         FD_SET(iConnNumber, &fdsRead);
 
         /* Adjust timeout */
-        remainingTime = dwStopTime - GetTickCount();
+        remainingTime = iTimeoutSec * 1000;
         tv.tv_sec = remainingTime / 1000;
         tv.tv_usec = (remainingTime % 1000) * 1000;
-        winDebug("winProcessXEventsTimeout () - %ld milliseconds left\n",
-                 remainingTime);
 
         /* Break out if no time left */
         if (remainingTime <= 0)
@@ -141,12 +128,10 @@ winProcessXEventsTimeout(HWND hwnd, Window iWindow, Display * pDisplay,
 LRESULT CALLBACK
 winClipboardWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
 {
-    static HWND s_hwndNextViewer;
-    static Bool s_fCBCInitialized;
-    static Display *pDisplay;
-    static Window iWindow;
+    static xcb_connection_t *conn;
+    static xcb_window_t iWindow;
     static ClipboardAtoms *atoms;
-    static Bool fRunning;
+    static BOOL fRunning;
 
     /* Branch on message type */
     switch (message) {
@@ -154,18 +139,8 @@ winClipboardWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
     {
         winDebug("winClipboardWindowProc - WM_DESTROY\n");
 
-        if (g_fHasModernClipboardApi)
-            {
-                /* Remove clipboard listener */
-                g_fpRemoveClipboardFormatListener(hwnd);
-            }
-        else
-            {
-                /* Remove ourselves from the clipboard chain */
-                ChangeClipboardChain(hwnd, s_hwndNextViewer);
-            }
-
-        s_hwndNextViewer = NULL;
+        /* Remove clipboard listener */
+        RemoveClipboardFormatListener(hwnd);
     }
         return 0;
 
@@ -183,143 +158,21 @@ winClipboardWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
 
         winDebug("winClipboardWindowProc - WM_CREATE\n");
 
-        pDisplay = cwcp->pClipboardDisplay;
+        conn = cwcp->pClipboardDisplay;
         iWindow = cwcp->iClipboardWindow;
         atoms = cwcp->atoms;
         fRunning = TRUE;
 
-        if (g_fHasModernClipboardApi)
-            {
-                g_fpAddClipboardFormatListener(hwnd);
-            }
-        else
-            {
-                HWND first, next;
-                DWORD error_code = 0;
-
-                first = GetClipboardViewer();   /* Get handle to first viewer in chain. */
-                if (first == hwnd)
-                    return 0;           /* Make sure it's not us! */
-                /* Add ourselves to the clipboard viewer chain */
-                next = SetClipboardViewer(hwnd);
-                error_code = GetLastError();
-                if (SUCCEEDED(error_code) && (next == first))   /* SetClipboardViewer must have succeeded, and the handle */
-                    s_hwndNextViewer = next;    /* it returned must have been the first window in the chain */
-                else
-                    s_fCBCInitialized = FALSE;
-            }
-    }
-        return 0;
-
-    case WM_CHANGECBCHAIN:
-    {
-        winDebug("winClipboardWindowProc - WM_CHANGECBCHAIN: wParam(%p) "
-                 "lParam(%p) s_hwndNextViewer(%p)\n",
-                 (HWND)wParam, (HWND)lParam, s_hwndNextViewer);
-
-        if ((HWND) wParam == s_hwndNextViewer) {
-            s_hwndNextViewer = (HWND) lParam;
-            if (s_hwndNextViewer == hwnd) {
-                s_hwndNextViewer = NULL;
-                ErrorF("winClipboardWindowProc - WM_CHANGECBCHAIN: "
-                       "attempted to set next window to ourselves.");
-            }
-        }
-        else if (s_hwndNextViewer)
-            SendMessage(s_hwndNextViewer, message, wParam, lParam);
-
+        AddClipboardFormatListener(hwnd);
     }
-        winDebug("winClipboardWindowProc - WM_CHANGECBCHAIN: Exit\n");
         return 0;
 
-    case WM_WM_REINIT:
-    {
-        /* Ensure that we're in the clipboard chain.  Some apps,
-         * WinXP's remote desktop for one, don't play nice with the
-         * chain.  This message is called whenever we receive a
-         * WM_ACTIVATEAPP message to ensure that we continue to
-         * receive clipboard messages.
-         *
-         * It might be possible to detect if we're still in the chain
-         * by calling SendMessage (GetClipboardViewer(),
-         * WM_DRAWCLIPBOARD, 0, 0); and then seeing if we get the
-         * WM_DRAWCLIPBOARD message.  That, however, might be more
-         * expensive than just putting ourselves back into the chain.
-         */
-
-        HWND first, next;
-        DWORD error_code = 0;
-
-        winDebug("winClipboardWindowProc - WM_WM_REINIT: Enter\n");
-
-        if (g_fHasModernClipboardApi)
-            {
-                return 0;
-            }
-
-        first = GetClipboardViewer();   /* Get handle to first viewer in chain. */
-        if (first == hwnd)
-            return 0;           /* Make sure it's not us! */
-        winDebug("  WM_WM_REINIT: Replacing us(%p) with %p at head "
-                 "of chain\n", hwnd, s_hwndNextViewer);
-        s_fCBCInitialized = FALSE;
-        ChangeClipboardChain(hwnd, s_hwndNextViewer);
-        s_hwndNextViewer = NULL;
-        s_fCBCInitialized = FALSE;
-        winDebug("  WM_WM_REINIT: Putting us back at head of chain.\n");
-        first = GetClipboardViewer();   /* Get handle to first viewer in chain. */
-        if (first == hwnd)
-            return 0;           /* Make sure it's not us! */
-        next = SetClipboardViewer(hwnd);
-        error_code = GetLastError();
-        if (SUCCEEDED(error_code) && (next == first))   /* SetClipboardViewer must have succeeded, and the handle */
-            s_hwndNextViewer = next;    /* it returned must have been the first window in the chain */
-        else
-            s_fCBCInitialized = FALSE;
-    }
-        winDebug("winClipboardWindowProc - WM_WM_REINIT: Exit\n");
-        return 0;
-
-    case WM_DRAWCLIPBOARD:
     case WM_CLIPBOARDUPDATE:
     {
-        static Bool s_fProcessingDrawClipboard = FALSE;
-        int iReturn;
+        xcb_generic_error_t *error;
+        xcb_void_cookie_t cookie_set;
 
-        if (message == WM_DRAWCLIPBOARD)
-            winDebug("winClipboardWindowProc - WM_DRAWCLIPBOARD: Enter\n");
-        else
-            winDebug("winClipboardWindowProc -  WM_CLIPBOARDUPDATE: Enter\n");
-
-        if (!g_fHasModernClipboardApi)
-            {
-                /*
-                 * We've occasionally seen a loop in the clipboard chain.
-                 * Try and fix it on the first hint of recursion.
-                 */
-                if (!s_fProcessingDrawClipboard) {
-                    s_fProcessingDrawClipboard = TRUE;
-                }
-                else {
-                    /* Attempt to break the nesting by getting out of the chain, twice?, and then fix and bail */
-                    s_fCBCInitialized = FALSE;
-                    ChangeClipboardChain(hwnd, s_hwndNextViewer);
-                    winFixClipboardChain();
-                    ErrorF("winClipboardWindowProc - WM_DRAWCLIPBOARD - "
-                           "Nested calls detected.  Re-initing.\n");
-                    winDebug("winClipboardWindowProc - WM_DRAWCLIPBOARD: Exit\n");
-                    s_fProcessingDrawClipboard = FALSE;
-                    return 0;
-                }
-
-                /* Bail on first message */
-                if (!s_fCBCInitialized) {
-                    s_fCBCInitialized = TRUE;
-                    s_fProcessingDrawClipboard = FALSE;
-                    winDebug("winClipboardWindowProc - WM_DRAWCLIPBOARD: Exit\n");
-                    return 0;
-                }
-            }
+        winDebug("winClipboardWindowProc - WM_CLIPBOARDUPDATE: Enter\n");
 
         /*
          * NOTE: We cannot bail out when NULL == GetClipboardOwner ()
@@ -332,12 +185,10 @@ winClipboardWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
         /* Bail when we still own the clipboard */
         if (hwnd == GetClipboardOwner()) {
 
-            winDebug("winClipboardWindowProc - WM_DRAWCLIPBOARD - "
+            winDebug("winClipboardWindowProc - WM_CLIPBOARDUPDATE - "
                      "We own the clipboard, returning.\n");
-            winDebug("winClipboardWindowProc - WM_DRAWCLIPBOARD: Exit\n");
-            s_fProcessingDrawClipboard = FALSE;
-            if (s_hwndNextViewer)
-                SendMessage(s_hwndNextViewer, message, wParam, lParam);
+            winDebug("winClipboardWindowProc - WM_CLIPBOARDUPDATE: Exit\n");
+
             return 0;
         }
 
@@ -353,7 +204,10 @@ winClipboardWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
         if (!IsClipboardFormatAvailable(CF_TEXT)
             && !IsClipboardFormatAvailable(CF_UNICODETEXT)) {
 
-            winDebug("winClipboardWindowProc - WM_DRAWCLIPBOARD - "
+            xcb_get_selection_owner_cookie_t cookie_get;
+            xcb_get_selection_owner_reply_t *reply;
+
+            winDebug("winClipboardWindowProc - WM_CLIPBOARDUPDATE - "
                      "Clipboard does not contain CF_TEXT nor "
                      "CF_UNICODETEXT.\n");
 
@@ -361,87 +215,78 @@ winClipboardWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
              * We need to make sure that the X Server has processed
              * previous XSetSelectionOwner messages.
              */
-            XSync(pDisplay, FALSE);
+            xcb_aux_sync(conn);
 
             winDebug("winClipboardWindowProc - XSync done.\n");
 
             /* Release PRIMARY selection if owned */
-            iReturn = XGetSelectionOwner(pDisplay, XA_PRIMARY);
-            if (iReturn == iWindow) {
-                winDebug("winClipboardWindowProc - WM_DRAWCLIPBOARD - "
-                         "PRIMARY selection is owned by us.\n");
-                XSetSelectionOwner(pDisplay, XA_PRIMARY, None, CurrentTime);
+            cookie_get = xcb_get_selection_owner(conn, XCB_ATOM_PRIMARY);
+            reply = xcb_get_selection_owner_reply(conn, cookie_get, NULL);
+            if (reply) {
+                if (reply->owner == iWindow) {
+                    winDebug("winClipboardWindowProc - WM_CLIPBOARDUPDATE - "
+                             "PRIMARY selection is owned by us, releasing.\n");
+                    xcb_set_selection_owner(conn, XCB_NONE, XCB_ATOM_PRIMARY, XCB_CURRENT_TIME);
+                }
+                free(reply);
             }
-            else if (BadWindow == iReturn || BadAtom == iReturn)
-                ErrorF("winClipboardWindowProc - WM_DRAWCLIPBOARD - "
-                       "XGetSelectionOwner failed for PRIMARY: %d\n",
-                       iReturn);
 
             /* Release CLIPBOARD selection if owned */
-            iReturn = XGetSelectionOwner(pDisplay, atoms->atomClipboard);
-            if (iReturn == iWindow) {
-                winDebug("winClipboardWindowProc - WM_DRAWCLIPBOARD - "
-                         "CLIPBOARD selection is owned by us, releasing\n");
-                XSetSelectionOwner(pDisplay, atoms->atomClipboard, None, CurrentTime);
+            cookie_get = xcb_get_selection_owner(conn, atoms->atomClipboard);
+            reply = xcb_get_selection_owner_reply(conn, cookie_get, NULL);
+            if (reply) {
+                if (reply->owner == iWindow) {
+                    winDebug("winClipboardWindowProc - WM_CLIPBOARDUPDATE - "
+                             "CLIPBOARD selection is owned by us, releasing\n");
+                    xcb_set_selection_owner(conn, XCB_NONE, atoms->atomClipboard, XCB_CURRENT_TIME);
+                }
+                free(reply);
             }
-            else if (BadWindow == iReturn || BadAtom == iReturn)
-                ErrorF("winClipboardWindowProc - WM_DRAWCLIPBOARD - "
-                       "XGetSelectionOwner failed for CLIPBOARD: %d\n",
-                       iReturn);
-
-            winDebug("winClipboardWindowProc - WM_DRAWCLIPBOARD: Exit\n");
-            s_fProcessingDrawClipboard = FALSE;
-            if (s_hwndNextViewer)
-                SendMessage(s_hwndNextViewer, message, wParam, lParam);
+
+            winDebug("winClipboardWindowProc - WM_CLIPBOARDUPDATE: Exit\n");
+
             return 0;
         }
 
         /* Reassert ownership of PRIMARY */
-        iReturn = XSetSelectionOwner(pDisplay,
-                                     XA_PRIMARY, iWindow, CurrentTime);
-        if (iReturn == BadAtom || iReturn == BadWindow ||
-            XGetSelectionOwner(pDisplay, XA_PRIMARY) != iWindow) {
-            ErrorF("winClipboardWindowProc - WM_DRAWCLIPBOARD - "
+        cookie_set = xcb_set_selection_owner_checked(conn, iWindow, XCB_ATOM_PRIMARY, XCB_CURRENT_TIME);
+        error = xcb_request_check(conn, cookie_set);
+        if (error) {
+            ErrorF("winClipboardWindowProc - WM_CLIPBOARDUPDATE - "
                    "Could not reassert ownership of PRIMARY\n");
-        }
-        else {
-            winDebug("winClipboardWindowProc - WM_DRAWCLIPBOARD - "
+            free(error);
+        } else {
+            winDebug("winClipboardWindowProc - WM_CLIPBOARDUPDATE - "
                      "Reasserted ownership of PRIMARY\n");
         }
 
         /* Reassert ownership of the CLIPBOARD */
-        iReturn = XSetSelectionOwner(pDisplay,
-                                     atoms->atomClipboard, iWindow, CurrentTime);
-
-        if (iReturn == BadAtom || iReturn == BadWindow ||
-            XGetSelectionOwner(pDisplay, atoms->atomClipboard) != iWindow) {
-            ErrorF("winClipboardWindowProc - WM_DRAWCLIPBOARD - "
+        cookie_set = xcb_set_selection_owner_checked(conn, iWindow, atoms->atomClipboard, XCB_CURRENT_TIME);
+        error = xcb_request_check(conn, cookie_set);
+        if (error) {
+            ErrorF("winClipboardWindowProc - WM_CLIPBOARDUPDATE - "
                     "Could not reassert ownership of CLIPBOARD\n");
+            free(error);
         }
         else {
-            winDebug("winClipboardWindowProc - WM_DRAWCLIPBOARD - "
+            winDebug("winClipboardWindowProc - WM_CLIPBOARDUPDATE - "
                      "Reasserted ownership of CLIPBOARD\n");
         }
 
         /* Flush the pending SetSelectionOwner event now */
-        XFlush(pDisplay);
-
-        s_fProcessingDrawClipboard = FALSE;
+        xcb_flush(conn);
     }
-        winDebug("winClipboardWindowProc - WM_DRAWCLIPBOARD: Exit\n");
-        /* Pass the message on the next window in the clipboard viewer chain */
-        if (s_hwndNextViewer)
-            SendMessage(s_hwndNextViewer, message, wParam, lParam);
+        winDebug("winClipboardWindowProc - WM_CLIPBOARDUPDATE: Exit\n");
         return 0;
 
     case WM_DESTROYCLIPBOARD:
         /*
          * NOTE: Intentionally do nothing.
-         * Changes in the Win32 clipboard are handled by WM_DRAWCLIPBOARD
+         * Changes in the Win32 clipboard are handled by WM_CLIPBOARDUPDATE
          * above.  We only process this message to conform to the specs
          * for delayed clipboard rendering in Win32.  You might think
          * that we need to release ownership of the X11 selections, but
-         * we do not, because a WM_DRAWCLIPBOARD message will closely
+         * we do not, because a WM_CLIPBOARDUPDATE message will closely
          * follow this message and reassert ownership of the X11
          * selections, handling the issue for us.
          */
@@ -453,7 +298,7 @@ winClipboardWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
 
         /*
           WM_RENDERALLFORMATS is sent as we are shutting down, to render the
-          clipboard so it's contents remains available to other applications.
+          clipboard so its contents remains available to other applications.
 
           Unfortunately, this can't work without major changes. The server is
           already waiting for us to stop, so we can't ask for the rendering of
@@ -465,20 +310,16 @@ winClipboardWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
     case WM_RENDERFORMAT:
     {
         int iReturn;
-        Bool fConvertToUnicode;
-        Bool pasted = FALSE;
-        Atom selection;
+        BOOL pasted = FALSE;
+        xcb_atom_t selection;
         ClipboardConversionData data;
         int best_target = 0;
 
         winDebug("winClipboardWindowProc - WM_RENDERFORMAT %d - Hello.\n",
                  (int)wParam);
 
-        /* Flag whether to convert to Unicode or not */
-        fConvertToUnicode = (CF_UNICODETEXT == wParam);
-
         selection = winClipboardGetLastOwnedSelectionAtom(atoms);
-        if (selection == None) {
+        if (selection == XCB_NONE) {
             ErrorF("winClipboardWindowProc - no monitored selection is owned\n");
             goto fake_paste;
         }
@@ -486,17 +327,16 @@ winClipboardWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
         winDebug("winClipboardWindowProc - requesting targets for selection from owner\n");
 
         /* Request the selection's supported conversion targets */
-        XConvertSelection(pDisplay,
-                          selection,
-                          atoms->atomTargets,
-                          atoms->atomLocalProperty,
-                          iWindow, CurrentTime);
+        xcb_convert_selection(conn, iWindow, selection, atoms->atomTargets,
+                              atoms->atomLocalProperty, XCB_CURRENT_TIME);
 
         /* Process X events */
-        data.fUseUnicode = fConvertToUnicode;
+        data.incr = NULL;
+        data.incrsize = 0;
+
         iReturn = winProcessXEventsTimeout(hwnd,
                                            iWindow,
-                                           pDisplay,
+                                           conn,
                                            &data,
                                            atoms,
                                            WIN_POLL_TIMEOUT);
@@ -511,17 +351,15 @@ winClipboardWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
         {
             struct target_priority
             {
-                Atom target;
+                xcb_atom_t target;
                 unsigned int priority;
             };
 
             struct target_priority target_priority_table[] =
                 {
-                    { atoms->atomCompoundText, 0 },
-#ifdef X_HAVE_UTF8_STRING
-                    { atoms->atomUTF8String,   1 },
-#endif
-                    { XA_STRING,               2 },
+                    { atoms->atomUTF8String,   0 },
+                    // { atoms->atomCompoundText, 1 }, not implemented (yet?)
+                    { XCB_ATOM_STRING,         2 },
                 };
 
             int best_priority = INT_MAX;
@@ -553,16 +391,13 @@ winClipboardWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
         winDebug("winClipboardWindowProc - requesting selection from owner\n");
 
         /* Request the selection contents */
-        XConvertSelection(pDisplay,
-                          selection,
-                          best_target,
-                          atoms->atomLocalProperty,
-                          iWindow, CurrentTime);
+        xcb_convert_selection(conn, iWindow, selection, best_target,
+                              atoms->atomLocalProperty, XCB_CURRENT_TIME);
 
         /* Process X events */
         iReturn = winProcessXEventsTimeout(hwnd,
                                            iWindow,
-                                           pDisplay,
+                                           conn,
                                            &data,
                                            atoms,
                                            WIN_POLL_TIMEOUT);
@@ -605,7 +440,7 @@ winClipboardWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
  * Process any pending Windows messages
  */
 
-Bool
+BOOL
 winClipboardFlushWindowsMessageQueue(HWND hwnd)
 {
     MSG msg;
diff --git a/hw/xwin/winclipboard/xevents.c b/hw/xwin/winclipboard/xevents.c
index d4ea97f..cac1715 100644
--- a/hw/xwin/winclipboard/xevents.c
+++ b/hw/xwin/winclipboard/xevents.c
@@ -34,20 +34,11 @@
 #include <xwin-config.h>
 #endif
 
-/*
- * Including any server header might define the macro _XSERVER64 on 64 bit machines.
- * That macro must _NOT_ be defined for Xlib client code, otherwise bad things happen.
- * So let's undef that macro if necessary.
- */
-#ifdef _XSERVER64
-#undef _XSERVER64
-#endif
-
 #include <limits.h>
 #include <wchar.h>
-#include <X11/Xutil.h>
-#include <X11/Xatom.h>
-#include <X11/extensions/Xfixes.h>
+
+#include <xcb/xcb.h>
+#include <xcb/xfixes.h>
 
 #include "winclipboard.h"
 #include "internal.h"
@@ -57,32 +48,34 @@
  */
 
 #define CLIP_NUM_SELECTIONS		2
-#define CLIP_OWN_NONE     		-1
+#define CLIP_OWN_NONE			-1
 #define CLIP_OWN_PRIMARY		0
 #define CLIP_OWN_CLIPBOARD		1
 
+#define CP_ISO_8559_1 28591
+
 /*
  * Global variables
  */
 
 extern int xfixes_event_base;
-Bool fPrimarySelection = TRUE;
+BOOL fPrimarySelection = TRUE;
 
 /*
  * Local variables
  */
 
-static Window s_iOwners[CLIP_NUM_SELECTIONS] = { None, None };
+static xcb_window_t s_iOwners[CLIP_NUM_SELECTIONS] = { XCB_NONE, XCB_NONE };
 static const char *szSelectionNames[CLIP_NUM_SELECTIONS] =
     { "PRIMARY", "CLIPBOARD" };
 
 static unsigned int lastOwnedSelectionIndex = CLIP_OWN_NONE;
 
 static void
-MonitorSelection(XFixesSelectionNotifyEvent * e, unsigned int i)
+MonitorSelection(xcb_xfixes_selection_notify_event_t * e, unsigned int i)
 {
     /* Look for owned -> not owned transition */
-    if (None == e->owner && None != s_iOwners[i]) {
+    if ((XCB_NONE == e->owner) && (XCB_NONE != s_iOwners[i])) {
         unsigned int other_index;
 
         winDebug("MonitorSelection - %s - Going from owned to not owned.\n",
@@ -94,36 +87,36 @@ MonitorSelection(XFixesSelectionNotifyEvent * e, unsigned int i)
             other_index = CLIP_OWN_CLIPBOARD;
         if (i == CLIP_OWN_CLIPBOARD)
             other_index = CLIP_OWN_PRIMARY;
-        if (None != s_iOwners[other_index])
+        if (XCB_NONE != s_iOwners[other_index])
             lastOwnedSelectionIndex = other_index;
         else
             lastOwnedSelectionIndex = CLIP_OWN_NONE;
     }
 
     /* Save last owned selection */
-    if (None != e->owner) {
+    if (XCB_NONE != e->owner) {
         lastOwnedSelectionIndex = i;
     }
 
     /* Save new selection owner or None */
     s_iOwners[i] = e->owner;
-    winDebug("MonitorSelection - %s - Now owned by XID %lx\n",
+    winDebug("MonitorSelection - %s - Now owned by XID %x\n",
              szSelectionNames[i], e->owner);
 }
 
-Atom
+xcb_atom_t
 winClipboardGetLastOwnedSelectionAtom(ClipboardAtoms *atoms)
 {
     if (lastOwnedSelectionIndex == CLIP_OWN_NONE)
-        return None;
+        return XCB_NONE;
 
     if (lastOwnedSelectionIndex == CLIP_OWN_PRIMARY)
-        return XA_PRIMARY;
+        return XCB_ATOM_PRIMARY;
 
     if (lastOwnedSelectionIndex == CLIP_OWN_CLIPBOARD)
         return atoms->atomClipboard;
 
-    return None;
+    return XCB_NONE;
 }
 
 
@@ -133,169 +126,360 @@ winClipboardInitMonitoredSelections(void)
     /* Initialize static variables */
     int i;
     for (i = 0; i < CLIP_NUM_SELECTIONS; ++i)
-      s_iOwners[i] = None;
+      s_iOwners[i] = XCB_NONE;
 
     lastOwnedSelectionIndex = CLIP_OWN_NONE;
 }
 
-static int
-winClipboardSelectionNotifyTargets(HWND hwnd, Window iWindow, Display *pDisplay, ClipboardConversionData *data, ClipboardAtoms *atoms)
+static char *get_atom_name(xcb_connection_t *conn, xcb_atom_t atom)
 {
-  Atom type;
-  int format;
-  unsigned long nitems;
-  unsigned long after;
-  Atom *prop;
+    char *ret;
+    xcb_get_atom_name_cookie_t cookie = xcb_get_atom_name(conn, atom);
+    xcb_get_atom_name_reply_t *reply = xcb_get_atom_name_reply(conn, cookie, NULL);
+    if (!reply)
+        return NULL;
+    ret = malloc(xcb_get_atom_name_name_length(reply) + 1);
+    if (ret) {
+        memcpy(ret, xcb_get_atom_name_name(reply), xcb_get_atom_name_name_length(reply));
+        ret[xcb_get_atom_name_name_length(reply)] = '\0';
+    }
+    free(reply);
+    return ret;
+}
 
+static int
+winClipboardSelectionNotifyTargets(HWND hwnd, xcb_window_t iWindow, xcb_connection_t *conn, ClipboardConversionData *data, ClipboardAtoms *atoms)
+{
   /* Retrieve the selection data and delete the property */
-  int iReturn = XGetWindowProperty(pDisplay,
-                                   iWindow,
-                                   atoms->atomLocalProperty,
-                                   0,
-                                   INT_MAX,
-                                   True,
-                                   AnyPropertyType,
-                                   &type,
-                                   &format,
-                                   &nitems,
-                                   &after,
-                                   (unsigned char **)&prop);
-  if (iReturn != Success) {
-    ErrorF("winClipboardFlushXEvents - SelectionNotify - "
-           "XGetWindowProperty () failed, aborting: %d\n", iReturn);
+  xcb_get_property_cookie_t cookie = xcb_get_property(conn,
+                                                      TRUE,
+                                                      iWindow,
+                                                      atoms->atomLocalProperty,
+                                                      XCB_GET_PROPERTY_TYPE_ANY,
+                                                      0,
+                                                      INT_MAX);
+  xcb_get_property_reply_t *reply = xcb_get_property_reply(conn, cookie, NULL);
+  if (!reply) {
+      ErrorF("winClipboardFlushXEvents - SelectionNotify - "
+             "XGetWindowProperty () failed\n");
   } else {
-    int i;
-    data->targetList = malloc((nitems+1)*sizeof(Atom));
-
-    for (i = 0; i < nitems; i++)
-      {
-        Atom atom = prop[i];
-        char *pszAtomName = XGetAtomName(pDisplay, atom);
-        data->targetList[i] = atom;
-        winDebug("winClipboardFlushXEvents - SelectionNotify - target[%d] %ld = %s\n", i, atom, pszAtomName);
-        XFree(pszAtomName);
+      xcb_atom_t *prop = xcb_get_property_value(reply);
+      int nitems = xcb_get_property_value_length(reply)/sizeof(xcb_atom_t);
+      int i;
+      data->targetList = malloc((nitems+1)*sizeof(xcb_atom_t));
+
+      for (i = 0; i < nitems; i++)
+          {
+              xcb_atom_t atom = prop[i];
+              char *pszAtomName = get_atom_name(conn, atom);
+              data->targetList[i] = atom;
+              winDebug("winClipboardFlushXEvents - SelectionNotify - target[%d] %d = %s\n", i, atom, pszAtomName);
+              free(pszAtomName);
       }
 
     data->targetList[nitems] = 0;
 
-    XFree(prop);
+    free(reply);
   }
 
   return WIN_XEVENTS_NOTIFY_TARGETS;
 }
 
+static int
+winClipboardSelectionNotifyData(HWND hwnd, xcb_window_t iWindow, xcb_connection_t *conn, ClipboardConversionData *data, ClipboardAtoms *atoms)
+{
+    xcb_atom_t encoding;
+    int format;
+    unsigned long int nitems;
+    unsigned long int after;
+    unsigned char *value;
+
+    unsigned char *xtpText_value;
+    xcb_atom_t xtpText_encoding;
+    int xtpText_nitems;
+
+    BOOL fSetClipboardData = TRUE;
+    char *pszReturnData = NULL;
+    UINT codepage;
+    wchar_t *pwszUnicodeStr = NULL;
+    HGLOBAL hGlobal = NULL;
+    char *pszGlobalData = NULL;
+
+    /* Retrieve the selection data and delete the property */
+    xcb_get_property_cookie_t cookie = xcb_get_property(conn,
+                                                        TRUE,
+                                                        iWindow,
+                                                        atoms->atomLocalProperty,
+                                                        XCB_GET_PROPERTY_TYPE_ANY,
+                                                        0,
+                                                        INT_MAX);
+    xcb_get_property_reply_t *reply = xcb_get_property_reply(conn, cookie, NULL);
+    if (!reply) {
+        ErrorF("winClipboardFlushXEvents - SelectionNotify - "
+               "XGetWindowProperty () failed\n");
+        goto winClipboardFlushXEvents_SelectionNotify_Done;
+    } else {
+        nitems = xcb_get_property_value_length(reply);
+        value =  xcb_get_property_value(reply);
+        after = reply->bytes_after;
+        encoding = reply->type;
+        format = reply->format;
+        // We assume format == 8 (i.e. data is a sequence of bytes).  It's not
+        // clear how anything else should be handled.
+        if (format != 8)
+            ErrorF("SelectionNotify: format is %d, proceeding as if it was 8\n", format);
+    }
+
+    {
+        char *pszAtomName;
+        winDebug("SelectionNotify - returned data %lu left %lu\n", nitems, after);
+        pszAtomName = get_atom_name(conn, encoding);
+        winDebug("Notify atom name %s\n", pszAtomName);
+        free(pszAtomName);
+    }
+
+    /* INCR reply indicates the start of a incremental transfer */
+    if (encoding == atoms->atomIncr) {
+        winDebug("winClipboardSelectionNotifyData: starting INCR, anticipated size %d\n", *(int *)value);
+        data->incrsize = 0;
+        data->incr = malloc(*(int *)value);
+        // XXX: if malloc failed, we have an error
+        return WIN_XEVENTS_SUCCESS;
+    }
+    else if (data->incr) {
+        /* If an INCR transfer is in progress ... */
+        if (nitems == 0) {
+            winDebug("winClipboardSelectionNotifyData: ending INCR, actual size %ld\n", data->incrsize);
+            /* a zero-length property indicates the end of the data */
+            xtpText_value = data->incr;
+            xtpText_encoding = encoding;
+            // XXX: The type of the converted selection is the type of the first
+            // partial property. The remaining partial properties must have the
+            // same type.
+            xtpText_nitems = data->incrsize;
+        }
+        else {
+            /* Otherwise, continue appending the INCR data */
+            winDebug("winClipboardSelectionNotifyData: INCR, %ld bytes\n", nitems);
+            data->incr = realloc(data->incr, data->incrsize + nitems);
+            memcpy(data->incr + data->incrsize, value, nitems);
+            data->incrsize = data->incrsize + nitems;
+            return WIN_XEVENTS_SUCCESS;
+        }
+    }
+    else {
+        /* Otherwise, the data is just contained in the property */
+        winDebug("winClipboardSelectionNotifyData: non-INCR, %ld bytes\n", nitems);
+        xtpText_value = value;
+        xtpText_encoding = encoding;
+        xtpText_nitems = nitems;
+    }
+
+    if (xtpText_encoding == atoms->atomUTF8String) {
+        pszReturnData = malloc(xtpText_nitems + 1);
+        memcpy(pszReturnData, xtpText_value, xtpText_nitems);
+        pszReturnData[xtpText_nitems] = 0;
+        codepage = CP_UTF8; // code page identifier for utf8
+    } else if (xtpText_encoding == XCB_ATOM_STRING) {
+        // STRING encoding is Latin1 (ISO8859-1) plus tab and newline
+        pszReturnData = malloc(xtpText_nitems + 1);
+        memcpy(pszReturnData, xtpText_value, xtpText_nitems);
+        pszReturnData[xtpText_nitems] = 0;
+        codepage = CP_ISO_8559_1; // code page identifier for iso-8559-1
+    } else if (xtpText_encoding == atoms->atomCompoundText) {
+        // COMPOUND_TEXT is complex, based on ISO 2022
+        ErrorF("SelectionNotify: data in COMPOUND_TEXT encoding which is not implemented, discarding\n");
+        pszReturnData = malloc(1);
+        pszReturnData[0] = '\0';
+    } else { // shouldn't happen as we accept no other encodings
+        pszReturnData = malloc(1);
+        pszReturnData[0] = '\0';
+    }
+
+    /* Free the data returned from xcb_get_property */
+    free(reply);
+
+    /* Free any INCR data */
+    if (data->incr) {
+        free(data->incr);
+        data->incr = NULL;
+        data->incrsize = 0;
+    }
+
+    /* Convert the X clipboard string to DOS format */
+    winClipboardUNIXtoDOS(&pszReturnData, strlen(pszReturnData));
+
+    /* Find out how much space needed when converted to UTF-16 */
+    int iUnicodeLen = MultiByteToWideChar(codepage, 0,
+                                          pszReturnData, -1, NULL, 0);
+
+    /* NOTE: iUnicodeLen includes space for null terminator */
+    pwszUnicodeStr = malloc(sizeof(wchar_t) * iUnicodeLen);
+    if (!pwszUnicodeStr) {
+        ErrorF("winClipboardFlushXEvents - SelectionNotify "
+               "malloc failed for pwszUnicodeStr, aborting.\n");
+
+        /* Abort */
+        goto winClipboardFlushXEvents_SelectionNotify_Done;
+    }
+
+    /* Do the actual conversion */
+    MultiByteToWideChar(codepage, 0,
+                        pszReturnData, -1, pwszUnicodeStr, iUnicodeLen);
+
+    /* Allocate global memory for the X clipboard data */
+    hGlobal = GlobalAlloc(GMEM_MOVEABLE, sizeof(wchar_t) * iUnicodeLen);
+
+    free(pszReturnData);
+
+    /* Check that global memory was allocated */
+    if (!hGlobal) {
+        ErrorF("winClipboardFlushXEvents - SelectionNotify "
+               "GlobalAlloc failed, aborting: %08x\n", (unsigned int)GetLastError());
+
+        /* Abort */
+        goto winClipboardFlushXEvents_SelectionNotify_Done;
+    }
+
+    /* Obtain a pointer to the global memory */
+    pszGlobalData = GlobalLock(hGlobal);
+    if (pszGlobalData == NULL) {
+        ErrorF("winClipboardFlushXEvents - Could not lock global "
+               "memory for clipboard transfer\n");
+
+        /* Abort */
+        goto winClipboardFlushXEvents_SelectionNotify_Done;
+    }
+
+    /* Copy the returned string into the global memory */
+    wcscpy((wchar_t *)pszGlobalData, pwszUnicodeStr);
+    free(pwszUnicodeStr);
+    pwszUnicodeStr = NULL;
+
+    /* Release the pointer to the global memory */
+    GlobalUnlock(hGlobal);
+    pszGlobalData = NULL;
+
+    /* Push the selection data to the Windows clipboard */
+    SetClipboardData(CF_UNICODETEXT, hGlobal);
+
+    /* Flag that SetClipboardData has been called */
+    fSetClipboardData = FALSE;
+
+    /*
+     * NOTE: Do not try to free pszGlobalData, it is owned by
+     * Windows after the call to SetClipboardData ().
+     */
+
+ winClipboardFlushXEvents_SelectionNotify_Done:
+    /* Free allocated resources */
+    free(pwszUnicodeStr);
+    if (hGlobal && pszGlobalData)
+        GlobalUnlock(hGlobal);
+    if (fSetClipboardData) {
+        SetClipboardData(CF_UNICODETEXT, NULL);
+        SetClipboardData(CF_TEXT, NULL);
+    }
+    return WIN_XEVENTS_NOTIFY_DATA;
+}
+
 /*
  * Process any pending X events
  */
 
 int
 winClipboardFlushXEvents(HWND hwnd,
-                         Window iWindow, Display * pDisplay, ClipboardConversionData *data, ClipboardAtoms *atoms)
+                         xcb_window_t iWindow, xcb_connection_t *conn,
+                         ClipboardConversionData *data, ClipboardAtoms *atoms)
 {
-    Atom atomClipboard = atoms->atomClipboard;
-    Atom atomLocalProperty = atoms->atomLocalProperty;
-    Atom atomUTF8String = atoms->atomUTF8String;
-    Atom atomCompoundText = atoms->atomCompoundText;
-    Atom atomTargets = atoms->atomTargets;
+    xcb_atom_t atomClipboard = atoms->atomClipboard;
+    xcb_atom_t atomUTF8String = atoms->atomUTF8String;
+    xcb_atom_t atomCompoundText = atoms->atomCompoundText;
+    xcb_atom_t atomTargets = atoms->atomTargets;
 
     /* Process all pending events */
-    while (XPending(pDisplay)) {
-        XTextProperty xtpText = { 0 };
-        XEvent event;
-        XSelectionEvent eventSelection;
-        unsigned long ulReturnBytesLeft;
-        char *pszReturnData = NULL;
-        char *pszGlobalData = NULL;
-        int iReturn;
+    xcb_generic_event_t *event;
+    while ((event = xcb_poll_for_event(conn))) {
+        const char *pszGlobalData = NULL;
         HGLOBAL hGlobal = NULL;
-        XICCEncodingStyle xiccesStyle;
         char *pszConvertData = NULL;
-        char *pszTextList[2] = { NULL };
-        int iCount;
-        char **ppszTextList = NULL;
-        wchar_t *pwszUnicodeStr = NULL;
-        Bool fAbort = FALSE;
-        Bool fCloseClipboard = FALSE;
-        Bool fSetClipboardData = TRUE;
-
-        /* Get the next event - will not block because one is ready */
-        XNextEvent(pDisplay, &event);
+        BOOL fAbort = FALSE;
+        BOOL fCloseClipboard = FALSE;
 
         /* Branch on the event type */
-        switch (event.type) {
-            /*
-             * SelectionRequest
-             */
+        switch (event->response_type & ~0x80) {
+        case XCB_SELECTION_REQUEST:
+        {
+            char *xtpText_value = NULL;
+            int xtpText_nitems;
+            UINT codepage;
 
-        case SelectionRequest:
+            xcb_selection_request_event_t *selection_request =  (xcb_selection_request_event_t *)event;
         {
             char *pszAtomName = NULL;
 
-            winDebug("SelectionRequest - target %ld\n",
-                     event.xselectionrequest.target);
+            winDebug("SelectionRequest - target %d\n", selection_request->target);
 
-            pszAtomName = XGetAtomName(pDisplay,
-                                       event.xselectionrequest.target);
+            pszAtomName = get_atom_name(conn, selection_request->target);
             winDebug("SelectionRequest - Target atom name %s\n", pszAtomName);
-            XFree(pszAtomName);
-            pszAtomName = NULL;
+            free(pszAtomName);
         }
 
             /* Abort if invalid target type */
-            if (event.xselectionrequest.target != XA_STRING
-                && event.xselectionrequest.target != atomUTF8String
-                && event.xselectionrequest.target != atomCompoundText
-                && event.xselectionrequest.target != atomTargets) {
+            if (selection_request->target != XCB_ATOM_STRING
+                && selection_request->target != atomUTF8String
+                && selection_request->target != atomCompoundText
+                && selection_request->target != atomTargets) {
                 /* Abort */
                 fAbort = TRUE;
                 goto winClipboardFlushXEvents_SelectionRequest_Done;
             }
 
             /* Handle targets type of request */
-            if (event.xselectionrequest.target == atomTargets) {
-                Atom atomTargetArr[] = { atomTargets,
-                    atomCompoundText,
-                    atomUTF8String,
-                    XA_STRING
-                };
+            if (selection_request->target == atomTargets) {
+                xcb_atom_t atomTargetArr[] =
+                    {
+                     atomTargets,
+                     atomUTF8String,
+                     XCB_ATOM_STRING,
+                     // atomCompoundText, not implemented (yet?)
+                    };
 
                 /* Try to change the property */
-                iReturn = XChangeProperty(pDisplay,
-                                          event.xselectionrequest.requestor,
-                                          event.xselectionrequest.property,
-                                          XA_ATOM,
+                xcb_void_cookie_t cookie = xcb_change_property_checked(conn,
+                                          XCB_PROP_MODE_REPLACE,
+                                          selection_request->requestor,
+                                          selection_request->property,
+                                          XCB_ATOM_ATOM,
                                           32,
-                                          PropModeReplace,
-                                          (unsigned char *) atomTargetArr,
-                                          ARRAY_SIZE(atomTargetArr));
-                if (iReturn == BadAlloc
-                    || iReturn == BadAtom
-                    || iReturn == BadMatch
-                    || iReturn == BadValue || iReturn == BadWindow) {
+                                          ARRAY_SIZE(atomTargetArr),
+                                          (unsigned char *) atomTargetArr);
+                xcb_generic_error_t *error;
+                if ((error = xcb_request_check(conn, cookie))) {
                     ErrorF("winClipboardFlushXEvents - SelectionRequest - "
-                           "XChangeProperty failed: %d\n", iReturn);
+                           "xcb_change_property failed");
+                    free(error);
                 }
 
                 /* Setup selection notify xevent */
-                eventSelection.type = SelectionNotify;
-                eventSelection.send_event = True;
-                eventSelection.display = pDisplay;
-                eventSelection.requestor = event.xselectionrequest.requestor;
-                eventSelection.selection = event.xselectionrequest.selection;
-                eventSelection.target = event.xselectionrequest.target;
-                eventSelection.property = event.xselectionrequest.property;
-                eventSelection.time = event.xselectionrequest.time;
+                xcb_selection_notify_event_t eventSelection;
+                eventSelection.response_type = XCB_SELECTION_NOTIFY;
+                eventSelection.requestor = selection_request->requestor;
+                eventSelection.selection = selection_request->selection;
+                eventSelection.target = selection_request->target;
+                eventSelection.property = selection_request->property;
+                eventSelection.time = selection_request->time;
 
                 /*
                  * Notify the requesting window that
                  * the operation has completed
                  */
-                iReturn = XSendEvent(pDisplay,
-                                     eventSelection.requestor,
-                                     False, 0L, (XEvent *) &eventSelection);
-                if (iReturn == BadValue || iReturn == BadWindow) {
+                cookie = xcb_send_event_checked(conn, FALSE,
+                                                eventSelection.requestor,
+                                                0, (char *) &eventSelection);
+                if ((error = xcb_request_check(conn, cookie))) {
                     ErrorF("winClipboardFlushXEvents - SelectionRequest - "
-                           "XSendEvent () failed\n");
+                           "xcb_send_event() failed\n");
                 }
                 break;
             }
@@ -319,7 +503,7 @@ winClipboardFlushXEvents(HWND hwnd,
             fCloseClipboard = TRUE;
 
             /* Check that clipboard format is available */
-            if (data->fUseUnicode && !IsClipboardFormatAvailable(CF_UNICODETEXT)) {
+            if (!IsClipboardFormatAvailable(CF_UNICODETEXT)) {
                 static int count;       /* Hack to stop acroread spamming the log */
                 static HWND lasthwnd;   /* I've not seen any other client get here repeatedly? */
 
@@ -336,36 +520,11 @@ winClipboardFlushXEvents(HWND hwnd,
                 fAbort = TRUE;
                 goto winClipboardFlushXEvents_SelectionRequest_Done;
             }
-            else if (!data->fUseUnicode && !IsClipboardFormatAvailable(CF_TEXT)) {
-                ErrorF("winClipboardFlushXEvents - CF_TEXT is not "
-                       "available from Win32 clipboard.  Aborting.\n");
-
-                /* Abort */
-                fAbort = TRUE;
-                goto winClipboardFlushXEvents_SelectionRequest_Done;
-            }
-
-            /* Setup the string style */
-            if (event.xselectionrequest.target == XA_STRING)
-                xiccesStyle = XStringStyle;
-#ifdef X_HAVE_UTF8_STRING
-            else if (event.xselectionrequest.target == atomUTF8String)
-                xiccesStyle = XUTF8StringStyle;
-#endif
-            else if (event.xselectionrequest.target == atomCompoundText)
-                xiccesStyle = XCompoundTextStyle;
-            else
-                xiccesStyle = XStringStyle;
 
             /* Get a pointer to the clipboard text, in desired format */
-            if (data->fUseUnicode) {
-                /* Retrieve clipboard data */
-                hGlobal = GetClipboardData(CF_UNICODETEXT);
-            }
-            else {
-                /* Retrieve clipboard data */
-                hGlobal = GetClipboardData(CF_TEXT);
-            }
+            /* Retrieve clipboard data */
+            hGlobal = GetClipboardData(CF_UNICODETEXT);
+
             if (!hGlobal) {
                 ErrorF("winClipboardFlushXEvents - SelectionRequest - "
                        "GetClipboardData () failed: %08x\n", (unsigned int)GetLastError());
@@ -376,81 +535,71 @@ winClipboardFlushXEvents(HWND hwnd,
             }
             pszGlobalData = (char *) GlobalLock(hGlobal);
 
-            /* Convert the Unicode string to UTF8 (MBCS) */
-            if (data->fUseUnicode) {
-                int iConvertDataLen = WideCharToMultiByte(CP_UTF8,
-                                                      0,
-                                                      (LPCWSTR) pszGlobalData,
-                                                      -1, NULL, 0, NULL, NULL);
-                /* NOTE: iConvertDataLen includes space for null terminator */
-                pszConvertData = malloc(iConvertDataLen);
-                WideCharToMultiByte(CP_UTF8,
-                                    0,
-                                    (LPCWSTR) pszGlobalData,
-                                    -1,
-                                    pszConvertData,
-                                    iConvertDataLen, NULL, NULL);
-            }
-            else {
-                pszConvertData = strdup(pszGlobalData);
-            }
+            /* Convert to target string style */
+            if (selection_request->target == XCB_ATOM_STRING) {
+                codepage = CP_ISO_8559_1; // code page identifier for iso-8559-1
+            } else if (selection_request->target == atomUTF8String) {
+                codepage = CP_UTF8; // code page identifier for utf8
+            } else if (selection_request->target == atomCompoundText) {
+                // COMPOUND_TEXT is complex, not (yet) implemented
+                pszGlobalData = "COMPOUND_TEXT not implemented";
+                codepage = CP_UTF8; // code page identifier for utf8
+            }
+
+            /* Convert the UTF16 string to required encoding */
+            int iConvertDataLen = WideCharToMultiByte(codepage, 0,
+                                                      (LPCWSTR) pszGlobalData, -1,
+                                                      NULL, 0, NULL, NULL);
+            /* NOTE: iConvertDataLen includes space for null terminator */
+            pszConvertData = malloc(iConvertDataLen);
+            WideCharToMultiByte(codepage, 0,
+                                (LPCWSTR) pszGlobalData, -1,
+                                pszConvertData, iConvertDataLen, NULL, NULL);
 
             /* Convert DOS string to UNIX string */
             winClipboardDOStoUNIX(pszConvertData, strlen(pszConvertData));
 
-            /* Setup our text list */
-            pszTextList[0] = pszConvertData;
-            pszTextList[1] = NULL;
+            xtpText_value = strdup(pszConvertData);
+            xtpText_nitems = strlen(pszConvertData);
 
-            /* Initialize the text property */
-            xtpText.value = NULL;
-            xtpText.nitems = 0;
+            /* data will fit into a single X request? (INCR not yet supported) */
+            {
+                uint32_t maxreqsize = xcb_get_maximum_request_length(conn);
 
-            /* Create the text property from the text list */
-            if (data->fUseUnicode) {
-#ifdef X_HAVE_UTF8_STRING
-                iReturn = Xutf8TextListToTextProperty(pDisplay,
-                                                      pszTextList,
-                                                      1, xiccesStyle, &xtpText);
-#endif
-            }
-            else {
-                iReturn = XmbTextListToTextProperty(pDisplay,
-                                                    pszTextList,
-                                                    1, xiccesStyle, &xtpText);
-            }
-            if (iReturn == XNoMemory || iReturn == XLocaleNotSupported) {
-                ErrorF("winClipboardFlushXEvents - SelectionRequest - "
-                       "X*TextListToTextProperty failed: %d\n", iReturn);
+                /* covert to bytes and allow for allow for X_ChangeProperty request */
+                maxreqsize = maxreqsize*4 - 24;
 
-                /* Abort */
-                fAbort = TRUE;
-                goto winClipboardFlushXEvents_SelectionRequest_Done;
-            }
+                if (xtpText_nitems > maxreqsize) {
+                    ErrorF("winClipboardFlushXEvents - clipboard data size %d greater than maximum %u\n", xtpText_nitems, maxreqsize);
 
-            /* Free the converted string */
-            free(pszConvertData);
-            pszConvertData = NULL;
+                    /* Abort */
+                    fAbort = TRUE;
+                    goto winClipboardFlushXEvents_SelectionRequest_Done;
+                }
+            }
 
             /* Copy the clipboard text to the requesting window */
-            iReturn = XChangeProperty(pDisplay,
-                                      event.xselectionrequest.requestor,
-                                      event.xselectionrequest.property,
-                                      event.xselectionrequest.target,
+            xcb_void_cookie_t cookie = xcb_change_property_checked(conn,
+                                      XCB_PROP_MODE_REPLACE,
+                                      selection_request->requestor,
+                                      selection_request->property,
+                                      selection_request->target,
                                       8,
-                                      PropModeReplace,
-                                      xtpText.value, xtpText.nitems);
-            if (iReturn == BadAlloc || iReturn == BadAtom
-                || iReturn == BadMatch || iReturn == BadValue
-                || iReturn == BadWindow) {
+                                      xtpText_nitems, xtpText_value);
+            xcb_generic_error_t *error;
+            if ((error = xcb_request_check(conn, cookie))) {
                 ErrorF("winClipboardFlushXEvents - SelectionRequest - "
-                       "XChangeProperty failed: %d\n", iReturn);
+                       "xcb_change_property failed\n");
 
                 /* Abort */
                 fAbort = TRUE;
                 goto winClipboardFlushXEvents_SelectionRequest_Done;
             }
 
+            /* Free the converted string */
+            free(pszConvertData);
+            pszConvertData = NULL;
+
             /* Release the clipboard data */
             GlobalUnlock(hGlobal);
             pszGlobalData = NULL;
@@ -458,27 +607,25 @@ winClipboardFlushXEvents(HWND hwnd,
             CloseClipboard();
 
             /* Clean up */
-            XFree(xtpText.value);
-            xtpText.value = NULL;
-            xtpText.nitems = 0;
+            free(xtpText_value);
+            xtpText_value = NULL;
 
             /* Setup selection notify event */
-            eventSelection.type = SelectionNotify;
-            eventSelection.send_event = True;
-            eventSelection.display = pDisplay;
-            eventSelection.requestor = event.xselectionrequest.requestor;
-            eventSelection.selection = event.xselectionrequest.selection;
-            eventSelection.target = event.xselectionrequest.target;
-            eventSelection.property = event.xselectionrequest.property;
-            eventSelection.time = event.xselectionrequest.time;
+            xcb_selection_notify_event_t eventSelection;
+            eventSelection.response_type = XCB_SELECTION_NOTIFY;
+            eventSelection.requestor = selection_request->requestor;
+            eventSelection.selection = selection_request->selection;
+            eventSelection.target = selection_request->target;
+            eventSelection.property = selection_request->property;
+            eventSelection.time = selection_request->time;
 
             /* Notify the requesting window that the operation has completed */
-            iReturn = XSendEvent(pDisplay,
-                                 eventSelection.requestor,
-                                 False, 0L, (XEvent *) &eventSelection);
-            if (iReturn == BadValue || iReturn == BadWindow) {
+            cookie = xcb_send_event_checked(conn, FALSE,
+                                            eventSelection.requestor,
+                                            0, (char *) &eventSelection);
+            if ((error = xcb_request_check(conn, cookie))) {
                 ErrorF("winClipboardFlushXEvents - SelectionRequest - "
-                       "XSendEvent () failed\n");
+                       "xcb_send_event() failed\n");
 
                 /* Abort */
                 fAbort = TRUE;
@@ -487,12 +634,11 @@ winClipboardFlushXEvents(HWND hwnd,
 
  winClipboardFlushXEvents_SelectionRequest_Done:
             /* Free allocated resources */
-            if (xtpText.value) {
-                XFree(xtpText.value);
-                xtpText.value = NULL;
-                xtpText.nitems = 0;
+            if (xtpText_value) {
+                free(xtpText_value);
             }
-            free(pszConvertData);
+            if (pszConvertData)
+                free(pszConvertData);
             if (hGlobal && pszGlobalData)
                 GlobalUnlock(hGlobal);
 
@@ -502,26 +648,24 @@ winClipboardFlushXEvents(HWND hwnd,
              */
             if (fAbort) {
                 /* Setup selection notify event */
-                eventSelection.type = SelectionNotify;
-                eventSelection.send_event = True;
-                eventSelection.display = pDisplay;
-                eventSelection.requestor = event.xselectionrequest.requestor;
-                eventSelection.selection = event.xselectionrequest.selection;
-                eventSelection.target = event.xselectionrequest.target;
-                eventSelection.property = None;
-                eventSelection.time = event.xselectionrequest.time;
+                eventSelection.response_type = XCB_SELECTION_NOTIFY;
+                eventSelection.requestor = selection_request->requestor;
+                eventSelection.selection = selection_request->selection;
+                eventSelection.target = selection_request->target;
+                eventSelection.property = XCB_NONE;
+                eventSelection.time = selection_request->time;
 
                 /* Notify the requesting window that the operation is complete */
-                iReturn = XSendEvent(pDisplay,
-                                     eventSelection.requestor,
-                                     False, 0L, (XEvent *) &eventSelection);
-                if (iReturn == BadValue || iReturn == BadWindow) {
+                cookie = xcb_send_event_checked(conn, FALSE,
+                                                eventSelection.requestor,
+                                                0, (char *) &eventSelection);
+                if ((error = xcb_request_check(conn, cookie))) {
                     /*
                      * Should not be a problem if XSendEvent fails because
                      * the client may simply have exited.
                      */
                     ErrorF("winClipboardFlushXEvents - SelectionRequest - "
-                           "XSendEvent () failed for abort event.\n");
+                           "xcb_send_event() failed for abort event.\n");
                 }
             }
 
@@ -531,266 +675,79 @@ winClipboardFlushXEvents(HWND hwnd,
                 CloseClipboard();
             }
             break;
+        }
 
-            /*
-             * SelectionNotify
-             */
-
-        case SelectionNotify:
+        case XCB_SELECTION_NOTIFY:
+        {
+            xcb_selection_notify_event_t *selection_notify =  (xcb_selection_notify_event_t *)event;
             winDebug("winClipboardFlushXEvents - SelectionNotify\n");
             {
                 char *pszAtomName;
-
-                pszAtomName = XGetAtomName(pDisplay,
-                                           event.xselection.selection);
-
-                winDebug
-                    ("winClipboardFlushXEvents - SelectionNotify - ATOM: %s\n",
-                     pszAtomName);
-                XFree(pszAtomName);
+                pszAtomName = get_atom_name(conn, selection_notify->selection);
+                winDebug("winClipboardFlushXEvents - SelectionNotify - ATOM: %s\n", pszAtomName);
+                free(pszAtomName);
             }
 
             /*
-              SelectionNotify with property of None indicates either:
+              SelectionNotify with property of XCB_NONE indicates either:
 
               (i) Generated by the X server if no owner for the specified selection exists
                   (perhaps it's disappeared on us mid-transaction), or
               (ii) Sent by the selection owner when the requested selection conversion could
                    not be performed or server errors prevented the conversion data being returned
             */
-            if (event.xselection.property == None) {
+            if (selection_notify->property == XCB_NONE) {
                     ErrorF("winClipboardFlushXEvents - SelectionNotify - "
-                           "Conversion to format %ld refused.\n",
-                           event.xselection.target);
+                           "Conversion to format %d refused.\n",
+                           selection_notify->target);
                     return WIN_XEVENTS_FAILED;
                 }
 
-            if (event.xselection.target == atomTargets) {
-              return winClipboardSelectionNotifyTargets(hwnd, iWindow, pDisplay, data, atoms);
-            }
-
-            /* Retrieve the selection data and delete the property */
-            iReturn = XGetWindowProperty(pDisplay,
-                                         iWindow,
-                                         atomLocalProperty,
-                                         0,
-                                         INT_MAX,
-                                         True,
-                                         AnyPropertyType,
-                                         &xtpText.encoding,
-                                         &xtpText.format,
-                                         &xtpText.nitems,
-                                         &ulReturnBytesLeft, &xtpText.value);
-            if (iReturn != Success) {
-                ErrorF("winClipboardFlushXEvents - SelectionNotify - "
-                       "XGetWindowProperty () failed, aborting: %d\n", iReturn);
-                goto winClipboardFlushXEvents_SelectionNotify_Done;
-            }
-
-            {
-                char *pszAtomName = NULL;
-
-                winDebug("SelectionNotify - returned data %lu left %lu\n",
-                         xtpText.nitems, ulReturnBytesLeft);
-                pszAtomName = XGetAtomName(pDisplay, xtpText.encoding);
-                winDebug("Notify atom name %s\n", pszAtomName);
-                XFree(pszAtomName);
-                pszAtomName = NULL;
-            }
-
-            if (data->fUseUnicode) {
-#ifdef X_HAVE_UTF8_STRING
-                /* Convert the text property to a text list */
-                iReturn = Xutf8TextPropertyToTextList(pDisplay,
-                                                      &xtpText,
-                                                      &ppszTextList, &iCount);
-#endif
-            }
-            else {
-                iReturn = XmbTextPropertyToTextList(pDisplay,
-                                                    &xtpText,
-                                                    &ppszTextList, &iCount);
-            }
-            if (iReturn == Success || iReturn > 0) {
-                /* Conversion succeeded or some unconvertible characters */
-                if (ppszTextList != NULL) {
-                    int i;
-                    int iReturnDataLen = 0;
-                    for (i = 0; i < iCount; i++) {
-                        iReturnDataLen += strlen(ppszTextList[i]);
-                    }
-                    pszReturnData = malloc(iReturnDataLen + 1);
-                    pszReturnData[0] = '\0';
-                    for (i = 0; i < iCount; i++) {
-                        strcat(pszReturnData, ppszTextList[i]);
-                    }
-                }
-                else {
-                    ErrorF("winClipboardFlushXEvents - SelectionNotify - "
-                           "X*TextPropertyToTextList list_return is NULL.\n");
-                    pszReturnData = malloc(1);
-                    pszReturnData[0] = '\0';
-                }
-            }
-            else {
-                ErrorF("winClipboardFlushXEvents - SelectionNotify - "
-                       "X*TextPropertyToTextList returned: ");
-                switch (iReturn) {
-                case XNoMemory:
-                    ErrorF("XNoMemory\n");
-                    break;
-                case XLocaleNotSupported:
-                    ErrorF("XLocaleNotSupported\n");
-                    break;
-                case XConverterNotFound:
-                    ErrorF("XConverterNotFound\n");
-                    break;
-                default:
-                    ErrorF("%d\n", iReturn);
-                    break;
-                }
-                pszReturnData = malloc(1);
-                pszReturnData[0] = '\0';
-            }
-
-            /* Free the data returned from XGetWindowProperty */
-            if (ppszTextList)
-                XFreeStringList(ppszTextList);
-            ppszTextList = NULL;
-            XFree(xtpText.value);
-            xtpText.value = NULL;
-            xtpText.nitems = 0;
-
-            /* Convert the X clipboard string to DOS format */
-            winClipboardUNIXtoDOS(&pszReturnData, strlen(pszReturnData));
-
-            if (data->fUseUnicode) {
-                /* Find out how much space needed to convert MBCS to Unicode */
-                int iUnicodeLen = MultiByteToWideChar(CP_UTF8,
-                                                  0,
-                                                  pszReturnData, -1, NULL, 0);
-
-                /* NOTE: iUnicodeLen includes space for null terminator */
-                pwszUnicodeStr = malloc(sizeof(wchar_t) * iUnicodeLen);
-                if (!pwszUnicodeStr) {
-                    ErrorF("winClipboardFlushXEvents - SelectionNotify "
-                           "malloc failed for pwszUnicodeStr, aborting.\n");
-
-                    /* Abort */
-                    fAbort = TRUE;
-                    goto winClipboardFlushXEvents_SelectionNotify_Done;
-                }
-
-                /* Do the actual conversion */
-                MultiByteToWideChar(CP_UTF8,
-                                    0,
-                                    pszReturnData,
-                                    -1, pwszUnicodeStr, iUnicodeLen);
-
-                /* Allocate global memory for the X clipboard data */
-                hGlobal = GlobalAlloc(GMEM_MOVEABLE,
-                                      sizeof(wchar_t) * iUnicodeLen);
-            }
-            else {
-                int iConvertDataLen = 0;
-                pszConvertData = strdup(pszReturnData);
-                iConvertDataLen = strlen(pszConvertData) + 1;
-
-                /* Allocate global memory for the X clipboard data */
-                hGlobal = GlobalAlloc(GMEM_MOVEABLE, iConvertDataLen);
-            }
-
-            free(pszReturnData);
-
-            /* Check that global memory was allocated */
-            if (!hGlobal) {
-                ErrorF("winClipboardFlushXEvents - SelectionNotify "
-                       "GlobalAlloc failed, aborting: %08x\n", (unsigned int)GetLastError());
-
-                /* Abort */
-                fAbort = TRUE;
-                goto winClipboardFlushXEvents_SelectionNotify_Done;
-            }
-
-            /* Obtain a pointer to the global memory */
-            pszGlobalData = GlobalLock(hGlobal);
-            if (pszGlobalData == NULL) {
-                ErrorF("winClipboardFlushXEvents - Could not lock global "
-                       "memory for clipboard transfer\n");
-
-                /* Abort */
-                fAbort = TRUE;
-                goto winClipboardFlushXEvents_SelectionNotify_Done;
+            if (selection_notify->target == atomTargets) {
+              return winClipboardSelectionNotifyTargets(hwnd, iWindow, conn, data, atoms);
             }
 
-            /* Copy the returned string into the global memory */
-            if (data->fUseUnicode) {
-                wcscpy((wchar_t *)pszGlobalData, pwszUnicodeStr);
-                free(pwszUnicodeStr);
-                pwszUnicodeStr = NULL;
-            }
-            else {
-                strcpy(pszGlobalData, pszConvertData);
-                free(pszConvertData);
-                pszConvertData = NULL;
-            }
-
-            /* Release the pointer to the global memory */
-            GlobalUnlock(hGlobal);
-            pszGlobalData = NULL;
-
-            /* Push the selection data to the Windows clipboard */
-            if (data->fUseUnicode)
-                SetClipboardData(CF_UNICODETEXT, hGlobal);
-            else
-                SetClipboardData(CF_TEXT, hGlobal);
+            return winClipboardSelectionNotifyData(hwnd, iWindow, conn, data, atoms);
+        }
 
-            /* Flag that SetClipboardData has been called */
-            fSetClipboardData = FALSE;
+        case XCB_SELECTION_CLEAR:
+            winDebug("SelectionClear - doing nothing\n");
+            break;
 
-            /*
-             * NOTE: Do not try to free pszGlobalData, it is owned by
-             * Windows after the call to SetClipboardData ().
-             */
+        case XCB_PROPERTY_NOTIFY:
+        {
+            xcb_property_notify_event_t *property_notify = (xcb_property_notify_event_t *)event;
 
- winClipboardFlushXEvents_SelectionNotify_Done:
-            /* Free allocated resources */
-            if (ppszTextList)
-                XFreeStringList(ppszTextList);
-            if (xtpText.value) {
-                XFree(xtpText.value);
-                xtpText.value = NULL;
-                xtpText.nitems = 0;
-            }
-            free(pszConvertData);
-            free(pwszUnicodeStr);
-            if (hGlobal && pszGlobalData)
-                GlobalUnlock(hGlobal);
-            if (fSetClipboardData) {
-                SetClipboardData(CF_UNICODETEXT, NULL);
-                SetClipboardData(CF_TEXT, NULL);
-            }
-            return WIN_XEVENTS_NOTIFY_DATA;
+            /* If INCR is in progress, collect the data */
+            if (data->incr &&
+                (property_notify->atom == atoms->atomLocalProperty) &&
+                (property_notify->state == XCB_PROPERTY_NEW_VALUE))
+                return winClipboardSelectionNotifyData(hwnd, iWindow, conn, data, atoms);
 
-        case SelectionClear:
-            winDebug("SelectionClear - doing nothing\n");
             break;
+        }
 
-        case PropertyNotify:
+        case XCB_MAPPING_NOTIFY:
             break;
 
-        case MappingNotify:
+        case 0:
+            /* This is just laziness rather than making sure we used _checked everywhere */
+            {
+                xcb_generic_error_t *err = (xcb_generic_error_t *)event;
+                ErrorF("winClipboardFlushXEvents - Error code: %i, ID: 0x%08x, "
+                       "Major opcode: %i, Minor opcode: %i\n",
+                       err->error_code, err->resource_id,
+                       err->major_code, err->minor_code);
+            }
             break;
 
         default:
-            if (event.type == XFixesSetSelectionOwnerNotify + xfixes_event_base) {
-                XFixesSelectionNotifyEvent *e =
-                    (XFixesSelectionNotifyEvent *) & event;
-
+            if ((event->response_type & ~0x80) == XCB_XFIXES_SELECTION_EVENT_SET_SELECTION_OWNER + xfixes_event_base) {
+                xcb_xfixes_selection_notify_event_t *e = (xcb_xfixes_selection_notify_event_t *)event;
                 winDebug("winClipboardFlushXEvents - XFixesSetSelectionOwnerNotify\n");
 
                 /* Save selection owners for monitored selections, ignore other selections */
-                if ((e->selection == XA_PRIMARY) && fPrimarySelection) {
+                if ((e->selection == XCB_ATOM_PRIMARY) && fPrimarySelection) {
                     MonitorSelection(e, CLIP_OWN_PRIMARY);
                 }
                 else if (e->selection == atomClipboard) {
@@ -800,9 +757,8 @@ winClipboardFlushXEvents(HWND hwnd,
                     break;
 
                 /* Selection is being disowned */
-                if (e->owner == None) {
-                    winDebug
-                        ("winClipboardFlushXEvents - No window, returning.\n");
+                if (e->owner == XCB_NONE) {
+                    winDebug("winClipboardFlushXEvents - No window, returning.\n");
                     break;
                 }
 
@@ -849,15 +805,25 @@ winClipboardFlushXEvents(HWND hwnd,
                     break;
                 }
             }
-            /* XFixesSelectionWindowDestroyNotifyMask */
-            /* XFixesSelectionClientCloseNotifyMask */
+            /* XCB_XFIXES_SELECTION_EVENT_SELECTION_WINDOW_DESTROY */
+            /* XCB_XFIXES_SELECTION_EVENT_SELECTION_CLIENT_CLOSE */
             else {
                 ErrorF("winClipboardFlushXEvents - unexpected event type %d\n",
-                       event.type);
+                       event->response_type);
             }
             break;
         }
+
+        /* I/O errors etc. */
+        {
+            int e = xcb_connection_has_error(conn);
+            if (e) {
+                ErrorF("winClipboardFlushXEvents - Fatal error %d on xcb connection\n", e);
+                break;
+            }
+        }
     }
 
     return WIN_XEVENTS_SUCCESS;
+
 }
diff --git a/hw/xwin/winclipboard/xwinclip.c b/hw/xwin/winclipboard/xwinclip.c
index 856c4dd..4df8cd4 100644
--- a/hw/xwin/winclipboard/xwinclip.c
+++ b/hw/xwin/winclipboard/xwinclip.c
@@ -35,27 +35,10 @@
 #include <xwin-config.h>
 #endif
 
-/*
- * Including any server header might define the macro _XSERVER64 on 64 bit machines.
- * That macro must _NOT_ be defined for Xlib client code, otherwise bad things happen.
- * So let's undef that macro if necessary.
- */
-#ifdef _XSERVER64
-#undef _XSERVER64
-#endif
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
-/* X headers */
-#include <X11/Xlib.h>
-#ifdef X_LOCALE
-#include <X11/Xlocale.h>
-#else /* X_LOCALE */
-#include <locale.h>
-#endif /* X_LOCALE */
-
 #include "winclipboard.h"
 
 /*
@@ -67,7 +50,6 @@ main (int argc, char *argv[])
 {
   int			i;
   char			*pszDisplay = NULL;
-  int			fUnicodeClipboard = 1;
 
   /* Parse command-line parameters */
   for (i = 1; i < argc; ++i)
@@ -85,17 +67,10 @@ main (int argc, char *argv[])
 	  continue;
 	}
 
-      /* Look for -nounicodeclipboard */
-      if (!strcmp (argv[i], "-nounicodeclipboard"))
-	{
-	  fUnicodeClipboard = 0;
-	  continue;
-	}
-
       /* Look for -noprimary */
       if (!strcmp (argv[i], "-noprimary"))
 	{
-	  fPrimarySelection = False;
+	  fPrimarySelection = 0;
 	  continue;
 	}
 
@@ -104,31 +79,7 @@ main (int argc, char *argv[])
       exit (1);
     }
 
-  /* Do we have Unicode support? */
-  if (fUnicodeClipboard)
-    {
-      printf ("Unicode clipboard I/O\n");
-    }
-  else
-    {
-      printf ("Non Unicode clipboard I/O\n");
-    }
-
-  /* Apply locale specified in the LANG environment variable */
-  if (!setlocale (LC_ALL, ""))
-    {
-      printf ("setlocale() error\n");
-      exit (1);
-    }
-
-  /* See if X supports the current locale */
-  if (XSupportsLocale () == False)
-    {
-      printf ("Locale not supported by X, falling back to 'C' locale.\n");
-      setlocale(LC_ALL, "C");
-    }
-
-  winClipboardProc(fUnicodeClipboard, pszDisplay);
+  winClipboardProc(pszDisplay, NULL /* Use XAUTHORITY for auth data */);
 
   return 0;
 }
diff --git a/hw/xwin/winclipboard/xwinclip.man b/hw/xwin/winclipboard/xwinclip.man
index 73dfc8a..f0c2fc3 100644
--- a/hw/xwin/winclipboard/xwinclip.man
+++ b/hw/xwin/winclipboard/xwinclip.man
@@ -27,9 +27,6 @@ Do \fINOT\fP run \fIxwinclip\fP unless \fIXWin(1)\fP has been started with the -
 .B \-display [display]
 Specifies the X server display to connect to.
 .TP 8
-.B \-nounicodeclipboard
-Do not use unicode text on the clipboard.
-.TP 8
 .B \-noprimary
 Do not monitor the PRIMARY selection.
 
@@ -39,19 +36,20 @@ XWin(1)
 .SH BUGS
 Only text clipboard contents are supported.
 
-The INCR (Incrememntal transfer) clipboard protocol for clipboard contents larger than the maximum size of an
-X request is not supported.
+The INCR (Incremental transfer) clipboard protocol for clipboard contents larger than the maximum size of an X
+request (approximately 256K) is only supported for X -> Windows clipboard transfers.
 
 Some X clients, notably ones written in Tcl/Tk, do not re-assert ownership of the PRIMARY selection or update
-it's timestamp when it's contents change, which currently prevents \fIxwinclip\fP from correctly noticing that
+its timestamp when its contents change, which currently prevents \fIxwinclip\fP from correctly noticing that
 the PRIMARY selection's contents have changed.
 
 Windows clipboard rendering is synchronous in the WM_RENDER*FORMAT message (that is, we must have placed the
 contents onto the clipboard by the time we return from processing this message), but we must wait for the X
 client which owns the selection to convert the selection to our requested format.  This is currently achieved
-using a fixed timeout of one second.
+using a fixed timeout.  After requesting conversion of the selection, if no events are received from the X
+client which owns the selection for one second, the conversion is assumed to have failed.
 
-The XWin(1) server should indicate somehow (by placing an atom on the root window?) that it is running with it's
+The XWin(1) server should indicate somehow (by placing an atom on the root window?) that it is running with its
 internal clipboard integration enabled, and xwinclip should notice this and exit with an appropriate error.
 
 Probably many other bugs.
diff --git a/hw/xwin/winclipboardinit.c b/hw/xwin/winclipboardinit.c
index 8aef8fe..dbce0bc 100644
--- a/hw/xwin/winclipboardinit.c
+++ b/hw/xwin/winclipboardinit.c
@@ -38,6 +38,7 @@
 #include "win.h"
 #include "winclipboard/winclipboard.h"
 #include "windisplay.h"
+#include "winauth.h"
 
 #define WIN_CLIPBOARD_RETRIES			40
 #define WIN_CLIPBOARD_DELAY			1
@@ -55,6 +56,7 @@ static void *
 winClipboardThreadProc(void *arg)
 {
   char szDisplay[512];
+  xcb_auth_info_t *auth_info;
   int clipboardRestarts = 0;
 
   while (1)
@@ -63,9 +65,6 @@ winClipboardThreadProc(void *arg)
 
       ++clipboardRestarts;
 
-      /* Use our generated cookie for authentication */
-      winSetAuthorization();
-
       /* Setup the display connection string */
       /*
        * NOTE: Always connect to screen 0 since we require that screen
@@ -82,7 +81,10 @@ winClipboardThreadProc(void *arg)
       /* Flag that clipboard client has been launched */
       g_fClipboardStarted = TRUE;
 
-      fShutdown = winClipboardProc(g_fUnicodeClipboard, szDisplay);
+      /* Use our generated cookie for authentication */
+      auth_info = winGetXcbAuthInfo();
+
+      fShutdown = winClipboardProc(szDisplay, auth_info);
 
       /* Flag that clipboard client has stopped */
       g_fClipboardStarted = FALSE;
@@ -106,7 +108,7 @@ winClipboardThreadProc(void *arg)
 }
 
 /*
- * Intialize the Clipboard module
+ * Initialize the Clipboard module
  */
 
 Bool
diff --git a/hw/xwin/winconfig.c b/hw/xwin/winconfig.c
index 31894d2..4f16b21 100644
--- a/hw/xwin/winconfig.c
+++ b/hw/xwin/winconfig.c
@@ -317,7 +317,7 @@ winConfigKeyboard(DeviceIntPtr pDevice)
 
         deviceIdentifier = layoutNum >> 16;
         for (pass = 0; pass < 2; pass++) {
-            /* If we didn't find an exact match for the input locale identifer,
+            /* If we didn't find an exact match for the input locale identifier,
                try to find an match on the language identifier part only  */
             if (pass == 1)
                 layoutNum = (layoutNum & 0xffff);
@@ -623,7 +623,7 @@ winSetBoolOption(void *optlist, const char *name, int deflt)
     o.name = name;
     o.type = OPTV_BOOLEAN;
     if (ParseOptionValue(-1, optlist, &o))
-        deflt = o.value.bool;
+        deflt = o.value.boolean;
     return deflt;
 }
 
@@ -918,7 +918,7 @@ ParseOptionValue(int scrnIndex, void *options, OptionInfoPtr p)
         }
         if ((s = winFindOptionValue(options, newn)) != NULL) {
             if (GetBoolValue(&opt, s)) {
-                p->value.bool = !opt.value.bool;
+                p->value.boolean = !opt.value.boolean;
                 p->found = TRUE;
             }
             else {
@@ -968,25 +968,25 @@ static Bool
 GetBoolValue(OptionInfoPtr p, const char *s)
 {
     if (*s == 0) {
-        p->value.bool = TRUE;
+        p->value.boolean = TRUE;
     }
     else {
         if (winNameCompare(s, "1") == 0)
-            p->value.bool = TRUE;
+            p->value.boolean = TRUE;
         else if (winNameCompare(s, "on") == 0)
-            p->value.bool = TRUE;
+            p->value.boolean = TRUE;
         else if (winNameCompare(s, "true") == 0)
-            p->value.bool = TRUE;
+            p->value.boolean = TRUE;
         else if (winNameCompare(s, "yes") == 0)
-            p->value.bool = TRUE;
+            p->value.boolean = TRUE;
         else if (winNameCompare(s, "0") == 0)
-            p->value.bool = FALSE;
+            p->value.boolean = FALSE;
         else if (winNameCompare(s, "off") == 0)
-            p->value.bool = FALSE;
+            p->value.boolean = FALSE;
         else if (winNameCompare(s, "false") == 0)
-            p->value.bool = FALSE;
+            p->value.boolean = FALSE;
         else if (winNameCompare(s, "no") == 0)
-            p->value.bool = FALSE;
+            p->value.boolean = FALSE;
     }
     return TRUE;
 }
diff --git a/hw/xwin/winconfig.h b/hw/xwin/winconfig.h
index f079368..bd1f596 100644
--- a/hw/xwin/winconfig.h
+++ b/hw/xwin/winconfig.h
@@ -199,7 +199,7 @@ typedef union {
     unsigned long num;
     char *str;
     double realnum;
-    Bool bool;
+    Bool boolean;
     OptFrequency freq;
 } ValueUnion;
 
diff --git a/hw/xwin/wincreatewnd.c b/hw/xwin/wincreatewnd.c
index daa6daa..444e843 100644
--- a/hw/xwin/wincreatewnd.c
+++ b/hw/xwin/wincreatewnd.c
@@ -72,18 +72,12 @@ winCreateBoundingWindowFullScreen(ScreenPtr pScreen)
     wc.cbClsExtra = 0;
     wc.cbWndExtra = 0;
     wc.hInstance = g_hInstance;
-    wc.hIcon =
-        (HICON) LoadImage(g_hInstance, MAKEINTRESOURCE(IDI_XWIN), IMAGE_ICON,
-                          GetSystemMetrics(SM_CXICON),
-                          GetSystemMetrics(SM_CYICON), 0);
+    wc.hIcon = pScreenInfo->hIcon;
     wc.hCursor = 0;
     wc.hbrBackground = 0;
     wc.lpszMenuName = NULL;
     wc.lpszClassName = WINDOW_CLASS;
-    wc.hIconSm =
-        (HICON) LoadImage(g_hInstance, MAKEINTRESOURCE(IDI_XWIN), IMAGE_ICON,
-                          GetSystemMetrics(SM_CXSMICON),
-                          GetSystemMetrics(SM_CYSMICON), LR_DEFAULTSIZE);
+    wc.hIconSm = pScreenInfo->hIconSm;
     RegisterClassEx(&wc);
 
     /* Set display and screen-specific tooltip text */
@@ -152,9 +146,6 @@ winCreateBoundingWindowWindowed(ScreenPtr pScreen)
 
     /* Decorated or undecorated window */
     if (pScreenInfo->fDecoration
-#ifdef XWIN_MULTIWINDOWEXTWM
-        && !pScreenInfo->fMWExtWM
-#endif
         && !pScreenInfo->fRootless
         && !pScreenInfo->fMultiWindow
         ) {
@@ -182,18 +173,12 @@ winCreateBoundingWindowWindowed(ScreenPtr pScreen)
     wc.cbClsExtra = 0;
     wc.cbWndExtra = 0;
     wc.hInstance = g_hInstance;
-    wc.hIcon =
-        (HICON) LoadImage(g_hInstance, MAKEINTRESOURCE(IDI_XWIN), IMAGE_ICON,
-                          GetSystemMetrics(SM_CXICON),
-                          GetSystemMetrics(SM_CYICON), 0);
+    wc.hIcon = pScreenInfo->hIcon;
     wc.hCursor = 0;
     wc.hbrBackground = (HBRUSH) GetStockObject(WHITE_BRUSH);
     wc.lpszMenuName = NULL;
     wc.lpszClassName = WINDOW_CLASS;
-    wc.hIconSm =
-        (HICON) LoadImage(g_hInstance, MAKEINTRESOURCE(IDI_XWIN), IMAGE_ICON,
-                          GetSystemMetrics(SM_CXSMICON),
-                          GetSystemMetrics(SM_CYSMICON), LR_DEFAULTSIZE);
+    wc.hIconSm = pScreenInfo->hIconSm;
     RegisterClassEx(&wc);
 
     /* Get size of work area */
@@ -214,9 +199,6 @@ winCreateBoundingWindowWindowed(ScreenPtr pScreen)
 
     /* Clean up the scrollbars flag, if necessary */
     if ((!pScreenInfo->fDecoration
-#ifdef XWIN_MULTIWINDOWEXTWM
-         || pScreenInfo->fMWExtWM
-#endif
          || pScreenInfo->fRootless
          || pScreenInfo->fMultiWindow
         )
@@ -227,7 +209,7 @@ winCreateBoundingWindowWindowed(ScreenPtr pScreen)
 
     /* Did the user specify a height and width? */
     if (pScreenInfo->fUserGaveHeightAndWidth) {
-        /* User gave a desired height and width, try to accomodate */
+        /* User gave a desired height and width, try to accommodate */
 #if CYGDEBUG
         winDebug("winCreateBoundingWindowWindowed - User gave height "
                  "and width\n");
@@ -235,9 +217,6 @@ winCreateBoundingWindowWindowed(ScreenPtr pScreen)
 
         /* Adjust the window width and height for borders and title bar */
         if (pScreenInfo->fDecoration
-#ifdef XWIN_MULTIWINDOWEXTWM
-            && !pScreenInfo->fMWExtWM
-#endif
             && !pScreenInfo->fRootless
             && !pScreenInfo->fMultiWindow
             ) {
@@ -284,9 +263,6 @@ winCreateBoundingWindowWindowed(ScreenPtr pScreen)
 
     /* Make sure window is no bigger than work area */
     if (TRUE
-#ifdef XWIN_MULTIWINDOWEXTWM
-        && !pScreenInfo->fMWExtWM
-#endif
         && !pScreenInfo->fMultiWindow
         ) {
         /* Trim window width to fit work area */
@@ -419,9 +395,6 @@ winCreateBoundingWindowWindowed(ScreenPtr pScreen)
 
     /* Show the window */
     if (FALSE
-#ifdef XWIN_MULTIWINDOWEXTWM
-        || pScreenInfo->fMWExtWM
-#endif
         || pScreenInfo->fMultiWindow
         ) {
         pScreenPriv->fRootWindowShown = FALSE;
@@ -436,9 +409,6 @@ winCreateBoundingWindowWindowed(ScreenPtr pScreen)
 
     /* Attempt to bring our window to the top of the display */
     if (TRUE
-#ifdef XWIN_MULTIWINDOWEXTWM
-        && !pScreenInfo->fMWExtWM
-#endif
         && !pScreenInfo->fRootless
         && !pScreenInfo->fMultiWindow
         ) {
diff --git a/hw/xwin/wincursor.c b/hw/xwin/wincursor.c
index 2afcf9f..3fc050b 100644
--- a/hw/xwin/wincursor.c
+++ b/hw/xwin/wincursor.c
@@ -173,7 +173,7 @@ winLoadCursor(ScreenPtr pScreen, CursorPtr pCursor, int screen)
     dBackY = BRIGHTNESS(pCursor->back);
     fReverse = dForeY < dBackY;
 
-    /* Check wether the X11 cursor is bigger than the win32 cursor */
+    /* Check whether the X11 cursor is bigger than the win32 cursor */
     if (pScreenPriv->cursor.sm_cx < pCursor->bits->width ||
         pScreenPriv->cursor.sm_cy < pCursor->bits->height) {
         winErrorFVerb(3,
diff --git a/hw/xwin/winengine.c b/hw/xwin/winengine.c
index 2336442..f822324 100644
--- a/hw/xwin/winengine.c
+++ b/hw/xwin/winengine.c
@@ -147,9 +147,6 @@ winSetEngine(ScreenPtr pScreen)
 
     /* ShadowGDI is the only engine that supports Multi Window Mode */
     if (FALSE
-#ifdef XWIN_MULTIWINDOWEXTWM
-        || pScreenInfo->fMWExtWM
-#endif
         || pScreenInfo->fMultiWindow
         ) {
         winErrorFVerb(2,
diff --git a/hw/xwin/winglobals.c b/hw/xwin/winglobals.c
index d1a0d45..29abe19 100644
--- a/hw/xwin/winglobals.c
+++ b/hw/xwin/winglobals.c
@@ -59,6 +59,7 @@ HWND g_hDlgAbout = NULL;
 const char *g_pszQueryHost = NULL;
 Bool g_fXdmcpEnabled = FALSE;
 Bool g_fAuthEnabled = FALSE;
+Bool g_fCompositeAlpha = FALSE;
 HICON g_hIconX = NULL;
 HICON g_hSmallIconX = NULL;
 
@@ -89,7 +90,6 @@ winDispatchProcPtr winProcEstablishConnectionOrig = NULL;
  * Clipboard variables
  */
 
-Bool g_fUnicodeClipboard = TRUE;
 Bool g_fClipboard = TRUE;
 Bool g_fClipboardStarted = FALSE;
 
diff --git a/hw/xwin/winglobals.h b/hw/xwin/winglobals.h
index 250085f..29535f0 100644
--- a/hw/xwin/winglobals.h
+++ b/hw/xwin/winglobals.h
@@ -50,6 +50,7 @@ extern Bool g_fLogInited;
 
 extern Bool g_fAuthEnabled;
 extern Bool g_fXdmcpEnabled;
+extern Bool g_fCompositeAlpha;
 
 extern Bool g_fNoHelpMessageBox;
 extern Bool g_fNativeGl;
@@ -69,7 +70,6 @@ typedef int (*winDispatchProcPtr) (ClientPtr);
  * Wrapped DIX functions
  */
 extern winDispatchProcPtr winProcEstablishConnectionOrig;
-extern Bool g_fUnicodeClipboard;
 extern Bool g_fClipboard;
 extern Bool g_fClipboardStarted;
 
@@ -82,10 +82,6 @@ extern DWORD g_dwCurrentThreadID;
 extern Bool g_fKeyboardHookLL;
 extern Bool g_fButton[3];
 
-#ifdef XWIN_MULTIWINDOWEXTWM
-extern Bool g_fNoConfigureWindow;
-#endif
-
 extern pthread_mutex_t g_pmTerminating;
 
 #endif                          /* WINGLOBALS_H */
diff --git a/hw/xwin/winkeynames.h b/hw/xwin/winkeynames.h
index bfed9d4..2ac1c8c 100644
--- a/hw/xwin/winkeynames.h
+++ b/hw/xwin/winkeynames.h
@@ -42,7 +42,7 @@
  *       Set2 sends a makecode for keypress, and the same code prefixed by a
  *       F0 for keyrelease. This is a little bit ugly to handle. Thus we use
  *       here for X386 the PC/XT compatible Set1. This set uses 8bit scancodes.
- *       Bit 7 ist set if the key is released. The code E0 switches to a
+ *       Bit 7 is set if the key is released. The code E0 switches to a
  *       different meaning to add the new MF cursorkeys, while not breaking old
  *       applications. E1 is another special prefix. Since I assume that there
  *       will be further versions of PC/XT scancode compatible keyboards, we
@@ -150,7 +150,7 @@
 #define KEY_F12          /* F12                   0x58  */   88
 
 #define KEY_Prefix0      /* special               0x60  */   96
-#define KEY_Prefix1      /* specail               0x61  */   97
+#define KEY_Prefix1      /* special               0x61  */   97
 
 /*
  * The 'scancodes' below are generated by the server, because the MF101/102
@@ -191,8 +191,8 @@
 #define KEY_BSlash2      /* \           _         0xcb  */  203
 
 #define KEY_Mute         /* Audio Mute                  */  152
-#define KEY_AudioLower   /* Audio Lower                 */  168
-#define KEY_AudioRaise   /* Audio Raise                 */  166
+#define KEY_AudioLower   /* Audio Lower                 */  166
+#define KEY_AudioRaise   /* Audio Raise                 */  168
 
 #define KEY_NEXTSONG     /* Media next                  */  145
 #define KEY_PLAYPAUSE    /* Media play/pause toggle     */  154
diff --git a/hw/xwin/winlayouts.h b/hw/xwin/winlayouts.h
index c7905e3..904410a 100644
--- a/hw/xwin/winlayouts.h
+++ b/hw/xwin/winlayouts.h
@@ -65,6 +65,7 @@ WinKBLayoutRec winKBLayouts[] = {
     {0x0000040b, -1, "pc105", "fi", NULL, NULL, "Finnish"},
     {0x0000040c, -1, "pc105", "fr", NULL, NULL, "French (Standard)"},
     {0x0000080c, -1, "pc105", "be", NULL, NULL, "French (Belgian)"},
+    {0x0001080c, -1, "pc105", "be", NULL, NULL, "Belgian (Comma)"},
     {0x00000c0c, -1, "pc105", "ca", "fr-legacy", NULL,
      "French (Canada, Legacy)"},
     {0x0000100c, -1, "pc105", "ch", "fr", NULL, "French (Switzerland)"},
@@ -82,6 +83,7 @@ WinKBLayoutRec winKBLayouts[] = {
     {0x00000416, -1, "pc105", "br", NULL, NULL, "Portuguese (Brazil,ABNT)"},
     {0x00010416, -1, "abnt2", "br", NULL, NULL, "Portuguese (Brazil,ABNT2)"},
     {0x00000816, -1, "pc105", "pt", NULL, NULL, "Portuguese (Portugal)"},
+    {0x00000419, -1, "pc105", "ru", NULL, NULL, "Russian"},
     {0x0000041a, -1, "pc105", "hr", NULL, NULL, "Croatian"},
     {0x0000041d, -1, "pc105", "se", NULL, NULL, "Swedish (Sweden)"},
     {0x0000041f, -1, "pc105", "tr", NULL, NULL, "Turkish (Q)"},
diff --git a/hw/xwin/winmonitors.c b/hw/xwin/winmonitors.c
index 955fb92..5ff5653 100644
--- a/hw/xwin/winmonitors.c
+++ b/hw/xwin/winmonitors.c
@@ -39,7 +39,7 @@ from The Open Group.
  */
 
 static
-    wBOOL CALLBACK
+WINBOOL CALLBACK
 getMonitorInfo(HMONITOR hMonitor, HDC hdc, LPRECT rect, LPARAM _data)
 {
     struct GetMonitorInfoData *data = (struct GetMonitorInfoData *) _data;
@@ -70,5 +70,5 @@ QueryMonitor(int i, struct GetMonitorInfoData *data)
     /* query information */
     EnumDisplayMonitors(NULL, NULL, getMonitorInfo, (LPARAM) data);
 
-    return TRUE;
+    return data->bMonitorSpecifiedExists;
 }
diff --git a/hw/xwin/winmouse.c b/hw/xwin/winmouse.c
index bbe21cb..aad99d9 100644
--- a/hw/xwin/winmouse.c
+++ b/hw/xwin/winmouse.c
@@ -100,7 +100,7 @@ winMouseProc(DeviceIntPtr pDeviceInt, int iState)
          */
         map = malloc(sizeof(CARD8) * (lngMouseButtons + lngWheelEvents + 1));
 
-        /* initalize button map */
+        /* initialize button map */
         map[0] = 0;
         for (i = 1; i <= lngMouseButtons + lngWheelEvents; i++)
             map[i] = i;
diff --git a/hw/xwin/winmultiwindowicons.c b/hw/xwin/winmultiwindowicons.c
index c43c298..0ef666d 100644
--- a/hw/xwin/winmultiwindowicons.c
+++ b/hw/xwin/winmultiwindowicons.c
@@ -40,7 +40,6 @@
 #include <stdbool.h>
 
 #include <X11/Xwindows.h>
-#include <X11/Xlib.h>
 #include <xcb/xcb.h>
 #include <xcb/xcb_icccm.h>
 #include <xcb/xcb_image.h>
@@ -347,7 +346,7 @@ NetWMToWinIcon(int bpp, uint32_t * icon)
         osvi.dwMajorVersion = 5;
         osvi.dwMinorVersion = 1;
 
-        /* Windows versions later than XP have icon alpha channel suport, 2000 does not */
+        /* Windows versions later than XP have icon alpha channel support, 2000 does not */
         VER_SET_CONDITION(dwlConditionMask, VER_MAJORVERSION,
                           VER_GREATER_EQUAL);
         VER_SET_CONDITION(dwlConditionMask, VER_MINORVERSION,
@@ -582,7 +581,7 @@ winXIconToHICON(xcb_connection_t *conn, xcb_window_t id, int iconSize)
  */
 
 void
-winUpdateIcon(HWND hWnd, xcb_connection_t *conn, Window id, HICON hIconNew)
+winUpdateIcon(HWND hWnd, xcb_connection_t *conn, xcb_window_t id, HICON hIconNew)
 {
     HICON hIcon, hIconSmall = NULL, hIconOld;
 
diff --git a/hw/xwin/winmultiwindowicons.h b/hw/xwin/winmultiwindowicons.h
index 87ba8d1..8b077ab 100644
--- a/hw/xwin/winmultiwindowicons.h
+++ b/hw/xwin/winmultiwindowicons.h
@@ -30,7 +30,7 @@
 #include <xcb/xcb.h>
 
 void
- winUpdateIcon(HWND hWnd, xcb_connection_t *conn, Window id, HICON hIconNew);
+ winUpdateIcon(HWND hWnd, xcb_connection_t *conn, xcb_window_t id, HICON hIconNew);
 
 void
  winInitGlobalIcons(void);
diff --git a/hw/xwin/winmultiwindowwindow.c b/hw/xwin/winmultiwindowwindow.c
index 4ec5634..5b9b74e 100644
--- a/hw/xwin/winmultiwindowwindow.c
+++ b/hw/xwin/winmultiwindowwindow.c
@@ -507,7 +507,7 @@ winCreateWindowsWindow(WindowPtr pWin)
        make sure the window actually ends up somewhere where it will be visible
 
        To handle arrangements of monitors which form a non-rectangular virtual
-       desktop, check if the window will end up with it's top-left corner on any
+       desktop, check if the window will end up with its top-left corner on any
        monitor
     */
     if (pWin->drawable.class != InputOnly) {
@@ -551,7 +551,7 @@ winCreateWindowsWindow(WindowPtr pWin)
 
     /*
        Calculate the window coordinates containing the requested client area,
-       being careful to preseve CW_USEDEFAULT
+       being careful to preserve CW_USEDEFAULT
      */
     rc.top = (iY != CW_USEDEFAULT) ? iY : 0;
     rc.left = (iX != CW_USEDEFAULT) ? iX : 0;
@@ -751,7 +751,7 @@ winReorderWindowsMultiWindow(void)
     WindowPtr pWin = NULL;
     WindowPtr pWinSib = NULL;
     XID vlist[2];
-    static Bool fRestacking = FALSE;    /* Avoid recusive calls to this function */
+    static Bool fRestacking = FALSE; /* Avoid recursive calls to this function */
     DWORD dwCurrentProcessID = GetCurrentProcessId();
     DWORD dwWindowProcessID = 0;
 
@@ -760,7 +760,7 @@ winReorderWindowsMultiWindow(void)
 #endif
 
     if (fRestacking) {
-        /* It is a recusive call so immediately exit */
+        /* It is a recursive call so immediately exit */
 #if CYGWINDOWING_DEBUG
         ErrorF("winReorderWindowsMultiWindow - "
                "exit because fRestacking == TRUE\n");
@@ -960,3 +960,259 @@ winAdjustXWindow(WindowPtr pWin, HWND hwnd)
 #undef WIDTH
 #undef HEIGHT
 }
+
+/*
+  Helper function for creating a DIB to back a pixmap
+ */
+static HBITMAP winCreateDIB(ScreenPtr pScreen, int width, int height, int bpp, void **ppvBits, BITMAPINFOHEADER **ppbmih)
+{
+    winScreenPriv(pScreen);
+    BITMAPV4HEADER *pbmih = NULL;
+    HBITMAP hBitmap = NULL;
+
+    /* Allocate bitmap info header */
+    pbmih = malloc(sizeof(BITMAPV4HEADER) + 256 * sizeof(RGBQUAD));
+    if (pbmih == NULL) {
+        ErrorF("winCreateDIB: malloc() failed\n");
+        return NULL;
+    }
+    memset(pbmih, 0, sizeof(BITMAPV4HEADER) + 256 * sizeof(RGBQUAD));
+
+    /* Describe bitmap to be created */
+    pbmih->bV4Size = sizeof(BITMAPV4HEADER);
+    pbmih->bV4Width = width;
+    pbmih->bV4Height = -height;  /* top-down bitmap */
+    pbmih->bV4Planes = 1;
+    pbmih->bV4BitCount = bpp;
+    if (bpp == 1) {
+        RGBQUAD *bmiColors = (RGBQUAD *)((char *)pbmih + sizeof(BITMAPV4HEADER));
+        pbmih->bV4V4Compression = BI_RGB;
+        bmiColors[1].rgbBlue = 255;
+        bmiColors[1].rgbGreen = 255;
+        bmiColors[1].rgbRed = 255;
+    }
+    else if (bpp == 8) {
+        pbmih->bV4V4Compression = BI_RGB;
+        pbmih->bV4ClrUsed = 0;
+    }
+    else if (bpp == 16) {
+        pbmih->bV4V4Compression = BI_RGB;
+        pbmih->bV4ClrUsed = 0;
+    }
+    else if (bpp == 32) {
+        pbmih->bV4V4Compression = BI_BITFIELDS;
+        pbmih->bV4RedMask = pScreenPriv->dwRedMask;
+        pbmih->bV4GreenMask = pScreenPriv->dwGreenMask;
+        pbmih->bV4BlueMask = pScreenPriv->dwBlueMask;
+        pbmih->bV4AlphaMask = 0;
+    }
+    else {
+        ErrorF("winCreateDIB: %d bpp unhandled\n", bpp);
+    }
+
+    /* Create a DIB with a bit pointer */
+    hBitmap = CreateDIBSection(NULL,
+                               (BITMAPINFO *) pbmih,
+                               DIB_RGB_COLORS, ppvBits, NULL, 0);
+    if (hBitmap == NULL) {
+        ErrorF("winCreateDIB: CreateDIBSection() failed\n");
+        return NULL;
+    }
+
+    /* Store the address of the BMIH in the ppbmih parameter */
+    *ppbmih = (BITMAPINFOHEADER *)pbmih;
+
+    winDebug("winCreateDIB: HBITMAP %p pBMIH %p pBits %p\n", hBitmap, pbmih, *ppvBits);
+
+    return hBitmap;
+}
+
+
+/*
+ * CreatePixmap - See Porting Layer Definition
+ */
+PixmapPtr
+winCreatePixmapMultiwindow(ScreenPtr pScreen, int width, int height, int depth,
+                           unsigned usage_hint)
+{
+    winPrivPixmapPtr pPixmapPriv = NULL;
+    PixmapPtr pPixmap = NULL;
+    int bpp, paddedwidth;
+
+    /* allocate Pixmap header and privates */
+    pPixmap = AllocatePixmap(pScreen, 0);
+    if (!pPixmap)
+        return NullPixmap;
+
+    bpp = BitsPerPixel(depth);
+    /*
+      DIBs have 4-byte aligned rows
+
+      paddedwidth is the width in bytes, padded to align
+
+      i.e. round up the number of bits used by a row so it is a multiple of 32,
+      then convert to bytes
+    */
+    paddedwidth = (((bpp * width) + 31) & ~31)/8;
+
+    /* setup Pixmap header */
+    pPixmap->drawable.type = DRAWABLE_PIXMAP;
+    pPixmap->drawable.class = 0;
+    pPixmap->drawable.pScreen = pScreen;
+    pPixmap->drawable.depth = depth;
+    pPixmap->drawable.bitsPerPixel = bpp;
+    pPixmap->drawable.id = 0;
+    pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
+    pPixmap->drawable.x = 0;
+    pPixmap->drawable.y = 0;
+    pPixmap->drawable.width = width;
+    pPixmap->drawable.height = height;
+    pPixmap->devKind = paddedwidth;
+    pPixmap->refcnt = 1;
+    pPixmap->devPrivate.ptr = NULL; // later set to pbBits
+    pPixmap->primary_pixmap = NULL;
+#ifdef COMPOSITE
+    pPixmap->screen_x = 0;
+    pPixmap->screen_y = 0;
+#endif
+    pPixmap->usage_hint = usage_hint;
+
+    /* Check for zero width or height pixmaps */
+    if (width == 0 || height == 0) {
+        /* DIBs with a dimension of 0 aren't permitted, so don't try to allocate
+           a DIB, just set fields and return */
+        return pPixmap;
+    }
+
+    /* Initialize pixmap privates */
+    pPixmapPriv = winGetPixmapPriv(pPixmap);
+    pPixmapPriv->hBitmap = NULL;
+    pPixmapPriv->pbBits = NULL;
+    pPixmapPriv->pbmih = NULL;
+
+    /* Create a DIB for the pixmap */
+    pPixmapPriv->hBitmap = winCreateDIB(pScreen, width, height, bpp, &pPixmapPriv->pbBits, &pPixmapPriv->pbmih);
+    pPixmapPriv->owned = TRUE;
+
+    winDebug("winCreatePixmap: pPixmap %p HBITMAP %p pBMIH %p pBits %p\n", pPixmap, pPixmapPriv->hBitmap, pPixmapPriv->pbmih, pPixmapPriv->pbBits);
+    /* XXX: so why do we need this in privates ??? */
+    pPixmap->devPrivate.ptr = pPixmapPriv->pbBits;
+
+    return pPixmap;
+}
+
+/*
+ * DestroyPixmap - See Porting Layer Definition
+ */
+Bool
+winDestroyPixmapMultiwindow(PixmapPtr pPixmap)
+{
+    winPrivPixmapPtr pPixmapPriv = NULL;
+
+    /* Bail early if there is not a pixmap to destroy */
+    if (pPixmap == NULL) {
+        return TRUE;
+    }
+
+    /* Decrement reference count, return if nonzero */
+    --pPixmap->refcnt;
+    if (pPixmap->refcnt != 0)
+        return TRUE;
+
+    winDebug("winDestroyPixmap: pPixmap %p\n", pPixmap);
+
+    /* Get a handle to the pixmap privates */
+    pPixmapPriv = winGetPixmapPriv(pPixmap);
+
+    /* Nothing to do if we don't own the DIB */
+    if (!pPixmapPriv->owned)
+        return TRUE;
+
+    /* Free GDI bitmap */
+    if (pPixmapPriv->hBitmap)
+        DeleteObject(pPixmapPriv->hBitmap);
+
+    /* Free the bitmap info header memory */
+    free(pPixmapPriv->pbmih);
+    pPixmapPriv->pbmih = NULL;
+
+    /* Free the pixmap memory */
+    free(pPixmap);
+    pPixmap = NULL;
+
+    return TRUE;
+}
+
+/*
+ * ModifyPixmapHeader - See Porting Layer Definition
+ */
+Bool
+winModifyPixmapHeaderMultiwindow(PixmapPtr pPixmap,
+                                 int width,
+                                 int height,
+                                 int depth,
+                                 int bitsPerPixel, int devKind, void *pPixData)
+{
+    int i;
+    winPrivPixmapPtr pPixmapPriv = winGetPixmapPriv(pPixmap);
+    Bool fResult;
+
+    /* reinitialize everything */
+    pPixmap->drawable.depth = depth;
+    pPixmap->drawable.bitsPerPixel = bitsPerPixel;
+    pPixmap->drawable.id = 0;
+    pPixmap->drawable.x = 0;
+    pPixmap->drawable.y = 0;
+    pPixmap->drawable.width = width;
+    pPixmap->drawable.height = height;
+    pPixmap->devKind = devKind;
+    pPixmap->refcnt = 1;
+    pPixmap->devPrivate.ptr = pPixData;
+    pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
+
+    /*
+      This can be used for some out-of-order initialization on the screen
+      pixmap, which is the only case we can properly support.
+    */
+
+    /* Look for which screen this pixmap corresponds to */
+    for (i = 0; i < screenInfo.numScreens; i++) {
+        ScreenPtr pScreen = screenInfo.screens[i];
+        winScreenPriv(pScreen);
+        winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo;
+
+        if (pScreenInfo->pfb == pPixData)
+            {
+                /* and initialize pixmap privates from screen privates */
+                pPixmapPriv->hBitmap = pScreenPriv->hbmpShadow;
+                pPixmapPriv->pbBits = pScreenInfo->pfb;
+                pPixmapPriv->pbmih = pScreenPriv->pbmih;
+
+                /* mark these not to get released by DestroyPixmap */
+                pPixmapPriv->owned = FALSE;
+
+                return TRUE;
+            }
+    }
+
+    /* Otherwise, since creating a DIBSection from arbitrary memory is not
+     * possible, fallback to normal.  If needed, we can create a DIBSection with
+     * a copy of the bits later (see comment about a potential slow-path in
+     * winBltExposedWindowRegionShadowGDI()). */
+    pPixmapPriv->hBitmap = 0;
+    pPixmapPriv->pbBits = 0;
+    pPixmapPriv->pbmih = 0;
+    pPixmapPriv->owned = FALSE;
+
+    winDebug("winModifyPixmapHeaderMultiwindow: falling back\n");
+
+    {
+        ScreenPtr pScreen = pPixmap->drawable.pScreen;
+        winScreenPriv(pScreen);
+        WIN_UNWRAP(ModifyPixmapHeader);
+        fResult = (*pScreen->ModifyPixmapHeader) (pPixmap, width, height, depth, bitsPerPixel, devKind, pPixData);
+        WIN_WRAP(ModifyPixmapHeader, winModifyPixmapHeaderMultiwindow);
+    }
+
+    return fResult;
+}
diff --git a/hw/xwin/winmultiwindowwm.c b/hw/xwin/winmultiwindowwm.c
index 32bc722..37f1a7a 100644
--- a/hw/xwin/winmultiwindowwm.c
+++ b/hw/xwin/winmultiwindowwm.c
@@ -49,6 +49,7 @@
 #include <xcb/xcb_icccm.h>
 #include <xcb/xcb_ewmh.h>
 #include <xcb/xcb_aux.h>
+#include <xcb/composite.h>
 
 #include <X11/Xwindows.h>
 
@@ -62,6 +63,7 @@
 #include "winglobals.h"
 #include "windisplay.h"
 #include "winmultiwindowicons.h"
+#include "winauth.h"
 
 /* We need the native HWND atom for intWM, so for consistency use the
    same name as extWM does */
@@ -74,7 +76,6 @@
 extern void winDebug(const char *format, ...);
 extern void winReshapeMultiWindow(WindowPtr pWin);
 extern void winUpdateRgnMultiWindow(WindowPtr pWin);
-extern xcb_auth_info_t *winGetXcbAuthInfo(void);
 
 #ifndef CYGDEBUG
 #define CYGDEBUG NO
@@ -115,7 +116,11 @@ typedef struct _WMInfo {
     xcb_atom_t atmPrivMap;
     xcb_atom_t atmUtf8String;
     xcb_atom_t atmNetWmName;
+    xcb_atom_t atmCurrentDesktop;
+    xcb_atom_t atmNumberDesktops;
+    xcb_atom_t atmDesktopNames;
     xcb_ewmh_connection_t ewmh;
+    Bool fCompositeWM;
 } WMInfoRec, *WMInfoPtr;
 
 typedef struct _WMProcArgRec {
@@ -220,11 +225,11 @@ MessageName(winWMMessagePtr msg)
     case WM_WM_CHANGE_STATE:
       return "WM_WM_CHANGE_STATE";
       break;
-    case WM_WM_MAP2:
-      return "WM_WM_MAP2";
+    case WM_WM_MAP_UNMANAGED:
+      return "WM_WM_MAP_UNMANAGED";
       break;
-    case WM_WM_MAP3:
-      return "WM_WM_MAP3";
+    case WM_WM_MAP_MANAGED:
+      return "WM_WM_MAP_MANAGED";
       break;
     case WM_WM_HINTS_EVENT:
       return "WM_WM_HINTS_EVENT";
@@ -693,7 +698,7 @@ UpdateStyle(WMInfoPtr pWMInfo, xcb_window_t iWindow)
     winApplyHints(pWMInfo, iWindow, hWnd, &zstyle);
     winUpdateWindowPosition(hWnd, &zstyle);
 
-    /* Apply the updated window style, without changing it's show or activation state */
+    /* Apply the updated window style, without changing its show or activation state */
     flags = SWP_FRAMECHANGED | SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE;
     if (zstyle == HWND_NOTOPMOST)
         flags |= SWP_NOZORDER | SWP_NOOWNERZORDER;
@@ -840,7 +845,7 @@ winMultiWindowWMProc(void *pArg)
             }
             break;
 
-        case WM_WM_MAP2:
+        case WM_WM_MAP_UNMANAGED:
             /* Put a note as to the HWND associated with this Window */
             xcb_change_property(pWMInfo->conn, XCB_PROP_MODE_REPLACE,
                                 pNode->msg.iWindow, pWMInfo->atmPrivMap,
@@ -849,7 +854,7 @@ winMultiWindowWMProc(void *pArg)
 
             break;
 
-        case WM_WM_MAP3:
+        case WM_WM_MAP_MANAGED:
             /* Put a note as to the HWND associated with this Window */
             xcb_change_property(pWMInfo->conn, XCB_PROP_MODE_REPLACE,
                                 pNode->msg.iWindow, pWMInfo->atmPrivMap,
@@ -1038,6 +1043,8 @@ winMultiWindowXMsgProc(void *pArg)
     xcb_atom_t atmWindowState, atmMotifWmHints, atmWindowType, atmNormalHints;
     int iReturn;
     xcb_auth_info_t *auth_info;
+    xcb_screen_t *root_screen;
+    xcb_window_t root_window_id;
 
     winDebug("winMultiWindowXMsgProc - Hello\n");
 
@@ -1110,11 +1117,11 @@ winMultiWindowXMsgProc(void *pArg)
         pthread_exit(NULL);
     }
 
-    {
-        /* Get root window id */
-        xcb_screen_t *root_screen = xcb_aux_get_screen(pProcArg->conn, pProcArg->dwScreen);
-        xcb_window_t root_window_id = root_screen->root;
+    /* Get root window id */
+    root_screen = xcb_aux_get_screen(pProcArg->conn, pProcArg->dwScreen);
+    root_window_id = root_screen->root;
 
+    {
         /* Set WM_ICON_SIZE property indicating desired icon sizes */
         typedef struct {
             uint32_t min_width, min_height;
@@ -1152,6 +1159,41 @@ winMultiWindowXMsgProc(void *pArg)
      */
     intern_atom(pProcArg->conn, "WM_STATE");
 
+    /*
+      Enable Composite extension and redirect subwindows of the root window
+     */
+    if (pProcArg->pWMInfo->fCompositeWM) {
+        const char *extension_name = "Composite";
+        xcb_query_extension_cookie_t cookie;
+        xcb_query_extension_reply_t *reply;
+
+        cookie = xcb_query_extension(pProcArg->conn, strlen(extension_name), extension_name);
+        reply = xcb_query_extension_reply(pProcArg->conn, cookie, NULL);
+
+        if (reply && (reply->present)) {
+            xcb_composite_redirect_subwindows(pProcArg->conn,
+                                              root_window_id,
+                                              XCB_COMPOSITE_REDIRECT_AUTOMATIC);
+
+            /*
+              We use automatic updating of the root window for two
+              reasons:
+
+              1) redirected window contents are mirrored to the root
+              window so that the root window draws correctly when shown.
+
+              2) updating the root window causes damage against the
+              shadow framebuffer, which ultimately causes WM_PAINT to be
+              sent to the affected window(s) to cause the damage regions
+              to be redrawn.
+            */
+
+            ErrorF("Using Composite redirection\n");
+
+            free(reply);
+        }
+    }
+
     /* Loop until we explicitly break out */
     while (1) {
         xcb_generic_event_t *event;
@@ -1233,7 +1275,7 @@ winMultiWindowXMsgProc(void *pArg)
                 if ((reply->root == reply_qt->parent) && !notify->override_redirect) {
                     xcb_reparent_notify_event_t event_send;
 
-                    event_send.response_type = ReparentNotify;
+                    event_send.response_type = XCB_REPARENT_NOTIFY;
                     event_send.event = notify->window;
                     event_send.window = notify->window;
                     event_send.parent = reply_qt->parent;
@@ -1351,7 +1393,7 @@ winInitWM(void **ppWMInfo,
           pthread_t * ptWMProc,
           pthread_t * ptXMsgProc,
           pthread_mutex_t * ppmServerStarted,
-          int dwScreen, HWND hwndScreen)
+          int dwScreen, HWND hwndScreen, Bool compositeWM)
 {
     WMProcArgPtr pArg = malloc(sizeof(WMProcArgRec));
     WMInfoPtr pWMInfo = malloc(sizeof(WMInfoRec));
@@ -1373,13 +1415,14 @@ winInitWM(void **ppWMInfo,
 
     /* Set a return pointer to the Window Manager info structure */
     *ppWMInfo = pWMInfo;
+    pWMInfo->fCompositeWM = compositeWM;
 
     /* Setup the argument structure for the thread function */
     pArg->dwScreen = dwScreen;
     pArg->pWMInfo = pWMInfo;
     pArg->ppmServerStarted = ppmServerStarted;
 
-    /* Intialize the message queue */
+    /* Initialize the message queue */
     if (!InitQueue(&pWMInfo->wmMsgQueue)) {
         ErrorF("winInitWM - InitQueue () failed.\n");
         return FALSE;
@@ -1421,6 +1464,8 @@ winInitMultiWindowWM(WMInfoPtr pWMInfo, WMProcArgPtr pProcArg)
     char pszDisplay[512];
     int iReturn;
     xcb_auth_info_t *auth_info;
+    xcb_screen_t *root_screen;
+    xcb_window_t root_window_id;
 
     winDebug("winInitMultiWindowWM - Hello\n");
 
@@ -1490,6 +1535,9 @@ winInitMultiWindowWM(WMInfoPtr pWMInfo, WMProcArgPtr pProcArg)
     pWMInfo->atmPrivMap = intern_atom(pWMInfo->conn, WINDOWSWM_NATIVE_HWND);
     pWMInfo->atmUtf8String = intern_atom(pWMInfo->conn, "UTF8_STRING");
     pWMInfo->atmNetWmName = intern_atom(pWMInfo->conn, "_NET_WM_NAME");
+    pWMInfo->atmCurrentDesktop = intern_atom(pWMInfo->conn, "_NET_CURRENT_DESKTOP");
+    pWMInfo->atmNumberDesktops = intern_atom(pWMInfo->conn, "_NET_NUMBER_OF_DESKTOPS");
+    pWMInfo->atmDesktopNames = intern_atom(pWMInfo->conn, "__NET_DESKTOP_NAMES");
 
     /* Initialization for the xcb_ewmh and EWMH atoms */
     {
@@ -1524,9 +1572,35 @@ winInitMultiWindowWM(WMInfoPtr pWMInfo, WMProcArgPtr pProcArg)
         }
     }
 
+    /* Get root window id */
+    root_screen = xcb_aux_get_screen(pWMInfo->conn, pProcArg->dwScreen);
+    root_window_id = root_screen->root;
+
+    /*
+      Set root window properties for describing multiple desktops to describe
+      the one desktop we have
+    */
+    {
+        int data;
+        const char buf[] = "Desktop";
+
+        data = 0;
+        xcb_change_property(pWMInfo->conn, XCB_PROP_MODE_REPLACE, root_window_id,
+                            pWMInfo->atmCurrentDesktop, XCB_ATOM_CARDINAL, 32,
+                            1, &data);
+        data = 1;
+        xcb_change_property(pWMInfo->conn, XCB_PROP_MODE_REPLACE, root_window_id,
+                            pWMInfo->atmNumberDesktops, XCB_ATOM_CARDINAL, 32,
+                            1, &data);
+
+        xcb_change_property(pWMInfo->conn, XCB_PROP_MODE_REPLACE, root_window_id,
+                            pWMInfo->atmDesktopNames, pWMInfo->atmUtf8String, 8,
+                            strlen(buf), (unsigned char *) buf);
+    }
+
     /*
       Set the root window cursor to left_ptr (this controls the cursor an
-      application gets over it's windows when it doesn't set one)
+      application gets over its windows when it doesn't set one)
     */
     {
 #define XC_left_ptr 68
@@ -1537,9 +1611,6 @@ winInitMultiWindowWM(WMInfoPtr pWMInfo, WMProcArgPtr pProcArg)
         uint32_t mask = XCB_CW_CURSOR;
         uint32_t value_list = cursor;
 
-        xcb_screen_t *root_screen = xcb_aux_get_screen(pWMInfo->conn, pProcArg->dwScreen);
-        xcb_window_t window = root_screen->root;
-
         static const uint16_t fgred = 0, fggreen = 0, fgblue = 0;
         static const uint16_t bgred = 0xFFFF, bggreen = 0xFFFF, bgblue = 0xFFFF;
 
@@ -1549,7 +1620,7 @@ winInitMultiWindowWM(WMInfoPtr pWMInfo, WMProcArgPtr pProcArg)
                                 shape, shape + 1,
                                 fgred, fggreen, fgblue, bgred, bggreen, bgblue);
 
-        xcb_change_window_attributes(pWMInfo->conn, window, mask, &value_list);
+        xcb_change_window_attributes(pWMInfo->conn, root_window_id, mask, &value_list);
 
         xcb_free_cursor(pWMInfo->conn, cursor);
         xcb_close_font(pWMInfo->conn, font);
diff --git a/hw/xwin/winmultiwindowwndproc.c b/hw/xwin/winmultiwindowwndproc.c
index 3f47fec..31b5d63 100644
--- a/hw/xwin/winmultiwindowwndproc.c
+++ b/hw/xwin/winmultiwindowwndproc.c
@@ -35,12 +35,18 @@
 #ifdef HAVE_XWIN_CONFIG_H
 #include <xwin-config.h>
 #endif
+
 #include "win.h"
 #include "dixevents.h"
 #include "winmultiwindowclass.h"
 #include "winprefs.h"
 #include "winmsg.h"
 #include "inputstr.h"
+#include <dwmapi.h>
+
+#ifndef WM_DWMCOMPOSITIONCHANGED
+#define WM_DWMCOMPOSITIONCHANGED 0x031e
+#endif
 
 extern void winUpdateWindowPosition(HWND hWnd, HWND * zstyle);
 
@@ -294,6 +300,113 @@ winStartMousePolling(winPrivScreenPtr s_pScreenPriv)
                                             MOUSE_POLLING_INTERVAL, NULL);
 }
 
+/* Undocumented */
+typedef struct _ACCENTPOLICY
+{
+    ULONG AccentState;
+    ULONG AccentFlags;
+    ULONG GradientColor;
+    ULONG AnimationId;
+} ACCENTPOLICY;
+
+#define ACCENT_ENABLE_BLURBEHIND 3
+
+typedef struct _WINCOMPATTR
+{
+    DWORD attribute;
+    PVOID pData;
+    ULONG dataSize;
+} WINCOMPATTR;
+
+#define WCA_ACCENT_POLICY 19
+
+typedef WINBOOL WINAPI (*PFNSETWINDOWCOMPOSITIONATTRIBUTE)(HWND, WINCOMPATTR *);
+
+static void
+CheckForAlpha(HWND hWnd, WindowPtr pWin, winScreenInfo *pScreenInfo)
+{
+    /* Check (once) which API we should use */
+    static Bool doOnce = TRUE;
+    static PFNSETWINDOWCOMPOSITIONATTRIBUTE pSetWindowCompositionAttribute = NULL;
+    static Bool useDwmEnableBlurBehindWindow = FALSE;
+
+    if (doOnce)
+        {
+            OSVERSIONINFOEX osvi = {0};
+            osvi.dwOSVersionInfoSize = sizeof(osvi);
+            GetVersionEx((LPOSVERSIONINFO)&osvi);
+
+            /* SetWindowCompositionAttribute() exists on Windows 7 and later,
+               but doesn't work for this purpose, so first check for Windows 10
+               or later */
+            if (osvi.dwMajorVersion >= 10)
+                {
+                    HMODULE hUser32 = GetModuleHandle("user32");
+
+                    if (hUser32)
+                        pSetWindowCompositionAttribute = (PFNSETWINDOWCOMPOSITIONATTRIBUTE) GetProcAddress(hUser32, "SetWindowCompositionAttribute");
+                    winDebug("SetWindowCompositionAttribute %s\n", pSetWindowCompositionAttribute ? "found" : "not found");
+                }
+            /* On Windows 7 and Windows Vista, use DwmEnableBlurBehindWindow() */
+            else if ((osvi.dwMajorVersion == 6) && (osvi.dwMinorVersion <= 1))
+                {
+                    useDwmEnableBlurBehindWindow = TRUE;
+                }
+            /* On Windows 8 and Windows 8.1, using the alpha channel on those
+               seems near impossible, so we don't do anything. */
+
+            doOnce = FALSE;
+        }
+
+    /* alpha-channel use is wanted */
+    if (!g_fCompositeAlpha || !pScreenInfo->fCompositeWM)
+        return;
+
+    /* Image has alpha ... */
+    if (pWin->drawable.depth != 32)
+        return;
+
+    /* ... and we can do something useful with it? */
+    if (pSetWindowCompositionAttribute)
+        {
+            WINBOOL rc;
+            /* Use the (undocumented) SetWindowCompositionAttribute, if
+               available, to turn on alpha channel use on Windows 10. */
+            ACCENTPOLICY policy = { ACCENT_ENABLE_BLURBEHIND, 0, 0, 0 } ;
+            WINCOMPATTR data = { WCA_ACCENT_POLICY,  &policy, sizeof(ACCENTPOLICY) };
+
+            /* This turns on DWM looking at the alpha-channel of this window */
+            winDebug("enabling alpha for XID %08x hWnd %p, using SetWindowCompositionAttribute()\n", (unsigned int)pWin->drawable.id, hWnd);
+            rc = pSetWindowCompositionAttribute(hWnd, &data);
+            if (!rc)
+                ErrorF("SetWindowCompositionAttribute failed: %d\n", (int)GetLastError());
+        }
+    else if (useDwmEnableBlurBehindWindow)
+        {
+            HRESULT rc;
+            WINBOOL enabled;
+
+            rc = DwmIsCompositionEnabled(&enabled);
+            if ((rc == S_OK) && enabled)
+                {
+                    /* Use DwmEnableBlurBehindWindow, to turn on alpha channel
+                       use on Windows Vista and Windows 7 */
+                    DWM_BLURBEHIND bbh;
+                    bbh.dwFlags = DWM_BB_ENABLE | DWM_BB_BLURREGION | DWM_BB_TRANSITIONONMAXIMIZED;
+                    bbh.fEnable = TRUE;
+                    bbh.hRgnBlur = NULL;
+                    bbh.fTransitionOnMaximized = TRUE; /* What does this do ??? */
+
+                    /* This terribly-named function actually controls if DWM
+                       looks at the alpha channel of this window */
+                    winDebug("enabling alpha for XID %08x hWnd %p, using DwmEnableBlurBehindWindow()\n", (unsigned int)pWin->drawable.id, hWnd);
+                    rc = DwmEnableBlurBehindWindow(hWnd, &bbh);
+                    if (rc != S_OK)
+                        ErrorF("DwmEnableBlurBehindWindow failed: %x, %d\n", (int)rc, (int)GetLastError());
+                }
+        }
+}
+
 /*
  * winTopLevelWindowProc - Window procedure for all top-level Windows windows.
  */
@@ -302,7 +415,6 @@ LRESULT CALLBACK
 winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
 {
     POINT ptMouse;
-    HDC hdcUpdate;
     PAINTSTRUCT ps;
     WindowPtr pWin = NULL;
     winPrivWinPtr pWinPriv = NULL;
@@ -323,6 +435,20 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
                          lParam);
 #endif
 
+    /*
+       If this is WM_CREATE, set up the Windows window properties which point to
+       X window information, before we populate local convenience variables...
+     */
+    if (message == WM_CREATE) {
+        SetProp(hwnd,
+                WIN_WINDOW_PROP,
+                (HANDLE) ((LPCREATESTRUCT) lParam)->lpCreateParams);
+        SetProp(hwnd,
+                WIN_WID_PROP,
+                (HANDLE) (INT_PTR)winGetWindowID(((LPCREATESTRUCT) lParam)->
+                                                 lpCreateParams));
+    }
+
     /* Check if the Windows window property for our X window pointer is valid */
     if ((pWin = GetProp(hwnd, WIN_WINDOW_PROP)) != NULL) {
         /* Our X window pointer is valid */
@@ -383,18 +509,6 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
     /* Branch on message type */
     switch (message) {
     case WM_CREATE:
-
-        /* */
-        SetProp(hwnd,
-                WIN_WINDOW_PROP,
-                (HANDLE) ((LPCREATESTRUCT) lParam)->lpCreateParams);
-
-        /* */
-        SetProp(hwnd,
-                WIN_WID_PROP,
-                (HANDLE) (INT_PTR) winGetWindowID(((LPCREATESTRUCT) lParam)->
-                                                  lpCreateParams));
-
         /*
          * Make X windows' Z orders sync with Windows windows because
          * there can be AlwaysOnTop windows overlapped on the window
@@ -415,6 +529,8 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
 
         SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG_PTR) XMING_SIGNATURE);
 
+        CheckForAlpha(hwnd, pWin, s_pScreenInfo);
+
         return 0;
 
     case WM_INIT_SYS_MENU:
@@ -457,18 +573,9 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
 
     case WM_PAINT:
         /* Only paint if our window handle is valid */
-        if (hwndScreen == NULL)
+        if (hwnd == NULL)
             break;
 
-        /* BeginPaint gives us an hdc that clips to the invalidated region */
-        hdcUpdate = BeginPaint(hwnd, &ps);
-        /* Avoid the BitBlt's if the PAINTSTRUCT is bogus */
-        if (ps.rcPaint.right == 0 && ps.rcPaint.bottom == 0 &&
-            ps.rcPaint.left == 0 && ps.rcPaint.top == 0) {
-            EndPaint(hwnd, &ps);
-            return 0;
-        }
-
 #ifdef XWIN_GLX_WINDOWS
         if (pWinPriv->fWglUsed) {
             /*
@@ -478,36 +585,16 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
                XXX: For now, just leave it alone, but ideally we want to send an expose event to
                the window so it really redraws the affected region...
              */
+            BeginPaint(hwnd, &ps);
             ValidateRect(hwnd, &(ps.rcPaint));
+            EndPaint(hwnd, &ps);
         }
         else
 #endif
-            /* Try to copy from the shadow buffer */
-        if (!BitBlt(hdcUpdate,
-                        ps.rcPaint.left, ps.rcPaint.top,
-                        ps.rcPaint.right - ps.rcPaint.left,
-                        ps.rcPaint.bottom - ps.rcPaint.top,
-                        s_pScreenPriv->hdcShadow,
-                        ps.rcPaint.left + pWin->drawable.x,
-                        ps.rcPaint.top + pWin->drawable.y, SRCCOPY)) {
-            LPVOID lpMsgBuf;
-
-            /* Display a fancy error message */
-            FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
-                          FORMAT_MESSAGE_FROM_SYSTEM |
-                          FORMAT_MESSAGE_IGNORE_INSERTS,
-                          NULL,
-                          GetLastError(),
-                          MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
-                          (LPTSTR) &lpMsgBuf, 0, NULL);
-
-            ErrorF("winTopLevelWindowProc - BitBlt failed: %s\n",
-                   (LPSTR) lpMsgBuf);
-            LocalFree(lpMsgBuf);
-        }
+            /* Call the engine dependent repainter */
+            if (*s_pScreenPriv->pwinBltExposedWindowRegion)
+                (*s_pScreenPriv->pwinBltExposedWindowRegion) (s_pScreen, pWin);
 
-        /* EndPaint frees the DC */
-        EndPaint(hwnd, &ps);
         return 0;
 
     case WM_MOUSEMOVE:
@@ -918,7 +1005,7 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
                     }
                 }
             }
-            wmMsg.msg = WM_WM_MAP3;
+            wmMsg.msg = WM_WM_MAP_MANAGED;
         }
         else {                  /* It is an overridden window so make it top of Z stack */
 
@@ -938,7 +1025,7 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
                                      SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
                 }
             }
-            wmMsg.msg = WM_WM_MAP2;
+            wmMsg.msg = WM_WM_MAP_UNMANAGED;
         }
 
         /* Tell our Window Manager thread to map the window */
@@ -1142,6 +1229,12 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
         }
         break;
 
+
+    case WM_DWMCOMPOSITIONCHANGED:
+        /* This message is only sent on Vista/W7 */
+        CheckForAlpha(hwnd, pWin, s_pScreenInfo);
+
+        return 0;
     default:
         break;
     }
diff --git a/hw/xwin/winprefs.c b/hw/xwin/winprefs.c
index 0ac5b4f..d0b2ef2 100644
--- a/hw/xwin/winprefs.c
+++ b/hw/xwin/winprefs.c
@@ -37,6 +37,7 @@
 #include <stdlib.h>
 #ifdef __CYGWIN__
 #include <sys/resource.h>
+#include <sys/cygwin.h>
 #endif
 #include "win.h"
 
@@ -59,9 +60,6 @@ extern int parse_file(FILE * fp);
 /* Currently in use command ID, incremented each new menu item created */
 static int g_cmdid = STARTMENUID;
 
-/* Local function to handle comma-ified icon names */
-static HICON LoadImageComma(char *fname, int sx, int sy, int flags);
-
 /*
  * Creates or appends a menu from a MENUPARSED structure
  */
@@ -297,7 +295,7 @@ HandleCustomWM_INITMENU(HWND hwnd, HMENU hmenu)
 
 /*
  * Searches for the custom WM_COMMAND command ID and performs action.
- * Return TRUE if command is proccessed, FALSE otherwise.
+ * Return TRUE if command is processed, FALSE otherwise.
  */
 Bool
 HandleCustomWM_COMMAND(HWND hwnd, WORD command, winPrivScreenPtr pScreenPriv)
@@ -474,7 +472,7 @@ winOverrideDefaultIcon(int size)
     HICON hicon;
 
     if (pref.defaultIconName[0]) {
-        hicon = LoadImageComma(pref.defaultIconName, size, size, 0);
+        hicon = LoadImageComma(pref.defaultIconName, pref.iconDirectory, size, size, 0);
         if (hicon == NULL)
             ErrorF("winOverrideDefaultIcon: LoadImageComma(%s) failed\n",
                    pref.defaultIconName);
@@ -496,9 +494,12 @@ winTaskbarIcon(void)
     hicon = 0;
     /* First try and load an overridden, if success then return it */
     if (pref.trayIconName[0]) {
-        hicon = LoadImageComma(pref.trayIconName,
+        hicon = LoadImageComma(pref.trayIconName, pref.iconDirectory,
                                GetSystemMetrics(SM_CXSMICON),
                                GetSystemMetrics(SM_CYSMICON), 0);
+        if (hicon == NULL)
+            ErrorF("winTaskbarIcon: LoadImageComma(%s) failed\n",
+                   pref.trayIconName);
     }
 
     /* Otherwise return the default */
@@ -513,17 +514,18 @@ winTaskbarIcon(void)
 }
 
 /*
+ * Handle comma-ified icon names
+ *
  * Parse a filename to extract an icon:
  *  If fname is exactly ",nnn" then extract icon from our resource
  *  else if it is "file,nnn" then extract icon nnn from that file
  *  else try to load it as an .ico file and if that fails return NULL
  */
-static HICON
-LoadImageComma(char *fname, int sx, int sy, int flags)
+HICON
+LoadImageComma(char *fname, char *iconDirectory, int sx, int sy, int flags)
 {
     HICON hicon;
     int i;
-    char file[PATH_MAX + NAME_MAX + 2];
 
     /* Some input error checking */
     if (!fname || !fname[0])
@@ -539,31 +541,67 @@ LoadImageComma(char *fname, int sx, int sy, int flags)
                           MAKEINTRESOURCE(i), IMAGE_ICON, sx, sy, flags);
     }
     else {
+        char *file = malloc(PATH_MAX + NAME_MAX + 2);
+        Bool convert = FALSE;
+
+        if (!file)
+            return NULL;
+
         file[0] = 0;
-        /* Prepend path if not given a "X:\" filename */
+
+        /* If fname starts 'X:\', it's an absolute Windows path, do nothing */
         if (!(fname[0] && fname[1] == ':' && fname[2] == '\\')) {
-            strcpy(file, pref.iconDirectory);
-            if (pref.iconDirectory[0])
-                if (fname[strlen(fname) - 1] != '\\')
-                    strcat(file, "\\");
+#ifdef  __CYGWIN__
+            /* If fname starts with '/', it's an absolute cygwin path, we'll
+               need to convert it */
+            if (fname[0] == '/') {
+                convert = TRUE;
+            }
+            else
+#endif
+            if (iconDirectory) {
+                /* Otherwise, prepend the default icon directory, which
+                   currently must be in absolute Windows path form */
+                strcpy(file, iconDirectory);
+                if (iconDirectory[0])
+                    if (iconDirectory[strlen(iconDirectory) - 1] != '\\')
+                        strcat(file, "\\");
+            }
         }
         strcat(file, fname);
 
+        /* Trim off any ',index' */
         if (strrchr(file, ',')) {
-            /* Specified as <fname>,<index> */
-
             *(strrchr(file, ',')) = 0;  /* End string at comma */
             i = atoi(strrchr(fname, ',') + 1);
-            hicon = ExtractIcon(g_hInstance, file, i);
         }
         else {
-            /* Just an .ico file... */
+            i = -1;
+        }
 
+#ifdef  __CYGWIN__
+        /* Convert from Cygwin path to Windows path */
+        if (convert) {
+            char *converted_file = cygwin_create_path(CCP_POSIX_TO_WIN_A | CCP_ABSOLUTE, file);
+            if (converted_file) {
+                free(file);
+                file = converted_file;
+            }
+        }
+#endif
+
+        if (i >= 0) {
+            /* Specified as <fname>,<index> */
+            hicon = ExtractIcon(g_hInstance, file, i);
+        }
+        else {
+            /* Specified as just an .ico file */
             hicon = (HICON) LoadImage(NULL,
                                       file,
                                       IMAGE_ICON,
                                       sx, sy, LR_LOADFROMFILE | flags);
         }
+        free(file);
     }
     return hicon;
 }
@@ -585,7 +623,7 @@ winOverrideIcon(char *res_name, char *res_class, char *wmName)
             if (pref.icon[i].hicon)
                 return pref.icon[i].hicon;
 
-            hicon = LoadImageComma(pref.icon[i].iconFile, 0, 0, LR_DEFAULTSIZE);
+            hicon = LoadImageComma(pref.icon[i].iconFile, pref.iconDirectory, 0, 0, LR_DEFAULTSIZE);
             if (hicon == NULL)
                 ErrorF("winOverrideIcon: LoadImageComma(%s) failed\n",
                        pref.icon[i].iconFile);
diff --git a/hw/xwin/winprefs.h b/hw/xwin/winprefs.h
index 936a42f..597398e 100644
--- a/hw/xwin/winprefs.h
+++ b/hw/xwin/winprefs.h
@@ -175,4 +175,7 @@ unsigned long
 HICON winTaskbarIcon(void);
 
 HICON winOverrideDefaultIcon(int size);
+
+HICON LoadImageComma(char *fname, char *iconDirectory, int sx, int sy, int flags);
+
 #endif
diff --git a/hw/xwin/winprefsyacc.c b/hw/xwin/winprefsyacc.c
index 1084710..cd6c0b8 100644
--- a/hw/xwin/winprefsyacc.c
+++ b/hw/xwin/winprefsyacc.c
@@ -1,8 +1,8 @@
-/* A Bison parser, made by GNU Bison 3.7.3.  */
+/* A Bison parser, made by GNU Bison 3.8.2.  */
 
 /* Bison implementation for Yacc-like parsers in C
 
-   Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation,
+   Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
    Inc.
 
    This program is free software: you can redistribute it and/or modify
@@ -16,7 +16,7 @@
    GNU General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* As a special exception, you may create a larger work that contains
    part or all of the Bison parser skeleton and distribute that work
@@ -45,11 +45,11 @@
    define necessary library symbols; they are noted "INFRINGES ON
    USER NAME SPACE" below.  */
 
-/* Identify Bison output.  */
-#define YYBISON 1
+/* Identify Bison output, and Bison version.  */
+#define YYBISON 30802
 
-/* Bison version.  */
-#define YYBISON_VERSION "3.7.3"
+/* Bison version string.  */
+#define YYBISON_VERSION "3.8.2"
 
 /* Skeleton name.  */
 #define YYSKELETON_NAME "yacc.c"
@@ -233,6 +233,7 @@ extern int yydebug;
   typedef enum yytokentype yytoken_kind_t;
 #endif
 /* Token kinds.  */
+#define YYEMPTY -2
 #define YYEOF 0
 #define YYerror 256
 #define YYUNDEF 257
@@ -276,7 +277,7 @@ union YYSTYPE
   unsigned long uVal;
   int iVal;
 
-#line 280 "winprefsyacc.c"
+#line 281 "winprefsyacc.c"
 
 };
 typedef union YYSTYPE YYSTYPE;
@@ -287,8 +288,10 @@ typedef union YYSTYPE YYSTYPE;
 
 extern YYSTYPE yylval;
 
+
 int yyparse (void);
 
+
 #endif /* !YY_YY_WINPREFSYACC_H_INCLUDED  */
 /* Symbol kind.  */
 enum yysymbol_kind_t
@@ -402,6 +405,18 @@ typedef int_least16_t yytype_int16;
 typedef short yytype_int16;
 #endif
 
+/* Work around bug in HP-UX 11.23, which defines these macros
+   incorrectly for preprocessor constants.  This workaround can likely
+   be removed in 2023, as HPE has promised support for HP-UX 11.23
+   (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
+   <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>.  */
+#ifdef __hpux
+# undef UINT_LEAST8_MAX
+# undef UINT_LEAST16_MAX
+# define UINT_LEAST8_MAX 255
+# define UINT_LEAST16_MAX 65535
+#endif
+
 #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
 typedef __UINT_LEAST8_TYPE__ yytype_uint8;
 #elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
@@ -499,17 +514,23 @@ typedef int yy_state_fast_t;
 
 /* Suppress unused-variable warnings by "using" E.  */
 #if ! defined lint || defined __GNUC__
-# define YYUSE(E) ((void) (E))
+# define YY_USE(E) ((void) (E))
 #else
-# define YYUSE(E) /* empty */
+# define YY_USE(E) /* empty */
 #endif
 
-#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
 /* Suppress an incorrect diagnostic about yylval being uninitialized.  */
-# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN                            \
+#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
+# if __GNUC__ * 100 + __GNUC_MINOR__ < 407
+#  define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN                           \
+    _Pragma ("GCC diagnostic push")                                     \
+    _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
+# else
+#  define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN                           \
     _Pragma ("GCC diagnostic push")                                     \
     _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")              \
     _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
+# endif
 # define YY_IGNORE_MAYBE_UNINITIALIZED_END      \
     _Pragma ("GCC diagnostic pop")
 #else
@@ -726,7 +747,7 @@ static const yytype_int8 yytranslate[] =
 };
 
 #if YYDEBUG
-  /* YYRLINE[YYN] -- Source line where rule number YYN was defined.  */
+/* YYRLINE[YYN] -- Source line where rule number YYN was defined.  */
 static const yytype_uint8 yyrline[] =
 {
        0,   133,   133,   134,   137,   138,   142,   143,   146,   147,
@@ -771,18 +792,6 @@ yysymbol_name (yysymbol_kind_t yysymbol)
 }
 #endif
 
-#ifdef YYPRINT
-/* YYTOKNUM[NUM] -- (External) token number corresponding to the
-   (internal) symbol number NUM (which must be that of a token).  */
-static const yytype_int16 yytoknum[] =
-{
-       0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
-     265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
-     275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
-     285,   286
-};
-#endif
-
 #define YYPACT_NINF (-47)
 
 #define yypact_value_is_default(Yyn) \
@@ -793,8 +802,8 @@ static const yytype_int16 yytoknum[] =
 #define yytable_value_is_error(Yyn) \
   0
 
-  /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
-     STATE-NUM.  */
+/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+   STATE-NUM.  */
 static const yytype_int8 yypact[] =
 {
      -47,     7,   -47,   -47,    -1,     0,     1,    18,    29,    15,
@@ -812,9 +821,9 @@ static const yytype_int8 yypact[] =
      -47
 };
 
-  /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
-     Performed when YYTABLE does not specify something else to do.  Zero
-     means the default is an error.  */
+/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
+   Performed when YYTABLE does not specify something else to do.  Zero
+   means the default is an error.  */
 static const yytype_int8 yydefact[] =
 {
        2,     0,     1,     4,     0,     0,     0,     0,     0,     0,
@@ -832,7 +841,7 @@ static const yytype_int8 yydefact[] =
       58
 };
 
-  /* YYPGOTO[NTERM-NUM].  */
+/* YYPGOTO[NTERM-NUM].  */
 static const yytype_int8 yypgoto[] =
 {
      -47,   -47,   -47,   -46,   -47,   -47,   -47,   -47,   -47,   -47,
@@ -841,18 +850,18 @@ static const yytype_int8 yypgoto[] =
      -47,   -47,   -47
 };
 
-  /* YYDEFGOTO[NTERM-NUM].  */
+/* YYDEFGOTO[NTERM-NUM].  */
 static const yytype_int8 yydefgoto[] =
 {
-      -1,     1,    16,    56,    17,    18,    19,    20,    21,    22,
+       0,     1,    16,    56,    17,    18,    19,    20,    21,    22,
       71,    72,    23,    54,    63,    64,    24,    45,    83,    84,
       85,    66,    67,    25,    46,    49,    89,    90,    26,    59,
       27,    28,    29
 };
 
-  /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM.  If
-     positive, shift that token.  If negative, reduce the rule whose
-     number is the opposite.  If YYTABLE_NINF, syntax error.  */
+/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM.  If
+   positive, shift that token.  If negative, reduce the rule whose
+   number is the opposite.  If YYTABLE_NINF, syntax error.  */
 static const yytype_int8 yytable[] =
 {
       57,    92,    69,    76,    77,    78,    79,     2,    60,    61,
@@ -881,8 +890,8 @@ static const yytype_int8 yycheck[] =
       31,    83,    66,   102,    -1,    -1,    -1,    -1,    89
 };
 
-  /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
-     symbol of state STATE-NUM.  */
+/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
+   state STATE-NUM.  */
 static const yytype_int8 yystos[] =
 {
        0,    33,     0,     3,     4,     7,     8,     9,    10,    18,
@@ -900,7 +909,7 @@ static const yytype_int8 yystos[] =
       35
 };
 
-  /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
+/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM.  */
 static const yytype_int8 yyr1[] =
 {
        0,    32,    33,    33,    34,    34,    35,    35,    36,    36,
@@ -912,7 +921,7 @@ static const yytype_int8 yyr1[] =
       59,    61,    60,    62,    63,    64
 };
 
-  /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN.  */
+/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM.  */
 static const yytype_int8 yyr2[] =
 {
        0,     2,     0,     2,     1,     1,     0,     2,     1,     1,
@@ -933,6 +942,7 @@ enum { YYENOMEM = -2 };
 #define YYACCEPT        goto yyacceptlab
 #define YYABORT         goto yyabortlab
 #define YYERROR         goto yyerrorlab
+#define YYNOMEM         goto yyexhaustedlab
 
 
 #define YYRECOVERING()  (!!yyerrstatus)
@@ -973,10 +983,7 @@ do {                                            \
     YYFPRINTF Args;                             \
 } while (0)
 
-/* This macro is provided for backward compatibility. */
-# ifndef YY_LOCATION_PRINT
-#  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
-# endif
+
 
 
 # define YY_SYMBOL_PRINT(Title, Kind, Value, Location)                    \
@@ -1000,15 +1007,11 @@ yy_symbol_value_print (FILE *yyo,
                        yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
 {
   FILE *yyoutput = yyo;
-  YYUSE (yyoutput);
+  YY_USE (yyoutput);
   if (!yyvaluep)
     return;
-# ifdef YYPRINT
-  if (yykind < YYNTOKENS)
-    YYPRINT (yyo, yytoknum[yykind], *yyvaluep);
-# endif
   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
-  YYUSE (yykind);
+  YY_USE (yykind);
   YY_IGNORE_MAYBE_UNINITIALIZED_END
 }
 
@@ -1122,13 +1125,13 @@ static void
 yydestruct (const char *yymsg,
             yysymbol_kind_t yykind, YYSTYPE *yyvaluep)
 {
-  YYUSE (yyvaluep);
+  YY_USE (yyvaluep);
   if (!yymsg)
     yymsg = "Deleting";
   YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);
 
   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
-  YYUSE (yykind);
+  YY_USE (yykind);
   YY_IGNORE_MAYBE_UNINITIALIZED_END
 }
 
@@ -1191,6 +1194,7 @@ yyparse (void)
   YYDPRINTF ((stderr, "Starting parse\n"));
 
   yychar = YYEMPTY; /* Cause a token to be read.  */
+
   goto yysetstate;
 
 
@@ -1216,7 +1220,7 @@ yysetstate:
 
   if (yyss + yystacksize - 1 <= yyssp)
 #if !defined yyoverflow && !defined YYSTACK_RELOCATE
-    goto yyexhaustedlab;
+    YYNOMEM;
 #else
     {
       /* Get the current used size of the three stacks, in elements.  */
@@ -1244,7 +1248,7 @@ yysetstate:
 # else /* defined YYSTACK_RELOCATE */
       /* Extend the stack our own way.  */
       if (YYMAXDEPTH <= yystacksize)
-        goto yyexhaustedlab;
+        YYNOMEM;
       yystacksize *= 2;
       if (YYMAXDEPTH < yystacksize)
         yystacksize = YYMAXDEPTH;
@@ -1255,7 +1259,7 @@ yysetstate:
           YY_CAST (union yyalloc *,
                    YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
         if (! yyptr)
-          goto yyexhaustedlab;
+          YYNOMEM;
         YYSTACK_RELOCATE (yyss_alloc, yyss);
         YYSTACK_RELOCATE (yyvs_alloc, yyvs);
 #  undef YYSTACK_RELOCATE
@@ -1277,6 +1281,7 @@ yysetstate:
     }
 #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
 
+
   if (yystate == YYFINAL)
     YYACCEPT;
 
@@ -1391,233 +1396,233 @@ yyreduce:
   case 20: /* trayicon: TRAYICON STRING NEWLINE  */
 #line 160 "winprefsyacc.y"
                                         { SetTrayIcon((yyvsp[-1].sVal)); free((yyvsp[-1].sVal)); }
-#line 1395 "winprefsyacc.c"
+#line 1400 "winprefsyacc.c"
     break;
 
   case 21: /* rootmenu: ROOTMENU STRING NEWLINE  */
 #line 163 "winprefsyacc.y"
                                         { SetRootMenu((yyvsp[-1].sVal)); free((yyvsp[-1].sVal)); }
-#line 1401 "winprefsyacc.c"
+#line 1406 "winprefsyacc.c"
     break;
 
   case 22: /* defaultsysmenu: DEFAULTSYSMENU STRING atspot NEWLINE  */
 #line 166 "winprefsyacc.y"
                                                      { SetDefaultSysMenu((yyvsp[-2].sVal), (yyvsp[-1].iVal)); free((yyvsp[-2].sVal)); }
-#line 1407 "winprefsyacc.c"
+#line 1412 "winprefsyacc.c"
     break;
 
   case 23: /* defaulticon: DEFAULTICON STRING NEWLINE  */
 #line 169 "winprefsyacc.y"
                                            { SetDefaultIcon((yyvsp[-1].sVal)); free((yyvsp[-1].sVal)); }
-#line 1413 "winprefsyacc.c"
+#line 1418 "winprefsyacc.c"
     break;
 
   case 24: /* icondirectory: ICONDIRECTORY STRING NEWLINE  */
 #line 172 "winprefsyacc.y"
                                              { SetIconDirectory((yyvsp[-1].sVal)); free((yyvsp[-1].sVal)); }
-#line 1419 "winprefsyacc.c"
+#line 1424 "winprefsyacc.c"
     break;
 
   case 25: /* menuline: SEPARATOR NEWLINE newline_or_nada  */
 #line 175 "winprefsyacc.y"
                                                    { AddMenuLine("-", CMD_SEPARATOR, ""); }
-#line 1425 "winprefsyacc.c"
+#line 1430 "winprefsyacc.c"
     break;
 
   case 26: /* menuline: STRING ALWAYSONTOP NEWLINE newline_or_nada  */
 #line 176 "winprefsyacc.y"
                                                       { AddMenuLine((yyvsp[-3].sVal), CMD_ALWAYSONTOP, ""); free((yyvsp[-3].sVal)); }
-#line 1431 "winprefsyacc.c"
+#line 1436 "winprefsyacc.c"
     break;
 
   case 27: /* menuline: STRING EXEC STRING NEWLINE newline_or_nada  */
 #line 177 "winprefsyacc.y"
                                                       { AddMenuLine((yyvsp[-4].sVal), CMD_EXEC, (yyvsp[-2].sVal)); free((yyvsp[-4].sVal)); free((yyvsp[-2].sVal)); }
-#line 1437 "winprefsyacc.c"
+#line 1442 "winprefsyacc.c"
     break;
 
   case 28: /* menuline: STRING MENU STRING NEWLINE newline_or_nada  */
 #line 178 "winprefsyacc.y"
                                                       { AddMenuLine((yyvsp[-4].sVal), CMD_MENU, (yyvsp[-2].sVal)); free((yyvsp[-4].sVal)); free((yyvsp[-2].sVal)); }
-#line 1443 "winprefsyacc.c"
+#line 1448 "winprefsyacc.c"
     break;
 
   case 29: /* menuline: STRING RELOAD NEWLINE newline_or_nada  */
 #line 179 "winprefsyacc.y"
                                                  { AddMenuLine((yyvsp[-3].sVal), CMD_RELOAD, ""); free((yyvsp[-3].sVal)); }
-#line 1449 "winprefsyacc.c"
+#line 1454 "winprefsyacc.c"
     break;
 
   case 32: /* $@1: %empty  */
 #line 186 "winprefsyacc.y"
                        { OpenMenu((yyvsp[-1].sVal)); free((yyvsp[-1].sVal)); }
-#line 1455 "winprefsyacc.c"
+#line 1460 "winprefsyacc.c"
     break;
 
   case 33: /* menu: MENU STRING LB $@1 newline_or_nada menulist RB  */
 #line 186 "winprefsyacc.y"
                                                                                {CloseMenu();}
-#line 1461 "winprefsyacc.c"
+#line 1466 "winprefsyacc.c"
     break;
 
   case 34: /* iconline: STRING STRING NEWLINE newline_or_nada  */
 #line 189 "winprefsyacc.y"
                                                       { AddIconLine((yyvsp[-3].sVal), (yyvsp[-2].sVal)); free((yyvsp[-3].sVal)); free((yyvsp[-2].sVal)); }
-#line 1467 "winprefsyacc.c"
+#line 1472 "winprefsyacc.c"
     break;
 
   case 37: /* $@2: %empty  */
 #line 196 "winprefsyacc.y"
                  {OpenIcons();}
-#line 1473 "winprefsyacc.c"
+#line 1478 "winprefsyacc.c"
     break;
 
   case 38: /* icons: ICONS LB $@2 newline_or_nada iconlist RB  */
 #line 196 "winprefsyacc.y"
                                                             {CloseIcons();}
-#line 1479 "winprefsyacc.c"
+#line 1484 "winprefsyacc.c"
     break;
 
   case 39: /* group1: TOPMOST  */
 #line 199 "winprefsyacc.y"
                 { (yyval.uVal)=STYLE_TOPMOST; }
-#line 1485 "winprefsyacc.c"
+#line 1490 "winprefsyacc.c"
     break;
 
   case 40: /* group1: MAXIMIZE  */
 #line 200 "winprefsyacc.y"
                    { (yyval.uVal)=STYLE_MAXIMIZE; }
-#line 1491 "winprefsyacc.c"
+#line 1496 "winprefsyacc.c"
     break;
 
   case 41: /* group1: MINIMIZE  */
 #line 201 "winprefsyacc.y"
                    { (yyval.uVal)=STYLE_MINIMIZE; }
-#line 1497 "winprefsyacc.c"
+#line 1502 "winprefsyacc.c"
     break;
 
   case 42: /* group1: BOTTOM  */
 #line 202 "winprefsyacc.y"
                  { (yyval.uVal)=STYLE_BOTTOM; }
-#line 1503 "winprefsyacc.c"
+#line 1508 "winprefsyacc.c"
     break;
 
   case 43: /* group2: NOTITLE  */
 #line 205 "winprefsyacc.y"
                 { (yyval.uVal)=STYLE_NOTITLE; }
-#line 1509 "winprefsyacc.c"
+#line 1514 "winprefsyacc.c"
     break;
 
   case 44: /* group2: OUTLINE  */
 #line 206 "winprefsyacc.y"
                   { (yyval.uVal)=STYLE_OUTLINE; }
-#line 1515 "winprefsyacc.c"
+#line 1520 "winprefsyacc.c"
     break;
 
   case 45: /* group2: NOFRAME  */
 #line 207 "winprefsyacc.y"
                   { (yyval.uVal)=STYLE_NOFRAME; }
-#line 1521 "winprefsyacc.c"
+#line 1526 "winprefsyacc.c"
     break;
 
   case 46: /* stylecombo: group1  */
 #line 210 "winprefsyacc.y"
                        { (yyval.uVal)=(yyvsp[0].uVal); }
-#line 1527 "winprefsyacc.c"
+#line 1532 "winprefsyacc.c"
     break;
 
   case 47: /* stylecombo: group2  */
 #line 211 "winprefsyacc.y"
                  { (yyval.uVal)=(yyvsp[0].uVal); }
-#line 1533 "winprefsyacc.c"
+#line 1538 "winprefsyacc.c"
     break;
 
   case 48: /* stylecombo: group1 group2  */
 #line 212 "winprefsyacc.y"
                         { (yyval.uVal)=(yyvsp[-1].uVal)|(yyvsp[0].uVal); }
-#line 1539 "winprefsyacc.c"
+#line 1544 "winprefsyacc.c"
     break;
 
   case 49: /* stylecombo: group2 group1  */
 #line 213 "winprefsyacc.y"
                         { (yyval.uVal)=(yyvsp[-1].uVal)|(yyvsp[0].uVal); }
-#line 1545 "winprefsyacc.c"
+#line 1550 "winprefsyacc.c"
     break;
 
   case 50: /* styleline: STRING stylecombo NEWLINE newline_or_nada  */
 #line 216 "winprefsyacc.y"
                                                           { AddStyleLine((yyvsp[-3].sVal), (yyvsp[-2].uVal)); free((yyvsp[-3].sVal)); }
-#line 1551 "winprefsyacc.c"
+#line 1556 "winprefsyacc.c"
     break;
 
   case 53: /* $@3: %empty  */
 #line 223 "winprefsyacc.y"
                   {OpenStyles();}
-#line 1557 "winprefsyacc.c"
+#line 1562 "winprefsyacc.c"
     break;
 
   case 54: /* styles: STYLES LB $@3 newline_or_nada stylelist RB  */
 #line 223 "winprefsyacc.y"
                                                                {CloseStyles();}
-#line 1563 "winprefsyacc.c"
+#line 1568 "winprefsyacc.c"
     break;
 
   case 55: /* atspot: %empty  */
 #line 226 "winprefsyacc.y"
         { (yyval.iVal)=AT_END; }
-#line 1569 "winprefsyacc.c"
+#line 1574 "winprefsyacc.c"
     break;
 
   case 56: /* atspot: ATSTART  */
 #line 227 "winprefsyacc.y"
                   { (yyval.iVal)=AT_START; }
-#line 1575 "winprefsyacc.c"
+#line 1580 "winprefsyacc.c"
     break;
 
   case 57: /* atspot: ATEND  */
 #line 228 "winprefsyacc.y"
                 { (yyval.iVal)=AT_END; }
-#line 1581 "winprefsyacc.c"
+#line 1586 "winprefsyacc.c"
     break;
 
   case 58: /* sysmenuline: STRING STRING atspot NEWLINE newline_or_nada  */
 #line 231 "winprefsyacc.y"
                                                              { AddSysMenuLine((yyvsp[-4].sVal), (yyvsp[-3].sVal), (yyvsp[-2].iVal)); free((yyvsp[-4].sVal)); free((yyvsp[-3].sVal)); }
-#line 1587 "winprefsyacc.c"
+#line 1592 "winprefsyacc.c"
     break;
 
   case 61: /* $@4: %empty  */
 #line 238 "winprefsyacc.y"
                                    {OpenSysMenu();}
-#line 1593 "winprefsyacc.c"
+#line 1598 "winprefsyacc.c"
     break;
 
   case 62: /* sysmenu: SYSMENU LB NEWLINE $@4 newline_or_nada sysmenulist RB  */
 #line 238 "winprefsyacc.y"
                                                                                    {CloseSysMenu();}
-#line 1599 "winprefsyacc.c"
+#line 1604 "winprefsyacc.c"
     break;
 
   case 63: /* forceexit: FORCEEXIT NEWLINE  */
 #line 241 "winprefsyacc.y"
                                   { pref.fForceExit = TRUE; }
-#line 1605 "winprefsyacc.c"
+#line 1610 "winprefsyacc.c"
     break;
 
   case 64: /* silentexit: SILENTEXIT NEWLINE  */
 #line 244 "winprefsyacc.y"
                                    { pref.fSilentExit = TRUE; }
-#line 1611 "winprefsyacc.c"
+#line 1616 "winprefsyacc.c"
     break;
 
   case 65: /* debug: "DEBUG" STRING NEWLINE  */
 #line 247 "winprefsyacc.y"
                                    { ErrorF("LoadPreferences: %s\n", (yyvsp[-1].sVal)); free((yyvsp[-1].sVal)); }
-#line 1617 "winprefsyacc.c"
+#line 1622 "winprefsyacc.c"
     break;
 
 
-#line 1621 "winprefsyacc.c"
+#line 1626 "winprefsyacc.c"
 
       default: break;
     }
@@ -1699,6 +1704,7 @@ yyerrorlab:
      label yyerrorlab therefore never appears in user code.  */
   if (0)
     YYERROR;
+  ++yynerrs;
 
   /* Do not reclaim the symbols of the rule whose action triggered
      this YYERROR.  */
@@ -1759,7 +1765,7 @@ yyerrlab1:
 `-------------------------------------*/
 yyacceptlab:
   yyresult = 0;
-  goto yyreturn;
+  goto yyreturnlab;
 
 
 /*-----------------------------------.
@@ -1767,24 +1773,22 @@ yyacceptlab:
 `-----------------------------------*/
 yyabortlab:
   yyresult = 1;
-  goto yyreturn;
+  goto yyreturnlab;
 
 
-#if !defined yyoverflow
-/*-------------------------------------------------.
-| yyexhaustedlab -- memory exhaustion comes here.  |
-`-------------------------------------------------*/
+/*-----------------------------------------------------------.
+| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here.  |
+`-----------------------------------------------------------*/
 yyexhaustedlab:
   yyerror (YY_("memory exhausted"));
   yyresult = 2;
-  goto yyreturn;
-#endif
+  goto yyreturnlab;
 
 
-/*-------------------------------------------------------.
-| yyreturn -- parsing is finished, clean up and return.  |
-`-------------------------------------------------------*/
-yyreturn:
+/*----------------------------------------------------------.
+| yyreturnlab -- parsing is finished, clean up and return.  |
+`----------------------------------------------------------*/
+yyreturnlab:
   if (yychar != YYEMPTY)
     {
       /* Make sure we have latest lookahead translation.  See comments at
diff --git a/hw/xwin/winprefsyacc.h b/hw/xwin/winprefsyacc.h
index 09deabf..3597dd9 100644
--- a/hw/xwin/winprefsyacc.h
+++ b/hw/xwin/winprefsyacc.h
@@ -1,8 +1,8 @@
-/* A Bison parser, made by GNU Bison 3.7.3.  */
+/* A Bison parser, made by GNU Bison 3.8.2.  */
 
 /* Bison interface for Yacc-like parsers in C
 
-   Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation,
+   Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
    Inc.
 
    This program is free software: you can redistribute it and/or modify
@@ -16,7 +16,7 @@
    GNU General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* As a special exception, you may create a larger work that contains
    part or all of the Bison parser skeleton and distribute that work
@@ -87,6 +87,7 @@ extern int yydebug;
   typedef enum yytokentype yytoken_kind_t;
 #endif
 /* Token kinds.  */
+#define YYEMPTY -2
 #define YYEOF 0
 #define YYerror 256
 #define YYUNDEF 257
@@ -130,7 +131,7 @@ union YYSTYPE
   unsigned long uVal;
   int iVal;
 
-#line 134 "winprefsyacc.h"
+#line 135 "winprefsyacc.h"
 
 };
 typedef union YYSTYPE YYSTYPE;
@@ -141,6 +142,8 @@ typedef union YYSTYPE YYSTYPE;
 
 extern YYSTYPE yylval;
 
+
 int yyparse (void);
 
+
 #endif /* !YY_YY_WINPREFSYACC_H_INCLUDED  */
diff --git a/hw/xwin/winprocarg.c b/hw/xwin/winprocarg.c
index 803e78f..66023f3 100644
--- a/hw/xwin/winprocarg.c
+++ b/hw/xwin/winprocarg.c
@@ -40,6 +40,7 @@ from The Open Group.
 #include "winconfig.h"
 #include "winmsg.h"
 #include "winmonitors.h"
+#include "winprefs.h"
 
 #include "winclipboard/winclipboard.h"
 
@@ -126,11 +127,9 @@ winInitializeScreenDefaults(void)
     defaultScreenInfo.pfb = NULL;
     defaultScreenInfo.fFullScreen = FALSE;
     defaultScreenInfo.fDecoration = TRUE;
-#ifdef XWIN_MULTIWINDOWEXTWM
-    defaultScreenInfo.fMWExtWM = FALSE;
-#endif
     defaultScreenInfo.fRootless = FALSE;
     defaultScreenInfo.fMultiWindow = FALSE;
+    defaultScreenInfo.fCompositeWM = TRUE;
     defaultScreenInfo.fMultiMonitorOverride = FALSE;
     defaultScreenInfo.fMultipleMonitors = FALSE;
     defaultScreenInfo.fLessPointer = FALSE;
@@ -141,6 +140,13 @@ winInitializeScreenDefaults(void)
     defaultScreenInfo.fUseUnixKillKey = WIN_DEFAULT_UNIX_KILL;
     defaultScreenInfo.fIgnoreInput = FALSE;
     defaultScreenInfo.fExplicitScreen = FALSE;
+    defaultScreenInfo.hIcon = (HICON)
+        LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_XWIN), IMAGE_ICON,
+                  GetSystemMetrics(SM_CXICON), GetSystemMetrics(SM_CYICON), 0);
+    defaultScreenInfo.hIconSm = (HICON)
+        LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_XWIN), IMAGE_ICON,
+                  GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON),
+                  LR_DEFAULTSIZE);
 
     /* Note that the default screen has been initialized */
     fInitializedScreenDefaults = TRUE;
@@ -311,11 +317,7 @@ ddxProcessArgument(int argc, char *argv[], int i)
         if (i + 2 < argc && 1 == sscanf(argv[i + 2], "@%d", (int *) &iMonitor)) {
             struct GetMonitorInfoData data;
 
-            if (!QueryMonitor(iMonitor, &data)) {
-                ErrorF
-                    ("ddxProcessArgument - screen - Querying monitors failed\n");
-            }
-            else if (data.bMonitorSpecifiedExists == TRUE) {
+            if (QueryMonitor(iMonitor, &data)) {
                 winErrorFVerb(2,
                               "ddxProcessArgument - screen - Found Valid ``@Monitor'' = %d arg\n",
                               iMonitor);
@@ -336,8 +338,7 @@ ddxProcessArgument(int argc, char *argv[], int i)
                 ErrorF
                     ("ddxProcessArgument - screen - Invalid monitor number %d\n",
                      iMonitor);
-                UseMsg();
-                exit(0);
+                exit(1);
                 return 0;
             }
         }
@@ -368,11 +369,7 @@ ddxProcessArgument(int argc, char *argv[], int i)
                                 (int *) &iMonitor)) {
                     struct GetMonitorInfoData data;
 
-                    if (!QueryMonitor(iMonitor, &data)) {
-                        ErrorF
-                            ("ddxProcessArgument - screen - Querying monitors failed\n");
-                    }
-                    else if (data.bMonitorSpecifiedExists == TRUE) {
+                    if (QueryMonitor(iMonitor, &data)) {
                         g_ScreenInfo[nScreenNum].iMonitor = iMonitor;
                         g_ScreenInfo[nScreenNum].hMonitor = data.monitorHandle;
                         g_ScreenInfo[nScreenNum].dwInitialX +=
@@ -385,11 +382,9 @@ ddxProcessArgument(int argc, char *argv[], int i)
                         ErrorF
                             ("ddxProcessArgument - screen - Invalid monitor number %d\n",
                              iMonitor);
-                        UseMsg();
-                        exit(0);
+                        exit(1);
                         return 0;
                     }
-
                 }
             }
 
@@ -397,11 +392,7 @@ ddxProcessArgument(int argc, char *argv[], int i)
             else if (1 == sscanf(argv[i + 2], "%*dx%*d@%d", (int *) &iMonitor)) {
                 struct GetMonitorInfoData data;
 
-                if (!QueryMonitor(iMonitor, &data)) {
-                    ErrorF
-                        ("ddxProcessArgument - screen - Querying monitors failed\n");
-                }
-                else if (data.bMonitorSpecifiedExists == TRUE) {
+                if (QueryMonitor(iMonitor, &data)) {
                     winErrorFVerb(2,
                                   "ddxProcessArgument - screen - Found Valid ``@Monitor'' = %d arg\n",
                                   iMonitor);
@@ -416,11 +407,9 @@ ddxProcessArgument(int argc, char *argv[], int i)
                     ErrorF
                         ("ddxProcessArgument - screen - Invalid monitor number %d\n",
                          iMonitor);
-                    UseMsg();
-                    exit(0);
+                    exit(1);
                     return 0;
                 }
-
             }
         }
         else if (i + 3 < argc && 1 == sscanf(argv[i + 2], "%d", (int *) &iWidth)
@@ -453,7 +442,7 @@ ddxProcessArgument(int argc, char *argv[], int i)
             g_ScreenInfo[nScreenNum].fUserGaveHeightAndWidth = FALSE;
         }
 
-        /* Flag that this screen was explicity specified by the user */
+        /* Flag that this screen was explicitly specified by the user */
         g_ScreenInfo[nScreenNum].fExplicitScreen = TRUE;
 
         /*
@@ -550,48 +539,63 @@ ddxProcessArgument(int argc, char *argv[], int i)
         return 1;
     }
 
-#ifdef XWIN_MULTIWINDOWEXTWM
     /*
-     * Look for the '-mwextwm' argument
+     * Look for the '-rootless' argument
      */
-    if (IS_OPTION("-mwextwm")) {
+    if (IS_OPTION("-rootless")) {
         if (!screenInfoPtr->fMultiMonitorOverride)
-            screenInfoPtr->fMultipleMonitors = TRUE;
-        screenInfoPtr->fMWExtWM = TRUE;
+            screenInfoPtr->fMultipleMonitors = FALSE;
+        screenInfoPtr->fRootless = TRUE;
 
         /* Indicate that we have processed this argument */
         return 1;
     }
+
     /*
-     * Look for the '-internalwm' argument
+     * Look for the '-multiwindow' argument
      */
-    if (IS_OPTION("-internalwm")) {
-        ErrorF("Ignoring obsolete -internalwm option\n");
-        /* Ignored, but we still accept the arg for backwards compatibility */
+    if (IS_OPTION("-multiwindow")) {
+        if (!screenInfoPtr->fMultiMonitorOverride)
+            screenInfoPtr->fMultipleMonitors = TRUE;
+        screenInfoPtr->fMultiWindow = TRUE;
+
         /* Indicate that we have processed this argument */
         return 1;
     }
-#endif
 
     /*
-     * Look for the '-rootless' argument
+     * Look for the '-compositewm' argument
      */
-    if (IS_OPTION("-rootless")) {
-        if (!screenInfoPtr->fMultiMonitorOverride)
-            screenInfoPtr->fMultipleMonitors = FALSE;
-        screenInfoPtr->fRootless = TRUE;
+    if (IS_OPTION("-compositewm")) {
+        screenInfoPtr->fCompositeWM = TRUE;
+
+        /* Indicate that we have processed this argument */
+        return 1;
+    }
+    /*
+     * Look for the '-nocompositewm' argument
+     */
+    if (IS_OPTION("-nocompositewm")) {
+        screenInfoPtr->fCompositeWM = FALSE;
 
         /* Indicate that we have processed this argument */
         return 1;
     }
 
     /*
-     * Look for the '-multiwindow' argument
+     * Look for the '-compositealpha' argument
      */
-    if (IS_OPTION("-multiwindow")) {
-        if (!screenInfoPtr->fMultiMonitorOverride)
-            screenInfoPtr->fMultipleMonitors = TRUE;
-        screenInfoPtr->fMultiWindow = TRUE;
+    if (IS_OPTION("-compositealpha")) {
+        g_fCompositeAlpha = TRUE;
+
+        /* Indicate that we have processed this argument */
+        return 1;
+    }
+    /*
+     * Look for the '-nocompositealpha' argument
+     */
+    if (IS_OPTION("-nocompositealpha")) {
+        g_fCompositeAlpha  = FALSE;
 
         /* Indicate that we have processed this argument */
         return 1;
@@ -1000,15 +1004,6 @@ ddxProcessArgument(int argc, char *argv[], int i)
         return 2;
     }
 
-    /*
-     * Look for the '-nounicodeclipboard' argument
-     */
-    if (IS_OPTION("-nounicodeclipboard")) {
-        g_fUnicodeClipboard = FALSE;
-        /* Indicate that we have processed the argument */
-        return 1;
-    }
-
     if (IS_OPTION("-xkbrules")) {
         CHECK_ARGS(1);
         g_cmdline.xkbRules = argv[++i];
@@ -1070,6 +1065,29 @@ ddxProcessArgument(int argc, char *argv[], int i)
         return 1;
     }
 
+    if (IS_OPTION("-icon")) {
+        char *iconspec;
+        CHECK_ARGS(1);
+        iconspec = argv[++i];
+        screenInfoPtr->hIcon = LoadImageComma(iconspec, NULL,
+                                              GetSystemMetrics(SM_CXICON),
+                                              GetSystemMetrics(SM_CYICON),
+                                              0);
+        screenInfoPtr->hIconSm = LoadImageComma(iconspec, NULL,
+                                                GetSystemMetrics(SM_CXSMICON),
+                                                GetSystemMetrics(SM_CYSMICON),
+                                                LR_DEFAULTSIZE);
+        if ((screenInfoPtr->hIcon == NULL) ||
+            (screenInfoPtr->hIconSm == NULL)) {
+            ErrorF("ddxProcessArgument - icon - Invalid icon specification %s\n",
+                   iconspec);
+            exit(1);
+        }
+
+        /* Indicate that we have processed the argument */
+        return 2;
+    }
+
     return 0;
 }
 
diff --git a/hw/xwin/winrandr.c b/hw/xwin/winrandr.c
index 3e08422..038d63b 100644
--- a/hw/xwin/winrandr.c
+++ b/hw/xwin/winrandr.c
@@ -42,17 +42,17 @@
 static Bool
 winRandRGetInfo(ScreenPtr pScreen, Rotation * pRotations)
 {
-    rrScrPrivPtr pRRScrPriv;
-    RROutputPtr output;
-
-    pRRScrPriv = rrGetScrPriv(pScreen);
-    output = pRRScrPriv->outputs[0];
-
     winDebug("winRandRGetInfo ()\n");
 
     /* Don't support rotations */
     *pRotations = RR_Rotate_0;
 
+    return TRUE;
+}
+
+static void
+winRandRUpdateMode(ScreenPtr pScreen, RROutputPtr output)
+{
     /* Delete previous mode */
     if (output->modes[0])
         {
@@ -83,8 +83,6 @@ winRandRGetInfo(ScreenPtr pScreen, Rotation * pRotations)
         mode = RRModeGet(&modeInfo, name);
         output->crtc->mode = mode;
     }
-
-    return TRUE;
 }
 
 /*
@@ -95,6 +93,7 @@ winDoRandRScreenSetSize(ScreenPtr pScreen,
                         CARD16 width,
                         CARD16 height, CARD32 mmWidth, CARD32 mmHeight)
 {
+    rrScrPrivPtr pRRScrPriv;
     winScreenPriv(pScreen);
     winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo;
     WindowPtr pRoot = pScreen->root;
@@ -136,6 +135,10 @@ winDoRandRScreenSetSize(ScreenPtr pScreen,
     // and arrange for it to be repainted
     pScreen->PaintWindow(pRoot, &pRoot->borderClip, PW_BACKGROUND);
 
+    // Set mode to current display size
+    pRRScrPriv = rrGetScrPriv(pScreen);
+    winRandRUpdateMode(pScreen, pRRScrPriv->primaryOutput);
+
     /* Indicate that a screen size change took place */
     RRScreenSizeNotify(pScreen);
 }
@@ -170,9 +173,6 @@ winRandRScreenSetSize(ScreenPtr pScreen,
        resize the native display size
      */
     if (FALSE
-#ifdef XWIN_MULTIWINDOWEXTWM
-        || pScreenInfo->fMWExtWM
-#endif
         || pScreenInfo->fRootless
         || pScreenInfo->fMultiWindow
         ) {
@@ -273,6 +273,24 @@ winRandRInit(ScreenPtr pScreen)
         /* Ensure we have space for exactly one mode */
         output->modes = malloc(sizeof(RRModePtr));
         output->modes[0] = NULL;
+
+        /* Set mode to current display size */
+        winRandRUpdateMode(pScreen, output);
+
+        /* Make up some physical dimensions */
+        output->mmWidth = (pScreen->width * 25.4)/monitorResolution;
+        output->mmHeight = (pScreen->height * 25.4)/monitorResolution;
+
+        /* Allocate and make up a (fixed, linear) gamma ramp */
+        {
+            int i;
+            RRCrtcGammaSetSize(crtc, 256);
+            for (i = 0; i < crtc->gammaSize; i++) {
+                crtc->gammaRed[i] = i << 8;
+                crtc->gammaBlue[i] = i << 8;
+                crtc->gammaGreen[i] = i << 8;
+            }
+        }
     }
 
     /*
diff --git a/hw/xwin/winscrinit.c b/hw/xwin/winscrinit.c
index a44e21f..ae6bc12 100644
--- a/hw/xwin/winscrinit.c
+++ b/hw/xwin/winscrinit.c
@@ -38,45 +38,9 @@
 #include "win.h"
 #include "winmsg.h"
 
-#ifdef XWIN_MULTIWINDOWEXTWM
-static RootlessFrameProcsRec winMWExtWMProcs = {
-    winMWExtWMCreateFrame,
-    winMWExtWMDestroyFrame,
-
-    winMWExtWMMoveFrame,
-    winMWExtWMResizeFrame,
-    winMWExtWMRestackFrame,
-    winMWExtWMReshapeFrame,
-    winMWExtWMUnmapFrame,
-
-    winMWExtWMStartDrawing,
-    winMWExtWMStopDrawing,
-    winMWExtWMUpdateRegion,
-    winMWExtWMDamageRects,
-    winMWExtWMRootlessSwitchWindow,
-    NULL,                       //winMWExtWMDoReorderWindow,
-    NULL,                       //winMWExtWMHideWindow,
-    NULL,                       //winMWExtWMUpdateColorMap,
-
-    NULL,                       //winMWExtWMCopyBytes,
-    winMWExtWMCopyWindow
-};
-#endif
-
-/*
- * Prototypes
- */
-
-/*
- * Local functions
- */
-
-static Bool
- winSaveScreen(ScreenPtr pScreen, int on);
-
 /*
  * Determine what type of screen we are initializing
- * and call the appropriate procedure to intiailize
+ * and call the appropriate procedure to initialize
  * that type of screen.
  */
 
@@ -137,7 +101,7 @@ winScreenInit(ScreenPtr pScreen, int argc, char **argv)
     else if (dwInitialBPP != pScreenInfo->dwBPP) {
         /* Warn user if engine forced a depth different to -depth parameter */
         ErrorF
-            ("winScreenInit - Command line depth of %d bpp overidden by engine, using %d bpp\n",
+            ("winScreenInit - Command line depth of %d bpp overridden by engine, using %d bpp\n",
              (int) dwInitialBPP, (int) pScreenInfo->dwBPP);
     }
     else {
@@ -294,6 +258,11 @@ winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv)
         return FALSE;
     }
 
+    if ((pScreenInfo->dwBPP == 8) && (pScreenInfo->fCompositeWM)) {
+        ErrorF("-compositewm disabled due to 8bpp depth\n");
+        pScreenInfo->fCompositeWM = FALSE;
+    }
+
     /* Apparently we need this for the render extension */
     miSetPixmapDepths();
 
@@ -319,7 +288,7 @@ winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv)
          * own colormap, as it cannot allocate 7 planes in the default
          * colormap.  Setting whitePixel to 1 allows Magic to get 7
          * planes in the default colormap, so it doesn't create its
-         * own colormap.  This latter situation is highly desireable,
+         * own colormap.  This latter situation is highly desirable,
          * as it keeps the Magic window viewable when switching to
          * other X clients that use the default colormap.
          */
@@ -327,9 +296,6 @@ winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv)
         pScreen->whitePixel = 1;
     }
 
-    /* Place our save screen function */
-    pScreen->SaveScreen = winSaveScreen;
-
     /* Finish fb initialization */
     if (!fbFinishScreenInit(pScreen,
                             pScreenInfo->pfb,
@@ -384,11 +350,7 @@ winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv)
 
     /* Initialize the shadow framebuffer layer */
     if ((pScreenInfo->dwEngine == WIN_SERVER_SHADOW_GDI
-         || pScreenInfo->dwEngine == WIN_SERVER_SHADOW_DDNL)
-#ifdef XWIN_MULTIWINDOWEXTWM
-        && !pScreenInfo->fMWExtWM
-#endif
-        ) {
+         || pScreenInfo->dwEngine == WIN_SERVER_SHADOW_DDNL)) {
 #if CYGDEBUG
         winDebug("winFinishScreenInitFB - Calling shadowSetup ()\n");
 #endif
@@ -403,23 +365,6 @@ winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv)
         pScreen->CreateScreenResources = winCreateScreenResources;
     }
 
-#ifdef XWIN_MULTIWINDOWEXTWM
-    /* Handle multi-window external window manager mode */
-    if (pScreenInfo->fMWExtWM) {
-        winDebug("winScreenInit - MultiWindowExtWM - Calling RootlessInit\n");
-
-        RootlessInit(pScreen, &winMWExtWMProcs);
-
-        winDebug("winScreenInit - MultiWindowExtWM - RootlessInit returned\n");
-
-        rootless_CopyBytes_threshold = 0;
-        /* FIXME: How many? Profiling needed? */
-        rootless_CopyWindow_threshold = 1;
-
-        winWindowsWMExtensionInit();
-    }
-#endif
-
     /* Handle rootless mode */
     if (pScreenInfo->fRootless) {
         /* Define the WRAP macro temporarily for local use */
@@ -477,6 +422,7 @@ winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv)
         WRAP(MoveWindow);
         WRAP(CopyWindow);
         WRAP(SetShape);
+        WRAP(ModifyPixmapHeader);
 
         /* Assign multi-window window procedures to be top level procedures */
         pScreen->CreateWindow = winCreateWindowMultiWindow;
@@ -492,6 +438,12 @@ winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv)
         pScreen->CopyWindow = winCopyWindowMultiWindow;
         pScreen->SetShape = winSetShapeMultiWindow;
 
+        if (pScreenInfo->fCompositeWM) {
+            pScreen->CreatePixmap = winCreatePixmapMultiwindow;
+            pScreen->DestroyPixmap = winDestroyPixmapMultiwindow;
+            pScreen->ModifyPixmapHeader = winModifyPixmapHeaderMultiwindow;
+        }
+
         /* Undefine the WRAP macro, as it is not needed elsewhere */
 #undef WRAP
     }
@@ -519,9 +471,6 @@ winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv)
     /* Set the ServerStarted flag to false */
     pScreenPriv->fServerStarted = FALSE;
 
-#ifdef XWIN_MULTIWINDOWEXTWM
-    pScreenPriv->fRestacking = FALSE;
-#endif
 
     if (pScreenInfo->fMultiWindow) {
 #if CYGDEBUG || YES
@@ -534,7 +483,8 @@ winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv)
                        &pScreenPriv->ptXMsgProc,
                        &pScreenPriv->pmServerStarted,
                        pScreenInfo->dwScreen,
-                       (HWND) &pScreenPriv->hwndScreen)) {
+                       (HWND) &pScreenPriv->hwndScreen,
+                       pScreenInfo->fCompositeWM)) {
             ErrorF("winFinishScreenInitFB - winInitWM () failed.\n");
             return FALSE;
         }
@@ -552,10 +502,3 @@ winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv)
 
     return TRUE;
 }
-
-/* See Porting Layer Definition - p. 33 */
-static Bool
-winSaveScreen(ScreenPtr pScreen, int on)
-{
-    return TRUE;
-}
diff --git a/hw/xwin/winshadddnl.c b/hw/xwin/winshadddnl.c
index 4e1fbd1..2901769 100644
--- a/hw/xwin/winshadddnl.c
+++ b/hw/xwin/winshadddnl.c
@@ -1201,6 +1201,7 @@ winSetEngineFunctionsShadowDDNL(ScreenPtr pScreen)
         pScreenPriv->pwinCreateBoundingWindow = winCreateBoundingWindowWindowed;
     pScreenPriv->pwinFinishScreenInit = winFinishScreenInitFB;
     pScreenPriv->pwinBltExposedRegions = winBltExposedRegionsShadowDDNL;
+    pScreenPriv->pwinBltExposedWindowRegion = NULL;
     pScreenPriv->pwinActivateApp = winActivateAppShadowDDNL;
     pScreenPriv->pwinRedrawScreen = winRedrawScreenShadowDDNL;
     pScreenPriv->pwinRealizeInstalledPalette
diff --git a/hw/xwin/winshadgdi.c b/hw/xwin/winshadgdi.c
index 6d7ebce..25e16bf 100644
--- a/hw/xwin/winshadgdi.c
+++ b/hw/xwin/winshadgdi.c
@@ -59,6 +59,9 @@ static Bool
 static Bool
  winBltExposedRegionsShadowGDI(ScreenPtr pScreen);
 
+static Bool
+ winBltExposedWindowRegionShadowGDI(ScreenPtr pScreen, WindowPtr pWin);
+
 static Bool
  winActivateAppShadowGDI(ScreenPtr pScreen);
 
@@ -750,6 +753,12 @@ winBltExposedRegionsShadowGDI(ScreenPtr pScreen)
 
     /* BeginPaint gives us an hdc that clips to the invalidated region */
     hdcUpdate = BeginPaint(pScreenPriv->hwndScreen, &ps);
+    /* Avoid the BitBlt if the PAINTSTRUCT region is bogus */
+    if (ps.rcPaint.right == 0 && ps.rcPaint.bottom == 0 &&
+        ps.rcPaint.left == 0 && ps.rcPaint.top == 0) {
+        EndPaint(pScreenPriv->hwndScreen, &ps);
+        return 0;
+    }
 
     /* Realize the palette, if we have one */
     if (pScreenPriv->pcmapInstalled != NULL) {
@@ -759,11 +768,30 @@ winBltExposedRegionsShadowGDI(ScreenPtr pScreen)
         RealizePalette(hdcUpdate);
     }
 
-    /* Our BitBlt will be clipped to the invalidated region */
-    BitBlt(hdcUpdate,
-           0, 0,
-           pScreenInfo->dwWidth, pScreenInfo->dwHeight,
-           pScreenPriv->hdcShadow, 0, 0, SRCCOPY);
+    /* Try to copy from the shadow buffer to the invalidated region */
+    if (!BitBlt(hdcUpdate,
+                ps.rcPaint.left, ps.rcPaint.top,
+                ps.rcPaint.right - ps.rcPaint.left,
+                ps.rcPaint.bottom - ps.rcPaint.top,
+                pScreenPriv->hdcShadow,
+                ps.rcPaint.left,
+                ps.rcPaint.top,
+                SRCCOPY)) {
+        LPVOID lpMsgBuf;
+
+        /* Display an error message */
+        FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
+                      FORMAT_MESSAGE_FROM_SYSTEM |
+                      FORMAT_MESSAGE_IGNORE_INSERTS,
+                      NULL,
+                      GetLastError(),
+                      MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
+                      (LPTSTR) &lpMsgBuf, 0, NULL);
+
+        ErrorF("winBltExposedRegionsShadowGDI - BitBlt failed: %s\n",
+               (LPSTR) lpMsgBuf);
+        LocalFree(lpMsgBuf);
+    }
 
     /* EndPaint frees the DC */
     EndPaint(pScreenPriv->hwndScreen, &ps);
@@ -776,6 +804,128 @@ winBltExposedRegionsShadowGDI(ScreenPtr pScreen)
     return TRUE;
 }
 
+/*
+ * Blt exposed region to the given HWND
+ */
+
+static Bool
+winBltExposedWindowRegionShadowGDI(ScreenPtr pScreen, WindowPtr pWin)
+{
+    winScreenPriv(pScreen);
+    winPrivWinPtr pWinPriv = winGetWindowPriv(pWin);
+
+    HWND hWnd = pWinPriv->hWnd;
+    HDC hdcUpdate;
+    PAINTSTRUCT ps;
+
+    hdcUpdate = BeginPaint(hWnd, &ps);
+    /* Avoid the BitBlt if the PAINTSTRUCT region is bogus */
+    if (ps.rcPaint.right == 0 && ps.rcPaint.bottom == 0 &&
+        ps.rcPaint.left == 0 && ps.rcPaint.top == 0) {
+        EndPaint(hWnd, &ps);
+        return 0;
+    }
+
+#ifdef COMPOSITE
+    if (pWin->redirectDraw != RedirectDrawNone) {
+        HBITMAP hBitmap;
+        HDC hdcPixmap;
+        PixmapPtr pPixmap = (*pScreen->GetWindowPixmap) (pWin);
+        winPrivPixmapPtr pPixmapPriv = winGetPixmapPriv(pPixmap);
+
+        /* window pixmap format is the same as the screen pixmap */
+        assert(pPixmap->drawable.bitsPerPixel > 8);
+
+        /* Get the window bitmap from the pixmap */
+        hBitmap = pPixmapPriv->hBitmap;
+
+        /* XXX: There may be a need for a slow-path here: If hBitmap is NULL
+           (because we couldn't back the pixmap with a Windows DIB), we should
+           fall-back to creating a Windows DIB from the pixmap, then deleting it
+           after the BitBlt (as this this code did before the fast-path was
+           added). */
+        if (!hBitmap) {
+            ErrorF("winBltExposedWindowRegionShadowGDI - slow path unimplemented\n");
+        }
+
+        /* Select the window bitmap into a screen-compatible DC */
+        hdcPixmap = CreateCompatibleDC(pScreenPriv->hdcScreen);
+        SelectObject(hdcPixmap, hBitmap);
+
+        /* Blt from the window bitmap to the invalidated region */
+        if (!BitBlt(hdcUpdate,
+                    ps.rcPaint.left, ps.rcPaint.top,
+                    ps.rcPaint.right - ps.rcPaint.left,
+                    ps.rcPaint.bottom - ps.rcPaint.top,
+                    hdcPixmap,
+                    ps.rcPaint.left + pWin->borderWidth,
+                    ps.rcPaint.top + pWin->borderWidth,
+                    SRCCOPY))
+            ErrorF("winBltExposedWindowRegionShadowGDI - BitBlt failed: 0x%08x\n",
+                   GetLastError());
+
+        /* Release DC */
+        DeleteDC(hdcPixmap);
+    }
+    else
+#endif
+    {
+    /* Try to copy from the shadow buffer to the invalidated region */
+    if (!BitBlt(hdcUpdate,
+                ps.rcPaint.left, ps.rcPaint.top,
+                ps.rcPaint.right - ps.rcPaint.left,
+                ps.rcPaint.bottom - ps.rcPaint.top,
+                pScreenPriv->hdcShadow,
+                ps.rcPaint.left + pWin->drawable.x,
+                ps.rcPaint.top + pWin->drawable.y,
+                SRCCOPY)) {
+        LPVOID lpMsgBuf;
+
+        /* Display an error message */
+        FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
+                      FORMAT_MESSAGE_FROM_SYSTEM |
+                      FORMAT_MESSAGE_IGNORE_INSERTS,
+                      NULL,
+                      GetLastError(),
+                      MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
+                      (LPTSTR) &lpMsgBuf, 0, NULL);
+
+        ErrorF("winBltExposedWindowRegionShadowGDI - BitBlt failed: %s\n",
+               (LPSTR) lpMsgBuf);
+        LocalFree(lpMsgBuf);
+    }
+    }
+
+    /* If part of the invalidated region is outside the window (which can happen
+       if the native window is being re-sized), fill that area with black */
+    if (ps.rcPaint.right > ps.rcPaint.left + pWin->drawable.width) {
+        BitBlt(hdcUpdate,
+               ps.rcPaint.left + pWin->drawable.width,
+               ps.rcPaint.top,
+               ps.rcPaint.right - (ps.rcPaint.left + pWin->drawable.width),
+               ps.rcPaint.bottom - ps.rcPaint.top,
+               NULL,
+               0, 0,
+               BLACKNESS);
+    }
+
+    if (ps.rcPaint.bottom > ps.rcPaint.top + pWin->drawable.height) {
+        BitBlt(hdcUpdate,
+               ps.rcPaint.left,
+               ps.rcPaint.top + pWin->drawable.height,
+               ps.rcPaint.right - ps.rcPaint.left,
+               ps.rcPaint.bottom - (ps.rcPaint.top + pWin->drawable.height),
+               NULL,
+               0, 0,
+               BLACKNESS);
+    }
+
+    /* EndPaint frees the DC */
+    EndPaint(hWnd, &ps);
+
+    return TRUE;
+}
+
 /*
  * Do any engine-specific appliation-activation processing
  */
@@ -1095,7 +1245,7 @@ winDestroyColormapShadowGDI(ColormapPtr pColormap)
 }
 
 /*
- * Set engine specific funtions
+ * Set engine specific functions
  */
 
 Bool
@@ -1119,6 +1269,7 @@ winSetEngineFunctionsShadowGDI(ScreenPtr pScreen)
         pScreenPriv->pwinCreateBoundingWindow = winCreateBoundingWindowWindowed;
     pScreenPriv->pwinFinishScreenInit = winFinishScreenInitFB;
     pScreenPriv->pwinBltExposedRegions = winBltExposedRegionsShadowGDI;
+    pScreenPriv->pwinBltExposedWindowRegion = winBltExposedWindowRegionShadowGDI;
     pScreenPriv->pwinActivateApp = winActivateAppShadowGDI;
     pScreenPriv->pwinRedrawScreen = winRedrawScreenShadowGDI;
     pScreenPriv->pwinRealizeInstalledPalette =
diff --git a/hw/xwin/wintrayicon.c b/hw/xwin/wintrayicon.c
index a22ca24..5d1e6ae 100644
--- a/hw/xwin/wintrayicon.c
+++ b/hw/xwin/wintrayicon.c
@@ -115,11 +115,6 @@ winHandleIconMessage(HWND hwnd, UINT message,
     case WM_LBUTTONUP:
         /* Restack and bring all windows to top */
         SetForegroundWindow (pScreenPriv->hwndScreen);
-
-#ifdef XWIN_MULTIWINDOWEXTWM
-        if (pScreenInfo->fMWExtWM)
-            winMWExtWMRestackWindows(pScreenInfo->pScreen);
-#endif
         break;
 
     case WM_LBUTTONDBLCLK:
diff --git a/hw/xwin/winvalargs.c b/hw/xwin/winvalargs.c
index 50587d4..008c111 100644
--- a/hw/xwin/winvalargs.c
+++ b/hw/xwin/winvalargs.c
@@ -80,7 +80,7 @@ winValidateArgs(void)
     for (i = 0; i < g_iNumScreens; ++i) {
         /*
          * Check for any combination of
-         * -multiwindow, -mwextwm, and -rootless.
+         * -multiwindow and -rootless.
          */
         {
             int iCount = 0;
@@ -88,10 +88,7 @@ winValidateArgs(void)
             /* Count conflicting options */
             if (g_ScreenInfo[i].fMultiWindow)
                 ++iCount;
-#ifdef XWIN_MULTIWINDOWEXTWM
-            if (g_ScreenInfo[i].fMWExtWM)
-                ++iCount;
-#endif
+
             if (g_ScreenInfo[i].fRootless)
                 ++iCount;
 
@@ -101,52 +98,42 @@ winValidateArgs(void)
 
             /* Fail if two or more conflicting options */
             if (iCount > 1) {
-                ErrorF("winValidateArgs - Only one of -multiwindow, -mwextwm, "
+                ErrorF("winValidateArgs - Only one of -multiwindow "
                        "and -rootless can be specific at a time.\n");
                 return FALSE;
             }
         }
 
-        /* Check for -multiwindow or -mwextwm and Xdmcp */
+        /* Check for -multiwindow and Xdmcp */
         /* allow xdmcp if screen 0 is normal. */
         if (g_fXdmcpEnabled && !fHasNormalScreen0 && (FALSE
                                                       || g_ScreenInfo[i].
                                                       fMultiWindow
 
-#ifdef XWIN_MULTIWINDOWEXTWM
-                                                      || g_ScreenInfo[i].
-                                                      fMWExtWM
-#endif
             )
             ) {
             ErrorF("winValidateArgs - Xdmcp (-query, -broadcast, or -indirect) "
-                   "is invalid with -multiwindow or -mwextwm.\n");
+                   "is invalid with -multiwindow.\n");
             return FALSE;
         }
 
-        /* Check for -multiwindow, -mwextwm, or -rootless and -fullscreen */
+        /* Check for -multiwindow or -rootless and -fullscreen */
         if (g_ScreenInfo[i].fFullScreen && (FALSE
                                             || g_ScreenInfo[i].fMultiWindow
-#ifdef XWIN_MULTIWINDOWEXTWM
-                                            || g_ScreenInfo[i].fMWExtWM
-#endif
                                             || g_ScreenInfo[i].fRootless)
             ) {
             ErrorF("winValidateArgs - -fullscreen is invalid with "
-                   "-multiwindow, -mwextwm, or -rootless.\n");
+                   "-multiwindow or -rootless.\n");
             return FALSE;
         }
 
-        /* Check for -multiwindow, -mwextwm, or -rootless and -nodecoration */
+        /* Check for -multiwindow or -rootless and -nodecoration */
         if (!g_ScreenInfo[i].fDecoration && (FALSE
                                             || g_ScreenInfo[i].fMultiWindow
-#ifdef XWIN_MULTIWINDOWEXTWM
-                                            || g_ScreenInfo[i].fMWExtWM
-#endif
                                             || g_ScreenInfo[i].fRootless)
             ) {
             ErrorF("winValidateArgs - -nodecoration is invalid with "
-                   "-multiwindow, -mwextwm, or -rootless.\n");
+                   "-multiwindow or -rootless.\n");
             return FALSE;
         }
 
@@ -168,6 +155,14 @@ winValidateArgs(void)
                    "-scrollbars, -resize, -nodecoration, or -lesspointer.\n");
             return FALSE;
         }
+
+        /* Ignore -swcursor if -multiwindow -compositewm is requested */
+        if (g_ScreenInfo[i].fMultiWindow && g_ScreenInfo[i].fCompositeWM) {
+            if (g_fSoftwareCursor) {
+                g_fSoftwareCursor = FALSE;
+                winMsg(X_WARNING, "Ignoring -swcursor due to -compositewm\n");
+            }
+        }
     }
 
     winDebug("winValidateArgs - Returning.\n");
diff --git a/hw/xwin/winwin32rootless.c b/hw/xwin/winwin32rootless.c
deleted file mode 100644
index 5280688..0000000
--- a/hw/xwin/winwin32rootless.c
+++ /dev/null
@@ -1,965 +0,0 @@
-/*
- *Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved.
- *
- *Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- *"Software"), to deal in the Software without restriction, including
- *without limitation the rights to use, copy, modify, merge, publish,
- *distribute, sublicense, and/or sell copies of the Software, and to
- *permit persons to whom the Software is furnished to do so, subject to
- *the following conditions:
- *
- *The above copyright notice and this permission notice shall be
- *included in all copies or substantial portions of the Software.
- *
- *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *NONINFRINGEMENT. IN NO EVENT SHALL THE XFREE86 PROJECT BE LIABLE FOR
- *ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- *CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- *Except as contained in this notice, the name of the XFree86 Project
- *shall not be used in advertising or otherwise to promote the sale, use
- *or other dealings in this Software without prior written authorization
- *from the XFree86 Project.
- *
- * Authors:	Kensuke Matsuzaki
- *		Earle F. Philhower, III
- *		Harold L Hunt II
- */
-/*
- * Look at hw/darwin/quartz/xpr/xprFrame.c and hw/darwin/quartz/cr/crFrame.c
- */
-#ifdef HAVE_XWIN_CONFIG_H
-#include <xwin-config.h>
-#endif
-#include "win.h"
-#include <winuser.h>
-#define _WINDOWSWM_SERVER_
-#include <X11/extensions/windowswmstr.h>
-#include "winmultiwindowclass.h"
-#include "winmultiwindowicons.h"
-#include <X11/Xatom.h>
-
-/*
- * Constant defines
- */
-
-#ifndef ULW_COLORKEY
-#define ULW_COLORKEY	0x00000001
-#endif
-#ifndef ULW_ALPHA
-#define ULW_ALPHA	0x00000002
-#endif
-#ifndef ULW_OPAQUE
-#define ULW_OPAQUE	0x00000004
-#endif
-#define AC_SRC_ALPHA	0x01
-
-/*
- * Local function
- */
-
-DEFINE_ATOM_HELPER(AtmWindowsWmNativeHwnd, WINDOWSWM_NATIVE_HWND)
-static void
-winMWExtWMSetNativeProperty(RootlessWindowPtr pFrame);
-
-/*
- * Global variables
- */
-
-Bool g_fNoConfigureWindow = FALSE;
-
-/*
- * Internal function to get the DIB format that is compatible with the screen
- * Fixme: Share code with winshadgdi.c
- */
-
-static
-Bool
-winMWExtWMQueryDIBFormat(win32RootlessWindowPtr pRLWinPriv,
-                         BITMAPINFOHEADER * pbmih)
-{
-    HBITMAP hbmp;
-
-#if CYGMULTIWINDOW_DEBUG
-    LPDWORD pdw = NULL;
-#endif
-
-    /* Create a memory bitmap compatible with the screen */
-    hbmp = CreateCompatibleBitmap(pRLWinPriv->hdcScreen, 1, 1);
-    if (hbmp == NULL) {
-        ErrorF("winMWExtWMQueryDIBFormat - CreateCompatibleBitmap failed\n");
-        return FALSE;
-    }
-
-    /* Initialize our bitmap info header */
-    ZeroMemory(pbmih, sizeof(BITMAPINFOHEADER) + 256 * sizeof(RGBQUAD));
-    pbmih->biSize = sizeof(BITMAPINFOHEADER);
-
-    /* Get the biBitCount */
-    if (!GetDIBits(pRLWinPriv->hdcScreen,
-                   hbmp, 0, 1, NULL, (BITMAPINFO *) pbmih, DIB_RGB_COLORS)) {
-        ErrorF("winMWExtWMQueryDIBFormat - First call to GetDIBits failed\n");
-        DeleteObject(hbmp);
-        return FALSE;
-    }
-
-#if CYGMULTIWINDOW_DEBUG
-    /* Get a pointer to bitfields */
-    pdw = (DWORD *) ((CARD8 *) pbmih + sizeof(BITMAPINFOHEADER));
-
-    winDebug("winMWExtWMQueryDIBFormat - First call masks: %08x %08x %08x\n",
-             (unsigned int) pdw[0], (unsigned int) pdw[1],
-             (unsigned int) pdw[2]);
-#endif
-
-    /* Get optimal color table, or the optimal bitfields */
-    if (!GetDIBits(pRLWinPriv->hdcScreen,
-                   hbmp, 0, 1, NULL, (BITMAPINFO *) pbmih, DIB_RGB_COLORS)) {
-        ErrorF("winMWExtWMQueryDIBFormat - Second call to GetDIBits "
-               "failed\n");
-        DeleteObject(hbmp);
-        return FALSE;
-    }
-
-    /* Free memory */
-    DeleteObject(hbmp);
-
-    return TRUE;
-}
-
-static HRGN
-winMWExtWMCreateRgnFromRegion(RegionPtr pShape)
-{
-    int nRects;
-    BoxPtr pRects, pEnd;
-    HRGN hRgn, hRgnRect;
-
-    if (pShape == NULL)
-        return NULL;
-
-    nRects = RegionNumRects(pShape);
-    pRects = RegionRects(pShape);
-
-    hRgn = CreateRectRgn(0, 0, 0, 0);
-    if (hRgn == NULL) {
-        ErrorF("winReshape - Initial CreateRectRgn (%d, %d, %d, %d) "
-               "failed: %d\n", 0, 0, 0, 0, (int) GetLastError());
-    }
-
-    /* Loop through all rectangles in the X region */
-    for (pEnd = pRects + nRects; pRects < pEnd; pRects++) {
-        /* Create a Windows region for the X rectangle */
-        hRgnRect = CreateRectRgn(pRects->x1,
-                                 pRects->y1, pRects->x2, pRects->y2);
-        if (hRgnRect == NULL) {
-            ErrorF("winReshape - Loop CreateRectRgn (%d, %d, %d, %d) "
-                   "failed: %d\n",
-                   pRects->x1,
-                   pRects->y1, pRects->x2, pRects->y2, (int) GetLastError());
-        }
-
-        /* Merge the Windows region with the accumulated region */
-        if (CombineRgn(hRgn, hRgn, hRgnRect, RGN_OR) == ERROR) {
-            ErrorF("winReshape - CombineRgn () failed: %d\n",
-                   (int) GetLastError());
-        }
-
-        /* Delete the temporary Windows region */
-        DeleteObject(hRgnRect);
-    }
-
-    return hRgn;
-}
-
-static void
-InitWin32RootlessEngine(win32RootlessWindowPtr pRLWinPriv)
-{
-    pRLWinPriv->hdcScreen = GetDC(pRLWinPriv->hWnd);
-    pRLWinPriv->hdcShadow = CreateCompatibleDC(pRLWinPriv->hdcScreen);
-    pRLWinPriv->hbmpShadow = NULL;
-
-    /* Allocate bitmap info header */
-    pRLWinPriv->pbmihShadow =
-        malloc(sizeof(BITMAPINFOHEADER)
-               + 256 * sizeof(RGBQUAD));
-    if (pRLWinPriv->pbmihShadow == NULL) {
-        ErrorF("InitWin32RootlessEngine - malloc () failed\n");
-        return;
-    }
-
-    /* Query the screen format */
-    winMWExtWMQueryDIBFormat(pRLWinPriv, pRLWinPriv->pbmihShadow);
-}
-
-Bool
-winMWExtWMCreateFrame(RootlessWindowPtr pFrame, ScreenPtr pScreen,
-                      int newX, int newY, RegionPtr pShape)
-{
-#define CLASS_NAME_LENGTH 512
-    Bool fResult = TRUE;
-    win32RootlessWindowPtr pRLWinPriv;
-    WNDCLASSEX wc;
-    char pszClass[CLASS_NAME_LENGTH], pszWindowID[12];
-    HICON hIcon;
-    HICON hIconSmall;
-    char *res_name, *res_class, *res_role;
-    static int s_iWindowID = 0;
-
-#if CYGMULTIWINDOW_DEBUG
-    winDebug("winMWExtWMCreateFrame %d %d - %d %d\n",
-             newX, newY, pFrame->width, pFrame->height);
-#endif
-
-    pRLWinPriv = malloc(sizeof(win32RootlessWindowRec));
-    pRLWinPriv->pFrame = pFrame;
-    pRLWinPriv->pfb = NULL;
-    pRLWinPriv->hbmpShadow = NULL;
-    pRLWinPriv->hdcShadow = NULL;
-    pRLWinPriv->hdcScreen = NULL;
-    pRLWinPriv->pbmihShadow = NULL;
-    pRLWinPriv->fResized = TRUE;
-    pRLWinPriv->fClose = FALSE;
-    pRLWinPriv->fRestackingNow = FALSE;
-    pRLWinPriv->fDestroyed = FALSE;
-    pRLWinPriv->fMovingOrSizing = FALSE;
-
-    // Store the implementation private frame ID
-    pFrame->wid = (RootlessFrameID) pRLWinPriv;
-
-    winSelectIcons(&hIcon, &hIconSmall);
-
-    /* Set standard class name prefix so we can identify window easily */
-    strncpy(pszClass, WINDOW_CLASS_X, sizeof(pszClass));
-
-    if (winMultiWindowGetClassHint(pFrame->win, &res_name, &res_class)) {
-        strncat(pszClass, "-", 1);
-        strncat(pszClass, res_name, CLASS_NAME_LENGTH - strlen(pszClass));
-        strncat(pszClass, "-", 1);
-        strncat(pszClass, res_class, CLASS_NAME_LENGTH - strlen(pszClass));
-
-        /* Check if a window class is provided by the WM_WINDOW_ROLE property,
-         * if not use the WM_CLASS information.
-         * For further information see:
-         * http://tronche.com/gui/x/icccm/sec-5.html
-         */
-        if (winMultiWindowGetWindowRole(pFrame->win, &res_role)) {
-            strcat(pszClass, "-");
-            strcat(pszClass, res_role);
-            free(res_role);
-        }
-
-        free(res_name);
-        free(res_class);
-    }
-
-    /* Add incrementing window ID to make unique class name */
-    snprintf(pszWindowID, sizeof(pszWindowID), "-%x", s_iWindowID++);
-    pszWindowID[sizeof(pszWindowID) - 1] = 0;
-    strcat(pszClass, pszWindowID);
-
-#if CYGMULTIWINDOW_DEBUG
-    winDebug("winMWExtWMCreateFrame - Creating class: %s\n", pszClass);
-#endif
-
-    /* Setup our window class */
-    wc.cbSize = sizeof(wc);
-    wc.style = CS_HREDRAW | CS_VREDRAW;
-    wc.lpfnWndProc = winMWExtWMWindowProc;
-    wc.cbClsExtra = 0;
-    wc.cbWndExtra = 0;
-    wc.hInstance = g_hInstance;
-    wc.hIcon = hIcon;
-    wc.hIconSm = hIconSmall;
-    wc.hCursor = 0;
-    wc.hbrBackground = (HBRUSH) GetStockObject(WHITE_BRUSH);
-    wc.lpszMenuName = NULL;
-    wc.lpszClassName = pszClass;
-    RegisterClassEx(&wc);
-
-    /* Create the window */
-    g_fNoConfigureWindow = TRUE;
-    pRLWinPriv->hWnd = CreateWindowExA(WS_EX_TOOLWINDOW,        /* Extended styles */
-                                       pszClass,        /* Class name */
-                                       WINDOW_TITLE_X,  /* Window name */
-                                       WS_POPUP | WS_CLIPCHILDREN, newX,        /* Horizontal position */
-                                       newY,    /* Vertical position */
-                                       pFrame->width,   /* Right edge */
-                                       pFrame->height,  /* Bottom edge */
-                                       (HWND) NULL,     /* No parent or owner window */
-                                       (HMENU) NULL,    /* No menu */
-                                       GetModuleHandle(NULL),   /* Instance handle */
-                                       pRLWinPriv);     /* ScreenPrivates */
-    if (pRLWinPriv->hWnd == NULL) {
-        ErrorF("winMWExtWMCreateFrame - CreateWindowExA () failed: %d\n",
-               (int) GetLastError());
-        fResult = FALSE;
-    }
-
-#if CYGMULTIWINDOW_DEBUG
-    winDebug("winMWExtWMCreateFrame - ShowWindow\n");
-#endif
-
-    //ShowWindow (pRLWinPriv->hWnd, SW_SHOWNOACTIVATE);
-    g_fNoConfigureWindow = FALSE;
-
-    if (pShape != NULL) {
-        winMWExtWMReshapeFrame(pFrame->wid, pShape);
-    }
-
-#if CYGMULTIWINDOW_DEBUG
-    winDebug("winMWExtWMCreateFrame - (%p) %p\n",
-             pFrame->wid, pRLWinPriv->hWnd);
-#if 0
-    {
-        WindowPtr pWin2 = NULL;
-        win32RootlessWindowPtr pRLWinPriv2 = NULL;
-
-        /* Check if the Windows window property for our X window pointer is valid */
-        if ((pWin2 =
-             (WindowPtr) GetProp(pRLWinPriv->hWnd, WIN_WINDOW_PROP)) != NULL) {
-            pRLWinPriv2 =
-                (win32RootlessWindowPtr) RootlessFrameForWindow(pWin2, FALSE);
-        }
-        winDebug("winMWExtWMCreateFrame2 (%08x) %08x\n",
-                 pRLWinPriv2, pRLWinPriv2->hWnd);
-        if (pRLWinPriv != pRLWinPriv2 || pRLWinPriv->hWnd != pRLWinPriv2->hWnd) {
-            winDebug("Error param missmatch\n");
-        }
-    }
-#endif
-#endif
-
-    winMWExtWMSetNativeProperty(pFrame);
-
-    return fResult;
-}
-
-void
-winMWExtWMDestroyFrame(RootlessFrameID wid)
-{
-    win32RootlessWindowPtr pRLWinPriv = (win32RootlessWindowPtr) wid;
-    HICON hIcon;
-    HICON hIconSm;
-    HMODULE hInstance;
-    int iReturn;
-    char pszClass[CLASS_NAME_LENGTH];
-
-#if CYGMULTIWINDOW_DEBUG
-    winDebug("winMWExtWMDestroyFrame (%p) %p\n",
-             pRLWinPriv, pRLWinPriv->hWnd);
-#if 0
-    {
-        WindowPtr pWin2 = NULL;
-        win32RootlessWindowPtr pRLWinPriv2 = NULL;
-
-        /* Check if the Windows window property for our X window pointer is valid */
-        if ((pWin2 =
-             (WindowPtr) GetProp(pRLWinPriv->hWnd, WIN_WINDOW_PROP)) != NULL) {
-            pRLWinPriv2 =
-                (win32RootlessWindowPtr) RootlessFrameForWindow(pWin2, FALSE);
-        }
-        winDebug("winMWExtWMDestroyFrame2 (%08x) %08x\n",
-                 pRLWinPriv2, pRLWinPriv2->hWnd);
-        if (pRLWinPriv != pRLWinPriv2 || pRLWinPriv->hWnd != pRLWinPriv2->hWnd) {
-            winDebug("Error param missmatch\n");
-            *(int *) 0 = 1;     //raise exseption
-        }
-    }
-#endif
-#endif
-
-    /* Store the info we need to destroy after this window is gone */
-    hInstance = (HINSTANCE) GetClassLongPtr(pRLWinPriv->hWnd, GCLP_HMODULE);
-    hIcon = (HICON) SendMessage(pRLWinPriv->hWnd, WM_GETICON, ICON_BIG, 0);
-    hIconSm = (HICON) SendMessage(pRLWinPriv->hWnd, WM_GETICON, ICON_SMALL, 0);
-    iReturn = GetClassName(pRLWinPriv->hWnd, pszClass, CLASS_NAME_LENGTH);
-
-    pRLWinPriv->fClose = TRUE;
-    pRLWinPriv->fDestroyed = TRUE;
-
-    /* Destroy the Windows window */
-    DestroyWindow(pRLWinPriv->hWnd);
-
-    /* Only if we were able to get the name */
-    if (iReturn) {
-#if CYGMULTIWINDOW_DEBUG
-        winDebug("winMWExtWMDestroyFrame - Unregistering %s: ", pszClass);
-#endif
-        iReturn = UnregisterClass(pszClass, hInstance);
-    }
-
-#if CYGMULTIWINDOW_DEBUG
-    winDebug("winMWExtWMDestroyFramew - Deleting Icon\n");
-#endif
-
-    winDestroyIcon(hIcon);
-    winDestroyIcon(hIconSm);
-
-#if CYGMULTIWINDOW_DEBUG
-    winDebug("winMWExtWMDestroyFrame - done\n");
-#endif
-}
-
-void
-winMWExtWMMoveFrame(RootlessFrameID wid, ScreenPtr pScreen, int iNewX,
-                    int iNewY)
-{
-    win32RootlessWindowPtr pRLWinPriv = (win32RootlessWindowPtr) wid;
-    RECT rcNew;
-    DWORD dwExStyle;
-    DWORD dwStyle;
-    int iX, iY, iWidth, iHeight;
-
-#if CYGMULTIWINDOW_DEBUG
-    winDebug("winMWExtWMMoveFrame (%p) (%d %d)\n", pRLWinPriv, iNewX,
-             iNewY);
-#endif
-
-    /* Get the Windows window style and extended style */
-    dwExStyle = GetWindowLongPtr(pRLWinPriv->hWnd, GWL_EXSTYLE);
-    dwStyle = GetWindowLongPtr(pRLWinPriv->hWnd, GWL_STYLE);
-
-    /* Get the X and Y location of the X window */
-    iX = iNewX + GetSystemMetrics(SM_XVIRTUALSCREEN);
-    iY = iNewY + GetSystemMetrics(SM_YVIRTUALSCREEN);
-
-    /* Get the height and width of the X window */
-    iWidth = pRLWinPriv->pFrame->width;
-    iHeight = pRLWinPriv->pFrame->height;
-
-    /* Store the origin, height, and width in a rectangle structure */
-    SetRect(&rcNew, iX, iY, iX + iWidth, iY + iHeight);
-
-#ifdef CYGMULTIWINDOW_DEBUG
-    winDebug("\tWindow {%d, %d, %d, %d}, {%d, %d}\n",
-             rcNew.left, rcNew.top, rcNew.right, rcNew.bottom,
-             rcNew.right - rcNew.left, rcNew.bottom - rcNew.top);
-#endif
-    /*
-     * Calculate the required size of the Windows window rectangle,
-     * given the size of the Windows window client area.
-     */
-    AdjustWindowRectEx(&rcNew, dwStyle, FALSE, dwExStyle);
-
-#ifdef CYGMULTIWINDOW_DEBUG
-    winDebug("\tAdjusted {%d, %d, %d, %d}, {%d, %d}\n",
-             rcNew.left, rcNew.top, rcNew.right, rcNew.bottom,
-             rcNew.right - rcNew.left, rcNew.bottom - rcNew.top);
-#endif
-    g_fNoConfigureWindow = TRUE;
-    SetWindowPos(pRLWinPriv->hWnd, NULL, rcNew.left, rcNew.top, 0, 0,
-                 SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOZORDER);
-    g_fNoConfigureWindow = FALSE;
-#if CYGMULTIWINDOW_DEBUG
-    winDebug("winMWExtWMMoveFrame (%p) done\n", pRLWinPriv);
-#endif
-}
-
-void
-winMWExtWMResizeFrame(RootlessFrameID wid, ScreenPtr pScreen,
-                      int iNewX, int iNewY,
-                      unsigned int uiNewWidth, unsigned int uiNewHeight,
-                      unsigned int uiGravity)
-{
-    win32RootlessWindowPtr pRLWinPriv = (win32RootlessWindowPtr) wid;
-    RECT rcNew;
-    RECT rcOld;
-    DWORD dwExStyle;
-    DWORD dwStyle;
-    int iX, iY;
-
-#if CYGMULTIWINDOW_DEBUG
-    winDebug("winMWExtWMResizeFrame (%p) (%d %d)-(%d %d)\n",
-             pRLWinPriv, iNewX, iNewY, uiNewWidth, uiNewHeight);
-#endif
-
-    pRLWinPriv->fResized = TRUE;
-
-    /* Get the Windows window style and extended style */
-    dwExStyle = GetWindowLongPtr(pRLWinPriv->hWnd, GWL_EXSTYLE);
-    dwStyle = GetWindowLongPtr(pRLWinPriv->hWnd, GWL_STYLE);
-
-    /* Get the X and Y location of the X window */
-    iX = iNewX + GetSystemMetrics(SM_XVIRTUALSCREEN);
-    iY = iNewY + GetSystemMetrics(SM_YVIRTUALSCREEN);
-
-    /* Store the origin, height, and width in a rectangle structure */
-    SetRect(&rcNew, iX, iY, iX + uiNewWidth, iY + uiNewHeight);
-
-    /*
-     * Calculate the required size of the Windows window rectangle,
-     * given the size of the Windows window client area.
-     */
-    AdjustWindowRectEx(&rcNew, dwStyle, FALSE, dwExStyle);
-
-    /* Get a rectangle describing the old Windows window */
-    GetWindowRect(pRLWinPriv->hWnd, &rcOld);
-
-    /* Check if the old rectangle and new rectangle are the same */
-    if (!EqualRect(&rcNew, &rcOld)) {
-
-        g_fNoConfigureWindow = TRUE;
-        MoveWindow(pRLWinPriv->hWnd,
-                   rcNew.left, rcNew.top,
-                   rcNew.right - rcNew.left, rcNew.bottom - rcNew.top, TRUE);
-        g_fNoConfigureWindow = FALSE;
-    }
-}
-
-void
-winMWExtWMRestackFrame(RootlessFrameID wid, RootlessFrameID nextWid)
-{
-    win32RootlessWindowPtr pRLWinPriv = (win32RootlessWindowPtr) wid;
-    win32RootlessWindowPtr pRLNextWinPriv = (win32RootlessWindowPtr) nextWid;
-
-    winScreenPriv(pRLWinPriv->pFrame->win->drawable.pScreen);
-
-#if CYGMULTIWINDOW_DEBUG
-    winDebug("winMWExtWMRestackFrame (%p)\n", pRLWinPriv);
-#endif
-
-    if (pScreenPriv && pScreenPriv->fRestacking)
-        return;
-
-    pRLWinPriv->fRestackingNow = TRUE;
-
-    /* Show window */
-    if (!IsWindowVisible(pRLWinPriv->hWnd))
-        ShowWindow(pRLWinPriv->hWnd, SW_SHOWNOACTIVATE);
-
-    if (pRLNextWinPriv == NULL) {
-#if CYGMULTIWINDOW_DEBUG
-        winDebug("Win %p is top\n", pRLWinPriv);
-#endif
-        pScreenPriv->widTop = wid;
-        SetWindowPos(pRLWinPriv->hWnd, HWND_TOP,
-                     0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
-    }
-    else {
-        /* using general wm like twm, wmaker etc.
-           Interleave X window and Windows window will cause problem. */
-        SetWindowPos(pRLWinPriv->hWnd, pRLNextWinPriv->hWnd,
-                     0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
-    }
-#if CYGMULTIWINDOW_DEBUG
-    winDebug("winMWExtWMRestackFrame - done (%p)\n", pRLWinPriv);
-#endif
-
-    pRLWinPriv->fRestackingNow = FALSE;
-}
-
-void
-winMWExtWMReshapeFrame(RootlessFrameID wid, RegionPtr pShape)
-{
-    win32RootlessWindowPtr pRLWinPriv = (win32RootlessWindowPtr) wid;
-    HRGN hRgn, hRgnWindow, hRgnClient;
-    RECT rcWindow, rcClient;
-
-#if CYGMULTIWINDOW_DEBUG
-    winDebug("winMWExtWMReshapeFrame (%p)\n", pRLWinPriv);
-#endif
-
-    hRgn = winMWExtWMCreateRgnFromRegion(pShape);
-
-    /* Create region for non-client area */
-    GetWindowRect(pRLWinPriv->hWnd, &rcWindow);
-    GetClientRect(pRLWinPriv->hWnd, &rcClient);
-    MapWindowPoints(pRLWinPriv->hWnd, HWND_DESKTOP, (LPPOINT) &rcClient, 2);
-    OffsetRgn(hRgn, rcClient.left - rcWindow.left, rcClient.top - rcWindow.top);
-    OffsetRect(&rcClient, -rcWindow.left, -rcWindow.top);
-    OffsetRect(&rcWindow, -rcWindow.left, -rcWindow.top);
-    hRgnWindow = CreateRectRgnIndirect(&rcWindow);
-    hRgnClient = CreateRectRgnIndirect(&rcClient);
-    CombineRgn(hRgnWindow, hRgnWindow, hRgnClient, RGN_DIFF);
-    CombineRgn(hRgn, hRgnWindow, hRgn, RGN_OR);
-
-    SetWindowRgn(pRLWinPriv->hWnd, hRgn, TRUE);
-
-    DeleteObject(hRgnWindow);
-    DeleteObject(hRgnClient);
-}
-
-void
-winMWExtWMUnmapFrame(RootlessFrameID wid)
-{
-    win32RootlessWindowPtr pRLWinPriv = (win32RootlessWindowPtr) wid;
-
-#if CYGMULTIWINDOW_DEBUG
-    winDebug("winMWExtWMUnmapFrame (%p)\n", pRLWinPriv);
-#endif
-
-    g_fNoConfigureWindow = TRUE;
-    //ShowWindow (pRLWinPriv->hWnd, SW_MINIMIZE);
-    ShowWindow(pRLWinPriv->hWnd, SW_HIDE);
-    g_fNoConfigureWindow = FALSE;
-}
-
-/*
- * Fixme: Code sharing with winshadgdi.c and other engine support
- */
-void
-winMWExtWMStartDrawing(RootlessFrameID wid, char **pixelData, int *bytesPerRow)
-{
-    win32RootlessWindowPtr pRLWinPriv = (win32RootlessWindowPtr) wid;
-    winPrivScreenPtr pScreenPriv = NULL;
-    winScreenInfo *pScreenInfo = NULL;
-    ScreenPtr pScreen = NULL;
-    DIBSECTION dibsection;
-    Bool fReturn = TRUE;
-    HDC hdcNew;
-    HBITMAP hbmpNew;
-
-#if CYGMULTIWINDOW_DEBUG
-    winDebug("winMWExtWMStartDrawing (%p) %08x\n", pRLWinPriv,
-             pRLWinPriv->fDestroyed);
-#endif
-
-    if (!pRLWinPriv->fDestroyed) {
-        pScreen = pRLWinPriv->pFrame->win->drawable.pScreen;
-        if (pScreen)
-            pScreenPriv = winGetScreenPriv(pScreen);
-        if (pScreenPriv)
-            pScreenInfo = pScreenPriv->pScreenInfo;
-
-#if CYGMULTIWINDOW_DEBUG
-        winDebug("\tpScreenPriv %p\n", pScreenPriv);
-        winDebug("\tpScreenInfo %p\n", pScreenInfo);
-        winDebug("\t(%d, %d)\n", (int) pRLWinPriv->pFrame->width,
-                 (int) pRLWinPriv->pFrame->height);
-#endif
-        if (pRLWinPriv->hdcScreen == NULL) {
-            InitWin32RootlessEngine(pRLWinPriv);
-        }
-
-        if (pRLWinPriv->fResized) {
-            /* width * bpp must be multiple of 4 to match 32bit alignment */
-            int stridesize;
-            int misalignment;
-
-            pRLWinPriv->pbmihShadow->biWidth = pRLWinPriv->pFrame->width;
-            pRLWinPriv->pbmihShadow->biHeight = -pRLWinPriv->pFrame->height;
-
-            stridesize = pRLWinPriv->pFrame->width * (pScreenInfo->dwBPP >> 3);
-            misalignment = stridesize & 3;
-            if (misalignment != 0) {
-                stridesize += 4 - misalignment;
-                pRLWinPriv->pbmihShadow->biWidth =
-                    stridesize / (pScreenInfo->dwBPP >> 3);
-                winDebug("\tresizing to %d (was %d)\n",
-                         pRLWinPriv->pbmihShadow->biWidth,
-                         pRLWinPriv->pFrame->width);
-            }
-
-            hdcNew = CreateCompatibleDC(pRLWinPriv->hdcScreen);
-            /* Create a DI shadow bitmap with a bit pointer */
-            hbmpNew = CreateDIBSection(pRLWinPriv->hdcScreen,
-                                       (BITMAPINFO *) pRLWinPriv->pbmihShadow,
-                                       DIB_RGB_COLORS,
-                                       (VOID **) &pRLWinPriv->pfb, NULL, 0);
-            if (hbmpNew == NULL || pRLWinPriv->pfb == NULL) {
-                ErrorF("winMWExtWMStartDrawing - CreateDIBSection failed\n");
-                //return FALSE;
-            }
-            else {
-#if CYGMULTIWINDOW_DEBUG
-                winDebug("winMWExtWMStartDrawing - Shadow buffer allocated\n");
-#endif
-            }
-
-            /* Get information about the bitmap that was allocated */
-            GetObject(hbmpNew, sizeof(dibsection), &dibsection);
-
-#if CYGMULTIWINDOW_DEBUG
-            /* Print information about bitmap allocated */
-            winDebug("winMWExtWMStartDrawing - Dibsection width: %d height: %d "
-                     "depth: %d size image: %d\n",
-                     (unsigned int) dibsection.dsBmih.biWidth,
-                     (unsigned int) dibsection.dsBmih.biHeight,
-                     (unsigned int) dibsection.dsBmih.biBitCount,
-                     (unsigned int) dibsection.dsBmih.biSizeImage);
-#endif
-
-            /* Select the shadow bitmap into the shadow DC */
-            SelectObject(hdcNew, hbmpNew);
-
-#if CYGMULTIWINDOW_DEBUG
-            winDebug("winMWExtWMStartDrawing - Attempting a shadow blit\n");
-#endif
-
-            /* Blit from the old shadow to the new shadow */
-            fReturn = BitBlt(hdcNew,
-                             0, 0,
-                             pRLWinPriv->pFrame->width,
-                             pRLWinPriv->pFrame->height, pRLWinPriv->hdcShadow,
-                             0, 0, SRCCOPY);
-            if (fReturn) {
-#if CYGMULTIWINDOW_DEBUG
-                winDebug("winMWExtWMStartDrawing - Shadow blit success\n");
-#endif
-            }
-            else {
-                ErrorF("winMWExtWMStartDrawing - Shadow blit failure\n");
-            }
-
-            /* Look for height weirdness */
-            if (dibsection.dsBmih.biHeight < 0) {
-                /* FIXME: Figure out why biHeight is sometimes negative */
-                ErrorF("winMWExtWMStartDrawing - WEIRDNESS - "
-                       "biHeight still negative: %d\n",
-                       (int) dibsection.dsBmih.biHeight);
-                ErrorF("winMWExtWMStartDrawing - WEIRDNESS - "
-                       "Flipping biHeight sign\n");
-                dibsection.dsBmih.biHeight = -dibsection.dsBmih.biHeight;
-            }
-
-            pRLWinPriv->dwWidthBytes = dibsection.dsBm.bmWidthBytes;
-
-#if CYGMULTIWINDOW_DEBUG
-            winDebug("winMWExtWMStartDrawing - bytesPerRow: %d\n",
-                     (unsigned int) dibsection.dsBm.bmWidthBytes);
-#endif
-
-            /* Free the old shadow bitmap */
-            DeleteObject(pRLWinPriv->hdcShadow);
-            DeleteObject(pRLWinPriv->hbmpShadow);
-
-            pRLWinPriv->hdcShadow = hdcNew;
-            pRLWinPriv->hbmpShadow = hbmpNew;
-
-            pRLWinPriv->fResized = FALSE;
-#if CYGMULTIWINDOW_DEBUG && FALSE
-            winDebug("winMWExtWMStartDrawing - 0x%08x %d\n",
-                     (unsigned int) pRLWinPriv->pfb,
-                     (unsigned int) dibsection.dsBm.bmWidthBytes);
-#endif
-        }
-    }
-    else {
-        ErrorF("winMWExtWMStartDrawing - Already window was destroyed \n");
-    }
-#if CYGMULTIWINDOW_DEBUG
-    winDebug("winMWExtWMStartDrawing - done (%p) %p %d\n",
-             pRLWinPriv,
-             pRLWinPriv->pfb,
-             (unsigned int) pRLWinPriv->dwWidthBytes);
-#endif
-    *pixelData = pRLWinPriv->pfb;
-    *bytesPerRow = pRLWinPriv->dwWidthBytes;
-}
-
-void
-winMWExtWMStopDrawing(RootlessFrameID wid, Bool fFlush)
-{
-#if 0
-    win32RootlessWindowPtr pRLWinPriv = (win32RootlessWindowPtr) wid;
-    BLENDFUNCTION bfBlend;
-    SIZE szWin;
-    POINT ptSrc;
-
-#if CYGMULTIWINDOW_DEBUG || TRUE
-    winDebug("winMWExtWMStopDrawing (%08x)\n", pRLWinPriv);
-#endif
-    szWin.cx = pRLWinPriv->dwWidth;
-    szWin.cy = pRLWinPriv->dwHeight;
-    ptSrc.x = 0;
-    ptSrc.y = 0;
-    bfBlend.BlendOp = AC_SRC_OVER;
-    bfBlend.BlendFlags = 0;
-    bfBlend.SourceConstantAlpha = 255;
-    bfBlend.AlphaFormat = AC_SRC_ALPHA;
-
-    if (!UpdateLayeredWindow(pRLWinPriv->hWnd,
-                             NULL, NULL, &szWin,
-                             pRLWinPriv->hdcShadow, &ptSrc,
-                             0, &bfBlend, ULW_ALPHA)) {
-        ErrorF("winMWExtWMStopDrawing - UpdateLayeredWindow failed\n");
-    }
-#endif
-}
-
-void
-winMWExtWMUpdateRegion(RootlessFrameID wid, RegionPtr pDamage)
-{
-    win32RootlessWindowPtr pRLWinPriv = (win32RootlessWindowPtr) wid;
-
-#if 0
-    BLENDFUNCTION bfBlend;
-    SIZE szWin;
-    POINT ptSrc;
-#endif
-#if CYGMULTIWINDOW_DEBUG && 0
-    winDebug("winMWExtWMUpdateRegion (%08x)\n", pRLWinPriv);
-#endif
-#if 0
-    szWin.cx = pRLWinPriv->dwWidth;
-    szWin.cy = pRLWinPriv->dwHeight;
-    ptSrc.x = 0;
-    ptSrc.y = 0;
-    bfBlend.BlendOp = AC_SRC_OVER;
-    bfBlend.BlendFlags = 0;
-    bfBlend.SourceConstantAlpha = 255;
-    bfBlend.AlphaFormat = AC_SRC_ALPHA;
-
-    if (!UpdateLayeredWindow(pRLWinPriv->hWnd,
-                             NULL, NULL, &szWin,
-                             pRLWinPriv->hdcShadow, &ptSrc,
-                             0, &bfBlend, ULW_ALPHA)) {
-        LPVOID lpMsgBuf;
-
-        /* Display a fancy error message */
-        FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
-                      FORMAT_MESSAGE_FROM_SYSTEM |
-                      FORMAT_MESSAGE_IGNORE_INSERTS,
-                      NULL,
-                      GetLastError(),
-                      MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
-                      (LPTSTR) &lpMsgBuf, 0, NULL);
-
-        ErrorF("winMWExtWMUpdateRegion - UpdateLayeredWindow failed: %s\n",
-               (LPSTR) lpMsgBuf);
-        LocalFree(lpMsgBuf);
-    }
-#endif
-    if (!g_fNoConfigureWindow)
-        UpdateWindow(pRLWinPriv->hWnd);
-}
-
-void
-winMWExtWMDamageRects(RootlessFrameID wid, int nCount, const BoxRec * pRects,
-                      int shift_x, int shift_y)
-{
-    win32RootlessWindowPtr pRLWinPriv = (win32RootlessWindowPtr) wid;
-    const BoxRec *pEnd;
-
-#if CYGMULTIWINDOW_DEBUG && 0
-    winDebug("winMWExtWMDamageRects (%08x, %d, %08x, %d, %d)\n",
-             pRLWinPriv, nCount, pRects, shift_x, shift_y);
-#endif
-
-    for (pEnd = pRects + nCount; pRects < pEnd; pRects++) {
-        RECT rcDmg;
-
-        rcDmg.left = pRects->x1 + shift_x;
-        rcDmg.top = pRects->y1 + shift_y;
-        rcDmg.right = pRects->x2 + shift_x;
-        rcDmg.bottom = pRects->y2 + shift_y;
-
-        InvalidateRect(pRLWinPriv->hWnd, &rcDmg, FALSE);
-    }
-}
-
-void
-winMWExtWMRootlessSwitchWindow(RootlessWindowPtr pFrame, WindowPtr oldWin)
-{
-    win32RootlessWindowPtr pRLWinPriv = (win32RootlessWindowPtr) pFrame->wid;
-
-#if CYGMULTIWINDOW_DEBUG
-    winDebug("winMWExtWMRootlessSwitchWindow (%p) %p\n",
-             pRLWinPriv, pRLWinPriv->hWnd);
-#endif
-    pRLWinPriv->pFrame = pFrame;
-    pRLWinPriv->fResized = TRUE;
-
-    /* Set the window extended style flags */
-    SetWindowLongPtr(pRLWinPriv->hWnd, GWL_EXSTYLE, WS_EX_TOOLWINDOW);
-
-    /* Set the window standard style flags */
-    SetWindowLongPtr(pRLWinPriv->hWnd, GWL_STYLE, WS_POPUP | WS_CLIPCHILDREN);
-
-    DeleteProperty(serverClient, oldWin, AtmWindowsWmNativeHwnd());
-    winMWExtWMSetNativeProperty(pFrame);
-#if CYGMULTIWINDOW_DEBUG
-#if 0
-    {
-        WindowPtr pWin2 = NULL;
-        win32RootlessWindowPtr pRLWinPriv2 = NULL;
-
-        /* Check if the Windows window property for our X window pointer is valid */
-        if ((pWin2 =
-             (WindowPtr) GetProp(pRLWinPriv->hWnd, WIN_WINDOW_PROP)) != NULL) {
-            pRLWinPriv2 =
-                (win32RootlessWindowPtr) RootlessFrameForWindow(pWin2, FALSE);
-        }
-        winDebug("winMWExtWMSwitchFrame2 (%08x) %08x\n",
-                 pRLWinPriv2, pRLWinPriv2->hWnd);
-        if (pRLWinPriv != pRLWinPriv2 || pRLWinPriv->hWnd != pRLWinPriv2->hWnd) {
-            winDebug("Error param missmatch\n");
-        }
-    }
-#endif
-#endif
-}
-
-void
-winMWExtWMCopyBytes(unsigned int width, unsigned int height,
-                    const void *src, unsigned int srcRowBytes,
-                    void *dst, unsigned int dstRowBytes)
-{
-#if CYGMULTIWINDOW_DEBUG
-    winDebug("winMWExtWMCopyBytes - Not implemented\n");
-#endif
-}
-
-void
-winMWExtWMCopyWindow(RootlessFrameID wid, int nDstRects,
-                     const BoxRec * pDstRects, int nDx, int nDy)
-{
-    win32RootlessWindowPtr pRLWinPriv = (win32RootlessWindowPtr) wid;
-    const BoxRec *pEnd;
-    RECT rcDmg;
-
-#if CYGMULTIWINDOW_DEBUG
-    winDebug("winMWExtWMCopyWindow (%p, %d, %p, %d, %d)\n",
-             pRLWinPriv, nDstRects, pDstRects, nDx, nDy);
-#endif
-
-    for (pEnd = pDstRects + nDstRects; pDstRects < pEnd; pDstRects++) {
-#if CYGMULTIWINDOW_DEBUG
-        winDebug("BitBlt (%d, %d, %d, %d) (%d, %d)\n",
-                 pDstRects->x1, pDstRects->y1,
-                 pDstRects->x2 - pDstRects->x1,
-                 pDstRects->y2 - pDstRects->y1,
-                 pDstRects->x1 + nDx, pDstRects->y1 + nDy);
-#endif
-
-        if (!BitBlt(pRLWinPriv->hdcShadow,
-                    pDstRects->x1, pDstRects->y1,
-                    pDstRects->x2 - pDstRects->x1,
-                    pDstRects->y2 - pDstRects->y1,
-                    pRLWinPriv->hdcShadow,
-                    pDstRects->x1 + nDx, pDstRects->y1 + nDy, SRCCOPY)) {
-            ErrorF("winMWExtWMCopyWindow - BitBlt failed.\n");
-        }
-
-        rcDmg.left = pDstRects->x1;
-        rcDmg.top = pDstRects->y1;
-        rcDmg.right = pDstRects->x2;
-        rcDmg.bottom = pDstRects->y2;
-
-        InvalidateRect(pRLWinPriv->hWnd, &rcDmg, FALSE);
-    }
-#if CYGMULTIWINDOW_DEBUG
-    winDebug("winMWExtWMCopyWindow - done\n");
-#endif
-}
-
-/*
- * winMWExtWMSetNativeProperty
- */
-
-static void
-winMWExtWMSetNativeProperty(RootlessWindowPtr pFrame)
-{
-    win32RootlessWindowPtr pRLWinPriv = (win32RootlessWindowPtr) pFrame->wid;
-    long lData;
-
-    /* FIXME: move this to WindowsWM extension */
-
-    lData = (long) pRLWinPriv->hWnd;
-    dixChangeWindowProperty(serverClient, pFrame->win, AtmWindowsWmNativeHwnd(),
-                            XA_INTEGER, 32, PropModeReplace, 1, &lData, TRUE);
-}
diff --git a/hw/xwin/winwin32rootlesswindow.c b/hw/xwin/winwin32rootlesswindow.c
deleted file mode 100644
index 817cd09..0000000
--- a/hw/xwin/winwin32rootlesswindow.c
+++ /dev/null
@@ -1,420 +0,0 @@
-/*
- *Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved.
- *
- *Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- *"Software"), to deal in the Software without restriction, including
- *without limitation the rights to use, copy, modify, merge, publish,
- *distribute, sublicense, and/or sell copies of the Software, and to
- *permit persons to whom the Software is furnished to do so, subject to
- *the following conditions:
- *
- *The above copyright notice and this permission notice shall be
- *included in all copies or substantial portions of the Software.
- *
- *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *NONINFRINGEMENT. IN NO EVENT SHALL THE XFREE86 PROJECT BE LIABLE FOR
- *ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- *CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- *Except as contained in this notice, the name of the XFree86 Project
- *shall not be used in advertising or otherwise to promote the sale, use
- *or other dealings in this Software without prior written authorization
- *from the XFree86 Project.
- *
- * Authors:	Kensuke Matsuzaki
- *		Earle F. Philhower, III
- *		Harold L Hunt II
- */
-
-#ifdef HAVE_XWIN_CONFIG_H
-#include <xwin-config.h>
-#endif
-#include "win.h"
-#include "winprefs.h"
-
-#if 0
-/*
- * winMWExtWMReorderWindows
- */
-
-void
-winMWExtWMReorderWindows(ScreenPtr pScreen)
-{
-    winScreenPriv(pScreen);
-    HWND hwnd = NULL;
-    win32RootlessWindowPtr pRLWin = NULL;
-    win32RootlessWindowPtr pRLWinSib = NULL;
-    DWORD dwCurrentProcessID = GetCurrentProcessId();
-    DWORD dwWindowProcessID = 0;
-    XID vlist[2];
-
-#if CYGMULTIWINDOW_DEBUG && FALSE
-    winDebug("winMWExtWMReorderWindows\n");
-#endif
-
-    pScreenPriv->fRestacking = TRUE;
-
-    if (pScreenPriv->fWindowOrderChanged) {
-#if CYGMULTIWINDOW_DEBUG
-        winDebug("winMWExtWMReorderWindows - Need to restack\n");
-#endif
-        hwnd = GetTopWindow(NULL);
-
-        while (hwnd) {
-            GetWindowThreadProcessId(hwnd, &dwWindowProcessID);
-
-            if ((dwWindowProcessID == dwCurrentProcessID)
-                && GetProp(hwnd, WIN_WINDOW_PROP)) {
-                pRLWinSib = pRLWin;
-                pRLWin =
-                    (win32RootlessWindowPtr) GetProp(hwnd, WIN_WINDOW_PROP);
-
-                if (pRLWinSib) {
-                    vlist[0] = pRLWinSib->pFrame->win->drawable.id;
-                    vlist[1] = Below;
-
-                    ConfigureWindow(pRLWin->pFrame->win,
-                                    CWSibling | CWStackMode, vlist,
-                                    wClient(pRLWin->pFrame->win));
-                }
-                else {
-                    /* 1st window - raise to the top */
-                    vlist[0] = Above;
-
-                    ConfigureWindow(pRLWin->pFrame->win, CWStackMode,
-                                    vlist, wClient(pRLWin->pFrame->win));
-                }
-            }
-            hwnd = GetNextWindow(hwnd, GW_HWNDNEXT);
-        }
-    }
-
-    pScreenPriv->fRestacking = FALSE;
-    pScreenPriv->fWindowOrderChanged = FALSE;
-}
-#endif
-
-/*
- * winMWExtWMMoveXWindow
- */
-
-void
-winMWExtWMMoveXWindow(WindowPtr pWin, int x, int y)
-{
-    CARD32 *vlist = malloc(sizeof(CARD32) * 2);
-
-    vlist[0] = x;
-    vlist[1] = y;
-    ConfigureWindow(pWin, CWX | CWY, vlist, wClient(pWin));
-    free(vlist);
-}
-
-/*
- * winMWExtWMResizeXWindow
- */
-
-void
-winMWExtWMResizeXWindow(WindowPtr pWin, int w, int h)
-{
-    CARD32 *vlist = malloc(sizeof(CARD32) * 2);
-
-    vlist[0] = w;
-    vlist[1] = h;
-    ConfigureWindow(pWin, CWWidth | CWHeight, vlist, wClient(pWin));
-    free(vlist);
-}
-
-/*
- * winMWExtWMMoveResizeXWindow
- */
-
-void
-winMWExtWMMoveResizeXWindow(WindowPtr pWin, int x, int y, int w, int h)
-{
-    CARD32 *vlist = malloc(sizeof(long) * 4);
-
-    vlist[0] = x;
-    vlist[1] = y;
-    vlist[2] = w;
-    vlist[3] = h;
-
-    ConfigureWindow(pWin, CWX | CWY | CWWidth | CWHeight, vlist, wClient(pWin));
-    free(vlist);
-}
-
-/*
-
-
- * winMWExtWMDecorateWindow - Update window style. Called by EnumWindows.
- */
-
-wBOOL CALLBACK
-winMWExtWMDecorateWindow(HWND hwnd, LPARAM lParam)
-{
-    win32RootlessWindowPtr pRLWinPriv = NULL;
-    ScreenPtr pScreen = NULL;
-    winPrivScreenPtr pScreenPriv = NULL;
-    winScreenInfo *pScreenInfo = NULL;
-
-    /* Check if the Windows window property for our X window pointer is valid */
-    if ((pRLWinPriv =
-         (win32RootlessWindowPtr) GetProp(hwnd, WIN_WINDOW_PROP)) != NULL) {
-        if (pRLWinPriv != NULL && pRLWinPriv->pFrame != NULL &&
-            pRLWinPriv->pFrame->win != NULL)
-            pScreen = pRLWinPriv->pFrame->win->drawable.pScreen;
-        if (pScreen)
-            pScreenPriv = winGetScreenPriv(pScreen);
-        if (pScreenPriv)
-            pScreenInfo = pScreenPriv->pScreenInfo;
-        if (pRLWinPriv && pScreenInfo)
-            winMWExtWMUpdateWindowDecoration(pRLWinPriv, pScreenInfo);
-    }
-    return TRUE;
-}
-
-/*
- * winMWExtWMUpdateWindowDecoration - Update window style.
- */
-
-void
-winMWExtWMUpdateWindowDecoration(win32RootlessWindowPtr pRLWinPriv,
-                                 winScreenInfoPtr pScreenInfo)
-{
-    Bool fDecorate = FALSE;
-    DWORD dwExStyle = 0;
-    WINDOWPLACEMENT wndPlace;
-    UINT showCmd = 0;
-
-    wndPlace.length = sizeof(WINDOWPLACEMENT);
-
-    /* Get current window placement */
-    GetWindowPlacement(pRLWinPriv->hWnd, &wndPlace);
-
-#if 0
-    if (wndPlace.showCmd == SW_HIDE)
-        return;                 //showCmd = SWP_HIDEWINDOW;
-    else
-        showCmd = SWP_SHOWWINDOW;
-#else
-    if (wndPlace.showCmd == SW_HIDE)
-        return;
-
-    if (IsWindowVisible(pRLWinPriv->hWnd))
-        showCmd = SWP_SHOWWINDOW;
-#endif
-
-    showCmd |= SWP_NOMOVE | SWP_FRAMECHANGED | SWP_NOACTIVATE | SWP_NOZORDER;
-
-    winDebug("winMWExtWMUpdateWindowDecoration %p %s\n",
-             pRLWinPriv, fDecorate ? "Decorate" : "Bare");
-
-    /* Get the extended window style information */
-    dwExStyle = GetWindowLongPtr(pRLWinPriv->hWnd, GWL_EXSTYLE);
-
-    if (fDecorate) {
-        RECT rcNew;
-        int iDx, iDy;
-        winWMMessageRec wmMsg;
-
-        winScreenPriv(pScreenInfo->pScreen);
-
-        /* */
-        if (!(dwExStyle & WS_EX_APPWINDOW)) {
-            winDebug("\tBare=>Decorate\n");
-            /* Setup a rectangle with the X window position and size */
-            SetRect(&rcNew,
-                    pRLWinPriv->pFrame->x,
-                    pRLWinPriv->pFrame->y,
-                    pRLWinPriv->pFrame->x + pRLWinPriv->pFrame->width,
-                    pRLWinPriv->pFrame->y + pRLWinPriv->pFrame->height);
-
-#ifdef CYGMULTIWINDOW_DEBUG
-            winDebug("\tWindow extend {%d, %d, %d, %d}, {%d, %d}\n",
-                     rcNew.left, rcNew.top, rcNew.right, rcNew.bottom,
-                     rcNew.right - rcNew.left, rcNew.bottom - rcNew.top);
-#endif
-            /* */
-            AdjustWindowRectEx(&rcNew,
-                               WS_POPUP | WS_SIZEBOX | WS_OVERLAPPEDWINDOW,
-                               FALSE, WS_EX_APPWINDOW);
-
-#ifdef CYGMULTIWINDOW_DEBUG
-            winDebug("\tAdjusted {%d, %d, %d, %d}, {%d, %d}\n",
-                     rcNew.left, rcNew.top, rcNew.right, rcNew.bottom,
-                     rcNew.right - rcNew.left, rcNew.bottom - rcNew.top);
-#endif
-            /* Calculate position deltas */
-            iDx = pRLWinPriv->pFrame->x - rcNew.left;
-            iDy = pRLWinPriv->pFrame->y - rcNew.top;
-
-            /* Calculate new rectangle */
-            rcNew.left += iDx;
-            rcNew.right += iDx;
-            rcNew.top += iDy;
-            rcNew.bottom += iDy;
-
-            /* Set the window extended style flags */
-            SetWindowLongPtr(pRLWinPriv->hWnd, GWL_EXSTYLE, WS_EX_APPWINDOW);
-
-            /* Set the window standard style flags */
-            SetWindowLongPtr(pRLWinPriv->hWnd, GWL_STYLE,
-                             WS_POPUP | WS_SIZEBOX | WS_OVERLAPPEDWINDOW);
-
-#ifdef CYGMULTIWINDOW_DEBUG
-            winDebug("\tWindowStyle: %08x %08x\n",
-                     WS_POPUP | WS_SIZEBOX | WS_OVERLAPPEDWINDOW,
-                     WS_EX_APPWINDOW);
-#endif
-            /* Position the Windows window */
-#ifdef CYGMULTIWINDOW_DEBUG
-            winDebug("\tMoved {%d, %d, %d, %d}, {%d, %d}\n",
-                     rcNew.left, rcNew.top, rcNew.right, rcNew.bottom,
-                     rcNew.right - rcNew.left, rcNew.bottom - rcNew.top);
-#endif
-            SetWindowPos(pRLWinPriv->hWnd, NULL,
-                         rcNew.left, rcNew.top,
-                         rcNew.right - rcNew.left, rcNew.bottom - rcNew.top,
-                         showCmd);
-
-            wmMsg.hwndWindow = pRLWinPriv->hWnd;
-            wmMsg.iWindow = (Window) pRLWinPriv->pFrame->win->drawable.id;
-            wmMsg.msg = WM_WM_NAME_EVENT;
-            winSendMessageToWM(pScreenPriv->pWMInfo, &wmMsg);
-
-            winMWExtWMReshapeFrame((RootlessFrameID) pRLWinPriv,
-                                   wBoundingShape(pRLWinPriv->pFrame->win));
-        }
-    }
-    else {
-        RECT rcNew;
-
-        /* */
-        if (dwExStyle & WS_EX_APPWINDOW) {
-            winDebug("\tDecorate=>Bare\n");
-            /* Setup a rectangle with the X window position and size */
-            SetRect(&rcNew,
-                    pRLWinPriv->pFrame->x,
-                    pRLWinPriv->pFrame->y,
-                    pRLWinPriv->pFrame->x + pRLWinPriv->pFrame->width,
-                    pRLWinPriv->pFrame->y + pRLWinPriv->pFrame->height);
-#if 0
-            /* */
-            AdjustWindowRectEx(&rcNew,
-                               WS_POPUP | WS_CLIPCHILDREN,
-                               FALSE, WS_EX_TOOLWINDOW);
-
-            /* Calculate position deltas */
-            iDx = pRLWinPriv->pFrame->x - rcNew.left;
-            iDy = pRLWinPriv->pFrame->y - rcNew.top;
-
-            /* Calculate new rectangle */
-            rcNew.left += iDx;
-            rcNew.right += iDx;
-            rcNew.top += iDy;
-            rcNew.bottom += iDy;
-#endif
-
-            /* Hide window temporary to remove from taskbar. */
-            ShowWindow(pRLWinPriv->hWnd, SW_HIDE);
-
-            /* Set the window extended style flags */
-            SetWindowLongPtr(pRLWinPriv->hWnd, GWL_EXSTYLE, WS_EX_TOOLWINDOW);
-
-            /* Set the window standard style flags */
-            SetWindowLongPtr(pRLWinPriv->hWnd, GWL_STYLE,
-                             WS_POPUP | WS_CLIPCHILDREN);
-
-            /* Position the Windows window */
-            SetWindowPos(pRLWinPriv->hWnd, NULL,
-                         rcNew.left, rcNew.top,
-                         rcNew.right - rcNew.left, rcNew.bottom - rcNew.top,
-                         showCmd);
-
-            winMWExtWMReshapeFrame((RootlessFrameID) pRLWinPriv,
-                                   wBoundingShape(pRLWinPriv->pFrame->win));
-        }
-    }
-}
-
-/*
- * winMWExtWMRestackWindows
- */
-
-void
-winMWExtWMRestackWindows(ScreenPtr pScreen)
-{
-    winScreenPriv(pScreen);
-    WindowPtr pRoot = pScreen->root;
-    WindowPtr pWin = NULL;
-    WindowPtr pWinPrev = NULL;
-    win32RootlessWindowPtr pRLWin = NULL;
-    win32RootlessWindowPtr pRLWinPrev = NULL;
-    int nWindow = 0;
-    HDWP hWinPosInfo = NULL;
-
-#if CYGMULTIWINDOW_DEBUG
-    winDebug("winMWExtWMRestackWindows\n");
-#endif
-
-    pScreenPriv->fRestacking = TRUE;
-
-    if (pRoot != NULL) {
-        for (pWin = pRoot->firstChild; pWin; pWin = pWin->nextSib)
-            nWindow++;
-
-        hWinPosInfo = BeginDeferWindowPos(nWindow);
-
-        for (pWin = pRoot->firstChild; pWin; pWin = pWin->nextSib) {
-            if (pWin->realized) {
-                UINT uFlags;
-
-                pRLWin =
-                    (win32RootlessWindowPtr) RootlessFrameForWindow(pWin,
-                                                                    FALSE);
-                if (pRLWin == NULL)
-                    continue;
-
-                if (pWinPrev)
-                    pRLWinPrev =
-                        (win32RootlessWindowPtr)
-                        RootlessFrameForWindow(pWinPrev, FALSE);
-
-                uFlags = SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW;
-                if (pRLWinPrev != NULL)
-                    uFlags |= SWP_NOACTIVATE;
-
-#if CYGMULTIWINDOW_DEBUG
-                winDebug
-                    ("winMWExtWMRestackWindows - DeferWindowPos (%p, %p)\n",
-                     pRLWin->hWnd, pRLWinPrev ? pRLWinPrev->hWnd : HWND_TOP);
-#endif
-                hWinPosInfo = DeferWindowPos(hWinPosInfo, pRLWin->hWnd,
-                                             pRLWinPrev ? pRLWinPrev->
-                                             hWnd : HWND_TOP, 0, 0, 0, 0,
-                                             uFlags);
-                if (hWinPosInfo == NULL) {
-                    ErrorF
-                        ("winMWExtWMRestackWindows - DeferWindowPos () failed: %d\n",
-                         (int) GetLastError());
-                    return;
-                }
-                pWinPrev = pWin;
-            }
-        }
-        if (!EndDeferWindowPos(hWinPosInfo)) {
-            ErrorF
-                ("winMWExtWMRestackWindows - EndDeferWindowPos () failed: %d\n",
-                 (int) GetLastError());
-            return;
-        }
-    }
-
-#if CYGMULTIWINDOW_DEBUG
-    winDebug("winMWExtWMRestackWindows - done\n");
-#endif
-    pScreenPriv->fRestacking = FALSE;
-}
diff --git a/hw/xwin/winwin32rootlesswndproc.c b/hw/xwin/winwin32rootlesswndproc.c
deleted file mode 100644
index 5575f4b..0000000
--- a/hw/xwin/winwin32rootlesswndproc.c
+++ /dev/null
@@ -1,1080 +0,0 @@
-/*
- *Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved.
- *
- *Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- *"Software"), to deal in the Software without restriction, including
- *without limitation the rights to use, copy, modify, merge, publish,
- *distribute, sublicense, and/or sell copies of the Software, and to
- *permit persons to whom the Software is furnished to do so, subject to
- *the following conditions:
- *
- *The above copyright notice and this permission notice shall be
- *included in all copies or substantial portions of the Software.
- *
- *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- *MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *NONINFRINGEMENT. IN NO EVENT SHALL THE XFREE86 PROJECT BE LIABLE FOR
- *ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- *CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- *WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- *Except as contained in this notice, the name of the XFree86 Project
- *shall not be used in advertising or otherwise to promote the sale, use
- *or other dealings in this Software without prior written authorization
- *from the XFree86 Project.
- *
- * Authors:	Kensuke Matsuzaki
- *		Earle F. Philhower, III
- *		Harold L Hunt II
- */
-#ifdef HAVE_XWIN_CONFIG_H
-#include <xwin-config.h>
-#endif
-#include "win.h"
-#include <winuser.h>
-#define _WINDOWSWM_SERVER_
-#include <X11/extensions/windowswmstr.h>
-#include "dixevents.h"
-#include "propertyst.h"
-#include <X11/Xatom.h>
-#include "winmultiwindowclass.h"
-#include "winmsg.h"
-#include "inputstr.h"
-
-/*
- * Constant defines
- */
-
-#define MOUSE_ACTIVATE_DEFAULT		TRUE
-#define RAISE_ON_CLICK_DEFAULT		FALSE
-
-/*
- * Local globals
- */
-
-static UINT_PTR g_uipMousePollingTimerID = 0;
-
-/*
- * Local function
- */
-
-DEFINE_ATOM_HELPER(AtmWindowsWMMouseActivate, WINDOWSWM_MOUSE_ACTIVATE)
-/* DEFINE_ATOM_HELPER(AtmWindowsWMClientWindow, WINDOWSWM_CLIENT_WINDOW) */
-
-/*
- * ConstrainSize - Taken from TWM sources - Respects hints for sizing
- */
-#define makemult(a,b) ((b==1) ? (a) : (((int)((a)/(b))) * (b)) )
-static void
-ConstrainSize(WinXSizeHints hints, int *widthp, int *heightp)
-{
-    int minWidth, minHeight, maxWidth, maxHeight, xinc, yinc, delta;
-    int baseWidth, baseHeight;
-    int dwidth = *widthp, dheight = *heightp;
-
-    if (hints.flags & PMinSize) {
-        minWidth = hints.min_width;
-        minHeight = hints.min_height;
-    }
-    else if (hints.flags & PBaseSize) {
-        minWidth = hints.base_width;
-        minHeight = hints.base_height;
-    }
-    else
-        minWidth = minHeight = 1;
-
-    if (hints.flags & PBaseSize) {
-        baseWidth = hints.base_width;
-        baseHeight = hints.base_height;
-    }
-    else if (hints.flags & PMinSize) {
-        baseWidth = hints.min_width;
-        baseHeight = hints.min_height;
-    }
-    else
-        baseWidth = baseHeight = 0;
-
-    if (hints.flags & PMaxSize) {
-        maxWidth = hints.max_width;
-        maxHeight = hints.max_height;
-    }
-    else {
-        maxWidth = MAXINT;
-        maxHeight = MAXINT;
-    }
-
-    if (hints.flags & PResizeInc) {
-        xinc = hints.width_inc;
-        yinc = hints.height_inc;
-    }
-    else
-        xinc = yinc = 1;
-
-    /*
-     * First, clamp to min and max values
-     */
-    if (dwidth < minWidth)
-        dwidth = minWidth;
-    if (dheight < minHeight)
-        dheight = minHeight;
-
-    if (dwidth > maxWidth)
-        dwidth = maxWidth;
-    if (dheight > maxHeight)
-        dheight = maxHeight;
-
-    /*
-     * Second, fit to base + N * inc
-     */
-    dwidth = ((dwidth - baseWidth) / xinc * xinc) + baseWidth;
-    dheight = ((dheight - baseHeight) / yinc * yinc) + baseHeight;
-
-    /*
-     * Third, adjust for aspect ratio
-     */
-
-    /*
-     * The math looks like this:
-     *
-     * minAspectX    dwidth     maxAspectX
-     * ---------- <= ------- <= ----------
-     * minAspectY    dheight    maxAspectY
-     *
-     * If that is multiplied out, then the width and height are
-     * invalid in the following situations:
-     *
-     * minAspectX * dheight > minAspectY * dwidth
-     * maxAspectX * dheight < maxAspectY * dwidth
-     *
-     */
-
-    if (hints.flags & PAspect) {
-        if (hints.min_aspect.x * dheight > hints.min_aspect.y * dwidth) {
-            delta =
-                makemult(hints.min_aspect.x * dheight / hints.min_aspect.y -
-                         dwidth, xinc);
-            if (dwidth + delta <= maxWidth)
-                dwidth += delta;
-            else {
-                delta =
-                    makemult(dheight -
-                             dwidth * hints.min_aspect.y / hints.min_aspect.x,
-                             yinc);
-                if (dheight - delta >= minHeight)
-                    dheight -= delta;
-            }
-        }
-
-        if (hints.max_aspect.x * dheight < hints.max_aspect.y * dwidth) {
-            delta =
-                makemult(dwidth * hints.max_aspect.y / hints.max_aspect.x -
-                         dheight, yinc);
-            if (dheight + delta <= maxHeight)
-                dheight += delta;
-            else {
-                delta =
-                    makemult(dwidth -
-                             hints.max_aspect.x * dheight / hints.max_aspect.y,
-                             xinc);
-                if (dwidth - delta >= minWidth)
-                    dwidth -= delta;
-            }
-        }
-    }
-
-    /* Return computed values */
-    *widthp = dwidth;
-    *heightp = dheight;
-}
-
-#undef makemult
-
-/*
- * ValidateSizing - Ensures size request respects hints
- */
-static int
-ValidateSizing(HWND hwnd, WindowPtr pWin, WPARAM wParam, LPARAM lParam)
-{
-    WinXSizeHints sizeHints;
-    RECT *rect;
-    int iWidth, iHeight, iTopBorder;
-    POINT pt;
-
-    /* Invalid input checking */
-    if (pWin == NULL || lParam == 0) {
-        ErrorF("Invalid input checking\n");
-        return FALSE;
-    }
-
-    /* No size hints, no checking */
-    if (!winMultiWindowGetWMNormalHints(pWin, &sizeHints)) {
-        ErrorF("No size hints, no checking\n");
-        return FALSE;
-    }
-
-    /* Avoid divide-by-zero */
-    if (sizeHints.flags & PResizeInc) {
-        if (sizeHints.width_inc == 0)
-            sizeHints.width_inc = 1;
-        if (sizeHints.height_inc == 0)
-            sizeHints.height_inc = 1;
-    }
-
-    rect = (RECT *) lParam;
-
-    iWidth = rect->right - rect->left;
-    iHeight = rect->bottom - rect->top;
-
-    /* Get title bar height, there must be an easier way?! */
-    pt.x = pt.y = 0;
-    ClientToScreen(hwnd, &pt);
-    iTopBorder = pt.y - rect->top;
-
-    /* Now remove size of any borders */
-    iWidth -= 2 * GetSystemMetrics(SM_CXSIZEFRAME);
-    iHeight -= GetSystemMetrics(SM_CYSIZEFRAME) + iTopBorder;
-
-    /* Constrain the size to legal values */
-    ConstrainSize(sizeHints, &iWidth, &iHeight);
-
-    /* Add back the borders */
-    iWidth += 2 * GetSystemMetrics(SM_CXSIZEFRAME);
-    iHeight += GetSystemMetrics(SM_CYSIZEFRAME) + iTopBorder;
-
-    /* Adjust size according to where we're dragging from */
-    switch (wParam) {
-    case WMSZ_TOP:
-    case WMSZ_TOPRIGHT:
-    case WMSZ_BOTTOM:
-    case WMSZ_BOTTOMRIGHT:
-    case WMSZ_RIGHT:
-        rect->right = rect->left + iWidth;
-        break;
-    default:
-        rect->left = rect->right - iWidth;
-        break;
-    }
-    switch (wParam) {
-    case WMSZ_BOTTOM:
-    case WMSZ_BOTTOMRIGHT:
-    case WMSZ_BOTTOMLEFT:
-    case WMSZ_RIGHT:
-    case WMSZ_LEFT:
-        rect->bottom = rect->top + iHeight;
-        break;
-    default:
-        rect->top = rect->bottom - iHeight;
-        break;
-    }
-    return TRUE;
-}
-
-/*
- * IsMouseActive
- */
-
-static Bool
-IsMouseActive(WindowPtr pWin)
-{
-
-    struct _Window *pwin;
-    struct _Property *prop;
-
-    /* XXX We're getting inputInfo.poniter here, but this might be really wrong.
-     * Which pointer's current window do we want? */
-    WindowPtr pRoot = GetCurrentRootWindow(inputInfo.pointer);
-
-    if (!pWin) {
-        ErrorF("IsMouseActive - pWin was NULL use default value:%d\n",
-               MOUSE_ACTIVATE_DEFAULT);
-        return MOUSE_ACTIVATE_DEFAULT;
-    }
-
-    pwin = (struct _Window *) pWin;
-
-    if (pwin->optional)
-        prop = (struct _Property *) pwin->optional->userProps;
-    else
-        prop = NULL;
-
-    while (prop) {
-        if (prop->propertyName == AtmWindowsWMMouseActivate()
-            && prop->type == XA_INTEGER && prop->format == 32) {
-            return *(int *) prop->data;
-        }
-        else
-            prop = prop->next;
-    }
-
-    if (pWin != pRoot) {
-        return IsMouseActive(pRoot);
-    }
-    else {
-#if CYGMULTIWINDOW_DEBUG
-        winDebug("IsMouseActive - no prop use default value:%d\n",
-                 MOUSE_ACTIVATE_DEFAULT);
-#endif
-        return MOUSE_ACTIVATE_DEFAULT;
-    }
-}
-
-/*
- * winMWExtWMWindowProc - Window procedure
- */
-
-LRESULT CALLBACK
-winMWExtWMWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
-{
-    WindowPtr pWin = NULL;
-    win32RootlessWindowPtr pRLWinPriv = NULL;
-    ScreenPtr pScreen = NULL;
-    winPrivScreenPtr pScreenPriv = NULL;
-    winScreenInfo *pScreenInfo = NULL;
-    HWND hwndScreen = NULL;
-    POINT ptMouse;
-    static Bool s_fTracking = FALSE;
-    HDC hdcUpdate;
-    PAINTSTRUCT ps;
-    LPWINDOWPOS pWinPos = NULL;
-    RECT rcClient;
-
-    /* Check if the Windows window property for our X window pointer is valid */
-    if ((pRLWinPriv =
-         (win32RootlessWindowPtr) GetProp(hwnd, WIN_WINDOW_PROP)) != NULL) {
-        pWin = pRLWinPriv->pFrame->win;
-        pScreen = pWin->drawable.pScreen;
-        if (pScreen)
-            pScreenPriv = winGetScreenPriv(pScreen);
-        if (pScreenPriv)
-            pScreenInfo = pScreenPriv->pScreenInfo;
-        if (pScreenPriv)
-            hwndScreen = pScreenPriv->hwndScreen;
-
-#if CYGDEBUG
-        winDebugWin32Message("winMWExtWMWindowProc", hwnd, message, wParam,
-                             lParam);
-
-        winDebug("\thWnd %p\n", hwnd);
-        winDebug("\tpScreenPriv %p\n", pScreenPriv);
-        winDebug("\tpScreenInfo %p\n", pScreenInfo);
-        winDebug("\thwndScreen %p\n", hwndScreen);
-        winDebug("winMWExtWMWindowProc (%p) %08x %08x %08x\n",
-                 pRLWinPriv, message, (int)wParam, (int)lParam);
-#endif
-    }
-    /* Branch on message type */
-    switch (message) {
-    case WM_CREATE:
-#if CYGMULTIWINDOW_DEBUG
-        winDebug("winMWExtWMWindowProc - WM_CREATE\n");
-#endif
-        /* */
-        SetProp(hwnd,
-                WIN_WINDOW_PROP,
-                (HANDLE) ((LPCREATESTRUCT) lParam)->lpCreateParams);
-        return 0;
-
-    case WM_CLOSE:
-#if CYGMULTIWINDOW_DEBUG
-        winDebug("winMWExtWMWindowProc - WM_CLOSE %d\n", pRLWinPriv->fClose);
-#endif
-        /* Tell window-manager to close window */
-        if (pRLWinPriv->fClose) {
-            DestroyWindow(hwnd);
-        }
-        else {
-            winWindowsWMSendEvent(WindowsWMControllerNotify,
-                                  WindowsWMControllerNotifyMask,
-                                  1,
-                                  WindowsWMCloseWindow,
-                                  pWin->drawable.id, 0, 0, 0, 0);
-        }
-        return 0;
-
-    case WM_DESTROY:
-#if CYGMULTIWINDOW_DEBUG
-        winDebug("winMWExtWMWindowProc - WM_DESTROY\n");
-#endif
-        /* Free the shaodw DC; which allows the bitmap to be freed */
-        DeleteDC(pRLWinPriv->hdcShadow);
-        pRLWinPriv->hdcShadow = NULL;
-
-        /* Free the shadow bitmap */
-        DeleteObject(pRLWinPriv->hbmpShadow);
-        pRLWinPriv->hbmpShadow = NULL;
-
-        /* Free the screen DC */
-        ReleaseDC(pRLWinPriv->hWnd, pRLWinPriv->hdcScreen);
-        pRLWinPriv->hdcScreen = NULL;
-
-        /* Free shadow buffer info header */
-        free(pRLWinPriv->pbmihShadow);
-        pRLWinPriv->pbmihShadow = NULL;
-
-        pRLWinPriv->fResized = FALSE;
-        pRLWinPriv->pfb = NULL;
-        free(pRLWinPriv);
-        RemoveProp(hwnd, WIN_WINDOW_PROP);
-        break;
-
-    case WM_MOUSEMOVE:
-#if CYGMULTIWINDOW_DEBUG && 0
-        winDebug("winMWExtWMWindowProc - WM_MOUSEMOVE\n");
-#endif
-        /* Unpack the client area mouse coordinates */
-        ptMouse.x = GET_X_LPARAM(lParam);
-        ptMouse.y = GET_Y_LPARAM(lParam);
-
-        /* Translate the client area mouse coordinates to screen coordinates */
-        ClientToScreen(hwnd, &ptMouse);
-
-        /* Screen Coords from (-X, -Y) -> Root Window (0, 0) */
-        ptMouse.x -= GetSystemMetrics(SM_XVIRTUALSCREEN);
-        ptMouse.y -= GetSystemMetrics(SM_YVIRTUALSCREEN);
-
-        /* We can't do anything without privates */
-        if (pScreenPriv == NULL || pScreenInfo->fIgnoreInput)
-            break;
-
-        /* Has the mouse pointer crossed screens? */
-        if (pScreen != miPointerGetScreen(inputInfo.pointer))
-             miPointerSetScreen(inputInfo.pointer, pScreenInfo->dwScreen,
-                                ptMouse.x - pScreenInfo->dwXOffset,
-                                ptMouse.y - pScreenInfo->dwYOffset);
-
-        /* Are we tracking yet? */
-        if (!s_fTracking) {
-            TRACKMOUSEEVENT tme;
-
-            /* Setup data structure */
-            ZeroMemory(&tme, sizeof(tme));
-            tme.cbSize = sizeof(tme);
-            tme.dwFlags = TME_LEAVE;
-            tme.hwndTrack = hwnd;
-
-            /* Call the tracking function */
-            if (!TrackMouseEvent(&tme))
-                ErrorF("winMWExtWMWindowProc - TrackMouseEvent failed\n");
-
-            /* Flag that we are tracking now */
-            s_fTracking = TRUE;
-        }
-
-        /* Kill the timer used to poll mouse events */
-        if (g_uipMousePollingTimerID != 0) {
-            KillTimer(pScreenPriv->hwndScreen, WIN_POLLING_MOUSE_TIMER_ID);
-            g_uipMousePollingTimerID = 0;
-        }
-
-        /* Deliver absolute cursor position to X Server */
-        winEnqueueMotion(ptMouse.x - pScreenInfo->dwXOffset,
-                         ptMouse.y - pScreenInfo->dwYOffset);
-
-        return 0;
-
-    case WM_NCMOUSEMOVE:
-#if CYGMULTIWINDOW_DEBUG && 0
-        winDebug("winMWExtWMWindowProc - WM_NCMOUSEMOVE\n");
-#endif
-        /*
-         * We break instead of returning 0 since we need to call
-         * DefWindowProc to get the mouse cursor changes
-         * and min/max/close button highlighting in Windows XP.
-         * The Platform SDK says that you should return 0 if you
-         * process this message, but it fails to mention that you
-         * will give up any default functionality if you do return 0.
-         */
-
-        /* We can't do anything without privates */
-        if (pScreenPriv == NULL || pScreenInfo->fIgnoreInput)
-            break;
-
-        /*
-         * Timer to poll mouse events.  This is needed to make
-         * programs like xeyes follow the mouse properly.
-         */
-        if (g_uipMousePollingTimerID == 0)
-            g_uipMousePollingTimerID = SetTimer(pScreenPriv->hwndScreen,
-                                                WIN_POLLING_MOUSE_TIMER_ID,
-                                                MOUSE_POLLING_INTERVAL, NULL);
-        break;
-
-    case WM_MOUSELEAVE:
-#if CYGMULTIWINDOW_DEBUG
-        winDebug("winMWExtWMWindowProc - WM_MOUSELEAVE\n");
-#endif
-        /* Mouse has left our client area */
-
-        /* Flag that we are no longer tracking */
-        s_fTracking = FALSE;
-
-        /*
-         * Timer to poll mouse events.  This is needed to make
-         * programs like xeyes follow the mouse properly.
-         */
-        if (g_uipMousePollingTimerID == 0)
-            g_uipMousePollingTimerID = SetTimer(pScreenPriv->hwndScreen,
-                                                WIN_POLLING_MOUSE_TIMER_ID,
-                                                MOUSE_POLLING_INTERVAL, NULL);
-        return 0;
-
-    case WM_LBUTTONDBLCLK:
-    case WM_LBUTTONDOWN:
-#if CYGMULTIWINDOW_DEBUG
-        winDebug("winMWExtWMWindowProc - WM_LBUTTONDBLCLK\n");
-#endif
-        if (pScreenPriv == NULL || pScreenInfo->fIgnoreInput)
-            break;
-        SetCapture(hwnd);
-        return winMouseButtonsHandle(pScreen, ButtonPress, Button1, wParam);
-
-    case WM_LBUTTONUP:
-#if CYGMULTIWINDOW_DEBUG
-        winDebug("winMWExtWMWindowProc - WM_LBUTTONUP\n");
-#endif
-        if (pScreenPriv == NULL || pScreenInfo->fIgnoreInput)
-            break;
-        ReleaseCapture();
-        return winMouseButtonsHandle(pScreen, ButtonRelease, Button1, wParam);
-
-    case WM_MBUTTONDBLCLK:
-    case WM_MBUTTONDOWN:
-#if CYGMULTIWINDOW_DEBUG
-        winDebug("winMWExtWMWindowProc - WM_MBUTTONDBLCLK\n");
-#endif
-        if (pScreenPriv == NULL || pScreenInfo->fIgnoreInput)
-            break;
-        SetCapture(hwnd);
-        return winMouseButtonsHandle(pScreen, ButtonPress, Button2, wParam);
-
-    case WM_MBUTTONUP:
-#if CYGMULTIWINDOW_DEBUG
-        winDebug("winMWExtWMWindowProc - WM_MBUTTONUP\n");
-#endif
-        if (pScreenPriv == NULL || pScreenInfo->fIgnoreInput)
-            break;
-        ReleaseCapture();
-        return winMouseButtonsHandle(pScreen, ButtonRelease, Button2, wParam);
-
-    case WM_RBUTTONDBLCLK:
-    case WM_RBUTTONDOWN:
-#if CYGMULTIWINDOW_DEBUG
-        winDebug("winMWExtWMWindowProc - WM_RBUTTONDBLCLK\n");
-#endif
-        if (pScreenPriv == NULL || pScreenInfo->fIgnoreInput)
-            break;
-        SetCapture(hwnd);
-        return winMouseButtonsHandle(pScreen, ButtonPress, Button3, wParam);
-
-    case WM_RBUTTONUP:
-#if CYGMULTIWINDOW_DEBUG
-        winDebug("winMWExtWMWindowProc - WM_RBUTTONUP\n");
-#endif
-        if (pScreenPriv == NULL || pScreenInfo->fIgnoreInput)
-            break;
-        ReleaseCapture();
-        return winMouseButtonsHandle(pScreen, ButtonRelease, Button3, wParam);
-
-    case WM_XBUTTONDBLCLK:
-    case WM_XBUTTONDOWN:
-        if (pScreenPriv == NULL || pScreenInfo->fIgnoreInput)
-            break;
-        SetCapture(hwnd);
-        return winMouseButtonsHandle(pScreen, ButtonPress, HIWORD(wParam) + 7,
-                                     wParam);
-    case WM_XBUTTONUP:
-        if (pScreenPriv == NULL || pScreenInfo->fIgnoreInput)
-            break;
-        ReleaseCapture();
-        return winMouseButtonsHandle(pScreen, ButtonRelease, HIWORD(wParam) + 7,
-                                     wParam);
-
-    case WM_MOUSEWHEEL:
-#if CYGMULTIWINDOW_DEBUG
-        winDebug("winMWExtWMWindowProc - WM_MOUSEWHEEL\n");
-#endif
-
-        /* Pass the message to the root window */
-        SendMessage(hwndScreen, message, wParam, lParam);
-        return 0;
-
-    case WM_MOUSEHWHEEL:
-#if CYGMULTIWINDOW_DEBUG
-        winDebug("winMWExtWMWindowProc - WM_MOUSEHWHEEL\n");
-#endif
-
-        /* Pass the message to the root window */
-        SendMessage(hwndScreen, message, wParam, lParam);
-        return 0;
-
-    case WM_MOUSEACTIVATE:
-#if CYGMULTIWINDOW_DEBUG
-        winDebug("winMWExtWMWindowProc - WM_MOUSEACTIVATE\n");
-#endif
-        if (!IsMouseActive(pWin))
-            return MA_NOACTIVATE;
-
-        break;
-
-    case WM_KILLFOCUS:
-        /* Pop any pressed keys since we are losing keyboard focus */
-        winKeybdReleaseKeys();
-        return 0;
-
-    case WM_SYSDEADCHAR:
-    case WM_DEADCHAR:
-        /*
-         * NOTE: We do nothing with WM_*CHAR messages,
-         * nor does the root window, so we can just toss these messages.
-         */
-        return 0;
-
-    case WM_SYSKEYDOWN:
-    case WM_KEYDOWN:
-#if CYGMULTIWINDOW_DEBUG
-        winDebug("winMWExtWMWindowProc - WM_*KEYDOWN\n");
-#endif
-
-        /*
-         * Don't pass Alt-F4 key combo to root window,
-         * let Windows translate to WM_CLOSE and close this top-level window.
-         *
-         * NOTE: We purposely don't check the fUseWinKillKey setting because
-         * it should only apply to the key handling for the root window,
-         * not for top-level window-manager windows.
-         *
-         * ALSO NOTE: We do pass Ctrl-Alt-Backspace to the root window
-         * because that is a key combo that no X app should be expecting to
-         * receive, since it has historically been used to shutdown the X server.
-         * Passing Ctrl-Alt-Backspace to the root window preserves that
-         * behavior, assuming that -unixkill has been passed as a parameter.
-         */
-        if (wParam == VK_F4 && (GetKeyState(VK_MENU) & 0x8000))
-            break;
-
-        /* Pass the message to the root window */
-        SendMessage(hwndScreen, message, wParam, lParam);
-        return 0;
-
-    case WM_SYSKEYUP:
-    case WM_KEYUP:
-
-#if CYGMULTIWINDOW_DEBUG
-        winDebug("winMWExtWMWindowProc - WM_*KEYUP\n");
-#endif
-
-        /* Pass the message to the root window */
-        SendMessage(hwndScreen, message, wParam, lParam);
-        return 0;
-
-    case WM_HOTKEY:
-#if CYGMULTIWINDOW_DEBUG
-        winDebug("winMWExtWMWindowProc - WM_HOTKEY\n");
-#endif
-
-        /* Pass the message to the root window */
-        SendMessage(hwndScreen, message, wParam, lParam);
-        return 0;
-
-    case WM_ERASEBKGND:
-#if CYGDEBUG
-        winDebug("winMWExtWMWindowProc - WM_ERASEBKGND\n");
-#endif
-        /*
-         * Pretend that we did erase the background but we don't care,
-         * since we repaint the entire region anyhow
-         * This avoids some flickering when resizing.
-         */
-        return TRUE;
-
-    case WM_PAINT:
-
-        /* BeginPaint gives us an hdc that clips to the invalidated region */
-        hdcUpdate = BeginPaint(hwnd, &ps);
-
-        /* Try to copy from the shadow buffer */
-        if (!BitBlt(hdcUpdate,
-                    ps.rcPaint.left, ps.rcPaint.top,
-                    ps.rcPaint.right - ps.rcPaint.left,
-                    ps.rcPaint.bottom - ps.rcPaint.top,
-                    pRLWinPriv->hdcShadow,
-                    ps.rcPaint.left, ps.rcPaint.top, SRCCOPY)) {
-            LPVOID lpMsgBuf;
-
-            /* Display a fancy error message */
-            FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
-                          FORMAT_MESSAGE_FROM_SYSTEM |
-                          FORMAT_MESSAGE_IGNORE_INSERTS,
-                          NULL,
-                          GetLastError(),
-                          MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
-                          (LPTSTR) &lpMsgBuf, 0, NULL);
-
-            ErrorF("winMWExtWMWindowProc - BitBlt failed: %s\n",
-                   (LPSTR) lpMsgBuf);
-            LocalFree(lpMsgBuf);
-        }
-
-        /* EndPaint frees the DC */
-        EndPaint(hwnd, &ps);
-        break;
-
-    case WM_ACTIVATE:
-#if CYGMULTIWINDOW_DEBUG
-        winDebug("winMWExtWMWindowProc - WM_ACTIVATE\n");
-#endif
-        if (LOWORD(wParam) != WA_INACTIVE) {
-            winWindowsWMSendEvent(WindowsWMControllerNotify,
-                                  WindowsWMControllerNotifyMask,
-                                  1,
-                                  WindowsWMActivateWindow,
-                                  pWin->drawable.id, 0, 0, 0, 0);
-        }
-        return 0;
-
-#if 1
-    case WM_WINDOWPOSCHANGING:
-        pWinPos = (LPWINDOWPOS) lParam;
-        if (!(pWinPos->flags & SWP_NOZORDER)) {
-            if (pRLWinPriv->fRestackingNow || pScreenPriv->fRestacking) {
-#if CYGMULTIWINDOW_DEBUG
-                winDebug("Win %p is now restacking.\n",
-                         pRLWinPriv);
-#endif
-                break;
-            }
-
-#if CYGMULTIWINDOW_DEBUG
-            winDebug("Win %p forbid to change z order (%p).\n",
-                     pRLWinPriv,
-                     pWinPos->hwndInsertAfter);
-#endif
-            pWinPos->flags |= SWP_NOZORDER;
-        }
-        break;
-#endif
-
-    case WM_MOVE:
-#if CYGMULTIWINDOW_DEBUG
-        winDebug("winMWExtWMWindowProc - WM_MOVE\n");
-#endif
-        if (g_fNoConfigureWindow)
-            break;
-#if 0
-        /* Bail if Windows window is not actually moving */
-        if (pRLWinPriv->dwX == (short) LOWORD(lParam)
-            && pRLWinPriv->dwY == (short) HIWORD(lParam))
-            break;
-
-        /* Also bail if we're maximizing, we'll do the whole thing in WM_SIZE */
-        {
-            WINDOWPLACEMENT windPlace;
-
-            windPlace.length = sizeof(WINDOWPLACEMENT);
-
-            /* Get current window placement */
-            GetWindowPlacement(hwnd, &windPlace);
-
-            /* Bail if maximizing */
-            if (windPlace.showCmd == SW_MAXIMIZE
-                || windPlace.showCmd == SW_SHOWMAXIMIZED)
-                break;
-        }
-#endif
-
-#if CYGMULTIWINDOW_DEBUG
-        winDebug("\t(%d, %d)\n", (short) LOWORD(lParam),
-                 (short) HIWORD(lParam));
-#endif
-        if (!pRLWinPriv->fMovingOrSizing) {
-            winMWExtWMMoveXWindow(pWin, (LOWORD(lParam) - wBorderWidth(pWin)
-                                         - GetSystemMetrics(SM_XVIRTUALSCREEN)),
-                                  (HIWORD(lParam) - wBorderWidth(pWin)
-                                   - GetSystemMetrics(SM_YVIRTUALSCREEN)));
-        }
-        return 0;
-
-    case WM_SHOWWINDOW:
-#if CYGMULTIWINDOW_DEBUG || TRUE
-        winDebug("winMWExtWMWindowProc - WM_SHOWWINDOW\n");
-#endif
-        /* Bail out if the window is being hidden */
-        if (!wParam)
-            return 0;
-
-        winMWExtWMUpdateWindowDecoration(pRLWinPriv, pScreenInfo);
-
-        break;
-
-    case WM_SIZING:
-        /* Need to legalize the size according to WM_NORMAL_HINTS */
-        /* for applications like xterm */
-        return ValidateSizing(hwnd, pWin, wParam, lParam);
-
-    case WM_WINDOWPOSCHANGED:
-    {
-        pWinPos = (LPWINDOWPOS) lParam;
-#if CYGMULTIWINDOW_DEBUG
-        winDebug("winMWExtWMWindowProc - WM_WINDOWPOSCHANGED\n");
-        winDebug("\tflags: %s%s%s%s%s%s%s%s%s%s%s%s\n",
-                 (pWinPos->flags & SWP_DRAWFRAME) ? "SWP_DRAWFRAME " : "",
-                 (pWinPos->flags & SWP_FRAMECHANGED) ? "SWP_FRAMECHANGED " : "",
-                 (pWinPos->flags & SWP_HIDEWINDOW) ? "SWP_HIDEWINDOW " : "",
-                 (pWinPos->flags & SWP_NOACTIVATE) ? "SWP_NOACTIVATE " : "",
-                 (pWinPos->flags & SWP_NOCOPYBITS) ? "SWP_NOCOPYBITS " : "",
-                 (pWinPos->flags & SWP_NOMOVE) ? "SWP_NOMOVE " : "",
-                 (pWinPos->
-                  flags & SWP_NOOWNERZORDER) ? "SWP_NOOWNERZORDER " : "",
-                 (pWinPos->flags & SWP_NOSIZE) ? "SWP_NOSIZE " : "",
-                 (pWinPos->flags & SWP_NOREDRAW) ? "SWP_NOREDRAW " : "",
-                 (pWinPos->
-                  flags & SWP_NOSENDCHANGING) ? "SWP_NOSENDCHANGING " : "",
-                 (pWinPos->flags & SWP_NOZORDER) ? "SWP_NOZORDER " : "",
-                 (pWinPos->flags & SWP_SHOWWINDOW) ? "SWP_SHOWWINDOW " : "");
-        winDebug("\tno_configure: %s\n", (g_fNoConfigureWindow ? "Yes" : "No"));
-        winDebug("\textend: (%d, %d, %d, %d)\n",
-                 pWinPos->x, pWinPos->y, pWinPos->cx, pWinPos->cy);
-
-#endif
-        if (pWinPos->flags & SWP_HIDEWINDOW)
-            break;
-
-        if (!(pWinPos->flags & SWP_NOSIZE)) {
-            if (IsIconic(hwnd)) {
-#if CYGMULTIWINDOW_DEBUG
-                winDebug("\tIconic -> MINIMIZED\n");
-#endif
-
-                winWindowsWMSendEvent(WindowsWMControllerNotify,
-                                      WindowsWMControllerNotifyMask,
-                                      1,
-                                      WindowsWMMinimizeWindow,
-                                      pWin->drawable.id, 0, 0, 0, 0);
-            }
-            else if (IsZoomed(hwnd)) {
-#if CYGMULTIWINDOW_DEBUG
-                winDebug("\tZoomed -> MAXIMIZED\n");
-#endif
-                winWindowsWMSendEvent(WindowsWMControllerNotify,
-                                      WindowsWMControllerNotifyMask,
-                                      1,
-                                      WindowsWMMaximizeWindow,
-                                      pWin->drawable.id, 0, 0, 0, 0);
-            }
-            else {
-#if CYGMULTIWINDOW_DEBUG
-                winDebug("\tnone -> RESTORED\n");
-#endif
-                winWindowsWMSendEvent(WindowsWMControllerNotify,
-                                      WindowsWMControllerNotifyMask,
-                                      1,
-                                      WindowsWMRestoreWindow,
-                                      pWin->drawable.id, 0, 0, 0, 0);
-            }
-        }
-        if (!g_fNoConfigureWindow) {
-
-            if (!pRLWinPriv->fMovingOrSizing
-                /*&& (pWinPos->flags & SWP_SHOWWINDOW) */ ) {
-                GetClientRect(hwnd, &rcClient);
-                MapWindowPoints(hwnd, HWND_DESKTOP, (LPPOINT) &rcClient, 2);
-
-                if (!(pWinPos->flags & SWP_NOMOVE)
-                    && !(pWinPos->flags & SWP_NOSIZE)) {
-#if CYGMULTIWINDOW_DEBUG
-                    winDebug("\tmove & resize\n");
-#endif
-
-                    winMWExtWMMoveResizeXWindow(pWin,
-                                                rcClient.left -
-                                                wBorderWidth(pWin)
-                                                -
-                                                GetSystemMetrics
-                                                (SM_XVIRTUALSCREEN),
-                                                rcClient.top -
-                                                wBorderWidth(pWin)
-                                                -
-                                                GetSystemMetrics
-                                                (SM_YVIRTUALSCREEN),
-                                                rcClient.right - rcClient.left -
-                                                wBorderWidth(pWin) * 2,
-                                                rcClient.bottom - rcClient.top -
-                                                wBorderWidth(pWin) * 2);
-                }
-                else if (!(pWinPos->flags & SWP_NOMOVE)) {
-#if CYGMULTIWINDOW_DEBUG
-                    winDebug("\tmove\n");
-#endif
-
-                    winMWExtWMMoveResizeXWindow(pWin,
-                                                rcClient.left -
-                                                wBorderWidth(pWin)
-                                                -
-                                                GetSystemMetrics
-                                                (SM_XVIRTUALSCREEN),
-                                                rcClient.top -
-                                                wBorderWidth(pWin)
-                                                -
-                                                GetSystemMetrics
-                                                (SM_YVIRTUALSCREEN),
-                                                rcClient.right - rcClient.left -
-                                                wBorderWidth(pWin) * 2,
-                                                rcClient.bottom - rcClient.top -
-                                                wBorderWidth(pWin) * 2);
-                }
-                else if (!(pWinPos->flags & SWP_NOMOVE)) {
-#if CYGMULTIWINDOW_DEBUG
-                    winDebug("\tmove\n");
-#endif
-
-                    winMWExtWMMoveXWindow(pWin,
-                                          rcClient.left - wBorderWidth(pWin)
-                                          - GetSystemMetrics(SM_XVIRTUALSCREEN),
-                                          rcClient.top - wBorderWidth(pWin)
-                                          -
-                                          GetSystemMetrics(SM_YVIRTUALSCREEN));
-                }
-                else if (!(pWinPos->flags & SWP_NOSIZE)) {
-#if CYGMULTIWINDOW_DEBUG
-                    winDebug("\tresize\n");
-#endif
-
-                    winMWExtWMResizeXWindow(pWin,
-                                            rcClient.right - rcClient.left
-                                            - wBorderWidth(pWin) * 2,
-                                            rcClient.bottom - rcClient.top
-                                            - wBorderWidth(pWin) * 2);
-                }
-            }
-        }
-    }
-#if CYGMULTIWINDOW_DEBUG
-        winDebug("winMWExtWMWindowProc - WM_WINDOWPOSCHANGED - done.\n");
-#endif
-        return 0;
-
-    case WM_SIZE:
-        /* see dix/window.c */
-        /* FIXME: Maximize/Restore? */
-#if CYGMULTIWINDOW_DEBUG
-        winDebug("winMWExtWMWindowProc - WM_SIZE\n");
-#endif
-#if CYGMULTIWINDOW_DEBUG
-        winDebug("\t(%d, %d) %d\n", (short) LOWORD(lParam),
-                 (short) HIWORD(lParam), g_fNoConfigureWindow);
-#endif
-        if (g_fNoConfigureWindow)
-            break;
-
-        /* Branch on type of resizing occurring */
-        switch (wParam) {
-        case SIZE_MINIMIZED:
-#if CYGMULTIWINDOW_DEBUG
-            winDebug("\tSIZE_MINIMIZED\n");
-#endif
-
-            winWindowsWMSendEvent(WindowsWMControllerNotify,
-                                  WindowsWMControllerNotifyMask,
-                                  1,
-                                  WindowsWMMinimizeWindow,
-                                  pWin->drawable.id,
-                                  0, 0, LOWORD(lParam), HIWORD(lParam));
-            break;
-
-        case SIZE_RESTORED:
-#if CYGMULTIWINDOW_DEBUG
-            winDebug("\tSIZE_RESTORED\n");
-#endif
-            winWindowsWMSendEvent(WindowsWMControllerNotify,
-                                  WindowsWMControllerNotifyMask,
-                                  1,
-                                  WindowsWMRestoreWindow,
-                                  pWin->drawable.id,
-                                  0, 0, LOWORD(lParam), HIWORD(lParam));
-            break;
-
-        case SIZE_MAXIMIZED:
-#if CYGMULTIWINDOW_DEBUG
-            winDebug("\tSIZE_MAXIMIZED\n");
-#endif
-            winWindowsWMSendEvent(WindowsWMControllerNotify,
-                                  WindowsWMControllerNotifyMask,
-                                  1,
-                                  WindowsWMMaximizeWindow,
-                                  pWin->drawable.id,
-                                  0, 0, LOWORD(lParam), HIWORD(lParam));
-            break;
-        }
-
-        /* Perform the resize and notify the X client */
-        if (!pRLWinPriv->fMovingOrSizing) {
-            winMWExtWMResizeXWindow(pWin, (short) LOWORD(lParam)
-                                    - wBorderWidth(pWin) * 2,
-                                    (short) HIWORD(lParam)
-                                    - wBorderWidth(pWin) * 2);
-        }
-        break;
-
-    case WM_ACTIVATEAPP:
-#if CYGMULTIWINDOW_DEBUG
-        winDebug("winMWExtWMWindowProc - WM_ACTIVATEAPP\n");
-#endif
-        if (wParam) {
-            winWindowsWMSendEvent(WindowsWMActivationNotify,
-                                  WindowsWMActivationNotifyMask,
-                                  1,
-                                  WindowsWMIsActive,
-                                  pWin->drawable.id, 0, 0, 0, 0);
-        }
-        else {
-            winWindowsWMSendEvent(WindowsWMActivationNotify,
-                                  WindowsWMActivationNotifyMask,
-                                  1,
-                                  WindowsWMIsInactive,
-                                  pWin->drawable.id, 0, 0, 0, 0);
-        }
-        break;
-
-    case WM_SETCURSOR:
-        if (LOWORD(lParam) == HTCLIENT) {
-            if (!g_fSoftwareCursor)
-                SetCursor(pScreenPriv->cursor.handle);
-            return TRUE;
-        }
-        break;
-
-    case WM_ENTERSIZEMOVE:
-#if CYGMULTIWINDOW_DEBUG
-        winDebug("winMWExtWMWindowProc - WM_ENTERSIZEMOVE\n");
-#endif
-        pRLWinPriv->fMovingOrSizing = TRUE;
-        break;
-
-    case WM_EXITSIZEMOVE:
-#if CYGMULTIWINDOW_DEBUG
-        winDebug("winMWExtWMWindowProc - WM_EXITSIZEMOVE\n");
-#endif
-        pRLWinPriv->fMovingOrSizing = FALSE;
-
-        GetClientRect(hwnd, &rcClient);
-
-        MapWindowPoints(hwnd, HWND_DESKTOP, (LPPOINT) &rcClient, 2);
-
-        winMWExtWMMoveResizeXWindow(pWin, rcClient.left - wBorderWidth(pWin)
-                                    - GetSystemMetrics(SM_XVIRTUALSCREEN),
-                                    rcClient.top - wBorderWidth(pWin)
-                                    - GetSystemMetrics(SM_YVIRTUALSCREEN),
-                                    rcClient.right - rcClient.left
-                                    - wBorderWidth(pWin) * 2,
-                                    rcClient.bottom - rcClient.top
-                                    - wBorderWidth(pWin) * 2);
-        break;
-
-    default:
-        break;
-    }
-
-    return DefWindowProc(hwnd, message, wParam, lParam);
-}
diff --git a/hw/xwin/winwindow.h b/hw/xwin/winwindow.h
index 959ce15..92a839c 100644
--- a/hw/xwin/winwindow.h
+++ b/hw/xwin/winwindow.h
@@ -107,8 +107,8 @@ typedef struct _winWMMessageRec {
 #define		WM_WM_NAME_EVENT	(WM_USER + 9)
 #define		WM_WM_ICON_EVENT	(WM_USER + 10)
 #define		WM_WM_CHANGE_STATE	(WM_USER + 11)
-#define		WM_WM_MAP2		(WM_USER + 12)
-#define		WM_WM_MAP3		(WM_USER + 13)
+#define		WM_WM_MAP_UNMANAGED	(WM_USER + 12)
+#define		WM_WM_MAP_MANAGED	(WM_USER + 13)
 #define		WM_WM_HINTS_EVENT	(WM_USER + 14)
 
 #define		MwmHintsDecorations	(1L << 1)
@@ -144,7 +144,7 @@ winInitWM(void **ppWMInfo,
           pthread_t * ptWMProc,
           pthread_t * ptXMsgProc,
           pthread_mutex_t * ppmServerStarted,
-          int dwScreen, HWND hwndScreen);
+          int dwScreen, HWND hwndScreen, Bool compositeWM);
 
 void
  winDeinitMultiWindowWM(void);
diff --git a/hw/xwin/winwindowswm.c b/hw/xwin/winwindowswm.c
deleted file mode 100644
index b9399fa..0000000
--- a/hw/xwin/winwindowswm.c
+++ /dev/null
@@ -1,596 +0,0 @@
-/* WindowsWM extension is based on AppleWM extension */
-/**************************************************************************
-
-Copyright (c) 2002 Apple Computer, Inc. All Rights Reserved.
-Copyright (c) 2003 Torrey T. Lyons. All Rights Reserved.
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sub license, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice (including the
-next paragraph) shall be included in all copies or substantial portions
-of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
-IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
-ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-**************************************************************************/
-
-#ifdef HAVE_XWIN_CONFIG_H
-#include <xwin-config.h>
-#endif
-#include "win.h"
-
-#include "misc.h"
-#include "dixstruct.h"
-#include "extnsionst.h"
-#include "colormapst.h"
-#include "cursorstr.h"
-#include "scrnintstr.h"
-#include "servermd.h"
-#include "swaprep.h"
-#define _WINDOWSWM_SERVER_
-#include <X11/extensions/windowswmstr.h>
-#include "protocol-versions.h"
-
-static int WMErrorBase;
-static unsigned char WMReqCode = 0;
-static int WMEventBase = 0;
-
-static RESTYPE ClientType, eventResourceType;   /* resource types for event masks */
-static XID eventResource;
-
-/* Currently selected events */
-static unsigned int eventMask = 0;
-
-static int WMFreeClient(void *data, XID id);
-static int WMFreeEvents(void *data, XID id);
-static void SNotifyEvent(xWindowsWMNotifyEvent * from,
-                         xWindowsWMNotifyEvent * to);
-
-typedef struct _WMEvent *WMEventPtr;
-typedef struct _WMEvent {
-    WMEventPtr next;
-    ClientPtr client;
-    XID clientResource;
-    unsigned int mask;
-} WMEventRec;
-
-static int
-ProcWindowsWMQueryVersion(ClientPtr client)
-{
-    xWindowsWMQueryVersionReply rep;
-
-    REQUEST_SIZE_MATCH(xWindowsWMQueryVersionReq);
-    rep.type = X_Reply;
-    rep.length = 0;
-    rep.sequenceNumber = client->sequence;
-    rep.majorVersion = SERVER_WINDOWSWM_MAJOR_VERSION;
-    rep.minorVersion = SERVER_WINDOWSWM_MINOR_VERSION;
-    rep.patchVersion = SERVER_WINDOWSWM_PATCH_VERSION;
-    if (client->swapped) {
-        swaps(&rep.sequenceNumber);
-        swapl(&rep.length);
-    }
-    WriteToClient(client, sizeof(xWindowsWMQueryVersionReply), &rep);
-    return Success;
-}
-
-/* events */
-
-static inline void
-updateEventMask(WMEventPtr * pHead)
-{
-    WMEventPtr pCur;
-
-    eventMask = 0;
-    for (pCur = *pHead; pCur != NULL; pCur = pCur->next)
-        eventMask |= pCur->mask;
-}
-
- /*ARGSUSED*/ static int
-WMFreeClient(void *data, XID id)
-{
-    WMEventPtr pEvent;
-    WMEventPtr *pHead, pCur, pPrev;
-
-    pEvent = (WMEventPtr) data;
-    dixLookupResourceByType((void *) &pHead, eventResource, eventResourceType,
-                            NullClient, DixUnknownAccess);
-    if (pHead) {
-        pPrev = 0;
-        for (pCur = *pHead; pCur && pCur != pEvent; pCur = pCur->next)
-            pPrev = pCur;
-        if (pCur) {
-            if (pPrev)
-                pPrev->next = pEvent->next;
-            else
-                *pHead = pEvent->next;
-        }
-        updateEventMask(pHead);
-    }
-    free((void *) pEvent);
-    return 1;
-}
-
- /*ARGSUSED*/ static int
-WMFreeEvents(void *data, XID id)
-{
-    WMEventPtr *pHead, pCur, pNext;
-
-    pHead = (WMEventPtr *) data;
-    for (pCur = *pHead; pCur; pCur = pNext) {
-        pNext = pCur->next;
-        FreeResource(pCur->clientResource, ClientType);
-        free((void *) pCur);
-    }
-    free((void *) pHead);
-    eventMask = 0;
-    return 1;
-}
-
-static int
-ProcWindowsWMSelectInput(ClientPtr client)
-{
-    REQUEST(xWindowsWMSelectInputReq);
-    WMEventPtr pEvent, pNewEvent, *pHead;
-    XID clientResource;
-
-    REQUEST_SIZE_MATCH(xWindowsWMSelectInputReq);
-    dixLookupResourceByType((void *) &pHead, eventResource, eventResourceType,
-                            client, DixWriteAccess);
-    if (stuff->mask != 0) {
-        if (pHead) {
-            /* check for existing entry. */
-            for (pEvent = *pHead; pEvent; pEvent = pEvent->next) {
-                if (pEvent->client == client) {
-                    pEvent->mask = stuff->mask;
-                    updateEventMask(pHead);
-                    return Success;
-                }
-            }
-        }
-
-        /* build the entry */
-        pNewEvent = malloc(sizeof(WMEventRec));
-        if (!pNewEvent)
-            return BadAlloc;
-        pNewEvent->next = 0;
-        pNewEvent->client = client;
-        pNewEvent->mask = stuff->mask;
-        /*
-         * add a resource that will be deleted when
-         * the client goes away
-         */
-        clientResource = FakeClientID(client->index);
-        pNewEvent->clientResource = clientResource;
-        if (!AddResource(clientResource, ClientType, (void *) pNewEvent))
-            return BadAlloc;
-        /*
-         * create a resource to contain a pointer to the list
-         * of clients selecting input.  This must be indirect as
-         * the list may be arbitrarily rearranged which cannot be
-         * done through the resource database.
-         */
-        if (!pHead) {
-            pHead = malloc(sizeof(WMEventPtr));
-            if (!pHead ||
-                !AddResource(eventResource, eventResourceType, (void *) pHead))
-            {
-                FreeResource(clientResource, RT_NONE);
-                return BadAlloc;
-            }
-            *pHead = 0;
-        }
-        pNewEvent->next = *pHead;
-        *pHead = pNewEvent;
-        updateEventMask(pHead);
-    }
-    else if (stuff->mask == 0) {
-        /* delete the interest */
-        if (pHead) {
-            pNewEvent = 0;
-            for (pEvent = *pHead; pEvent; pEvent = pEvent->next) {
-                if (pEvent->client == client)
-                    break;
-                pNewEvent = pEvent;
-            }
-            if (pEvent) {
-                FreeResource(pEvent->clientResource, ClientType);
-                if (pNewEvent)
-                    pNewEvent->next = pEvent->next;
-                else
-                    *pHead = pEvent->next;
-                free(pEvent);
-                updateEventMask(pHead);
-            }
-        }
-    }
-    else {
-        client->errorValue = stuff->mask;
-        return BadValue;
-    }
-    return Success;
-}
-
-/*
- * deliver the event
- */
-
-void
-winWindowsWMSendEvent(int type, unsigned int mask, int which, int arg,
-                      Window window, int x, int y, int w, int h)
-{
-    WMEventPtr *pHead, pEvent;
-    ClientPtr client;
-    xWindowsWMNotifyEvent se;
-
-#if CYGMULTIWINDOW_DEBUG
-    ErrorF("winWindowsWMSendEvent %d %d %d %d,  %d %d - %d %d\n",
-           type, mask, which, arg, x, y, w, h);
-#endif
-    dixLookupResourceByType((void *) &pHead, eventResource, eventResourceType,
-                            NullClient, DixUnknownAccess);
-    if (!pHead)
-        return;
-    for (pEvent = *pHead; pEvent; pEvent = pEvent->next) {
-        client = pEvent->client;
-#if CYGMULTIWINDOW_DEBUG
-        ErrorF("winWindowsWMSendEvent - %p\n", client);
-#endif
-        if ((pEvent->mask & mask) == 0) {
-            continue;
-        }
-#if CYGMULTIWINDOW_DEBUG
-        ErrorF("winWindowsWMSendEvent - send\n");
-#endif
-        se.type = type + WMEventBase;
-        se.kind = which;
-        se.window = window;
-        se.arg = arg;
-        se.x = x;
-        se.y = y;
-        se.w = w;
-        se.h = h;
-        se.time = currentTime.milliseconds;
-        WriteEventsToClient(client, 1, (xEvent *) &se);
-    }
-}
-
-/* general utility functions */
-
-static int
-ProcWindowsWMDisableUpdate(ClientPtr client)
-{
-    REQUEST_SIZE_MATCH(xWindowsWMDisableUpdateReq);
-
-    //winDisableUpdate();
-
-    return Success;
-}
-
-static int
-ProcWindowsWMReenableUpdate(ClientPtr client)
-{
-    REQUEST_SIZE_MATCH(xWindowsWMReenableUpdateReq);
-
-    //winEnableUpdate();
-
-    return Success;
-}
-
-/* window functions */
-
-static int
-ProcWindowsWMSetFrontProcess(ClientPtr client)
-{
-    REQUEST_SIZE_MATCH(xWindowsWMSetFrontProcessReq);
-
-    //QuartzMessageMainThread(kWindowsSetFrontProcess, NULL, 0);
-
-    return Success;
-}
-
-/* frame functions */
-
-static int
-ProcWindowsWMFrameGetRect(ClientPtr client)
-{
-    xWindowsWMFrameGetRectReply rep;
-    RECT rcNew;
-
-    REQUEST(xWindowsWMFrameGetRectReq);
-
-#if CYGMULTIWINDOW_DEBUG
-    ErrorF("ProcWindowsWMFrameGetRect %zu %d\n",
-           (sizeof(xWindowsWMFrameGetRectReq) >> 2), (int) client->req_len);
-#endif
-
-    REQUEST_SIZE_MATCH(xWindowsWMFrameGetRectReq);
-    rep.type = X_Reply;
-    rep.length = 0;
-    rep.sequenceNumber = client->sequence;
-
-    if (stuff->frame_rect != 0) {
-        ErrorF("ProcWindowsWMFrameGetRect - stuff->frame_rect != 0\n");
-        return BadValue;
-    }
-
-    /* Store the origin, height, and width in a rectangle structure */
-    SetRect(&rcNew, stuff->ix, stuff->iy,
-            stuff->ix + stuff->iw, stuff->iy + stuff->ih);
-
-#if CYGMULTIWINDOW_DEBUG
-    ErrorF("ProcWindowsWMFrameGetRect - %d %d %d %d\n",
-           stuff->ix, stuff->iy, stuff->ix + stuff->iw, stuff->iy + stuff->ih);
-#endif
-
-    /*
-     * Calculate the required size of the Windows window rectangle,
-     * given the size of the Windows window client area.
-     */
-    AdjustWindowRectEx(&rcNew, stuff->frame_style, FALSE,
-                       stuff->frame_style_ex);
-    rep.x = rcNew.left;
-    rep.y = rcNew.top;
-    rep.w = rcNew.right - rcNew.left;
-    rep.h = rcNew.bottom - rcNew.top;
-#if CYGMULTIWINDOW_DEBUG
-    ErrorF("ProcWindowsWMFrameGetRect - %d %d %d %d\n",
-           rep.x, rep.y, rep.w, rep.h);
-#endif
-
-    WriteToClient(client, sizeof(xWindowsWMFrameGetRectReply), &rep);
-    return Success;
-}
-
-static int
-ProcWindowsWMFrameDraw(ClientPtr client)
-{
-    REQUEST(xWindowsWMFrameDrawReq);
-    WindowPtr pWin;
-    win32RootlessWindowPtr pRLWinPriv;
-    RECT rcNew;
-    int nCmdShow, rc;
-    RegionRec newShape;
-
-    REQUEST_SIZE_MATCH(xWindowsWMFrameDrawReq);
-
-#if CYGMULTIWINDOW_DEBUG
-    ErrorF("ProcWindowsWMFrameDraw\n");
-#endif
-    rc = dixLookupWindow(&pWin, stuff->window, client, DixReadAccess);
-    if (rc != Success)
-        return rc;
-#if CYGMULTIWINDOW_DEBUG
-    ErrorF("ProcWindowsWMFrameDraw - Window found\n");
-#endif
-
-    pRLWinPriv = (win32RootlessWindowPtr) RootlessFrameForWindow(pWin, TRUE);
-    if (pRLWinPriv == 0)
-        return BadWindow;
-
-#if CYGMULTIWINDOW_DEBUG
-    ErrorF("ProcWindowsWMFrameDraw - HWND %p 0x%08x 0x%08x\n",
-           pRLWinPriv->hWnd, (int) stuff->frame_style,
-           (int) stuff->frame_style_ex);
-    ErrorF("ProcWindowsWMFrameDraw - %d %d %d %d\n",
-           stuff->ix, stuff->iy, stuff->iw, stuff->ih);
-#endif
-
-    /* Store the origin, height, and width in a rectangle structure */
-    SetRect(&rcNew, stuff->ix, stuff->iy,
-            stuff->ix + stuff->iw, stuff->iy + stuff->ih);
-
-    /*
-     * Calculate the required size of the Windows window rectangle,
-     * given the size of the Windows window client area.
-     */
-    AdjustWindowRectEx(&rcNew, stuff->frame_style, FALSE,
-                       stuff->frame_style_ex);
-
-    /* Set the window extended style flags */
-    if (!SetWindowLongPtr(pRLWinPriv->hWnd, GWL_EXSTYLE, stuff->frame_style_ex)) {
-        return BadValue;
-    }
-
-    /* Set the window standard style flags */
-    if (!SetWindowLongPtr(pRLWinPriv->hWnd, GWL_STYLE, stuff->frame_style)) {
-        return BadValue;
-    }
-
-    /* Flush the window style */
-    if (!SetWindowPos(pRLWinPriv->hWnd, NULL,
-                      rcNew.left, rcNew.top,
-                      rcNew.right - rcNew.left, rcNew.bottom - rcNew.top,
-                      SWP_NOZORDER | SWP_FRAMECHANGED | SWP_NOACTIVATE)) {
-        return BadValue;
-    }
-    if (!IsWindowVisible(pRLWinPriv->hWnd))
-        nCmdShow = SW_HIDE;
-    else
-        nCmdShow = SW_SHOWNA;
-
-    ShowWindow(pRLWinPriv->hWnd, nCmdShow);
-
-    if (wBoundingShape(pWin) != NULL) {
-        /* wBoundingShape is relative to *inner* origin of window.
-           Translate by borderWidth to get the outside-relative position. */
-
-        RegionNull(&newShape);
-        RegionCopy(&newShape, wBoundingShape(pWin));
-        RegionTranslate(&newShape, pWin->borderWidth, pWin->borderWidth);
-        winMWExtWMReshapeFrame(pRLWinPriv, &newShape);
-        RegionUninit(&newShape);
-    }
-#if CYGMULTIWINDOW_DEBUG
-    ErrorF("ProcWindowsWMFrameDraw - done\n");
-#endif
-
-    return Success;
-}
-
-static int
-ProcWindowsWMFrameSetTitle(ClientPtr client)
-{
-    unsigned int title_length, title_max;
-    char *title_bytes;
-
-    REQUEST(xWindowsWMFrameSetTitleReq);
-    WindowPtr pWin;
-    win32RootlessWindowPtr pRLWinPriv;
-    int rc;
-
-#if CYGMULTIWINDOW_DEBUG
-    ErrorF("ProcWindowsWMFrameSetTitle\n");
-#endif
-
-    REQUEST_AT_LEAST_SIZE(xWindowsWMFrameSetTitleReq);
-
-    rc = dixLookupWindow(&pWin, stuff->window, client, DixReadAccess);
-    if (rc != Success)
-        return rc;
-#if CYGMULTIWINDOW_DEBUG
-    ErrorF("ProcWindowsWMFrameSetTitle - Window found\n");
-#endif
-
-    title_length = stuff->title_length;
-    title_max = (stuff->length << 2) - sizeof(xWindowsWMFrameSetTitleReq);
-
-    if (title_max < title_length)
-        return BadValue;
-
-#if CYGMULTIWINDOW_DEBUG
-    ErrorF("ProcWindowsWMFrameSetTitle - length is valid\n");
-#endif
-
-    title_bytes = malloc(title_length + 1);
-    strncpy(title_bytes, (char *) &stuff[1], title_length);
-    title_bytes[title_length] = '\0';
-
-    pRLWinPriv = (win32RootlessWindowPtr) RootlessFrameForWindow(pWin, FALSE);
-
-    if (pRLWinPriv == 0) {
-        free(title_bytes);
-        return BadWindow;
-    }
-
-    /* Flush the window style */
-    SetWindowText(pRLWinPriv->hWnd, title_bytes);
-
-    free(title_bytes);
-
-#if CYGMULTIWINDOW_DEBUG
-    ErrorF("ProcWindowsWMFrameSetTitle - done\n");
-#endif
-
-    return Success;
-}
-
-/* dispatch */
-
-static int
-ProcWindowsWMDispatch(ClientPtr client)
-{
-    REQUEST(xReq);
-
-    switch (stuff->data) {
-    case X_WindowsWMQueryVersion:
-        return ProcWindowsWMQueryVersion(client);
-    }
-
-    if (!client->local)
-        return WMErrorBase + WindowsWMClientNotLocal;
-
-    switch (stuff->data) {
-    case X_WindowsWMSelectInput:
-        return ProcWindowsWMSelectInput(client);
-    case X_WindowsWMDisableUpdate:
-        return ProcWindowsWMDisableUpdate(client);
-    case X_WindowsWMReenableUpdate:
-        return ProcWindowsWMReenableUpdate(client);
-    case X_WindowsWMSetFrontProcess:
-        return ProcWindowsWMSetFrontProcess(client);
-    case X_WindowsWMFrameGetRect:
-        return ProcWindowsWMFrameGetRect(client);
-    case X_WindowsWMFrameDraw:
-        return ProcWindowsWMFrameDraw(client);
-    case X_WindowsWMFrameSetTitle:
-        return ProcWindowsWMFrameSetTitle(client);
-    default:
-        return BadRequest;
-    }
-}
-
-static void
-SNotifyEvent(xWindowsWMNotifyEvent * from, xWindowsWMNotifyEvent * to)
-{
-    to->type = from->type;
-    to->kind = from->kind;
-    cpswaps(from->sequenceNumber, to->sequenceNumber);
-    cpswapl(from->window, to->window);
-    cpswapl(from->time, to->time);
-    cpswapl(from->arg, to->arg);
-}
-
-static int
-SProcWindowsWMQueryVersion(ClientPtr client)
-{
-    REQUEST(xWindowsWMQueryVersionReq);
-    swaps(&stuff->length);
-    return ProcWindowsWMQueryVersion(client);
-}
-
-static int
-SProcWindowsWMDispatch(ClientPtr client)
-{
-    REQUEST(xReq);
-
-    /* It is bound to be non-local when there is byte swapping */
-    if (!client->local)
-        return WMErrorBase + WindowsWMClientNotLocal;
-
-    /* only local clients are allowed WM access */
-    switch (stuff->data) {
-    case X_WindowsWMQueryVersion:
-        return SProcWindowsWMQueryVersion(client);
-    default:
-        return BadRequest;
-    }
-}
-
-void
-winWindowsWMExtensionInit(void)
-{
-    ExtensionEntry *extEntry;
-
-    ClientType = CreateNewResourceType(WMFreeClient, "WMClient");
-    eventResourceType = CreateNewResourceType(WMFreeEvents, "WMEvent");
-    eventResource = FakeClientID(0);
-
-    if (ClientType && eventResourceType &&
-        (extEntry = AddExtension(WINDOWSWMNAME,
-                                 WindowsWMNumberEvents,
-                                 WindowsWMNumberErrors,
-                                 ProcWindowsWMDispatch,
-                                 SProcWindowsWMDispatch,
-                                 NULL, StandardMinorOpcode))) {
-        size_t i;
-
-        WMReqCode = (unsigned char) extEntry->base;
-        WMErrorBase = extEntry->errorBase;
-        WMEventBase = extEntry->eventBase;
-        for (i = 0; i < WindowsWMNumberEvents; i++)
-            EventSwapVector[WMEventBase + i] = (EventSwapPtr) SNotifyEvent;
-    }
-}
diff --git a/hw/xwin/winwndproc.c b/hw/xwin/winwndproc.c
index 02186b1..c795088 100644
--- a/hw/xwin/winwndproc.c
+++ b/hw/xwin/winwndproc.c
@@ -143,7 +143,7 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
     case WM_DISPLAYCHANGE:
         /*
            WM_DISPLAYCHANGE seems to be sent when the monitor layout or
-           any monitor's resolution or depth changes, but it's lParam and
+           any monitor's resolution or depth changes, but its lParam and
            wParam always indicate the resolution and bpp for the primary
            monitor (so ignore that as we could be on any monitor...)
          */
@@ -151,7 +151,7 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
         /* We cannot handle a display mode change during initialization */
         if (s_pScreenInfo == NULL)
             FatalError("winWindowProc - WM_DISPLAYCHANGE - The display "
-                       "mode changed while we were intializing.  This is "
+                       "mode changed while we were initializing.  This is "
                        "very bad and unexpected.  Exiting.\n");
 
         /*
@@ -220,14 +220,7 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
                use RandR to resize the X screen
              */
             if ((!s_pScreenInfo->fUserGaveHeightAndWidth) &&
-                (s_pScreenInfo->iResizeMode == resizeWithRandr) && (FALSE
-#ifdef XWIN_MULTIWINDOWEXTWM
-                                                                    ||
-                                                                    s_pScreenInfo->
-                                                                    fMWExtWM
-#endif
-                                                                    ||
-                                                                    s_pScreenInfo->
+                (s_pScreenInfo->iResizeMode == resizeWithRandr) && (s_pScreenInfo->
                                                                     fRootless
                                                                     ||
                                                                     s_pScreenInfo->
@@ -245,7 +238,6 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
                     struct GetMonitorInfoData data;
 
                     if (QueryMonitor(s_pScreenInfo->iMonitor, &data)) {
-                        if (data.bMonitorSpecifiedExists == TRUE) {
                             dwWidth = data.monitorWidth;
                             dwHeight = data.monitorHeight;
                             /*
@@ -257,7 +249,6 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
                             ErrorF("Monitor number %d no longer exists!\n",
                                    s_pScreenInfo->iMonitor);
                         }
-                    }
                 }
 
                 /*
@@ -315,9 +306,6 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
         /* Break if we do not allow resizing */
         if ((s_pScreenInfo->iResizeMode == resizeNotAllowed)
             || !s_pScreenInfo->fDecoration
-#ifdef XWIN_MULTIWINDOWEXTWM
-            || s_pScreenInfo->fMWExtWM
-#endif
             || s_pScreenInfo->fRootless
             || s_pScreenInfo->fMultiWindow
             || s_pScreenInfo->fFullScreen)
@@ -616,9 +604,6 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
         if (s_pScreenInfo == NULL
             || (s_pScreenInfo->iResizeMode != resizeWithScrollbars)
             || s_pScreenInfo->fFullScreen || !s_pScreenInfo->fDecoration
-#ifdef XWIN_MULTIWINDOWEXTWM
-            || s_pScreenInfo->fMWExtWM
-#endif
             || s_pScreenInfo->fRootless
             || s_pScreenInfo->fMultiWindow
             )
@@ -799,22 +784,14 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
     case WM_LBUTTONDOWN:
         if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput)
             break;
-        if (s_pScreenInfo->fRootless
-#ifdef XWIN_MULTIWINDOWEXTWM
-            || s_pScreenInfo->fMWExtWM
-#endif
-            )
+        if (s_pScreenInfo->fRootless)
             SetCapture(hwnd);
         return winMouseButtonsHandle(s_pScreen, ButtonPress, Button1, wParam);
 
     case WM_LBUTTONUP:
         if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput)
             break;
-        if (s_pScreenInfo->fRootless
-#ifdef XWIN_MULTIWINDOWEXTWM
-            || s_pScreenInfo->fMWExtWM
-#endif
-            )
+        if (s_pScreenInfo->fRootless)
             ReleaseCapture();
         return winMouseButtonsHandle(s_pScreen, ButtonRelease, Button1, wParam);
 
@@ -822,22 +799,14 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
     case WM_MBUTTONDOWN:
         if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput)
             break;
-        if (s_pScreenInfo->fRootless
-#ifdef XWIN_MULTIWINDOWEXTWM
-            || s_pScreenInfo->fMWExtWM
-#endif
-            )
+        if (s_pScreenInfo->fRootless)
             SetCapture(hwnd);
         return winMouseButtonsHandle(s_pScreen, ButtonPress, Button2, wParam);
 
     case WM_MBUTTONUP:
         if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput)
             break;
-        if (s_pScreenInfo->fRootless
-#ifdef XWIN_MULTIWINDOWEXTWM
-            || s_pScreenInfo->fMWExtWM
-#endif
-            )
+        if (s_pScreenInfo->fRootless)
             ReleaseCapture();
         return winMouseButtonsHandle(s_pScreen, ButtonRelease, Button2, wParam);
 
@@ -845,22 +814,14 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
     case WM_RBUTTONDOWN:
         if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput)
             break;
-        if (s_pScreenInfo->fRootless
-#ifdef XWIN_MULTIWINDOWEXTWM
-            || s_pScreenInfo->fMWExtWM
-#endif
-            )
+        if (s_pScreenInfo->fRootless)
             SetCapture(hwnd);
         return winMouseButtonsHandle(s_pScreen, ButtonPress, Button3, wParam);
 
     case WM_RBUTTONUP:
         if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput)
             break;
-        if (s_pScreenInfo->fRootless
-#ifdef XWIN_MULTIWINDOWEXTWM
-            || s_pScreenInfo->fMWExtWM
-#endif
-            )
+        if (s_pScreenInfo->fRootless)
             ReleaseCapture();
         return winMouseButtonsHandle(s_pScreen, ButtonRelease, Button3, wParam);
 
@@ -868,22 +829,14 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
     case WM_XBUTTONDOWN:
         if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput)
             break;
-        if (s_pScreenInfo->fRootless
-#ifdef XWIN_MULTIWINDOWEXTWM
-            || s_pScreenInfo->fMWExtWM
-#endif
-            )
+        if (s_pScreenInfo->fRootless)
             SetCapture(hwnd);
         return winMouseButtonsHandle(s_pScreen, ButtonPress, HIWORD(wParam) + 7,
                                      wParam);
     case WM_XBUTTONUP:
         if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput)
             break;
-        if (s_pScreenInfo->fRootless
-#ifdef XWIN_MULTIWINDOWEXTWM
-            || s_pScreenInfo->fMWExtWM
-#endif
-            )
+        if (s_pScreenInfo->fRootless)
             ReleaseCapture();
         return winMouseButtonsHandle(s_pScreen, ButtonRelease,
                                      HIWORD(wParam) + 7, wParam);
@@ -1160,20 +1113,9 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
             ShowCursor(TRUE);
         }
 
-        /* Make sure the clipboard chain is ok. */
-        winFixClipboardChain();
-
         /* Call engine specific screen activation/deactivation function */
         (*s_pScreenPriv->pwinActivateApp) (s_pScreen);
 
-#ifdef XWIN_MULTIWINDOWEXTWM
-        if (s_pScreenPriv->fActive) {
-            /* Restack all window unless using built-in wm. */
-            if (s_pScreenInfo->fMWExtWM)
-                winMWExtWMRestackWindows(s_pScreen);
-        }
-#endif
-
         return 0;
 
     case WM_COMMAND:
@@ -1228,7 +1170,7 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
         break;
 
     default:
-        if (message == s_uTaskbarRestart) {
+        if ((message == s_uTaskbarRestart) && !s_pScreenInfo->fNoTrayIcon)  {
             winInitNotifyIcon(s_pScreenPriv);
         }
         break;
diff --git a/include/Makefile.am b/include/Makefile.am
index 9c22ce1..25b3a90 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -23,6 +23,7 @@ sdk_HEADERS =		\
 	extension.h	\
 	extinit.h	\
 	extnsionst.h	\
+	fourcc.h	\
 	gc.h		\
 	gcstruct.h	\
 	globals.h	\
@@ -52,7 +53,6 @@ sdk_HEADERS =		\
 	scrnintstr.h	\
 	selection.h	\
 	servermd.h	\
-	site.h		\
 	validate.h	\
 	displaymode.h    \
 	window.h	\
@@ -81,6 +81,16 @@ EXTRA_DIST = 	\
         vidmodestr.h \
 	xorg-config.h.meson.in \
 	xorg-server.h.meson.in \
-	xwayland-config.h.meson.in \
 	xwin-config.h.meson.in \
-	xsha1.h
+	xsha1.h \
+	Xserver.d
+
+if XSERVER_DTRACE
+# Generate dtrace header file for C sources to include
+BUILT_SOURCES = Xserver-dtrace.h
+
+Xserver-dtrace.h: $(srcdir)/Xserver.d
+	$(AM_V_GEN)$(DTRACE) -C -h -o $@ -s $(srcdir)/Xserver.d
+endif
+
+CLEANFILES = Xserver-dtrace.h
diff --git a/include/Makefile.in b/include/Makefile.in
index 804886f..7793d94 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -101,8 +101,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(am__sdk_HEADERS_DIST) \
 	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = do-not-use-config.h xorg-server.h dix-config.h \
-	xorg-config.h xkb-config.h xwin-config.h xwayland-config.h \
-	version-config.h
+	xorg-config.h xkb-config.h xwin-config.h version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 AM_V_P = $(am__v_P_@AM_V@)
@@ -156,20 +155,19 @@ am__sdk_HEADERS_DIST = XIstubs.h Xprintf.h callback.h client.h \
 	closestr.h closure.h colormap.h colormapst.h hotplug.h \
 	cursor.h cursorstr.h dix.h dixaccess.h dixevents.h dixfont.h \
 	dixfontstr.h dixgrabs.h dixstruct.h events.h exevents.h \
-	extension.h extinit.h extnsionst.h gc.h gcstruct.h globals.h \
-	glx_extinit.h glxvndabi.h input.h inputstr.h list.h misc.h \
-	miscstruct.h opaque.h nonsdk_extinit.h optionstr.h os.h \
+	extension.h extinit.h extnsionst.h fourcc.h gc.h gcstruct.h \
+	globals.h glx_extinit.h glxvndabi.h input.h inputstr.h list.h \
+	misc.h miscstruct.h opaque.h nonsdk_extinit.h optionstr.h os.h \
 	pixmap.h pixmapstr.h privates.h property.h propertyst.h \
 	ptrveloc.h region.h regionstr.h registry.h resource.h rgb.h \
-	screenint.h scrnintstr.h selection.h servermd.h site.h \
-	validate.h displaymode.h window.h windowstr.h xkbfile.h \
-	xkbsrv.h xkbstr.h xkbrules.h xserver_poll.h \
-	xserver-properties.h
+	screenint.h scrnintstr.h selection.h servermd.h validate.h \
+	displaymode.h window.h windowstr.h xkbfile.h xkbsrv.h xkbstr.h \
+	xkbrules.h xserver_poll.h xserver-properties.h
 HEADERS = $(nodist_sdk_HEADERS) $(sdk_HEADERS)
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \
 	do-not-use-config.h.in xorg-server.h.in dix-config.h.in \
 	xorg-config.h.in xkb-config.h.in xwin-config.h.in \
-	xwayland-config.h.in version-config.h.in
+	version-config.h.in
 # Read a list of newline-separated strings from the standard input,
 # and print each of them once, without duplicates.  Input order is
 # *not* preserved.
@@ -186,13 +184,10 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/dix-config.h.in \
 	$(srcdir)/do-not-use-config.h.in $(srcdir)/version-config.h.in \
 	$(srcdir)/xkb-config.h.in $(srcdir)/xorg-config.h.in \
-	$(srcdir)/xorg-server.h.in $(srcdir)/xwayland-config.h.in \
-	$(srcdir)/xwin-config.h.in
+	$(srcdir)/xorg-server.h.in $(srcdir)/xwin-config.h.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
@@ -211,8 +206,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -226,6 +219,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -244,14 +239,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -268,8 +255,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -325,6 +314,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -377,7 +368,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -401,29 +391,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -461,8 +435,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -473,14 +445,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -577,6 +543,7 @@ top_srcdir = @top_srcdir@
 @XORG_TRUE@	extension.h	\
 @XORG_TRUE@	extinit.h	\
 @XORG_TRUE@	extnsionst.h	\
+@XORG_TRUE@	fourcc.h	\
 @XORG_TRUE@	gc.h		\
 @XORG_TRUE@	gcstruct.h	\
 @XORG_TRUE@	globals.h	\
@@ -606,7 +573,6 @@ top_srcdir = @top_srcdir@
 @XORG_TRUE@	scrnintstr.h	\
 @XORG_TRUE@	selection.h	\
 @XORG_TRUE@	servermd.h	\
-@XORG_TRUE@	site.h		\
 @XORG_TRUE@	validate.h	\
 @XORG_TRUE@	displaymode.h    \
 @XORG_TRUE@	window.h	\
@@ -632,11 +598,15 @@ EXTRA_DIST = \
         vidmodestr.h \
 	xorg-config.h.meson.in \
 	xorg-server.h.meson.in \
-	xwayland-config.h.meson.in \
 	xwin-config.h.meson.in \
-	xsha1.h
+	xsha1.h \
+	Xserver.d
 
-all: do-not-use-config.h xorg-server.h dix-config.h xorg-config.h xkb-config.h xwin-config.h xwayland-config.h version-config.h
+
+# Generate dtrace header file for C sources to include
+@XSERVER_DTRACE_TRUE@BUILT_SOURCES = Xserver-dtrace.h
+CLEANFILES = Xserver-dtrace.h
+all: $(BUILT_SOURCES) do-not-use-config.h xorg-server.h dix-config.h xorg-config.h xkb-config.h xwin-config.h version-config.h
 	$(MAKE) $(AM_MAKEFLAGS) all-am
 
 .SUFFIXES:
@@ -722,24 +692,16 @@ stamp-h6: $(srcdir)/xwin-config.h.in $(top_builddir)/config.status
 	@rm -f stamp-h6
 	cd $(top_builddir) && $(SHELL) ./config.status include/xwin-config.h
 
-xwayland-config.h: stamp-h7
+version-config.h: stamp-h7
 	@test -f $@ || rm -f stamp-h7
 	@test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h7
 
-stamp-h7: $(srcdir)/xwayland-config.h.in $(top_builddir)/config.status
+stamp-h7: $(srcdir)/version-config.h.in $(top_builddir)/config.status
 	@rm -f stamp-h7
-	cd $(top_builddir) && $(SHELL) ./config.status include/xwayland-config.h
-
-version-config.h: stamp-h8
-	@test -f $@ || rm -f stamp-h8
-	@test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h8
-
-stamp-h8: $(srcdir)/version-config.h.in $(top_builddir)/config.status
-	@rm -f stamp-h8
 	cd $(top_builddir) && $(SHELL) ./config.status include/version-config.h
 
 distclean-hdr:
-	-rm -f do-not-use-config.h stamp-h1 xorg-server.h stamp-h2 dix-config.h stamp-h3 xorg-config.h stamp-h4 xkb-config.h stamp-h5 xwin-config.h stamp-h6 xwayland-config.h stamp-h7 version-config.h stamp-h8
+	-rm -f do-not-use-config.h stamp-h1 xorg-server.h stamp-h2 dix-config.h stamp-h3 xorg-config.h stamp-h4 xkb-config.h stamp-h5 xwin-config.h stamp-h6 version-config.h stamp-h7
 
 mostlyclean-libtool:
 	-rm -f *.lo
@@ -840,7 +802,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
@@ -875,16 +836,19 @@ distdir-am: $(DISTFILES)
 	  fi; \
 	done
 check-am: all-am
-check: check-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
 all-am: Makefile $(HEADERS) do-not-use-config.h xorg-server.h \
 		dix-config.h xorg-config.h xkb-config.h xwin-config.h \
-		xwayland-config.h version-config.h
+		version-config.h
 installdirs:
 	for dir in "$(DESTDIR)$(sdkdir)" "$(DESTDIR)$(sdkdir)"; do \
 	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
 	done
-install: install-am
-install-exec: install-exec-am
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-exec-am
 install-data: install-data-am
 uninstall: uninstall-am
 
@@ -905,6 +869,7 @@ install-strip:
 mostlyclean-generic:
 
 clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
 
 distclean-generic:
 	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
@@ -913,6 +878,7 @@ distclean-generic:
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
 	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
 clean: clean-am
 
 clean-am: clean-generic clean-libtool mostlyclean-am
@@ -979,7 +945,7 @@ ps-am:
 
 uninstall-am: uninstall-nodist_sdkHEADERS uninstall-sdkHEADERS
 
-.MAKE: all install-am install-strip
+.MAKE: all check install install-am install-exec install-strip
 
 .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
 	clean-libtool cscopelist-am ctags ctags-am distclean \
@@ -998,6 +964,9 @@ uninstall-am: uninstall-nodist_sdkHEADERS uninstall-sdkHEADERS
 .PRECIOUS: Makefile
 
 
+@XSERVER_DTRACE_TRUE@Xserver-dtrace.h: $(srcdir)/Xserver.d
+@XSERVER_DTRACE_TRUE@	$(AM_V_GEN)$(DTRACE) -C -h -o $@ -s $(srcdir)/Xserver.d
+
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/dix/Xserver.d b/include/Xserver.d
similarity index 100%
rename from dix/Xserver.d
rename to include/Xserver.d
diff --git a/include/dix-config.h.in b/include/dix-config.h.in
index f8fc670..382d706 100644
--- a/include/dix-config.h.in
+++ b/include/dix-config.h.in
@@ -9,12 +9,6 @@
 /* Builder address */
 #undef BUILDERADDR
 
-/* Operating System Name */
-#undef OSNAME
-
-/* Operating System Vendor */
-#undef OSVENDOR
-
 /* Builder string */
 #undef BUILDERSTRING
 
@@ -515,6 +509,12 @@
 /* Have epoll_create1() */
 #undef HAVE_EPOLL_CREATE1
 
+/* Have <sys/sysmacros.h> header */
+#undef HAVE_SYS_SYSMACROS_H
+
+/* Have sigprocmask */
+#undef HAVE_SIGPROCMASK
+
 /* Have isastream */
 #undef HAVE_ISASTREAM
 
diff --git a/include/dix.h b/include/dix.h
index b6e2bcf..0dcd09b 100644
--- a/include/dix.h
+++ b/include/dix.h
@@ -61,60 +61,76 @@ SOFTWARE.
 #define LATER 1
 
 #define NullClient ((ClientPtr) 0)
-#define REQUEST(type) \
-	type *stuff = (type *)client->requestBuffer
+
+#define REQUEST(type)                                                   \
+    type * stuff = (type *)client->requestBuffer;
 
 #define ARRAY_SIZE(a)  (sizeof((a)) / sizeof((a)[0]))
 
-#define REQUEST_SIZE_MATCH(req)\
-    if ((sizeof(req) >> 2) != client->req_len)\
-         return(BadLength)
-
-#define REQUEST_AT_LEAST_SIZE(req) \
-    if ((sizeof(req) >> 2) > client->req_len )\
-         return(BadLength)
-
-#define REQUEST_AT_LEAST_EXTRA_SIZE(req, extra)  \
-    if (((sizeof(req) + ((uint64_t) extra)) >> 2) > client->req_len ) \
-         return(BadLength)
-
-#define REQUEST_FIXED_SIZE(req, n)\
-    if (((sizeof(req) >> 2) > client->req_len) || \
-        (((n) >> 2) >= client->req_len) ||                              \
-        ((((uint64_t) sizeof(req) + (n) + 3) >> 2) != (uint64_t) client->req_len))  \
-         return(BadLength)
-
-#define LEGAL_NEW_RESOURCE(id,client)\
-    if (!LegalNewID(id,client)) \
-    {\
-	client->errorValue = id;\
-        return BadIDChoice;\
-    }
-
-#define VALIDATE_DRAWABLE_AND_GC(drawID, pDraw, mode)\
-    {\
-	int tmprc = dixLookupDrawable(&(pDraw), drawID, client, M_ANY, mode);\
-	if (tmprc != Success)\
-	    return tmprc;\
-	tmprc = dixLookupGC(&(pGC), stuff->gc, client, DixUseAccess);\
-	if (tmprc != Success)\
-	    return tmprc;\
-	if ((pGC->depth != pDraw->depth) || (pGC->pScreen != pDraw->pScreen))\
-	    return BadMatch;\
-    }\
-    if (pGC->serialNumber != pDraw->serialNumber)\
-	ValidateGC(pDraw, pGC);
-
-#define WriteReplyToClient(pClient, size, pReply) { \
-   if ((pClient)->swapped) \
-      (*ReplySwapVector[((xReq *)(pClient)->requestBuffer)->reqType]) \
-           (pClient, (int)(size), pReply); \
-   else WriteToClient(pClient, (int)(size), (pReply)); }
-
-#define WriteSwappedDataToClient(pClient, size, pbuf) \
-   if ((pClient)->swapped) \
-      (*(pClient)->pSwapReplyFunc)(pClient, (int)(size), pbuf); \
-   else WriteToClient(pClient, (int)(size), (pbuf));
+#define REQUEST_SIZE_MATCH(req)                                         \
+    do {                                                                \
+        if ((sizeof(req) >> 2) != client->req_len)                      \
+            return(BadLength);                                          \
+    } while (0)
+
+#define REQUEST_AT_LEAST_SIZE(req)                                      \
+    do {                                                                \
+        if ((sizeof(req) >> 2) > client->req_len)                       \
+            return(BadLength);                                          \
+    } while (0)
+
+#define REQUEST_AT_LEAST_EXTRA_SIZE(req, extra)                         \
+    do {                                                                \
+        if (((sizeof(req) + ((uint64_t) (extra))) >> 2) > client->req_len) \
+            return(BadLength);                                          \
+    } while (0)
+
+#define REQUEST_FIXED_SIZE(req, n)                                      \
+    do {                                                                \
+        if ((((sizeof(req)) >> 2) > client->req_len) ||            \
+            (((n) >> 2) >= client->req_len) ||                         \
+            ((((uint64_t) sizeof(req) + (n) + 3) >> 2) != (uint64_t) client->req_len)) \
+            return(BadLength);                                          \
+    } while (0)
+
+#define LEGAL_NEW_RESOURCE(id,client)           \
+    do {                                        \
+        if (!LegalNewID((id), (client))) {      \
+            (client)->errorValue = (id);        \
+            return BadIDChoice;                 \
+        }                                       \
+    } while (0)
+
+#define VALIDATE_DRAWABLE_AND_GC(drawID, pDraw, mode)                   \
+    do {                                                                \
+        int tmprc = dixLookupDrawable(&(pDraw), drawID, client, M_ANY, mode); \
+        if (tmprc != Success)                                           \
+            return tmprc;                                               \
+        tmprc = dixLookupGC(&(pGC), stuff->gc, client, DixUseAccess);   \
+        if (tmprc != Success)                                           \
+            return tmprc;                                               \
+        if ((pGC->depth != pDraw->depth) || (pGC->pScreen != pDraw->pScreen)) \
+            return BadMatch;                                            \
+        if (pGC->serialNumber != pDraw->serialNumber)                   \
+            ValidateGC(pDraw, pGC);                                     \
+    } while (0)
+
+#define WriteReplyToClient(pClient, size, pReply)                       \
+    do {                                                                \
+        if ((pClient)->swapped)                                         \
+            (*ReplySwapVector[((xReq *)(pClient)->requestBuffer)->reqType]) \
+                (pClient, (int)(size), pReply);                         \
+        else                                                            \
+            WriteToClient(pClient, (int)(size), (pReply));              \
+    } while (0)
+
+#define WriteSwappedDataToClient(pClient, size, pbuf)                   \
+    do {                                                                \
+        if ((pClient)->swapped)                                         \
+            (*(pClient)->pSwapReplyFunc)(pClient, (int)(size), pbuf);   \
+        else                                                            \
+            WriteToClient(pClient, (int)(size), (pbuf));                \
+    } while (0)
 
 typedef struct _TimeStamp *TimeStampPtr;
 
@@ -130,6 +146,8 @@ extern _X_EXPORT ClientPtr clients[MAXCLIENTS];
 extern _X_EXPORT ClientPtr serverClient;
 extern _X_EXPORT int currentMaxClients;
 extern _X_EXPORT char dispatchExceptionAtReset;
+extern _X_EXPORT int terminateDelay;
+extern _X_EXPORT Bool touchEmulatePointer;
 
 typedef int HWEventQueueType;
 typedef HWEventQueueType *HWEventQueuePtr;
@@ -148,6 +166,7 @@ typedef struct _TimeStamp {
 } TimeStamp;
 
 /* dispatch.c */
+extern _X_EXPORT ClientPtr GetCurrentClient(void);
 
 extern _X_EXPORT void SetInputCheck(HWEventQueuePtr /*c0 */ ,
                                     HWEventQueuePtr /*c1 */ );
@@ -263,13 +282,10 @@ extern _X_EXPORT Bool ClientSleep(ClientPtr client,
 extern _X_EXPORT Bool ClientSignal(ClientPtr /*client */ );
 #endif                          /* ___CLIENTSIGNAL_DEFINED___ */
 
-#ifndef ___CLIENTSIGNALALL_DEFINED___
-#define ___CLIENTSIGNALALL_DEFINED___
 #define CLIENT_SIGNAL_ANY ((void *)-1)
 extern _X_EXPORT int ClientSignalAll(ClientPtr /*client*/,
                                      ClientSleepProcPtr /*function*/,
                                      void * /*closure*/);
-#endif                          /* ___CLIENTSIGNALALL_DEFINED___ */
 
 extern _X_EXPORT void ClientWakeup(ClientPtr /*client */ );
 
@@ -306,9 +322,6 @@ InitAtoms(void);
 extern _X_EXPORT void
 SetVendorRelease(int release);
 
-extern _X_EXPORT void
-SetVendorString(const char *string);
-
 int
 dix_main(int argc, char *argv[], char *envp[]);
 
@@ -426,6 +439,10 @@ DeliverTouchEvents(DeviceIntPtr /* dev */ ,
                    InternalEvent * /* ev */ ,
                    XID /* resource */ );
 
+extern Bool
+DeliverGestureEventToOwner(DeviceIntPtr dev, GestureInfoPtr gi,
+                           InternalEvent *ev);
+
 extern void
 InitializeSprite(DeviceIntPtr /* pDev */ ,
                  WindowPtr /* pWin */ );
@@ -441,7 +458,7 @@ WindowHasNewCursor(WindowPtr /* pWin */ );
 
 extern Bool
 CheckDeviceGrabs(DeviceIntPtr /* device */ ,
-                 DeviceEvent * /* event */ ,
+                 InternalEvent * /* event */ ,
                  WindowPtr /* ancestor */ );
 
 extern void
@@ -454,6 +471,10 @@ DeliverGrabbedEvent(InternalEvent * /* event */ ,
                     DeviceIntPtr /* thisDev */ ,
                     Bool /* deactivateGrab */ );
 
+extern void
+FreezeThisEventIfNeededForSyncGrab(DeviceIntPtr thisDev,
+                                   InternalEvent *event);
+
 extern void
 FixKeyState(DeviceEvent * /* event */ ,
             DeviceIntPtr /* keybd */ );
@@ -611,6 +632,13 @@ extern Bool
 IsPointerEvent(InternalEvent *event);
 extern Bool
 IsTouchEvent(InternalEvent *event);
+Bool
+IsGestureEvent(InternalEvent *event);
+Bool
+IsGestureBeginEvent(InternalEvent *event);
+Bool
+IsGestureEndEvent(InternalEvent *event);
+
 extern _X_EXPORT Bool
 IsMaster(DeviceIntPtr dev);
 extern _X_EXPORT Bool
diff --git a/include/dixfont.h b/include/dixfont.h
index 3a38d10..65b5d20 100644
--- a/include/dixfont.h
+++ b/include/dixfont.h
@@ -28,7 +28,6 @@ SOFTWARE.
 #include <X11/fonts/font.h>
 #include "closure.h"
 #include <X11/fonts/fontstruct.h>
-#include <X11/fonts/fontproto.h>
 
 #define NullDIXFontProp ((DIXFontPropPtr)0)
 
diff --git a/include/dixgrabs.h b/include/dixgrabs.h
index 3bd8013..dc1068f 100644
--- a/include/dixgrabs.h
+++ b/include/dixgrabs.h
@@ -61,4 +61,5 @@ extern _X_EXPORT Bool DeletePassiveGrabFromList(GrabPtr /* pMinuendGrab */ );
 
 extern Bool GrabIsPointerGrab(GrabPtr grab);
 extern Bool GrabIsKeyboardGrab(GrabPtr grab);
+extern Bool GrabIsGestureGrab(GrabPtr grab);
 #endif                          /* DIXGRABS_H */
diff --git a/include/do-not-use-config.h.in b/include/do-not-use-config.h.in
index f421c61..9a48681 100644
--- a/include/do-not-use-config.h.in
+++ b/include/do-not-use-config.h.in
@@ -236,9 +236,6 @@
 /* Define to 1 if you have the `m' library (-lm). */
 #undef HAVE_LIBM
 
-/* Define to 1 if libudev is available. */
-#undef HAVE_LIBUDEV
-
 /* Have libunwind support */
 #undef HAVE_LIBUNWIND
 
@@ -257,8 +254,8 @@
 /* Define to 1 if you have the `memfd_create' function. */
 #undef HAVE_MEMFD_CREATE
 
-/* Define to 1 if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
+/* Define to 1 if you have the <minix/config.h> header file. */
+#undef HAVE_MINIX_CONFIG_H
 
 /* Define to 1 if you have the `mkostemp' function. */
 #undef HAVE_MKOSTEMP
@@ -323,12 +320,18 @@
 /* Have sigaction function */
 #undef HAVE_SIGACTION
 
+/* Define to 1 if you have the `sigprocmask' function. */
+#undef HAVE_SIGPROCMASK
+
 /* Define to 1 if the system has the type `socklen_t'. */
 #undef HAVE_SOCKLEN_T
 
 /* Define to 1 if you have the <stdint.h> header file. */
 #undef HAVE_STDINT_H
 
+/* Define to 1 if you have the <stdio.h> header file. */
+#undef HAVE_STDIO_H
+
 /* Define to 1 if you have the <stdlib.h> header file. */
 #undef HAVE_STDLIB_H
 
@@ -428,6 +431,9 @@
 /* Define to 1 if you have the `walkcontext' function. */
 #undef HAVE_WALKCONTEXT
 
+/* Define to 1 if you have the <wchar.h> header file. */
+#undef HAVE_WCHAR_H
+
 /* Have xshmfence support */
 #undef HAVE_XSHMFENCE
 
@@ -470,12 +476,6 @@
 /* Define to 1 if no local socket credentials interface exists */
 #undef NO_LOCAL_CLIENT_CRED
 
-/* Operating System Name */
-#undef OSNAME
-
-/* Operating System Vendor */
-#undef OSVENDOR
-
 /* Name of package */
 #undef PACKAGE
 
@@ -561,7 +561,9 @@
 /* Build a standalone xpbproxy */
 #undef STANDALONE_XPBPROXY
 
-/* Define to 1 if you have the ANSI C header files. */
+/* Define to 1 if all of the C90 standard headers exist (not just the ones
+   required in a freestanding environment). This macro is provided for
+   backward compatibility; new code need not use it. */
 #undef STDC_HEADERS
 
 /* Where to install the Xorg binary and Xorg.wrap */
@@ -601,21 +603,87 @@
 #ifndef _ALL_SOURCE
 # undef _ALL_SOURCE
 #endif
+/* Enable general extensions on macOS.  */
+#ifndef _DARWIN_C_SOURCE
+# undef _DARWIN_C_SOURCE
+#endif
+/* Enable general extensions on Solaris.  */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
 /* Enable GNU extensions on systems that have them.  */
 #ifndef _GNU_SOURCE
 # undef _GNU_SOURCE
 #endif
-/* Enable threading extensions on Solaris.  */
+/* Enable X/Open compliant socket functions that do not require linking
+   with -lxnet on HP-UX 11.11.  */
+#ifndef _HPUX_ALT_XOPEN_SOCKET_API
+# undef _HPUX_ALT_XOPEN_SOCKET_API
+#endif
+/* Identify the host operating system as Minix.
+   This macro does not affect the system headers' behavior.
+   A future release of Autoconf may stop defining this macro.  */
+#ifndef _MINIX
+# undef _MINIX
+#endif
+/* Enable general extensions on NetBSD.
+   Enable NetBSD compatibility extensions on Minix.  */
+#ifndef _NETBSD_SOURCE
+# undef _NETBSD_SOURCE
+#endif
+/* Enable OpenBSD compatibility extensions on NetBSD.
+   Oddly enough, this does nothing on OpenBSD.  */
+#ifndef _OPENBSD_SOURCE
+# undef _OPENBSD_SOURCE
+#endif
+/* Define to 1 if needed for POSIX-compatible behavior.  */
+#ifndef _POSIX_SOURCE
+# undef _POSIX_SOURCE
+#endif
+/* Define to 2 if needed for POSIX-compatible behavior.  */
+#ifndef _POSIX_1_SOURCE
+# undef _POSIX_1_SOURCE
+#endif
+/* Enable POSIX-compatible threading on Solaris.  */
 #ifndef _POSIX_PTHREAD_SEMANTICS
 # undef _POSIX_PTHREAD_SEMANTICS
 #endif
+/* Enable extensions specified by ISO/IEC TS 18661-5:2014.  */
+#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
+# undef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-1:2014.  */
+#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
+# undef __STDC_WANT_IEC_60559_BFP_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-2:2015.  */
+#ifndef __STDC_WANT_IEC_60559_DFP_EXT__
+# undef __STDC_WANT_IEC_60559_DFP_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-4:2015.  */
+#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
+# undef __STDC_WANT_IEC_60559_FUNCS_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-3:2015.  */
+#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__
+# undef __STDC_WANT_IEC_60559_TYPES_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TR 24731-2:2010.  */
+#ifndef __STDC_WANT_LIB_EXT2__
+# undef __STDC_WANT_LIB_EXT2__
+#endif
+/* Enable extensions specified by ISO/IEC 24747:2009.  */
+#ifndef __STDC_WANT_MATH_SPEC_FUNCS__
+# undef __STDC_WANT_MATH_SPEC_FUNCS__
+#endif
 /* Enable extensions on HP NonStop.  */
 #ifndef _TANDEM_SOURCE
 # undef _TANDEM_SOURCE
 #endif
-/* Enable general extensions on Solaris.  */
-#ifndef __EXTENSIONS__
-# undef __EXTENSIONS__
+/* Enable X/Open extensions.  Define to 500 only if necessary
+   to make mbstate_t available.  */
+#ifndef _XOPEN_SOURCE
+# undef _XOPEN_SOURCE
 #endif
 
 
@@ -682,9 +750,6 @@
 /* Build DRI extension */
 #undef XF86DRI
 
-/* Support APM/ACPI power management in the server */
-#undef XF86PM
-
 /* Support XFree86 Video Mode extension */
 #undef XF86VIDMODE
 
@@ -778,12 +843,6 @@
 /* Short vendor name */
 #undef XVENDORNAMESHORT
 
-/* Build xwayland with eglstream support */
-#undef XWL_HAS_EGLSTREAM
-
-/* Build xwayland with glamor support */
-#undef XWL_HAS_GLAMOR
-
 /* byte order */
 #undef X_BYTE_ORDER
 
@@ -797,11 +856,6 @@
    `char[]'. */
 #undef YYTEXT_POINTER
 
-/* Enable large inode numbers on Mac OS X 10.5.  */
-#ifndef _DARWIN_USE_64_BIT_INODE
-# define _DARWIN_USE_64_BIT_INODE 1
-#endif
-
 /* Number of bits in a file offset, on hosts where this is settable. */
 #undef _FILE_OFFSET_BITS
 
@@ -811,16 +865,6 @@
 /* Define for large files, on AIX-style hosts. */
 #undef _LARGE_FILES
 
-/* Define to 1 if on MINIX. */
-#undef _MINIX
-
-/* Define to 2 if the system does not provide POSIX.1 features except with
-   this defined. */
-#undef _POSIX_1_SOURCE
-
-/* Define to 1 if you need to in order for `stat' and other things to work. */
-#undef _POSIX_SOURCE
-
 /* Defined if needed to expose struct msghdr.msg_control */
 #undef _XOPEN_SOURCE
 
@@ -836,7 +880,7 @@
 /* Define to empty if `const' does not conform to ANSI C. */
 #undef const
 
-/* Define to `int' if <sys/types.h> does not define. */
+/* Define as a signed integer type capable of holding a process identifier. */
 #undef pid_t
 
 /* Define to __typeof__ if your compiler spells it that way. */
diff --git a/include/eventconvert.h b/include/eventconvert.h
index 01172f0..cf425f7 100644
--- a/include/eventconvert.h
+++ b/include/eventconvert.h
@@ -36,4 +36,7 @@ _X_INTERNAL int GetCoreType(enum EventType type);
 _X_INTERNAL int GetXIType(enum EventType type);
 _X_INTERNAL int GetXI2Type(enum EventType type);
 
+_X_INTERNAL enum EventType GestureTypeToBegin(enum EventType type);
+_X_INTERNAL enum EventType GestureTypeToEnd(enum EventType type);
+
 #endif                          /* _EVENTCONVERT_H_ */
diff --git a/include/events.h b/include/events.h
index 0cbd8c8..544dfad 100644
--- a/include/events.h
+++ b/include/events.h
@@ -28,6 +28,7 @@ typedef struct _DeviceEvent DeviceEvent;
 typedef struct _DeviceChangedEvent DeviceChangedEvent;
 typedef struct _TouchOwnershipEvent TouchOwnershipEvent;
 typedef struct _BarrierEvent BarrierEvent;
+typedef struct _GestureEvent GestureEvent;
 
 #ifdef XFreeXDGA
 typedef struct _DGAEvent DGAEvent;
diff --git a/include/eventstr.h b/include/eventstr.h
index bf3b95f..93308f9 100644
--- a/include/eventstr.h
+++ b/include/eventstr.h
@@ -75,6 +75,12 @@ enum EventType {
     ET_XQuartz,
     ET_BarrierHit,
     ET_BarrierLeave,
+    ET_GesturePinchBegin,
+    ET_GesturePinchUpdate,
+    ET_GesturePinchEnd,
+    ET_GestureSwipeBegin,
+    ET_GestureSwipeUpdate,
+    ET_GestureSwipeEnd,
     ET_Internal = 0xFF          /* First byte */
 };
 
@@ -260,6 +266,38 @@ struct _BarrierEvent {
     uint32_t flags;
 };
 
+struct _GestureEvent {
+    unsigned char header; /**< Always ET_Internal */
+    enum EventType type;  /**< One of ET_Gesture{Pinch,Swipe}{Begin,Update,End} */
+    int length;           /**< Length in bytes */
+    Time time;            /**< Time in ms */
+    int deviceid;         /**< Device to post this event for */
+    int sourceid;         /**< The physical source device */
+    uint32_t num_touches; /**< The number of touches in this gesture */
+    double root_x;        /**< Pos relative to root window */
+    double root_y;        /**< Pos relative to root window */
+    double delta_x;
+    double delta_y;
+    double delta_unaccel_x;
+    double delta_unaccel_y;
+    double scale;         /**< Only on ET_GesturePinch{Begin,Update} */
+    double delta_angle;   /**< Only on ET_GesturePinch{Begin,Update} */
+    struct {
+        uint32_t base;    /**< XKB base modifiers */
+        uint32_t latched; /**< XKB latched modifiers */
+        uint32_t locked;  /**< XKB locked modifiers */
+        uint32_t effective;/**< XKB effective modifiers */
+    } mods;
+    struct {
+        uint8_t base;    /**< XKB base group */
+        uint8_t latched; /**< XKB latched group */
+        uint8_t locked;  /**< XKB locked group */
+        uint8_t effective;/**< XKB effective group */
+    } group;
+    Window root;      /**< Root window of the event */
+    uint32_t flags;   /**< Flags to be copied into the generated event */
+};
+
 #ifdef XQUARTZ
 #define XQUARTZ_EVENT_MAXARGS 5
 struct _XQuartzEvent {
@@ -294,6 +332,7 @@ union _InternalEvent {
 #ifdef XQUARTZ
     XQuartzEvent xquartz_event;
 #endif
+    GestureEvent gesture_event;
 };
 
 #endif
diff --git a/include/exevents.h b/include/exevents.h
index 321fc42..c900c7b 100644
--- a/include/exevents.h
+++ b/include/exevents.h
@@ -192,11 +192,12 @@ extern int
             GrabMask * /* eventMask */ );
 
 extern int
- GrabTouch(ClientPtr /* client */ ,
-           DeviceIntPtr /* dev */ ,
-           DeviceIntPtr /* mod_dev */ ,
-           GrabParameters * /* param */ ,
-           GrabMask * /* eventMask */ );
+ GrabTouchOrGesture(ClientPtr /* client */ ,
+                    DeviceIntPtr /* dev */ ,
+                    DeviceIntPtr /* mod_dev */ ,
+                    int /* type */ ,
+                    GrabParameters * /* param */ ,
+                    GrabMask * /* eventMask */ );
 
 extern int
  SelectForWindow(DeviceIntPtr /* dev */ ,
diff --git a/hw/xfree86/common/fourcc.h b/include/fourcc.h
similarity index 90%
rename from hw/xfree86/common/fourcc.h
rename to include/fourcc.h
index e6126b7..a19e686 100644
--- a/hw/xfree86/common/fourcc.h
+++ b/include/fourcc.h
@@ -156,4 +156,24 @@
         XvTopToBottom \
    }
 
+#define FOURCC_NV12 0x3231564e
+#define XVIMAGE_NV12 \
+   { \
+        FOURCC_NV12, \
+        XvYUV, \
+        LSBFirst, \
+        {'N','V','1','2', \
+          0x00,0x00,0x00,0x10,0x80,0x00,0x00,0xAA,0x00,0x38,0x9B,0x71}, \
+        12, \
+        XvPlanar, \
+        2, \
+        0, 0, 0, 0, \
+        8, 8, 8, \
+        1, 2, 2, \
+        1, 2, 2, \
+        {'Y','U','V', \
+          0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, \
+        XvTopToBottom \
+   }
+
 #endif                          /* _XF86_FOURCC_H_ */
diff --git a/include/glxvndabi.h b/include/glxvndabi.h
index 71f36e7..e210755 100644
--- a/include/glxvndabi.h
+++ b/include/glxvndabi.h
@@ -223,7 +223,7 @@ typedef struct GlxServerExportsRec {
      * up the old context private pointer.
      *
      * However, this function is not safe to use from a ClientStateCallback,
-     * because GLVND may have alraedy deleted the tag by that point.
+     * because GLVND may have already deleted the tag by that point.
      */
     void * (* getContextTagPrivate)(ClientPtr client, GLXContextTag tag);
 
diff --git a/include/input.h b/include/input.h
index 6c9e45d..cdb5d5a 100644
--- a/include/input.h
+++ b/include/input.h
@@ -59,6 +59,28 @@ SOFTWARE.
 #include "os.h"
 #include <X11/extensions/XI2.h>
 
+#define DEFAULT_KEYBOARD_CLICK 	0
+#define DEFAULT_BELL		50
+#define DEFAULT_BELL_PITCH	400
+#define DEFAULT_BELL_DURATION	100
+#define DEFAULT_AUTOREPEAT	TRUE
+#define DEFAULT_AUTOREPEATS	{\
+        0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,\
+        0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,\
+        0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\
+        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
+
+#define DEFAULT_LEDS		0x0     /* all off */
+#define DEFAULT_LEDS_MASK	0xffffffff      /* 32 */
+#define DEFAULT_INT_RESOLUTION		1000
+#define DEFAULT_INT_MIN_VALUE		0
+#define DEFAULT_INT_MAX_VALUE		100
+#define DEFAULT_INT_DISPLAYED		0
+
+#define DEFAULT_PTR_NUMERATOR	2
+#define DEFAULT_PTR_DENOMINATOR	1
+#define DEFAULT_PTR_THRESHOLD	4
+
 #define DEVICE_INIT	0
 #define DEVICE_ON	1
 #define DEVICE_OFF	2
@@ -72,6 +94,7 @@ SOFTWARE.
 #define POINTER_NORAW		(1 << 5)        /* Don't generate RawEvents */
 #define POINTER_EMULATED	(1 << 6)        /* Event was emulated from another event */
 #define POINTER_DESKTOP		(1 << 7)        /* Data in desktop coordinates */
+#define POINTER_RAWONLY         (1 << 8)        /* Only generate RawEvents */
 
 /* GetTouchEvent flags */
 #define TOUCH_ACCEPT            (1 << 0)
@@ -82,6 +105,9 @@ SOFTWARE.
 #define TOUCH_POINTER_EMULATED  (1 << 5)        /* touch event may be pointer emulated */
 #define TOUCH_END               (1 << 6)        /* really end this touch now */
 
+/* GetGestureEvent flags */
+#define GESTURE_CANCELLED       (1 << 0)
+
 /*int constants for pointer acceleration schemes*/
 #define PtrAccelNoOp            0
 #define PtrAccelPredictable     1
@@ -127,7 +153,9 @@ typedef struct _ValuatorClassRec *ValuatorClassPtr;
 typedef struct _ClassesRec *ClassesPtr;
 typedef struct _SpriteRec *SpritePtr;
 typedef struct _TouchClassRec *TouchClassPtr;
+typedef struct _GestureClassRec *GestureClassPtr;
 typedef struct _TouchPointInfo *TouchPointInfoPtr;
+typedef struct _GestureInfo *GestureInfoPtr;
 typedef struct _DDXTouchPointInfo *DDXTouchPointInfoPtr;
 typedef union _GrabMask GrabMask;
 
@@ -314,6 +342,9 @@ extern _X_EXPORT Bool InitTouchClassDeviceStruct(DeviceIntPtr /*device */ ,
                                                  unsigned int /*mode */ ,
                                                  unsigned int /*numAxes */ );
 
+extern _X_EXPORT Bool InitGestureClassDeviceStruct(DeviceIntPtr device,
+                                                   unsigned int max_touches);
+
 typedef void (*BellProcPtr) (int percent,
                              DeviceIntPtr device,
                              void *ctrl,
@@ -415,9 +446,6 @@ extern void ProcessPointerEvent(InternalEvent * /* ev */ ,
 extern void ProcessKeyboardEvent(InternalEvent * /*ev */ ,
                                  DeviceIntPtr /*keybd */ );
 
-extern Bool LegalModifier(unsigned int /*key */ ,
-                          DeviceIntPtr /*pDev */ );
-
 extern _X_EXPORT void ProcessInputEvents(void);
 
 extern _X_EXPORT void InitInput(int /*argc */ ,
@@ -468,6 +496,33 @@ void QueueTouchEvents(DeviceIntPtr device,
                       uint32_t ddx_touchid,
                       int flags, const ValuatorMask *mask);
 
+void InitGestureEvent(InternalEvent *ievent, DeviceIntPtr dev, CARD32 ms,
+                      int type, uint16_t num_touches, uint32_t flags,
+                      double delta_x, double delta_y,
+                      double delta_unaccel_x, double delta_unaccel_y,
+                      double scale, double delta_angle);
+
+int GetGestureEvents(InternalEvent *events, DeviceIntPtr dev,
+                     uint16_t type, uint16_t num_touches, uint32_t flags,
+                     double delta_x, double delta_y,
+                     double delta_unaccel_x,
+                     double delta_unaccel_y,
+                     double scale, double delta_angle);
+
+
+void QueueGesturePinchEvents(DeviceIntPtr dev, uint16_t type,
+                             uint16_t num_touches, uint32_t flags,
+                             double delta_x, double delta_y,
+                             double delta_unaccel_x,
+                             double delta_unaccel_y,
+                             double scale, double delta_angle);
+
+void QueueGestureSwipeEvents(DeviceIntPtr dev, uint16_t type,
+                             uint16_t num_touches, uint32_t flags,
+                             double delta_x, double delta_y,
+                             double delta_unaccel_x,
+                             double delta_unaccel_y);
+
 extern int GetTouchOwnershipEvents(InternalEvent *events,
                                    DeviceIntPtr pDev,
                                    TouchPointInfoPtr ti,
@@ -530,25 +585,33 @@ extern int AllocXTestDevice(ClientPtr client, const char *name,
 extern BOOL IsXTestDevice(DeviceIntPtr dev, DeviceIntPtr master);
 extern DeviceIntPtr GetXTestDevice(DeviceIntPtr master);
 extern void SendDevicePresenceEvent(int deviceid, int type);
+extern void DeliverDeviceClassesChangedEvent(int sourceid, Time time);
 extern _X_EXPORT InputAttributes *DuplicateInputAttributes(InputAttributes *
                                                            attrs);
 extern _X_EXPORT void FreeInputAttributes(InputAttributes * attrs);
 
 enum TouchListenerState {
-    LISTENER_AWAITING_BEGIN = 0,   /**< Waiting for a TouchBegin event */
-    LISTENER_AWAITING_OWNER,       /**< Waiting for a TouchOwnership event */
-    LISTENER_EARLY_ACCEPT,         /**< Waiting for ownership, has already
-                                        accepted */
-    LISTENER_IS_OWNER,             /**< Is the current owner, hasn't accepted */
-    LISTENER_HAS_ACCEPTED,         /**< Is the current owner, has accepted */
-    LISTENER_HAS_END,              /**< Has already received the end event */
+    TOUCH_LISTENER_AWAITING_BEGIN = 0, /**< Waiting for a TouchBegin event */
+    TOUCH_LISTENER_AWAITING_OWNER,     /**< Waiting for a TouchOwnership event */
+    TOUCH_LISTENER_EARLY_ACCEPT,       /**< Waiting for ownership, has already
+                                            accepted */
+    TOUCH_LISTENER_IS_OWNER,           /**< Is the current owner, hasn't
+                                            accepted */
+    TOUCH_LISTENER_HAS_ACCEPTED,       /**< Is the current owner, has accepted */
+    TOUCH_LISTENER_HAS_END,            /**< Has already received the end event */
 };
 
 enum TouchListenerType {
-    LISTENER_GRAB,
-    LISTENER_POINTER_GRAB,
-    LISTENER_REGULAR,
-    LISTENER_POINTER_REGULAR,
+    TOUCH_LISTENER_GRAB,
+    TOUCH_LISTENER_POINTER_GRAB,
+    TOUCH_LISTENER_REGULAR,
+    TOUCH_LISTENER_POINTER_REGULAR,
+};
+
+enum GestureListenerType {
+    GESTURE_LISTENER_GRAB,
+    GESTURE_LISTENER_NONGESTURE_GRAB,
+    GESTURE_LISTENER_REGULAR
 };
 
 extern void TouchInitDDXTouchPoint(DeviceIntPtr dev,
@@ -593,12 +656,27 @@ extern int TouchListenerAcceptReject(DeviceIntPtr dev, TouchPointInfoPtr ti,
 extern int TouchAcceptReject(ClientPtr client, DeviceIntPtr dev, int mode,
                              uint32_t touchid, Window grab_window, XID *error);
 extern void TouchEndPhysicallyActiveTouches(DeviceIntPtr dev);
-extern void TouchDeliverDeviceClassesChangedEvent(TouchPointInfoPtr ti,
-                                                  Time time, XID resource);
 extern void TouchEmitTouchEnd(DeviceIntPtr dev, TouchPointInfoPtr ti, int flags, XID resource);
 extern void TouchAcceptAndEnd(DeviceIntPtr dev, int touchid);
 
+extern Bool GestureInitGestureInfo(GestureInfoPtr gesture);
+extern GestureInfoPtr GestureBeginGesture(DeviceIntPtr dev, InternalEvent *ev);
+extern GestureInfoPtr GestureFindActiveByEventType(DeviceIntPtr dev, int type);
+extern void GestureEndGesture(GestureInfoPtr gi);
+extern Bool GestureResourceIsOwner(GestureInfoPtr gi, XID resource);
+extern void GestureAddListener(GestureInfoPtr gi, XID resource, int resource_type,
+                               enum GestureListenerType type,
+                               WindowPtr window, GrabPtr grab);
+extern void GestureSetupListener(DeviceIntPtr dev, GestureInfoPtr gi,
+                                 InternalEvent *ev);
+extern Bool GestureBuildSprite(DeviceIntPtr sourcedev, GestureInfoPtr gi);
+extern void GestureListenerGone(XID resource);
+extern void GestureEndActiveGestures(DeviceIntPtr dev);
+extern void GestureEmitGestureEndToOwner(DeviceIntPtr dev, GestureInfoPtr gi);
+extern void ProcessGestureEvent(InternalEvent *ev, DeviceIntPtr dev);
+
 /* misc event helpers */
+extern void CopyPartialInternalEvent(InternalEvent* dst_event, const InternalEvent* src_event);
 extern Mask GetEventMask(DeviceIntPtr dev, xEvent *ev, InputClientsPtr clients);
 extern Mask GetEventFilter(DeviceIntPtr dev, xEvent *event);
 extern Bool WindowXI2MaskIsset(DeviceIntPtr dev, WindowPtr win, xEvent *ev);
@@ -611,6 +689,9 @@ extern WindowPtr XYToWindow(SpritePtr pSprite, int x, int y);
 extern int EventIsDeliverable(DeviceIntPtr dev, int evtype, WindowPtr win);
 extern Bool ActivatePassiveGrab(DeviceIntPtr dev, GrabPtr grab,
                                 InternalEvent *ev, InternalEvent *real_event);
+extern void ActivateGrabNoDelivery(DeviceIntPtr dev, GrabPtr grab,
+                                   InternalEvent *event,
+                                   InternalEvent *real_event);
 /**
  * Masks specifying the type of event to deliver for an InternalEvent; used
  * by EventIsDeliverable.
diff --git a/include/inputstr.h b/include/inputstr.h
index bf35dbf..ec11b39 100644
--- a/include/inputstr.h
+++ b/include/inputstr.h
@@ -75,7 +75,7 @@ extern _X_EXPORT int CountBits(const uint8_t * mask, int len);
  * events to the protocol, the server will not support these events until
  * this number here is bumped.
  */
-#define XI2LASTEVENT    XI_BarrierLeave
+#define XI2LASTEVENT    XI_GestureSwipeEnd
 #define XI2MASKSIZE     ((XI2LASTEVENT >> 3) + 1)       /* no of bytes for masks */
 
 /**
@@ -352,6 +352,32 @@ typedef struct _TouchClassRec {
     Mask motionMask;
 } TouchClassRec;
 
+typedef struct _GestureListener {
+    XID listener;           /* grabs/event selection IDs receiving
+                             * events for this gesture */
+    int resource_type;      /* listener's resource type */
+    enum GestureListenerType type;
+    WindowPtr window;
+    GrabPtr grab;
+} GestureListener;
+
+typedef struct _GestureInfo {
+    int sourceid;               /* Source device's ID for this gesture */
+    Bool active;                /* whether or not the gesture is active */
+    uint8_t type;               /* Gesture type: either ET_GesturePinchBegin or
+                                   ET_GestureSwipeBegin. Valid if active == TRUE */
+    int num_touches;            /* The number of touches in the gesture */
+    SpriteRec sprite;           /* window trace for delivery */
+    GestureListener listener;   /* the listener that will receive events */
+    Bool has_listener;          /* true if listener has been setup already */
+} GestureInfoRec;
+
+typedef struct _GestureClassRec {
+    int sourceid;
+    GestureInfoRec gesture;
+    unsigned short max_touches; /* maximum number of touches, may be 0 */
+} GestureClassRec;
+
 typedef struct _ButtonClassRec {
     int sourceid;
     CARD8 numButtons;
@@ -435,6 +461,7 @@ typedef struct _ClassesRec {
     KeyClassPtr key;
     ValuatorClassPtr valuator;
     TouchClassPtr touch;
+    GestureClassPtr gesture;
     ButtonClassPtr button;
     FocusClassPtr focus;
     ProximityClassPtr proximity;
@@ -501,7 +528,7 @@ typedef struct _GrabInfoRec {
         Bool frozen;
         int state;
         GrabPtr other;          /* if other grab has this frozen */
-        DeviceEvent *event;     /* saved to be replayed */
+        InternalEvent *event;   /* saved to be replayed */
     } sync;
 } GrabInfoRec, *GrabInfoPtr;
 
@@ -550,6 +577,7 @@ typedef struct _DeviceIntRec {
     KeyClassPtr key;
     ValuatorClassPtr valuator;
     TouchClassPtr touch;
+    GestureClassPtr gesture;
     ButtonClassPtr button;
     FocusClassPtr focus;
     ProximityClassPtr proximity;
diff --git a/include/inpututils.h b/include/inpututils.h
index 48c95c4..49b1c10 100644
--- a/include/inpututils.h
+++ b/include/inpututils.h
@@ -46,9 +46,11 @@ struct _ValuatorMask {
 extern void verify_internal_event(const InternalEvent *ev);
 extern void init_device_event(DeviceEvent *event, DeviceIntPtr dev, Time ms,
                               enum DeviceEventSource event_source);
+extern void init_gesture_event(GestureEvent *event, DeviceIntPtr dev, Time ms);
 extern int event_get_corestate(DeviceIntPtr mouse, DeviceIntPtr kbd);
 extern void event_set_state(DeviceIntPtr mouse, DeviceIntPtr kbd,
                             DeviceEvent *event);
+extern void event_set_state_gesture(DeviceIntPtr kbd, GestureEvent *event);
 extern Mask event_get_filter_from_type(DeviceIntPtr dev, int evtype);
 extern Mask event_get_filter_from_xi2type(int evtype);
 
@@ -70,4 +72,7 @@ size_t xi2mask_mask_size(const XI2Mask *mask);
 void xi2mask_set_one_mask(XI2Mask *xi2mask, int deviceid,
                           const unsigned char *mask, size_t mask_size);
 const unsigned char *xi2mask_get_one_mask(const XI2Mask *xi2mask, int deviceid);
+
+Bool CopySprite(SpritePtr src, SpritePtr dst);
+
 #endif
diff --git a/include/meson.build b/include/meson.build
index ac24153..591bc25 100644
--- a/include/meson.build
+++ b/include/meson.build
@@ -2,15 +2,11 @@ version_split = meson.project_version().split('.')
 major = version_split[0].to_int()
 minor = version_split[1].to_int()
 patch = version_split[2].to_int()
-if version_split.length() == 4
-    subpatch = version_split[3].to_int()
-else
-    subpatch = 0
-endif
 
-release = major * 10000000 + minor * 100000 + patch * 1000 + subpatch
+# convert to the old-style 1.x.y version scheme used up to 1.20.x for backwards compatibility
+release = 1 * 10000000 + major * 100000 + minor * 1000 + patch
 
-dri_dep = dependency('dri', required: build_dri2 or build_dri3)
+dri_dep = dependency('dri', required: build_glx)
 
 conf_data = configuration_data()
 conf_data.set('_DIX_CONFIG_H_', '1')
@@ -18,9 +14,19 @@ conf_data.set('_DIX_CONFIG_H_', '1')
 conf_data.set('HAVE_TYPEOF', cc.compiles('''
     int foo(int bar) { typeof(bar) baz = 1; return baz; }
 ''',
-    name: 'typeof()'))
+    name: 'typeof()') ? '1' : false)
 
-conf_data.set('MONOTONIC_CLOCK', cc.compiles('''
+# For feature macros we're using either false (boolean) or '1', which correspond to the macro being
+# not defined at all and defined to 1. This is to match autotools behavior and thus preserve
+# backwards  compatibility with all the existing code that uses #ifdef to check if feature is
+# enabled. This ifdef would pass if the macro is defined to 0 which would silently break code
+# in various places.
+#
+# As a complication when we read the configuration from conf_data back we get either string or
+# bool. Meson does not like comparing things of different types so we always convert the returned
+# value to an integer using to_int().
+conf_data.set('MONOTONIC_CLOCK', cc.has_function('clock_gettime') and
+cc.compiles('''
     #define _POSIX_C_SOURCE 200112L
     #include <time.h>
     #include <unistd.h>
@@ -28,9 +34,9 @@ conf_data.set('MONOTONIC_CLOCK', cc.compiles('''
     #error CLOCK_MONOTONIC not defined
     #endif
 ''',
-    name: 'CLOCK_MONOTONIC'))
+    name: 'CLOCK_MONOTONIC') ? '1' : false)
 
-#conf_data.set('XSERVER_DTRACE', '1') # XXX
+conf_data.set('XSERVER_DTRACE', with_dtrace ? '1' : false)
 
 if host_machine.endian() == 'little'
     conf_data.set('X_BYTE_ORDER', 'X_LITTLE_ENDIAN')
@@ -45,44 +51,68 @@ if cc.sizeof('unsigned long') == 8
 endif
 
 conf_data.set('_GNU_SOURCE', '1')
-# XXX: NO_LOCAL_CLIENT_CRED
 
 # autoconf checks for /dev/xf86 here, but the test should be based on
 # the target, not the build system.  Could we get rid of this and just
 # ifdef for openbsd?
-conf_data.set('HAS_APERTURE_DRV', host_machine.system() == 'openbsd')
-
-# XXX: USE_ALPHA_PIO and other bsd bits
-# XXX: FALLBACK_INPUT_DRIVER
-# XXX: BUNDLE_ID_PREFIX
-# XXX: HAVE_LIBDISPATCH
-conf_data.set_quoted('OSNAME', 'Linux') # XXX
-conf_data.set('HAVE_INPUTTHREAD', '1') # XXX
-conf_data.set('HAVE_PTHREAD_SETNAME_NP_WITHOUT_TID', '1') # XXX
-conf_data.set('HAVE_LIBBSD', libbsd_dep.found())
-# XXX: HAVE_SYSTEMD_DAEMON
-# XXX: HAVE_LIBUDEV
-conf_data.set('CONFIG_UDEV', build_udev)
-conf_data.set('CONFIG_UDEV_KMS', build_udev)
-conf_data.set('HAVE_DBUS', build_dbus)
-conf_data.set('CONFIG_HAL', build_hal)
-conf_data.set('SYSTEMD_LOGIND', build_systemd_logind)
-conf_data.set('NEED_DBUS', build_systemd_logind or build_hal)
-conf_data.set('CONFIG_WSCONS', host_machine.system() == 'openbsd')
-
-conf_data.set('HAVE_XSHMFENCE', xshmfence_dep.found())
-conf_data.set('WITH_LIBDRM', libdrm_dep.found())
+conf_data.set('HAS_APERTURE_DRV', host_machine.system() == 'openbsd' ? '1' : false)
+
+if get_option('input_thread') == 'false'
+  enable_input_thread = false
+else
+  enable_input_thread = cc.has_header_symbol('pthread.h',
+					     'PTHREAD_MUTEX_RECURSIVE')
+  if not enable_input_thread and get_option('input_thread') == 'true'
+    error('Input thread enabled and PTHREAD_MUTEX_RECURSIVE not found')
+  endif
+  if host_machine.system() == 'windows' and get_option('input_thread') == 'auto'
+      enable_input_thread = false
+  endif
+endif
+conf_data.set('INPUTTHREAD', enable_input_thread ? '1' : false)
+
+if cc.compiles('''
+    #define _GNU_SOURCE 1
+    #include <pthread.h>
+    void foo(int bar) { pthread_setname_np(pthread_self(), "example"); }
+''',
+    args: '-Werror-implicit-function-declaration',
+    name: 'pthread_setname_np(tid, name)')
+    conf_data.set('HAVE_PTHREAD_SETNAME_NP_WITH_TID', 1)
+elif cc.compiles('''
+    #define _GNU_SOURCE 1
+    #include <pthread.h>
+    void foo(int bar) { pthread_setname_np("example"); }
+''',
+    args: '-Werror-implicit-function-declaration',
+    name: 'pthread_setname_np(name)')
+    conf_data.set('HAVE_PTHREAD_SETNAME_NP_WITHOUT_TID', 1)
+endif
+
+conf_data.set('HAVE_LIBBSD', libbsd_dep.found() ? '1' : false)
+# Note: this symbol is used by libXtrans.
+conf_data.set('HAVE_SYSTEMD_DAEMON', libsystemd_daemon_dep.found() ? '1' : false)
+conf_data.set('CONFIG_UDEV', build_udev ? '1' : false)
+conf_data.set('CONFIG_UDEV_KMS', build_udev_kms ? '1' : false)
+conf_data.set('HAVE_DBUS', build_dbus ? '1' : false)
+conf_data.set('CONFIG_HAL', build_hal ? '1' : false)
+conf_data.set('SYSTEMD_LOGIND', build_systemd_logind ? '1' : false)
+conf_data.set('NEED_DBUS', build_systemd_logind or build_hal ? '1' : false)
+conf_data.set('CONFIG_WSCONS', host_machine.system() == 'openbsd' ? '1' : false)
+
+conf_data.set('HAVE_XSHMFENCE', xshmfence_dep.found() ? '1' : false)
+conf_data.set('WITH_LIBDRM', libdrm_required ? '1' : false)
 conf_data.set('GLAMOR_HAS_EGL_QUERY_DMABUF',
-              epoxy_dep.found() and epoxy_dep.version().version_compare('>= 1.4.4'))
+              epoxy_dep.found() and epoxy_dep.version().version_compare('>= 1.4.4') ? '1' : false)
 conf_data.set('GLAMOR_HAS_EGL_QUERY_DRIVER',
-              epoxy_dep.found() and epoxy_dep.version().version_compare('>= 1.5.4'))
-conf_data.set('GLXEXT', build_glx)
-conf_data.set('GLAMOR', build_glamor)
-conf_data.set('GLAMOR_HAS_GBM', gbm_dep.found())
+              epoxy_dep.found() and epoxy_dep.version().version_compare('>= 1.5.4') ? '1' : false)
+conf_data.set('GLXEXT', build_glx ? '1' : false)
+conf_data.set('GLAMOR', build_glamor ? '1' : false)
+conf_data.set('GLAMOR_HAS_GBM', gbm_dep.found() ? '1' : false)
 conf_data.set('GLAMOR_HAS_GBM_LINEAR',
-              build_glamor and gbm_dep.found() and gbm_dep.version().version_compare('>= 10.6'))
+              build_glamor and gbm_dep.found() and gbm_dep.version().version_compare('>= 10.6') ? '1' : false)
 conf_data.set('GBM_BO_WITH_MODIFIERS',
-              build_glamor and gbm_dep.found() and gbm_dep.version().version_compare('>= 17.1'))
+              build_glamor and gbm_dep.found() and gbm_dep.version().version_compare('>= 17.1') ? '1' : false)
 
 conf_data.set_quoted('SERVER_MISC_CONFIG_PATH', serverconfigdir)
 conf_data.set_quoted('PROJECTROOT', get_option('prefix'))
@@ -92,59 +122,60 @@ conf_data.set_quoted('COMPILEDDEFAULTFONTPATH', default_font_path)
 
 conf_data.set('XORG_VERSION_CURRENT', release)
 
-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'))
-conf_data.set('HAVE_EXECINFO_H', cc.has_header('execinfo.h'))
-conf_data.set('HAVE_FCNTL_H', cc.has_header('fcntl.h'))
-conf_data.set('HAVE_FNMATCH_H', cc.has_header('fnmatch.h'))
-conf_data.set('HAVE_LINUX_AGPGART_H', cc.has_header('linux/agpgart.h'))
-conf_data.set('HAVE_STDLIB_H', cc.has_header('stdlib.h'))
-conf_data.set('HAVE_STRING_H', cc.has_header('string.h'))
-conf_data.set('HAVE_STRINGS_H', cc.has_header('strings.h'))
-conf_data.set('HAVE_STROPTS_H', cc.has_header('stropts.h'))
-conf_data.set('HAVE_SYS_AGPGART_H', cc.has_header('sys/agpgart.h'))
-conf_data.set('HAVE_SYS_AGPIO_H', cc.has_header('sys/agpio.h'))
-conf_data.set('HAVE_SYS_UTSNAME_H', cc.has_header('sys/utsname.h'))
-conf_data.set('HAVE_SYS_SYSMACROS_H', cc.has_header('sys/sysmacros.h'))
-conf_data.set('HAVE_UNISTD_H', cc.has_header('unistd.h'))
-
-conf_data.set('HAVE_ARC4RANDOM_BUF', cc.has_function('arc4random_buf', dependencies: libbsd_dep))
-conf_data.set('HAVE_BACKTRACE', cc.has_function('backtrace'))
-conf_data.set('HAVE_CBRT', cc.has_function('cbrt'))
-conf_data.set('HAVE_EPOLL_CREATE1', cc.has_function('epoll_create1'))
-conf_data.set('HAVE_GETUID', cc.has_function('getuid'))
-conf_data.set('HAVE_GETEUID', cc.has_function('geteuid'))
-conf_data.set('HAVE_ISASTREAM', cc.has_function('isastream'))
-conf_data.set('HAVE_ISSETUGID', cc.has_function('issetugid'))
-conf_data.set('HAVE_GETIFADDRS', cc.has_function('getifaddrs'))
-conf_data.set('HAVE_GETPEEREID', cc.has_function('getpeereid'))
-conf_data.set('HAVE_GETPEERUCRED', cc.has_function('getpeerucred'))
-conf_data.set('HAVE_GETPROGNAME', cc.has_function('getprogname'))
-conf_data.set('HAVE_GETZONEID', cc.has_function('getzoneid'))
-conf_data.set('HAVE_MEMFD_CREATE', cc.has_function('memfd_create'))
-conf_data.set('HAVE_MKOSTEMP', cc.has_function('mkostemp'))
-conf_data.set('HAVE_MMAP', cc.has_function('mmap'))
-conf_data.set('HAVE_POLL', cc.has_function('poll'))
-conf_data.set('HAVE_POLLSET_CREATE', cc.has_function('pollset_create'))
-conf_data.set('HAVE_POSIX_FALLOCATE', cc.has_function('posix_fallocate'))
-conf_data.set('HAVE_PORT_CREATE', cc.has_function('port_create'))
-conf_data.set('HAVE_REALLOCARRAY', cc.has_function('reallocarray', dependencies: libbsd_dep))
-conf_data.set('HAVE_SETEUID', cc.has_function('seteuid'))
-conf_data.set('HAVE_SETITIMER', cc.has_function('setitimer'))
-conf_data.set('HAVE_SHMCTL64', cc.has_function('shmctl64'))
-conf_data.set('HAVE_SIGACTION', cc.has_function('sigaction'))
-conf_data.set('HAVE_STRCASECMP', cc.has_function('strcasecmp'))
-conf_data.set('HAVE_STRCASESTR', cc.has_function('strcasestr'))
-conf_data.set('HAVE_STRLCAT', cc.has_function('strlcat', dependencies: libbsd_dep))
-conf_data.set('HAVE_STRLCPY', cc.has_function('strlcpy', dependencies: libbsd_dep))
-conf_data.set('HAVE_STRNCASECMP', cc.has_function('strncasecmp'))
-conf_data.set('HAVE_STRNDUP', cc.has_function('strndup'))
-conf_data.set('HAVE_TIMINGSAFE_MEMCMP', cc.has_function('timingsafe_memcmp'))
-conf_data.set('HAVE_VASPRINTF', cc.has_function('vasprintf'))
-conf_data.set('HAVE_VSNPRINTF', cc.has_function('vsnprintf'))
-conf_data.set('HAVE_WALKCONTEXT', cc.has_function('walkcontext'))
+conf_data.set('HASXDMAUTH', has_xdm_auth ? '1' : false)
+conf_data.set('SECURE_RPC', get_option('secure-rpc') ? '1' : false)
+
+conf_data.set('HAVE_DLFCN_H', cc.has_header('dlfcn.h') ? '1' : false)
+conf_data.set('HAVE_EXECINFO_H', cc.has_header('execinfo.h') ? '1' : false)
+conf_data.set('HAVE_FCNTL_H', cc.has_header('fcntl.h') ? '1' : false)
+conf_data.set('HAVE_FNMATCH_H', cc.has_header('fnmatch.h') ? '1' : false)
+conf_data.set('HAVE_LINUX_AGPGART_H', cc.has_header('linux/agpgart.h') ? '1' : false)
+conf_data.set('HAVE_STDLIB_H', cc.has_header('stdlib.h') ? '1' : false)
+conf_data.set('HAVE_STRING_H', cc.has_header('string.h') ? '1' : false)
+conf_data.set('HAVE_STRINGS_H', cc.has_header('strings.h') ? '1' : false)
+conf_data.set('HAVE_SYS_AGPGART_H', cc.has_header('sys/agpgart.h') ? '1' : false)
+conf_data.set('HAVE_SYS_AGPIO_H', cc.has_header('sys/agpio.h') ? '1' : false)
+conf_data.set('HAVE_SYS_UN_H', cc.has_header('sys/un.h') ? '1' : false)
+conf_data.set('HAVE_SYS_UTSNAME_H', cc.has_header('sys/utsname.h') ? '1' : false)
+conf_data.set('HAVE_SYS_SYSMACROS_H', cc.has_header('sys/sysmacros.h') ? '1' : false)
+conf_data.set('HAVE_UNISTD_H', cc.has_header('unistd.h') ? '1' : false)
+
+conf_data.set('HAVE_ARC4RANDOM_BUF', cc.has_function('arc4random_buf', dependencies: libbsd_dep) ? '1' : false)
+conf_data.set('HAVE_BACKTRACE', cc.has_function('backtrace') ? '1' : false)
+conf_data.set('HAVE_CBRT', cc.has_function('cbrt') ? '1' : false)
+conf_data.set('HAVE_EPOLL_CREATE1', cc.has_function('epoll_create1') ? '1' : false)
+conf_data.set('HAVE_GETUID', cc.has_function('getuid') ? '1' : false)
+conf_data.set('HAVE_GETEUID', cc.has_function('geteuid') ? '1' : false)
+conf_data.set('HAVE_ISASTREAM', cc.has_function('isastream') ? '1' : false)
+conf_data.set('HAVE_ISSETUGID', cc.has_function('issetugid') ? '1' : false)
+conf_data.set('HAVE_GETIFADDRS', cc.has_function('getifaddrs') ? '1' : false)
+conf_data.set('HAVE_GETPEEREID', cc.has_function('getpeereid') ? '1' : false)
+conf_data.set('HAVE_GETPEERUCRED', cc.has_function('getpeerucred') ? '1' : false)
+conf_data.set('HAVE_GETPROGNAME', cc.has_function('getprogname') ? '1' : false)
+conf_data.set('HAVE_GETZONEID', cc.has_function('getzoneid') ? '1' : false)
+conf_data.set('HAVE_MEMFD_CREATE', cc.has_function('memfd_create') ? '1' : false)
+conf_data.set('HAVE_MKOSTEMP', cc.has_function('mkostemp') ? '1' : false)
+conf_data.set('HAVE_MMAP', cc.has_function('mmap') ? '1' : false)
+conf_data.set('HAVE_POLL', cc.has_function('poll') ? '1' : false)
+conf_data.set('HAVE_POLLSET_CREATE', cc.has_function('pollset_create') ? '1' : false)
+conf_data.set('HAVE_POSIX_FALLOCATE', cc.has_function('posix_fallocate') ? '1' : false)
+conf_data.set('HAVE_PORT_CREATE', cc.has_function('port_create') ? '1' : false)
+conf_data.set('HAVE_REALLOCARRAY', cc.has_function('reallocarray', dependencies: libbsd_dep) ? '1' : false)
+conf_data.set('HAVE_SETEUID', cc.has_function('seteuid') ? '1' : false)
+conf_data.set('HAVE_SETITIMER', cc.has_function('setitimer') ? '1' : false)
+conf_data.set('HAVE_SHMCTL64', cc.has_function('shmctl64') ? '1' : false)
+conf_data.set('HAVE_SIGACTION', cc.has_function('sigaction') ? '1' : false)
+conf_data.set('HAVE_SIGPROCMASK', cc.has_function('sigprocmask') ? '1' : false)
+conf_data.set('HAVE_STRCASECMP', cc.has_function('strcasecmp') ? '1' : false)
+conf_data.set('HAVE_STRCASESTR', cc.has_function('strcasestr') ? '1' : false)
+conf_data.set('HAVE_STRLCAT', cc.has_function('strlcat', dependencies: libbsd_dep) ? '1' : false)
+conf_data.set('HAVE_STRLCPY', cc.has_function('strlcpy', dependencies: libbsd_dep) ? '1' : false)
+conf_data.set('HAVE_STRNCASECMP', cc.has_function('strncasecmp') ? '1' : false)
+conf_data.set('HAVE_STRNDUP', cc.has_function('strndup') and cc.has_header_symbol('string.h', 'strndup') ? '1' : false)
+conf_data.set('HAVE_TIMINGSAFE_MEMCMP', cc.has_function('timingsafe_memcmp') ? '1' : false)
+conf_data.set('HAVE_VASPRINTF', cc.has_function('vasprintf') ? '1' : false)
+conf_data.set('HAVE_VSNPRINTF', cc.has_function('vsnprintf') ? '1' : false)
+conf_data.set('HAVE_WALKCONTEXT', cc.has_function('walkcontext') ? '1' : false)
 
 conf_data.set('BUSFAULT', conf_data.get('HAVE_SIGACTION'))
 
@@ -155,67 +186,83 @@ conf_data.set('_XITYPEDEF_POINTER', '1')
 conf_data.set('LISTEN_TCP', get_option('listen_tcp'))
 conf_data.set('LISTEN_UNIX', get_option('listen_unix'))
 conf_data.set('LISTEN_LOCAL', get_option('listen_local'))
-# XXX: Configurable?
-conf_data.set('XTRANS_SEND_FDS', '1')
 
-conf_data.set('TCPCONN', '1')
-conf_data.set('UNIXCONN', '1')
-conf_data.set('IPv6', build_ipv6)
+if cc.has_header_symbol('sys/socket.h', 'SCM_RIGHTS')
+  conf_data.set('XTRANS_SEND_FDS', '1')
+endif
 
-conf_data.set('CLIENTIDS', '1') # XXX
+if conf_data.get('HAVE_GETPEEREID').to_int() == 0 and conf_data.get('HAVE_GETPEERUCRED').to_int() == 0
+    if not cc.has_header_symbol('sys/socket.h', 'SO_PEERCRED')
+        conf_data.set('NO_LOCAL_CLIENT_CRED', 1)
+    endif
+endif
+
+conf_data.set('TCPCONN', '1')
+conf_data.set('UNIXCONN', host_machine.system() != 'windows' ? '1' : false)
+conf_data.set('IPv6', build_ipv6 ? '1' : false)
 
 conf_data.set('BIGREQS', '1')
 conf_data.set('COMPOSITE', '1')
 conf_data.set('DAMAGE', '1')
 conf_data.set('DBE', '1')
-conf_data.set('DGA', build_dga)
-conf_data.set('DPMSExtension', build_dpms)
-conf_data.set('DRI2', build_dri2)
-conf_data.set('DRI3', build_dri3)
-conf_data.set_quoted('DRI_DRIVER_PATH', dri_dep.get_pkgconfig_variable('dridriverdir'))
-conf_data.set('HAS_SHM', build_mitshm)
-conf_data.set('MITSHM', build_mitshm)
-conf_data.set('PANORAMIX', build_xinerama)
+conf_data.set('DGA', build_dga ? '1' : false)
+conf_data.set('DPMSExtension', build_dpms ? '1' : false)
+conf_data.set('DRI2', build_dri2 ? '1' : false)
+conf_data.set('DRI3', build_dri3 ? '1' : false)
+if build_glx
+    conf_data.set_quoted('DRI_DRIVER_PATH', dri_dep.get_pkgconfig_variable('dridriverdir'))
+endif
+conf_data.set('HAS_SHM', build_mitshm ? '1' : false)
+conf_data.set('MITSHM', build_mitshm ? '1' : false)
+conf_data.set('PANORAMIX', build_xinerama ? '1' : false)
 conf_data.set('PRESENT', '1')
 conf_data.set('RANDR', '1')
-conf_data.set('RES', build_res)
+conf_data.set('RES', build_res ? '1' : false)
 conf_data.set('RENDER', '1')
-conf_data.set('SCREENSAVER', build_screensaver)
+conf_data.set('SCREENSAVER', build_screensaver ? '1' : false)
 conf_data.set('SHAPE', '1')
-conf_data.set('XACE', build_xace)
+conf_data.set('XACE', build_xace ? '1' : false)
 conf_data.set('XCMISC', '1')
-conf_data.set('XCSECURITY', build_xsecurity)
-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)
+conf_data.set('XCSECURITY', build_xsecurity ? '1' : false)
+conf_data.set('XDMCP', xdmcp_dep.found() ? '1' : false)
+conf_data.set('XF86BIGFONT', build_xf86bigfont ? '1' : false)
+conf_data.set('XF86DRI', build_dri1 ? '1' : false)
+conf_data.set('XF86VIDMODE', 1)
 conf_data.set('XFIXES', '1')
-conf_data.set('XFreeXDGA', build_dga)
-conf_data.set('XINERAMA', build_xinerama)
+conf_data.set('XFreeXDGA', build_dga ? '1' : false)
+conf_data.set('XINERAMA', build_xinerama ? '1' : false)
 conf_data.set('XINPUT', '1')
 conf_data.set('XRECORD', '1')
-conf_data.set('XSELINUX', build_xselinux)
+conf_data.set('XSELINUX', build_xselinux ? '1' : false)
 conf_data.set('XSYNC', '1')
 conf_data.set('XTEST', '1')
-conf_data.set('XV', build_xv)
-conf_data.set('XvExtension', build_xv)
-conf_data.set('XvMCExtension', build_xvmc)
+conf_data.set('XV', build_xv ? '1' : false)
+conf_data.set('XvExtension', build_xv ? '1' : false)
+conf_data.set('XvMCExtension', build_xvmc ? '1' : false)
 
-conf_data.set('HAVE_SHA1_IN_LIBNETTLE', '1') # XXX
+conf_data.set('HAVE_SHA1_IN_' + sha1.to_upper(), '1', description: 'Use @0@ SHA1 functions'.format(sha1))
+conf_data.set('HAVE_LIBUNWIND', get_option('libunwind'))
 
-conf_data.set('HAVE_APM', build_apm or build_acpi)
-conf_data.set('HAVE_ACPI', build_acpi)
+conf_data.set('HAVE_APM', (build_apm or build_acpi) ? '1' : false)
+conf_data.set('HAVE_ACPI', build_acpi ? '1' : false)
 
+conf_data.set('DDXOSVERRORF', build_xwin ? '1' : false)
+conf_data.set('DDXBEFORERESET', build_xwin ? '1' : false)
 enable_debugging = get_option('buildtype') == 'debug'
-conf_data.set('DEBUG', enable_debugging)
+conf_data.set('DEBUG', enable_debugging ? '1' : false)
 
 conf_data.set_quoted('XVENDORNAME', get_option('vendor_name'))
 conf_data.set_quoted('XVENDORNAMESHORT', get_option('vendor_name_short'))
 conf_data.set_quoted('__VENDORDWEBSUPPORT__', get_option('vendor_web'))
-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'))
 
+if build_rootless
+    conf_data.set('ROOTLESS', build_rootless ? '1' : false)
+    conf_data.set('ROOTLESS_WORKAROUND', 1)
+    conf_data.set('ROOTLESS_SAFEALPHA', 1)
+endif
+
 #
 # for xorg-server.h only
 #
@@ -231,7 +278,7 @@ supports_syscons = false
 supports_wscons = false
 csrg_based = false
 
-if host_machine.system() == 'freebsd' or host_machine.system() == 'dragonflybsd'
+if host_machine.system() == 'freebsd' or host_machine.system() == 'dragonfly'
   supports_pccons = true
   supports_pcvt = true
   supports_syscons = true
@@ -257,19 +304,23 @@ if host_machine.system() == 'openbsd'
   csrg_based = true
 endif
 
-conf_data.set('SVR4', cc.compiles(defines_svr4))
+if host_machine.system() == 'darwin'
+  csrg_based = true
+endif
+
+conf_data.set('SVR4', cc.compiles(defines_svr4) ? '1' : false)
 conf_data.set_quoted('XKB_DFLT_RULES', get_option('xkb_default_rules'))
-conf_data.set('XORGSERVER', build_xorg)
+conf_data.set('XORGSERVER', build_xorg ? '1' : false)
 conf_data.set_quoted('XCONFIGFILE', '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)
+conf_data.set('WITH_VGAHW', build_vgahw ? '1' : false)
+conf_data.set('CSRG_BASED', csrg_based ? '1' : false)
+conf_data.set('PCCONS_SUPPORT', supports_pccons ? '1' : false)
+conf_data.set('PCVT_SUPPORT', supports_pcvt ? '1' : false)
+conf_data.set('SYSCONS_SUPPORT', supports_syscons ? '1' : false)
+conf_data.set('WSCONS_SUPPORT', supports_wscons ? '1' : false)
+conf_data.set('XSERVER_LIBPCIACCESS', get_option('pciaccess') ? '1' : false)
+conf_data.set('XSERVER_PLATFORM_BUS', build_udev_kms ? '1' : false)
 
 configure_file(output : 'dix-config.h',
                configuration : conf_data)
@@ -277,6 +328,7 @@ configure_file(output : 'dix-config.h',
 configure_file(output : 'xorg-server.h',
                input : 'xorg-server.h.meson.in',
                configuration : conf_data,
+               install: build_xorg,
                install_dir: xorgsdkdir)
 
 version_data = configuration_data()
@@ -297,7 +349,7 @@ xkb_data.set_quoted('XKB_DFLT_MODEL', get_option('xkb_default_model'))
 xkb_data.set_quoted('XKB_DFLT_LAYOUT', get_option('xkb_default_layout'))
 xkb_data.set_quoted('XKB_DFLT_VARIANT', get_option('xkb_default_variant'))
 xkb_data.set_quoted('XKB_DFLT_OPTIONS', get_option('xkb_default_options'))
-xkb_data.set_quoted('XKM_OUTPUT_DIR', xkb_output_dir)
+xkb_data.set_quoted('XKM_OUTPUT_DIR', xkb_output_dir + '/')
 
 configure_file(output : 'xkb-config.h',
                configuration : xkb_data)
@@ -313,34 +365,32 @@ xorg_data.set_quoted('DEFAULT_XDG_DATA_HOME', '.local/share')
 xorg_data.set_quoted('DEFAULT_XDG_DATA_HOME_LOGDIR', 'xorg')
 xorg_data.set_quoted('DEFAULT_LOGDIR', log_dir)
 xorg_data.set_quoted('DEFAULT_LOGPREFIX', 'Xorg.')
-xorg_data.set_quoted('FALLBACK_INPUT_DRIVER', 'libinput')
 xorg_data.set_quoted('DEFAULT_MODULE_PATH', join_paths(get_option('prefix'), module_dir))
 xorg_data.set_quoted('DEFAULT_LIBRARY_PATH', join_paths(get_option('prefix'), get_option('libdir')))
 xorg_data.set_quoted('__XSERVERNAME__', 'Xorg')
-xorg_data.set('XSERVER_LIBPCIACCESS', get_option('pciaccess'))
+xorg_data.set('XSERVER_LIBPCIACCESS', get_option('pciaccess') ? '1' : false)
 xorg_data.set_quoted('PCI_TXT_IDS_PATH', '')
-xorg_data.set('XSERVER_PLATFORM_BUS', build_udev)
-xorg_data.set('WSCONS_SUPPORT', host_machine.system() == 'netbsd' or host_machine.system() == 'openbsd')
-xorg_data.set('XF86PM', build_apm or build_acpi)
-
-if host_machine.system() == 'freebsd' or host_machine.system() == 'dragonflybsd'
+xorg_data.set('XSERVER_PLATFORM_BUS', build_udev_kms ? '1' : false)
+xorg_data.set('WSCONS_SUPPORT',
+              host_machine.system() == 'netbsd' or host_machine.system() == 'openbsd' ? '1' : false)
+xorg_data.set('HAVE_STROPTS_H', cc.has_header('stropts.h') ? '1' : false)
+xorg_data.set('HAVE_SYS_KD_H', cc.has_header('sys/kd.h') ? '1' : false)
+xorg_data.set('HAVE_SYS_VT_H', cc.has_header('sys/vt.h') ? '1' : false)
+
+if host_machine.system() == 'freebsd' or host_machine.system() == 'dragonfly'
     if host_machine.cpu_family() == 'x86' or host_machine.cpu_family() == 'x86_64'
-        xorg_data.set('USE_DEV_IO', true)
+        xorg_data.set('USE_DEV_IO', '1')
     endif
-    # XXX: Add link to libio on alpha
 elif host_machine.system() == 'netbsd'
-    # XXX: USE_ALPHA_PIO
-    # XXX: Add link to libi386
     if host_machine.cpu_family() == 'x86' or host_machine.cpu_family() == 'x86_64'
-        xorg_data.set('USE_I386_IOPL', true)
+        xorg_data.set('USE_I386_IOPL', '1')
     endif
 elif host_machine.system() == 'openbsd'
-    # XXX: Add link to libi386, libamd64
     if host_machine.cpu_family() == 'x86'
-        xorg_data.set('USE_I386_IOPL', true)
+        xorg_data.set('USE_I386_IOPL', '1')
     endif
     if host_machine.cpu_family() == 'x86_64'
-        xorg_data.set('USE_AMD64_IOPL', true)
+        xorg_data.set('USE_AMD64_IOPL', '1')
     endif
 endif
 
@@ -350,9 +400,12 @@ configure_file(output : 'xorg-config.h',
 
 xwin_data = configuration_data()
 xwin_data.set_quoted('DEFAULT_LOGDIR', log_dir)
-xwin_data.set('HAS_WINSOCK', host_machine.system() == 'windows', description: 'Use Windows sockets')
-xwin_data.set('HAS_DEVWINDOWS', host_machine.system() == 'cygwin', description: 'Has /dev/windows for signaling new win32 messages')
-xwin_data.set('RELOCATE_PROJECTROOT', host_machine.system() == 'windows', description: 'Make paths relative to the xserver installation location')
+xwin_data.set('HAS_WINSOCK', host_machine.system() == 'windows' ? '1' : false,
+              description: 'Use Windows sockets')
+xwin_data.set('HAS_DEVWINDOWS', host_machine.system() == 'cygwin' ? '1' : false,
+              description: 'Has /dev/windows for signaling new win32 messages')
+xwin_data.set('RELOCATE_PROJECTROOT', host_machine.system() == 'windows' ? '1' : false,
+              description: 'Make paths relative to the xserver installation location')
 # XXX: these three are all the same as DEBUG so we should just change to that
 xwin_data.set10('CYGDEBUG', enable_debugging)
 xwin_data.set10('CYGWINDOWING_DEBUG',enable_debugging)
@@ -362,13 +415,16 @@ configure_file(output : 'xwin-config.h',
                input : 'xwin-config.h.meson.in',
                configuration : xwin_data)
 
-xwayland_data = configuration_data()
-xwayland_data.set('XWL_HAS_GLAMOR', build_glamor and (gbm_dep.found() or build_eglstream))
-xwayland_data.set('XWL_HAS_EGLSTREAM', build_eglstream)
+dtrace_hdr = []
+dtrace_tmpl = files('Xserver.d')
+if with_dtrace
+    dtrace_header = generator(dtrace,
+        output: '@BASENAME@-dtrace.h',
+        arguments: ['-h', '-s', '@INPUT@', '-o', '@OUTPUT@']
+    )
 
-configure_file(output : 'xwayland-config.h',
-               input : 'xwayland-config.h.meson.in',
-               configuration : xwayland_data)
+    dtrace_hdr += dtrace_header.process(dtrace_tmpl)
+endif
 
 if build_xorg
     install_data(
@@ -396,6 +452,7 @@ if build_xorg
             'extension.h',
             'extinit.h',
             'extnsionst.h',
+            'fourcc.h',
             'gc.h',
             'gcstruct.h',
             'globals.h',
@@ -425,7 +482,6 @@ if build_xorg
             'scrnintstr.h',
             'selection.h',
             'servermd.h',
-            'site.h',
             'validate.h',
             'displaymode.h',
             'window.h',
diff --git a/include/misc.h b/include/misc.h
index 9b422e5..4b63209 100644
--- a/include/misc.h
+++ b/include/misc.h
@@ -91,7 +91,9 @@ OF THIS SOFTWARE.
 #define LIMITCLIENTS	256     /* Must be a power of 2 and <= MAXCLIENTS */
 #define MAXEXTENSIONS   128
 #define MAXFORMATS	8
+#ifndef MAXDEVICES
 #define MAXDEVICES	256      /* input devices */
+#endif
 #define GPU_SCREEN_OFFSET 256
 
 /* 128 event opcodes for core + extension events, excluding GE */
diff --git a/include/opaque.h b/include/opaque.h
index 0ba0d64..256261c 100644
--- a/include/opaque.h
+++ b/include/opaque.h
@@ -33,9 +33,6 @@ from The Open Group.
 
 #include "globals.h"
 
-extern _X_EXPORT const char *defaultTextFont;
-extern _X_EXPORT const char *defaultCursorFont;
-extern _X_EXPORT int MaxClients;
 extern _X_EXPORT int LimitClients;
 extern _X_EXPORT volatile char isItTimeToYield;
 extern _X_EXPORT volatile char dispatchException;
@@ -45,7 +42,6 @@ extern _X_EXPORT volatile char dispatchException;
 #define DE_TERMINATE 2
 #define DE_PRIORITYCHANGE 4     /* set when a client's priority changes */
 
-extern _X_EXPORT CARD32 TimeOutValue;
 extern _X_EXPORT int ScreenSaverBlanking;
 extern _X_EXPORT int ScreenSaverAllowExposures;
 extern _X_EXPORT int defaultScreenSaverBlanking;
@@ -54,7 +50,6 @@ extern _X_EXPORT const char *display;
 extern _X_EXPORT int displayfd;
 extern _X_EXPORT Bool explicit_display;
 
-extern _X_EXPORT int defaultBackingStore;
 extern _X_EXPORT Bool disableBackingStore;
 extern _X_EXPORT Bool enableBackingStore;
 extern _X_EXPORT Bool enableIndirectGLX;
diff --git a/include/os.h b/include/os.h
index 2a1c29e..bb3348b 100644
--- a/include/os.h
+++ b/include/os.h
@@ -127,8 +127,6 @@ extern _X_EXPORT int WriteToClient(ClientPtr /*who */ , int /*count */ ,
 
 extern _X_EXPORT void ResetOsBuffers(void);
 
-extern _X_EXPORT void InitConnectionLimits(void);
-
 extern _X_EXPORT void NotifyParentProcess(void);
 
 extern _X_EXPORT void CreateWellKnownSockets(void);
@@ -528,6 +526,13 @@ GenerateAuthorization(unsigned int /* name_length */ ,
 extern _X_EXPORT int
 ddxProcessArgument(int /*argc */ , char * /*argv */ [], int /*i */ );
 
+#define CHECK_FOR_REQUIRED_ARGUMENTS(num)  \
+    do if (((i + num) >= argc) || (!argv[i + num])) {                   \
+        UseMsg();                                                       \
+        FatalError("Required argument to %s not specified\n", argv[i]); \
+    } while (0)
+
+
 extern _X_EXPORT void
 ddxUseMsg(void);
 
@@ -552,8 +557,6 @@ enum ExitCode {
     EXIT_ERR_DRIVERS = 3,
 };
 
-extern _X_EXPORT void
-AbortDDX(enum ExitCode error);
 extern _X_EXPORT void
 ddxGiveUp(enum ExitCode error);
 extern _X_EXPORT void
@@ -718,6 +721,10 @@ os_move_fd(int fd);
 
 #include <signal.h>
 
+#if defined(WIN32) && !defined(__CYGWIN__)
+typedef _sigset_t sigset_t;
+#endif
+
 extern _X_EXPORT int
 xthread_sigmask(int how, const sigset_t *set, sigset_t *oldest);
 
diff --git a/include/pixmap.h b/include/pixmap.h
index b7fb257..7144bfb 100644
--- a/include/pixmap.h
+++ b/include/pixmap.h
@@ -113,10 +113,10 @@ extern _X_EXPORT PixmapPtr AllocatePixmap(ScreenPtr /*pScreen */ ,
 extern _X_EXPORT void FreePixmap(PixmapPtr /*pPixmap */ );
 
 extern _X_EXPORT PixmapPtr
-PixmapShareToSlave(PixmapPtr pixmap, ScreenPtr slave);
+PixmapShareToSecondary(PixmapPtr pixmap, ScreenPtr secondary);
 
 extern _X_EXPORT void
-PixmapUnshareSlavePixmap(PixmapPtr slave_pixmap);
+PixmapUnshareSecondaryPixmap(PixmapPtr secondary_pixmap);
 
 #define HAS_DIRTYTRACKING_ROTATION 1
 #define HAS_DIRTYTRACKING_DRAWABLE_SRC 1
@@ -130,7 +130,7 @@ extern _X_EXPORT Bool
 PixmapStopDirtyTracking(DrawablePtr src, PixmapPtr slave_dst);
 
 /* helper function, drivers can do this themselves if they can do it more
-   efficently */
+   efficiently */
 extern _X_EXPORT Bool
 PixmapSyncDirtyHelper(PixmapDirtyUpdatePtr dirty);
 
diff --git a/include/pixmapstr.h b/include/pixmapstr.h
index de50101..faf54fa 100644
--- a/include/pixmapstr.h
+++ b/include/pixmapstr.h
@@ -84,12 +84,12 @@ typedef struct _Pixmap {
 #endif
     unsigned usage_hint;        /* see CREATE_PIXMAP_USAGE_* */
 
-    PixmapPtr master_pixmap;    /* pointer to master copy of pixmap for pixmap sharing */
+    PixmapPtr primary_pixmap;    /* pointer to primary copy of pixmap for pixmap sharing */
 } PixmapRec;
 
 typedef struct _PixmapDirtyUpdate {
     DrawablePtr src;            /* Root window / shared pixmap */
-    PixmapPtr slave_dst;        /* Shared / scanout pixmap */
+    PixmapPtr secondary_dst;    /* Shared / scanout pixmap */
     int x, y;
     DamagePtr damage;
     struct xorg_list ent;
diff --git a/include/privates.h b/include/privates.h
index e89c3e4..6e1cfa0 100644
--- a/include/privates.h
+++ b/include/privates.h
@@ -15,6 +15,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include <X11/Xdefs.h>
 #include <X11/Xosdefs.h>
 #include <X11/Xfuncproto.h>
+#include <assert.h>
 #include "misc.h"
 
 /*****************************************************************
diff --git a/include/probes.h b/include/probes.h
index e9cdd3e..f2ed40f 100644
--- a/include/probes.h
+++ b/include/probes.h
@@ -30,12 +30,12 @@
 
 /* definitions needed to include Dtrace probes in a source file */
 
-#if XSERVER_DTRACE
+#ifdef XSERVER_DTRACE
 #include <sys/types.h>
 typedef const char *string;
 typedef const uint8_t *const_uint8_p;
 typedef const double *const_double_p;
-#include "../dix/Xserver-dtrace.h"
+#include "Xserver-dtrace.h"
 #endif
 
 #endif /* XORG_PROBES_H */
diff --git a/include/property.h b/include/property.h
index d7ccff3..6ee8a83 100644
--- a/include/property.h
+++ b/include/property.h
@@ -72,7 +72,7 @@ extern _X_EXPORT int dixChangeWindowProperty(ClientPtr pClient,
                                              int format,
                                              int mode,
                                              unsigned long len,
-                                             void *value,
+                                             const void *value,
                                              Bool sendevent);
 
 extern _X_EXPORT int DeleteProperty(ClientPtr /*client */ ,
diff --git a/include/protocol-versions.h b/include/protocol-versions.h
index 8e149b2..d7bfc6d 100644
--- a/include/protocol-versions.h
+++ b/include/protocol-versions.h
@@ -139,12 +139,12 @@
 #define SERVER_XF86VIDMODE_MINOR_VERSION	2
 
 /* Fixes */
-#define SERVER_XFIXES_MAJOR_VERSION		5
+#define SERVER_XFIXES_MAJOR_VERSION		6
 #define SERVER_XFIXES_MINOR_VERSION		0
 
 /* X Input */
 #define SERVER_XI_MAJOR_VERSION			2
-#define SERVER_XI_MINOR_VERSION			3
+#define SERVER_XI_MINOR_VERSION			4
 
 /* XKB */
 #define SERVER_XKB_MAJOR_VERSION		1
diff --git a/include/resource.h b/include/resource.h
index 5871a4c..6caf846 100644
--- a/include/resource.h
+++ b/include/resource.h
@@ -270,7 +270,6 @@ extern _X_EXPORT RESTYPE TypeMask;
     of bits by either masking numBits lower bits of the ID or by
     providing at most MAXHASHSIZE hashes.
 */
-extern _X_EXPORT int HashResourceID(XID id,
-                                    int numBits);
+extern _X_EXPORT int HashResourceID(XID id, unsigned int numBits);
 
 #endif /* RESOURCE_H */
diff --git a/include/screenint.h b/include/screenint.h
index e383848..0a45278 100644
--- a/include/screenint.h
+++ b/include/screenint.h
@@ -54,20 +54,9 @@ typedef struct _Visual *VisualPtr;
 typedef struct _Depth *DepthPtr;
 typedef struct _Screen *ScreenPtr;
 
-extern _X_EXPORT int AddScreen(Bool (* /*pfnInit */ )(
-                                                         ScreenPtr /*pScreen */
-                                                         ,
-                                                         int /*argc */ ,
-                                                         char ** /*argv */ ),
-                               int /*argc */ ,
-                               char ** /*argv */ );
-
-
-extern _X_EXPORT int AddGPUScreen(Bool (*pfnInit) (ScreenPtr /*pScreen */ ,
-                                                   int /*argc */ ,
-                                                   char **      /*argv */
-                                                   ),
-                                  int argc, char **argv);
+typedef Bool (*ScreenInitProcPtr)(ScreenPtr pScreen, int argc, char **argv);
+extern _X_EXPORT int AddScreen(ScreenInitProcPtr pfnInit, int argc, char **argv);
+extern _X_EXPORT int AddGPUScreen(ScreenInitProcPtr pfnInit, int argc, char **argv);
 
 extern _X_EXPORT void RemoveGPUScreen(ScreenPtr pScreen);
 
diff --git a/include/scrnintstr.h b/include/scrnintstr.h
index 9b663fa..24ca423 100644
--- a/include/scrnintstr.h
+++ b/include/scrnintstr.h
@@ -362,17 +362,17 @@ typedef Bool (*SetSharedPixmapBackingProcPtr)(PixmapPtr, void *);
 #define HAS_SYNC_SHARED_PIXMAP 1
 /* The SyncSharedPixmap hook has two purposes:
  *
- * 1. If the master driver has it, the slave driver can use it to
+ * 1. If the primary driver has it, the secondary driver can use it to
  * synchronize the shared pixmap contents with the screen pixmap.
- * 2. If the slave driver has it, the master driver can expect the slave
- * driver to call the master screen's SyncSharedPixmap hook, so the master
+ * 2. If the secondary driver has it, the primary driver can expect the secondary
+ * driver to call the primary screen's SyncSharedPixmap hook, so the primary
  * driver doesn't have to synchronize the shared pixmap contents itself,
  * e.g. from the BlockHandler.
  *
  * A driver must only set the hook if it handles both cases correctly.
  *
- * The argument is the slave screen's pixmap_dirty_list entry, the hook is
- * responsible for finding the corresponding entry in the master screen's
+ * The argument is the secondary screen's pixmap_dirty_list entry, the hook is
+ * responsible for finding the corresponding entry in the primary screen's
  * pixmap_dirty_list.
  */
 typedef void (*SyncSharedPixmapProcPtr)(PixmapDirtyUpdatePtr);
@@ -486,9 +486,9 @@ typedef void (*DPMSProcPtr)(ScreenPtr pScreen, int level);
         Wrap(as, pScreen, UnrealizeCursor, AnimCurUnrealizeCursor);
 
     The wrapping block handler is a bit different; it does the Unwrap,
-    the local operations and then only re-Wraps if the hook is still
-    required. Unwrap occurrs at the top of each function, just after
-    entry, and Wrap occurrs at the bottom of each function, just
+    the local operations, and then only re-Wraps if the hook is still
+    required. Unwrap occurs at the top of each function, just after
+    entry, and Wrap occurs at the bottom of each function, just
     before returning.
  */
 
@@ -634,14 +634,14 @@ typedef struct _Screen {
 
     Bool isGPU;
 
-    /* Info on this screen's slaves (if any) */
-    struct xorg_list slave_list;
-    struct xorg_list slave_head;
-    int output_slaves;
-    /* Info for when this screen is a slave */
-    ScreenPtr current_master;
-    Bool is_output_slave;
-    Bool is_offload_slave;
+    /* Info on this screen's secondarys (if any) */
+    struct xorg_list secondary_list;
+    struct xorg_list secondary_head;
+    int output_secondarys;
+    /* Info for when this screen is a secondary */
+    ScreenPtr current_primary;
+    Bool is_output_secondary;
+    Bool is_offload_secondary;
 
     SharePixmapBackingProcPtr SharePixmapBacking;
     SetSharedPixmapBackingProcPtr SetSharedPixmapBacking;
diff --git a/include/site.h b/include/site.h
deleted file mode 100644
index 9bd8e2f..0000000
--- a/include/site.h
+++ /dev/null
@@ -1,126 +0,0 @@
-/************************************************************
-
-Copyright 1987, 1998  The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
-
-                        All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of Digital not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-********************************************************/
-
-#ifndef SITE_H
-#define SITE_H
-/*
- * The vendor string identifies the vendor responsible for the
- * server executable.
- */
-#ifndef VENDOR_STRING
-#define VENDOR_STRING "The X.Org Foundation"
-#endif
-
-/*
- * The vendor release number identifies, for the purpose of submitting
- * traceable bug reports, the release number of software produced
- * by the vendor.
- */
-#ifndef VENDOR_RELEASE
-#define VENDOR_RELEASE	6600
-#endif
-
-/*
- * The following constants are provided solely as a last line of defense.  The
- * normal build ALWAYS overrides them using a special rule given in
- * server/dix/Imakefile.  If you want to change either of these constants,
- * you should set the DefaultFontPath or DefaultRGBDatabase configuration
- * parameters.
- * DO NOT CHANGE THESE VALUES OR THE DIX IMAKEFILE!
- */
-#ifndef COMPILEDDEFAULTFONTPATH
-#define COMPILEDDEFAULTFONTPATH	"/usr/share/fonts/X11/misc/"
-#endif
-
-/*
- * The following constants contain default values for all of the variables
- * that can be initialized on the server command line or in the environment.
- */
-#define COMPILEDDEFAULTFONT	"fixed"
-#define COMPILEDCURSORFONT	"cursor"
-#ifndef COMPILEDDISPLAYCLASS
-#define COMPILEDDISPLAYCLASS	"MIT-unspecified"
-#endif
-#define DEFAULT_TIMEOUT		60      /* seconds */
-#define DEFAULT_KEYBOARD_CLICK 	0
-#define DEFAULT_BELL		50
-#define DEFAULT_BELL_PITCH	400
-#define DEFAULT_BELL_DURATION	100
-#define DEFAULT_AUTOREPEAT	TRUE
-#define DEFAULT_AUTOREPEATS	{\
-        0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,\
-        0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,\
-        0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
-
-#define DEFAULT_LEDS		0x0     /* all off */
-#define DEFAULT_LEDS_MASK	0xffffffff      /* 32 */
-#define DEFAULT_INT_RESOLUTION		1000
-#define DEFAULT_INT_MIN_VALUE		0
-#define DEFAULT_INT_MAX_VALUE		100
-#define DEFAULT_INT_DISPLAYED		0
-
-#define DEFAULT_PTR_NUMERATOR	2
-#define DEFAULT_PTR_DENOMINATOR	1
-#define DEFAULT_PTR_THRESHOLD	4
-
-#define DEFAULT_SCREEN_SAVER_TIME (10 * (60 * 1000))
-#define DEFAULT_SCREEN_SAVER_INTERVAL (10 * (60 * 1000))
-#define DEFAULT_SCREEN_SAVER_BLANKING PreferBlanking
-#define DEFAULT_SCREEN_SAVER_EXPOSURES AllowExposures
-#ifndef DEFAULT_ACCESS_CONTROL
-#define DEFAULT_ACCESS_CONTROL TRUE
-#endif
-
-/* Default logging parameters. */
-#ifndef DEFAULT_LOG_VERBOSITY
-#define DEFAULT_LOG_VERBOSITY		0
-#endif
-#ifndef DEFAULT_LOG_FILE_VERBOSITY
-#define DEFAULT_LOG_FILE_VERBOSITY	3
-#endif
-
-#endif                          /* SITE_H */
diff --git a/include/systemd-logind.h b/include/systemd-logind.h
index a4067d0..5c04d01 100644
--- a/include/systemd-logind.h
+++ b/include/systemd-logind.h
@@ -33,6 +33,7 @@ int systemd_logind_take_fd(int major, int minor, const char *path, Bool *paus);
 void systemd_logind_release_fd(int major, int minor, int fd);
 int systemd_logind_controls_session(void);
 void systemd_logind_vtenter(void);
+void systemd_logind_drop_master(void);
 #else
 #define systemd_logind_init()
 #define systemd_logind_fini()
@@ -40,6 +41,7 @@ void systemd_logind_vtenter(void);
 #define systemd_logind_release_fd(major, minor, fd) close(fd)
 #define systemd_logind_controls_session() 0
 #define systemd_logind_vtenter()
+#define systemd_logind_drop_master()
 #endif
 
 #endif
diff --git a/include/windowstr.h b/include/windowstr.h
index 4383dab..c7e2796 100644
--- a/include/windowstr.h
+++ b/include/windowstr.h
@@ -149,7 +149,6 @@ typedef struct _Window {
     unsigned borderIsPixel:1;
     unsigned cursorIsNone:1;    /* else real cursor (might inherit) */
     unsigned backingStore:2;
-    unsigned backStorage:1;     /* if bs is allocated */
     unsigned saveUnder:1;
     unsigned bitGravity:4;
     unsigned winGravity:4;
@@ -159,7 +158,6 @@ typedef struct _Window {
     unsigned realized:1;        /* ancestors are all mapped */
     unsigned viewable:1;        /* realized && InputOutput */
     unsigned dontPropagate:3;   /* index into DontPropagateMasks */
-    unsigned forcedBS:1;        /* system-supplied backingStore */
     unsigned redirectDraw:2;    /* COMPOSITE rendering redirect */
     unsigned forcedBG:1;        /* must have an opaque background */
     unsigned unhittable:1;      /* doesn't hit-test, for rootless */
diff --git a/include/xkbstr.h b/include/xkbstr.h
index 8d71557..8a9f01c 100644
--- a/include/xkbstr.h
+++ b/include/xkbstr.h
@@ -386,7 +386,7 @@ typedef struct _XkbCompatMapRec {
 
 typedef struct _XkbIndicatorMapRec {
     unsigned char flags;
-    /* FIXME: For some reason, interepretation of groups is wildly
+    /* FIXME: For some reason, interpretation of groups is wildly
      *        different between which being base/latched/locked. */
     unsigned char which_groups;
     unsigned char groups;
diff --git a/include/xorg-config.h.in b/include/xorg-config.h.in
index bf555eb..e300027 100644
--- a/include/xorg-config.h.in
+++ b/include/xorg-config.h.in
@@ -148,9 +148,6 @@
 /* Define to 1 if you have the `seteuid' function. */
 #undef HAVE_SETEUID
 
-/* Support APM/ACPI power management in the server */
-#undef XF86PM
-
 /* Fallback input driver if the assigned driver fails */
 #undef FALLBACK_INPUT_DRIVER
 
diff --git a/include/xorg-config.h.meson.in b/include/xorg-config.h.meson.in
index 1e4213f..59f1c2a 100644
--- a/include/xorg-config.h.meson.in
+++ b/include/xorg-config.h.meson.in
@@ -142,9 +142,6 @@
 /* Define to 1 if you have the `seteuid' function. */
 #mesondefine HAVE_SETEUID
 
-/* Support APM/ACPI power management in the server */
-#mesondefine XF86PM
-
 /* Fallback input driver if the assigned driver fails */
 #mesondefine FALLBACK_INPUT_DRIVER
 
diff --git a/include/xwayland-config.h.in b/include/xwayland-config.h.in
deleted file mode 100644
index 9695aae..0000000
--- a/include/xwayland-config.h.in
+++ /dev/null
@@ -1,13 +0,0 @@
-/* xwayland-config.h.in: not at all generated. */
-#ifndef _XWAYLAND_CONFIG_H_
-#define _XWAYLAND_CONFIG_H_
-
-#include <dix-config.h>
-
-/* Build glamor support for Xwayland */
-#undef XWL_HAS_GLAMOR
-
-/* Build eglstream support for Xwayland */
-#undef XWL_HAS_EGLSTREAM
-
-#endif /* _XWAYLAND_CONFIG_H_ */
diff --git a/include/xwayland-config.h.meson.in b/include/xwayland-config.h.meson.in
deleted file mode 100644
index 0943ff5..0000000
--- a/include/xwayland-config.h.meson.in
+++ /dev/null
@@ -1,11 +0,0 @@
-/* xwayland-config.h.meson.in: not at all generated */
-
-#pragma once
-
-#include <dix-config.h>
-
-/* Build glamor support for Xwayland */
-#mesondefine XWL_HAS_GLAMOR
-
-/* Build eglstream support for Xwayland */
-#mesondefine XWL_HAS_EGLSTREAM
diff --git a/install-sh b/install-sh
index 20d8b2e..ec298b5 100755
--- a/install-sh
+++ b/install-sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 # install - install a program, script, or datafile
 
-scriptversion=2018-03-11.20; # UTC
+scriptversion=2020-11-14.01; # UTC
 
 # This originates from X11R5 (mit/util/scripts/install.sh), which was
 # later released in X11R6 (xc/config/util/install.sh) with the
@@ -69,6 +69,11 @@ posix_mkdir=
 # Desired mode of installed file.
 mode=0755
 
+# Create dirs (including intermediate dirs) using mode 755.
+# This is like GNU 'install' as of coreutils 8.32 (2020).
+mkdir_umask=22
+
+backupsuffix=
 chgrpcmd=
 chmodcmd=$chmodprog
 chowncmd=
@@ -99,18 +104,28 @@ Options:
      --version  display version info and exit.
 
   -c            (ignored)
-  -C            install only if different (preserve the last data modification time)
+  -C            install only if different (preserve data modification time)
   -d            create directories instead of installing files.
   -g GROUP      $chgrpprog installed files to GROUP.
   -m MODE       $chmodprog installed files to MODE.
   -o USER       $chownprog installed files to USER.
+  -p            pass -p to $cpprog.
   -s            $stripprog installed files.
+  -S SUFFIX     attempt to back up existing files, with suffix SUFFIX.
   -t DIRECTORY  install into DIRECTORY.
   -T            report an error if DSTFILE is a directory.
 
 Environment variables override the default commands:
   CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
   RMPROG STRIPPROG
+
+By default, rm is invoked with -f; when overridden with RMPROG,
+it's up to you to specify -f if you want it.
+
+If -S is not specified, no backups are attempted.
+
+Email bug reports to bug-automake@gnu.org.
+Automake home page: https://www.gnu.org/software/automake/
 "
 
 while test $# -ne 0; do
@@ -137,8 +152,13 @@ while test $# -ne 0; do
     -o) chowncmd="$chownprog $2"
         shift;;
 
+    -p) cpprog="$cpprog -p";;
+
     -s) stripcmd=$stripprog;;
 
+    -S) backupsuffix="$2"
+        shift;;
+
     -t)
         is_target_a_directory=always
         dst_arg=$2
@@ -255,6 +275,10 @@ do
     dstdir=$dst
     test -d "$dstdir"
     dstdir_status=$?
+    # Don't chown directories that already exist.
+    if test $dstdir_status = 0; then
+      chowncmd=""
+    fi
   else
 
     # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
@@ -301,22 +325,6 @@ do
   if test $dstdir_status != 0; then
     case $posix_mkdir in
       '')
-        # Create intermediate dirs using mode 755 as modified by the umask.
-        # This is like FreeBSD 'install' as of 1997-10-28.
-        umask=`umask`
-        case $stripcmd.$umask in
-          # Optimize common cases.
-          *[2367][2367]) mkdir_umask=$umask;;
-          .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
-
-          *[0-7])
-            mkdir_umask=`expr $umask + 22 \
-              - $umask % 100 % 40 + $umask % 20 \
-              - $umask % 10 % 4 + $umask % 2
-            `;;
-          *) mkdir_umask=$umask,go-w;;
-        esac
-
         # With -d, create the new directory with the user-specified mode.
         # Otherwise, rely on $mkdir_umask.
         if test -n "$dir_arg"; then
@@ -326,52 +334,49 @@ do
         fi
 
         posix_mkdir=false
-        case $umask in
-          *[123567][0-7][0-7])
-            # POSIX mkdir -p sets u+wx bits regardless of umask, which
-            # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
-            ;;
-          *)
-            # Note that $RANDOM variable is not portable (e.g. dash);  Use it
-            # here however when possible just to lower collision chance.
-            tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
-
-            trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0
-
-            # Because "mkdir -p" follows existing symlinks and we likely work
-            # directly in world-writeable /tmp, make sure that the '$tmpdir'
-            # directory is successfully created first before we actually test
-            # 'mkdir -p' feature.
-            if (umask $mkdir_umask &&
-                $mkdirprog $mkdir_mode "$tmpdir" &&
-                exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
-            then
-              if test -z "$dir_arg" || {
-                   # Check for POSIX incompatibilities with -m.
-                   # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
-                   # other-writable bit of parent directory when it shouldn't.
-                   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
-                   test_tmpdir="$tmpdir/a"
-                   ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
-                   case $ls_ld_tmpdir in
-                     d????-?r-*) different_mode=700;;
-                     d????-?--*) different_mode=755;;
-                     *) false;;
-                   esac &&
-                   $mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
-                     ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
-                     test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
-                   }
-                 }
-              then posix_mkdir=:
-              fi
-              rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
-            else
-              # Remove any dirs left behind by ancient mkdir implementations.
-              rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
-            fi
-            trap '' 0;;
-        esac;;
+	# The $RANDOM variable is not portable (e.g., dash).  Use it
+	# here however when possible just to lower collision chance.
+	tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+
+	trap '
+	  ret=$?
+	  rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null
+	  exit $ret
+	' 0
+
+	# Because "mkdir -p" follows existing symlinks and we likely work
+	# directly in world-writeable /tmp, make sure that the '$tmpdir'
+	# directory is successfully created first before we actually test
+	# 'mkdir -p'.
+	if (umask $mkdir_umask &&
+	    $mkdirprog $mkdir_mode "$tmpdir" &&
+	    exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
+	then
+	  if test -z "$dir_arg" || {
+	       # Check for POSIX incompatibilities with -m.
+	       # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+	       # other-writable bit of parent directory when it shouldn't.
+	       # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+	       test_tmpdir="$tmpdir/a"
+	       ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
+	       case $ls_ld_tmpdir in
+		 d????-?r-*) different_mode=700;;
+		 d????-?--*) different_mode=755;;
+		 *) false;;
+	       esac &&
+	       $mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
+		 ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
+		 test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+	       }
+	     }
+	  then posix_mkdir=:
+	  fi
+	  rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
+	else
+	  # Remove any dirs left behind by ancient mkdir implementations.
+	  rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
+	fi
+	trap '' 0;;
     esac
 
     if
@@ -382,7 +387,7 @@ do
     then :
     else
 
-      # The umask is ridiculous, or mkdir does not conform to POSIX,
+      # mkdir does not conform to POSIX,
       # or it failed possibly due to a race condition.  Create the
       # directory the slow way, step by step, checking for races as we go.
 
@@ -411,7 +416,7 @@ do
           prefixes=
         else
           if $posix_mkdir; then
-            (umask=$mkdir_umask &&
+            (umask $mkdir_umask &&
              $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
             # Don't fail if two instances are running concurrently.
             test -d "$prefix" || exit 1
@@ -488,6 +493,13 @@ do
     then
       rm -f "$dsttmp"
     else
+      # If $backupsuffix is set, and the file being installed
+      # already exists, attempt a backup.  Don't worry if it fails,
+      # e.g., if mv doesn't support -f.
+      if test -n "$backupsuffix" && test -f "$dst"; then
+        $doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null
+      fi
+
       # Rename the file to the real destination.
       $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
 
@@ -502,9 +514,9 @@ do
         # file should still install successfully.
         {
           test ! -f "$dst" ||
-          $doit $rmcmd -f "$dst" 2>/dev/null ||
+          $doit $rmcmd "$dst" 2>/dev/null ||
           { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
-            { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+            { $doit $rmcmd "$rmtmp" 2>/dev/null; :; }
           } ||
           { echo "$0: cannot unlink or rename $dst" >&2
             (exit 1); exit 1
diff --git a/ltmain.sh b/ltmain.sh
index e774ddf..49fcad1 100644
--- a/ltmain.sh
+++ b/ltmain.sh
@@ -1,12 +1,12 @@
-#! /bin/sh
+#! /usr/bin/env sh
 ## DO NOT EDIT - This file generated from ./build-aux/ltmain.in
-##               by inline-source v2014-01-03.01
+##               by inline-source v2019-02-19.15
 
-# libtool (GNU libtool) 2.4.6
+# libtool (GNU libtool) 2.4.7
 # Provide generalized library-building support services.
 # Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
 
-# Copyright (C) 1996-2015 Free Software Foundation, Inc.
+# Copyright (C) 1996-2019, 2021-2022 Free Software Foundation, Inc.
 # This is free software; see the source for copying conditions.  There is NO
 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
@@ -31,8 +31,8 @@
 
 PROGRAM=libtool
 PACKAGE=libtool
-VERSION=2.4.6
-package_revision=2.4.6
+VERSION=2.4.7
+package_revision=2.4.7
 
 
 ## ------ ##
@@ -64,34 +64,25 @@ package_revision=2.4.6
 # libraries, which are installed to $pkgauxdir.
 
 # Set a version string for this script.
-scriptversion=2015-10-04.22; # UTC
+scriptversion=2019-02-19.15; # UTC
 
 # General shell script boiler plate, and helper functions.
 # Written by Gary V. Vaughan, 2004
 
-# Copyright (C) 2004-2015 Free Software Foundation, Inc.
-# This is free software; see the source for copying conditions.  There is NO
-# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-
-# As a special exception to the GNU General Public License, if you distribute
-# this file as part of a program or library that is built using GNU Libtool,
-# you may include this file under the same distribution terms that you use
-# for the rest of that program.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# This is free software.  There is NO warranty; not even for
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+#
+# Copyright (C) 2004-2019, 2021 Bootstrap Authors
+#
+# This file is dual licensed under the terms of the MIT license
+# <https://opensource.org/license/MIT>, and GPL version 2 or later
+# <http://www.gnu.org/licenses/gpl-2.0.html>.  You must apply one of
+# these licenses when using or redistributing this software or any of
+# the files within it.  See the URLs above, or the file `LICENSE`
+# included in the Bootstrap distribution for the full license texts.
 
-# Please report bugs or propose patches to gary@gnu.org.
+# Please report bugs or propose patches to:
+# <https://github.com/gnulib-modules/bootstrap/issues>
 
 
 ## ------ ##
@@ -139,9 +130,12 @@ do
 	  _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\"
 	fi"
 done
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+# These NLS vars are set unconditionally (bootstrap issue #24).  Unset those
+# in case the environment reset is needed later and the $save_* variant is not
+# defined (see the code above).
+LC_ALL=C
+LANGUAGE=C
+export LANGUAGE LC_ALL
 
 # Make sure IFS has a sensible default
 sp=' '
@@ -159,6 +153,26 @@ if test "${PATH_SEPARATOR+set}" != set; then
 fi
 
 
+# func_unset VAR
+# --------------
+# Portably unset VAR.
+# In some shells, an 'unset VAR' statement leaves a non-zero return
+# status if VAR is already unset, which might be problematic if the
+# statement is used at the end of a function (thus poisoning its return
+# value) or when 'set -e' is active (causing even a spurious abort of
+# the script in this case).
+func_unset ()
+{
+    { eval $1=; (eval unset $1) >/dev/null 2>&1 && eval unset $1 || : ; }
+}
+
+
+# Make sure CDPATH doesn't cause `cd` commands to output the target dir.
+func_unset CDPATH
+
+# Make sure ${,E,F}GREP behave sanely.
+func_unset GREP_OPTIONS
+
 
 ## ------------------------- ##
 ## Locate command utilities. ##
@@ -259,7 +273,7 @@ test -z "$SED" && {
     rm -f conftest.in conftest.tmp conftest.nl conftest.out
   }
 
-  func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin
+  func_path_progs "sed gsed" func_check_prog_sed "$PATH:/usr/xpg4/bin"
   rm -f conftest.sed
   SED=$func_path_progs_result
 }
@@ -295,7 +309,7 @@ test -z "$GREP" && {
     rm -f conftest.in conftest.tmp conftest.nl conftest.out
   }
 
-  func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin
+  func_path_progs "grep ggrep" func_check_prog_grep "$PATH:/usr/xpg4/bin"
   GREP=$func_path_progs_result
 }
 
@@ -360,6 +374,35 @@ sed_double_backslash="\
   s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g
   s/\n//g"
 
+# require_check_ifs_backslash
+# ---------------------------
+# Check if we can use backslash as IFS='\' separator, and set
+# $check_ifs_backshlash_broken to ':' or 'false'.
+require_check_ifs_backslash=func_require_check_ifs_backslash
+func_require_check_ifs_backslash ()
+{
+  _G_save_IFS=$IFS
+  IFS='\'
+  _G_check_ifs_backshlash='a\\b'
+  for _G_i in $_G_check_ifs_backshlash
+  do
+  case $_G_i in
+  a)
+    check_ifs_backshlash_broken=false
+    ;;
+  '')
+    break
+    ;;
+  *)
+    check_ifs_backshlash_broken=:
+    break
+    ;;
+  esac
+  done
+  IFS=$_G_save_IFS
+  require_check_ifs_backslash=:
+}
+
 
 ## ----------------- ##
 ## Global variables. ##
@@ -580,16 +623,16 @@ if test yes = "$_G_HAVE_PLUSEQ_OP"; then
   {
     $debug_cmd
 
-    func_quote_for_eval "$2"
-    eval "$1+=\\ \$func_quote_for_eval_result"
+    func_quote_arg pretty "$2"
+    eval "$1+=\\ \$func_quote_arg_result"
   }'
 else
   func_append_quoted ()
   {
     $debug_cmd
 
-    func_quote_for_eval "$2"
-    eval "$1=\$$1\\ \$func_quote_for_eval_result"
+    func_quote_arg pretty "$2"
+    eval "$1=\$$1\\ \$func_quote_arg_result"
   }
 fi
 
@@ -1091,132 +1134,203 @@ func_relative_path ()
 }
 
 
-# func_quote ARG
-# --------------
-# Aesthetically quote one ARG, store the result into $func_quote_result.  Note
-# that we keep attention to performance here (so far O(N) complexity as long as
-# func_append is O(1)).
-func_quote ()
+# func_quote_portable EVAL ARG
+# ----------------------------
+# Internal function to portably implement func_quote_arg.  Note that we still
+# keep attention to performance here so we as much as possible try to avoid
+# calling sed binary (so far O(N) complexity as long as func_append is O(1)).
+func_quote_portable ()
 {
     $debug_cmd
 
-    func_quote_result=$1
+    $require_check_ifs_backslash
 
-    case $func_quote_result in
-      *[\\\`\"\$]*)
-        case $func_quote_result in
-          *[\[\*\?]*)
-            func_quote_result=`$ECHO "$func_quote_result" | $SED "$sed_quote_subst"`
-            return 0
-            ;;
-        esac
+    func_quote_portable_result=$2
 
-        func_quote_old_IFS=$IFS
-        for _G_char in '\' '`' '"' '$'
-        do
-          # STATE($1) PREV($2) SEPARATOR($3)
-          set start "" ""
-          func_quote_result=dummy"$_G_char$func_quote_result$_G_char"dummy
-          IFS=$_G_char
-          for _G_part in $func_quote_result
-          do
-            case $1 in
-            quote)
-              func_append func_quote_result "$3$2"
-              set quote "$_G_part" "\\$_G_char"
-              ;;
-            start)
-              set first "" ""
-              func_quote_result=
-              ;;
-            first)
-              set quote "$_G_part" ""
+    # one-time-loop (easy break)
+    while true
+    do
+      if $1; then
+        func_quote_portable_result=`$ECHO "$2" | $SED \
+          -e "$sed_double_quote_subst" -e "$sed_double_backslash"`
+        break
+      fi
+
+      # Quote for eval.
+      case $func_quote_portable_result in
+        *[\\\`\"\$]*)
+          # Fallback to sed for $func_check_bs_ifs_broken=:, or when the string
+          # contains the shell wildcard characters.
+          case $check_ifs_backshlash_broken$func_quote_portable_result in
+            :*|*[\[\*\?]*)
+              func_quote_portable_result=`$ECHO "$func_quote_portable_result" \
+                  | $SED "$sed_quote_subst"`
+              break
               ;;
-            esac
+          esac
+
+          func_quote_portable_old_IFS=$IFS
+          for _G_char in '\' '`' '"' '$'
+          do
+            # STATE($1) PREV($2) SEPARATOR($3)
+            set start "" ""
+            func_quote_portable_result=dummy"$_G_char$func_quote_portable_result$_G_char"dummy
+            IFS=$_G_char
+            for _G_part in $func_quote_portable_result
+            do
+              case $1 in
+              quote)
+                func_append func_quote_portable_result "$3$2"
+                set quote "$_G_part" "\\$_G_char"
+                ;;
+              start)
+                set first "" ""
+                func_quote_portable_result=
+                ;;
+              first)
+                set quote "$_G_part" ""
+                ;;
+              esac
+            done
           done
-          IFS=$func_quote_old_IFS
-        done
+          IFS=$func_quote_portable_old_IFS
+          ;;
+        *) ;;
+      esac
+      break
+    done
+
+    func_quote_portable_unquoted_result=$func_quote_portable_result
+    case $func_quote_portable_result in
+      # double-quote args containing shell metacharacters to delay
+      # word splitting, command substitution and variable expansion
+      # for a subsequent eval.
+      # many bourne shells cannot handle close brackets correctly
+      # in scan sets, so we specify it separately.
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+        func_quote_portable_result=\"$func_quote_portable_result\"
         ;;
-      *) ;;
     esac
 }
 
 
-# func_quote_for_eval ARG...
-# --------------------------
-# Aesthetically quote ARGs to be evaled later.
-# This function returns two values:
-#   i) func_quote_for_eval_result
-#      double-quoted, suitable for a subsequent eval
-#  ii) func_quote_for_eval_unquoted_result
-#      has all characters that are still active within double
-#      quotes backslashified.
-func_quote_for_eval ()
-{
-    $debug_cmd
-
-    func_quote_for_eval_unquoted_result=
-    func_quote_for_eval_result=
-    while test 0 -lt $#; do
-      func_quote "$1"
-      _G_unquoted_arg=$func_quote_result
-      if test -n "$func_quote_for_eval_unquoted_result"; then
-	func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg"
-      else
-        func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg"
-      fi
-
-      case $_G_unquoted_arg in
-        # Double-quote args containing shell metacharacters to delay
-        # word splitting, command substitution and variable expansion
-        # for a subsequent eval.
-        # Many Bourne shells cannot handle close brackets correctly
-        # in scan sets, so we specify it separately.
-        *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
-          _G_quoted_arg=\"$_G_unquoted_arg\"
+# func_quotefast_eval ARG
+# -----------------------
+# Quote one ARG (internal).  This is equivalent to 'func_quote_arg eval ARG',
+# but optimized for speed.  Result is stored in $func_quotefast_eval.
+if test xyes = `(x=; printf -v x %q yes; echo x"$x") 2>/dev/null`; then
+  printf -v _GL_test_printf_tilde %q '~'
+  if test '\~' = "$_GL_test_printf_tilde"; then
+    func_quotefast_eval ()
+    {
+      printf -v func_quotefast_eval_result %q "$1"
+    }
+  else
+    # Broken older Bash implementations.  Make those faster too if possible.
+    func_quotefast_eval ()
+    {
+      case $1 in
+        '~'*)
+          func_quote_portable false "$1"
+          func_quotefast_eval_result=$func_quote_portable_result
           ;;
         *)
-          _G_quoted_arg=$_G_unquoted_arg
-	  ;;
+          printf -v func_quotefast_eval_result %q "$1"
+          ;;
       esac
+    }
+  fi
+else
+  func_quotefast_eval ()
+  {
+    func_quote_portable false "$1"
+    func_quotefast_eval_result=$func_quote_portable_result
+  }
+fi
 
-      if test -n "$func_quote_for_eval_result"; then
-	func_append func_quote_for_eval_result " $_G_quoted_arg"
-      else
-        func_append func_quote_for_eval_result "$_G_quoted_arg"
-      fi
-      shift
-    done
-}
-
-
-# func_quote_for_expand ARG
-# -------------------------
-# Aesthetically quote ARG to be evaled later; same as above,
-# but do not quote variable references.
-func_quote_for_expand ()
-{
-    $debug_cmd
 
-    case $1 in
-      *[\\\`\"]*)
-	_G_arg=`$ECHO "$1" | $SED \
-	    -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;;
-      *)
-        _G_arg=$1 ;;
+# func_quote_arg MODEs ARG
+# ------------------------
+# Quote one ARG to be evaled later.  MODEs argument may contain zero or more
+# specifiers listed below separated by ',' character.  This function returns two
+# values:
+#   i) func_quote_arg_result
+#      double-quoted (when needed), suitable for a subsequent eval
+#  ii) func_quote_arg_unquoted_result
+#      has all characters that are still active within double
+#      quotes backslashified.  Available only if 'unquoted' is specified.
+#
+# Available modes:
+# ----------------
+# 'eval' (default)
+#       - escape shell special characters
+# 'expand'
+#       - the same as 'eval';  but do not quote variable references
+# 'pretty'
+#       - request aesthetic output, i.e. '"a b"' instead of 'a\ b'.  This might
+#         be used later in func_quote to get output like: 'echo "a b"' instead
+#         of 'echo a\ b'.  This is slower than default on some shells.
+# 'unquoted'
+#       - produce also $func_quote_arg_unquoted_result which does not contain
+#         wrapping double-quotes.
+#
+# Examples for 'func_quote_arg pretty,unquoted string':
+#
+#   string      | *_result              | *_unquoted_result
+#   ------------+-----------------------+-------------------
+#   "           | \"                    | \"
+#   a b         | "a b"                 | a b
+#   "a b"       | "\"a b\""             | \"a b\"
+#   *           | "*"                   | *
+#   z="${x-$y}" | "z=\"\${x-\$y}\""     | z=\"\${x-\$y}\"
+#
+# Examples for 'func_quote_arg pretty,unquoted,expand string':
+#
+#   string        |   *_result          |  *_unquoted_result
+#   --------------+---------------------+--------------------
+#   z="${x-$y}"   | "z=\"${x-$y}\""     | z=\"${x-$y}\"
+func_quote_arg ()
+{
+    _G_quote_expand=false
+    case ,$1, in
+      *,expand,*)
+        _G_quote_expand=:
+        ;;
     esac
 
-    case $_G_arg in
-      # Double-quote args containing shell metacharacters to delay
-      # word splitting and command substitution for a subsequent eval.
-      # Many Bourne shells cannot handle close brackets correctly
-      # in scan sets, so we specify it separately.
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
-        _G_arg=\"$_G_arg\"
+    case ,$1, in
+      *,pretty,*|*,expand,*|*,unquoted,*)
+        func_quote_portable $_G_quote_expand "$2"
+        func_quote_arg_result=$func_quote_portable_result
+        func_quote_arg_unquoted_result=$func_quote_portable_unquoted_result
+        ;;
+      *)
+        # Faster quote-for-eval for some shells.
+        func_quotefast_eval "$2"
+        func_quote_arg_result=$func_quotefast_eval_result
         ;;
     esac
+}
 
-    func_quote_for_expand_result=$_G_arg
+
+# func_quote MODEs ARGs...
+# ------------------------
+# Quote all ARGs to be evaled later and join them into single command.  See
+# func_quote_arg's description for more info.
+func_quote ()
+{
+    $debug_cmd
+    _G_func_quote_mode=$1 ; shift
+    func_quote_result=
+    while test 0 -lt $#; do
+      func_quote_arg "$_G_func_quote_mode" "$1"
+      if test -n "$func_quote_result"; then
+        func_append func_quote_result " $func_quote_arg_result"
+      else
+        func_append func_quote_result "$func_quote_arg_result"
+      fi
+      shift
+    done
 }
 
 
@@ -1262,8 +1376,8 @@ func_show_eval ()
     _G_cmd=$1
     _G_fail_exp=${2-':'}
 
-    func_quote_for_expand "$_G_cmd"
-    eval "func_notquiet $func_quote_for_expand_result"
+    func_quote_arg pretty,expand "$_G_cmd"
+    eval "func_notquiet $func_quote_arg_result"
 
     $opt_dry_run || {
       eval "$_G_cmd"
@@ -1288,8 +1402,8 @@ func_show_eval_locale ()
     _G_fail_exp=${2-':'}
 
     $opt_quiet || {
-      func_quote_for_expand "$_G_cmd"
-      eval "func_echo $func_quote_for_expand_result"
+      func_quote_arg expand,pretty "$_G_cmd"
+      eval "func_echo $func_quote_arg_result"
     }
 
     $opt_dry_run || {
@@ -1416,30 +1530,26 @@ func_lt_ver ()
 # End:
 #! /bin/sh
 
-# Set a version string for this script.
-scriptversion=2014-01-07.03; # UTC
-
 # A portable, pluggable option parser for Bourne shell.
 # Written by Gary V. Vaughan, 2010
 
-# Copyright (C) 2010-2015 Free Software Foundation, Inc.
-# This is free software; see the source for copying conditions.  There is NO
-# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
+# This is free software.  There is NO warranty; not even for
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+#
+# Copyright (C) 2010-2019, 2021 Bootstrap Authors
+#
+# This file is dual licensed under the terms of the MIT license
+# <https://opensource.org/license/MIT>, and GPL version 2 or later
+# <http://www.gnu.org/licenses/gpl-2.0.html>.  You must apply one of
+# these licenses when using or redistributing this software or any of
+# the files within it.  See the URLs above, or the file `LICENSE`
+# included in the Bootstrap distribution for the full license texts.
 
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+# Please report bugs or propose patches to:
+# <https://github.com/gnulib-modules/bootstrap/issues>
 
-# Please report bugs or propose patches to gary@gnu.org.
+# Set a version string for this script.
+scriptversion=2019-02-19.15; # UTC
 
 
 ## ------ ##
@@ -1462,7 +1572,7 @@ scriptversion=2014-01-07.03; # UTC
 #
 # In order for the '--version' option to work, you will need to have a
 # suitably formatted comment like the one at the top of this file
-# starting with '# Written by ' and ending with '# warranty; '.
+# starting with '# Written by ' and ending with '# Copyright'.
 #
 # For '-h' and '--help' to work, you will also need a one line
 # description of your script's purpose in a comment directly above the
@@ -1474,7 +1584,7 @@ scriptversion=2014-01-07.03; # UTC
 # to display verbose messages only when your user has specified
 # '--verbose'.
 #
-# After sourcing this file, you can plug processing for additional
+# After sourcing this file, you can plug in processing for additional
 # options by amending the variables from the 'Configuration' section
 # below, and following the instructions in the 'Option parsing'
 # section further down.
@@ -1523,8 +1633,8 @@ fatal_help="Try '\$progname --help' for more information."
 ## ------------------------- ##
 
 # This section contains functions for adding, removing, and running hooks
-# to the main code.  A hook is just a named list of of function, that can
-# be run in order later on.
+# in the main code.  A hook is just a list of function names that can be
+# run in order later on.
 
 # func_hookable FUNC_NAME
 # -----------------------
@@ -1557,7 +1667,8 @@ func_add_hook ()
 
 # func_remove_hook FUNC_NAME HOOK_FUNC
 # ------------------------------------
-# Remove HOOK_FUNC from the list of functions called by FUNC_NAME.
+# Remove HOOK_FUNC from the list of hook functions to be called by
+# FUNC_NAME.
 func_remove_hook ()
 {
     $debug_cmd
@@ -1566,10 +1677,28 @@ func_remove_hook ()
 }
 
 
+# func_propagate_result FUNC_NAME_A FUNC_NAME_B
+# ---------------------------------------------
+# If the *_result variable of FUNC_NAME_A _is set_, assign its value to
+# *_result variable of FUNC_NAME_B.
+func_propagate_result ()
+{
+    $debug_cmd
+
+    func_propagate_result_result=:
+    if eval "test \"\${${1}_result+set}\" = set"
+    then
+      eval "${2}_result=\$${1}_result"
+    else
+      func_propagate_result_result=false
+    fi
+}
+
+
 # func_run_hooks FUNC_NAME [ARG]...
 # ---------------------------------
 # Run all hook functions registered to FUNC_NAME.
-# It is assumed that the list of hook functions contains nothing more
+# It's assumed that the list of hook functions contains nothing more
 # than a whitespace-delimited list of legal shell function names, and
 # no effort is wasted trying to catch shell meta-characters or preserve
 # whitespace.
@@ -1579,22 +1708,19 @@ func_run_hooks ()
 
     case " $hookable_fns " in
       *" $1 "*) ;;
-      *) func_fatal_error "'$1' does not support hook funcions.n" ;;
+      *) func_fatal_error "'$1' does not support hook functions." ;;
     esac
 
     eval _G_hook_fns=\$$1_hooks; shift
 
     for _G_hook in $_G_hook_fns; do
-      eval $_G_hook '"$@"'
-
-      # store returned options list back into positional
-      # parameters for next 'cmd' execution.
-      eval _G_hook_result=\$${_G_hook}_result
-      eval set dummy "$_G_hook_result"; shift
+      func_unset "${_G_hook}_result"
+      eval $_G_hook '${1+"$@"}'
+      func_propagate_result $_G_hook func_run_hooks
+      if $func_propagate_result_result; then
+        eval set dummy "$func_run_hooks_result"; shift
+      fi
     done
-
-    func_quote_for_eval ${1+"$@"}
-    func_run_hooks_result=$func_quote_for_eval_result
 }
 
 
@@ -1604,10 +1730,18 @@ func_run_hooks ()
 ## --------------- ##
 
 # In order to add your own option parsing hooks, you must accept the
-# full positional parameter list in your hook function, remove any
-# options that you action, and then pass back the remaining unprocessed
-# options in '<hooked_function_name>_result', escaped suitably for
-# 'eval'.  Like this:
+# full positional parameter list from your hook function.  You may remove
+# or edit any options that you action, and then pass back the remaining
+# unprocessed options in '<hooked_function_name>_result', escaped
+# suitably for 'eval'.
+#
+# The '<hooked_function_name>_result' variable is automatically unset
+# before your hook gets called; for best performance, only set the
+# *_result variable when necessary (i.e. don't call the 'func_quote'
+# function unnecessarily because it can be an expensive operation on some
+# machines).
+#
+# Like this:
 #
 #    my_options_prep ()
 #    {
@@ -1617,9 +1751,8 @@ func_run_hooks ()
 #        usage_message=$usage_message'
 #      -s, --silent       don'\''t print informational messages
 #    '
-#
-#        func_quote_for_eval ${1+"$@"}
-#        my_options_prep_result=$func_quote_for_eval_result
+#        # No change in '$@' (ignored completely by this hook).  Leave
+#        # my_options_prep_result variable intact.
 #    }
 #    func_add_hook func_options_prep my_options_prep
 #
@@ -1628,25 +1761,36 @@ func_run_hooks ()
 #    {
 #        $debug_cmd
 #
-#        # Note that for efficiency, we parse as many options as we can
+#        args_changed=false
+#
+#        # Note that, for efficiency, we parse as many options as we can
 #        # recognise in a loop before passing the remainder back to the
 #        # caller on the first unrecognised argument we encounter.
 #        while test $# -gt 0; do
 #          opt=$1; shift
 #          case $opt in
-#            --silent|-s) opt_silent=: ;;
+#            --silent|-s) opt_silent=:
+#                         args_changed=:
+#                         ;;
 #            # Separate non-argument short options:
 #            -s*)         func_split_short_opt "$_G_opt"
 #                         set dummy "$func_split_short_opt_name" \
 #                             "-$func_split_short_opt_arg" ${1+"$@"}
 #                         shift
+#                         args_changed=:
 #                         ;;
-#            *)            set dummy "$_G_opt" "$*"; shift; break ;;
+#            *)           # Make sure the first unrecognised option "$_G_opt"
+#                         # is added back to "$@" in case we need it later,
+#                         # if $args_changed was set to 'true'.
+#                         set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
 #          esac
 #        done
 #
-#        func_quote_for_eval ${1+"$@"}
-#        my_silent_option_result=$func_quote_for_eval_result
+#        # Only call 'func_quote' here if we processed at least one argument.
+#        if $args_changed; then
+#          func_quote eval ${1+"$@"}
+#          my_silent_option_result=$func_quote_result
+#        fi
 #    }
 #    func_add_hook func_parse_options my_silent_option
 #
@@ -1657,17 +1801,26 @@ func_run_hooks ()
 #
 #        $opt_silent && $opt_verbose && func_fatal_help "\
 #    '--silent' and '--verbose' options are mutually exclusive."
-#
-#        func_quote_for_eval ${1+"$@"}
-#        my_option_validation_result=$func_quote_for_eval_result
 #    }
 #    func_add_hook func_validate_options my_option_validation
 #
-# You'll alse need to manually amend $usage_message to reflect the extra
+# You'll also need to manually amend $usage_message to reflect the extra
 # options you parse.  It's preferable to append if you can, so that
 # multiple option parsing hooks can be added safely.
 
 
+# func_options_finish [ARG]...
+# ----------------------------
+# Finishing the option parse loop (call 'func_options' hooks ATM).
+func_options_finish ()
+{
+    $debug_cmd
+
+    func_run_hooks func_options ${1+"$@"}
+    func_propagate_result func_run_hooks func_options_finish
+}
+
+
 # func_options [ARG]...
 # ---------------------
 # All the functions called inside func_options are hookable. See the
@@ -1677,17 +1830,27 @@ func_options ()
 {
     $debug_cmd
 
-    func_options_prep ${1+"$@"}
-    eval func_parse_options \
-        ${func_options_prep_result+"$func_options_prep_result"}
-    eval func_validate_options \
-        ${func_parse_options_result+"$func_parse_options_result"}
+    _G_options_quoted=false
 
-    eval func_run_hooks func_options \
-        ${func_validate_options_result+"$func_validate_options_result"}
+    for my_func in options_prep parse_options validate_options options_finish
+    do
+      func_unset func_${my_func}_result
+      func_unset func_run_hooks_result
+      eval func_$my_func '${1+"$@"}'
+      func_propagate_result func_$my_func func_options
+      if $func_propagate_result_result; then
+        eval set dummy "$func_options_result"; shift
+        _G_options_quoted=:
+      fi
+    done
 
-    # save modified positional parameters for caller
-    func_options_result=$func_run_hooks_result
+    $_G_options_quoted || {
+      # As we (func_options) are top-level options-parser function and
+      # nobody quoted "$@" for us yet, we need to do it explicitly for
+      # caller.
+      func_quote eval ${1+"$@"}
+      func_options_result=$func_quote_result
+    }
 }
 
 
@@ -1696,9 +1859,8 @@ func_options ()
 # All initialisations required before starting the option parse loop.
 # Note that when calling hook functions, we pass through the list of
 # positional parameters.  If a hook function modifies that list, and
-# needs to propogate that back to rest of this script, then the complete
-# modified list must be put in 'func_run_hooks_result' before
-# returning.
+# needs to propagate that back to rest of this script, then the complete
+# modified list must be put in 'func_run_hooks_result' before returning.
 func_hookable func_options_prep
 func_options_prep ()
 {
@@ -1709,9 +1871,7 @@ func_options_prep ()
     opt_warning_types=
 
     func_run_hooks func_options_prep ${1+"$@"}
-
-    # save modified positional parameters for caller
-    func_options_prep_result=$func_run_hooks_result
+    func_propagate_result func_run_hooks func_options_prep
 }
 
 
@@ -1723,25 +1883,32 @@ func_parse_options ()
 {
     $debug_cmd
 
-    func_parse_options_result=
-
+    _G_parse_options_requote=false
     # this just eases exit handling
     while test $# -gt 0; do
       # Defer to hook functions for initial option parsing, so they
       # get priority in the event of reusing an option name.
       func_run_hooks func_parse_options ${1+"$@"}
-
-      # Adjust func_parse_options positional parameters to match
-      eval set dummy "$func_run_hooks_result"; shift
+      func_propagate_result func_run_hooks func_parse_options
+      if $func_propagate_result_result; then
+        eval set dummy "$func_parse_options_result"; shift
+        # Even though we may have changed "$@", we passed the "$@" array
+        # down into the hook and it quoted it for us (because we are in
+        # this if-branch).  No need to quote it again.
+        _G_parse_options_requote=false
+      fi
 
       # Break out of the loop if we already parsed every option.
       test $# -gt 0 || break
 
+      # We expect that one of the options parsed in this function matches
+      # and thus we remove _G_opt from "$@" and need to re-quote.
+      _G_match_parse_options=:
       _G_opt=$1
       shift
       case $_G_opt in
         --debug|-x)   debug_cmd='set -x'
-                      func_echo "enabling shell trace mode"
+                      func_echo "enabling shell trace mode" >&2
                       $debug_cmd
                       ;;
 
@@ -1751,7 +1918,10 @@ func_parse_options ()
 		      ;;
 
         --warnings|--warning|-W)
-                      test $# = 0 && func_missing_arg $_G_opt && break
+                      if test $# = 0 && func_missing_arg $_G_opt; then
+                        _G_parse_options_requote=:
+                        break
+                      fi
                       case " $warning_categories $1" in
                         *" $1 "*)
                           # trailing space prevents matching last $1 above
@@ -1804,15 +1974,24 @@ func_parse_options ()
                       shift
                       ;;
 
-        --)           break ;;
+        --)           _G_parse_options_requote=: ; break ;;
         -*)           func_fatal_help "unrecognised option: '$_G_opt'" ;;
-        *)            set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
+        *)            set dummy "$_G_opt" ${1+"$@"}; shift
+                      _G_match_parse_options=false
+                      break
+                      ;;
       esac
+
+      if $_G_match_parse_options; then
+        _G_parse_options_requote=:
+      fi
     done
 
-    # save modified positional parameters for caller
-    func_quote_for_eval ${1+"$@"}
-    func_parse_options_result=$func_quote_for_eval_result
+    if $_G_parse_options_requote; then
+      # save modified positional parameters for caller
+      func_quote eval ${1+"$@"}
+      func_parse_options_result=$func_quote_result
+    fi
 }
 
 
@@ -1829,12 +2008,10 @@ func_validate_options ()
     test -n "$opt_warning_types" || opt_warning_types=" $warning_categories"
 
     func_run_hooks func_validate_options ${1+"$@"}
+    func_propagate_result func_run_hooks func_validate_options
 
     # Bail if the options were screwed!
     $exit_cmd $EXIT_FAILURE
-
-    # save modified positional parameters for caller
-    func_validate_options_result=$func_run_hooks_result
 }
 
 
@@ -1890,8 +2067,8 @@ func_missing_arg ()
 
 # func_split_equals STRING
 # ------------------------
-# Set func_split_equals_lhs and func_split_equals_rhs shell variables after
-# splitting STRING at the '=' sign.
+# Set func_split_equals_lhs and func_split_equals_rhs shell variables
+# after splitting STRING at the '=' sign.
 test -z "$_G_HAVE_XSI_OPS" \
     && (eval 'x=a/b/c;
       test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \
@@ -1906,8 +2083,9 @@ then
 
       func_split_equals_lhs=${1%%=*}
       func_split_equals_rhs=${1#*=}
-      test "x$func_split_equals_lhs" = "x$1" \
-        && func_split_equals_rhs=
+      if test "x$func_split_equals_lhs" = "x$1"; then
+        func_split_equals_rhs=
+      fi
   }'
 else
   # ...otherwise fall back to using expr, which is often a shell builtin.
@@ -1917,7 +2095,7 @@ else
 
       func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'`
       func_split_equals_rhs=
-      test "x$func_split_equals_lhs" = "x$1" \
+      test "x$func_split_equals_lhs=" = "x$1" \
         || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'`
   }
 fi #func_split_equals
@@ -1943,7 +2121,7 @@ else
   {
       $debug_cmd
 
-      func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'`
+      func_split_short_opt_name=`expr "x$1" : 'x\(-.\)'`
       func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'`
   }
 fi #func_split_short_opt
@@ -1985,31 +2163,44 @@ func_usage_message ()
 # func_version
 # ------------
 # Echo version message to standard output and exit.
+# The version message is extracted from the calling file's header
+# comments, with leading '# ' stripped:
+#   1. First display the progname and version
+#   2. Followed by the header comment line matching  /^# Written by /
+#   3. Then a blank line followed by the first following line matching
+#      /^# Copyright /
+#   4. Immediately followed by any lines between the previous matches,
+#      except lines preceding the intervening completely blank line.
+# For example, see the header comments of this file.
 func_version ()
 {
     $debug_cmd
 
     printf '%s\n' "$progname $scriptversion"
     $SED -n '
-        /(C)/!b go
-        :more
-        /\./!{
-          N
-          s|\n# | |
-          b more
-        }
-        :go
-        /^# Written by /,/# warranty; / {
-          s|^# ||
-          s|^# *$||
-          s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2|
-          p
+        /^# Written by /!b
+        s|^# ||; p; n
+
+        :fwd2blnk
+        /./ {
+          n
+          b fwd2blnk
         }
-        /^# Written by / {
-          s|^# ||
-          p
+        p; n
+
+        :holdwrnt
+        s|^# ||
+        s|^# *$||
+        /^Copyright /!{
+          /./H
+          n
+          b holdwrnt
         }
-        /^warranty; /q' < "$progpath"
+
+        s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2|
+        G
+        s|\(\n\)\n*|\1|g
+        p; q' < "$progpath"
 
     exit $?
 }
@@ -2019,12 +2210,12 @@ func_version ()
 # mode: shell-script
 # sh-indentation: 2
 # eval: (add-hook 'before-save-hook 'time-stamp)
-# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
+# time-stamp-pattern: "30/scriptversion=%:y-%02m-%02d.%02H; # UTC"
 # time-stamp-time-zone: "UTC"
 # End:
 
 # Set a version string.
-scriptversion='(GNU libtool) 2.4.6'
+scriptversion='(GNU libtool) 2.4.7'
 
 
 # func_echo ARG...
@@ -2115,7 +2306,7 @@ include the following information:
        compiler:       $LTCC
        compiler flags: $LTCFLAGS
        linker:         $LD (gnu? $with_gnu_ld)
-       version:        $progname (GNU libtool) 2.4.6
+       version:        $progname (GNU libtool) 2.4.7
        automake:       `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
        autoconf:       `($AUTOCONF --version) 2>/dev/null |$SED 1q`
 
@@ -2171,7 +2362,7 @@ fi
 # a configuration failure hint, and exit.
 func_fatal_configuration ()
 {
-    func__fatal_error ${1+"$@"} \
+    func_fatal_error ${1+"$@"} \
       "See the $PACKAGE documentation for more information." \
       "Fatal configuration error."
 }
@@ -2317,6 +2508,8 @@ libtool_options_prep ()
     nonopt=
     preserve_args=
 
+    _G_rc_lt_options_prep=:
+
     # Shorthand for --mode=foo, only valid as the first argument
     case $1 in
     clean|clea|cle|cl)
@@ -2340,11 +2533,16 @@ libtool_options_prep ()
     uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
       shift; set dummy --mode uninstall ${1+"$@"}; shift
       ;;
+    *)
+      _G_rc_lt_options_prep=false
+      ;;
     esac
 
-    # Pass back the list of options.
-    func_quote_for_eval ${1+"$@"}
-    libtool_options_prep_result=$func_quote_for_eval_result
+    if $_G_rc_lt_options_prep; then
+      # Pass back the list of options.
+      func_quote eval ${1+"$@"}
+      libtool_options_prep_result=$func_quote_result
+    fi
 }
 func_add_hook func_options_prep libtool_options_prep
 
@@ -2356,9 +2554,12 @@ libtool_parse_options ()
 {
     $debug_cmd
 
+    _G_rc_lt_parse_options=false
+
     # Perform our own loop to consume as many options as possible in
     # each iteration.
     while test $# -gt 0; do
+      _G_match_lt_parse_options=:
       _G_opt=$1
       shift
       case $_G_opt in
@@ -2433,15 +2634,20 @@ libtool_parse_options ()
                         func_append preserve_args " $_G_opt"
                         ;;
 
-	# An option not handled by this hook function:
-        *)		set dummy "$_G_opt" ${1+"$@"};	shift; break  ;;
+        # An option not handled by this hook function:
+        *)              set dummy "$_G_opt" ${1+"$@"} ; shift
+                        _G_match_lt_parse_options=false
+                        break
+                        ;;
       esac
+      $_G_match_lt_parse_options && _G_rc_lt_parse_options=:
     done
 
-
-    # save modified positional parameters for caller
-    func_quote_for_eval ${1+"$@"}
-    libtool_parse_options_result=$func_quote_for_eval_result
+    if $_G_rc_lt_parse_options; then
+      # save modified positional parameters for caller
+      func_quote eval ${1+"$@"}
+      libtool_parse_options_result=$func_quote_result
+    fi
 }
 func_add_hook func_parse_options libtool_parse_options
 
@@ -2462,17 +2668,10 @@ libtool_validate_options ()
     # preserve --debug
     test : = "$debug_cmd" || func_append preserve_args " --debug"
 
-    case $host in
-      # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452
-      # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788
-      *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*)
-        # don't eliminate duplications in $postdeps and $predeps
-        opt_duplicate_compiler_generated_deps=:
-        ;;
-      *)
-        opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
-        ;;
-    esac
+    # Keeping compiler generated duplicates in $postdeps and $predeps is not
+    # harmful, and is necessary in a majority of systems that use it to satisfy
+    # symbol dependencies.
+    opt_duplicate_compiler_generated_deps=:
 
     $opt_help || {
       # Sanity checks first:
@@ -2498,8 +2697,8 @@ libtool_validate_options ()
     }
 
     # Pass back the unparsed argument list
-    func_quote_for_eval ${1+"$@"}
-    libtool_validate_options_result=$func_quote_for_eval_result
+    func_quote eval ${1+"$@"}
+    libtool_validate_options_result=$func_quote_result
 }
 func_add_hook func_validate_options libtool_validate_options
 
@@ -3465,8 +3664,8 @@ func_mode_compile ()
       esac
     done
 
-    func_quote_for_eval "$libobj"
-    test "X$libobj" != "X$func_quote_for_eval_result" \
+    func_quote_arg pretty "$libobj"
+    test "X$libobj" != "X$func_quote_arg_result" \
       && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"'	 &()|`$[]' \
       && func_warning "libobj name '$libobj' may not contain shell special characters."
     func_dirname_and_basename "$obj" "/" ""
@@ -3539,8 +3738,8 @@ compiler."
 
     func_to_tool_file "$srcfile" func_convert_file_msys_to_w32
     srcfile=$func_to_tool_file_result
-    func_quote_for_eval "$srcfile"
-    qsrcfile=$func_quote_for_eval_result
+    func_quote_arg pretty "$srcfile"
+    qsrcfile=$func_quote_arg_result
 
     # Only build a PIC object if we are building libtool libraries.
     if test yes = "$build_libtool_libs"; then
@@ -3695,7 +3894,8 @@ This mode accepts the following additional options:
   -prefer-non-pic   try to build non-PIC objects only
   -shared           do not build a '.o' file suitable for static linking
   -static           only build a '.o' file suitable for static linking
-  -Wc,FLAG          pass FLAG directly to the compiler
+  -Wc,FLAG
+  -Xcompiler FLAG   pass FLAG directly to the compiler
 
 COMPILE-COMMAND is a command to be used in creating a 'standard' object file
 from the given SOURCEFILE.
@@ -3801,6 +4001,8 @@ The following components of LINK-COMMAND are treated specially:
   -weak LIBNAME     declare that the target provides the LIBNAME interface
   -Wc,FLAG
   -Xcompiler FLAG   pass linker-specific FLAG directly to the compiler
+  -Wa,FLAG
+  -Xassembler FLAG  pass linker-specific FLAG directly to the assembler
   -Wl,FLAG
   -Xlinker FLAG     pass linker-specific FLAG directly to the linker
   -XCClinker FLAG   pass link-specific FLAG to the compiler driver (CC)
@@ -4143,8 +4345,8 @@ func_mode_install ()
        case $nonopt in *shtool*) :;; *) false;; esac
     then
       # Aesthetically quote it.
-      func_quote_for_eval "$nonopt"
-      install_prog="$func_quote_for_eval_result "
+      func_quote_arg pretty "$nonopt"
+      install_prog="$func_quote_arg_result "
       arg=$1
       shift
     else
@@ -4154,8 +4356,8 @@ func_mode_install ()
 
     # The real first argument should be the name of the installation program.
     # Aesthetically quote it.
-    func_quote_for_eval "$arg"
-    func_append install_prog "$func_quote_for_eval_result"
+    func_quote_arg pretty "$arg"
+    func_append install_prog "$func_quote_arg_result"
     install_shared_prog=$install_prog
     case " $install_prog " in
       *[\\\ /]cp\ *) install_cp=: ;;
@@ -4212,12 +4414,12 @@ func_mode_install ()
       esac
 
       # Aesthetically quote the argument.
-      func_quote_for_eval "$arg"
-      func_append install_prog " $func_quote_for_eval_result"
+      func_quote_arg pretty "$arg"
+      func_append install_prog " $func_quote_arg_result"
       if test -n "$arg2"; then
-	func_quote_for_eval "$arg2"
+	func_quote_arg pretty "$arg2"
       fi
-      func_append install_shared_prog " $func_quote_for_eval_result"
+      func_append install_shared_prog " $func_quote_arg_result"
     done
 
     test -z "$install_prog" && \
@@ -4228,8 +4430,8 @@ func_mode_install ()
 
     if test -n "$install_override_mode" && $no_mode; then
       if $install_cp; then :; else
-	func_quote_for_eval "$install_override_mode"
-	func_append install_shared_prog " -m $func_quote_for_eval_result"
+	func_quote_arg pretty "$install_override_mode"
+	func_append install_shared_prog " -m $func_quote_arg_result"
       fi
     fi
 
@@ -4525,8 +4727,8 @@ func_mode_install ()
 	        relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'`
 
 	        $opt_quiet || {
-	          func_quote_for_expand "$relink_command"
-		  eval "func_echo $func_quote_for_expand_result"
+	          func_quote_arg expand,pretty "$relink_command"
+		  eval "func_echo $func_quote_arg_result"
 	        }
 	        if eval "$relink_command"; then :
 	          else
@@ -5305,8 +5507,8 @@ else
   if test \"\$libtool_execute_magic\" != \"$magic\"; then
     file=\"\$0\""
 
-    func_quote "$ECHO"
-    qECHO=$func_quote_result
+    func_quote_arg pretty "$ECHO"
+    qECHO=$func_quote_arg_result
     $ECHO "\
 
 # A function that is used when there is no print builtin or printf.
@@ -5316,7 +5518,7 @@ func_fallback_echo ()
 \$1
 _LTECHO_EOF'
 }
-    ECHO=\"$qECHO\"
+    ECHO=$qECHO
   fi
 
 # Very basic option parsing. These options are (a) specific to
@@ -6659,9 +6861,9 @@ func_mode_link ()
     while test "$#" -gt 0; do
       arg=$1
       shift
-      func_quote_for_eval "$arg"
-      qarg=$func_quote_for_eval_unquoted_result
-      func_append libtool_args " $func_quote_for_eval_result"
+      func_quote_arg pretty,unquoted "$arg"
+      qarg=$func_quote_arg_unquoted_result
+      func_append libtool_args " $func_quote_arg_result"
 
       # If the previous option needs an argument, assign it.
       if test -n "$prev"; then
@@ -6897,6 +7099,13 @@ func_mode_link ()
 	  prev=
 	  continue
 	  ;;
+	xassembler)
+	  func_append compiler_flags " -Xassembler $qarg"
+	  prev=
+	  func_append compile_command " -Xassembler $qarg"
+	  func_append finalize_command " -Xassembler $qarg"
+	  continue
+	  ;;
 	xcclinker)
 	  func_append linker_flags " $qarg"
 	  func_append compiler_flags " $qarg"
@@ -7067,7 +7276,7 @@ func_mode_link ()
 	    # These systems don't actually have a C library (as such)
 	    test X-lc = "X$arg" && continue
 	    ;;
-	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*)
+	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig* | *-*-midnightbsd*)
 	    # Do not include libc due to us having libc/libc_r.
 	    test X-lc = "X$arg" && continue
 	    ;;
@@ -7087,7 +7296,7 @@ func_mode_link ()
 	  esac
 	elif test X-lc_r = "X$arg"; then
 	 case $host in
-	 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*)
+	 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig* | *-*-midnightbsd*)
 	   # Do not include libc_r directly, use -pthread flag.
 	   continue
 	   ;;
@@ -7117,8 +7326,20 @@ func_mode_link ()
 	prev=xcompiler
 	continue
 	;;
-
-      -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
+     # Solaris ld rejects as of 11.4. Refer to Oracle bug 22985199.
+     -pthread)
+	case $host in
+	  *solaris2*) ;;
+	  *)
+	    case "$new_inherited_linker_flags " in
+	        *" $arg "*) ;;
+	        * ) func_append new_inherited_linker_flags " $arg" ;;
+	    esac
+	  ;;
+	esac
+	continue
+	;;
+      -mt|-mthreads|-kthread|-Kthread|-pthreads|--thread-safe \
       |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
 	func_append compiler_flags " $arg"
 	func_append compile_command " $arg"
@@ -7127,16 +7348,6 @@ func_mode_link ()
 	    *" $arg "*) ;;
 	    * ) func_append new_inherited_linker_flags " $arg" ;;
 	esac
-
-	# As we are forced to pass -nostdlib to g++ during linking, the option
-	# -pthread{,s} is not in effect;  add the -lpthread to $deplist
-	# explicitly to link correctly.
-	if test "$tagname" = CXX -a x"$with_gcc" = xyes; then
-	  case "$arg" in
-	    -pthread*) func_append deplibs " -lpthread" ;;
-	  esac
-	fi
-
 	continue
 	;;
 
@@ -7269,9 +7480,9 @@ func_mode_link ()
 	save_ifs=$IFS; IFS=,
 	for flag in $args; do
 	  IFS=$save_ifs
-          func_quote_for_eval "$flag"
-	  func_append arg " $func_quote_for_eval_result"
-	  func_append compiler_flags " $func_quote_for_eval_result"
+          func_quote_arg pretty "$flag"
+	  func_append arg " $func_quote_arg_result"
+	  func_append compiler_flags " $func_quote_arg_result"
 	done
 	IFS=$save_ifs
 	func_stripname ' ' '' "$arg"
@@ -7285,16 +7496,21 @@ func_mode_link ()
 	save_ifs=$IFS; IFS=,
 	for flag in $args; do
 	  IFS=$save_ifs
-          func_quote_for_eval "$flag"
-	  func_append arg " $wl$func_quote_for_eval_result"
-	  func_append compiler_flags " $wl$func_quote_for_eval_result"
-	  func_append linker_flags " $func_quote_for_eval_result"
+          func_quote_arg pretty "$flag"
+	  func_append arg " $wl$func_quote_arg_result"
+	  func_append compiler_flags " $wl$func_quote_arg_result"
+	  func_append linker_flags " $func_quote_arg_result"
 	done
 	IFS=$save_ifs
 	func_stripname ' ' '' "$arg"
 	arg=$func_stripname_result
 	;;
 
+      -Xassembler)
+        prev=xassembler
+        continue
+        ;;
+
       -Xcompiler)
 	prev=xcompiler
 	continue
@@ -7312,8 +7528,8 @@ func_mode_link ()
 
       # -msg_* for osf cc
       -msg_*)
-	func_quote_for_eval "$arg"
-	arg=$func_quote_for_eval_result
+	func_quote_arg pretty "$arg"
+	arg=$func_quote_arg_result
 	;;
 
       # Flags to be passed through unchanged, with rationale:
@@ -7334,12 +7550,13 @@ func_mode_link ()
       # -stdlib=*            select c++ std lib with clang
       # -fsanitize=*         Clang/GCC memory and address sanitizer
       # -fuse-ld=*           Linker select flags for GCC
+      # -Wa,*                Pass flags directly to the assembler
       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
       -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
       -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
-      -specs=*|-fsanitize=*|-fuse-ld=*)
-        func_quote_for_eval "$arg"
-	arg=$func_quote_for_eval_result
+      -specs=*|-fsanitize=*|-fuse-ld=*|-Wa,*)
+        func_quote_arg pretty "$arg"
+	arg=$func_quote_arg_result
         func_append compile_command " $arg"
         func_append finalize_command " $arg"
         func_append compiler_flags " $arg"
@@ -7360,15 +7577,15 @@ func_mode_link ()
 	  continue
         else
 	  # Otherwise treat like 'Some other compiler flag' below
-	  func_quote_for_eval "$arg"
-	  arg=$func_quote_for_eval_result
+	  func_quote_arg pretty "$arg"
+	  arg=$func_quote_arg_result
         fi
 	;;
 
       # Some other compiler flag.
       -* | +*)
-        func_quote_for_eval "$arg"
-	arg=$func_quote_for_eval_result
+        func_quote_arg pretty "$arg"
+	arg=$func_quote_arg_result
 	;;
 
       *.$objext)
@@ -7488,8 +7705,8 @@ func_mode_link ()
       *)
 	# Unknown arguments in both finalize_command and compile_command need
 	# to be aesthetically quoted because they are evaled later.
-	func_quote_for_eval "$arg"
-	arg=$func_quote_for_eval_result
+	func_quote_arg pretty "$arg"
+	arg=$func_quote_arg_result
 	;;
       esac # arg
 
@@ -8694,7 +8911,7 @@ func_mode_link ()
       test CXX = "$tagname" && {
         case $host_os in
         linux*)
-          case `$CC -V 2>&1 | sed 5q` in
+          case `$CC -V 2>&1 | $SED 5q` in
           *Sun\ C*) # Sun C++ 5.9
             func_suncc_cstd_abi
 
@@ -8867,7 +9084,7 @@ func_mode_link ()
 	  #
 	  case $version_type in
 	  # correct linux to gnu/linux during the next big refactor
-	  darwin|freebsd-elf|linux|osf|windows|none)
+	  darwin|freebsd-elf|linux|midnightbsd-elf|osf|windows|none)
 	    func_arith $number_major + $number_minor
 	    current=$func_arith_result
 	    age=$number_minor
@@ -8958,7 +9175,7 @@ func_mode_link ()
 	  versuffix=.$current.$revision
 	  ;;
 
-	freebsd-elf)
+	freebsd-elf | midnightbsd-elf)
 	  func_arith $current - $age
 	  major=.$func_arith_result
 	  versuffix=$major.$age.$revision
@@ -9184,7 +9401,7 @@ func_mode_link ()
 	  *-*-netbsd*)
 	    # Don't link with libc until the a.out ld.so is fixed.
 	    ;;
-	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-midnightbsd*)
 	    # Do not include libc due to us having libc/libc_r.
 	    ;;
 	  *-*-sco3.2v5* | *-*-sco5v6*)
@@ -9995,8 +10212,8 @@ EOF
 	    for cmd in $concat_cmds; do
 	      IFS=$save_ifs
 	      $opt_quiet || {
-		  func_quote_for_expand "$cmd"
-		  eval "func_echo $func_quote_for_expand_result"
+		  func_quote_arg expand,pretty "$cmd"
+		  eval "func_echo $func_quote_arg_result"
 	      }
 	      $opt_dry_run || eval "$cmd" || {
 		lt_exit=$?
@@ -10089,8 +10306,8 @@ EOF
 	  eval cmd=\"$cmd\"
 	  IFS=$save_ifs
 	  $opt_quiet || {
-	    func_quote_for_expand "$cmd"
-	    eval "func_echo $func_quote_for_expand_result"
+	    func_quote_arg expand,pretty "$cmd"
+	    eval "func_echo $func_quote_arg_result"
 	  }
 	  $opt_dry_run || eval "$cmd" || {
 	    lt_exit=$?
@@ -10564,12 +10781,13 @@ EOF
 	  elif eval var_value=\$$var; test -z "$var_value"; then
 	    relink_command="$var=; export $var; $relink_command"
 	  else
-	    func_quote_for_eval "$var_value"
-	    relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
+	    func_quote_arg pretty "$var_value"
+	    relink_command="$var=$func_quote_arg_result; export $var; $relink_command"
 	  fi
 	done
-	func_quote "(cd `pwd`; $relink_command)"
-	relink_command=$func_quote_result
+	func_quote eval cd "`pwd`"
+	func_quote_arg pretty,unquoted "($func_quote_result; $relink_command)"
+	relink_command=$func_quote_arg_unquoted_result
       fi
 
       # Only actually do things if not in dry run mode.
@@ -10809,14 +11027,15 @@ EOF
 	elif eval var_value=\$$var; test -z "$var_value"; then
 	  relink_command="$var=; export $var; $relink_command"
 	else
-	  func_quote_for_eval "$var_value"
-	  relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
+	  func_quote_arg pretty,unquoted "$var_value"
+	  relink_command="$var=$func_quote_arg_unquoted_result; export $var; $relink_command"
 	fi
       done
       # Quote the link command for shipping.
-      relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
-      func_quote "$relink_command"
-      relink_command=$func_quote_result
+      func_quote eval cd "`pwd`"
+      relink_command="($func_quote_result; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
+      func_quote_arg pretty,unquoted "$relink_command"
+      relink_command=$func_quote_arg_unquoted_result
       if test yes = "$hardcode_automatic"; then
 	relink_command=
       fi
diff --git a/m4/libtool.m4 b/m4/libtool.m4
index ae7c906..e3adeda 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -1,6 +1,7 @@
 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
 #
-#   Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc.
+#   Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software
+#   Foundation, Inc.
 #   Written by Gordon Matzigkeit, 1996
 #
 # This file is free software; the Free Software Foundation gives
@@ -31,7 +32,7 @@ m4_define([_LT_COPYING], [dnl
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ])
 
-# serial 58 LT_INIT
+# serial 59 LT_INIT
 
 
 # LT_PREREQ(VERSION)
@@ -181,6 +182,7 @@ m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
 m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
 m4_require([_LT_CMD_RELOAD])dnl
+m4_require([_LT_DECL_FILECMD])dnl
 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
 m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
@@ -219,8 +221,8 @@ esac
 ofile=libtool
 can_build_shared=yes
 
-# All known linkers require a '.a' archive for static linking (except MSVC,
-# which needs '.lib').
+# All known linkers require a '.a' archive for static linking (except MSVC and
+# ICC, which need '.lib').
 libext=a
 
 with_gnu_ld=$lt_cv_prog_gnu_ld
@@ -778,7 +780,7 @@ _LT_EOF
   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
   # text mode, it properly converts lines to CR/LF.  This bash problem
   # is reportedly fixed, but why not run on old versions too?
-  sed '$q' "$ltmain" >> "$cfgfile" \
+  $SED '$q' "$ltmain" >> "$cfgfile" \
      || (rm -f "$cfgfile"; exit 1)
 
    mv -f "$cfgfile" "$ofile" ||
@@ -1042,8 +1044,8 @@ int forced_loaded() { return 2;}
 _LT_EOF
       echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
       $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
-      echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
-      $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
+      echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
+      $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
       echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
       $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
       cat > conftest.c << _LT_EOF
@@ -1067,17 +1069,12 @@ _LT_EOF
       _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
     darwin1.*)
       _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
-    darwin*) # darwin 5.x on
-      # if running on 10.5 or later, the deployment target defaults
-      # to the OS version, if on x86, and 10.4, the deployment
-      # target defaults to 10.4. Don't you love it?
-      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
-	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
-	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
-	10.[[012]][[,.]]*)
-	  _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
-	10.*)
-	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
+    darwin*)
+      case $MACOSX_DEPLOYMENT_TARGET,$host in
+        10.[[012]],*|,*powerpc*-darwin[[5-8]]*)
+          _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
+        *)
+          _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
       esac
     ;;
   esac
@@ -1126,12 +1123,12 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
     output_verbose_link_cmd=func_echo_all
     _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
     _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
-    _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
-    _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
+    _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
+    _LT_TAGVAR(module_expsym_cmds, $1)="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
     m4_if([$1], [CXX],
 [   if test yes != "$lt_cv_apple_cc_single_mod"; then
       _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil"
-      _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
+      _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
     fi
 ],[])
   else
@@ -1245,7 +1242,8 @@ _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
 # _LT_WITH_SYSROOT
 # ----------------
 AC_DEFUN([_LT_WITH_SYSROOT],
-[AC_MSG_CHECKING([for sysroot])
+[m4_require([_LT_DECL_SED])dnl
+AC_MSG_CHECKING([for sysroot])
 AC_ARG_WITH([sysroot],
 [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
   [Search for dependent libraries within DIR (or the compiler's sysroot
@@ -1262,7 +1260,7 @@ case $with_sysroot in #(
    fi
    ;; #(
  /*)
-   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
+   lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"`
    ;; #(
  no|'')
    ;; #(
@@ -1292,7 +1290,7 @@ ia64-*-hpux*)
   # options accordingly.
   echo 'int i;' > conftest.$ac_ext
   if AC_TRY_EVAL(ac_compile); then
-    case `/usr/bin/file conftest.$ac_objext` in
+    case `$FILECMD conftest.$ac_objext` in
       *ELF-32*)
 	HPUX_IA64_MODE=32
 	;;
@@ -1309,7 +1307,7 @@ ia64-*-hpux*)
   echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
   if AC_TRY_EVAL(ac_compile); then
     if test yes = "$lt_cv_prog_gnu_ld"; then
-      case `/usr/bin/file conftest.$ac_objext` in
+      case `$FILECMD conftest.$ac_objext` in
 	*32-bit*)
 	  LD="${LD-ld} -melf32bsmip"
 	  ;;
@@ -1321,7 +1319,7 @@ ia64-*-hpux*)
 	;;
       esac
     else
-      case `/usr/bin/file conftest.$ac_objext` in
+      case `$FILECMD conftest.$ac_objext` in
 	*32-bit*)
 	  LD="${LD-ld} -32"
 	  ;;
@@ -1343,7 +1341,7 @@ mips64*-*linux*)
   echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
   if AC_TRY_EVAL(ac_compile); then
     emul=elf
-    case `/usr/bin/file conftest.$ac_objext` in
+    case `$FILECMD conftest.$ac_objext` in
       *32-bit*)
 	emul="${emul}32"
 	;;
@@ -1351,7 +1349,7 @@ mips64*-*linux*)
 	emul="${emul}64"
 	;;
     esac
-    case `/usr/bin/file conftest.$ac_objext` in
+    case `$FILECMD conftest.$ac_objext` in
       *MSB*)
 	emul="${emul}btsmip"
 	;;
@@ -1359,7 +1357,7 @@ mips64*-*linux*)
 	emul="${emul}ltsmip"
 	;;
     esac
-    case `/usr/bin/file conftest.$ac_objext` in
+    case `$FILECMD conftest.$ac_objext` in
       *N32*)
 	emul="${emul}n32"
 	;;
@@ -1379,14 +1377,14 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
   # not appear in the list.
   echo 'int i;' > conftest.$ac_ext
   if AC_TRY_EVAL(ac_compile); then
-    case `/usr/bin/file conftest.o` in
+    case `$FILECMD conftest.o` in
       *32-bit*)
 	case $host in
 	  x86_64-*kfreebsd*-gnu)
 	    LD="${LD-ld} -m elf_i386_fbsd"
 	    ;;
 	  x86_64-*linux*)
-	    case `/usr/bin/file conftest.o` in
+	    case `$FILECMD conftest.o` in
 	      *x86-64*)
 		LD="${LD-ld} -m elf32_x86_64"
 		;;
@@ -1417,10 +1415,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
 	  x86_64-*linux*)
 	    LD="${LD-ld} -m elf_x86_64"
 	    ;;
-	  powerpcle-*linux*|powerpc64le-*linux*)
+	  powerpcle-*linux*)
 	    LD="${LD-ld} -m elf64lppc"
 	    ;;
-	  powerpc-*linux*|powerpc64-*linux*)
+	  powerpc-*linux*)
 	    LD="${LD-ld} -m elf64ppc"
 	    ;;
 	  s390*-*linux*|s390*-*tpf*)
@@ -1454,7 +1452,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
   # options accordingly.
   echo 'int i;' > conftest.$ac_ext
   if AC_TRY_EVAL(ac_compile); then
-    case `/usr/bin/file conftest.o` in
+    case `$FILECMD conftest.o` in
     *64-bit*)
       case $lt_cv_prog_gnu_ld in
       yes*)
@@ -1493,9 +1491,22 @@ need_locks=$enable_libtool_lock
 m4_defun([_LT_PROG_AR],
 [AC_CHECK_TOOLS(AR, [ar], false)
 : ${AR=ar}
-: ${AR_FLAGS=cru}
 _LT_DECL([], [AR], [1], [The archiver])
-_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
+
+# Use ARFLAGS variable as AR's operation code to sync the variable naming with
+# Automake.  If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have
+# higher priority because thats what people were doing historically (setting
+# ARFLAGS for automake and AR_FLAGS for libtool).  FIXME: Make the AR_FLAGS
+# variable obsoleted/removed.
+
+test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr}
+lt_ar_flags=$AR_FLAGS
+_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)])
+
+# Make AR_FLAGS overridable by 'make ARFLAGS='.  Don't try to run-time override
+# by AR_FLAGS because that was never working and AR_FLAGS is about to die.
+_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}],
+         [Flags to create an archive])
 
 AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
   [lt_cv_ar_at_file=no
@@ -1708,18 +1719,13 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
     lt_cv_sys_max_cmd_len=8192;
     ;;
 
-  mint*)
-    # On MiNT this can take a long time and run out of memory.
-    lt_cv_sys_max_cmd_len=8192;
-    ;;
-
   amigaos*)
     # On AmigaOS with pdksh, this test takes hours, literally.
     # So we just punt and use a minimum line length of 8192.
     lt_cv_sys_max_cmd_len=8192;
     ;;
 
-  bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
+  bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*)
     # This has been around since 386BSD, at least.  Likely further.
     if test -x /sbin/sysctl; then
       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
@@ -1762,7 +1768,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
   sysv5* | sco5v6* | sysv4.2uw2*)
     kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
     if test -n "$kargmax"; then
-      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
+      lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[	 ]]//'`
     else
       lt_cv_sys_max_cmd_len=32768
     fi
@@ -2212,26 +2218,35 @@ m4_defun([_LT_CMD_STRIPLIB],
 striplib=
 old_striplib=
 AC_MSG_CHECKING([whether stripping libraries is possible])
-if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
-  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
-  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
-  AC_MSG_RESULT([yes])
+if test -z "$STRIP"; then
+  AC_MSG_RESULT([no])
 else
-# FIXME - insert some real tests, host_os isn't really good enough
-  case $host_os in
-  darwin*)
-    if test -n "$STRIP"; then
+  if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+    old_striplib="$STRIP --strip-debug"
+    striplib="$STRIP --strip-unneeded"
+    AC_MSG_RESULT([yes])
+  else
+    case $host_os in
+    darwin*)
+      # FIXME - insert some real tests, host_os isn't really good enough
       striplib="$STRIP -x"
       old_striplib="$STRIP -S"
       AC_MSG_RESULT([yes])
-    else
+      ;;
+    freebsd*)
+      if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then
+        old_striplib="$STRIP --strip-debug"
+        striplib="$STRIP --strip-unneeded"
+        AC_MSG_RESULT([yes])
+      else
+        AC_MSG_RESULT([no])
+      fi
+      ;;
+    *)
       AC_MSG_RESULT([no])
-    fi
-    ;;
-  *)
-    AC_MSG_RESULT([no])
-    ;;
-  esac
+      ;;
+    esac
+  fi
 fi
 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
 _LT_DECL([], [striplib], [1])
@@ -2554,7 +2569,7 @@ cygwin* | mingw* | pw32* | cegcc*)
     case $host_os in
     cygwin*)
       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
+      soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
 m4_if([$1], [],[
       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
       ;;
@@ -2564,14 +2579,14 @@ m4_if([$1], [],[
       ;;
     pw32*)
       # pw32 DLLs use 'pw' prefix rather than 'lib'
-      library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
+      library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
       ;;
     esac
     dynamic_linker='Win32 ld.exe'
     ;;
 
-  *,cl*)
-    # Native MSVC
+  *,cl* | *,icl*)
+    # Native MSVC or ICC
     libname_spec='$name'
     soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
     library_names_spec='$libname.dll.lib'
@@ -2590,7 +2605,7 @@ m4_if([$1], [],[
       done
       IFS=$lt_save_ifs
       # Convert to MSYS style.
-      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
+      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
       ;;
     cygwin*)
       # Convert to unix form, then to dos form, then back to unix form
@@ -2627,7 +2642,7 @@ m4_if([$1], [],[
     ;;
 
   *)
-    # Assume MSVC wrapper
+    # Assume MSVC and ICC wrapper
     library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
     dynamic_linker='Win32 ld.exe'
     ;;
@@ -2641,11 +2656,11 @@ darwin* | rhapsody*)
   version_type=darwin
   need_lib_prefix=no
   need_version=no
-  library_names_spec='$libname$release$versuffix$shared_ext $libname$release$major$shared_ext $libname$shared_ext'
+  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
   soname_spec='$libname$release$major$shared_ext'
   shlibpath_overrides_runpath=yes
   shlibpath_var=DYLD_LIBRARY_PATH
-  shrext_cmds='`test .$module = .yes && echo .bundle || echo .dylib`'
+  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
 m4_if([$1], [],[
   sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
@@ -2660,7 +2675,7 @@ dgux*)
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
-freebsd* | dragonfly*)
+freebsd* | dragonfly* | midnightbsd*)
   # DragonFly does not have aout.  When/if they implement a new
   # versioning mechanism, adjust this.
   if test -x /usr/bin/objformat; then
@@ -2671,14 +2686,7 @@ freebsd* | dragonfly*)
     *) objformat=elf ;;
     esac
   fi
-  # Handle Gentoo/FreeBSD as it was Linux
-  case $host_vendor in
-    gentoo)
-      version_type=linux ;;
-    *)
-      version_type=freebsd-$objformat ;;
-  esac
-
+  version_type=freebsd-$objformat
   case $version_type in
     freebsd-elf*)
       library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
@@ -2690,12 +2698,6 @@ freebsd* | dragonfly*)
       library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
       need_version=yes
       ;;
-    linux)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-      soname_spec='${libname}${release}${shared_ext}$major'
-      need_lib_prefix=no
-      need_version=no
-      ;;
   esac
   shlibpath_var=LD_LIBRARY_PATH
   case $host_os in
@@ -2885,6 +2887,9 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
   # before this can be enabled.
   hardcode_into_libs=yes
 
+  # Add ABI-specific directories to the system library path.
+  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
+
   # Ideally, we could use ldconfig to report *all* directores which are
   # searched for libraries, however this is still not possible.  Aside from not
   # being certain /sbin/ldconfig is available, command
@@ -2893,7 +2898,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
   # appending ld.so.conf contents (and includes) to the search path.
   if test -f /etc/ld.so.conf; then
     lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
-    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
   fi
 
   # We used to test for /lib/ld.so.1 and disable shared libraries on
@@ -3472,7 +3477,7 @@ beos*)
 
 bsdi[[45]]*)
   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
-  lt_cv_file_magic_cmd='/usr/bin/file -L'
+  lt_cv_file_magic_cmd='$FILECMD -L'
   lt_cv_file_magic_test_file=/shlib/libc.so
   ;;
 
@@ -3506,14 +3511,14 @@ darwin* | rhapsody*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
-freebsd* | dragonfly*)
+freebsd* | dragonfly* | midnightbsd*)
   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
     case $host_cpu in
     i*86 )
       # Not sure whether the presence of OpenBSD here was a mistake.
       # Let's accept both of them until this is cleared up.
       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
-      lt_cv_file_magic_cmd=/usr/bin/file
+      lt_cv_file_magic_cmd=$FILECMD
       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
       ;;
     esac
@@ -3527,7 +3532,7 @@ haiku*)
   ;;
 
 hpux10.20* | hpux11*)
-  lt_cv_file_magic_cmd=/usr/bin/file
+  lt_cv_file_magic_cmd=$FILECMD
   case $host_cpu in
   ia64*)
     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
@@ -3574,7 +3579,7 @@ netbsd*)
 
 newos6*)
   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
-  lt_cv_file_magic_cmd=/usr/bin/file
+  lt_cv_file_magic_cmd=$FILECMD
   lt_cv_file_magic_test_file=/usr/lib/libnls.so
   ;;
 
@@ -3701,13 +3706,13 @@ else
 	mingw*) lt_bad_file=conftest.nm/nofile ;;
 	*) lt_bad_file=/dev/null ;;
 	esac
-	case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
+	case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in
 	*$lt_bad_file* | *'Invalid file or object type'*)
 	  lt_cv_path_NM="$tmp_nm -B"
 	  break 2
 	  ;;
 	*)
-	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+	  case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in
 	  */dev/null*)
 	    lt_cv_path_NM="$tmp_nm -p"
 	    break 2
@@ -3733,7 +3738,7 @@ else
     # Let the user override the test.
   else
     AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
-    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
+    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in
     *COFF*)
       DUMPBIN="$DUMPBIN -symbols -headers"
       ;;
@@ -3973,7 +3978,7 @@ esac
 
 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
   # Gets list of data symbols to import.
-  lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
+  lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'"
   # Adjust the below global symbol transforms to fixup imported variables.
   lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
   lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
@@ -3991,20 +3996,20 @@ fi
 # Transform an extracted symbol line into a proper C declaration.
 # Some systems (esp. on ia64) link data and code symbols differently,
 # so use this general approach.
-lt_cv_sys_global_symbol_to_cdecl="sed -n"\
+lt_cv_sys_global_symbol_to_cdecl="$SED -n"\
 $lt_cdecl_hook\
 " -e 's/^T .* \(.*\)$/extern int \1();/p'"\
 " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
 
 # Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
+lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\
 $lt_c_name_hook\
 " -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
 " -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
 
 # Transform an extracted symbol line into symbol name with lib prefix and
 # symbol address.
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\
 $lt_c_name_lib_hook\
 " -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
 " -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
@@ -4028,7 +4033,7 @@ for ac_symprfx in "" "_"; do
   if test "$lt_cv_nm_interface" = "MS dumpbin"; then
     # Fake it for dumpbin and say T for any non-static function,
     # D for any global variable and I for any imported variable.
-    # Also find C++ and __fastcall symbols from MSVC++,
+    # Also find C++ and __fastcall symbols from MSVC++ or ICC,
     # which start with @ or ?.
     lt_cv_sys_global_symbol_pipe="$AWK ['"\
 "     {last_section=section; section=\$ 3};"\
@@ -4046,9 +4051,9 @@ for ac_symprfx in "" "_"; do
 "     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
 "     ' prfx=^$ac_symprfx]"
   else
-    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+    lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
   fi
-  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
+  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'"
 
   # Check to see that the pipe works correctly.
   pipe_works=no
@@ -4335,7 +4340,7 @@ m4_if([$1], [CXX], [
 	    ;;
 	esac
 	;;
-      freebsd* | dragonfly*)
+      freebsd* | dragonfly* | midnightbsd*)
 	# FreeBSD uses GNU C++
 	;;
       hpux9* | hpux10* | hpux11*)
@@ -4418,7 +4423,7 @@ m4_if([$1], [CXX], [
 	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
 	    ;;
 	  *)
-	    case `$CC -V 2>&1 | sed 5q` in
+	    case `$CC -V 2>&1 | $SED 5q` in
 	    *Sun\ C*)
 	      # Sun C++ 5.9
 	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
@@ -4754,7 +4759,7 @@ m4_if([$1], [CXX], [
 	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
 	;;
       *)
-	case `$CC -V 2>&1 | sed 5q` in
+	case `$CC -V 2>&1 | $SED 5q` in
 	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
 	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
 	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
@@ -4937,7 +4942,7 @@ m4_if([$1], [CXX], [
     if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
       _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
     else
-      _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
+      _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
     fi
     ;;
   pw32*)
@@ -4945,7 +4950,7 @@ m4_if([$1], [CXX], [
     ;;
   cygwin* | mingw* | cegcc*)
     case $cc_basename in
-    cl*)
+    cl* | icl*)
       _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
       ;;
     *)
@@ -5002,15 +5007,15 @@ dnl Note also adjust exclude_expsyms for C++ above.
 
   case $host_os in
   cygwin* | mingw* | pw32* | cegcc*)
-    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
     # When not using gcc, we currently assume that we are using
-    # Microsoft Visual C++.
+    # Microsoft Visual C++ or Intel C++ Compiler.
     if test yes != "$GCC"; then
       with_gnu_ld=no
     fi
     ;;
   interix*)
-    # we just hope/assume this is gcc and not c89 (= MSVC++)
+    # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC)
     with_gnu_ld=yes
     ;;
   openbsd* | bitrig*)
@@ -5062,7 +5067,7 @@ dnl Note also adjust exclude_expsyms for C++ above.
       _LT_TAGVAR(whole_archive_flag_spec, $1)=
     fi
     supports_anon_versioning=no
-    case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
+    case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in
       *GNU\ gold*) supports_anon_versioning=yes ;;
       *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
@@ -5174,6 +5179,7 @@ _LT_EOF
 	emximp -o $lib $output_objdir/$libname.def'
       _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
       _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+      _LT_TAGVAR(file_list_spec, $1)='@'
       ;;
 
     interix[[3-9]]*)
@@ -5188,7 +5194,7 @@ _LT_EOF
       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-      _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      _LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
       ;;
 
     gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
@@ -5231,7 +5237,7 @@ _LT_EOF
 	  _LT_TAGVAR(compiler_needs_object, $1)=yes
 	  ;;
 	esac
-	case `$CC -V 2>&1 | sed 5q` in
+	case `$CC -V 2>&1 | $SED 5q` in
 	*Sun\ C*)			# Sun C 5.9
 	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
 	  _LT_TAGVAR(compiler_needs_object, $1)=yes
@@ -5243,7 +5249,7 @@ _LT_EOF
 
         if test yes = "$supports_anon_versioning"; then
           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
-            cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+            cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
             echo "local: *; };" >> $output_objdir/$libname.ver~
             $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
         fi
@@ -5259,7 +5265,7 @@ _LT_EOF
 	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
 	  if test yes = "$supports_anon_versioning"; then
 	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
-              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+              cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
               echo "local: *; };" >> $output_objdir/$libname.ver~
               $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
 	  fi
@@ -5391,7 +5397,7 @@ _LT_EOF
 	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
 	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
 	else
-	  _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
+	  _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
 	fi
 	aix_use_runtimelinking=no
 
@@ -5574,12 +5580,12 @@ _LT_EOF
 
     cygwin* | mingw* | pw32* | cegcc*)
       # When not using gcc, we currently assume that we are using
-      # Microsoft Visual C++.
+      # Microsoft Visual C++ or Intel C++ Compiler.
       # hardcode_libdir_flag_spec is actually meaningless, as there is
       # no search path for DLLs.
       case $cc_basename in
-      cl*)
-	# Native MSVC
+      cl* | icl*)
+	# Native MSVC or ICC
 	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
 	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
 	_LT_TAGVAR(always_export_symbols, $1)=yes
@@ -5620,7 +5626,7 @@ _LT_EOF
           fi'
 	;;
       *)
-	# Assume MSVC wrapper
+	# Assume MSVC and ICC wrapper
 	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
 	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
 	# Tell ltmain to make .lib files, not .a files.
@@ -5668,7 +5674,7 @@ _LT_EOF
       ;;
 
     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
-    freebsd* | dragonfly*)
+    freebsd* | dragonfly* | midnightbsd*)
       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
       _LT_TAGVAR(hardcode_direct, $1)=yes
@@ -5879,6 +5885,7 @@ _LT_EOF
 	emximp -o $lib $output_objdir/$libname.def'
       _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
       _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+      _LT_TAGVAR(file_list_spec, $1)='@'
       ;;
 
     osf3*)
@@ -6649,8 +6656,8 @@ if test yes != "$_lt_caught_CXX_error"; then
 
       cygwin* | mingw* | pw32* | cegcc*)
 	case $GXX,$cc_basename in
-	,cl* | no,cl*)
-	  # Native MSVC
+	,cl* | no,cl* | ,icl* | no,icl*)
+	  # Native MSVC or ICC
 	  # hardcode_libdir_flag_spec is actually meaningless, as there is
 	  # no search path for DLLs.
 	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
@@ -6748,6 +6755,7 @@ if test yes != "$_lt_caught_CXX_error"; then
 	  emximp -o $lib $output_objdir/$libname.def'
 	_LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
 	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+	_LT_TAGVAR(file_list_spec, $1)='@'
 	;;
 
       dgux*)
@@ -6778,7 +6786,7 @@ if test yes != "$_lt_caught_CXX_error"; then
         _LT_TAGVAR(archive_cmds_need_lc, $1)=no
         ;;
 
-      freebsd* | dragonfly*)
+      freebsd* | dragonfly* | midnightbsd*)
         # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
         # conventions
         _LT_TAGVAR(ld_shlibs, $1)=yes
@@ -6915,7 +6923,7 @@ if test yes != "$_lt_caught_CXX_error"; then
 	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
 	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
 	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
 	;;
       irix5* | irix6*)
         case $cc_basename in
@@ -7055,13 +7063,13 @@ if test yes != "$_lt_caught_CXX_error"; then
 	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
 	    if test yes = "$supports_anon_versioning"; then
 	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
-                cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+                cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
                 echo "local: *; };" >> $output_objdir/$libname.ver~
                 $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
 	    fi
 	    ;;
 	  *)
-	    case `$CC -V 2>&1 | sed 5q` in
+	    case `$CC -V 2>&1 | $SED 5q` in
 	    *Sun\ C*)
 	      # Sun C++ 5.9
 	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
@@ -8207,6 +8215,14 @@ _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
 AC_SUBST([DLLTOOL])
 ])
 
+# _LT_DECL_FILECMD
+# ----------------
+# Check for a file(cmd) program that can be used to detect file type and magic
+m4_defun([_LT_DECL_FILECMD],
+[AC_CHECK_TOOL([FILECMD], [file], [:])
+_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types])
+])# _LD_DECL_FILECMD
+
 # _LT_DECL_SED
 # ------------
 # Check for a fully-functional sed program, that truncates
diff --git a/m4/ltoptions.m4 b/m4/ltoptions.m4
index 94b0829..b0b5e9c 100644
--- a/m4/ltoptions.m4
+++ b/m4/ltoptions.m4
@@ -1,7 +1,7 @@
 # Helper functions for option handling.                    -*- Autoconf -*-
 #
-#   Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software
-#   Foundation, Inc.
+#   Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free
+#   Software Foundation, Inc.
 #   Written by Gary V. Vaughan, 2004
 #
 # This file is free software; the Free Software Foundation gives
diff --git a/m4/ltsugar.m4 b/m4/ltsugar.m4
index 48bc934..902508b 100644
--- a/m4/ltsugar.m4
+++ b/m4/ltsugar.m4
@@ -1,6 +1,6 @@
 # ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
 #
-# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software
+# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software
 # Foundation, Inc.
 # Written by Gary V. Vaughan, 2004
 #
diff --git a/m4/ltversion.m4 b/m4/ltversion.m4
index fa04b52..b155d0a 100644
--- a/m4/ltversion.m4
+++ b/m4/ltversion.m4
@@ -1,6 +1,7 @@
 # ltversion.m4 -- version numbers			-*- Autoconf -*-
 #
-#   Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc.
+#   Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation,
+#   Inc.
 #   Written by Scott James Remnant, 2004
 #
 # This file is free software; the Free Software Foundation gives
@@ -9,15 +10,15 @@
 
 # @configure_input@
 
-# serial 4179 ltversion.m4
+# serial 4245 ltversion.m4
 # This file is part of GNU Libtool
 
-m4_define([LT_PACKAGE_VERSION], [2.4.6])
-m4_define([LT_PACKAGE_REVISION], [2.4.6])
+m4_define([LT_PACKAGE_VERSION], [2.4.7])
+m4_define([LT_PACKAGE_REVISION], [2.4.7])
 
 AC_DEFUN([LTVERSION_VERSION],
-[macro_version='2.4.6'
-macro_revision='2.4.6'
+[macro_version='2.4.7'
+macro_revision='2.4.7'
 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
 _LT_DECL(, macro_revision, 0)
 ])
diff --git a/m4/lt~obsolete.m4 b/m4/lt~obsolete.m4
index c6b26f8..0f7a875 100644
--- a/m4/lt~obsolete.m4
+++ b/m4/lt~obsolete.m4
@@ -1,7 +1,7 @@
 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
 #
-#   Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software
-#   Foundation, Inc.
+#   Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free
+#   Software Foundation, Inc.
 #   Written by Scott James Remnant, 2004.
 #
 # This file is free software; the Free Software Foundation gives
diff --git a/man/Makefile.in b/man/Makefile.in
index 3f68ebd..b9097e9 100644
--- a/man/Makefile.in
+++ b/man/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -109,7 +109,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -182,8 +181,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -197,6 +194,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -215,14 +214,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -239,8 +230,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -296,6 +289,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -379,7 +374,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -403,29 +397,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -463,8 +441,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -475,14 +451,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -680,7 +650,6 @@ ctags CTAGS:
 
 cscope cscopelist:
 
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/man/Xserver.man b/man/Xserver.man
index 31ffb8c..764bd1d 100644
--- a/man/Xserver.man
+++ b/man/Xserver.man
@@ -54,7 +54,8 @@ The X server may also be started directly by the user, though this
 method is usually reserved for testing and is not recommended for
 normal operation.  On some platforms, the user must have special
 permission to start the X server, often because access to certain
-devices (e.g. \fI/dev/mouse\fP) is restricted.
+devices (e.g. \fI/dev/mouse\fP) is restricted.  Where applicable, the
+X server notifies systemd when it is ready to process requests.
 .PP
 When the X server starts up, it typically takes over the display.  If
 you are running on a workstation whose console is the display, you may
@@ -163,11 +164,8 @@ a list of accepted extension names is printed.
 .B \-f \fIvolume\fP
 sets beep (bell) volume (allowable range: 0-100).
 .TP 8
-.B \-fc \fIcursorFont\fP
-sets default cursor font.
-.TP 8
-.B \-fn \fIfont\fP
-sets the default font.
+.B \-fakescreenfps \fFps\fP
+sets fake presenter screen default fps (allowable range: 1-600).
 .TP 8
 .B \-fp \fIfontPath\fP
 sets the search path for fonts.  This path is a comma separated list
@@ -268,14 +266,14 @@ connected to the system.
 sets pointer acceleration threshold in pixels (i.e. after how many pixels
 pointer acceleration should take effect).
 .TP 8
-.B \-terminate
+.B \-terminate \fI[delay]\fP
 causes the server to terminate at server reset, instead of continuing to run.
 This overrides a previous
 .B \-noreset
 command line option.
-.TP 8
-.B \-to \fIseconds\fP
-sets default connection timeout in seconds.
+If a delay in seconds is specified, the server waits for at least
+the delay. At the end of this grace period if no client is
+connected, the server terminates immediately.
 .TP 8
 .B \-tst
 disables all testing extensions (e.g., XTEST, XTrap, XTestExtension1, RECORD).
@@ -289,17 +287,6 @@ sets video-off screen-saver preference.
 .B \-v
 sets video-on screen-saver preference.
 .TP 8
-.B \-wm
-forces the default backing-store of all windows to be WhenMapped.  This
-is a backdoor way of getting backing-store to apply to all windows.
-Although all mapped windows will have backing store, the backing store
-attribute value reported by the server for a window will be the last
-value established by a client.  If it has never been set by a client,
-the server will report the default value, NotUseful.  This behavior is
-required by the X protocol, which allows the server to exceed the
-client's backing store expectations but does not provide a way to tell
-the client that it is doing so.
-.TP 8
 .B \-wr
 sets the default root window to solid white instead of the standard root weave
 pattern.
@@ -621,7 +608,7 @@ Controlling the server once started: \fIxset\fP(1), \fIxsetroot\fP(1),
 \fIxhost\fP(1), \fIxinput\fP(1), \fIxrandr\fP(1)
 .PP
 Server-specific man pages:
-\fIXorg\fP(1), \fIXdmx\fP(1), \fIXephyr\fP(1), \fIXnest\fP(1),
+\fIXorg\fP(1), \fIXephyr\fP(1), \fIXnest\fP(1),
 \fIXvfb\fP(1), \fIXquartz\fP(1), \fIXWin\fP(1).
 .PP
 Server internal documentation:
diff --git a/meson.build b/meson.build
index b3ef00b..bc51d10 100644
--- a/meson.build
+++ b/meson.build
@@ -3,10 +3,12 @@ project('xserver', 'c',
             'buildtype=debugoptimized',
             'c_std=gnu99',
         ],
-        version: '1.20.11',
-        meson_version: '>= 0.42.0',
+        version: '21.1.7',
+        meson_version: '>= 0.47.0',
 )
-add_project_arguments('-DHAVE_DIX_CONFIG_H', language: 'c')
+release_date = '2023-02-07'
+
+add_project_arguments('-DHAVE_DIX_CONFIG_H', language: ['c', 'objc'])
 cc = meson.get_compiler('c')
 
 add_global_arguments('-fno-strict-aliasing', language : 'c')
@@ -56,34 +58,41 @@ foreach wflag: test_wflags
     endif
 endforeach
 
-add_global_arguments(common_wflags, language : 'c')
-
-xproto_dep = dependency('xproto', version: '>= 7.0.31')
-randrproto_dep = dependency('randrproto', version: '>= 1.6.0')
-renderproto_dep = dependency('renderproto', version: '>= 0.11')
-xextproto_dep = dependency('xextproto', version: '>= 7.2.99.901')
-inputproto_dep = dependency('inputproto', version: '>= 2.3')
-kbproto_dep = dependency('kbproto', version: '>= 1.0.3')
-fontsproto_dep = dependency('fontsproto', version: '>= 2.1.3')
-fixesproto_dep = dependency('fixesproto', version: '>= 5.0')
-damageproto_dep = dependency('damageproto', version: '>= 1.1')
-xcmiscproto_dep = dependency('xcmiscproto', version: '>= 1.2.0')
-bigreqsproto_dep = dependency('bigreqsproto', version: '>= 1.1.0')
+add_global_arguments(common_wflags, language : ['c', 'objc'])
+
+libdrm_req = '>= 2.4.89'
+libselinux_req = '>= 2.0.86'
+xext_req = '>= 1.0.99.4'
+wayland_req = '>= 1.5.0'
+wayland_protocols_req = '>= 1.18'
+gbm_req = '>= 10.2'
+xf86dgaproto_req = '>= 2.0.99.1'
+
+xproto_dep = dependency('xproto', version: '>= 7.0.31', fallback: ['xorgproto', 'ext_xorgproto'])
+randrproto_dep = dependency('randrproto', version: '>= 1.6.0', fallback: ['xorgproto', 'ext_xorgproto'])
+renderproto_dep = dependency('renderproto', version: '>= 0.11', fallback: ['xorgproto', 'ext_xorgproto'])
+xextproto_dep = dependency('xextproto', version: '>= 7.2.99.901', fallback: ['xorgproto', 'ext_xorgproto'])
+inputproto_dep = dependency('inputproto', version: '>= 2.3.99.1', fallback: ['xorgproto', 'ext_xorgproto'])
+kbproto_dep = dependency('kbproto', version: '>= 1.0.3', fallback: ['xorgproto', 'ext_xorgproto'])
+fontsproto_dep = dependency('fontsproto', version: '>= 2.1.3', fallback: ['xorgproto', 'ext_xorgproto'])
+fixesproto_dep = dependency('fixesproto', version: '>= 6.0', fallback: ['xorgproto', 'ext_xorgproto'])
+damageproto_dep = dependency('damageproto', version: '>= 1.1', fallback: ['xorgproto', 'ext_xorgproto'])
+xcmiscproto_dep = dependency('xcmiscproto', version: '>= 1.2.0', fallback: ['xorgproto', 'ext_xorgproto'])
+bigreqsproto_dep = dependency('bigreqsproto', version: '>= 1.1.0', fallback: ['xorgproto', 'ext_xorgproto'])
 xtrans_dep = dependency('xtrans', version: '>= 1.3.5')
 
-videoproto_dep = dependency('videoproto')
-compositeproto_dep = dependency('compositeproto', version: '>= 0.4')
-recordproto_dep = dependency('recordproto', version: '>= 1.13.99.1')
-scrnsaverproto_dep = dependency('scrnsaverproto', version: '>= 1.1')
-resourceproto_dep = dependency('resourceproto', version: '>= 1.2.0')
-xf86driproto_dep = dependency('xf86driproto', version: '>= 2.1.0', required: get_option('dri1') == 'true')
-dri2proto_dep = dependency('dri2proto', version: '>= 2.8', required: get_option('dri2') == 'true')
-dri3proto_dep = dependency('dri3proto', version: '>= 1.2', required: get_option('dri3') == 'true')
-xineramaproto_dep = dependency('xineramaproto')
-xf86bigfontproto_dep = dependency('xf86bigfontproto', version: '>= 1.2.0')
-xf86vidmodeproto_dep = dependency('xf86vidmodeproto', version: '>= 2.2.99.1', required: false)
-windowswmproto_dep = dependency('windowswmproto', required: false)
-applewmproto_dep = dependency('applewmproto', version: '>= 1.4', required: false)
+videoproto_dep = dependency('videoproto', fallback: ['xorgproto', 'ext_xorgproto'])
+compositeproto_dep = dependency('compositeproto', version: '>= 0.4', fallback: ['xorgproto', 'ext_xorgproto'])
+recordproto_dep = dependency('recordproto', version: '>= 1.13.99.1', fallback: ['xorgproto', 'ext_xorgproto'])
+scrnsaverproto_dep = dependency('scrnsaverproto', version: '>= 1.1', fallback: ['xorgproto', 'ext_xorgproto'])
+resourceproto_dep = dependency('resourceproto', version: '>= 1.2.0', fallback: ['xorgproto', 'ext_xorgproto'])
+xf86driproto_dep = dependency('xf86driproto', version: '>= 2.1.0', fallback: ['xorgproto', 'ext_xorgproto'], required: get_option('dri1') == 'true')
+dri2proto_dep = dependency('dri2proto', version: '>= 2.8', fallback: ['xorgproto', 'ext_xorgproto'], required: get_option('dri2') == 'true')
+dri3proto_dep = dependency('dri3proto', version: '>= 1.2', fallback: ['xorgproto', 'ext_xorgproto'], required: get_option('dri3') == 'true')
+xineramaproto_dep = dependency('xineramaproto', fallback: ['xorgproto', 'ext_xorgproto'])
+xf86bigfontproto_dep = dependency('xf86bigfontproto', version: '>= 1.2.0', fallback: ['xorgproto', 'ext_xorgproto'], required: get_option('xf86bigfont'))
+xf86vidmodeproto_dep = dependency('xf86vidmodeproto', version: '>= 2.2.99.1', fallback: ['xorgproto', 'ext_xorgproto'])
+applewmproto_dep = dependency('applewmproto', version: '>= 1.4', fallback: ['xorgproto', 'ext_xorgproto'], required: false)
 xshmfence_dep = dependency('xshmfence', version: '>= 1.1', required: false)
 
 pixman_dep = dependency('pixman-1')
@@ -91,17 +100,24 @@ libbsd_dep = dependency('libbsd', required: false)
 xkbcomp_dep = dependency('xkbcomp', required: false)
 xkbfile_dep = dependency('xkbfile')
 xfont2_dep = dependency('xfont2', version: '>= 2.0')
-nettle_dep = dependency('nettle')
 
 dbus_required = get_option('systemd_logind') == 'true'
 dbus_dep = dependency('dbus-1', version: '>= 1.0', required: dbus_required)
 
+# libsystemd-daemon was moved into libsystemd in version 209
+libsystemd_daemon_dep = dependency('libsystemd', version: '>= 209', required: false)
+if not libsystemd_daemon_dep.found()
+    libsystemd_daemon_dep = dependency('libsystemd-daemon', required: false)
+endif
+
 build_hashtable = false
 
 # Resolve default values of some options
 xkb_dir = get_option('xkb_dir')
 if xkb_dir == ''
-    xkb_dir = xkbcomp_dep.get_pkgconfig_variable('xkbconfigdir')
+    if xkbcomp_dep.found() and xkbcomp_dep.type_name() == 'pkgconfig'
+        xkb_dir = xkbcomp_dep.get_pkgconfig_variable('xkbconfigdir')
+    endif
     if xkb_dir == ''
         xkb_dir = join_paths(get_option('prefix'), 'share/X11/xkb')
     endif
@@ -114,7 +130,9 @@ endif
 
 xkb_bin_dir = get_option('xkb_bin_dir')
 if xkb_bin_dir == ''
-    xkb_bin_dir = xkbcomp_dep.get_pkgconfig_variable('bindir')
+    if xkbcomp_dep.found() and xkbcomp_dep.type_name() == 'pkgconfig'
+        xkb_bin_dir = xkbcomp_dep.get_pkgconfig_variable('bindir')
+    endif
     if xkb_bin_dir == ''
         xkb_bin_dir = join_paths(get_option('prefix'), get_option('bindir'))
     endif
@@ -124,14 +142,21 @@ dfp = get_option('default_font_path')
 if dfp == ''
     fontutil_dep = dependency('fontutil')
     fontrootdir = fontutil_dep.get_pkgconfig_variable('fontrootdir')
-    default_font_path = ','.join([
+    dfp_elements = [
         join_paths(fontrootdir, 'misc'),
         join_paths(fontrootdir, 'TTF'),
         join_paths(fontrootdir, 'OTF'),
         join_paths(fontrootdir, 'Type1'),
         join_paths(fontrootdir, '100dpi'),
         join_paths(fontrootdir, '75dpi'),
-    ])
+    ]
+    if host_machine.system() == 'darwin'
+       dfp_elements += [
+       '/Library/Fonts',
+       '/System/Library/Fonts',
+    ]
+    endif
+    default_font_path = ','.join(dfp_elements)
 else
     default_font_path = dfp
 endif
@@ -140,20 +165,26 @@ hal_option = get_option('hal')
 glamor_option = get_option('glamor')
 
 build_udev = get_option('udev')
-if host_machine.system() == 'windows'
+build_udev_kms = get_option('udev_kms')
+if ['windows',  'darwin', 'cygwin'].contains(host_machine.system())
     build_udev = false
+    build_udev_kms = false
     hal_option = 'false'
 endif
 
 if get_option('systemd_logind') == 'auto'
-    build_systemd_logind = build_udev and dbus_dep.found()
+    build_systemd_logind = build_udev_kms and dbus_dep.found()
 else
     build_systemd_logind = get_option('systemd_logind') == 'true'
 endif
 
+with_dtrace = get_option('dtrace')
+if with_dtrace
+    dtrace = find_program('dtrace', required: true)
+endif
+
 build_xorg = false
-if (host_machine.system() != 'darwin' and
-    host_machine.system() != 'windows')
+if (host_machine.system() != 'windows')
     if get_option('xorg') == 'auto'
         build_xorg = (host_machine.system() != 'darwin' and
                       host_machine.system() != 'windows')
@@ -162,38 +193,15 @@ if (host_machine.system() != 'darwin' and
     endif
 endif
 xorgsdkdir = join_paths(get_option('prefix'), get_option('includedir'), 'xorg')
-
-build_xwayland = false
-if (host_machine.system() != 'darwin' and
-    host_machine.system() != 'windows')
-    if get_option('xwayland') != 'false'
-        xwayland_required = get_option('xwayland') == 'true'
-
-        xwayland_dep = [
-            dependency('wayland-client', version: '>= 1.3.0', required: xwayland_required),
-            dependency('wayland-protocols', version: '>= 1.10', required: xwayland_required),
-            dependency('libdrm', version: '>= 2.4.89', required: xwayland_required),
-            dependency('epoxy', required: xwayland_required),
-        ]
-
-        build_xwayland = true
-        # check for all the deps being found, to handle 'auto' mode.
-        foreach d: xwayland_dep
-            if not d.found()
-                build_xwayland = false
-            endif
-        endforeach
-    endif
-endif
+libxcvt_dep = dependency('libxcvt', required: build_xorg)
 
 build_xnest = false
-if (host_machine.system() != 'darwin' and
-    host_machine.system() != 'windows')
+if (host_machine.system() != 'windows')
     if get_option('xnest') != 'false'
         xnest_required = get_option('xnest') == 'true'
 
         xnest_dep = [
-            dependency('xext', version: '>= 1.0.99.4', required: xnest_required),
+            dependency('xext', version: xext_req, required: xnest_required),
             dependency('x11', required: xnest_required),
             dependency('xau', required: xnest_required),
         ]
@@ -218,8 +226,19 @@ else
     build_xwin = get_option('xwin') == 'true'
 endif
 
-# XXX: Finish these.
 build_xquartz = false
+if get_option('xquartz') == 'auto'
+    if host_machine.system() == 'darwin'
+            build_xquartz = true
+    endif
+else
+    build_xquartz = get_option('xquartz') == 'true'
+endif
+
+build_rootless = false
+if build_xquartz
+    build_rootless = true
+endif
 
 if get_option('ipv6') == 'auto'
     build_ipv6 = cc.has_function('getaddrinfo')
@@ -260,7 +279,7 @@ endif
 build_dbus = build_hal or build_systemd_logind
 
 udev_dep = dependency('', required:false)
-if build_udev
+if build_udev or build_udev_kms
     udev_dep = dependency('libudev', version: '>= 143')
 endif
 
@@ -272,36 +291,108 @@ endif
 module_dir = join_paths(get_option('libdir'), get_option('module_dir'))
 
 if glamor_option == 'auto'
-    build_glamor = build_xorg or build_xwayland
+    build_glamor = build_xorg
 else
-    build_glamor = get_option('glamor') == 'true'
+    build_glamor = glamor_option == 'true'
 endif
 
 gbm_dep = dependency('', required: false)
 epoxy_dep = dependency('', required: false)
 if build_glamor
-    gbm_dep = dependency('gbm', version: '>= 10.2', required: false)
+    gbm_dep = dependency('gbm', version: gbm_req, required: false)
     epoxy_dep = dependency('epoxy', required: false)
 endif
 
-eglstream_option = get_option('xwayland_eglstream')
-if build_xwayland and build_glamor
-    eglstream_dep = dependency('wayland-eglstream-protocols', required:false)
-    if eglstream_option == 'auto'
-        build_eglstream = eglstream_dep.found()
-    else
-        build_eglstream = eglstream_option == 'true'
-        if build_eglstream and not eglstream_dep.found()
-            error('glamor EGLStream support requested, but wayland-eglstream-protocols not found')
+# Lots of sha1 options, because Linux is about choice :)
+
+# The idea behind the ordering here is that we should first prefer system
+# builtin providers, and then smaller implementations of over larger ones.
+test_sha1 = [
+    'libc',          # libmd API is in libc on some BSDs
+    'CommonCrypto',  # darwin API
+    'CryptoAPI',     # windows API
+    'libmd',         # other BSDs & Solaris
+    'libsha1',       # "a tiny library providing a SHA1 implementation, created for facilitating X server compilation on embedded devices where larger libraries containing SHA1 implementations are not needed"
+    'libnettle',
+    'libgcrypt',     # in debian base system
+    'libcrypto',
+]
+
+if get_option('sha1') != 'auto'
+    test_sha1 = [get_option('sha1')]
+endif
+
+sha1_found = false
+foreach t : test_sha1
+    if t == 'libc'
+        if cc.has_function('SHA1Init')
+            sha1_found = true
+            sha1_dep = dependency('', required: false)
+        endif
+    elif t == 'CommonCrypto'
+        if cc.has_function('CC_SHA1_Init')
+            sha1_found = true
+            sha1_dep = dependency('', required: false)
         endif
+    elif t == 'CryptoAPI'
+        if cc.has_header('wincrypt.h')
+            sha1_found = true
+            sha1_dep = dependency('', required: false)
+        endif
+    elif t == 'libmd'
+        md_dep = cc.find_library('md', required: false)
+        if md_dep.found()
+            sha1_found = true
+            sha1_dep = md_dep
+        endif
+    elif t == 'libsha1'
+        libsha1_dep = dependency('libsha1', required: false)
+        if libsha1_dep.found()
+            sha1_found = true
+            sha1_dep = libsha1_dep
+        endif
+    elif t == 'libnettle'
+        nettle_dep = dependency('nettle', required: false)
+        if nettle_dep.found()
+            sha1_found = true
+            sha1_dep = nettle_dep
+        endif
+    elif t == 'libgcrypt'
+        gcrypt_dep = dependency('libgcrypt', required: false)
+        if gcrypt_dep.found()
+            sha1_found = true
+            sha1_dep = gcrypt_dep
+        endif
+    elif t == 'libcrypto'
+        # we don't need all of OpenSSL, just libcrypto
+        libcrypto_dep = cc.find_library('crypto', required: false)
+        openssl_dep = dependency('openssl', required: false)
+        if libcrypto_dep.found() or openssl_dep.found()
+            sha1_found = true
+            if libcrypto_dep.found()
+               sha1_dep = libcrypto_dep
+            else
+               sha1_dep = openssl_dep
+            endif
+        endif
+    endif
+
+    if sha1_found
+        sha1 = t
+        break
     endif
+endforeach
+
+if sha1_found
+    message('Using @0@ SHA1 functions'.format(sha1))
 else
-    build_eglstream = false
+    if get_option('sha1') != 'auto'
+        error('@0@ SHA1 requested, but not found'.format(get_option('sha1')))
+    else
+        error('No suitable SHA1 implementation found')
+    endif
 endif
 
-# XXX: Add more sha1 options, because Linux is about choice
-sha1_dep = nettle_dep
-
 xdmcp_dep = dependency('', required : false)
 if get_option('xdmcp')
     xdmcp_dep = dependency('xdmcp')
@@ -318,7 +409,7 @@ if build_glx
     build_hashtable = true
 endif
 
-libdrm_dep = dependency('libdrm', version: '>= 2.4.89', required: false)
+libdrm_dep = dependency('libdrm', version: libdrm_req, required: false)
 
 if get_option('dri1') == 'auto'
     build_dri1 = xf86driproto_dep.found() and libdrm_dep.found()
@@ -343,24 +434,13 @@ else
     endif
 endif
 
-libdrm_required = build_dri1 or build_dri2 or build_dri3
+libdrm_required = (build_dri1 or build_dri2 or build_dri3) and get_option('drm') == true
 if not libdrm_dep.found() and libdrm_required
     error('DRI requested, but LIBDRM not found')
 endif
 
 build_modesetting = libdrm_dep.found() and dri2proto_dep.found()
 
-build_vbe = false
-if get_option('vbe') == 'auto'
-    if (host_machine.system() != 'darwin' and
-        host_machine.system() != 'windows' and
-        host_machine.system() != 'cygwin')
-        build_vbe = true
-    endif
-else
-    build_vbe = get_option('vbe') == 'true'
-endif
-
 build_vgahw = false
 if get_option('vgahw') == 'auto'
     if (host_machine.system() != 'darwin' and
@@ -401,13 +481,14 @@ if not build_xv
 endif
 
 build_dga = false
+xf86dgaproto_dep = dependency('', required: false)
 if get_option('dga') == 'auto'
-    xf86dgaproto_dep = dependency('xf86dgaproto', version: '>= 2.0.99.1', required: false)
+    xf86dgaproto_dep = dependency('xf86dgaproto', version: xf86dgaproto_req, required: false)
     if xf86dgaproto_dep.found()
         build_dga = true
     endif
 elif get_option('dga') == 'true'
-    xf86dgaproto_dep = dependency('xf86dgaproto', version: '>= 2.0.99.1', required: true)
+    xf86dgaproto_dep = dependency('xf86dgaproto', version: xf86dgaproto_req, required: true)
     build_dga = true
 endif
 
@@ -436,10 +517,6 @@ elif get_option('mitshm') == 'true'
     build_mitshm = true
 endif
 
-# XXX: Allow configuration of these.
-build_xselinux = false
-build_xf86vidmode = xf86vidmodeproto_dep.found()
-
 m_dep = cc.find_library('m', required : false)
 dl_dep = cc.find_library('dl', required : false)
 
@@ -456,6 +533,7 @@ common_dep = [
     xcmiscproto_dep,
     bigreqsproto_dep,
     xtrans_dep,
+    libsystemd_daemon_dep,
 
     videoproto_dep,
     compositeproto_dep,
@@ -469,7 +547,6 @@ common_dep = [
     xf86bigfontproto_dep,
     xf86dgaproto_dep,
     xf86vidmodeproto_dep,
-    windowswmproto_dep,
     applewmproto_dep,
 
     pixman_dep,
@@ -500,11 +577,38 @@ inc = include_directories(
     'xfixes',
 )
 
+build_xselinux = false
+if get_option('xselinux') != 'false'
+    dep_selinux = dependency('libselinux', version: libselinux_req,
+			     required: get_option('xselinux') == 'true')
+    dep_audit = dependency('audit', required: get_option('xselinux') == 'true')
+    if get_option('xselinux') == 'true'
+        build_xselinux = true
+    else
+        build_xselinux = dep_selinux.found() and dep_audit.found()
+    endif
+
+    if build_xselinux
+        common_dep += dep_selinux
+        common_dep += dep_audit
+    endif
+endif
+
+socket_dep = []
+if host_machine.system() == 'windows'
+    socket_dep = meson.get_compiler('c').find_library('ws2_32')
+    common_dep += socket_dep
+endif
+
+if get_option('libunwind')
+    common_dep += dependency('libunwind', required: true)
+endif
+
 glx_inc = include_directories('glx')
 
-top_srcdir_inc = include_directories('.')
+top_dir_inc = include_directories('.')
 
-serverconfigdir = join_paths(get_option('libdir'), 'xorg')
+serverconfigdir = join_paths(get_option('prefix'), get_option('libdir'), 'xorg')
 
 manpage_config = configuration_data()
 manpage_config.set('vendorversion', '"xorg-server @0@" "X Version 11"'.format(meson.project_version()))
@@ -537,6 +641,50 @@ manpage_config.set('modulepath', module_dir)
 manpage_config.set('suid_wrapper_dir', join_paths(get_option('prefix'), 'libexec'))
 manpage_config.set('default_font_path', default_font_path)
 
+require_docs = get_option('docs') == 'true'
+require_devel_docs = get_option('devel-docs') == 'true'
+require_docs_pdf = (require_docs or require_devel_docs) and get_option('docs-pdf') == 'true'
+
+sgml_doctools_dep = dependency('xorg-sgml-doctools',
+                               required: require_docs or require_devel_docs)
+xmlto = find_program('xmlto', required: require_docs or require_devel_docs)
+xsltproc = find_program('xsltproc', required: require_docs or require_devel_docs)
+fop = find_program('fop', required: require_docs_pdf)
+
+build_docs = (get_option('docs') != 'false' and
+    sgml_doctools_dep.found() and
+    xmlto.found())
+
+build_docs_devel = (get_option('devel-docs') != 'false' and
+    sgml_doctools_dep.found() and
+    xmlto.found())
+
+build_docs_pdf = (get_option('docs-pdf') != 'false' and
+    (build_docs or build_docs_devel) and
+    fop.found())
+
+if build_docs or build_docs_devel
+    doc_sgml_path = sgml_doctools_dep.get_pkgconfig_variable('sgmlrootdir')
+    doc_stylesheet_srcdir = join_paths(doc_sgml_path, 'X11')
+
+    # once we bump meson dependency to 0.56.0 we can use
+    # meson.project_build_root() instead of meson.build_root()
+
+    # Meson does not and will not support functions so we are copy-pasting
+    # documentation build code around which is unfortunate
+    # See https://mesonbuild.com/FAQ.html#why-doesnt-meson-have-user-defined-functionsmacros
+
+    docs_xmlto_search_flags = [
+        '--searchpath', doc_stylesheet_srcdir,
+        '--searchpath', meson.build_root(),
+    ]
+
+    docs_xslt_search_flags = [
+        '--path', doc_stylesheet_srcdir,
+        '--path', meson.build_root(),
+    ]
+endif
+
 # Include must come first, as it sets up dix-config.h
 subdir('include')
 
@@ -555,6 +703,9 @@ subdir('dbe')
 subdir('miext/damage')
 subdir('miext/shadow')
 subdir('miext/sync')
+if build_rootless
+    subdir('miext/rootless')
+endif
 subdir('present')
 if build_xwin or build_xquartz
     subdir('pseudoramiX')
@@ -573,6 +724,7 @@ endif
 if build_xorg or get_option('xephyr')
     subdir('exa')
 endif
+subdir('doc')
 
 # Common static libraries of all X servers
 libxserver = [
@@ -599,7 +751,10 @@ libxserver = [
 libxserver += libxserver_dri3
 
 subdir('hw')
-subdir('test')
+
+if host_machine.system() != 'windows'
+    subdir('test')
+endif
 
 install_man(configure_file(
     input: 'man/Xserver.man',
@@ -663,7 +818,18 @@ if build_xorg
                                 get_option('libdir'),
                                 'pkgconfig'),
     )
+
+    install_data('xorg-server.m4',
+                 install_dir: join_paths(get_option('datadir'), 'aclocal'))
 endif
 
-install_data('xorg-server.m4',
-             install_dir: join_paths(get_option('datadir'), 'aclocal'))
+if build_docs or build_docs_devel
+    docxmlconfig = configuration_data()
+    docxmlconfig.set('PACKAGE_VERSION', meson.project_version())
+    docxmlconfig.set('RELEASE_DATE', release_date)
+    configure_file(
+        input: 'xserver.ent.in',
+        output: 'xserver.ent',
+        configuration: docxmlconfig
+    )
+endif
diff --git a/meson_options.txt b/meson_options.txt
index 3453b8d..b12d521 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -2,20 +2,17 @@ option('xorg', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto',
        description: 'Enable Xorg X Server')
 option('xephyr', type: 'boolean', value: false,
        description: 'Enable Xephyr nested X server')
-option('xwayland', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto',
-       description: 'Enable XWayland X server')
 option('glamor', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto',
-       description: 'Enable glamor (default yes for Xorg/Xwayland builds)')
-option('xwayland_eglstream', type: 'combo', choices: ['true', 'false', 'auto'],
-       value: 'auto', description: 'Enable EGLStream support for glamor on Xwayland')
+       description: 'Enable glamor (default yes for Xorg builds)')
 option('xnest', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto',
        description: 'Enable Xnest nested X server')
-option('dmx', type: 'boolean', value: false,
-       description: 'Enable DMX nested X server')
 option('xvfb', type: 'boolean', value: true,
        description: 'Enable Xvfb X server')
 option('xwin', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto',
        description: 'Enable XWin X server')
+option('xquartz', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto',
+       description: 'Enable Xquartz X server')
+
 
 option('builder_addr', type: 'string', description: 'Builder address', value: 'xorg@lists.freedesktop.org')
 option('builder_string', type: 'string', description: 'Additional builder string')
@@ -30,6 +27,7 @@ option('xdmcp', type: 'boolean', value: true)
 option('xdm-auth-1', type: 'boolean', value: true)
 option('secure-rpc', type: 'boolean', value: true)
 option('ipv6', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto')
+option('input_thread', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto')
 
 option('xkb_dir', type: 'string')
 option('xkb_output_dir', type: 'string')
@@ -40,10 +38,14 @@ option('xkb_default_layout', type: 'string', value: 'us')
 option('xkb_default_variant', type: 'string')
 option('xkb_default_options', type: 'string')
 
+option('fallback_input_driver', type: 'string', value: 'auto')
+
 option('vendor_name', type: 'string', value: 'The X.Org Foundation')
 option('vendor_name_short', type: 'string', value: 'X.Org')
 option('vendor_web', type: 'string', value: 'http://wiki.x.org')
-option('os_vendor', type: 'string', value: '')
+
+option('dtrace', type: 'boolean', value: false,
+       description: 'Enable dtrace hooks')
 
 option('listen_tcp', type: 'boolean', value: false,
        description: 'Listen on TCP by default')
@@ -60,12 +62,11 @@ option('suid_wrapper', type: 'boolean', value: 'false',
 option('pciaccess', type: 'boolean', value: 'true',
        description: 'Xorg pciaccess support')
 option('udev', type: 'boolean', value: 'true')
+option('udev_kms', type: 'boolean', value: 'true')
 option('hal', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto',
        description: 'Enable HAL integration')
 option('systemd_logind', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto',
        description: 'Enable systemd-logind integration')
-option('vbe', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto',
-       description: 'Xorg VBE module')
 option('vgahw', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto',
        description: 'Xorg VGA access module')
 option('dpms', type: 'boolean', value: true,
@@ -78,6 +79,8 @@ option('xres', type: 'boolean', value: true,
        description: 'XRes extension')
 option('xace', type: 'boolean', value: true,
        description: 'X-ACE extension')
+option('xselinux', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto',
+       description: 'XSELINUX extension')
 option('xinerama', type: 'boolean', value: true,
        description: 'Xinerama extension')
 option('xcsecurity', type: 'boolean', value: false,
@@ -94,7 +97,42 @@ option('linux_acpi', type: 'boolean', value: true,
        description: 'ACPI support on Linux')
 option('mitshm', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto',
        description: 'SHM extension')
+option('agp', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto',
+       description: 'AGP support')
+option('sha1', type: 'combo', choices: ['libc', 'CommonCrypto', 'CryptoAPI', 'libmd', 'libsha1', 'libnettle', 'libgcrypt', 'libcrypto', 'auto'], value: 'auto',
+       description: 'SHA1 implementation')
+option('xf86-input-inputtest', type: 'boolean', value: true,
+       description: 'Test input driver support on Xorg')
 
 option('dri1', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto', description: 'Build DRI1 extension (default: auto)')
 option('dri2', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto', description: 'Build DRI2 extension (default: auto)')
 option('dri3', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto', description: 'Build DRI3 extension (default: auto)')
+option('drm', type: 'boolean', value: 'true',
+        description: 'Build Xorg with libdrm support')
+
+option('apple-applications-dir', type: 'string', value: '/Applications/Utilities',
+        description: 'Applications directory')
+option('apple-application-name', type: 'string', value: 'X11',
+        description: 'Application name')
+option('bundle-id-prefix', type: 'string', value: 'org.x',
+        description: 'RDNS prefix for bundle identifier')
+option('bundle-version', type: 'string', value: 'auto',
+        description: 'The CFBundleVersion for the application bundle')
+option('bundle-version-string', type: 'string', value: 'auto',
+        description: 'The CFBundleShortVersionString for the application bundle')
+option('sparkle-feed-url', type: 'string',
+        description: 'Feed URL for autoupdating with the Sparkle Framework (default: disabled)')
+option('sparkle-public-edkey', type: 'string',
+        description: 'Public EdDSA key for verifying updates from the Sparkle feed (default: disabled)')
+option('xpbproxy', type: 'boolean', value: false,
+        description: 'Build a standalone X pasteboard proxy')
+
+option('libunwind', type: 'boolean', value: false,
+        description: 'Use libunwind for backtrace reporting')
+
+option('docs', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto',
+        description: 'Build documentation')
+option('devel-docs', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto',
+        description: 'Build development documentation')
+option('docs-pdf', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto',
+        description: 'Whether to build PDF version of documentation. Setting is ignored if documentation is not built.')
diff --git a/mi/Makefile.in b/mi/Makefile.in
index 15b018e..1334e07 100644
--- a/mi/Makefile.in
+++ b/mi/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -107,7 +107,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -228,8 +227,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
@@ -249,8 +246,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -264,6 +259,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -282,14 +279,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -306,8 +295,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -363,6 +354,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -415,7 +408,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -439,29 +431,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -499,8 +475,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -511,14 +485,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -832,7 +800,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/mi/meson.build b/mi/meson.build
index 73b196a..9f97d14 100644
--- a/mi/meson.build
+++ b/mi/meson.build
@@ -51,4 +51,6 @@ libxserver_mi = static_library('libxserver_mi',
     ],
 )
 
-install_data(hdrs_mi, install_dir: xorgsdkdir)
+if build_xorg
+    install_data(hdrs_mi, install_dir: xorgsdkdir)
+endif
diff --git a/mi/mi.h b/mi/mi.h
index 2cd3066..8b0a231 100644
--- a/mi/mi.h
+++ b/mi/mi.h
@@ -205,6 +205,12 @@ extern _X_EXPORT void mieqProcessDeviceEvent(DeviceIntPtr /* dev */ ,
 extern _X_EXPORT void mieqProcessInputEvents(void
     );
 
+extern _X_EXPORT void mieqAddCallbackOnDrained(CallbackProcPtr callback,
+                                               void *param);
+
+extern _X_EXPORT void mieqRemoveCallbackOnDrained(CallbackProcPtr callback,
+                                                  void *param);
+
 extern DeviceIntPtr CopyGetMasterEvent(DeviceIntPtr /* sdev */ ,
                                        InternalEvent * /* original */ ,
                                        InternalEvent *  /* copy */
diff --git a/mi/miarc.c b/mi/miarc.c
index 71df4ab..3936f6c 100644
--- a/mi/miarc.c
+++ b/mi/miarc.c
@@ -96,7 +96,7 @@ cbrt(double x)
 #endif
 
 /*
- * some interesting sematic interpretation of the protocol:
+ * some interesting semantic interpretation of the protocol:
  *
  * Self intersecting arcs (i.e. those spanning 360 degrees)
  *  never join with other arcs, and are drawn without caps
@@ -2370,7 +2370,7 @@ lengthToAngle(double len, dashMap * map)
 }
 
 /*
- * compute the angle of an ellipse which cooresponds to
+ * compute the angle of an ellipse which corresponds to
  * the given path length.  Note that the correct solution
  * to this problem is an eliptic integral, we'll punt and
  * approximate (it's only for dashes anyway).  This
diff --git a/mi/mibitblt.c b/mi/mibitblt.c
index 43d9bd9..0b13e49 100644
--- a/mi/mibitblt.c
+++ b/mi/mibitblt.c
@@ -62,6 +62,10 @@ SOFTWARE.
 #include <X11/Xmd.h>
 #include "servermd.h"
 
+#ifdef __MINGW32__
+#define ffs __builtin_ffs
+#endif
+
 /* MICOPYAREA -- public entry for the CopyArea request
  * For each rectangle in the source region
  *     get the pixels with GetSpans
@@ -447,7 +451,7 @@ miOpqStipDrawable(DrawablePtr pDraw, GCPtr pGC, RegionPtr prgnSrc,
     ValidateGC(pDraw, pGC);
 
     /* Fill the drawable with the stipple.  This will draw the
-     * foreground color whereever 1 bits are set, leaving everything
+     * foreground color wherever 1 bits are set, leaving everything
      * with 0 bits untouched.  Note that the part outside the clip
      * region is all 0s.  */
     rect.x = dstx;
diff --git a/mi/micmap.c b/mi/micmap.c
index 5743adb..7003a53 100644
--- a/mi/micmap.c
+++ b/mi/micmap.c
@@ -278,14 +278,14 @@ miCreateDefColormap(ScreenPtr pScreen)
 
 #define _RZ(d) ((d + 2) / 3)
 #define _RS(d) 0
-#define _RM(d) ((1 << _RZ(d)) - 1)
+#define _RM(d) ((1U << _RZ(d)) - 1)
 #define _GZ(d) ((d - _RZ(d) + 1) / 2)
 #define _GS(d) _RZ(d)
-#define _GM(d) (((1 << _GZ(d)) - 1) << _GS(d))
+#define _GM(d) (((1U << _GZ(d)) - 1) << _GS(d))
 #define _BZ(d) (d - _RZ(d) - _GZ(d))
 #define _BS(d) (_RZ(d) + _GZ(d))
-#define _BM(d) (((1 << _BZ(d)) - 1) << _BS(d))
-#define _CE(d) (1 << _RZ(d))
+#define _BM(d) (((1U << _BZ(d)) - 1) << _BS(d))
+#define _CE(d) (1U << _RZ(d))
 
 typedef struct _miVisuals {
     struct _miVisuals *next;
@@ -416,7 +416,7 @@ maskShift(Pixel p)
 
 /*
  * Given a list of formats for a screen, create a list
- * of visuals and depths for the screen which corespond to
+ * of visuals and depths for the screen which correspond to
  * the set which can be used with this version of cfb.
  */
 
diff --git a/mi/micopy.c b/mi/micopy.c
index 12cdad4..40096f2 100644
--- a/mi/micopy.c
+++ b/mi/micopy.c
@@ -159,11 +159,9 @@ miDoCopy(DrawablePtr pSrcDrawable,
         return NULL;
     }
 
-    if (pSrcDrawable->pScreen->SourceValidate) {
-        (*pSrcDrawable->pScreen->SourceValidate) (pSrcDrawable, xIn, yIn,
-                                                  widthSrc, heightSrc,
-                                                  pGC->subWindowMode);
-    }
+    (*pSrcDrawable->pScreen->SourceValidate) (pSrcDrawable, xIn, yIn,
+                                              widthSrc, heightSrc,
+                                              pGC->subWindowMode);
 
     /* Compute source clip region */
     if (pSrcDrawable->type == DRAWABLE_PIXMAP) {
diff --git a/mi/mieq.c b/mi/mieq.c
index 555f0ec..c98d468 100644
--- a/mi/mieq.c
+++ b/mi/mieq.c
@@ -87,6 +87,8 @@ typedef struct _EventQueue {
 
 static EventQueueRec miEventQueue;
 
+static CallbackListPtr miCallbacksWhenDrained = NULL;
+
 static size_t
 mieqNumEnqueued(EventQueuePtr eventQueue)
 {
@@ -126,11 +128,13 @@ mieqGrowQueue(EventQueuePtr eventQueue, size_t new_nevents)
 
     /* First copy the existing events */
     first_hunk = eventQueue->nevents - eventQueue->head;
-    memcpy(new_events,
-           &eventQueue->events[eventQueue->head],
-           first_hunk * sizeof(EventRec));
-    memcpy(&new_events[first_hunk],
-           eventQueue->events, eventQueue->head * sizeof(EventRec));
+    if (eventQueue->events) {
+        memcpy(new_events,
+               &eventQueue->events[eventQueue->head],
+               first_hunk * sizeof(EventRec));
+        memcpy(&new_events[first_hunk],
+               eventQueue->events, eventQueue->head * sizeof(EventRec));
+    }
 
     /* Initialize the new portion */
     for (i = eventQueue->nevents; i < new_nevents; i++) {
@@ -289,7 +293,7 @@ mieqSwitchScreen(DeviceIntPtr pDev, ScreenPtr pScreen, Bool set_dequeue_screen)
 void
 mieqSetHandler(int event, mieqHandler handler)
 {
-    if (handler && miEventQueue.handlers[event])
+    if (handler && miEventQueue.handlers[event] != handler)
         ErrorF("[mi] mieq: warning: overriding existing handler %p with %p for "
                "event %d\n", miEventQueue.handlers[event], handler, event);
 
@@ -338,6 +342,14 @@ ChangeDeviceID(DeviceIntPtr dev, InternalEvent *event)
     case ET_BarrierLeave:
         event->barrier_event.deviceid = dev->id;
         break;
+    case ET_GesturePinchBegin:
+    case ET_GesturePinchUpdate:
+    case ET_GesturePinchEnd:
+    case ET_GestureSwipeBegin:
+    case ET_GestureSwipeUpdate:
+    case ET_GestureSwipeEnd:
+        event->gesture_event.deviceid = dev->id;
+        break;
     default:
         ErrorF("[mi] Unknown event type (%d), cannot change id.\n",
                event->any.type);
@@ -563,5 +575,21 @@ mieqProcessInputEvents(void)
 
     inProcessInputEvents = FALSE;
 
+    CallCallbacks(&miCallbacksWhenDrained, NULL);
+
+    input_unlock();
+}
+
+void mieqAddCallbackOnDrained(CallbackProcPtr callback, void *param)
+{
+    input_lock();
+    AddCallback(&miCallbacksWhenDrained, callback, param);
+    input_unlock();
+}
+
+void mieqRemoveCallbackOnDrained(CallbackProcPtr callback, void *param)
+{
+    input_lock();
+    DeleteCallback(&miCallbacksWhenDrained, callback, param);
     input_unlock();
 }
diff --git a/mi/miexpose.c b/mi/miexpose.c
index c34530c..e54b18b 100644
--- a/mi/miexpose.c
+++ b/mi/miexpose.c
@@ -112,10 +112,6 @@ the region package can call this.
 non-existent areas to non-obscured areas of the destination.  Paint the
 background for the region, if the destination is a window.
 
-NOTE:
-     this should generally be called, even if graphicsExposures is false,
-because this is where bits get recovered from backing store.
-
 */
 
 RegionPtr
@@ -140,10 +136,7 @@ miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
     Bool extents;
 
     /* avoid work if we can */
-    if (!pGC->graphicsExposures &&
-        (pDstDrawable->type == DRAWABLE_PIXMAP) &&
-        ((pSrcDrawable->type == DRAWABLE_PIXMAP) ||
-         (((WindowPtr) pSrcDrawable)->backStorage == 0)))
+    if (!pGC->graphicsExposures && pDstDrawable->type == DRAWABLE_PIXMAP)
         return NULL;
 
     srcBox.x1 = srcx;
@@ -411,7 +404,7 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what)
     int i;
     BoxPtr pbox;
     xRectangle *prect;
-    int numRects;
+    int numRects, regionnumrects;
 
     /*
      * Distance from screen to destination drawable, use this
@@ -515,7 +508,10 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what)
         gcmask |= GCFillStyle | GCTile | GCTileStipXOrigin | GCTileStipYOrigin;
     }
 
-    prect = xallocarray(RegionNumRects(prgn), sizeof(xRectangle));
+    regionnumrects = RegionNumRects(prgn);
+    if (regionnumrects == 0)
+        return;
+    prect = xallocarray(regionnumrects, sizeof(xRectangle));
     if (!prect)
         return;
 
diff --git a/mi/miglblt.c b/mi/miglblt.c
index 68be5b9..169d44f 100644
--- a/mi/miglblt.c
+++ b/mi/miglblt.c
@@ -94,7 +94,7 @@ miPolyGlyphBlt(DrawablePtr pDrawable, GC * pGC, int x, int y, unsigned int nglyp
     int j;
     unsigned char *pbits;       /* buffer for PutImage */
     unsigned char *pb;          /* temp pointer into buffer */
-    CharInfoPtr pci;            /* currect char info */
+    CharInfoPtr pci;            /* current char info */
     unsigned char *pglyph;      /* pointer bits in glyph */
     int gWidth, gHeight;        /* width and height of glyph */
     int nbyGlyphWidth;          /* bytes per scanline of glyph */
diff --git a/mi/miinitext.c b/mi/miinitext.c
index b7c7021..2e4aba5 100644
--- a/mi/miinitext.c
+++ b/mi/miinitext.c
@@ -100,13 +100,12 @@ SOFTWARE.
 #include "misc.h"
 #include "extension.h"
 #include "extinit.h"
-#ifdef INXQUARTZ
-#include "nonsdk_extinit.h"
-#endif
 #include "micmap.h"
 #include "os.h"
 #include "globals.h"
 
+#include "miinitext.h"
+
 /* List of built-in (statically linked) extensions */
 static const ExtensionModule staticExtensions[] = {
     {GEExtensionInit, "Generic Event Extension", &noGEExtension},
@@ -127,12 +126,6 @@ static const ExtensionModule staticExtensions[] = {
 #endif
 #ifdef PANORAMIX
     {PanoramiXExtensionInit, "XINERAMA", &noPanoramiXExtension},
-#endif
-#ifdef INXQUARTZ
-    /* PseudoramiXExtensionInit must be done before RRExtensionInit, or
-     * XQuartz will render windows offscreen.
-     */
-    {PseudoramiXExtensionInit, "PseudoramiX", &noPseudoramiXExtension},
 #endif
     /* must be before Render to layer DisplayCursor correctly */
     {XFixesExtensionInit, "XFIXES", &noXFixesExtension},
@@ -182,6 +175,21 @@ static const ExtensionModule staticExtensions[] = {
 #endif
 };
 
+void
+ListStaticExtensions(void)
+{
+    const ExtensionModule *ext;
+    int i;
+
+    ErrorF(" Only the following extensions can be run-time enabled/disabled:\n");
+    for (i = 0; i < ARRAY_SIZE(staticExtensions); i++) {
+        ext = &staticExtensions[i];
+        if (ext->disablePtr != NULL) {
+            ErrorF("\t%s\n", ext->name);
+        }
+    }
+}
+
 Bool
 EnableDisableExtension(const char *name, Bool enable)
 {
@@ -221,16 +229,13 @@ EnableDisableExtensionError(const char *name, Bool enable)
             break;
         }
     }
-    if (found == FALSE)
+    if (found == FALSE) {
         ErrorF("[mi] Extension \"%s\" is not recognized\n", name);
-    ErrorF("[mi] Only the following extensions can be run-time %s:\n",
-           enable ? "enabled" : "disabled");
-    for (i = 0; i < ARRAY_SIZE(staticExtensions); i++) {
-        ext = &staticExtensions[i];
-        if (ext->disablePtr != NULL) {
-            ErrorF("[mi]    %s\n", ext->name);
-        }
+        /* Disabling a non-existing extension is a no-op anyway */
+        if (enable == FALSE)
+            return;
     }
+    ListStaticExtensions();
 }
 
 static ExtensionModule *ExtensionModuleList = NULL;
diff --git a/mi/miinitext.h b/mi/miinitext.h
new file mode 100644
index 0000000..a1ceb9a
--- /dev/null
+++ b/mi/miinitext.h
@@ -0,0 +1,83 @@
+/***********************************************************
+
+Copyright 1987, 1998  The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+                        All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+/*
+ * Copyright (c) 2000 by The XFree86 Project, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the copyright holder(s)
+ * and author(s) shall not be used in advertising or otherwise to promote
+ * the sale, use or other dealings in this Software without prior written
+ * authorization from the copyright holder(s) and author(s).
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#ifndef MIINITEXT_H
+#define MIINITEXT_H
+
+void ListStaticExtensions(void);
+
+#endif /* MIINITEXT_H */
diff --git a/mi/mipointer.c b/mi/mipointer.c
index 75be1ae..a638f25 100644
--- a/mi/mipointer.c
+++ b/mi/mipointer.c
@@ -402,7 +402,7 @@ miPointerWarpCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y)
 }
 
 /**
- * Syncronize the sprite with the cursor.
+ * Synchronize the sprite with the cursor.
  *
  * @param pDev The device to sync
  */
@@ -699,8 +699,8 @@ miPointerSetPosition(DeviceIntPtr pDev, int mode, double *screenx,
 /**
  * Get the current position of the device in desktop coordinates.
  *
- * @param x Return value for the current x coordinate in desktop coordiates.
- * @param y Return value for the current y coordinate in desktop coordiates.
+ * @param x Return value for the current x coordinate in desktop coordinates.
+ * @param y Return value for the current y coordinate in desktop coordinates.
  */
 void
 miPointerGetPosition(DeviceIntPtr pDev, int *x, int *y)
diff --git a/mi/mipointer.h b/mi/mipointer.h
index 7ce6409..00f5237 100644
--- a/mi/mipointer.h
+++ b/mi/mipointer.h
@@ -100,7 +100,7 @@ miPointerSetScreen(DeviceIntPtr pDev, int screen_num, int x, int y);
 extern _X_EXPORT void
 miPointerGetPosition(DeviceIntPtr pDev, int *x, int *y);
 
-/* Moves the cursor to the specified position.  May clip the co-ordinates:
+/* Moves the cursor to the specified position.  May clip the coordinates:
  * x and y are modified in-place. */
 extern _X_EXPORT ScreenPtr
 miPointerSetPosition(DeviceIntPtr pDev, int mode, double *x, double *y,
diff --git a/mi/miscrinit.c b/mi/miscrinit.c
index 264622d..3bb52b1 100644
--- a/mi/miscrinit.c
+++ b/mi/miscrinit.c
@@ -43,7 +43,7 @@ from The Open Group.
 #include "shmint.h"
 #endif
 
-/* We use this structure to propogate some information from miScreenInit to
+/* We use this structure to propagate some information from miScreenInit to
  * miCreateScreenResources.  miScreenInit allocates the structure, fills it
  * in, and puts it into pScreen->devPrivate.  miCreateScreenResources
  * extracts the info and frees the structure.  We could've accomplished the
@@ -124,12 +124,19 @@ miCloseScreen(ScreenPtr pScreen)
     return ((*pScreen->DestroyPixmap) ((PixmapPtr) pScreen->devPrivate));
 }
 
+static Bool
+miSaveScreen(ScreenPtr pScreen, int on)
+{
+    return TRUE;
+}
+
 void
 miSourceValidate(DrawablePtr pDrawable, int x, int y, int w, int h,
                  unsigned int subWindowMode)
 {
 }
 
+
 /* With the introduction of pixmap privates, the "screen pixmap" can no
  * longer be created in miScreenInit, since all the modules that could
  * possibly ask for pixmap private space have not been initialized at
@@ -248,7 +255,9 @@ miScreenInit(ScreenPtr pScreen, void *pbits,  /* pointer to screen bits */
         pScreen->CloseScreen = miCloseScreen;
     }
     /* else CloseScreen */
-    /* QueryBestSize, SaveScreen, GetImage, GetSpans */
+    /* QueryBestSize */
+    pScreen->SaveScreen = miSaveScreen;
+    /* GetImage, GetSpans */
     pScreen->SourceValidate = miSourceValidate;
     /* CreateWindow, DestroyWindow, PositionWindow, ChangeWindowAttributes */
     /* RealizeWindow, UnrealizeWindow */
diff --git a/mi/misprite.c b/mi/misprite.c
index add2c55..ce8c571 100644
--- a/mi/misprite.c
+++ b/mi/misprite.c
@@ -70,8 +70,6 @@ typedef struct {
 typedef struct {
     /* screen procedures */
     CloseScreenProcPtr CloseScreen;
-    GetImageProcPtr GetImage;
-    GetSpansProcPtr GetSpans;
     SourceValidateProcPtr SourceValidate;
 
     /* window procedures */
@@ -190,12 +188,6 @@ miSpriteIsDown(miCursorInfoPtr pDevCursor)
  */
 
 static Bool miSpriteCloseScreen(ScreenPtr pScreen);
-static void miSpriteGetImage(DrawablePtr pDrawable, int sx, int sy,
-                             int w, int h, unsigned int format,
-                             unsigned long planemask, char *pdstLine);
-static void miSpriteGetSpans(DrawablePtr pDrawable, int wMax,
-                             DDXPointPtr ppt, int *pwidth, int nspans,
-                             char *pdstStart);
 static void miSpriteSourceValidate(DrawablePtr pDrawable, int x, int y,
                                    int width, int height,
                                    unsigned int subWindowMode);
@@ -315,8 +307,6 @@ miSpriteInitialize(ScreenPtr pScreen, miPointerScreenFuncPtr screenFuncs)
          pVisual->vid != pScreen->rootVisual; pVisual++);
     pScreenPriv->pVisual = pVisual;
     pScreenPriv->CloseScreen = pScreen->CloseScreen;
-    pScreenPriv->GetImage = pScreen->GetImage;
-    pScreenPriv->GetSpans = pScreen->GetSpans;
     pScreenPriv->SourceValidate = pScreen->SourceValidate;
 
     pScreenPriv->CopyWindow = pScreen->CopyWindow;
@@ -340,8 +330,6 @@ miSpriteInitialize(ScreenPtr pScreen, miPointerScreenFuncPtr screenFuncs)
     dixSetPrivate(&pScreen->devPrivates, &miSpriteScreenKeyRec, pScreenPriv);
 
     pScreen->CloseScreen = miSpriteCloseScreen;
-    pScreen->GetImage = miSpriteGetImage;
-    pScreen->GetSpans = miSpriteGetSpans;
     pScreen->SourceValidate = miSpriteSourceValidate;
 
     pScreen->CopyWindow = miSpriteCopyWindow;
@@ -366,8 +354,6 @@ miSpriteCloseScreen(ScreenPtr pScreen)
     miSpriteScreenPtr pScreenPriv = GetSpriteScreen(pScreen);
 
     pScreen->CloseScreen = pScreenPriv->CloseScreen;
-    pScreen->GetImage = pScreenPriv->GetImage;
-    pScreen->GetSpans = pScreenPriv->GetSpans;
     pScreen->SourceValidate = pScreenPriv->SourceValidate;
     pScreen->InstallColormap = pScreenPriv->InstallColormap;
     pScreen->StoreColors = pScreenPriv->StoreColors;
@@ -379,80 +365,6 @@ miSpriteCloseScreen(ScreenPtr pScreen)
     return (*pScreen->CloseScreen) (pScreen);
 }
 
-static void
-miSpriteGetImage(DrawablePtr pDrawable, int sx, int sy, int w, int h,
-                 unsigned int format, unsigned long planemask, char *pdstLine)
-{
-    ScreenPtr pScreen = pDrawable->pScreen;
-    DeviceIntPtr pDev;
-    miCursorInfoPtr pCursorInfo;
-    miSpriteScreenPtr pPriv = GetSpriteScreen(pScreen);
-
-    SCREEN_PROLOGUE(pPriv, pScreen, GetImage);
-
-    if (pDrawable->type == DRAWABLE_WINDOW) {
-        for (pDev = inputInfo.devices; pDev; pDev = pDev->next) {
-            if (DevHasCursor(pDev)) {
-                pCursorInfo = GetSprite(pDev);
-                if (pCursorInfo->isUp && pCursorInfo->pScreen == pScreen &&
-                    ORG_OVERLAP(&pCursorInfo->saved, pDrawable->x, pDrawable->y,
-                                sx, sy, w, h)) {
-                    SPRITE_DEBUG(("GetImage remove\n"));
-                    miSpriteRemoveCursor(pDev, pScreen);
-                }
-            }
-        }
-    }
-
-    (*pScreen->GetImage) (pDrawable, sx, sy, w, h, format, planemask, pdstLine);
-
-    SCREEN_EPILOGUE(pPriv, pScreen, GetImage);
-}
-
-static void
-miSpriteGetSpans(DrawablePtr pDrawable, int wMax, DDXPointPtr ppt,
-                 int *pwidth, int nspans, char *pdstStart)
-{
-    ScreenPtr pScreen = pDrawable->pScreen;
-    DeviceIntPtr pDev;
-    miCursorInfoPtr pCursorInfo;
-    miSpriteScreenPtr pPriv = GetSpriteScreen(pScreen);
-
-    SCREEN_PROLOGUE(pPriv, pScreen, GetSpans);
-
-    if (pDrawable->type == DRAWABLE_WINDOW) {
-        for (pDev = inputInfo.devices; pDev; pDev = pDev->next) {
-            if (DevHasCursor(pDev)) {
-                pCursorInfo = GetSprite(pDev);
-
-                if (pCursorInfo->isUp && pCursorInfo->pScreen == pScreen) {
-                    DDXPointPtr pts;
-                    int *widths;
-                    int nPts;
-                    int xorg, yorg;
-
-                    xorg = pDrawable->x;
-                    yorg = pDrawable->y;
-
-                    for (pts = ppt, widths = pwidth, nPts = nspans;
-                         nPts--; pts++, widths++) {
-                        if (SPN_OVERLAP(&pCursorInfo->saved, pts->y + yorg,
-                                        pts->x + xorg, *widths)) {
-                            SPRITE_DEBUG(("GetSpans remove\n"));
-                            miSpriteRemoveCursor(pDev, pScreen);
-                            break;
-                        }
-                    }
-                }
-            }
-        }
-    }
-
-    (*pScreen->GetSpans) (pDrawable, wMax, ppt, pwidth, nspans, pdstStart);
-
-    SCREEN_EPILOGUE(pPriv, pScreen, GetSpans);
-}
-
 static void
 miSpriteSourceValidate(DrawablePtr pDrawable, int x, int y, int width,
                        int height, unsigned int subWindowMode)
@@ -478,9 +390,8 @@ miSpriteSourceValidate(DrawablePtr pDrawable, int x, int y, int width,
         }
     }
 
-    if (pScreen->SourceValidate)
-        (*pScreen->SourceValidate) (pDrawable, x, y, width, height,
-                                    subWindowMode);
+    (*pScreen->SourceValidate) (pDrawable, x, y, width, height,
+                                subWindowMode);
 
     SCREEN_EPILOGUE(pPriv, pScreen, SourceValidate);
 }
diff --git a/mi/mizerline.c b/mi/mizerline.c
index 2f22d23..1a0ca34 100644
--- a/mi/mizerline.c
+++ b/mi/mizerline.c
@@ -60,7 +60,7 @@ SOFTWARE.
 /* Draw lineSolid, fillStyle-independent zero width lines.
  *
  * Must keep X and Y coordinates in "ints" at least until after they're
- * translated and clipped to accomodate CoordModePrevious lines with very
+ * translated and clipped to accommodate CoordModePrevious lines with very
  * large coordinates.
  *
  * Draws the same pixels regardless of sign(dx) or sign(dy).
diff --git a/miext/Makefile.in b/miext/Makefile.in
index d34df57..51057dd 100644
--- a/miext/Makefile.in
+++ b/miext/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -104,7 +104,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -160,8 +159,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 DIST_SUBDIRS = $(SUBDIRS)
 am__DIST_COMMON = $(srcdir)/Makefile.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -207,8 +204,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -222,6 +217,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -240,14 +237,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -264,8 +253,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -321,6 +312,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -373,7 +366,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -397,29 +389,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -457,8 +433,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -469,14 +443,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -687,7 +655,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/miext/damage/Makefile.in b/miext/damage/Makefile.in
index 0993686..10830af 100644
--- a/miext/damage/Makefile.in
+++ b/miext/damage/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -107,7 +107,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -208,8 +207,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
@@ -229,8 +226,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -244,6 +239,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -262,14 +259,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -286,8 +275,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -343,6 +334,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -395,7 +388,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -419,29 +411,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -479,8 +455,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -491,14 +465,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -741,7 +709,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/miext/damage/meson.build b/miext/damage/meson.build
index 1f6032c..c7ec109 100644
--- a/miext/damage/meson.build
+++ b/miext/damage/meson.build
@@ -13,4 +13,6 @@ libxserver_miext_damage = static_library('libxserver_miext_damage',
 	dependencies: common_dep,
 )
 
-install_data(hdrs_miext_damage, install_dir: xorgsdkdir)
+if build_xorg
+    install_data(hdrs_miext_damage, install_dir: xorgsdkdir)
+endif
diff --git a/miext/rootless/Makefile.in b/miext/rootless/Makefile.in
index bca745d..c3e4c8f 100644
--- a/miext/rootless/Makefile.in
+++ b/miext/rootless/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -105,7 +105,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -179,8 +178,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
@@ -200,8 +197,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -215,6 +210,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -233,14 +230,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -257,8 +246,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -314,6 +305,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -366,7 +359,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -390,29 +382,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -450,8 +426,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -462,14 +436,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -702,7 +670,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/miext/rootless/meson.build b/miext/rootless/meson.build
new file mode 100644
index 0000000..66b9f06
--- /dev/null
+++ b/miext/rootless/meson.build
@@ -0,0 +1,13 @@
+srcs_miext_rootless = [
+        'rootlessCommon.c',
+        'rootlessGC.c',
+        'rootlessScreen.c',
+        'rootlessValTree.c',
+        'rootlessWindow.c',
+]
+
+libxserver_miext_rootless = static_library('libxserver_miext_rootless',
+        srcs_miext_rootless,
+        include_directories: inc,
+        dependencies: common_dep,
+)
diff --git a/miext/rootless/rootless.h b/miext/rootless/rootless.h
index 1be61cd..ed3b6c4 100644
--- a/miext/rootless/rootless.h
+++ b/miext/rootless/rootless.h
@@ -41,7 +41,7 @@
 
 /*
    Each top-level rootless window has a one-to-one correspondence to a physical
-   on-screen window. The physical window is refered to as a "frame".
+   on-screen window. The physical window is referred to as a "frame".
  */
 
 typedef void *RootlessFrameID;
@@ -345,7 +345,7 @@ void RootlessStartDrawing(WindowPtr pWindow);
 void RootlessStopDrawing(WindowPtr pWindow, Bool flush);
 
 /*
- * Alocate a new screen pixmap.
+ * Allocate a new screen pixmap.
  *  miCreateScreenResources does not do this properly with a null
  *  framebuffer pointer.
  */
diff --git a/miext/rootless/rootlessCommon.c b/miext/rootless/rootlessCommon.c
index 5043627..44c2c37 100644
--- a/miext/rootless/rootlessCommon.c
+++ b/miext/rootless/rootlessCommon.c
@@ -134,6 +134,23 @@ RootlessResolveColormap(ScreenPtr pScreen, int first_color,
     return TRUE;
 }
 
+unsigned long RootlessWID(WindowPtr pWindow) {
+    ScreenPtr pScreen = pWindow->drawable.pScreen;
+    WindowPtr top = TopLevelParent(pWindow);
+    RootlessWindowRec *winRec;
+    PixmapPtr curPixmap;
+
+    if (top == NULL) {
+        return 0;
+    }
+    winRec = WINREC(top);
+    if (winRec == NULL) {
+        return 0;
+    }
+
+    return (unsigned long)(uintptr_t)winRec->wid;
+}
+
 /*
  * RootlessStartDrawing
  *  Prepare a window for direct access to its backing buffer.
@@ -148,11 +165,15 @@ RootlessStartDrawing(WindowPtr pWindow)
     RootlessWindowRec *winRec;
     PixmapPtr curPixmap;
 
-    if (top == NULL)
+    if (top == NULL) {
+        RL_DEBUG_MSG("RootlessStartDrawing is a no-op because top == NULL.\n");
         return;
+    }
     winRec = WINREC(top);
-    if (winRec == NULL)
+    if (winRec == NULL) {
+        RL_DEBUG_MSG("RootlessStartDrawing is a no-op because winRec == NULL.\n");
         return;
+    }
 
     // Make sure the window's top-level parent is prepared for drawing.
     if (!winRec->is_drawing) {
@@ -166,10 +187,23 @@ RootlessStartDrawing(WindowPtr pWindow)
                                    top->drawable.depth,
                                    top->drawable.bitsPerPixel,
                                    winRec->bytesPerRow, winRec->pixelData);
+
+        RL_DEBUG_MSG("GetScratchPixmapHeader gave us %p %p (%d,%d %dx%d %d) for wid=%lu\n",
+                     winRec->pixmap, winRec->pixmap->devPrivate.ptr, winRec->pixmap->drawable.x,
+                     winRec->pixmap->drawable.y, winRec->pixmap->drawable.width, winRec->pixmap->drawable.height,
+                     winRec->pixmap->drawable.bitsPerPixel, RootlessWID(pWindow));
+
         SetPixmapBaseToScreen(winRec->pixmap,
                               top->drawable.x - bw, top->drawable.y - bw);
 
+        RL_DEBUG_MSG("After SetPixmapBaseToScreen(%d %d %d): %p (%d,%d %dx%d %d) for wid=%lu\n",
+                     top->drawable.x, top->drawable.y, bw, winRec->pixmap->devPrivate.ptr, winRec->pixmap->drawable.x,
+                     winRec->pixmap->drawable.y, winRec->pixmap->drawable.width, winRec->pixmap->drawable.height,
+                     winRec->pixmap->drawable.bitsPerPixel, RootlessWID(pWindow));
+
         winRec->is_drawing = TRUE;
+    } else {
+        RL_DEBUG_MSG("Skipped call to xprStartDrawing (wid: %lu) because winRec->is_drawing says we already did.\n", RootlessWID(pWindow));
     }
 
     curPixmap = pScreen->GetWindowPixmap(pWindow);
@@ -181,6 +215,10 @@ RootlessStartDrawing(WindowPtr pWindow)
         PixmapPtr oldPixmap =
             dixLookupPrivate(&pWindow->devPrivates,
                              rootlessWindowOldPixmapPrivateKey);
+
+        RL_DEBUG_MSG("curPixmap is %p %p for wid=%lu\n", curPixmap, curPixmap ? curPixmap->devPrivate.ptr : NULL, RootlessWID(pWindow));
+        RL_DEBUG_MSG("oldPixmap is %p %p for wid=%lu\n", oldPixmap, oldPixmap ? oldPixmap->devPrivate.ptr : NULL, RootlessWID(pWindow));
+
         if (oldPixmap != NULL) {
             if (oldPixmap == curPixmap)
                 RL_DEBUG_MSG
@@ -277,7 +315,7 @@ RootlessDamageRegion(WindowPtr pWindow, RegionPtr pRegion)
     WindowPtr pTop;
     BoxPtr b1, b2;
 
-    RL_DEBUG_MSG("Damaged win 0x%x ", pWindow);
+    RL_DEBUG_MSG("Damaged win %p\n", pWindow);
 
     pTop = TopLevelParent(pWindow);
     if (pTop == NULL)
diff --git a/miext/rootless/rootlessCommon.h b/miext/rootless/rootlessCommon.h
index c3fa2a2..83dec3b 100644
--- a/miext/rootless/rootlessCommon.h
+++ b/miext/rootless/rootlessCommon.h
@@ -269,7 +269,7 @@ void RootlessFlushScreenColormaps(ScreenPtr pScreen);
 // Move a window to its proper location on the screen.
 void RootlessRepositionWindow(WindowPtr pWin);
 
-// Move the window to it's correct place in the physical stacking order.
+// Move the window to its correct place in the physical stacking order.
 void RootlessReorderWindow(WindowPtr pWin);
 
 void RootlessScreenExpose(ScreenPtr pScreen);
diff --git a/miext/rootless/rootlessGC.c b/miext/rootless/rootlessGC.c
index 235b3ab..52d9df9 100644
--- a/miext/rootless/rootlessGC.c
+++ b/miext/rootless/rootlessGC.c
@@ -1243,10 +1243,7 @@ RootlessPolyText8(DrawablePtr dst, GCPtr pGC,
         box.x2 = dst->x + x + FONTMAXBOUNDS(pGC->font, rightSideBearing);
 
         if (count > 1) {
-            if (width > 0)
-                box.x2 += width;
-            else
-                box.x1 += width;
+            box.x2 += width;
         }
 
         box.y1 = dst->y + y - FONTMAXBOUNDS(pGC->font, ascent);
@@ -1334,10 +1331,7 @@ RootlessPolyText16(DrawablePtr dst, GCPtr pGC,
         box.x2 = dst->x + x + FONTMAXBOUNDS(pGC->font, rightSideBearing);
 
         if (count > 1) {
-            if (width > 0)
-                box.x2 += width;
-            else
-                box.x1 += width;
+            box.x2 += width;
         }
 
         box.y1 = dst->y + y - FONTMAXBOUNDS(pGC->font, ascent);
diff --git a/miext/rootless/rootlessScreen.c b/miext/rootless/rootlessScreen.c
index 2ec0ae5..79fe350 100644
--- a/miext/rootless/rootlessScreen.c
+++ b/miext/rootless/rootlessScreen.c
@@ -51,11 +51,6 @@
 #include "rootlessCommon.h"
 #include "rootlessWindow.h"
 
-/* In milliseconds */
-#ifndef ROOTLESS_REDISPLAY_DELAY
-#define ROOTLESS_REDISPLAY_DELAY 10
-#endif
-
 extern int RootlessMiValidateTree(WindowPtr pRoot, WindowPtr pChild,
                                   VTKind kind);
 extern Bool RootlessCreateGC(GCPtr pGC);
@@ -228,10 +223,8 @@ RootlessSourceValidate(DrawablePtr pDrawable, int x, int y, int w, int h,
 
         RootlessStartDrawing(pWin);
     }
-    if (pDrawable->pScreen->SourceValidate) {
-        pDrawable->pScreen->SourceValidate(pDrawable, x, y, w, h,
-                                           subWindowMode);
-    }
+    pDrawable->pScreen->SourceValidate(pDrawable, x, y, w, h,
+                                       subWindowMode);
     SCREEN_WRAP(pDrawable->pScreen, SourceValidate);
 }
 
diff --git a/miext/rootless/rootlessWindow.c b/miext/rootless/rootlessWindow.c
index e304299..106d432 100644
--- a/miext/rootless/rootlessWindow.c
+++ b/miext/rootless/rootlessWindow.c
@@ -561,9 +561,9 @@ RootlessReorderWindow(WindowPtr pWin)
 
         /* Find the next window above this one that has a mapped frame.
          * Only include cases where the windows are in the same category of
-         * hittability to ensure offscreen windows dont get restacked
+         * hittability to ensure offscreen windows don't get restacked
          * relative to onscreen ones (but that the offscreen ones maintain
-         * their stacking order if they are explicitly asked to Reorder
+         * their stacking order if they are explicitly asked to Reorder).
          */
 
         newPrevW = pWin->prevSib;
@@ -932,7 +932,7 @@ StartFrameResize(WindowPtr pWin, Bool gravity,
 
             if (code == (WIDTH_SMALLER | HEIGHT_SMALLER)) {
                 /* Since the window is getting smaller, we can do gravity
-                   repair on it with it's current size, then resize it
+                   repair on it with its current size, then resize it
                    afterwards. */
 
                 resize_after = TRUE;
diff --git a/miext/shadow/Makefile.in b/miext/shadow/Makefile.in
index 12deaad..0955bec 100644
--- a/miext/shadow/Makefile.in
+++ b/miext/shadow/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -107,7 +107,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -228,8 +227,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
@@ -249,8 +246,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -264,6 +259,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -282,14 +279,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -306,8 +295,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -363,6 +354,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -415,7 +408,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -439,29 +431,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -499,8 +475,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -511,14 +485,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -808,7 +776,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/miext/shadow/meson.build b/miext/shadow/meson.build
index 7230df6..f91accd 100644
--- a/miext/shadow/meson.build
+++ b/miext/shadow/meson.build
@@ -35,4 +35,6 @@ libxserver_miext_shadow = static_library('libxserver_miext_shadow',
     dependencies: common_dep,
 )
 
-install_data(hdrs_miext_shadow, install_dir: xorgsdkdir)
+if build_xorg
+    install_data(hdrs_miext_shadow, install_dir: xorgsdkdir)
+endif
diff --git a/miext/shadow/shadow.c b/miext/shadow/shadow.c
index 529402d..e8d0d51 100644
--- a/miext/shadow/shadow.c
+++ b/miext/shadow/shadow.c
@@ -87,7 +87,7 @@ shadowGetImage(DrawablePtr pDrawable, int sx, int sy, int w, int h,
 
     shadowBuf(pScreen);
 
-    /* Many apps use GetImage to sync with the visable frame buffer */
+    /* Many apps use GetImage to sync with the visible frame buffer */
     if (pDrawable->type == DRAWABLE_WINDOW)
         shadowRedisplay(pScreen);
     unwrap(pBuf, pScreen, GetImage);
diff --git a/miext/sync/Makefile.in b/miext/sync/Makefile.in
index abef8fa..b31ea13 100644
--- a/miext/sync/Makefile.in
+++ b/miext/sync/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -108,7 +108,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -214,8 +213,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
@@ -235,8 +232,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -250,6 +245,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -268,14 +265,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -292,8 +281,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -349,6 +340,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -401,7 +394,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -425,29 +417,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -485,8 +461,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -497,14 +471,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -747,7 +715,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/miext/sync/meson.build b/miext/sync/meson.build
index 8b7ee4d..78716e4 100644
--- a/miext/sync/meson.build
+++ b/miext/sync/meson.build
@@ -23,4 +23,6 @@ libxserver_miext_sync = static_library('libxserver_miext_sync',
     ],
 )
 
-install_data(hdrs_miext_sync, install_dir: xorgsdkdir)
+if build_xorg
+    install_data(hdrs_miext_sync, install_dir: xorgsdkdir)
+endif
diff --git a/miext/sync/misyncstr.h b/miext/sync/misyncstr.h
index 6f89714..490cf61 100644
--- a/miext/sync/misyncstr.h
+++ b/miext/sync/misyncstr.h
@@ -65,7 +65,7 @@ struct _SyncTrigger {
     SyncObject *pSync;
     int64_t wait_value;         /* wait value */
     unsigned int value_type;    /* Absolute or Relative */
-    unsigned int test_type;     /* transition or Comparision type */
+    unsigned int test_type;     /* transition or Comparison type */
     int64_t test_value;         /* trigger event threshold value */
     Bool (*CheckTrigger)(struct _SyncTrigger *pTrigger,
                          int64_t newval);
diff --git a/missing b/missing
index 8d0eaad..1fe1611 100755
--- a/missing
+++ b/missing
@@ -3,7 +3,7 @@
 
 scriptversion=2018-03-07.03; # UTC
 
-# Copyright (C) 1996-2020 Free Software Foundation, Inc.
+# Copyright (C) 1996-2021 Free Software Foundation, Inc.
 # Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
 
 # This program is free software; you can redistribute it and/or modify
diff --git a/os/Makefile.am b/os/Makefile.am
index c6e78cb..30f516c 100644
--- a/os/Makefile.am
+++ b/os/Makefile.am
@@ -58,8 +58,8 @@ EXTRA_DIST = $(SECURERPC_SRCS) $(XDMCP_SRCS)
 
 if SPECIAL_DTRACE_OBJECTS
 # Generate dtrace object code for probes in libos & libdix
-dtrace.o: $(top_srcdir)/dix/Xserver.d libos.la
-	$(AM_V_GEN)$(DTRACE) -G -C -o $@ -s $(top_srcdir)/dix/Xserver.d .libs/*.o ../dix/.libs/*.o
+dtrace.o: $(top_srcdir)/include/Xserver.d libos.la
+	$(AM_V_GEN)$(DTRACE) -G -C -o $@ -s $(top_srcdir)/include/Xserver.d .libs/*.o ../dix/.libs/*.o
 
 noinst_PROGRAMS = os.O
 
diff --git a/os/Makefile.in b/os/Makefile.in
index 46d5a8c..2ee1622 100644
--- a/os/Makefile.in
+++ b/os/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -113,7 +113,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -223,8 +222,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \
 	reallocarray.c strcasecmp.c strcasestr.c strlcat.c strlcpy.c \
 	strndup.c timingsafe_memcmp.c
@@ -246,8 +243,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -261,6 +256,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -279,14 +276,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -303,8 +292,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -360,6 +351,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -412,7 +405,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -436,29 +428,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -496,8 +472,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -508,14 +482,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -785,7 +753,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
@@ -1000,8 +967,8 @@ uninstall-am:
 
 
 # Generate dtrace object code for probes in libos & libdix
-@SPECIAL_DTRACE_OBJECTS_TRUE@dtrace.o: $(top_srcdir)/dix/Xserver.d libos.la
-@SPECIAL_DTRACE_OBJECTS_TRUE@	$(AM_V_GEN)$(DTRACE) -G -C -o $@ -s $(top_srcdir)/dix/Xserver.d .libs/*.o ../dix/.libs/*.o
+@SPECIAL_DTRACE_OBJECTS_TRUE@dtrace.o: $(top_srcdir)/include/Xserver.d libos.la
+@SPECIAL_DTRACE_OBJECTS_TRUE@	$(AM_V_GEN)$(DTRACE) -G -C -o $@ -s $(top_srcdir)/include/Xserver.d .libs/*.o ../dix/.libs/*.o
 @SPECIAL_DTRACE_OBJECTS_TRUE@os.O: dtrace.o libos.la
 @SPECIAL_DTRACE_OBJECTS_TRUE@	$(AM_V_GEN)ld -r -o $@ dtrace.o .libs/*.o
 
diff --git a/os/WaitFor.c b/os/WaitFor.c
index dc33c16..ff1d376 100644
--- a/os/WaitFor.c
+++ b/os/WaitFor.c
@@ -296,7 +296,7 @@ OsTimerPtr
 TimerSet(OsTimerPtr timer, int flags, CARD32 millis,
          OsTimerCallback func, void *arg)
 {
-    OsTimerPtr existing, tmp;
+    OsTimerPtr existing;
     CARD32 now = GetTimeInMillis();
 
     if (!timer) {
@@ -329,11 +329,11 @@ TimerSet(OsTimerPtr timer, int flags, CARD32 millis,
     input_lock();
 
     /* Sort into list */
-    xorg_list_for_each_entry_safe(existing, tmp, &timers, list)
+    xorg_list_for_each_entry(existing, &timers, list)
         if ((int) (existing->expires - millis) > 0)
             break;
     /* This even works at the end of the list -- existing->list will be timers */
-    xorg_list_add(&timer->list, existing->list.prev);
+    xorg_list_append(&timer->list, &existing->list);
 
     /* Check to see if the timer is ready to run now */
     if ((int) (millis - now) <= 0)
diff --git a/os/access.c b/os/access.c
index 9724616..61ee8e3 100644
--- a/os/access.c
+++ b/os/access.c
@@ -94,7 +94,6 @@ SOFTWARE.
 #include <X11/X.h>
 #include <X11/Xproto.h>
 #include "misc.h"
-#include "site.h"
 #include <errno.h>
 #include <sys/types.h>
 #ifndef WIN32
@@ -117,6 +116,10 @@ SOFTWARE.
 #endif
 #endif
 
+#ifdef HAVE_SYS_UN_H
+#include <sys/un.h>
+#endif
+
 #if defined(SVR4) ||  (defined(SYSV) && defined(__i386__)) || defined(__GNU__)
 #include <sys/utsname.h>
 #endif
@@ -228,7 +231,7 @@ typedef struct _host {
 #define FreeHost(h)	free(h)
 static HOST *selfhosts = NULL;
 static HOST *validhosts = NULL;
-static int AccessEnabled = DEFAULT_ACCESS_CONTROL;
+static int AccessEnabled = TRUE;
 static int LocalHostEnabled = FALSE;
 static int LocalHostRequested = FALSE;
 static int UsingXdmcp = FALSE;
@@ -582,7 +585,7 @@ static void
 in6_fillscopeid(struct sockaddr_in6 *sin6)
 {
 #if defined(__KAME__)
-    if (IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr)) {
+    if (IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr) && sin6->sin6_scope_id == 0) {
         sin6->sin6_scope_id =
             ntohs(*(u_int16_t *) &sin6->sin6_addr.s6_addr[2]);
         sin6->sin6_addr.s6_addr[2] = sin6->sin6_addr.s6_addr[3] = 0;
@@ -921,7 +924,7 @@ AddLocalHosts(void)
         /* Fix for XFree86 bug #156: pass addingLocal = TRUE to
          * NewHost to tell that we are adding the default local
          * host entries and not to flag the entries as being
-         * explicitely requested */
+         * explicitly requested */
         (void) NewHost(self->family, self->addr, self->len, TRUE);
 }
 
@@ -951,7 +954,7 @@ ResetHosts(const char *display)
     int len;
 
     siTypesInitialize();
-    AccessEnabled = defeatAccessControl ? FALSE : DEFAULT_ACCESS_CONTROL;
+    AccessEnabled = !defeatAccessControl;
     LocalHostEnabled = FALSE;
     while ((host = validhosts) != 0) {
         validhosts = host->next;
@@ -1168,15 +1171,19 @@ GetLocalClientCreds(ClientPtr client, LocalClientCredRec ** lccp)
     XtransConnInfo ci;
     LocalClientCredRec *lcc;
 
-#ifdef HAVE_GETPEEREID
-    uid_t uid;
-    gid_t gid;
-#elif defined(HAVE_GETPEERUCRED)
+#if defined(HAVE_GETPEERUCRED)
     ucred_t *peercred = NULL;
     const gid_t *gids;
 #elif defined(SO_PEERCRED)
     struct ucred peercred;
     socklen_t so_len = sizeof(peercred);
+#elif defined(HAVE_GETPEEREID)
+    uid_t uid;
+    gid_t gid;
+#if defined(LOCAL_PEERPID)
+    pid_t pid;
+    socklen_t so_len = sizeof(pid);
+#endif
 #endif
 
     if (client == NULL)
@@ -1198,16 +1205,7 @@ GetLocalClientCreds(ClientPtr client, LocalClientCredRec ** lccp)
     lcc = *lccp;
 
     fd = _XSERVTransGetConnectionNumber(ci);
-#ifdef HAVE_GETPEEREID
-    if (getpeereid(fd, &uid, &gid) == -1) {
-        FreeLocalClientCreds(lcc);
-        return -1;
-    }
-    lcc->euid = uid;
-    lcc->egid = gid;
-    lcc->fieldsSet = LCC_UID_SET | LCC_GID_SET;
-    return 0;
-#elif defined(HAVE_GETPEERUCRED)
+#if defined(HAVE_GETPEERUCRED)
     if (getpeerucred(fd, &peercred) < 0) {
         FreeLocalClientCreds(lcc);
         return -1;
@@ -1254,6 +1252,25 @@ GetLocalClientCreds(ClientPtr client, LocalClientCredRec ** lccp)
     lcc->egid = peercred.gid;
     lcc->pid = peercred.pid;
     lcc->fieldsSet = LCC_UID_SET | LCC_GID_SET | LCC_PID_SET;
+    return 0;
+#elif defined(HAVE_GETPEEREID)
+    if (getpeereid(fd, &uid, &gid) == -1) {
+        FreeLocalClientCreds(lcc);
+        return -1;
+    }
+    lcc->euid = uid;
+    lcc->egid = gid;
+    lcc->fieldsSet = LCC_UID_SET | LCC_GID_SET;
+
+#if defined(LOCAL_PEERPID)
+    if (getsockopt(fd, SOL_LOCAL, LOCAL_PEERPID, &pid, &so_len) != 0) {
+        ErrorF("getsockopt failed to determine pid of socket %d: %s\n", fd, strerror(errno));
+    } else {
+        lcc->pid = pid;
+        lcc->fieldsSet |= LCC_PID_SET;
+    }
+#endif
+
     return 0;
 #endif
 #else
diff --git a/os/auth.c b/os/auth.c
index d325434..611e4ef 100644
--- a/os/auth.c
+++ b/os/auth.c
@@ -215,11 +215,11 @@ CheckAuthorization(unsigned int name_length,
                 return (*protocols[i].Check) (data_length, data, client,
                                               reason);
             }
-            *reason = "Protocol not supported by server\n";
+            *reason = "Authorization protocol not supported by server\n";
         }
     }
     else
-        *reason = "No protocol specified\n";
+        *reason = "Authorization required, but no authorization protocol specified\n";
     return (XID) ~0L;
 }
 
diff --git a/os/backtrace.c b/os/backtrace.c
index 2aad0e3..99d7769 100644
--- a/os/backtrace.c
+++ b/os/backtrace.c
@@ -176,7 +176,7 @@ xorg_backtrace(void)
 #define ElfSym Elf32_Sym
 #endif
 
-/* Called for each frame on the stack to print it's contents */
+/* Called for each frame on the stack to print its contents */
 static int
 xorg_backtrace_frame(uintptr_t pc, int signo, void *arg)
 {
@@ -227,6 +227,8 @@ xorg_backtrace_frame(uintptr_t pc, int signo, void *arg)
 #endif                          /* HAVE_WALKCONTEXT */
 
 #ifdef HAVE_PSTACK
+#include <unistd.h>
+
 static int
 xorg_backtrace_pstack(void)
 {
diff --git a/os/client.c b/os/client.c
index 213492d..922172c 100644
--- a/os/client.c
+++ b/os/client.c
@@ -73,6 +73,12 @@
 #include <limits.h>
 #endif
 
+#ifdef __APPLE__
+#include <dispatch/dispatch.h>
+#include <errno.h>
+#include <sys/sysctl.h>
+#endif
+
 /**
  * Try to determine a PID for a client from its connection
  * information. This should be called only once when new client has
@@ -130,9 +136,11 @@ DetermineClientPid(struct _Client * client)
 void
 DetermineClientCmd(pid_t pid, const char **cmdname, const char **cmdargs)
 {
+#if !defined(__APPLE__)
     char path[PATH_MAX + 1];
     int totsize = 0;
     int fd = 0;
+#endif
 
     if (cmdname)
         *cmdname = NULL;
@@ -142,7 +150,107 @@ DetermineClientCmd(pid_t pid, const char **cmdname, const char **cmdargs)
     if (pid == -1)
         return;
 
-#if defined(__OpenBSD__)
+#if defined (__APPLE__)
+    {
+        static dispatch_once_t once;
+        static int argmax;
+        dispatch_once(&once, ^{
+            int mib[2];
+            size_t len;
+
+            mib[0] = CTL_KERN;
+            mib[1] = KERN_ARGMAX;
+
+            len = sizeof(argmax);
+            if (sysctl(mib, 2, &argmax, &len, NULL, 0) == -1) {
+                ErrorF("Unable to dynamically determine kern.argmax, using ARG_MAX (%d)\n", ARG_MAX);
+                argmax = ARG_MAX;
+            }
+        });
+
+        int mib[3];
+        size_t len = argmax;
+        int32_t argc = -1;
+
+        char * const procargs = malloc(len);
+        if (!procargs) {
+            ErrorF("Failed to allocate memory (%lu bytes) for KERN_PROCARGS2 result for pid %d: %s\n", len, pid, strerror(errno));
+            return;
+        }
+
+        mib[0] = CTL_KERN;
+        mib[1] = KERN_PROCARGS2;
+        mib[2] = pid;
+
+        if (sysctl(mib, 3, procargs, &len, NULL, 0) == -1) {
+            ErrorF("Failed to determine KERN_PROCARGS2 for pid %d: %s\n", pid, strerror(errno));
+            free(procargs);
+            return;
+        }
+
+        if (len < sizeof(argc) || len > argmax) {
+            ErrorF("Erroneous length returned when querying KERN_PROCARGS2 for pid %d: %zu\n", pid, len);
+            free(procargs);
+            return;
+        }
+
+        /* Ensure we have a failsafe NUL termination just in case the last entry
+         * was not actually NUL terminated.
+         */
+        procargs[len-1] = '\0';
+
+        /* Setup our iterator */
+        char *is = procargs;
+
+        /* The first element in the buffer is argc as a 32bit int. When using
+         * the older KERN_PROCARGS, this is omitted, and one needs to guess
+         * (usually by checking for an `=` character) when we start seeing
+         * envvars instead of arguments.
+         */
+        argc = *(int32_t *)is;
+        is += sizeof(argc);
+
+        /* The very next string is the executable path.  Skip over it since
+         * this function wants to return argv[0] and argv[1...n].
+         */
+        is += strlen(is) + 1;
+
+        /* Skip over extra NUL characters to get to the start of argv[0] */
+        for (; (is < &procargs[len]) && !(*is); is++);
+
+        if (! (is < &procargs[len])) {
+            ErrorF("Arguments were not returned when querying KERN_PROCARGS2 for pid %d: %zu\n", pid, len);
+            free(procargs);
+            return;
+        }
+
+        if (cmdname) {
+            *cmdname = strdup(is);
+        }
+
+        /* Jump over argv[0] and point to argv[1] */
+        is += strlen(is) + 1;
+
+        if (cmdargs && is < &procargs[len]) {
+            char *args = is;
+
+            /* Remove the NUL terminators except the last one */
+            for (int i = 1; i < argc - 1; i++) {
+                /* Advance to the NUL terminator */
+                is += strlen(is);
+
+                /* Change the NUL to a space, ensuring we don't accidentally remove the terminal NUL */
+                if (is < &procargs[len-1]) {
+                    *is = ' ';
+                }
+            }
+
+            *cmdargs = strdup(args);
+        }
+
+        free(procargs);
+    }
+#elif defined(__OpenBSD__)
     /* on OpenBSD use kvm_getargv() */
     {
         kvm_t *kd;
@@ -197,7 +305,7 @@ DetermineClientCmd(pid_t pid, const char **cmdname, const char **cmdargs)
         return;
     path[totsize - 1] = '\0';
 
-    /* Contruct the process name without arguments. */
+    /* Construct the process name without arguments. */
     if (cmdname) {
         *cmdname = strdup(path);
     }
diff --git a/os/connection.c b/os/connection.c
index 32d2cda..3fd0b00 100644
--- a/os/connection.c
+++ b/os/connection.c
@@ -79,6 +79,8 @@ SOFTWARE.
 #include <stdio.h>
 #include <stdlib.h>
 
+#include <sys/stat.h>
+
 #ifndef WIN32
 #include <sys/socket.h>
 
@@ -116,11 +118,14 @@ SOFTWARE.
 #define zoneid_t int
 #endif
 
+#ifdef HAVE_SYSTEMD_DAEMON
+#include <systemd/sd-daemon.h>
+#endif
+
 #include "probes.h"
 
 struct ospoll   *server_poll;
 
-int MaxClients = 0;
 Bool NewOutputPending;          /* not yet attempted to write some new output */
 Bool NoListenAll;               /* Don't establish any listening sockets */
 
@@ -134,7 +139,7 @@ static Pid_t ParentProcess;
 int GrabInProgress = 0;
 
 static void
-QueueNewConnections(int curconn, int ready, void *data);
+EstablishNewConnections(int curconn, int ready, void *data);
 
 static void
 set_poll_client(ClientPtr client);
@@ -162,18 +167,6 @@ lookup_trans_conn(int fd)
     return NULL;
 }
 
-/* Set MaxClients */
-
-void
-InitConnectionLimits(void)
-{
-    MaxClients = MAXCLIENTS;
-
-#ifdef DEBUG
-    ErrorF("InitConnectionLimits: MaxClients = %d\n", MaxClients);
-#endif
-}
-
 /*
  * If SIGUSR1 was set to SIG_IGN when the server started, assume that either
  *
@@ -220,6 +213,11 @@ NotifyParentProcess(void)
     }
     if (RunFromSigStopParent)
         raise(SIGSTOP);
+#ifdef HAVE_SYSTEMD_DAEMON
+    /* If we have been started as a systemd service, tell systemd that
+       we are ready. Otherwise sd_notify() won't do anything. */
+    sd_notify(0, "READY=1");
+#endif
 #endif
 }
 
@@ -283,7 +281,7 @@ CreateWellKnownSockets(void)
         int fd = _XSERVTransGetConnectionNumber(ListenTransConns[i]);
 
         ListenTransFds[i] = fd;
-        SetNotifyFd(fd, QueueNewConnections, X_NOTIFY_READ, NULL);
+        SetNotifyFd(fd, EstablishNewConnections, X_NOTIFY_READ, NULL);
 
         if (!_XSERVTransIsLocal(ListenTransConns[i]))
             DefineSelf (fd);
@@ -343,7 +341,8 @@ ResetWellKnownSockets(void)
         }
     }
     for (i = 0; i < ListenTransCount; i++)
-        SetNotifyFd(ListenTransFds[i], QueueNewConnections, X_NOTIFY_READ, NULL);
+        SetNotifyFd(ListenTransFds[i], EstablishNewConnections, X_NOTIFY_READ,
+                    NULL);
 
     ResetAuthorization();
     ResetHosts(display);
@@ -638,8 +637,8 @@ AllocNewConnection(XtransConnInfo trans_conn, int fd, CARD32 conn_time)
     set_poll_client(client);
 
 #ifdef DEBUG
-    ErrorF("AllocNewConnection: client index = %d, socket fd = %d\n",
-           client->index, fd);
+    ErrorF("AllocNewConnection: client index = %d, socket fd = %d, local = %d\n",
+           client->index, fd, client->local);
 #endif
 #ifdef XSERVER_DTRACE
     XSERVER_CLIENT_CONNECT(client->index, fd);
@@ -650,15 +649,13 @@ AllocNewConnection(XtransConnInfo trans_conn, int fd, CARD32 conn_time)
 
 /*****************
  * EstablishNewConnections
- *    If anyone is waiting on listened sockets, accept them.
- *    Returns a mask with indices of new clients.  Updates AllClients
- *    and AllSockets.
+ *    If anyone is waiting on listened sockets, accept them. Drop pending
+ *    connections if they've stuck around for more than one minute.
  *****************/
-
-static Bool
-EstablishNewConnections(ClientPtr clientUnused, void *closure)
+#define TimeOutValue 60 * MILLI_PER_SECOND
+static void
+EstablishNewConnections(int curconn, int ready, void *data)
 {
-    int curconn = (int) (intptr_t) closure;
     int newconn;       /* fd of new client */
     CARD32 connect_time;
     int i;
@@ -680,10 +677,10 @@ EstablishNewConnections(ClientPtr clientUnused, void *closure)
     }
 
     if ((trans_conn = lookup_trans_conn(curconn)) == NULL)
-        return TRUE;
+        return;
 
     if ((new_trans_conn = _XSERVTransAccept(trans_conn, &status)) == NULL)
-        return TRUE;
+        return;
 
     newconn = _XSERVTransGetConnectionNumber(new_trans_conn);
 
@@ -695,13 +692,7 @@ EstablishNewConnections(ClientPtr clientUnused, void *closure)
     if (!AllocNewConnection(new_trans_conn, newconn, connect_time)) {
         ErrorConnMax(new_trans_conn);
     }
-    return TRUE;
-}
-
-static void
-QueueNewConnections(int fd, int ready, void *data)
-{
-    QueueWorkProc(EstablishNewConnections, NULL, (void *) (intptr_t) fd);
+    return;
 }
 
 #define NOROOM "Maximum number of clients reached"
@@ -906,7 +897,7 @@ ListenToAllClients(void)
 /****************
  * IgnoreClient
  *    Removes one client from input masks.
- *    Must have cooresponding call to AttendClient.
+ *    Must have corresponding call to AttendClient.
  ****************/
 
 void
@@ -1000,15 +991,34 @@ MakeClientGrabPervious(ClientPtr client)
 void
 ListenOnOpenFD(int fd, int noxauth)
 {
-    char port[256];
+    char port[PATH_MAX];
     XtransConnInfo ciptr;
     const char *display_env = getenv("DISPLAY");
 
-    if (display_env && (strncmp(display_env, "/tmp/launch", 11) == 0)) {
-        /* Make the path the launchd socket if our DISPLAY is set right */
-        strcpy(port, display_env);
+    /* First check if display_env matches a <absolute path to unix socket>[.<screen number>] scheme (eg: launchd) */
+    if (display_env && display_env[0] == '/') {
+        struct stat sbuf;
+
+        strlcpy(port, display_env, sizeof(port));
+
+        /* If the path exists, we don't have do do anything else.
+         * If it doesn't, we need to check for a .<screen number> to strip off and recheck.
+         */
+        if (0 != stat(port, &sbuf)) {
+            char *dot = strrchr(port, '.');
+            if (dot) {
+                *dot = '\0';
+
+                if (0 != stat(port, &sbuf)) {
+                    display_env = NULL;
+                }
+            } else {
+                display_env = NULL;
+            }
+        }
     }
-    else {
+
+    if (!display_env) {
         /* Just some default so things don't break and die. */
         snprintf(port, sizeof(port), ":%d", atoi(display));
     }
@@ -1036,7 +1046,7 @@ ListenOnOpenFD(int fd, int noxauth)
     ListenTransConns[ListenTransCount] = ciptr;
     ListenTransFds[ListenTransCount] = fd;
 
-    SetNotifyFd(fd, QueueNewConnections, X_NOTIFY_READ, NULL);
+    SetNotifyFd(fd, EstablishNewConnections, X_NOTIFY_READ, NULL);
 
     /* Increment the count */
     ListenTransCount++;
diff --git a/os/inputthread.c b/os/inputthread.c
index e6694af..3469cfc 100644
--- a/os/inputthread.c
+++ b/os/inputthread.c
@@ -427,7 +427,7 @@ InputThreadPreInit(void)
     flags = fcntl(inputThreadInfo->readPipe, F_GETFD);
     if (flags != -1) {
         flags |= FD_CLOEXEC;
-        (void)fcntl(inputThreadInfo->readPipe, F_SETFD, &flags);
+        (void)fcntl(inputThreadInfo->readPipe, F_SETFD, flags);
     }
     SetNotifyFd(inputThreadInfo->readPipe, InputThreadNotifyPipe, X_NOTIFY_READ, NULL);
 
@@ -438,7 +438,7 @@ InputThreadPreInit(void)
     flags = fcntl(hotplugPipeRead, F_GETFD);
     if (flags != -1) {
         flags |= FD_CLOEXEC;
-        (void)fcntl(hotplugPipeRead, F_SETFD, &flags);
+        (void)fcntl(hotplugPipeRead, F_SETFD, flags);
     }
     hotplugPipeWrite = hotplugPipe[1];
 
@@ -558,7 +558,11 @@ extern int InputThreadUnregisterDev(int fd)
 
 int xthread_sigmask(int how, const sigset_t *set, sigset_t *oldset)
 {
+#ifdef HAVE_SIGPROCMASK
     return sigprocmask(how, set, oldset);
+#else
+    return 0;
+#endif
 }
 
 #endif
diff --git a/os/io.c b/os/io.c
index 939f517..5b7fac3 100644
--- a/os/io.c
+++ b/os/io.c
@@ -323,7 +323,7 @@ ReadRequestFromClient(ClientPtr client)
                 /* save the data we've already read */
                 memmove(oci->buffer, oci->bufptr, gotnow);
             if (needed > oci->size) {
-                /* make buffer bigger to accomodate request */
+                /* make buffer bigger to accommodate request */
                 char *ibuf;
 
                 ibuf = (char *) realloc(oci->buffer, needed);
@@ -343,7 +343,7 @@ ReadRequestFromClient(ClientPtr client)
          *  never get here in those circumstances.
          */
         if (!oc->trans_conn) {
-            /*  treat as if an error occured on the read, which is what
+            /*  treat as if an error occurred on the read, which is what
              *  used to happen
              */
             YieldControlDeath();
@@ -814,7 +814,7 @@ WriteToClient(ClientPtr who, int count, const void *__buf)
  /********************
  * FlushClient()
  *    If the client isn't keeping up with us, then we try to continue
- *    buffering the data and set the apropriate bit in ClientsWritable
+ *    buffering the data and set the appropriate bit in ClientsWritable
  *    (which is used by WaitFor in the select).  If the connection yields
  *    a permanent error, or we can't allocate any more space, we then
  *    close the connection.
diff --git a/os/log.c b/os/log.c
index cc82191..4bd6b7e 100644
--- a/os/log.c
+++ b/os/log.c
@@ -88,7 +88,6 @@ OR PERFORMANCE OF THIS SOFTWARE.
 #include <errno.h>
 
 #include "input.h"
-#include "site.h"
 #include "opaque.h"
 
 #ifdef WIN32
@@ -108,6 +107,14 @@ OR PERFORMANCE OF THIS SOFTWARE.
 void (*OsVendorVErrorFProc) (const char *, va_list args) = NULL;
 #endif
 
+/* Default logging parameters. */
+#ifndef DEFAULT_LOG_VERBOSITY
+#define DEFAULT_LOG_VERBOSITY		0
+#endif
+#ifndef DEFAULT_LOG_FILE_VERBOSITY
+#define DEFAULT_LOG_FILE_VERBOSITY	3
+#endif
+
 static FILE *logFile = NULL;
 static int logFileFd = -1;
 static Bool logFlush = FALSE;
@@ -866,7 +873,7 @@ AbortServer(void)
     CloseWellKnownConnections();
     OsCleanup(TRUE);
     AbortDevices();
-    AbortDDX(EXIT_ERR_ABORT);
+    ddxGiveUp(EXIT_ERR_ABORT);
     fflush(stderr);
     if (CoreDump)
         OsAbort();
diff --git a/os/meson.build b/os/meson.build
index 0e41f9c..ab28fc4 100644
--- a/os/meson.build
+++ b/os/meson.build
@@ -19,34 +19,34 @@ srcs_os = [
     'log.c',
 ]
 
-# Wrapper code for missing C library functions
+# Wrapper code for missing C library functions. Note that conf_data contains either '1' or false.
 srcs_libc = []
-if not conf_data.get('HAVE_REALLOCARRAY')
+if conf_data.get('HAVE_REALLOCARRAY').to_int() == 0
     srcs_libc += 'reallocarray.c'
 endif
-if not conf_data.get('HAVE_STRCASECMP')
+if conf_data.get('HAVE_STRCASECMP').to_int() == 0
     srcs_libc += 'strcasecmp.c'
 endif
-if not conf_data.get('HAVE_STRCASESTR')
+if conf_data.get('HAVE_STRCASESTR').to_int() == 0
     srcs_libc += 'strcasestr.c'
 endif
-if not conf_data.get('HAVE_STRLCAT')
+if conf_data.get('HAVE_STRLCAT').to_int() == 0
     srcs_libc += 'strlcat.c'
 endif
-if not conf_data.get('HAVE_STRLCPY')
+if conf_data.get('HAVE_STRLCPY').to_int() == 0
     srcs_libc += 'strlcpy.c'
 endif
-if not conf_data.get('HAVE_STRNDUP')
+if conf_data.get('HAVE_STRNDUP').to_int() == 0
     srcs_libc += 'strndup.c'
 endif
-if not conf_data.get('HAVE_TIMINGSAFE_MEMCMP')
+if conf_data.get('HAVE_TIMINGSAFE_MEMCMP').to_int() == 0
     srcs_libc += 'timingsafe_memcmp.c'
 endif
-if not conf_data.get('HAVE_POLL')
+if conf_data.get('HAVE_POLL').to_int() == 0
     srcs_os += 'xserver_poll.c'
 endif
 
-if conf_data.get('BUSFAULT')
+if conf_data.get('BUSFAULT').to_int() != 0
     srcs_os += 'busfault.c'
 endif
 
@@ -62,10 +62,20 @@ if get_option('secure-rpc')
     if not (rpc_dep.found() or cc.has_header('rpc/rpc.h'))
         error('secure-rpc requested, but neither libtirpc or libc RPC support were found')
     endif
-
+    # XXX: also check if RPC library provides xdr_opaque_auth, authdes_(sec)create ???
     srcs_os += 'rpcauth.c'
 endif
 
+os_dep = []
+os_c_args = []
+if get_option('xres')
+    # Only the XRes extension cares about the client ID.
+    os_c_args += '-DCLIENTIDS'
+    if host_machine.system() == 'openbsd'
+        os_dep += cc.find_library('kvm')
+    endif
+endif
+
 libxlibc = []
 if srcs_libc.length() > 0
     libxlibc = static_library('libxlibc',
@@ -77,15 +87,22 @@ if srcs_libc.length() > 0
     )
 endif
 
+if enable_input_thread
+    os_dep += cc.find_library('pthread')
+endif
+
 libxserver_os = static_library('libxserver_os',
     srcs_os,
     include_directories: inc,
     dependencies: [
+        dtrace_dep,
         common_dep,
         dl_dep,
         sha1_dep,
         rpc_dep,
+        os_dep,
         dependency('xau')
     ],
+    c_args: os_c_args,
     link_with: libxlibc,
 )
diff --git a/os/strcasestr.c b/os/strcasestr.c
index 1ca2ad6..3189cf2 100644
--- a/os/strcasestr.c
+++ b/os/strcasestr.c
@@ -36,7 +36,6 @@
 
 #include <ctype.h>
 #include <string.h>
-#include "dix.h"
 
 /*
  * Find the first occurrence of find in s, ignore case.
diff --git a/os/utils.c b/os/utils.c
index 2ba1c80..92a66e8 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -110,6 +110,10 @@ __stdcall unsigned long GetTickCount(void);
 
 #include "picture.h"
 
+#include "miinitext.h"
+
+#include "present.h"
+
 Bool noTestExtensions;
 
 #ifdef COMPOSITE
@@ -327,7 +331,7 @@ LockServer(void)
              */
             break;
         }
-        else {
+        else if (errno == EEXIST) {
             /*
              * Read the pid from the existing file
              */
@@ -372,6 +376,12 @@ LockServer(void)
                      LockFile, "\tand start again.");
             }
         }
+        else {
+            unlink(tmp);
+            FatalError
+                ("Linking lock file (%s) in place failed: %s\n",
+                 LockFile, strerror(errno));
+        }
     }
     unlink(tmp);
     if (!haslock)
@@ -526,8 +536,7 @@ UseMsg(void)
     ErrorF
         ("-deferglyphs [none|all|16] defer loading of [no|all|16-bit] glyphs\n");
     ErrorF("-f #                   bell base (0-100)\n");
-    ErrorF("-fc string             cursor font\n");
-    ErrorF("-fn string             default font name\n");
+    ErrorF("-fakescreenfps #       fake screen default fps (1-600)\n");
     ErrorF("-fp string             default font path\n");
     ErrorF("-help                  prints message with these options\n");
     ErrorF("+iglx                  Allow creating indirect GLX contexts\n");
@@ -561,13 +570,11 @@ UseMsg(void)
     ErrorF("-s #                   screen-saver timeout (minutes)\n");
     ErrorF("-seat string           seat to run on\n");
     ErrorF("-t #                   default pointer threshold (pixels/t)\n");
-    ErrorF("-terminate             terminate at server reset\n");
-    ErrorF("-to #                  connection time out\n");
+    ErrorF("-terminate [delay]     terminate at server reset (optional delay in sec)\n");
     ErrorF("-tst                   disable testing extensions\n");
     ErrorF("ttyxx                  server started from init on /dev/ttyxx\n");
     ErrorF("v                      video blanking for screen-saver\n");
     ErrorF("-v                     screen-saver without video blanking\n");
-    ErrorF("-wm                    WhenMapped default backing-store\n");
     ErrorF("-wr                    create root window with white background\n");
     ErrorF("-maxbigreqsize         set maximal bigrequest size \n");
 #ifdef PANORAMIX
@@ -580,6 +587,7 @@ UseMsg(void)
     ErrorF("-sigstop               Enable SIGSTOP based startup\n");
     ErrorF("+extension name        Enable extension\n");
     ErrorF("-extension name        Disable extension\n");
+    ListStaticExtensions();
 #ifdef XDMCP
     XdmcpUseMsg();
 #endif
@@ -776,15 +784,12 @@ ProcessCommandLine(int argc, char *argv[])
             else
                 UseMsg();
         }
-        else if (strcmp(argv[i], "-fc") == 0) {
-            if (++i < argc)
-                defaultCursorFont = argv[i];
-            else
-                UseMsg();
-        }
-        else if (strcmp(argv[i], "-fn") == 0) {
-            if (++i < argc)
-                defaultTextFont = argv[i];
+        else if (strcmp(argv[i], "-fakescreenfps") == 0) {
+            if (++i < argc) {
+                FakeScreenFps = (uint32_t) atoi(argv[i]);
+                if (FakeScreenFps < 1 || FakeScreenFps > 600)
+                    FatalError("fakescreenfps must be an integer in [1;600] range\n");
+            }
             else
                 UseMsg();
         }
@@ -930,12 +935,10 @@ ProcessCommandLine(int argc, char *argv[])
         }
         else if (strcmp(argv[i], "-terminate") == 0) {
             dispatchExceptionAtReset = DE_TERMINATE;
-        }
-        else if (strcmp(argv[i], "-to") == 0) {
-            if (++i < argc)
-                TimeOutValue = ((CARD32) atoi(argv[i])) * MILLI_PER_SECOND;
-            else
-                UseMsg();
+            terminateDelay = -1;
+            if ((i + 1 < argc) && (isdigit(*argv[i + 1])))
+               terminateDelay = atoi(argv[++i]);
+            terminateDelay = max(0, terminateDelay);
         }
         else if (strcmp(argv[i], "-tst") == 0) {
             noTestExtensions = TRUE;
@@ -944,8 +947,6 @@ ProcessCommandLine(int argc, char *argv[])
             defaultScreenSaverBlanking = PreferBlanking;
         else if (strcmp(argv[i], "-v") == 0)
             defaultScreenSaverBlanking = DontPreferBlanking;
-        else if (strcmp(argv[i], "-wm") == 0)
-            defaultBackingStore = WhenMapped;
         else if (strcmp(argv[i], "-wr") == 0)
             whiteRoot = TRUE;
         else if (strcmp(argv[i], "-background") == 0) {
@@ -1284,7 +1285,7 @@ SmartScheduleInit(void)
 #endif
 }
 
-#ifdef SIG_BLOCK
+#ifdef HAVE_SIGPROCMASK
 static sigset_t PreviousSignalMask;
 static int BlockedSignalCount;
 #endif
@@ -1292,7 +1293,7 @@ static int BlockedSignalCount;
 void
 OsBlockSignals(void)
 {
-#ifdef SIG_BLOCK
+#ifdef HAVE_SIGPROCMASK
     if (BlockedSignalCount++ == 0) {
         sigset_t set;
 
@@ -1314,7 +1315,7 @@ OsBlockSignals(void)
 void
 OsReleaseSignals(void)
 {
-#ifdef SIG_BLOCK
+#ifdef HAVE_SIGPROCMASK
     if (--BlockedSignalCount == 0) {
         xthread_sigmask(SIG_SETMASK, &PreviousSignalMask, 0);
     }
@@ -1324,7 +1325,7 @@ OsReleaseSignals(void)
 void
 OsResetSignals(void)
 {
-#ifdef SIG_BLOCK
+#ifdef HAVE_SIGPROCMASK
     while (BlockedSignalCount > 0)
         OsReleaseSignals();
     input_force_unlock();
diff --git a/os/xdmcp.c b/os/xdmcp.c
index 62adead..093e300 100644
--- a/os/xdmcp.c
+++ b/os/xdmcp.c
@@ -43,7 +43,6 @@
 #include "input.h"
 #include "dixstruct.h"
 #include "opaque.h"
-#include "site.h"
 
 #define XSERV_t
 #define TRANS_SERVER
@@ -62,7 +61,7 @@
 #define X_INCLUDE_NETDB_H
 #include <X11/Xos_r.h>
 
-static const char *defaultDisplayClass = COMPILEDDISPLAYCLASS;
+static const char *defaultDisplayClass = "MIT-unspecified";
 
 static int xdmcpSocket, sessionSocket;
 static xdmcp_states state;
@@ -912,6 +911,7 @@ static void
 get_xdmcp_sock(void)
 {
     int soopts = 1;
+    int socketfd = -1;
 
 #if defined(IPv6) && defined(AF_INET6)
     if ((xdmcpSocket6 = socket(AF_INET6, SOCK_DGRAM, 0)) < 0)
@@ -924,8 +924,18 @@ get_xdmcp_sock(void)
                         sizeof(soopts)) < 0)
         XdmcpWarning("UDP set broadcast socket-option failed");
 #endif                          /* SO_BROADCAST */
-    if (xdmcpSocket >= 0 && xdm_from != NULL) {
-        if (bind(xdmcpSocket, (struct sockaddr *) &FromAddress,
+
+    if (xdm_from == NULL)
+        return;
+
+    if (SOCKADDR_FAMILY(FromAddress) == AF_INET)
+        socketfd = xdmcpSocket;
+#if defined(IPv6) && defined(AF_INET6)
+    else if (SOCKADDR_FAMILY(FromAddress) == AF_INET6)
+        socketfd = xdmcpSocket6;
+#endif
+    if (socketfd >= 0) {
+        if (bind(socketfd, (struct sockaddr *) &FromAddress,
                  FromAddressLen) < 0) {
             FatalError("Xserver: failed to bind to -from address: %s\n",
                        xdm_from);
diff --git a/os/xserver_poll.c b/os/xserver_poll.c
index f152cda..1927dfa 100644
--- a/os/xserver_poll.c
+++ b/os/xserver_poll.c
@@ -84,6 +84,10 @@
 #include <string.h>                          /* string functions */
 #include "xserver_poll.h"
 
+#if defined(WIN32) && !defined(__CYGWIN__)
+#include <X11/Xwinsock.h>
+#endif
+
 /*---------------------------------------------------------------------------*\
 				  Macros
 \*---------------------------------------------------------------------------*/
diff --git a/os/xsha1.c b/os/xsha1.c
index c54e68c..a160b7e 100644
--- a/os/xsha1.c
+++ b/os/xsha1.c
@@ -33,7 +33,16 @@
 #if defined(HAVE_SHA1_IN_LIBMD)  /* Use libmd for SHA1 */ \
 	|| defined(HAVE_SHA1_IN_LIBC)   /* Use libc for SHA1 */
 
+#if defined(__DragonFly__) || defined(__FreeBSD__)
+#include <sha.h>
+#define	SHA1End		SHA1_End
+#define	SHA1File	SHA1_File
+#define	SHA1Final	SHA1_Final
+#define	SHA1Init	SHA1_Init
+#define	SHA1Update	SHA1_Update
+#else
 #include <sha1.h>
+#endif
 
 void *
 x_sha1_init(void)
diff --git a/present/Makefile.am b/present/Makefile.am
index 542f4ca..a2d5821 100644
--- a/present/Makefile.am
+++ b/present/Makefile.am
@@ -1,7 +1,6 @@
 noinst_LTLIBRARIES = libpresent.la
 AM_CFLAGS = \
-	-DHAVE_XORG_CONFIG_H \
-	@DIX_CFLAGS@ @XORG_CFLAGS@
+	@DIX_CFLAGS@
 
 libpresent_la_SOURCES = \
 	present.h \
@@ -15,7 +14,6 @@ libpresent_la_SOURCES = \
 	present_request.c \
 	present_scmd.c \
 	present_screen.c \
-	present_vblank.c \
-	present_wnmd.c
+	present_vblank.c
 
 sdk_HEADERS = present.h presentext.h
diff --git a/present/Makefile.in b/present/Makefile.in
index a700bc1..b21146b 100644
--- a/present/Makefile.in
+++ b/present/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -106,7 +106,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -115,7 +114,7 @@ libpresent_la_LIBADD =
 am_libpresent_la_OBJECTS = present.lo present_event.lo \
 	present_execute.lo present_fake.lo present_fence.lo \
 	present_notify.lo present_request.lo present_scmd.lo \
-	present_screen.lo present_vblank.lo present_wnmd.lo
+	present_screen.lo present_vblank.lo
 libpresent_la_OBJECTS = $(am_libpresent_la_OBJECTS)
 AM_V_lt = $(am__v_lt_@AM_V@)
 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
@@ -141,7 +140,7 @@ am__depfiles_remade = ./$(DEPDIR)/present.Plo \
 	./$(DEPDIR)/present_fake.Plo ./$(DEPDIR)/present_fence.Plo \
 	./$(DEPDIR)/present_notify.Plo ./$(DEPDIR)/present_request.Plo \
 	./$(DEPDIR)/present_scmd.Plo ./$(DEPDIR)/present_screen.Plo \
-	./$(DEPDIR)/present_vblank.Plo ./$(DEPDIR)/present_wnmd.Plo
+	./$(DEPDIR)/present_vblank.Plo
 am__mv = mv -f
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@@ -214,8 +213,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
@@ -235,8 +232,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -250,6 +245,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -268,14 +265,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -292,8 +281,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -349,6 +340,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -401,7 +394,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -425,29 +417,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -485,8 +461,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -497,14 +471,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -579,8 +547,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 noinst_LTLIBRARIES = libpresent.la
 AM_CFLAGS = \
-	-DHAVE_XORG_CONFIG_H \
-	@DIX_CFLAGS@ @XORG_CFLAGS@
+	@DIX_CFLAGS@
 
 libpresent_la_SOURCES = \
 	present.h \
@@ -594,8 +561,7 @@ libpresent_la_SOURCES = \
 	present_request.c \
 	present_scmd.c \
 	present_screen.c \
-	present_vblank.c \
-	present_wnmd.c
+	present_vblank.c
 
 sdk_HEADERS = present.h presentext.h
 all: all-am
@@ -662,7 +628,6 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/present_scmd.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/present_screen.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/present_vblank.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/present_wnmd.Plo@am__quote@ # am--include-marker
 
 $(am__depfiles_remade):
 	@$(MKDIR_P) $(@D)
@@ -769,7 +734,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
@@ -856,7 +820,6 @@ distclean: distclean-am
 	-rm -f ./$(DEPDIR)/present_scmd.Plo
 	-rm -f ./$(DEPDIR)/present_screen.Plo
 	-rm -f ./$(DEPDIR)/present_vblank.Plo
-	-rm -f ./$(DEPDIR)/present_wnmd.Plo
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
 	distclean-tags
@@ -912,7 +875,6 @@ maintainer-clean: maintainer-clean-am
 	-rm -f ./$(DEPDIR)/present_scmd.Plo
 	-rm -f ./$(DEPDIR)/present_screen.Plo
 	-rm -f ./$(DEPDIR)/present_vblank.Plo
-	-rm -f ./$(DEPDIR)/present_wnmd.Plo
 	-rm -f Makefile
 maintainer-clean-am: distclean-am maintainer-clean-generic
 
diff --git a/present/meson.build b/present/meson.build
index e316af2..1a74a9c 100644
--- a/present/meson.build
+++ b/present/meson.build
@@ -9,7 +9,6 @@ srcs_present = [
     'present_scmd.c',
     'present_screen.c',
     'present_vblank.c',
-    'present_wnmd.c',
 ]
 
 hdrs_present = [
@@ -22,9 +21,10 @@ libxserver_present = static_library('libxserver_present',
     include_directories: inc,
     dependencies: [
         common_dep,
-        dependency('presentproto', version: '>= 1.1')
+        dependency('presentproto', version: '>= 1.2')
     ],
-    c_args: '-DHAVE_XORG_CONFIG_H'
 )
 
-install_data(hdrs_present, install_dir: xorgsdkdir)
+if build_xorg
+    install_data(hdrs_present, install_dir: xorgsdkdir)
+endif
diff --git a/present/present.c b/present/present.c
index 3eddb74..271fe32 100644
--- a/present/present.c
+++ b/present/present.c
@@ -20,24 +20,9 @@
  * OF THIS SOFTWARE.
  */
 
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
 #include "present_priv.h"
 #include <gcstruct.h>
 
-/*
- * Returns:
- * TRUE if the first MSC value is equal to or after the second one
- * FALSE if the first MSC value is before the second one
- */
-static Bool
-msc_is_equal_or_after(uint64_t test, uint64_t reference)
-{
-    return (int64_t)(test - reference) >= 0;
-}
-
 uint32_t
 present_query_capabilities(RRCrtcPtr crtc)
 {
@@ -59,11 +44,19 @@ present_get_crtc(WindowPtr window)
 {
     ScreenPtr                   screen = window->drawable.pScreen;
     present_screen_priv_ptr     screen_priv = present_screen_priv(screen);
+    RRCrtcPtr                   crtc = NULL;
 
     if (!screen_priv)
         return NULL;
 
-    return screen_priv->get_crtc(screen_priv, window);
+    crtc = screen_priv->get_crtc(screen_priv, window);
+    if (crtc && !present_screen_priv(crtc->pScreen)) {
+        crtc = RRFirstEnabledCrtc(screen);
+    }
+    if (crtc && !present_screen_priv(crtc->pScreen)) {
+        crtc = NULL;
+    }
+    return crtc;
 }
 
 /*
@@ -157,31 +150,73 @@ present_can_window_flip(WindowPtr window)
     return screen_priv->can_window_flip(window);
 }
 
-void
-present_adjust_timings(uint32_t options,
-                       uint64_t *crtc_msc,
-                       uint64_t *target_msc,
+uint64_t
+present_get_target_msc(uint64_t target_msc_arg,
+                       uint64_t crtc_msc,
                        uint64_t divisor,
-                       uint64_t remainder)
+                       uint64_t remainder,
+                       uint32_t options)
 {
-    /* Adjust target_msc to match modulus
+    const Bool  synced_flip = !(options & PresentOptionAsync);
+    uint64_t    target_msc;
+
+    /* If the specified target-msc lies in the future, then this
+     * defines the target-msc according to Present protocol.
+     */
+    if (msc_is_after(target_msc_arg, crtc_msc))
+        return target_msc_arg;
+
+    /* If no divisor is specified, the modulo is undefined
+     * and we do present instead asap.
      */
-    if (msc_is_equal_or_after(*crtc_msc, *target_msc)) {
-        if (divisor != 0) {
-            *target_msc = *crtc_msc - (*crtc_msc % divisor) + remainder;
-            if (options & PresentOptionAsync) {
-                if (msc_is_after(*crtc_msc, *target_msc))
-                    *target_msc += divisor;
-            } else {
-                if (msc_is_equal_or_after(*crtc_msc, *target_msc))
-                    *target_msc += divisor;
-            }
-        } else {
-            *target_msc = *crtc_msc;
-            if (!(options & PresentOptionAsync))
-                (*target_msc)++;
-        }
+    if (divisor == 0) {
+        target_msc = crtc_msc;
+
+        /* When no async presentation is forced, by default we sync the
+         * presentation with vblank. But in this case we can't target
+         * the current crtc-msc, which already has begun, but must aim
+         * for the upcoming one.
+         */
+        if (synced_flip)
+            target_msc++;
+
+        return target_msc;
     }
+
+    /* Calculate target-msc by the specified modulo parameters. According
+     * to Present protocol this is after the next field with:
+     *
+     *      field-msc % divisor == remainder.
+     *
+     * The following formula calculates a target_msc solving above equation
+     * and with |target_msc - crtc_msc| < divisor.
+     *
+     * Example with crtc_msc = 10, divisor = 4 and remainder = 3, 2, 1, 0:
+     *      11 = 10 - 2 + 3 = 10 - (10 % 4) + 3,
+     *      10 = 10 - 2 + 2 = 10 - (10 % 4) + 2,
+     *       9 = 10 - 2 + 1 = 10 - (10 % 4) + 1,
+     *       8 = 10 - 2 + 0 = 10 - (10 % 4) + 0.
+     */
+    target_msc = crtc_msc - (crtc_msc % divisor) + remainder;
+
+    /* Here we already found the correct field-msc. */
+    if (msc_is_after(target_msc, crtc_msc))
+        return target_msc;
+    /*
+     * Here either:
+     * a) target_msc == crtc_msc, i.e. crtc_msc actually solved
+     * above equation with crtc_msc % divisor == remainder.
+     *
+     * => This means we want to present at target_msc + divisor for a synced
+     *    flip or directly now for an async flip.
+     *
+     * b) target_msc < crtc_msc with target_msc + divisor > crtc_msc.
+     *
+     * => This means in any case we want to present at target_msc + divisor.
+     */
+    if (synced_flip || msc_is_after(crtc_msc, target_msc))
+        target_msc += divisor;
+    return target_msc;
 }
 
 int
diff --git a/present/present.h b/present/present.h
index 3d0b972..d41b360 100644
--- a/present/present.h
+++ b/present/present.h
@@ -95,7 +95,7 @@ typedef Bool (*present_flip_ptr) (RRCrtcPtr crtc,
                                   Bool sync_flip);
 /* Flip pixmap for window, return false if it didn't happen.
  *
- * Like present_flip_ptr, additionaly with:
+ * Like present_flip_ptr, additionally with:
  *
  * 'window' used for synchronization.
  *
@@ -139,43 +139,15 @@ typedef struct present_screen_info {
 
 } present_screen_info_rec, *present_screen_info_ptr;
 
-typedef struct present_wnmd_info {
-    uint32_t                            version;
-
-    present_get_crtc_ptr                get_crtc;
-    present_wnmd_get_ust_msc_ptr        get_ust_msc;
-    present_wnmd_queue_vblank_ptr       queue_vblank;
-    present_wnmd_abort_vblank_ptr       abort_vblank;
-    present_flush_ptr                   flush;
-    uint32_t                            capabilities;
-    present_check_flip2_ptr             check_flip2;
-    present_wnmd_flip_ptr               flip;
-    present_wnmd_flips_stop_ptr         flips_stop;
-
-} present_wnmd_info_rec, *present_wnmd_info_ptr;
-
 /*
  * Called when 'event_id' occurs. 'ust' and 'msc' indicate when the
  * event actually happened
  */
 extern _X_EXPORT void
 present_event_notify(uint64_t event_id, uint64_t ust, uint64_t msc);
-/*
- * Called when 'event_id' occurs for 'window'.
- * 'ust' and 'msc' indicate when the event actually happened
- */
-extern _X_EXPORT void
-present_wnmd_event_notify(WindowPtr window, uint64_t event_id, uint64_t ust, uint64_t msc);
-
-/* 'crtc' has been turned off, so any pending events will never occur.
- */
-extern _X_EXPORT void
-present_event_abandon(RRCrtcPtr crtc);
 
 extern _X_EXPORT Bool
 present_screen_init(ScreenPtr screen, present_screen_info_ptr info);
-extern _X_EXPORT Bool
-present_wnmd_screen_init(ScreenPtr screen, present_wnmd_info_ptr info);
 
 typedef void (*present_complete_notify_proc)(WindowPtr window,
                                              CARD8 kind,
@@ -190,4 +162,6 @@ present_register_complete_notify(present_complete_notify_proc proc);
 extern _X_EXPORT Bool
 present_can_window_flip(WindowPtr window);
 
+extern _X_EXPORT uint32_t FakeScreenFps;
+
 #endif /* _PRESENT_H_ */
diff --git a/present/present_event.c b/present/present_event.c
index 9aebfdf..435b26b 100644
--- a/present/present_event.c
+++ b/present/present_event.c
@@ -20,10 +20,6 @@
  * OF THIS SOFTWARE.
  */
 
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
 #include "present_priv.h"
 
 static RESTYPE present_event_type;
diff --git a/present/present_execute.c b/present/present_execute.c
index 58066db..68a5878 100644
--- a/present/present_execute.c
+++ b/present/present_execute.c
@@ -20,10 +20,6 @@
  * OF THIS SOFTWARE.
  */
 
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
 #include "present_priv.h"
 
 /*
diff --git a/present/present_fake.c b/present/present_fake.c
index 2350638..f4a3bd8 100644
--- a/present/present_fake.c
+++ b/present/present_fake.c
@@ -20,10 +20,6 @@
  * OF THIS SOFTWARE.
  */
 
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
 #include "present_priv.h"
 #include "list.h"
 
@@ -117,21 +113,29 @@ present_fake_queue_vblank(ScreenPtr     screen,
     return Success;
 }
 
+uint32_t FakeScreenFps = 0;
+
 void
 present_fake_screen_init(ScreenPtr screen)
 {
+    uint32_t                fake_fps;
     present_screen_priv_ptr screen_priv = present_screen_priv(screen);
 
-    /* For screens with hardware vblank support, the fake code
-     * will be used for off-screen windows and while screens are blanked,
-     * in which case we want a slow interval here
-     *
-     * Otherwise, pretend that the screen runs at 60Hz
-     */
-    if (screen_priv->info && screen_priv->info->get_crtc)
-        screen_priv->fake_interval = 1000000;
-    else
-        screen_priv->fake_interval = 16667;
+    if (FakeScreenFps)
+        fake_fps = FakeScreenFps;
+    else {
+        /* For screens with hardware vblank support, the fake code
+        * will be used for off-screen windows and while screens are blanked,
+        * in which case we want a large interval here: 1Hz
+        *
+        * Otherwise, pretend that the screen runs at 60Hz
+        */
+        if (screen_priv->info && screen_priv->info->get_crtc)
+            fake_fps = 1;
+        else
+            fake_fps = 60;
+    }
+    screen_priv->fake_interval = 1000000 / fake_fps;
 }
 
 void
diff --git a/present/present_fence.c b/present/present_fence.c
index 87e7e17..aca04a5 100644
--- a/present/present_fence.c
+++ b/present/present_fence.c
@@ -20,10 +20,6 @@
  * OF THIS SOFTWARE.
  */
 
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
 #include "present_priv.h"
 #include <gcstruct.h>
 #include <misync.h>
diff --git a/present/present_notify.c b/present/present_notify.c
index e272e08..4459549 100644
--- a/present/present_notify.c
+++ b/present/present_notify.c
@@ -20,10 +20,6 @@
  * OF THIS SOFTWARE.
  */
 
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
 #include "present_priv.h"
 
 /*
diff --git a/present/present_priv.h b/present/present_priv.h
index f34edd5..6ebd009 100644
--- a/present/present_priv.h
+++ b/present/present_priv.h
@@ -23,6 +23,7 @@
 #ifndef _PRESENT_PRIV_H_
 #define _PRESENT_PRIV_H_
 
+#include "dix-config.h"
 #include <X11/X.h>
 #include "scrnintstr.h"
 #include "misc.h"
@@ -80,7 +81,6 @@ struct present_vblank {
     Bool                queued;         /* on present_exec_queue */
     Bool                flip;           /* planning on using flip */
     Bool                flip_ready;     /* wants to flip, but waiting for previous flip or unflip */
-    Bool                flip_idler;     /* driver explicitly permitted idling */
     Bool                sync_flip;      /* do flip synchronous to vblank */
     Bool                abort_flip;     /* aborting this flip */
     PresentFlipReason   reason;         /* reason for which flip is not possible */
@@ -107,6 +107,7 @@ typedef Bool (*present_priv_check_flip_ptr)(RRCrtcPtr crtc,
                                             PresentFlipReason *reason);
 typedef void (*present_priv_check_flip_window_ptr)(WindowPtr window);
 typedef Bool (*present_priv_can_window_flip_ptr)(WindowPtr window);
+typedef void (*present_priv_clear_window_flip_ptr)(WindowPtr window);
 
 typedef int (*present_priv_pixmap_ptr)(WindowPtr window,
                                        PixmapPtr pixmap,
@@ -125,9 +126,6 @@ typedef int (*present_priv_pixmap_ptr)(WindowPtr window,
                                        present_notify_ptr notifies,
                                        int num_notifies);
 
-typedef void (*present_priv_create_event_id_ptr)(present_window_priv_ptr window_priv,
-                                                 present_vblank_ptr vblank);
-
 typedef int (*present_priv_queue_vblank_ptr)(ScreenPtr screen,
                                              WindowPtr window,
                                              RRCrtcPtr crtc,
@@ -163,7 +161,6 @@ struct present_screen_priv {
     Bool                        flip_sync;
 
     present_screen_info_ptr     info;
-    present_wnmd_info_ptr       wnmd_info;
 
     /* Mode hooks */
     present_priv_query_capabilities_ptr query_capabilities;
@@ -172,9 +169,9 @@ struct present_screen_priv {
     present_priv_check_flip_ptr         check_flip;
     present_priv_check_flip_window_ptr  check_flip_window;
     present_priv_can_window_flip_ptr    can_window_flip;
+    present_priv_clear_window_flip_ptr  clear_window_flip;
 
     present_priv_pixmap_ptr             present_pixmap;
-    present_priv_create_event_id_ptr    create_event_id;
 
     present_priv_queue_vblank_ptr       queue_vblank;
     present_priv_flush_ptr              flush;
@@ -220,15 +217,6 @@ struct present_window_priv {
     uint64_t               msc;         /* Last reported MSC from the current crtc */
     struct xorg_list       vblank;
     struct xorg_list       notifies;
-
-    /* Used for window flips */
-    uint64_t               event_id;
-    struct xorg_list       exec_queue;
-    struct xorg_list       flip_queue;
-    struct xorg_list       idle_queue;
-
-    present_vblank_ptr     flip_pending;
-    present_vblank_ptr     flip_active;
 };
 
 #define PresentCrtcNeverSet     ((RRCrtcPtr) 1)
@@ -279,12 +267,12 @@ present_set_tree_pixmap(WindowPtr window,
                         PixmapPtr expected,
                         PixmapPtr pixmap);
 
-void
-present_adjust_timings(uint32_t options,
-                       uint64_t *crtc_msc,
-                       uint64_t *target_msc,
+uint64_t
+present_get_target_msc(uint64_t target_msc_arg,
+                       uint64_t crtc_msc,
                        uint64_t divisor,
-                       uint64_t remainder);
+                       uint64_t remainder,
+                       uint32_t options);
 
 int
 present_pixmap(WindowPtr window,
@@ -447,6 +435,11 @@ present_scmd_init_mode_hooks(present_screen_priv_ptr screen_priv);
 /*
  * present_screen.c
  */
+Bool
+present_screen_register_priv_keys(void);
+
+present_screen_priv_ptr
+present_screen_priv_init(ScreenPtr screen);
 
 /*
  * present_vblank.c
@@ -454,6 +447,25 @@ present_scmd_init_mode_hooks(present_screen_priv_ptr screen_priv);
 void
 present_vblank_notify(present_vblank_ptr vblank, CARD8 kind, CARD8 mode, uint64_t ust, uint64_t crtc_msc);
 
+Bool
+present_vblank_init(present_vblank_ptr vblank,
+                    WindowPtr window,
+                    PixmapPtr pixmap,
+                    CARD32 serial,
+                    RegionPtr valid,
+                    RegionPtr update,
+                    int16_t x_off,
+                    int16_t y_off,
+                    RRCrtcPtr target_crtc,
+                    SyncFence *wait_fence,
+                    SyncFence *idle_fence,
+                    uint32_t options,
+                    const uint32_t capabilities,
+                    present_notify_ptr notifies,
+                    int num_notifies,
+                    uint64_t target_msc,
+                    uint64_t crtc_msc);
+
 present_vblank_ptr
 present_vblank_create(WindowPtr window,
                       PixmapPtr pixmap,
@@ -466,7 +478,7 @@ present_vblank_create(WindowPtr window,
                       SyncFence *wait_fence,
                       SyncFence *idle_fence,
                       uint32_t options,
-                      const uint32_t *capabilities,
+                      const uint32_t capabilities,
                       present_notify_ptr notifies,
                       int num_notifies,
                       uint64_t target_msc,
@@ -478,13 +490,4 @@ present_vblank_scrap(present_vblank_ptr vblank);
 void
 present_vblank_destroy(present_vblank_ptr vblank);
 
-/*
- * present_wnmd.c
- */
-void
-present_wnmd_set_abort_flip(WindowPtr window);
-
-void
-present_wnmd_init_mode_hooks(present_screen_priv_ptr screen_priv);
-
 #endif /*  _PRESENT_PRIV_H_ */
diff --git a/present/present_request.c b/present/present_request.c
index f52efa5..f3e5679 100644
--- a/present/present_request.c
+++ b/present/present_request.c
@@ -20,10 +20,6 @@
  * OF THIS SOFTWARE.
  */
 
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
 #include "present_priv.h"
 #include "randrstr.h"
 #include <protocol-versions.h>
diff --git a/present/present_scmd.c b/present/present_scmd.c
index 3e3ae34..239055b 100644
--- a/present/present_scmd.c
+++ b/present/present_scmd.c
@@ -20,10 +20,6 @@
  * OF THIS SOFTWARE.
  */
 
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
 #include "present_priv.h"
 #include <misync.h>
 #include <misyncstr.h>
@@ -39,20 +35,14 @@
  *
  */
 
-static uint64_t         present_event_id;
+static uint64_t present_scmd_event_id;
+
 static struct xorg_list present_exec_queue;
 static struct xorg_list present_flip_queue;
 
 static void
 present_execute(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc);
 
-static void
-present_scmd_create_event_id(present_window_priv_ptr window_priv,
-                             present_vblank_ptr vblank)
-{
-    vblank->event_id = ++present_event_id;
-}
-
 static inline PixmapPtr
 present_flip_pending_pixmap(ScreenPtr screen)
 {
@@ -82,6 +72,9 @@ present_check_flip(RRCrtcPtr            crtc,
     WindowPtr                   root = screen->root;
     present_screen_priv_ptr     screen_priv = present_screen_priv(screen);
 
+    if (crtc) {
+       screen_priv = present_screen_priv(crtc->pScreen);
+    }
     if (reason)
         *reason = PRESENT_FLIP_REASON_UNKNOWN;
 
@@ -165,6 +158,9 @@ present_scmd_get_crtc(present_screen_priv_ptr screen_priv, WindowPtr window)
     if (!screen_priv->info)
         return NULL;
 
+    if (!screen_priv->info->get_crtc)
+        return NULL;
+
     return (*screen_priv->info->get_crtc)(window);
 }
 
@@ -181,11 +177,14 @@ static int
 present_get_ust_msc(ScreenPtr screen, RRCrtcPtr crtc, uint64_t *ust, uint64_t *msc)
 {
     present_screen_priv_ptr     screen_priv = present_screen_priv(screen);
+    present_screen_priv_ptr     crtc_screen_priv = screen_priv;
+    if (crtc)
+        crtc_screen_priv = present_screen_priv(crtc->pScreen);
 
     if (crtc == NULL)
         return present_fake_get_ust_msc(screen, ust, msc);
     else
-        return (*screen_priv->info->get_ust_msc)(crtc, ust, msc);
+        return (*crtc_screen_priv->info->get_ust_msc)(crtc, ust, msc);
 }
 
 static void
@@ -200,6 +199,9 @@ present_flush(WindowPtr window)
     if (!screen_priv->info)
         return;
 
+    if (!screen_priv->info->flush)
+        return;
+
     (*screen_priv->info->flush) (window);
 }
 
@@ -216,38 +218,12 @@ present_queue_vblank(ScreenPtr screen,
         ret = present_fake_queue_vblank(screen, event_id, msc);
     else
     {
-        present_screen_priv_ptr     screen_priv = present_screen_priv(screen);
+        present_screen_priv_ptr     screen_priv = present_screen_priv(crtc->pScreen);
         ret = (*screen_priv->info->queue_vblank) (crtc, event_id, msc);
     }
     return ret;
 }
 
-static uint64_t
-present_window_to_crtc_msc(WindowPtr window, RRCrtcPtr crtc, uint64_t window_msc, uint64_t new_msc)
-{
-    present_window_priv_ptr     window_priv = present_get_window_priv(window, TRUE);
-
-    if (crtc != window_priv->crtc) {
-        uint64_t        old_ust, old_msc;
-
-        if (window_priv->crtc == PresentCrtcNeverSet) {
-            window_priv->msc_offset = 0;
-        } else {
-            /* The old CRTC may have been turned off, in which case
-             * we'll just use whatever previous MSC we'd seen from this CRTC
-             */
-
-            if (present_get_ust_msc(window->drawable.pScreen, window_priv->crtc, &old_ust, &old_msc) != Success)
-                old_msc = window_priv->msc;
-
-            window_priv->msc_offset += new_msc - old_msc;
-        }
-        window_priv->crtc = crtc;
-    }
-
-    return window_msc + window_priv->msc_offset;
-}
-
 /*
  * When the wait fence or previous flip is completed, it's time
  * to re-try the request
@@ -350,7 +326,7 @@ present_unflip(ScreenPtr screen)
 
     present_restore_screen_pixmap(screen);
 
-    screen_priv->unflip_event_id = ++present_event_id;
+    screen_priv->unflip_event_id = ++present_scmd_event_id;
     DebugPresent(("u %" PRIu64 "\n", screen_priv->unflip_event_id));
     (*screen_priv->info->unflip) (screen, screen_priv->unflip_event_id);
 }
@@ -525,6 +501,26 @@ present_scmd_can_window_flip(WindowPtr window)
     return TRUE;
 }
 
+/*
+ * Clean up any pending or current flips for this window
+ */
+static void
+present_scmd_clear_window_flip(WindowPtr window)
+{
+    ScreenPtr                   screen = window->drawable.pScreen;
+    present_screen_priv_ptr     screen_priv = present_screen_priv(screen);
+    present_vblank_ptr          flip_pending = screen_priv->flip_pending;
+
+    if (flip_pending && flip_pending->window == window) {
+        present_set_abort_flip(screen);
+        flip_pending->window = NULL;
+    }
+    if (screen_priv->flip_window == window) {
+        present_restore_screen_pixmap(screen);
+        screen_priv->flip_window = NULL;
+    }
+}
+
 /*
  * Once the required MSC has been reached, execute the pending request.
  *
@@ -541,6 +537,9 @@ present_execute(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc)
     WindowPtr                   window = vblank->window;
     ScreenPtr                   screen = window->drawable.pScreen;
     present_screen_priv_ptr     screen_priv = present_screen_priv(screen);
+    if (vblank && vblank->crtc) {
+        screen_priv=present_screen_priv(vblank->crtc->pScreen);
+    }
 
     if (present_execute_wait(vblank, crtc_msc))
         return;
@@ -639,6 +638,31 @@ present_execute(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc)
     present_execute_post(vblank, ust, crtc_msc);
 }
 
+static void
+present_scmd_update_window_crtc(WindowPtr window, RRCrtcPtr crtc, uint64_t new_msc)
+{
+    present_window_priv_ptr window_priv = present_get_window_priv(window, TRUE);
+    uint64_t                old_ust, old_msc;
+
+    /* Crtc unchanged, no offset. */
+    if (crtc == window_priv->crtc)
+        return;
+
+    /* No crtc earlier to offset against, just set the crtc. */
+    if (window_priv->crtc == PresentCrtcNeverSet) {
+        window_priv->crtc = crtc;
+        return;
+    }
+
+    /* Crtc may have been turned off or be destroyed, just use whatever previous MSC we'd seen from this CRTC. */
+    if (!RRCrtcExists(window->drawable.pScreen, window_priv->crtc) ||
+        present_get_ust_msc(window->drawable.pScreen, window_priv->crtc, &old_ust, &old_msc) != Success)
+        old_msc = window_priv->msc;
+
+    window_priv->msc_offset += new_msc - old_msc;
+    window_priv->crtc = crtc;
+}
+
 static int
 present_scmd_pixmap(WindowPtr window,
                     PixmapPtr pixmap,
@@ -651,7 +675,7 @@ present_scmd_pixmap(WindowPtr window,
                     SyncFence *wait_fence,
                     SyncFence *idle_fence,
                     uint32_t options,
-                    uint64_t window_msc,
+                    uint64_t target_window_msc,
                     uint64_t divisor,
                     uint64_t remainder,
                     present_notify_ptr notifies,
@@ -683,7 +707,7 @@ present_scmd_pixmap(WindowPtr window,
 
     ret = present_get_ust_msc(screen, target_crtc, &ust, &crtc_msc);
 
-    target_msc = present_window_to_crtc_msc(window, target_crtc, window_msc, crtc_msc);
+    present_scmd_update_window_crtc(window, target_crtc, crtc_msc);
 
     if (ret == Success) {
         /* Stash the current MSC away in case we need it later
@@ -691,11 +715,11 @@ present_scmd_pixmap(WindowPtr window,
         window_priv->msc = crtc_msc;
     }
 
-    present_adjust_timings(options,
-                           &crtc_msc,
-                           &target_msc,
-                           divisor,
-                           remainder);
+    target_msc = present_get_target_msc(target_window_msc + window_priv->msc_offset,
+                                        crtc_msc,
+                                        divisor,
+                                        remainder,
+                                        options);
 
     /*
      * Look for a matching presentation already on the list and
@@ -715,18 +739,7 @@ present_scmd_pixmap(WindowPtr window,
             if (vblank->crtc != target_crtc || vblank->target_msc != target_msc)
                 continue;
 
-            DebugPresent(("\tx %" PRIu64 " %p %" PRIu64 ": %08" PRIx32 " -> %08" PRIx32 " (crtc %p)\n",
-                          vblank->event_id, vblank, vblank->target_msc,
-                          vblank->pixmap->drawable.id, vblank->window->drawable.id,
-                          vblank->crtc));
-
-            present_pixmap_idle(vblank->pixmap, vblank->window, vblank->serial, vblank->idle_fence);
-            present_fence_destroy(vblank->idle_fence);
-            dixDestroyPixmap(vblank->pixmap, vblank->pixmap->drawable.id);
-
-            vblank->pixmap = NULL;
-            vblank->idle_fence = NULL;
-            vblank->flip = FALSE;
+            present_vblank_scrap(vblank);
             if (vblank->flip_ready)
                 present_re_execute(vblank);
         }
@@ -743,7 +756,7 @@ present_scmd_pixmap(WindowPtr window,
                                    wait_fence,
                                    idle_fence,
                                    options,
-                                   screen_priv->info ? &screen_priv->info->capabilities : NULL,
+                                   screen_priv->info ? screen_priv->info->capabilities : 0,
                                    notifies,
                                    num_notifies,
                                    target_msc,
@@ -752,6 +765,8 @@ present_scmd_pixmap(WindowPtr window,
     if (!vblank)
         return BadAlloc;
 
+    vblank->event_id = ++present_scmd_event_id;
+
     if (vblank->flip && vblank->sync_flip)
         vblank->exec_msc--;
 
@@ -823,9 +838,9 @@ present_scmd_init_mode_hooks(present_screen_priv_ptr screen_priv)
     screen_priv->check_flip         =   &present_check_flip;
     screen_priv->check_flip_window  =   &present_check_flip_window;
     screen_priv->can_window_flip    =   &present_scmd_can_window_flip;
+    screen_priv->clear_window_flip  =   &present_scmd_clear_window_flip;
 
     screen_priv->present_pixmap     =   &present_scmd_pixmap;
-    screen_priv->create_event_id    =   &present_scmd_create_event_id;
 
     screen_priv->queue_vblank       =   &present_queue_vblank;
     screen_priv->flush              =   &present_flush;
diff --git a/present/present_screen.c b/present/present_screen.c
index bfd30b8..15684ed 100644
--- a/present/present_screen.c
+++ b/present/present_screen.c
@@ -20,10 +20,6 @@
  * OF THIS SOFTWARE.
  */
 
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
 #include "present_priv.h"
 
 int present_request;
@@ -46,10 +42,6 @@ present_get_window_priv(WindowPtr window, Bool create)
     xorg_list_init(&window_priv->vblank);
     xorg_list_init(&window_priv->notifies);
 
-    xorg_list_init(&window_priv->exec_queue);
-    xorg_list_init(&window_priv->flip_queue);
-    xorg_list_init(&window_priv->idle_queue);
-
     window_priv->window = window;
     window_priv->crtc = PresentCrtcNeverSet;
     dixSetPrivate(&window->devPrivates, &present_window_private_key, window_priv);
@@ -64,7 +56,8 @@ present_close_screen(ScreenPtr screen)
 {
     present_screen_priv_ptr screen_priv = present_screen_priv(screen);
 
-    screen_priv->flip_destroy(screen);
+    if (screen_priv->flip_destroy)
+        screen_priv->flip_destroy(screen);
 
     unwrap(screen_priv, screen, CloseScreen);
     (*screen->CloseScreen) (screen);
@@ -89,50 +82,6 @@ present_free_window_vblank(WindowPtr window)
     }
 }
 
-/*
- * Clean up any pending or current flips for this window
- */
-static void
-present_clear_window_flip(WindowPtr window)
-{
-    ScreenPtr                   screen = window->drawable.pScreen;
-    present_screen_priv_ptr     screen_priv = present_screen_priv(screen);
-    present_vblank_ptr          flip_pending = screen_priv->flip_pending;
-
-    if (flip_pending && flip_pending->window == window) {
-        present_set_abort_flip(screen);
-        flip_pending->window = NULL;
-    }
-    if (screen_priv->flip_window == window) {
-        present_restore_screen_pixmap(screen);
-        screen_priv->flip_window = NULL;
-    }
-}
-
-static void
-present_wnmd_clear_window_flip(WindowPtr window)
-{
-    present_window_priv_ptr     window_priv = present_window_priv(window);
-    present_vblank_ptr          vblank, tmp;
-
-    xorg_list_for_each_entry_safe(vblank, tmp, &window_priv->flip_queue, event_queue) {
-        present_pixmap_idle(vblank->pixmap, vblank->window, vblank->serial, vblank->idle_fence);
-        present_vblank_destroy(vblank);
-    }
-
-    xorg_list_for_each_entry_safe(vblank, tmp, &window_priv->idle_queue, event_queue) {
-        present_pixmap_idle(vblank->pixmap, vblank->window, vblank->serial, vblank->idle_fence);
-        present_vblank_destroy(vblank);
-    }
-
-    vblank = window_priv->flip_active;
-    if (vblank) {
-        present_pixmap_idle(vblank->pixmap, vblank->window, vblank->serial, vblank->idle_fence);
-        present_vblank_destroy(vblank);
-    }
-    window_priv->flip_active = NULL;
-}
-
 /*
  * Hook the close window function to clean up our window private
  */
@@ -149,10 +98,7 @@ present_destroy_window(WindowPtr window)
         present_free_events(window);
         present_free_window_vblank(window);
 
-        if (screen_priv->wnmd_info)
-            present_wnmd_clear_window_flip(window);
-        else
-            present_clear_window_flip(window);
+        screen_priv->clear_window_flip(window);
 
         free(window_priv);
     }
@@ -205,7 +151,7 @@ present_clip_notify(WindowPtr window, int dx, int dy)
     wrap(screen_priv, screen, ClipNotify, present_clip_notify);
 }
 
-static Bool
+Bool
 present_screen_register_priv_keys(void)
 {
     if (!dixRegisterPrivateKey(&present_screen_private_key, PRIVATE_SCREEN, 0))
@@ -217,7 +163,7 @@ present_screen_register_priv_keys(void)
     return TRUE;
 }
 
-static present_screen_priv_ptr
+present_screen_priv_ptr
 present_screen_priv_init(ScreenPtr screen)
 {
     present_screen_priv_ptr screen_priv;
@@ -236,27 +182,6 @@ present_screen_priv_init(ScreenPtr screen)
     return screen_priv;
 }
 
-/*
- * Initialize a screen for use with present in window flip mode (wnmd)
- */
-int
-present_wnmd_screen_init(ScreenPtr screen, present_wnmd_info_ptr info)
-{
-    if (!present_screen_register_priv_keys())
-        return FALSE;
-
-    if (!present_screen_priv(screen)) {
-        present_screen_priv_ptr screen_priv = present_screen_priv_init(screen);
-        if (!screen_priv)
-            return FALSE;
-
-        screen_priv->wnmd_info = info;
-        present_wnmd_init_mode_hooks(screen_priv);
-    }
-
-    return TRUE;
-}
-
 /*
  * Initialize a screen for use with present in default screen flip mode (scmd)
  */
diff --git a/present/present_vblank.c b/present/present_vblank.c
index af14fe1..a9f17d4 100644
--- a/present/present_vblank.c
+++ b/present/present_vblank.c
@@ -20,10 +20,6 @@
  * OF THIS SOFTWARE.
  */
 
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
 #include "present_priv.h"
 
 void
@@ -42,33 +38,38 @@ present_vblank_notify(present_vblank_ptr vblank, CARD8 kind, CARD8 mode, uint64_
     }
 }
 
-present_vblank_ptr
-present_vblank_create(WindowPtr window,
-                      PixmapPtr pixmap,
-                      CARD32 serial,
-                      RegionPtr valid,
-                      RegionPtr update,
-                      int16_t x_off,
-                      int16_t y_off,
-                      RRCrtcPtr target_crtc,
-                      SyncFence *wait_fence,
-                      SyncFence *idle_fence,
-                      uint32_t options,
-                      const uint32_t *capabilities,
-                      present_notify_ptr notifies,
-                      int num_notifies,
-                      uint64_t target_msc,
-                      uint64_t crtc_msc)
+/* The memory vblank points to must be 0-initialized before calling this function.
+ *
+ * If this function returns FALSE, present_vblank_destroy must be called to clean
+ * up.
+ */
+Bool
+present_vblank_init(present_vblank_ptr vblank,
+                    WindowPtr window,
+                    PixmapPtr pixmap,
+                    CARD32 serial,
+                    RegionPtr valid,
+                    RegionPtr update,
+                    int16_t x_off,
+                    int16_t y_off,
+                    RRCrtcPtr target_crtc,
+                    SyncFence *wait_fence,
+                    SyncFence *idle_fence,
+                    uint32_t options,
+                    const uint32_t capabilities,
+                    present_notify_ptr notifies,
+                    int num_notifies,
+                    uint64_t target_msc,
+                    uint64_t crtc_msc)
 {
     ScreenPtr                   screen = window->drawable.pScreen;
     present_window_priv_ptr     window_priv = present_get_window_priv(window, TRUE);
     present_screen_priv_ptr     screen_priv = present_screen_priv(screen);
-    present_vblank_ptr          vblank;
     PresentFlipReason           reason = PRESENT_FLIP_REASON_UNKNOWN;
 
-    vblank = calloc (1, sizeof (present_vblank_rec));
-    if (!vblank)
-        return NULL;
+    if (target_crtc) {
+        screen_priv = present_screen_priv(target_crtc->pScreen);
+    }
 
     xorg_list_append(&vblank->window_list, &window_priv->vblank);
     xorg_list_init(&vblank->event_queue);
@@ -77,8 +78,6 @@ present_vblank_create(WindowPtr window,
     vblank->window = window;
     vblank->pixmap = pixmap;
 
-    screen_priv->create_event_id(window_priv, vblank);
-
     if (pixmap) {
         vblank->kind = PresentCompleteKindPixmap;
         pixmap->refcnt++;
@@ -107,17 +106,16 @@ present_vblank_create(WindowPtr window,
     vblank->notifies = notifies;
     vblank->num_notifies = num_notifies;
     vblank->has_suboptimal = (options & PresentOptionSuboptimal);
-    vblank->flip_idler = FALSE;
 
     if (pixmap != NULL &&
         !(options & PresentOptionCopy) &&
-        capabilities) {
+        screen_priv->check_flip) {
         if (msc_is_after(target_msc, crtc_msc) &&
             screen_priv->check_flip (target_crtc, window, pixmap, TRUE, valid, x_off, y_off, &reason))
         {
             vblank->flip = TRUE;
             vblank->sync_flip = TRUE;
-        } else if ((*capabilities & PresentCapabilityAsync) &&
+        } else if ((capabilities & PresentCapabilityAsync) &&
             screen_priv->check_flip (target_crtc, window, pixmap, FALSE, valid, x_off, y_off, &reason))
         {
             vblank->flip = TRUE;
@@ -142,10 +140,42 @@ present_vblank_create(WindowPtr window,
                       vblank->event_id, vblank, target_msc,
                       vblank->pixmap->drawable.id, vblank->window->drawable.id,
                       target_crtc, vblank->flip, vblank->sync_flip, vblank->serial));
-    return vblank;
+    return TRUE;
 
 no_mem:
     vblank->notifies = NULL;
+    return FALSE;
+}
+
+present_vblank_ptr
+present_vblank_create(WindowPtr window,
+                      PixmapPtr pixmap,
+                      CARD32 serial,
+                      RegionPtr valid,
+                      RegionPtr update,
+                      int16_t x_off,
+                      int16_t y_off,
+                      RRCrtcPtr target_crtc,
+                      SyncFence *wait_fence,
+                      SyncFence *idle_fence,
+                      uint32_t options,
+                      const uint32_t capabilities,
+                      present_notify_ptr notifies,
+                      int num_notifies,
+                      uint64_t target_msc,
+                      uint64_t crtc_msc)
+{
+    present_vblank_ptr vblank = calloc(1, sizeof(present_vblank_rec));
+
+    if (!vblank)
+        return NULL;
+
+    if (present_vblank_init(vblank, window, pixmap, serial, valid, update,
+                            x_off, y_off, target_crtc, wait_fence, idle_fence,
+                            options, capabilities, notifies, num_notifies,
+                            target_msc, crtc_msc))
+        return vblank;
+
     present_vblank_destroy(vblank);
     return NULL;
 }
diff --git a/present/present_wnmd.c b/present/present_wnmd.c
deleted file mode 100644
index a2e00ce..0000000
--- a/present/present_wnmd.c
+++ /dev/null
@@ -1,721 +0,0 @@
-/*
- * Copyright © 2018 Roman Gilg
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that copyright
- * notice and this permission notice appear in supporting documentation, and
- * that the name of the copyright holders not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission.  The copyright holders make no representations
- * about the suitability of this software for any purpose.  It is provided "as
- * is" without express or implied warranty.
- *
- * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include "present_priv.h"
-
-/*
- * Window flip mode
- *
- * Provides per-window flips. Flips can be processed on windows that
- * have the same size as their parents, which they share their pixmap with.
- *
- * A flip still requires a copy currently, since the original pixmap needs
- * to be updated with the new pixmap content. Just a flip of all windows
- * to the new pixmap is diffcult, because the original pixmap might not be
- * controlled by the Xserver.
- *
- */
-
-static void
-present_wnmd_execute(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc);
-
-static int
-present_wnmd_queue_vblank(ScreenPtr screen,
-                          WindowPtr window,
-                          RRCrtcPtr crtc,
-                          uint64_t event_id,
-                          uint64_t msc)
-{
-    present_screen_priv_ptr screen_priv = present_screen_priv(screen);
-    return (*screen_priv->wnmd_info->queue_vblank) (window, crtc, event_id, msc);
-}
-
-static void
-present_wnmd_create_event_id(present_window_priv_ptr window_priv, present_vblank_ptr vblank)
-{
-    vblank->event_id = ++window_priv->event_id;
-}
-
-static uint32_t
-present_wnmd_query_capabilities(present_screen_priv_ptr screen_priv)
-{
-    return screen_priv->wnmd_info->capabilities;
-}
-
-static RRCrtcPtr
-present_wnmd_get_crtc(present_screen_priv_ptr screen_priv, WindowPtr window)
-{
-    return (*screen_priv->wnmd_info->get_crtc)(window);
-}
-
-static int
-present_wnmd_get_ust_msc(ScreenPtr screen, WindowPtr window, uint64_t *ust, uint64_t *msc)
-{
-    present_screen_priv_ptr screen_priv = present_screen_priv(screen);
-    return (*screen_priv->wnmd_info->get_ust_msc)(window, ust, msc);
-}
-
-/*
- * When the wait fence or previous flip is completed, it's time
- * to re-try the request
- */
-static void
-present_wnmd_re_execute(present_vblank_ptr vblank)
-{
-    uint64_t ust = 0, crtc_msc = 0;
-
-    (void) present_wnmd_get_ust_msc(vblank->screen, vblank->window, &ust, &crtc_msc);
-    present_wnmd_execute(vblank, ust, crtc_msc);
-}
-
-static void
-present_wnmd_flip_try_ready(WindowPtr window)
-{
-    present_window_priv_ptr window_priv = present_window_priv(window);
-    present_vblank_ptr      vblank;
-
-    xorg_list_for_each_entry(vblank, &window_priv->flip_queue, event_queue) {
-        if (vblank->queued) {
-            present_wnmd_re_execute(vblank);
-            return;
-        }
-    }
-}
-
-static void
-present_wnmd_free_idle_vblank(present_vblank_ptr vblank)
-{
-    present_pixmap_idle(vblank->pixmap, vblank->window, vblank->serial, vblank->idle_fence);
-    present_vblank_destroy(vblank);
-}
-
-/*
- * Free any left over idle vblanks
- */
-static void
-present_wnmd_free_idle_vblanks(WindowPtr window)
-{
-    present_window_priv_ptr         window_priv = present_window_priv(window);
-    present_vblank_ptr              vblank, tmp;
-
-    xorg_list_for_each_entry_safe(vblank, tmp, &window_priv->idle_queue, event_queue) {
-        if (vblank->flip)
-            present_wnmd_free_idle_vblank(vblank);
-    }
-
-    if (window_priv->flip_active) {
-        present_wnmd_free_idle_vblank(window_priv->flip_active);
-        window_priv->flip_active = NULL;
-    }
-}
-
-static WindowPtr
-present_wnmd_toplvl_pixmap_window(WindowPtr window)
-{
-    ScreenPtr       screen = window->drawable.pScreen;
-    PixmapPtr       pixmap = (*screen->GetWindowPixmap)(window);
-    WindowPtr       w = window;
-    WindowPtr       next_w;
-
-    while(w->parent) {
-        next_w = w->parent;
-        if ( (*screen->GetWindowPixmap)(next_w) != pixmap) {
-            break;
-        }
-        w = next_w;
-    }
-    return w;
-}
-
-void
-present_wnmd_set_abort_flip(WindowPtr window)
-{
-    present_window_priv_ptr window_priv = present_window_priv(window);
-
-    if (!window_priv->flip_pending->abort_flip) {
-        window_priv->flip_pending->abort_flip = TRUE;
-    }
-}
-
-static void
-present_wnmd_flips_stop(WindowPtr window)
-{
-    present_window_priv_ptr window_priv = present_window_priv(window);
-    present_screen_priv_ptr screen_priv = present_screen_priv(window->drawable.pScreen);
-
-    assert (!window_priv->flip_pending);
-
-    (*screen_priv->wnmd_info->flips_stop) (window);
-
-    present_wnmd_free_idle_vblanks(window_priv->window);
-    present_wnmd_flip_try_ready(window_priv->window);
-}
-
-static void
-present_wnmd_flip_notify(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc)
-{
-    WindowPtr                   window = vblank->window;
-    present_window_priv_ptr     window_priv = present_window_priv(window);
-
-    DebugPresent(("\tn %" PRIu64 " %p %" PRIu64 " %" PRIu64 ": %08" PRIx32 " -> %08" PRIx32 "\n",
-                  vblank->event_id, vblank, vblank->exec_msc, vblank->target_msc,
-                  vblank->pixmap ? vblank->pixmap->drawable.id : 0,
-                  vblank->window ? vblank->window->drawable.id : 0));
-
-    assert (vblank == window_priv->flip_pending);
-
-    xorg_list_del(&vblank->event_queue);
-
-    if (window_priv->flip_active) {
-        if (window_priv->flip_active->flip_idler)
-            present_wnmd_free_idle_vblank(window_priv->flip_active);
-        else
-            /* Put the previous flip in the idle_queue and wait for further notice from DDX */
-            xorg_list_append(&window_priv->flip_active->event_queue, &window_priv->idle_queue);
-    }
-
-    window_priv->flip_active = vblank;
-    window_priv->flip_pending = NULL;
-
-    present_vblank_notify(vblank, PresentCompleteKindPixmap, PresentCompleteModeFlip, ust, crtc_msc);
-
-    if (vblank->abort_flip)
-        present_wnmd_flips_stop(window);
-
-    present_wnmd_flip_try_ready(window);
-}
-
-void
-present_wnmd_event_notify(WindowPtr window, uint64_t event_id, uint64_t ust, uint64_t msc)
-{
-    present_window_priv_ptr     window_priv = present_window_priv(window);
-    present_vblank_ptr          vblank;
-
-    if (!window_priv)
-        return;
-    if (!event_id)
-        return;
-
-    if (window_priv->flip_active && window_priv->flip_active->event_id == event_id) {
-        /* Notify for active flip, means it is allowed to become idle */
-        window_priv->flip_active->flip_idler = TRUE;
-        return;
-    }
-
-    DebugPresent(("\te %" PRIu64 " ust %" PRIu64 " msc %" PRIu64 "\n", event_id, ust, msc));
-    xorg_list_for_each_entry(vblank, &window_priv->exec_queue, event_queue) {
-        if (event_id == vblank->event_id) {
-            present_wnmd_execute(vblank, ust, msc);
-            return;
-        }
-    }
-    xorg_list_for_each_entry(vblank, &window_priv->flip_queue, event_queue) {
-        if (vblank->event_id == event_id) {
-            if (vblank->queued) {
-                present_wnmd_execute(vblank, ust, msc);
-            } else {
-                assert(vblank->window);
-                present_wnmd_flip_notify(vblank, ust, msc);
-            }
-            return;
-        }
-    }
-
-    xorg_list_for_each_entry(vblank, &window_priv->idle_queue, event_queue) {
-        if (vblank->event_id == event_id) {
-            if (vblank->flip)
-                present_wnmd_free_idle_vblank(vblank);
-            else
-                /* Copies which were executed but need their completion event sent */
-                present_execute_post(vblank, ust, msc);
-
-            return;
-        }
-    }
-}
-
-static Bool
-present_wnmd_check_flip(RRCrtcPtr           crtc,
-                        WindowPtr           window,
-                        PixmapPtr           pixmap,
-                        Bool                sync_flip,
-                        RegionPtr           valid,
-                        int16_t             x_off,
-                        int16_t             y_off,
-                        PresentFlipReason   *reason)
-{
-    ScreenPtr               screen = window->drawable.pScreen;
-    present_screen_priv_ptr screen_priv = present_screen_priv(screen);
-    WindowPtr               toplvl_window = present_wnmd_toplvl_pixmap_window(window);
-
-    if (reason)
-        *reason = PRESENT_FLIP_REASON_UNKNOWN;
-
-    if (!screen_priv)
-        return FALSE;
-
-    if (!screen_priv->wnmd_info)
-        return FALSE;
-
-    if (!crtc)
-        return FALSE;
-
-    /* Check to see if the driver supports flips at all */
-    if (!screen_priv->wnmd_info->flip)
-        return FALSE;
-
-    /* Source pixmap must align with window exactly */
-    if (x_off || y_off)
-        return FALSE;
-
-    /* Valid area must contain window (for simplicity for now just never flip when one is set). */
-    if (valid)
-        return FALSE;
-
-    /* Flip pixmap must have same dimensions as window */
-    if (window->drawable.width != pixmap->drawable.width ||
-            window->drawable.height != pixmap->drawable.height)
-        return FALSE;
-
-    /* Window must be same region as toplevel window */
-    if ( !RegionEqual(&window->winSize, &toplvl_window->winSize) )
-        return FALSE;
-
-    /* Can't flip if window clipped by children */
-    if (!RegionEqual(&window->clipList, &window->winSize))
-        return FALSE;
-
-    /* Ask the driver for permission */
-    if (screen_priv->wnmd_info->check_flip2) {
-        if (!(*screen_priv->wnmd_info->check_flip2) (crtc, window, pixmap, sync_flip, reason)) {
-            DebugPresent(("\td %08" PRIx32 " -> %08" PRIx32 "\n",
-                          window->drawable.id, pixmap ? pixmap->drawable.id : 0));
-            return FALSE;
-        }
-    }
-
-    return TRUE;
-}
-
-/*
- * 'window' is being reconfigured. Check to see if it is involved
- * in flipping and clean up as necessary.
- */
-static void
-present_wnmd_check_flip_window (WindowPtr window)
-{
-    present_window_priv_ptr window_priv = present_window_priv(window);
-    present_vblank_ptr      flip_pending;
-    present_vblank_ptr      flip_active;
-    present_vblank_ptr      vblank;
-    PresentFlipReason       reason;
-
-    /* If this window hasn't ever been used with Present, it can't be
-     * flipping
-     */
-    if (!window_priv)
-        return;
-
-    flip_pending = window_priv->flip_pending;
-    flip_active = window_priv->flip_active;
-
-    if (flip_pending) {
-        if (!present_wnmd_check_flip(flip_pending->crtc, flip_pending->window, flip_pending->pixmap,
-                                flip_pending->sync_flip, flip_pending->valid, 0, 0, NULL))
-            present_wnmd_set_abort_flip(window);
-    } else if (flip_active) {
-        if (!present_wnmd_check_flip(flip_active->crtc, flip_active->window, flip_active->pixmap,
-                                     flip_active->sync_flip, flip_active->valid, 0, 0, NULL))
-            present_wnmd_flips_stop(window);
-    }
-
-    /* Now check any queued vblanks */
-    xorg_list_for_each_entry(vblank, &window_priv->vblank, window_list) {
-        if (vblank->queued && vblank->flip &&
-                !present_wnmd_check_flip(vblank->crtc, window, vblank->pixmap,
-                                         vblank->sync_flip, vblank->valid, 0, 0, &reason)) {
-            vblank->flip = FALSE;
-            vblank->reason = reason;
-        }
-    }
-}
-
-static Bool
-present_wnmd_flip(WindowPtr window,
-                  RRCrtcPtr crtc,
-                  uint64_t event_id,
-                  uint64_t target_msc,
-                  PixmapPtr pixmap,
-                  Bool sync_flip,
-                  RegionPtr damage)
-{
-    ScreenPtr                   screen = window->drawable.pScreen;
-    present_screen_priv_ptr     screen_priv = present_screen_priv(screen);
-
-    return (*screen_priv->wnmd_info->flip) (window,
-                                            crtc,
-                                            event_id,
-                                            target_msc,
-                                            pixmap,
-                                            sync_flip,
-                                            damage);
-}
-
-static void
-present_wnmd_cancel_flip(WindowPtr window)
-{
-    present_window_priv_ptr window_priv = present_window_priv(window);
-
-    if (window_priv->flip_pending)
-        present_wnmd_set_abort_flip(window);
-    else if (window_priv->flip_active)
-        present_wnmd_flips_stop(window);
-}
-
-static Bool
-present_wnmd_can_window_flip(WindowPtr window)
-{
-    ScreenPtr                   screen = window->drawable.pScreen;
-    present_screen_priv_ptr     screen_priv = present_screen_priv(screen);
-    WindowPtr                   toplvl_window = present_wnmd_toplvl_pixmap_window(window);
-
-    if (!screen_priv)
-        return FALSE;
-
-    if (!screen_priv->wnmd_info)
-        return FALSE;
-
-    /* Check to see if the driver supports flips at all */
-    if (!screen_priv->wnmd_info->flip)
-        return FALSE;
-
-    /* Don't flip redirected windows */
-    if (window->redirectDraw != RedirectDrawNone)
-        return FALSE;
-
-    /* Window must be same region as toplevel window */
-    if ( !RegionEqual(&window->winSize, &toplvl_window->winSize) )
-        return FALSE;
-
-    return TRUE;
-}
-
-/*
- * Once the required MSC has been reached, execute the pending request.
- *
- * For requests to actually present something, either blt contents to
- * the window pixmap or queue a window buffer swap on the backend.
- *
- * For requests to just get the current MSC/UST combo, skip that part and
- * go straight to event delivery.
- */
-static void
-present_wnmd_execute(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc)
-{
-    WindowPtr               window = vblank->window;
-    present_window_priv_ptr window_priv = present_window_priv(window);
-
-    if (present_execute_wait(vblank, crtc_msc))
-        return;
-
-    if (vblank->flip && vblank->pixmap && vblank->window) {
-        if (window_priv->flip_pending) {
-            DebugPresent(("\tr %" PRIu64 " %p (pending %p)\n",
-                          vblank->event_id, vblank,
-                          window_priv->flip_pending));
-            xorg_list_del(&vblank->event_queue);
-            xorg_list_append(&vblank->event_queue, &window_priv->flip_queue);
-            vblank->flip_ready = TRUE;
-            return;
-        }
-    }
-
-    xorg_list_del(&vblank->event_queue);
-    xorg_list_del(&vblank->window_list);
-    vblank->queued = FALSE;
-
-    if (vblank->pixmap && vblank->window) {
-        ScreenPtr screen = window->drawable.pScreen;
-
-        if (vblank->flip) {
-            RegionPtr damage;
-
-            DebugPresent(("\tf %" PRIu64 " %p %" PRIu64 ": %08" PRIx32 " -> %08" PRIx32 "\n",
-                          vblank->event_id, vblank, crtc_msc,
-                          vblank->pixmap->drawable.id, vblank->window->drawable.id));
-
-            /* Prepare to flip by placing it in the flip queue
-             */
-            xorg_list_add(&vblank->event_queue, &window_priv->flip_queue);
-
-            /* Set update region as damaged */
-            if (vblank->update) {
-                damage = RegionDuplicate(vblank->update);
-                /* Translate update region to screen space */
-                assert(vblank->x_off == 0 && vblank->y_off == 0);
-                RegionTranslate(damage, window->drawable.x, window->drawable.y);
-                RegionIntersect(damage, damage, &window->clipList);
-            } else
-                damage = RegionDuplicate(&window->clipList);
-
-            /* Try to flip - the vblank is now pending
-             */
-            window_priv->flip_pending = vblank;
-            // ask the driver
-            if (present_wnmd_flip(vblank->window, vblank->crtc, vblank->event_id,
-                                     vblank->target_msc, vblank->pixmap, vblank->sync_flip, damage)) {
-                WindowPtr toplvl_window = present_wnmd_toplvl_pixmap_window(vblank->window);
-                PixmapPtr old_pixmap = screen->GetWindowPixmap(window);
-
-                /* Replace window pixmap with flip pixmap */
-#ifdef COMPOSITE
-                vblank->pixmap->screen_x = old_pixmap->screen_x;
-                vblank->pixmap->screen_y = old_pixmap->screen_y;
-#endif
-                present_set_tree_pixmap(toplvl_window, old_pixmap, vblank->pixmap);
-                vblank->pixmap->refcnt++;
-                dixDestroyPixmap(old_pixmap, old_pixmap->drawable.id);
-
-                /* Report damage */
-                DamageDamageRegion(&vblank->window->drawable, damage);
-                RegionDestroy(damage);
-                return;
-            }
-
-            xorg_list_del(&vblank->event_queue);
-            /* Flip failed. Clear the flip_pending field
-              */
-            window_priv->flip_pending = NULL;
-            vblank->flip = FALSE;
-        }
-        DebugPresent(("\tc %p %" PRIu64 ": %08" PRIx32 " -> %08" PRIx32 "\n",
-                      vblank, crtc_msc, vblank->pixmap->drawable.id, vblank->window->drawable.id));
-
-        present_wnmd_cancel_flip(window);
-
-        present_execute_copy(vblank, crtc_msc);
-        assert(!vblank->queued);
-
-        if (present_wnmd_queue_vblank(screen, window, vblank->crtc,
-                                      vblank->event_id, crtc_msc + 1)
-            == Success) {
-            xorg_list_add(&vblank->event_queue, &window_priv->idle_queue);
-            xorg_list_append(&vblank->window_list, &window_priv->vblank);
-
-            return;
-        }
-    }
-
-    present_execute_post(vblank, ust, crtc_msc);
-}
-
-static uint64_t
-present_wnmd_window_to_crtc_msc(WindowPtr window, RRCrtcPtr crtc, uint64_t window_msc, uint64_t new_msc)
-{
-    present_window_priv_ptr window_priv = present_get_window_priv(window, TRUE);
-
-    if (crtc != window_priv->crtc) {
-        if (window_priv->crtc == PresentCrtcNeverSet) {
-            window_priv->msc_offset = 0;
-        } else {
-            /* The old CRTC may have been turned off, in which case
-             * we'll just use whatever previous MSC we'd seen from this CRTC
-             */
-
-            window_priv->msc_offset += new_msc - window_priv->msc;
-        }
-        window_priv->crtc = crtc;
-    }
-
-    return window_msc + window_priv->msc_offset;
-}
-
-static int
-present_wnmd_pixmap(WindowPtr window,
-                    PixmapPtr pixmap,
-                    CARD32 serial,
-                    RegionPtr valid,
-                    RegionPtr update,
-                    int16_t x_off,
-                    int16_t y_off,
-                    RRCrtcPtr target_crtc,
-                    SyncFence *wait_fence,
-                    SyncFence *idle_fence,
-                    uint32_t options,
-                    uint64_t window_msc,
-                    uint64_t divisor,
-                    uint64_t remainder,
-                    present_notify_ptr notifies,
-                    int num_notifies)
-{
-    uint64_t                    ust = 0;
-    uint64_t                    target_msc;
-    uint64_t                    crtc_msc = 0;
-    int                         ret;
-    present_vblank_ptr          vblank, tmp;
-    ScreenPtr                   screen = window->drawable.pScreen;
-    present_window_priv_ptr     window_priv = present_get_window_priv(window, TRUE);
-    present_screen_priv_ptr     screen_priv = present_screen_priv(screen);
-
-    if (!window_priv)
-        return BadAlloc;
-
-    target_crtc = present_wnmd_get_crtc(screen_priv, window);
-
-    ret = present_wnmd_get_ust_msc(screen, window, &ust, &crtc_msc);
-
-    target_msc = present_wnmd_window_to_crtc_msc(window, target_crtc, window_msc, crtc_msc);
-
-    if (ret == Success) {
-        /* Stash the current MSC away in case we need it later
-         */
-        window_priv->msc = crtc_msc;
-    }
-
-    present_adjust_timings(options,
-                           &crtc_msc,
-                           &target_msc,
-                           divisor,
-                           remainder);
-
-    /*
-     * Look for a matching presentation already on the list...
-     */
-
-    if (!update && pixmap) {
-        xorg_list_for_each_entry_safe(vblank, tmp, &window_priv->vblank, window_list) {
-
-            if (!vblank->pixmap)
-                continue;
-
-            if (!vblank->queued)
-                continue;
-
-            if (vblank->target_msc != target_msc)
-                continue;
-
-            present_vblank_scrap(vblank);
-            if (vblank->flip_ready)
-                present_wnmd_re_execute(vblank);
-        }
-    }
-
-    vblank = present_vblank_create(window,
-                                   pixmap,
-                                   serial,
-                                   valid,
-                                   update,
-                                   x_off,
-                                   y_off,
-                                   target_crtc,
-                                   wait_fence,
-                                   idle_fence,
-                                   options,
-                                   &screen_priv->wnmd_info->capabilities,
-                                   notifies,
-                                   num_notifies,
-                                   target_msc,
-                                   crtc_msc);
-    if (!vblank)
-        return BadAlloc;
-
-    /* WNMD presentations always complete (at least) one frame after they
-     * are executed
-     */
-    vblank->exec_msc = vblank->target_msc - 1;
-
-    xorg_list_append(&vblank->event_queue, &window_priv->exec_queue);
-    vblank->queued = TRUE;
-    if (crtc_msc < vblank->exec_msc) {
-        if (present_wnmd_queue_vblank(screen, window, target_crtc, vblank->event_id, vblank->exec_msc) == Success) {
-            return Success;
-        }
-        DebugPresent(("present_queue_vblank failed\n"));
-    }
-
-    present_wnmd_execute(vblank, ust, crtc_msc);
-    return Success;
-}
-
-static void
-present_wnmd_abort_vblank(ScreenPtr screen, WindowPtr window, RRCrtcPtr crtc, uint64_t event_id, uint64_t msc)
-{
-    present_screen_priv_ptr screen_priv = present_screen_priv(screen);
-    present_window_priv_ptr window_priv = present_window_priv(window);
-    present_vblank_ptr      vblank;
-
-    (*screen_priv->wnmd_info->abort_vblank) (window, crtc, event_id, msc);
-
-    xorg_list_for_each_entry(vblank, &window_priv->exec_queue, event_queue) {
-        if (vblank->event_id == event_id) {
-            xorg_list_del(&vblank->event_queue);
-            vblank->queued = FALSE;
-            return;
-        }
-    }
-    xorg_list_for_each_entry(vblank, &window_priv->flip_queue, event_queue) {
-        if (vblank->event_id == event_id) {
-            xorg_list_del(&vblank->event_queue);
-            vblank->queued = FALSE;
-            return;
-        }
-    }
-}
-
-static void
-present_wnmd_flip_destroy(ScreenPtr screen)
-{
-    /* Cleanup done on window destruction */
-}
-
-static void
-present_wnmd_flush(WindowPtr window)
-{
-    ScreenPtr               screen = window->drawable.pScreen;
-    present_screen_priv_ptr screen_priv = present_screen_priv(screen);
-
-    (*screen_priv->wnmd_info->flush) (window);
-}
-
-void
-present_wnmd_init_mode_hooks(present_screen_priv_ptr screen_priv)
-{
-    screen_priv->query_capabilities =   &present_wnmd_query_capabilities;
-    screen_priv->get_crtc           =   &present_wnmd_get_crtc;
-
-    screen_priv->check_flip         =   &present_wnmd_check_flip;
-    screen_priv->check_flip_window  =   &present_wnmd_check_flip_window;
-    screen_priv->can_window_flip    =   &present_wnmd_can_window_flip;
-
-    screen_priv->present_pixmap     =   &present_wnmd_pixmap;
-    screen_priv->create_event_id    =   &present_wnmd_create_event_id;
-    screen_priv->queue_vblank       =   &present_wnmd_queue_vblank;
-    screen_priv->flush              =   &present_wnmd_flush;
-    screen_priv->re_execute         =   &present_wnmd_re_execute;
-
-    screen_priv->abort_vblank       =   &present_wnmd_abort_vblank;
-    screen_priv->flip_destroy       =   &present_wnmd_flip_destroy;
-}
diff --git a/pseudoramiX/Makefile.in b/pseudoramiX/Makefile.in
index 1024f88..31d99e9 100644
--- a/pseudoramiX/Makefile.in
+++ b/pseudoramiX/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -107,7 +107,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -178,8 +177,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
@@ -199,8 +196,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -214,6 +209,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -232,14 +229,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -256,8 +245,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -313,6 +304,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -365,7 +358,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -389,29 +381,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -449,8 +425,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -461,14 +435,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -684,7 +652,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/randr/Makefile.in b/randr/Makefile.in
index 4dee85e..c449bc0 100644
--- a/randr/Makefile.in
+++ b/randr/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -108,7 +108,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -226,8 +225,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
@@ -247,8 +244,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -262,6 +257,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -280,14 +277,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -304,8 +293,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -361,6 +352,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -413,7 +406,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -437,29 +429,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -497,8 +473,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -509,14 +483,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -773,7 +741,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/randr/meson.build b/randr/meson.build
index 7090dde..9bd751b 100644
--- a/randr/meson.build
+++ b/randr/meson.build
@@ -31,4 +31,6 @@ libxserver_randr = static_library('libxserver_randr',
     dependencies: common_dep,
 )
 
-install_data(hdrs_randr, install_dir: xorgsdkdir)
+if build_xorg
+    install_data(hdrs_randr, install_dir: xorgsdkdir)
+endif
diff --git a/randr/randr.c b/randr/randr.c
index 5db8b5c..6d02c25 100644
--- a/randr/randr.c
+++ b/randr/randr.c
@@ -484,7 +484,7 @@ TellChanged(WindowPtr pWin, void *value)
     ClientPtr client;
     ScreenPtr pScreen = pWin->drawable.pScreen;
     ScreenPtr iter;
-    rrScrPrivPtr pSlaveScrPriv;
+    rrScrPrivPtr pSecondaryScrPriv;
 
     rrScrPriv(pScreen);
     int i;
@@ -510,13 +510,13 @@ TellChanged(WindowPtr pWin, void *value)
                     RRDeliverCrtcEvent(client, pWin, crtc);
             }
 
-            xorg_list_for_each_entry(iter, &pScreen->slave_list, slave_head) {
-                if (!iter->is_output_slave)
+            xorg_list_for_each_entry(iter, &pScreen->secondary_list, secondary_head) {
+                if (!iter->is_output_secondary)
                     continue;
 
-                pSlaveScrPriv = rrGetScrPriv(iter);
-                for (i = 0; i < pSlaveScrPriv->numCrtcs; i++) {
-                    RRCrtcPtr crtc = pSlaveScrPriv->crtcs[i];
+                pSecondaryScrPriv = rrGetScrPriv(iter);
+                for (i = 0; i < pSecondaryScrPriv->numCrtcs; i++) {
+                    RRCrtcPtr crtc = pSecondaryScrPriv->crtcs[i];
 
                     if (crtc->changed)
                         RRDeliverCrtcEvent(client, pWin, crtc);
@@ -532,13 +532,13 @@ TellChanged(WindowPtr pWin, void *value)
                     RRDeliverOutputEvent(client, pWin, output);
             }
 
-            xorg_list_for_each_entry(iter, &pScreen->slave_list, slave_head) {
-                if (!iter->is_output_slave)
+            xorg_list_for_each_entry(iter, &pScreen->secondary_list, secondary_head) {
+                if (!iter->is_output_secondary)
                     continue;
 
-                pSlaveScrPriv = rrGetScrPriv(iter);
-                for (i = 0; i < pSlaveScrPriv->numOutputs; i++) {
-                    RROutputPtr output = pSlaveScrPriv->outputs[i];
+                pSecondaryScrPriv = rrGetScrPriv(iter);
+                for (i = 0; i < pSecondaryScrPriv->numOutputs; i++) {
+                    RROutputPtr output = pSecondaryScrPriv->outputs[i];
 
                     if (output->changed)
                         RRDeliverOutputEvent(client, pWin, output);
@@ -547,10 +547,10 @@ TellChanged(WindowPtr pWin, void *value)
         }
 
         if (pRREvent->mask & RRProviderChangeNotifyMask) {
-            xorg_list_for_each_entry(iter, &pScreen->slave_list, slave_head) {
-                pSlaveScrPriv = rrGetScrPriv(iter);
-                if (pSlaveScrPriv->provider->changed)
-                    RRDeliverProviderEvent(client, pWin, pSlaveScrPriv->provider);
+            xorg_list_for_each_entry(iter, &pScreen->secondary_list, secondary_head) {
+                pSecondaryScrPriv = rrGetScrPriv(iter);
+                if (pSecondaryScrPriv->provider->changed)
+                    RRDeliverProviderEvent(client, pWin, pSecondaryScrPriv->provider);
             }
         }
 
@@ -572,23 +572,23 @@ TellChanged(WindowPtr pWin, void *value)
 void
 RRSetChanged(ScreenPtr pScreen)
 {
-    /* set changed bits on the master screen only */
-    ScreenPtr master;
+    /* set changed bits on the primary screen only */
+    ScreenPtr primary;
     rrScrPriv(pScreen);
-    rrScrPrivPtr mastersp;
+    rrScrPrivPtr primarysp;
 
     if (pScreen->isGPU) {
-        master = pScreen->current_master;
-        if (!master)
+        primary = pScreen->current_primary;
+        if (!primary)
             return;
-        mastersp = rrGetScrPriv(master);
+        primarysp = rrGetScrPriv(primary);
     }
     else {
-        master = pScreen;
-        mastersp = pScrPriv;
+        primary = pScreen;
+        primarysp = pScrPriv;
     }
 
-    mastersp->changed = TRUE;
+    primarysp->changed = TRUE;
 }
 
 /*
@@ -597,69 +597,73 @@ RRSetChanged(ScreenPtr pScreen)
 void
 RRTellChanged(ScreenPtr pScreen)
 {
-    ScreenPtr master;
+    ScreenPtr primary;
     rrScrPriv(pScreen);
-    rrScrPrivPtr mastersp;
+    rrScrPrivPtr primarysp;
     int i;
     ScreenPtr iter;
-    rrScrPrivPtr pSlaveScrPriv;
+    rrScrPrivPtr pSecondaryScrPriv;
 
     if (pScreen->isGPU) {
-        master = pScreen->current_master;
-        if (!master)
+        primary = pScreen->current_primary;
+        if (!primary)
             return;
-        mastersp = rrGetScrPriv(master);
+        primarysp = rrGetScrPriv(primary);
     }
     else {
-        master = pScreen;
-        mastersp = pScrPriv;
+        primary = pScreen;
+        primarysp = pScrPriv;
     }
 
-    xorg_list_for_each_entry(iter, &master->slave_list, slave_head) {
-        pSlaveScrPriv = rrGetScrPriv(iter);
+    /* If there's no root window yet, can't send events */
+    if (!primary->root)
+        return;
+
+    xorg_list_for_each_entry(iter, &primary->secondary_list, secondary_head) {
+        pSecondaryScrPriv = rrGetScrPriv(iter);
 
-        if (!iter->is_output_slave)
+        if (!iter->is_output_secondary)
             continue;
 
-        if (CompareTimeStamps(mastersp->lastSetTime,
-                              pSlaveScrPriv->lastSetTime) == EARLIER) {
-            mastersp->lastSetTime = pSlaveScrPriv->lastSetTime;
+        if (CompareTimeStamps(primarysp->lastSetTime,
+                              pSecondaryScrPriv->lastSetTime) == EARLIER) {
+            primarysp->lastSetTime = pSecondaryScrPriv->lastSetTime;
         }
     }
 
-    if (mastersp->changed) {
+    if (primarysp->changed) {
         UpdateCurrentTimeIf();
-        if (mastersp->configChanged) {
-            mastersp->lastConfigTime = currentTime;
-            mastersp->configChanged = FALSE;
+        if (primarysp->configChanged) {
+            primarysp->lastConfigTime = currentTime;
+            primarysp->configChanged = FALSE;
         }
         pScrPriv->changed = FALSE;
-        mastersp->changed = FALSE;
+        primarysp->changed = FALSE;
 
-        WalkTree(master, TellChanged, (void *) master);
+        WalkTree(primary, TellChanged, (void *) primary);
 
-        mastersp->resourcesChanged = FALSE;
+        primarysp->resourcesChanged = FALSE;
 
         for (i = 0; i < pScrPriv->numOutputs; i++)
             pScrPriv->outputs[i]->changed = FALSE;
         for (i = 0; i < pScrPriv->numCrtcs; i++)
             pScrPriv->crtcs[i]->changed = FALSE;
 
-        xorg_list_for_each_entry(iter, &master->slave_list, slave_head) {
-            pSlaveScrPriv = rrGetScrPriv(iter);
-            pSlaveScrPriv->provider->changed = FALSE;
-            if (iter->is_output_slave) {
-                for (i = 0; i < pSlaveScrPriv->numOutputs; i++)
-                    pSlaveScrPriv->outputs[i]->changed = FALSE;
-                for (i = 0; i < pSlaveScrPriv->numCrtcs; i++)
-                    pSlaveScrPriv->crtcs[i]->changed = FALSE;
+        xorg_list_for_each_entry(iter, &primary->secondary_list, secondary_head) {
+            pSecondaryScrPriv = rrGetScrPriv(iter);
+            pSecondaryScrPriv->provider->changed = FALSE;
+            if (iter->is_output_secondary) {
+                for (i = 0; i < pSecondaryScrPriv->numOutputs; i++)
+                    pSecondaryScrPriv->outputs[i]->changed = FALSE;
+                for (i = 0; i < pSecondaryScrPriv->numCrtcs; i++)
+                    pSecondaryScrPriv->crtcs[i]->changed = FALSE;
             }
         }
 
-        if (mastersp->layoutChanged) {
+        if (primarysp->layoutChanged) {
             pScrPriv->layoutChanged = FALSE;
-            RRPointerScreenConfigured(master);
-            RRSendConfigNotify(master);
+            RRPointerScreenConfigured(primary);
+            RRSendConfigNotify(primary);
         }
     }
 }
@@ -693,6 +697,33 @@ RRFirstOutput(ScreenPtr pScreen)
     return NULL;
 }
 
+RRCrtcPtr
+RRFirstEnabledCrtc(ScreenPtr pScreen)
+{
+    rrScrPriv(pScreen);
+    RROutputPtr output;
+    int i, j;
+
+    if (!pScrPriv)
+        return NULL;
+
+    if (pScrPriv->primaryOutput && pScrPriv->primaryOutput->crtc &&
+        pScrPriv->primaryOutput->pScreen == pScreen)
+        return pScrPriv->primaryOutput->crtc;
+
+    for (i = 0; i < pScrPriv->numCrtcs; i++) {
+        RRCrtcPtr crtc = pScrPriv->crtcs[i];
+
+        for (j = 0; j < pScrPriv->numOutputs; j++) {
+            output = pScrPriv->outputs[j];
+            if (output->crtc == crtc && crtc->mode)
+                return crtc;
+        }
+    }
+    return NULL;
+}
+
+
 CARD16
 RRVerticalRefresh(xRRModeInfo * mode)
 {
diff --git a/randr/randrstr.h b/randr/randrstr.h
index 2cede92..b233905 100644
--- a/randr/randrstr.h
+++ b/randr/randrstr.h
@@ -593,6 +593,8 @@ extern _X_EXPORT Bool RRScreenInit(ScreenPtr pScreen);
 
 extern _X_EXPORT RROutputPtr RRFirstOutput(ScreenPtr pScreen);
 
+extern _X_EXPORT RRCrtcPtr RRFirstEnabledCrtc(ScreenPtr pScreen);
+
 extern _X_EXPORT Bool RROutputSetNonDesktop(RROutputPtr output, Bool non_desktop);
 
 extern _X_EXPORT CARD16
@@ -642,6 +644,11 @@ extern _X_EXPORT void
  */
 extern _X_EXPORT RRCrtcPtr RRCrtcCreate(ScreenPtr pScreen, void *devPrivate);
 
+/*
+ * Tests if findCrtc belongs to pScreen or secondary screens
+ */
+extern _X_EXPORT Bool RRCrtcExists(ScreenPtr pScreen, RRCrtcPtr findCrtc);
+
 /*
  * Set the allowed rotations on a CRTC
  */
@@ -1042,6 +1049,9 @@ RRProviderLookup(XID id, RRProviderPtr *provider_p);
 extern _X_EXPORT void
 RRDeliverProviderEvent(ClientPtr client, WindowPtr pWin, RRProviderPtr provider);
 
+extern _X_EXPORT void
+RRProviderAutoConfigGpuScreen(ScreenPtr pScreen, ScreenPtr primaryScreen);
+
 /* rrproviderproperty.c */
 
 extern _X_EXPORT void
diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c
index 7839a0e..3a9b620 100644
--- a/randr/rrcrtc.c
+++ b/randr/rrcrtc.c
@@ -27,7 +27,7 @@
 
 #include <X11/Xatom.h>
 
-RESTYPE RRCrtcType;
+RESTYPE RRCrtcType = 0;
 
 /*
  * Notify the CRTC of some change
@@ -373,17 +373,17 @@ RRComputeContiguity(ScreenPtr pScreen)
 
 static void
 rrDestroySharedPixmap(RRCrtcPtr crtc, PixmapPtr pPixmap) {
-    ScreenPtr master = crtc->pScreen->current_master;
+    ScreenPtr primary = crtc->pScreen->current_primary;
 
-    if (master && pPixmap->master_pixmap) {
+    if (primary && pPixmap->primary_pixmap) {
         /*
          * Unref the pixmap twice: once for the original reference, and once
-         * for the reference implicitly added by PixmapShareToSlave.
+         * for the reference implicitly added by PixmapShareToSecondary.
          */
-        PixmapUnshareSlavePixmap(pPixmap);
+        PixmapUnshareSecondaryPixmap(pPixmap);
 
-        master->DestroyPixmap(pPixmap->master_pixmap);
-        master->DestroyPixmap(pPixmap->master_pixmap);
+        primary->DestroyPixmap(pPixmap->primary_pixmap);
+        primary->DestroyPixmap(pPixmap->primary_pixmap);
     }
 
     crtc->pScreen->DestroyPixmap(pPixmap);
@@ -395,14 +395,14 @@ RRCrtcDetachScanoutPixmap(RRCrtcPtr crtc)
     rrScrPriv(crtc->pScreen);
 
     if (crtc->scanout_pixmap) {
-        ScreenPtr master = crtc->pScreen->current_master;
-        DrawablePtr mrootdraw = &master->root->drawable;
+        ScreenPtr primary = crtc->pScreen->current_primary;
+        DrawablePtr mrootdraw = &primary->root->drawable;
 
         if (crtc->scanout_pixmap_back) {
             pScrPriv->rrDisableSharedPixmapFlipping(crtc);
 
             if (mrootdraw) {
-                master->StopFlippingPixmapTracking(mrootdraw,
+                primary->StopFlippingPixmapTracking(mrootdraw,
                                                    crtc->scanout_pixmap,
                                                    crtc->scanout_pixmap_back);
             }
@@ -414,7 +414,7 @@ RRCrtcDetachScanoutPixmap(RRCrtcPtr crtc)
             pScrPriv->rrCrtcSetScanoutPixmap(crtc, NULL);
 
             if (mrootdraw) {
-                master->StopPixmapTracking(mrootdraw,
+                primary->StopPixmapTracking(mrootdraw,
                                            crtc->scanout_pixmap);
             }
         }
@@ -427,20 +427,20 @@ RRCrtcDetachScanoutPixmap(RRCrtcPtr crtc)
 }
 
 static PixmapPtr
-rrCreateSharedPixmap(RRCrtcPtr crtc, ScreenPtr master,
+rrCreateSharedPixmap(RRCrtcPtr crtc, ScreenPtr primary,
                      int width, int height, int depth,
                      int x, int y, Rotation rotation)
 {
     PixmapPtr mpix, spix;
 
-    mpix = master->CreatePixmap(master, width, height, depth,
+    mpix = primary->CreatePixmap(primary, width, height, depth,
                                 CREATE_PIXMAP_USAGE_SHARED);
     if (!mpix)
         return NULL;
 
-    spix = PixmapShareToSlave(mpix, crtc->pScreen);
+    spix = PixmapShareToSecondary(mpix, crtc->pScreen);
     if (spix == NULL) {
-        master->DestroyPixmap(mpix);
+        primary->DestroyPixmap(mpix);
         return NULL;
     }
 
@@ -502,30 +502,30 @@ rrSetupPixmapSharing(RRCrtcPtr crtc, int width, int height,
                      int x, int y, Rotation rotation, Bool sync,
                      int numOutputs, RROutputPtr * outputs)
 {
-    ScreenPtr master = crtc->pScreen->current_master;
-    rrScrPrivPtr pMasterScrPriv = rrGetScrPriv(master);
-    rrScrPrivPtr pSlaveScrPriv = rrGetScrPriv(crtc->pScreen);
-    DrawablePtr mrootdraw = &master->root->drawable;
+    ScreenPtr primary = crtc->pScreen->current_primary;
+    rrScrPrivPtr pPrimaryScrPriv = rrGetScrPriv(primary);
+    rrScrPrivPtr pSecondaryScrPriv = rrGetScrPriv(crtc->pScreen);
+    DrawablePtr mrootdraw = &primary->root->drawable;
     int depth = mrootdraw->depth;
     PixmapPtr spix_front;
 
-    /* Create a pixmap on the master screen, then get a shared handle for it.
-       Create a shared pixmap on the slave screen using the handle.
+    /* Create a pixmap on the primary screen, then get a shared handle for it.
+       Create a shared pixmap on the secondary screen using the handle.
 
        If sync == FALSE --
-       Set slave screen to scanout shared linear pixmap.
-       Set the master screen to do dirty updates to the shared pixmap
+       Set secondary screen to scanout shared linear pixmap.
+       Set the primary screen to do dirty updates to the shared pixmap
        from the screen pixmap on its own accord.
 
        If sync == TRUE --
        If any of the below steps fail, clean up and fall back to sync == FALSE.
-       Create another shared pixmap on the slave screen using the handle.
-       Set slave screen to prepare for scanout and flipping between shared
+       Create another shared pixmap on the secondary screen using the handle.
+       Set secondary screen to prepare for scanout and flipping between shared
        linear pixmaps.
-       Set the master screen to do dirty updates to the shared pixmaps from the
-       screen pixmap when prompted to by us or the slave.
-       Prompt the master to do a dirty update on the first shared pixmap, then
-       defer to the slave.
+       Set the primary screen to do dirty updates to the shared pixmaps from the
+       screen pixmap when prompted to by us or the secondary.
+       Prompt the primary to do a dirty update on the first shared pixmap, then
+       defer to the secondary.
     */
 
     if (crtc->scanout_pixmap)
@@ -535,7 +535,7 @@ rrSetupPixmapSharing(RRCrtcPtr crtc, int width, int height,
         return TRUE;
     }
 
-    spix_front = rrCreateSharedPixmap(crtc, master,
+    spix_front = rrCreateSharedPixmap(crtc, primary,
                                       width, height, depth,
                                       x, y, rotation);
     if (spix_front == NULL) {
@@ -545,36 +545,36 @@ rrSetupPixmapSharing(RRCrtcPtr crtc, int width, int height,
 
     /* Both source and sink must support required ABI funcs for flipping */
     if (sync &&
-        pSlaveScrPriv->rrEnableSharedPixmapFlipping &&
-        pSlaveScrPriv->rrDisableSharedPixmapFlipping &&
-        pMasterScrPriv->rrStartFlippingPixmapTracking &&
-        master->PresentSharedPixmap &&
-        master->StopFlippingPixmapTracking) {
+        pSecondaryScrPriv->rrEnableSharedPixmapFlipping &&
+        pSecondaryScrPriv->rrDisableSharedPixmapFlipping &&
+        pPrimaryScrPriv->rrStartFlippingPixmapTracking &&
+        primary->PresentSharedPixmap &&
+        primary->StopFlippingPixmapTracking) {
 
-        PixmapPtr spix_back = rrCreateSharedPixmap(crtc, master,
+        PixmapPtr spix_back = rrCreateSharedPixmap(crtc, primary,
                                                    width, height, depth,
                                                    x, y, rotation);
         if (spix_back == NULL)
             goto fail;
 
-        if (!pSlaveScrPriv->rrEnableSharedPixmapFlipping(crtc,
+        if (!pSecondaryScrPriv->rrEnableSharedPixmapFlipping(crtc,
                                                          spix_front, spix_back))
             goto fail;
 
         crtc->scanout_pixmap = spix_front;
         crtc->scanout_pixmap_back = spix_back;
 
-        if (!pMasterScrPriv->rrStartFlippingPixmapTracking(crtc,
+        if (!pPrimaryScrPriv->rrStartFlippingPixmapTracking(crtc,
                                                            mrootdraw,
                                                            spix_front,
                                                            spix_back,
                                                            x, y, 0, 0,
                                                            rotation)) {
-            pSlaveScrPriv->rrDisableSharedPixmapFlipping(crtc);
+            pSecondaryScrPriv->rrDisableSharedPixmapFlipping(crtc);
             goto fail;
         }
 
-        master->PresentSharedPixmap(spix_front);
+        primary->PresentSharedPixmap(spix_front);
 
         return TRUE;
 
@@ -593,14 +593,14 @@ fail: /* If flipping funcs fail, just fall back to unsynchronized */
         rrSetPixmapSharingSyncProp(0, numOutputs, outputs);
     }
 
-    if (!pSlaveScrPriv->rrCrtcSetScanoutPixmap(crtc, spix_front)) {
+    if (!pSecondaryScrPriv->rrCrtcSetScanoutPixmap(crtc, spix_front)) {
         rrDestroySharedPixmap(crtc, spix_front);
-        ErrorF("randr: failed to set shadow slave pixmap\n");
+        ErrorF("randr: failed to set shadow secondary pixmap\n");
         return FALSE;
     }
     crtc->scanout_pixmap = spix_front;
 
-    master->StartPixmapTracking(mrootdraw, spix_front, x, y, 0, 0, rotation);
+    primary->StartPixmapTracking(mrootdraw, spix_front, x, y, 0, 0, rotation);
 
     return TRUE;
 }
@@ -633,7 +633,7 @@ rrCheckPixmapBounding(ScreenPtr pScreen,
     int c;
     BoxRec newbox;
     BoxPtr newsize;
-    ScreenPtr slave;
+    ScreenPtr secondary;
     int new_width, new_height;
     PixmapPtr screen_pixmap = pScreen->GetScreenPixmap(pScreen);
     rrScrPriv(pScreen);
@@ -641,8 +641,8 @@ rrCheckPixmapBounding(ScreenPtr pScreen,
     PixmapRegionInit(&root_pixmap_region, screen_pixmap);
     RegionInit(&total_region, NULL, 0);
 
-    /* have to iterate all the crtcs of the attached gpu masters
-       and all their output slaves */
+    /* have to iterate all the crtcs of the attached gpu primarys
+       and all their output secondarys */
     for (c = 0; c < pScrPriv->numCrtcs; c++) {
         RRCrtcPtr crtc = pScrPriv->crtcs[c];
 
@@ -666,16 +666,16 @@ rrCheckPixmapBounding(ScreenPtr pScreen,
         RegionUnion(&total_region, &total_region, &new_crtc_region);
     }
 
-    xorg_list_for_each_entry(slave, &pScreen->slave_list, slave_head) {
-        rrScrPrivPtr    slave_priv = rrGetScrPriv(slave);
+    xorg_list_for_each_entry(secondary, &pScreen->secondary_list, secondary_head) {
+        rrScrPrivPtr    secondary_priv = rrGetScrPriv(secondary);
 
-        if (!slave->is_output_slave)
+        if (!secondary->is_output_secondary)
             continue;
 
-        for (c = 0; c < slave_priv->numCrtcs; c++) {
-            RRCrtcPtr slave_crtc = slave_priv->crtcs[c];
+        for (c = 0; c < secondary_priv->numCrtcs; c++) {
+            RRCrtcPtr secondary_crtc = secondary_priv->crtcs[c];
 
-            if (slave_crtc == rr_crtc) {
+            if (secondary_crtc == rr_crtc) {
                 newbox.x1 = x;
                 newbox.y1 = y;
                 if (rotation == RR_Rotate_90 ||
@@ -688,9 +688,9 @@ rrCheckPixmapBounding(ScreenPtr pScreen,
                 }
             }
             else {
-                if (!slave_crtc->mode)
+                if (!secondary_crtc->mode)
                     continue;
-                crtc_to_box(&newbox, slave_crtc);
+                crtc_to_box(&newbox, secondary_crtc);
             }
             RegionInit(&new_crtc_region, &newbox, 1);
             RegionUnion(&total_region, &total_region, &new_crtc_region);
@@ -756,19 +756,19 @@ RRCrtcSet(RRCrtcPtr crtc,
     }
     else {
         if (pScreen->isGPU) {
-            ScreenPtr master = pScreen->current_master;
+            ScreenPtr primary = pScreen->current_primary;
             int width = 0, height = 0;
 
             if (mode) {
                 width = mode->mode.width;
                 height = mode->mode.height;
             }
-            ret = rrCheckPixmapBounding(master, crtc,
+            ret = rrCheckPixmapBounding(primary, crtc,
                                         rotation, x, y, width, height);
             if (!ret)
                 return FALSE;
 
-            if (pScreen->current_master) {
+            if (pScreen->current_primary) {
                 Bool sync = rrGetPixmapSharingSyncProp(numOutputs, outputs);
                 ret = rrSetupPixmapSharing(crtc, width, height,
                                            x, y, rotation, sync,
@@ -960,6 +960,47 @@ RRCrtcGammaGet(RRCrtcPtr crtc)
     return ret;
 }
 
+static Bool RRCrtcInScreen(ScreenPtr pScreen, RRCrtcPtr findCrtc)
+{
+    rrScrPrivPtr pScrPriv;
+    int c;
+
+    if (pScreen == NULL)
+        return FALSE;
+
+    if (findCrtc == NULL)
+        return FALSE;
+
+    if (!dixPrivateKeyRegistered(rrPrivKey))
+        return FALSE;
+
+    pScrPriv = rrGetScrPriv(pScreen);
+    for (c = 0; c < pScrPriv->numCrtcs; c++) {
+        if (pScrPriv->crtcs[c] == findCrtc)
+            return TRUE;
+    }
+
+    return FALSE;
+}
+
+Bool RRCrtcExists(ScreenPtr pScreen, RRCrtcPtr findCrtc)
+{
+    ScreenPtr secondary= NULL;
+
+    if (RRCrtcInScreen(pScreen, findCrtc))
+        return TRUE;
+
+    xorg_list_for_each_entry(secondary, &pScreen->secondary_list, secondary_head) {
+        if (!secondary->is_output_secondary)
+            continue;
+        if (RRCrtcInScreen(secondary, findCrtc))
+            return TRUE;
+    }
+
+    return FALSE;
+}
+
+
 /*
  * Notify the extension that the Crtc gamma has been changed
  * The driver calls this whenever it has changed the gamma values
@@ -1239,7 +1280,7 @@ ProcRRSetCrtcConfig(ClientPtr client)
     rrScrPrivPtr pScrPriv;
     RRCrtcPtr crtc;
     RRModePtr mode;
-    int numOutputs;
+    unsigned int numOutputs;
     RROutputPtr *outputs = NULL;
     RROutput *outputIds;
     TimeStamp time;
@@ -1384,8 +1425,8 @@ ProcRRSetCrtcConfig(ClientPtr client)
             int width, height;
 
             if (pScreen->isGPU) {
-                width = pScreen->current_master->width;
-                height = pScreen->current_master->height;
+                width = pScreen->current_primary->width;
+                height = pScreen->current_primary->height;
             }
             else {
                 width = pScreen->width;
@@ -1887,7 +1928,7 @@ RRConstrainCursorHarder(DeviceIntPtr pDev, ScreenPtr pScreen, int mode, int *x,
 {
     rrScrPriv(pScreen);
     Bool ret;
-    ScreenPtr slave;
+    ScreenPtr secondary;
 
     /* intentional dead space -> let it float */
     if (pScrPriv->discontiguous)
@@ -1898,11 +1939,11 @@ RRConstrainCursorHarder(DeviceIntPtr pDev, ScreenPtr pScreen, int mode, int *x,
     if (ret == TRUE)
         return;
 
-    xorg_list_for_each_entry(slave, &pScreen->slave_list, slave_head) {
-        if (!slave->is_output_slave)
+    xorg_list_for_each_entry(secondary, &pScreen->secondary_list, secondary_head) {
+        if (!secondary->is_output_secondary)
             continue;
 
-        ret = check_all_screen_crtcs(slave, x, y);
+        ret = check_all_screen_crtcs(secondary, x, y);
         if (ret == TRUE)
             return;
     }
@@ -1912,11 +1953,11 @@ RRConstrainCursorHarder(DeviceIntPtr pDev, ScreenPtr pScreen, int mode, int *x,
     if (ret == TRUE)
         return;
 
-    xorg_list_for_each_entry(slave, &pScreen->slave_list, slave_head) {
-        if (!slave->is_output_slave)
+    xorg_list_for_each_entry(secondary, &pScreen->secondary_list, secondary_head) {
+        if (!secondary->is_output_secondary)
             continue;
 
-        ret = constrain_all_screen_crtcs(pDev, slave, x, y);
+        ret = constrain_all_screen_crtcs(pDev, secondary, x, y);
         if (ret == TRUE)
             return;
     }
@@ -2021,7 +2062,7 @@ RRHasScanoutPixmap(ScreenPtr pScreen)
 
     pScrPriv = rrGetScrPriv(pScreen);
 
-    if (!pScreen->is_output_slave)
+    if (!pScreen->is_output_secondary)
         return FALSE;
 
     for (i = 0; i < pScrPriv->numCrtcs; i++) {
diff --git a/randr/rrlease.c b/randr/rrlease.c
index e25d9ca..11ba96f 100644
--- a/randr/rrlease.c
+++ b/randr/rrlease.c
@@ -295,7 +295,7 @@ ProcRRCreateLease(ClientPtr client)
     if (rc != Success)
         goto bail_lease;
 
-    xorg_list_add(&scr_priv->leases, &lease->list);
+    xorg_list_add(&lease->list, &scr_priv->leases);
 
     if (!AddResource(stuff->lid, RRLeaseType, lease)) {
         close(fd);
diff --git a/randr/rrmonitor.c b/randr/rrmonitor.c
index 1bb5018..e62bd48 100644
--- a/randr/rrmonitor.c
+++ b/randr/rrmonitor.c
@@ -195,21 +195,21 @@ RRMonitorInitList(ScreenPtr screen, RRMonitorListPtr mon_list, Bool get_active)
     rrScrPrivPtr        pScrPriv = rrGetScrPriv(screen);
     int                 m, o, c, sc;
     int                 numCrtcs;
-    ScreenPtr           slave;
+    ScreenPtr           secondary;
 
     if (!RRGetInfo(screen, FALSE))
         return FALSE;
 
-    /* Count the number of crtcs in this and any slave screens */
+    /* Count the number of crtcs in this and any secondary screens */
     numCrtcs = pScrPriv->numCrtcs;
-    xorg_list_for_each_entry(slave, &screen->slave_list, slave_head) {
-        rrScrPrivPtr pSlavePriv;
+    xorg_list_for_each_entry(secondary, &screen->secondary_list, secondary_head) {
+        rrScrPrivPtr pSecondaryPriv;
 
-        if (!slave->is_output_slave)
+        if (!secondary->is_output_secondary)
             continue;
 
-        pSlavePriv = rrGetScrPriv(slave);
-        numCrtcs += pSlavePriv->numCrtcs;
+        pSecondaryPriv = rrGetScrPriv(secondary);
+        numCrtcs += pSecondaryPriv->numCrtcs;
     }
     mon_list->num_crtcs = numCrtcs;
 
@@ -224,16 +224,16 @@ RRMonitorInitList(ScreenPtr screen, RRMonitorListPtr mon_list, Bool get_active)
             mon_list->server_crtc[c] = pScrPriv->crtcs[sc];
     }
 
-    xorg_list_for_each_entry(slave, &screen->slave_list, slave_head) {
-        rrScrPrivPtr pSlavePriv;
+    xorg_list_for_each_entry(secondary, &screen->secondary_list, secondary_head) {
+        rrScrPrivPtr pSecondaryPriv;
 
-        if (!slave->is_output_slave)
+        if (!secondary->is_output_secondary)
             continue;
 
-        pSlavePriv = rrGetScrPriv(slave);
-        for (sc = 0; sc < pSlavePriv->numCrtcs; sc++, c++) {
-            if (pSlavePriv->crtcs[sc]->mode != NULL)
-                mon_list->server_crtc[c] = pSlavePriv->crtcs[sc];
+        pSecondaryPriv = rrGetScrPriv(secondary);
+        for (sc = 0; sc < pSecondaryPriv->numCrtcs; sc++, c++) {
+            if (pSecondaryPriv->crtcs[sc]->mode != NULL)
+                mon_list->server_crtc[c] = pSecondaryPriv->crtcs[sc];
         }
     }
 
@@ -464,7 +464,7 @@ RRMonitorAdd(ClientPtr client, ScreenPtr screen, RRMonitorPtr monitor)
 {
     rrScrPrivPtr        pScrPriv = rrGetScrPriv(screen);
     int                 m;
-    ScreenPtr           slave;
+    ScreenPtr           secondary;
     RRMonitorPtr        *monitors;
 
     if (!pScrPriv)
@@ -479,11 +479,11 @@ RRMonitorAdd(ClientPtr client, ScreenPtr screen, RRMonitorPtr monitor)
         return BadValue;
     }
 
-    xorg_list_for_each_entry(slave, &screen->slave_list, slave_head) {
-        if (!slave->is_output_slave)
+    xorg_list_for_each_entry(secondary, &screen->secondary_list, secondary_head) {
+        if (!secondary->is_output_secondary)
             continue;
 
-        if (RRMonitorMatchesOutputName(slave, monitor->name)) {
+        if (RRMonitorMatchesOutputName(secondary, monitor->name)) {
             client->errorValue = monitor->name;
             return BadValue;
         }
diff --git a/randr/rroutput.c b/randr/rroutput.c
index e52ad76..db0bb0f 100644
--- a/randr/rroutput.c
+++ b/randr/rroutput.c
@@ -32,27 +32,27 @@ RESTYPE RROutputType;
 void
 RROutputChanged(RROutputPtr output, Bool configChanged)
 {
-    /* set changed bits on the master screen only */
+    /* set changed bits on the primary screen only */
     ScreenPtr pScreen = output->pScreen;
-    rrScrPrivPtr mastersp;
+    rrScrPrivPtr primarysp;
 
     output->changed = TRUE;
     if (!pScreen)
         return;
 
     if (pScreen->isGPU) {
-        ScreenPtr master = pScreen->current_master;
-        if (!master)
+        ScreenPtr primary = pScreen->current_primary;
+        if (!primary)
             return;
-        mastersp = rrGetScrPriv(master);
+        primarysp = rrGetScrPriv(primary);
     }
     else {
-        mastersp = rrGetScrPriv(pScreen);
+        primarysp = rrGetScrPriv(pScreen);
     }
 
     RRSetChanged(pScreen);
     if (configChanged)
-        mastersp->configChanged = TRUE;
+        primarysp->configChanged = TRUE;
 }
 
 /*
@@ -609,7 +609,7 @@ ProcRRSetOutputPrimary(ClientPtr client)
     WindowPtr pWin;
     rrScrPrivPtr pScrPriv;
     int ret;
-    ScreenPtr slave;
+    ScreenPtr secondary;
 
     REQUEST_SIZE_MATCH(xRRSetOutputPrimaryReq);
 
@@ -627,7 +627,7 @@ ProcRRSetOutputPrimary(ClientPtr client)
             client->errorValue = stuff->window;
             return BadMatch;
         }
-        if (output->pScreen->isGPU && output->pScreen->current_master != pWin->drawable.pScreen) {
+        if (output->pScreen->isGPU && output->pScreen->current_primary != pWin->drawable.pScreen) {
             client->errorValue = stuff->window;
             return BadMatch;
         }
@@ -638,11 +638,11 @@ ProcRRSetOutputPrimary(ClientPtr client)
     {
         RRSetPrimaryOutput(pWin->drawable.pScreen, pScrPriv, output);
 
-        xorg_list_for_each_entry(slave,
-                                 &pWin->drawable.pScreen->slave_list,
-                                 slave_head) {
-            if (slave->is_output_slave)
-                RRSetPrimaryOutput(slave, rrGetScrPriv(slave), output);
+        xorg_list_for_each_entry(secondary,
+                                 &pWin->drawable.pScreen->secondary_list,
+                                 secondary_head) {
+            if (secondary->is_output_secondary)
+                RRSetPrimaryOutput(secondary, rrGetScrPriv(secondary), output);
         }
     }
 
diff --git a/randr/rrprovider.c b/randr/rrprovider.c
index c430f74..d628a20 100644
--- a/randr/rrprovider.c
+++ b/randr/rrprovider.c
@@ -1,5 +1,6 @@
 /*
  * Copyright © 2012 Red Hat Inc.
+ * Copyright 2019 DisplayLink (UK) Ltd.
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -27,7 +28,7 @@
 
 #include <X11/Xatom.h>
 
-RESTYPE RRProviderType;
+RESTYPE RRProviderType = 0;
 
 /*
  * Initialize provider type error value
@@ -74,7 +75,7 @@ ProcRRGetProviders (ClientPtr client)
 
     if (pScrPriv->provider)
         total_providers++;
-    xorg_list_for_each_entry(iter, &pScreen->slave_list, slave_head) {
+    xorg_list_for_each_entry(iter, &pScreen->secondary_list, secondary_head) {
         pScrPriv = rrGetScrPriv(iter);
         total_providers += pScrPriv->provider ? 1 : 0;
     }
@@ -110,7 +111,7 @@ ProcRRGetProviders (ClientPtr client)
 
         providers = (RRProvider *)extra;
         ADD_PROVIDER(pScreen);
-        xorg_list_for_each_entry(iter, &pScreen->slave_list, slave_head) {
+        xorg_list_for_each_entry(iter, &pScreen->secondary_list, secondary_head) {
             ADD_PROVIDER(iter);
         }
     }
@@ -173,8 +174,8 @@ ProcRRGetProviderInfo (ClientPtr client)
     if (provider->output_source &&
             provider->output_source != provider->offload_sink)
         rep.nAssociatedProviders++;
-    xorg_list_for_each_entry(provscreen, &pScreen->slave_list, slave_head) {
-        if (provscreen->is_output_slave || provscreen->is_offload_slave)
+    xorg_list_for_each_entry(provscreen, &pScreen->secondary_list, secondary_head) {
+        if (provscreen->is_output_secondary || provscreen->is_offload_secondary)
             rep.nAssociatedProviders++;
     }
 
@@ -226,17 +227,17 @@ ProcRRGetProviderInfo (ClientPtr client)
             swapl(&prov_cap[i]);
         i++;
     }
-    xorg_list_for_each_entry(provscreen, &pScreen->slave_list, slave_head) {
-        if (!provscreen->is_output_slave && !provscreen->is_offload_slave)
+    xorg_list_for_each_entry(provscreen, &pScreen->secondary_list, secondary_head) {
+        if (!provscreen->is_output_secondary && !provscreen->is_offload_secondary)
             continue;
         pScrProvPriv = rrGetScrPriv(provscreen);
         providers[i] = pScrProvPriv->provider->id;
         if (client->swapped)
             swapl(&providers[i]);
         prov_cap[i] = 0;
-        if (provscreen->is_output_slave)
+        if (provscreen->is_output_secondary)
             prov_cap[i] |= RR_Capability_SinkOutput;
-        if (provscreen->is_offload_slave)
+        if (provscreen->is_offload_secondary)
             prov_cap[i] |= RR_Capability_SourceOffload;
         if (client->swapped)
             swapl(&prov_cap[i]);
@@ -485,3 +486,38 @@ RRDeliverProviderEvent(ClientPtr client, WindowPtr pWin, RRProviderPtr provider)
 
     WriteEventsToClient(client, 1, (xEvent *) &pe);
 }
+
+void
+RRProviderAutoConfigGpuScreen(ScreenPtr pScreen, ScreenPtr primaryScreen)
+{
+    rrScrPrivPtr pScrPriv;
+    rrScrPrivPtr primaryPriv;
+    RRProviderPtr provider;
+    RRProviderPtr primary_provider;
+
+    /* Bail out if RandR wasn't initialized. */
+    if (!dixPrivateKeyRegistered(rrPrivKey))
+        return;
+
+    pScrPriv = rrGetScrPriv(pScreen);
+    primaryPriv = rrGetScrPriv(primaryScreen);
+
+    provider = pScrPriv->provider;
+    primary_provider = primaryPriv->provider;
+
+    if (!provider || !primary_provider)
+        return;
+
+    if ((provider->capabilities & RR_Capability_SinkOutput) &&
+        (primary_provider->capabilities & RR_Capability_SourceOutput)) {
+        pScrPriv->rrProviderSetOutputSource(pScreen, provider, primary_provider);
+        RRInitPrimeSyncProps(pScreen);
+
+        primaryPriv->configChanged = TRUE;
+        RRSetChanged(primaryScreen);
+    }
+
+    if ((provider->capabilities & RR_Capability_SourceOffload) &&
+        (primary_provider->capabilities & RR_Capability_SinkOffload))
+        pScrPriv->rrProviderSetOffloadSink(pScreen, provider, primary_provider);
+}
diff --git a/randr/rrscreen.c b/randr/rrscreen.c
index 58fd47b..58b5299 100644
--- a/randr/rrscreen.c
+++ b/randr/rrscreen.c
@@ -380,7 +380,7 @@ rrGetMultiScreenResources(ClientPtr client, Bool query, ScreenPtr pScreen)
     CARD8 *names;
     int has_primary = 0;
 
-    /* we need to iterate all the GPU masters and all their output slaves */
+    /* we need to iterate all the GPU primarys and all their output secondarys */
     total_crtcs = 0;
     total_outputs = 0;
     total_modes = 0;
@@ -394,8 +394,8 @@ rrGetMultiScreenResources(ClientPtr client, Bool query, ScreenPtr pScreen)
 
     update_totals(pScreen, pScrPriv);
 
-    xorg_list_for_each_entry(iter, &pScreen->slave_list, slave_head) {
-        if (!iter->is_output_slave)
+    xorg_list_for_each_entry(iter, &pScreen->secondary_list, secondary_head) {
+        if (!iter->is_output_secondary)
             continue;
 
         pScrPriv = rrGetScrPriv(iter);
@@ -453,8 +453,8 @@ rrGetMultiScreenResources(ClientPtr client, Bool query, ScreenPtr pScreen)
     }
     update_arrays(pScreen, pScrPriv, primary_crtc, has_primary);
 
-    xorg_list_for_each_entry(iter, &pScreen->slave_list, slave_head) {
-        if (!iter->is_output_slave)
+    xorg_list_for_each_entry(iter, &pScreen->secondary_list, secondary_head) {
+        if (!iter->is_output_secondary)
             continue;
 
         pScrPriv = rrGetScrPriv(iter);
@@ -509,7 +509,7 @@ rrGetScreenResources(ClientPtr client, Bool query)
         if (!RRGetInfo(pScreen, query))
             return BadAlloc;
 
-    if (pScreen->output_slaves)
+    if (pScreen->output_secondarys)
         return rrGetMultiScreenResources(client, query, pScreen);
 
     if (!pScrPriv) {
diff --git a/record/Makefile.in b/record/Makefile.in
index 3937fcd..d9686f8 100644
--- a/record/Makefile.in
+++ b/record/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -105,7 +105,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -176,8 +175,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
@@ -197,8 +194,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -212,6 +207,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -230,14 +227,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -254,8 +243,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -311,6 +302,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -363,7 +356,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -387,29 +379,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -447,8 +423,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -459,14 +433,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -684,7 +652,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/record/record.c b/record/record.c
index 05d751a..e123867 100644
--- a/record/record.c
+++ b/record/record.c
@@ -1386,7 +1386,7 @@ RecordSanityCheckRegisterClients(RecordContextPtr pContext, ClientPtr client,
 typedef struct {
     int nintervals;             /* number of intervals in following array */
     RecordSetInterval *intervals;       /* array of intervals for this set */
-    int size;                   /* size of intevals array; >= nintervals */
+    int size;                   /* size of intervals array; >= nintervals */
     int align;                  /* alignment restriction for set */
     int offset;                 /* where to store set pointer rel. to start of RCAP */
     short first, last;          /* if for extension, major opcode interval */
@@ -1579,7 +1579,7 @@ RecordRegisterClients(RecordContextPtr pContext, ClientPtr client,
         return BadAlloc;
 
     /* We may have to create as many as one set for each "predefined"
-     * protocol types, plus one per range for extension reuests, plus one per
+     * protocol types, plus one per range for extension requests, plus one per
      * range for extension replies.
      */
     maxSets = PREDEFSETS + 2 * stuff->nRanges;
@@ -2376,7 +2376,8 @@ RecordDisableContext(RecordContextPtr pContext)
      * where all the disabled contexts are
      */
     i = RecordFindContextOnAllContexts(pContext);
-    assert((i != -1) && (i < numEnabledContexts));
+    assert(i != -1);
+    assert(i < numEnabledContexts);
     if (i != (numEnabledContexts - 1)) {
         ppAllContexts[i] = ppAllContexts[numEnabledContexts - 1];
         ppAllContexts[numEnabledContexts - 1] = pContext;
@@ -2515,8 +2516,8 @@ SwapCreateRegister(ClientPtr client, xRecordRegisterClientsReq * stuff)
         swapl(pClientID);
     }
     if (stuff->nRanges >
-        client->req_len - bytes_to_int32(sz_xRecordRegisterClientsReq)
-        - stuff->nClients)
+        (client->req_len - bytes_to_int32(sz_xRecordRegisterClientsReq)
+        - stuff->nClients) / bytes_to_int32(sz_xRecordRange))
         return BadLength;
     RecordSwapRanges((xRecordRange *) pClientID, stuff->nRanges);
     return Success;
@@ -2728,7 +2729,8 @@ RecordAClientStateChange(CallbackListPtr *pcbl, void *nulldata,
     case ClientStateRetained:  /* client disconnected */
 
         /* RecordDisableContext modifies contents of ppAllContexts. */
-        numContextsCopy = numContexts;
+        if (!(numContextsCopy = numContexts))
+            break;
         ppAllContextsCopy = xallocarray(numContextsCopy,
                                         sizeof(RecordContextPtr));
         assert(ppAllContextsCopy);
diff --git a/render/Makefile.in b/render/Makefile.in
index 8bbe2e0..5564482 100644
--- a/render/Makefile.in
+++ b/render/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -107,7 +107,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -215,8 +214,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
@@ -236,8 +233,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -251,6 +246,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -269,14 +266,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -293,8 +282,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -350,6 +341,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -402,7 +395,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -426,29 +418,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -486,8 +462,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -498,14 +472,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -765,7 +733,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/render/meson.build b/render/meson.build
index cbd6474..b95b082 100644
--- a/render/meson.build
+++ b/render/meson.build
@@ -25,4 +25,6 @@ libxserver_render = static_library('libxserver_render',
     dependencies: common_dep,
 )
 
-install_data(hdrs_render, install_dir: xorgsdkdir)
+if build_xorg
+    install_data(hdrs_render, install_dir: xorgsdkdir)
+endif
diff --git a/render/mipict.c b/render/mipict.c
index 4b85512..7fb0343 100644
--- a/render/mipict.c
+++ b/render/mipict.c
@@ -294,10 +294,8 @@ SourceValidateOnePicture(PicturePtr pPicture)
 
     pScreen = pDrawable->pScreen;
 
-    if (pScreen->SourceValidate) {
-        pScreen->SourceValidate(pDrawable, 0, 0, pDrawable->width,
-                                pDrawable->height, pPicture->subWindowMode);
-    }
+    pScreen->SourceValidate(pDrawable, 0, 0, pDrawable->width,
+                            pDrawable->height, pPicture->subWindowMode);
 }
 
 void
diff --git a/render/picture.c b/render/picture.c
index a53f3b5..2be4b19 100644
--- a/render/picture.c
+++ b/render/picture.c
@@ -188,10 +188,6 @@ PictureCreateDefaultFormats(ScreenPtr pScreen, int *nformatp)
                                            PICT_TYPE_A, 8, 0, 0, 0);
     formats[nformats].depth = 8;
     nformats++;
-    formats[nformats].format = PICT_FORMAT(BitsPerPixel(4),
-                                           PICT_TYPE_A, 4, 0, 0, 0);
-    formats[nformats].depth = 4;
-    nformats++;
     formats[nformats].format = PICT_a8r8g8b8;
     formats[nformats].depth = 32;
     nformats++;
@@ -527,12 +523,12 @@ PictureMatchVisual(ScreenPtr pScreen, int depth, VisualPtr pVisual)
                     return format;
             }
             else {
-                if (format->direct.redMask << format->direct.red ==
-                    pVisual->redMask &&
-                    format->direct.greenMask << format->direct.green ==
-                    pVisual->greenMask &&
-                    format->direct.blueMask << format->direct.blue ==
-                    pVisual->blueMask) {
+                if ((unsigned long)format->direct.redMask <<
+                        format->direct.red == pVisual->redMask &&
+                    (unsigned long)format->direct.greenMask <<
+                        format->direct.green == pVisual->greenMask &&
+                    (unsigned long)format->direct.blueMask <<
+                        format->direct.blue == pVisual->blueMask) {
                     return format;
                 }
             }
@@ -797,8 +793,10 @@ static CARD32
 xRenderColorToCard32(xRenderColor c)
 {
     return
-        (c.alpha >> 8 << 24) |
-        (c.red >> 8 << 16) | (c.green & 0xff00) | (c.blue >> 8);
+        ((unsigned)c.alpha >> 8 << 24) |
+        ((unsigned)c.red >> 8 << 16) |
+        ((unsigned)c.green & 0xff00) |
+        ((unsigned)c.blue >> 8);
 }
 
 static void
@@ -867,7 +865,7 @@ CreateSolidPicture(Picture pid, xRenderColor * color, int *error)
     }
 
     pPicture->id = pid;
-    pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(PictSolidFill));
+    pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(SourcePict));
     if (!pPicture->pSourcePict) {
         *error = BadAlloc;
         free(pPicture);
@@ -898,7 +896,7 @@ CreateLinearGradientPicture(Picture pid, xPointFixed * p1, xPointFixed * p2,
     }
 
     pPicture->id = pid;
-    pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(PictLinearGradient));
+    pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(SourcePict));
     if (!pPicture->pSourcePict) {
         *error = BadAlloc;
         free(pPicture);
@@ -938,7 +936,7 @@ CreateRadialGradientPicture(Picture pid, xPointFixed * inner,
     }
 
     pPicture->id = pid;
-    pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(PictRadialGradient));
+    pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(SourcePict));
     if (!pPicture->pSourcePict) {
         *error = BadAlloc;
         free(pPicture);
@@ -981,7 +979,7 @@ CreateConicalGradientPicture(Picture pid, xPointFixed * center, xFixed angle,
     }
 
     pPicture->id = pid;
-    pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(PictConicalGradient));
+    pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(SourcePict));
     if (!pPicture->pSourcePict) {
         *error = BadAlloc;
         free(pPicture);
diff --git a/render/render.c b/render/render.c
index c376090..456f156 100644
--- a/render/render.c
+++ b/render/render.c
@@ -2309,6 +2309,9 @@ SProcRenderCompositeGlyphs(ClientPtr client)
 
         i = elt->len;
         if (i == 0xff) {
+            if (buffer + 4 > end) {
+                return BadLength;
+            }
             swapl((int *) buffer);
             buffer += 4;
         }
@@ -2319,12 +2322,18 @@ SProcRenderCompositeGlyphs(ClientPtr client)
                 buffer += i;
                 break;
             case 2:
+                if (buffer + i * 2 > end) {
+                    return BadLength;
+                }
                 while (i--) {
                     swaps((short *) buffer);
                     buffer += 2;
                 }
                 break;
             case 4:
+                if (buffer + i * 4 > end) {
+                    return BadLength;
+                }
                 while (i--) {
                     swapl((int *) buffer);
                     buffer += 4;
diff --git a/test-driver b/test-driver
index 89dba1e..be73b80 100755
--- a/test-driver
+++ b/test-driver
@@ -3,7 +3,7 @@
 
 scriptversion=2018-03-07.03; # UTC
 
-# Copyright (C) 2011-2020 Free Software Foundation, Inc.
+# Copyright (C) 2011-2021 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -42,11 +42,13 @@ print_usage ()
 {
   cat <<END
 Usage:
-  test-driver --test-name=NAME --log-file=PATH --trs-file=PATH
-              [--expect-failure={yes|no}] [--color-tests={yes|no}]
-              [--enable-hard-errors={yes|no}] [--]
+  test-driver --test-name NAME --log-file PATH --trs-file PATH
+              [--expect-failure {yes|no}] [--color-tests {yes|no}]
+              [--enable-hard-errors {yes|no}] [--]
               TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS]
+
 The '--test-name', '--log-file' and '--trs-file' options are mandatory.
+See the GNU Automake documentation for information.
 END
 }
 
@@ -103,8 +105,11 @@ trap "st=130; $do_exit" 2
 trap "st=141; $do_exit" 13
 trap "st=143; $do_exit" 15
 
-# Test script is run here.
-"$@" >$log_file 2>&1
+# Test script is run here. We create the file first, then append to it,
+# to ameliorate tests themselves also writing to the log file. Our tests
+# don't, but others can (automake bug#35762).
+: >"$log_file"
+"$@" >>"$log_file" 2>&1
 estatus=$?
 
 if test $enable_hard_errors = no && test $estatus -eq 99; then
@@ -126,7 +131,7 @@ esac
 # know whether the test passed or failed simply by looking at the '.log'
 # file, without the need of also peaking into the corresponding '.trs'
 # file (automake bug#11814).
-echo "$res $test_name (exit status: $estatus)" >>$log_file
+echo "$res $test_name (exit status: $estatus)" >>"$log_file"
 
 # Report outcome to console.
 echo "${col}${res}${std}: $test_name"
diff --git a/test/Makefile.am b/test/Makefile.am
index 12ac327..ce07c35 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -146,6 +146,7 @@ tests_LDADD += \
             $(top_builddir)/hw/xfree86/i2c/libi2c.la \
             $(top_builddir)/hw/xfree86/xkb/libxorgxkb.la \
             $(top_builddir)/Xext/libXvidmode.la \
+            $(top_builddir)/fb/libfb.la \
             $(XSERVER_LIBS) \
             $(XORG_LIBS)
 
diff --git a/test/Makefile.in b/test/Makefile.in
index 960f1c4..6b1f58a 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -156,6 +156,7 @@ host_triplet = @host@
 @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@            $(top_builddir)/hw/xfree86/i2c/libi2c.la \
 @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@            $(top_builddir)/hw/xfree86/xkb/libxorgxkb.la \
 @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@            $(top_builddir)/Xext/libXvidmode.la \
+@ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@            $(top_builddir)/fb/libfb.la \
 @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@            $(XSERVER_LIBS) \
 @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@            $(XORG_LIBS)
 
@@ -182,7 +183,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -251,6 +251,7 @@ am__DEPENDENCIES_1 =
 @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@	$(top_builddir)/hw/xfree86/i2c/libi2c.la \
 @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@	$(top_builddir)/hw/xfree86/xkb/libxorgxkb.la \
 @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@	$(top_builddir)/Xext/libXvidmode.la \
+@ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@	$(top_builddir)/fb/libfb.la \
 @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@	$(am__DEPENDENCIES_1) \
 @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@	$(am__DEPENDENCIES_1)
 @ENABLE_UNIT_TESTS_TRUE@tests_DEPENDENCIES = $(am__DEPENDENCIES_2) \
@@ -357,8 +358,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__tty_colors_dummy = \
   mgn= red= grn= lgn= blu= brg= std=; \
   am__color_tests=no
@@ -541,6 +540,7 @@ am__set_TESTS_bases = \
   bases='$(TEST_LOGS)'; \
   bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
   bases=`echo $$bases`
+AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)'
 RECHECK_LOGS = $(TEST_LOGS)
 @ENABLE_UNIT_TESTS_TRUE@am__EXEEXT_1 = $(XVFB_TESTS) \
 @ENABLE_UNIT_TESTS_TRUE@	$(XEPHYR_GLAMOR_TESTS)
@@ -610,8 +610,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -625,6 +623,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -643,14 +643,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -667,8 +659,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -724,6 +718,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -776,7 +772,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -800,29 +795,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -860,8 +839,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -872,14 +849,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -1706,7 +1677,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
 	  test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG);		\
 	fi;								\
 	echo "$${col}$$br$${std}"; 					\
-	echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}";	\
+	echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}";	\
 	echo "$${col}$$br$${std}"; 					\
 	create_testsuite_report --maybe-color;				\
 	echo "$$col$$br$$std";						\
@@ -1789,7 +1760,6 @@ xi2-tests.log: xi2-tests
 @am__EXEEXT_TRUE@	--log-file $$b.log --trs-file $$b.trs \
 @am__EXEEXT_TRUE@	$(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
 @am__EXEEXT_TRUE@	"$$tst" $(AM_TESTS_FD_REDIRECT)
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
@@ -1857,7 +1827,8 @@ installdirs: installdirs-recursive
 installdirs-am:
 install: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) install-recursive
-install-exec: install-exec-recursive
+install-exec: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-exec-recursive
 install-data: install-data-recursive
 uninstall: uninstall-recursive
 
@@ -2017,7 +1988,7 @@ ps-am:
 uninstall-am:
 
 .MAKE: $(am__recursive_targets) all check check-am install install-am \
-	install-strip
+	install-exec install-strip
 
 .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
 	am--depfiles check check-TESTS check-am clean clean-generic \
diff --git a/test/damage/meson.build b/test/damage/meson.build
new file mode 100644
index 0000000..091caff
--- /dev/null
+++ b/test/damage/meson.build
@@ -0,0 +1,9 @@
+xcb_dep = dependency('xcb', required: false)
+xcb_damage_dep = dependency('xcb-damage', required: false)
+
+if get_option('xvfb')
+    if xcb_dep.found() and xcb_damage_dep.found()
+        damage_primitives = executable('damage-primitives', 'primitives.c', dependencies: [xcb_dep, xcb_damage_dep])
+        test('damage-primitives', simple_xinit, args: [damage_primitives, '--', xvfb_server])
+    endif
+endif
diff --git a/test/damage/primitives.c b/test/damage/primitives.c
new file mode 100644
index 0000000..d60da8d
--- /dev/null
+++ b/test/damage/primitives.c
@@ -0,0 +1,374 @@
+/*
+ * Copyright © 2018 Broadcom
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+/** @file
+ *
+ * Touch-testing of the damage extension's implementation of various
+ * primitives.  The core initializes the pixmap with some contents,
+ * turns on damage and each per-primitive test gets to just make a
+ * rendering call that draws some pixels.  Afterwards, the core checks
+ * what pixels were modified and makes sure the damage report contains
+ * them.
+ */
+
+/* Test relies on assert() */
+#undef NDEBUG
+
+#include <assert.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <limits.h>
+#include <xcb/damage.h>
+
+struct test_setup {
+    xcb_connection_t *c;
+    xcb_drawable_t d;
+    xcb_drawable_t start_drawable;
+    uint32_t *start_drawable_contents;
+    xcb_screen_t *screen;
+    xcb_gc_t gc;
+    int width, height;
+    uint32_t *expected;
+    uint32_t *damaged;
+};
+
+#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
+
+/**
+ * Performs a synchronous GetImage for a test pixmap, returning
+ * uint32_t per pixel.
+ */
+static uint32_t *
+get_image(struct test_setup *setup, xcb_drawable_t drawable)
+{
+    xcb_get_image_cookie_t cookie =
+        xcb_get_image(setup->c, XCB_IMAGE_FORMAT_Z_PIXMAP, drawable,
+                      0, 0, setup->width, setup->height, ~0);
+    xcb_get_image_reply_t *reply =
+        xcb_get_image_reply(setup->c, cookie, NULL);
+    uint8_t *data = xcb_get_image_data(reply);
+    int len = xcb_get_image_data_length(reply);
+
+    /* Do I understand X protocol and our test environment? */
+    assert(reply->depth == 24);
+    assert(len == 4 * setup->width * setup->height);
+
+    uint32_t *result = malloc(sizeof(uint32_t) *
+                              setup->width * setup->height);
+    memcpy(result, data, len);
+    free(reply);
+
+    return result;
+}
+
+/**
+ * Gets the image drawn by the test and compares it to the starting
+ * image, producing a bitmask of what pixels were damaged.
+ */
+static void
+compute_expected_damage(struct test_setup *setup)
+{
+    uint32_t *results = get_image(setup, setup->d);
+    bool any_modified_pixels = false;
+
+    for (int i = 0; i < setup->width * setup->height; i++) {
+        if (results[i] != setup->start_drawable_contents[i]) {
+            setup->expected[i / 32] |= 1 << (i % 32);
+            any_modified_pixels = true;
+        }
+    }
+
+    /* Make sure that the testcases actually render something! */
+    assert(any_modified_pixels);
+}
+
+/**
+ * Processes a damage event, filling in the bitmask of pixels reported
+ * to be damaged.
+ */
+static bool
+damage_event_handle(struct test_setup *setup,
+                    struct xcb_damage_notify_event_t *event)
+{
+    xcb_rectangle_t *rect = &event->area;
+    assert(event->drawable == setup->d);
+    for (int y = rect->y; y < rect->y + rect->height; y++) {
+        for (int x = rect->x; x < rect->x + rect->width; x++) {
+            int bit = y * setup->width + x;
+            setup->damaged[bit / 32] |= 1 << (bit % 32);
+        }
+    }
+
+    return event->level & 0x80; /* XXX: MORE is missing from xcb. */
+}
+
+/**
+ * Collects a series of damage events (while the MORE flag is set)
+ * into the damaged bitmask.
+ */
+static void
+collect_damage(struct test_setup *setup)
+{
+    const xcb_query_extension_reply_t *ext =
+        xcb_get_extension_data(setup->c, &xcb_damage_id);
+    xcb_generic_event_t *ge;
+
+    xcb_flush(setup->c);
+    while ((ge = xcb_wait_for_event(setup->c))) {
+        int event = ge->response_type & ~0x80;
+
+        if (event == (ext->first_event + XCB_DAMAGE_NOTIFY)) {
+            if (!damage_event_handle(setup,
+                                     (struct xcb_damage_notify_event_t *)ge)) {
+                return;
+            }
+        } else {
+            switch (ge->response_type) {
+            case 0: {
+                xcb_generic_error_t *error = (xcb_generic_error_t *)ge;
+                fprintf(stderr, "X error %d at sequence %d\n",
+                        error->error_code, error->sequence);
+                exit(1);
+            }
+
+            case XCB_GRAPHICS_EXPOSURE:
+            case XCB_NO_EXPOSURE:
+                break;
+
+            default:
+                fprintf(stderr, "Unexpected event %d\n", ge->response_type);
+                exit(1);
+            }
+        }
+    }
+
+    fprintf(stderr, "I/O error\n");
+    exit(1);
+}
+
+/**
+ * Wrapper to set up the test pixmap, attach damage to it, and see if
+ * the reported damage matches the testcase's rendering.
+ */
+static bool
+damage_test(struct test_setup *setup,
+            void (*test)(struct test_setup *setup),
+            const char *name)
+{
+    uint32_t expected[32] = { 0 };
+    uint32_t damaged[32] = { 0 };
+
+    printf("Testing %s\n", name);
+
+    setup->expected = expected;
+    setup->damaged = damaged;
+
+    /* Create our pixmap for this test and fill it with the
+     * starting image.
+     */
+    setup->d = xcb_generate_id(setup->c);
+    xcb_create_pixmap(setup->c, setup->screen->root_depth,
+                      setup->d, setup->screen->root,
+                      setup->width, setup->height);
+
+    setup->gc = xcb_generate_id(setup->c);
+    uint32_t values[]  = { setup->screen->black_pixel };
+    xcb_create_gc(setup->c, setup->gc, setup->screen->root,
+                  XCB_GC_FOREGROUND, values);
+
+    xcb_copy_area(setup->c,
+                  setup->start_drawable,
+                  setup->d,
+                  setup->gc,
+                  0, 0,
+                  0, 0,
+                  setup->width, setup->height);
+
+    /* Start watching for damage now that we have the initial contents. */
+    xcb_damage_damage_t damage = xcb_generate_id(setup->c);
+    xcb_damage_create(setup->c, damage, setup->d,
+                      XCB_DAMAGE_REPORT_LEVEL_RAW_RECTANGLES);
+
+    test(setup);
+
+    compute_expected_damage(setup);
+
+    xcb_damage_destroy(setup->c, damage);
+    xcb_free_gc(setup->c, setup->gc);
+    xcb_free_pixmap(setup->c, setup->d);
+    collect_damage(setup);
+
+    for (int bit = 0; bit < setup->width * setup->height; bit++) {
+        if ((expected[bit / 32] & (1 << bit %  32)) &&
+            !(damaged[bit / 32] & (1 << bit %  32))) {
+            fprintf(stderr, "  fail: %s(): Damage report missed %d, %d\n",
+                    name, bit % setup->width, bit / setup->width);
+            return false;
+        }
+    }
+
+    return true;
+}
+
+/**
+ * Creates the pixmap of contents that will be the initial state of
+ * each test's drawable.
+ */
+static void
+create_start_pixmap(struct test_setup *setup)
+{
+    setup->start_drawable = xcb_generate_id(setup->c);
+    xcb_create_pixmap(setup->c, setup->screen->root_depth,
+                      setup->start_drawable, setup->screen->root,
+                      setup->width, setup->height);
+
+    /* Fill pixmap so it has defined contents */
+    xcb_gc_t fill = xcb_generate_id(setup->c);
+    uint32_t fill_values[]  = { setup->screen->white_pixel };
+    xcb_create_gc(setup->c, fill, setup->screen->root,
+                  XCB_GC_FOREGROUND, fill_values);
+
+    xcb_rectangle_t rect_all = { 0, 0, setup->width, setup->height};
+    xcb_poly_fill_rectangle(setup->c, setup->start_drawable,
+                            fill, 1, &rect_all);
+    xcb_free_gc(setup->c, fill);
+
+    /* Draw a rectangle */
+    xcb_gc_t gc = xcb_generate_id(setup->c);
+    uint32_t values[]  = { 0xaaaaaaaa };
+    xcb_create_gc(setup->c, gc, setup->screen->root,
+                  XCB_GC_FOREGROUND, values);
+
+    xcb_rectangle_t rect = { 5, 5, 10, 15 };
+    xcb_poly_rectangle(setup->c, setup->start_drawable, gc, 1, &rect);
+
+    xcb_free_gc(setup->c, gc);
+
+    /* Capture the rendered start contents once, for comparing each
+     * test's rendering output to the start contents.
+     */
+    setup->start_drawable_contents = get_image(setup, setup->start_drawable);
+}
+
+static void
+test_poly_point_origin(struct test_setup *setup)
+{
+    struct xcb_point_t points[] = { {1, 2}, {3, 4} };
+    xcb_poly_point(setup->c, XCB_COORD_MODE_ORIGIN, setup->d, setup->gc,
+                   ARRAY_SIZE(points), points);
+}
+
+static void
+test_poly_point_previous(struct test_setup *setup)
+{
+    struct xcb_point_t points[] = { {1, 2}, {3, 4} };
+    xcb_poly_point(setup->c, XCB_COORD_MODE_PREVIOUS, setup->d, setup->gc,
+                   ARRAY_SIZE(points), points);
+}
+
+static void
+test_poly_line_origin(struct test_setup *setup)
+{
+    struct xcb_point_t points[] = { {1, 2}, {3, 4}, {5, 6} };
+    xcb_poly_line(setup->c, XCB_COORD_MODE_ORIGIN, setup->d, setup->gc,
+                   ARRAY_SIZE(points), points);
+}
+
+static void
+test_poly_line_previous(struct test_setup *setup)
+{
+    struct xcb_point_t points[] = { {1, 2}, {3, 4}, {5, 6} };
+    xcb_poly_line(setup->c, XCB_COORD_MODE_PREVIOUS, setup->d, setup->gc,
+                   ARRAY_SIZE(points), points);
+}
+
+static void
+test_poly_fill_rectangle(struct test_setup *setup)
+{
+    struct xcb_rectangle_t rects[] = { {1, 2, 3, 4},
+                                       {5, 6, 7, 8} };
+    xcb_poly_fill_rectangle(setup->c, setup->d, setup->gc,
+                   ARRAY_SIZE(rects), rects);
+}
+
+static void
+test_poly_rectangle(struct test_setup *setup)
+{
+    struct xcb_rectangle_t rects[] = { {1, 2, 3, 4},
+                                       {5, 6, 7, 8} };
+    xcb_poly_rectangle(setup->c, setup->d, setup->gc,
+                       ARRAY_SIZE(rects), rects);
+}
+
+static void
+test_poly_segment(struct test_setup *setup)
+{
+    struct xcb_segment_t segs[] = { {1, 2, 3, 4},
+                                    {5, 6, 7, 8} };
+    xcb_poly_segment(setup->c, setup->d, setup->gc,
+                     ARRAY_SIZE(segs), segs);
+}
+
+int main(int argc, char **argv)
+{
+    int screen;
+    xcb_connection_t *c = xcb_connect(NULL, &screen);
+    const xcb_query_extension_reply_t *ext =
+        xcb_get_extension_data(c, &xcb_damage_id);
+
+    if (!ext->present) {
+        printf("No XDamage present\n");
+        exit(77);
+    }
+
+    struct test_setup setup = {
+        .c = c,
+        .width = 32,
+        .height = 32,
+    };
+
+    /* Get the screen so we have the root window. */
+    xcb_screen_iterator_t iter;
+    iter = xcb_setup_roots_iterator (xcb_get_setup (c));
+    setup.screen = iter.data;
+
+    xcb_damage_query_version(c, 1, 1);
+
+    create_start_pixmap(&setup);
+
+    bool pass = true;
+#define test(x) pass = damage_test(&setup, x, #x) && pass;
+
+    test(test_poly_point_origin);
+    test(test_poly_point_previous);
+    test(test_poly_line_origin);
+    test(test_poly_line_previous);
+    test(test_poly_fill_rectangle);
+    test(test_poly_rectangle);
+    test(test_poly_segment);
+
+    xcb_disconnect(c);
+    exit(pass ? 0 : 1);
+}
diff --git a/test/fixes.c b/test/fixes.c
index 573d948..ba73234 100644
--- a/test/fixes.c
+++ b/test/fixes.c
@@ -21,6 +21,9 @@
  *  DEALINGS IN THE SOFTWARE.
  */
 
+/* Test relies on assert() */
+#undef NDEBUG
+
 #ifdef HAVE_DIX_CONFIG_H
 #include <dix-config.h>
 #endif
diff --git a/test/input.c b/test/input.c
index 9ff1a2f..e27374d 100644
--- a/test/input.c
+++ b/test/input.c
@@ -21,6 +21,9 @@
  *  DEALINGS IN THE SOFTWARE.
  */
 
+/* Test relies on assert() */
+#undef NDEBUG
+
 #ifdef HAVE_DIX_CONFIG_H
 #include <dix-config.h>
 #endif
@@ -1105,7 +1108,8 @@ cmp_attr_fields(InputAttributes * attr1, InputAttributes * attr2)
 {
     char **tags1, **tags2;
 
-    assert(attr1 && attr2);
+    assert(attr1);
+    assert(attr2);
     assert(attr1 != attr2);
     assert(attr1->flags == attr2->flags);
 
diff --git a/test/list.c b/test/list.c
index d710f46..d51817c 100644
--- a/test/list.c
+++ b/test/list.c
@@ -21,6 +21,9 @@
  *  DEALINGS IN THE SOFTWARE.
  */
 
+/* Test relies on assert() */
+#undef NDEBUG
+
 #ifdef HAVE_DIX_CONFIG_H
 #include <dix-config.h>
 #endif
diff --git a/test/meson.build b/test/meson.build
index d413e9d..7cd6369 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -8,20 +8,174 @@ piglit_env = environment()
 piglit_env.set('XSERVER_DIR', meson.source_root())
 piglit_env.set('XSERVER_BUILDDIR', meson.build_root())
 
+some_ops = ' -o clear,src,dst,over,xor,disjointover'
+rendercheck_tests = [
+    ['blend/All/a8r8g8b8', '-t blend -f a8r8g8b8'],
+    ['blend/All/x8r8g8b8', '-t blend -f a8r8g8b8,x8r8g8b8'],
+    ['blend/All/a2r10g10b10', '-t blend -f a8r8g8b8,a2r10g10b10'],
+    ['blend/Clear', '-t blend -o clear'],
+    ['blend/Src', '-t blend -o src'],
+    ['blend/Over', '-t blend -o over'],
+    ['composite/Some/a8r8g8b8', '-t composite -f a8r8g8b8' + some_ops],
+    ['composite/Some/x8r8g8b8', '-t composite -f a8r8g8b8,x8r8g8b8' + some_ops],
+    ['composite/Some/a2r10g10b10', '-t composite -f a8r8g8b8,a2r10g10b10' + some_ops],
+    ['ca composite/Some/a8r8g8b8', '-t cacomposite -f a8r8g8b8' + some_ops],
+    ['ca composite/Some/a8', '-t cacomposite -f a8r8g8b8,a8' + some_ops],
+    ['ca composite/Some/x8r8g8b8', '-t cacomposite -f a8r8g8b8,x8r8g8b8' + some_ops],
+    ['ca composite/Some/a2r10g10b10', '-t cacomposite -f a8r8g8b8,a2r10g10b10' + some_ops],
+    ['fill', '-t fill'],
+    ['bug7366', '-t bug7366'],
+    ['destination coordinates', '-t dcoords'],
+    ['source coordinates', '-t scoords'],
+    ['mask coordinates', '-t mcoords'],
+    ['translated source coordinates', '-t tscoords'],
+    ['translated mask coordinates', '-t tmcoords'],
+    ['triangles', '-t triangles'],
+    ['LibreOffice xRGB', '-t libreoffice_xrgb'],
+    ['GTK ARGB vs xBGR', '-t gtk_argb_xbgr'],
+]
+
+rendercheck = find_program('rendercheck', required:false)
+
 if get_option('xvfb')
-    test('xvfb-piglit', find_program('scripts/xvfb-piglit.sh'),
+    xvfb_args = [
+        xvfb_server.full_path(),
+        '-screen',
+        'scrn',
+        '1280x1024x24',
+    ]
+
+    test('XTS',
+        find_program('scripts/xvfb-piglit.sh'),
         env: piglit_env,
         timeout: 1200,
+        suite: 'xvfb'
     )
 
+    if rendercheck.found()
+        foreach rctest: rendercheck_tests
+            test(rctest[0],
+                 simple_xinit,
+                 # Use full_path so people can copy and paste the
+                 # command line from testlog.txt easily.
+                 args: [
+                     rendercheck.path(),
+                     rctest[1].split(' '),
+                     '--',
+                     xvfb_args,
+                 ],
+                 suite: 'xvfb'
+                )
+        endforeach
+    endif
+
     if get_option('xephyr') and build_glamor
-        test('xephyr-glamor',
+        test('XTS',
             find_program('scripts/xephyr-glamor-piglit.sh'),
             env: piglit_env,
             timeout: 1200,
+            suite: 'xephr-glamor',
         )
+
+        if rendercheck.found()
+            foreach rctest: rendercheck_tests
+                test(rctest[0],
+                     simple_xinit,
+                     args: [simple_xinit.full_path(),
+                            rendercheck.path(),
+                            rctest[1].split(' '),
+                            '----',
+                            xephyr_server.full_path(),
+                            '-glamor',
+                            '-glamor-skip-present',
+                            '-schedMax', '2000',
+                            '--',
+                            xvfb_args,
+                           ],
+                     suite: 'xephr-glamor',
+                     timeout: 300,
+                    )
+            endforeach
+        endif
     endif
 endif
 
 subdir('bigreq')
+subdir('damage')
 subdir('sync')
+
+if build_xorg
+# Tests that require at least some DDX functions in order to fully link
+# For now, requires xf86 ddx, could be adjusted to use another
+    unit_sources = [
+     '../mi/miinitext.c',
+     '../mi/miinitext.h',
+     '../mi/micmap.c',
+     '../mi/micmap.h',
+     'fixes.c',
+     'input.c',
+     'list.c',
+     'misc.c',
+     'signal-logging.c',
+     'string.c',
+     'test_xkb.c',
+     'tests-common.c',
+     'tests.c',
+     'touch.c',
+     'xfree86.c',
+     'xtest.c',
+    ]
+    unit_defines = ['-DXORG_TESTS']
+    unit_includes = [inc, xorg_inc]
+
+    if build_res
+        unit_sources += ['hashtabletest.c']
+        unit_defines += ['-DRES_TESTS']
+    endif
+
+    unit_c_args = unit_defines
+    if meson.get_compiler('c').has_link_argument('-Wl,-wrap')
+       # LTO breaks with -Wl,-wrap on certain configurations
+       unit_c_args += ['-fno-lto']
+       unit_sources += [
+        'xi1/protocol-xchangedevicecontrol.c',
+        'xi2/protocol-common.c',
+        'xi2/protocol-xiqueryversion.c',
+        'xi2/protocol-xiquerydevice.c',
+        'xi2/protocol-xiselectevents.c',
+        'xi2/protocol-xigetselectedevents.c',
+        'xi2/protocol-xisetclientpointer.c',
+        'xi2/protocol-xigetclientpointer.c',
+        'xi2/protocol-xiquerypointer.c',
+        'xi2/protocol-xipassivegrabdevice.c',
+        'xi2/protocol-xiwarppointer.c',
+        'xi2/protocol-eventconvert.c',
+        'xi2/xi2.c',
+       ]
+       unit_defines += ['-DLDWRAP_TESTS']
+       unit_includes += [include_directories('xi1', 'xi2')]
+       ldwraps = [
+        '-Wl,-wrap,dixLookupWindow',
+        '-Wl,-wrap,dixLookupClient',
+        '-Wl,-wrap,WriteToClient',
+        '-Wl,-wrap,dixLookupWindow',
+        '-Wl,-wrap,XISetEventMask',
+        '-Wl,-wrap,AddResource',
+        '-Wl,-wrap,GrabButton',
+       ]
+    else
+       ldwraps = []
+       message('ld -wrap required for xi1 & xi2 unit tests, skipping')
+    endif
+
+    unit = executable('tests',
+         unit_sources,
+         c_args: unit_c_args,
+         dependencies: [pixman_dep, randrproto_dep, inputproto_dep, libxcvt_dep],
+         include_directories: unit_includes,
+         link_args: ldwraps,
+         link_with: xorg_link,
+    )
+
+    test('unit', unit)
+endif
diff --git a/test/misc.c b/test/misc.c
index f1f76cc..19ff132 100644
--- a/test/misc.c
+++ b/test/misc.c
@@ -21,6 +21,9 @@
  *  DEALINGS IN THE SOFTWARE.
  */
 
+/* Test relies on assert() */
+#undef NDEBUG
+
 #ifdef HAVE_DIX_CONFIG_H
 #include <dix-config.h>
 #endif
@@ -33,8 +36,6 @@
 
 #include "tests-common.h"
 
-extern ScreenInfo screenInfo;
-
 static void
 dix_version_compare(void)
 {
diff --git a/test/scripts/xephyr-glamor-piglit.sh b/test/scripts/xephyr-glamor-piglit.sh
index c16fdc4..0458f27 100755
--- a/test/scripts/xephyr-glamor-piglit.sh
+++ b/test/scripts/xephyr-glamor-piglit.sh
@@ -16,6 +16,15 @@ export SERVER_COMMAND="$XSERVER_BUILDDIR/hw/kdrive/ephyr/Xephyr \
         -schedMax 2000 \
         -screen 1280x1024"
 
+# Tests that currently fail on llvmpipe on CI
+PIGLIT_ARGS="$PIGLIT_ARGS -x xcleararea@6"
+PIGLIT_ARGS="$PIGLIT_ARGS -x xcleararea@7"
+PIGLIT_ARGS="$PIGLIT_ARGS -x xclearwindow@4"
+PIGLIT_ARGS="$PIGLIT_ARGS -x xclearwindow@5"
+PIGLIT_ARGS="$PIGLIT_ARGS -x xcopyarea@1"
+
+export PIGLIT_ARGS
+
 $XSERVER_BUILDDIR/test/simple-xinit \
         $XSERVER_DIR/test/scripts/run-piglit.sh \
         -- \
diff --git a/test/scripts/xinit-piglit-session.sh b/test/scripts/xinit-piglit-session.sh
index b495c96..97bf2b9 100755
--- a/test/scripts/xinit-piglit-session.sh
+++ b/test/scripts/xinit-piglit-session.sh
@@ -31,5 +31,7 @@ PIGLIT_ARGS="$PIGLIT_ARGS -x xlistfontswithinfo@4"
 PIGLIT_ARGS="$PIGLIT_ARGS -x xloadqueryfont@1"
 PIGLIT_ARGS="$PIGLIT_ARGS -x xqueryfont@1"
 PIGLIT_ARGS="$PIGLIT_ARGS -x xqueryfont@2"
+# Run as meson unit tests.
+PIGLIT_ARGS="$PIGLIT_ARGS -x rendercheck"
 
 exec ./piglit run xts-render $PIGLIT_ARGS $PIGLIT_RESULTS_DIR
diff --git a/test/signal-logging.c b/test/signal-logging.c
index afbdeb2..4ba8485 100644
--- a/test/signal-logging.c
+++ b/test/signal-logging.c
@@ -21,6 +21,9 @@
  *  DEALINGS IN THE SOFTWARE.
  */
 
+/* Test relies on assert() */
+#undef NDEBUG
+
 #ifdef HAVE_DIX_CONFIG_H
 #include <dix-config.h>
 #endif
diff --git a/test/simple-xinit.c b/test/simple-xinit.c
index 26ff12b..e85b480 100644
--- a/test/simple-xinit.c
+++ b/test/simple-xinit.c
@@ -60,6 +60,15 @@ usage(int argc, char **argv)
     exit(1);
 }
 
+static int server_displayfd;
+static const char *server_dead = "server_dead";
+
+static void
+handle_sigchld(int sig)
+{
+    write(server_displayfd, server_dead, strlen(server_dead));
+}
+
 /* Starts the X server, returning its pid. */
 static int
 start_server(char *const *server_args)
@@ -71,6 +80,17 @@ start_server(char *const *server_args)
         exit(1);
     } else if (server_pid != 0) {
         /* Continue along the main process that will exec the client. */
+
+        struct sigaction sa;
+        sa.sa_handler = handle_sigchld;
+        sigemptyset(&sa.sa_mask);
+        sa.sa_flags = SA_RESTART | SA_NOCLDSTOP;
+        if (sigaction(SIGCHLD, &sa, 0) == -1) {
+            fprintf(stderr, "Failed to set up signal handler: %s\n",
+                    strerror(errno));
+            exit(1);
+        }
+
         return server_pid;
     }
 
@@ -84,7 +104,7 @@ start_server(char *const *server_args)
 static int
 get_display(int displayfd)
 {
-    char display_string[10];
+    char display_string[20];
     ssize_t ret;
 
     ret = read(displayfd, display_string, sizeof(display_string) - 1);
@@ -97,6 +117,12 @@ get_display(int displayfd)
      * '\n', but not '\0'.  Cap it and parse the number.
      */
     display_string[ret] = '\0';
+
+    if (strncmp(display_string, server_dead, strlen(server_dead)) == 0) {
+        fprintf(stderr, "Server failed to start before setting up displayfd\n");
+        exit(1);
+    }
+
     return atoi(display_string);
 }
 
@@ -184,7 +210,13 @@ parse_args(int argc, char **argv,
             continue;
         }
 
-        *next_arg = argv[i];
+        /* A sort of escaped "--" argument so we can nest server
+         * invocations for testing.
+         */
+        if (strcmp(argv[i], "----") == 0)
+            *next_arg = (char *)"--";
+        else
+            *next_arg = argv[i];
         next_arg++;
     }
 
@@ -222,7 +254,8 @@ main(int argc, char **argv)
         exit(1);
     }
 
-    parse_args(argc, argv, &client_args, &server_args, displayfd_pipe[1]);
+    server_displayfd = displayfd_pipe[1];
+    parse_args(argc, argv, &client_args, &server_args, server_displayfd);
     server_pid = start_server(server_args);
     display = get_display(displayfd_pipe[0]);
     ret = start_client(client_args, display);
diff --git a/test/string.c b/test/string.c
index 406b7bf..3feb882 100644
--- a/test/string.c
+++ b/test/string.c
@@ -26,6 +26,9 @@
  * provided in os/ subdirectory for some platforms.
  */
 
+/* Test relies on assert() */
+#undef NDEBUG
+
 #ifdef HAVE_DIX_CONFIG_H
 #include <dix-config.h>
 #endif
diff --git a/test/test_xkb.c b/test/test_xkb.c
index 23d5b22..f81a7ed 100644
--- a/test/test_xkb.c
+++ b/test/test_xkb.c
@@ -21,6 +21,9 @@
  *  DEALINGS IN THE SOFTWARE.
  */
 
+/* Test relies on assert() */
+#undef NDEBUG
+
 #ifdef HAVE_DIX_CONFIG_H
 #include <dix-config.h>
 #endif
diff --git a/test/touch.c b/test/touch.c
index 16aaf4b..7b22ced 100644
--- a/test/touch.c
+++ b/test/touch.c
@@ -21,6 +21,9 @@
  *  DEALINGS IN THE SOFTWARE.
  */
 
+/* Test relies on assert() */
+#undef NDEBUG
+
 #ifdef HAVE_DIX_CONFIG_H
 #include <dix-config.h>
 #endif
diff --git a/test/xfree86.c b/test/xfree86.c
index ff8ad2d..59e3716 100644
--- a/test/xfree86.c
+++ b/test/xfree86.c
@@ -21,6 +21,9 @@
  *  DEALINGS IN THE SOFTWARE.
  */
 
+/* Test relies on assert() */
+#undef NDEBUG
+
 #ifdef HAVE_DIX_CONFIG_H
 #include <dix-config.h>
 #endif
@@ -69,7 +72,8 @@ xfree86_option_list_duplicate(void)
 
     a = xf86FindOption(options, o_null);
     b = xf86FindOption(duplicate, o_null);
-    assert(a && b);
+    assert(a);
+    assert(b);
 }
 
 static void
diff --git a/test/xi1/protocol-xchangedevicecontrol.c b/test/xi1/protocol-xchangedevicecontrol.c
index 54f1f67..e386d0c 100644
--- a/test/xi1/protocol-xchangedevicecontrol.c
+++ b/test/xi1/protocol-xchangedevicecontrol.c
@@ -21,6 +21,9 @@
  * DEALINGS IN THE SOFTWARE.
  */
 
+/* Test relies on assert() */
+#undef NDEBUG
+
 #ifdef HAVE_DIX_CONFIG_H
 #include <dix-config.h>
 #endif
diff --git a/test/xi2/protocol-common.c b/test/xi2/protocol-common.c
index 05dd3c4..69d7c14 100644
--- a/test/xi2/protocol-common.c
+++ b/test/xi2/protocol-common.c
@@ -21,6 +21,9 @@
  *  DEALINGS IN THE SOFTWARE.
  */
 
+/* Test relies on assert() */
+#undef NDEBUG
+
 #ifdef HAVE_DIX_CONFIG_H
 #include <dix-config.h>
 #endif
diff --git a/test/xi2/protocol-eventconvert.c b/test/xi2/protocol-eventconvert.c
index 8d19d53..0e01237 100644
--- a/test/xi2/protocol-eventconvert.c
+++ b/test/xi2/protocol-eventconvert.c
@@ -20,6 +20,9 @@
  *  DEALINGS IN THE SOFTWARE.
  */
 
+/* Test relies on assert() */
+#undef NDEBUG
+
 #ifdef HAVE_DIX_CONFIG_H
 #include <dix-config.h>
 #endif
@@ -366,8 +369,10 @@ test_values_XIDeviceEvent(DeviceEvent *in, xXIDeviceEvent * out, BOOL swap)
     values = (FP3232 *) (ptr + out->valuators_len * 4);
     for (i = 0; i < sizeof(in->valuators.mask) * 8 ||
          i < (out->valuators_len * 4) * 8; i++) {
-        if (i >= MAX_VALUATORS)
-            assert(!XIMaskIsSet(in->valuators.mask, i) && !XIMaskIsSet(ptr, i));
+        if (i >= MAX_VALUATORS) {
+            assert(!XIMaskIsSet(in->valuators.mask, i));
+            assert(!XIMaskIsSet(ptr, i));
+        }
         else if (i > sizeof(in->valuators.mask) * 8)
             assert(!XIMaskIsSet(ptr, i));
         else if (i > out->valuators_len * 4 * 8)
diff --git a/test/xi2/protocol-xigetclientpointer.c b/test/xi2/protocol-xigetclientpointer.c
index 244e843..40dacfc 100644
--- a/test/xi2/protocol-xigetclientpointer.c
+++ b/test/xi2/protocol-xigetclientpointer.c
@@ -21,6 +21,9 @@
  *  DEALINGS IN THE SOFTWARE.
  */
 
+/* Test relies on assert() */
+#undef NDEBUG
+
 #ifdef HAVE_DIX_CONFIG_H
 #include <dix-config.h>
 #endif
diff --git a/test/xi2/protocol-xigetselectedevents.c b/test/xi2/protocol-xigetselectedevents.c
index b141002..0c7ef16 100644
--- a/test/xi2/protocol-xigetselectedevents.c
+++ b/test/xi2/protocol-xigetselectedevents.c
@@ -21,6 +21,9 @@
  *  DEALINGS IN THE SOFTWARE.
  */
 
+/* Test relies on assert() */
+#undef NDEBUG
+
 #ifdef HAVE_DIX_CONFIG_H
 #include <dix-config.h>
 #endif
diff --git a/test/xi2/protocol-xipassivegrabdevice.c b/test/xi2/protocol-xipassivegrabdevice.c
index 142bcec..56645c6 100644
--- a/test/xi2/protocol-xipassivegrabdevice.c
+++ b/test/xi2/protocol-xipassivegrabdevice.c
@@ -21,6 +21,9 @@
  *  DEALINGS IN THE SOFTWARE.
  */
 
+/* Test relies on assert() */
+#undef NDEBUG
+
 #ifdef HAVE_DIX_CONFIG_H
 #include <dix-config.h>
 #endif
@@ -194,7 +197,7 @@ test_XIPassiveGrabDevice(void)
     request->deviceid = XIAllMasterDevices;
 
     printf("Testing invalid grab types\n");
-    for (i = XIGrabtypeTouchBegin + 1; i < 0xFF; i++) {
+    for (i = XIGrabtypeGestureSwipeBegin + 1; i < 0xFF; i++) {
         request->grab_type = i;
         request_XIPassiveGrabDevice(&client_request, request, BadValue,
                                     request->grab_type);
diff --git a/test/xi2/protocol-xiquerydevice.c b/test/xi2/protocol-xiquerydevice.c
index 6ee8a80..821ca40 100644
--- a/test/xi2/protocol-xiquerydevice.c
+++ b/test/xi2/protocol-xiquerydevice.c
@@ -21,6 +21,9 @@
  *  DEALINGS IN THE SOFTWARE.
  */
 
+/* Test relies on assert() */
+#undef NDEBUG
+
 #ifdef HAVE_DIX_CONFIG_H
 #include <dix-config.h>
 #endif
@@ -251,7 +254,8 @@ reply_XIQueryDevice_data(ClientPtr client, int len, char *data, void *closure)
                     }
 
                     assert(vi->length == 11);
-                    assert(vi->number >= 0 && vi->number < 4);
+                    assert(vi->number >= 0);
+                    assert(vi->number < 4);
                     if (info->deviceid == 2)    /* VCP */
                         assert(vi->number < 2);
 
diff --git a/test/xi2/protocol-xiquerypointer.c b/test/xi2/protocol-xiquerypointer.c
index 0f5a2b5..e04b0ba 100644
--- a/test/xi2/protocol-xiquerypointer.c
+++ b/test/xi2/protocol-xiquerypointer.c
@@ -21,6 +21,9 @@
  *  DEALINGS IN THE SOFTWARE.
  */
 
+/* Test relies on assert() */
+#undef NDEBUG
+
 #ifdef HAVE_DIX_CONFIG_H
 #include <dix-config.h>
 #endif
diff --git a/test/xi2/protocol-xiqueryversion.c b/test/xi2/protocol-xiqueryversion.c
index c7ddbfc..89df184 100644
--- a/test/xi2/protocol-xiqueryversion.c
+++ b/test/xi2/protocol-xiqueryversion.c
@@ -21,6 +21,9 @@
  *  DEALINGS IN THE SOFTWARE.
  */
 
+/* Test relies on assert() */
+#undef NDEBUG
+
 #ifdef HAVE_DIX_CONFIG_H
 #include <dix-config.h>
 #endif
diff --git a/test/xi2/protocol-xiselectevents.c b/test/xi2/protocol-xiselectevents.c
index 06050ad..0a4da5b 100644
--- a/test/xi2/protocol-xiselectevents.c
+++ b/test/xi2/protocol-xiselectevents.c
@@ -21,6 +21,9 @@
  *  DEALINGS IN THE SOFTWARE.
  */
 
+/* Test relies on assert() */
+#undef NDEBUG
+
 #ifdef HAVE_DIX_CONFIG_H
 #include <dix-config.h>
 #endif
@@ -124,6 +127,16 @@ _set_bit(unsigned char *bits, int bit)
         SetBit(bits, XI_TouchUpdate);
         SetBit(bits, XI_TouchEnd);
     }
+    if (bit >= XI_GesturePinchBegin && bit <= XI_GesturePinchEnd) {
+        SetBit(bits, XI_GesturePinchBegin);
+        SetBit(bits, XI_GesturePinchUpdate);
+        SetBit(bits, XI_GesturePinchEnd);
+    }
+    if (bit >= XI_GestureSwipeBegin && bit <= XI_GestureSwipeEnd) {
+        SetBit(bits, XI_GestureSwipeBegin);
+        SetBit(bits, XI_GestureSwipeUpdate);
+        SetBit(bits, XI_GestureSwipeEnd);
+    }
 }
 
 static void
@@ -135,6 +148,16 @@ _clear_bit(unsigned char *bits, int bit)
         ClearBit(bits, XI_TouchUpdate);
         ClearBit(bits, XI_TouchEnd);
     }
+    if (bit >= XI_GesturePinchBegin && bit <= XI_GesturePinchEnd) {
+        ClearBit(bits, XI_GesturePinchBegin);
+        ClearBit(bits, XI_GesturePinchUpdate);
+        ClearBit(bits, XI_GesturePinchEnd);
+    }
+    if (bit >= XI_GestureSwipeBegin && bit <= XI_GestureSwipeEnd) {
+        ClearBit(bits, XI_GestureSwipeBegin);
+        ClearBit(bits, XI_GestureSwipeUpdate);
+        ClearBit(bits, XI_GestureSwipeEnd);
+    }
 }
 
 static void
@@ -142,7 +165,7 @@ request_XISelectEvents_masks(xXISelectEventsReq * req)
 {
     int i, j;
     xXIEventMask *mask;
-    int nmasks = (XI2LASTEVENT + 7) / 8;
+    int nmasks = XI2MASKSIZE;
     unsigned char *bits;
 
     mask = (xXIEventMask *) &req[1];
@@ -213,6 +236,17 @@ request_XISelectEvents_masks(xXISelectEventsReq * req)
         }
 
         /* Test 5:
+         * Mask len is 1 and XI_GestureSwipeEnd is set outside the mask.
+         * That bit should be ignored -> Success
+         */
+        bits = (unsigned char *) &mask[1];
+        mask->mask_len = 1;
+        memset(bits, 0, 5);
+        SetBit(bits, XI_ButtonPress); // does not matter which one
+        SetBit(bits, XI_GestureSwipeEnd);
+        request_XISelectEvent(req, Success);
+
+        /* Test 6:
          * HierarchyChanged bit is BadValue for devices other than
          * XIAllDevices
          */
@@ -227,7 +261,7 @@ request_XISelectEvents_masks(xXISelectEventsReq * req)
             request_XISelectEvent(req, BadValue);
         }
 
-        /* Test 6:
+        /* Test 7:
          * All bits set minus hierarchy changed bit -> Success
          */
         bits = (unsigned char *) &mask[1];
diff --git a/test/xi2/protocol-xisetclientpointer.c b/test/xi2/protocol-xisetclientpointer.c
index ddc9f00..0e94a91 100644
--- a/test/xi2/protocol-xisetclientpointer.c
+++ b/test/xi2/protocol-xisetclientpointer.c
@@ -21,6 +21,9 @@
  *  DEALINGS IN THE SOFTWARE.
  */
 
+/* Test relies on assert() */
+#undef NDEBUG
+
 #ifdef HAVE_DIX_CONFIG_H
 #include <dix-config.h>
 #endif
diff --git a/test/xi2/protocol-xiwarppointer.c b/test/xi2/protocol-xiwarppointer.c
index e5c2f31..1b6a2fc 100644
--- a/test/xi2/protocol-xiwarppointer.c
+++ b/test/xi2/protocol-xiwarppointer.c
@@ -21,6 +21,9 @@
  *  DEALINGS IN THE SOFTWARE.
  */
 
+/* Test relies on assert() */
+#undef NDEBUG
+
 #ifdef HAVE_DIX_CONFIG_H
 #include <dix-config.h>
 #endif
diff --git a/test/xi2/xi2.c b/test/xi2/xi2.c
index 6ed4c7f..153cd75 100644
--- a/test/xi2/xi2.c
+++ b/test/xi2/xi2.c
@@ -21,6 +21,9 @@
  *  DEALINGS IN THE SOFTWARE.
  */
 
+/* Test relies on assert() */
+#undef NDEBUG
+
 #ifdef HAVE_DIX_CONFIG_H
 #include <dix-config.h>
 #endif
diff --git a/test/xtest.c b/test/xtest.c
index fc5e433..12433af 100644
--- a/test/xtest.c
+++ b/test/xtest.c
@@ -21,6 +21,9 @@
  *  DEALINGS IN THE SOFTWARE.
  */
 
+/* Test relies on assert() */
+#undef NDEBUG
+
 #ifdef HAVE_DIX_CONFIG_H
 #include <dix-config.h>
 #endif
@@ -61,7 +64,7 @@ xtest_init_devices(void)
 {
     ScreenRec screen = {0};
     ClientRec server_client = {0};
-    WindowRec root = {0};
+    WindowRec root = {{0}};
     WindowOptRec optional = {0};
 
     /* random stuff that needs initialization */
diff --git a/xfixes/Makefile.am b/xfixes/Makefile.am
index 2a95c06..52a7e6c 100644
--- a/xfixes/Makefile.am
+++ b/xfixes/Makefile.am
@@ -4,6 +4,7 @@ AM_CFLAGS = $(DIX_CFLAGS)
 
 libxfixes_la_SOURCES = 	\
 	cursor.c	\
+	disconnect.c	\
 	region.c	\
 	saveset.c	\
 	select.c	\
diff --git a/xfixes/Makefile.in b/xfixes/Makefile.in
index 78a91e7..2ee7ba6 100644
--- a/xfixes/Makefile.in
+++ b/xfixes/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -105,14 +105,13 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 LTLIBRARIES = $(noinst_LTLIBRARIES)
 libxfixes_la_LIBADD =
-am_libxfixes_la_OBJECTS = cursor.lo region.lo saveset.lo select.lo \
-	xfixes.lo
+am_libxfixes_la_OBJECTS = cursor.lo disconnect.lo region.lo saveset.lo \
+	select.lo xfixes.lo
 libxfixes_la_OBJECTS = $(am_libxfixes_la_OBJECTS)
 AM_V_lt = $(am__v_lt_@AM_V@)
 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
@@ -133,7 +132,8 @@ am__v_at_1 =
 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__maybe_remake_depfiles = depfiles
-am__depfiles_remade = ./$(DEPDIR)/cursor.Plo ./$(DEPDIR)/region.Plo \
+am__depfiles_remade = ./$(DEPDIR)/cursor.Plo \
+	./$(DEPDIR)/disconnect.Plo ./$(DEPDIR)/region.Plo \
 	./$(DEPDIR)/saveset.Plo ./$(DEPDIR)/select.Plo \
 	./$(DEPDIR)/xfixes.Plo
 am__mv = mv -f
@@ -179,8 +179,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
@@ -200,8 +198,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -215,6 +211,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -233,14 +231,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -257,8 +247,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -314,6 +306,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -366,7 +360,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -390,29 +383,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -450,8 +427,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -462,14 +437,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -546,6 +515,7 @@ noinst_LTLIBRARIES = libxfixes.la
 AM_CFLAGS = $(DIX_CFLAGS)
 libxfixes_la_SOURCES = \
 	cursor.c	\
+	disconnect.c	\
 	region.c	\
 	saveset.c	\
 	select.c	\
@@ -608,6 +578,7 @@ distclean-compile:
 	-rm -f *.tab.c
 
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cursor.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/disconnect.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/region.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/saveset.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/select.Plo@am__quote@ # am--include-marker
@@ -697,7 +668,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
@@ -772,6 +742,7 @@ clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
 
 distclean: distclean-am
 		-rm -f ./$(DEPDIR)/cursor.Plo
+	-rm -f ./$(DEPDIR)/disconnect.Plo
 	-rm -f ./$(DEPDIR)/region.Plo
 	-rm -f ./$(DEPDIR)/saveset.Plo
 	-rm -f ./$(DEPDIR)/select.Plo
@@ -822,6 +793,7 @@ installcheck-am:
 
 maintainer-clean: maintainer-clean-am
 		-rm -f ./$(DEPDIR)/cursor.Plo
+	-rm -f ./$(DEPDIR)/disconnect.Plo
 	-rm -f ./$(DEPDIR)/region.Plo
 	-rm -f ./$(DEPDIR)/saveset.Plo
 	-rm -f ./$(DEPDIR)/select.Plo
diff --git a/xfixes/cursor.c b/xfixes/cursor.c
index d4b68f3..c5d4554 100644
--- a/xfixes/cursor.c
+++ b/xfixes/cursor.c
@@ -670,7 +670,7 @@ ReplaceCursor(CursorPtr pCursor, TestCursorFunc testCursor, void *closure)
                                         ReplaceCursorLookup, (void *) &rcl);
         }
     }
-    /* this "knows" that WindowHasNewCursor doesn't depend on it's argument */
+    /* this "knows" that WindowHasNewCursor doesn't depend on its argument */
     WindowHasNewCursor(screenInfo.screens[0]->root);
 }
 
@@ -1010,7 +1010,8 @@ ProcXFixesCreatePointerBarrier(ClientPtr client)
 {
     REQUEST(xXFixesCreatePointerBarrierReq);
 
-    REQUEST_FIXED_SIZE(xXFixesCreatePointerBarrierReq, pad_to_int32(stuff->num_devices));
+    REQUEST_FIXED_SIZE(xXFixesCreatePointerBarrierReq,
+                       pad_to_int32(stuff->num_devices * sizeof(CARD16)));
     LEGAL_NEW_RESOURCE(stuff->barrier, client);
 
     return XICreatePointerBarrier(client, stuff);
@@ -1027,7 +1028,8 @@ SProcXFixesCreatePointerBarrier(ClientPtr client)
 
     swaps(&stuff->length);
     swaps(&stuff->num_devices);
-    REQUEST_FIXED_SIZE(xXFixesCreatePointerBarrierReq, pad_to_int32(stuff->num_devices));
+    REQUEST_FIXED_SIZE(xXFixesCreatePointerBarrierReq,
+                       pad_to_int32(stuff->num_devices * sizeof(CARD16)));
 
     swapl(&stuff->barrier);
     swapl(&stuff->window);
diff --git a/xfixes/disconnect.c b/xfixes/disconnect.c
new file mode 100644
index 0000000..7793272
--- /dev/null
+++ b/xfixes/disconnect.c
@@ -0,0 +1,147 @@
+/*
+ * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright 2010 Red Hat, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Copyright © 2002 Keith Packard
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Keith Packard not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission.  Keith Packard makes no
+ * representations about the suitability of this software for any purpose.  It
+ * is provided "as is" without express or implied warranty.
+ *
+ * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include "xfixesint.h"
+#include "opaque.h"
+
+static DevPrivateKeyRec ClientDisconnectPrivateKeyRec;
+
+#define ClientDisconnectPrivateKey (&ClientDisconnectPrivateKeyRec)
+
+typedef struct _ClientDisconnect {
+    int disconnect_mode;
+} ClientDisconnectRec, *ClientDisconnectPtr;
+
+#define GetClientDisconnect(s) \
+    ((ClientDisconnectPtr) dixLookupPrivate(&(s)->devPrivates, \
+                                            ClientDisconnectPrivateKey))
+
+int
+ProcXFixesSetClientDisconnectMode(ClientPtr client)
+{
+    ClientDisconnectPtr pDisconnect = GetClientDisconnect(client);
+
+    REQUEST(xXFixesSetClientDisconnectModeReq);
+
+    pDisconnect->disconnect_mode = stuff->disconnect_mode;
+
+    return Success;
+}
+
+int _X_COLD
+SProcXFixesSetClientDisconnectMode(ClientPtr client)
+{
+    REQUEST(xXFixesSetClientDisconnectModeReq);
+
+    swaps(&stuff->length);
+
+    REQUEST_AT_LEAST_SIZE(xXFixesSetClientDisconnectModeReq);
+
+    swapl(&stuff->disconnect_mode);
+
+    return (*ProcXFixesVector[stuff->xfixesReqType]) (client);
+}
+
+int
+ProcXFixesGetClientDisconnectMode(ClientPtr client)
+{
+    ClientDisconnectPtr pDisconnect = GetClientDisconnect(client);
+    xXFixesGetClientDisconnectModeReply reply;
+
+    REQUEST_SIZE_MATCH(xXFixesGetClientDisconnectModeReq);
+
+    reply = (xXFixesGetClientDisconnectModeReply) {
+        .type = X_Reply,
+        .sequenceNumber = client->sequence,
+        .length = 0,
+        .disconnect_mode = pDisconnect->disconnect_mode,
+    };
+    if (client->swapped) {
+        swaps(&reply.sequenceNumber);
+        swapl(&reply.disconnect_mode);
+    }
+    WriteToClient(client, sizeof(xXFixesGetClientDisconnectModeReply), &reply);
+
+    return Success;
+}
+
+int _X_COLD
+SProcXFixesGetClientDisconnectMode(ClientPtr client)
+{
+    REQUEST(xXFixesGetClientDisconnectModeReq);
+
+    swaps(&stuff->length);
+
+    REQUEST_SIZE_MATCH(xXFixesGetClientDisconnectModeReq);
+
+    return (*ProcXFixesVector[stuff->xfixesReqType]) (client);
+}
+
+Bool
+XFixesShouldDisconnectClient(ClientPtr client)
+{
+    ClientDisconnectPtr pDisconnect = GetClientDisconnect(client);
+
+    if (!pDisconnect)
+        return FALSE;
+
+    if (dispatchExceptionAtReset & DE_TERMINATE)
+        return (pDisconnect->disconnect_mode & XFixesClientDisconnectFlagTerminate);
+
+    return FALSE;
+}
+
+Bool
+XFixesClientDisconnectInit(void)
+{
+    if (!dixRegisterPrivateKey(&ClientDisconnectPrivateKeyRec,
+                               PRIVATE_CLIENT, sizeof(ClientDisconnectRec)))
+        return FALSE;
+
+    return TRUE;
+}
diff --git a/xfixes/meson.build b/xfixes/meson.build
index 4ca819c..0e97d47 100644
--- a/xfixes/meson.build
+++ b/xfixes/meson.build
@@ -1,5 +1,6 @@
 srcs_xfixes = [
     'cursor.c',
+    'disconnect.c',
     'region.c',
     'saveset.c',
     'select.c',
diff --git a/xfixes/xfixes.c b/xfixes/xfixes.c
index 53a6bd6..ecb6f29 100644
--- a/xfixes/xfixes.c
+++ b/xfixes/xfixes.c
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
- * Copyright 2010 Red Hat, Inc.
+ * Copyright 2010, 2021 Red Hat, Inc.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
@@ -61,6 +61,7 @@ static DevPrivateKeyRec XFixesClientPrivateKeyRec;
 static int
 ProcXFixesQueryVersion(ClientPtr client)
 {
+    int major, minor;
     XFixesClientPtr pXFixesClient = GetXFixesClient(client);
     xXFixesQueryVersionReply rep = {
         .type = X_Reply,
@@ -75,16 +76,17 @@ ProcXFixesQueryVersion(ClientPtr client)
     if (version_compare(stuff->majorVersion, stuff->minorVersion,
                         SERVER_XFIXES_MAJOR_VERSION,
                         SERVER_XFIXES_MINOR_VERSION) < 0) {
-        rep.majorVersion = stuff->majorVersion;
-        rep.minorVersion = stuff->minorVersion;
+        major = max(pXFixesClient->major_version, stuff->majorVersion);
+        minor = stuff->minorVersion;
     }
     else {
-        rep.majorVersion = SERVER_XFIXES_MAJOR_VERSION;
-        rep.minorVersion = SERVER_XFIXES_MINOR_VERSION;
+        major = SERVER_XFIXES_MAJOR_VERSION;
+        minor = SERVER_XFIXES_MINOR_VERSION;
     }
 
-    pXFixesClient->major_version = rep.majorVersion;
-    pXFixesClient->minor_version = rep.minorVersion;
+    pXFixesClient->major_version = major;
+    rep.majorVersion = min(stuff->majorVersion, major);
+    rep.minorVersion = minor;
     if (client->swapped) {
         swaps(&rep.sequenceNumber);
         swapl(&rep.length);
@@ -103,6 +105,7 @@ static const int version_requests[] = {
     X_XFixesExpandRegion,       /* Version 3 */
     X_XFixesShowCursor,         /* Version 4 */
     X_XFixesDestroyPointerBarrier,      /* Version 5 */
+    X_XFixesGetClientDisconnectMode,    /* Version 6 */
 };
 
 int (*ProcXFixesVector[XFixesNumberRequests]) (ClientPtr) = {
@@ -139,7 +142,10 @@ int (*ProcXFixesVector[XFixesNumberRequests]) (ClientPtr) = {
 /*************** Version 4 ****************/
         ProcXFixesHideCursor, ProcXFixesShowCursor,
 /*************** Version 5 ****************/
-ProcXFixesCreatePointerBarrier, ProcXFixesDestroyPointerBarrier,};
+        ProcXFixesCreatePointerBarrier, ProcXFixesDestroyPointerBarrier,
+/*************** Version 6 ****************/
+        ProcXFixesSetClientDisconnectMode, ProcXFixesGetClientDisconnectMode,
+};
 
 static int
 ProcXFixesDispatch(ClientPtr client)
@@ -200,13 +206,20 @@ static int (*SProcXFixesVector[XFixesNumberRequests]) (ClientPtr) = {
 /*************** Version 4 ****************/
         SProcXFixesHideCursor, SProcXFixesShowCursor,
 /*************** Version 5 ****************/
-SProcXFixesCreatePointerBarrier, SProcXFixesDestroyPointerBarrier,};
+        SProcXFixesCreatePointerBarrier, SProcXFixesDestroyPointerBarrier,
+/*************** Version 6 ****************/
+        SProcXFixesSetClientDisconnectMode, SProcXFixesGetClientDisconnectMode,
+};
 
 static _X_COLD int
 SProcXFixesDispatch(ClientPtr client)
 {
     REQUEST(xXFixesReq);
-    if (stuff->xfixesReqType >= XFixesNumberRequests)
+    XFixesClientPtr pXFixesClient = GetXFixesClient(client);
+
+    if (pXFixesClient->major_version >= ARRAY_SIZE(version_requests))
+        return BadRequest;
+    if (stuff->xfixesReqType > version_requests[pXFixesClient->major_version])
         return BadRequest;
     return (*SProcXFixesVector[stuff->xfixesReqType]) (client);
 }
@@ -220,7 +233,10 @@ XFixesExtensionInit(void)
         (&XFixesClientPrivateKeyRec, PRIVATE_CLIENT, sizeof(XFixesClientRec)))
         return;
 
-    if (XFixesSelectionInit() && XFixesCursorInit() && XFixesRegionInit() &&
+    if (XFixesSelectionInit() &&
+        XFixesCursorInit() &&
+        XFixesRegionInit() &&
+        XFixesClientDisconnectInit() &&
         (extEntry = AddExtension(XFIXES_NAME, XFixesNumberEvents,
                                  XFixesNumberErrors,
                                  ProcXFixesDispatch, SProcXFixesDispatch,
diff --git a/xfixes/xfixesint.h b/xfixes/xfixesint.h
index 44e8890..cf9a8f9 100644
--- a/xfixes/xfixesint.h
+++ b/xfixes/xfixesint.h
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
- * Copyright 2010 Red Hat, Inc.
+ * Copyright 2010, 2021 Red Hat, Inc.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
@@ -64,7 +64,6 @@ extern int XFixesEventBase;
 
 typedef struct _XFixesClient {
     CARD32 major_version;
-    CARD32 minor_version;
 } XFixesClientRec, *XFixesClientPtr;
 
 #define GetXFixesClient(pClient) ((XFixesClientPtr)dixLookupPrivate(&(pClient)->devPrivates, XFixesClientPrivateKey))
@@ -290,6 +289,26 @@ int
 int
  SProcXFixesDestroyPointerBarrier(ClientPtr client);
 
+/* Version 6 */
+
+Bool
+ XFixesClientDisconnectInit(void);
+
+int
+ ProcXFixesSetClientDisconnectMode(ClientPtr client);
+
+int
+ ProcXFixesGetClientDisconnectMode(ClientPtr client);
+
+int
+ SProcXFixesSetClientDisconnectMode(ClientPtr client);
+
+int
+ SProcXFixesGetClientDisconnectMode(ClientPtr client);
+
+Bool
+ XFixesShouldDisconnectClient(ClientPtr client);
+
 /* Xinerama */
 #ifdef PANORAMIX
 extern int (*PanoramiXSaveXFixesVector[XFixesNumberRequests]) (ClientPtr);
diff --git a/xkb/Makefile.in b/xkb/Makefile.in
index 32bdd18..f22c502 100644
--- a/xkb/Makefile.in
+++ b/xkb/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2020 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -107,7 +107,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
 	$(top_builddir)/include/xorg-config.h \
 	$(top_builddir)/include/xkb-config.h \
 	$(top_builddir)/include/xwin-config.h \
-	$(top_builddir)/include/xwayland-config.h \
 	$(top_builddir)/include/version-config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
@@ -229,8 +228,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
@@ -250,8 +247,6 @@ AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
 BASE_CFLAGS = @BASE_CFLAGS@
 BASE_FONT_PATH = @BASE_FONT_PATH@
-BUILD_DATE = @BUILD_DATE@
-BUILD_TIME = @BUILD_TIME@
 BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
 BUNDLE_VERSION = @BUNDLE_VERSION@
 BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@
@@ -265,6 +260,8 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
 COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -283,14 +280,6 @@ DIX_CFLAGS = @DIX_CFLAGS@
 DIX_LIB = @DIX_LIB@
 DLLTOOL = @DLLTOOL@
 DLOPEN_LIBS = @DLOPEN_LIBS@
-DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
-DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
-DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@
-DMXMODULES_LIBS = @DMXMODULES_LIBS@
-DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
-DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
-DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
-DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
 DOT = @DOT@
 DOXYGEN = @DOXYGEN@
 DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
@@ -307,8 +296,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILECMD = @FILECMD@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 FONT100DPIDIR = @FONT100DPIDIR@
@@ -364,6 +355,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
 LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@
+LIBXCVT_LIBS = @LIBXCVT_LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LIPO = @LIPO@
@@ -416,7 +409,6 @@ RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
 RELEASE_DATE = @RELEASE_DATE@
-SCANNER_ARG = @SCANNER_ARG@
 SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@
 SED = @SED@
 SELINUX_CFLAGS = @SELINUX_CFLAGS@
@@ -440,29 +432,13 @@ UDEV_LIBS = @UDEV_LIBS@
 UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
 VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
 VERSION = @VERSION@
-WAYLAND_EGLSTREAM_CFLAGS = @WAYLAND_EGLSTREAM_CFLAGS@
-WAYLAND_EGLSTREAM_DATADIR = @WAYLAND_EGLSTREAM_DATADIR@
-WAYLAND_EGLSTREAM_LIBS = @WAYLAND_EGLSTREAM_LIBS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
 WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@
 WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@
-WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@
-WINDOWSWM_LIBS = @WINDOWSWM_LIBS@
 WINDRES = @WINDRES@
-X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
-X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
 XCONFIGDIR = @XCONFIGDIR@
 XCONFIGFILE = @XCONFIGFILE@
 XDMCP_CFLAGS = @XDMCP_CFLAGS@
 XDMCP_LIBS = @XDMCP_LIBS@
-XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@
-XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
-XDMX_CFLAGS = @XDMX_CFLAGS@
-XDMX_LIBS = @XDMX_LIBS@
-XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
 XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
 XEPHYR_INCS = @XEPHYR_INCS@
 XEPHYR_LIBS = @XEPHYR_LIBS@
@@ -500,8 +476,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@
 XQUARTZ_LIBS = @XQUARTZ_LIBS@
 XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
 XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@
-XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
-XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
 XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@
 XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@
 XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
@@ -512,14 +486,8 @@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
 XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
 XSLTPROC = @XSLTPROC@
 XSL_STYLESHEET = @XSL_STYLESHEET@
-XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
-XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
 XVFB_LIBS = @XVFB_LIBS@
 XVFB_SYS_LIBS = @XVFB_SYS_LIBS@
-XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@
-XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@
-XWAYLAND_LIBS = @XWAYLAND_LIBS@
-XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@
 XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@
 XWINMODULES_LIBS = @XWINMODULES_LIBS@
 XWIN_LIBS = @XWIN_LIBS@
@@ -819,7 +787,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
diff --git a/xkb/XKBMisc.c b/xkb/XKBMisc.c
index f171945..2bad695 100644
--- a/xkb/XKBMisc.c
+++ b/xkb/XKBMisc.c
@@ -663,14 +663,14 @@ XkbVirtualModsToReal(XkbDescPtr xkb, unsigned virtual_mask, unsigned *mask_rtrn)
     register int i, bit;
     register unsigned mask;
 
-    if (xkb == NULL)
+    if ((xkb == NULL) || (xkb->server == NULL)) {
+        *mask_rtrn = 0;
         return FALSE;
+    }
     if (virtual_mask == 0) {
         *mask_rtrn = 0;
         return TRUE;
     }
-    if (xkb->server == NULL)
-        return FALSE;
     for (i = mask = 0, bit = 1; i < XkbNumVirtualMods; i++, bit <<= 1) {
         if (virtual_mask & bit)
             mask |= xkb->server->vmods[i];
diff --git a/xkb/ddxLoad.c b/xkb/ddxLoad.c
index a8b8368..f9b7b06 100644
--- a/xkb/ddxLoad.c
+++ b/xkb/ddxLoad.c
@@ -62,22 +62,27 @@ LoadXKM(unsigned want, unsigned need, const char *keymap, XkbDescPtr *xkbRtrn);
 static void
 OutputDirectory(char *outdir, size_t size)
 {
+    const char *directory = NULL;
+    const char *pathsep = "";
+    int r = -1;
+
 #ifndef WIN32
     /* Can we write an xkm and then open it too? */
-    if (access(XKM_OUTPUT_DIR, W_OK | X_OK) == 0 &&
-        (strlen(XKM_OUTPUT_DIR) < size)) {
-        (void) strcpy(outdir, XKM_OUTPUT_DIR);
+    if (access(XKM_OUTPUT_DIR, W_OK | X_OK) == 0) {
+        directory = XKM_OUTPUT_DIR;
+        if (XKM_OUTPUT_DIR[strlen(XKM_OUTPUT_DIR) - 1] != '/')
+            pathsep = "/";
     }
-    else
 #else
-    if (strlen(Win32TempDir()) + 1 < size) {
-        (void) strcpy(outdir, Win32TempDir());
-        (void) strcat(outdir, "\\");
-    }
-    else
+    directory = Win32TempDir();
+    pathsep = "\\";
 #endif
-    if (strlen("/tmp/") < size) {
-        (void) strcpy(outdir, "/tmp/");
+
+    if (directory)
+        r = snprintf(outdir, size, "%s%s", directory, pathsep);
+    if (r < 0 || r >= size) {
+        assert(strlen("/tmp/") < size);
+        strcpy(outdir, "/tmp/");
     }
 }
 
@@ -451,7 +456,7 @@ XkbRMLVOtoKcCGST(DeviceIntPtr dev, XkbRMLVOSet * rmlvo,
 /**
  * Compile the given RMLVO keymap and return it. Returns the XkbDescPtr on
  * success or NULL on failure. If the components compiled are not a superset
- * or equal to need, the compiliation is treated as failure.
+ * or equal to need, the compilation is treated as failure.
  */
 static XkbDescPtr
 XkbCompileKeymapForDevice(DeviceIntPtr dev, XkbRMLVOSet * rmlvo, int need)
diff --git a/xkb/xkb.c b/xkb/xkb.c
index 68c59df..276dc19 100644
--- a/xkb/xkb.c
+++ b/xkb/xkb.c
@@ -1600,7 +1600,7 @@ CheckKeyTypes(ClientPtr client,
               XkbDescPtr xkb,
               xkbSetMapReq * req,
               xkbKeyTypeWireDesc ** wireRtrn,
-              int *nMapsRtrn, CARD8 *mapWidthRtrn)
+              int *nMapsRtrn, CARD8 *mapWidthRtrn, Bool doswap)
 {
     unsigned nMaps;
     register unsigned i, n;
@@ -1639,7 +1639,7 @@ CheckKeyTypes(ClientPtr client,
     for (i = 0; i < req->nTypes; i++) {
         unsigned width;
 
-        if (client->swapped) {
+        if (client->swapped && doswap) {
             swaps(&wire->virtualMods);
         }
         n = i + req->firstType;
@@ -1666,7 +1666,7 @@ CheckKeyTypes(ClientPtr client,
             mapWire = (xkbKTSetMapEntryWireDesc *) &wire[1];
             preWire = (xkbModsWireDesc *) &mapWire[wire->nMapEntries];
             for (n = 0; n < wire->nMapEntries; n++) {
-                if (client->swapped) {
+                if (client->swapped && doswap) {
                     swaps(&mapWire[n].virtualMods);
                 }
                 if (mapWire[n].realMods & (~wire->realMods)) {
@@ -1684,7 +1684,7 @@ CheckKeyTypes(ClientPtr client,
                     return 0;
                 }
                 if (wire->preserve) {
-                    if (client->swapped) {
+                    if (client->swapped && doswap) {
                         swaps(&preWire[n].virtualMods);
                     }
                     if (preWire[n].realMods & (~mapWire[n].realMods)) {
@@ -1723,7 +1723,7 @@ CheckKeySyms(ClientPtr client,
              xkbSetMapReq * req,
              int nTypes,
              CARD8 *mapWidths,
-             CARD16 *symsPerKey, xkbSymMapWireDesc ** wireRtrn, int *errorRtrn)
+             CARD16 *symsPerKey, xkbSymMapWireDesc ** wireRtrn, int *errorRtrn, Bool doswap)
 {
     register unsigned i;
     XkbSymMapPtr map;
@@ -1737,7 +1737,7 @@ CheckKeySyms(ClientPtr client,
         KeySym *pSyms;
         register unsigned nG;
 
-        if (client->swapped) {
+        if (client->swapped && doswap) {
             swaps(&wire->nSyms);
         }
         nG = XkbNumGroups(wire->groupInfo);
@@ -2405,21 +2405,19 @@ _XkbSetMapCheckLength(xkbSetMapReq *req)
         keytype = (xkbKeyTypeWireDesc *)(req + 1);
         for (i = 0; i < req->nTypes; i++) {
             _add_check_len(XkbPaddedSize(sz_xkbKeyTypeWireDesc));
-            if (req->flags & XkbSetMapResizeTypes) {
-                _add_check_len(keytype->nMapEntries
-                               * sz_xkbKTSetMapEntryWireDesc);
-                preserve = keytype->preserve;
-                map_count = keytype->nMapEntries;
-                if (preserve) {
-                    _add_check_len(map_count * sz_xkbModsWireDesc);
-                }
-                keytype += 1;
-                keytype = (xkbKeyTypeWireDesc *)
-                          ((xkbKTSetMapEntryWireDesc *)keytype + map_count);
-                if (preserve)
-                    keytype = (xkbKeyTypeWireDesc *)
-                              ((xkbModsWireDesc *)keytype + map_count);
+            _add_check_len(keytype->nMapEntries
+                           * sz_xkbKTSetMapEntryWireDesc);
+            preserve = keytype->preserve;
+            map_count = keytype->nMapEntries;
+            if (preserve) {
+                _add_check_len(map_count * sz_xkbModsWireDesc);
             }
+            keytype += 1;
+            keytype = (xkbKeyTypeWireDesc *)
+                      ((xkbKTSetMapEntryWireDesc *)keytype + map_count);
+            if (preserve)
+                keytype = (xkbKeyTypeWireDesc *)
+                          ((xkbModsWireDesc *)keytype + map_count);
         }
     }
     /* syms */
@@ -2471,11 +2469,11 @@ bad:
 
 /**
  * Check if the given request can be applied to the given device but don't
- * actually do anything..
+ * actually do anything, except swap values when client->swapped and doswap are both true.
  */
 static int
 _XkbSetMapChecks(ClientPtr client, DeviceIntPtr dev, xkbSetMapReq * req,
-                 char *values)
+                 char *values, Bool doswap)
 {
     XkbSrvInfoPtr xkbi;
     XkbDescPtr xkb;
@@ -2513,14 +2511,15 @@ _XkbSetMapChecks(ClientPtr client, DeviceIntPtr dev, xkbSetMapReq * req,
         }
     }
 
-    if ((req->present & XkbKeyTypesMask) &&
-        (!CheckKeyTypes(client, xkb, req, (xkbKeyTypeWireDesc **) &values,
-                        &nTypes, mapWidths))) {
-        client->errorValue = nTypes;
-        return BadValue;
+    /* nTypes/mapWidths/symsPerKey must be filled for further tests below,
+     * regardless of client-side flags */
+
+    if (!CheckKeyTypes(client, xkb, req, (xkbKeyTypeWireDesc **) &values,
+		       &nTypes, mapWidths, doswap)) {
+	    client->errorValue = nTypes;
+	    return BadValue;
     }
 
-    /* symsPerKey/mapWidths must be filled regardless of client-side flags */
     map = &xkb->map->key_sym_map[xkb->min_key_code];
     for (i = xkb->min_key_code; i < xkb->max_key_code; i++, map++) {
         register int g, ng, w;
@@ -2529,7 +2528,7 @@ _XkbSetMapChecks(ClientPtr client, DeviceIntPtr dev, xkbSetMapReq * req,
         for (w = g = 0; g < ng; g++) {
             if (map->kt_index[g] >= (unsigned) nTypes) {
                 client->errorValue = _XkbErrCode4(0x13, i, g, map->kt_index[g]);
-                return 0;
+                return BadValue;
             }
             if (mapWidths[map->kt_index[g]] > w)
                 w = mapWidths[map->kt_index[g]];
@@ -2539,7 +2538,7 @@ _XkbSetMapChecks(ClientPtr client, DeviceIntPtr dev, xkbSetMapReq * req,
 
     if ((req->present & XkbKeySymsMask) &&
         (!CheckKeySyms(client, xkb, req, nTypes, mapWidths, symsPerKey,
-                       (xkbSymMapWireDesc **) &values, &error))) {
+                       (xkbSymMapWireDesc **) &values, &error, doswap))) {
         client->errorValue = error;
         return BadValue;
     }
@@ -2713,7 +2712,7 @@ _XkbSetMap(ClientPtr client, DeviceIntPtr dev, xkbSetMapReq * req, char *values)
 int
 ProcXkbSetMap(ClientPtr client)
 {
-    DeviceIntPtr dev;
+    DeviceIntPtr dev, master;
     char *tmp;
     int rc;
 
@@ -2736,12 +2735,12 @@ ProcXkbSetMap(ClientPtr client)
     /* Check if we can to the SetMap on the requested device. If this
        succeeds, do the same thing for all extension devices (if needed).
        If any of them fails, fail.  */
-    rc = _XkbSetMapChecks(client, dev, stuff, tmp);
+    rc = _XkbSetMapChecks(client, dev, stuff, tmp, TRUE);
 
     if (rc != Success)
         return rc;
 
-    DeviceIntPtr master = GetMaster(dev, MASTER_KEYBOARD);
+    master = GetMaster(dev, MASTER_KEYBOARD);
 
     if (stuff->deviceSpec == XkbUseCoreKbd) {
         DeviceIntPtr other;
@@ -2752,7 +2751,7 @@ ProcXkbSetMap(ClientPtr client)
                 rc = XaceHook(XACE_DEVICE_ACCESS, client, other,
                               DixManageAccess);
                 if (rc == Success) {
-                    rc = _XkbSetMapChecks(client, other, stuff, tmp);
+                    rc = _XkbSetMapChecks(client, other, stuff, tmp, FALSE);
                     if (rc != Success)
                         return rc;
                 }
@@ -2766,7 +2765,7 @@ ProcXkbSetMap(ClientPtr client)
                 (other != master || dev != master->lastSlave))
                 continue;
 
-            rc = _XkbSetMapChecks(client, other, stuff, tmp);
+            rc = _XkbSetMapChecks(client, other, stuff, tmp, FALSE);
             if (rc != Success)
                 return rc;
         }
@@ -5138,6 +5137,11 @@ _GetCountedString(char **wire_inout, ClientPtr client, char **str)
     CARD16 len;
 
     wire = *wire_inout;
+
+    if (client->req_len <
+        bytes_to_int32(wire + 2 - (char *) client->requestBuffer))
+        return BadValue;
+
     len = *(CARD16 *) wire;
     if (client->swapped) {
         swaps(&len);
@@ -5157,7 +5161,7 @@ _GetCountedString(char **wire_inout, ClientPtr client, char **str)
 }
 
 static Status
-_CheckSetDoodad(char **wire_inout,
+_CheckSetDoodad(char **wire_inout, xkbSetGeometryReq *req,
                 XkbGeometryPtr geom, XkbSectionPtr section, ClientPtr client)
 {
     char *wire;
@@ -5168,6 +5172,9 @@ _CheckSetDoodad(char **wire_inout,
     Status status;
 
     dWire = (xkbDoodadWireDesc *) (*wire_inout);
+    if (!_XkbCheckRequestBounds(client, req, dWire, dWire + 1))
+        return BadLength;
+
     any = dWire->any;
     wire = (char *) &dWire[1];
     if (client->swapped) {
@@ -5270,7 +5277,7 @@ _CheckSetDoodad(char **wire_inout,
 }
 
 static Status
-_CheckSetOverlay(char **wire_inout,
+_CheckSetOverlay(char **wire_inout, xkbSetGeometryReq *req,
                  XkbGeometryPtr geom, XkbSectionPtr section, ClientPtr client)
 {
     register int r;
@@ -5281,6 +5288,9 @@ _CheckSetOverlay(char **wire_inout,
 
     wire = *wire_inout;
     olWire = (xkbOverlayWireDesc *) wire;
+    if (!_XkbCheckRequestBounds(client, req, olWire, olWire + 1))
+        return BadLength;
+
     if (client->swapped) {
         swapl(&olWire->name);
     }
@@ -5292,6 +5302,9 @@ _CheckSetOverlay(char **wire_inout,
         xkbOverlayKeyWireDesc *kWire;
         XkbOverlayRowPtr row;
 
+        if (!_XkbCheckRequestBounds(client, req, rWire, rWire + 1))
+            return BadLength;
+
         if (rWire->rowUnder > section->num_rows) {
             client->errorValue = _XkbErrCode4(0x20, r, section->num_rows,
                                               rWire->rowUnder);
@@ -5300,6 +5313,9 @@ _CheckSetOverlay(char **wire_inout,
         row = XkbAddGeomOverlayRow(ol, rWire->rowUnder, rWire->nKeys);
         kWire = (xkbOverlayKeyWireDesc *) &rWire[1];
         for (k = 0; k < rWire->nKeys; k++, kWire++) {
+            if (!_XkbCheckRequestBounds(client, req, kWire, kWire + 1))
+                return BadLength;
+
             if (XkbAddGeomOverlayKey(ol, row,
                                      (char *) kWire->over,
                                      (char *) kWire->under) == NULL) {
@@ -5333,6 +5349,9 @@ _CheckSetSections(XkbGeometryPtr geom,
         register int r;
         xkbRowWireDesc *rWire;
 
+        if (!_XkbCheckRequestBounds(client, req, sWire, sWire + 1))
+            return BadLength;
+
         if (client->swapped) {
             swapl(&sWire->name);
             swaps(&sWire->top);
@@ -5358,6 +5377,9 @@ _CheckSetSections(XkbGeometryPtr geom,
             XkbRowPtr row;
             xkbKeyWireDesc *kWire;
 
+            if (!_XkbCheckRequestBounds(client, req, rWire, rWire + 1))
+                return BadLength;
+
             if (client->swapped) {
                 swaps(&rWire->top);
                 swaps(&rWire->left);
@@ -5369,16 +5391,19 @@ _CheckSetSections(XkbGeometryPtr geom,
             row->left = rWire->left;
             row->vertical = rWire->vertical;
             kWire = (xkbKeyWireDesc *) &rWire[1];
-            for (k = 0; k < rWire->nKeys; k++) {
+            for (k = 0; k < rWire->nKeys; k++, kWire++) {
                 XkbKeyPtr key;
 
+                if (!_XkbCheckRequestBounds(client, req, kWire, kWire + 1))
+                    return BadLength;
+
                 key = XkbAddGeomKey(row);
                 if (!key)
                     return BadAlloc;
-                memcpy(key->name.name, kWire[k].name, XkbKeyNameLength);
-                key->gap = kWire[k].gap;
-                key->shape_ndx = kWire[k].shapeNdx;
-                key->color_ndx = kWire[k].colorNdx;
+                memcpy(key->name.name, kWire->name, XkbKeyNameLength);
+                key->gap = kWire->gap;
+                key->shape_ndx = kWire->shapeNdx;
+                key->color_ndx = kWire->colorNdx;
                 if (key->shape_ndx >= geom->num_shapes) {
                     client->errorValue = _XkbErrCode3(0x10, key->shape_ndx,
                                                       geom->num_shapes);
@@ -5390,14 +5415,14 @@ _CheckSetSections(XkbGeometryPtr geom,
                     return BadMatch;
                 }
             }
-            rWire = (xkbRowWireDesc *) &kWire[rWire->nKeys];
+            rWire = (xkbRowWireDesc *)kWire;
         }
         wire = (char *) rWire;
         if (sWire->nDoodads > 0) {
             register int d;
 
             for (d = 0; d < sWire->nDoodads; d++) {
-                status = _CheckSetDoodad(&wire, geom, section, client);
+                status = _CheckSetDoodad(&wire, req, geom, section, client);
                 if (status != Success)
                     return status;
             }
@@ -5406,7 +5431,7 @@ _CheckSetSections(XkbGeometryPtr geom,
             register int o;
 
             for (o = 0; o < sWire->nOverlays; o++) {
-                status = _CheckSetOverlay(&wire, geom, section, client);
+                status = _CheckSetOverlay(&wire, req, geom, section, client);
                 if (status != Success)
                     return status;
             }
@@ -5440,6 +5465,9 @@ _CheckSetShapes(XkbGeometryPtr geom,
             xkbOutlineWireDesc *olWire;
             XkbOutlinePtr ol;
 
+            if (!_XkbCheckRequestBounds(client, req, shapeWire, shapeWire + 1))
+                return BadLength;
+
             shape =
                 XkbAddGeomShape(geom, shapeWire->name, shapeWire->nOutlines);
             if (!shape)
@@ -5450,21 +5478,27 @@ _CheckSetShapes(XkbGeometryPtr geom,
                 XkbPointPtr pt;
                 xkbPointWireDesc *ptWire;
 
+                if (!_XkbCheckRequestBounds(client, req, olWire, olWire + 1))
+                    return BadLength;
+
                 ol = XkbAddGeomOutline(shape, olWire->nPoints);
                 if (!ol)
                     return BadAlloc;
                 ol->corner_radius = olWire->cornerRadius;
                 ptWire = (xkbPointWireDesc *) &olWire[1];
-                for (p = 0, pt = ol->points; p < olWire->nPoints; p++, pt++) {
-                    pt->x = ptWire[p].x;
-                    pt->y = ptWire[p].y;
+                for (p = 0, pt = ol->points; p < olWire->nPoints; p++, pt++, ptWire++) {
+                    if (!_XkbCheckRequestBounds(client, req, ptWire, ptWire + 1))
+                        return BadLength;
+
+                    pt->x = ptWire->x;
+                    pt->y = ptWire->y;
                     if (client->swapped) {
                         swaps(&pt->x);
                         swaps(&pt->y);
                     }
                 }
                 ol->num_points = olWire->nPoints;
-                olWire = (xkbOutlineWireDesc *) (&ptWire[olWire->nPoints]);
+                olWire = (xkbOutlineWireDesc *)ptWire;
             }
             if (shapeWire->primaryNdx != XkbNoShape)
                 shape->primary = &shape->outlines[shapeWire->primaryNdx];
@@ -5561,12 +5595,15 @@ _CheckSetGeom(XkbGeometryPtr geom, xkbSetGeometryReq * req, ClientPtr client)
         return status;
 
     for (i = 0; i < req->nDoodads; i++) {
-        status = _CheckSetDoodad(&wire, geom, NULL, client);
+        status = _CheckSetDoodad(&wire, req, geom, NULL, client);
         if (status != Success)
             return status;
     }
 
     for (i = 0; i < req->nKeyAliases; i++) {
+        if (!_XkbCheckRequestBounds(client, req, wire, wire + XkbKeyNameLength))
+                return BadLength;
+
         if (XkbAddGeomKeyAlias(geom, &wire[XkbKeyNameLength], wire) == NULL)
             return BadAlloc;
         wire += 2 * XkbKeyNameLength;
@@ -5903,18 +5940,32 @@ ProcXkbGetKbdByName(ClientPtr client)
     xkb = dev->key->xkbInfo->desc;
     status = Success;
     str = (unsigned char *) &stuff[1];
-    if (GetComponentSpec(&str, TRUE, &status))  /* keymap, unsupported */
-        return BadMatch;
+    {
+        char *keymap = GetComponentSpec(&str, TRUE, &status);  /* keymap, unsupported */
+        if (keymap) {
+            free(keymap);
+            return BadMatch;
+        }
+    }
     names.keycodes = GetComponentSpec(&str, TRUE, &status);
     names.types = GetComponentSpec(&str, TRUE, &status);
     names.compat = GetComponentSpec(&str, TRUE, &status);
     names.symbols = GetComponentSpec(&str, TRUE, &status);
     names.geometry = GetComponentSpec(&str, TRUE, &status);
-    if (status != Success)
+    if (status == Success) {
+        len = str - ((unsigned char *) stuff);
+        if ((XkbPaddedSize(len) / 4) != stuff->length)
+            status = BadLength;
+    }
+
+    if (status != Success) {
+        free(names.keycodes);
+        free(names.types);
+        free(names.compat);
+        free(names.symbols);
+        free(names.geometry);
         return status;
-    len = str - ((unsigned char *) stuff);
-    if ((XkbPaddedSize(len) / 4) != stuff->length)
-        return BadLength;
+    }
 
     CHK_MASK_LEGAL(0x01, stuff->want, XkbGBN_AllComponentsMask);
     CHK_MASK_LEGAL(0x02, stuff->need, XkbGBN_AllComponentsMask);
@@ -6551,7 +6602,8 @@ ProcXkbGetDeviceInfo(ClientPtr client)
 static char *
 CheckSetDeviceIndicators(char *wire,
                          DeviceIntPtr dev,
-                         int num, int *status_rtrn, ClientPtr client)
+                         int num, int *status_rtrn, ClientPtr client,
+                         xkbSetDeviceInfoReq * stuff)
 {
     xkbDeviceLedsWireDesc *ledWire;
     int i;
@@ -6559,6 +6611,11 @@ CheckSetDeviceIndicators(char *wire,
 
     ledWire = (xkbDeviceLedsWireDesc *) wire;
     for (i = 0; i < num; i++) {
+        if (!_XkbCheckRequestBounds(client, stuff, ledWire, ledWire + 1)) {
+            *status_rtrn = BadLength;
+            return (char *) ledWire;
+        }
+
         if (client->swapped) {
             swaps(&ledWire->ledClass);
             swaps(&ledWire->ledID);
@@ -6586,6 +6643,11 @@ CheckSetDeviceIndicators(char *wire,
             atomWire = (CARD32 *) &ledWire[1];
             if (nNames > 0) {
                 for (n = 0; n < nNames; n++) {
+                    if (!_XkbCheckRequestBounds(client, stuff, atomWire, atomWire + 1)) {
+                        *status_rtrn = BadLength;
+                        return (char *) atomWire;
+                    }
+
                     if (client->swapped) {
                         swapl(atomWire);
                     }
@@ -6597,6 +6659,10 @@ CheckSetDeviceIndicators(char *wire,
             mapWire = (xkbIndicatorMapWireDesc *) atomWire;
             if (nMaps > 0) {
                 for (n = 0; n < nMaps; n++) {
+                    if (!_XkbCheckRequestBounds(client, stuff, mapWire, mapWire + 1)) {
+                        *status_rtrn = BadLength;
+                        return (char *) mapWire;
+                    }
                     if (client->swapped) {
                         swaps(&mapWire->virtualMods);
                         swapl(&mapWire->ctrls);
@@ -6648,11 +6714,6 @@ SetDeviceIndicators(char *wire,
         xkbIndicatorMapWireDesc *mapWire;
         XkbSrvLedInfoPtr sli;
 
-        if (!_XkbCheckRequestBounds(client, stuff, ledWire, ledWire + 1)) {
-            *status_rtrn = BadLength;
-            return (char *) ledWire;
-        }
-
         namec = mapc = statec = 0;
         sli = XkbFindSrvLedInfo(dev, ledWire->ledClass, ledWire->ledID,
                                 XkbXI_IndicatorMapsMask);
@@ -6671,10 +6732,6 @@ SetDeviceIndicators(char *wire,
             memset((char *) sli->names, 0, XkbNumIndicators * sizeof(Atom));
             for (n = 0, bit = 1; n < XkbNumIndicators; n++, bit <<= 1) {
                 if (ledWire->namesPresent & bit) {
-                    if (!_XkbCheckRequestBounds(client, stuff, atomWire, atomWire + 1)) {
-                        *status_rtrn = BadLength;
-                        return (char *) atomWire;
-                    }
                     sli->names[n] = (Atom) *atomWire;
                     if (sli->names[n] == None)
                         ledWire->namesPresent &= ~bit;
@@ -6692,10 +6749,6 @@ SetDeviceIndicators(char *wire,
         if (ledWire->mapsPresent) {
             for (n = 0, bit = 1; n < XkbNumIndicators; n++, bit <<= 1) {
                 if (ledWire->mapsPresent & bit) {
-                    if (!_XkbCheckRequestBounds(client, stuff, mapWire, mapWire + 1)) {
-                        *status_rtrn = BadLength;
-                        return (char *) mapWire;
-                    }
                     sli->maps[n].flags = mapWire->flags;
                     sli->maps[n].which_groups = mapWire->whichGroups;
                     sli->maps[n].groups = mapWire->groups;
@@ -6731,13 +6784,17 @@ SetDeviceIndicators(char *wire,
 }
 
 static int
-_XkbSetDeviceInfo(ClientPtr client, DeviceIntPtr dev,
+_XkbSetDeviceInfoCheck(ClientPtr client, DeviceIntPtr dev,
                   xkbSetDeviceInfoReq * stuff)
 {
     char *wire;
 
     wire = (char *) &stuff[1];
     if (stuff->change & XkbXI_ButtonActionsMask) {
+        int sz = stuff->nBtns * SIZEOF(xkbActionWireDesc);
+        if (!_XkbCheckRequestBounds(client, stuff, wire, (char *) wire + sz))
+            return BadLength;
+
         if (!dev->button) {
             client->errorValue = _XkbErrCode2(XkbErr_BadClass, ButtonClass);
             return XkbKeyboardErrorCode;
@@ -6748,13 +6805,13 @@ _XkbSetDeviceInfo(ClientPtr client, DeviceIntPtr dev,
                              dev->button->numButtons);
             return BadMatch;
         }
-        wire += (stuff->nBtns * SIZEOF(xkbActionWireDesc));
+        wire += sz;
     }
     if (stuff->change & XkbXI_IndicatorsMask) {
         int status = Success;
 
         wire = CheckSetDeviceIndicators(wire, dev, stuff->nDeviceLedFBs,
-                                        &status, client);
+                                        &status, client, stuff);
         if (status != Success)
             return status;
     }
@@ -6765,8 +6822,8 @@ _XkbSetDeviceInfo(ClientPtr client, DeviceIntPtr dev,
 }
 
 static int
-_XkbSetDeviceInfoCheck(ClientPtr client, DeviceIntPtr dev,
-                       xkbSetDeviceInfoReq * stuff)
+_XkbSetDeviceInfo(ClientPtr client, DeviceIntPtr dev,
+                  xkbSetDeviceInfoReq * stuff)
 {
     char *wire;
     xkbExtensionDeviceNotify ed;
@@ -6790,8 +6847,6 @@ _XkbSetDeviceInfoCheck(ClientPtr client, DeviceIntPtr dev,
         if (stuff->firstBtn + stuff->nBtns > nBtns)
             return BadValue;
         sz = stuff->nBtns * SIZEOF(xkbActionWireDesc);
-        if (!_XkbCheckRequestBounds(client, stuff, wire, (char *) wire + sz))
-            return BadLength;
         memcpy((char *) &acts[stuff->firstBtn], (char *) wire, sz);
         wire += sz;
         ed.reason |= XkbXI_ButtonActionsMask;
diff --git a/xkb/xkbActions.c b/xkb/xkbActions.c
index 2ffd3fa..db29091 100644
--- a/xkb/xkbActions.c
+++ b/xkb/xkbActions.c
@@ -43,6 +43,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #include "mi.h"
 #include "mipointer.h"
 #include "inpututils.h"
+#include "dixgrabs.h"
 #define EXTENSION_EVENT_BASE 64
 
 DevPrivateKeyRec xkbDevicePrivateKeyRec;
@@ -992,6 +993,45 @@ _XkbFilterSwitchScreen(XkbSrvInfoPtr xkbi,
     return 1;
 }
 
+static int
+XkbHandlePrivate(DeviceIntPtr dev, KeyCode keycode, XkbAction *pAction)
+{
+    XkbAnyAction *xkb_act = &(pAction->any);
+
+    if (xkb_act->type == XkbSA_XFree86Private) {
+        char msgbuf[XkbAnyActionDataSize + 1];
+
+        memcpy(msgbuf, xkb_act->data, XkbAnyActionDataSize);
+        msgbuf[XkbAnyActionDataSize] = '\0';
+
+        if (strcasecmp(msgbuf, "prgrbs") == 0) {
+            DeviceIntPtr tmp;
+
+            LogMessage(X_INFO, "Printing all currently active device grabs:\n");
+            for (tmp = inputInfo.devices; tmp; tmp = tmp->next)
+                if (tmp->deviceGrab.grab)
+                    PrintDeviceGrabInfo(tmp);
+            LogMessage(X_INFO, "End list of active device grabs\n");
+
+            PrintPassiveGrabs();
+        }
+        else if (strcasecmp(msgbuf, "ungrab") == 0) {
+            LogMessage(X_INFO, "Ungrabbing devices\n");
+            UngrabAllDevices(FALSE);
+        }
+        else if (strcasecmp(msgbuf, "clsgrb") == 0) {
+            LogMessage(X_INFO, "Clear grabs\n");
+            UngrabAllDevices(TRUE);
+        }
+        else if (strcasecmp(msgbuf, "prwins") == 0) {
+            LogMessage(X_INFO, "Printing window tree\n");
+            PrintWindowTree();
+        }
+    }
+
+    return XkbDDXPrivate(dev, keycode, pAction);
+}
+
 static int
 _XkbFilterXF86Private(XkbSrvInfoPtr xkbi,
                       XkbFilterPtr filter, unsigned keycode, XkbAction *pAction)
@@ -1006,7 +1046,7 @@ _XkbFilterXF86Private(XkbSrvInfoPtr xkbi,
         filter->active = 1;
         filter->filterOthers = 0;
         filter->filter = _XkbFilterXF86Private;
-        XkbDDXPrivate(dev, keycode, pAction);
+        XkbHandlePrivate(dev, keycode, pAction);
         return 0;
     }
     else if (filter->keycode == keycode) {
diff --git a/xkb/xkbInit.c b/xkb/xkbInit.c
index 9e45b4b..4108e1b 100644
--- a/xkb/xkbInit.c
+++ b/xkb/xkbInit.c
@@ -142,7 +142,7 @@ XkbFreeRMLVOSet(XkbRMLVOSet * rmlvo, Bool freeRMLVO)
 }
 
 static Bool
-XkbWriteRulesProp(ClientPtr client, void *closure)
+XkbWriteRulesProp(void)
 {
     int len, out;
     Atom name;
@@ -235,7 +235,7 @@ XkbSetRulesUsed(XkbRMLVOSet * rmlvo)
     free(XkbOptionsUsed);
     XkbOptionsUsed = (rmlvo->options ? Xstrdup(rmlvo->options) : NULL);
     if (XkbWantRulesProp)
-        QueueWorkProc(XkbWriteRulesProp, NULL, NULL);
+        XkbWriteRulesProp();
     return;
 }
 
diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c
index 8975ade..9bc51fc 100644
--- a/xkb/xkbUtils.c
+++ b/xkb/xkbUtils.c
@@ -1327,6 +1327,7 @@ _XkbCopyNames(XkbDescPtr src, XkbDescPtr dst)
         }
         else {
             free(dst->names->radio_groups);
+            dst->names->radio_groups = NULL;
         }
         dst->names->num_rg = src->names->num_rg;
 
diff --git a/xkb/xkbtext.c b/xkb/xkbtext.c
index d2a2567..00a26c5 100644
--- a/xkb/xkbtext.c
+++ b/xkb/xkbtext.c
@@ -870,6 +870,7 @@ CopyISOLockArgs(XkbDescPtr xkb, XkbAction *action, char *buf, int *sz)
     XkbISOAction *act;
     char tbuf[64];
 
+    memset(tbuf, 0, sizeof(tbuf));
     act = &action->iso;
     if (act->flags & XkbSA_ISODfltIsGroup) {
         TryCopyStr(tbuf, "group=", sz);
diff --git a/xkb/xkmread.c b/xkb/xkmread.c
index 1666e32..842887c 100644
--- a/xkb/xkmread.c
+++ b/xkb/xkmread.c
@@ -532,7 +532,7 @@ ReadXkmCompatMap(FILE * file, XkbDescPtr xkb, XkbChangesPtr changes)
             act->devval.v1_value = wire.actionData[3];
             act->devval.v2_what = wire.actionData[4];
             act->devval.v2_ndx = wire.actionData[5];
-            act->devval.v2_what = wire.actionData[6];
+            act->devval.v2_value = wire.actionData[6];
             break;
 
         case XkbSA_XFree86Private:
diff --git a/xorg-server.m4 b/xorg-server.m4
index 18255b9..195bda5 100644
--- a/xorg-server.m4
+++ b/xorg-server.m4
@@ -31,7 +31,7 @@ dnl
 AC_DEFUN([XORG_DRIVER_CHECK_EXT],[
 	AC_REQUIRE([PKG_PROG_PKG_CONFIG])
 	SAVE_CFLAGS="$CFLAGS"
-	CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`"
+	CFLAGS="$CFLAGS `$PKG_CONFIG --cflags xorg-server`"
 	AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 #include "xorg-server.h"
 #if !defined $1
diff --git a/ylwrap b/ylwrap
index d153336..e8ec109 100755
--- a/ylwrap
+++ b/ylwrap
@@ -3,7 +3,7 @@
 
 scriptversion=2018-03-07.03; # UTC
 
-# Copyright (C) 1996-2020 Free Software Foundation, Inc.
+# Copyright (C) 1996-2021 Free Software Foundation, Inc.
 #
 # Written by Tom Tromey <tromey@cygnus.com>.
 #
-- 
GitLab