=== added file '.dir-locals.el'
--- .dir-locals.el	1970-01-01 00:00:00 +0000
+++ .dir-locals.el	2014-07-01 14:18:40 +0000
@@ -0,0 +1,1 @@
+((c-mode . ((c-basic-offset . 4) (indent-tabs-mode . nil))))
\ No newline at end of file

=== modified file 'COPYING'
--- COPYING	2013-08-14 10:52:17 +0000
+++ COPYING	2014-07-01 14:18:40 +0000
@@ -20,6 +20,7 @@
 Copyright © 2007-2009 Red Hat, Inc.
 Copyright © 2005-2008 Daniel Stone
 Copyright © 2006-2009 Simon Thum
+Copyright © 2003-2008, 2013 Geert Uytterhoeven
 Copyright © 2006 Luc Verhaegen
 
 Permission is hereby granted, free of charge, to any person obtaining a

=== modified file 'ChangeLog'
--- ChangeLog	2013-08-14 10:52:17 +0000
+++ ChangeLog	2014-07-01 14:18:40 +0000
@@ -1,54 +1,5548 @@
-commit bc41226f7741098e55a3b0df924986991576d50a
-Merge: 4ebd618 2cd62dc
-Author: Matt Dew <marcoz@osource.org>
-Date:   Thu Jul 25 22:56:24 2013 -0600
-
-    Merge branch 'server-1.14-touch-fixes' of git://people.freedesktop.org/~whot/xserver into server-1.14-branch
-
-commit 4ebd618bc5ef71507e708e7191091828eca3a7e8
-Author: Matt Dew <marcoz@osource.org>
-Date:   Thu Jul 25 22:24:00 2013 -0600
-
-    Bah, bad rev number. Fixed:  changed 1.14.3-rc1 to 1.14.2.901
-
-commit fef66ffe7a7e899a9126a1e431b94d881163b00d
-Author: Matt Dew <marcoz@osource.org>
-Date:   Thu Jul 25 22:02:26 2013 -0600
-
-    bump rev from 1.14.2 to 1.14.3-rc1
-
-commit 2cd62dc02b67c70d2417b2ccd307ead9596a2967
-Author: Peter Hutterer <peter.hutterer@who-t.net>
-Date:   Fri Mar 1 08:43:58 2013 +1000
-
-    Xi: return !Success from DeliverTouchEmulatedEvent if we didn't deliver
-    
-    All callers currently ignore the new value, so this patch has no effect.
-    Inverse call graph:
-    
-    DeliverTouchEmulatedEvent
-            DeliverEmulatedMotionEvent              Ignores value
-            DeliverTouchBeginEvent
-                    DeliverTouchEvent
-                            DeliverTouchEvents      Ignores value
-            DeliverTouchEndEvent
-                    DeliverTouchEvent
-                            DeliverTouchEvents      Ignores value
-    
-    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-    Reviewed-by: Keith Packard <keithp@keithp.com>
-    (cherry picked from commit 9978b57b8d94f061d72a67b99a02b0ba16a11429)
-
-commit c203568905bcbb65fb1e079b626d2c1e90ecb72d
-Author: Peter Hutterer <peter.hutterer@who-t.net>
-Date:   Mon May 13 15:22:12 2013 +1000
-
-    Xi: fix warning - remove unused 'rc'
-    
-    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-    (cherry picked from commit fd5ea0237db6d725a48f76b706135df9d3246b82)
-
-commit 93f063c40dc4b339ae9114551071c57b52d98dba
+commit 9182af8a09c326bb4b01d3645fb2936e93f02242
+Author: Matt Dew <marcoz@osource.org>
+Date:   Sun Apr 13 20:55:40 2014 -0600
+
+    Bump version to 1.15.1
+
+commit eec04d76a39a7334de4e00ef9f0f6e44c92b3d91
+Author: Eric Anholt <eric@anholt.net>
+Date:   Thu Mar 6 18:50:07 2014 -0800
+
+    glx: Clear new FBConfig attributes to 0 by default.
+    
+    The visualSelectGroup wasn't getting set (since our DRI drivers don't
+    use it), and and since it's the top priority in the sort order, you
+    got random sorting of your visuals unless malloc really returned you
+    new memory.  This manifested as Xephyr -glamor rendering to a
+    multisampled window on my system, which as you might guess was
+    slightly lower performance than expected.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
+
+commit d6268c25a8d33241d817977a84f127f8ef0cb9ee
+Author: Julien Cristau <jcristau@debian.org>
+Date:   Wed Mar 26 23:24:20 2014 +0100
+
+    Xephyr: restore initial window resize lost in xcb conversion
+    
+    The XResizeWindow call wasn't replaced by the xcb equivalent, so we
+    were no longer setting the initial window size, only wm size hints.
+    
+    Regression from commit a2b73da "Xephyr: start converting hostx.c over to
+    xcb"
+    
+    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74849
+    
+    Signed-off-by: Julien Cristau <jcristau@debian.org>
+    Reported-by: Laércio de Sousa <lbsousajr@gmail.com>
+    Tested-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+    Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 300458fb8ad0a7957e941cd65f47d204c7886e22
+Author: Matt Dew <marcoz@osource.org>
+Date:   Fri Mar 21 23:49:41 2014 -0600
+
+    Bump bersion to 1.15.0.901
+
+commit c971864565eb114e4b34f17b0d2244e8e6e1e005
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Wed Feb 26 07:54:56 2014 +1000
+
+    config: search for PnPID on all parents (#75513)
+    
+    The PnPID for a device may not be on the immediate parent, so search up the
+    device tree until we find one.
+    
+    X.Org Bug 75513 <http://bugs.freedesktop.org/show_bug.cgi?id=75513>
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Tested-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
+    (cherry picked from commit 795066477ee81b5b82e490eac8bed6b656d01f17)
+
+commit 2cbbe80efc485d2d05b06efe1e2e01f81f3e06f6
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Thu Feb 20 13:18:05 2014 +1000
+
+    Xi: check for invalid modifiers for XI2 passive grabs
+    
+    The other values are checked correctly, but if a modifier was outside the
+    allowed range, it would go unnoticed and cause a out-of-bounds read error for
+    any mask equal or larger than 256. The DetailRec where we store the grab masks
+    is only sized to 8 * sizeof(Mask).
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    (cherry picked from commit 0f10cfd4b903d4db293ec47c8a9a0d8b33965803)
+
+commit b3656c0b52d57333c64f932676a237d0f3a97f36
+Author: Mark Kettenis <kettenis@openbsd.org>
+Date:   Sun Dec 15 14:31:10 2013 +0100
+
+    sync: Avoid ridiculously long timeouts
+    
+    On OpenBSD, passing a timeout longer than 100000000 seconds to select(2) will
+    make it fail with EINVAL.  As this is original 4.4BSD behaviour it is not
+    inconceivable that other systems suffer from the same problem.  And Linux,
+    though not suffering from any 4.4BSD heritage, briefly did something similar:
+    
+    <https://lkml.org/lkml/2012/8/31/263>
+    
+    So avoid calling AdjustWaitForDelay() instead of setting the timeout to
+    (effectively) ULONG_MAX milliseconds.
+    
+    Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
+    Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
+    (cherry picked from commit ddeca927498c9df3b5e62c7bf05e31e2a3aeaa52)
+
+commit b332cd20ee14049606e3656490d13a8efa6b23ee
+Merge: f41ab8c 5e0432f
+Author: Matt Dew <marcoz@osource.org>
+Date:   Thu Mar 6 22:03:03 2014 -0700
+
+    Merge branch 'server-1.15-branch' of git://people.freedesktop.org/~jeremyhu/xserver into server-1.15-branch
+
+commit f41ab8c60780ea8f87354e536e5b73cb23878eb7
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Fri Jan 24 18:32:54 2014 +1000
+
+    dix: prevent a driver from initializing or submitting buttons > MAX_BUTTONS
+    
+    The server internally relies on arrays with a MAX_BUTTONS maximum size (which
+    is the max the core protocol can transport). Make sure a driver adheres to
+    that.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Daniel Stone <daniel@fooishbar.org>
+    (cherry picked from commit 87ca80a7196949597113225405f3e4ee03bbee13)
+
+commit 4447d71b9a74afe91aaf4cc01eae12a44ef09306
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Tue Jan 28 20:27:51 2014 -0800
+
+    xf86DeleteScreen: move check for NULL pScrn before first dereference
+    
+    Flagged by cppcheck 1.62:
+    [hw/xfree86/common/xf86Helper.c:220] -> [hw/xfree86/common/xf86Helper.c:231]:
+     (warning) Possible null pointer dereference: pScrn - otherwise it is
+     redundant to check it against null.
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    (cherry picked from commit c1ac89c793614797e08d3d8e7fc9ba55be899130)
+
+commit 2ac840a14958fe74170518ee2c3a6b2dd88b20bd
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Tue Jan 28 20:27:50 2014 -0800
+
+    On realloc failure, free font_path_string instead of leaking it
+    
+    Flagged by cppcheck 1.62:
+    [dix/dixfonts.c:1792]: (error) Common realloc mistake:
+     'font_path_string' nulled but not freed upon failure
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    (cherry picked from commit e6733ae91b7be52930f22a87de15fa05819ef948)
+
+commit 157cc02fc13c998bba70e1652907972015e15e8e
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Fri Jan 24 23:42:49 2014 -0800
+
+    Check for calloc() failure in add_master()
+    
+    Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    (cherry picked from commit 9fc19168e7ca6308275bf8769d1ccb982f88465b)
+
+commit f11c5938d732af717aeebbbf3b356138f3411bb7
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Fri Jan 24 16:51:02 2014 +1000
+
+    Xi: fix modifier offset in XIPassiveGrab swapping function
+    
+    The request is followed by mask_len 4-byte units, then followed by the actual
+    modifiers.
+    
+    Also fix up the swapping test, which had the same issue.
+    
+    Reported-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    (cherry picked from commit 76b3be75b62657e346731444736f7e4d200beb5b)
+    
+    Conflicts:
+    	test/xi2/protocol-xipassivegrabdevice.c
+
+commit 345b7ead1dd262020e10b4aeb71044d46d16e134
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Mon Jan 13 17:00:23 2014 +1000
+
+    os: restrict display names to digits
+    
+    We call atoi() on the server's display to get the socket but otherwise use the
+    unmodified display for log file name, xkb paths, etc. This results in
+    Xorg :banana being the equivalent of Xorg :0, except for the log files being
+    in /var/log/Xorg.banana.log. I'm not sure there's a good use-case for this
+    behaviour.
+    
+    Check the display for something that looks reasonable, i.e. digits only, but
+    do allow for :0.0 (i.e. digits, followed by a period, followed by one or two
+    digits).
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+    (cherry picked from commit 71baa466b1f6b02fe503f9a3089b7b9d61aa0f80)
+
+commit 940d6a8e9d3544696654d5e68c615ab887f81945
+Author: Carlos Garnacho <carlosg@gnome.org>
+Date:   Thu Jan 2 21:33:30 2014 +0100
+
+    Xi: Ensure DeviceChanged is emitted after grabs are deactivated
+    
+    When a grab on a slave device is deactivated, the master device must
+    be checked, just in case there were events from other devices while
+    the slave device was stolen away by the passive grab. This may
+    introduce misbehaviors on mismatching valuators and device features
+    later on UpdateDeviceState().
+    
+    Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    (cherry picked from commit b2d5ee2e3684951b611fd2068d57cc65fd8305a3)
+
+commit 47da6e3f47a55aeeef2c849067dd2d09fc2fe481
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Fri Jan 24 18:16:54 2014 +1000
+
+    dix: fix button state check before changing a button mapping
+    
+    dev->button->down is a bitmask, not a normal array. Use the helper function to
+    check, we technically allow the mapping to change after the physical button
+    has been pressed (but not yet processed yet), so only check BUTTON_PROCESSED.
+    
+    From XSetPointerMapping(3):
+    "If any of the buttons to be altered are logically in the down state,
+    XSetPointerMapping returns MappingBusy, and the mapping is not changed."
+    
+    Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Daniel Stone <daniel@fooishbar.org>
+    (cherry picked from commit 25d10464f440b8b34594b7c988a99a830ea39a29)
+
+commit 5e0432f797d58fe1a69ef538694f65bbba38737f
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Wed Jan 1 11:10:41 2014 -0800
+
+    XQuartz: Avoid passing uninitialized pointers to X11ApplicationSetWindowMenu in AppleWMSetWindowMenu
+    
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+    (cherry picked from commit 77df653ae3d8448be21221711851acde12c6bc1a)
+
+commit 859ced56d9ee168796c2fcf7fa6056e0c1491f3a
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Wed Jan 1 11:04:07 2014 -0800
+
+    XQuartz: Check for allocated memory before using it in AppleWMSetWindowMenu
+    
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+    (cherry picked from commit 3bc608a361a01043b226fb9aaebf88f6fd852925)
+
+commit 9444955d16f85926c75ee8eafb0ca796dcf16439
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Wed Jan 1 11:00:40 2014 -0800
+
+    XQuartz: Silence a clang static analysis warning about a memory leak
+    
+    It seems the alanyzer can't comprehend dixSetPrivate().
+    
+    quartz.c:119:12: warning: Potential leak of memory pointed to by 'displayInfo'
+        return quartzProcs->AddScreen(index, pScreen);
+               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+    (cherry picked from commit 64327226ddfba8f0653615cd678d2d4336fb993d)
+
+commit 64b0669d1c062e7e11fb0e3b8ea7fe56113fc86f
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Wed Jan 1 10:55:10 2014 -0800
+
+    XQuartz: Silence a clang static analysis warning about a possible memory leak on exit
+    
+    stub.c:356:9: warning: Potential leak of memory pointed to by 'newargv'
+            asl_log(aslc, NULL, ASL_LEVEL_ERR,
+            ^~~~~~~
+    stub.c:356:9: warning: Potential leak of memory pointed to by 'newenvp'
+            asl_log(aslc, NULL, ASL_LEVEL_ERR,
+            ^~~~~~~
+    2 warnings generated.
+    
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+    (cherry picked from commit b2f6b3497c33a4897afae80a2cf69c596b9f81e8)
+
+commit 472e8e5d1c26573cef4bd42451230ef47791ed6f
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Wed Jan 1 10:47:52 2014 -0800
+
+    XQuartz: Validate length in appledri before swapping
+    
+    Avoids potential memory corruption from bad requests
+    
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+    (cherry picked from commit a03f096a85537d9e881cedaa6cb71aca43a97086)
+
+commit 782fe5c174def75a9e4cb188c00c2fec72821472
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Wed Jan 1 10:39:56 2014 -0800
+
+    XQuartz: Validate screen in AppleDRIQueryDirectRenderingCapable requests
+    
+    Return an error to the caller rather than crashing the server on
+    invalid screens.
+    
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+    (cherry picked from commit b3572c0d1ab7888ac26d6b2b8be6d1d19ed9af3f)
+
+commit 045122566c0532378b50c1af3ffec3254e416fe2
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Sun Dec 29 12:45:23 2013 -0800
+
+    XQuartz: Simplify hook_run to quiet static analyzer
+    
+    x-hook.c:96:9: warning: Called function pointer is an uninitalized pointer value
+            (*fun[i])(arg, data[i]);
+            ^~~~~~~~~~~~~~~~~~~~~~~
+    1 warning generated.
+    
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+    (cherry picked from commit 959e8f23af7850fcaf40d6c67f5228241a36a9ab)
+
+commit 33b2ae0f3b4a80fd962d876f7437d98fcfc27791
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Sun Dec 29 12:41:18 2013 -0800
+
+    XQuartz: Mark applicationWillTerminate: noreturn
+    
+    X11Controller.m:938:1: warning: method 'applicationWillTerminate:' could be declared with attribute 'noreturn'
+          [-Wmissing-noreturn,Semantic Issue]
+    {
+    ^
+    
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+    (cherry picked from commit f79af1941776fd6f1ec26c50603fcc35ca7d514b)
+
+commit 404f26866147be1c26585e59d9795e87e0c3e5fa
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Sun Dec 29 12:36:51 2013 -0800
+
+    XQuartz: Fix get_proc_address signature
+    
+    indirect.c:675:28: warning: incompatible pointer types passing 'glx_gpa_proc (*)(const char *)' to parameter of type
+          'glx_gpa_proc' (aka 'glx_func_ptr (*)(const char *)') [-Wincompatible-pointer-types,Semantic Issue]
+        __glXsetGetProcAddress(&get_proc_address);
+                               ^~~~~~~~~~~~~~~~~
+    ../../../glx/glxserver.h:122:42: note: passing argument to parameter 'get_proc_address' here [Semantic Issue]
+    void __glXsetGetProcAddress(glx_gpa_proc get_proc_address);
+                                             ^
+    
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+    (cherry picked from commit ea80279e292e59a9fe9651489f03e9f2f39810d9)
+
+commit 7803c4075b824ece79af0425cee736025c41d901
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Sun Dec 29 12:31:23 2013 -0800
+
+    XQuartz: Fix darwinfb.h header guard
+    
+    ./darwinfb.h:28:9: warning: '_DARWIN_FB_H' is used as a header guard here, followed by #define of a different macro
+          [-Wheader-guard,Lexical or Preprocessor Issue]
+            ^~~~~~~~~~~~
+    ./darwinfb.h:29:9: note: '_DARWIN_DB_H' is defined here; did you mean '_DARWIN_FB_H'? [Lexical or Preprocessor Issue]
+            ^~~~~~~~~~~~
+            _DARWIN_FB_H
+    
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+    (cherry picked from commit 2e3ebec9520719a8e5c3c92390e83bcb5216f978)
+
+commit 6c055f0d78349ff08a570c5dcc92c6f7b6924993
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Sun Dec 29 12:22:55 2013 -0800
+
+    XQuartz: Silence some static analyzer warnings by annotating referencing counts
+    
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+    (cherry picked from commit 9da6c0918f40359f28fe8889d5b7cae7efcc8377)
+
+commit 2ea973e12f5d954211e1d10085a4c74581b43aca
+Author: Keith Packard <keithp@keithp.com>
+Date:   Fri Dec 27 09:50:55 2013 -0800
+
+    Bump version to 1.15.0
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 2eb9915eea358f941702d3dad7434197991885c5
+Author: Keith Packard <keithp@keithp.com>
+Date:   Thu Dec 12 15:48:08 2013 -0800
+
+    present: Set complete notify mode to Skip as needed
+    
+    Skipped present pixmap calls were not setting the mode to
+    PresentCompleteModeSkip for skipped operations.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit e487babd525ef1bd016ec7b283fa08cf9e6c6f4f
+Author: Keith Packard <keithp@keithp.com>
+Date:   Thu Dec 12 14:52:35 2013 -0800
+
+    present: Don't abandon presents which are already queued for flip
+    
+    Presents which are not marked 'queued' and are in the window present
+    list are waiting for the flip event; discarding those won't work very
+    well (it'll end up trashing displayed content for the next frame), so
+    skip over those when looking for duplicate frame presents
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit ca3a5b2a8f9f627bbaa9883e16512a21c2a0b81d
+Author: Keith Packard <keithp@keithp.com>
+Date:   Thu Dec 12 14:17:40 2013 -0800
+
+    present: Handle PresentOptionAsync for copy mode
+    
+    Check for Async flag and execute immediately if set, otherwise wait
+    for the next appropriate vblank before copying.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit a68df147421da21528b5be2d34678383922fa352
+Author: Keith Packard <keithp@keithp.com>
+Date:   Thu Dec 19 14:31:07 2013 -0800
+
+    Bump version to 1.14.99.905 (1.15 RC5)
+    
+    Another week, another RC. This should be the last before 1.15 final
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 4b1ead9d3400acc3402c2480d7cc0527750c32f0
+Merge: 4d62646 929795d
+Author: Keith Packard <keithp@keithp.com>
+Date:   Thu Dec 19 14:14:59 2013 -0800
+
+    Merge remote-tracking branch 'whot/for-keith'
+
+commit 4d62646142718024b0981eb4f1fd0131e829161f
+Merge: f4bfb14 81ba89d
+Author: Keith Packard <keithp@keithp.com>
+Date:   Mon Dec 16 09:27:57 2013 -0800
+
+    Merge remote-tracking branch 'jeremyhu/master'
+
+commit f4bfb14f53a939574da1f5995f0dad949898b86a
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Thu Dec 12 10:57:40 2013 -0500
+
+    configure: Fix a typo near dri3/shmfence detection
+    
+    " is not the mate of ].
+    
+    Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit 8248b4af31ef71ac03158871b77f20eb456dbe38
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Fri Dec 13 15:07:48 2013 -0500
+
+    glx: Add null pointer protection to __glGetProcAddress
+    
+    This can't happen when GLX is the backing window system, but can
+    elsewhere.  We may as well protect against it at a high level.
+    
+    Reviewed-by: Eric Anholt <eric@anholt.net>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit 128449dd6498a2f74c3770f89a9dae0f70e2b351
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Fri Dec 13 11:39:16 2013 -0500
+
+    present: Don't use the major/minor version from the protocol headers
+    
+    We want to advertise the version we implement, not the version the
+    protocol headers happen to describe.
+    
+    Reviewed-by: Jasper St. Pierre <<jstpierre@mecheye.net>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit ec6087bf070131bc3a26848fb9fb840f09b0e19d
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Fri Dec 13 11:36:38 2013 -0500
+
+    dri3: Don't use the major/minor version from the protocol headers
+    
+    We want to advertise the version we implement, not the version the
+    protocol headers happen to describe.
+    
+    Reviewed-by: Jasper St. Pierre <<jstpierre@mecheye.net>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit e6fafd3de70d315130fb6e5732cfd02a5901b788
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Fri Dec 13 11:28:59 2013 -0500
+
+    dri3: Guard against buggy clients
+    
+    There's nothing to stop a client from sending these requests to screens
+    without DRI3 support, and if they do, we'll crash.  Let's not do that.
+    
+    Reviewed-by: Jasper St. Pierre <<jstpierre@mecheye.net>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit 81ba89d6703a22178a153aa39478ba2d4bde262b
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Fri Dec 13 01:39:44 2013 -0800
+
+    configure.ac: Add PRESENT_LIB to XQUARTZ_LIBS
+    
+    Undefined symbols for architecture x86_64:
+      "_present_extension_init", referenced from:
+          _staticExtensions in libXquartz.a(miinitext.o)
+      "_present_register_complete_notify", referenced from:
+          ___glXregisterPresentCompleteNotify in libglx.a(glxcmds.o)
+    
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+
+commit d7c9235ee261b0f780320985233e00dec5e2689c
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Sat Dec 7 01:36:33 2013 -0800
+
+    XQuartz: Use asl_log_descriptor to log stdout/stderr of child processes
+    
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+
+commit ad8111d7c971ce448905c733d65ba0cfc72bdca4
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Sat Dec 7 01:14:37 2013 -0800
+
+    darwin: Don't leave stdin/stdout closed
+    
+    <rdar://problem/15609419>
+    
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+
+commit 929795d50d788358d6269ce423f72c6cc40e334b
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Tue Dec 3 10:14:51 2013 +1000
+
+    dix: fix check for grab type
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 23394c7fea0f5c33333198c87ecfecc9f6c6a791
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Tue Dec 3 08:36:45 2013 +1000
+
+    Xi: ungrab device when releasing a passive grab without ButtonReleaseMask (#71878)
+    
+    If an touch triggers an async button grab and that grab does not have the
+    ButtonReleaseMask set, the TouchEnd is never delivered, deliveries is 0  and
+    the grab is never deactivated.
+    
+    If the grab is pointer async and keyboard sync, the keyboard events are stuck
+    in EnqueueEvent until some other pointer event terminates the grab.
+    
+    Change this to check for the number of listeners. If we're about to deliver a
+    TouchEnd to a passive pointer grab, the number of listeners is already 1 -
+    pointer grabs always accept so other listeners were removed.
+    
+    X.Org Bug 71878 <http://bugs.freedesktop.org/show_bug.cgi?id=71878>
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit c1d30b5bd7f90e68bc38404fd0cc32578d6d3018
+Author: Ben Gamari <bgamari.foss@gmail.com>
+Date:   Thu Nov 21 21:24:20 2013 -0500
+
+    Xi: Don't ActivateEarlyAccept POINTER_REGULAR listeners
+    
+    Bug #71878 describes a bug resulting in the server ceasing to respond to
+    keyboard input after a touch event. The problem might be the following:
+    
+    DeliverTouchBeginEvent tries to deliver an event to a listener of type
+    LISTENER_POINTER_REGULAR, taking the following if branch,
+    
+        if (listener->type == LISTENER_POINTER_REGULAR ||
+            listener->type == LISTENER_POINTER_GRAB) {
+            rc = DeliverTouchEmulatedEvent(dev, ti, ev, listener, client, win,
+                                           grab, xi2mask);
+            if (rc == Success) {
+                listener->state = LISTENER_IS_OWNER;
+                /* async grabs cannot replay, so automatically accept this touch */
+                if (dev->deviceGrab.grab &&
+                    dev->deviceGrab.fromPassiveGrab &&
+                    dev->deviceGrab.grab->pointerMode == GrabModeAsync)
+                    ActivateEarlyAccept(dev, ti);
+            }
+            goto out;
+        }
+    
+    DeliverTouchEmulatedEvent succeeds.  The deviceGrab meets all
+    three of the conditions of the inner if, enters
+    ActivateEarlyAccept which then fails due to,
+    
+        BUG_RETURN(ti->listeners[0].type != LISTENER_GRAB &&
+                   ti->listeners[0].type != LISTENER_POINTER_GRAB);
+    
+    That is, despite listener->type == LISTENER_POINTER_REGULAR. With my
+    non-existent knowledge of XINPUT, it seems like the solution here
+    might be to only ActivateEarlyAccept when listener->type ==
+    LISTENER_POINTER_GRAB.
+    
+    Signed-off-by: Ben Gamari <bgamari.foss@gmail.com>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit fe07ec19e212a68076560d243a2a935c54589068
+Author: Keith Packard <keithp@keithp.com>
+Date:   Tue Dec 10 11:27:47 2013 -0800
+
+    present: recursively set window pixmaps on flip
+    
+    Newly created windows inherit the pixmap of their parent, similarly,
+    reparenting a tree inherits the pixmap of the destination tree.
+    
+    Making present preserve the invariant that unredirected windows always
+    have the same pixmap as their parent ensures that the above cases work
+    correctly.
+    
+    v2: name the recursive function to 'set_tree_pixmap' instead of 'set_window_pixmap'
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit b3533d0b212b6747a8f9a01931253d6bdb648ee2
+Author: Keith Packard <keithp@keithp.com>
+Date:   Tue Dec 10 10:29:11 2013 -0800
+
+    Bump version to 1.14.99.904 (1.15 RC4)
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 9a4d7572fe3be16bb5aded5f48d4217fdf725b1d
+Author: Jon TURNEY <jon.turney@dronecode.org.uk>
+Date:   Thu Sep 27 18:59:45 2012 +0100
+
+    hw/xwin/glx: Rewrite WGL wrappers after Xserver conversion to direct GL dispatch
+    
+    v1: Rewrite by Marc Haesen of the WGL wrapper function generation script to use
+    Khronos group XML.
+    
+    v2: Remove -dispatchheader option, since dispatch.h doesn't exist anymore, use
+    the private glapi interface to construct the GL dispatch table for the native
+    WGL thunks.
+    
+    v3:
+    Rewrite to generate shims for the OpenGL 1.2.1 (GL 1.2 + GL_ARB_imaging
+    +GL_ARB_multitexture + GL_ARB_texture_compression(?)) functions the server links
+    directly with rather than libGL.
+    
+    These shims dispatch to either the mesa GL DLL, or a thunking DLL containing
+    cdecl-to-stcall wrapper functions for the native GL DLL.
+    
+    Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit cb48877a3c4cfb1ae2248000fcd3443e3092bdaa
+Author: Jon TURNEY <jon.turney@dronecode.org.uk>
+Date:   Fri Dec 6 14:00:21 2013 +0000
+
+    glx: Consistently use ARB-suffixed names for ARB_multitexture functions
+    
+    At the moment we have a mix of ARB and non-ARB suffixed forms for ARB_multitexture functions
+    e.g. glMultiTexCoord1fvARB and glMultiTexCoord1dv
+    
+    Consistently use the ARB-suffixed form, assuming that is present in all libGL
+    which provide the OpenGL 1.2.1 ABI we expect to be able to directly link with.
+    
+    Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit 1a021f57a1e75ab63e8f87704f0394162402c4d4
+Author: Jon TURNEY <jon.turney@dronecode.org.uk>
+Date:   Sun Dec 1 22:25:46 2013 +0000
+
+    ephyr: Fix compilation when ./configure'd with --enable-debug
+    
+    /jhbuild/checkout/xorg/xserver/hw/kdrive/ephyr/ephyr.c: In function ‘ephyrProcessMouseMotion’:
+    /jhbuild/checkout/xorg/xserver/hw/kdrive/ephyr/ephyr.c:946:188: error: ‘ephyrCurScreen’ undeclared (first use in this function)
+    /jhbuild/checkout/xorg/xserver/hw/kdrive/ephyr/ephyr.c: In function ‘ephyrProcessButtonPress’:
+    /jhbuild/checkout/xorg/xserver/hw/kdrive/ephyr/ephyr.c:980:186: error: ‘ephyrCurScreen’ undeclared (first use in this function)
+    /jhbuild/checkout/xorg/xserver/hw/kdrive/ephyr/ephyr.c: In function ‘ephyrProcessButtonRelease’:
+    /jhbuild/checkout/xorg/xserver/hw/kdrive/ephyr/ephyr.c:1007:186: error: ‘ephyrCurScreen’ undeclared (first use in this function)
+    
+    Fix ephyr compilation when ./configure'd with --enable-debug after commit
+    46cf6bf5692ef751ec9d17ae2292565d4b13f14b, some instances of ephyrCurScreen were
+    not converted to screen->pScreen->myNum.
+    
+    v2: Don't use a trivial local variable which will be unused when ./configure'd
+    with --disable-debug
+    
+    Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit 875dbcef5bfcb6a94ef8456be6151e133408793f
+Author: Jon TURNEY <jon.turney@dronecode.org.uk>
+Date:   Fri Nov 29 14:29:20 2013 +0000
+
+    configure.ac: Link XWin with present extension if we are building with it enabled
+    
+    Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit e61e19959d9138d5b81b1f25b7aa3e257918170d
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Dec 3 13:45:43 2013 -0500
+
+    xquartz/glx: Convert to non-glapi dispatch
+    
+    CGL doesn't have anything like glXGetProcAddress, and the old code just
+    called down to dlsym in any case.  It's a little mind-warping since
+    dlopening a framework actually loads multiple dylibs, but that's just
+    how OSX rolls.
+    
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+    Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+
+commit a668aa0e41bc33ff2db7f9c53b6dc321a96926a9
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Dec 3 15:03:13 2013 -0500
+
+    drisw: Wire up GetProcAddress
+    
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+
+commit 4fcdfeb7bc55d00d50d7f89788d9b929946ae3d9
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Dec 3 15:02:57 2013 -0500
+
+    dri2: wire up GetProcAddress
+    
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+
+commit 47f00b3920be9d8df8b148263d744934f3a02cd4
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Dec 3 15:01:44 2013 -0500
+
+    glx: Untangle the prototypes around the GetProcAddress thunk
+    
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+    Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+    Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+
+commit c1fd143f2847ef425ec9891d9e1cba44a1bb007d
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Dec 3 13:11:52 2013 -0500
+
+    glx: Remove function stubs
+    
+    Now that we're calling non-1.2 ABI things by function pointer this is no
+    longer needed.
+    
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+    Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+    Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+
+commit 6b93e1f5ff39c6ac5b0d97d4245aeac9113eed8b
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Dec 3 13:11:09 2013 -0500
+
+    glx: Convert non-generated function pointer thunking
+    
+    Same concept as the generated code conversion.
+    
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+    Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+
+commit c4567a376083eb7b142a7f003ddf8372d376ea86
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Dec 3 12:40:24 2013 -0500
+
+    glx: Convert generated code function pointer thunking
+    
+    We're meant not to call these by name due to ABI.  Rather than try to
+    generate a bunch of little stub functions that do the lookup, just
+    inline it all directly into the calling function.
+    
+    This does not cache results.  That's fine, this is not a performance
+    path, and if we're atop WGL then we effectively have to do this every
+    time anyway because wglGetProcAddress results are context-dependent.
+    
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+    Jon TURNEY <jon.turney@dronecode.org.uk>
+
+commit f69f4f417c6807405e45289b39a80f1b9a55f9e6
+Author: Keith Packard <keithp@keithp.com>
+Date:   Tue Dec 10 07:09:17 2013 -0800
+
+    Depend on latest glproto (1.4.17)
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 576f3d36dd324bd0d16c9968f1ded5c5eead3569
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Mon Dec 9 13:16:01 2013 -0500
+
+    damageext: Die if we can't create the Xinerama resource type
+    
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit f10f36d91db1b21c2ce5a531b4fa5f96fcbdc2f0
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Mon Sep 16 15:17:26 2013 -0400
+
+    damageext: Xineramify (v7)
+    
+    v7: Don't bother making resources for the backing listeners. [keithp]
+    
+    This is now slightly unlike how other resources are xineramified.  We
+    create N+1 internal damage listeners, one that's a real resource and
+    reflects the protocol view, and then one per backend screen where the
+    report function piles onto the protocol view.  The internal listeners
+    are not stored in the resource database directly, they just hang off the
+    xinerama resource. We don't wrap Subtract at the dispatch level, but we
+    do extend it for the Xinerama case to clip to the root window geometry.
+    
+    As a result of the N+1 design here, the damage reports we generate are
+    not quite minimal.  However they are indistinguishable from sequential
+    rendering events happening before the client hears damage, and we don't
+    need to add a post-dispatch callback just for this one extension.
+    
+    Add is probably (still) somewhat broken since it will only hit screen 0,
+    but Add really only exists for DRI1's sake, and DRI1 disables itself
+    with Xinerama enabled anyway.  In the absence of a use case, I'm leaving
+    it unwrapped under Xinerama; if someone wants to define how it ought to
+    work, be my guest.
+    
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit 808303fe5232ba0320ae5a4310b1ed1322e85f1d
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Mon Nov 4 17:49:34 2013 -0500
+
+    fixes: Fix PanoramiXSetWindowShapeRegion for root windows (v2)
+    
+    Root windows in Xinerama are in the coordinate space of their root window
+    pixmap, not in protocol space.
+    
+    v2: Only translate for root windows, sice the window shape is
+    drawable-relative.
+    
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit 5c10c7ea2129b70015e745523918d143cc29318d
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Mon Nov 4 17:49:33 2013 -0500
+
+    fixes: Fix PanoramiXSetPictureClipRegion for root windows (v2)
+    
+    Root windows in Xinerama are in the coordinate space of their root
+    window pixmap, not in protocol space.  This fixes 'xcompmgr -n' when
+    Xinerama is active.
+    
+    v2: Only translate for root windows, since the clip origin is
+    drawable-relative.
+    
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit 1dd839a425adc6e5a1dc377003ed86a374d81f0b
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Thu Nov 7 13:59:30 2013 -0500
+
+    composite: Fix COW creation for Xinerama (v2)
+    
+    Say you have two 800x600 screens left/right of each other.  A window
+    that's 200x200 at +700+0 in protocol coordinate space will appear to be
+    at -100+0 in the coordinate space of the right hand screen.  Put another
+    way: windows are in the coordinate space of their root window pixmap.
+    
+    We weren't doing this translation for the COW, so when rendering came in
+    to it you'd see the top-left chunk of the COW on all screens.  Cool
+    effect and all, but wrong.
+    
+    v2: Only translate when Xinerama is active [keithp]
+    
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit 8dbe456abae1a32fb6c5c74fa456bc7301cccabe
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Oct 29 10:44:07 2013 -0400
+
+    xinerama: Export the screen region
+    
+    damageext wants this so it can intersect subtract requests against the
+    root window geometry.
+    
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit c6d4c2a24140feee4ceae48c4c74fedcae9b68b3
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Fri Nov 15 15:13:31 2013 -0500
+
+    xfree86: Prefer fbdev to vesa
+    
+    On UEFI machines you'd prefer fbdev to grab efifb instead of vesa trying
+    to initialize and failing in a way we can't unwind from.  On BIOS
+    machines this is harmless: either there is an fbdev driver and it'll
+    probably be more capable, or there's not and vesa will kick in anyway.
+    
+    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
+    Reviewed-by: Eric Anholt <eric@anholt.net>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit 7b5d4f147fdef9edfeaa9c6565375111079efd11
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Nov 5 10:12:28 2013 -0500
+
+    composite: Don't double-redirect if someone asks for backing store twice
+    
+    v2: Belt-and-suspenders the unredirection path [vsyrjala]
+    
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit a2b2c271e0ca87d3188ba2741b6db9bbbdc599f5
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Nov 5 10:08:17 2013 -0500
+
+    composite: Automatically enable backing store support on the screen
+    
+    ... unless you explicitly disabled it with -bs on the command line, or
+    with the corresponding thing in xorg.conf.
+    
+    v2: Drop a bogus hunk from compChangeWindowAttributes [vsyrjala]
+    v3: s/TRUE/WhenMapped/ [jcristau]
+    
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit e0cac005608a2e5618c7be59701318d684e0bb93
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Nov 5 09:58:17 2013 -0500
+
+    bs: Set the screen's bs support level to WhenMapped
+    
+    Since we're using RedirectAutomatic to do this, we don't actually
+    preserve contents when unmapped.
+    
+    v2: Don't say WhenMapped if Composite didn't initialize [vsyrjala]
+    
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit b61ccd5d9d368f3fbbae27ce14ac02a3db1884c4
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Nov 5 10:20:04 2013 -0500
+
+    smartsched: Tweak the default scheduler intervals
+    
+    A default timeslice of 20ms means a pathological client can ruin up to
+    two frames per scheduler tick.  And a fifth of a second is just insane.
+    
+    Pick two different numbers out of the hat.  A 5ms slice means you can
+    probably keep up with two or three abusive clients, and letting it burst
+    to 15ms should give you about all the timeslice you need for a
+    fullscreen game (that's doing server-side rendering for some reason).
+    
+    If you're running on a system with a 10ms granularity on SIGALRM, then
+    this effectively changes the intervals to 10ms and 30ms.  Which is still
+    better, just not as better.
+    
+    I suspect this is about as good as we can do without actually going
+    preemptive, which is an entire other nightmare.
+    
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit 66310ea2893811614b3c3aade8992624a95a6ee7
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Fri Nov 8 09:22:37 2013 -0500
+
+    dri3: Disable when Xinerama is active
+    
+    Pretty sure this can't work.
+    
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit 793fd5eefb0e417614d77fe1522c6548587fbd4e
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Fri Nov 8 09:20:29 2013 -0500
+
+    dri2: Disable when Xinerama is active
+    
+    Would only work on ScreenRec 0, which means it's broken.
+    
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit 2bf92108294805c5c6fef249c2f7de6ecf4975d8
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Fri Nov 8 09:06:59 2013 -0500
+
+    present: Disable when Xinerama is active
+    
+    Among much else Present depends on RANDR types, and RANDR isn't properly
+    Xinerama-aware yet anyway.
+    
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit ac772cb187ddf7e04b8f4b3a071b90f18f4488d0
+Author: Eric Anholt <eric@anholt.net>
+Date:   Thu Nov 14 17:40:47 2013 -0800
+
+    glx: Fix incorrect use of dri_interface.h version defines in driver probing.
+    
+    If we extend __DRI_CORE or __DRI_SWRAST in dri_interface.h to allow a
+    new version, it shouldn't make old server code retroactively require
+    the new version from swrast drivers.
+    
+    Notably, new Mesa defines __DRI_SWRAST version 4, but we still want to
+    be able to probe version 1 drivers, since we don't use any features
+    beyond version 1 of the struct.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
+
+commit 6e926b18ca1b182253bac435a1d53caaff7ffff6
+Author: Eric Anholt <eric@anholt.net>
+Date:   Thu Nov 14 17:40:46 2013 -0800
+
+    glx: Fix incorrect use of dri_interface.h version defines in extensions.
+    
+    Those defines are so you can compile-time check "do I have a
+    dri_interface.h that defines this new field of the struct?"  You don't
+    want the server to claim it implements the new struct just because you
+    installed a new copy of Mesa.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
+
+commit 57a8ce927332e855dd29ff30210a211a907adb25
+Author: Jon TURNEY <jon.turney@dronecode.org.uk>
+Date:   Fri Nov 29 12:26:43 2013 +0000
+
+    configure.ac: Fixup for "Require libpciaccess for int10"
+    
+    On 16/11/2013 01:00, Connor Behan wrote:
+    > A --disable-pciaccess build will fail with an int10 module other than
+    > stub.
+    >
+    > Signed-off-by: Connor Behan <connor.behan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
+    > ---
+    >  configure.ac | 3 +++
+    >  1 file changed, 3 insertions(+)
+    >
+    > diff --git a/configure.ac b/configure.ac
+    > index 5e621e0..a843770 100644
+    > --- a/configure.ac
+    > +++ b/configure.ac
+    > @@ -1822,6 +1822,9 @@ if test "x$XORG" = xyes; then
+    >  		if test "x$CONFIG_UDEV_KMS" = xyes; then
+    >  			AC_MSG_ERROR([Platform device enumeration requires libpciaccess])
+    >  		fi
+    > +		if test "x$INT10" != xstub; then
+    > +			AC_MSG_ERROR([Cannot build int10 without libpciaccess])
+    > +		fi
+    >  	fi
+    >  	AC_MSG_RESULT([$PCI])
+    >
+    
+    This causes my build to fail where --disable-int10-module --disable-pciaccess
+    is the default (as INT10 still has the default value 'x86emu')
+    
+    Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+    Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+    Tested-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 653d33941b0808ef910aaa5f3aeab05d9c1a100b
+Author: Keith Packard <keithp@keithp.com>
+Date:   Tue Nov 26 12:18:12 2013 -0800
+
+    present: Report damage when flipping
+    
+    Limit damage to the 'update' region.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit 5cf12c9569ac3d83fe1b7a8376c15f8f0b01655e
+Author: Keith Packard <keithp@keithp.com>
+Date:   Tue Nov 26 12:10:48 2013 -0800
+
+    present: Also set the root window pixmap when flipping
+    
+    This makes sure that things like software cursors continue to work
+    while the screen is flipped.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit 4aa77378de69efdc10bced6ba650b0ebff50c112
+Author: Keith Packard <keithp@keithp.com>
+Date:   Tue Nov 26 12:06:57 2013 -0800
+
+    present: Clear target_crtc if driver lacks Present support
+    
+    If the driver doesn't have the necessary hooks for Present, then the
+    target_crtc needs to be set to NULL to make sure the extension uses
+    the present_fake code.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    Tested-by: Fredrik Höglund <fredrik@kde.org>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit 3dd5bfe540b295bb37a2c2fd0ba4a31fb217612b
+Author: Keith Packard <keithp@keithp.com>
+Date:   Thu Nov 21 22:48:31 2013 -0800
+
+    present: Send GLX_BufferSwapComplete events from present extension
+    
+    This allows GL to support the GLX_INTEL_swap_event extension.
+    
+    v2: Return GLX_BLIT_COMPLETE_INTEL for unknown swap types
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit cde86e68fcb716f34c90f5a16eb868870f5c85e4
+Author: Keith Packard <keithp@keithp.com>
+Date:   Mon Nov 25 23:06:08 2013 -0800
+
+    present: Set window pixmap to flipped pixmap
+    
+    This makes other drawing to the window appear on the screen.
+    
+    Note that no child windows can be affected because only full-screen
+    windows are eligible for flipping, and so we only need to set pixmap
+    for the window itself.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit 04e138846e128670d409798aa2e797c3c5503a47
+Author: Keith Packard <keithp@keithp.com>
+Date:   Mon Nov 25 23:10:17 2013 -0800
+
+    present: Leave vblank on window list until flip complete
+    
+    If the window is destroyed, then we've got cleanup work to do, even if
+    the vblank has already been executed -- we need to clear the window
+    pointer so that we don't try to deliver events to it.
+    
+    Leaving it on the window list meant that when walking that list, we
+    need to know whether the vblank is waiting to be executed or waiting
+    for the flip to complete, so a new 'queued' flag was added to the
+    vblank to distinguish between the two states.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit b121d62accb8c346b4e1b1bce99586e13712f04a
+Author: Keith Packard <keithp@keithp.com>
+Date:   Tue Nov 26 03:07:55 2013 -0800
+
+    present: Add a debug output line when skipping a pending present
+    
+    When an application provides two pixmaps for the same MSC, the
+    previous one is skipped. This just dumps out some information at that point
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit eafba23b34be31c141ddafb8380520ac9a0622ac
+Author: Keith Packard <keithp@keithp.com>
+Date:   Thu Nov 21 22:45:18 2013 -0800
+
+    miext/sync: Handle libxshmfence API change
+    
+    libxshmfence had an unfortunate 'int32_t' type for the mapped fence.
+    That changed to exposing a 'struct shmfence' instead, which is nice
+    and opaque and offers fine type checking across the API.
+    
+    This patch requires the newer version of the library and uses
+    the new interface type.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+
+commit b6d7ed4d787a652e8150532f384bfdf51760f3c2
+Author: Keith Packard <keithp@keithp.com>
+Date:   Thu Nov 21 22:12:34 2013 -0800
+
+    miext: Move SyncShm FDs out of the way of clients
+    
+    Applications may end up allocating a bunch of shmfence objects, each
+    of which uses a file descriptor, which must be kept open lest some
+    other client ask for a copy of it later on.
+    
+    Lacking an API that can turn a memory mapping back into a file
+    descriptor, about the best we can do is push the file descriptors out
+    of the way of other X clients so that we don't run out of the ability
+    to accept new connections.
+    
+    This uses fcntl F_GETFD to push the FD up above MAXCLIENTS.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+
+commit cc63204926c6da83d9221c5f8c0dc8f5e2f2481d
+Author: Keith Packard <keithp@keithp.com>
+Date:   Wed Nov 13 14:16:33 2013 +0900
+
+    Xext: Use SHMDIR and O_TMPFILE when creating mapping files
+    
+    ShmCreateSegment asks for a file descriptor for a memory mapped file
+    created by the X server. This patch uses O_TMPFILE where available,
+    and also uses the SHMDIR directory to store the files, both for the
+    O_TMPFILE and mkstemp cases.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+
+commit 5a969f0928b84da5cfe0777dfb542caaacc915ad
+Author: Keith Packard <keithp@keithp.com>
+Date:   Wed Nov 13 12:17:10 2013 +0900
+
+    Select directory for MIT-SHM temp files at configure time
+    
+    By default, this looks through a list of directories to find one which
+    exists, but can be overridden with --with-shared-memory-dir=PATH
+    
+    This patch doesn't actually do anything with this directory, just
+    makes it available in the configuration
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+
+commit d695cb7fb6bb8fd159a332d902673edbbd2237d7
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Mon Nov 25 22:19:34 2013 -0800
+
+    Xdmx: Initialize DMX extension even if not built with GLX support
+    
+    dmxAddExtensions takes an argument to determine if it should just
+    initialize the DMX extension, or both DMX & GLX, but if GLX wasn't
+    compiled in, the entire call was #ifdef'ed out, leaving the DMX
+    extension unavailable.
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit bd70def07754357d26b86c287037eb3884631daf
+Author: Connor Behan <connor.behan@gmail.com>
+Date:   Fri Nov 15 17:00:40 2013 -0800
+
+    configure.ac: Require libpciaccess for int10
+    
+    A --disable-pciaccess build will fail with an int10 module other than
+    stub.
+    
+    Signed-off-by: Connor Behan <connor.behan@gmail.com>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit a575c1dc64c10bc88bd0e963ebb8ab137f59a078
+Author: Connor Behan <connor.behan@gmail.com>
+Date:   Fri Nov 15 17:00:20 2013 -0800
+
+    configure.ac: Require libpciaccess for platform bus support
+    
+    There is currently no reason to build with --enable-config-udev-kms and
+    --disable-pciaccess but anyone who tries this should know that the build
+    will fail.
+    
+    Signed-off-by: Connor Behan <connor.behan@gmail.com>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 361dfe74eaa2f1eddb54abdecca1d8b1b3f58704
+Author: Connor Behan <connor.behan@gmail.com>
+Date:   Fri Nov 15 17:00:00 2013 -0800
+
+    configure.ac: Add whitespace near PCI configuration
+    
+    Signed-off-by: Connor Behan <connor.behan@gmail.com>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 80481267662c8687e73081237913fa561e7a6561
+Author: Keith Packard <keithp@keithp.com>
+Date:   Sat Nov 23 22:22:37 2013 -0800
+
+    Bump release to 1.14.99.903 (1.15 RC3)
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit f1604002a32b7f098c2a16b4a8649c694af570c8
+Author: Keith Packard <keithp@keithp.com>
+Date:   Mon Nov 18 22:36:17 2013 -0800
+
+    miext: Ensure xshmfence is only called when driver supports it
+    
+    This provides a place for drivers to insert their own FD-based
+    SyncFence implementations, and prevents applications from using DRI3
+    SyncFence creation functions unless the driver has some support for
+    them.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    Tested-by: Fredrik Höglund <fredrik@kde.org>
+
+commit 037566c57caff93fd7717f385d4b532b81f19c77
+Author: Keith Packard <keithp@keithp.com>
+Date:   Mon Nov 18 22:33:27 2013 -0800
+
+    Xext: Recover from miSyncInitFenceFromFD failure without crashing
+    
+    miSyncDestroyFence must not be called unless miSyncInitFence has been
+    invoked, so if miSyncInitFenceFromFD fails, we must free the fence
+    manually.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    Tested-by: Fredrik Höglund <fredrik@kde.org>
+
+commit e7000534a456fdf9cd4eaada3193846c8525f740
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date:   Sat Oct 5 08:47:03 2013 +0100
+
+    glx/glxdri2: Unwrap EnterVT/LeaveVT upon CloseScreen
+    
+    In a similar spirit to
+    
+    commit d75e8146c414bfd512ba5dbd4a83acb334bbe19b
+    Author: Keith Packard <keithp@keithp.com>
+    Date:   Mon Jul 12 16:01:34 2010 -0700
+    
+        Unwrap/rewrap EnterVT/LeaveVT completely, Fixes 28998
+    
+    we need to unwrap our pScrn->EnterVT/LeaveVT hooks around server
+    regeneration or else we cause an infinite recursion on the next VT
+    switch afterwards.
+    
+    Bugzilla: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/1235516
+    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 6d5883bd7e5b765f8f0548501b825d9e56840799
+Author: Keith Packard <keithp@keithp.com>
+Date:   Sat Nov 23 16:19:46 2013 -0800
+
+    xnest: Ignore GetImage() error in xnestGetImage() (v3)
+    
+    (I found an amended version of this patch and applied the difference
+    here - keithp)
+    
+    v3: Don't call Xsync before restoring error handler as any errors
+        generated by XGetImage() should be processed when this call
+        returns as suggested by Jamey Sharp <jamey@minilop.net>
+    
+    Signed-off-by: Egbert Eich <eich@freedesktop.org>
+    Reviewed-by: Jamey Sharp <jamey@minilop.net>
+
+commit 6403cbb143c67872ca9c58e3116ae7942def0ae1
+Author: Keith Packard <keithp@keithp.com>
+Date:   Tue Nov 19 22:13:54 2013 -0800
+
+    present: When unflipping, copy to flip window rather than screen
+    
+    unflip happens after the clip lists have been updated, so instead of
+    smashing the whole screen and drawing over other windows, just draw to
+    the original flip window; it'll have the right clip list and so the
+    copy will work just fine.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit 8bdd2ccc776ded3f527596b5009ef25129aa3287
+Author: Keith Packard <keithp@keithp.com>
+Date:   Mon Nov 11 18:03:42 2013 -0800
+
+    present: Block for wait_fence in present_execute
+    
+    Pend presentation until wait_fence is also triggered by having the
+    SyncFence trigger invoke present_execute once triggered.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit e5a188cb919edee2e3a03054276bce0db02f7b62
+Author: Keith Packard <keithp@keithp.com>
+Date:   Sat Nov 9 12:36:47 2013 -0800
+
+    present: Signal destroyed flip window with vblank->window == NULL
+    
+    This eliminates dereferencing freed window pointers when there is a
+    flip for that window in progress. The flip will complete, and then
+    immediately get undone (as we can't stop an in-progress flip).
+    
+    Remove the vblank->window_destroyed field as we can signal this with
+    vblank->window == NULL instead.
+    
+    Change check to vblank->window == NULL in:
+    
+    	present_flip_notify
+    
+    Add check for vblank->window == NULL in:
+    	present_vblank_notify
+    	present_execute
+    
+    present_flip_notify was also using vblank->window->drawable.pScreen,
+    so stop doing that and use vblank->screen instead.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit a5bcc4f7b9499caf8993f0a6ef96088553399ca3
+Author: Keith Packard <keithp@keithp.com>
+Date:   Sat Nov 9 12:33:02 2013 -0800
+
+    present: Ignore event_id 0 from driver vblank notify
+    
+    We use event_id 0 to mean 'no such event'; if a driver sends us that
+    event_id, make sure we don't accidentally match it.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit 4f3c37a1f17ffcfbbff71d217e1caad3d0148c90
+Author: Keith Packard <keithp@keithp.com>
+Date:   Thu Nov 7 14:17:12 2013 -0800
+
+    present: Round fake MSC computations intead of truncating
+    
+    If the timer fired too early, we'd sometimes mis-compute the MSC for
+    fake vblanks. Rounding the computation to the nearest MSC fixes this nicely.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit da9997f89f14ab619f244d5b2e80a423b028c789
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Tue Nov 19 08:07:09 2013 +1000
+
+    configure: allow for --enable-libunwind and --disable-libunwind
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 29240e5cbf6e7f875b128fc7bfc4d56b2350835a
+Merge: 0492deb 8ff7e32
+Author: Keith Packard <keithp@keithp.com>
+Date:   Thu Nov 14 17:02:04 2013 +0900
+
+    Merge remote-tracking branch 'whot/for-keith'
+
+commit 0492deb8f8238b7782e5a706ec6219d88aa1091d
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Oct 29 12:09:27 2013 -0400
+
+    mieq: Bump default queue size to 512
+    
+    Based on some bugzilla scraping I did around November 2012.  Of xserver
+    bugs in Red Hat bugzilla with an EQ size message in the log, the
+    distribution looked like:
+    
+    String                      | Matches
+    -------------------------------------
+    Increasing EQ size to 512   | 460
+    Increasing EQ size to 1024  | 52
+    Increasing EQ size to 2048  | 6
+    Increasing EQ size to 4096  | 0
+    
+    Most of the "512" ones appear to be mostly harmless, some relatively
+    expensive path in either rendering or resource destruction simply taking
+    too long due to external pressures like paging or CPU contention.  So
+    let's raise the initial queue size, both to reduce the number of
+    spurious abrt reports and to drop fewer events in all but the most
+    pathological cases.
+    
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+    Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit d1440783a7367ff0d0c47d256bbca3b3cf8a5034
+Author: Dave Airlie <airlied@redhat.com>
+Date:   Tue Oct 29 12:09:26 2013 -0400
+
+    xfree86: return NULL for compat output if no outputs.
+    
+    With outputless GPUs showing up we crash here if there are not outputs
+    try and recover with a bit of grace.
+    
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+    Signed-off-by: Dave Airlie <airlied@redhat.com>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit d7ee27e5e415778240919082c83a65226c6f17e6
+Author: Dan Horák <dan@danny.cz>
+Date:   Tue Oct 29 12:09:25 2013 -0400
+
+    test: build the touch test only when building Xorg
+    
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+    Signed-off-by: Dan Horák <dan@danny.cz>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 8ff7e32c3ef7b0c13c4ab9664f651e9782d35a85
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Wed Nov 13 17:14:11 2013 +1000
+
+    include: export key_is_down and friends
+    
+    VNC needs key_is_down to check if a key is processed as down before it
+    simulates various key releases. Make it available, because I seriously can't
+    be bothered thinking about how to rewrite VNC to not need that.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Acked-by: Keith Packard <keithp@keithp.com>
+
+commit 0ba7fc8472f1227fd1cd51bd58048f164b8ea1ab
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Tue Nov 12 14:46:04 2013 -0800
+
+    Stop including inline assembly .il file for Solaris Studio builds
+    
+    Since all the inb/outb/etc. use in the X server itself (except for
+    xf86SlowBcopy) has been replaced by calls to libpciaccess, we no
+    longer need to pass inline assembly files to replace the gcc inline
+    assembly from hw/xfree86/common/compiler.h when building Xorg itself.
+    
+    The .il files are still generated and installed in the SDK for the
+    benefit of drivers who may use them.
+    
+    Binary diff of before and after showed that xf86SlowBcopy was the
+    only function changed across the Xorg binary and all modules built
+    in the Xserver build, it just calls the outb() function now instead
+    of having the outb instructions inlined, making it a slightly slower
+    bcopy.
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 550baf38f6096658f0bcf0ad647c4fedf93132f2
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Fri Oct 4 10:55:52 2013 +1000
+
+    kdrive: fix cursor jumps on CursorOffScreen behavior
+    
+    This patch fixes cursor jumps when there is a grab on the Xephyr window and
+    the pointer moves outside the window.
+    
+    So on two side-by-side 640x480 screens, a coordinate of 0/481
+    triggers KdCursorOffscreen.
+    
+    If the delta between two screens is 0, they share the same offset for
+    that dimension. When searching for the new screen, the loop always rules out
+    the current screen. So we get to the second screen, trigger the conditions
+    where dy <= 0 and decide that this new screen is the correct one. The result
+    is that whenever KdCursorOffScreen is called, the pointer jumps to the other
+    screen.
+    
+    Change to check for dy < 0 etc. so that the cursor stays on the same screen if
+    there is no other screen at the target location.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+
+commit a94d945065177d73f3ee8dc0b9147264ba281136
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Tue Oct 29 14:24:41 2013 +1000
+
+    kdrive: modify ephyr events to use POINTER_DESKTOP and scale them to that
+    
+    A multi-head Xephyr instance has the pointer stuck on one screen
+    because of bad coordinate calculation. The coordinates passed to
+    GetPointerEvents are per-screen, so the cursor gets stuck on the left-most
+    screen by default.
+    
+    Adjust and mark the events as POINTER_DESKTOP, so the DIX
+    can adjust them accordingly.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+
+commit d66832a3b8a8675f1e5f3656dcb1bbe95598f0ea
+Author: Keith Packard <keithp@keithp.com>
+Date:   Thu Nov 14 13:21:54 2013 +1000
+
+    kdrive: handle WxH as valid geometry spec
+    
+    If a screen size was specified as WxH, the loop returned early and kdOrigin
+    was never advanced. Thus, screen->origin was always 0 (or whatever was given
+    at the -origin commandline flag).
+    
+    If a screen size was given with a bit depth (WxHxD), kdOrigin would always
+    advance by the current screen, offsetting the next screen.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit c8c5105c1d5c093675d7f571f158147f22f7572b
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Tue Oct 29 14:33:56 2013 +1000
+
+    ephyr: xcb_connect returns an error, not NULL
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+
+commit 2aa67ccef6ad8f51deb94b66defc668ddb7d226c
+Author: Keith Packard <keithp@keithp.com>
+Date:   Thu Nov 14 10:26:20 2013 +0900
+
+    Update to version 1.14.99.902
+    
+    1.15 RC2
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 9309d2a009a6a3b6090fc377fc7a3eded1a34dc0
+Author: Keith Packard <keithp@keithp.com>
+Date:   Wed Nov 13 07:01:45 2013 +0900
+
+    xext: Fix shmint.h to not use headers outside of sdk_HEADERS
+    
+    shmint.h is part of sdk_HEADERS, and so can't use anything not
+    included in sdk_HEADERS.
+    
+    busfault.h includes dix-config.h which is not. Leave the use of
+    struct busfault in shmint.h and move the include of busfault.h to
+    shm.c.
+    
+    protocol-versions.h is not part of sdk_HEADERS, so instead of using
+    that, just use XTRANS_SEND_FDS to choose whether to expose the fd
+    passing requests directly.
+    
+    Reported-by: Julien Cristau <jcristau@debian.org>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    Tested-by: Knut Petersen <Knut_Petersen@t-online.de>
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+    
+    v2: also avoid using protocol-versions.h
+
+commit 4a251f5883b042cd902c192060a0be2b11148f2b
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Fri Nov 8 14:55:33 2013 -0800
+
+    xfree86: Fix build without libpciaccess
+    
+    Regression fix from commit 04ab07ca19236d6c9a947e065fb69b0dd0d16639
+    
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+    Reviewed-by: Connor Behan <connor.behan@gmail.com>
+
+commit 5b02d5b7aaabf1ba8dcbdfe4525b7995b4e79f92
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Thu Nov 7 21:08:56 2013 -0800
+
+    Enable XTRANS_SEND_FDS on Solaris too.
+    
+    Requires passing through the __EXTENSIONS__ and _XOPEN_SOURCE defines
+    in order to expose the msg_control members in struct msghdr.
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit c4c154d18ef42dc550f2675a9ee88e07b1ca6bed
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Thu Nov 7 21:05:33 2013 -0800
+
+    Avoid conflicts with Solaris <sys/regset.h> defines that clash with our names
+    
+    When building on Solaris with _XOPEN_SOURCE set to a recent XPG release,
+    <stdlib.h> and other core headers start including <sys/regset.h>, which
+    has a bunch of unfortunately named macros such as "CS", "ES", etc. for
+    x86 & x64 registers which clash with existing variable & struct member
+    names in Xorg - so #undef these so they don't interfere with our use.
+    
+    (Yes, have filed a bug against the system headers for exposing these,
+     but this solves the problem for building on existing releases.)
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit d7f9be0f8541368bf1a095ad1fbe7f38be6d3d15
+Author: Keith Packard <keithp@keithp.com>
+Date:   Mon Nov 11 15:48:41 2013 -0800
+
+    Proper spelling of MAP_ANONYMOUS is MAP_ANON.
+    
+    The former doesn't exist on BSD and the latter is available everywhere
+    AFAIK (checked Solaris and Linux).
+    
+    You also might want to wrap that line ;).
+    
+    Reported-by: Mark Kettenis <mark.kettenis@xs4all.nl>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit fc84166e65c35ad75f566b135dcfc305ad5a2fde
+Author: Keith Packard <keithp@keithp.com>
+Date:   Thu Nov 7 15:18:28 2013 -0800
+
+    Get rid of the rest of the FD passing code when XTRANS_SEND_FDS isn't set
+    
+    req_fds and SetReqFds in include/dixstruct.h
+    
+    ReadFdFromClient, WriteFdToClient and the FD flushing in os/io.c
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit a239e6faf3fce848ac0d10c48f8e817db68a493c
+Merge: 43e5a43 f70a8bf
+Author: Keith Packard <keithp@keithp.com>
+Date:   Mon Nov 11 15:26:12 2013 -0800
+
+    Merge remote-tracking branch 'jeremyhu/master'
+
+commit 43e5a43fa8994e50cf01dd954118f4ef2c4e7933
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Thu Nov 7 12:01:41 2013 -0500
+
+    present: Don't try to initialize when building without present support
+    
+    There's a --disable-present, so it'd be nice if it worked.
+    
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+    Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
+    Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 0822a23e048b12c98c654e8b6af711c5f2c97141
+Author: Keith Packard <keithp@keithp.com>
+Date:   Thu Nov 7 03:19:42 2013 -0800
+
+    present: Change debug output a bit to help diagnose missing vblank signals
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit 20bb49ae9ba11d3dccfba191483cd682d9c9d96c
+Author: Keith Packard <keithp@keithp.com>
+Date:   Wed Nov 6 23:56:26 2013 -0800
+
+    Present: Check for window/fence destroyed when idling pixmaps
+    
+    A client destroying objects in the middle of an unflip can end up
+    having the screen flip window or fence set to NULL in the unflip
+    notify path. Check for these and don't try to use those objects.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit 41da295eb50fa08eaacd0ecde99f43a716fcb41a
+Author: Keith Packard <keithp@keithp.com>
+Date:   Sun Nov 3 13:12:40 2013 -0800
+
+    Trap SIGBUS to handle truncated shared memory segments
+    
+    If a client passes a section of memory via file descriptor and then
+    subsequently truncates that file, the underlying pages will be freed
+    and the addresses invalidated. Subsequent accesses to the page will
+    fail with a SIGBUS error.
+    
+    Trap that SIGBUS, figure out which segment was causing the error and
+    then allocate new pages to fill in for that region. Mark the offending
+    shared segment as invalid and free the resource ID so that the client
+    will be able to tell when subsequently attempting to use the segment.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    
+    v2: Use MAP_FIXED to simplify the recovery logic (Mark Kettenis)
+    v3: Also catch errors in ShmCreateSegment
+    
+    Conflicts:
+    	include/dix-config.h.in
+    	include/xorg-config.h.in
+
+commit 719e880d7698d92f9b854b217ef9680aaa446f2e
+Author: Keith Packard <keithp@keithp.com>
+Date:   Wed Nov 6 23:22:51 2013 -0800
+
+    Require libXtrans version 1.3.2
+    
+    This has the FD passing support included
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit bee2ec54049377e0033d49abff20d7bd069c62aa
+Author: Keith Packard <keithp@keithp.com>
+Date:   Sun Nov 3 10:08:15 2013 -0800
+
+    Xext: Enable MIT-SHM FD-passing request definitions only when possible
+    
+    Check to see if xtrans FD passing is available and use that to
+    advertise the appropriate version of the SHM extension
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit ea8acfe3e2f74a46c3f1e91809b4b99af18502b7
+Author: Keith Packard <keithp@keithp.com>
+Date:   Wed Nov 6 23:06:28 2013 -0800
+
+    Require xextproto version 7.2.99.901
+    
+    This includes the MIT-SHM FD passing requests
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 914672fefacc15386041e7c2bc3beed4faf45e9d
+Author: Keith Packard <keithp@keithp.com>
+Date:   Thu Nov 7 14:20:26 2013 -0800
+
+    Remove dix-config.h config variables from xorg-config.h
+    
+    xorg-config.h includes dix-config, so there's no need to duplicate.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 7aad79c5a582ece301d950bd65f0bcb4b9956e86
+Author: Keith Packard <keithp@keithp.com>
+Date:   Wed Nov 6 23:05:46 2013 -0800
+
+    Make XTrans FD passing support optional. Define only on Linux
+    
+    Until other operating systems have a libXtrans port for FD passing,
+    disable this on non-Linux systems.
+    
+    Note that this define affects how libXtrans gets built into the X
+    server, which is why it need only define the symbol
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit f70a8bf3714d89bccaad36841ef9149e91ad3bba
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Sun Nov 10 11:40:27 2013 -0800
+
+    XQuartz: Don't sleep forever on exit if usleep() returns an error
+    
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+
+commit ebcc1c214c466582d7b92826b4860256fd9c582a
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Sun Nov 10 11:26:49 2013 -0800
+
+    XQuartz: Update Info.plist copyright years
+    
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+
+commit 81c123ea2dd833864f7ba217791e59acca0f7c97
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Mon Nov 4 12:13:45 2013 -0800
+
+    configure.ac: Move GLX section after DRI
+    
+    The GLX section of configura.ac checks the state of DRI2, so it
+    needs to be after DRI2=auto is resolved.
+    
+    Also reset libgl requirement to 7.1.0 in non-dri2 case.
+    
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit ab4b1fb38a61feb73d8336cc7a3399eb9d3d25be
+Author: Andreas Schwab <schwab@suse.de>
+Date:   Thu Aug 15 12:03:42 2013 +0200
+
+    ARM64: Add support for aarch64
+    
+    Signed-off-by: Andreas Schwab <schwab@suse.de>
+    Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 8fcf82cbf015609e00b3feb9bc567133c7aee5cf
+Author: Keith Packard <keithp@keithp.com>
+Date:   Tue Nov 5 18:39:11 2013 -0800
+
+    Use $GL_LIBS instead of -lGL for linking
+    
+    -lGL presumes that the GL library is in the system path, while
+     $GL_LIBS is auto-detected.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit f348935e7d2c84a438aba08eee2f2c4e0dc77d20
+Author: Keith Packard <keithp@keithp.com>
+Date:   Tue Nov 5 18:37:12 2013 -0800
+
+    Link with xshmfence, reference miSyncShmScreenInit in sdksyms
+    
+    This gets the server to link with xshmfence again, and also ensures
+    that the miSyncShm code is linked into the server with the reference
+    from sdksyms.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 5f1e832694e57986c0185048a941b3af51b2f85f
+Author: Julien Cristau <jcristau@debian.org>
+Date:   Tue Nov 5 07:08:21 2013 -0800
+
+    os: Actually use the computed clockid in GetTimeInMicros
+    
+    The selection of which clock to use for this function was not actually
+    getting used when fetching the final clock value.
+    
+    Reported-by: Julien Cristau <jcristau@debian.org>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 903a058370645ea075ea98d380fd565efb6160c9
+Author: Keith Packard <keithp@keithp.com>
+Date:   Mon Nov 4 19:01:26 2013 -0800
+
+    hw/xfree86: Link libdri3 only when DRI3 is defined
+    
+    Don't attempt to link non-existant libraries...
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit aaf0e29619196a283fee7ead2020a91032d84f48
+Author: Keith Packard <keithp@keithp.com>
+Date:   Sun Nov 3 09:56:02 2013 -0800
+
+    Disable DRI3 and sync fence FD functions if xshmfence isn't available
+    
+    Make sure the server can build when the xshmfence library isn't present
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 33c85beed521c9db140cadd8c5aa9992398ee1fe
+Author: Keith Packard <keithp@keithp.com>
+Date:   Fri Nov 1 01:01:58 2013 -0700
+
+    Set version to 1.14.99.901 (1.15 RC1)
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 9db1d66f6d2c6857de220d8f1c08965962fe1416
+Author: Keith Packard <keithp@keithp.com>
+Date:   Fri Nov 1 01:43:59 2013 -0700
+
+    Add dri3 and present directorys to distribution
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 977e2644b1d9e13b44debcb9a372bbc832ee32a3
+Merge: 66c5ee0 f36f5a6
+Author: Keith Packard <keithp@keithp.com>
+Date:   Fri Nov 1 00:34:18 2013 -0700
+
+    Merge remote-tracking branch 'whot/for-keith'
+
+commit 66c5ee0ff4690e630a69656331fd9d545c99c26c
+Author: Egbert Eich <eich@freedesktop.org>
+Date:   Wed Aug 14 18:18:56 2013 +0200
+
+    config/APM: Add option to disable building of APM support on Linux
+    
+        APM support in the Xserver was used to restore the console mode
+        prior to a power management event. This was to ensure the mode
+        upon suspend/resume was one that the system firmware or kernel
+        could deal with.
+        APM support is now largely obsolete, KMS drivers don't require a
+        mode restoration anyhow. Therefore it should be possible to disable
+        this feature.
+    
+    (small modification by keithp - move test for XF86PM flag after check
+    for APM, then move XF86PM flag to xorg-config.h.in)
+    
+    Signed-off-by: Egbert Eich <eich@freedesktop.org>
+    Tested-by: Keith Packard <keithp@keithp.com>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit f36f5a65f639b6524191d888d5bf89e73027156c
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Wed Oct 30 15:40:58 2013 +1000
+
+    sync: fix corner-case in triggering idle alarms
+    
+    ProcessInputEvent() resets the device idle times. If idle time was higher than
+    the lower bracket, this should trigger an event in the idle time wakeup
+    handler.
+    
+    If processing is slow, the idle time may advance past the lower bracket
+    between the reset and the time the BlockHandler is called. In that case, we'd
+    never schedule a wakeup to handle the event, causing us to randomly miss
+    events.
+    
+    Ran tests with a neg transition trigger on 5ms with 200 repeats of the test
+    and it succeeded. Anything below that gets a bit tricky to make sure the
+    server sees the same idle time as the client usleeps for.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+
+commit f994d99539192a10a8c83047e11991f52e0ca677
+Author: Egbert Eich <eich@freedesktop.org>
+Date:   Wed Aug 14 18:18:39 2013 +0200
+
+    config/ACPI: Add option to disable building of ACPI support on Linux
+    
+    ACPI support in the Xserver was used to restore the console mode
+    prior to a power management event. This was to ensure the mode
+    upon suspend/resume was one that the system firmware or kernel
+    could deal with.
+    The feature depended on acpid to be running. Most of this functionality
+    is now take over by systemd, KMS drivers don't require a mode restoration
+    anyhow. Therefore it should be possible to disable this feature under
+    some circumstances.
+    
+    Tested-by: Keith Packard <keithp@keithp.com>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 2aa5092b88174cb9988076ae96298217c97ad75f
+Author: Egbert Eich <eich@freedesktop.org>
+Date:   Mon Aug 12 18:21:33 2013 +0200
+
+    DDX/Randr: Avoid server crash when xrandr SetConfig is called while switched away
+    
+    A call to Xrandr SetScreenConfig (for randr 1.1) causes the Xserver to
+    crash when xf86SetViewport() which does not check if the hardware is
+    accessible.
+    Wrap accesses to xf86SetViewport() with if (vtSema) { ... } to avoid that.
+    
+    Signed-off-by: Egbert Eich <eich@freedesktop.org>
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 508e05777aba823c93a2417cc26d18c9f061ca26
+Author: Egbert Eich <eich@freedesktop.org>
+Date:   Mon Aug 12 18:20:36 2013 +0200
+
+    DDX/Events: Distinguish between Input- and GeneralHandlers in xf86VTSwitch()
+    
+    When enabling/disabling input handlers in xf86VTSwitch() we treat Input-
+    and GeneralHandlers equally. The result is that after a VT switch the
+    masks for EnabledDevices and AllSockets are equal and the distiction
+    between both types is lost.
+    
+    Signed-off-by: Egbert Eich <eich@freedesktop.org>
+    Reviewed-by: Daniel Stone <daniel@fooishbar.org>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 0cb33ce34081d7d123ec565582d7d19bdb3964ad
+Author: Egbert Eich <eich@freedesktop.org>
+Date:   Sat Oct 5 08:02:28 2013 +0200
+
+    DDX/modes: Add a sanity check when using screen sizes from EDID
+    
+    EDID sometimes lies about screen sizes. Since the screen size is used
+    by clients to determine the DPI a wrong ration will lead to terrible
+    looking fonts.
+    Add a sanity check for the h/v ratio cutting off at 2.4. This would
+    still accept the cinemascope aspect ratio as valid.
+    Also add message suggesting to add a quirk table entry.
+    
+    Signed-off-by: Egbert Eich <eich@freedesktop.org>
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 41d4beb2616ceb3f1a1b8694733e85bae70de59a
+Author: Egbert Eich <eich@freedesktop.org>
+Date:   Wed Aug 14 11:50:26 2013 +0200
+
+    DDX/DPMS: Call dixSaveScreens() also when screen is turned on
+    
+    DMPS calls dixSaveScreens() when turned off but not when turned
+    on. In most cases this is irrelevant as DPMS is done when a
+    key is hit in which case dixSaveScreens() will be called to
+    unblank anyhow. This isn't the case if we use xset (or the
+    DPMS extension directly) to unblank.
+    Check screenIsSaved to make sure the state needs to be changed
+    before calling dixSaveScreens().
+    
+    Signed-off-by: Egbert Eich <eich@freedesktop.org>
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 623c4147650d0404cfbea0f9b7df66dc7d928e00
+Author: Søren Sandmann Pedersen <ssp@redhat.com>
+Date:   Mon Oct 21 17:11:56 2013 -0400
+
+    ephyr: Ensure stride of private framebuffer is multiple of 4
+    
+    The fb layer of X can't deal with strides that are not a multiple of
+    4, so when Xephyr allocates its own framebuffer it should make sure to
+    align it.
+    
+    This fixes crashes and rendering corruption when Xephyr runs in a
+    depth that is different from the host X server and its screen size is
+    not a multiple of 4 / depth. (This is particularly easy to trigger if
+    you use the -resizeable option).
+    
+    Reviewed-by: Eric Anholt <eric@anholt.net>
+    Signed-off-by: Soren Sandmann <ssp@redhat.com>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit 97cf53cc2ad7ecfdd495133bad31d0ec7d939326
+Author: Søren Sandmann Pedersen <ssp@redhat.com>
+Date:   Mon Oct 21 16:58:54 2013 -0400
+
+    ephyr: hostx_screen_init(): Fix bits_per_pixel and bytes_per_line
+    
+    When the depth of the Xephyr server matches that of the host X server,
+    Xephyr simply uses the buffer associated with the XImage as its
+    framebuffer. In this case, it is correct to get the bits_per_pixel and
+    bytes_per_line values returned from hostx_screen_init() from the XImage.
+    
+    However, when the depth doesn't match the host, Xephyr uses a private
+    framebuffer that is periodically copied to the XImage. In this case,
+    the returned values of bits_per_pixel and bytes_per_line should be
+    those of the private framebuffer, not those of the XImage.
+    
+    Reviewed-by: Eric Anholt <eric@anholt.net>
+    Signed-off-by: Soren Sandmann <ssp@redhat.com>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit 55246b67b755d4c1039d54971fe3f77ea60d604e
+Author: Søren Sandmann Pedersen <ssp@redhat.com>
+Date:   Tue Oct 8 17:45:40 2013 -0400
+
+    xf86AddBusDeviceToConfigure(): Store device in DevToConfig[i].pVideo
+    
+    After fc3ab84d the pVideo field in DevToConfig[i] is no longer
+    initialized, so it's always NULL. This causes the duplicate finding
+    algorithm in the beginning of the function to not work anymore as it
+    is based on this field.
+    
+    The symptom of this bug is that X -configure reports
+    
+        Number of created screens does not match number of detected devices.
+          Configuration failed.
+        Server terminated with error (2). Closing log file.
+    
+    rather than producing a working config file.
+    
+    This patch fixes that bug by initializing the field before calling
+    xf86PciConfigureNewDev().
+    
+    Cc: tvignatti@gmail.com
+    Signed-off-by: Soren Sandmann <ssp@redhat.com>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit 95bf478b78e466002c382bcde7d4d62591e9215d
+Merge: abf5d5a bb745f2
+Author: Keith Packard <keithp@keithp.com>
+Date:   Thu Oct 31 18:18:19 2013 -0700
+
+    Merge remote-tracking branch 'jeremyhu/master'
+
+commit abf5d5ac12437ebe156b4dd500c2acd69eea3654
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Thu Oct 31 08:57:56 2013 -0700
+
+    miext/damage: Partial revert of "Only wrap into the GC ops chain if there's a listener (v3)"
+    
+    Fixes regression from: 4dc2a76740d921c824a4d8193f39dd373475f02a
+    
+    http://lists.x.org/archives/xorg-devel/2013-May/036241.html
+    https://trac.macports.org/ticket/38993
+    
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit e4636072949a76477fe7c9d54662a0b3536b1372
+Merge: 17ed7ac 5c5c1b7
+Author: Keith Packard <keithp@keithp.com>
+Date:   Thu Oct 31 17:05:48 2013 -0700
+
+    Merge remote-tracking branch 'keithp/dri3'
+
+commit 17ed7ac1fe7426d66f688087c09da5ff1dbb41d3
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Thu Oct 31 18:39:22 2013 -0400
+
+    glx: Lie about GLX_Y_INVERTED_EXT
+    
+    Well, that was lame.  The problem with reporting y inversion honestly is
+    that libGL asks the driver _its_ opinion of Y inversion, which it just
+    fabricates from whole cloth.  So then when libGL goes to compare the
+    driver's idea of fbconfigs with that of the server - a fairly dumb idea
+    to begin with - nothing matches, and direct rendering fails, and
+    sadness.
+    
+    So until the DRI drivers are fixed we should just continue to lie about
+    Y inversion.  GLX_DONT_CARE is what libGL would make up for that
+    attribute if we hadn't sent it, so just send that instead.
+    
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+    Tested-by: Keith Packard <keithp@keithp.com>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 5c5c1b77982a9af7279a90bc3c2be48adaa9c778
+Author: Keith Packard <keithp@keithp.com>
+Date:   Thu Jul 11 16:11:57 2013 -0700
+
+    present: Add Present extension
+    
+    Provides both a software implementation using timers and driver hooks
+    to base everything on vblank intervals.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit 563138298868f62501875d3016f03469dcffaad0
+Author: Keith Packard <keithp@keithp.com>
+Date:   Tue Apr 9 19:59:39 2013 -0700
+
+    dri3: Add DRI3 extension
+    
+    Adds DRM compatible fences using futexes.
+    Uses FD passing to get pixmaps from DRM applications.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit fdec793cdc2ef9a6ea66b311cb1068a7bd4a3be3
+Author: Keith Packard <keithp@keithp.com>
+Date:   Thu Jan 17 13:46:55 2013 -0800
+
+    Add support for MIT-SHM AttachFd request
+    
+    This passes a file descriptor from the client to the server, which is
+    then mmap'd
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit 9fd35daa3160fd36f00ed354bfcbefefa1353cce
+Author: Keith Packard <keithp@keithp.com>
+Date:   Thu Jan 17 13:43:02 2013 -0800
+
+    Add interfaces to get FDs from clients over the socket
+    
+    This adds two interfaces:
+    
+        void SetReqFds(ClientPtr client, int req_fds)
+    
+    	Marks the number of file descriptors expected for this
+    	request. Call this before any request processing so that
+    	any un-retrieved file descriptors will be closed
+    	automatically.
+    
+        int ReadFdFromClient(ClientPtr client)
+    
+    	Reads the next queued file descriptor from the connection. If
+    	this request is not expecting any more file descriptors, or
+    	if there are no more file descriptors available from the
+    	connection, then this will return -1.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit 264fc3abe5f18341d0cf9ddb6766e10e4154e447
+Author: Keith Packard <keithp@keithp.com>
+Date:   Thu Oct 31 13:01:46 2013 -0700
+
+    misync: Don't smash custom screen sync functions
+    
+    There was a check to avoid smashing custom functions, but the sense
+    was backwards causing it to always smash them, and also not set them otherwise.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit 2d96948ab5c952b68875ac63844cf7d778d4bf63
+Author: Keith Packard <keithp@keithp.com>
+Date:   Thu Jul 11 16:10:34 2013 -0700
+
+    os: Add GetTimeInMicros
+    
+    64-bit higher resolution current time value.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit 0c33f47281c36726848daf513fb0483cdea57bff
+Author: Keith Packard <keithp@keithp.com>
+Date:   Thu Jul 11 16:09:34 2013 -0700
+
+    Add swapll to byte swap 64-bit datatypes
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit 26f013ba45b08a02bb028a461af68288a86fadb1
+Author: Keith Packard <keithp@keithp.com>
+Date:   Thu Jul 11 16:08:41 2013 -0700
+
+    Add a RegionDuplicate function
+    
+    This allocates a new region structure and copies a source region into
+    it in a single API rather than forcing the caller to do both steps themselves.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit d25c217964eb1fe54c3a54bca4cac7f47b4b9fdf
+Author: Keith Packard <keithp@keithp.com>
+Date:   Mon Jan 14 14:24:36 2013 -0800
+
+    Clean up a couple of warnings in os/
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit 7710f2b927ec8e3c631f72d66d494b523377b48e
+Author: Keith Packard <keithp@keithp.com>
+Date:   Fri Jan 18 21:43:40 2013 -0800
+
+    Xext: Move MIT-SHM 'ShmDesc' to shmint.h
+    
+    This data structure is required to use shared memory objects in any
+    extension. That includes the Xv extension, which (before this patch)
+    duplicated the definition of this structure in its own code.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit e8961b718d82f1c081ec110d8d962f64e8406b82
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Tue Oct 22 14:24:52 2013 +1000
+
+    os: use a constant for backtrace array size
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
+
+commit f12a9ed870017f35cf6d2a82b1405e843aae42ac
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Tue Oct 29 15:24:11 2013 +1000
+
+    configure: remove a comment
+    
+    94ed0ba1b5043ad9fc33b42756af447d5ab15bbd moved backtracing into the DIX, so
+    this comment is outdated. since no-one noticed and it's easier to just grep
+    than update file references, remove the comment.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
+
+commit bb745f2b45768d0936f3960951e1a5cee8b03194
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Thu Oct 31 08:50:57 2013 -0700
+
+    XQuartz: Bump bundle version to 2.7.6
+    
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+
+commit 2eedf42c229e2251035d716a96b654222155cd51
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Thu Oct 31 09:23:52 2013 -0400
+
+    dri: Fix GLX_Y_INVERTED_EXT fbconfig attribute
+    
+    We're Y-inverted from GL's coordinates, so this is correct.  gnome-shell
+    doesn't seem to check this - somewhat reasonable since the only server
+    that answered the other way around was Xglx - but kwin does, and
+    upside-down hilarity ensues.
+    
+    Tested-by: maelcum on #xorg-devel
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 902ff0b3497d202b86bf9a411e17db7b694d6eaa
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Oct 29 12:58:14 2013 -0400
+
+    xfree86: Bump video/input/extension ABIs for 1.15
+    
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 899451ae595f5f51a500295c624bf7ad14aca602
+Author: Keith Packard <keithp@keithp.com>
+Date:   Wed Oct 30 08:54:24 2013 -0700
+
+    kdrive/ephyr: Don't discard one-time driver structure at server reset
+    
+    KdScreenInfo is constructed at server startup time, and not
+    re-generated at server reset time. Freeing the 'driver' element at
+    reset time means this information is lost, and the server crashes
+    pretty quickly afterwards.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit 85ae44f07fa21b4a48d95d736dc8135bd4f751d0
+Author: Michal Srb <msrb@suse.com>
+Date:   Wed Oct 30 13:33:51 2013 +0200
+
+    randr: deliver Output and Crtc events of attached output providers.
+    
+    Consider all attached output providers when looking for changed outputs and
+    crtcs.
+    
+    Reviewed-by: Dave Airlie <airlied@redhat.com>
+    Signed-off-by: Michal Srb <msrb@suse.com>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit a9ca93dcf9a711b3d60fbad31cbd44e0c82b6f42
+Author: Michal Srb <msrb@suse.com>
+Date:   Wed Oct 30 13:33:50 2013 +0200
+
+    randr: send RRResourceChangeNotify event
+    
+    Send RRResourceChangeNotify event when provider, output or crtc was created or
+    destroyed. I.e. when the list of resources returned by RRGetScreenResources and
+    RRGetProviders changes.
+    
+    Reviewed-by: Dave Airlie <airlied@redhat.com>
+    Signed-off-by: Michal Srb <msrb@suse.com>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 4b39ea8a918fe6117bf34dc1cba67a4e56d0d1fb
+Author: Michal Srb <msrb@suse.com>
+Date:   Wed Oct 30 13:33:49 2013 +0200
+
+    randr: send RRProviderChangeNotify event
+    
+    Send RRProviderChangeNotify event when a provider becomes output source or
+    offload sink.
+    
+    Reviewed-by: Dave Airlie <airlied@redhat.com>
+    Signed-off-by: Michal Srb <msrb@suse.com>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 1470c0a132806fb2ce817515ad4ddfe66eb7c98f
+Merge: 04ab07c 9f4afe7
+Author: Keith Packard <keithp@keithp.com>
+Date:   Tue Oct 29 21:00:13 2013 -0700
+
+    Merge remote-tracking branch 'whot/for-keith'
+
+commit 9f4afe7e835cf9c513387ae01eaf8b7a6ba4aac9
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Mon Oct 28 18:32:36 2013 -0400
+
+    config: replace deprecated use of AC_OUTPUT with AC_CONFIG_FILES
+    
+    Fix Automake warning: AC_OUTPUT should be used without arguments.
+    www.gnu.org/software/autoconf/manual/autoconf.html#Configuration-Files
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit e16dea72d6f45dd6d7788362bb7dbe76263719b1
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Wed Oct 23 15:16:25 2013 +1000
+
+    dmx: queue button events with a flags of 0
+    
+    Setting POINTER_SCREEN with a unset valuator mask causes a jump to 0/0. Set
+    the flags to 0 so we don't generate any motion on a button event.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+
+commit 04ab07ca19236d6c9a947e065fb69b0dd0d16639
+Author: Connor Behan <connor.behan@gmail.com>
+Date:   Thu Oct 17 18:26:28 2013 -0700
+
+    xfree86: Find primary entity when bus types are nominally different
+    
+    As of server 1.13, systems with DRM and Udev will have BUS_PLATFORM as
+    their primary bus type. However, drivers not implementing a
+    platformProbe function will still create entities of type BUS_PCI. We
+    need to account for this when checking for the primary entity.
+    
+    Signed-off-by: Connor Behan <connor.behan@gmail.com>
+    Acked-by: Tormod Volden <debian.tormod@gmail.com>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit b32a4c91ccd479638c2bd2c0143b6ea170c717d1
+Merge: be66809 c671e93
+Author: Keith Packard <keithp@keithp.com>
+Date:   Tue Oct 29 09:37:30 2013 -0700
+
+    Merge remote-tracking branch 'idr/glx-float-fbconfig'
+
+commit be6680967a479eedbcab2fe1718c5f981e1029c7
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Wed Jul 10 10:00:46 2013 -0400
+
+    glx: convert to direct GL dispatch (v2)
+    
+    We now expect to be linked against something that provides the GL API,
+    instead of manually grubbing about in the DRI driver's dispatch table.
+    Since the GLX we expose calls GL functions that are meant to be looked
+    up dynamically, also add a way to thunk through to GetProcAddress.
+    
+    This includes a refresh of the generated sources, which requires a
+    correspondingly new Mesa.
+    
+    The GetProcAddress stubs are at the moment merely enough to make this
+    link against Mesa 9.2, but should really be provided for everything not
+    in the OpenGL 1.2 ABI.
+    
+    v2: Explicitly hide the GetProcAddress stubs so we can't conflict with
+    libGL symbols; fix leading tab/space issues [anholt]
+    
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit 8aacf47e1778d8b72811b025a82452b933d3c1f2
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Fri Oct 4 12:58:19 2013 -0400
+
+    glx: Remove DRI1 AIGLX (v2)
+    
+    Mesa doesn't ship DRI1 drivers as of 8.0, which is about 18 months and
+    three releases ago.  The main reason to have wanted DRI1 AIGLX was to
+    get a GLX compositor working, but DRI1's (lack of) memory management API
+    meant that the cost of a GLX compositor was breaking direct GLX apps,
+    which isn't a great tradeoff.
+    
+    Of the DRI1 drivers Mesa has dropped, I believe only mga stands to lose
+    some functionality here, since it and only it has support for
+    NV_texture_rectangle.  Since that's required for every extant GLX
+    compositor I know of, I conclude that anybody with a savage, say, would
+    probably not notice AIGLX going away, since they wouldn't be running a
+    GLX compositor in the first place.
+    
+    In the future we'd like to use GL in the server in a more natural way,
+    as just another EGL client, including in the GLX implementation itself.
+    Since there's no EGL implemented for DRI1 drivers, this would already
+    doom AIGLX on DRI1 (short of entirely forking the GLX implementation,
+    which I'm not enthusiastic about).
+    
+    v2: Remove DRI1 from AIGLX conditionals in configure.ac [anholt]
+    
+    Reviewed-by: Eric Anholt <eric@anholt.net>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit 7f5adf73a0f9a951a6df201532b4031d38054369
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Wed Oct 2 17:38:05 2013 -0400
+
+    glx: Simplify glXDestroyContext
+    
+    We can just free the resource unconditionally here.  ContextGone (which
+    FreeResourceByType will call) already does:
+    
+        cx->idExists = GL_FALSE;
+        if (!cx->currentClient) {
+            __glXFreeContext(cx);
+        }
+    
+    Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit 53653f4889dcaea0cf67f8a4180af71eeb4b2f6b
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Mon Aug 5 15:46:11 2013 -0400
+
+    glx: Fix a corner case in DrawableGone
+    
+    Losing the drawable does not change our notion of current client.  Since
+    the GL under us doesn't understand having a current context without
+    current drawables (sigh), we do still need to loseCurrent so that we
+    re-bind the context on the next request.
+    
+    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65030
+    Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit 276d8057aa7f6e36c9c874257a6383f416c5cedd
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Sat Aug 3 09:47:55 2013 -0400
+
+    glx: Fix memory leak in context garbage collection (v2)
+    
+    I broke this, back in:
+    
+        commit a48dadc98a28c969741979b70b7a639f24f4cbbd
+        Author: Adam Jackson <ajax@redhat.com>
+        Date:   Mon Mar 21 11:59:29 2011 -0400
+    
+    	glx: Reimplement context tags
+    
+    In that, I changed the glx client state to not explicitly track the list
+    of current contexts for the client (since that was what we were deriving
+    tags from).  The bug was that I removed the code for same from
+    glxClientCallback without noticing that it had the side effect of
+    effectively de-currenting those contexts, so that ContextGone could free
+    them.  So, if you had a client exit with a context still current, the
+    context's memory would leak.  Not a huge deal for direct clients, but
+    viciously bad for indirect, since the swrast context state at the bottom
+    of Mesa is like 15M.
+    
+    Fix this by promoting Bool isCurrent to ClientPtr currentClient, so that
+    we have a back-pointer to chase when walking the list of contexts when
+    ClientStateGone happens.
+    
+    v2: Explicitly call __glXFreeContext on the ClientStateGone path.  Our
+    current context might be one we got from EXT_import_context and whose
+    creating client has since died.  Without the explicit call, the creating
+    client's FreeClientResources would not free the context because it's
+    still current, and the using client's FreeClientResources would not free
+    the context because it's not an XID it created.  This matches the logic
+    from a48dadc.
+    
+    Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit 75b362763cca8b6139582ad85e3b58f0b2e30a1c
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Oct 8 15:02:44 2013 -0400
+
+    glx: Only take a Pixmap reference if creating the GLXPixmap succeeded
+    
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit 4292a39c8014f9f4920bed3001802e4a3e523c5e
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Mon Oct 28 12:10:10 2013 +1000
+
+    Xi: fix logic error when calculating emulated motion events
+    
+    gcc -Wlogical-op
+    exevents.c: In function 'DeliverEmulatedMotionEvent':
+    exevents.c:1480:13: warning: logical 'or' of collectively exhaustive
+    tests is always true [-Wlogical-op]
+    
+    The relevant snippet of exevents.c:
+    
+    1479         if (ti->listeners[0].type != LISTENER_POINTER_REGULAR ||
+    1480             ti->listeners[0].type != LISTENER_POINTER_GRAB)
+    1481             return;
+    
+    This condition was always true, causing dropped motion events.
+    
+    Reported-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit c671e935e7c44d4711ba9588ee96cb9796b879e6
+Author: Daniel Czarnowski <daniel.czarnowski@intel.com>
+Date:   Mon Oct 21 19:48:38 2013 +0200
+
+    glx: Enable GLX_ARB_fbconfig_float for DRI2 drivers
+    
+    v2 (idr): Maintain sort order of extension list.  Fixed rebase error
+    (comment header for initializeExtensions was in front of
+    __glXDRIinvalidateBuffers).  Re-write commit message.
+    
+    Signed-off-by: Daniel Czarnowski <daniel.czarnowski@intel.com>
+    Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
+    Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
+
+commit ccc8bb1153ec669f7540a174a81a8ec0e0d6dd67
+Author: Daniel Czarnowski <daniel.czarnowski@intel.com>
+Date:   Wed Oct 23 12:53:59 2013 +0200
+
+    glx: Handle float config types in glxConvertConfigs
+    
+    Replaces old use of floatMode attribute with new, extended range of
+    values in __DRI_ATTRIB_RENDER_TYPE. Also adds new conditions, where the
+    float modes support requires it. Enables support for not only float
+    configs, but packed float configs as well.
+    
+    v2 (idr): Whitespace and formatting fixes.  Refactor render type
+    vs. pbuffer checking to a separate function that includes a quote from
+    the spec.  Re-write commit message.  Fix compiler warnings:
+    
+    glxdricommon.c: In function 'glxConvertConfigs':
+    glxdricommon.c:212:35: warning: pointer targets in passing argument 3 of 'core->getConfigAttrib' differ in signedness [-Wpointer-sign]
+    glxdricommon.c:212:35: note: expected 'unsigned int *' but argument is of type 'int *'
+    glxdricommon.c:230:35: warning: pointer targets in passing argument 3 of 'core->getConfigAttrib' differ in signedness [-Wpointer-sign]
+    glxdricommon.c:230:35: note: expected 'unsigned int *' but argument is of type 'int *'
+    
+    Signed-off-by: Daniel Czarnowski <daniel.czarnowski@intel.com>
+    Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
+    Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
+
+commit 4e5eb15b4cc170499cf87e6633c1737f0b1c514b
+Author: Daniel Czarnowski <daniel.czarnowski@intel.com>
+Date:   Mon Oct 21 19:57:53 2013 +0200
+
+    glx: Correctly set render type enum
+    
+    The type specified is bits, but the context wants an enum.
+    
+    v2 (idr): Fix various whitespace and formatting problems.  Rename
+    convFBconfRenderTypeBits2CtxRenderType to
+    renderTypeBitsToRenderTypeEnum.  Re-write commit message.
+    
+    Signed-off-by: Daniel Czarnowski <daniel.czarnowski@intel.com>
+    Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
+    Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
+
+commit eabb523aa45f3d8940cadac197ef1225fbfd5c56
+Author: Daniel Czarnowski <daniel.czarnowski@intel.com>
+Date:   Mon Oct 21 19:45:35 2013 +0200
+
+    glx: Allow float renderType in glXCreateContextAttribsARB
+    
+    This enables GLX_RGBA_FLOAT_TYPE_ARB and
+    GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT as valid renderType parameters to
+    glXCreateContextAttribsARB.
+    
+    v2 (idr) : Use C-style comments and fix word wrapping.  Re-write commit
+    message.
+    
+    Signed-off-by: Daniel Czarnowski <daniel.czarnowski@intel.com>
+    Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
+    Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
+
+commit 7ecfab47eb221dbb996ea6c033348b8eceaeb893
+Author: Eric Anholt <eric@anholt.net>
+Date:   Tue Oct 22 14:22:04 2013 -0700
+
+    glx: Add support for the new DRI loader entrypoint.
+    
+    This is going to be exposed (and not the old entrypoint) for some DRI
+    drivers once the megadrivers series lands, and the plan is to
+    eventually transition all drivers to that.  Hopefully this is
+    unobtrusive enough to merge to stable X servers so that they can be
+    compatible with new Mesa versions.
+    
+    v2: typo fix in the comment
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 83bb366e71ef41165998eed2934208f84714a37e
+Author: Strake <strake888@gmail.com>
+Date:   Thu Oct 17 23:20:20 2013 -0500
+
+    unbreak KdEnableInput
+    
+    pi = ki = 0 here, so not follow them.
+    
+    Signed-off-by: Strake <strake888@gmail.com>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 8db4121a3c7104548fd4a138ac1d1bdea5fd22d9
+Author: Keith Packard <keithp@keithp.com>
+Date:   Fri Oct 18 17:31:01 2013 -0700
+
+    Update to version 1.14.99.3
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit e3220d7bae4548bf64e5879c981ad070ac1f78f7
+Merge: 73b2660 2523a44
+Author: Keith Packard <keithp@keithp.com>
+Date:   Fri Oct 18 17:22:52 2013 -0700
+
+    Merge commit '2523a445a09a75a8baf642608d099a5e12d5437f'
+    
+    This is merging the commits along Peter's for-keith branch, without
+    also merging in the spurious merge at the top of that branch.
+
+commit f8662a133690773692dfa392ecfa3b8b56af8fa9
+Merge: 7cf1b59 2523a44
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Fri Oct 18 16:50:12 2013 +1000
+
+    Merge branch 'xsync-transition-bug-59644' into for-keith
+
+commit 2523a445a09a75a8baf642608d099a5e12d5437f
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Thu Oct 17 12:02:27 2013 +1000
+
+    sync: split updating and triggering a counter up
+    
+    Now that the brackets are always the nearest change points (regardless of
+    transition) we need to update the counters whenever we check for any updates.
+    
+    Otherwise we end up with a situation where counter->value is out of date and
+    an alarm doesn't trigger because we're still using the value from last time
+    something actually triggered.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+
+commit e57ec99b03b2ad840c384a97ab2766ce9da0f5cc
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Wed Oct 16 16:31:15 2013 +1000
+
+    sync: always set the brackets (#59644)
+    
+    The current code sets bracket_greater to the first trigger after the current
+    value, and bracket_less to the last trigger before the current value.
+    
+    For example, the idle timer with three negative and three positive transitions
+    would set this:
+    
+             nt1       nt2                 nt3
+    |--------|------|--|------- idle --|---|--|-----> t
+                   pt1                pt2    pt3
+    bracket_less == nt2
+    bracket_greater == pt2
+    
+    This is an optimization so we can skip code paths in the block/wakeup handlers
+    if the current value doesn't meet any of the trigger requirements. Those
+    handlers largely do a
+       if (bracket_less is less than current value &&
+           bracket_greater is greater than current value)
+            return, nothing to do
+    
+    However, unless the bracket values are updated at the correct time, the
+    following may happen:
+    
+                                          nt
+    |--------------|---------- idle ------|--------> t
+                   pt
+    
+    In this case, neither bracket is set, we're past the pos transition and not
+    yet at the neg transition. idle may now go past nt, but the brackets are not
+    updated. If idle is then reset to 0, no alarm is triggered for nt. Likewise,
+    idle may now go past pt and no alarm is triggered.
+    
+    Changing an alarm or triggering an alarm will re-calculate the brackets, so
+    this bug is somewhat random. If any other client triggers an alarm when the
+    brackets are wrongly NULL, the recalculation will set them this bug may not
+    appear.
+    
+    This patch changes the behavior, so that the brackets are always the nearest
+    positive or negative transitions to the current counter value. In the example
+    above, nt will trigger a wakeup and a re-calculation of the brackets, so that
+    going past it in the negative direction will then cause the proper alarm
+    triggers.
+    
+    Or, in Keith's words:
+    
+      Timer currently past a positive trigger
+          No bracket values, because no trigger in range
+    
+      Timer moves backwards before the positive trigger
+          Brackets not reset, even though there is now a trigger in range
+    
+      Timer moves forward past the positive trigger
+          Trigger doesn't fire because brackets not set
+    
+    Setting the LT bracket in this case will cause everything to get
+    re-evaluated when the sync value moves backwards before the trigger
+    value.
+    
+    X.Org Bug 59644 <http://bugs.freedesktop.org/show_bug.cgi?id=59644>
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+
+commit 06b87aa528d7a739ba20101a1f83b1a428691a01
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Wed Oct 16 10:08:46 2013 +1000
+
+    sync: if the idle time was reset, force alarms to trigger (#70476)
+    
+    The time between the idle reset and the IdleTimeWakeupHandler to be called is
+    indeterminate. Clients with an PositiveTransition or NegativeTransition alarm
+    on a low threshold may miss an alarm.
+    
+    Work around this by keeping a reset flag for each device. When the
+    WakeupHandler triggers and the reset flag is set, we force a re-calculation of
+    everything and pretend the current idle time is zero. Immediately after is the
+    next calculation with the real idle time.
+    
+    Relatively reproducible test case: Set up a XSyncNegativeTransition alarm for
+    a threshold of 1 ms. May trigger, may not.
+    
+    X.Org Bug 70476 <http://bugs.freedesktop.org/show_bug.cgi?id=70476>
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+
+commit efc1035ca958f2c9d266338a308518a0834b1773
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Wed Oct 16 09:36:01 2013 +1000
+
+    dix: provide accessor methods for the last device event time
+    
+    And now that we have the accessors, localize it. No functional changes, just
+    preparing for a future change.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+
+commit b7c9bd9cf276e92a73be57ff2ed32b47a80f13fb
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Wed Oct 16 09:21:47 2013 +1000
+
+    sync: supply the counter from IdleTimeBlockHandler
+    
+    The main idletime counter has an initialized deviceid, might as well be
+    supplying it properly. Without this, we'd only ever check the XIAllDevices
+    counter, so the wait would never be adjusted for the device-specific triggers.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+
+commit 2efe49c1029f959fe80879bcf50df42e8b80451d
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Wed Oct 16 13:01:01 2013 +1000
+
+    sync: always call BracketValues when recalculating upper/lower brackets
+    
+    Both ServertimeBracketValues and IdleTimeBracketValues copy the value into
+    there SysCounter privates. Call it for a NULL set as well, so we don't end up
+    with stale pointers and we can remove the block/wakeup handlers.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+
+commit 5c7cfd4c6978834551848e1be62af240102e39b5
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Tue Oct 15 10:11:20 2013 +1000
+
+    sync: compress two if statements
+    
+    No functional changes, just merges a > and == condition into a >= condition.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+
+commit 73b2660d7273d175d279d22f8ca0c3932a14ff1c
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Mon Sep 16 21:47:16 2013 -0700
+
+    Avoid use-after-free in dix/dixfonts.c: doImageText() [CVE-2013-4396]
+    
+    Save a pointer to the passed in closure structure before copying it
+    and overwriting the *c pointer to point to our copy instead of the
+    original.  If we hit an error, once we free(c), reset c to point to
+    the original structure before jumping to the cleanup code that
+    references *c.
+    
+    Since one of the errors being checked for is whether the server was
+    able to malloc(c->nChars * itemSize), the client can potentially pass
+    a number of characters chosen to cause the malloc to fail and the
+    error path to be taken, resulting in the read from freed memory.
+    
+    Since the memory is accessed almost immediately afterwards, and the
+    X server is mostly single threaded, the odds of the free memory having
+    invalid contents are low with most malloc implementations when not using
+    memory debugging features, but some allocators will definitely overwrite
+    the memory there, leading to a likely crash.
+    
+    Reported-by: Pedro Ribeiro <pedrib@gmail.com>
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+
+commit 8afe20d4e34adcfd29bdf43a01d55335ea2c5dba
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Mon Sep 16 21:45:29 2013 -0700
+
+    Update GLX dependencies now that DRI & DRI2 are builtins, not modules
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 2704bdb24a2c7bac65b90e05f1a68438b34ecf58
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Tue Sep 3 22:53:28 2013 -0700
+
+    DMX glxproxy: Don't allocate & copy data just to free it unused
+    
+    Two functions in the DMX glxproxy code loop over all the backend
+    screens, starting at the highest numbered and counting down to
+    the lowest.
+    
+    Previously, for each screen, the code would allocate a buffer
+    large enough to read the reply from the backend, copy that reply
+    into the buffer, and then if it wasn't the final screen, free it.
+    Only the buffer from the final screen is used, to pass on to the
+    client in the reply.
+    
+    This modifies it to just immediately discard the responses from
+    the screens as we loop through it, only doing the allocate & copy
+    work for the one buffer we pass back to the client.
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Alex Deucher <aleander.deucher@amd.com>
+
+commit 6c06c268adbab63ebe7490489aa030724cbdc54b
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sun Aug 18 18:02:49 2013 -0700
+
+    Skip damage calls if DamageCreate fails in exa functions
+    
+    Fixes parfait errors such as:
+       Null pointer dereference (CWE 476): Write to null pointer pDamage
+            at line 1833 of miext/damage/damage.c in function 'DamageRegister'.
+              Function DamageCreate may return constant 'NULL' at line 1775,
+                  called at line 232 of exa/exa_migration_mixed.c
+                  in function 'exaPrepareAccessReg_mixed'.
+              Constant 'NULL' passed into function DamageRegister,
+                  argument pDamage, from call at line 237.
+              Null pointer introduced at line 1775 of miext/damage/damage.c
+                  in function 'DamageCreate'.
+       Null pointer dereference (CWE 476): Write to null pointer pDamage
+            at line 1833 of miext/damage/damage.c in function 'DamageRegister'.
+              Function DamageCreate may return constant 'NULL' at line 1775,
+                  called at line 104 of exa/exa_mixed.c
+                  in function 'exaCreatePixmap_mixed'.
+              Constant 'NULL' passed into function DamageRegister,
+                  argument pDamage, from call at line 109.
+              Null pointer introduced at line 1775 of miext/damage/damage.c
+                  in function 'DamageCreate'.
+    
+    Checks are similar to handling results of other calls to DamageCreate.
+    
+    [ This bug was found by the Parfait 1.3.0 bug checking tool.
+      http://labs.oracle.com/pls/apex/f?p=labs:49:::::P49_PROJECT_ID:13 ]
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 7cf1b595c8c8f9776a39559d2878cf90af3f2859
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Wed Sep 4 15:34:29 2013 +1000
+
+    dix: only deliver for the current grab type
+    
+    Use the grabtype to determine which type of event to send - all other events
+    are pointless and may result in erroneous events being delivered.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 78944d62ffc7fec6f75b6f514ab7a139ba9bc77b
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Wed Sep 4 15:34:28 2013 +1000
+
+    dix: don't attempt to deliver an event for a different grabtype
+    
+    For an active grab, grab->eventMask can be either the core or the XI1 mask.
+    With the overlap of event filters, calling DeliverOneGrabbedEvent(XI1) for a
+    ProximityOut event will trigger if the client has selected for enter events -
+    the filter is the same for both.
+    
+    Thus, we end up delivering a proximity event to a client not expecting one.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 6159811a1aaf848016dbfa7bde68df097027870c
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Wed Sep 4 15:34:27 2013 +1000
+
+    include: change grabtypes to start at 1
+    
+    Avoid erroneous detection of an unset grabtype as CORE
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit be6ea80b79b3d6eb97106ea142e01acbdf059995
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Wed Sep 4 15:34:26 2013 +1000
+
+    dix: only allow button and key events to freeze a sync'd pointer
+    
+    If a client calls XAllowEvents(SyncPointer) it expects events as normal until
+    the next button press or release event - that freezes the device. An e.g.
+    proximity event must thus not freeze the pointer.
+    
+    As per the spec, only button and key events may do so, so narrow it to these
+    cases.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 93a27b2dd0d7ed51120f42456a91a7c59902ebc2
+Author: Michele Baldessari <michele@acksyn.org>
+Date:   Sun Sep 15 19:30:38 2013 +0100
+
+    Xephyr: restore cursor visibility
+    
+      Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=69388
+    
+    Commit c100211034ab69ce453a1644fb61c6808d7e3eda (dix: only show the cursor
+    if a window defines one (#58398)) broke the default cursor behaviour in
+    Xephyr (unless run with -retro). Restore the default cursor visibility
+    so that '-retro' or '-host-cursor' are not needed to have a visible
+    cursor.
+    
+    Signed-off-by: Michele Baldessari <michele@acksyn.org>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    
+    as of ba387cf21f7d95987211f75d8024601e7d64e322 "ephyr: Use host (HW) cursors
+    by default." this only applies if -sw-cursor is given on the cmdline.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 70efc799cbeec26f19831b3b14c0d4646198a077
+Author: Michele Baldessari <michele@acksyn.org>
+Date:   Sun Sep 15 19:56:34 2013 +0100
+
+    Fix Xephyr compilation when DEBUG is enabled
+    
+    When DEBUG is enabled Xephyr compilation fails:
+    ephyrdriext.c:343:133: error: 'is_ok' undeclared (first use in this
+    function)
+         EPHYR_LOG("leave. is_ok:%d\n", is_ok);
+    
+    Just reemove bogus is_ok variable.
+    
+    Signed-off-by: Michele Baldessari <michele@acksyn.org>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 5ac4bfca64bd75474e550b26bc1195a5ca245752
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Sep 10 14:18:18 2013 -0400
+
+    input: calloc minimization for xi2mask_new
+    
+    There's no reason to do this as (nmasks + 2) callocs, and it's a
+    surprisingly hot path.  Turns out you hit this ~once per passive grab,
+    and you do a few bajillion passive grab changes every time you enter or
+    leave the overview in gnome-shell.  According to a callgrind of Xorg
+    with gnome-shell-perf-tool run against it:
+    
+    Ir before: 721437275
+    Ir after:  454227086
+    
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+    Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 44d502c6f1d03a9e548f0941cde0228b6fde8394
+Author: Jon TURNEY <jon.turney@dronecode.org.uk>
+Date:   Sun Oct 6 16:45:52 2013 +0100
+
+    hw/xwin: Fix for "glx: Remove screen number from __GLXconfig"
+    
+    Fix compilation after commit c3c976f54c3c282d6fa6c8360688e036bc43d210 "glx:
+    Remove screen number from __GLXconfig"
+    
+    Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+    Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit 6a9bd103cb993e873cb82664b677ceed73c0bd85
+Merge: ea3b7db 8aae28e
+Author: Keith Packard <keithp@keithp.com>
+Date:   Mon Oct 7 17:29:38 2013 -0700
+
+    Merge remote-tracking branch 'jeremyhu/master'
+
+commit ea3b7db4b747f883ef7b8b524ee13bf8a63add14
+Author: Emil Velikov <emil.l.velikov@gmail.com>
+Date:   Mon Oct 7 18:29:25 2013 +0100
+
+    configure.ac: Include missing proto declarations in SDK_REQUIRED_MODULES
+    
+    Commits a1d41e311c21e, 7d859bd87834d & 3ed2c6e11298c made extinit.h require
+    the XF86 Big Font, XRes & ScrnSaver proto headers, but failed to add them
+    to the SDK_REQUIRED_MODULES so pkg-config would find them for driver builds.
+    
+    Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
+    Reviewed-by: Daniel Stone <daniel@fooishbar.org>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 8aae28e3cbdd49bfa8d940a4a517c94a53b94f86
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Sun Oct 6 09:20:45 2013 -0700
+
+    XQuartz: Dont't set screen on __GLXConfig
+    
+    Fixes regression introduced by c3c976f54c3c282d6fa6c8360688e036bc43d210
+    
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+
+commit c5f8eb968efa970201712105a1ac880b517e7b6d
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Sun Oct 6 09:18:15 2013 -0700
+
+    rootless: Use miCopyRegion instead of fbCopyRegion
+    
+    Fixes regression introduced by e657635dbe6b92875b0e88370557c2cbab673a49
+    
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+
+commit ccbe17b1c6da1ad9d085fc8133cdd15dc7004a4a
+Author: Pino Toscano <toscano.pino@tiscali.it>
+Date:   Wed Aug 28 17:15:03 2013 +0200
+
+    os: move <arpa/inet.h> for any !win32 system
+    
+    It is needed in IPv6 configurations (for inet_pton) also when
+    SIOCGIFCONF is not defined.
+    
+    Signed-off-by: Pino Toscano <toscano.pino@tiscali.it>
+    Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
+    Signed-off-by: Julien Cristau <jcristau@debian.org>
+
+commit c079b8e675dd2762c9e07fe5d8c07612299dceb7
+Author: Pino Toscano <toscano.pino@tiscali.it>
+Date:   Wed Aug 28 17:04:48 2013 +0200
+
+    xfree86/hurd: include <hurd.h>
+    
+    Needed for using get_privileged_port.
+    
+    Signed-off-by: Pino Toscano <toscano.pino@tiscali.it>
+    Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
+    Signed-off-by: Julien Cristau <jcristau@debian.org>
+
+commit f0659a7f68a5a334879af01a6a63742eab1bf5de
+Author: Keith Packard <keithp@keithp.com>
+Date:   Fri Oct 4 16:44:46 2013 -0700
+
+    Bump version to 1.14.99.2
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit f2d149b6d10edea7233d93c7e19f71decf11dc62
+Author: Keith Packard <keithp@keithp.com>
+Date:   Fri Oct 4 16:43:41 2013 -0700
+
+    kdrive/ephyr: Remove duplicate ephyrExtensions and ephyrExtensionInit decls
+    
+    These were duplicated when GLX support was re-added on two different branches.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit e0a678f0596f3547b98d74d5f0438b484b059458
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Sat Sep 28 15:26:38 2013 -0400
+
+    xfree86: add a comment as to why the logdir is created
+    
+    Without the logdir, the xserver will write the content of the log file on the
+    terminal stating that it cannot be written and will stop.
+    
+    Refer to https://bugs.freedesktop.org/show_bug.cgi?id=3889
+    
+    Reviewed-By:  Matt Dew <marcoz@osource.org>
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 5bdbf2dba3f7da4a593b286020eab0c7857e940c
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Sat Sep 28 15:26:37 2013 -0400
+
+    xfree86: Use $(MKDIR_P) for better code portability
+    
+    Still true that we should not use the lower case $(mkdir_p) version.
+    However, remove the 2005 comment as the MKDIR_P is widely used now.
+    
+    Reviewed-By:  Matt Dew <marcoz@osource.org>
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit b8cfb0dc8426754b477b561bc158b8a24c143ddf
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Sat Sep 28 15:26:36 2013 -0400
+
+    Uninstall X link and CYGWIN libXorg.exe.a in local install targets
+    
+    It is our duty to uninstall any files and/or directories that we installed
+    through install-data-local and install-exec-hook.
+    
+    Currently the X symbolic link to Xorg remains on disk after running
+    make uninstall.
+    
+    Note the exception for logdir which is usually shared by other modules.
+    
+    Reviewed-By:  Matt Dew <marcoz@osource.org>
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 35a528e49269c3df75486cc606e51a8c1c083c06
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Sat Sep 28 15:26:35 2013 -0400
+
+    Xorg binary: use install-exec-hook rather than install-exec-local
+    
+    The former was explicitly designed to execute additional code after the binary
+    has been installed. The latter can be executed in any order, hence it's
+    current dependency on install-binPROGRAMS as a workaround.
+    
+    The CYGWIN libXorg.exe.a target is an installation target rather than
+    a post-installation one, so it should not be done as a hook. It does not depend
+    on the Xorg executable being installed.
+    
+    Automake:
+    "These hooks are run after all other install rules of the appropriate type,
+    exec or data, have completed. So, for instance, it is possible to perform
+    post-installation modifications using an install hook".
+    
+    "With the -local targets, there is no particular guarantee of execution order;
+    typically, they are run early, but with parallel make, there is no way
+    to be sure of that".
+    
+    Reviewed-by: Eric Anholt <eric@anholt.net>
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit a1d87576a30008253eb0cc92b44c9718f6665062
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Sat Sep 28 15:26:34 2013 -0400
+
+    Use $(LN_S) provided by AC_PROG_LN_S macro to create links
+    
+    For better code portability.
+    
+    Reviewed-By:  Matt Dew <marcoz@osource.org>
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 28c8e1910797970dbf1d40794f1804a8fcc812bc
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Sat Sep 28 15:26:33 2013 -0400
+
+    The Xorg binary is missing the extension $(EXEEXT) in the makefile
+    
+    This is not a problem on UNIX platforms, but on CYGWIN it creates a broken
+    link to Xorg rather than a link to Xorg.exe.
+    
+    From the CYGWIN log on tinderbox, we can see that the executable Xorg.exe is
+    installed correctly. We can see the command used to create the link:
+    
+    (cd /jhbuild/install/[...]/install/bin && rm -f X && ln -s Xorg X)
+    
+    Note that the "relink" makefile target correctly appends $(EXEEXT) to Xorg.
+    
+    Reviewed-By:  Matt Dew <marcoz@osource.org>
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit f3b529bf25db2700addbafc7aa4fc5b126ba9929
+Merge: 4399bd3 abc2bfc
+Author: Keith Packard <keithp@keithp.com>
+Date:   Fri Oct 4 14:04:48 2013 -0700
+
+    Merge remote-tracking branch 'anholt/ephyr-fixes'
+
+commit 4399bd38326b81f7b92365346504d7c6354772a9
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Mon Sep 30 13:30:46 2013 -0400
+
+    miext/shadow: missing c2p_core.h breaks "make distcheck" target.
+    
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 9ccb4a63982942fdce19609d2cadbd8e51708462
+Merge: 5d2ec69 da5e201
+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: 7d3d4ae 6ee4d9f
+Author: Keith Packard <keithp@keithp.com>
+Date:   Fri Oct 4 13:50:04 2013 -0700
+
+    Merge remote-tracking branch 'ajax/xserver-next'
+
+commit da5e20127a5b6e11a47eb6e61f3ea87b056cdf5f
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Thu Sep 19 19:13:35 2013 -0400
+
+    test: add new os executable to .gitignore
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit c73c36b537f996574628e69681833ea37dec2b6e
+Author: Laércio de Sousa <lbsousajr@gmail.com>
+Date:   Wed Sep 18 13:42:17 2013 -0300
+
+    xserver: enable InputClass option "GrabDevice" by default for non-seat0 seats (#69478)
+    
+    This patch contributes to fill the remaining gaps which make
+    systemd-multi-seat-x wrapper still necessary in some multiseat setups.
+    
+    This also replaces previous evdev patch that does the same thing
+    for that particular driver.
+    
+    When option "-seat" is passed with an argument different from "seat0",
+    option "GrabDevice" for input devices is enabled by default
+    (no need of enabling it in xorg.conf's "InputClass" section).
+    
+    Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=69478
+    
+    Signed-off-by: Laércio de Sousa <lbsousajr@gmail.com>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 160c2db32d0b9ee5316a44179a6af4f4722e3d0a
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Wed Sep 18 16:04:44 2013 +1000
+
+    dmx: provide enough space for axis mappings
+    
+    relmap/absmap is used as a evdev-axis-to-x-axis mapping. ABS_X maps to
+    axis 0, ABS_Y to 1, etc. skipping over non-existing axes so that the third bit
+    set in the ABS_* range is axis 2, and so on. This requires us to actually have
+    enough space to have all the ABS_*/REL_* range.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 7d3d4ae55dd6ee338439e2424ac423b1df80501b
+Author: Keith Packard <keithp@keithp.com>
+Date:   Fri Sep 20 14:43:41 2013 -0500
+
+    damage: Must translate initial window damage by window offset
+    
+    Damage is reported relative to the drawable origin, but the window
+    borderClip is absolute. Translate the region by the window position
+    before reporting damage to adjust.
+    
+    Reported-by: Adam Jackson <ajax@redhat.com>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit 8010d3a48bd0b224dcb0883e39c2351ad364d846
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Sun Sep 15 08:10:33 2013 -0700
+
+    XQuartz: pbproxy: Fix build with -DDEBUG
+    
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+
+commit 39c548da0cf0522ad246630605b96751ab6d39c0
+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date:   Sun Sep 15 08:07:44 2013 -0700
+
+    XQuartz: Fix build with moved pseudoramiX
+    
+    Regression from: e716baedc4d8e52a60f43ef21aba771b340d8c8b
+    
+    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+    Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+
+commit 6ee4d9f94ae2cc27c39381d7554134d9b4807a65
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Jul 9 11:19:11 2013 -0400
+
+    glx: Fill in some missing attributes from DoGetFBConfigs
+    
+    Reviewed-by: Eric Anholt <eric@anholt.net>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit b257fabff00ae925bb7e70364dd1d738634087c9
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Thu Jul 4 10:31:40 2013 -0400
+
+    glx: Remove a dead comment
+    
+    Reviewed-by: Eric Anholt <eric@anholt.net>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit abd086502123086ce3d1fba25c159bb022d2750f
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Mon Jul 8 17:01:13 2013 -0400
+
+    glx: Catch another failure case in drawable creation
+    
+    Reviewed-by: Eric Anholt <eric@anholt.net>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit c3c976f54c3c282d6fa6c8360688e036bc43d210
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Mon Jul 8 12:28:56 2013 -0400
+
+    glx: Remove screen number from __GLXconfig
+    
+    Not used.  There's no real reason to match against this instead of
+    matching against fbconfig or visual ID anyway.
+    
+    Reviewed-by: Eric Anholt <eric@anholt.net>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit 1d1484e9bd55d1fa8316b1574754f28d5d31a076
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Mon Jul 8 12:09:13 2013 -0400
+
+    glx: Remove pixmapMode from __GLXconfig
+    
+    This has never been filled in with anything meaningful afaict, and you
+    can't get to it from the client in any event.
+    
+    Reviewed-by: Eric Anholt <eric@anholt.net>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit 34e6e60105796ad015469c10921c5ff09acf7eb0
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Jul 2 12:33:36 2013 -0400
+
+    glx: Remove support for NV_vertex_program and NV_fragment_program
+    
+    Mesa doesn't implement these anymore, never really did outside of swrast
+    anyway.
+    
+    Reviewed-by: Eric Anholt <eric@anholt.net>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit acf14c1de766c4ea206cd7ce7f25b780a589d33c
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Jul 2 10:35:19 2013 -0400
+
+    glx: realloc style fix in RenderLarge
+    
+    Reviewed-by: Eric Anholt <eric@anholt.net>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit 9ebf739a6864c9ec38bf72f63ef2e3b9cd1951db
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Jul 2 10:30:40 2013 -0400
+
+    glx: Eliminate a small malloc from QueryContext
+    
+    No reason to have that be a failure path.
+    
+    Reviewed-by: Eric Anholt <eric@anholt.net>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit b99f7975407f111b99d772cd28224d7dc1b34fe4
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Fri Nov 9 18:05:27 2012 -0500
+
+    glx: Handle failure to create the pixmap backing the pbuffer
+    
+    We happen not to sanitize the width/height we pass to CreatePixmap here,
+    oops.  It's not exploitable, but it's certainly a crash, so let's just
+    throw BadAlloc instead.
+    
+    Reviewed-by: Eric Anholt <eric@anholt.net>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit 22fbfdcb31f335c22053a0e29f0e73c03cd70a76
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Fri Nov 9 17:52:12 2012 -0500
+
+    glx: Implement GLX_PRESERVED_CONTENTS drawable attribute
+    
+    We back pixmaps with pbuffers so they're never actually clobbered.  Say
+    so when asked.
+    
+    Reviewed-by: Eric Anholt <eric@anholt.net>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit 2e20b8382cdf37ae5a2802f85b8f06a370f9645d
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Fri Nov 9 17:12:49 2012 -0500
+
+    glx: Implement GLX_FBCONFIG_ID in GetDrawableAttributes
+    
+    Required by GLX 1.4, section 3.3.6, "Querying Attributes".
+    
+    Reviewed-by: Eric Anholt <eric@anholt.net>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit 0d76191baeee005982754ac18ca995742e32d8c1
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Fri Nov 9 17:10:57 2012 -0500
+
+    glx: Implement GLX_{WIDTH,HEIGHT} in GetDrawableAttributes
+    
+    Required by GLX 1.4, section 3.3.6, "Querying Attributes".
+    
+    Reviewed-by: Eric Anholt <eric@anholt.net>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit d11f13e383dda1e9cabe32793d261d46edc44418
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Fri Nov 9 17:07:20 2012 -0500
+
+    glx: Compute number of attributes in GetDrawableAttributes on the fly
+    
+    This doesn't have any effect yet, but is needed to properly build the
+    reply for pbuffers.
+    
+    Reviewed-by: Eric Anholt <eric@anholt.net>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit 468b57324f838144d79e3a9d85a0bde853578c4b
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Fri Nov 9 16:48:16 2012 -0500
+
+    glx: Style fixes
+    
+    Reviewed-by: Eric Anholt <eric@anholt.net>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit 2b181ad0952851f47f23dcb1a36471685313c13e
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Fri Nov 9 16:33:54 2012 -0500
+
+    glx: Pull GLX vendor string out of __GLXscreen
+    
+    Given how we're currently implementing GLX this can't meaningfully vary
+    per-screen.
+    
+    Reviewed-by: Eric Anholt <eric@anholt.net>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit b9c489cf13e1ad35b7d9bea9de8d85e929374d17
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Wed Oct 31 10:05:24 2012 -0400
+
+    glx: Remove unused bits from the context struct
+    
+    Reviewed-by: Eric Anholt <eric@anholt.net>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit f579cc85c29f52b575c62e6ae1e16eb87c506bd3
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Thu Jul 4 10:08:40 2013 -0400
+
+    glxproxy: Don't track GLCLientm{aj,in}orVersion
+    
+    Basically just a port of 62f06b0d to glxproxy.
+    
+    Reviewed-by: Eric Anholt <eric@anholt.net>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit e549ffb5f19cf044bc3e2d368a6f081f8b84bfaa
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Oct 30 18:20:43 2012 -0400
+
+    dmx/glx: Remove unused __glXNop
+    
+    Reviewed-by: Eric Anholt <eric@anholt.net>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit d962b8ed272d4a8921c0dadf16cd926484e30d10
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Thu Aug 22 16:42:23 2013 -0400
+
+    damageext: Style fix
+    
+    Reviewed-by: Eric Anholt <eric@anholt.net>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit c90add0f1ce0c85aea7a60635de765848d778266
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Wed Aug 21 11:57:24 2013 -0400
+
+    damage: Remove "post-rendering" hooks
+    
+    This is a revert of 974db58f5b730c3770ee461665a02dd4334d1dea.  There are
+    no consumers of this API, we must not need it.
+    
+    Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
+    Reviewed-by: Eric Anholt <eric@anholt.net>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit 0f3f8e4295d4c05f33b93e0ffd2f6f8cd5759bf7
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Wed Aug 21 11:13:11 2013 -0400
+
+    damage: Don't rewrite Text ops to GlyphBlt ops
+    
+    There's no particularly good reason to, and it breaks Xnest.
+    
+    Bugzilla: http://bugs.freedesktop.org/2454
+    Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
+    Reviewed-by: Eric Anholt <eric@anholt.net>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit d08966227e7d567df8d26eebc80f35f886e59a4a
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Mon Aug 26 14:03:51 2013 -0400
+
+    damage: Simplify DamageUnregister
+    
+    You can only register one drawable on a given damage, so there's no
+    reason to require the caller to specify the drawable, the damage is
+    enough.  The implementation would do something fairly horrible if you
+    _did_ pass mismatched drawable and damage, so let's avoid the problem
+    entirely.
+    
+    v2: Simplify xf86RotateDestroy even more [anholt]
+    
+    Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
+    Reviewed-by: Eric Anholt <eric@anholt.net>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit 28708a045de7d9043d20fb06b61c44a46eb5526b
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Mon Aug 26 13:52:14 2013 -0400
+
+    damage: Implicitly unregister on destroy
+    
+    There's no reason not to, and it simplifies quite a few callers.
+    
+    Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
+    Reviewed-by: Eric Anholt <eric@anholt.net>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit e657635dbe6b92875b0e88370557c2cbab673a49
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Thu Oct 18 14:24:23 2012 -0400
+
+    fb: Remove unused compatibility wrappers
+    
+    Originally added in early 2009, not being used elsewhere anymore.
+    
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit e4b15125bb06c97f1f34f7074fcdb597e718399c
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Thu Oct 18 14:24:22 2012 -0400
+
+    mipointer: Remove deprecated miPointerCurrentScreen
+    
+    The only remaining use was in some debugging code in DMX.
+    
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit b5d66b9513a0f1e13f5c5bc9e0958f4eac9bf6c3
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Thu Oct 18 14:24:21 2012 -0400
+
+    xfree86: Remove deprecated unimplemented xf86MapReadSideEffects
+    
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit abbd85742a390e18497b96902a0c0d976739e3bd
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Thu Oct 18 14:24:20 2012 -0400
+
+    dix: FIXES is not optional
+    
+    It's already not optional at configure time, this just makes it so at
+    build time too.
+    
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit dff81687f5eac3eac9b49f58d4654cc30add2547
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Thu Oct 18 14:24:19 2012 -0400
+
+    vbe: Don't try to load the ddc submodule
+    
+    DDC is built into the server now.
+    
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit bb82191bcfa8042f8d98ec8b1c6616dc31d2c5c8
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Thu Oct 18 14:24:18 2012 -0400
+
+    misprite: Delete some dead private storage
+    
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit 3639ab4ce25dc82a3f8592b7322198f1d2aca5f9
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Oct 16 14:56:25 2012 -0400
+
+    dri2: Don't bother with xf86LoaderCheckSymbol("DRI2Connect")
+    
+    The DRI2 code is now built-in to the server, even for Xorg.  The only
+    thing this could protect against is trying to run a libglx built with
+    DRI2 support against an Xorg built without it, which is firmly in
+    "doctor it hurts when I do this" territory.
+    
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit 13b507409f9e01adebba50e7eb801b52e52692ba
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Oct 16 14:56:23 2012 -0400
+
+    list: Avoid using X types
+    
+    In particular, Bool.  This is not an ABI break:
+    
+    /usr/include/X11/Xdefs.h:typedef int Bool;
+    
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit dbe10ef0e35659ee0e5db73f29670a3894a3e3f5
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Oct 16 14:56:22 2012 -0400
+
+    dbe: Fold the window private private into the window private
+    
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit 1489637d567b0034a916f88079b5f360e7fce99c
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Oct 16 14:56:21 2012 -0400
+
+    dbe: Fold midbe reset into dix
+    
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit 44d770750069486a8452fb2384f9b85745268e61
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Oct 16 14:56:20 2012 -0400
+
+    dbe: Drop the unused idiom support
+    
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit 8cce0cf4d378f6fa52bc2cd277737b8986ab683c
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Oct 16 14:56:19 2012 -0400
+
+    damage: Remove the 'damage window' resource type.
+    
+    Note that the existing code never actually creates a resource of this
+    type, so it can't possibly do anything.  This is clearly meant to track
+    window destruction and clean up any associated Damages, but that's
+    already handled by miext/damage's DestroyWindow wrapper.
+    
+    Previous discussion:
+    http://lists.freedesktop.org/archives/xorg-devel/2011-March/020847.html
+    
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit e674815e0a217ac01ec2d6a8517f8466b27fb39f
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Oct 16 14:56:18 2012 -0400
+
+    dmx: Remove ShadowFB support
+    
+    This has been listed as deprecated ever since DMX was merged.
+    
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit 19d3a7cb5db3188210830efa746987ba50d839e9
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Oct 16 14:56:17 2012 -0400
+
+    dix: Remove a dead parameter from DoGetImage
+    
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit 4dca026880da90cff9734cf5787c5b57c02e7310
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Oct 16 14:56:16 2012 -0400
+
+    mipointer: Remove EnqueueEvent from miPointerScreenFuncRec
+    
+    No DDX overrode this, and we never actually called through that slot
+    anyway.
+    
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit ad076dc6e82019defa422500710b3b42c6309e39
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Oct 16 14:56:15 2012 -0400
+
+    mipointer: Flatten calls to mieqSwitchScreen
+    
+    No DDX was overriding this.
+    
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit e2b14a1d3bb27e86ff1d7aaf59af850d06263ef5
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Oct 16 14:56:14 2012 -0400
+
+    os: Factor out some common code in input buffer handling
+    
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit 65fca558848acd907483d3c85c7cd4db5560f1b4
+Author: Radek Doulik <rodo@novell.com>
+Date:   Tue Aug 13 08:45:47 2013 +0200
+
+    xnest: Ignore GetImage() error in xnestGetImage()
+    
+    When an Xnest instance is not viewable it will crash when a client in
+    that instance calls GetImage. This is because the Xnest server will
+    itself receives a BadMatch error.
+    This patch ignores the error. The application which has requested the
+    image will receive garbage - this however is fully legal according
+    to the specs as obscured areas will always contain garbage if there
+    isn't some sort of backing store as discussed in
+    https://bugs.freedesktop.org/show_bug.cgi?id=9488
+    The applied patch is a version from Dadek Doulik.
+    
+    v2: Call XSync() before changing error handlers as suggested by
+        Daniel Stone <daniel@fooishbar.org>.
+    
+    Reviewed-by: Daniel Stone <daniel@fooishbar.org>
+    Signed-off-by: Egbert Eich <eich@freedesktop.org>
+
+commit b902c8abb6d03e68c93e13881a350523b5ac900c
+Author: Michal Srb <msrb@novell.com>
+Date:   Tue Aug 6 16:56:53 2013 +0200
+
+    Xnest: Implement xnestModifyPixmapHeader
+    
+    Xnest variant of ModifyPixmapHeader that creates new Pixmap in parent X
+    server if it's size is modified from 0x0 to anything bigger.
+    
+    xnestCreatePixmap doesn't create pixmap in parent X server if it has
+    dimensions 0x0. If it is later resized and accessed, Xnest will be
+    aborted with BadDrawable error from parent X server because it will
+    use XID 0. This happens with ScratchPixmap, for example as used from
+    XaceCensorImage. Applications using XACE crash Xnest.
+    
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit 132507eba93e4dfd466d5c30c9b818cdc6f8536e
+Author: Peter Harris <pharris@opentext.com>
+Date:   Mon Jul 15 19:44:45 2013 -0400
+
+    security: Don't count RetainPermanent clients twice
+    
+    If a RetainPermanent client is subsequently killed by a KillClient
+    request, the reference count is decremented twice. This can cause the
+    server to prematurely kill other clients using the same Authorization.
+    
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+    Signed-off-by: Peter Harris <pharris@opentext.com>
+
+commit 20c2a3bcb11b5baf564e2c73a477ba23f5ae2b10
+Author: Peter Harris <pharris@opentext.com>
+Date:   Mon Jul 15 19:44:29 2013 -0400
+
+    mi: Avoid stack smash when drawing dashed lines
+    
+    X.org Bug 54013 <https://bugs.freedesktop.org/show_bug.cgi?id=54013>
+    
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+    Signed-off-by: Peter Harris <pharris@opentext.com>
+
+commit 9bf46610a9d20962854016032de4567974e87957
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date:   Fri Jun 21 22:58:31 2013 +0100
+
+    os: Immediately queue initial WriteToClient
+    
+    If we immediately put the WriteToClient() buffer into the socket's write
+    queue, not only do we benefit from sending the response back to client
+    earlier, but we also avoid the overhead of copying the data into our own
+    staging buffer and causing extra work in the next select(). The write is
+    effectively free as typically we may only send one reply per client per
+    select() call, so the cost of the FlushClient() is the same.
+    
+    shmget10:   26400 -> 110000
+    getimage10: 25000 -> 108000
+    
+    shmget500:   3160 -> 13500
+    getimage500: 1000 -> 1010
+    
+    The knock-on effect is that on a mostly idle composited desktop, the CPU
+    overhead is dominated by the memmove in WriteToClient, which is in turn
+    eliminated by this patch.
+    
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+
+commit ceffb34774d44ada83cc1994d20c8d65b46bd555
+Author: Laurent Carlier <lordheavym@gmail.com>
+Date:   Sat Jun 8 00:43:56 2013 +0200
+
+    ephyr: restore GLX support
+    
+    It was removed since version 1.13
+    
+    Signed-off-by: Sebastien Bacher <seb128@ubuntu.com>
+    Acked-by: Daniel Stone <daniel@fooishbar.org>
+
+commit f37972f4a67b49ba9649310a6778bd1bf31e0130
+Author: Keith Packard <keithp@keithp.com>
+Date:   Wed Apr 24 14:58:27 2013 -0700
+
+    miext/sync: Fix multi-screen support in SyncFence initialization
+    
+    miSyncSetup was checking to see if the screen private key had been
+    registered, and if so, skipping the setup of the provided screen.
+    
+    Instead, it should register the private index only once, but then
+    initialize the screen unless it has already been initialized. This
+    latter step allows drivers to initialize the sync private structures
+    before the Sync extension itself is initialized.
+    
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 1c8beedfe4343377fa3504f8ab71430cc137b22c
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Wed Aug 21 14:12:52 2013 -0400
+
+    randr: Fix a copypasta bug in CRTC confinement
+    
+    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit 47ff382d1fce25a8b097d45b79489e891f1f1228
+Merge: 6f89ae3 3752a81
+Author: Keith Packard <keithp@keithp.com>
+Date:   Mon Sep 9 15:13:42 2013 -0700
+
+    Merge remote-tracking branch 'jturney/master'
+
+commit 6f89ae3e64c4dfeea508813e546c10ba1da3ea8e
+Author: Thomas Klausner <wiz@NetBSD.org>
+Date:   Wed Sep 4 20:06:07 2013 +0200
+
+    Fix typo in configure warning.
+    
+    Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 47218a6e09549781fd61dbf5e0d3d5c81da64323
+Author: Thomas Klausner <wiz@NetBSD.org>
+Date:   Wed Sep 4 20:05:51 2013 +0200
+
+    Fix bug in cursor handling.
+    
+    CreateCursor (Xlib call XCreatePixmapCursor) with a non-bitmap
+    source pixmap and a None mask is supposed to error out with BadMatch,
+    but didn't.
+    
+    From der Mouse <mouse@Rodents-Montreal.ORG>, changed following
+    comments by Alan Coopersmith <alan.coopersmith@oracle.com>.
+    
+    Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
+    Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 1110b71e360195aab040d835b54540ab558638c5
+Author: Chris Clayton <chris2553@googlemail.com>
+Date:   Wed Sep 4 15:42:04 2013 +1000
+
+    kdrive: fix build error on gcc 4.8 for out-of-bounds array access
+    
+    I'm getting a error building xorg-server-1.14.1.902 with thelatest snapshot
+    of gcc-4.8:
+    
+    input.c:225:43: error: array subscript is above array bounds
+    [-Werror=array-bounds]
+    
+    This is because kdNumInputFds can become equal to KD_MAX_INPUT_FDS in
+    KdRegisterFd(). This means that in KdUnregisterFd(), kdInputFds[j + 1] can
+    be beyond the end of the array.
+    
+    Signed-off-by: Chris Clayton <chris2553@googlemail.com>
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit abc2bfca16adcd1e5657d4ce54f4e1335d5ed53f
+Author: Sebastien Bacher <seb128@ubuntu.com>
+Date:   Fri Aug 23 21:21:44 2013 +0200
+
+    kdrive: initialize GLX for xephyr
+    
+    Like commit ac1a60e7b6f06fd075cc5bf55d6bc67206a01d29, re-add
+    initialization of GLX after it was accidentally dropped from non-Xorg
+    servers in 5f5bbbe543f65c48ecbb5cce80116a86ca3fbe86.
+    
+    Signed-off-by: Sebastien Bacher <seb128@ubuntu.com>
+    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=62346
+    Reviewed-by: Eric Anholt <eric@anholt.net>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+
+commit aa5534ec6931ffcc81cca76b98785d57de8e0e52
+Author: Eric Anholt <eric@anholt.net>
+Date:   Fri Aug 23 11:23:00 2013 -0700
+
+    ephyr: Do grab/ungrab for ctrl+shift, not just shift+ctrl.
+    
+    Given that the window title says "ctrl+shift", having pressing those
+    keys in that order not ungrab you is fairly mean.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+
+commit 5cc15e1c427bacd73db7381df3474a23f7616624
+Author: Eric Anholt <eric@anholt.net>
+Date:   Fri Aug 23 11:19:17 2013 -0700
+
+    ephyr: Flush the X connection when updating the window title.
+    
+    Otherwise when you're doing the ctrl-shift mouse grab thing, you
+    don't know what state you're in until the next rendering occurs.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+
+commit ba387cf21f7d95987211f75d8024601e7d64e322
+Author: Eric Anholt <eric@anholt.net>
+Date:   Fri Aug 23 11:17:14 2013 -0700
+
+    ephyr: Use host (HW) cursors by default.
+    
+    Unless you're working on the sw cursor rendering code, you surely want
+    to have real hardware cursors.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+
+commit 0f5a2f13dc284dd5f0f28e2c4323b2e08d253a7d
+Author: Eric Anholt <eric@anholt.net>
+Date:   Fri Aug 23 11:04:22 2013 -0700
+
+    ephyr: Garbage collect some DOA host window clipping code.
+    
+    Introduced in 79782726617d4b5a4f9b376f21936d035fc870e1 but never used.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+
+commit 090de17d361dc9828203a2562565d6499998db46
+Author: Eric Anholt <eric@anholt.net>
+Date:   Fri Aug 23 10:56:22 2013 -0700
+
+    ephyr: Garbage collect some dead XV clipping code.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+
+commit 347d0fa6961c2b3dc4efd4e7cca8ef98cd3ea06e
+Author: Eric Anholt <eric@anholt.net>
+Date:   Fri Aug 23 10:44:23 2013 -0700
+
+    ephyr: Remove the helper libs for each of the optional components.
+    
+    Note that EXTRA_DIST was always unnecessary, because automake notices
+    conditional compile of source files and includes them.
+    
+    Copyright header is added because git noted that this was a 61%
+    rewrite.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+
+commit 74dff87790dbb3dcb23634f1e8cd54018e5ddc9d
+Author: Eric Anholt <eric@anholt.net>
+Date:   Fri Aug 23 10:40:52 2013 -0700
+
+    ephyr: Remove the remaining bits of host/server XV split.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+
+commit 2f994dfe9d1add9ea8cb9c88ddb0d15843854788
+Author: Eric Anholt <eric@anholt.net>
+Date:   Fri Aug 23 10:14:36 2013 -0700
+
+    ephyr: Remove the host/server split of the actual XV video operations.
+    
+    I suspect there's more cleanup possible in ephyrHostXVPutImage() by
+    sticking a bunch of the args in the port priv earlier.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+
+commit 0b7ce74315213ccd31802847e5a83e67090ded14
+Author: Eric Anholt <eric@anholt.net>
+Date:   Fri Aug 23 10:01:23 2013 -0700
+
+    ephyr: Remove another host/server split for XV image formats.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+
+commit 1dcc28bcb402d7286d18b41b469062a5c176d7eb
+Author: Eric Anholt <eric@anholt.net>
+Date:   Thu Aug 22 17:00:41 2013 -0700
+
+    ephyr: Remove the host/server split for video encodings.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+
+commit 28a37757e11068b4594f4128a0d64c6bc9a53ee0
+Author: Eric Anholt <eric@anholt.net>
+Date:   Thu Aug 22 17:26:21 2013 -0700
+
+    ephyr: Remove the host/server split for XV formats.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+
+commit 41134d393a37dd5b971b018a3888fbfea0b9c736
+Author: Eric Anholt <eric@anholt.net>
+Date:   Thu Aug 22 17:21:37 2013 -0700
+
+    ephyr: Remove the host/server split for XV attributes.
+    
+    v2: Fix leaks of xcb replies (caught by Julien)
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+
+commit 1342a93c49beb6e4924534304119d57fa587ad0f
+Author: Eric Anholt <eric@anholt.net>
+Date:   Thu Aug 22 17:26:08 2013 -0700
+
+    ephyr: Remove the host/server split for XV adaptors.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+
+commit fad79d2e3e53de4f25b3d1dd7accb558464a4a46
+Author: Eric Anholt <eric@anholt.net>
+Date:   Sun Aug 18 20:08:32 2013 +0200
+
+    ephyr: Refactor XV adaptor feature detection.
+    
+    This obviously wanted a helper function beforehand, but even more so
+    now that we have XCB.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+
+commit 7a9c311add62026972419ef0b04a55680072bfeb
+Author: Eric Anholt <eric@anholt.net>
+Date:   Sun Aug 18 20:02:53 2013 +0200
+
+    ephyr: Remove some pointless indirection in the XV code.
+    
+    Now that we have XCB on the server side, we don't need to split these
+    functions out.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+
+commit 46cf6bf5692ef751ec9d17ae2292565d4b13f14b
+Author: Eric Anholt <eric@anholt.net>
+Date:   Sun Aug 18 18:38:29 2013 +0200
+
+    ephyr: Move event processing into ephyr.c.
+    
+    No more extra event structure to translate between hostx.c and
+    ephyr.c!
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+
+commit 847c856effde482c13cdefcdca8176cee3bf67c4
+Author: Eric Anholt <eric@anholt.net>
+Date:   Sun Aug 18 17:28:08 2013 +0200
+
+    ephyr: Move the host screen info into the kdrive screen private.
+    
+    We can include xcb bits from the same place as server headers, so
+    there's no need to hide them any more.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+
+commit 8dadc78e233f341f1ecb8d404de03d98ab210620
+Author: Eric Anholt <eric@anholt.net>
+Date:   Sun Aug 18 16:45:06 2013 +0200
+
+    ephyr: Rename and use the proper type for what was host_screen->info.
+    
+    Now that we can include server headers in talking to host X, we don't
+    need to hide any more.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+
+commit 18d836f6dde46bcac8b794d34f76032688c28851
+Author: Eric Anholt <eric@anholt.net>
+Date:   Sun Aug 18 14:12:45 2013 +0200
+
+    ephyr: Expose a single function for detecting extensions.
+    
+    v2: Fix trying to include xcb-dri in the non-dri-build case (Noted by
+        Julien)
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+
+commit 3aacb22d6473480c31fb08f0b2527747dbf5be57
+Author: Eric Anholt <eric@anholt.net>
+Date:   Sun Aug 18 14:01:53 2013 +0200
+
+    ephyr: Drop dead ephyrHostAtomToLocal code.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+
+commit 4aaad0bfbcef018eb36839b1d034c3f60022694a
+Author: Julien Cristau <jcristau@debian.org>
+Date:   Wed Oct 20 20:10:43 2010 +0200
+
+    Xephyr: we're not using Xlib anymore, no need to undef _XSERVER64
+    
+    Drop obsolete comments about interaction between Xlib code and that
+    macro, and stop undefining it.
+    
+    Signed-off-by: Julien Cristau <jcristau@debian.org>
+    Reviewed-by: Eric Anholt <eric@anholt.net>
+
+commit 0fc2f9f04a44599f598380d4df992bec60c0e3a1
+Author: Julien Cristau <jcristau@debian.org>
+Date:   Sat Sep 25 16:05:07 2010 +0200
+
+    Xephyr: handle errors in event loop
+    
+    Signed-off-by: Julien Cristau <jcristau@debian.org>
+    Reviewed-by: Eric Anholt <eric@anholt.net>
+    Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
+
+commit 3309a73c826f02c4b2e14180a3254546314ec323
+Author: Julien Cristau <jcristau@debian.org>
+Date:   Fri Jun 25 14:20:57 2010 +0100
+
+    Xephyr: drop remaining Xlib dependency
+    
+    Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
+    Reviewed-by: Eric Anholt <eric@anholt.net>
+    Signed-off-by: Julien Cristau <jcristau@debian.org>
+
+commit 7da2174cf93f59b7e0372a6dc9d37a510076e187
+Author: Julien Cristau <jcristau@debian.org>
+Date:   Mon Jun 21 14:39:03 2010 +0100
+
+    Xephyr: move glx code to xcb
+    
+    v2: Rebase on master, notably adding XCB for
+        X_GLXvop_MakeCurrentReadSGI (anholt).
+    v3: Fix use-after-free (caught by Julien).
+    
+    Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> (v1)
+    Signed-off-by: Julien Cristau <jcristau@debian.org>
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+
+commit 19c2699b954e2978301c4449dfccc7ca40bf6ae6
+Author: Julien Cristau <jcristau@debian.org>
+Date:   Wed Jun 23 18:36:00 2010 +0100
+
+    Xephyr: remove unused DRI1 code
+    
+    Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
+    Signed-off-by: Julien Cristau <jcristau@debian.org>
+
+commit 68b7db19e8d3c1ac55a811327d3058f4c8fb45ec
+Author: Julien Cristau <jcristau@debian.org>
+Date:   Sun Jun 20 00:07:08 2010 +0100
+
+    Xephyr: move ephyrdri over to xcb
+    
+    Require new xcb-xf86dri to get fixed GetDrawableInfo.
+    
+    Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
+    Signed-off-by: Julien Cristau <jcristau@debian.org>
+
+commit aea119cd05807ed77336f96a40f8e4607c6ce169
+Author: Julien Cristau <jcristau@debian.org>
+Date:   Sun Jun 20 11:13:26 2010 +0100
+
+    Xephyr: use xcb-xv instead of libXv
+    
+    v2: Massive, conflict-filled rebase.  I think I resolved everything
+        right, but this host xv code makes my eyes bleed.  Touch-tested XV
+        after the rebase (anholt).
+    
+    Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> (v1)
+    Signed-off-by: Julien Cristau <jcristau@debian.org>
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+
+commit 3ea75a59d5fec3c4099388724942e216f2344328
+Author: Julien Cristau <jcristau@debian.org>
+Date:   Mon Jun 21 17:20:32 2010 +0100
+
+    Xephyr: use xcb for event handling
+    
+    v2: Rebase on indentation changes, squash in a simpler variant of the
+        later event compression patch, fix server hang or segfault on
+        window close by reimplementing the x_io_error_handler in the new
+        XCB event loop (anholt).
+    
+    Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> (v1)
+    Signed-off-by: Julien Cristau <jcristau@debian.org>
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+
+commit ff26845252889f7cc3258a0d3aa116189acc6aae
+Author: Julien Cristau <jcristau@debian.org>
+Date:   Thu Jun 24 23:45:16 2010 +0100
+
+    Xephyr: some more hostx.c xcb-ification
+    
+    Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
+    Reviewed-by: Eric Anholt <eric@anholt.net>
+    Signed-off-by: Julien Cristau <jcristau@debian.org>
+
+commit 9b55f76a265aab0d9943a40208a38800e5782ba5
+Author: Julien Cristau <jcristau@debian.org>
+Date:   Thu Jun 24 23:35:15 2010 +0100
+
+    Xephyr: move HostX.visual to xcb
+    
+    Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
+    Reviewed-by: Eric Anholt <eric@anholt.net>
+    Signed-off-by: Julien Cristau <jcristau@debian.org>
+
+commit 126312fb4a6e06024a306341e675163108426390
+Author: Julien Cristau <jcristau@debian.org>
+Date:   Thu Jun 24 23:26:48 2010 +0100
+
+    Xephyr: replace XKeycodeToKeysym with xcb-keysyms
+    
+    Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
+    Reviewed-by: Eric Anholt <eric@anholt.net>
+    Signed-off-by: Julien Cristau <jcristau@debian.org>
+
+commit 8543d3fdfd47d2a0423f3ef8e7429c23c5d6b053
+Author: Julien Cristau <jcristau@debian.org>
+Date:   Thu Jun 24 23:17:32 2010 +0100
+
+    Xephyr: delete unused hostx_get_extension_info function
+    
+    v2: Also remove the prototype (anholt)
+    
+    Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> (v1)
+    Signed-off-by: Julien Cristau <jcristau@debian.org>
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+
+commit d72c11b9df4a98fd80cb6635d34964483e33bc41
+Author: Julien Cristau <jcristau@debian.org>
+Date:   Mon Jun 21 14:25:11 2010 +0100
+
+    Xephyr: delete unused proxy code
+    
+    Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
+    Reviewed-by: Eric Anholt <eric@anholt.net>
+    Signed-off-by: Julien Cristau <jcristau@debian.org>
+
+commit a71ea3f96769da157dde82a591e43264820772ac
+Author: Julien Cristau <jcristau@debian.org>
+Date:   Sun Jun 20 23:34:54 2010 +0100
+
+    Xephyr: xcb-ify visual list construction
+    
+    Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
+    Reviewed-by: Eric Anholt <eric@anholt.net>
+    Signed-off-by: Julien Cristau <jcristau@debian.org>
+
+commit ac2b0348c00d692ec1bd8d6c8ab99e9198e755a7
+Author: Julien Cristau <jcristau@debian.org>
+Date:   Sun Jun 20 23:34:39 2010 +0100
+
+    Xephyr: xcb-ify pointer/keyboard grab
+    
+    Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
+    Reviewed-by: Eric Anholt <eric@anholt.net>
+    Signed-off-by: Julien Cristau <jcristau@debian.org>
+
+commit 1f93e6b350d1b9a058009052a666a2e8796708cb
+Author: Julien Cristau <jcristau@debian.org>
+Date:   Sun Jun 20 23:34:03 2010 +0100
+
+    Xephyr: no need for XDisplayKeycodes
+    
+    Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
+    Reviewed-by: Eric Anholt <eric@anholt.net>
+    Signed-off-by: Julien Cristau <jcristau@debian.org>
+
+commit 73398e5bf61c30e69a40a19a1057c2263fbb91ef
+Author: Julien Cristau <jcristau@debian.org>
+Date:   Thu Jun 24 23:00:38 2010 +0100
+
+    Xephyr: use xcb-shape instead of XShape*
+    
+    Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
+    Reviewed-by: Eric Anholt <eric@anholt.net>
+    Signed-off-by: Julien Cristau <jcristau@debian.org>
+
+commit a2b73da78de4e627965213d24a6c33f243a60eb6
+Author: Julien Cristau <jcristau@debian.org>
+Date:   Sun Jun 20 00:05:40 2010 +0100
+
+    Xephyr: start converting hostx.c over to xcb
+    
+    v2: Dropped the hostx_load_keymap changes, now that that function is
+        gutted (anholt).
+    
+    Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> (v1)
+    Signed-off-by: Julien Cristau <jcristau@debian.org>
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+
+commit 762606b4cdfb57c5202ae128ce4dbb8afe172d4e
+Author: Julien Cristau <jcristau@debian.org>
+Date:   Fri Jun 25 17:59:13 2010 +0100
+
+    Xephyr: stop loading the host's keymap
+    
+    This isn't used anywhere.
+    
+    v2: Rebase to the top of the patch series (anholt)
+    
+    Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> (v1)
+    Signed-off-by: Julien Cristau <jcristau@debian.org>
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+
+commit 3752a815800626ae93f64a856f5889aa6636344e
+Author: Marc Haesen <marha@users.sourceforge.net>
+Date:   Sat Aug 10 17:38:38 2013 +0100
+
+    hw/xwin: Remove unnecessary and incorrect HWND casts
+    
+    Signed-off-by: Marc Haesen <marha@users.sourceforge.net>
+    Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+    Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
+
+commit 34932cef6cc800fbdf2f375506057ed8cd1e07f6
+Author: Jon TURNEY <jon.turney@dronecode.org.uk>
+Date:   Mon Apr 1 13:43:00 2013 +0100
+
+    hw/xwin: Fix compilation of winauth.c with -Werror=implicit-function-declaration
+    
+    /jhbuild/checkout/xorg/xserver/hw/xwin/winauth.c: In function ‘MitGenerateCookie’:
+    /jhbuild/checkout/xorg/xserver/hw/xwin/winauth.c:87:5: error: implicit declaration of function ‘MitAddCookie’ [-Werror=implicit-function-declaration]
+    
+    Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+    Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
+    Reviewed-by: Marc Haesen <marha@users.sourceforge.net>
+
+commit 2a08554a0bf80b862c15676c31ecd463b616518c
+Author: Jon TURNEY <jon.turney@dronecode.org.uk>
+Date:   Mon Jun 17 23:54:01 2013 +0100
+
+    hw/xwin: Remove unused extern g_fUseUnicode from winclipboardwndproc.c
+    
+    Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk
+    Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
+    Reviewed-by: Marc Haesen <marha@users.sourceforge.net>
+
+commit 69401f38a697c941ea58351028f4cd4b810f9188
+Author: Jon TURNEY <jon.turney@dronecode.org.uk>
+Date:   Mon Jun 17 18:37:26 2013 +0100
+
+    hw/xwin: Remove unneeded forward declaration of winProcessXEventsTimeout()
+    
+    Remove unneeded forward declaration of winProcessXEventsTimeout(), the actual
+    definition immediately follows.
+    
+    Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+    Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
+    Reviewed-by: Marc Haesen <marha@users.sourceforge.net>
+
+commit 9c45a1ad44f12ac25e1c3b7a18a3bceb85a2cf38
+Author: Jon TURNEY <jon.turney@dronecode.org.uk>
+Date:   Mon Jun 17 16:58:47 2013 +0100
+
+    hw/xwin: Remove prototype for non-existent winDeinitClipboard()
+    
+    Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+    Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
+    Reviewed-by: Marc Haesen <marha@users.sourceforge.net>
+
+commit acc46fc217352b94f77a6b5b14808ea89875a2a1
+Author: Jon TURNEY <jon.turney@dronecode.org.uk>
+Date:   Mon Jun 17 00:40:13 2013 +0100
+
+    hw/xwin: Remove unused externs from winclipboardwrappers.c
+    
+    Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+    Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
+    Reviewed-by: Marc Haesen <marha@users.sourceforge.net>
+
+commit fcc7767f8cd6c318861b1060ef6a3936750a0dd2
+Author: Jon TURNEY <jon.turney@dronecode.org.uk>
+Date:   Mon Jun 10 17:31:12 2013 +0100
+
+    hw/xwin: Remove unused winProcQueryTreeOrig variable
+    
+    Unused since 47c7b6d3e626497747ae2780f259a15b8e6c846f "Remove no-longer needed
+    tricks used to prevent the clipboard client from being killed"
+    
+    Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+    Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
+    Reviewed-by: Marc Haesen <marha@users.sourceforge.net>
+
+commit 8fa882a980abea6f05b4b59447a187aea2c793a1
+Author: Jon TURNEY <jon.turney@dronecode.org.uk>
+Date:   Sat Aug 10 12:41:07 2013 +0100
+
+    hw/xwin: Fix ARGB cursor conversion on x86_64
+    
+    Fix erroneous use of unsigned long * for lpBits in winXCursorToHCURSOR() which
+    leads to ARGB cursors being vertically streched on x86_64 by interleaving blank
+    rows of pixels.
+    
+    Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+    Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
+    Reviewed-by: Marc Haesen <marha@users.sourceforge.net>
+
+commit 4bfb2dce5eea4923eaf86eca33b96087b28235f5
+Author: Jon TURNEY <jon.turney@dronecode.org.uk>
+Date:   Sun Apr 7 23:59:44 2013 +0100
+
+    hw/xwin: Fix an issue in winSetSpansNativeGDI() identifed by -Warray-bounds
+    
+    The BITMAPINFO local only has room for a single RBGQUAD in bmiColors, but we
+    access two (black and white for a mono-color DIB).  Fix by changing to a dynamic
+    allocation big enough for a BITMAPINFO and a RGBQUAD.
+    
+    Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+    Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
+    Reviewed-by: Marc Haesen <marha@users.sourceforge.net>
+
+commit 784c006adb22c6693ad30dd0b1b05369cfaa7b5e
+Author: Jon TURNEY <jon.turney@dronecode.org.uk>
+Date:   Sat Aug 10 11:55:23 2013 +0100
+
+    hw/xwin: Fix -Warray-bounds warning in winXCursorToHCURSOR()
+    
+    Rewrite winXCursorToHCURSOR() so access to BITMAPINFO bmiColors member doesn't
+    trigger an -Warray-bounds warning.
+    
+    Note that the underlying storage is allocated as a BITMAPV4HEADER, so has
+    sufficent room for the extra RGBQUADs bmiColors after the BITMAPINFO bmiHeader.
+    
+    wincursor.c: In function 'winSetCursor':
+    wincursor.c:293:24: error: array subscript is above array bounds [-Werror=array-bounds]
+    wincursor.c:294:24: error: array subscript is above array bounds [-Werror=array-bounds]
+    wincursor.c:295:24: error: array subscript is above array bounds [-Werror=array-bounds]
+    wincursor.c:296:24: error: array subscript is above array bounds [-Werror=array-bounds]
+    wincursor.c:297:24: error: array subscript is above array bounds [-Werror=array-bounds]
+    wincursor.c:298:24: error: array subscript is above array bounds [-Werror=array-bounds]
+    wincursor.c:299:24: error: array subscript is above array bounds [-Werror=array-bounds]
+    wincursor.c:300:24: error: array subscript is above array bounds [-Werror=array-bounds]
+    
+    Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+    Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
+    Reviewed-by: Marc Haesen <marha@users.sourceforge.net>
+
+commit 41d03c9ccce665b919b180bbb819b78c750aa325
+Author: Marc Haesen <marha@users.sourceforge.net>
+Date:   Fri Aug 2 18:19:22 2013 +0100
+
+    hw/xwin: Correct size of _WINDOWSWM_NATIVE_HWND property on x86_64
+    
+    Use the correct size of a HWND on x86_64 in XChangeProperty() and
+    XGetWindowProperty() calls for the _WINDOWSWM_NATIVE_HWND property.
+    
+    Signed-off-by: Marc Haesen <marha@users.sourceforge.net>
+    Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+    Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
+
+commit 390cfec10ef7d52391f890c7593ac82a7d77d856
+Author: Colin Harrison <colin.harrison@virgin.net>
+Date:   Fri Aug 9 16:48:12 2013 +0100
+
+    hw/xwin: Correct winprefs.c function signatures for x64.
+    
+    Correct SetupRootMenu(), SetupSysMenu(), HandleCustomWM_INITMENU() and
+    HandleCustomWM_COMMAND() function signatures which use unsigned long parameters,
+    where just a specific HWND or HMENU handle type should have been used.
+    
+    Signed-off-by: Colin Harrison <colin.harrison@virgin.net>
+    Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+    Reviewed-by: Marc Haesen <marha@users.sourceforge.net>
+
+commit e716baedc4d8e52a60f43ef21aba771b340d8c8b
+Author: Jon TURNEY <jon.turney@dronecode.org.uk>
+Date:   Sat Mar 31 14:42:45 2012 +0100
+
+    Move pseudoramiX code where it can be shared between Xwin and Xquartz
+    
+    Move pseudoramiX code to a separate top-level directory.  Link Xwin and Xquartz
+    with libPseudoramiX
+    
+    I'm not sure moving this to a top-level directory is appropriate, but I'm not
+    sure where else it fits.
+    
+    Future work: pseudoramiX can probably be consolidated with the rrxinerama code
+    (which I think provides fake xinerama data when real XINERAMA is disabled and we
+    only have one screen)
+    
+    v2: fix distcheck
+    
+    Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+    Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
+    Reviewed-by: Marc Haesen <marha@users.sourceforge.net>
+
+commit ce0217b98261dcf8b20cfb743831965dda1950ec
+Author: Jon TURNEY <jon.turney@dronecode.org.uk>
+Date:   Sat Aug 10 12:35:55 2013 +0100
+
+    hw/xwin: Fix winglobals.h for MinGW64 build
+    
+    Include pthread.h in winglobals.h to fix build with latest MinGW64 headers
+    
+    In file included from
+    winmultiwindowicons.c:47:0:
+    winglobals.h:92:1: error: unknown type name ‘pthread_mutex_t’
+    
+    Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+    Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
+    Reviewed-by: Marc Haesen <marha@users.sourceforge.net>
+
+commit b27756dbe6a1be4633ec47a8fe92a4c217f68f93
+Author: Jon TURNEY <jon.turney@dronecode.org.uk>
+Date:   Sun Aug 11 12:15:11 2013 +0100
+
+    hw/xwin: Fix inclusion of shlobj.h in MinGW64 build
+    
+    Fix build with latest MinGW64 headers by wrapping Status type in shlobj.h as well
+    
+    In file included from InitOutput.c:51:0:
+    /usr/i686-w64-mingw32/sys-root/mingw/include/shlobj.h:1231:44: error: expected identifier or ‘(’ before ‘int’
+    /usr/i686-w64-mingw32/sys-root/mingw/include/shlobj.h:1248:44: error: expected identifier or ‘(’ before ‘int’
+    
+    Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+    Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
+    Reviewed-by: Marc Haesen <marha@users.sourceforge.net>
+
+commit 94d4e29aedc69431fa9b299ca1b67947173d7a24
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Mon Aug 26 15:51:46 2013 +1000
+
+    Xi: allow for XIAllowEvent requests larger than XI < 2.2 size (#68554)
+    
+    XIAllowEvents changed length in XI 2.2 (for the touchid). A bug in libXi
+    causes libXi to always use the new request length if the server supports
+    2.2, regardless of the client's XIQueryVersion request.
+    
+    The server takes the client's XIQueryVersion request into account though,
+    resulting in a BadLength error if a 2.[0,1] client calls XIAllowEvents on a
+    XI 2.2+ server.
+    
+    Can't fix this in libXi, so work around this in the server.
+    
+    X.Org Bug 68554 <http://bugs.freedesktop.org/show_bug.cgi?id=68554>
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit 82939e02392cbb880313fe92957091ff89ce2f2b
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Fri Aug 16 15:30:59 2013 +1000
+
+    dix: check for grab type before checking XI2 mask
+    
+    if the grab type isn't XI2, grab->xi2mask is random. That random data may
+    have the enter/leave mask set, leading to events sent to the client that the
+    client can't handler.
+    
+    Source of these errors:
+      _xgeWireToEvent: Unknown extension 131, this should never happen.
+    
+    Simplest reproducer:
+       Start Xephyr, press button inside window, move out. As the pointer leaves
+       the Xephyr window, the errors appear.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit 16894df1ffb6fe21bf723dd954578e8d934799ca
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Fri Aug 16 10:55:09 2013 +1000
+
+    Xi: replace loop with memset
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit 8f2292b683f591052da2fe94fb3831a3c9a5aa61
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Fri Aug 16 11:05:49 2013 +1000
+
+    include: wrap EMASKSIZE in parentheses
+    
+    Otherwise things like EMASKSIZE * foo will yield interesting results.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit d803f296c616ccf55711cf0af9e7d3eae2edda16
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Fri Aug 23 09:04:01 2013 +1000
+
+    test: fix the gcc diagnostics pragma
+    
+    pop without push restores the commandline options. The proper way is to
+    push, then ignore, then pop.
+    
+    And while we're at it, change the pop argument to a comment - pop ignores
+    the argument, but be proper about it.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 05ea6307fa4f0bee3d3bf536396059f3906791a0
+Author: Egbert Eich <eich@freedesktop.org>
+Date:   Fri Aug 16 19:52:16 2013 +0200
+
+    DIX/Xi: Pass correct client to CheckDeviceGrabAndHintWindow()
+    
+    If we have a client which has registered for a DeviceButton grab
+    be sure to pass this to CheckDeviceGrabAndHintWindow(). Since the
+    order of clients is arbitrary there is no guarantee that the last
+    client in the list is the one that belongs to this class.
+    
+    Signed-off-by: Egbert Eich <eich@freedesktop.org>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit e01a3f65d3e6d92f92ef2992b338cc9625bde082
+Author: Eric Anholt <eric@anholt.net>
+Date:   Sat Aug 17 14:50:37 2013 +0200
+
+    ephyr: Fix warning about XID vs unsigned long * by changing function args
+    
+    There's no reason to pass the data back out to the caller, since the
+    caller was dropping it on the floor.  The original data is a CARD32,
+    so no need to mess with weird unsigned longs.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+
+commit f1cefe020bd21c07dfcc9f204e79939499abbd35
+Author: Eric Anholt <eric@anholt.net>
+Date:   Sat Aug 17 14:38:08 2013 +0200
+
+    ephyr: Drop is_ok logging.
+    
+    The only cases that lead to !is_ok are already EPHYR_LOG_ERROR, and it
+    fixes set-but-unused compiler warnings.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+
+commit 77c7a2014e3942b55c0b78308edf02eab33f2e60
+Author: Eric Anholt <eric@anholt.net>
+Date:   Sat Aug 17 14:36:09 2013 +0200
+
+    kdrive: Fix const cast warnings in arguments processing.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+
+commit 7107937e473a3557c37d719cb100b2e9b09075dd
+Author: Eric Anholt <eric@anholt.net>
+Date:   Sat Aug 17 13:11:17 2013 +0200
+
+    kdrive: Fix const cast warnings in driver name handling.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+
+commit 56c405d46a86853771a0b808da4c8a9ef626960c
+Author: Eric Anholt <eric@anholt.net>
+Date:   Sat Aug 17 13:07:23 2013 +0200
+
+    kdrive: Fix a few easy cast warnings.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+
+commit a9c48a07eea50468fa47ab178cdd91edb0b5727f
+Author: Eric Anholt <eric@anholt.net>
+Date:   Sat Aug 17 13:06:23 2013 +0200
+
+    kdrive: Drop dead code.
+    
+    This is unused as of the introduction of a helper in
+    e7150db5350bc2113ff4126019b489847a4dc217
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+
+commit 873ae962bdb7559c952b5955ba262285701982a8
+Author: Eric Anholt <eric@anholt.net>
+Date:   Sat Aug 17 13:01:57 2013 +0200
+
+    ephyr: Fix dead code warning.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+
+commit 34af2eebe19e2f8afe35a5614d4d44fa4fd89d6b
+Author: Eric Anholt <eric@anholt.net>
+Date:   Sat Aug 17 13:01:32 2013 +0200
+
+    ephyr: Fix const-cast warnings for setting window title.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+
+commit 7edf5066db48434739ac64e0576fbb4fdf0f37f9
+Author: Eric Anholt <eric@anholt.net>
+Date:   Sat Aug 17 12:54:33 2013 +0200
+
+    ephyr: Fix const cast warnings in ephyrhostvideo.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+
+commit fe7463b8ce0de301c2f82b108c93963424f77219
+Author: Julien Cristau <jcristau@debian.org>
+Date:   Sat Jul 27 12:09:07 2013 +0200
+
+    dix: add missing include for DeleteWindowFromAnySelections
+    
+    Fixes build error with XACE disabled:
+    window.c:886:5: error: implicit declaration of function 'DeleteWindowFromAnySelections' [-Werror=implicit-function-declaration]
+         DeleteWindowFromAnySelections(pWin);
+         ^
+    
+    Debian bug#701372
+    
+    Reported-by: Matthias Klose <doko@debian.org>
+    Signed-off-by: Julien Cristau <jcristau@debian.org>
+    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 6a49f8836a649322d38a364d9ae084be40fb2305
+Author: Keith Packard <keithp@keithp.com>
+Date:   Sat Aug 17 12:17:36 2013 +0200
+
+    Add .dir-locals.el
+    
+    Enforce X.org style with an emacs configuration file
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit f67d022523c59a27f3bf8791aa9ca6624318b1fd
+Merge: 5a36cdd 9680f6a
+Author: Keith Packard <keithp@keithp.com>
+Date:   Tue Aug 6 07:12:12 2013 +0200
+
+    Merge commit '9680f6a12d642c2e4bfa09bf459d678214059d74'
+
+commit 5a36cdd91530d27627e39159a89b53f9fbb75280
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Mon Aug 5 20:46:45 2013 -0700
+
+    Allow disabling XFree86-DGA, DRI, VidModeExtension extensions
+    
+    Code to recognize these in extension enable/disable options was wrapped
+    in #ifdef XorgLoader, but that's not defined when building miinitext.c
+    since the great module merge of 1.13.  Change to an #ifdef that is defined.
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Robert Hooker <robert.hooker@canonical.com>
+    Reviewed-by: Daniel Stone <daniel@fooishbar.org>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 9680f6a12d642c2e4bfa09bf459d678214059d74
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Tue Aug 6 13:14:56 2013 +1000
+
+    xfree86: de-duplicate some AM_CPPFLAGS
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit bbef8e46f2fed8f823ee4b97e96c3fcee28f3b75
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Tue Aug 6 13:08:13 2013 +1000
+
+    Replace INCLUDES with AM_CPPFLAGS
+    
+    newer automake gets quite noisy about this.
+    hw/xfree86/ddc/Makefile.am:7: warning:
+    'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
+    and many more of these.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit c218ba8423a73a7a643cb17789db8a1dd0901ca6
+Author: Julien Cristau <jcristau@debian.org>
+Date:   Fri Aug 2 20:07:36 2013 +0200
+
+    xfree86: improve check for posix saved ids
+    
+    Replace hardcoded SVR4 || linux || CSRG_BASED with an autoconf check and
+    the _POSIX_SAVED_IDS macro.
+    
+    Suggested-by: Mark Kettenis <mark.kettenis@xs4all.nl>
+    Signed-off-by: Julien Cristau <jcristau@debian.org>
+    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Mark Kettenis <kettenis@openbsd.org>.
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 930c6ff15d437dfb0f897e8cb4253abba70819cc
+Author: Julien Cristau <jcristau@debian.org>
+Date:   Fri Aug 2 23:46:00 2013 +0200
+
+    test: include dix-config.h in hashtabletest.c
+    
+    Missing _XSERVER64 define caused inconsistent sizeof(XID) between the
+    test and hashtable code, leading to test failures on 64bit big endian
+    archs like s390x or ppc64.
+    
+    Signed-off-by: Julien Cristau <jcristau@debian.org>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit b6e5c4669e0db391966deb397e8c975ec7f0124d
+Author: Maarten Lankhorst <maarten.lankhorst@canonical.com>
+Date:   Tue Jul 30 15:31:24 2013 +0200
+
+    test/xi2: fix protocol-xiqueryversion test
+    
+    The old code was broken and allowed setting client version >= XIVersion,
+    this was fixed in the previous patch, but updating the value for XIVersion
+    broke the tests, so fix the tests too.
+    
+    Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 500e844a24962c9e70abb3d614f1973013b2de73
+Author: Maarten Lankhorst <maarten.lankhorst@canonical.com>
+Date:   Tue Jul 30 14:45:21 2013 +0200
+
+    Xi: Clamp XIClient maximal version to XIVersion
+    
+    Do not allow setting client version to an arbitrary value >= XIVersion.
+    Fixes a test error with test/xi2/protocol-xiqueryversion.c, introduced by
+    commit 4360514d1c "Xi: Allow clients to ask for 2.3 and then 2.2 without failing"
+    
+    Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit e1ab8f239bdc6af17ef6cd0e9c6187c4e2e2f5bc
+Author: Dave Airlie <airlied@redhat.com>
+Date:   Wed Jul 31 11:35:44 2013 +1000
+
+    xfree86/man: document AutoAddGPU
+    
+    This at least mentions AutoAddGPU and hints at when you might
+    want to disable it.
+    
+    Signed-off-by: Dave Airlie <airlied@redhat.com>
+    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit ff38bbe81ace85bf675bbaa0a9ca5f3b32ede449
+Merge: bdd1e22 4360514
+Author: Keith Packard <keithp@keithp.com>
+Date:   Thu Jul 25 22:50:27 2013 -0700
+
+    Merge remote-tracking branch 'whot/for-keith'
+
+commit 4360514d1cc8e3132f93f56172d291074e8c770f
+Author: Keith Packard <keithp@keithp.com>
+Date:   Wed Jul 10 22:42:55 2013 -0700
+
+    Xi: Allow clients to ask for 2.3 and then 2.2 without failing
+    
+    This allows different sub-systems within the same application to
+    request different Xi versions without either getting old behaviour
+    everywhere or simply failing with a BadValue.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit bdd1e22cbde9ea2324e4e1991c9e152f22f88151
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date:   Tue Apr 30 14:14:23 2013 -0700
+
+    xfree86: detach scanout pixmaps when detaching output GPUs
+    
+    Commit 8f4640bdb9d3988148e09a08d2c7e3bab1d538d6 fixed a bit of a
+    chicken-and-egg problem by detaching GPU screens when their providers
+    are destroyed, which happens before CloseScreen is called.  However,
+    this created a new problem: the GPU screen tears down its RandR crtc
+    objects during CloseScreen and if one of them is active, it tries to
+    detach the scanout pixmap then.  This crashes because
+    RRCrtcDetachScanoutPixmap tries to get the master screen's screen
+    pixmap, but crtc->pScreen->current_master is already NULL at that
+    point.
+    
+    It doesn't make sense for an unbound GPU screen to still be scanning
+    out its former master screen's pixmap, so detach them first when the
+    provider is destroyed.
+    
+    Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
+    Reviewed-by: Dave Airlie <airlied@redhat.com>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 3d8756631070c440cefa31b35fea3d407f187810
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Mon Jul 22 13:43:07 2013 +1000
+
+    dix: set the valuator mask to ensure XI 1.x events have data
+    
+    XI 1.x only allows for first + num valuators, so if a device sends data for
+    valuators 0 and 2+ only (i.e. valuator 1 is missing) we still need to get
+    the data for that from somewhere.
+    XI 1.x uses the hack of an unset valuator mask to get the right coordinates,
+    i.e. we set the value but don't set the mask for it so XI2 events have the
+    right mask.
+    
+    For an absolute device in relative mode, this broke in b28a1af55cf, the
+    value was now always 0. This wasn't visible on the cursor, only in an XI 1.x
+    client. The GIMP e.g. sees jumps to x/0 every few events.
+    
+    Drop the condition introduced in b28a1af55cf, data in valuators is always
+    absolute, regardless of the mode.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 4fb686d6a6777950f0e0d55b848cd2af4cbad372
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Wed Jul 24 11:50:00 2013 +1000
+
+    dix: check the xi2mask, not the grab type for touch listeners
+    
+    grab->type is only non-zero for passive grabs. We're checking an active grab
+    here, so we need to check if the touch mask is set on the grab.
+    
+    Test case: grab the device, then start two simultaneous touches. The
+    grabbing client won't see the second touchpoints because grab->type is 0
+    and the second touch is not an emulating pointer.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 43ac0491e36cdbb716b5c9d39c97d0aba3bebd75
+Author: Jon TURNEY <jon.turney@dronecode.org.uk>
+Date:   Mon Apr 8 01:28:36 2013 +0100
+
+    hw/xwin: Fix numerous 64-bit format/type cast issues with debug printing of pointers
+    
+    Numerous pieces of debug output cast a pointer to an int and then use a "%08x"
+    printf format.
+    
+    Use "%p" format for 64-bit portability.
+    
+    Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+    Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
+
+commit e95bb97073ca77193e4c51bd1504403fbe245533
+Author: Colin Harrison <colin.harrison@virgin.net>
+Date:   Tue Jun 25 21:34:43 2013 +0100
+
+    hw/xwin: Fix possible crash in winMultiWindowGetClassHint
+    
+    Fix a possible crash in winMultiWindowGetClassHint() when an application doesn't
+    null terminate the WM_CLASS property class name (which is an ICCCM conformance
+    bug in the application)
+    
+    (Reported for running the contiki cooja simulator in multiwindow mode, although
+    it seems that many Java clients may have this problem, see [1])
+    
+    Based on a patch by Marc Haesen.
+    
+    v2: Avoid using strnlen() which is missing on MinGW
+    v3: Align with Xming patch
+    
+    [1] http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6961123
+    
+    Signed-off-by: Colin Harrison <colin.harrison@virgin.net>
+    Reviewed-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
+    Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+
+commit 4bc375aa2f08bd092f60d3e358d345fc9a0d3637
+Author: Jon TURNEY <jon.turney@dronecode.org.uk>
+Date:   Tue Jun 18 19:21:02 2013 +0100
+
+    hw/xwin: Remove obsolete WIN_XEVENTS_SHUTDOWN
+    
+    Remove obsolete WIN_XEVENTS_SHUTDOWN.  This event is never generated.
+    
+    (I think the idea was to listen for WM_DELETE_WINDOW, but that's not a very
+    useful thing to do for a hidden window.)
+    
+    Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+    Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
+
+commit 2663203cd6994166e107e796c4724a4ed3b59370
+Author: Jon TURNEY <jon.turney@dronecode.org.uk>
+Date:   Tue Jun 18 18:03:05 2013 +0100
+
+    configure.ac: Check for python at configure time when building XWin with AIGLX
+    
+    Check for python at configure time when building XWin with AIGLX, it's used to
+    generate the wrapper code for native GL functions.
+    
+    Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+    Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
+
+commit 9fe360bf2be5c959fb21835955ef550098ccbbf0
+Author: Jon TURNEY <jon.turney@dronecode.org.uk>
+Date:   Sun Jun 16 00:07:57 2013 +0100
+
+    hw/xwin: Avoid a null dereference if CreateDIBSection() fails in NetWMToWinIconAlpha()
+    
+    Avoid a null dereference of DIB_pixels if CreateDIBSection() fails in
+    NetWMToWinIconAlpha()
+    
+    Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+    Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
+
+commit 71b5f56302bbd8be62f63f0dd62cbcd33aab3ac5
+Author: Jon TURNEY <jon.turney@dronecode.org.uk>
+Date:   Thu Feb 21 17:12:17 2013 +0000
+
+    hw/xwin: Handle WM_MOUSEHWHEEL
+    
+    Handle WM_MOUSEHWHEEL tilt wheel messages, similarly to WM_MOUSEWHEEL scroll
+    wheel messages, to generate X button 6 and 7 presses and releases.
+    
+    Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+    Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
+
+commit cf9c777ee094d660e0c95559373fd23ee910362e
+Author: Jon TURNEY <jon.turney@dronecode.org.uk>
+Date:   Thu Feb 21 17:10:45 2013 +0000
+
+    hw/xwin: Map extra mouse buttons 1 and 2 to X buttons 8 and 9
+    
+    Map extra mouse buttons 1 and 2 to X buttons 8 and 9, as conventional, leaving X
+    buttons 6 and 7 for tilt wheel.
+    
+    Also add button labels for buttons 6, 7, 8 and 9 and change btn_labels in from a
+    dynamic allocation to a fixed one of the required size for all the labels we
+    use.
+    
+    Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+    Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
+
+commit c9d7b9516f4a04cb9012c6c1e9466491a468aa07
+Author: Jon TURNEY <jon.turney@dronecode.org.uk>
+Date:   Tue Feb 19 14:38:40 2013 +0000
+
+    hw/xwin: Remove unneeded WM_XBUTTON message defines
+    
+    Remove unneeded WM_XBUTTON message defines, they have been provided by w32api
+    for a long time now.
+    
+    Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+    Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
+
+commit 5dccfc63f9c7056e7cd30884e1d3ccea86a2f419
+Author: Jon TURNEY <jon.turney@dronecode.org.uk>
+Date:   Mon Dec 17 22:38:00 2012 +0000
+
+    hw/xwin: Change winTranslateKey() to return it's result as it's return value
+    
+    Change winTranslateKey() to return it's result as it's return value, and change
+    it's uses as well.
+    
+    Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+    Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
+
+commit 9b4cec76f1d7792d4bf64fa069ea6b64bc42da0d
+Author: Oliver Schmidt <oschmidt-mailinglists@gmx.de>
+Date:   Mon Nov 5 15:05:32 2012 +0000
+
+    hw/xwin: Consider left and right modifier keys independently on gaining focus
+    
+    Handle left and right ctrl and shift keys independently
+    
+    Assume that all modifiers are cleared when all keys are released on focus lost,
+    as internalKeyState doesn't record which modifier key was pressed.
+    
+    Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+    Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
+
+commit 235149d0b4af9097e47b3af0ba56d4eb0179518c
+Author: Jon TURNEY <jon.turney@dronecode.org.uk>
+Date:   Mon Apr 5 14:22:39 2010 +0100
+
+    hw/xwin: Remove an extra '\n' from some log messages
+    
+    Remove an extra '\n' from internal client IOError log messages
+    
+    Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+    Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
+
+commit c7aa9f7578e721b0c9e565e7a085b6aeb30bf2ac
+Author: Jon TURNEY <jon.turney@dronecode.org.uk>
+Date:   Sat Feb 4 17:04:11 2012 +0000
+
+    hw/xwin: _NET_WM_STATE is ATOM[] not ATOM
+    
+    _NET_WM_STATE is ATOM[] not ATOM, a list of window state hints, so check all of
+    the atoms, not just the first one
+    
+    See EWMH specifcation, section "Application Window Properties"
+    
+    v2: Actually use [] on the returned atom data
+    
+    Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+    Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
+
+commit 682ccac90b18f293520f77db5b163fcb40328e2b
+Author: Jon TURNEY <jon.turney@dronecode.org.uk>
+Date:   Wed Aug 31 21:35:14 2011 +0100
+
+    hw/xwin: Improve WM_ENDSESSION handling using separate messaging window thread
+    
+    Currently, WM_ENDSESSION just calls GiveUp() to set the DE_TERMINATE flag. But
+    for the X server to exit cleanly, we also need the X server dispatch loop to be
+    unblocked so it can notice that DE_TERMINATE has been set and exit, removing
+    it's lock file and any unix domain socket.
+    
+    It appears that the system will terminate the process when the last UI thread in
+    that process returns from processing WM_ENDSESSION for the last top-level
+    window.
+    
+    Since WM_ENDSESSION appears to sent by the system via SendMessage()
+    (synchronously) and the wndproc is called to process it in the message thread
+    for that window (the X server thread), we can't easily terminate the X server
+    dispatch loop from inside the WM_ENDSESSION message processing.
+    
+    So, create a messaging window, a hidden, top-level window, with a separate
+    thread to catch this message, and process it by calling GiveUp() and then
+    blocking on a mutex until the X server dispatch loop exits.
+    
+    Also, notice when this is a shutdown cancel WM_ENDSESSION message and take no
+    action.
+    
+    Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+    Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
+
+commit 15febb05d77cc7e7185c942f35459838f75cfdc0
+Author: Jon TURNEY <jon.turney@dronecode.org.uk>
+Date:   Mon Sep 3 15:19:43 2012 +0100
+
+    Allow DDX to provide a main()
+    
+    XQuartz already conditionally renames main() as dix_main() so it can provide
+    it's own main().  This isn't the ideal way of doing this, as it prevents libdix
+    built this way from being useful with any other DDX.
+    
+    So instead, always name that function dix_main(), and also provide a stub main()
+    which just calls dix_main(), which can be overriden in the DDX.
+    
+    Add a main() to XWin (XQuartz already has one, of course).
+    
+    It's no longer neccessary to link XWin and XQuartz with libmain.
+    
+    v2: Remove unneeded stub main hw/xwin/InitOutput.c
+    
+    Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+    Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
+
+commit d5ebe20f9ba9569351c4a41449866679fd60ba45
+Merge: 21ea7eb 33f7e60
+Author: Keith Packard <keithp@keithp.com>
+Date:   Mon Jul 22 20:34:41 2013 -0700
+
+    Merge remote-tracking branch 'alanc/master'
+
+commit 21ea7ebb6a1ad56f3060747af0df235ca6ff27fa
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Fri Jul 19 08:56:38 2013 +1000
+
+    dix: scale y back instead of x up when pre-scaling coordinates
+    
+    The peculiar way we handle coordinates results in relative coordinates on
+    absolute devices being added to the last value, then that value is mapped to
+    the screen (taking the device dimensions into account). From that mapped
+    value we get the final coordinates, both screen and device coordinates.
+    
+    To avoid uneven scaling on relative coordinates, they are pre-scaled by
+    screen ratio:resolution:device ratio factor before being mapped. This
+    ensures that a circle drawn on the device is a circle on the screen.
+    
+    Previously, we used the ratio to scale x up. Synaptics already does its own
+    scaling based on the resolution and that is done by scaling y down by the
+    ratio. So we can remove the code from the driver and get approximately the
+    same behaviour here.
+    
+    Minor ABI bump, so we can remove this from synaptics.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Tested-by: Emmanuel Benisty <benisty.e@gmail.com>
+
+commit 33f7e60785f12770ce10558c2ca7ce1323eefc59
+Author: Thomas Klausner <wiz@NetBSD.org>
+Date:   Fri Jul 12 08:21:19 2013 +0200
+
+    Fix typo in header guard.
+    
+    Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
+    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit ddc52b9cbae017f04c7a232af4e8b16c9f96823d
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Fri Jul 5 22:43:17 2013 -0700
+
+    Xephyr: Use _XEatDataWords (from Xlib 1.6) instead of _XEatData
+    
+    Simplifies code and reduces risk of overflow from converting length
+    field in X replies from words to bytes.
+    
+    One call to _XEatData is left in ephyrHostGLXGetStringFromServer where
+    it's already been checked for overflow, and other values have been
+    subtracted from it to reduce the size of data remaining to be eaten.
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit a3d43edf71847f4b486f971405d2b457f81b73d1
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Fri Jul 5 22:35:32 2013 -0700
+
+    glxproxy: Use _XEatDataWords (from Xlib 1.6) instead of _XEatData
+    
+    Reduces risk of overflow from converting length field in X replies
+    from words to bytes.   (Also seems to be what several calls were
+    already incorrectly passing to _XEatData.)
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 87b0cabc145a9b5f6faffdfb544ce1c647b8ab72
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Fri Jul 5 22:32:10 2013 -0700
+
+    glxproxy: Use _XReadPad instead of _XEatData to clean up the slop
+    
+    Xlib already provides a function to eat padding bytes after the
+    data read, so use it instead of calculating it ourselves.
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 1cb182cbdc11fc1c97507c57875f1d2453f27328
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Mon Apr 15 08:41:14 2013 -0700
+
+    Xephyr: integer overflow in XF86DRIGetClientDriverName()
+    
+    clientDriverNameLength is a CARD32 and needs to be bounds checked before
+    adding one to it to come up with the total size to allocate, to avoid
+    integer overflow leading to underallocation and writing data from the
+    network past the end of the allocated buffer.
+    
+    Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+
+commit 20644e53b385c54d73242c86a7d3f981d18a3843
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Mon Apr 15 08:39:03 2013 -0700
+
+    Xephyr: integer overflow in XF86DRIOpenConnection()
+    
+    busIdStringLength is a CARD32 and needs to be bounds checked before adding
+    one to it to come up with the total size to allocate, to avoid integer
+    overflow leading to underallocation and writing data from the network past
+    the end of the allocated buffer.
+    
+    Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+
+commit c37ceda76bf9ec6f5166122e864663e10f106546
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sun Apr 14 10:50:50 2013 -0700
+
+    Xephyr: integer overflow in ephyrHostGLXGetStringFromServer()
+    
+    reply.length & reply.size are CARD32s and need to be bounds checked before
+    multiplying or adding to come up with the total size to allocate, to avoid
+    integer overflow leading to underallocation and writing data from the
+    network past the end of the allocated buffer.
+    
+    Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 5fbd8c45b46ab93522e417240aa770466c30b735
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sun Apr 14 09:45:26 2013 -0700
+
+    Xdmx: integer overflow in GetGLXFBConfigs()
+    
+    numFBConfigs & numAttribs are CARD32s and need to be bounds checked before
+    multiplying by structure sizes to come up with the total size to allocate,
+    to avoid integer overflow leading to underallocation and writing data from
+    the network past the end of the allocated buffer.
+    
+    Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit c89bcd12f4fc7233830a8dbe7863c312f657da3c
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sun Apr 14 09:33:57 2013 -0700
+
+    Xdmx: integer overflow in GetGLXVisualConfigs()
+    
+    numVisuals & numProps are both CARD32 and need to be bounds checked before
+    multiplying by structure sizes to come up with the total size to allocate,
+    to avoid integer overflow leading to underallocation and writing data from
+    the network past the end of the allocated buffer.
+    
+    Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 74469895e39fa38337f59edd64c4031ab9bb51d8
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Mon Jul 15 13:06:28 2013 +1000
+
+    dix: allow a ConstantDeceleration between 0 and 1 (#66134)
+    
+    A constant deceleration of x simply means (delta * 1/x). We limited that to
+    values >= 1.0f for obvious reasons, but can also allow values from 0-1.
+    That means that ConstantDeceleration is actually a ConstantAcceleration, but
+    hey, if someone needs it...
+    
+    X.Org Bug 66134 <http://bugs.freedesktop.org/show_bug.cgi?id=66134>
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+
+commit 0e3be0b25fcfeff386bad132526352c2e45f1932
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Fri Jul 12 14:10:10 2013 +1000
 
@@ -78,9 +5572,65 @@
     
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
     Reviewed-by: Keith Packard <keithp@keithp.com>
-    (cherry picked from commit 0e3be0b25fcfeff386bad132526352c2e45f1932)
-
-commit ecd178e632a99ae2f12d2d9b6e9a48eaa421335d
+
+commit 24cbb47ca80cd7a47749ece0ff3a98657ddf3ae3
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Fri Jul 12 12:17:47 2013 +1000
+
+    config: provide example configuration for multi-seat setups
+    
+    Seats other than seat0 need custom configuration. Provide that with a
+    default configuration file so we can share it across distros.
+    
+    This file intentionally does not end in .conf so it won't get picked up by
+    the server after a normal installation. gdm, or whatever starts up the
+    servers will have to explicitly specifiy this config file.
+    
+    This file replaces the one currently written by systemd's multi-seat-x
+    binary:
+    http://cgit.freedesktop.org/systemd/systemd/tree/src/login/multi-seat-x.c
+    
+    CC: Lennart Poettering <lennart@poettering.net>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
+
+commit 791121e00692e12cb4c38c8d018bd72eb5081eb7
+Author: François Tigeot <ftigeot@wolfpond.org>
+Date:   Mon Jul 15 21:54:26 2013 +0200
+
+    Fix mouse header include on DragonFly and FreeBSD
+    
+    *  __FreeBSD_kernel_version doesn't exist anymore
+    
+    * The removed check was for FreeBSD versions from before September 2000
+      which are no longer supported anyway
+    
+    * Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=66045
+    
+    Signed-off-by: François Tigeot <ftigeot@wolfpond.org>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 59a6d3f1eb03010ab831b32b03706a1d6143c732
+Author: Jon TURNEY <jon.turney@dronecode.org.uk>
+Date:   Thu Nov 8 13:41:13 2012 +0000
+
+    os: Remove any old logfile before trying to write to it
+    
+    If we are not backing up logfiles, remove the old logfile before trying to write
+    a new logfile, as otherwise the operation may fail if the previous logfile was
+    created by a different user.
+    
+    This change is useful when:
+    - The DDX doesn't use the logfile backup mechanism (i.e. not Xorg)
+    - The DDX is run by a non-root user, and then by a different non-root user
+    - The logfile directory doesn't have the restricted-deletion flag set
+    
+    Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+    Acked-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
+    Reviewed-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 8eeaa74bc241acb41f1d3ed64971e0b01e794776
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Tue Jul 9 13:27:19 2013 +1000
 
@@ -97,9 +5647,212 @@
     
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
     Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
-    (cherry picked from commit 8eeaa74bc241acb41f1d3ed64971e0b01e794776)
-
-commit 54a7ae04a8475df6ce87e52ff995de22fafc7c92
+
+commit a2d6932ad48f2cbfcc4c5fb8272e47106d08ac78
+Author: Julien Cristau <jcristau@debian.org>
+Date:   Mon Jul 1 19:39:30 2013 +0200
+
+    xkb: don't call atoi(NULL) when parsing argv
+    
+    If the -ardelay or -arinterval options have no argument, there's no
+    point trying to read it.
+    
+    See
+    http://www.forallsecure.com/bug-reports/feb3db57fc206d8df22ca53a6907f74973876272/
+    
+    Reported-by: Alexandre Rebert <alexandre@cmu.edu>
+    Signed-off-by: Julien Cristau <jcristau@debian.org>
+    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 77e51d5bbb97eb5c9d9dbff9a7c44d7e53620e68
+Author: Eric Anholt <eric@anholt.net>
+Date:   Mon Jun 17 15:51:19 2013 -0700
+
+    Revert "DRI2: re-allocate DRI2 drawable if pixmap serial changes"
+    
+    This reverts commit 3209b094a3b1466b579e8020e12a4f3fa78a5f3f.  After a
+    long debug session by Paul Berry, it appears that this was the commit
+    that has been producing sporadic failures in piglit front buffer
+    rendering tests for the last several years.
+    
+    GetBuffers may return fresh buffers with invalid contents at a couple
+    reasonable times:
+    
+    - When first asked for a non-fake-front buffer.
+    - When the drawable size is changed, an Invalidate has been sent, and
+      obviously the app needs to redraw the whole buffer.
+    - After a glXSwapBuffers(), GL allows the backbuffer to be undefined,
+      and an Invalidate was sent to tell the GL that it should grab these
+      appropriate new buffers to avoid stalling.
+    
+    But with the patch being reverted, GetBuffers would also return fresh
+    invalid buffers when the drawable serial number changed, which is
+    approximately "whenever, for any reason".  The app is not expecting
+    invalid buffer contents "whenever", nor is it valid.  Because the GL
+    usually only GetBuffers after an Invalidate is sent, and the new
+    buffer allocation only happened during a GetBuffers, most apps saw no
+    problems.  But apps that do (fake-)frontbuffer rendering do frequently
+    ask the server for the front buffer (since we drop the fake front
+    allocation when we're not doing front buffer rendering), and if the
+    drawable serial got bumped midway through a draw, the server would
+    pointlessly ditch the front *and* backbuffer full of important
+    drawing, resulting in bad rendering.
+    
+    The patch was originally to fix bugzilla:
+    https://bugs.freedesktop.org/show_bug.cgi?id=28365
+    Specifically:
+    
+        To reproduce, start with a large-ish display (i.e. 1680x1050 on my
+        laptop), use the patched glxgears from bug 28252 to add the
+        -override option.  Then run glxgears -override -geometry 640x480
+        to create a 640x480 window in the top left corner, which will work
+        fine.  Next, run xrandr -s 640x480 and watch the fireworks.
+    
+    I've tested with an override-redirect glxgears, both with vblank sync
+    enabled and disabled, both with gnome-shell and no window manager at
+    all, before and after this patch.  The only problem observed was that
+    before and after the revert, sometimes when alt-tabbing to kill my
+    gears after completing the test gnome-shell would get confused about
+    override-redirectness of the glxgears window (according to a log
+    message) and apparently not bother doing any further compositing.
+    
+    Signed-off-by: Eric Anholt <eric@anholt.net>
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+    Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
+    Tested-by: Chris Wilson <chris@chris-wilson.co.uk>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 227015d6544115258b74c31b700f9bd163540e24
+Merge: d9005d5 80054fc
+Author: Keith Packard <keithp@keithp.com>
+Date:   Tue Jun 18 10:53:08 2013 -0700
+
+    Merge remote-tracking branch 'jturney/master'
+
+commit 80054fcafb095aff76f6df00d348c7fd85e8ddbc
+Author: Jon TURNEY <jon.turney@dronecode.org.uk>
+Date:   Sat Mar 30 19:44:14 2013 +0000
+
+    hw/xwin: Update manifest to target all architectures, not just x86
+    
+    Update manifest to target all architectures, not just x86
+    
+    Also: Write explicit dependencies for Xwin.rc.  XWin.exe.manifest and X.ico are
+    included the resource compiler output, so add a dependency on them to cause it
+    to be recompiled if they change.
+    
+    Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+    Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
+
+commit 689e7ad9b0fccd582cd63796cc90a999f141f589
+Author: Jon TURNEY <jon.turney@dronecode.org.uk>
+Date:   Sun Mar 31 18:36:37 2013 +0100
+
+    hw/xwin: Win32 Windows properties are of pointer type HANDLE, not an integer type
+    
+    Win32 Windows properties are of pointer type HANDLE, not an integer type, but we
+    use the Windows property WINDOW_WID_PROP to store the X window XID.
+    
+    Add appropriate casts to show it doesn't matter that an XID is smaller than a
+    pointer on 64-bit build.
+    
+    Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+    Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
+
+commit e1a0945e8d4a3858838a14e64022524efd73c905
+Author: Jon TURNEY <jon.turney@dronecode.org.uk>
+Date:   Sun Mar 31 18:35:35 2013 +0100
+
+    hw/xwin: winMultiWindowGetTransientFor() returns an XID not a WindowPtr
+    
+    winMultiWindowGetTransientFor() accesses the WM_TRANSIENT_FOR property, which is
+    an X window XID (which we compare with WINDOW_WID_PROP) and not a WindowPtr.
+    
+    Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+    Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
+
+commit be201ac257687355bf0916d7c525d598ed9b1282
+Author: Jon TURNEY <jon.turney@dronecode.org.uk>
+Date:   Sat Mar 30 19:47:16 2013 +0000
+
+    hw/xwin: Change winIconIsOverride() to take a HICON parameter
+    
+    Change winIconIsOverride() to take a HICON parameter, so some unneccessary
+    casts, which weren't portable to 64-bit Cygwin, can be removed.
+    
+    Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+    Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
+
+commit fc40f9a92cf5981bccc45bbc0b959cc06c5accc2
+Author: Jon TURNEY <jon.turney@dronecode.org.uk>
+Date:   Sat Mar 30 19:41:06 2013 +0000
+
+    hw/xwin: Fix uses of CreateDialogParam() for 64-bit builds
+    
+    Fix uses of CreateDialogParam() to be more strictly correct, for 64-bit builds
+    
+    dwInitParam parameter is LPARAM, not int
+    Return type of DLGPROC is INT_PTR, not WINBOOL
+    
+    Also: Reporting the value of g_hDlgDepthChange is completely uninteresting, we
+    are just interested in GetLastError() if it is NULL
+    
+    Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+    Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
+
+commit b542976846eb5d4c82910272af32ec8298da4177
+Author: Jon TURNEY <jon.turney@dronecode.org.uk>
+Date:   Sat Mar 30 19:40:31 2013 +0000
+
+    hw/xwin: deprecated interface cygwin_conv_to_win32_path() doesn't exist in 64-bit cygwin
+    
+    The deprecated interface cygwin_conv_to_win32_path() doesn't exist in 64-bit
+    cygwin, but both the ID_ABOUT_CHANGELOG control and the referenced file who's
+    path we are converting haven't existed for a while, so just remove this unused,
+    cygwin-specific code.
+    
+    Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+    Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
+
+commit 5a47c6420cfe298143310938f08cc36a503e8d3d
+Author: Jon TURNEY <jon.turney@dronecode.org.uk>
+Date:   Mon Apr 8 01:27:26 2013 +0100
+
+    hw/xwin: Fix a 64-bit portability issue with casting HINSTANCE result of ShellExecute() to an integer
+    
+    Fix a 64-bit portability issue with casting HINSTANCE result of ShellExecute()
+    to an integer: Since HINSTANCE is a pointer type, use INT_PTR rather than int.
+    
+    Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+    Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
+
+commit d9005d58c0413dcc3a99150c13d05163881cf782
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Tue Jun 4 14:39:33 2013 +1000
+
+    config: add a quirks file for devices needing special configuration
+    
+    This is the fedora quirks file configuring the special handling some devices
+    need. Rather than keeping this distro-specific add it to the tree so we can
+    share these quirks.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Jamey Sharp <jamey@minilop.net>
+
+commit 04ce6f6f6c880281e42c9ebf21d6f980ddae79b4
+Author: Maarten Lankhorst <maarten.lankhorst@canonical.com>
+Date:   Thu May 30 11:23:07 2013 +0200
+
+    dix: add missing dixFreeRegistry define
+    
+    Fixes a build failure on debian's udeb builds.
+    
+    Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit c21344add2fc589df83b29be5831c36a372201bd
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Mon May 27 13:46:49 2013 +1000
 
@@ -111,9 +5864,88 @@
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
     Reviewed-by: Keith Packard <keithp@keithp.com>
     Signed-off-by: Keith Packard <keithp@keithp.com>
-    (cherry picked from commit c21344add2fc589df83b29be5831c36a372201bd)
-
-commit 1e29b269fd712ae1e3552eeddd3529015baee7ae
+
+commit cb3018d8a15add48efb3335e1f79b66378166008
+Merge: c76a1b3 6589f3b
+Author: Keith Packard <keithp@keithp.com>
+Date:   Thu May 23 19:58:46 2013 -0600
+
+    Merge remote-tracking branch 'whot/unreviewed'
+
+commit c76a1b343d6a56aa9529e87f0eda8d61355d562b
+Merge: 891123c 9a5ad65
+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: 7e97166 49521ed
+Author: Keith Packard <keithp@keithp.com>
+Date:   Thu May 23 10:30:15 2013 -0600
+
+    Merge remote-tracking branch 'whot/for-keith'
+
+commit 6589f3b55e335eef6c658c8ba1fe15a062f7e31c
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Tue May 14 08:31:19 2013 +1000
+
+    dix: devices must have valuators before touch is initialized
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 756ab88d93542f0589c9bf46f40ccc57df64f0fd
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Fri Apr 26 15:10:08 2013 +1000
+
+    dix: fix device scaling to use a [min,max[ range.
+    
+    defmin/defmax are screen coords and thus use a min-inclusive, max-exclusive
+    range. device axes ranges are inclusive, so bump the max up by one to get the
+    scaling right.
+    
+    This fixes off-by-one coordinate errors if the coordinate matrix is used to
+    bind the device to a fraction of the screen. It introduces an off-by-one
+    scaling error in the device coordinate range, but since most devices have a
+    higher resolution than the screen (e.g. a Wacom I4 has 5080 dpi) the effect
+    of this should be limited.
+    
+    This error manifests when we have numScreens > 1, as the scaling from
+    desktop size back to screen size drops one device unit.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 5cc2c96f824dbb28b9f8da61efc41596f8bd0561
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Sat Mar 9 20:43:51 2013 +1000
+
+    dix: pre-scale x by the screen:device:resolution ratio
+    
+    commit 61a99aff9d33728a0b67920254d2d4d79f80cf39
+        dix: pre-scale relative events from abs devices to desktop ratio (#31636)
+    
+    added pre-scaling of relative coordinates coming from absolute devices to
+    undo uneven scaling based on the screen dimensions.
+    
+    Devices have their own device width/height ratio as well (in a specific
+    resolution) and this must be applied for relative devices as well to avoid
+    scaling of the relative events into the device's ratio.
+    
+    e.g. a Wacom Intuos4 6x9 is in 16:10 format with equal horiz/vert
+    resolution (dpi). A movement by 1000/1000 coordinates is a perfect diagonal
+    on the tablet and must be reflected as such on the screen.
+    
+    However, we map the relative device-coordinate events to absolute screen
+    coordinates based on the axis ranges. This results in an effective scaling
+    of 1000/(1000 * 1.6) and thus an uneven x/y axis movement - the y
+    axis is always faster.
+    
+    So we need to pre-scale not only by the desktop dimenstions but also by the
+    device width/height ratio _and_ the resolution ratio.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 9a5ad65330693b3273972b63d10f2907d9ab954a
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Wed May 15 19:01:11 2013 +1000
 
@@ -123,9 +5955,8 @@
     wrapper to handle that case.
     
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-    (cherry picked from commit 9a5ad65330693b3273972b63d10f2907d9ab954a)
 
-commit c0be1168fd3dd2eb01187789ddc30d7aab909a98
+commit 35c2e263db01b2b61354298e5e85aa3cae8ac317
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Tue May 14 14:51:31 2013 +1000
 
@@ -155,9 +5986,24 @@
     [1] http://patchwork.freedesktop.org/patch/13464/
     
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-    (cherry picked from commit 35c2e263db01b2b61354298e5e85aa3cae8ac317)
-
-commit 5c32bd0e2c104deaa2820c62289916fff6a4e3cd
+
+commit 8b9dc2628115dcb3f3601ad19b1ae157df21b9ee
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Tue May 14 07:46:25 2013 +1000
+
+    dix: devices must have valuators before touch is initialized
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit fd5ea0237db6d725a48f76b706135df9d3246b82
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Mon May 13 15:22:12 2013 +1000
+
+    Xi: fix warning - remove unused 'rc'
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 481702101b86fff003430e952dc65fb41eb56400
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Fri May 3 15:07:58 2013 +1000
 
@@ -173,9 +6019,38 @@
     often) causes a crash).
     
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-    (cherry picked from commit 481702101b86fff003430e952dc65fb41eb56400)
-
-commit 0ee9704f3c70fa7cf77edef55d158ad78df72a25
+
+commit 49521edaf8930b335afac2185209e26e7000820b
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Wed May 15 08:51:51 2013 +1000
+
+    ephyr: add -resizeable to the man page
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 7a4bbfd9f2ce7aad23148ba01bb3f1071da606a3
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Wed May 15 08:46:38 2013 +1000
+
+    ephyr: fix typo in man page
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 7e97166c4fc38076b6224e4dbdd632b43444149f
+Author: Geert Uytterhoeven <geert@linux-m68k.org>
+Date:   Tue May 14 13:04:53 2013 +0200
+
+    Shadow: Switch the Amiga/Atari bitplane code to the canonical X.Org license
+    
+    Also add my name to the list of authors in COPYING
+    
+    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 3093f78d17e48a506aab170a9089cd10e21af299
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Fri May 3 15:02:05 2013 +1000
 
@@ -187,9 +6062,8 @@
     way.
     
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-    (cherry picked from commit 3093f78d17e48a506aab170a9089cd10e21af299)
 
-commit ef0fff102d1feb5bccffc918da5c0dc7c0d28f3b
+commit 2566bdd8bc996cccde77b846819808c6239a89d2
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Wed Apr 24 14:46:06 2013 +1000
 
@@ -199,9 +6073,8 @@
     LISTENER_HAS_ACCEPTED state.
     
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-    (cherry picked from commit 2566bdd8bc996cccde77b846819808c6239a89d2)
 
-commit f3d63710d57aea0184ae07f0422a76b0fd6d415f
+commit 5b00fc52270e9cfdfe7ac1838a21defe50fc3d31
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Wed Apr 24 14:40:31 2013 +1000
 
@@ -215,18 +6088,16 @@
     Move it to CloseDownClient() instead, cleaning up before we go.
     
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-    (cherry picked from commit 5b00fc52270e9cfdfe7ac1838a21defe50fc3d31)
 
-commit 6c880c143f6a32d3bbc529e4a0ab1663ddecf0a0
+commit 34c9b39d9937c2e19c2dffc9748605f90d40f965
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Wed Apr 24 12:53:52 2013 +1000
 
     dix: remove all listeners when freeing a touch
     
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-    (cherry picked from commit 34c9b39d9937c2e19c2dffc9748605f90d40f965)
 
-commit ab76a3a3fc56cf8f530e5ab9b6389b09da1cdc12
+commit 395124bd2782823de37e5c5b2f15dba49cff05f6
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Wed Apr 17 20:15:35 2013 +1000
 
@@ -244,27 +6115,24 @@
     
     Reported-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-    (cherry picked from commit 395124bd2782823de37e5c5b2f15dba49cff05f6)
 
-commit 6bd9badc780ec9d1fb147dfa0c671979c75b722c
+commit 925e35122ebad877395bcf13676e9dbeb254bdfa
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Tue Apr 23 15:52:18 2013 +1000
 
     dix: AllocGrab can copy if an argument is passed in
     
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-    (cherry picked from commit 925e35122ebad877395bcf13676e9dbeb254bdfa)
 
-commit 479f8bf236d17e2a2093d349d2ef6471ff089a53
+commit 4980bcef9973ba1f90f53028f061669ee5d2661b
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Tue Apr 23 15:46:04 2013 +1000
 
     dix: freeing a null grab is a bug, complain if doing so
     
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-    (cherry picked from commit 4980bcef9973ba1f90f53028f061669ee5d2661b)
 
-commit 27752301377698124634d48b62ba7fcf8310caab
+commit ccfa0f2d5de557546815a5e4f59552e2af46b578
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Tue Apr 23 15:39:32 2013 +1000
 
@@ -273,9 +6141,8 @@
     no functional changes
     
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-    (cherry picked from commit ccfa0f2d5de557546815a5e4f59552e2af46b578)
 
-commit d8c0cc9bab1fe159f58c2b5e8056c2d94a623789
+commit 5363433a5cc64e2f83859aa1c32a89e5e1ddf9e4
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Thu Apr 18 10:32:11 2013 +1000
 
@@ -299,9 +6166,8 @@
     future.
     
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-    (cherry picked from commit 5363433a5cc64e2f83859aa1c32a89e5e1ddf9e4)
 
-commit 25b641bb324c33226313c15448592b785043eaba
+commit 7dbf61817d3bd4b1fc71710677e56c5d8cfcdb4e
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Wed Apr 17 20:14:56 2013 +1000
 
@@ -310,9 +6176,8 @@
     No functional changes.
     
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-    (cherry picked from commit 7dbf61817d3bd4b1fc71710677e56c5d8cfcdb4e)
 
-commit 88273287e1d7b3c06313f77d450f87a31bf53780
+commit a71a283934406d870bcd8dc376eb1c9ce1c8bbb4
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Wed Apr 17 20:13:34 2013 +1000
 
@@ -325,9 +6190,8 @@
     No functional changes.
     
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-    (cherry picked from commit a71a283934406d870bcd8dc376eb1c9ce1c8bbb4)
 
-commit 4081b00d36d074eedf5c8d04196998d23cff28cf
+commit 5174b1f98204beee79eba74c4cda5f2be0a60a8f
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Thu Feb 28 11:02:40 2013 +1000
 
@@ -341,9 +6205,8 @@
     this touch.
     
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-    (cherry picked from commit 5174b1f98204beee79eba74c4cda5f2be0a60a8f)
 
-commit 8666395484d0ff68526b1afd0044329ca3e9c907
+commit e7f79c48b0faea910dc881034c00eb807fcd6210
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Fri Mar 1 12:52:35 2013 +1000
 
@@ -352,9 +6215,8 @@
     No functional changes, this just enables it to be re-used easier.
     
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-    (cherry picked from commit e7f79c48b0faea910dc881034c00eb807fcd6210)
 
-commit 4dac09796ca7ec19c1a9b17f338babd51c999e2e
+commit 0eb9390f6048049136347d5a5834d88bfc67cc09
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Fri Mar 1 10:41:01 2013 +1000
 
@@ -371,9 +6233,8 @@
     ProcessTouchEvents. Working around that is a bigger hack than this.
     
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-    (cherry picked from commit 0eb9390f6048049136347d5a5834d88bfc67cc09)
 
-commit c8a48358065ff94b8307d8aedfe58e54f34ba84f
+commit a7d989d335f903ffd8b168cd2beeb82c78d30c21
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Thu Feb 28 13:07:26 2013 +1000
 
@@ -395,9 +6256,8 @@
     anyway)
     
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-    (cherry picked from commit a7d989d335f903ffd8b168cd2beeb82c78d30c21)
 
-commit 2fcf86036f95128e9b90ddbd5ffc6edbacd3de9f
+commit 214d11d3fcdac51fc7afbf3770516ec14f9e13c1
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Wed Feb 27 15:05:54 2013 +1000
 
@@ -411,9 +6271,8 @@
     cannot accept/reject this.
     
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-    (cherry picked from commit 214d11d3fcdac51fc7afbf3770516ec14f9e13c1)
 
-commit e1c908f3931aa82c7c5f14aa162e02f3abf98faf
+commit 026627fe19aad007544eccf209f0dea05e67a7a7
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Fri Mar 1 09:15:37 2013 +1000
 
@@ -423,9 +6282,8 @@
     the information of early acceptance.
     
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-    (cherry picked from commit 026627fe19aad007544eccf209f0dea05e67a7a7)
 
-commit 7343d05e3a502216532aa9901c3a8948ea118c78
+commit d905348134c80f19793eefb761731b00559ddf3a
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Thu Feb 28 15:28:46 2013 +1000
 
@@ -435,9 +6293,8 @@
     accept here.
     
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-    (cherry picked from commit d905348134c80f19793eefb761731b00559ddf3a)
 
-commit 18346911ab0ce1ad66986b83f9afefadec25555e
+commit 8b0d21044956f3810199d5e2f38ce33069e97be7
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Thu Feb 28 13:04:36 2013 +1000
 
@@ -448,9 +6305,8 @@
     9ad0fdb135a1c336771aee1f6eab75a6ad874aff.
     
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-    (cherry picked from commit 8b0d21044956f3810199d5e2f38ce33069e97be7)
 
-commit 000d469dd4d97424c72d82e4383ec295e31ffd34
+commit d08bae297f9d7651edb1923d6b0d6b14b3d674fc
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Thu Feb 28 13:08:27 2013 +1000
 
@@ -467,9 +6323,8 @@
     event. Thus, check the return code.
     
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-    (cherry picked from commit d08bae297f9d7651edb1923d6b0d6b14b3d674fc)
 
-commit a7ec834d5e8c351cfa5d87b7902fa061826e3097
+commit 81554d274f04951c55ea7f2e38d0455e2025e08d
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Mon Feb 25 11:21:07 2013 +1000
 
@@ -484,9 +6339,8 @@
     This requires us to count the actually delivered events too (first hunk).
     
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-    (cherry picked from commit 81554d274f04951c55ea7f2e38d0455e2025e08d)
 
-commit 636647bc7f9ed10918cbb228f7d448c8cf733667
+commit 363b6387da6e669099a2da3861c73a29808295a6
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Wed Feb 13 11:26:11 2013 +1000
 
@@ -498,9 +6352,8 @@
     from activating higher up in the window stack.
     
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-    (cherry picked from commit 363b6387da6e669099a2da3861c73a29808295a6)
 
-commit 87e027726f2d9223ce2fef2e4d26c18ae680a05e
+commit 9cc45c18ad1511adf3fb163dd4cefbef106edb23
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Wed Feb 13 10:49:23 2013 +1000
 
@@ -512,199 +6365,55 @@
     the internal record is already cleaned up).
     
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-    (cherry picked from commit 9cc45c18ad1511adf3fb163dd4cefbef106edb23)
-
-commit 34f5ca3a70e966d6fe232179a47c3dc660773ad5
-Author: Peter Hutterer <peter.hutterer@who-t.net>
-Date:   Fri Mar 1 08:26:06 2013 +1000
-
-    Xi: use a temp variable for the new listener
-    
-    Instead of accessing ti->listener[0] all the time.
-    
-    No functional changes.
-    
-    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-    Reviewed-by: Keith Packard <keithp@keithp.com>
-    (cherry picked from commit fc504a44d12d537d4e07f659f1863f200a0272ad)
-
-commit 54b125d1751385bcfc3c1b51d21ee6a7dc14143b
-Author: Aaron Plattner <aplattner@nvidia.com>
-Date:   Tue Apr 30 14:30:18 2013 -0700
-
-    xfree86: don't enable anything in xf86InitialConfiguration for GPU screens
-    
-    There's no point in turning on outputs connected to GPU screens during initial
-    configuration.  Not only does this cause them to just display black, it also
-    confuses clients when these screens are attached to a master screen and RandR
-    reports that the outputs are already on.
-    
-    Also, don't print the warning about no outputs being found on GPU screens,
-    since that's expected.
-    
-    Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
-    Reviewed-by: Dave Airlie <airlied@gmail.com>
-    (cherry picked from commit dbfeaf70623a83e1a3f3255c94d52e0e04702837)
-
-commit 29545a422bbdd11fda5cb61f27720332d68d0c36
-Author: Dave Airlie <airlied@redhat.com>
-Date:   Wed Jan 9 12:52:13 2013 +1000
-
-    gpu: call CreateScreenResources for GPU screens
-    
-    I didn't think we needed this before, but after doing some more
-    work with reverse optimus it seems like it should be called.
-    
-    Reviewed-by: Keith Packard <keithp@keithp.com>
-    Signed-off-by: Dave Airlie <airlied@redhat.com>
-    (cherry picked from commit f2fd8ec3725a61abbc831f0a9ec28fa2b7020c47)
-
-commit f21cc327a56e3b453cf0dba04457223d61c27ea6
-Author: Dave Airlie <airlied@redhat.com>
-Date:   Wed Jan 9 12:52:08 2013 +1000
-
-    dix: allow pixmap dirty helper to be used for non-shared pixmaps
-    
-    this allows the pixmap dirty helper to be used for reverse optimus,
-    where the GPU wants to copy from the shared pixmap to its VRAM copy.
-    
-    [airlied: slave_dst is wrong name now but pointless ABI churn at this point]
-    Reviewed-by: Keith Packard <keithp@keithp.com>
-    Signed-off-by: Dave Airlie <airlied@redhat.com>
-    (cherry picked from commit 8fcb9d91b69abc72ddef31b9f2e8585580c6cad2)
-
-commit d817284b01ad3bbe02c71d6b00af7526be77626b
-Author: Dave Airlie <airlied@redhat.com>
-Date:   Wed Jan 9 12:52:03 2013 +1000
-
-    xf86crtc: don't use scrn->display for gpu screens
-    
-    scrn->display is a property of the main screen really, and we don't
-    want to have the GPU screens use it for anything when picking modes
-    or a front buffer size.
-    
-    This fixes a bug where when you plugged a display link device, it
-    would try and allocate a screen the same size as the current running
-    one (3360x1050 in this case), which was too big for the device. Avoid
-    doing this and just pick sizes based on whats plugged into this device.
-    
-    Reviewed-by: Keith Packard <keithp@keithp.com>
-    Signed-off-by: Dave Airlie <airlied@redhat.com>
-    (cherry picked from commit 16077b81c502e04d77f81f683e0c213b9fe75393)
-
-commit 803d0ac49900903915f1dcd2496f085e5c1afa22
-Author: Dave Airlie <airlied@redhat.com>
-Date:   Wed Jan 9 12:51:55 2013 +1000
-
-    dix/gpu: remove asserts for output/offload from same slave
-    
-    We should have no problem allowing output/offload from the same slave,
-    I asserted here, but in order to implement reverse optimus this makes
-    perfect sense. (reverse optimus is intel outputting to nvidia).
-    
-    Reviewed-by: Keith Packard <keithp@keithp.com>
-    Signed-off-by: Dave Airlie <airlied@redhat.com>
-    (cherry picked from commit f0d0d75bfe62553dde353f89e46ff13dd863fbe8)
-
-commit 3608d9f3dd6ae1d23e23294e9a56cb8158e65d19
-Author: Piotr Dziwinski <piotrdz@gmail.com>
-Date:   Sat Feb 23 13:14:45 2013 +0100
-
-    glx: fix uninitialized var in __glXDRIscreenProbe
-    
-    Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=59825
-    
-    Signed-off-by: Piotr Dziwinski <piotrdz@gmail.com>
-    Reviewed-by: Keith Packard <keithp@keithp.com>
-    Signed-off-by: Keith Packard <keithp@keithp.com>
-    (cherry picked from commit cc3d1a5a6120e721a46c67446ba68f5596055633)
-
-commit 2767d9a17d62aede7cabac589c3388078bdb6022
-Author: Matt Dew <marcoz@osource.org>
-Date:   Tue Jun 25 09:49:08 2013 -0600
-
-    Bump rev from  1.14.1.902  to 1.14.2
-
-commit 7dec1d38799d82923e3241f73c83aa1ad357f72b
-Author: Matt Dew <marcoz@osource.org>
-Date:   Fri Jun 21 10:24:16 2013 -0600
-
-    Revert "dix: pre-scale x by the screen:device:resolution ratio"
-    
-    This reverts commit 14d89b9a466b521b985bc95fc4994637367362a8.
-
-commit 187cb5a037a03ab1e7702da5eebb2e7d884c6186
-Author: Alan Coopersmith <alan.coopersmith@oracle.com>
-Date:   Wed Apr 24 15:24:31 2013 -0700
-
-    Only call xf86platformVTProbe() when it's defined
-    
-    Fixes build on non-udev systems, since XSERVER_PLATFORM_BUS is only
-    defined in configure.ac if $CONFIG_UDEV_KMS is true.
-    
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-    Reviewed-by: Dave Airlie <airlied@redhat.com>
-
-commit 34259752340e287333fb03f3060c6db13d72f868
-Author: Matt Dew <marcoz@osource.org>
-Date:   Thu Jun 13 16:25:26 2013 -0600
-
-    Bump rev from 1.14.1.901 to 1.14.1.902
-
-commit 31e066546fd085725cc29e95867a04c70ce46ebc
-Author: Peter Hutterer <peter.hutterer@who-t.net>
-Date:   Fri Apr 26 15:10:08 2013 +1000
-
-    dix: fix device scaling to use a [min,max[ range.
-    
-    defmin/defmax are screen coords and thus use a min-inclusive, max-exclusive
-    range. device axes ranges are inclusive, so bump the max up by one to get the
-    scaling right.
-    
-    This fixes off-by-one coordinate errors if the coordinate matrix is used to
-    bind the device to a fraction of the screen. It introduces an off-by-one
-    scaling error in the device coordinate range, but since most devices have a
-    higher resolution than the screen (e.g. a Wacom I4 has 5080 dpi) the effect
-    of this should be limited.
-    
-    This error manifests when we have numScreens > 1, as the scaling from
-    desktop size back to screen size drops one device unit.
-    
-    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-    (cherry picked from commit 756ab88d93542f0589c9bf46f40ccc57df64f0fd)
-
-commit 14d89b9a466b521b985bc95fc4994637367362a8
-Author: Peter Hutterer <peter.hutterer@who-t.net>
-Date:   Sat Mar 9 20:43:51 2013 +1000
-
-    dix: pre-scale x by the screen:device:resolution ratio
-    
-    commit 61a99aff9d33728a0b67920254d2d4d79f80cf39
-        dix: pre-scale relative events from abs devices to desktop ratio (#31636)
-    
-    added pre-scaling of relative coordinates coming from absolute devices to
-    undo uneven scaling based on the screen dimensions.
-    
-    Devices have their own device width/height ratio as well (in a specific
-    resolution) and this must be applied for relative devices as well to avoid
-    scaling of the relative events into the device's ratio.
-    
-    e.g. a Wacom Intuos4 6x9 is in 16:10 format with equal horiz/vert
-    resolution (dpi). A movement by 1000/1000 coordinates is a perfect diagonal
-    on the tablet and must be reflected as such on the screen.
-    
-    However, we map the relative device-coordinate events to absolute screen
-    coordinates based on the axis ranges. This results in an effective scaling
-    of 1000/(1000 * 1.6) and thus an uneven x/y axis movement - the y
-    axis is always faster.
-    
-    So we need to pre-scale not only by the desktop dimenstions but also by the
-    device width/height ratio _and_ the resolution ratio.
-    
-    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-    (cherry picked from commit 5cc2c96f824dbb28b9f8da61efc41596f8bd0561)
-
-commit 57f6dbb3032b934a39c15cd1980b345f477ce1e6
+
+commit 2f1aedcaed8fd99b823d451bf1fb02330c078f67
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Thu May 9 14:30:50 2013 +1000
+
+    input: print warnings if drivers don't initialize properly
+    
+    If drivers supply incorrect values don't just quietly return False, spew to
+    the log so we can detect what's going on. All these cases are driver bugs
+    and should be fixed immediately.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Dave Airlie <airlied@redhat.com>
+
+commit 8a88b0ab52ba375ae84463a90503db88af10e368
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Thu May 9 14:30:49 2013 +1000
+
+    dix: don't overwrite proximity/focus classes
+    
+    InitPointerClassDeviceStruct/InitKeyboardDeviceStruct allocate a
+    proximity/focus class, respectively. If a driver calls
+    InitFocusClassDeviceStruct or InitProximityClassDeviceStruct beforehand,
+    the previously allocated class is overwritten, leaking the memory.
+    
+    Neither takes a parameter other than the device, so we can simply skip
+    initialising it if we already have one.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Dave Airlie <airlied@redhat.com>
+
+commit 34b0d07ebf4a7874fe7fd336bef5bbdd8debda1c
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Fri May 10 09:44:29 2013 +1000
+
+    dix: reset the OsBuffers after killing all clients
+    
+    ==21860== 24 bytes in 1 blocks are still reachable in loss record 85 of 397
+    ==21860==    at 0x4C2B3F8: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
+    ==21860==    by 0x61ED93: AllocateOutputBuffer (io.c:1037)
+    ==21860==    by 0x61E15A: WriteToClient (io.c:764)
+    ==21860==    by 0x457B30: ProcQueryExtension (extension.c:275)
+    ==21860==    by 0x43596B: Dispatch (dispatch.c:432)
+    ==21860==    by 0x425DAB: main (main.c:295)
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Dave Airlie <airlied@redhat.com>
+
+commit 67c66606c760c263d7a4c2d1bba43ed6225a4e7c
 Author: Robert Morell <rmorell@nvidia.com>
 Date:   Thu May 9 13:09:02 2013 -0700
 
@@ -727,83 +6436,55 @@
     Signed-off-by: Robert Morell <rmorell@nvidia.com>
     Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-    (cherry picked from commit 67c66606c760c263d7a4c2d1bba43ed6225a4e7c)
-
-commit 8cc686735296f1ff32089e64f78dfee46b8e7149
-Author: Peter Hutterer <peter.hutterer@who-t.net>
-Date:   Thu May 9 14:30:49 2013 +1000
-
-    dix: don't overwrite proximity/focus classes
-    
-    InitPointerClassDeviceStruct/InitKeyboardDeviceStruct allocate a
-    proximity/focus class, respectively. If a driver calls
-    InitFocusClassDeviceStruct or InitProximityClassDeviceStruct beforehand,
-    the previously allocated class is overwritten, leaking the memory.
-    
-    Neither takes a parameter other than the device, so we can simply skip
-    initialising it if we already have one.
-    
-    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-    Reviewed-by: Dave Airlie <airlied@redhat.com>
-    (cherry picked from commit 8a88b0ab52ba375ae84463a90503db88af10e368)
-
-commit bf115aa906795df872104083c1187c126c3b1d76
-Author: Peter Hutterer <peter.hutterer@who-t.net>
-Date:   Wed Apr 17 19:47:42 2013 +1000
-
-    dix: plug memory leak in freeing TouchClass
-    
-    ==15562== 1,800 bytes in 1 blocks are definitely lost in loss record 298 of 330
-    ==15562==    at 0x4A06B6F: calloc (vg_replace_malloc.c:593)
-    ==15562==    by 0x4312C7: InitTouchClassDeviceStruct (devices.c:1644)
-    
-    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-    (cherry picked from commit 7d722796c678532e8c5897c673c43184da353f44)
-
-commit 6abc41689cfd274f5aa8bdfbfcd4e3dd7d0249fa
-Author: Matt Dew <marcoz@osource.org>
-Date:   Fri May 31 00:06:34 2013 -0600
-
-    bah,  fixed release version: changed from rc1 to 1.901
-
-commit 27c30396bf7ff16192fe5e17c6fe04ee58ee398b
-Author: Matt Dew <marcoz@osource.org>
-Date:   Thu May 30 22:34:17 2013 -0600
-
-    bump release info to 1.14.2-rc1 (from 1.14.1)
-
-commit bcc8eba00b57a63255e05bf80bad0cb95a5a5c3e
-Author: Andreas Müller <schnitzeltony@googlemail.com>
-Date:   Tue Apr 16 14:30:43 2013 +0200
-
-    dixstruct.h: fix segfaults - char is unsigned for ARM and PowerPC architectures
-    
-    see ARM related bug reports [1-3]
-    
-    [1] https://github.com/archlinuxarm/PKGBUILDs/issues/446I
-    [2] http://www.raspberrypi.org/phpBB3/viewtopic.php?t=38568&p=321673
-    [3] http://lists.linuxtogo.org/pipermail/openembedded-core/2013-April/037805.html
-    
-    Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
-    Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
-    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-
-commit a01839e8d3675abfef871a42415779961f1ee51c
-Merge: 348de79 e90beb1
-Author: Matt Dew <marcoz@osource.org>
-Date:   Thu May 23 22:08:23 2013 -0600
-
-    Merge branch 'server-1.14-branch' of git://people.freedesktop.org/~whot/xserver into server-1.14-branch
-
-commit 348de79d8c3993577912c7aaf891b7ae702ad32d
-Merge: a11cf8d c760fb0
-Author: Matt Dew <marcoz@osource.org>
-Date:   Thu May 23 14:49:33 2013 -0600
-
-    Merge commit 'c760fb0154848d47438908ba8b3da2fffc68a460' into server-1.14-branch
-
-commit e90beb18000cf49b9108c4f977abfd111ed908ad
+
+commit ddc11397a56c745b5d1fb377e9d9b1fcc73802c8
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Mon Feb 27 18:36:39 2012 +1000
+
+    dix: delete all callbacks before reset
+    
+    DeleteCallbackManager() introduced for better symmetry in the caller, they
+    do the same thing.
+    
+    ==20085== 24 bytes in 1 blocks are still reachable in loss record 11 of 103
+    ==20085==    at 0x4C2A4CD: malloc (vg_replace_malloc.c:236)
+    ==20085==    by 0x43A097: CreateCallbackList (dixutils.c:837)
+    ==20085==    by 0x43A1D3: AddCallback (dixutils.c:869)
+    ==20085==    by 0x4B1736: GEExtensionInit (geext.c:209)
+    ==20085==    by 0x41C8A8: InitExtensions (miinitext.c:389)
+    ==20085==    by 0x5AC918: main (main.c:208)
+    
+    ==2042== 8 bytes in 1 blocks are still reachable in loss record 2 of 97
+    ==2042==    at 0x4C2A4CD: malloc (vg_replace_malloc.c:236)
+    ==2042==    by 0x4C2A657: realloc (vg_replace_malloc.c:525)
+    ==2042==    by 0x4802F5: XNFrealloc (utils.c:1095)
+    ==2042==    by 0x43A17A: CreateCallbackList (dixutils.c:855)
+    ==2042==    by 0x43A1EF: AddCallback (dixutils.c:870)
+    ==2042==    by 0x4B1752: GEExtensionInit (geext.c:209)
+    ==2042==    by 0x41C8A8: InitExtensions (miinitext.c:389)
+    ==2042==    by 0x5AC9E4: main (main.c:208)
+    ==2042==
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+
+commit 6993f8b459e25b1a7a0a03e209688a28ce6c2c56
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Wed Apr 24 14:59:11 2013 +1000
+
+    Xi: free barrier code at reset time
+    
+    ==29423== 16 bytes in 1 blocks are definitely lost in loss record 73 of 328
+    ==29423==    at 0x4A06B6F: calloc (vg_replace_malloc.c:593)
+    ==29423==    by 0x5987C0: XIBarrierInit (xibarriers.c:908)
+    ==29423==    by 0x58F370: XInputExtensionInit (extinit.c:1300)
+    ==29423==    by 0x4F33C3: InitExtensions (miinitext.c:337)
+    ==29423==    by 0x4997DB: main (main.c:208)
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+
+commit 042c6d861f7bb7038ddcdd6b59766fd9094d0e52
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Tue Apr 30 15:44:37 2013 +1000
 
@@ -825,9 +6506,8 @@
     
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
     Reviewed-by: Keith Packard <keithp@keithp.com>
-    (cherry picked from commit 042c6d861f7bb7038ddcdd6b59766fd9094d0e52)
 
-commit d0725a0b8672465cc4d3b85fb705ddb64d020476
+commit d9848fb4b182ca21bacf28ed7410d1a502cb000e
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Thu Feb 14 16:24:53 2013 +1000
 
@@ -835,9 +6515,8 @@
     
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
     Reviewed-by: Keith Packard <keithp@keithp.com>
-    (cherry picked from commit d9848fb4b182ca21bacf28ed7410d1a502cb000e)
 
-commit 7eb73779a0c82386710c4b670a342c0340485d19
+commit d903d17d7f006fa333265b8476063b189c20d082
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Thu Feb 14 16:19:34 2013 +1000
 
@@ -845,9 +6524,8 @@
     
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
     Reviewed-by: Keith Packard <keithp@keithp.com>
-    (cherry picked from commit d903d17d7f006fa333265b8476063b189c20d082)
 
-commit 6da756fb1d67d6de99077826a3d2434b0e3a1555
+commit 58ef34ee6d0f68aa28f6f1a26e56f49ec85ed9bf
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Thu Feb 14 16:13:22 2013 +1000
 
@@ -855,9 +6533,8 @@
     
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
     Reviewed-by: Keith Packard <keithp@keithp.com>
-    (cherry picked from commit 58ef34ee6d0f68aa28f6f1a26e56f49ec85ed9bf)
 
-commit b606767f20c566e24704502eae682eacb41f450e
+commit 5ea21560dd071ea4ab87430000d087fd5fe1f092
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Thu Feb 14 15:34:32 2013 +1000
 
@@ -868,18 +6545,50 @@
     
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
     Reviewed-by: Keith Packard <keithp@keithp.com>
-    (cherry picked from commit 5ea21560dd071ea4ab87430000d087fd5fe1f092)
-
-commit 00b8d11dafdbd1214695e0b54c6c2184ece6aa4d
-Author: Peter Hutterer <peter.hutterer@who-t.net>
-Date:   Mon Feb 18 14:57:58 2013 +1000
-
-    os: document pnprintf as sigsafe snprintf
-    
-    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-    (cherry picked from commit 44fc062f85df7288c17d2d64b73aa4957b91fd6d)
-
-commit 8318d6a89cb3ffad5c90670027ef997fd19994a1
+
+commit d3d4af5f9e505d444b6c82c6ea238206433fd24b
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Mon Feb 27 18:59:45 2012 +1000
+
+    dix: reset the registry before quitting
+    
+    Heaps of these:
+    ==2042== 15,360 bytes in 120 blocks are still reachable in loss record 94 of
+    97
+    ==2042==    at 0x4C2A4CD: malloc (vg_replace_malloc.c:236)
+    ==2042==    by 0x4C2A657: realloc (vg_replace_malloc.c:525)
+    ==2042==    by 0x45FB91: double_size (registry.c:65)
+    ==2042==    by 0x45FC97: RegisterRequestName (registry.c:85)
+    ==2042==    by 0x460095: RegisterExtensionNames (registry.c:179)
+    ==2042==    by 0x460729: dixResetRegistry (registry.c:334)
+    ==2042==    by 0x5AC992: main (main.c:201)
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+
+commit 6f44d672aa34d343f63f0ea81ad58154a66b57ec
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Mon Feb 27 17:17:41 2012 +1000
+
+    xkb: free XkbRulesUsed and XkbRulesDflt on extension cleanup
+    
+    ==2547== 1 bytes in 1 blocks are still reachable in loss record 1 of 111
+    ==2547==    at 0x4C2A4CD: malloc (vg_replace_malloc.c:236)
+    ==2547==    by 0x64D1551: strdup (strdup.c:43)
+    ==2547==    by 0x4802FB: Xstrdup (utils.c:1113)
+    ==2547==    by 0x585B6C: XkbSetRulesUsed (xkbInit.c:219)
+    ==2547==    by 0x58700F: InitKeyboardDeviceStruct (xkbInit.c:595)
+    ==2547==    by 0x419FA3: vfbKeybdProc (InitInput.c:74)
+    ==2547==    by 0x425A3D: ActivateDevice (devices.c:540)
+    ==2547==    by 0x425F65: InitAndStartDevices (devices.c:713)
+    ==2547==    by 0x5ACA57: main (main.c:259)
+    
+    and a few more of the above.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+
+commit 623981ddaeb8836f3b0939e527c0e943f9c4e974
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Fri Feb 1 09:06:20 2013 +1000
 
@@ -894,9 +6603,33 @@
     
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
     Reviewed-by: Keith Packard <keithp@keithp.com>
-    (cherry picked from commit 623981ddaeb8836f3b0939e527c0e943f9c4e974)
-
-commit 1c215f5a9c7f8a75ad56f3b34b0b7de2ee9aa6ff
+
+commit dce40e2266200421647044ec7e856656d2ef952d
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Tue Feb 26 12:34:21 2013 +1000
+
+    Xi: always return BadMatch for XTest devices ChangeDeviceControl requests
+    
+    The only controls that still do something are DEVICE_RESOLUTION and
+    DEVICE_ENABLE.
+    
+    XTest devices have no resolution to change, and they cannot be disabled. So
+    skip the lot, and prevent a crash in the DDX when it's trying to
+    de-reference pInfo->control_proc on device with no pInfo struct.
+    
+    Likewise, don't allow setting device mode or the valuators.
+    XTest pointers are always relative, they don't have a mode.
+    
+    Test cases:
+    xts5/XI/ChangeDeviceControl (1/10)
+    xts5/XI/SetDeviceValuators (1/6)
+    and a few others
+    
+    Reported-by: Knut Petersen <Knut_Petersen@t-online.de>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+
+commit 23d1bc69f305edd5a6e2cfec3dfc84befda0881c
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Thu Mar 14 11:07:57 2013 +1000
 
@@ -906,23 +6639,692 @@
     
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
     Reviewed-by: Keith Packard <keithp@keithp.com>
-    (cherry picked from commit 23d1bc69f305edd5a6e2cfec3dfc84befda0881c)
-
-commit 70236f770c7004016efe89dc5638ccbb9ef15bee
-Author: Daniel Martin <consume.noise@gmail.com>
-Date:   Thu Dec 20 13:50:17 2012 +0100
-
-    ephyr: Fix crash on 24bpp host framebuffer
-    
-    Use bytes_per_line and bits_per_pixel from the created XImage to fix
-        https://bugzilla.redhat.com/show_bug.cgi?id=518960
-    
-    Signed-off-by: Daniel Martin <consume.noise@gmail.com>
-    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
-    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-    (cherry picked from commit bd58ebe4cf3b0ce60f87fb26a3715f774dabd349)
-
-commit a11cf8dd68275ba4676888e5957bff13efbfbb3d
+
+commit 27b11f5c19d67e2f6784d86cb7df86bbab3b58bb
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Fri Feb 15 11:19:10 2013 +1000
+
+    Xi: fix comment - XI2 grabs aren't keysym grabs
+    
+    Comment dates back to a pre-release version of XI2 that supported keysym
+    grabs. That never made it into a release, it was ditched before.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+
+commit 2746c681639f9512e6e45fb8d0151b996b6aff7f
+Merge: 1e6cf8e 9878e09
+Author: Keith Packard <keithp@keithp.com>
+Date:   Mon May 6 10:52:40 2013 -0700
+
+    Merge remote-tracking branch 'alanc/master'
+
+commit 1e6cf8ec20d07b73a11116564aba71b4e4291dcd
+Merge: dbfeaf7 5860408a
+Author: Keith Packard <keithp@keithp.com>
+Date:   Mon May 6 10:20:21 2013 -0700
+
+    Merge remote-tracking branch 'jturney/unused-but-set-variable-warning-fix'
+
+commit dbfeaf70623a83e1a3f3255c94d52e0e04702837
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date:   Tue Apr 30 14:30:18 2013 -0700
+
+    xfree86: don't enable anything in xf86InitialConfiguration for GPU screens
+    
+    There's no point in turning on outputs connected to GPU screens during initial
+    configuration.  Not only does this cause them to just display black, it also
+    confuses clients when these screens are attached to a master screen and RandR
+    reports that the outputs are already on.
+    
+    Also, don't print the warning about no outputs being found on GPU screens,
+    since that's expected.
+    
+    Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
+    Reviewed-by: Dave Airlie <airlied@gmail.com>
+
+commit 5860408a19d956f8cebb7ae39cfdbfcebd5e6360
+Author: Jon TURNEY <jon.turney@dronecode.org.uk>
+Date:   Wed Apr 3 18:43:26 2013 +0100
+
+    hw/xwin: Fix unused-but-set-variable warning in ProcWindowsWMFrameGetRect()
+    
+    /jhbuild/checkout/xorg/xserver/hw/xwin/winwindowswm.c: In function ‘ProcWindowsWMFrameGetRect’:
+    /jhbuild/checkout/xorg/xserver/hw/xwin/winwindowswm.c:322:12: error: variable ‘ir’ set but not used [-Werror=unused-but-set-variable]
+    
+    Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+    Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
+
+commit bcfd523c150b34e9304d174ba812160c611f270d
+Author: Jon TURNEY <jon.turney@dronecode.org.uk>
+Date:   Wed Apr 3 18:34:38 2013 +0100
+
+    hw/xwin: Fix unused-but-set-variable warning in winMWExtWMUpdateWindowDecoration()
+    
+    /jhbuild/checkout/xorg/xserver/hw/xwin/winwin32rootlesswindow.c: In function ‘winMWExtWMUpdateWindowDecoration’:
+    /jhbuild/checkout/xorg/xserver/hw/xwin/winwin32rootlesswindow.c:189:11: error: variable ‘dwStyle’ set but not used [-Werror=unused-but-set-variable]
+    
+    Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+    Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
+
+commit fbf819c24dc080f166cff29bf46b0feb604c6b8c
+Author: Jon TURNEY <jon.turney@dronecode.org.uk>
+Date:   Wed Apr 3 16:40:35 2013 +0100
+
+    hw/xwin: Fix unused-but-set-variable warning in winHotKeyAltTabPrimaryDD()
+    
+    /jhbuild/checkout/xorg/xserver/hw/xwin/winpfbdd.c: In function ‘winHotKeyAltTabPrimaryDD’:
+    /jhbuild/checkout/xorg/xserver/hw/xwin/winpfbdd.c:518:20: error: variable ‘rcSrc’ set but not used [-Werror=unused-but-set-variable]
+    
+    Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+    Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
+
+commit 7dae1e59ce6077f475c04a41fa00096a74114064
+Author: Jon TURNEY <jon.turney@dronecode.org.uk>
+Date:   Wed Apr 3 16:33:39 2013 +0100
+
+    hw/xwin: Fix unused-but-set-variable warning in winMinimizeWindow() when built !XWIN_MULTIWINDOWEXTWM
+    
+    /jhbuild/checkout/xorg/xserver/hw/xwin/winmultiwindowwindow.c: In function ‘winMinimizeWindow’:
+    /jhbuild/checkout/xorg/xserver/hw/xwin/winmultiwindowwindow.c:813:20: error: variable ‘pScreenInfo’ set but not used [-Werror=unused-but-set-variable]
+    
+    Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+    Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
+
+commit b284666f09b77f9c2f048fee22015a353152a57f
+Author: Jon TURNEY <jon.turney@dronecode.org.uk>
+Date:   Wed Apr 3 16:27:45 2013 +0100
+
+    hw/xwin: Fix unused-but-set-variable warning in winClipboardProc()
+    
+    /jhbuild/checkout/xorg/xserver/hw/xwin/winclipboardthread.c: In function ‘winClipboardProc’:
+    /jhbuild/checkout/xorg/xserver/hw/xwin/winclipboardthread.c:88:25: error: variable ‘atomClipboardManager’ set but not used [-Werror=unused-but-set-variable]
+    
+    Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+    Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
+
+commit d414a09bb7f8d4440b36cbc6f0b4ca0eaefe5cbf
+Author: Jon TURNEY <jon.turney@dronecode.org.uk>
+Date:   Wed Apr 3 16:25:54 2013 +0100
+
+    hw/xwin: Fix unused-but-set-variable warning in winWindowProc()
+    
+    /jhbuild/checkout/xorg/xserver/hw/xwin/winwndproc.c: In function ‘winWindowProc’:
+    /jhbuild/checkout/xorg/xserver/hw/xwin/winwndproc.c:65:22: error: variable ‘s_hInstance’ set but not used [-Werror=unused-but-set-variable]
+    
+    Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+    Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
+
+commit 7726102671690eb28138d032c8398ac903b97606
+Author: Jon TURNEY <jon.turney@dronecode.org.uk>
+Date:   Wed Apr 3 16:24:08 2013 +0100
+
+    hw/xwin: Fix unused-but-set-variable warning in winCopyWindowNativeGDI()
+    
+    /jhbuild/checkout/xorg/xserver/hw/xwin/winwindow.c: In function ‘winCopyWindowNativeGDI’:
+    /jhbuild/checkout/xorg/xserver/hw/xwin/winwindow.c:131:15: error: variable ‘pwinRoot’ set but not used [-Werror=unused-but-set-variable]
+    
+    Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+    Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
+
+commit b9a2566a6e2f56a0335cd4a089b2066c06a67455
+Author: Jon TURNEY <jon.turney@dronecode.org.uk>
+Date:   Wed Apr 3 16:50:38 2013 +0100
+
+    hw/xwin: Fix unused-but-set-variable warning in winFinishScreenInitFB()
+    
+    /jhbuild/checkout/xorg/xserver/hw/xwin/winscrinit.c:264:11: error: variable ‘pbits’ set but not used [-Werror=unused-but-set-variable]
+    
+    Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+    Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
+
+commit c97fbd39adbc0a8cb8537f40b12c091aee29221a
+Author: Jon TURNEY <jon.turney@dronecode.org.uk>
+Date:   Wed Apr 3 16:18:27 2013 +0100
+
+    hw/xwin: Fix unused-but-set-variable warning in winIsFakeCtrl_L()
+    
+    /jhbuild/checkout/xorg/xserver/hw/xwin/winkeybd.c:331:17: error: variable ‘lastMessage’ set but not used [-Werror=unused-but-set-variable]
+    
+    Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+    Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
+
+commit cdb74fe17dcb3b5a9c61951f897deaf07f86775f
+Author: Jon TURNEY <jon.turney@dronecode.org.uk>
+Date:   Wed Apr 3 16:16:06 2013 +0100
+
+    hw/xwin: Fix unused-but-set-variable warnings in windialog.c
+    
+    /jhbuild/checkout/xorg/xserver/hw/xwin/windialogs.c: In function ‘winChangeDepthDlgProc’:
+    /jhbuild/checkout/xorg/xserver/hw/xwin/windialogs.c:432:22: error: variable ‘s_pScreen’ set but not used [-Werror=unused-but-set-variable]
+    /jhbuild/checkout/xorg/xserver/hw/xwin/windialogs.c: In function ‘winAboutDlgProc’:
+    /jhbuild/checkout/xorg/xserver/hw/xwin/windialogs.c:564:22: error: variable ‘s_pScreen’ set but not used [-Werror=unused-but-set-variable]
+    
+    Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+    Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
+
+commit f2fd8ec3725a61abbc831f0a9ec28fa2b7020c47
+Author: Dave Airlie <airlied@redhat.com>
+Date:   Wed Jan 9 12:52:13 2013 +1000
+
+    gpu: call CreateScreenResources for GPU screens
+    
+    I didn't think we needed this before, but after doing some more
+    work with reverse optimus it seems like it should be called.
+    
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+    Signed-off-by: Dave Airlie <airlied@redhat.com>
+
+commit 8fcb9d91b69abc72ddef31b9f2e8585580c6cad2
+Author: Dave Airlie <airlied@redhat.com>
+Date:   Wed Jan 9 12:52:08 2013 +1000
+
+    dix: allow pixmap dirty helper to be used for non-shared pixmaps
+    
+    this allows the pixmap dirty helper to be used for reverse optimus,
+    where the GPU wants to copy from the shared pixmap to its VRAM copy.
+    
+    [airlied: slave_dst is wrong name now but pointless ABI churn at this point]
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+    Signed-off-by: Dave Airlie <airlied@redhat.com>
+
+commit 16077b81c502e04d77f81f683e0c213b9fe75393
+Author: Dave Airlie <airlied@redhat.com>
+Date:   Wed Jan 9 12:52:03 2013 +1000
+
+    xf86crtc: don't use scrn->display for gpu screens
+    
+    scrn->display is a property of the main screen really, and we don't
+    want to have the GPU screens use it for anything when picking modes
+    or a front buffer size.
+    
+    This fixes a bug where when you plugged a display link device, it
+    would try and allocate a screen the same size as the current running
+    one (3360x1050 in this case), which was too big for the device. Avoid
+    doing this and just pick sizes based on whats plugged into this device.
+    
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+    Signed-off-by: Dave Airlie <airlied@redhat.com>
+
+commit f0d0d75bfe62553dde353f89e46ff13dd863fbe8
+Author: Dave Airlie <airlied@redhat.com>
+Date:   Wed Jan 9 12:51:55 2013 +1000
+
+    dix/gpu: remove asserts for output/offload from same slave
+    
+    We should have no problem allowing output/offload from the same slave,
+    I asserted here, but in order to implement reverse optimus this makes
+    perfect sense. (reverse optimus is intel outputting to nvidia).
+    
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+    Signed-off-by: Dave Airlie <airlied@redhat.com>
+
+commit 9d26e8eaf5a2d7c3e65670ac20254c60f665c463
+Author: Dave Airlie <airlied@redhat.com>
+Date:   Wed Jan 9 14:26:35 2013 +1000
+
+    randr: report changes when we disconnect a GPU slave
+    
+    When we disconnect an output/offload slave set the changed bits,
+    so a later TellChanged can do something.
+    
+    Then when we remove a GPU slave device, sent change notification
+    to the protocol screen.
+    
+    This allows hot unplugged USB devices to disappear in clients.
+    
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Signed-off-by: Dave Airlie <airlied@redhat.com>
+
+commit b724324252d13ff95f62eebd12d125b194d2ccc2
+Author: Dave Airlie <airlied@redhat.com>
+Date:   Wed Jan 9 14:25:43 2013 +1000
+
+    randr: only respected changed on the protocol screen
+    
+    We don't want to know about changes on the non-protocol screen,
+    we will fix up setchanged to make sure non-protocol screens update
+    the protocol screens when they have a change.
+    
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Signed-off-by: Dave Airlie <airlied@redhat.com>
+
+commit b3f70f38edebac87afe9351538365292f1aaaff3
+Author: Dave Airlie <airlied@redhat.com>
+Date:   Wed Jan 9 14:29:47 2013 +1000
+
+    randr: make SetChanged modify the main protocol screen not the gpu screen
+    
+    When SetChanged is called we now modify the main protocol screen,
+    not the the gpu screen. Since changed stuff should work at the protocol level.
+    
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Signed-off-by: Dave Airlie <airlied@redhat.com>
+
+commit f9c8248b8326ad01f33f31531c6b2479baf80f02
+Author: Dave Airlie <airlied@redhat.com>
+Date:   Wed Jan 9 14:23:57 2013 +1000
+
+    randr: don't directly set changed bits in randr screen
+    
+    Introduce a wrapper interface so we can fix things up for multi-gpu
+    situations later.
+    
+    This just introduces the API for now.
+    
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Signed-off-by: Dave Airlie <airlied@redhat.com>
+
+commit 451ba4bd41b82acd4aec6236ba121e00cfeb311b
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date:   Thu Jan 10 03:26:33 2013 +0000
+
+    hw/xfree86: Only report SetDesiredModes() failed if at least one modeset fails
+    
+    commit 6703a7c7cf1a349c137e247a0c8eb462ff7b07be
+    Author: Keith Packard <keithp@keithp.com>
+    Date:   Tue Jan 8 20:24:32 2013 -0800
+    
+        hw/xfree86: Require only one working CRTC to start the server.
+    
+    changed the logic to try to set the mode on all connected outputs rather
+    than abort upon the first failure. The return error code was then
+    tweaked such that it reported success if it set a mode on any crtc.
+    However, this confuses the headless case where we never enable any crtcs
+    and also, importantly, never fail to set a crtc.
+    
+    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59190
+    
+    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+    Also-written-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 9878e097a7de2f86eff0dcfd9fe5d83b162197ec
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Wed Apr 24 15:24:31 2013 -0700
+
+    Only call xf86platformVTProbe() when it's defined
+    
+    Fixes build on non-udev systems, since XSERVER_PLATFORM_BUS is only
+    defined in configure.ac if $CONFIG_UDEV_KMS is true.
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Dave Airlie <airlied@redhat.com>
+
+commit e779402d531625ba4ed5d628d06c6b1e06b2ec7b
+Author: Keith Packard <keithp@keithp.com>
+Date:   Thu Apr 25 09:02:31 2013 -0700
+
+    shadow: Define c2p_unsupported
+    
+    Just make this call BUG_WARN(1) to indicate that something unexpected
+    happened
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 2b361fbda536f0125e4b87a6d455acc58f4e8690
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sun Feb 10 10:24:59 2013 -0800
+
+    sparcPromPathname2Node: free name when returning error, instead of leaking it
+    
+    Reported with other leaks found by cppcheck in bugzilla #50281
+    https://bugs.freedesktop.org/show_bug.cgi?id=50281
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+
+commit 174ccd84931ece5a92a09c4a1d6a47e0958ebf7e
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sun Feb 10 10:24:59 2013 -0800
+
+    xf86SbusCmapLoadPalette: Delay malloc until needed, avoiding leak on error
+    
+    Reported with other leaks found by cppcheck in bugzilla #50281
+    https://bugs.freedesktop.org/show_bug.cgi?id=50281
+    
+    V2: check for malloc failure
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 6bca0184d167388cd417d113031317990489987d
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sun Feb 10 10:18:02 2013 -0800
+
+    dmxVDLRead: if we opened a file, close it instead of leaking it
+    
+    Reported with other leaks found by cppcheck in bugzilla #50281
+    https://bugs.freedesktop.org/show_bug.cgi?id=50281
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+
+commit 8c5ff2e93f73b24adff741b25fc1e31b2f5dd0ac
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sun Feb 10 10:24:59 2013 -0800
+
+    __glXDRIscreenProbe: free screen when DRI2Connect fails, instead of leaking it
+    
+    Reported with other leaks found by cppcheck in bugzilla #50281
+    https://bugs.freedesktop.org/show_bug.cgi?id=50281
+    
+    V2: goto existing error handler, instead of replicating more of it here
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+
+commit 9567fa9a7269765bc59ac71b931e16df261d794d
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sun Feb 10 10:24:59 2013 -0800
+
+    __glXDRIscreenCreateContext: free context on failure, instead of leaking it
+    
+    Reported with other leaks found by cppcheck in bugzilla #50281
+    https://bugs.freedesktop.org/show_bug.cgi?id=50281
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
+
+commit 7ab98bafc9a3426fd40f8ae693430491333ba4fc
+Merge: 53da26a 5ab2603
+Author: Keith Packard <keithp@keithp.com>
+Date:   Wed Apr 24 14:14:45 2013 -0700
+
+    Merge remote-tracking branch 'geertu/master'
+
+commit 53da26afb76bcce70b91c5df23d25e7e85c010cf
+Merge: 5ece86e d8d3c78
+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: ef0a726 22cab8a
+Author: Keith Packard <keithp@keithp.com>
+Date:   Wed Apr 24 10:23:51 2013 -0700
+
+    Merge remote-tracking branch 'airlied/for-keithp-gpu-vt-owner'
+
+commit ef0a726bc8d5c415244cb4f86d664938b0127a5d
+Author: Jeremy White <jwhite@codeweavers.com>
+Date:   Thu Mar 21 10:58:42 2013 -0500
+
+    Eliminate the use of xf86Rename.h
+    
+    Signed-off-by: Jeremy White <jwhite@codeweavers.com>
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 2b539239e465faa9e8c6d96f1c6f00e593d46c18
+Author: Keith Packard <keithp@keithp.com>
+Date:   Wed Apr 24 10:11:03 2013 -0700
+
+    Bump to 1.14.99.1
+    
+    Snapshot with fix for CVE-2013-1940.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit d8d3c78b6ebdf63836951d2dbd2d3d621ff26da2
+Author: Andreas Müller <schnitzeltony@googlemail.com>
+Date:   Tue Apr 16 14:30:43 2013 +0200
+
+    dixstruct.h: fix segfaults - char is unsigned for ARM and PowerPC architectures
+    
+    see ARM related bug reports [1-3]
+    
+    [1] https://github.com/archlinuxarm/PKGBUILDs/issues/446I
+    [2] http://www.raspberrypi.org/phpBB3/viewtopic.php?t=38568&p=321673
+    [3] http://lists.linuxtogo.org/pipermail/openembedded-core/2013-April/037805.html
+    
+    Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
+    Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 7d722796c678532e8c5897c673c43184da353f44
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Wed Apr 17 19:47:42 2013 +1000
+
+    dix: plug memory leak in freeing TouchClass
+    
+    ==15562== 1,800 bytes in 1 blocks are definitely lost in loss record 298 of 330
+    ==15562==    at 0x4A06B6F: calloc (vg_replace_malloc.c:593)
+    ==15562==    by 0x4312C7: InitTouchClassDeviceStruct (devices.c:1644)
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 5ab260317ad3b2aafff31a97df21620db52eacd1
+Author: Geert Uytterhoeven <geert@linux-m68k.org>
+Date:   Sun Mar 10 21:04:19 2013 +0100
+
+    Xfbdev: Wire up Amiga afb4 and afb8 support
+    
+    Add support for Amiga-style bitplanes, with 4 or 8 bits per pixel.
+    
+    Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
+    Acked-by: Keith Packard <keithp@keithp.com>
+
+commit 672bc5bb38918304cf68114a1112cd48651a5e83
+Author: Geert Uytterhoeven <geert@linux-m68k.org>
+Date:   Sun Mar 10 17:17:26 2013 +0100
+
+    Xfbdev: Wire up Atari iplan2p4 and iplan2p8 support
+    
+    Add support for Atari-style interleaved bitplanes, with 2 bytes interleave
+    and 4 or 8 bits per pixel.
+    
+    Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+
+commit 95a3c7536c1a4afe97aaf955980034cc69af9c2f
+Author: Geert Uytterhoeven <geert@linux-m68k.org>
+Date:   Sun Mar 10 17:17:26 2013 +0100
+
+    Xfbdev: Force shadowfb for frame buffers with non-packed pixels
+    
+    Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+
+commit 0e808110df216649e05503baecd06cd5a3e50421
+Author: Geert Uytterhoeven <geert@linux-m68k.org>
+Date:   Sun Mar 10 17:17:26 2013 +0100
+
+    Xfbdev: Reject unsupported frame buffer types
+    
+    Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+
+commit cfd10576812c36f5844805eb95ed1f2d093d1691
+Author: Geert Uytterhoeven <geert@linux-m68k.org>
+Date:   Sun Mar 10 21:03:44 2013 +0100
+
+    Shadow: Add support for Amiga afb8
+    
+    Add support for Amiga-style bitplanes, with 8 bits per pixel.
+    
+    Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
+    Acked-by: Keith Packard <keithp@keithp.com>
+
+commit a1b8e7f1e6118b611ba9d332b8763ee2b44f550c
+Author: Geert Uytterhoeven <geert@linux-m68k.org>
+Date:   Wed Mar 27 09:37:02 2013 +0100
+
+    Shadow: Add support for Amiga afb4
+    
+    Add support for Amiga-style bitplanes, with 4 bits per pixel.
+    
+    Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
+    Acked-by: Keith Packard <keithp@keithp.com>
+
+commit d7181e567d1629c387b834da7eecdf618d14718e
+Author: Geert Uytterhoeven <geert@linux-m68k.org>
+Date:   Sun Mar 10 17:16:17 2013 +0100
+
+    Shadow: Add support for Atari iplan2p8
+    
+    Add support for Atari-style interleaved bitplanes, with 2 bytes interleave
+    and 8 bits per pixel.
+    
+    Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
+    Acked-by: Keith Packard <keithp@keithp.com>
+
+commit 3f7506b0fca72b2462b85bc4f613de809ae95859
+Author: Geert Uytterhoeven <geert@linux-m68k.org>
+Date:   Sun Mar 10 21:01:02 2013 +0100
+
+    Shadow: Add support for Atari iplan2p4
+    
+    Add support for Atari-style interleaved bitplanes, with 2 bytes interleave
+    and 4 bits per pixel.
+    
+    Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
+    Acked-by: Keith Packard <keithp@keithp.com>
+
+commit 87af9ab7d52578b0ea315fc4f8dfd906d19755fb
+Author: Geert Uytterhoeven <geert@linux-m68k.org>
+Date:   Sun Mar 10 17:15:05 2013 +0100
+
+    Shadow: Add c2p core
+    
+    Add Chunky-to-Planar core functionality, to be used by the Atari and Amiga
+    (interleaved) bitplanes code.
+    
+    Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
+    Acked-by: Keith Packard <keithp@keithp.com>
+
+commit 4ee2566c3e420a717be36f79126a14e15edac30f
+Author: Geert Uytterhoeven <geert@linux-m68k.org>
+Date:   Tue Mar 12 18:10:40 2013 +0100
+
+    Xfbdev: Treat 1 bpp pseudocolor as monochrome
+    
+    miCreateDefColormap() only preallocates black and white pixels if
+    depth > 1.
+    Hence override the visual, so fbdevCreateColormap() takes care of it.
+    
+    Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+
+commit 6dfb94a891ed445f47832ba1364fcbf1de018f4a
+Author: Geert Uytterhoeven <geert@linux-m68k.org>
+Date:   Tue Mar 12 14:16:10 2013 +0100
+
+    Xfbdev: Add support for monochrome visuals
+    
+    Monochrome supports StaticGray, with hardcoded black and white pixels.
+    
+    Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+
+commit 1049b32166760bdc00106625e213d31a8fc60bad
+Author: Geert Uytterhoeven <geert@linux-m68k.org>
+Date:   Tue Mar 12 14:19:25 2013 +0100
+
+    Xfbdev: Handle unset fix.line_length
+    
+    Older frame buffer devices may not fill in fix.line_length, in which
+    case it must be calculated by the application.
+    
+    Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
+
+commit 5c509c360d97bea78ef461596ab4b7bde69020ac
+Author: Geert Uytterhoeven <geert@linux-m68k.org>
+Date:   Fri Feb 22 13:21:28 2013 +0100
+
+    Xfbdev: Make char *fbdevDevicePath const
+    
+    This fixes:
+    
+    hw/kdrive/fbdev/fbdev.c: In function 'fbdevInitialize':
+    hw/kdrive/fbdev/fbdev.c:41:25: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
+    
+    Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+
+commit b08afbc53c1d583c3913b92e67db44823077b112
+Author: Geert Uytterhoeven <geert@linux-m68k.org>
+Date:   Tue Mar 12 15:20:00 2013 +0100
+
+    KDrive: Bail out if screen initialization failed
+    
+    Else we may get a segmentation fault later.
+    
+    Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+
+commit e7045c9dd208a1afe36526ab21ef15f8b01c8bd2
+Author: Geert Uytterhoeven <geert@linux-m68k.org>
+Date:   Sat Feb 23 20:09:22 2013 +0100
+
+    test/input: Fix double-aligned test in dix_valuator_alloc() on m68k
+    
+    On m68k, doubles are not 64-bit aligned, just like on i386 and sh.
+    
+    Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
+
+commit 8bb0616cc2799c2c34448da6337ea8cb9438cda7
+Author: Geert Uytterhoeven <geert@linux-m68k.org>
+Date:   Fri Feb 22 21:10:07 2013 +0100
+
+    miext/shadow/shpacked.c: Remove unused PickBit() define
+    
+    Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+
+commit 6ca03b9161d33b1d2b55a3a1a913cf88deb2343f
+Author: Dave Airlie <airlied@gmail.com>
+Date:   Wed Apr 10 16:09:01 2013 +1000
+
+    xf86: fix flush input to work with Linux evdev devices.
+    
+    So when we VT switch back and attempt to flush the input devices,
+    we don't succeed because evdev won't return part of an event,
+    since we were only asking for 4 bytes, we'd only get -EINVAL back.
+    
+    This could later cause events to be flushed that we shouldn't have
+    gotten.
+    
+    This is a fix for CVE-2013-1940.
+    
+    Signed-off-by: Dave Airlie <airlied@redhat.com>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit ddc149beaf708e84fb5573c4322d4f859c517917
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Mon Feb 27 18:50:46 2012 +1000
+
+    Stop the shouting
+    
+    Meanwhile, here in the future lowercase letters have been invented.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
+
+commit 27356a45b4f6bad4d0bbf356e6d976d0c8dd257b
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Mon Feb 27 17:22:16 2012 +1000
+
+    dix: only allocate unused classes for master devices
+    
+    Slave devices don't need these and the matching code in CloseDevice() has a
+    IsMaster() condition on freeing these, causing a leak.
+    
+    ==16111== 384 bytes in 4 blocks are definitely lost in loss record 72 of 105
+    ==16111==    at 0x4C28BB4: calloc (vg_replace_malloc.c:467)
+    ==16111==    by 0x42AEE2: AllocDevicePair (devices.c:2707)
+    ==16111==    by 0x4BAA27: AllocXTestDevice (xtest.c:617)
+    ==16111==    by 0x4BA89A: InitXTestDevices (xtest.c:570)
+    ==16111==    by 0x425F5E: InitCoreDevices (devices.c:690)
+    ==16111==    by 0x5ACB2D: main (main.c:257)
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
+
+commit 98b94c36d6b1d286bbd4cb414e54b4b95a1484b0
 Author: Maarten Lankhorst <maarten.lankhorst@canonical.com>
 Date:   Mon Apr 15 16:53:48 2013 +0200
 
@@ -936,9 +7338,8 @@
     Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
     Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-    (cherry picked from commit 98b94c36d6b1d286bbd4cb414e54b4b95a1484b0)
 
-commit 05ca549d81f476561257076f354c781d590c9a4f
+commit 4bff442ec5aa4b93a3f5c11782d4b7b9d1ae13ac
 Author: Knut Petersen <Knut_Petersen@t-online.de>
 Date:   Tue Feb 26 07:52:59 2013 +0100
 
@@ -950,9 +7351,8 @@
     Signed-off-by: Knut Petersen <Knut_Petersen@t-online.de>
     Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-    (cherry picked from commit 4bff442ec5aa4b93a3f5c11782d4b7b9d1ae13ac)
 
-commit 2cc81338d1804a6a6c92f48773d3e1b2543a262b
+commit 9003399708936481083424b4ff8f18a16b88b7b3
 Author: Rui Matos <tiagomatos@gmail.com>
 Date:   Sat Apr 13 04:22:54 2013 +0200
 
@@ -967,9 +7367,28 @@
     Signed-off-by: Rui Matos <tiagomatos@gmail.com>
     Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-    (cherry picked from commit 9003399708936481083424b4ff8f18a16b88b7b3)
-
-commit 08998230789ff15843f726d7231ec0de2f67be6b
+
+commit d16284687ddeffde32a561b8c67b2e2e3d66aeaa
+Author: Bryce Harrington <bryce@canonical.com>
+Date:   Wed Apr 10 23:05:40 2013 -0700
+
+    xfree86: Revert workaround for drm race condition.
+    
+    Revert 70739e817b2d64bc020ea491f23a3574bdb6155e and mostly revert
+    c31eac647a9ecf0fb20dc98266cadf0ba923ba14.
+    
+    Further investigation shows the encountered race condition is between
+    lightdm and plymouth-splash, as implemented in the Ubuntu distribution
+    within the limitations of upstart's job coordination logic, and can (and
+    should) be fixed within those limiations.  Not in xserver itself.
+    
+    This leaves some of the diagnostic improvements from the recent patch
+    series, in case others run into a similar situation.
+    
+    Signed-off-by: Bryce Harrington <bryce@canonical.com>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 131f883f85b9b734e5e5652f16ba1d3b5f4de12f
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Fri Apr 12 09:14:53 2013 +1000
 
@@ -982,9 +7401,45 @@
     
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
     Reviewed-by: Dave Airlie <airlied@redhat.com>
-    (cherry picked from commit 131f883f85b9b734e5e5652f16ba1d3b5f4de12f)
-
-commit 2c9ac2689fc75cfa3293316acd51b9a39f37edfd
+
+commit 22cab8a28a433d03a4e6ba97f9a160271d73cb52
+Author: Dave Airlie <airlied@gmail.com>
+Date:   Wed Apr 10 16:32:15 2013 +1000
+
+    xf86: don't hotplug output devices while VT switched.
+    
+    We don't want to hotplug output devices while we are VT switched,
+    as we get races between multiple X servers on the device open, and
+    drm device master status. This just queues device opens until we return
+    from VT switch.
+    
+    Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
+    Signed-off-by: Dave Airlie <airlied@redhat.com>
+
+commit 5b359cf6135ca173d8f65cb92926332f07f91efe
+Author: Dave Airlie <airlied@gmail.com>
+Date:   Wed Apr 10 16:32:11 2013 +1000
+
+    xf86: use new xf86VTOwner interface in a few places
+    
+    This replaces some previous uses of direct xf86Screens[0] accesses.
+    
+    Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
+    Signed-off-by: Dave Airlie <airlied@gmail.com>
+
+commit d61ea1f64db45201c1a2b39c39293c5768d98092
+Author: Dave Airlie <airlied@gmail.com>
+Date:   Wed Apr 10 16:32:02 2013 +1000
+
+    xfree86: add VT owner interface
+    
+    This is just a simple interface to avoid accessing x86Screens[0]
+    directly.
+    
+    Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
+    Signed-off-by: Dave Airlie <airlied@gmail.com>
+
+commit 7347f39f94d8cebbf73ce1a2f94d1abdaf7ff383
 Author: Maarten Lankhorst <maarten.lankhorst@canonical.com>
 Date:   Tue Apr 9 11:19:07 2013 +0200
 
@@ -997,9 +7452,8 @@
     Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
     Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-    (cherry picked from commit 7347f39f94d8cebbf73ce1a2f94d1abdaf7ff383)
 
-commit 0a3630708b729a02cefc342456b243254f5b699d
+commit dbba50a1280cbda9ecff6f37884b4c5756c30bab
 Author: Keith Packard <keithp@keithp.com>
 Date:   Tue Apr 9 16:23:19 2013 -0700
 
@@ -1010,9 +7464,8 @@
     Signed-off-by: Keith Packard <keithp@keithp.com>
     Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-    (cherry picked from commit dbba50a1280cbda9ecff6f37884b4c5756c30bab)
 
-commit 9ad9c1358567998564d177f06d98fc46dcb41009
+commit b86b3d10bb2fee1a922b8831e8bb415c339f3d99
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Mon Mar 4 07:58:41 2013 +1000
 
@@ -1027,113 +7480,149 @@
     anyway.
     
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-    (cherry picked from commit b86b3d10bb2fee1a922b8831e8bb415c339f3d99)
-
-commit c760fb0154848d47438908ba8b3da2fffc68a460
-Author: Chris Wilson <chris@chris-wilson.co.uk>
-Date:   Thu Jan 10 03:26:33 2013 +0000
-
-    hw/xfree86: Only report SetDesiredModes() failed if at least one modeset fails
-    
-    commit 6703a7c7cf1a349c137e247a0c8eb462ff7b07be
-    Author: Keith Packard <keithp@keithp.com>
-    Date:   Tue Jan 8 20:24:32 2013 -0800
-    
-        hw/xfree86: Require only one working CRTC to start the server.
-    
-    changed the logic to try to set the mode on all connected outputs rather
-    than abort upon the first failure. The return error code was then
-    tweaked such that it reported success if it set a mode on any crtc.
-    However, this confuses the headless case where we never enable any crtcs
-    and also, importantly, never fail to set a crtc.
-    
-    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59190
-    
-    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-    Also-written-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
-    Reviewed-by: Keith Packard <keithp@keithp.com>
-    Signed-off-by: Keith Packard <keithp@keithp.com>
-    (cherry picked from commit 451ba4bd41b82acd4aec6236ba121e00cfeb311b)
-
-commit 5c296c32d9486201c0fbb51e905dd3f8542c4d88
-Author: Dave Airlie <airlied@gmail.com>
-Date:   Wed Apr 10 16:32:15 2013 +1000
-
-    xf86: don't hotplug output devices while VT switched.
-    
-    We don't want to hotplug output devices while we are VT switched,
-    as we get races between multiple X servers on the device open, and
-    drm device master status. This just queues device opens until we return
-    from VT switch.
-    
-    Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-    Signed-off-by: Dave Airlie <airlied@redhat.com>
-    (cherry picked from commit 22cab8a28a433d03a4e6ba97f9a160271d73cb52)
-
-commit 39ce034505b6526b5c945a6f44a34e020a22d187
-Author: Dave Airlie <airlied@gmail.com>
-Date:   Wed Apr 10 16:32:11 2013 +1000
-
-    xf86: use new xf86VTOwner interface in a few places
-    
-    This replaces some previous uses of direct xf86Screens[0] accesses.
-    
-    Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-    Signed-off-by: Dave Airlie <airlied@gmail.com>
-    (cherry picked from commit 5b359cf6135ca173d8f65cb92926332f07f91efe)
-
-commit 92135056375fe9a2b637487dd4a9274ab6dd338d
-Author: Dave Airlie <airlied@gmail.com>
-Date:   Wed Apr 10 16:32:02 2013 +1000
-
-    xfree86: add VT owner interface
-    
-    This is just a simple interface to avoid accessing x86Screens[0]
-    directly.
-    
-    Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-    Signed-off-by: Dave Airlie <airlied@gmail.com>
-    (cherry picked from commit d61ea1f64db45201c1a2b39c39293c5768d98092)
-
-commit f5796f98dadccf67c04f601178966614dd51a1b4
-Author: Peter Hutterer <peter.hutterer@who-t.net>
-Date:   Wed Apr 17 16:12:00 2013 +1000
-
-    xserver 1.14.1
-    
-    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-
-commit aac2d9d09c73fa2b9d02d8446718aa6ccd7e894a
-Author: Dave Airlie <airlied@gmail.com>
-Date:   Wed Apr 10 16:09:01 2013 +1000
-
-    xf86: fix flush input to work with Linux evdev devices.
-    
-    So when we VT switch back and attempt to flush the input devices,
-    we don't succeed because evdev won't return part of an event,
-    since we were only asking for 4 bytes, we'd only get -EINVAL back.
-    
-    This could later cause events to be flushed that we shouldn't have
-    gotten.
-    
-    This is a fix for CVE-2013-1940.
-    
-    Signed-off-by: Dave Airlie <airlied@redhat.com>
+
+commit ecf62755086fd65898998d5a509aee5f29a9583d
+Author: Jeremy White <jwhite@codeweavers.com>
+Date:   Thu Mar 21 10:58:57 2013 -0500
+
+    Define prototypes for hw/xfree86/modes/xf86Modes.c only in xf86Modes.h.
+    
+    This removes a large number of redundant declaration warnings.
+    
+    Signed-off-by: Jeremy White <jwhite@codeweavers.com>
+    Reviewed-by: Robert Morell <rmorell@nvidia.com>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit e13f29984251dbbe6076264ed710c2922312eed1
+Author: Bryce Harrington <bryce@canonical.com>
+Date:   Tue Mar 19 12:12:46 2013 -0700
+
+    xfree86: Be verbose if waiting on opening the drm device
+    
+    Signed-off-by: Bryce Harrington <bryce@canonical.com>
+    Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 70739e817b2d64bc020ea491f23a3574bdb6155e
+Author: Bryce Harrington <bryce@canonical.com>
+Date:   Tue Mar 19 12:12:45 2013 -0700
+
+    xfree86: Fix race condition failure opening drm.
+    
+    If other processes have had drm open previously, xserver may attempt to
+    open the device too early and fail, with xserver error exit "Cannot
+    run in framebuffer mode" or Xorg.0.log messages about "setversion 1.4
+    failed".
+    
+    In this situation, we're receiving back -EACCES from libdrm.  To address
+    this we need to re-set ourselves as the drm master, and keep trying to
+    set the interface until it works (or until we give up).
+    
+    See https://bugs.launchpad.net/ubuntu/+source/libdrm/+bug/982889
+    
+    Signed-off-by: Bryce Harrington <bryce@canonical.com>
+    Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit c31eac647a9ecf0fb20dc98266cadf0ba923ba14
+Author: Bryce Harrington <bryce@canonical.com>
+Date:   Tue Mar 19 12:12:44 2013 -0700
+
+    xfree86: Keep trying to set interface on drm for 2 seconds.
+    
+    And if we've had to delay booting due to not being able to set the
+    interface, fess up.
+    
+    Signed-off-by: Bryce Harrington <bryce@canonical.com>
+    Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit d1cc210de8c13f2db9f6f284ecc652305c28801e
+Author: Bryce Harrington <bryce@canonical.com>
+Date:   Tue Mar 19 12:12:43 2013 -0700
+
+    xfree86: Provide more details on failure
+    
+    Signed-off-by: Bryce Harrington <bryce@canonical.com>
+    Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit f059d0dabc553a5f748d86de9115da00be5997d5
+Author: Bryce Harrington <bryce@canonical.com>
+Date:   Tue Mar 19 12:12:42 2013 -0700
+
+    xfree86: Track error code and add label for error handling.
+    
+    Signed-off-by: Bryce Harrington <bryce@canonical.com>
+    Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 4d7052bd7bbf49b573dc4d34ad14e7f058a0d884
+Author: Bryce Harrington <bryce@canonical.com>
+Date:   Tue Mar 19 12:12:41 2013 -0700
+
+    xfree86: (Cleanup) Close fd if drm interface 1.4 could not be set.
+    
+    Signed-off-by: Bryce Harrington <bryce@canonical.com>
+    Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 8928f8fa0bb154ce437af703ff702016f0dcf127
+Author: Geert Uytterhoeven <geert@linux-m68k.org>
+Date:   Mon Mar 18 21:38:10 2013 +0100
+
+    kdrive/fbdev: revive randr new screen size logic
+    
+    hw/kdrive/fbdev/fbdev.c: In function 'fbdevRandRSetConfig':
+    hw/kdrive/fbdev/fbdev.c:470:19: warning: variable 'newheight' set but not used [-Wunused-but-set-variable]
+    hw/kdrive/fbdev/fbdev.c:470:9: warning: variable 'newwidth' set but not used [-Wunused-but-set-variable]
+    
+    Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
     Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-    (cherry picked from commit 6ca03b9161d33b1d2b55a3a1a913cf88deb2343f)
 
-commit 2eec013569f6daa952482ac5d9db8acc71fe01aa
+commit 808c87bff710263f5a7b3c12a7e7fec54672fecd
 Author: Peter Hutterer <peter.hutterer@who-t.net>
-Date:   Mon Feb 25 11:13:52 2013 +1000
+Date:   Mon Mar 25 14:51:58 2013 +1000
 
-    dix: fix a comment
+    Revert "kdrive: fix "set but not used" warnings"
+    
+    Partial revert of commit 4149ee8ec0193acbf3812c7ee2627b93b9a89997, better
+    fix coming up.
     
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-    Reviewed-by: Keith Packard <keithp@keithp.com>
-    (cherry picked from commit 11bead1fa205a1353e6a33c6024c7e8ace80be7c)
-
-commit bce06afc99ce1d948f9002e0c5c7bc29d66425da
+
+commit ac4c2abe985ce6816a3389c41eb23462c6ac2486
+Author: vdb@picaros.org <vdb@picaros.org>
+Date:   Thu Mar 7 16:07:31 2013 +0100
+
+    xserver: add monitor Option "ZoomModes" [v2]
+    
+    Section "Monitor"
+      Identifier "a21inch"
+      Option "PreferredMode" "1600x1200"
+      Option "ZoomModes" "1600x1200 1280x1024 1280x1024 640x480"
+    EndSection
+    
+    The option's effect is to search for and mark once each named mode in
+    the output modes list.  So the specification order is free and the zoom
+    modes sequence follows the order of the output modes list.  All marked
+    modes are available via the Ctrl+Alt+Keypad-{Plus,Minus} key
+    combination.
+    
+    See also http://bugs.freedesktop.org/show_bug.cgi?id=17954.
+    
+    This option has its use for combined monitor and television setups.
+    It allows for easy switching between 60 Hz and 50 Hz modes even when a
+    monitor refuses to display the input signal.
+    
+    (Includes a few minor changes suggested by Aaron for v2)
+    
+    Signed-off-by: Servaas Vandenberghe <vdb@picaros.org>
+    Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 2967391c6d35f03121afa8003e0fb94b62495129
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Thu Feb 28 10:43:05 2013 +1000
 
@@ -1144,9 +7633,148 @@
     
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
     Reviewed-by: Keith Packard <keithp@keithp.com>
-    (cherry picked from commit 2967391c6d35f03121afa8003e0fb94b62495129)
-
-commit 8e16c2e3038c1c17cae73d8d9681dccce0fd402a
+
+commit 2fdde2c40d83695438b6f5615f98bd7ae801b43d
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Mon Feb 25 15:21:32 2013 +1000
+
+    dix: update coords for touch events in PlayReleasedEvents
+    
+    Note: this is only hit for #ifdef PANORAMIX
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+
+commit 697071ab2b7f8910e01ed74618138538291cd1e8
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Thu Feb 28 10:30:15 2013 +1000
+
+    Xi: compress two if statements with the same body
+    
+    We do the same thing here, compress them into one body.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+
+commit 11bead1fa205a1353e6a33c6024c7e8ace80be7c
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Mon Feb 25 11:13:52 2013 +1000
+
+    dix: fix a comment
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+
+commit fc504a44d12d537d4e07f659f1863f200a0272ad
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Fri Mar 1 08:26:06 2013 +1000
+
+    Xi: use a temp variable for the new listener
+    
+    Instead of accessing ti->listener[0] all the time.
+    
+    No functional changes.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+
+commit 9978b57b8d94f061d72a67b99a02b0ba16a11429
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Fri Mar 1 08:43:58 2013 +1000
+
+    Xi: return !Success from DeliverTouchEmulatedEvent if we didn't deliver
+    
+    All callers currently ignore the new value, so this patch has no effect.
+    Inverse call graph:
+    
+    DeliverTouchEmulatedEvent
+            DeliverEmulatedMotionEvent              Ignores value
+            DeliverTouchBeginEvent
+                    DeliverTouchEvent
+                            DeliverTouchEvents      Ignores value
+            DeliverTouchEndEvent
+                    DeliverTouchEvent
+                            DeliverTouchEvents      Ignores value
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+
+commit cc3d1a5a6120e721a46c67446ba68f5596055633
+Author: Piotr Dziwinski <piotrdz@gmail.com>
+Date:   Sat Feb 23 13:14:45 2013 +0100
+
+    glx: fix uninitialized var in __glXDRIscreenProbe
+    
+    Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=59825
+    
+    Signed-off-by: Piotr Dziwinski <piotrdz@gmail.com>
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit c2ede8f92f0d6f15b1b2a04889cb54cd1728780b
+Merge: 190b032 7050aae
+Author: Keith Packard <keithp@keithp.com>
+Date:   Mon Mar 18 11:26:24 2013 -0700
+
+    Merge remote-tracking branch 'whot/for-keith'
+
+commit 190b0321510b99d4738915f540cea5c0c51e07e2
+Author: Zack Rusin <zackr@vmware.com>
+Date:   Thu Feb 14 15:06:57 2013 -0800
+
+    GLX/DRI2: Do not expose INTEL_swap_event without swap control
+    
+    Swap events depent on the implementation of ScheduleSwap. By
+    unconditionally enabling GLX_INTEL_swap_event we're breaking
+    the system with drivers that don't support it because the apps
+    are forever stuck waiting for an event that will never be
+    delivered. So lets enable the extension only if the hooks it
+    depends on are actually there.
+    
+    Signed-off-by: Zack Rusin <zackr@vmware.com>
+    Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 116f020102fd6c2a603069a639b113dfa31b48b7
+Merge: cf89aa5 0f537da
+Author: Keith Packard <keithp@keithp.com>
+Date:   Mon Mar 18 11:18:58 2013 -0700
+
+    Merge remote-tracking branch 'whot/next'
+
+commit cf89aa53748b964f9d9eceaa12a7d6f1a076d1ee
+Author: Tomasz Lis <tomasz.lis@intel.com>
+Date:   Mon Mar 11 10:21:28 2013 +0100
+
+    Full support of sRGB capable fbconfigs.
+    
+    Changes to correctly initialize the sRGB capability attribute and
+    transfer it between XServer and the client. Modifications include
+    extension string, transferring visual config attribs and fbconfig
+    attribs. Also, attribute is initialized in the modules which do not
+    really use it (xquartz and xwin).
+    This version advertises both ARB and EXT strings, and initializes
+    the capability to default value of FALSE. It has corrected required
+    GLX version and does not influence swrast. The sRGB capable attribute
+    is attached only to those configs which do have this capability.
+    Both ARB and EXT versions share the same GLX extension enabling bit.
+    
+    Signed-off-by: Tomasz Lis <tomasz.lis@intel.com>
+    Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 679ccecd8bc6d797e99f3b707f8041b727ca7a49
+Author: Keith Packard <keithp@keithp.com>
+Date:   Mon Mar 18 10:01:20 2013 -0700
+
+    Bump release to 1.14.99.0
+    
+    Get us off the release number so that we don't conflict with the
+    stable branch.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 7050aae69c2a55dfdbb5c6af7882307e90ba4275
 Author: Robert Morell <rmorell@nvidia.com>
 Date:   Tue Mar 12 09:40:16 2013 -0700
 
@@ -1158,9 +7786,8 @@
     Reviewed-by: Jamey Sharp <jamey@minilop.net>
     Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-    (cherry picked from commit 7050aae69c2a55dfdbb5c6af7882307e90ba4275)
 
-commit 44def3caf002f9fc53b971014e4e2d62afe39435
+commit 31595b528645a7e4903eb81da0fc332d78407f25
 Author: Robert Morell <rmorell@nvidia.com>
 Date:   Tue Mar 12 09:37:43 2013 -0700
 
@@ -1171,9 +7798,8 @@
     Signed-off-by: Robert Morell <rmorell@nvidia.com>
     Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-    (cherry picked from commit 31595b528645a7e4903eb81da0fc332d78407f25)
 
-commit 27a49db31a146b8e2f1133c23262ecadc5ff4157
+commit 3ac2e61705432951f9e1b96b42b4214e7f748f94
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Sat Mar 9 17:12:53 2013 +1000
 
@@ -1191,7 +7817,20 @@
     
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
     Tested-by: Daniel Martin <consume.noise@gmail.com>
-    (cherry picked from commit 3ac2e61705432951f9e1b96b42b4214e7f748f94)
+
+commit 5047810a4c20fab444b8c6eb146c55dcdb0d4219
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date:   Wed Mar 6 09:40:28 2013 -0800
+
+    fb: Rename wfbDestroyGlyphCache
+    
+    Renaming this function was missed in commit
+    9cbcb5bd6a5360a128d15b77a02d8d3351f74366, so both libfb.so and libwfb.so define
+    functions named fbDestroyGlyphCache.
+    
+    Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
+    Reviewed-by: Søren Sandmann <ssp@redhat.com>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
 
 commit 103b77c59e3638a45179bf6d7908f5c738d2d872
 Author: Keith Packard <keithp@keithp.com>
@@ -1201,6 +7840,136 @@
     
     Signed-off-by: Keith Packard <keithp@keithp.com>
 
+commit 0f537da72d414ed84e3cd14e3bb7e08565136bd7
+Author: Andreas Wettstein <wettstein509@solnet.ch>
+Date:   Sun Mar 3 20:25:44 2013 +0100
+
+    xkb: Fixes to LatchMods/LatchGroup
+    
+    The main problem this patch addresses is that if a latch is put on
+    multi-level key with a Latch/Lock/Set, it is possible that after all
+    keys are released, still base modifiers are set, which typically will
+    make the keyboard unusable.  To see how it happens (without the patch),
+    assume that key AltGr sets Mod5 when pressed by itself, and latches Mod3
+    when pressed together with Shift.  Now press Shift, then AltGr and
+    release both keys in reverse order.  Mod3 is now latched, and the
+    LatchMods filter remains active as the second filter.  Now press AltGr;
+    Mod5 base modifier gets set, and the SetMods filter will become active
+    as the first filter.  Release AltGr: First, the SetMods filter will set
+    clearMods to Mod5, then the LatchMods filter will overwrite clearMods
+    with Mod3.  Result: the Mod5 base modifier will remain set.  This
+    example becomes practically relevant for the revised German standard
+    layout (DIN 2137-1:2012-06).
+    
+    Other changes implement the latch behaviour more accurately according to
+    the specification.  For example, releasing a modifier latching key can
+    at the same time clear a locked modifier, promote another modifier that
+    is latched to locked, and latch a third modifier.  Overall, what the
+    code does should be straightforward to compare what the XKB protocol
+    specification demands, see the table in section 6.3.
+    
+    Finally, releasing a key no longer cancels a latch that has not become
+    pending yet.  In my opinion, the specification is not clear; it speaks
+    of "operating" a key, which the patch effectivly interprets as "press"
+    rather than "press or release".  From my experience, using the latter
+    interpretation makes latches on higher levels practically unusable.  In
+    the example given above, one would have to release AltGr always before
+    Shift to get the Mod3-Latch.  The practical relevance of latches on
+    higher levels is once more given by the revised German standard layout.
+    
+    Signed-off-by: Andreas Wettstein <wettstein509@solnet.ch>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit eadda231091aa6feb68207ee22f6bc3a390d4556
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Fri Feb 15 11:19:09 2013 +1000
+
+    xephyr: fix "set but not used warnings"
+    
+    ephyrvideo.c: In function 'ephyrPutVideo':
+    ephyrvideo.c:1009:42: warning: variable 'drw_h' set but not used
+    ephyrvideo.c:1009:31: warning: variable 'drw_w' set but not used
+    ephyrvideo.c:1009:20: warning: variable 'drw_y' set but not used
+    ephyrvideo.c:1009:9: warning: variable 'drw_x' set but not used
+    ephyrvideo.c: In function 'ephyrGetVideo':
+    ephyrvideo.c:1058:42: warning: variable 'drw_h' set but not used
+    ephyrvideo.c:1058:31: warning: variable 'drw_w' set but not used
+    ephyrvideo.c:1058:20: warning: variable 'drw_y' set but not used
+    ephyrvideo.c:1058:9: warning: variable 'drw_x' set but not used
+    ephyrvideo.c: In function 'ephyrPutStill':
+    ephyrvideo.c:1107:42: warning: variable 'drw_h' set but not used
+    ephyrvideo.c:1107:31: warning: variable 'drw_w' set but not used
+    ephyrvideo.c:1107:20: warning: variable 'drw_y' set but not used
+    ephyrvideo.c:1107:9: warning: variable 'drw_x' set but not used
+    ephyrvideo.c: In function 'ephyrGetStill':
+    ephyrvideo.c:1156:42: warning: variable 'drw_h' set but not used
+    ephyrvideo.c:1156:31: warning: variable 'drw_w' set but not used
+    ephyrvideo.c:1156:20: warning: variable 'drw_y' set but not used
+    ephyrvideo.c:1156:9: warning: variable 'drw_x' set but not used
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Robert Morell <rmorell@nvidia.com>
+
+commit 4149ee8ec0193acbf3812c7ee2627b93b9a89997
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Fri Feb 15 11:19:08 2013 +1000
+
+    kdrive: fix "set but not used" warnings
+    
+    kinput.c: In function 'KdEnqueueKeyboardEvent':
+    kinput.c:1845:16: warning: variable 'ctrl' set but not used
+    kinput.c:1844:17: warning: variable 'keyc' set but not used
+    
+    kinput.c: In function 'KdEnqueuePointerEvent':
+    kinput.c:1887:12: warning: variable 'ms' set but not used
+    
+    kxv.c: In function 'KdXVDisable':
+    kxv.c:1181:19: warning: variable 'ScreenPriv' set but not used
+    
+    mouse.c: In function 'ps2SkipInit':
+    mouse.c:444:9: warning: variable 'skipping' set but not used
+    mouse.c: In function 'ps2Init':
+    mouse.c:473:10: warning: variable 'waiting' set but not used
+    mouse.c:472:9: warning: variable 'skipping' set but not used
+    
+    fbdev.c: In function 'fbdevRandRSetConfig':
+    fbdev.c:468:19: warning: variable 'newheight' set but not used
+    fbdev.c:468:9: warning: variable 'newwidth' set but not used
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Robert Morell <rmorell@nvidia.com>
+
+commit 44fc062f85df7288c17d2d64b73aa4957b91fd6d
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Mon Feb 18 14:57:58 2013 +1000
+
+    os: document pnprintf as sigsafe snprintf
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit c100211034ab69ce453a1644fb61c6808d7e3eda
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Tue Dec 18 14:12:40 2012 +1000
+
+    dix: only show the cursor if a window defines one (#58398)
+    
+    e02f864fdf "Suppress cursor display until the first XDefineCursor() request"
+    disabled cursor display a priori unless -retro is given.
+    
+    On a plain server, caling XFixesHideCursor() and XFixesShowCursor() would
+    show the default root cursor, despite no client actually defining a cursor.
+    
+    Change the logic, disable CursorVisible by default and only enable it from
+    the window's CWCursor logic. If no window ever defines a cursor, said cursor
+    stays invisible.
+    
+    X.Org Bug 58398 <http://bugs.freedesktop.org/show_bug.cgi?id=58398>
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Tested-by: Bastien Nocera <hadess@hadess.net>
+    Reviewed-by: Daniel Martin <consume.noise@gmail.com>
+
 commit 6238bd68bd71323f8b4f1808f34dabe2ae447fe3
 Author: Aaron Plattner <aplattner@nvidia.com>
 Date:   Tue Mar 5 13:04:46 2013 -0800
@@ -1241,6 +8010,19 @@
     Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
 
+commit bd58ebe4cf3b0ce60f87fb26a3715f774dabd349
+Author: Daniel Martin <consume.noise@gmail.com>
+Date:   Thu Dec 20 13:50:17 2012 +0100
+
+    ephyr: Fix crash on 24bpp host framebuffer
+    
+    Use bytes_per_line and bits_per_pixel from the created XImage to fix
+        https://bugzilla.redhat.com/show_bug.cgi?id=518960
+    
+    Signed-off-by: Daniel Martin <consume.noise@gmail.com>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
 commit 8f4640bdb9d3988148e09a08d2c7e3bab1d538d6
 Author: Dave Airlie <airlied@redhat.com>
 Date:   Wed Jan 9 12:58:28 2013 +1000
@@ -1296,6 +8078,226 @@
     Signed-off-by: Dave Airlie <airlied@redhat.com>
     Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
 
+commit e21e183059df5975e7086850d1931edb2c1bbd06
+Author: Marcin Slusarz <marcin.slusarz@gmail.com>
+Date:   Thu Feb 21 09:02:44 2013 +1000
+
+    os: use libunwind to generate backtraces
+    
+    Libunwind generates backtraces much more reliably than glibc's "backtrace".
+    
+    Before:
+    0: /opt/xserver/bin/X (0x400000+0x18ce36) [0x58ce36]
+    1: /opt/xserver/bin/X (xorg_backtrace+0x9) [0x58d119]
+    2: /opt/xserver/bin/X (0x400000+0x190d69) [0x590d69]
+    3: /lib64/libpthread.so.0 (0x7fb904268000+0x10a90) [0x7fb904278a90]
+    4: /lib64/libc.so.6 (ioctl+0x7) [0x7fb902fbf987]
+    5: /usr/lib64/libdrm.so.2 (drmIoctl+0x28) [0x7fb90405ffa8]
+    6: /usr/lib64/libdrm.so.2 (drmCommandWrite+0x1b) [0x7fb90406235b]
+    7: /usr/lib64/libdrm_nouveau.so.2 (nouveau_bo_wait+0x89) [0x7fb902009719]
+    8: /opt/xserver/lib/xorg/modules/drivers/nouveau_drv.so (0x7fb90220e000+0x76f3) [0x7fb9022156f3]
+    9: /opt/xserver/lib/xorg/modules/libexa.so (0x7fb9019c7000+0xbae0) [0x7fb9019d2ae0]
+    10: /opt/xserver/bin/X (0x400000+0x17d2b3) [0x57d2b3]
+    11: /opt/xserver/bin/X (0x400000+0xc9930) [0x4c9930]
+    12: /opt/xserver/bin/X (0x400000+0x3a81a) [0x43a81a]
+    13: /opt/xserver/bin/X (0x400000+0x3d6a1) [0x43d6a1]
+    14: /opt/xserver/bin/X (0x400000+0x2c2ca) [0x42c2ca]
+    15: /lib64/libc.so.6 (__libc_start_main+0xf5) [0x7fb902f019b5]
+    16: /opt/xserver/bin/X (0x400000+0x2c60d) [0x42c60d]
+    17: ?? [0x0]
+    
+    After:
+    0: /opt/xserver/bin/X (OsSigHandler+0x39) [0x590d69]
+    1: /lib64/libpthread.so.0 (__restore_rt+0x0) [0x7fb904278a8f]
+    2: /lib64/libc.so.6 (ioctl+0x7) [0x7fb902fbf987]
+    3: /usr/lib64/libdrm.so.2 (drmIoctl+0x28) [0x7fb90405ffa8]
+    4: /usr/lib64/libdrm.so.2 (drmCommandWrite+0x1b) [0x7fb90406235b]
+    5: /usr/lib64/libdrm_nouveau.so.2 (nouveau_bo_wait+0x89) [0x7fb902009719]
+    6: /opt/xserver/lib/xorg/modules/drivers/nouveau_drv.so (nouveau_exa_download_from_screen+0x1a3) [0x7fb9022156f3]
+    7: /opt/xserver/lib/xorg/modules/libexa.so (exaGetImage+0x1f0) [0x7fb9019d2ae0]
+    8: /opt/xserver/bin/X (miSpriteGetImage+0x173) [0x57d2b3]
+    9: /opt/xserver/bin/X (compGetImage+0xb0) [0x4c9930]
+    10: /opt/xserver/bin/X (ProcGetImage+0x55a) [0x43a81a]
+    11: /opt/xserver/bin/X (Dispatch+0x341) [0x43d6a1]
+    12: /opt/xserver/bin/X (main+0x3ba) [0x42c2ca]
+    13: /lib64/libc.so.6 (__libc_start_main+0xf5) [0x7fb902f019b5]
+    14: /opt/xserver/bin/X (_start+0x29) [0x42c60d]
+    15: ? (?+0x29) [0x29]
+    
+    Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Tested-by: Knut Petersen <knut.petersen@t-online.de>
+
+commit e27b2e61632b220ddc36d0d0387581a9f4774f21
+Author: Peter Harris <pharris@opentext.com>
+Date:   Tue Feb 19 16:08:52 2013 -0500
+
+    xkb: Set nIndicators in XkbGetIndicatorMap
+    
+    Xlib doesn't use this value (it computes it from the reply length
+    instead) which is why nobody has noticed yet. But the spec
+    http://www.x.org/releases/X11R7.7/doc/kbproto/xkbproto.html
+    says that it should be set.
+    
+    Signed-off-by: Peter Harris <pharris@opentext.com>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 3aac7a59dc6ef2d8bbf46ba5d37acdf6013e9450
+Author: Daniel Martin <daniel.martin@secunet.com>
+Date:   Tue Dec 11 17:23:55 2012 +0100
+
+    ephyr: Add -resizeable option
+    
+    With this option passed, ephyr windows can be resized like normal
+    windows on the fly, without the need of an explicit parent window.
+    
+    Signed-off-by: Daniel Martin <daniel.martin@secunet.com>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit f9198e278becec158b570204cf9fc1de822ac76b
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Mon Feb 27 16:43:10 2012 +1000
+
+    dix: FreeAllAtoms() on reset
+    
+    ==5712== 6 bytes in 1 blocks are still reachable in loss record 17 of 585
+    ==5712==    at 0x4A074CD: malloc (vg_replace_malloc.c:236)
+    ==5712==    by 0x3D1DE885B1: strndup (strndup.c:46)
+    ==5712==    by 0x41CB71: MakeAtom (atom.c:121)
+    ==5712==    by 0x55AE3E: XIGetKnownProperty (xiproperty.c:401)
+    ==5712==    by 0x4251C9: AddInputDevice (devices.c:312)
+    ==5712==    by 0x42AC0C: AllocDevicePair (devices.c:2657)
+    ==5712==    by 0x425E6E: InitCoreDevices (devices.c:677)
+    ==5712==    by 0x5ACA05: main (main.c:257)
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
+
+commit 88517ced1fa2e621be2d05a319b522b3111da516
+Merge: 82425c6 73974dd
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Fri Feb 15 11:58:52 2013 +1000
+
+    Merge branch 'master' of git+ssh://people.freedesktop.org/~alanc/xserver into next
+
+commit 82425c66e7a8c436b5be7ad44880dd4be6c1f06a
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Thu Feb 14 10:21:47 2013 +1000
+
+    xfree86: remove redundant declaration of inputInfo
+    
+    xf86Cursor.c:19:18: warning: redundant redeclaration of 'inputInfo'
+    [-Wredundant-decls]
+    In file included from xf86Cursor.c:18:0:
+    ../../../include/inputstr.h:614:57: note: previous declaration of
+    'inputInfo' was here
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
+
+commit 6133c417595a9c8fc158b0d68fd4a7a2c58fdc47
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Thu Feb 14 10:15:33 2013 +1000
+
+    xkb: remove unused variable 'names'
+    
+    xkb.c: In function '_XkbSetNamesCheck':
+    xkb.c:3987:18: warning: variable 'names' set but not used
+    [-Wunused-but-set-variable]
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
+
+commit 63d00c6b146d7f5fb80f20f19066088059042a5e
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Thu Feb 14 10:13:53 2013 +1000
+
+    Xext: rename two shadowing variables
+    
+    panoramiX.c: In function 'PanoramiXCreateConnectionBlock':
+    panoramiX.c:599:10: warning: declaration of 'disableBackingStore' shadows a
+    global declaration [-Wshadow]
+    In file included from ../include/windowstr.h:60:0,
+                     from panoramiX.c:47:
+    ../include/opaque.h:56:52: warning: shadowed declaration is here [-Wshadow]
+    
+    panoramiX.c: In function 'PanoramiXConsolidate':
+    panoramiX.c:834:19: warning: declaration of 'pScreen' shadows a previous
+    local [-Wshadow]
+    panoramiX.c:813:15: warning: shadowed declaration is here [-Wshadow]
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
+
+commit 8bbea9f48f43e54c55c8b60ea36bda3134a86af2
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Thu Feb 14 10:09:53 2013 +1000
+
+    Xext: renaming shadowing variable
+    
+    xvdisp.c: In function 'ProcXvStopVideo':
+    xvdisp.c:712:11: warning: declaration of 'rc' shadows a previous local
+    [-Wshadow]
+    xvdisp.c:705:17: warning: shadowed declaration is here [-Wshadow]
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
+
+commit 7b79a2e4a11b5c5f0ebaa495828725e235d2b08e
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Thu Feb 14 10:06:55 2013 +1000
+
+    fb: drop two unneeded shadowing variables
+    
+    fbpict.c: In function 'fbGlyphs':
+    fbpict.c:188:6: warning: declaration of 'x' shadows a previous local
+    [-Wshadow]
+    fbpict.c:111:9: warning: shadowed declaration is here [-Wshadow]
+    fbpict.c:188:9: warning: declaration of 'y' shadows a previous local
+    [-Wshadow]
+    fbpict.c:111:12: warning: shadowed declaration is here [-Wshadow]
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Soren Sandmann <ssp@redhat.com>
+    Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
+
+commit 858d8b19b3a5bb59e5c5f9a9e68adce2495b5e31
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Thu Feb 14 10:04:06 2013 +1000
+
+    xfree86: drop unused prevSIGIO
+    
+    Unused as of 5d309af2ed93e91c7d72f548a11052051efbb40f
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
+
+commit 592d35aef0a8089a344543cf5a425e0537c0431b
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Thu Feb 14 10:02:02 2013 +1000
+
+    randr: fix "set but unused" warnings
+    
+    rrcrtc.c: In function 'RRCrtcDetachScanoutPixmap':
+    rrcrtc.c:366:9: warning: variable 'ret' set but not used
+    [-Wunused-but-set-variable]
+    rrcrtc.c: In function 'rrCheckPixmapBounding':
+    rrcrtc.c:505:13: warning: variable 'ret' set but not used
+    [-Wunused-but-set-variable]
+    rrcrtc.c:445:9: warning: unused variable 'i' [-Wunused-variable]
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
+
 commit 90642948cc78834d95f7a3bddaac7ff77b68ed7e
 Merge: 9a35d42 eda7dbf
 Author: Keith Packard <keithp@keithp.com>
@@ -1746,6 +8748,173 @@
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
     Reviewed-by: Keith Packard <keithp@keithp.com>
 
+commit 73974dd7ea9ca4d4cdd5464cb813088a6ee9770b
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sun Jan 27 15:42:02 2013 -0800
+
+    Avoid memory leak in ddc resort() if find_header() fails
+    
+    Call find_header first, returning on failure before calling malloc.
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit b1129a1f1771c9d1653cc15aae94a614f081638a
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sun Jan 27 14:00:54 2013 -0800
+
+    xf86XvMCScreenInit: Avoid leak if dixRegisterPrivateKey fails
+    
+    Found by parfait 1.1 memory analyser:
+       Memory leak of pointer 'pAdapt' allocated with malloc((88 * num_adaptors))
+            at line 162 of hw/xfree86/common/xf86xvmc.c in function 'xf86XvMCScreenInit'.
+              'pAdapt' allocated at line 158 with malloc((88 * num_adaptors)).
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 563db909bcf965b6103c1807bf9f00ede957077d
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sun Jan 27 13:55:50 2013 -0800
+
+    Avoid memory leak on realloc failure in localRegisterFreeBoxCallback
+    
+    Also avoids leaving invalid pointers in structures if realloc had to
+    move them elsewhere to make them larger.
+    
+    Found by parfait 1.1 code analyzer:
+       Memory leak of pointer 'newCallbacks' allocated with realloc(((char*)offman->FreeBoxesUpdateCallback), (8 * (offman->NumCallbacks + 1)))
+            at line 328 of hw/xfree86/common/xf86fbman.c in function 'localRegisterFreeBoxCallback'.
+              'newCallbacks' allocated at line 320 with realloc(((char*)offman->FreeBoxesUpdateCallback), (8 * (offman->NumCallbacks + 1))).
+              newCallbacks leaks when newCallbacks != NULL at line 327.
+       Memory leak of pointer 'newPrivates' allocated with realloc(((char*)offman->devPrivates), (8 * (offman->NumCallbacks + 1)))
+            at line 328 of hw/xfree86/common/xf86fbman.c in function 'localRegisterFreeBoxCallback'.
+              'newPrivates' allocated at line 324 with realloc(((char*)offman->devPrivates), (8 * (offman->NumCallbacks + 1))).
+              newPrivates leaks when newCallbacks == NULL at line 327.
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 08f75d3a9661c6c32800e1b4f150626200b889d9
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sun Jan 27 13:50:30 2013 -0800
+
+    Avoid NULL pointer dereference in xf86TokenToOptinfo if token not found
+    
+    Reported by parfait 1.1 code analyzer:
+    
+    Error: Null pointer dereference (CWE 476)
+       Read from null pointer 'p'
+            at line 746 of hw/xfree86/common/xf86Option.c in function 'xf86TokenToOptName'.
+              Function 'xf86TokenToOptinfo' may return constant 'NULL' at line 721, called at line 745.
+              Null pointer introduced at line 721 in function 'xf86TokenToOptinfo'.
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit c1c01e350834a23161b33bd34b2fa9c01d02a65b
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sun Jan 27 13:10:08 2013 -0800
+
+    Make xf86ValidateModes actually copy clock range list to screen pointer
+    
+    Our in-house parfait 1.1 code analysis tool complained that every exit
+    path from xf86ValidateModes() in hw/xfree86/common/xf86Mode.c leaks the
+    storeClockRanges allocation made at line 1501 with XNFalloc.
+    
+    Investigating, it seems that this code to copy the clock range list to
+    the clockRanges list in the screen pointer is just plain insane, and
+    according to git, has been since we first imported it from XFree86.
+    
+    We start at line 1495 by walking the linked list from scrp->clockRanges
+    until we find the end.  But that was just a diversion, since we've found
+    the end and immediately forgotten it, and thus at 1499 we know that
+    storeClockRanges is NULL, but that's not a problem since we're going to
+    immediately overwrite that value as the first thing in the loop.
+    
+    So we move on through this loop at 1499, which takes us through the
+    linked list from the clockRanges variable, and for every entry in
+    that list allocates a new structure and copies cp to it.  If we've
+    not filled in the screen's clockRanges pointer yet, we set it to
+    the first storeClockRanges we copied from cp.   Otherwise, as best
+    I can tell, we just drop it into memory and let it leak away, as
+    parfait warned.
+    
+    And then we hit the loop action, which if we haven't hit the end of
+    the cp list, advances cp to the next item in the list, and then just
+    for the fun of it, also sets storeClockRanges to the ->next pointer it
+    has just copied from cp as well, even though it's going to overwrite
+    it as the very first instruction in the loop body.
+    
+    v2: rewritten using nt_list_* macros from Xorg's list.h header
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 89badba082c81d20fe35cb064c16e131ff288ca3
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sun Jan 27 12:08:47 2013 -0800
+
+    Free keymap on error in Xephyr's hostx_load_keymap
+    
+    Found by parfait 1.1 code analyser:
+       Memory leak of pointer 'keymap' allocated with XGetKeyboardMapping(HostX.dpy, min_keycode, ((max_keycode - min_keycode) + 1), &host_width)
+            at line 861 of hw/kdrive/ephyr/hostx.c in function 'hostx_load_keymap'.
+              'keymap' allocated at line 845 with XGetKeyboardMapping(HostX.dpy, min_keycode, ((max_keycode - min_keycode) + 1), &host_width).
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 48b94651205b175760904e448f94111d1ab85e13
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sun Jan 27 11:20:45 2013 -0800
+
+    Stop leaking overlayWin in PanoramiXCompositeGetOverlayWindow error paths
+    
+    Found by parfait 1.1 code analyzer:
+    
+    Error: Memory leak (CWE 401)
+       Memory leak of pointer 'overlayWin' allocated with malloc(72)
+            at line 806 of composite/compext.c in function 'PanoramiXCompositeGetOverlayWindow'.
+              pointer allocated at line 794 with malloc(72).
+              <unknown> leaks when rc != 0 at line 804.
+            at line 816 of composite/compext.c in function 'PanoramiXCompositeGetOverlayWindow'.
+              pointer allocated at line 794 with malloc(72).
+              <unknown> leaks when pOc == NULL at line 815.
+            at line 825 of composite/compext.c in function 'PanoramiXCompositeGetOverlayWindow'.
+              pointer allocated at line 794 with malloc(72).
+              <unknown> leaks when cs->pOverlayWin == NULL at line 822
+                  and compCreateOverlayWindow(pScreen) == 0 at line 823.
+            at line 834 of composite/compext.c in function 'PanoramiXCompositeGetOverlayWindow'.
+              pointer allocated at line 794 with malloc(72).
+              <unknown> leaks when rc != 0 at line 832.
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit f4a9332ad149ed15353a9c482563bdd042d0b403
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sun Jan 27 10:06:42 2013 -0800
+
+    Handle failure to create counter in init_system_idle_counter
+    
+    Check for NULL pointer (which can be returned for multiple reasons)
+    before trying to dereference it to add privates.   To avoid memory leak
+    in error path, delay malloc of privates until we're ready to add them.
+    
+    In case we do return NULL up through SyncInitDeviceIdleTime, handle the
+    possibility of getting NULL passed back down to SyncRemoveDeviceIdleTime.
+    
+    As reported by parfait 1.1:
+    Error: Null pointer dereference (CWE 476)
+       Read from null pointer 'idle_time_counter'
+            at line 2764 of xserver/Xext/sync.c in function 'init_system_idle_counter'.
+              Function 'SyncCreateSystemCounter' may return constant 'NULL' at line 952, called at line 2756.
+              Null pointer introduced at line 952 in function 'SyncCreateSystemCounter'.
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+
 commit 7fe5e6dfa5c1e71d8b7540b28c1d508687a2fbee
 Author: Jasper St. Pierre <jstpierre@mecheye.net>
 Date:   Wed Jan 23 13:11:55 2013 -0500

=== modified file 'Makefile.am'
--- Makefile.am	2013-08-14 10:52:17 +0000
+++ Makefile.am	2014-07-01 14:18:40 +0000
@@ -17,6 +17,14 @@
 RECORD_DIR=record
 endif
 
+if DRI3
+DRI3_DIR=dri3
+endif
+
+if PRESENT
+PRESENT_DIR=present
+endif
+
 SUBDIRS = \
 	doc \
 	man \
@@ -27,6 +35,7 @@
 	Xext \
 	miext \
 	os \
+	pseudoramiX \
 	randr \
 	render  \
 	Xi \
@@ -37,6 +46,8 @@
 	damageext \
 	$(COMPOSITE_DIR) \
 	$(GLX_DIR) \
+	$(PRESENT_DIR) \
+	$(DRI3_DIR) \
 	exa \
 	config \
 	hw \
@@ -77,6 +88,7 @@
 	Xext \
 	miext \
 	os \
+	pseudoramiX \
 	randr \
 	render  \
 	Xi \
@@ -89,6 +101,8 @@
 	glx \
 	exa \
 	config \
+	dri3 \
+	present \
 	hw \
 	test
 

=== modified file 'Makefile.in'
--- Makefile.in	2013-08-14 10:52:17 +0000
+++ Makefile.in	2014-07-01 14:18:40 +0000
@@ -229,9 +229,12 @@
 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@
@@ -263,6 +266,7 @@
 GREP = @GREP@
 HAL_CFLAGS = @HAL_CFLAGS@
 HAL_LIBS = @HAL_LIBS@
+HAVE_DOT = @HAVE_DOT@
 INSTALL = @INSTALL@
 INSTALL_CMD = @INSTALL_CMD@
 INSTALL_DATA = @INSTALL_DATA@
@@ -292,6 +296,8 @@
 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@
@@ -335,6 +341,7 @@
 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 PROJECTROOT = @PROJECTROOT@
+PYTHON3 = @PYTHON3@
 RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
@@ -348,7 +355,6 @@
 SHA1_CFLAGS = @SHA1_CFLAGS@
 SHA1_LIBS = @SHA1_LIBS@
 SHELL = @SHELL@
-SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@
 SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@
 STRICT_CFLAGS = @STRICT_CFLAGS@
 STRIP = @STRIP@
@@ -419,6 +425,8 @@
 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@
@@ -503,6 +511,8 @@
 @GLX_TRUE@GLX_DIR = glx
 @DBE_TRUE@DBE_DIR = dbe
 @RECORD_TRUE@RECORD_DIR = record
+@DRI3_TRUE@DRI3_DIR = dri3
+@PRESENT_TRUE@PRESENT_DIR = present
 SUBDIRS = \
 	doc \
 	man \
@@ -513,6 +523,7 @@
 	Xext \
 	miext \
 	os \
+	pseudoramiX \
 	randr \
 	render  \
 	Xi \
@@ -523,6 +534,8 @@
 	damageext \
 	$(COMPOSITE_DIR) \
 	$(GLX_DIR) \
+	$(PRESENT_DIR) \
+	$(DRI3_DIR) \
 	exa \
 	config \
 	hw \
@@ -548,6 +561,7 @@
 	Xext \
 	miext \
 	os \
+	pseudoramiX \
 	randr \
 	render  \
 	Xi \
@@ -560,6 +574,8 @@
 	glx \
 	exa \
 	config \
+	dri3 \
+	present \
 	hw \
 	test
 

=== modified file 'Xext/Makefile.in'
--- Xext/Makefile.in	2013-08-14 10:52:17 +0000
+++ Xext/Makefile.in	2014-07-01 14:18:40 +0000
@@ -251,9 +251,12 @@
 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@
@@ -285,6 +288,7 @@
 GREP = @GREP@
 HAL_CFLAGS = @HAL_CFLAGS@
 HAL_LIBS = @HAL_LIBS@
+HAVE_DOT = @HAVE_DOT@
 INSTALL = @INSTALL@
 INSTALL_CMD = @INSTALL_CMD@
 INSTALL_DATA = @INSTALL_DATA@
@@ -314,6 +318,8 @@
 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@
@@ -357,6 +363,7 @@
 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 PROJECTROOT = @PROJECTROOT@
+PYTHON3 = @PYTHON3@
 RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
@@ -370,7 +377,6 @@
 SHA1_CFLAGS = @SHA1_CFLAGS@
 SHA1_LIBS = @SHA1_LIBS@
 SHELL = @SHELL@
-SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@
 SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@
 STRICT_CFLAGS = @STRICT_CFLAGS@
 STRIP = @STRIP@
@@ -441,6 +447,8 @@
 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@

=== modified file 'Xext/panoramiX.c'
--- Xext/panoramiX.c	2013-08-14 10:52:17 +0000
+++ Xext/panoramiX.c	2014-07-01 14:18:40 +0000
@@ -53,9 +53,8 @@
 #include "servermd.h"
 #include "resource.h"
 #include "picturestr.h"
-#ifdef XFIXES
 #include "xfixesint.h"
-#endif
+#include "damageextint.h"
 #ifdef COMPOSITE
 #include "compint.h"
 #endif
@@ -75,7 +74,7 @@
 int PanoramiXPixHeight = 0;
 int PanoramiXNumScreens = 0;
 
-static RegionRec PanoramiXScreenRegion = { {0, 0, 0, 0}, NULL };
+_X_EXPORT RegionRec PanoramiXScreenRegion = { {0, 0, 0, 0}, NULL };
 
 static int PanoramiXNumDepths;
 static DepthPtr PanoramiXDepths;
@@ -583,9 +582,8 @@
     ProcVector[X_StoreNamedColor] = PanoramiXStoreNamedColor;
 
     PanoramiXRenderInit();
-#ifdef XFIXES
     PanoramiXFixesInit();
-#endif
+    PanoramiXDamageInit();
 #ifdef COMPOSITE
     PanoramiXCompositeInit();
 #endif
@@ -596,7 +594,7 @@
 PanoramiXCreateConnectionBlock(void)
 {
     int i, j, length;
-    Bool disableBackingStore = FALSE;
+    Bool disable_backing_store = FALSE;
     int old_width, old_height;
     float width_mult, height_mult;
     xWindowRoot *root;
@@ -622,10 +620,10 @@
         }
         if (pScreen->backingStoreSupport !=
             screenInfo.screens[0]->backingStoreSupport)
-            disableBackingStore = TRUE;
+            disable_backing_store = TRUE;
     }
 
-    if (disableBackingStore) {
+    if (disable_backing_store) {
         for (i = 0; i < screenInfo.numScreens; i++) {
             pScreen = screenInfo.screens[i];
             pScreen->backingStoreSupport = NotUseful;
@@ -831,15 +829,15 @@
     saver->type = XRT_WINDOW;
 
     FOR_NSCREENS(i) {
-        ScreenPtr pScreen = screenInfo.screens[i];
+        ScreenPtr scr = screenInfo.screens[i];
 
-        root->info[i].id = pScreen->root->drawable.id;
+        root->info[i].id = scr->root->drawable.id;
         root->u.win.class = InputOutput;
         root->u.win.root = TRUE;
-        saver->info[i].id = pScreen->screensaver.wid;
+        saver->info[i].id = scr->screensaver.wid;
         saver->u.win.class = InputOutput;
         saver->u.win.root = TRUE;
-        defmap->info[i].id = pScreen->defColormap;
+        defmap->info[i].id = scr->defColormap;
     }
 
     AddResource(root->info[0].id, XRT_WINDOW, root);
@@ -890,9 +888,8 @@
     int i;
 
     PanoramiXRenderReset();
-#ifdef XFIXES
     PanoramiXFixesReset();
-#endif
+    PanoramiXDamageReset();
 #ifdef COMPOSITE
     PanoramiXCompositeReset ();
 #endif

=== modified file 'Xext/panoramiXsrv.h'
--- Xext/panoramiXsrv.h	2012-06-04 19:12:23 +0000
+++ Xext/panoramiXsrv.h	2014-07-01 14:18:40 +0000
@@ -11,6 +11,7 @@
 extern _X_EXPORT int PanoramiXNumScreens;
 extern _X_EXPORT int PanoramiXPixWidth;
 extern _X_EXPORT int PanoramiXPixHeight;
+extern _X_EXPORT RegionRec PanoramiXScreenRegion;
 
 extern _X_EXPORT VisualID PanoramiXTranslateVisualID(int screen, VisualID orig);
 extern _X_EXPORT void PanoramiXConsolidate(void);

=== modified file 'Xext/saver.c'
--- Xext/saver.c	2013-08-14 10:52:17 +0000
+++ Xext/saver.c	2014-07-01 14:18:40 +0000
@@ -392,9 +392,7 @@
             DeviceIntPtr dev;
             UpdateCurrentTimeIf();
             nt_list_for_each_entry(dev, inputInfo.devices, next)
-                lastDeviceEventTime[dev->id] = currentTime;
-            lastDeviceEventTime[XIAllDevices] = currentTime;
-            lastDeviceEventTime[XIAllMasterDevices] = currentTime;
+                NoticeTime(dev, currentTime);
             SetScreenSaverTimer();
         }
     }
@@ -681,7 +679,7 @@
     pPriv = GetScreenPrivate(pDraw->pScreen);
 
     UpdateCurrentTime();
-    lastInput = GetTimeInMillis() - lastDeviceEventTime[XIAllDevices].milliseconds;
+    lastInput = GetTimeInMillis() - LastEventTime(XIAllDevices).milliseconds;
 
     rep = (xScreenSaverQueryInfoReply) {
         .type = X_Reply,

=== modified file 'Xext/security.c'
--- Xext/security.c	2013-08-14 10:52:17 +0000
+++ Xext/security.c	2014-07-01 14:18:40 +0000
@@ -57,8 +57,9 @@
 
 /* This is what we store as client security state */
 typedef struct {
-    int haveState;
-    unsigned int trustLevel;
+    unsigned int haveState  :1;
+    unsigned int live       :1;
+    unsigned int trustLevel :2;
     XID authId;
 } SecurityStateRec;
 
@@ -141,6 +142,7 @@
     state = dixLookupPrivate(&serverClient->devPrivates, stateKey);
     state->trustLevel = XSecurityClientTrusted;
     state->haveState = TRUE;
+    state->live = FALSE;
 }
 
 /*
@@ -953,6 +955,7 @@
         state->trustLevel = XSecurityClientTrusted;
         state->authId = None;
         state->haveState = TRUE;
+        state->live = FALSE;
         break;
 
     case ClientStateRunning:
@@ -963,6 +966,7 @@
         if (rc == Success) {
             /* it is a generated authorization */
             pAuth->refcnt++;
+            state->live = TRUE;
             if (pAuth->refcnt == 1 && pAuth->timer)
                 TimerCancel(pAuth->timer);
 
@@ -975,9 +979,10 @@
         rc = dixLookupResourceByType((pointer *) &pAuth, state->authId,
                                      SecurityAuthorizationResType, serverClient,
                                      DixGetAttrAccess);
-        if (rc == Success) {
+        if (rc == Success && state->live) {
             /* it is a generated authorization */
             pAuth->refcnt--;
+            state->live = FALSE;
             if (pAuth->refcnt == 0)
                 SecurityStartAuthorizationTimer(pAuth);
         }

=== modified file 'Xext/shm.c'
--- Xext/shm.c	2013-08-14 10:52:17 +0000
+++ Xext/shm.c	2014-07-01 14:18:40 +0000
@@ -37,6 +37,7 @@
 #include <sys/shm.h>
 #include <unistd.h>
 #include <sys/stat.h>
+#include <fcntl.h>
 #include <X11/X.h>
 #include <X11/Xproto.h>
 #include "misc.h"
@@ -53,7 +54,9 @@
 #include "xace.h"
 #include <X11/extensions/shmproto.h>
 #include <X11/Xfuncproto.h>
+#include <sys/mman.h>
 #include "protocol-versions.h"
+#include "busfault.h"
 
 /* Needed for Solaris cross-zone shared memory extension */
 #ifdef HAVE_SHMCTL64
@@ -89,15 +92,6 @@
 
 #include "extinit.h"
 
-typedef struct _ShmDesc {
-    struct _ShmDesc *next;
-    int shmid;
-    int refcnt;
-    char *addr;
-    Bool writable;
-    unsigned long size;
-} ShmDescRec, *ShmDescPtr;
-
 typedef struct _ShmScrPrivateRec {
     CloseScreenProcPtr CloseScreen;
     ShmFuncsPtr shmFuncs;
@@ -391,8 +385,10 @@
         client->errorValue = stuff->readOnly;
         return BadValue;
     }
-    for (shmdesc = Shmsegs;
-         shmdesc && (shmdesc->shmid != stuff->shmid); shmdesc = shmdesc->next);
+    for (shmdesc = Shmsegs; shmdesc; shmdesc = shmdesc->next) {
+        if (!SHMDESC_IS_FD(shmdesc) && shmdesc->shmid == stuff->shmid)
+            break;
+    }
     if (shmdesc) {
         if (!stuff->readOnly && !shmdesc->writable)
             return BadAccess;
@@ -402,6 +398,9 @@
         shmdesc = malloc(sizeof(ShmDescRec));
         if (!shmdesc)
             return BadAlloc;
+#ifdef SHM_FD_PASSING
+        shmdesc->is_fd = FALSE;
+#endif
         shmdesc->addr = shmat(stuff->shmid, 0,
                               stuff->readOnly ? SHM_RDONLY : 0);
         if ((shmdesc->addr == ((char *) -1)) || SHMSTAT(stuff->shmid, &buf)) {
@@ -440,7 +439,14 @@
 
     if (--shmdesc->refcnt)
         return TRUE;
-    shmdt(shmdesc->addr);
+#if SHM_FD_PASSING
+    if (shmdesc->is_fd) {
+        if (shmdesc->busfault)
+            busfault_unregister(shmdesc->busfault);
+        munmap(shmdesc->addr, shmdesc->size);
+    } else
+#endif
+        shmdt(shmdesc->addr);
     for (prev = &Shmsegs; *prev != shmdesc; prev = &(*prev)->next);
     *prev = shmdesc->next;
     free(shmdesc);
@@ -1096,6 +1102,182 @@
     return BadAlloc;
 }
 
+#ifdef SHM_FD_PASSING
+
+static void
+ShmBusfaultNotify(void *context)
+{
+    ShmDescPtr shmdesc = context;
+
+    ErrorF("shared memory 0x%x truncated by client\n",
+           (unsigned int) shmdesc->resource);
+    busfault_unregister(shmdesc->busfault);
+    shmdesc->busfault = NULL;
+    FreeResource (shmdesc->resource, RT_NONE);
+}
+
+static int
+ProcShmAttachFd(ClientPtr client)
+{
+    int fd;
+    ShmDescPtr shmdesc;
+    REQUEST(xShmAttachFdReq);
+    struct stat statb;
+
+    SetReqFds(client, 1);
+    REQUEST_SIZE_MATCH(xShmAttachFdReq);
+    LEGAL_NEW_RESOURCE(stuff->shmseg, client);
+    if ((stuff->readOnly != xTrue) && (stuff->readOnly != xFalse)) {
+        client->errorValue = stuff->readOnly;
+        return BadValue;
+    }
+    fd = ReadFdFromClient(client);
+    if (fd < 0)
+        return BadMatch;
+
+    if (fstat(fd, &statb) < 0 || statb.st_size == 0) {
+        close(fd);
+        return BadMatch;
+    }
+
+    shmdesc = malloc(sizeof(ShmDescRec));
+    if (!shmdesc) {
+        close(fd);
+        return BadAlloc;
+    }
+    shmdesc->is_fd = TRUE;
+    shmdesc->addr = mmap(NULL, statb.st_size,
+                         stuff->readOnly ? PROT_READ : PROT_READ|PROT_WRITE,
+                         MAP_SHARED,
+                         fd, 0);
+
+    close(fd);
+    if ((shmdesc->addr == ((char *) -1))) {
+        free(shmdesc);
+        return BadAccess;
+    }
+
+    shmdesc->refcnt = 1;
+    shmdesc->writable = !stuff->readOnly;
+    shmdesc->size = statb.st_size;
+    shmdesc->resource = stuff->shmseg;
+
+    shmdesc->busfault = busfault_register_mmap(shmdesc->addr, shmdesc->size, ShmBusfaultNotify, shmdesc);
+    if (!shmdesc->busfault) {
+        munmap(shmdesc->addr, shmdesc->size);
+        free(shmdesc);
+        return BadAlloc;
+    }
+
+    shmdesc->next = Shmsegs;
+    Shmsegs = shmdesc;
+
+    if (!AddResource(stuff->shmseg, ShmSegType, (pointer) shmdesc))
+        return BadAlloc;
+    return Success;
+}
+
+static int
+shm_tmpfile(void)
+{
+#ifdef SHMDIR
+	int	fd;
+	int	flags;
+	char	template[] = SHMDIR "/shmfd-XXXXXX";
+#ifdef O_TMPFILE
+	fd = open(SHMDIR, O_TMPFILE|O_RDWR|O_CLOEXEC|O_EXCL, 0666);
+	if (fd >= 0) {
+		ErrorF ("Using O_TMPFILE\n");
+		return fd;
+	}
+	ErrorF ("Not using O_TMPFILE\n");
+#endif
+	fd = mkstemp(template);
+	if (fd < 0)
+		return -1;
+	unlink(template);
+	if (fcntl(fd, F_GETFD, &flags) >= 0) {
+		flags |= FD_CLOEXEC;
+		(void) fcntl(fd, F_SETFD, &flags);
+	}
+	return fd;
+#else
+        return -1;
+#endif
+}
+
+static int
+ProcShmCreateSegment(ClientPtr client)
+{
+    int fd;
+    ShmDescPtr shmdesc;
+    REQUEST(xShmCreateSegmentReq);
+    xShmCreateSegmentReply rep = {
+        .type = X_Reply,
+        .nfd = 1,
+        .sequenceNumber = client->sequence,
+        .length = 0,
+    };
+
+    REQUEST_SIZE_MATCH(xShmCreateSegmentReq);
+    if ((stuff->readOnly != xTrue) && (stuff->readOnly != xFalse)) {
+        client->errorValue = stuff->readOnly;
+        return BadValue;
+    }
+    fd = shm_tmpfile();
+    if (fd < 0)
+        return BadAlloc;
+    if (ftruncate(fd, stuff->size) < 0) {
+        close(fd);
+        return BadAlloc;
+    }
+    shmdesc = malloc(sizeof(ShmDescRec));
+    if (!shmdesc) {
+        close(fd);
+        return BadAlloc;
+    }
+    shmdesc->is_fd = TRUE;
+    shmdesc->addr = mmap(NULL, stuff->size,
+                         stuff->readOnly ? PROT_READ : PROT_READ|PROT_WRITE,
+                         MAP_SHARED,
+                         fd, 0);
+
+    if ((shmdesc->addr == ((char *) -1))) {
+        close(fd);
+        free(shmdesc);
+        return BadAccess;
+    }
+
+    shmdesc->refcnt = 1;
+    shmdesc->writable = !stuff->readOnly;
+    shmdesc->size = stuff->size;
+
+    shmdesc->busfault = busfault_register_mmap(shmdesc->addr, shmdesc->size, ShmBusfaultNotify, shmdesc);
+    if (!shmdesc->busfault) {
+        close(fd);
+        munmap(shmdesc->addr, shmdesc->size);
+        free(shmdesc);
+        return BadAlloc;
+    }
+
+    shmdesc->next = Shmsegs;
+    Shmsegs = shmdesc;
+
+    if (!AddResource(stuff->shmseg, ShmSegType, (pointer) shmdesc)) {
+        close(fd);
+        return BadAlloc;
+    }
+
+    if (WriteFdToClient(client, fd, TRUE) < 0) {
+        FreeResource(stuff->shmseg, RT_NONE);
+        close(fd);
+        return BadAlloc;
+    }
+    WriteToClient(client, sizeof (xShmCreateSegmentReply), &rep);
+    return Success;
+}
+#endif /* SHM_FD_PASSING */
+
 static int
 ProcShmDispatch(ClientPtr client)
 {
@@ -1125,6 +1307,12 @@
             return ProcPanoramiXShmCreatePixmap(client);
 #endif
         return ProcShmCreatePixmap(client);
+#ifdef SHM_FD_PASSING
+    case X_ShmAttachFd:
+        return ProcShmAttachFd(client);
+    case X_ShmCreateSegment:
+        return ProcShmCreateSegment(client);
+#endif
     default:
         return BadRequest;
     }
@@ -1225,6 +1413,30 @@
     return ProcShmCreatePixmap(client);
 }
 
+#ifdef SHM_FD_PASSING
+static int
+SProcShmAttachFd(ClientPtr client)
+{
+    REQUEST(xShmAttachFdReq);
+    SetReqFds(client, 1);
+    swaps(&stuff->length);
+    REQUEST_SIZE_MATCH(xShmAttachFdReq);
+    swapl(&stuff->shmseg);
+    return ProcShmAttachFd(client);
+}
+
+static int
+SProcShmCreateSegment(ClientPtr client)
+{
+    REQUEST(xShmCreateSegmentReq);
+    swaps(&stuff->length);
+    REQUEST_SIZE_MATCH(xShmCreateSegmentReq);
+    swapl(&stuff->shmseg);
+    swapl(&stuff->size);
+    return ProcShmCreateSegment(client);
+}
+#endif  /* SHM_FD_PASSING */
+
 static int
 SProcShmDispatch(ClientPtr client)
 {
@@ -1242,6 +1454,12 @@
         return SProcShmGetImage(client);
     case X_ShmCreatePixmap:
         return SProcShmCreatePixmap(client);
+#ifdef SHM_FD_PASSING
+    case X_ShmAttachFd:
+        return SProcShmAttachFd(client);
+    case X_ShmCreateSegment:
+        return SProcShmCreateSegment(client);
+#endif
     default:
         return BadRequest;
     }

=== modified file 'Xext/shmint.h'
--- Xext/shmint.h	2012-06-04 19:12:23 +0000
+++ Xext/shmint.h	2014-07-01 14:18:40 +0000
@@ -56,6 +56,30 @@
     void (*PutImage) (XSHM_PUT_IMAGE_ARGS);
 } ShmFuncs, *ShmFuncsPtr;
 
+#if XTRANS_SEND_FDS
+#define SHM_FD_PASSING  1
+#endif
+
+typedef struct _ShmDesc {
+    struct _ShmDesc *next;
+    int shmid;
+    int refcnt;
+    char *addr;
+    Bool writable;
+    unsigned long size;
+#ifdef SHM_FD_PASSING
+    Bool is_fd;
+    struct busfault *busfault;
+    XID resource;
+#endif
+} ShmDescRec, *ShmDescPtr;
+
+#ifdef SHM_FD_PASSING
+#define SHMDESC_IS_FD(shmdesc)  ((shmdesc)->is_fd)
+#else
+#define SHMDESC_IS_FD(shmdesc)  (0)
+#endif
+
 extern _X_EXPORT void
  ShmRegisterFuncs(ScreenPtr pScreen, ShmFuncsPtr funcs);
 

=== modified file 'Xext/sync.c'
--- Xext/sync.c	2013-08-14 10:52:17 +0000
+++ Xext/sync.c	2014-07-01 14:18:40 +0000
@@ -141,7 +141,7 @@
  *  interested in the counter.  The two functions below are used to
  *  delete and add triggers on this list.
  */
-static void
+void
 SyncDeleteTriggerFromSyncObject(SyncTrigger * pTrigger)
 {
     SyncTriggerList *pCur;
@@ -184,7 +184,7 @@
     }
 }
 
-static int
+int
 SyncAddTriggerToSyncObject(SyncTrigger * pTrigger)
 {
     SyncTriggerList *pCur;
@@ -699,6 +699,14 @@
     FreeResource(pAwaitUnion->header.delete_id, RT_NONE);
 }
 
+static CARD64
+SyncUpdateCounter(SyncCounter *pCounter, CARD64 newval)
+{
+    CARD64 oldval = pCounter->value;
+    pCounter->value = newval;
+    return oldval;
+}
+
 /*  This function should always be used to change a counter's value so that
  *  any triggers depending on the counter will be checked.
  */
@@ -708,8 +716,7 @@
     SyncTriggerList *ptl, *pnext;
     CARD64 oldval;
 
-    oldval = pCounter->value;
-    pCounter->value = newval;
+    oldval = SyncUpdateCounter(pCounter, newval);
 
     /* run through triggers to see if any become true */
     for (ptl = pCounter->sync.pTriglist; ptl; ptl = pnext) {
@@ -909,6 +916,42 @@
     return pSync;
 }
 
+int
+SyncCreateFenceFromFD(ClientPtr client, DrawablePtr pDraw, XID id, int fd, BOOL initially_triggered)
+{
+#if HAVE_XSHMFENCE
+    SyncFence  *pFence;
+    int         status;
+
+    pFence = (SyncFence *) SyncCreate(client, id, SYNC_FENCE);
+    if (!pFence)
+        return BadAlloc;
+
+    status = miSyncInitFenceFromFD(pDraw, pFence, fd, initially_triggered);
+    if (status != Success) {
+        dixFreeObjectWithPrivates(pFence, PRIVATE_SYNC_FENCE);
+        return status;
+    }
+
+    if (!AddResource(id, RTFence, (pointer) pFence))
+        return BadAlloc;
+
+    return Success;
+#else
+    return BadImplementation;
+#endif
+}
+
+int
+SyncFDFromFence(ClientPtr client, DrawablePtr pDraw, SyncFence *pFence)
+{
+#if HAVE_XSHMFENCE
+    return miSyncFDFromFence(pDraw, pFence);
+#else
+    return BadImplementation;
+#endif
+}
+
 static SyncCounter *
 SyncCreateCounter(ClientPtr client, XSyncCounter id, CARD64 initialvalue)
 {
@@ -1019,6 +1062,11 @@
                 psci->bracket_greater = pTrigger->test_value;
                 pnewgtval = &psci->bracket_greater;
             }
+            else if (XSyncValueGreaterThan(pCounter->value, pTrigger->test_value) &&
+                     XSyncValueGreaterThan(pTrigger->test_value, psci->bracket_less)) {
+                    psci->bracket_less = pTrigger->test_value;
+                    pnewltval = &psci->bracket_less;
+            }
         }
         else if (pTrigger->test_type == XSyncNegativeComparison &&
                  ct != XSyncCounterNeverDecreases) {
@@ -1028,52 +1076,53 @@
                 psci->bracket_less = pTrigger->test_value;
                 pnewltval = &psci->bracket_less;
             }
+            else if (XSyncValueLessThan(pCounter->value, pTrigger->test_value) &&
+                     XSyncValueLessThan(pTrigger->test_value, psci->bracket_greater)) {
+                    psci->bracket_greater = pTrigger->test_value;
+                    pnewgtval = &psci->bracket_greater;
+            }
         }
         else if (pTrigger->test_type == XSyncNegativeTransition &&
                  ct != XSyncCounterNeverIncreases) {
-            if (XSyncValueGreaterThan(pCounter->value, pTrigger->test_value) &&
-                XSyncValueGreaterThan(pTrigger->test_value, psci->bracket_less))
-            {
-                psci->bracket_less = pTrigger->test_value;
-                pnewltval = &psci->bracket_less;
+            if (XSyncValueGreaterOrEqual(pCounter->value, pTrigger->test_value) &&
+                XSyncValueGreaterThan(pTrigger->test_value, psci->bracket_less)) {
+                    /*
+                     * If the value is exactly equal to our threshold, we want one
+                     * more event in the negative direction to ensure we pick up
+                     * when the value is less than this threshold.
+                     */
+                    psci->bracket_less = pTrigger->test_value;
+                    pnewltval = &psci->bracket_less;
             }
-            else if (XSyncValueEqual(pCounter->value, pTrigger->test_value) &&
-                     XSyncValueGreaterThan(pTrigger->test_value,
-                                           psci->bracket_less)) {
-                /*
-                 * The value is exactly equal to our threshold.  We want one
-                 * more event in the negative direction to ensure we pick up
-                 * when the value is less than this threshold.
-                 */
-                psci->bracket_less = pTrigger->test_value;
-                pnewltval = &psci->bracket_less;
+            else if (XSyncValueLessThan(pCounter->value, pTrigger->test_value) &&
+                     XSyncValueLessThan(pTrigger->test_value, psci->bracket_greater)) {
+                    psci->bracket_greater = pTrigger->test_value;
+                    pnewgtval = &psci->bracket_greater;
             }
         }
         else if (pTrigger->test_type == XSyncPositiveTransition &&
                  ct != XSyncCounterNeverDecreases) {
-            if (XSyncValueLessThan(pCounter->value, pTrigger->test_value) &&
-                XSyncValueLessThan(pTrigger->test_value, psci->bracket_greater))
-            {
-                psci->bracket_greater = pTrigger->test_value;
-                pnewgtval = &psci->bracket_greater;
+            if (XSyncValueLessOrEqual(pCounter->value, pTrigger->test_value) &&
+                XSyncValueLessThan(pTrigger->test_value, psci->bracket_greater)) {
+                    /*
+                     * If the value is exactly equal to our threshold, we
+                     * want one more event in the positive direction to
+                     * ensure we pick up when the value *exceeds* this
+                     * threshold.
+                     */
+                    psci->bracket_greater = pTrigger->test_value;
+                    pnewgtval = &psci->bracket_greater;
             }
-            else if (XSyncValueEqual(pCounter->value, pTrigger->test_value) &&
-                     XSyncValueLessThan(pTrigger->test_value,
-                                        psci->bracket_greater)) {
-                /*
-                 * The value is exactly equal to our threshold.  We want one
-                 * more event in the positive direction to ensure we pick up
-                 * when the value *exceeds* this threshold.
-                 */
-                psci->bracket_greater = pTrigger->test_value;
-                pnewgtval = &psci->bracket_greater;
+            else if (XSyncValueGreaterThan(pCounter->value, pTrigger->test_value) &&
+                     XSyncValueGreaterThan(pTrigger->test_value, psci->bracket_less)) {
+                    psci->bracket_less = pTrigger->test_value;
+                    pnewltval = &psci->bracket_less;
             }
         }
     }                           /* end for each trigger */
 
-    if (pnewgtval || pnewltval) {
-        (*psci->BracketValues) ((pointer) pCounter, pnewltval, pnewgtval);
-    }
+    (*psci->BracketValues) ((pointer) pCounter, pnewltval, pnewgtval);
+
 }
 
 /*
@@ -2619,7 +2668,7 @@
     }
     else
         deviceid = XIAllDevices;
-    idle = GetTimeInMillis() - lastDeviceEventTime[deviceid].milliseconds;
+    idle = GetTimeInMillis() - LastEventTime(deviceid).milliseconds;
     XSyncIntsToValue(pValue_return, idle, 0);
 }
 
@@ -2638,10 +2687,19 @@
         return;
 
     old_idle = counter->value;
-    IdleTimeQueryValue(NULL, &idle);
+    IdleTimeQueryValue(counter, &idle);
     counter->value = idle;      /* push, so CheckTrigger works */
 
-    if (less && XSyncValueLessOrEqual(idle, *less)) {
+    /**
+     * There's an indefinite amount of time between ProcessInputEvents()
+     * where the idle time is reset and the time we actually get here. idle
+     * may be past the lower bracket if we dawdled with the events, so
+     * check for whether we did reset and bomb out of select immediately.
+     */
+    if (less && XSyncValueGreaterThan(idle, *less) &&
+        LastEventTimeWasReset(priv->deviceid)) {
+        AdjustWaitForDelay(wt, 0);
+    } else if (less && XSyncValueLessOrEqual(idle, *less)) {
         /*
          * We've been idle for less than the threshold value, and someone
          * wants to know about that, but now we need to know whether they
@@ -2673,50 +2731,72 @@
          * If we've been idle more than it, and someone wants to know about
          * that level-triggered, schedule an immediate wakeup.
          */
-        unsigned long timeout = -1;
 
         if (XSyncValueLessThan(idle, *greater)) {
             XSyncValue value;
             Bool overflow;
 
             XSyncValueSubtract(&value, *greater, idle, &overflow);
-            timeout = min(timeout, XSyncValueLow32(value));
+            AdjustWaitForDelay(wt, XSyncValueLow32(value));
         }
         else {
             for (list = counter->sync.pTriglist; list;
                  list = list->next) {
                 trig = list->pTrigger;
                 if (trig->CheckTrigger(trig, old_idle)) {
-                    timeout = min(timeout, 0);
+                    AdjustWaitForDelay(wt, 0);
                     break;
                 }
             }
         }
-
-        AdjustWaitForDelay(wt, timeout);
     }
 
     counter->value = old_idle;  /* pop */
 }
 
 static void
-IdleTimeWakeupHandler(pointer pCounter, int rc, pointer LastSelectMask)
+IdleTimeCheckBrackets(SyncCounter *counter, XSyncValue idle, XSyncValue *less, XSyncValue *greater)
 {
-    SyncCounter *counter = pCounter;
-    IdleCounterPriv *priv = SysCounterGetPrivate(counter);
-    XSyncValue *less = priv->value_less,
-               *greater = priv->value_greater;
-    XSyncValue idle;
-
-    if (!less && !greater)
-        return;
-
-    IdleTimeQueryValue(pCounter, &idle);
-
     if ((greater && XSyncValueGreaterOrEqual(idle, *greater)) ||
         (less && XSyncValueLessOrEqual(idle, *less))) {
         SyncChangeCounter(counter, idle);
     }
+    else
+        SyncUpdateCounter(counter, idle);
+}
+
+static void
+IdleTimeWakeupHandler(pointer pCounter, int rc, pointer LastSelectMask)
+{
+    SyncCounter *counter = pCounter;
+    IdleCounterPriv *priv = SysCounterGetPrivate(counter);
+    XSyncValue *less = priv->value_less,
+               *greater = priv->value_greater;
+    XSyncValue idle;
+
+    if (!less && !greater)
+        return;
+
+    IdleTimeQueryValue(pCounter, &idle);
+
+    /*
+      There is no guarantee for the WakeupHandler to be called within a specific
+      timeframe. Idletime may go to 0, but by the time we get here, it may be
+      non-zero and alarms for a pos. transition on 0 won't get triggered.
+      https://bugs.freedesktop.org/show_bug.cgi?id=70476
+      */
+    if (LastEventTimeWasReset(priv->deviceid)) {
+        LastEventTimeToggleResetFlag(priv->deviceid, FALSE);
+        if (!XSyncValueIsZero(idle)) {
+            XSyncValue zero;
+            XSyncIntsToValue(&zero, 0, 0);
+            IdleTimeCheckBrackets(counter, zero, less, greater);
+            less = priv->value_less;
+            greater = priv->value_greater;
+        }
+    }
+
+    IdleTimeCheckBrackets(counter, idle, less, greater);
 }
 
 static void
@@ -2734,6 +2814,9 @@
                                      IdleTimeWakeupHandler, pCounter);
     }
     else if (!registered && (pbracket_less || pbracket_greater)) {
+        /* Reset flag must be zero so we don't force a idle timer reset on
+           the first wakeup */
+        LastEventTimeToggleResetAll(FALSE);
         RegisterBlockAndWakeupHandlers(IdleTimeBlockHandler,
                                        IdleTimeWakeupHandler, pCounter);
     }
@@ -2747,7 +2830,6 @@
 {
     CARD64 resolution;
     XSyncValue idle;
-    IdleCounterPriv *priv = malloc(sizeof(IdleCounterPriv));
     SyncCounter *idle_time_counter;
 
     IdleTimeQueryValue(NULL, &idle);
@@ -2758,10 +2840,14 @@
                                                 IdleTimeQueryValue,
                                                 IdleTimeBracketValues);
 
-    priv->deviceid = deviceid;
-    priv->value_less = priv->value_greater = NULL;
-
-    idle_time_counter->pSysCounterInfo->private = priv;
+    if (idle_time_counter != NULL) {
+        IdleCounterPriv *priv = malloc(sizeof(IdleCounterPriv));
+
+        priv->value_less = priv->value_greater = NULL;
+        priv->deviceid = deviceid;
+
+        idle_time_counter->pSysCounterInfo->private = priv;
+    }
 
     return idle_time_counter;
 }
@@ -2786,6 +2872,6 @@
     /* FreeAllResources() frees all system counters before the devices are
        shut down, check if there are any left before freeing the device's
        counter */
-    if (!xorg_list_is_empty(&SysCounterList))
+    if (counter && !xorg_list_is_empty(&SysCounterList))
         xorg_list_del(&counter->pSysCounterInfo->entry);
 }

=== modified file 'Xext/syncsrv.h'
--- Xext/syncsrv.h	2013-08-14 10:52:17 +0000
+++ Xext/syncsrv.h	2014-07-01 14:18:40 +0000
@@ -136,4 +136,17 @@
 
 extern SyncCounter *SyncInitDeviceIdleTime(DeviceIntPtr dev);
 extern void SyncRemoveDeviceIdleTime(SyncCounter *counter);
+
+int
+SyncCreateFenceFromFD(ClientPtr client, DrawablePtr pDraw, XID id, int fd, BOOL initially_triggered);
+
+int
+SyncFDFromFence(ClientPtr client, DrawablePtr pDraw, SyncFence *fence);
+
+void
+SyncDeleteTriggerFromSyncObject(SyncTrigger * pTrigger);
+
+int
+SyncAddTriggerToSyncObject(SyncTrigger * pTrigger);
+
 #endif                          /* _SYNCSRV_H_ */

=== modified file 'Xext/xvdisp.c'
--- Xext/xvdisp.c	2013-08-14 10:52:17 +0000
+++ Xext/xvdisp.c	2014-07-01 14:18:40 +0000
@@ -43,6 +43,7 @@
 #include "xvdix.h"
 #ifdef MITSHM
 #include <X11/extensions/shmproto.h>
+#include "shmint.h"
 #endif
 
 #include "xvdisp.h"
@@ -702,7 +703,7 @@
 static int
 ProcXvStopVideo(ClientPtr client)
 {
-    int status, rc;
+    int status, ret;
     DrawablePtr pDraw;
     XvPortPtr pPort;
 
@@ -716,9 +717,9 @@
         return status;
     }
 
-    rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, DixWriteAccess);
-    if (rc != Success)
-        return rc;
+    ret = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, DixWriteAccess);
+    if (ret != Success)
+        return ret;
 
     return XvdiStopVideo(client, pPort, pDraw);
 }
@@ -949,18 +950,6 @@
 }
 
 #ifdef MITSHM
-/* redefined here since it's not in any header file */
-typedef struct _ShmDesc {
-    struct _ShmDesc *next;
-    int shmid;
-    int refcnt;
-    char *addr;
-    Bool writable;
-    unsigned long size;
-} ShmDescRec, *ShmDescPtr;
-
-extern RESTYPE ShmSegType;
-extern int ShmCompletionCode;
 
 static int
 ProcXvShmPutImage(ClientPtr client)

=== modified file 'Xext/xvmain.c'
--- Xext/xvmain.c	2013-08-14 10:52:17 +0000
+++ Xext/xvmain.c	2014-07-01 14:18:40 +0000
@@ -156,8 +156,8 @@
     if (!dixRegisterPrivateKey(&XvScreenKeyRec, PRIVATE_SCREEN, 0))
         return;
 
-    /* LOOK TO SEE IF ANY SCREENS WERE INITIALIZED; IF NOT THEN
-       INIT GLOBAL VARIABLES SO THE EXTENSION CAN FUNCTION */
+    /* Look to see if any screens were initialized; if not then
+       init global variables so the extension can function */
     if (XvScreenGeneration != serverGeneration) {
         if (!CreateResourceTypes()) {
             ErrorF("XvExtensionInit: Unable to allocate resource types\n");

=== modified file 'Xi/Makefile.in'
--- Xi/Makefile.in	2013-08-14 10:52:17 +0000
+++ Xi/Makefile.in	2014-07-01 14:18:40 +0000
@@ -180,9 +180,12 @@
 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@
@@ -214,6 +217,7 @@
 GREP = @GREP@
 HAL_CFLAGS = @HAL_CFLAGS@
 HAL_LIBS = @HAL_LIBS@
+HAVE_DOT = @HAVE_DOT@
 INSTALL = @INSTALL@
 INSTALL_CMD = @INSTALL_CMD@
 INSTALL_DATA = @INSTALL_DATA@
@@ -243,6 +247,8 @@
 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@
@@ -286,6 +292,7 @@
 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 PROJECTROOT = @PROJECTROOT@
+PYTHON3 = @PYTHON3@
 RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
@@ -299,7 +306,6 @@
 SHA1_CFLAGS = @SHA1_CFLAGS@
 SHA1_LIBS = @SHA1_LIBS@
 SHELL = @SHELL@
-SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@
 SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@
 STRICT_CFLAGS = @STRICT_CFLAGS@
 STRIP = @STRIP@
@@ -370,6 +376,8 @@
 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@

=== modified file 'Xi/chgdctl.c'
--- Xi/chgdctl.c	2013-08-14 10:52:17 +0000
+++ Xi/chgdctl.c	2014-07-01 14:18:40 +0000
@@ -122,6 +122,12 @@
     if (ret != Success)
         goto out;
 
+    /* XTest devices are special, none of the below apply to them anyway */
+    if (IsXTestDevice(dev, NULL)) {
+        ret = BadMatch;
+        goto out;
+    }
+
     rep = (xChangeDeviceControlReply) {
         .repType = X_Reply,
         .RepType = X_ChangeDeviceControl,

=== modified file 'Xi/exevents.c'
--- Xi/exevents.c	2013-08-14 10:52:17 +0000
+++ Xi/exevents.c	2014-07-01 14:18:40 +0000
@@ -1413,7 +1413,8 @@
                 !(ev->device_event.flags & TOUCH_CLIENT_ID))
                 TouchListenerAcceptReject(dev, ti, 0, XIAcceptTouch);
 
-            if (deliveries && ev->any.type == ET_TouchEnd &&
+            if (ev->any.type == ET_TouchEnd &&
+                ti->num_listeners == 1 &&
                 !dev->button->buttonsDown &&
                 dev->deviceGrab.fromPassiveGrab && GrabIsPointerGrab(grab)) {
                 (*dev->deviceGrab.DeactivateGrab) (dev);
@@ -1476,7 +1477,7 @@
         GrabPtr grab;
         XI2Mask *mask;
 
-        if (ti->listeners[0].type != LISTENER_POINTER_REGULAR ||
+        if (ti->listeners[0].type != LISTENER_POINTER_REGULAR &&
             ti->listeners[0].type != LISTENER_POINTER_GRAB)
             return;
 
@@ -1782,8 +1783,25 @@
         DeliverDeviceEvents(GetSpriteWindow(device), (InternalEvent *) event,
                             NullGrab, NullWindow, device);
 
-    if (deactivateDeviceGrab == TRUE)
+    if (deactivateDeviceGrab == TRUE) {
         (*device->deviceGrab.DeactivateGrab) (device);
+
+        if (!IsMaster (device) && !IsFloating (device)) {
+            int flags, num_events = 0;
+            InternalEvent dce;
+
+            flags = (IsPointerDevice (device)) ?
+                DEVCHANGE_POINTER_EVENT : DEVCHANGE_KEYBOARD_EVENT;
+            UpdateFromMaster (&dce, device, flags, &num_events);
+            BUG_WARN(num_events > 1);
+
+            if (num_events == 1)
+                ChangeMasterDeviceClasses(GetMaster (device, MASTER_ATTACHED),
+                                          &dce.changed_event);
+        }
+
+    }
+
     event->detail.key = key;
 }
 
@@ -1845,7 +1863,8 @@
         if (rc == Success) {
             listener->state = LISTENER_IS_OWNER;
             /* async grabs cannot replay, so automatically accept this touch */
-            if (dev->deviceGrab.grab &&
+            if (listener->type == LISTENER_POINTER_GRAB &&
+                dev->deviceGrab.grab &&
                 dev->deviceGrab.fromPassiveGrab &&
                 dev->deviceGrab.grab->pointerMode == GrabModeAsync)
                 ActivateEarlyAccept(dev, ti);
@@ -1914,7 +1933,9 @@
     }
 
     /* Event in response to reject */
-    if (ev->device_event.flags & TOUCH_REJECT) {
+    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)
             rc = DeliverOneTouchEvent(client, dev, ti, grab, win, ev);
         listener->state = LISTENER_HAS_END;
@@ -1937,12 +1958,6 @@
         if (normal_end)
             listener->state = LISTENER_HAS_END;
     }
-    else if (ev->device_event.flags & TOUCH_ACCEPT) {
-        /* Touch has been accepted by its owner, which is not this listener */
-        if (listener->state != LISTENER_HAS_END)
-            rc = DeliverOneTouchEvent(client, dev, ti, grab, win, ev);
-        listener->state = LISTENER_HAS_END;
-    }
 
  out:
     return rc;
@@ -2034,6 +2049,9 @@
 {
     ProximityClassPtr proxc;
 
+    BUG_RETURN_VAL(dev == NULL, FALSE);
+    BUG_RETURN_VAL(dev->proximity != NULL, FALSE);
+
     proxc = (ProximityClassPtr) malloc(sizeof(ProximityClassRec));
     if (!proxc)
         return FALSE;
@@ -2059,10 +2077,10 @@
 {
     AxisInfoPtr ax;
 
-    if (!dev || !dev->valuator || (minval > maxval && mode == Absolute))
-        return FALSE;
-    if (axnum >= dev->valuator->numAxes)
-        return FALSE;
+    BUG_RETURN_VAL(dev == NULL, FALSE);
+    BUG_RETURN_VAL(dev->valuator == NULL, FALSE);
+    BUG_RETURN_VAL(axnum >= dev->valuator->numAxes, FALSE);
+    BUG_RETURN_VAL(minval > maxval && mode == Absolute, FALSE);
 
     ax = dev->valuator->axes + axnum;
 
@@ -2092,8 +2110,9 @@
     InternalEvent dce;
     DeviceIntPtr master;
 
-    if (!dev || !dev->valuator || axnum >= dev->valuator->numAxes)
-        return FALSE;
+    BUG_RETURN_VAL(dev == NULL, FALSE);
+    BUG_RETURN_VAL(dev->valuator == NULL, FALSE);
+    BUG_RETURN_VAL(axnum >= dev->valuator->numAxes, FALSE);
 
     switch (type) {
     case SCROLL_TYPE_VERTICAL:
@@ -2164,7 +2183,8 @@
         return BadValue;
     }
 
-    if (param->grabtype != XI2 && (param->modifiers != AnyModifier) &&
+    if (param->modifiers != AnyModifier &&
+        param->modifiers != XIAnyModifier &&
         (param->modifiers & ~AllModifiersMask)) {
         client->errorValue = param->modifiers;
         return BadValue;
@@ -2233,8 +2253,7 @@
 }
 
 /**
- * Grab the given key. If grabtype is XI, the key is a keycode. If
- * grabtype is XI2, the key is a keysym.
+ * Grab the given key.
  */
 int
 GrabKey(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr modifier_device,

=== modified file 'Xi/extinit.c'
--- Xi/extinit.c	2013-08-14 10:52:17 +0000
+++ Xi/extinit.c	2014-07-01 14:18:40 +0000
@@ -1171,6 +1171,8 @@
 
     free(xi_all_devices.name);
     free(xi_all_master_devices.name);
+
+    XIBarrierReset();
 }
 
 /***********************************************************************

=== modified file 'Xi/grabdev.c'
--- Xi/grabdev.c	2013-08-14 10:52:17 +0000
+++ Xi/grabdev.c	2014-07-01 14:18:40 +0000
@@ -175,10 +175,7 @@
     int device;
     DeviceIntPtr tdev;
 
-    for (i = 0; i < EMASKSIZE; i++) {
-        mask[i].mask = 0;
-        mask[i].dev = NULL;
-    }
+    memset(mask, 0, EMASKSIZE * sizeof(struct tmask));
 
     for (i = 0; i < count; i++, list++) {
         device = *list >> 8;

=== modified file 'Xi/setdval.c'
--- Xi/setdval.c	2013-08-14 10:52:17 +0000
+++ Xi/setdval.c	2014-07-01 14:18:40 +0000
@@ -110,6 +110,9 @@
     if (dev->valuator == NULL)
         return BadMatch;
 
+    if (IsXTestDevice(dev, NULL))
+        return BadMatch;
+
     if (stuff->first_valuator + stuff->num_valuators > dev->valuator->numAxes)
         return BadValue;
 

=== modified file 'Xi/setmode.c'
--- Xi/setmode.c	2013-08-14 10:52:17 +0000
+++ Xi/setmode.c	2014-07-01 14:18:40 +0000
@@ -104,6 +104,10 @@
         return rc;
     if (dev->valuator == NULL)
         return BadMatch;
+
+    if (IsXTestDevice(dev, NULL))
+        return BadMatch;
+
     if ((dev->deviceGrab.grab) && !SameClient(dev->deviceGrab.grab, client))
         rep.status = AlreadyGrabbed;
     else

=== modified file 'Xi/xiallowev.c'
--- Xi/xiallowev.c	2012-06-04 19:12:23 +0000
+++ Xi/xiallowev.c	2014-07-01 14:18:40 +0000
@@ -81,7 +81,7 @@
         have_xi22 = TRUE;
     }
     else {
-        REQUEST_SIZE_MATCH(xXIAllowEventsReq);
+        REQUEST_AT_LEAST_SIZE(xXIAllowEventsReq);
     }
 
     ret = dixLookupDevice(&dev, stuff->deviceid, client, DixGetAttrAccess);

=== modified file 'Xi/xibarriers.c'
--- Xi/xibarriers.c	2013-08-14 10:52:17 +0000
+++ Xi/xibarriers.c	2014-07-01 14:18:40 +0000
@@ -917,3 +917,15 @@
 
     return PointerBarrierType;
 }
+
+void
+XIBarrierReset(void)
+{
+    int i;
+    for (i = 0; i < screenInfo.numScreens; i++) {
+        ScreenPtr pScreen = screenInfo.screens[i];
+        BarrierScreenPtr cs = GetBarrierScreen(pScreen);
+        free(cs);
+        SetBarrierScreen(pScreen, NULL);
+    }
+}

=== modified file 'Xi/xibarriers.h'
--- Xi/xibarriers.h	2013-08-14 10:52:17 +0000
+++ Xi/xibarriers.h	2014-07-01 14:18:40 +0000
@@ -36,8 +36,8 @@
 XIDestroyPointerBarrier(ClientPtr client,
                         xXFixesDestroyPointerBarrierReq * stuff);
 
-Bool
-XIBarrierInit(void);
+Bool XIBarrierInit(void);
+void XIBarrierReset(void);
 
 int SProcXIBarrierReleasePointer(ClientPtr client);
 int ProcXIBarrierReleasePointer(ClientPtr client);

=== modified file 'Xi/xichangehierarchy.c'
--- Xi/xichangehierarchy.c	2013-08-14 10:52:17 +0000
+++ Xi/xichangehierarchy.c	2014-07-01 14:18:40 +0000
@@ -143,6 +143,10 @@
     int rc;
 
     name = calloc(c->name_len + 1, sizeof(char));
+    if (name == NULL) {
+        rc = BadAlloc;
+        goto unwind;
+    }
     strncpy(name, (char *) &c[1], c->name_len);
 
     rc = AllocDevicePair(client, name, &ptr, &keybd,

=== modified file 'Xi/xipassivegrab.c'
--- Xi/xipassivegrab.c	2013-08-14 10:52:17 +0000
+++ Xi/xipassivegrab.c	2014-07-01 14:18:40 +0000
@@ -63,7 +63,7 @@
     swaps(&stuff->mask_len);
     swaps(&stuff->num_modifiers);
 
-    mods = (uint32_t *) &stuff[1];
+    mods = (uint32_t *) &stuff[1] + stuff->mask_len;
 
     for (i = 0; i < stuff->num_modifiers; i++, mods++) {
         swapl(mods);
@@ -189,6 +189,10 @@
         uint8_t status = Success;
 
         param.modifiers = *modifiers;
+        ret = CheckGrabValues(client, &param);
+        if (ret != Success)
+            goto out;
+
         switch (stuff->grab_type) {
         case XIGrabtypeButton:
             status = GrabButton(client, dev, mod_dev, stuff->detail,

=== modified file 'aclocal.m4'
--- aclocal.m4	2013-08-14 10:52:17 +0000
+++ aclocal.m4	2014-07-01 14:18:40 +0000
@@ -20,9 +20,1202 @@
 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'.])])
 
+# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
+# serial 1 (pkg-config-0.24)
+# 
+# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
+#
+# 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 2 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, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# PKG_PROG_PKG_CONFIG([MIN-VERSION])
+# ----------------------------------
+AC_DEFUN([PKG_PROG_PKG_CONFIG],
+[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
+m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
+AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
+AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+fi
+if test -n "$PKG_CONFIG"; then
+	_pkg_min_version=m4_default([$1], [0.9.0])
+	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
+	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+		AC_MSG_RESULT([yes])
+	else
+		AC_MSG_RESULT([no])
+		PKG_CONFIG=""
+	fi
+fi[]dnl
+])# PKG_PROG_PKG_CONFIG
+
+# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+#
+# Check to see whether a particular set of modules exists.  Similar
+# to PKG_CHECK_MODULES(), but does not set variables or print errors.
+#
+# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+# only at the first occurence in configure.ac, so if the first place
+# it's called might be skipped (such as if it is within an "if", you
+# have to call PKG_CHECK_EXISTS manually
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_EXISTS],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+if test -n "$PKG_CONFIG" && \
+    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
+  m4_default([$2], [:])
+m4_ifvaln([$3], [else
+  $3])dnl
+fi])
+
+# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+# ---------------------------------------------
+m4_define([_PKG_CONFIG],
+[if test -n "$$1"; then
+    pkg_cv_[]$1="$$1"
+ elif test -n "$PKG_CONFIG"; then
+    PKG_CHECK_EXISTS([$3],
+                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
+		     [pkg_failed=yes])
+ else
+    pkg_failed=untried
+fi[]dnl
+])# _PKG_CONFIG
+
+# _PKG_SHORT_ERRORS_SUPPORTED
+# -----------------------------
+AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi[]dnl
+])# _PKG_SHORT_ERRORS_SUPPORTED
+
+
+# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+# [ACTION-IF-NOT-FOUND])
+#
+#
+# Note that if there is a possibility the first call to
+# PKG_CHECK_MODULES might not happen, you should be sure to include an
+# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+#
+#
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_MODULES],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
+AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
+
+pkg_failed=no
+AC_MSG_CHECKING([for $1])
+
+_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
+_PKG_CONFIG([$1][_LIBS], [libs], [$2])
+
+m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
+and $1[]_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.])
+
+if test $pkg_failed = yes; then
+   	AC_MSG_RESULT([no])
+        _PKG_SHORT_ERRORS_SUPPORTED
+        if test $_pkg_short_errors_supported = yes; then
+	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
+        else 
+	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
+
+	m4_default([$4], [AC_MSG_ERROR(
+[Package requirements ($2) were not met:
+
+$$1_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+_PKG_TEXT])
+        ])
+elif test $pkg_failed = untried; then
+     	AC_MSG_RESULT([no])
+	m4_default([$4], [AC_MSG_FAILURE(
+[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.
+
+_PKG_TEXT
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.])
+        ])
+else
+	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
+        AC_MSG_RESULT([yes])
+	$3
+fi[]dnl
+])# PKG_CHECK_MODULES
+
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
+# Foundation, Inc.
+#
+# This file 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.
+
+# serial 1
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.11'
+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.11.6], [],
+      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too.  Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
+
+# AM_SET_CURRENT_AUTOMAKE_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.11.6])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, 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 5
+
+# AM_PROG_AS
+# ----------
+AC_DEFUN([AM_PROG_AS],
+[# By default we simply use the C compiler to build assembly code.
+AC_REQUIRE([AC_PROG_CC])
+test "${CCAS+set}" = set || CCAS=$CC
+test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
+AC_ARG_VAR([CCAS],      [assembler compiler command (defaults to CC)])
+AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)])
+_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl
+])
+
+# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
+
+# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 1
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory.  The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run.  This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+#    fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+#    fails if $ac_aux_dir is absolute,
+#    fails when called from a subdirectory in a VPATH build with
+#          a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir.  In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
+#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+#   MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH.  The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_CONDITIONAL                                            -*- Autoconf -*-
+
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 9
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
+	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
+if $2; then
+  $1_TRUE=
+  $1_FALSE='#'
+else
+  $1_TRUE='#'
+  $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+  AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
+# 2010, 2011 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 12
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery.  Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
+       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
+       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
+       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
+                   [depcc="$$1"   am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+               [am_cv_$1_dependencies_compiler_type],
+[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_$1_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
+  m4_case([$1], [CC],
+    [case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac],
+    [CXX],
+    [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 8's {/usr,}/bin/sh.
+      touch 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_$1_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[  --disable-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+  am__nodep='_no'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+AC_SUBST([am__nodep])dnl
+_AM_SUBST_NOTMAKE([am__nodep])dnl
+])
+
+# Generate code to set up dependency tracking.              -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+#serial 5
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[{
+  # Autoconf 2.62 quotes --file arguments for eval, but not when files
+  # are listed without --file.  Let's play safe and only enable the eval
+  # if we detect the quoting.
+  case $CONFIG_FILES in
+  *\'*) eval set x "$CONFIG_FILES" ;;
+  *)   set x $CONFIG_FILES ;;
+  esac
+  shift
+  for mf
+  do
+    # Strip MF so we end up with the name of the file.
+    mf=`echo "$mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile or not.
+    # We used to match only the files named `Makefile.in', but
+    # some people rename them; so instead we look at the file content.
+    # Grep'ing the first line is not enough: some people post-process
+    # each Makefile.in and add a new line on top of each file to say so.
+    # Grep'ing the whole file is not good either: AIX grep has a line
+    # limit of 2048, but all sed's we know have understand at least 4000.
+    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+      dirpart=`AS_DIRNAME("$mf")`
+    else
+      continue
+    fi
+    # Extract the definition of DEPDIR, am__include, and am__quote
+    # from the Makefile without running `make'.
+    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+    test -z "$DEPDIR" && continue
+    am__include=`sed -n 's/^am__include = //p' < "$mf"`
+    test -z "am__include" && continue
+    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # When using ansi2knr, U may be empty or an underscore; expand it
+    U=`sed -n 's/^U = //p' < "$mf"`
+    # Find all dependency output files, they are included files with
+    # $(DEPDIR) in their names.  We invoke sed twice because it is the
+    # simplest approach to changing $(DEPDIR) to its actual value in the
+    # expansion.
+    for file in `sed -n "
+      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+      # Make sure the directory exists.
+      test -f "$dirpart/$file" && continue
+      fdir=`AS_DIRNAME(["$file"])`
+      AS_MKDIR_P([$dirpart/$fdir])
+      # echo "creating $dirpart/$file"
+      echo '# dummy' > "$dirpart/$file"
+    done
+  done
+}
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled.  FIXME.  This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Do all the work for Automake.                             -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 16
+
+# This macro actually does too much.  Some checks are only needed if
+# your package does certain things.  But this isn't really a big deal.
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out.  PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition.  After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.62])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
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+  fi
+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
+  fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+			     [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+		  [_AM_DEPENDENCIES(CC)],
+		  [define([AC_PROG_CC],
+			  defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+		  [_AM_DEPENDENCIES(CXX)],
+		  [define([AC_PROG_CXX],
+			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+		  [_AM_DEPENDENCIES(OBJC)],
+		  [define([AC_PROG_OBJC],
+			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+])
+_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
+dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
+dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
+dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+])
+
+dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated.  The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $_am_arg | $_am_arg:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
+# Inc.
+#
+# This file 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.
+
+# serial 1
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+if test x"${install_sh}" != 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
+AC_SUBST(install_sh)])
+
+# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 2
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot.  For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[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
+AC_SUBST([am__leading_dot])])
+
+# Check to see how 'make' treats includes.	            -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 4
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+	@echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+  am__include=include
+  am__quote=
+  _am_result=GNU
+  ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   case `$am_make -s -f confmf 2> /dev/null` in #(
+   *the\ am__doit\ target*)
+     am__include=.include
+     am__quote="\""
+     _am_result=BSD
+     ;;
+   esac
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
+
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 6
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+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
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
+# Inc.
+#
+# This file 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.
+
+# serial 1
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check for `mkdir -p'.
+AC_DEFUN([AM_PROG_MKDIR_P],
+[AC_PREREQ([2.60])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
+dnl while keeping a definition of mkdir_p for backward compatibility.
+dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
+dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
+dnl Makefile.ins that do not define MKDIR_P, so we do our own
+dnl adjustment using top_builddir (which is defined more often than
+dnl MKDIR_P).
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
+case $mkdir_p in
+  [[\\/$]]* | ?:[[\\/]]*) ;;
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+])
+
+# Helper functions for option handling.                     -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
+# Foundation, Inc.
+#
+# This file 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.
+
+# serial 5
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# --------------------
+# Set option NAME.  Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Check to make sure that the build environment is sane.    -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 5
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# 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]]*)
+    AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
+    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
+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 (
+   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
+   rm -f conftest.file
+   if test "$[*]" != "X $srcdir/configure conftest.file" \
+      && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+      # 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".
+      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
+alias in your environment])
+   fi
+
+   test "$[2]" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+# Copyright (C) 2009, 2011  Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 2
+
+# AM_SILENT_RULES([DEFAULT])
+# --------------------------
+# Enable less verbose build rules; with the default set to DEFAULT
+# (`yes' being less verbose, `no' or empty being verbose).
+AC_DEFUN([AM_SILENT_RULES],
+[AC_ARG_ENABLE([silent-rules],
+[  --enable-silent-rules          less verbose build output (undo: `make V=1')
+  --disable-silent-rules         verbose build output (undo: `make V=0')])
+case $enable_silent_rules in
+yes) AM_DEFAULT_VERBOSITY=0;;
+no)  AM_DEFAULT_VERBOSITY=1;;
+*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
+esac
+dnl
+dnl A few `make' implementations (e.g., NonStop OS and NextStep)
+dnl do not support nested variable expansions.
+dnl See automake bug#9928 and bug#10237.
+am_make=${MAKE-make}
+AC_CACHE_CHECK([whether $am_make supports nested variables],
+   [am_cv_make_support_nested_variables],
+   [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])
+if test $am_cv_make_support_nested_variables = yes; then
+  dnl Using `$V' instead of `$(V)' breaks IRIX make.
+  AM_V='$(V)'
+  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+  AM_V=$AM_DEFAULT_VERBOSITY
+  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AC_SUBST([AM_V])dnl
+AM_SUBST_NOTMAKE([AM_V])dnl
+AC_SUBST([AM_DEFAULT_V])dnl
+AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
+AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
+AM_BACKSLASH='\'
+AC_SUBST([AM_BACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
+])
+
+# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 1
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries.  This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# 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.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+  AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 3
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# AM_SUBST_NOTMAKE(VARIABLE)
+# --------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+
+# Check how to create a tarball.                            -*- Autoconf -*-
+
+# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 2
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+#     tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+#     $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility.  Yes, it's still used
+# in the wild :-(  We should find a proper way to deprecate it ...
+AC_SUBST([AMTAR], ['$${TAR-tar}'])
+m4_if([$1], [v7],
+     [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
+     [m4_case([$1], [ustar],, [pax],,
+              [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+  case $_am_tool in
+  gnutar)
+    for _am_tar in tar gnutar gtar;
+    do
+      AM_RUN_LOG([$_am_tar --version]) && break
+    done
+    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+    am__untar="$_am_tar -xf -"
+    ;;
+  plaintar)
+    # Must skip GNU tar: if it does not support --format= it doesn't create
+    # ustar tarball either.
+    (tar --version) >/dev/null 2>&1 && continue
+    am__tar='tar chf - "$$tardir"'
+    am__tar_='tar chf - "$tardir"'
+    am__untar='tar xf -'
+    ;;
+  pax)
+    am__tar='pax -L -x $1 -w "$$tardir"'
+    am__tar_='pax -L -x $1 -w "$tardir"'
+    am__untar='pax -r'
+    ;;
+  cpio)
+    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+    am__untar='cpio -i -H $1 -d'
+    ;;
+  none)
+    am__tar=false
+    am__tar_=false
+    am__untar=false
+    ;;
+  esac
+
+  # If the value was cached, stop now.  We just wanted to have am__tar
+  # and am__untar set.
+  test -n "${am_cv_prog_tar_$1}" && break
+
+  # tar/untar a dummy directory, and stop if the command works
+  rm -rf conftest.dir
+  mkdir conftest.dir
+  echo GrepMe > conftest.dir/file
+  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+  rm -rf conftest.dir
+  if test -s conftest.tar; then
+    AM_RUN_LOG([$am__untar <conftest.tar])
+    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+  fi
+done
+rm -rf conftest.dir
+
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
+m4_include([m4/ac_define_dir.m4])
+m4_include([m4/libtool.m4])
+m4_include([m4/ltoptions.m4])
+m4_include([m4/ltsugar.m4])
+m4_include([m4/ltversion.m4])
+m4_include([m4/lt~obsolete.m4])
+m4_include([m4/xorg-tls.m4])
 dnl fontutil.m4.  Generated from fontutil.m4.in by configure.
 dnl
-dnl This file comes from X.Org's font-util 1.2.0
+dnl This file comes from X.Org's font-util 1.3.0
 dnl
 dnl Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
 dnl
@@ -87,7 +1280,7 @@
 # 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.2.0])
+m4_define([vers_have], [1.3.0])
 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,,
@@ -182,15 +1375,16 @@
 #
 # Set FCCACHE to path to fc-cache (fontconfig cache builder) if found
 # Set RUN_FCCACHE to a rule suitable for substituting into a makefile
-# to run fc-cache if found and not installing to $DESTDIR
+# to run fc-cache if found and not installing to $DESTDIR and not
+# cross-compiling
 #
 # fc-cache is optional, not required, and should be skipped when making
-# packages (installing to $DESTDIR).
+# packages (installing to $DESTDIR) or cross-compiling
 #
 AC_DEFUN([XORG_FONT_FCCACHE],[
 	AC_PATH_PROG(FCCACHE, fc-cache)
 	FCCACHE_WARN='echo "** Warning: fonts.cache not built" ; echo "** Generate this file manually on host system using fc-cache"'
-	if test x"$FCCACHE" = x ; then
+	if test x"$FCCACHE" = x || test x"$cross_compiling" != x"no" ; then
 		RUN_FCCACHE="${FCCACHE_WARN}"
 	else
 		RUN_FCCACHE='@(if test -z "$(DESTDIR)"; then echo $(FCCACHE) $(fontdir); $(FCCACHE) $(fontdir); else'
@@ -199,6 +1393,31 @@
 	AC_SUBST([RUN_FCCACHE])
 ])
 
+# XORG_FONT_MKFONTDIR()
+# -------------------
+# Minimum version: 1.3.0
+#
+# Set MKFONTDIR to path to mkfontdir.
+#
+# If cross-compiling, and if mkdir is not found, use a shell command
+# which warns mkfontdir needs to be run on the target
+#
+# If not cross-compiling, mkfontdir must be found
+#
+AC_DEFUN([XORG_FONT_MKFONTDIR],[
+	if test x"$cross_compiling" != x"no" ; then
+		AC_PATH_PROG(MKFONTDIR, mkfontdir, "")
+		MKFONTDIR_WARN='echo "** Warning: mkfontdir not run" ; echo "** Run mkfontdir manually on host system"'
+
+		if test x"$MKFONTDIR" = x; then
+			MKFONTDIR="${MKFONTDIR_WARN} ; echo '** mkfontdir'"
+		fi
+	else
+		XORG_FONT_REQUIRED_PROG(MKFONTDIR, mkfontdir)
+	fi
+
+	AC_SUBST([MKFONTDIR])
+])
 
 # XORG_FONT_COMMON_UTILS()
 # ------------------------
@@ -208,7 +1427,7 @@
 
 AC_DEFUN([XORG_FONT_COMMON_UTILS],[
 	XORG_FONT_FCCACHE
-	XORG_FONT_REQUIRED_PROG(MKFONTDIR, mkfontdir)
+	XORG_FONT_MKFONTDIR
 ])
 
 # XORG_FONT_SCALED_UTILS()
@@ -278,10 +1497,11 @@
 # by ucs2any, and export it as MAPFILES_PATH to the Makefiles
 
 AC_DEFUN([XORG_FONT_UCS2ANY],[
+	AC_REQUIRE([PKG_PROG_PKG_CONFIG])
 	XORG_FONT_REQUIRED_PROG(UCS2ANY, ucs2any)
 	PKG_CHECK_MODULES(MAPS, [fontutil])
 	AC_MSG_CHECKING([for ucs2any encoding data files])
-	MAPFILES_PATH=`pkg-config --variable=mapdir fontutil`
+	MAPFILES_PATH=`$PKG_CONFIG --variable=mapdir fontutil`
 	AC_SUBST(MAPFILES_PATH)
 	AC_MSG_RESULT([${MAPFILES_PATH}])
 ])
@@ -383,168 +1603,10 @@
 
 AC_DEFUN([XORG_FONTDIR],[XORG_FONTSUBDIR([FONTDIR], [fontdir], [$1])])
 
-# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
-# serial 1 (pkg-config-0.24)
-# 
-# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
-#
-# 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 2 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, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# PKG_PROG_PKG_CONFIG([MIN-VERSION])
-# ----------------------------------
-AC_DEFUN([PKG_PROG_PKG_CONFIG],
-[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
-m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
-AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
-AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
-AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
-
-if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
-	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
-fi
-if test -n "$PKG_CONFIG"; then
-	_pkg_min_version=m4_default([$1], [0.9.0])
-	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
-	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
-		AC_MSG_RESULT([yes])
-	else
-		AC_MSG_RESULT([no])
-		PKG_CONFIG=""
-	fi
-fi[]dnl
-])# PKG_PROG_PKG_CONFIG
-
-# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
-#
-# Check to see whether a particular set of modules exists.  Similar
-# to PKG_CHECK_MODULES(), but does not set variables or print errors.
-#
-# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
-# only at the first occurence in configure.ac, so if the first place
-# it's called might be skipped (such as if it is within an "if", you
-# have to call PKG_CHECK_EXISTS manually
-# --------------------------------------------------------------
-AC_DEFUN([PKG_CHECK_EXISTS],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
-if test -n "$PKG_CONFIG" && \
-    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
-  m4_default([$2], [:])
-m4_ifvaln([$3], [else
-  $3])dnl
-fi])
-
-# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
-# ---------------------------------------------
-m4_define([_PKG_CONFIG],
-[if test -n "$$1"; then
-    pkg_cv_[]$1="$$1"
- elif test -n "$PKG_CONFIG"; then
-    PKG_CHECK_EXISTS([$3],
-                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
-		     [pkg_failed=yes])
- else
-    pkg_failed=untried
-fi[]dnl
-])# _PKG_CONFIG
-
-# _PKG_SHORT_ERRORS_SUPPORTED
-# -----------------------------
-AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi[]dnl
-])# _PKG_SHORT_ERRORS_SUPPORTED
-
-
-# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
-# [ACTION-IF-NOT-FOUND])
-#
-#
-# Note that if there is a possibility the first call to
-# PKG_CHECK_MODULES might not happen, you should be sure to include an
-# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
-#
-#
-# --------------------------------------------------------------
-AC_DEFUN([PKG_CHECK_MODULES],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
-AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
-AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
-
-pkg_failed=no
-AC_MSG_CHECKING([for $1])
-
-_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
-_PKG_CONFIG([$1][_LIBS], [libs], [$2])
-
-m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
-and $1[]_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.])
-
-if test $pkg_failed = yes; then
-   	AC_MSG_RESULT([no])
-        _PKG_SHORT_ERRORS_SUPPORTED
-        if test $_pkg_short_errors_supported = yes; then
-	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
-        else 
-	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
-        fi
-	# Put the nasty error message in config.log where it belongs
-	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
-
-	m4_default([$4], [AC_MSG_ERROR(
-[Package requirements ($2) were not met:
-
-$$1_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-_PKG_TEXT])
-        ])
-elif test $pkg_failed = untried; then
-     	AC_MSG_RESULT([no])
-	m4_default([$4], [AC_MSG_FAILURE(
-[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.
-
-_PKG_TEXT
-
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.])
-        ])
-else
-	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
-	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
-        AC_MSG_RESULT([yes])
-	$3
-fi[]dnl
-])# PKG_CHECK_MODULES
-
 dnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
 dnl
 dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
-dnl 
+dnl
 dnl Permission is hereby granted, free of charge, to any person obtaining a
 dnl copy of this software and associated documentation files (the "Software"),
 dnl to deal in the Software without restriction, including without limitation
@@ -577,10 +1639,10 @@
 #     [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
 #
 #
-# See the "minimum version" comment for each macro you use to see what 
+# See the "minimum version" comment for each macro you use to see what
 # version you require.
 m4_defun([XORG_MACROS_VERSION],[
-m4_define([vers_have], [1.16.1])
+m4_define([vers_have], [1.18.0])
 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,,
@@ -600,7 +1662,7 @@
 # such as man pages and config files
 AC_DEFUN([XORG_PROG_RAWCPP],[
 AC_REQUIRE([AC_PROG_CPP])
-AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
+AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}],
    [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
 
 # Check for flag to avoid builtin definitions - assumes unix is predefined,
@@ -1162,9 +2224,10 @@
 ]) # XORG_WITH_ASCIIDOC
 
 # XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT])
-# --------------------------------
+# -------------------------------------------
 # Minimum version: 1.5.0
 # Minimum version for optional DEFAULT argument: 1.11.0
+# Minimum version for optional DOT checking: 1.18.0
 #
 # Documentation tools are not always available on all platforms and sometimes
 # not at the appropriate level. This macro enables a module to test for the
@@ -1184,6 +2247,7 @@
 #
 AC_DEFUN([XORG_WITH_DOXYGEN],[
 AC_ARG_VAR([DOXYGEN], [Path to doxygen command])
+AC_ARG_VAR([DOT], [Path to the dot graphics utility])
 m4_define([_defopt], m4_default([$2], [auto]))
 AC_ARG_WITH(doxygen,
 	AS_HELP_STRING([--with-doxygen],
@@ -1227,6 +2291,20 @@
             AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed])
         fi])
 fi])
+
+dnl Check for DOT if we have doxygen. The caller decides if it is mandatory
+dnl HAVE_DOT is a variable that can be used in your doxygen.in config file:
+dnl 	HAVE_DOT = @HAVE_DOT@
+HAVE_DOT=no
+if test "x$have_doxygen" = "xyes"; then
+  AC_PATH_PROG([DOT], [dot])
+    if test "x$DOT" != "x"; then
+      HAVE_DOT=yes
+    fi
+fi
+
+AC_SUBST([HAVE_DOT])
+AM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"])
 AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
 ]) # XORG_WITH_DOXYGEN
 
@@ -1409,6 +2487,29 @@
 AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
 ]) # XORG_WITH_FOP
 
+# XORG_WITH_M4([MIN-VERSION])
+# ---------------------------
+# Minimum version: 1.19.0
+#
+# This macro attempts to locate an m4 macro processor which supports
+# -I option and is only useful for modules relying on M4 in order to
+# expand macros in source code files.
+#
+# Interface to module:
+# M4:	 	returns the path of the m4 program found
+#		returns the path set by the user in the environment
+#
+AC_DEFUN([XORG_WITH_M4], [
+AC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4],
+   [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4],
+       [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \
+         ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]],
+   [AC_MSG_ERROR([could not find m4 that supports -I option])],
+   [$PATH:/usr/gnu/bin])])
+
+AC_SUBST([M4], [$ac_cv_path_M4])
+]) # XORG_WITH_M4
+
 # XORG_WITH_PS2PDF([DEFAULT])
 # ----------------
 # Minimum version: 1.6.0
@@ -1599,6 +2700,39 @@
 AC_MSG_RESULT([$enable_unit_tests])
 ]) # XORG_ENABLE_UNIT_TESTS
 
+# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto)
+# ------------------------------------------------------
+# Minimum version: 1.17.0
+#
+# This macro enables a builder to enable/disable integration testing
+# It makes no assumption about the test cases' implementation
+# Test cases may or may not use Automake "Support for test suites"
+#
+# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support
+# usually requires less dependencies and may be built and run under less
+# stringent environments than integration tests.
+#
+# Interface to module:
+# ENABLE_INTEGRATION_TESTS:   used in makefiles to conditionally build tests
+# enable_integration_tests:   used in configure.ac for additional configuration
+# --enable-integration-tests: 'yes' user instructs the module to build tests
+#                             'no' user instructs the module not to build tests
+# parm1:                      specify the default value, yes or no.
+#
+AC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[
+AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS])
+m4_define([_defopt], m4_default([$1], [auto]))
+AC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests],
+	[Enable building integration test cases (default: ]_defopt[)]),
+	[enable_integration_tests=$enableval],
+	[enable_integration_tests=]_defopt)
+m4_undefine([_defopt])
+AM_CONDITIONAL([ENABLE_INTEGRATION_TESTS],
+	[test "x$enable_integration_tests" != xno])
+AC_MSG_CHECKING([whether to build unit test cases])
+AC_MSG_RESULT([$enable_integration_tests])
+]) # XORG_ENABLE_INTEGRATION_TESTS
+
 # XORG_WITH_GLIB([MIN-VERSION], [DEFAULT])
 # ----------------------------------------
 # Minimum version: 1.13.0
@@ -1609,6 +2743,10 @@
 # When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing.
 # Otherwise the value of $enable_unit_tests is blank.
 #
+# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit
+# test support usually requires less dependencies and may be built and run under
+# less stringent environments than integration tests.
+#
 # Interface to module:
 # HAVE_GLIB: used in makefiles to conditionally build targets
 # with_glib: used in configure.ac to know if GLib has been found
@@ -1826,7 +2964,8 @@
 
 AC_MSG_CHECKING([whether malloc(0) returns NULL])
 if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
-	AC_RUN_IFELSE([AC_LANG_PROGRAM([
+AC_CACHE_VAL([xorg_cv_malloc0_returns_null],
+	[AC_RUN_IFELSE([AC_LANG_PROGRAM([
 #include <stdlib.h>
 ],[
     char *m0, *r0, *c0, *p;
@@ -1836,9 +2975,9 @@
     c0 = calloc(0,10);
     exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1);
 ])],
-		[MALLOC_ZERO_RETURNS_NULL=yes],
-		[MALLOC_ZERO_RETURNS_NULL=no],
-		[MALLOC_ZERO_RETURNS_NULL=yes])
+		[xorg_cv_malloc0_returns_null=yes],
+		[xorg_cv_malloc0_returns_null=no])])
+MALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null
 fi
 AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
 
@@ -1967,12 +3106,20 @@
 #
 # Checks for various brands of compilers and sets flags as appropriate:
 #   GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes"
+#   GNU g++ - relies on AC_PROG_CXX to set GXX to "yes"
 #   clang compiler - sets CLANGCC to "yes"
 #   Intel compiler - sets INTELCC to "yes"
 #   Sun/Oracle Solaris Studio cc - sets SUNCC to "yes"
 #
 AC_DEFUN([XORG_COMPILER_BRAND], [
-AC_REQUIRE([AC_PROG_CC_C99])
+AC_LANG_CASE(
+	[C], [
+		AC_REQUIRE([AC_PROG_CC_C99])
+	],
+	[C++], [
+		AC_REQUIRE([AC_PROG_CXX])
+	]
+)
 AC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"])
 AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
 AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
@@ -1992,54 +3139,77 @@
 # -Werror=unused-command-line-argument
 #
 AC_DEFUN([XORG_TESTSET_CFLAG], [
-AC_REQUIRE([AC_PROG_CC_C99])
 m4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])])
 m4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])])
 
-xorg_testset_save_CFLAGS="$CFLAGS"
-
-if test "x$xorg_testset_unknown_warning_option" = "x" ; then
-	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
-	AC_MSG_CHECKING([if $CC supports -Werror=unknown-warning-option])
-	AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
-	                  [xorg_testset_unknown_warning_option=yes],
-	                  [xorg_testset_unknown_warning_option=no])
-	AC_MSG_RESULT([$xorg_testset_unknown_warning_option])
-	CFLAGS="$xorg_testset_save_CFLAGS"
+AC_LANG_COMPILER_REQUIRE
+
+AC_LANG_CASE(
+	[C], [
+		AC_REQUIRE([AC_PROG_CC_C99])
+		define([PREFIX], [C])
+		define([CACHE_PREFIX], [cc])
+		define([COMPILER], [$CC])
+	],
+	[C++], [
+		define([PREFIX], [CXX])
+		define([CACHE_PREFIX], [cxx])
+		define([COMPILER], [$CXX])
+	]
+)
+
+[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]"
+
+if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then
+	PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
+	AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option],
+			[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option],
+			AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
+					  [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes],
+					  [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no]))
+	[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option]
+	PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
 fi
 
-if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
-	if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
-		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+if test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then
+	if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then
+		PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
 	fi
-	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
-	AC_MSG_CHECKING([if $CC supports -Werror=unused-command-line-argument])
-	AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
-	                  [xorg_testset_unused_command_line_argument=yes],
-	                  [xorg_testset_unused_command_line_argument=no])
-	AC_MSG_RESULT([$xorg_testset_unused_command_line_argument])
-	CFLAGS="$xorg_testset_save_CFLAGS"
+	PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
+	AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument],
+			[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument],
+			AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
+					  [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes],
+					  [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no]))
+	[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument]
+	PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
 fi
 
 found="no"
 m4_foreach([flag], m4_cdr($@), [
 	if test $found = "no" ; then
-		if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
-			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
-		fi
-
-		if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
-			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
-		fi
-
-		CFLAGS="$CFLAGS ]flag["
-
-		AC_MSG_CHECKING([if $CC supports ]flag[])
-		AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])],
-		                  [supported=yes], [supported=no])
+		if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then
+			PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
+		fi
+
+		if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then
+			PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
+		fi
+
+		PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag["
+
+dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname
+		AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[])
+		cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[])
+		AC_CACHE_VAL($cacheid,
+			     [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])],
+					     [eval $cacheid=yes],
+					     [eval $cacheid=no])])
+
+		PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
+
+		eval supported=\$$cacheid
 		AC_MSG_RESULT([$supported])
-		CFLAGS="$xorg_testset_save_CFLAGS"
-
 		if test "$supported" = "yes" ; then
 			$1="$$1 ]flag["
 			found="yes"
@@ -2052,13 +3222,13 @@
 # ---------------
 # Minimum version: 1.16.0
 #
-# Defines BASE_CFLAGS to contain a set of command line arguments supported
-# by the selected compiler which do NOT alter the generated code.  These
-# arguments will cause the compiler to print various warnings during
-# compilation AND turn a conservative set of warnings into errors.
+# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line
+# arguments supported by the selected compiler which do NOT alter the generated
+# code.  These arguments will cause the compiler to print various warnings
+# during compilation AND turn a conservative set of warnings into errors.
 #
-# The set of flags supported by BASE_CFLAGS will grow in future
-# versions of util-macros as options are added to new compilers.
+# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in
+# future versions of util-macros as options are added to new compilers.
 #
 AC_DEFUN([XORG_COMPILER_FLAGS], [
 AC_REQUIRE([XORG_COMPILER_BRAND])
@@ -2069,76 +3239,89 @@
               [SELECTIVE_WERROR=$enableval],
               [SELECTIVE_WERROR=yes])
 
+AC_LANG_CASE(
+        [C], [
+                define([PREFIX], [C])
+        ],
+        [C++], [
+                define([PREFIX], [CXX])
+        ]
+)
 # -v is too short to test reliably with XORG_TESTSET_CFLAG
 if test "x$SUNCC" = "xyes"; then
-    BASE_CFLAGS="-v"
+    [BASE_]PREFIX[FLAGS]="-v"
 else
-    BASE_CFLAGS=""
+    [BASE_]PREFIX[FLAGS]=""
 fi
 
 # This chunk of warnings were those that existed in the legacy CWARNFLAGS
-XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wall])
-XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wpointer-arith])
-XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wstrict-prototypes])
-XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wmissing-prototypes])
-XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wmissing-declarations])
-XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wnested-externs])
-XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wbad-function-cast])
-XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wformat=2], [-Wformat])
-XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wold-style-definition])
-XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wdeclaration-after-statement])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat])
+
+AC_LANG_CASE(
+	[C], [
+		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes])
+		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes])
+		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs])
+		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast])
+		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd])
+		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement])
+	]
+)
 
 # This chunk adds additional warnings that could catch undesired effects.
-XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wunused])
-XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wuninitialized])
-XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wshadow])
-XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wcast-qual])
-XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wmissing-noreturn])
-XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wmissing-format-attribute])
-XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wredundant-decls])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op])
 
 # These are currently disabled because they are noisy.  They will be enabled
 # in the future once the codebase is sufficiently modernized to silence
 # them.  For now, I don't want them to drown out the other warnings.
-# XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wlogical-op])
-# XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wparentheses])
-# XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wcast-align])
+# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses])
+# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align])
+# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual])
 
 # Turn some warnings into errors, so we don't accidently get successful builds
 # when there are problems that should be fixed.
 
 if test "x$SELECTIVE_WERROR" = "xyes" ; then
-XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED])
-XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=nonnull])
-XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=init-self])
-XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=main])
-XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=missing-braces])
-XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=sequence-point])
-XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT])
-XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=trigraphs])
-XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=array-bounds])
-XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=write-strings])
-XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=address])
-XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION])
-XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION
 else
 AC_MSG_WARN([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])
-XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wimplicit])
-XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wnonnull])
-XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Winit-self])
-XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wmain])
-XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wmissing-braces])
-XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wsequence-point])
-XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wreturn-type])
-XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wtrigraphs])
-XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Warray-bounds])
-XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wwrite-strings])
-XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Waddress])
-XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wint-to-pointer-cast])
-XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wpointer-to-int-cast])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast])
 fi
 
-AC_SUBST([BASE_CFLAGS])
+AC_SUBST([BASE_]PREFIX[FLAGS])
 ]) # XORG_COMPILER_FLAGS
 
 # XORG_CWARNFLAGS
@@ -2156,11 +3339,15 @@
 AC_DEFUN([XORG_CWARNFLAGS], [
 AC_REQUIRE([XORG_COMPILER_FLAGS])
 AC_REQUIRE([XORG_COMPILER_BRAND])
-CWARNFLAGS="$BASE_CFLAGS"
-if  test "x$GCC" = xyes ; then
-    CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing"
-fi
-AC_SUBST(CWARNFLAGS)
+AC_LANG_CASE(
+	[C], [
+		CWARNFLAGS="$BASE_CFLAGS"
+		if  test "x$GCC" = xyes ; then
+		    CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing"
+		fi
+		AC_SUBST(CWARNFLAGS)
+	]
+)
 ]) # XORG_CWARNFLAGS
 
 # XORG_STRICT_OPTION
@@ -2170,7 +3357,7 @@
 # Add configure option to enable strict compilation flags, such as treating
 # warnings as fatal errors.
 # If --enable-strict-compilation is passed to configure, adds strict flags to
-# $BASE_CFLAGS and the deprecated $CWARNFLAGS.
+# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS.
 #
 # Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or
 # when strict compilation is unconditionally desired.
@@ -2183,21 +3370,30 @@
 			  [Enable all warnings from compiler and make them errors (default: disabled)]),
 			  [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
 
-STRICT_CFLAGS=""
-XORG_TESTSET_CFLAG([STRICT_CFLAGS], [-pedantic])
-XORG_TESTSET_CFLAG([STRICT_CFLAGS], [-Werror], [-errwarn])
+AC_LANG_CASE(
+        [C], [
+                define([PREFIX], [C])
+        ],
+        [C++], [
+                define([PREFIX], [CXX])
+        ]
+)
+
+[STRICT_]PREFIX[FLAGS]=""
+XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic])
+XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn])
 
 # Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not
 # activate it with -Werror, so we add it here explicitly.
-XORG_TESTSET_CFLAG([STRICT_CFLAGS], [-Werror=attributes])
+XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes])
 
 if test "x$STRICT_COMPILE" = "xyes"; then
-    BASE_CFLAGS="$BASE_CFLAGS $STRICT_CFLAGS"
-    CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
+    [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]"
+    AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"])
 fi
-AC_SUBST([STRICT_CFLAGS])
-AC_SUBST([BASE_CFLAGS])
-AC_SUBST([CWARNFLAGS])
+AC_SUBST([STRICT_]PREFIX[FLAGS])
+AC_SUBST([BASE_]PREFIX[FLAGS])
+AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS]))
 ]) # XORG_STRICT_OPTION
 
 # XORG_DEFAULT_OPTIONS
@@ -2263,7 +3459,7 @@
 # XORG_RELEASE_VERSION
 # --------------------
 # Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
- 
+
 AC_DEFUN([XORG_RELEASE_VERSION],[
 	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
 		[`echo $PACKAGE_VERSION | cut -d . -f 1`],
@@ -2331,12 +3527,12 @@
  AC_SEARCH_LIBS(socket, [socket])
  AC_SEARCH_LIBS(gethostbyname, [nsl])
  if test "$ac_cv_search_socket$ac_cv_search_gethostbyname" = "nono"; then
-   AC_HAVE_LIBRARY([ws2_32])
+   AC_CHECK_LIB([ws2_32],[main])
  fi
 
  # Needs to come after above checks for libsocket & libnsl for SVR4 systems
  AC_ARG_ENABLE(ipv6,
-	AC_HELP_STRING([--enable-ipv6],[Enable IPv6 support]),
+	AS_HELP_STRING([--enable-ipv6],[Enable IPv6 support]),
 	[IPV6CONN=$enableval],
 	[AC_CHECK_FUNC(getaddrinfo,[IPV6CONN=yes],[IPV6CONN=no])])
  AC_MSG_CHECKING([if IPv6 support should be built])
@@ -2359,6 +3555,41 @@
 AC_INCLUDES_DEFAULT
 #include <sys/socket.h>])
 
+ # XPG4v2/UNIX95 added msg_control - check to see if we need to define
+ # _XOPEN_SOURCE to get it (such as on Solaris)
+ AC_CHECK_MEMBER([struct msghdr.msg_control], [], [],
+                 [
+AC_INCLUDES_DEFAULT
+#include <sys/socket.h>
+                 ])
+ # 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
+     AC_MSG_NOTICE([trying again with _XOPEN_SOURCE=600])
+     AC_CHECK_MEMBER([struct msghdr.msg_control],
+                     [AC_DEFINE([_XOPEN_SOURCE], [600],
+                       [Defined if needed to expose struct msghdr.msg_control])
+                     ], [], [
+#define _XOPEN_SOURCE 600
+AC_INCLUDES_DEFAULT
+#include <sys/socket.h>
+                     ])
+ 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
+     AC_MSG_NOTICE([trying again with _XOPEN_SOURCE=500])
+     AC_CHECK_MEMBER([struct msghdr.msg_control],
+                     [AC_DEFINE([_XOPEN_SOURCE], [500],
+                       [Defined if needed to expose struct msghdr.msg_control])
+                     ], [], [
+#define _XOPEN_SOURCE 500
+AC_INCLUDES_DEFAULT
+#include <sys/socket.h>
+                     ])
+ fi
+
+
 ]) # XTRANS_TCP_FLAGS
 
 # XTRANS_CONNECTION_FLAGS()
@@ -2367,13 +3598,12 @@
 # that use Xtrans functions
 AC_DEFUN([XTRANS_CONNECTION_FLAGS],[
  AC_REQUIRE([AC_CANONICAL_HOST])
- AC_REQUIRE([AC_TYPE_SIGNAL])
  [case $host_os in
 	mingw*)	unixdef="no"   ;;
 	*)	unixdef="yes"  ;;
  esac]
  AC_ARG_ENABLE(unix-transport,
-	AC_HELP_STRING([--enable-unix-transport],[Enable UNIX domain socket transport]),
+	AS_HELP_STRING([--enable-unix-transport],[Enable UNIX domain socket transport]),
 	[UNIXCONN=$enableval], [UNIXCONN=$unixdef])
  AC_MSG_CHECKING([if Xtrans should support UNIX socket connections])
  if test "$UNIXCONN" = "yes"; then
@@ -2381,7 +3611,7 @@
  fi
  AC_MSG_RESULT($UNIXCONN)
  AC_ARG_ENABLE(tcp-transport,
-	AC_HELP_STRING([--enable-tcp-transport],[Enable TCP socket transport]),
+	AS_HELP_STRING([--enable-tcp-transport],[Enable TCP socket transport]),
 	[TCPCONN=$enableval], [TCPCONN=yes])
  AC_MSG_CHECKING([if Xtrans should support TCP socket connections])
  AC_MSG_RESULT($TCPCONN)
@@ -2394,7 +3624,7 @@
 	*)			localdef="no"  ;;
  esac]
  AC_ARG_ENABLE(local-transport,
-	AC_HELP_STRING([--enable-local-transport],[Enable os-specific local transport]),
+	AS_HELP_STRING([--enable-local-transport],[Enable os-specific local transport]),
 	[LOCALCONN=$enableval], [LOCALCONN=$localdef])
  AC_MSG_CHECKING([if Xtrans should support os-specific local connections])
  AC_MSG_RESULT($LOCALCONN)
@@ -2412,7 +3642,7 @@
 AC_DEFUN([XTRANS_SECURE_RPC_FLAGS],
 [AC_REQUIRE([XTRANS_TCP_FLAGS])
  AC_ARG_ENABLE(secure-rpc,
-	AC_HELP_STRING([--enable-secure-rpc],[Enable Secure RPC]),
+	AS_HELP_STRING([--enable-secure-rpc],[Enable Secure RPC]),
         [SECURE_RPC=$enableval], [SECURE_RPC="try"])
 
  if test "x$SECURE_RPC" = "xyes" -o "x$SECURE_RPC" = "xtry" ; then
@@ -2438,1038 +3668,3 @@
 ]) # XTRANS_SECURE_RPC_FLAGS
 
 
-# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
-# Foundation, Inc.
-#
-# This file 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.
-
-# serial 1
-
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-# (This private macro should not be called outside this file.)
-AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.11'
-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.11.6], [],
-      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
-])
-
-# _AM_AUTOCONF_VERSION(VERSION)
-# -----------------------------
-# aclocal traces this macro to find the Autoconf version.
-# This is a private macro too.  Using m4_define simplifies
-# the logic in aclocal, which can simply ignore this definition.
-m4_define([_AM_AUTOCONF_VERSION], [])
-
-# AM_SET_CURRENT_AUTOMAKE_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.11.6])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, 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
-#
-# This file 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.
-
-# serial 5
-
-# AM_PROG_AS
-# ----------
-AC_DEFUN([AM_PROG_AS],
-[# By default we simply use the C compiler to build assembly code.
-AC_REQUIRE([AC_PROG_CC])
-test "${CCAS+set}" = set || CCAS=$CC
-test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
-AC_ARG_VAR([CCAS],      [assembler compiler command (defaults to CC)])
-AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)])
-_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl
-])
-
-# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
-
-# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
-#
-# This file 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.
-
-# serial 1
-
-# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
-# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
-# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
-#
-# Of course, Automake must honor this variable whenever it calls a
-# tool from the auxiliary directory.  The problem is that $srcdir (and
-# therefore $ac_aux_dir as well) can be either absolute or relative,
-# depending on how configure is run.  This is pretty annoying, since
-# it makes $ac_aux_dir quite unusable in subdirectories: in the top
-# source directory, any form will work fine, but in subdirectories a
-# relative path needs to be adjusted first.
-#
-# $ac_aux_dir/missing
-#    fails when called from a subdirectory if $ac_aux_dir is relative
-# $top_srcdir/$ac_aux_dir/missing
-#    fails if $ac_aux_dir is absolute,
-#    fails when called from a subdirectory in a VPATH build with
-#          a relative $ac_aux_dir
-#
-# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
-# are both prefixed by $srcdir.  In an in-source build this is usually
-# harmless because $srcdir is `.', but things will broke when you
-# start a VPATH build or use an absolute $srcdir.
-#
-# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
-# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
-#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
-# and then we would define $MISSING as
-#   MISSING="\${SHELL} $am_aux_dir/missing"
-# This will work as long as MISSING is not called from configure, because
-# unfortunately $(top_srcdir) has no meaning in configure.
-# However there are other variables, like CC, which are often used in
-# configure, and could therefore not use this "fixed" $ac_aux_dir.
-#
-# Another solution, used here, is to always expand $ac_aux_dir to an
-# absolute PATH.  The drawback is that using absolute paths prevent a
-# configured tree to be moved without reconfiguration.
-
-AC_DEFUN([AM_AUX_DIR_EXPAND],
-[dnl Rely on autoconf to set up CDPATH properly.
-AC_PREREQ([2.50])dnl
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
-])
-
-# AM_CONDITIONAL                                            -*- Autoconf -*-
-
-# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
-# Free Software Foundation, Inc.
-#
-# This file 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.
-
-# serial 9
-
-# AM_CONDITIONAL(NAME, SHELL-CONDITION)
-# -------------------------------------
-# Define a conditional.
-AC_DEFUN([AM_CONDITIONAL],
-[AC_PREREQ(2.52)dnl
- ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
-	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
-AC_SUBST([$1_TRUE])dnl
-AC_SUBST([$1_FALSE])dnl
-_AM_SUBST_NOTMAKE([$1_TRUE])dnl
-_AM_SUBST_NOTMAKE([$1_FALSE])dnl
-m4_define([_AM_COND_VALUE_$1], [$2])dnl
-if $2; then
-  $1_TRUE=
-  $1_FALSE='#'
-else
-  $1_TRUE='#'
-  $1_FALSE=
-fi
-AC_CONFIG_COMMANDS_PRE(
-[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
-  AC_MSG_ERROR([[conditional "$1" was never defined.
-Usually this means the macro was only invoked conditionally.]])
-fi])])
-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
-# 2010, 2011 Free Software Foundation, Inc.
-#
-# This file 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.
-
-# serial 12
-
-# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
-# written in clear, in which case automake, when reading aclocal.m4,
-# will think it sees a *use*, and therefore will trigger all it's
-# C support machinery.  Also note that it means that autoscan, seeing
-# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
-
-
-# _AM_DEPENDENCIES(NAME)
-# ----------------------
-# See how the compiler implements dependency checking.
-# NAME is "CC", "CXX", "GCJ", or "OBJC".
-# We try a few techniques and use that to set a single cache variable.
-#
-# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
-# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
-# dependency, and given that the user is not expected to run this macro,
-# just rely on AC_PROG_CC.
-AC_DEFUN([_AM_DEPENDENCIES],
-[AC_REQUIRE([AM_SET_DEPDIR])dnl
-AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
-AC_REQUIRE([AM_MAKE_INCLUDE])dnl
-AC_REQUIRE([AM_DEP_TRACK])dnl
-
-ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
-       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
-       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
-       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
-       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
-                   [depcc="$$1"   am_compiler_list=])
-
-AC_CACHE_CHECK([dependency style of $depcc],
-               [am_cv_$1_dependencies_compiler_type],
-[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_$1_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
-  m4_case([$1], [CC],
-    [case " $depcc " in #(
-     *\ -arch\ *\ -arch\ *) am__universal=true ;;
-     esac],
-    [CXX],
-    [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 8's {/usr,}/bin/sh.
-      touch 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_$1_dependencies_compiler_type=$depmode
-        break
-      fi
-    fi
-  done
-
-  cd ..
-  rm -rf conftest.dir
-else
-  am_cv_$1_dependencies_compiler_type=none
-fi
-])
-AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
-AM_CONDITIONAL([am__fastdep$1], [
-  test "x$enable_dependency_tracking" != xno \
-  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
-])
-
-
-# AM_SET_DEPDIR
-# -------------
-# Choose a directory name for dependency files.
-# This macro is AC_REQUIREd in _AM_DEPENDENCIES
-AC_DEFUN([AM_SET_DEPDIR],
-[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
-])
-
-
-# AM_DEP_TRACK
-# ------------
-AC_DEFUN([AM_DEP_TRACK],
-[AC_ARG_ENABLE(dependency-tracking,
-[  --disable-dependency-tracking  speeds up one-time build
-  --enable-dependency-tracking   do not reject slow dependency extractors])
-if test "x$enable_dependency_tracking" != xno; then
-  am_depcomp="$ac_aux_dir/depcomp"
-  AMDEPBACKSLASH='\'
-  am__nodep='_no'
-fi
-AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
-AC_SUBST([AMDEPBACKSLASH])dnl
-_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
-AC_SUBST([am__nodep])dnl
-_AM_SUBST_NOTMAKE([am__nodep])dnl
-])
-
-# Generate code to set up dependency tracking.              -*- Autoconf -*-
-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
-#
-# This file 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.
-
-#serial 5
-
-# _AM_OUTPUT_DEPENDENCY_COMMANDS
-# ------------------------------
-AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
-[{
-  # Autoconf 2.62 quotes --file arguments for eval, but not when files
-  # are listed without --file.  Let's play safe and only enable the eval
-  # if we detect the quoting.
-  case $CONFIG_FILES in
-  *\'*) eval set x "$CONFIG_FILES" ;;
-  *)   set x $CONFIG_FILES ;;
-  esac
-  shift
-  for mf
-  do
-    # Strip MF so we end up with the name of the file.
-    mf=`echo "$mf" | sed -e 's/:.*$//'`
-    # Check whether this is an Automake generated Makefile or not.
-    # We used to match only the files named `Makefile.in', but
-    # some people rename them; so instead we look at the file content.
-    # Grep'ing the first line is not enough: some people post-process
-    # each Makefile.in and add a new line on top of each file to say so.
-    # Grep'ing the whole file is not good either: AIX grep has a line
-    # limit of 2048, but all sed's we know have understand at least 4000.
-    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
-      dirpart=`AS_DIRNAME("$mf")`
-    else
-      continue
-    fi
-    # Extract the definition of DEPDIR, am__include, and am__quote
-    # from the Makefile without running `make'.
-    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
-    test -z "$DEPDIR" && continue
-    am__include=`sed -n 's/^am__include = //p' < "$mf"`
-    test -z "am__include" && continue
-    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-    # When using ansi2knr, U may be empty or an underscore; expand it
-    U=`sed -n 's/^U = //p' < "$mf"`
-    # Find all dependency output files, they are included files with
-    # $(DEPDIR) in their names.  We invoke sed twice because it is the
-    # simplest approach to changing $(DEPDIR) to its actual value in the
-    # expansion.
-    for file in `sed -n "
-      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
-      # Make sure the directory exists.
-      test -f "$dirpart/$file" && continue
-      fdir=`AS_DIRNAME(["$file"])`
-      AS_MKDIR_P([$dirpart/$fdir])
-      # echo "creating $dirpart/$file"
-      echo '# dummy' > "$dirpart/$file"
-    done
-  done
-}
-])# _AM_OUTPUT_DEPENDENCY_COMMANDS
-
-
-# AM_OUTPUT_DEPENDENCY_COMMANDS
-# -----------------------------
-# This macro should only be invoked once -- use via AC_REQUIRE.
-#
-# This code is only required when automatic dependency tracking
-# is enabled.  FIXME.  This creates each `.P' file that we will
-# need in order to bootstrap the dependency handling code.
-AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
-[AC_CONFIG_COMMANDS([depfiles],
-     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
-     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
-])
-
-# Do all the work for Automake.                             -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
-#
-# This file 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.
-
-# serial 16
-
-# This macro actually does too much.  Some checks are only needed if
-# your package does certain things.  But this isn't really a big deal.
-
-# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
-# AM_INIT_AUTOMAKE([OPTIONS])
-# -----------------------------------------------
-# The call with PACKAGE and VERSION arguments is the old style
-# call (pre autoconf-2.50), which is being phased out.  PACKAGE
-# and VERSION should now be passed to AC_INIT and removed from
-# the call to AM_INIT_AUTOMAKE.
-# We support both call styles for the transition.  After
-# the next Automake release, Autoconf can make the AC_INIT
-# arguments mandatory, and then we can depend on a new Autoconf
-# release and drop the old call support.
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_PREREQ([2.62])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
-AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
-AC_REQUIRE([AC_PROG_INSTALL])dnl
-if test "`cd $srcdir && pwd`" != "`pwd`"; then
-  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
-  # is not polluted with repeated "-I."
-  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
-  # test to see if srcdir already configured
-  if test -f $srcdir/config.status; then
-    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-  fi
-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
-  fi
-fi
-AC_SUBST([CYGPATH_W])
-
-# Define the identity of the package.
-dnl Distinguish between old-style and new-style calls.
-m4_ifval([$2],
-[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
- AC_SUBST([PACKAGE], [$1])dnl
- AC_SUBST([VERSION], [$2])],
-[_AM_SET_OPTIONS([$1])dnl
-dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
-m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
-  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
-
-_AM_IF_OPTION([no-define],,
-[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
- AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
-
-# Some tools Automake needs.
-AC_REQUIRE([AM_SANITY_CHECK])dnl
-AC_REQUIRE([AC_ARG_PROGRAM])dnl
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
-AM_MISSING_PROG(AUTOCONF, autoconf)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
-AM_MISSING_PROG(AUTOHEADER, autoheader)
-AM_MISSING_PROG(MAKEINFO, makeinfo)
-AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
-AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
-AC_REQUIRE([AM_PROG_MKDIR_P])dnl
-# We need awk for the "check" target.  The system "awk" is bad on
-# some platforms.
-AC_REQUIRE([AC_PROG_AWK])dnl
-AC_REQUIRE([AC_PROG_MAKE_SET])dnl
-AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
-	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
-			     [_AM_PROG_TAR([v7])])])
-_AM_IF_OPTION([no-dependencies],,
-[AC_PROVIDE_IFELSE([AC_PROG_CC],
-		  [_AM_DEPENDENCIES(CC)],
-		  [define([AC_PROG_CC],
-			  defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
-AC_PROVIDE_IFELSE([AC_PROG_CXX],
-		  [_AM_DEPENDENCIES(CXX)],
-		  [define([AC_PROG_CXX],
-			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
-AC_PROVIDE_IFELSE([AC_PROG_OBJC],
-		  [_AM_DEPENDENCIES(OBJC)],
-		  [define([AC_PROG_OBJC],
-			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
-])
-_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
-dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
-dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
-dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
-AC_CONFIG_COMMANDS_PRE(dnl
-[m4_provide_if([_AM_COMPILER_EXEEXT],
-  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
-])
-
-dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
-dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
-dnl mangled by Autoconf and run in a shell conditional statement.
-m4_define([_AC_COMPILER_EXEEXT],
-m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
-
-
-# When config.status generates a header, we must update the stamp-h file.
-# This file resides in the same directory as the config header
-# that is generated.  The stamp files are numbered to have different names.
-
-# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
-# loop where config.status creates the headers, so we can generate
-# our stamp files there.
-AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
-[# Compute $1's index in $config_headers.
-_am_arg=$1
-_am_stamp_count=1
-for _am_header in $config_headers :; do
-  case $_am_header in
-    $_am_arg | $_am_arg:* )
-      break ;;
-    * )
-      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
-  esac
-done
-echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
-
-# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
-# Inc.
-#
-# This file 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.
-
-# serial 1
-
-# AM_PROG_INSTALL_SH
-# ------------------
-# Define $install_sh.
-AC_DEFUN([AM_PROG_INSTALL_SH],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-if test x"${install_sh}" != 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
-AC_SUBST(install_sh)])
-
-# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
-#
-# This file 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.
-
-# serial 2
-
-# Check whether the underlying file-system supports filenames
-# with a leading dot.  For instance MS-DOS doesn't.
-AC_DEFUN([AM_SET_LEADING_DOT],
-[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
-AC_SUBST([am__leading_dot])])
-
-# Check to see how 'make' treats includes.	            -*- Autoconf -*-
-
-# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
-#
-# This file 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.
-
-# serial 4
-
-# AM_MAKE_INCLUDE()
-# -----------------
-# Check to see how make treats includes.
-AC_DEFUN([AM_MAKE_INCLUDE],
-[am_make=${MAKE-make}
-cat > confinc << 'END'
-am__doit:
-	@echo this is the am__doit target
-.PHONY: am__doit
-END
-# If we don't find an include directive, just comment out the code.
-AC_MSG_CHECKING([for style of include used by $am_make])
-am__include="#"
-am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# Ignore all kinds of additional output from `make'.
-case `$am_make -s -f confmf 2> /dev/null` in #(
-*the\ am__doit\ target*)
-  am__include=include
-  am__quote=
-  _am_result=GNU
-  ;;
-esac
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
-   echo '.include "confinc"' > confmf
-   case `$am_make -s -f confmf 2> /dev/null` in #(
-   *the\ am__doit\ target*)
-     am__include=.include
-     am__quote="\""
-     _am_result=BSD
-     ;;
-   esac
-fi
-AC_SUBST([am__include])
-AC_SUBST([am__quote])
-AC_MSG_RESULT([$_am_result])
-rm -f confinc confmf
-])
-
-# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
-
-# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
-#
-# This file 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.
-
-# serial 6
-
-# AM_MISSING_PROG(NAME, PROGRAM)
-# ------------------------------
-AC_DEFUN([AM_MISSING_PROG],
-[AC_REQUIRE([AM_MISSING_HAS_RUN])
-$1=${$1-"${am_missing_run}$2"}
-AC_SUBST($1)])
-
-
-# AM_MISSING_HAS_RUN
-# ------------------
-# Define MISSING if not defined so far and test if it supports --run.
-# If it does, set am_missing_run to use it, otherwise, to nothing.
-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
-fi
-# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
-  am_missing_run="$MISSING --run "
-else
-  am_missing_run=
-  AC_MSG_WARN([`missing' script is too old or missing])
-fi
-])
-
-# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
-# Inc.
-#
-# This file 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.
-
-# serial 1
-
-# AM_PROG_MKDIR_P
-# ---------------
-# Check for `mkdir -p'.
-AC_DEFUN([AM_PROG_MKDIR_P],
-[AC_PREREQ([2.60])dnl
-AC_REQUIRE([AC_PROG_MKDIR_P])dnl
-dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
-dnl while keeping a definition of mkdir_p for backward compatibility.
-dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
-dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
-dnl Makefile.ins that do not define MKDIR_P, so we do our own
-dnl adjustment using top_builddir (which is defined more often than
-dnl MKDIR_P).
-AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
-case $mkdir_p in
-  [[\\/$]]* | ?:[[\\/]]*) ;;
-  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
-esac
-])
-
-# Helper functions for option handling.                     -*- Autoconf -*-
-
-# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
-# Foundation, Inc.
-#
-# This file 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.
-
-# serial 5
-
-# _AM_MANGLE_OPTION(NAME)
-# -----------------------
-AC_DEFUN([_AM_MANGLE_OPTION],
-[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
-
-# _AM_SET_OPTION(NAME)
-# --------------------
-# Set option NAME.  Presently that only means defining a flag for this option.
-AC_DEFUN([_AM_SET_OPTION],
-[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
-
-# _AM_SET_OPTIONS(OPTIONS)
-# ------------------------
-# OPTIONS is a space-separated list of Automake options.
-AC_DEFUN([_AM_SET_OPTIONS],
-[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
-
-# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
-# -------------------------------------------
-# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
-AC_DEFUN([_AM_IF_OPTION],
-[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
-
-# Check to make sure that the build environment is sane.    -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
-# Free Software Foundation, Inc.
-#
-# This file 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.
-
-# serial 5
-
-# AM_SANITY_CHECK
-# ---------------
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftest.file
-# 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]]*)
-    AC_MSG_ERROR([unsafe absolute working directory name]);;
-esac
-case $srcdir in
-  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
-    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
-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 (
-   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
-   rm -f conftest.file
-   if test "$[*]" != "X $srcdir/configure conftest.file" \
-      && test "$[*]" != "X conftest.file $srcdir/configure"; then
-
-      # 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".
-      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
-alias in your environment])
-   fi
-
-   test "$[2]" = conftest.file
-   )
-then
-   # Ok.
-   :
-else
-   AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-AC_MSG_RESULT(yes)])
-
-# Copyright (C) 2009, 2011  Free Software Foundation, Inc.
-#
-# This file 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.
-
-# serial 2
-
-# AM_SILENT_RULES([DEFAULT])
-# --------------------------
-# Enable less verbose build rules; with the default set to DEFAULT
-# (`yes' being less verbose, `no' or empty being verbose).
-AC_DEFUN([AM_SILENT_RULES],
-[AC_ARG_ENABLE([silent-rules],
-[  --enable-silent-rules          less verbose build output (undo: `make V=1')
-  --disable-silent-rules         verbose build output (undo: `make V=0')])
-case $enable_silent_rules in
-yes) AM_DEFAULT_VERBOSITY=0;;
-no)  AM_DEFAULT_VERBOSITY=1;;
-*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
-esac
-dnl
-dnl A few `make' implementations (e.g., NonStop OS and NextStep)
-dnl do not support nested variable expansions.
-dnl See automake bug#9928 and bug#10237.
-am_make=${MAKE-make}
-AC_CACHE_CHECK([whether $am_make supports nested variables],
-   [am_cv_make_support_nested_variables],
-   [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])
-if test $am_cv_make_support_nested_variables = yes; then
-  dnl Using `$V' instead of `$(V)' breaks IRIX make.
-  AM_V='$(V)'
-  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
-else
-  AM_V=$AM_DEFAULT_VERBOSITY
-  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
-fi
-AC_SUBST([AM_V])dnl
-AM_SUBST_NOTMAKE([AM_V])dnl
-AC_SUBST([AM_DEFAULT_V])dnl
-AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
-AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
-AM_BACKSLASH='\'
-AC_SUBST([AM_BACKSLASH])dnl
-_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
-])
-
-# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
-#
-# This file 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.
-
-# serial 1
-
-# AM_PROG_INSTALL_STRIP
-# ---------------------
-# One issue with vendor `install' (even GNU) is that you can't
-# specify the program used to strip binaries.  This is especially
-# annoying in cross-compiling environments, where the build's strip
-# is unlikely to handle the host's binaries.
-# Fortunately install-sh will honor a STRIPPROG variable, so we
-# always use install-sh in `make install-strip', and initialize
-# STRIPPROG with the value of the STRIP variable (set by the user).
-AC_DEFUN([AM_PROG_INSTALL_STRIP],
-[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
-# 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.
-dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
-if test "$cross_compiling" != no; then
-  AC_CHECK_TOOL([STRIP], [strip], :)
-fi
-INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
-AC_SUBST([INSTALL_STRIP_PROGRAM])])
-
-# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
-#
-# This file 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.
-
-# serial 3
-
-# _AM_SUBST_NOTMAKE(VARIABLE)
-# ---------------------------
-# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
-# This macro is traced by Automake.
-AC_DEFUN([_AM_SUBST_NOTMAKE])
-
-# AM_SUBST_NOTMAKE(VARIABLE)
-# --------------------------
-# Public sister of _AM_SUBST_NOTMAKE.
-AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
-
-# Check how to create a tarball.                            -*- Autoconf -*-
-
-# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
-#
-# This file 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.
-
-# serial 2
-
-# _AM_PROG_TAR(FORMAT)
-# --------------------
-# Check how to create a tarball in format FORMAT.
-# FORMAT should be one of `v7', `ustar', or `pax'.
-#
-# Substitute a variable $(am__tar) that is a command
-# writing to stdout a FORMAT-tarball containing the directory
-# $tardir.
-#     tardir=directory && $(am__tar) > result.tar
-#
-# Substitute a variable $(am__untar) that extract such
-# a tarball read from stdin.
-#     $(am__untar) < result.tar
-AC_DEFUN([_AM_PROG_TAR],
-[# Always define AMTAR for backward compatibility.  Yes, it's still used
-# in the wild :-(  We should find a proper way to deprecate it ...
-AC_SUBST([AMTAR], ['$${TAR-tar}'])
-m4_if([$1], [v7],
-     [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
-     [m4_case([$1], [ustar],, [pax],,
-              [m4_fatal([Unknown tar format])])
-AC_MSG_CHECKING([how to create a $1 tar archive])
-# Loop over all known methods to create a tar archive until one works.
-_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
-_am_tools=${am_cv_prog_tar_$1-$_am_tools}
-# Do not fold the above two line into one, because Tru64 sh and
-# Solaris sh will not grok spaces in the rhs of `-'.
-for _am_tool in $_am_tools
-do
-  case $_am_tool in
-  gnutar)
-    for _am_tar in tar gnutar gtar;
-    do
-      AM_RUN_LOG([$_am_tar --version]) && break
-    done
-    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
-    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
-    am__untar="$_am_tar -xf -"
-    ;;
-  plaintar)
-    # Must skip GNU tar: if it does not support --format= it doesn't create
-    # ustar tarball either.
-    (tar --version) >/dev/null 2>&1 && continue
-    am__tar='tar chf - "$$tardir"'
-    am__tar_='tar chf - "$tardir"'
-    am__untar='tar xf -'
-    ;;
-  pax)
-    am__tar='pax -L -x $1 -w "$$tardir"'
-    am__tar_='pax -L -x $1 -w "$tardir"'
-    am__untar='pax -r'
-    ;;
-  cpio)
-    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
-    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
-    am__untar='cpio -i -H $1 -d'
-    ;;
-  none)
-    am__tar=false
-    am__tar_=false
-    am__untar=false
-    ;;
-  esac
-
-  # If the value was cached, stop now.  We just wanted to have am__tar
-  # and am__untar set.
-  test -n "${am_cv_prog_tar_$1}" && break
-
-  # tar/untar a dummy directory, and stop if the command works
-  rm -rf conftest.dir
-  mkdir conftest.dir
-  echo GrepMe > conftest.dir/file
-  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
-  rm -rf conftest.dir
-  if test -s conftest.tar; then
-    AM_RUN_LOG([$am__untar <conftest.tar])
-    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
-  fi
-done
-rm -rf conftest.dir
-
-AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
-AC_MSG_RESULT([$am_cv_prog_tar_$1])])
-AC_SUBST([am__tar])
-AC_SUBST([am__untar])
-]) # _AM_PROG_TAR
-
-m4_include([m4/ac_define_dir.m4])
-m4_include([m4/libtool.m4])
-m4_include([m4/ltoptions.m4])
-m4_include([m4/ltsugar.m4])
-m4_include([m4/ltversion.m4])
-m4_include([m4/lt~obsolete.m4])
-m4_include([m4/xorg-tls.m4])

=== modified file 'composite/Makefile.in'
--- composite/Makefile.in	2013-08-14 10:52:17 +0000
+++ composite/Makefile.in	2014-07-01 14:18:40 +0000
@@ -202,9 +202,12 @@
 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@
@@ -236,6 +239,7 @@
 GREP = @GREP@
 HAL_CFLAGS = @HAL_CFLAGS@
 HAL_LIBS = @HAL_LIBS@
+HAVE_DOT = @HAVE_DOT@
 INSTALL = @INSTALL@
 INSTALL_CMD = @INSTALL_CMD@
 INSTALL_DATA = @INSTALL_DATA@
@@ -265,6 +269,8 @@
 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@
@@ -308,6 +314,7 @@
 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 PROJECTROOT = @PROJECTROOT@
+PYTHON3 = @PYTHON3@
 RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
@@ -321,7 +328,6 @@
 SHA1_CFLAGS = @SHA1_CFLAGS@
 SHA1_LIBS = @SHA1_LIBS@
 SHELL = @SHELL@
-SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@
 SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@
 STRICT_CFLAGS = @STRICT_CFLAGS@
 STRIP = @STRIP@
@@ -392,6 +398,8 @@
 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@

=== modified file 'composite/compalloc.c'
--- composite/compalloc.c	2013-08-14 10:52:17 +0000
+++ composite/compalloc.c	2014-07-01 14:18:40 +0000
@@ -205,7 +205,7 @@
             anyMarked = compMarkWindows(pWin, &pLayerWin);
 
         if (cw->damageRegistered) {
-            DamageUnregister(&pWin->drawable, cw->damage);
+            DamageUnregister(cw->damage);
             cw->damageRegistered = FALSE;
         }
         cw->update = CompositeRedirectManual;
@@ -638,7 +638,7 @@
     CompWindowPtr cw = GetCompWindow(pWin);
 
     if (cw->damageRegistered) {
-        DamageUnregister(&pWin->drawable, cw->damage);
+        DamageUnregister(cw->damage);
         cw->damageRegistered = FALSE;
         DamageEmpty(cw->damage);
     }

=== modified file 'composite/compext.c'
--- composite/compext.c	2013-08-14 10:52:17 +0000
+++ composite/compext.c	2014-07-01 14:18:40 +0000
@@ -803,6 +803,7 @@
                                      RT_WINDOW, client, DixGetAttrAccess);
         if (rc != Success) {
             client->errorValue = stuff->window;
+            free(overlayWin);
             return rc;
         }
         pScreen = pWin->drawable.pScreen;
@@ -812,8 +813,10 @@
          * interest in the overlay window
          */
         pOc = compCreateOverlayClient(pScreen, client);
-        if (pOc == NULL)
+        if (pOc == NULL) {
+            free(overlayWin);
             return BadAlloc;
+        }
 
         /*
          * Make sure the overlay window exists
@@ -822,6 +825,7 @@
         if (cs->pOverlayWin == NULL)
             if (!compCreateOverlayWindow(pScreen)) {
                 FreeResource(pOc->resource, RT_NONE);
+                free(overlayWin);
                 return BadAlloc;
             }
 
@@ -831,6 +835,7 @@
                       DixGetAttrAccess);
         if (rc != Success) {
             FreeResource(pOc->resource, RT_NONE);
+            free(overlayWin);
             return rc;
         }
     }

=== modified file 'composite/compinit.c'
--- composite/compinit.c	2013-08-14 10:52:17 +0000
+++ composite/compinit.c	2014-07-01 14:18:40 +0000
@@ -117,11 +117,11 @@
 
     if (ret && (mask & CWBackingStore) &&
         pScreen->backingStoreSupport != NotUseful) {
-        if (pWin->backingStore != NotUseful) {
+        if (pWin->backingStore != NotUseful && !pWin->backStorage) {
             compRedirectWindow(serverClient, pWin, CompositeRedirectAutomatic);
             pWin->backStorage = (pointer) (intptr_t) 1;
         }
-        else {
+        else if (pWin->backingStore == NotUseful && pWin->backStorage) {
             compUnredirectWindow(serverClient, pWin,
                                  CompositeRedirectAutomatic);
             pWin->backStorage = NULL;
@@ -355,6 +355,9 @@
         return FALSE;
     }
 
+    if (!disableBackingStore)
+        pScreen->backingStoreSupport = WhenMapped;
+
     cs->PositionWindow = pScreen->PositionWindow;
     pScreen->PositionWindow = compPositionWindow;
 

=== modified file 'composite/compoverlay.c'
--- composite/compoverlay.c	2012-06-04 19:12:23 +0000
+++ composite/compoverlay.c	2014-07-01 14:18:40 +0000
@@ -133,16 +133,19 @@
     int result;
     int w = pScreen->width;
     int h = pScreen->height;
+    int x = 0, y = 0;
 
 #ifdef PANORAMIX
     if (!noPanoramiXExtension) {
+        x = -pScreen->x;
+        y = -pScreen->y;
         w = PanoramiXPixWidth;
         h = PanoramiXPixHeight;
     }
 #endif
 
     pWin = cs->pOverlayWin =
-        CreateWindow(cs->overlayWid, pRoot, 0, 0, w, h, 0,
+        CreateWindow(cs->overlayWid, pRoot, x, y, w, h, 0,
                      InputOutput, CWBackPixmap | CWOverrideRedirect, &attrs[0],
                      pRoot->drawable.depth,
                      serverClient, pScreen->rootVisual, &result);

=== added file 'config/10-quirks.conf'
--- config/10-quirks.conf	1970-01-01 00:00:00 +0000
+++ config/10-quirks.conf	2014-07-01 14:18:40 +0000
@@ -0,0 +1,54 @@
+# Collection of quirks and blacklist/whitelists for specific devices.
+
+
+# Accelerometer device, posts data through ABS_X/ABS_Y, making X unusable
+# http://bugs.freedesktop.org/show_bug.cgi?id=22442 
+Section "InputClass"
+        Identifier "ThinkPad HDAPS accelerometer blacklist"
+        MatchProduct "ThinkPad HDAPS accelerometer data"
+        Option "Ignore" "on"
+EndSection
+
+# https://bugzilla.redhat.com/show_bug.cgi?id=523914
+# Mouse does not move in PV Xen guest
+# Explicitly tell evdev to not ignore the absolute axes.
+Section "InputClass"
+        Identifier "Xen Virtual Pointer axis blacklist"
+        MatchProduct "Xen Virtual Pointer"
+        Option "IgnoreAbsoluteAxes" "off"
+        Option "IgnoreRelativeAxes" "off"
+EndSection
+
+# https://bugzilla.redhat.com/show_bug.cgi?id=612140
+# please make Evoluent VerticalMouse 3 work out of the box
+# Button mapping on this mouse is quirky
+Section "InputClass"
+	Identifier "Evoluent VerticalMouse 3"
+        MatchProduct "Evoluent VerticalMouse 3"
+        # Sets following configuration:
+        # top button:    left
+        # middle button: middle
+        # bottom button: right
+        # wheel click:   middle
+        # thumb button:  8 (back)
+	Option "ButtonMapping" "1 2 2 4 5 6 7 3 8"
+EndSection
+
+
+# https://bugs.freedesktop.org/show_bug.cgi?id=55867
+# Bug 55867 - Doesn't know how to tag XI_TRACKBALL
+Section "InputClass"
+        Identifier "Tag trackballs as XI_TRACKBALL"
+        MatchProduct "trackball"
+        MatchDriver "evdev"
+        Option "TypeName" "TRACKBALL"
+EndSection
+
+# https://bugs.freedesktop.org/show_bug.cgi?id=62831
+# Bug 62831 - Mionix Naos 5000 mouse detected incorrectly
+Section "InputClass"
+        Identifier "Tag Mionix Naos 5000 mouse XI_MOUSE"
+        MatchProduct "La-VIEW Technology Naos 5000 Mouse"
+        MatchDriver "evdev"
+        Option "TypeName" "MOUSE"
+EndSection

=== modified file 'config/Makefile.am'
--- config/Makefile.am	2012-06-04 19:12:23 +0000
+++ config/Makefile.am	2014-07-01 14:18:40 +0000
@@ -11,7 +11,7 @@
 
 if XORG
 xorgconfddir = $(datadir)/X11/$(XF86CONFIGDIR)
-xorgconfd_DATA = 10-evdev.conf
+xorgconfd_DATA = 10-evdev.conf 10-quirks.conf
 endif
 
 else
@@ -44,4 +44,4 @@
 
 endif # !CONFIG_UDEV
 
-EXTRA_DIST = xorg-server.conf x11-input.fdi 10-evdev.conf fdi2iclass.py
+EXTRA_DIST = xorg-server.conf x11-input.fdi 10-evdev.conf non-seat0.conf.multi-seat fdi2iclass.py 10-quirks.conf

=== modified file 'config/Makefile.in'
--- config/Makefile.in	2013-08-14 10:52:17 +0000
+++ config/Makefile.in	2014-07-01 14:18:40 +0000
@@ -223,9 +223,12 @@
 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@
@@ -257,6 +260,7 @@
 GREP = @GREP@
 HAL_CFLAGS = @HAL_CFLAGS@
 HAL_LIBS = @HAL_LIBS@
+HAVE_DOT = @HAVE_DOT@
 INSTALL = @INSTALL@
 INSTALL_CMD = @INSTALL_CMD@
 INSTALL_DATA = @INSTALL_DATA@
@@ -286,6 +290,8 @@
 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@
@@ -329,6 +335,7 @@
 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 PROJECTROOT = @PROJECTROOT@
+PYTHON3 = @PYTHON3@
 RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
@@ -342,7 +349,6 @@
 SHA1_CFLAGS = @SHA1_CFLAGS@
 SHA1_LIBS = @SHA1_LIBS@
 SHELL = @SHELL@
-SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@
 SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@
 STRICT_CFLAGS = @STRICT_CFLAGS@
 STRIP = @STRIP@
@@ -413,6 +419,8 @@
 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@
@@ -502,10 +510,10 @@
 @CONFIG_NEED_DBUS_TRUE@@CONFIG_UDEV_FALSE@	$(am__append_8)
 @CONFIG_UDEV_TRUE@libconfig_la_LIBADD = $(UDEV_LIBS) $(am__append_8)
 @CONFIG_UDEV_TRUE@@XORG_TRUE@xorgconfddir = $(datadir)/X11/$(XF86CONFIGDIR)
-@CONFIG_UDEV_TRUE@@XORG_TRUE@xorgconfd_DATA = 10-evdev.conf
+@CONFIG_UDEV_TRUE@@XORG_TRUE@xorgconfd_DATA = 10-evdev.conf 10-quirks.conf
 @CONFIG_DBUS_API_TRUE@@CONFIG_NEED_DBUS_TRUE@@CONFIG_UDEV_FALSE@dbusconfigdir = $(sysconfdir)/dbus-1/system.d
 @CONFIG_DBUS_API_TRUE@@CONFIG_NEED_DBUS_TRUE@@CONFIG_UDEV_FALSE@dbusconfig_DATA = xorg-server.conf
-EXTRA_DIST = xorg-server.conf x11-input.fdi 10-evdev.conf fdi2iclass.py
+EXTRA_DIST = xorg-server.conf x11-input.fdi 10-evdev.conf non-seat0.conf.multi-seat fdi2iclass.py 10-quirks.conf
 all: all-am
 
 .SUFFIXES:

=== modified file 'config/hal.c'
--- config/hal.c	2012-08-08 14:35:03 +0000
+++ config/hal.c	2014-07-01 14:18:40 +0000
@@ -184,8 +184,7 @@
     parent = get_prop_string(hal_ctx, udi, "info.parent");
     if (parent) {
         int usb_vendor, usb_product;
-
-        attrs.pnp_id = get_prop_string(hal_ctx, parent, "pnp.id");
+        char *old_parent;
 
         /* construct USB ID in lowercase - "0000:ffff" */
         usb_vendor = libhal_device_get_property_int(hal_ctx, parent,
@@ -203,7 +202,18 @@
                 == -1)
                 attrs.usb_id = NULL;
 
-        free(parent);
+        attrs.pnp_id = get_prop_string(hal_ctx, parent, "pnp.id");
+        old_parent = parent;
+
+        while (!attrs.pnp_id &&
+               (parent = get_prop_string(hal_ctx, parent, "info.parent"))) {
+            attrs.pnp_id = get_prop_string(hal_ctx, parent, "pnp.id");
+
+            free(old_parent);
+            old_parent = parent;
+        }
+
+        free(old_parent);
     }
 
     input_options = input_option_new(NULL, "_source", "server/hal");

=== added file 'config/non-seat0.conf.multi-seat'
--- config/non-seat0.conf.multi-seat	1970-01-01 00:00:00 +0000
+++ config/non-seat0.conf.multi-seat	2014-07-01 14:18:40 +0000
@@ -0,0 +1,18 @@
+# This is the default configuration for servers on seat-1 and above.
+#
+# Start the server with -config non-seat0.conf.multi-seat, or alternatively
+# rename the file to end in .conf and put it in the standard config
+# directory (though it will apply to _all_ seats!).
+#
+# * Disable VT switching with Ctrl-Alt-F1
+# * Force a grab on all input devices to detach them from the VT subsystem
+#   to avoid event leakage.
+
+Section "ServerFlags"
+        Option "DontVTSwitch" "on"
+EndSection
+
+Section "InputClass"
+        Identifier "Force input devices to seat"
+        Option "GrabDevice" "on"
+EndSection

=== modified file 'config/udev.c'
--- config/udev.c	2013-08-14 10:52:17 +0000
+++ config/udev.c	2014-07-01 14:18:40 +0000
@@ -130,10 +130,6 @@
             LOG_PROPERTY(ppath, "NAME", name);
         }
 
-        if (pnp_id)
-            attrs.pnp_id = strdup(pnp_id);
-        LOG_SYSATTR(ppath, "id", pnp_id);
-
         /* construct USB ID in lowercase hex - "0000:ffff" */
         if (product &&
             sscanf(product, "%*x/%4x/%4x/%*x", &usb_vendor, &usb_model) == 2) {
@@ -143,6 +139,17 @@
             else
                 LOG_PROPERTY(ppath, "PRODUCT", product);
         }
+
+        while (!pnp_id && (parent = udev_device_get_parent(parent))) {
+            pnp_id = udev_device_get_sysattr_value(parent, "id");
+            if (!pnp_id)
+                continue;
+
+            attrs.pnp_id = strdup(pnp_id);
+            ppath = udev_device_get_devnode(parent);
+            LOG_SYSATTR(ppath, "id", pnp_id);
+        }
+
     }
     if (!name)
         name = "(unnamed)";
@@ -226,6 +233,10 @@
 
     input_options = input_option_new(input_options, "config_info", config_info);
 
+    /* Default setting needed for non-seat0 seats */
+    if (ServerIsNotSeat0())
+        input_options = input_option_new(input_options, "GrabDevice", "on");
+
     LogMessage(X_INFO, "config/udev: Adding input device %s (%s)\n",
                name, path);
     rc = NewInputDeviceRequest(input_options, &attrs, &dev);

=== modified file 'configure'
--- configure	2013-08-14 10:52:17 +0000
+++ configure	2014-07-01 14:18:40 +0000
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for xorg-server 1.14.2.901.
+# Generated by GNU Autoconf 2.68 for xorg-server 1.15.1.
 #
 # Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
 #
@@ -631,8 +631,8 @@
 # Identity of this package.
 PACKAGE_NAME='xorg-server'
 PACKAGE_TARNAME='xorg-server'
-PACKAGE_VERSION='1.14.2.901'
-PACKAGE_STRING='xorg-server 1.14.2.901'
+PACKAGE_VERSION='1.15.1'
+PACKAGE_STRING='xorg-server 1.15.1'
 PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
 PACKAGE_URL=''
 
@@ -774,6 +774,7 @@
 KHRONOS_SPEC_DIR
 KHRONOS_OPENGL_REGISTRY_LIBS
 KHRONOS_OPENGL_REGISTRY_CFLAGS
+PYTHON3
 XWIN_SYS_LIBS
 XWIN_SERVER_NAME
 XWIN_LIBS
@@ -792,8 +793,8 @@
 DGA_TRUE
 SOLARIS_VT_FALSE
 SOLARIS_VT_TRUE
-SOLARIS_ASM_INLINE_FALSE
-SOLARIS_ASM_INLINE_TRUE
+LNXAPM_FALSE
+LNXAPM_TRUE
 LNXACPI_FALSE
 LNXACPI_TRUE
 LINUX_ALPHA_FALSE
@@ -834,7 +835,6 @@
 XF86VIDMODE_CFLAGS
 DGA_LIBS
 DGA_CFLAGS
-SOLARIS_ASM_CFLAGS
 SOLARIS_INOUT_ARCH
 PCI_TXT_IDS_PATH
 PCIACCESS_LIBS
@@ -860,6 +860,10 @@
 UTILS_SYS_LIBS
 XSERVER_SYS_LIBS
 XSERVER_LIBS
+HAVE_LIBUNWIND_FALSE
+HAVE_LIBUNWIND_TRUE
+LIBUNWIND_LIBS
+LIBUNWIND_CFLAGS
 XSERVERLIBS_LIBS
 XSERVERLIBS_CFLAGS
 XSERVERCFLAGS_LIBS
@@ -919,26 +923,38 @@
 XACE_TRUE
 XINERAMA_FALSE
 XINERAMA_TRUE
+PRESENT_FALSE
+PRESENT_TRUE
+GLX_SYS_LIBS
+GLX_DEFINES
+AIGLX_DRI_LOADER_FALSE
+AIGLX_DRI_LOADER_TRUE
+GLX_FALSE
+GLX_TRUE
+GL_LIBS
+GL_CFLAGS
+XLIB_LIBS
+XLIB_CFLAGS
 DRI2_AIGLX_FALSE
 DRI2_AIGLX_TRUE
 LIBDRM_LIBS
 LIBDRM_CFLAGS
+DRI3_FALSE
+DRI3_TRUE
+XSHMFENCE_FALSE
+XSHMFENCE_TRUE
+XSHMFENCE_LIBS
+XSHMFENCE_CFLAGS
+BUSFAULT_FALSE
+BUSFAULT_TRUE
+DRI3PROTO_LIBS
+DRI3PROTO_CFLAGS
 DRI2_FALSE
 DRI2_TRUE
 DRI2PROTO_LIBS
 DRI2PROTO_CFLAGS
 DRI_FALSE
 DRI_TRUE
-GLX_SYS_LIBS
-GLX_DEFINES
-AIGLX_DRI_LOADER_FALSE
-AIGLX_DRI_LOADER_TRUE
-GLX_FALSE
-GLX_TRUE
-GL_LIBS
-GL_CFLAGS
-XLIB_LIBS
-XLIB_CFLAGS
 CLIENTIDS_FALSE
 CLIENTIDS_TRUE
 RES_FALSE
@@ -1023,8 +1039,6 @@
 FREEBSD_KLDLOAD_TRUE
 FBDEVHW_FALSE
 FBDEVHW_TRUE
-LNXAPM_FALSE
-LNXAPM_TRUE
 AGP_FALSE
 AGP_TRUE
 LIBOBJS
@@ -1092,6 +1106,10 @@
 XORG_SGML_PATH
 HAVE_DOXYGEN_FALSE
 HAVE_DOXYGEN_TRUE
+HAVE_DOT_FALSE
+HAVE_DOT_TRUE
+HAVE_DOT
+DOT
 DOXYGEN
 AM_BACKSLASH
 AM_DEFAULT_VERBOSITY
@@ -1285,6 +1303,8 @@
 enable_glx
 enable_dri
 enable_dri2
+enable_dri3
+enable_present
 enable_xinerama
 enable_xf86vidmode
 enable_xace
@@ -1307,6 +1327,8 @@
 enable_libdrm
 enable_clientids
 enable_pciaccess
+enable_linux_acpi
+enable_linux_apm
 enable_xorg
 enable_dmx
 enable_xvfb
@@ -1321,12 +1343,15 @@
 enable_kdrive_kbd
 enable_kdrive_mouse
 enable_kdrive_evdev
+enable_libunwind
 enable_install_setuid
 enable_unix_transport
 enable_tcp_transport
 enable_ipv6
 enable_local_transport
 enable_secure_rpc
+with_shared_memory_dir
+enable_xtrans_send_fds
 with_xkb_bin_directory
 with_sha1
 '
@@ -1343,6 +1368,7 @@
 PKG_CONFIG_PATH
 PKG_CONFIG_LIBDIR
 DOXYGEN
+DOT
 XMLTO
 FOP
 XSLTPROC
@@ -1359,14 +1385,18 @@
 DBUS_LIBS
 HAL_CFLAGS
 HAL_LIBS
+DRI2PROTO_CFLAGS
+DRI2PROTO_LIBS
+DRI3PROTO_CFLAGS
+DRI3PROTO_LIBS
+XSHMFENCE_CFLAGS
+XSHMFENCE_LIBS
+LIBDRM_CFLAGS
+LIBDRM_LIBS
 XLIB_CFLAGS
 XLIB_LIBS
 GL_CFLAGS
 GL_LIBS
-DRI2PROTO_CFLAGS
-DRI2PROTO_LIBS
-LIBDRM_CFLAGS
-LIBDRM_LIBS
 SELINUX_CFLAGS
 SELINUX_LIBS
 XDMCP_CFLAGS
@@ -1379,6 +1409,8 @@
 XSERVERCFLAGS_LIBS
 XSERVERLIBS_CFLAGS
 XSERVERLIBS_LIBS
+LIBUNWIND_CFLAGS
+LIBUNWIND_LIBS
 XNESTMODULES_CFLAGS
 XNESTMODULES_LIBS
 PCIACCESS_CFLAGS
@@ -1959,7 +1991,7 @@
   # 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.14.2.901 to adapt to many kinds of systems.
+\`configure' configures xorg-server 1.15.1 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -2029,7 +2061,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of xorg-server 1.14.2.901:";;
+     short | recursive ) echo "Configuration of xorg-server 1.15.1:";;
    esac
   cat <<\_ACEOF
 
@@ -2083,6 +2115,8 @@
   --disable-glx           Build GLX extension (default: enabled)
   --enable-dri            Build DRI extension (default: auto)
   --enable-dri2           Build DRI2 extension (default: auto)
+  --enable-dri3           Build DRI3 extension (default: auto)
+  --disable-present       Build Present extension (default: enabled)
   --disable-xinerama      Build Xinerama extension (default: enabled)
   --disable-xf86vidmode   Build XF86VidMode extension (default: auto)
   --disable-xace          Build X-ACE extension (default: enabled)
@@ -2108,6 +2142,10 @@
   --disable-clientids     Build Xorg with client ID tracking (default:
                           enabled)
   --enable-pciaccess      Build Xorg with pciaccess library (default: enabled)
+  --disable-linux-acpi    Disable building ACPI support on Linux (if
+                          available).
+  --disable-linux-apm     Disable building APM support on Linux (if
+                          available).
   --enable-xorg           Build Xorg server (default: auto)
   --enable-dmx            Build DMX server (default: auto)
   --enable-xvfb           Build Xvfb server (default: yes)
@@ -2126,6 +2164,7 @@
   --enable-kdrive-kbd     Build kbd driver for kdrive (default: auto)
   --enable-kdrive-mouse   Build mouse driver for kdrive (default: auto)
   --enable-kdrive-evdev   Build evdev driver for kdrive (default: auto)
+  --enable-libunwind      Use libunwind for backtracing (default: auto)
   --enable-install-setuid Install Xorg server as owned by root with setuid bit
                           (default: auto)
   --enable-unix-transport Enable UNIX domain socket transport
@@ -2134,6 +2173,8 @@
   --enable-local-transport
                           Enable os-specific local transport
   --enable-secure-rpc     Enable Secure RPC
+  --disable-xtrans-send-fds
+                          Use Xtrans support for fd passing (default: auto)
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
@@ -2210,6 +2251,10 @@
   --with-khronos-spec-dir=PATH
                           Path to Khronos OpenGL registry database files
                           (default: auto)
+  --with-shared-memory-dir=PATH
+                          Path to directory in a world-writable temporary
+                          directory for anonymous shared memory (default:
+                          auto)
   --with-xkb-bin-directory=DIR
                           Directory containing xkbcomp program
   --with-sha1=libc|libmd|libnettle|libgcrypt|libcrypto|libsha1|CommonCrypto|CryptoAPI
@@ -2230,6 +2275,7 @@
   PKG_CONFIG_LIBDIR
               path overriding pkg-config's built-in search path
   DOXYGEN     Path to doxygen command
+  DOT         Path to the dot graphics utility
   XMLTO       Path to xmlto command
   FOP         Path to fop command
   XSLTPROC    Path to xsltproc command
@@ -2252,17 +2298,25 @@
   DBUS_LIBS   linker flags for DBUS, overriding pkg-config
   HAL_CFLAGS  C compiler flags for HAL, overriding pkg-config
   HAL_LIBS    linker flags for HAL, overriding pkg-config
-  XLIB_CFLAGS C compiler flags for XLIB, overriding pkg-config
-  XLIB_LIBS   linker flags for XLIB, overriding pkg-config
-  GL_CFLAGS   C compiler flags for GL, overriding pkg-config
-  GL_LIBS     linker flags for GL, overriding pkg-config
   DRI2PROTO_CFLAGS
               C compiler flags for DRI2PROTO, overriding pkg-config
   DRI2PROTO_LIBS
               linker flags for DRI2PROTO, overriding pkg-config
+  DRI3PROTO_CFLAGS
+              C compiler flags for DRI3PROTO, overriding pkg-config
+  DRI3PROTO_LIBS
+              linker flags for DRI3PROTO, overriding pkg-config
+  XSHMFENCE_CFLAGS
+              C compiler flags for XSHMFENCE, overriding pkg-config
+  XSHMFENCE_LIBS
+              linker flags for XSHMFENCE, overriding pkg-config
   LIBDRM_CFLAGS
               C compiler flags for LIBDRM, overriding pkg-config
   LIBDRM_LIBS linker flags for LIBDRM, overriding pkg-config
+  XLIB_CFLAGS C compiler flags for XLIB, overriding pkg-config
+  XLIB_LIBS   linker flags for XLIB, overriding pkg-config
+  GL_CFLAGS   C compiler flags for GL, overriding pkg-config
+  GL_LIBS     linker flags for GL, overriding pkg-config
   SELINUX_CFLAGS
               C compiler flags for SELINUX, overriding pkg-config
   SELINUX_LIBS
@@ -2286,6 +2340,10 @@
               C compiler flags for XSERVERLIBS, overriding pkg-config
   XSERVERLIBS_LIBS
               linker flags for XSERVERLIBS, overriding pkg-config
+  LIBUNWIND_CFLAGS
+              C compiler flags for LIBUNWIND, overriding pkg-config
+  LIBUNWIND_LIBS
+              linker flags for LIBUNWIND, overriding pkg-config
   XNESTMODULES_CFLAGS
               C compiler flags for XNESTMODULES, overriding pkg-config
   XNESTMODULES_LIBS
@@ -2426,7 +2484,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-xorg-server configure 1.14.2.901
+xorg-server configure 1.15.1
 generated by GNU Autoconf 2.68
 
 Copyright (C) 2010 Free Software Foundation, Inc.
@@ -2478,52 +2536,6 @@
 
 } # ac_fn_c_try_compile
 
-# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
-# ---------------------------------------------
-# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
-# accordingly.
-ac_fn_c_check_decl ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  as_decl_name=`echo $2|sed 's/ *(.*//'`
-  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
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-int
-main ()
-{
-#ifndef $as_decl_name
-#ifdef __cplusplus
-  (void) $as_decl_use;
-#else
-  (void) $as_decl_name;
-#endif
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  eval "$3=yes"
-else
-  eval "$3=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$3
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-
-} # ac_fn_c_check_decl
-
 # ac_fn_c_try_cpp LINENO
 # ----------------------
 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
@@ -2561,6 +2573,97 @@
 
 } # 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://bugs.freedesktop.org/enter_bug.cgi?product=xorg ##
+## ---------------------------------------------------------------------- ##"
+     ) | 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
@@ -2634,6 +2737,52 @@
 
 } # ac_fn_c_check_header_compile
 
+# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
+# ---------------------------------------------
+# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
+# accordingly.
+ac_fn_c_check_decl ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  as_decl_name=`echo $2|sed 's/ *(.*//'`
+  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
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+#ifndef $as_decl_name
+#ifdef __cplusplus
+  (void) $as_decl_use;
+#else
+  (void) $as_decl_name;
+#endif
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$3=yes"
+else
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_decl
+
 # ac_fn_c_try_link LINENO
 # -----------------------
 # Try to link conftest.$ac_ext, and return whether this succeeded.
@@ -2747,97 +2896,6 @@
 
 } # ac_fn_c_check_func
 
-# 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://bugs.freedesktop.org/enter_bug.cgi?product=xorg ##
-## ---------------------------------------------------------------------- ##"
-     ) | 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_compute_int LINENO EXPR VAR INCLUDES
 # --------------------------------------------
 # Tries to find the compile-time value of EXPR in a program that includes
@@ -3130,7 +3188,7 @@
 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.14.2.901, which was
+It was created by xorg-server $as_me 1.15.1, which was
 generated by GNU Autoconf 2.68.  Invocation command line was
 
   $ $0 $@
@@ -3478,8 +3536,8 @@
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
-RELEASE_DATE="2013-07-25"
-RELEASE_NAME="Act semi-normal-rc1"
+RELEASE_DATE="2014-04-13"
+RELEASE_NAME="Heart Candy"
 
 am__api_version='1.11'
 
@@ -3948,7 +4006,7 @@
 
 # Define the identity of the package.
  PACKAGE='xorg-server'
- VERSION='1.14.2.901'
+ VERSION='1.15.1'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -3988,19 +4046,6 @@
 
 
 
-
-# Require xorg-macros minimum of 1.14 for XORG_COMPILER_BRAND in XORG_DEFAULT_OPTIONS
-
-
-
-
-
-
-
-
-
-
-
 DEPDIR="${am__leading_dot}deps"
 
 ac_config_commands="$ac_config_commands depfiles"
@@ -4982,6 +5027,478 @@
 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
+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
+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 :
+
+else
+  # Broken: fails on valid input.
+continue
+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 :
+  break
+fi
+
+    done
+    ac_cv_prog_CPP=$CPP
+
+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 :
+
+else
+  # Broken: fails on valid input.
+continue
+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
+
+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
+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
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    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"
+      { test -f "$ac_path_GREP" && $as_test_x "$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
+  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
+{ $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"
+
+
+{ $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
+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
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    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"
+      { test -f "$ac_path_EGREP" && $as_test_x "$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
+  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"
+
+
+{ $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
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_header_stdc=yes
+else
+  ac_cv_header_stdc=no
+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 :
+
+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 :
+  :
+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
+
+#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
+
+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
+
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+
+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
+
+done
+
+
+
+  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
+
+
+  if test "$MINIX" = yes; then
+
+$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
+
+
+$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
+
+
+$as_echo "#define _MINIX 1" >>confdefs.h
+
+  fi
+
+
+  { $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
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#	  define __EXTENSIONS__ 1
+	  $ac_includes_default
+int
+main ()
+{
+
+  ;
+  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
+fi
+rm -f core conftest.err conftest.$ac_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
+
+
+
+
+
+
+
+
+
+
+
    { $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 :
@@ -5160,402 +5677,6 @@
 
 
 
-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
-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
-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 :
-
-else
-  # Broken: fails on valid input.
-continue
-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 :
-  break
-fi
-
-    done
-    ac_cv_prog_CPP=$CPP
-
-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 :
-
-else
-  # Broken: fails on valid input.
-continue
-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
-
-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
-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
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    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"
-      { test -f "$ac_path_GREP" && $as_test_x "$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
-  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
-{ $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"
-
-
-{ $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
-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
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    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"
-      { test -f "$ac_path_EGREP" && $as_test_x "$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
-  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"
-
-
-{ $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
-/* end confdefs.h.  */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_header_stdc=yes
-else
-  ac_cv_header_stdc=no
-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 :
-
-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 :
-  :
-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
-
-#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
-
-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
-
-$as_echo "#define STDC_HEADERS 1" >>confdefs.h
-
-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
-
-done
-
 
 
 
@@ -5853,6 +5974,9 @@
 fi
 
 
+
+
+
 # -v is too short to test reliably with XORG_TESTSET_CFLAG
 if test "x$SUNCC" = "xyes"; then
     BASE_CFLAGS="-v"
@@ -5866,57 +5990,75 @@
 
 
 
+
+
+
+
+
+
+
+
 xorg_testset_save_CFLAGS="$CFLAGS"
 
-if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unknown_warning_option=yes
+  xorg_cv_cc_flag_unknown_warning_option=yes
 else
-  xorg_testset_unknown_warning_option=no
+  xorg_cv_cc_flag_unknown_warning_option=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unknown_warning_option" >&5
-$as_echo "$xorg_testset_unknown_warning_option" >&6; }
+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"
 fi
 
-if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
-	if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unused_command_line_argument=yes
+  xorg_cv_cc_flag_unused_command_line_argument=yes
 else
-  xorg_testset_unused_command_line_argument=no
+  xorg_cv_cc_flag_unused_command_line_argument=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unused_command_line_argument" >&5
-$as_echo "$xorg_testset_unused_command_line_argument" >&6; }
+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_unknown_warning_option" = "xyes" ; then
+		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 		fi
 
-		if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
 		fi
 
@@ -5924,7 +6066,11 @@
 
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wall" >&5
 $as_echo_n "checking if $CC supports -Wall... " >&6; }
-		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+		cacheid=xorg_cv_cc_flag__Wall
+		if eval \${$cacheid+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
@@ -5936,16 +6082,20 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  supported=yes
+  eval $cacheid=yes
 else
-  supported=no
+  eval $cacheid=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+		CFLAGS="$xorg_testset_save_CFLAGS"
+
+		eval supported=\$$cacheid
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
 $as_echo "$supported" >&6; }
-		CFLAGS="$xorg_testset_save_CFLAGS"
-
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Wall"
 			found="yes"
@@ -5958,57 +6108,75 @@
 
 
 
+
+
+
+
+
+
+
+
 xorg_testset_save_CFLAGS="$CFLAGS"
 
-if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unknown_warning_option=yes
+  xorg_cv_cc_flag_unknown_warning_option=yes
 else
-  xorg_testset_unknown_warning_option=no
+  xorg_cv_cc_flag_unknown_warning_option=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unknown_warning_option" >&5
-$as_echo "$xorg_testset_unknown_warning_option" >&6; }
+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"
 fi
 
-if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
-	if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unused_command_line_argument=yes
+  xorg_cv_cc_flag_unused_command_line_argument=yes
 else
-  xorg_testset_unused_command_line_argument=no
+  xorg_cv_cc_flag_unused_command_line_argument=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unused_command_line_argument" >&5
-$as_echo "$xorg_testset_unused_command_line_argument" >&6; }
+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_unknown_warning_option" = "xyes" ; then
+		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 		fi
 
-		if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
 		fi
 
@@ -6016,7 +6184,11 @@
 
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wpointer-arith" >&5
 $as_echo_n "checking if $CC supports -Wpointer-arith... " >&6; }
-		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+		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
 /* end confdefs.h.  */
 int i;
 int
@@ -6028,16 +6200,20 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  supported=yes
+  eval $cacheid=yes
 else
-  supported=no
+  eval $cacheid=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+		CFLAGS="$xorg_testset_save_CFLAGS"
+
+		eval supported=\$$cacheid
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
 $as_echo "$supported" >&6; }
-		CFLAGS="$xorg_testset_save_CFLAGS"
-
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Wpointer-arith"
 			found="yes"
@@ -6050,57 +6226,362 @@
 
 
 
-xorg_testset_save_CFLAGS="$CFLAGS"
-
-if test "x$xorg_testset_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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-int i;
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  xorg_testset_unknown_warning_option=yes
-else
-  xorg_testset_unknown_warning_option=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unknown_warning_option" >&5
-$as_echo "$xorg_testset_unknown_warning_option" >&6; }
-	CFLAGS="$xorg_testset_save_CFLAGS"
-fi
-
-if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
-	if test "x$xorg_testset_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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-int i;
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  xorg_testset_unused_command_line_argument=yes
-else
-  xorg_testset_unused_command_line_argument=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unused_command_line_argument" >&5
-$as_echo "$xorg_testset_unused_command_line_argument" >&6; }
-	CFLAGS="$xorg_testset_save_CFLAGS"
-fi
-
-found="no"
-
-	if test $found = "no" ; then
-		if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
-			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
-		fi
-
-		if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+
+
+
+
+
+
+
+
+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
+  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"
+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"
+	{ $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"
+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"
+
+		{ $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
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+int i;
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval $cacheid=yes
+else
+  eval $cacheid=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+		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 -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"
+	{ $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"
+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"
+	{ $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"
+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"
+
+		{ $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=`$as_echo "xorg_cv_cc_flag_-Wformat=2" | $as_tr_sh`
+		if eval \${$cacheid+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+int i;
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval $cacheid=yes
+else
+  eval $cacheid=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+		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 -Wformat=2"
+			found="yes"
+		fi
+	fi
+
+	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"
+
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wformat" >&5
+$as_echo_n "checking if $CC supports -Wformat... " >&6; }
+		cacheid=xorg_cv_cc_flag__Wformat
+		if eval \${$cacheid+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+int i;
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval $cacheid=yes
+else
+  eval $cacheid=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+		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 -Wformat"
+			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"
+	{ $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"
+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"
+	{ $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"
+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
 
@@ -6108,7 +6589,11 @@
 
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wstrict-prototypes" >&5
 $as_echo_n "checking if $CC supports -Wstrict-prototypes... " >&6; }
-		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+		cacheid=xorg_cv_cc_flag__Wstrict_prototypes
+		if eval \${$cacheid+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
@@ -6120,16 +6605,20 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  supported=yes
+  eval $cacheid=yes
 else
-  supported=no
+  eval $cacheid=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+		CFLAGS="$xorg_testset_save_CFLAGS"
+
+		eval supported=\$$cacheid
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
 $as_echo "$supported" >&6; }
-		CFLAGS="$xorg_testset_save_CFLAGS"
-
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Wstrict-prototypes"
 			found="yes"
@@ -6142,57 +6631,75 @@
 
 
 
+
+
+
+
+
+
+
+
 xorg_testset_save_CFLAGS="$CFLAGS"
 
-if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unknown_warning_option=yes
+  xorg_cv_cc_flag_unknown_warning_option=yes
 else
-  xorg_testset_unknown_warning_option=no
+  xorg_cv_cc_flag_unknown_warning_option=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unknown_warning_option" >&5
-$as_echo "$xorg_testset_unknown_warning_option" >&6; }
+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"
 fi
 
-if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
-	if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unused_command_line_argument=yes
+  xorg_cv_cc_flag_unused_command_line_argument=yes
 else
-  xorg_testset_unused_command_line_argument=no
+  xorg_cv_cc_flag_unused_command_line_argument=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unused_command_line_argument" >&5
-$as_echo "$xorg_testset_unused_command_line_argument" >&6; }
+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_unknown_warning_option" = "xyes" ; then
+		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 		fi
 
-		if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
 		fi
 
@@ -6200,7 +6707,11 @@
 
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-prototypes" >&5
 $as_echo_n "checking if $CC supports -Wmissing-prototypes... " >&6; }
-		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+		cacheid=xorg_cv_cc_flag__Wmissing_prototypes
+		if eval \${$cacheid+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
@@ -6212,16 +6723,20 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  supported=yes
+  eval $cacheid=yes
 else
-  supported=no
+  eval $cacheid=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+		CFLAGS="$xorg_testset_save_CFLAGS"
+
+		eval supported=\$$cacheid
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
 $as_echo "$supported" >&6; }
-		CFLAGS="$xorg_testset_save_CFLAGS"
-
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Wmissing-prototypes"
 			found="yes"
@@ -6234,149 +6749,75 @@
 
 
 
-xorg_testset_save_CFLAGS="$CFLAGS"
-
-if test "x$xorg_testset_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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-int i;
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  xorg_testset_unknown_warning_option=yes
-else
-  xorg_testset_unknown_warning_option=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unknown_warning_option" >&5
-$as_echo "$xorg_testset_unknown_warning_option" >&6; }
-	CFLAGS="$xorg_testset_save_CFLAGS"
-fi
-
-if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
-	if test "x$xorg_testset_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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-int i;
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  xorg_testset_unused_command_line_argument=yes
-else
-  xorg_testset_unused_command_line_argument=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unused_command_line_argument" >&5
-$as_echo "$xorg_testset_unused_command_line_argument" >&6; }
-	CFLAGS="$xorg_testset_save_CFLAGS"
-fi
-
-found="no"
-
-	if test $found = "no" ; then
-		if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
-			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
-		fi
-
-		if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
-			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
-		fi
-
-		CFLAGS="$CFLAGS -Wmissing-declarations"
-
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-declarations" >&5
-$as_echo_n "checking if $CC supports -Wmissing-declarations... " >&6; }
-		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-int i;
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  supported=yes
-else
-  supported=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
-$as_echo "$supported" >&6; }
-		CFLAGS="$xorg_testset_save_CFLAGS"
-
-		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_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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-int i;
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  xorg_testset_unknown_warning_option=yes
-else
-  xorg_testset_unknown_warning_option=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unknown_warning_option" >&5
-$as_echo "$xorg_testset_unknown_warning_option" >&6; }
-	CFLAGS="$xorg_testset_save_CFLAGS"
-fi
-
-if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
-	if test "x$xorg_testset_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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-int i;
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  xorg_testset_unused_command_line_argument=yes
-else
-  xorg_testset_unused_command_line_argument=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unused_command_line_argument" >&5
-$as_echo "$xorg_testset_unused_command_line_argument" >&6; }
-	CFLAGS="$xorg_testset_save_CFLAGS"
-fi
-
-found="no"
-
-	if test $found = "no" ; then
-		if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
-			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
-		fi
-
-		if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+
+
+
+
+
+
+
+
+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
+  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"
+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"
+	{ $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"
+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
 
@@ -6384,7 +6825,11 @@
 
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wnested-externs" >&5
 $as_echo_n "checking if $CC supports -Wnested-externs... " >&6; }
-		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+		cacheid=xorg_cv_cc_flag__Wnested_externs
+		if eval \${$cacheid+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
@@ -6396,16 +6841,20 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  supported=yes
+  eval $cacheid=yes
 else
-  supported=no
+  eval $cacheid=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+		CFLAGS="$xorg_testset_save_CFLAGS"
+
+		eval supported=\$$cacheid
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
 $as_echo "$supported" >&6; }
-		CFLAGS="$xorg_testset_save_CFLAGS"
-
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Wnested-externs"
 			found="yes"
@@ -6418,57 +6867,75 @@
 
 
 
+
+
+
+
+
+
+
+
 xorg_testset_save_CFLAGS="$CFLAGS"
 
-if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unknown_warning_option=yes
+  xorg_cv_cc_flag_unknown_warning_option=yes
 else
-  xorg_testset_unknown_warning_option=no
+  xorg_cv_cc_flag_unknown_warning_option=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unknown_warning_option" >&5
-$as_echo "$xorg_testset_unknown_warning_option" >&6; }
+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"
 fi
 
-if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
-	if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unused_command_line_argument=yes
+  xorg_cv_cc_flag_unused_command_line_argument=yes
 else
-  xorg_testset_unused_command_line_argument=no
+  xorg_cv_cc_flag_unused_command_line_argument=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unused_command_line_argument" >&5
-$as_echo "$xorg_testset_unused_command_line_argument" >&6; }
+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_unknown_warning_option" = "xyes" ; then
+		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 		fi
 
-		if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
 		fi
 
@@ -6476,7 +6943,11 @@
 
 		{ $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; }
-		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+		cacheid=xorg_cv_cc_flag__Wbad_function_cast
+		if eval \${$cacheid+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
@@ -6488,16 +6959,20 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  supported=yes
+  eval $cacheid=yes
 else
-  supported=no
+  eval $cacheid=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+		CFLAGS="$xorg_testset_save_CFLAGS"
+
+		eval supported=\$$cacheid
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
 $as_echo "$supported" >&6; }
-		CFLAGS="$xorg_testset_save_CFLAGS"
-
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Wbad-function-cast"
 			found="yes"
@@ -6510,190 +6985,75 @@
 
 
 
-xorg_testset_save_CFLAGS="$CFLAGS"
-
-if test "x$xorg_testset_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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-int i;
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  xorg_testset_unknown_warning_option=yes
-else
-  xorg_testset_unknown_warning_option=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unknown_warning_option" >&5
-$as_echo "$xorg_testset_unknown_warning_option" >&6; }
-	CFLAGS="$xorg_testset_save_CFLAGS"
-fi
-
-if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
-	if test "x$xorg_testset_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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-int i;
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  xorg_testset_unused_command_line_argument=yes
-else
-  xorg_testset_unused_command_line_argument=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unused_command_line_argument" >&5
-$as_echo "$xorg_testset_unused_command_line_argument" >&6; }
-	CFLAGS="$xorg_testset_save_CFLAGS"
-fi
-
-found="no"
-
-	if test $found = "no" ; then
-		if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
-			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
-		fi
-
-		if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
-			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
-		fi
-
-		CFLAGS="$CFLAGS -Wformat=2"
-
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wformat=2" >&5
-$as_echo_n "checking if $CC supports -Wformat=2... " >&6; }
-		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-int i;
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  supported=yes
-else
-  supported=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
-$as_echo "$supported" >&6; }
-		CFLAGS="$xorg_testset_save_CFLAGS"
-
-		if test "$supported" = "yes" ; then
-			BASE_CFLAGS="$BASE_CFLAGS -Wformat=2"
-			found="yes"
-		fi
-	fi
-
-	if test $found = "no" ; then
-		if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
-			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
-		fi
-
-		if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
-			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
-		fi
-
-		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; }
-		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-int i;
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  supported=yes
-else
-  supported=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
-$as_echo "$supported" >&6; }
-		CFLAGS="$xorg_testset_save_CFLAGS"
-
-		if test "$supported" = "yes" ; then
-			BASE_CFLAGS="$BASE_CFLAGS -Wformat"
-			found="yes"
-		fi
-	fi
-
-
-
-
-
-
-
-xorg_testset_save_CFLAGS="$CFLAGS"
-
-if test "x$xorg_testset_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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-int i;
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  xorg_testset_unknown_warning_option=yes
-else
-  xorg_testset_unknown_warning_option=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unknown_warning_option" >&5
-$as_echo "$xorg_testset_unknown_warning_option" >&6; }
-	CFLAGS="$xorg_testset_save_CFLAGS"
-fi
-
-if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
-	if test "x$xorg_testset_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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-int i;
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  xorg_testset_unused_command_line_argument=yes
-else
-  xorg_testset_unused_command_line_argument=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unused_command_line_argument" >&5
-$as_echo "$xorg_testset_unused_command_line_argument" >&6; }
-	CFLAGS="$xorg_testset_save_CFLAGS"
-fi
-
-found="no"
-
-	if test $found = "no" ; then
-		if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
-			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
-		fi
-
-		if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+
+
+
+
+
+
+
+
+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
+  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"
+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"
+	{ $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"
+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
 
@@ -6701,7 +7061,11 @@
 
 		{ $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; }
-		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+		cacheid=xorg_cv_cc_flag__Wold_style_definition
+		if eval \${$cacheid+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
@@ -6713,22 +7077,83 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  supported=yes
+  eval $cacheid=yes
 else
-  supported=no
+  eval $cacheid=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+		CFLAGS="$xorg_testset_save_CFLAGS"
+
+		eval supported=\$$cacheid
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
 $as_echo "$supported" >&6; }
-		CFLAGS="$xorg_testset_save_CFLAGS"
-
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Wold-style-definition"
 			found="yes"
 		fi
 	fi
 
+	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 -fd"
+
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -fd" >&5
+$as_echo_n "checking if $CC supports -fd... " >&6; }
+		cacheid=xorg_cv_cc_flag__fd
+		if eval \${$cacheid+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+int i;
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval $cacheid=yes
+else
+  eval $cacheid=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+		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 -fd"
+			found="yes"
+		fi
+	fi
+
+
+
+
+
+
+
+
+
 
 
 
@@ -6737,55 +7162,65 @@
 
 xorg_testset_save_CFLAGS="$CFLAGS"
 
-if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unknown_warning_option=yes
+  xorg_cv_cc_flag_unknown_warning_option=yes
 else
-  xorg_testset_unknown_warning_option=no
+  xorg_cv_cc_flag_unknown_warning_option=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unknown_warning_option" >&5
-$as_echo "$xorg_testset_unknown_warning_option" >&6; }
+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"
 fi
 
-if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
-	if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unused_command_line_argument=yes
+  xorg_cv_cc_flag_unused_command_line_argument=yes
 else
-  xorg_testset_unused_command_line_argument=no
+  xorg_cv_cc_flag_unused_command_line_argument=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unused_command_line_argument" >&5
-$as_echo "$xorg_testset_unused_command_line_argument" >&6; }
+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_unknown_warning_option" = "xyes" ; then
+		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 		fi
 
-		if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
 		fi
 
@@ -6793,7 +7228,11 @@
 
 		{ $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; }
-		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+		cacheid=xorg_cv_cc_flag__Wdeclaration_after_statement
+		if eval \${$cacheid+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
@@ -6805,16 +7244,20 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  supported=yes
+  eval $cacheid=yes
 else
-  supported=no
+  eval $cacheid=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+		CFLAGS="$xorg_testset_save_CFLAGS"
+
+		eval supported=\$$cacheid
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
 $as_echo "$supported" >&6; }
-		CFLAGS="$xorg_testset_save_CFLAGS"
-
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Wdeclaration-after-statement"
 			found="yes"
@@ -6823,63 +7266,83 @@
 
 
 
+
+
 # This chunk adds additional warnings that could catch undesired effects.
 
 
 
 
 
+
+
+
+
+
+
+
+
 xorg_testset_save_CFLAGS="$CFLAGS"
 
-if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unknown_warning_option=yes
+  xorg_cv_cc_flag_unknown_warning_option=yes
 else
-  xorg_testset_unknown_warning_option=no
+  xorg_cv_cc_flag_unknown_warning_option=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unknown_warning_option" >&5
-$as_echo "$xorg_testset_unknown_warning_option" >&6; }
+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"
 fi
 
-if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
-	if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unused_command_line_argument=yes
+  xorg_cv_cc_flag_unused_command_line_argument=yes
 else
-  xorg_testset_unused_command_line_argument=no
+  xorg_cv_cc_flag_unused_command_line_argument=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unused_command_line_argument" >&5
-$as_echo "$xorg_testset_unused_command_line_argument" >&6; }
+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_unknown_warning_option" = "xyes" ; then
+		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 		fi
 
-		if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
 		fi
 
@@ -6887,7 +7350,11 @@
 
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wunused" >&5
 $as_echo_n "checking if $CC supports -Wunused... " >&6; }
-		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+		cacheid=xorg_cv_cc_flag__Wunused
+		if eval \${$cacheid+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
@@ -6899,16 +7366,20 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  supported=yes
+  eval $cacheid=yes
 else
-  supported=no
+  eval $cacheid=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+		CFLAGS="$xorg_testset_save_CFLAGS"
+
+		eval supported=\$$cacheid
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
 $as_echo "$supported" >&6; }
-		CFLAGS="$xorg_testset_save_CFLAGS"
-
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Wunused"
 			found="yes"
@@ -6921,57 +7392,75 @@
 
 
 
+
+
+
+
+
+
+
+
 xorg_testset_save_CFLAGS="$CFLAGS"
 
-if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unknown_warning_option=yes
+  xorg_cv_cc_flag_unknown_warning_option=yes
 else
-  xorg_testset_unknown_warning_option=no
+  xorg_cv_cc_flag_unknown_warning_option=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unknown_warning_option" >&5
-$as_echo "$xorg_testset_unknown_warning_option" >&6; }
+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"
 fi
 
-if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
-	if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unused_command_line_argument=yes
+  xorg_cv_cc_flag_unused_command_line_argument=yes
 else
-  xorg_testset_unused_command_line_argument=no
+  xorg_cv_cc_flag_unused_command_line_argument=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unused_command_line_argument" >&5
-$as_echo "$xorg_testset_unused_command_line_argument" >&6; }
+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_unknown_warning_option" = "xyes" ; then
+		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 		fi
 
-		if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
 		fi
 
@@ -6979,7 +7468,11 @@
 
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wuninitialized" >&5
 $as_echo_n "checking if $CC supports -Wuninitialized... " >&6; }
-		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+		cacheid=xorg_cv_cc_flag__Wuninitialized
+		if eval \${$cacheid+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
@@ -6991,16 +7484,20 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  supported=yes
+  eval $cacheid=yes
 else
-  supported=no
+  eval $cacheid=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+		CFLAGS="$xorg_testset_save_CFLAGS"
+
+		eval supported=\$$cacheid
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
 $as_echo "$supported" >&6; }
-		CFLAGS="$xorg_testset_save_CFLAGS"
-
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Wuninitialized"
 			found="yes"
@@ -7013,57 +7510,75 @@
 
 
 
+
+
+
+
+
+
+
+
 xorg_testset_save_CFLAGS="$CFLAGS"
 
-if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unknown_warning_option=yes
+  xorg_cv_cc_flag_unknown_warning_option=yes
 else
-  xorg_testset_unknown_warning_option=no
+  xorg_cv_cc_flag_unknown_warning_option=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unknown_warning_option" >&5
-$as_echo "$xorg_testset_unknown_warning_option" >&6; }
+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"
 fi
 
-if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
-	if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unused_command_line_argument=yes
+  xorg_cv_cc_flag_unused_command_line_argument=yes
 else
-  xorg_testset_unused_command_line_argument=no
+  xorg_cv_cc_flag_unused_command_line_argument=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unused_command_line_argument" >&5
-$as_echo "$xorg_testset_unused_command_line_argument" >&6; }
+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_unknown_warning_option" = "xyes" ; then
+		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 		fi
 
-		if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
 		fi
 
@@ -7071,7 +7586,11 @@
 
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wshadow" >&5
 $as_echo_n "checking if $CC supports -Wshadow... " >&6; }
-		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+		cacheid=xorg_cv_cc_flag__Wshadow
+		if eval \${$cacheid+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
@@ -7083,16 +7602,20 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  supported=yes
+  eval $cacheid=yes
 else
-  supported=no
+  eval $cacheid=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+		CFLAGS="$xorg_testset_save_CFLAGS"
+
+		eval supported=\$$cacheid
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
 $as_echo "$supported" >&6; }
-		CFLAGS="$xorg_testset_save_CFLAGS"
-
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Wshadow"
 			found="yes"
@@ -7105,149 +7628,75 @@
 
 
 
-xorg_testset_save_CFLAGS="$CFLAGS"
-
-if test "x$xorg_testset_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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-int i;
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  xorg_testset_unknown_warning_option=yes
-else
-  xorg_testset_unknown_warning_option=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unknown_warning_option" >&5
-$as_echo "$xorg_testset_unknown_warning_option" >&6; }
-	CFLAGS="$xorg_testset_save_CFLAGS"
-fi
-
-if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
-	if test "x$xorg_testset_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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-int i;
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  xorg_testset_unused_command_line_argument=yes
-else
-  xorg_testset_unused_command_line_argument=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unused_command_line_argument" >&5
-$as_echo "$xorg_testset_unused_command_line_argument" >&6; }
-	CFLAGS="$xorg_testset_save_CFLAGS"
-fi
-
-found="no"
-
-	if test $found = "no" ; then
-		if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
-			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
-		fi
-
-		if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
-			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
-		fi
-
-		CFLAGS="$CFLAGS -Wcast-qual"
-
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wcast-qual" >&5
-$as_echo_n "checking if $CC supports -Wcast-qual... " >&6; }
-		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-int i;
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  supported=yes
-else
-  supported=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
-$as_echo "$supported" >&6; }
-		CFLAGS="$xorg_testset_save_CFLAGS"
-
-		if test "$supported" = "yes" ; then
-			BASE_CFLAGS="$BASE_CFLAGS -Wcast-qual"
-			found="yes"
-		fi
-	fi
-
-
-
-
-
-
-
-xorg_testset_save_CFLAGS="$CFLAGS"
-
-if test "x$xorg_testset_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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-int i;
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  xorg_testset_unknown_warning_option=yes
-else
-  xorg_testset_unknown_warning_option=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unknown_warning_option" >&5
-$as_echo "$xorg_testset_unknown_warning_option" >&6; }
-	CFLAGS="$xorg_testset_save_CFLAGS"
-fi
-
-if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
-	if test "x$xorg_testset_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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-int i;
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  xorg_testset_unused_command_line_argument=yes
-else
-  xorg_testset_unused_command_line_argument=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unused_command_line_argument" >&5
-$as_echo "$xorg_testset_unused_command_line_argument" >&6; }
-	CFLAGS="$xorg_testset_save_CFLAGS"
-fi
-
-found="no"
-
-	if test $found = "no" ; then
-		if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
-			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
-		fi
-
-		if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+
+
+
+
+
+
+
+
+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
+  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"
+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"
+	{ $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"
+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
 
@@ -7255,7 +7704,11 @@
 
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-noreturn" >&5
 $as_echo_n "checking if $CC supports -Wmissing-noreturn... " >&6; }
-		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+		cacheid=xorg_cv_cc_flag__Wmissing_noreturn
+		if eval \${$cacheid+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
@@ -7267,16 +7720,20 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  supported=yes
+  eval $cacheid=yes
 else
-  supported=no
+  eval $cacheid=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+		CFLAGS="$xorg_testset_save_CFLAGS"
+
+		eval supported=\$$cacheid
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
 $as_echo "$supported" >&6; }
-		CFLAGS="$xorg_testset_save_CFLAGS"
-
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Wmissing-noreturn"
 			found="yes"
@@ -7289,57 +7746,75 @@
 
 
 
+
+
+
+
+
+
+
+
 xorg_testset_save_CFLAGS="$CFLAGS"
 
-if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unknown_warning_option=yes
+  xorg_cv_cc_flag_unknown_warning_option=yes
 else
-  xorg_testset_unknown_warning_option=no
+  xorg_cv_cc_flag_unknown_warning_option=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unknown_warning_option" >&5
-$as_echo "$xorg_testset_unknown_warning_option" >&6; }
+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"
 fi
 
-if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
-	if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unused_command_line_argument=yes
+  xorg_cv_cc_flag_unused_command_line_argument=yes
 else
-  xorg_testset_unused_command_line_argument=no
+  xorg_cv_cc_flag_unused_command_line_argument=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unused_command_line_argument" >&5
-$as_echo "$xorg_testset_unused_command_line_argument" >&6; }
+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_unknown_warning_option" = "xyes" ; then
+		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 		fi
 
-		if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
 		fi
 
@@ -7347,7 +7822,11 @@
 
 		{ $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; }
-		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+		cacheid=xorg_cv_cc_flag__Wmissing_format_attribute
+		if eval \${$cacheid+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
@@ -7359,16 +7838,20 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  supported=yes
+  eval $cacheid=yes
 else
-  supported=no
+  eval $cacheid=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+		CFLAGS="$xorg_testset_save_CFLAGS"
+
+		eval supported=\$$cacheid
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
 $as_echo "$supported" >&6; }
-		CFLAGS="$xorg_testset_save_CFLAGS"
-
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Wmissing-format-attribute"
 			found="yes"
@@ -7381,57 +7864,75 @@
 
 
 
+
+
+
+
+
+
+
+
 xorg_testset_save_CFLAGS="$CFLAGS"
 
-if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unknown_warning_option=yes
+  xorg_cv_cc_flag_unknown_warning_option=yes
 else
-  xorg_testset_unknown_warning_option=no
+  xorg_cv_cc_flag_unknown_warning_option=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unknown_warning_option" >&5
-$as_echo "$xorg_testset_unknown_warning_option" >&6; }
+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"
 fi
 
-if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
-	if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unused_command_line_argument=yes
+  xorg_cv_cc_flag_unused_command_line_argument=yes
 else
-  xorg_testset_unused_command_line_argument=no
+  xorg_cv_cc_flag_unused_command_line_argument=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unused_command_line_argument" >&5
-$as_echo "$xorg_testset_unused_command_line_argument" >&6; }
+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_unknown_warning_option" = "xyes" ; then
+		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 		fi
 
-		if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
 		fi
 
@@ -7439,7 +7940,11 @@
 
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wredundant-decls" >&5
 $as_echo_n "checking if $CC supports -Wredundant-decls... " >&6; }
-		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+		cacheid=xorg_cv_cc_flag__Wredundant_decls
+		if eval \${$cacheid+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
@@ -7451,16 +7956,20 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  supported=yes
+  eval $cacheid=yes
 else
-  supported=no
+  eval $cacheid=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+		CFLAGS="$xorg_testset_save_CFLAGS"
+
+		eval supported=\$$cacheid
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
 $as_echo "$supported" >&6; }
-		CFLAGS="$xorg_testset_save_CFLAGS"
-
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Wredundant-decls"
 			found="yes"
@@ -7469,12 +7978,130 @@
 
 
 
+
+
+
+
+
+
+
+
+
+
+
+
+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
+  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"
+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"
+	{ $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"
+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 -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; }
+		cacheid=xorg_cv_cc_flag__Wlogical_op
+		if eval \${$cacheid+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+int i;
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval $cacheid=yes
+else
+  eval $cacheid=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+		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 -Wlogical-op"
+			found="yes"
+		fi
+	fi
+
+
+
 # These are currently disabled because they are noisy.  They will be enabled
 # in the future once the codebase is sufficiently modernized to silence
 # them.  For now, I don't want them to drown out the other warnings.
-# XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wlogical-op])
-# XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wparentheses])
-# XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wcast-align])
+# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses])
+# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align])
+# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual])
 
 # Turn some warnings into errors, so we don't accidently get successful builds
 # when there are problems that should be fixed.
@@ -7485,57 +8112,75 @@
 
 
 
+
+
+
+
+
+
+
+
 xorg_testset_save_CFLAGS="$CFLAGS"
 
-if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unknown_warning_option=yes
+  xorg_cv_cc_flag_unknown_warning_option=yes
 else
-  xorg_testset_unknown_warning_option=no
+  xorg_cv_cc_flag_unknown_warning_option=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unknown_warning_option" >&5
-$as_echo "$xorg_testset_unknown_warning_option" >&6; }
+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"
 fi
 
-if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
-	if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unused_command_line_argument=yes
+  xorg_cv_cc_flag_unused_command_line_argument=yes
 else
-  xorg_testset_unused_command_line_argument=no
+  xorg_cv_cc_flag_unused_command_line_argument=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unused_command_line_argument" >&5
-$as_echo "$xorg_testset_unused_command_line_argument" >&6; }
+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_unknown_warning_option" = "xyes" ; then
+		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 		fi
 
-		if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
 		fi
 
@@ -7543,7 +8188,11 @@
 
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=implicit" >&5
 $as_echo_n "checking if $CC supports -Werror=implicit... " >&6; }
-		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+		cacheid=`$as_echo "xorg_cv_cc_flag_-Werror=implicit" | $as_tr_sh`
+		if eval \${$cacheid+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
@@ -7555,16 +8204,20 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  supported=yes
+  eval $cacheid=yes
 else
-  supported=no
+  eval $cacheid=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+		CFLAGS="$xorg_testset_save_CFLAGS"
+
+		eval supported=\$$cacheid
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
 $as_echo "$supported" >&6; }
-		CFLAGS="$xorg_testset_save_CFLAGS"
-
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Werror=implicit"
 			found="yes"
@@ -7572,11 +8225,11 @@
 	fi
 
 	if test $found = "no" ; then
-		if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 		fi
 
-		if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
 		fi
 
@@ -7584,7 +8237,11 @@
 
 		{ $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; }
-		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+		cacheid=`$as_echo "xorg_cv_cc_flag_-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED" | $as_tr_sh`
+		if eval \${$cacheid+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
@@ -7596,16 +8253,20 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  supported=yes
+  eval $cacheid=yes
 else
-  supported=no
+  eval $cacheid=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+		CFLAGS="$xorg_testset_save_CFLAGS"
+
+		eval supported=\$$cacheid
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
 $as_echo "$supported" >&6; }
-		CFLAGS="$xorg_testset_save_CFLAGS"
-
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED"
 			found="yes"
@@ -7618,57 +8279,75 @@
 
 
 
+
+
+
+
+
+
+
+
 xorg_testset_save_CFLAGS="$CFLAGS"
 
-if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unknown_warning_option=yes
+  xorg_cv_cc_flag_unknown_warning_option=yes
 else
-  xorg_testset_unknown_warning_option=no
+  xorg_cv_cc_flag_unknown_warning_option=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unknown_warning_option" >&5
-$as_echo "$xorg_testset_unknown_warning_option" >&6; }
+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"
 fi
 
-if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
-	if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unused_command_line_argument=yes
+  xorg_cv_cc_flag_unused_command_line_argument=yes
 else
-  xorg_testset_unused_command_line_argument=no
+  xorg_cv_cc_flag_unused_command_line_argument=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unused_command_line_argument" >&5
-$as_echo "$xorg_testset_unused_command_line_argument" >&6; }
+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_unknown_warning_option" = "xyes" ; then
+		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 		fi
 
-		if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
 		fi
 
@@ -7676,7 +8355,11 @@
 
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=nonnull" >&5
 $as_echo_n "checking if $CC supports -Werror=nonnull... " >&6; }
-		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+		cacheid=`$as_echo "xorg_cv_cc_flag_-Werror=nonnull" | $as_tr_sh`
+		if eval \${$cacheid+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
@@ -7688,16 +8371,20 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  supported=yes
+  eval $cacheid=yes
 else
-  supported=no
+  eval $cacheid=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+		CFLAGS="$xorg_testset_save_CFLAGS"
+
+		eval supported=\$$cacheid
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
 $as_echo "$supported" >&6; }
-		CFLAGS="$xorg_testset_save_CFLAGS"
-
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Werror=nonnull"
 			found="yes"
@@ -7710,57 +8397,75 @@
 
 
 
+
+
+
+
+
+
+
+
 xorg_testset_save_CFLAGS="$CFLAGS"
 
-if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unknown_warning_option=yes
+  xorg_cv_cc_flag_unknown_warning_option=yes
 else
-  xorg_testset_unknown_warning_option=no
+  xorg_cv_cc_flag_unknown_warning_option=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unknown_warning_option" >&5
-$as_echo "$xorg_testset_unknown_warning_option" >&6; }
+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"
 fi
 
-if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
-	if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unused_command_line_argument=yes
+  xorg_cv_cc_flag_unused_command_line_argument=yes
 else
-  xorg_testset_unused_command_line_argument=no
+  xorg_cv_cc_flag_unused_command_line_argument=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unused_command_line_argument" >&5
-$as_echo "$xorg_testset_unused_command_line_argument" >&6; }
+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_unknown_warning_option" = "xyes" ; then
+		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 		fi
 
-		if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
 		fi
 
@@ -7768,7 +8473,11 @@
 
 		{ $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; }
-		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+		cacheid=`$as_echo "xorg_cv_cc_flag_-Werror=init-self" | $as_tr_sh`
+		if eval \${$cacheid+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
@@ -7780,16 +8489,20 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  supported=yes
+  eval $cacheid=yes
 else
-  supported=no
+  eval $cacheid=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+		CFLAGS="$xorg_testset_save_CFLAGS"
+
+		eval supported=\$$cacheid
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
 $as_echo "$supported" >&6; }
-		CFLAGS="$xorg_testset_save_CFLAGS"
-
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Werror=init-self"
 			found="yes"
@@ -7802,57 +8515,75 @@
 
 
 
+
+
+
+
+
+
+
+
 xorg_testset_save_CFLAGS="$CFLAGS"
 
-if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unknown_warning_option=yes
+  xorg_cv_cc_flag_unknown_warning_option=yes
 else
-  xorg_testset_unknown_warning_option=no
+  xorg_cv_cc_flag_unknown_warning_option=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unknown_warning_option" >&5
-$as_echo "$xorg_testset_unknown_warning_option" >&6; }
+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"
 fi
 
-if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
-	if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unused_command_line_argument=yes
+  xorg_cv_cc_flag_unused_command_line_argument=yes
 else
-  xorg_testset_unused_command_line_argument=no
+  xorg_cv_cc_flag_unused_command_line_argument=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unused_command_line_argument" >&5
-$as_echo "$xorg_testset_unused_command_line_argument" >&6; }
+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_unknown_warning_option" = "xyes" ; then
+		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 		fi
 
-		if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
 		fi
 
@@ -7860,7 +8591,11 @@
 
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=main" >&5
 $as_echo_n "checking if $CC supports -Werror=main... " >&6; }
-		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+		cacheid=`$as_echo "xorg_cv_cc_flag_-Werror=main" | $as_tr_sh`
+		if eval \${$cacheid+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
@@ -7872,16 +8607,20 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  supported=yes
+  eval $cacheid=yes
 else
-  supported=no
+  eval $cacheid=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+		CFLAGS="$xorg_testset_save_CFLAGS"
+
+		eval supported=\$$cacheid
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
 $as_echo "$supported" >&6; }
-		CFLAGS="$xorg_testset_save_CFLAGS"
-
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Werror=main"
 			found="yes"
@@ -7894,57 +8633,75 @@
 
 
 
+
+
+
+
+
+
+
+
 xorg_testset_save_CFLAGS="$CFLAGS"
 
-if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unknown_warning_option=yes
+  xorg_cv_cc_flag_unknown_warning_option=yes
 else
-  xorg_testset_unknown_warning_option=no
+  xorg_cv_cc_flag_unknown_warning_option=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unknown_warning_option" >&5
-$as_echo "$xorg_testset_unknown_warning_option" >&6; }
+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"
 fi
 
-if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
-	if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unused_command_line_argument=yes
+  xorg_cv_cc_flag_unused_command_line_argument=yes
 else
-  xorg_testset_unused_command_line_argument=no
+  xorg_cv_cc_flag_unused_command_line_argument=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unused_command_line_argument" >&5
-$as_echo "$xorg_testset_unused_command_line_argument" >&6; }
+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_unknown_warning_option" = "xyes" ; then
+		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 		fi
 
-		if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
 		fi
 
@@ -7952,7 +8709,11 @@
 
 		{ $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; }
-		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+		cacheid=`$as_echo "xorg_cv_cc_flag_-Werror=missing-braces" | $as_tr_sh`
+		if eval \${$cacheid+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
@@ -7964,16 +8725,20 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  supported=yes
+  eval $cacheid=yes
 else
-  supported=no
+  eval $cacheid=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+		CFLAGS="$xorg_testset_save_CFLAGS"
+
+		eval supported=\$$cacheid
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
 $as_echo "$supported" >&6; }
-		CFLAGS="$xorg_testset_save_CFLAGS"
-
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Werror=missing-braces"
 			found="yes"
@@ -7986,57 +8751,75 @@
 
 
 
+
+
+
+
+
+
+
+
 xorg_testset_save_CFLAGS="$CFLAGS"
 
-if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unknown_warning_option=yes
+  xorg_cv_cc_flag_unknown_warning_option=yes
 else
-  xorg_testset_unknown_warning_option=no
+  xorg_cv_cc_flag_unknown_warning_option=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unknown_warning_option" >&5
-$as_echo "$xorg_testset_unknown_warning_option" >&6; }
+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"
 fi
 
-if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
-	if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unused_command_line_argument=yes
+  xorg_cv_cc_flag_unused_command_line_argument=yes
 else
-  xorg_testset_unused_command_line_argument=no
+  xorg_cv_cc_flag_unused_command_line_argument=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unused_command_line_argument" >&5
-$as_echo "$xorg_testset_unused_command_line_argument" >&6; }
+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_unknown_warning_option" = "xyes" ; then
+		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 		fi
 
-		if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
 		fi
 
@@ -8044,7 +8827,11 @@
 
 		{ $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; }
-		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+		cacheid=`$as_echo "xorg_cv_cc_flag_-Werror=sequence-point" | $as_tr_sh`
+		if eval \${$cacheid+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
@@ -8056,16 +8843,20 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  supported=yes
+  eval $cacheid=yes
 else
-  supported=no
+  eval $cacheid=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+		CFLAGS="$xorg_testset_save_CFLAGS"
+
+		eval supported=\$$cacheid
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
 $as_echo "$supported" >&6; }
-		CFLAGS="$xorg_testset_save_CFLAGS"
-
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Werror=sequence-point"
 			found="yes"
@@ -8078,57 +8869,75 @@
 
 
 
+
+
+
+
+
+
+
+
 xorg_testset_save_CFLAGS="$CFLAGS"
 
-if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unknown_warning_option=yes
+  xorg_cv_cc_flag_unknown_warning_option=yes
 else
-  xorg_testset_unknown_warning_option=no
+  xorg_cv_cc_flag_unknown_warning_option=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unknown_warning_option" >&5
-$as_echo "$xorg_testset_unknown_warning_option" >&6; }
+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"
 fi
 
-if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
-	if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unused_command_line_argument=yes
+  xorg_cv_cc_flag_unused_command_line_argument=yes
 else
-  xorg_testset_unused_command_line_argument=no
+  xorg_cv_cc_flag_unused_command_line_argument=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unused_command_line_argument" >&5
-$as_echo "$xorg_testset_unused_command_line_argument" >&6; }
+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_unknown_warning_option" = "xyes" ; then
+		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 		fi
 
-		if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
 		fi
 
@@ -8136,7 +8945,11 @@
 
 		{ $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; }
-		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+		cacheid=`$as_echo "xorg_cv_cc_flag_-Werror=return-type" | $as_tr_sh`
+		if eval \${$cacheid+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
@@ -8148,16 +8961,20 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  supported=yes
+  eval $cacheid=yes
 else
-  supported=no
+  eval $cacheid=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+		CFLAGS="$xorg_testset_save_CFLAGS"
+
+		eval supported=\$$cacheid
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
 $as_echo "$supported" >&6; }
-		CFLAGS="$xorg_testset_save_CFLAGS"
-
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Werror=return-type"
 			found="yes"
@@ -8165,11 +8982,11 @@
 	fi
 
 	if test $found = "no" ; then
-		if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 		fi
 
-		if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
 		fi
 
@@ -8177,7 +8994,11 @@
 
 		{ $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; }
-		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+		cacheid=`$as_echo "xorg_cv_cc_flag_-errwarn=E_FUNC_HAS_NO_RETURN_STMT" | $as_tr_sh`
+		if eval \${$cacheid+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
@@ -8189,16 +9010,20 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  supported=yes
+  eval $cacheid=yes
 else
-  supported=no
+  eval $cacheid=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+		CFLAGS="$xorg_testset_save_CFLAGS"
+
+		eval supported=\$$cacheid
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
 $as_echo "$supported" >&6; }
-		CFLAGS="$xorg_testset_save_CFLAGS"
-
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -errwarn=E_FUNC_HAS_NO_RETURN_STMT"
 			found="yes"
@@ -8211,57 +9036,75 @@
 
 
 
+
+
+
+
+
+
+
+
 xorg_testset_save_CFLAGS="$CFLAGS"
 
-if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unknown_warning_option=yes
+  xorg_cv_cc_flag_unknown_warning_option=yes
 else
-  xorg_testset_unknown_warning_option=no
+  xorg_cv_cc_flag_unknown_warning_option=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unknown_warning_option" >&5
-$as_echo "$xorg_testset_unknown_warning_option" >&6; }
+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"
 fi
 
-if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
-	if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unused_command_line_argument=yes
+  xorg_cv_cc_flag_unused_command_line_argument=yes
 else
-  xorg_testset_unused_command_line_argument=no
+  xorg_cv_cc_flag_unused_command_line_argument=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unused_command_line_argument" >&5
-$as_echo "$xorg_testset_unused_command_line_argument" >&6; }
+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_unknown_warning_option" = "xyes" ; then
+		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 		fi
 
-		if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
 		fi
 
@@ -8269,7 +9112,11 @@
 
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=trigraphs" >&5
 $as_echo_n "checking if $CC supports -Werror=trigraphs... " >&6; }
-		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+		cacheid=`$as_echo "xorg_cv_cc_flag_-Werror=trigraphs" | $as_tr_sh`
+		if eval \${$cacheid+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
@@ -8281,16 +9128,20 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  supported=yes
+  eval $cacheid=yes
 else
-  supported=no
+  eval $cacheid=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+		CFLAGS="$xorg_testset_save_CFLAGS"
+
+		eval supported=\$$cacheid
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
 $as_echo "$supported" >&6; }
-		CFLAGS="$xorg_testset_save_CFLAGS"
-
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Werror=trigraphs"
 			found="yes"
@@ -8303,57 +9154,75 @@
 
 
 
+
+
+
+
+
+
+
+
 xorg_testset_save_CFLAGS="$CFLAGS"
 
-if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unknown_warning_option=yes
+  xorg_cv_cc_flag_unknown_warning_option=yes
 else
-  xorg_testset_unknown_warning_option=no
+  xorg_cv_cc_flag_unknown_warning_option=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unknown_warning_option" >&5
-$as_echo "$xorg_testset_unknown_warning_option" >&6; }
+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"
 fi
 
-if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
-	if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unused_command_line_argument=yes
+  xorg_cv_cc_flag_unused_command_line_argument=yes
 else
-  xorg_testset_unused_command_line_argument=no
+  xorg_cv_cc_flag_unused_command_line_argument=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unused_command_line_argument" >&5
-$as_echo "$xorg_testset_unused_command_line_argument" >&6; }
+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_unknown_warning_option" = "xyes" ; then
+		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 		fi
 
-		if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
 		fi
 
@@ -8361,7 +9230,11 @@
 
 		{ $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; }
-		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+		cacheid=`$as_echo "xorg_cv_cc_flag_-Werror=array-bounds" | $as_tr_sh`
+		if eval \${$cacheid+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
@@ -8373,16 +9246,20 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  supported=yes
+  eval $cacheid=yes
 else
-  supported=no
+  eval $cacheid=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+		CFLAGS="$xorg_testset_save_CFLAGS"
+
+		eval supported=\$$cacheid
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
 $as_echo "$supported" >&6; }
-		CFLAGS="$xorg_testset_save_CFLAGS"
-
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Werror=array-bounds"
 			found="yes"
@@ -8395,57 +9272,75 @@
 
 
 
+
+
+
+
+
+
+
+
 xorg_testset_save_CFLAGS="$CFLAGS"
 
-if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unknown_warning_option=yes
+  xorg_cv_cc_flag_unknown_warning_option=yes
 else
-  xorg_testset_unknown_warning_option=no
+  xorg_cv_cc_flag_unknown_warning_option=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unknown_warning_option" >&5
-$as_echo "$xorg_testset_unknown_warning_option" >&6; }
+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"
 fi
 
-if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
-	if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unused_command_line_argument=yes
+  xorg_cv_cc_flag_unused_command_line_argument=yes
 else
-  xorg_testset_unused_command_line_argument=no
+  xorg_cv_cc_flag_unused_command_line_argument=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unused_command_line_argument" >&5
-$as_echo "$xorg_testset_unused_command_line_argument" >&6; }
+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_unknown_warning_option" = "xyes" ; then
+		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 		fi
 
-		if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
 		fi
 
@@ -8453,7 +9348,11 @@
 
 		{ $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; }
-		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+		cacheid=`$as_echo "xorg_cv_cc_flag_-Werror=write-strings" | $as_tr_sh`
+		if eval \${$cacheid+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
@@ -8465,16 +9364,20 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  supported=yes
+  eval $cacheid=yes
 else
-  supported=no
+  eval $cacheid=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+		CFLAGS="$xorg_testset_save_CFLAGS"
+
+		eval supported=\$$cacheid
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
 $as_echo "$supported" >&6; }
-		CFLAGS="$xorg_testset_save_CFLAGS"
-
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Werror=write-strings"
 			found="yes"
@@ -8487,57 +9390,75 @@
 
 
 
+
+
+
+
+
+
+
+
 xorg_testset_save_CFLAGS="$CFLAGS"
 
-if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unknown_warning_option=yes
+  xorg_cv_cc_flag_unknown_warning_option=yes
 else
-  xorg_testset_unknown_warning_option=no
+  xorg_cv_cc_flag_unknown_warning_option=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unknown_warning_option" >&5
-$as_echo "$xorg_testset_unknown_warning_option" >&6; }
+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"
 fi
 
-if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
-	if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unused_command_line_argument=yes
+  xorg_cv_cc_flag_unused_command_line_argument=yes
 else
-  xorg_testset_unused_command_line_argument=no
+  xorg_cv_cc_flag_unused_command_line_argument=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unused_command_line_argument" >&5
-$as_echo "$xorg_testset_unused_command_line_argument" >&6; }
+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_unknown_warning_option" = "xyes" ; then
+		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 		fi
 
-		if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
 		fi
 
@@ -8545,7 +9466,11 @@
 
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=address" >&5
 $as_echo_n "checking if $CC supports -Werror=address... " >&6; }
-		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+		cacheid=`$as_echo "xorg_cv_cc_flag_-Werror=address" | $as_tr_sh`
+		if eval \${$cacheid+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
@@ -8557,16 +9482,20 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  supported=yes
+  eval $cacheid=yes
 else
-  supported=no
+  eval $cacheid=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+		CFLAGS="$xorg_testset_save_CFLAGS"
+
+		eval supported=\$$cacheid
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
 $as_echo "$supported" >&6; }
-		CFLAGS="$xorg_testset_save_CFLAGS"
-
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Werror=address"
 			found="yes"
@@ -8579,57 +9508,75 @@
 
 
 
+
+
+
+
+
+
+
+
 xorg_testset_save_CFLAGS="$CFLAGS"
 
-if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unknown_warning_option=yes
+  xorg_cv_cc_flag_unknown_warning_option=yes
 else
-  xorg_testset_unknown_warning_option=no
+  xorg_cv_cc_flag_unknown_warning_option=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unknown_warning_option" >&5
-$as_echo "$xorg_testset_unknown_warning_option" >&6; }
+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"
 fi
 
-if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
-	if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unused_command_line_argument=yes
+  xorg_cv_cc_flag_unused_command_line_argument=yes
 else
-  xorg_testset_unused_command_line_argument=no
+  xorg_cv_cc_flag_unused_command_line_argument=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unused_command_line_argument" >&5
-$as_echo "$xorg_testset_unused_command_line_argument" >&6; }
+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_unknown_warning_option" = "xyes" ; then
+		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 		fi
 
-		if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
 		fi
 
@@ -8637,7 +9584,11 @@
 
 		{ $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; }
-		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+		cacheid=`$as_echo "xorg_cv_cc_flag_-Werror=int-to-pointer-cast" | $as_tr_sh`
+		if eval \${$cacheid+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
@@ -8649,16 +9600,20 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  supported=yes
+  eval $cacheid=yes
 else
-  supported=no
+  eval $cacheid=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+		CFLAGS="$xorg_testset_save_CFLAGS"
+
+		eval supported=\$$cacheid
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
 $as_echo "$supported" >&6; }
-		CFLAGS="$xorg_testset_save_CFLAGS"
-
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Werror=int-to-pointer-cast"
 			found="yes"
@@ -8666,11 +9621,11 @@
 	fi
 
 	if test $found = "no" ; then
-		if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 		fi
 
-		if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
 		fi
 
@@ -8678,7 +9633,11 @@
 
 		{ $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; }
-		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+		cacheid=`$as_echo "xorg_cv_cc_flag_-errwarn=E_BAD_PTR_INT_COMBINATION" | $as_tr_sh`
+		if eval \${$cacheid+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
@@ -8690,16 +9649,20 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  supported=yes
+  eval $cacheid=yes
 else
-  supported=no
+  eval $cacheid=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+		CFLAGS="$xorg_testset_save_CFLAGS"
+
+		eval supported=\$$cacheid
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
 $as_echo "$supported" >&6; }
-		CFLAGS="$xorg_testset_save_CFLAGS"
-
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -errwarn=E_BAD_PTR_INT_COMBINATION"
 			found="yes"
@@ -8712,57 +9675,75 @@
 
 
 
+
+
+
+
+
+
+
+
 xorg_testset_save_CFLAGS="$CFLAGS"
 
-if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unknown_warning_option=yes
+  xorg_cv_cc_flag_unknown_warning_option=yes
 else
-  xorg_testset_unknown_warning_option=no
+  xorg_cv_cc_flag_unknown_warning_option=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unknown_warning_option" >&5
-$as_echo "$xorg_testset_unknown_warning_option" >&6; }
+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"
 fi
 
-if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
-	if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unused_command_line_argument=yes
+  xorg_cv_cc_flag_unused_command_line_argument=yes
 else
-  xorg_testset_unused_command_line_argument=no
+  xorg_cv_cc_flag_unused_command_line_argument=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unused_command_line_argument" >&5
-$as_echo "$xorg_testset_unused_command_line_argument" >&6; }
+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_unknown_warning_option" = "xyes" ; then
+		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 		fi
 
-		if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
 		fi
 
@@ -8770,7 +9751,11 @@
 
 		{ $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; }
-		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+		cacheid=`$as_echo "xorg_cv_cc_flag_-Werror=pointer-to-int-cast" | $as_tr_sh`
+		if eval \${$cacheid+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
@@ -8782,16 +9767,20 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  supported=yes
+  eval $cacheid=yes
 else
-  supported=no
+  eval $cacheid=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+		CFLAGS="$xorg_testset_save_CFLAGS"
+
+		eval supported=\$$cacheid
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
 $as_echo "$supported" >&6; }
-		CFLAGS="$xorg_testset_save_CFLAGS"
-
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Werror=pointer-to-int-cast"
 			found="yes"
@@ -8807,57 +9796,75 @@
 
 
 
+
+
+
+
+
+
+
+
 xorg_testset_save_CFLAGS="$CFLAGS"
 
-if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unknown_warning_option=yes
+  xorg_cv_cc_flag_unknown_warning_option=yes
 else
-  xorg_testset_unknown_warning_option=no
+  xorg_cv_cc_flag_unknown_warning_option=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unknown_warning_option" >&5
-$as_echo "$xorg_testset_unknown_warning_option" >&6; }
+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"
 fi
 
-if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
-	if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unused_command_line_argument=yes
+  xorg_cv_cc_flag_unused_command_line_argument=yes
 else
-  xorg_testset_unused_command_line_argument=no
+  xorg_cv_cc_flag_unused_command_line_argument=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unused_command_line_argument" >&5
-$as_echo "$xorg_testset_unused_command_line_argument" >&6; }
+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_unknown_warning_option" = "xyes" ; then
+		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 		fi
 
-		if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
 		fi
 
@@ -8865,7 +9872,11 @@
 
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wimplicit" >&5
 $as_echo_n "checking if $CC supports -Wimplicit... " >&6; }
-		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+		cacheid=xorg_cv_cc_flag__Wimplicit
+		if eval \${$cacheid+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
@@ -8877,16 +9888,20 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  supported=yes
+  eval $cacheid=yes
 else
-  supported=no
+  eval $cacheid=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+		CFLAGS="$xorg_testset_save_CFLAGS"
+
+		eval supported=\$$cacheid
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
 $as_echo "$supported" >&6; }
-		CFLAGS="$xorg_testset_save_CFLAGS"
-
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Wimplicit"
 			found="yes"
@@ -8899,57 +9914,75 @@
 
 
 
+
+
+
+
+
+
+
+
 xorg_testset_save_CFLAGS="$CFLAGS"
 
-if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unknown_warning_option=yes
+  xorg_cv_cc_flag_unknown_warning_option=yes
 else
-  xorg_testset_unknown_warning_option=no
+  xorg_cv_cc_flag_unknown_warning_option=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unknown_warning_option" >&5
-$as_echo "$xorg_testset_unknown_warning_option" >&6; }
+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"
 fi
 
-if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
-	if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unused_command_line_argument=yes
+  xorg_cv_cc_flag_unused_command_line_argument=yes
 else
-  xorg_testset_unused_command_line_argument=no
+  xorg_cv_cc_flag_unused_command_line_argument=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unused_command_line_argument" >&5
-$as_echo "$xorg_testset_unused_command_line_argument" >&6; }
+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_unknown_warning_option" = "xyes" ; then
+		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 		fi
 
-		if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
 		fi
 
@@ -8957,7 +9990,11 @@
 
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wnonnull" >&5
 $as_echo_n "checking if $CC supports -Wnonnull... " >&6; }
-		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+		cacheid=xorg_cv_cc_flag__Wnonnull
+		if eval \${$cacheid+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
@@ -8969,16 +10006,20 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  supported=yes
+  eval $cacheid=yes
 else
-  supported=no
+  eval $cacheid=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+		CFLAGS="$xorg_testset_save_CFLAGS"
+
+		eval supported=\$$cacheid
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
 $as_echo "$supported" >&6; }
-		CFLAGS="$xorg_testset_save_CFLAGS"
-
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Wnonnull"
 			found="yes"
@@ -8991,57 +10032,75 @@
 
 
 
+
+
+
+
+
+
+
+
 xorg_testset_save_CFLAGS="$CFLAGS"
 
-if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unknown_warning_option=yes
+  xorg_cv_cc_flag_unknown_warning_option=yes
 else
-  xorg_testset_unknown_warning_option=no
+  xorg_cv_cc_flag_unknown_warning_option=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unknown_warning_option" >&5
-$as_echo "$xorg_testset_unknown_warning_option" >&6; }
+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"
 fi
 
-if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
-	if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unused_command_line_argument=yes
+  xorg_cv_cc_flag_unused_command_line_argument=yes
 else
-  xorg_testset_unused_command_line_argument=no
+  xorg_cv_cc_flag_unused_command_line_argument=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unused_command_line_argument" >&5
-$as_echo "$xorg_testset_unused_command_line_argument" >&6; }
+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_unknown_warning_option" = "xyes" ; then
+		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 		fi
 
-		if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
 		fi
 
@@ -9049,7 +10108,11 @@
 
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Winit-self" >&5
 $as_echo_n "checking if $CC supports -Winit-self... " >&6; }
-		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+		cacheid=xorg_cv_cc_flag__Winit_self
+		if eval \${$cacheid+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
@@ -9061,16 +10124,20 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  supported=yes
+  eval $cacheid=yes
 else
-  supported=no
+  eval $cacheid=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+		CFLAGS="$xorg_testset_save_CFLAGS"
+
+		eval supported=\$$cacheid
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
 $as_echo "$supported" >&6; }
-		CFLAGS="$xorg_testset_save_CFLAGS"
-
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Winit-self"
 			found="yes"
@@ -9083,57 +10150,75 @@
 
 
 
+
+
+
+
+
+
+
+
 xorg_testset_save_CFLAGS="$CFLAGS"
 
-if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unknown_warning_option=yes
+  xorg_cv_cc_flag_unknown_warning_option=yes
 else
-  xorg_testset_unknown_warning_option=no
+  xorg_cv_cc_flag_unknown_warning_option=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unknown_warning_option" >&5
-$as_echo "$xorg_testset_unknown_warning_option" >&6; }
+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"
 fi
 
-if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
-	if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unused_command_line_argument=yes
+  xorg_cv_cc_flag_unused_command_line_argument=yes
 else
-  xorg_testset_unused_command_line_argument=no
+  xorg_cv_cc_flag_unused_command_line_argument=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unused_command_line_argument" >&5
-$as_echo "$xorg_testset_unused_command_line_argument" >&6; }
+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_unknown_warning_option" = "xyes" ; then
+		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 		fi
 
-		if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
 		fi
 
@@ -9141,7 +10226,11 @@
 
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmain" >&5
 $as_echo_n "checking if $CC supports -Wmain... " >&6; }
-		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+		cacheid=xorg_cv_cc_flag__Wmain
+		if eval \${$cacheid+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
@@ -9153,16 +10242,20 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  supported=yes
+  eval $cacheid=yes
 else
-  supported=no
+  eval $cacheid=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+		CFLAGS="$xorg_testset_save_CFLAGS"
+
+		eval supported=\$$cacheid
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
 $as_echo "$supported" >&6; }
-		CFLAGS="$xorg_testset_save_CFLAGS"
-
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Wmain"
 			found="yes"
@@ -9175,57 +10268,75 @@
 
 
 
+
+
+
+
+
+
+
+
 xorg_testset_save_CFLAGS="$CFLAGS"
 
-if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unknown_warning_option=yes
+  xorg_cv_cc_flag_unknown_warning_option=yes
 else
-  xorg_testset_unknown_warning_option=no
+  xorg_cv_cc_flag_unknown_warning_option=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unknown_warning_option" >&5
-$as_echo "$xorg_testset_unknown_warning_option" >&6; }
+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"
 fi
 
-if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
-	if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unused_command_line_argument=yes
+  xorg_cv_cc_flag_unused_command_line_argument=yes
 else
-  xorg_testset_unused_command_line_argument=no
+  xorg_cv_cc_flag_unused_command_line_argument=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unused_command_line_argument" >&5
-$as_echo "$xorg_testset_unused_command_line_argument" >&6; }
+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_unknown_warning_option" = "xyes" ; then
+		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 		fi
 
-		if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
 		fi
 
@@ -9233,7 +10344,11 @@
 
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-braces" >&5
 $as_echo_n "checking if $CC supports -Wmissing-braces... " >&6; }
-		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+		cacheid=xorg_cv_cc_flag__Wmissing_braces
+		if eval \${$cacheid+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
@@ -9245,16 +10360,20 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  supported=yes
+  eval $cacheid=yes
 else
-  supported=no
+  eval $cacheid=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+		CFLAGS="$xorg_testset_save_CFLAGS"
+
+		eval supported=\$$cacheid
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
 $as_echo "$supported" >&6; }
-		CFLAGS="$xorg_testset_save_CFLAGS"
-
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Wmissing-braces"
 			found="yes"
@@ -9267,57 +10386,75 @@
 
 
 
+
+
+
+
+
+
+
+
 xorg_testset_save_CFLAGS="$CFLAGS"
 
-if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unknown_warning_option=yes
+  xorg_cv_cc_flag_unknown_warning_option=yes
 else
-  xorg_testset_unknown_warning_option=no
+  xorg_cv_cc_flag_unknown_warning_option=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unknown_warning_option" >&5
-$as_echo "$xorg_testset_unknown_warning_option" >&6; }
+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"
 fi
 
-if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
-	if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unused_command_line_argument=yes
+  xorg_cv_cc_flag_unused_command_line_argument=yes
 else
-  xorg_testset_unused_command_line_argument=no
+  xorg_cv_cc_flag_unused_command_line_argument=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unused_command_line_argument" >&5
-$as_echo "$xorg_testset_unused_command_line_argument" >&6; }
+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_unknown_warning_option" = "xyes" ; then
+		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 		fi
 
-		if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
 		fi
 
@@ -9325,7 +10462,11 @@
 
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wsequence-point" >&5
 $as_echo_n "checking if $CC supports -Wsequence-point... " >&6; }
-		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+		cacheid=xorg_cv_cc_flag__Wsequence_point
+		if eval \${$cacheid+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
@@ -9337,16 +10478,20 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  supported=yes
+  eval $cacheid=yes
 else
-  supported=no
+  eval $cacheid=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+		CFLAGS="$xorg_testset_save_CFLAGS"
+
+		eval supported=\$$cacheid
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
 $as_echo "$supported" >&6; }
-		CFLAGS="$xorg_testset_save_CFLAGS"
-
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Wsequence-point"
 			found="yes"
@@ -9359,57 +10504,75 @@
 
 
 
+
+
+
+
+
+
+
+
 xorg_testset_save_CFLAGS="$CFLAGS"
 
-if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unknown_warning_option=yes
+  xorg_cv_cc_flag_unknown_warning_option=yes
 else
-  xorg_testset_unknown_warning_option=no
+  xorg_cv_cc_flag_unknown_warning_option=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unknown_warning_option" >&5
-$as_echo "$xorg_testset_unknown_warning_option" >&6; }
+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"
 fi
 
-if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
-	if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unused_command_line_argument=yes
+  xorg_cv_cc_flag_unused_command_line_argument=yes
 else
-  xorg_testset_unused_command_line_argument=no
+  xorg_cv_cc_flag_unused_command_line_argument=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unused_command_line_argument" >&5
-$as_echo "$xorg_testset_unused_command_line_argument" >&6; }
+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_unknown_warning_option" = "xyes" ; then
+		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 		fi
 
-		if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
 		fi
 
@@ -9417,7 +10580,11 @@
 
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wreturn-type" >&5
 $as_echo_n "checking if $CC supports -Wreturn-type... " >&6; }
-		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+		cacheid=xorg_cv_cc_flag__Wreturn_type
+		if eval \${$cacheid+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
@@ -9429,16 +10596,20 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  supported=yes
+  eval $cacheid=yes
 else
-  supported=no
+  eval $cacheid=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+		CFLAGS="$xorg_testset_save_CFLAGS"
+
+		eval supported=\$$cacheid
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
 $as_echo "$supported" >&6; }
-		CFLAGS="$xorg_testset_save_CFLAGS"
-
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Wreturn-type"
 			found="yes"
@@ -9451,57 +10622,75 @@
 
 
 
+
+
+
+
+
+
+
+
 xorg_testset_save_CFLAGS="$CFLAGS"
 
-if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unknown_warning_option=yes
+  xorg_cv_cc_flag_unknown_warning_option=yes
 else
-  xorg_testset_unknown_warning_option=no
+  xorg_cv_cc_flag_unknown_warning_option=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unknown_warning_option" >&5
-$as_echo "$xorg_testset_unknown_warning_option" >&6; }
+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"
 fi
 
-if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
-	if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unused_command_line_argument=yes
+  xorg_cv_cc_flag_unused_command_line_argument=yes
 else
-  xorg_testset_unused_command_line_argument=no
+  xorg_cv_cc_flag_unused_command_line_argument=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unused_command_line_argument" >&5
-$as_echo "$xorg_testset_unused_command_line_argument" >&6; }
+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_unknown_warning_option" = "xyes" ; then
+		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 		fi
 
-		if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
 		fi
 
@@ -9509,7 +10698,11 @@
 
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wtrigraphs" >&5
 $as_echo_n "checking if $CC supports -Wtrigraphs... " >&6; }
-		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+		cacheid=xorg_cv_cc_flag__Wtrigraphs
+		if eval \${$cacheid+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
@@ -9521,16 +10714,20 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  supported=yes
+  eval $cacheid=yes
 else
-  supported=no
+  eval $cacheid=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+		CFLAGS="$xorg_testset_save_CFLAGS"
+
+		eval supported=\$$cacheid
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
 $as_echo "$supported" >&6; }
-		CFLAGS="$xorg_testset_save_CFLAGS"
-
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Wtrigraphs"
 			found="yes"
@@ -9543,57 +10740,75 @@
 
 
 
+
+
+
+
+
+
+
+
 xorg_testset_save_CFLAGS="$CFLAGS"
 
-if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unknown_warning_option=yes
+  xorg_cv_cc_flag_unknown_warning_option=yes
 else
-  xorg_testset_unknown_warning_option=no
+  xorg_cv_cc_flag_unknown_warning_option=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unknown_warning_option" >&5
-$as_echo "$xorg_testset_unknown_warning_option" >&6; }
+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"
 fi
 
-if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
-	if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unused_command_line_argument=yes
+  xorg_cv_cc_flag_unused_command_line_argument=yes
 else
-  xorg_testset_unused_command_line_argument=no
+  xorg_cv_cc_flag_unused_command_line_argument=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unused_command_line_argument" >&5
-$as_echo "$xorg_testset_unused_command_line_argument" >&6; }
+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_unknown_warning_option" = "xyes" ; then
+		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 		fi
 
-		if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
 		fi
 
@@ -9601,7 +10816,11 @@
 
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Warray-bounds" >&5
 $as_echo_n "checking if $CC supports -Warray-bounds... " >&6; }
-		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+		cacheid=xorg_cv_cc_flag__Warray_bounds
+		if eval \${$cacheid+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
@@ -9613,16 +10832,20 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  supported=yes
+  eval $cacheid=yes
 else
-  supported=no
+  eval $cacheid=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+		CFLAGS="$xorg_testset_save_CFLAGS"
+
+		eval supported=\$$cacheid
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
 $as_echo "$supported" >&6; }
-		CFLAGS="$xorg_testset_save_CFLAGS"
-
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Warray-bounds"
 			found="yes"
@@ -9635,57 +10858,75 @@
 
 
 
+
+
+
+
+
+
+
+
 xorg_testset_save_CFLAGS="$CFLAGS"
 
-if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unknown_warning_option=yes
+  xorg_cv_cc_flag_unknown_warning_option=yes
 else
-  xorg_testset_unknown_warning_option=no
+  xorg_cv_cc_flag_unknown_warning_option=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unknown_warning_option" >&5
-$as_echo "$xorg_testset_unknown_warning_option" >&6; }
+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"
 fi
 
-if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
-	if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unused_command_line_argument=yes
+  xorg_cv_cc_flag_unused_command_line_argument=yes
 else
-  xorg_testset_unused_command_line_argument=no
+  xorg_cv_cc_flag_unused_command_line_argument=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unused_command_line_argument" >&5
-$as_echo "$xorg_testset_unused_command_line_argument" >&6; }
+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_unknown_warning_option" = "xyes" ; then
+		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 		fi
 
-		if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
 		fi
 
@@ -9693,7 +10934,11 @@
 
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wwrite-strings" >&5
 $as_echo_n "checking if $CC supports -Wwrite-strings... " >&6; }
-		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+		cacheid=xorg_cv_cc_flag__Wwrite_strings
+		if eval \${$cacheid+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
@@ -9705,16 +10950,20 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  supported=yes
+  eval $cacheid=yes
 else
-  supported=no
+  eval $cacheid=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+		CFLAGS="$xorg_testset_save_CFLAGS"
+
+		eval supported=\$$cacheid
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
 $as_echo "$supported" >&6; }
-		CFLAGS="$xorg_testset_save_CFLAGS"
-
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Wwrite-strings"
 			found="yes"
@@ -9727,57 +10976,75 @@
 
 
 
+
+
+
+
+
+
+
+
 xorg_testset_save_CFLAGS="$CFLAGS"
 
-if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unknown_warning_option=yes
+  xorg_cv_cc_flag_unknown_warning_option=yes
 else
-  xorg_testset_unknown_warning_option=no
+  xorg_cv_cc_flag_unknown_warning_option=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unknown_warning_option" >&5
-$as_echo "$xorg_testset_unknown_warning_option" >&6; }
+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"
 fi
 
-if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
-	if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unused_command_line_argument=yes
+  xorg_cv_cc_flag_unused_command_line_argument=yes
 else
-  xorg_testset_unused_command_line_argument=no
+  xorg_cv_cc_flag_unused_command_line_argument=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unused_command_line_argument" >&5
-$as_echo "$xorg_testset_unused_command_line_argument" >&6; }
+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_unknown_warning_option" = "xyes" ; then
+		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 		fi
 
-		if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
 		fi
 
@@ -9785,7 +11052,11 @@
 
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Waddress" >&5
 $as_echo_n "checking if $CC supports -Waddress... " >&6; }
-		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+		cacheid=xorg_cv_cc_flag__Waddress
+		if eval \${$cacheid+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
@@ -9797,16 +11068,20 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  supported=yes
+  eval $cacheid=yes
 else
-  supported=no
+  eval $cacheid=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+		CFLAGS="$xorg_testset_save_CFLAGS"
+
+		eval supported=\$$cacheid
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
 $as_echo "$supported" >&6; }
-		CFLAGS="$xorg_testset_save_CFLAGS"
-
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Waddress"
 			found="yes"
@@ -9819,57 +11094,75 @@
 
 
 
+
+
+
+
+
+
+
+
 xorg_testset_save_CFLAGS="$CFLAGS"
 
-if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unknown_warning_option=yes
+  xorg_cv_cc_flag_unknown_warning_option=yes
 else
-  xorg_testset_unknown_warning_option=no
+  xorg_cv_cc_flag_unknown_warning_option=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unknown_warning_option" >&5
-$as_echo "$xorg_testset_unknown_warning_option" >&6; }
+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"
 fi
 
-if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
-	if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unused_command_line_argument=yes
+  xorg_cv_cc_flag_unused_command_line_argument=yes
 else
-  xorg_testset_unused_command_line_argument=no
+  xorg_cv_cc_flag_unused_command_line_argument=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unused_command_line_argument" >&5
-$as_echo "$xorg_testset_unused_command_line_argument" >&6; }
+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_unknown_warning_option" = "xyes" ; then
+		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 		fi
 
-		if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
 		fi
 
@@ -9877,7 +11170,11 @@
 
 		{ $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; }
-		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+		cacheid=xorg_cv_cc_flag__Wint_to_pointer_cast
+		if eval \${$cacheid+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
@@ -9889,16 +11186,20 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  supported=yes
+  eval $cacheid=yes
 else
-  supported=no
+  eval $cacheid=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+		CFLAGS="$xorg_testset_save_CFLAGS"
+
+		eval supported=\$$cacheid
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
 $as_echo "$supported" >&6; }
-		CFLAGS="$xorg_testset_save_CFLAGS"
-
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Wint-to-pointer-cast"
 			found="yes"
@@ -9911,57 +11212,75 @@
 
 
 
+
+
+
+
+
+
+
+
 xorg_testset_save_CFLAGS="$CFLAGS"
 
-if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unknown_warning_option=yes
+  xorg_cv_cc_flag_unknown_warning_option=yes
 else
-  xorg_testset_unknown_warning_option=no
+  xorg_cv_cc_flag_unknown_warning_option=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unknown_warning_option" >&5
-$as_echo "$xorg_testset_unknown_warning_option" >&6; }
+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"
 fi
 
-if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
-	if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unused_command_line_argument=yes
+  xorg_cv_cc_flag_unused_command_line_argument=yes
 else
-  xorg_testset_unused_command_line_argument=no
+  xorg_cv_cc_flag_unused_command_line_argument=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unused_command_line_argument" >&5
-$as_echo "$xorg_testset_unused_command_line_argument" >&6; }
+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_unknown_warning_option" = "xyes" ; then
+		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 		fi
 
-		if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
 		fi
 
@@ -9969,7 +11288,11 @@
 
 		{ $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; }
-		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+		cacheid=xorg_cv_cc_flag__Wpointer_to_int_cast
+		if eval \${$cacheid+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
@@ -9981,16 +11304,20 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  supported=yes
+  eval $cacheid=yes
 else
-  supported=no
+  eval $cacheid=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+		CFLAGS="$xorg_testset_save_CFLAGS"
+
+		eval supported=\$$cacheid
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
 $as_echo "$supported" >&6; }
-		CFLAGS="$xorg_testset_save_CFLAGS"
-
 		if test "$supported" = "yes" ; then
 			BASE_CFLAGS="$BASE_CFLAGS -Wpointer-to-int-cast"
 			found="yes"
@@ -10005,10 +11332,13 @@
 
 
 
-CWARNFLAGS="$BASE_CFLAGS"
-if  test "x$GCC" = xyes ; then
-    CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing"
-fi
+
+		CWARNFLAGS="$BASE_CFLAGS"
+		if  test "x$GCC" = xyes ; then
+		    CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing"
+		fi
+
+
 
 
 
@@ -10023,63 +11353,85 @@
 fi
 
 
+
+
+
+
 STRICT_CFLAGS=""
 
 
 
 
 
+
+
+
+
+
+
+
+
 xorg_testset_save_CFLAGS="$CFLAGS"
 
-if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unknown_warning_option=yes
+  xorg_cv_cc_flag_unknown_warning_option=yes
 else
-  xorg_testset_unknown_warning_option=no
+  xorg_cv_cc_flag_unknown_warning_option=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unknown_warning_option" >&5
-$as_echo "$xorg_testset_unknown_warning_option" >&6; }
+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"
 fi
 
-if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
-	if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unused_command_line_argument=yes
+  xorg_cv_cc_flag_unused_command_line_argument=yes
 else
-  xorg_testset_unused_command_line_argument=no
+  xorg_cv_cc_flag_unused_command_line_argument=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unused_command_line_argument" >&5
-$as_echo "$xorg_testset_unused_command_line_argument" >&6; }
+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_unknown_warning_option" = "xyes" ; then
+		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 		fi
 
-		if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
 		fi
 
@@ -10087,7 +11439,11 @@
 
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -pedantic" >&5
 $as_echo_n "checking if $CC supports -pedantic... " >&6; }
-		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+		cacheid=xorg_cv_cc_flag__pedantic
+		if eval \${$cacheid+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
@@ -10099,16 +11455,20 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  supported=yes
+  eval $cacheid=yes
 else
-  supported=no
+  eval $cacheid=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+		CFLAGS="$xorg_testset_save_CFLAGS"
+
+		eval supported=\$$cacheid
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
 $as_echo "$supported" >&6; }
-		CFLAGS="$xorg_testset_save_CFLAGS"
-
 		if test "$supported" = "yes" ; then
 			STRICT_CFLAGS="$STRICT_CFLAGS -pedantic"
 			found="yes"
@@ -10121,57 +11481,75 @@
 
 
 
+
+
+
+
+
+
+
+
 xorg_testset_save_CFLAGS="$CFLAGS"
 
-if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unknown_warning_option=yes
+  xorg_cv_cc_flag_unknown_warning_option=yes
 else
-  xorg_testset_unknown_warning_option=no
+  xorg_cv_cc_flag_unknown_warning_option=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unknown_warning_option" >&5
-$as_echo "$xorg_testset_unknown_warning_option" >&6; }
+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"
 fi
 
-if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
-	if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unused_command_line_argument=yes
+  xorg_cv_cc_flag_unused_command_line_argument=yes
 else
-  xorg_testset_unused_command_line_argument=no
+  xorg_cv_cc_flag_unused_command_line_argument=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unused_command_line_argument" >&5
-$as_echo "$xorg_testset_unused_command_line_argument" >&6; }
+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_unknown_warning_option" = "xyes" ; then
+		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 		fi
 
-		if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
 		fi
 
@@ -10179,7 +11557,11 @@
 
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror" >&5
 $as_echo_n "checking if $CC supports -Werror... " >&6; }
-		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+		cacheid=xorg_cv_cc_flag__Werror
+		if eval \${$cacheid+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
@@ -10191,16 +11573,20 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  supported=yes
+  eval $cacheid=yes
 else
-  supported=no
+  eval $cacheid=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+		CFLAGS="$xorg_testset_save_CFLAGS"
+
+		eval supported=\$$cacheid
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
 $as_echo "$supported" >&6; }
-		CFLAGS="$xorg_testset_save_CFLAGS"
-
 		if test "$supported" = "yes" ; then
 			STRICT_CFLAGS="$STRICT_CFLAGS -Werror"
 			found="yes"
@@ -10208,11 +11594,11 @@
 	fi
 
 	if test $found = "no" ; then
-		if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 		fi
 
-		if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
 		fi
 
@@ -10220,7 +11606,11 @@
 
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -errwarn" >&5
 $as_echo_n "checking if $CC supports -errwarn... " >&6; }
-		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+		cacheid=xorg_cv_cc_flag__errwarn
+		if eval \${$cacheid+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
@@ -10232,16 +11622,20 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  supported=yes
+  eval $cacheid=yes
 else
-  supported=no
+  eval $cacheid=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+		CFLAGS="$xorg_testset_save_CFLAGS"
+
+		eval supported=\$$cacheid
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
 $as_echo "$supported" >&6; }
-		CFLAGS="$xorg_testset_save_CFLAGS"
-
 		if test "$supported" = "yes" ; then
 			STRICT_CFLAGS="$STRICT_CFLAGS -errwarn"
 			found="yes"
@@ -10257,57 +11651,75 @@
 
 
 
+
+
+
+
+
+
+
+
 xorg_testset_save_CFLAGS="$CFLAGS"
 
-if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unknown_warning_option=yes
+  xorg_cv_cc_flag_unknown_warning_option=yes
 else
-  xorg_testset_unknown_warning_option=no
+  xorg_cv_cc_flag_unknown_warning_option=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unknown_warning_option" >&5
-$as_echo "$xorg_testset_unknown_warning_option" >&6; }
+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"
 fi
 
-if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
-	if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+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; }
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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_testset_unused_command_line_argument=yes
+  xorg_cv_cc_flag_unused_command_line_argument=yes
 else
-  xorg_testset_unused_command_line_argument=no
+  xorg_cv_cc_flag_unused_command_line_argument=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_testset_unused_command_line_argument" >&5
-$as_echo "$xorg_testset_unused_command_line_argument" >&6; }
+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_unknown_warning_option" = "xyes" ; then
+		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 		fi
 
-		if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
 			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
 		fi
 
@@ -10315,7 +11727,11 @@
 
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=attributes" >&5
 $as_echo_n "checking if $CC supports -Werror=attributes... " >&6; }
-		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+		cacheid=`$as_echo "xorg_cv_cc_flag_-Werror=attributes" | $as_tr_sh`
+		if eval \${$cacheid+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int i;
 int
@@ -10327,16 +11743,20 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  supported=yes
+  eval $cacheid=yes
 else
-  supported=no
+  eval $cacheid=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+		CFLAGS="$xorg_testset_save_CFLAGS"
+
+		eval supported=\$$cacheid
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
 $as_echo "$supported" >&6; }
-		CFLAGS="$xorg_testset_save_CFLAGS"
-
 		if test "$supported" = "yes" ; then
 			STRICT_CFLAGS="$STRICT_CFLAGS -Werror=attributes"
 			found="yes"
@@ -10528,6 +11948,7 @@
 
 
 
+
 # Check whether --with-doxygen was given.
 if test "${with_doxygen+set}" = set; then :
   withval=$with_doxygen; use_doxygen=$withval
@@ -10666,6 +12087,63 @@
      ;;
 esac
 fi
+
+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
+  case $DOT in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_DOT="$DOT" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+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; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    if test "x$DOT" != "x"; then
+      HAVE_DOT=yes
+    fi
+fi
+
+
+ if test "$HAVE_DOT" = "yes"; then
+  HAVE_DOT_TRUE=
+  HAVE_DOT_FALSE='#'
+else
+  HAVE_DOT_TRUE='#'
+  HAVE_DOT_FALSE=
+fi
+
  if test "$have_doxygen" = yes; then
   HAVE_DOXYGEN_TRUE=
   HAVE_DOXYGEN_FALSE='#'
@@ -20518,7 +21996,7 @@
 
 for ac_func in backtrace ffs geteuid getuid issetugid getresuid \
 	getdtablesize getifaddrs getpeereid getpeerucred getzoneid \
-	mmap shmctl64 strncasecmp vasprintf vsnprintf walkcontext
+	mmap seteuid shmctl64 strncasecmp vasprintf vsnprintf walkcontext
 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"
@@ -20690,27 +22168,6 @@
 fi
 
 
-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
-_ACEOF
- LNXAPM=yes
-fi
-
-done
-
- if test "x$LNXAPM" = xyes; then
-  LNXAPM_TRUE=
-  LNXAPM_FALSE='#'
-else
-  LNXAPM_TRUE='#'
-  LNXAPM_FALSE=
-fi
-
-
 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"
@@ -21746,6 +23203,20 @@
   DRI2=auto
 fi
 
+# Check whether --enable-dri3 was given.
+if test "${enable_dri3+set}" = set; then :
+  enableval=$enable_dri3; DRI3=$enableval
+else
+  DRI3=auto
+fi
+
+# Check whether --enable-present was given.
+if test "${enable_present+set}" = set; then :
+  enableval=$enable_present; PRESENT=$enableval
+else
+  PRESENT=yes
+fi
+
 # Check whether --enable-xinerama was given.
 if test "${enable_xinerama+set}" = set; then :
   enableval=$enable_xinerama; XINERAMA=$enableval
@@ -21900,6 +23371,20 @@
   PCI=yes
 fi
 
+# 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
+
+# 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
+
 
 # Check whether --enable-xorg was given.
 if test "${enable_xorg+set}" = set; then :
@@ -21999,6 +23484,13 @@
   KDRIVE_EVDEV=auto
 fi
 
+# 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-install-setuid was given.
@@ -22041,40 +23533,6 @@
 
 
 # Transport selection macro from xtrans.m4
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
-$as_echo_n "checking return type of signal handlers... " >&6; }
-if ${ac_cv_type_signal+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/types.h>
-#include <signal.h>
-
-int
-main ()
-{
-return *(signal (0, 0)) (0) == 1;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_type_signal=int
-else
-  ac_cv_type_signal=void
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
-$as_echo "$ac_cv_type_signal" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define RETSIGTYPE $ac_cv_type_signal
-_ACEOF
-
-
-
 
 
  case $host_os in
@@ -22265,7 +23723,6 @@
   LIBS="-lws2_32 $LIBS"
 
 fi
-ac_cv_lib_ws2_32=ac_cv_lib_ws2_32_main
 
  fi
 
@@ -22322,6 +23779,57 @@
 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 :
+
+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
+
+
+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>
+
+"
+if test "x$ac_cv_member_struct_msghdr_msg_control" = xyes; then :
+
+$as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
+
+
+fi
+
+ fi
+
+
 
  fi
  case $host_os in
@@ -22497,6 +24005,7 @@
 		CONFIG_UDEV_KMS=no
 		DGA=no
 		DRI2=no
+		DRI3=no
 		INT10MODULE=no
 		PCI=no
 		VGAHW=no
@@ -22514,6 +24023,7 @@
 		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
@@ -22579,19 +24089,21 @@
 RESOURCEPROTO="resourceproto >= 1.2.0"
 DRIPROTO="xf86driproto >= 2.1.0"
 DRI2PROTO="dri2proto >= 2.8"
+DRI3PROTO="dri3proto >= 1.0"
 XINERAMAPROTO="xineramaproto"
 BIGFONTPROTO="xf86bigfontproto >= 1.2.0"
 DGAPROTO="xf86dgaproto >= 2.0.99.1"
-GLPROTO="glproto >= 1.4.16"
+GLPROTO="glproto >= 1.4.17"
 DMXPROTO="dmxproto >= 2.2.99.1"
 VIDMODEPROTO="xf86vidmodeproto >= 2.2.99.1"
 WINDOWSWMPROTO="windowswmproto"
 APPLEWMPROTO="applewmproto >= 1.4"
+XSHMFENCE="xshmfence >= 1.1"
 
 XPROTO="xproto >= 7.0.22"
 RANDRPROTO="randrproto >= 1.4.0"
 RENDERPROTO="renderproto >= 0.11"
-XEXTPROTO="xextproto >= 7.1.99"
+XEXTPROTO="xextproto >= 7.2.99.901"
 INPUTPROTO="inputproto >= 2.3"
 KBPROTO="kbproto >= 1.0.3"
 FONTSPROTO="fontsproto"
@@ -22599,7 +24111,8 @@
 DAMAGEPROTO="damageproto >= 1.1"
 XCMISCPROTO="xcmiscproto >= 1.2.0"
 BIGREQSPROTO="bigreqsproto >= 1.1.0"
-XTRANS="xtrans >= 1.2.2"
+XTRANS="xtrans >= 1.3.2"
+PRESENTPROTO="presentproto >= 1.0"
 
 LIBAPPLEWM="applewm >= 1.4"
 LIBDMX="dmx >= 1.0.99.1"
@@ -23352,6 +24865,7 @@
 $as_echo "#define SCREENSAVER 1" >>confdefs.h
 
 	REQUIRED_MODULES="$REQUIRED_MODULES $SCRNSAVERPROTO"
+	SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $SCRNSAVERPROTO"
 fi
 
  if test "x$RES" = xyes; then
@@ -23367,6 +24881,7 @@
 $as_echo "#define RES 1" >>confdefs.h
 
 	REQUIRED_MODULES="$REQUIRED_MODULES $RESOURCEPROTO"
+	SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $RESOURCEPROTO"
 fi
 
 # The XRes extension may support client ID tracking only if it has
@@ -23399,232 +24914,6 @@
 fi
 
 
-if test "x$GLX" = xyes; then
-
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XLIB" >&5
-$as_echo_n "checking for XLIB... " >&6; }
-
-if test -n "$XLIB_CFLAGS"; then
-    pkg_cv_XLIB_CFLAGS="$XLIB_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
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_XLIB_CFLAGS=`$PKG_CONFIG --cflags "x11" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
- 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" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "x11") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_XLIB_LIBS=`$PKG_CONFIG --libs "x11" 2>/dev/null`
-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
-	        XLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "x11" 2>&1`
-        else
-	        XLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors "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
-     	{ $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; }
-
-fi
-
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GL" >&5
-$as_echo_n "checking for GL... " >&6; }
-
-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 \"\$GLPROTO \$LIBGL\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$GLPROTO $LIBGL") 2>&5
-  ac_status=$?
-  $as_echo "$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`
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-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 \"\$GLPROTO \$LIBGL\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$GLPROTO $LIBGL") 2>&5
-  ac_status=$?
-  $as_echo "$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`
-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
-	        GL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$GLPROTO $LIBGL" 2>&1`
-        else
-	        GL_PKG_ERRORS=`$PKG_CONFIG --print-errors "$GLPROTO $LIBGL" 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.
-
-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; }
-	{ { $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; }
-
-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; }
-
-fi
-
-
-$as_echo "#define GLXEXT 1" >>confdefs.h
-
-	GLX_LIBS='$(top_builddir)/glx/libglx.la'
-	GLX_SYS_LIBS="$GLX_SYS_LIBS"
-else
-        GLX=no
-fi
- if test "x$GLX" = xyes; then
-  GLX_TRUE=
-  GLX_FALSE='#'
-else
-  GLX_TRUE='#'
-  GLX_FALSE=
-fi
-
-
-if test "x$GLX" = xno; then
-        AIGLX=no
-fi
-
-if test "x$AIGLX" = xyes -a \( "x$DRI" = xyes -o "x$DRI2" = xyes \); then
-
-$as_echo "#define AIGLX 1" >>confdefs.h
-
-fi
- if { test "x$DRI" = xyes || test "x$DRI2" = xyes; } && test "x$AIGLX" = xyes; then
-  AIGLX_DRI_LOADER_TRUE=
-  AIGLX_DRI_LOADER_FALSE='#'
-else
-  AIGLX_DRI_LOADER_TRUE='#'
-  AIGLX_DRI_LOADER_FALSE=
-fi
-
-
-if test "x$GLX_USE_TLS" = xyes ; then
-	GLX_DEFINES="-DGLX_USE_TLS -DPTHREADS"
-	GLX_SYS_LIBS="$GLX_SYS_LIBS -lpthread"
-fi
-
-
-
  if test "x$DRI" = xyes; then
   DRI_TRUE=
   DRI_FALSE='#'
@@ -23719,6 +25008,7 @@
 $as_echo "#define DRI2 1" >>confdefs.h
 
 		DRI2=yes
+		LIBGL="gl >= 9.2.0"
 		SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $DRI2PROTO"
 		;;
 esac
@@ -23731,7 +25021,353 @@
 fi
 
 
-if test "x$DRI" = xyes || test "x$DRI2" = xyes || test "x$CONFIG_UDEV_KMS" = xyes; then
+
+
+# Check whether --with-shared-memory-dir was given.
+if test "${with_shared_memory_dir+set}" = set; then :
+  withval=$with_shared_memory_dir;
+else
+  with_shared_memory_dir=yes
+fi
+
+
+shmdirs="/run/shm /var/tmp /tmp"
+
+case x"$with_shared_memory_dir" in
+xyes)
+	for dir in $shmdirs; do
+		case x"$with_shared_memory_dir" in
+		xyes)
+			echo Checking temp dir "$dir"
+			if test -d "$dir"; then
+				with_shared_memory_dir="$dir"
+			fi
+			;;
+		esac
+	done
+	;;
+x/*)
+	;;
+xno)
+	;;
+*)
+	as_fn_error $? "Invalid directory specified for --with-shared-memory-dir: $with_shared_memory_dir" "$LINENO" 5
+	;;
+esac
+
+case x"$with_shared_memory_dir" in
+xyes)
+	as_fn_error $? "No directory found for shared memory temp files." "$LINENO" 5
+	;;
+xno)
+	;;
+*)
+
+cat >>confdefs.h <<_ACEOF
+#define SHMDIR "$with_shared_memory_dir"
+_ACEOF
+
+	;;
+esac
+
+# 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
+fi
+
+
+case "x$XTRANS_SEND_FDS" in
+xauto)
+	case "$host_os" in
+	linux*|solaris*)
+		XTRANS_SEND_FDS=yes
+		;;
+	*)
+		XTRANS_SEND_FDS=no
+		;;
+	esac
+esac
+
+case "x$XTRANS_SEND_FDS" in
+xyes)
+
+$as_echo "#define XTRANS_SEND_FDS 1" >>confdefs.h
+
+	;;
+esac
+
+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
+
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DRI3PROTO" >&5
+$as_echo_n "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" && \
+    { { $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`
+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`
+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
+	        DRI3PROTO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$DRI3PROTO" 2>&1`
+        else
+	        DRI3PROTO_PKG_ERRORS=`$PKG_CONFIG --print-errors "$DRI3PROTO" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$DRI3PROTO_PKG_ERRORS" >&5
+
+	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
+
+case "$DRI3,$HAVE_DRI3PROTO" in
+	yes,yes | auto,yes)
+		;;
+	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
+		;;
+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
+
+fi
+done
+
+
+BUSFAULT=no
+
+case x"$ac_cv_func_sigaction" in
+	xyes)
+
+$as_echo "#define HAVE_SIGACTION 1" >>confdefs.h
+
+		BUSFAULT=yes
+		;;
+esac
+
+case x"$BUSFAULT" in
+	xyes)
+
+$as_echo "#define BUSFAULT 1" >>confdefs.h
+
+		;;
+esac
+
+ if test x"$BUSFAULT" = xyes; then
+  BUSFAULT_TRUE=
+  BUSFAULT_FALSE='#'
+else
+  BUSFAULT_TRUE='#'
+  BUSFAULT_FALSE=
+fi
+
+
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSHMFENCE" >&5
+$as_echo_n "checking for XSHMFENCE... " >&6; }
+
+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 \"\$XSHMFENCE\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$XSHMFENCE") 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 "$XSHMFENCE" 2>/dev/null`
+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 \"\$XSHMFENCE\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$XSHMFENCE") 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 "$XSHMFENCE" 2>/dev/null`
+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
+	        XSHMFENCE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$XSHMFENCE" 2>&1`
+        else
+	        XSHMFENCE_PKG_ERRORS=`$PKG_CONFIG --print-errors "$XSHMFENCE" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$XSHMFENCE_PKG_ERRORS" >&5
+
+	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$HAVE_XSHMFENCE" = xyes; then
+  XSHMFENCE_TRUE=
+  XSHMFENCE_FALSE='#'
+else
+  XSHMFENCE_TRUE='#'
+  XSHMFENCE_FALSE=
+fi
+
+
+case x"$HAVE_XSHMFENCE" in
+	xyes)
+
+$as_echo "#define HAVE_XSHMFENCE 1" >>confdefs.h
+
+		REQUIRED_LIBS="$REQUIRED_LIBS xshmfence"
+		;;
+esac
+
+
+case "$DRI3,$HAVE_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
+		;;
+esac
+
+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
+
+ 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; then
 	if test "x$DRM" = xyes; then
 
 $as_echo "#define WITH_LIBDRM 1" >>confdefs.h
@@ -23868,6 +25504,249 @@
 fi
 
 
+if test "x$GLX" = xyes; then
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XLIB" >&5
+$as_echo_n "checking for XLIB... " >&6; }
+
+if test -n "$XLIB_CFLAGS"; then
+    pkg_cv_XLIB_CFLAGS="$XLIB_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
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_XLIB_CFLAGS=`$PKG_CONFIG --cflags "x11" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ 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" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "x11") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_XLIB_LIBS=`$PKG_CONFIG --libs "x11" 2>/dev/null`
+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
+	        XLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "x11" 2>&1`
+        else
+	        XLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors "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
+     	{ $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; }
+
+fi
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GL" >&5
+$as_echo_n "checking for GL... " >&6; }
+
+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 \"\$GLPROTO \$LIBGL\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$GLPROTO $LIBGL") 2>&5
+  ac_status=$?
+  $as_echo "$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`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+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 \"\$GLPROTO \$LIBGL\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$GLPROTO $LIBGL") 2>&5
+  ac_status=$?
+  $as_echo "$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`
+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
+	        GL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$GLPROTO $LIBGL" 2>&1`
+        else
+	        GL_PKG_ERRORS=`$PKG_CONFIG --print-errors "$GLPROTO $LIBGL" 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.
+
+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; }
+	{ { $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; }
+
+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; }
+
+fi
+
+
+$as_echo "#define GLXEXT 1" >>confdefs.h
+
+	GLX_LIBS='$(top_builddir)/glx/libglx.la'
+	GLX_SYS_LIBS="$GLX_SYS_LIBS $GL_LIBS"
+else
+        GLX=no
+fi
+ if test "x$GLX" = xyes; then
+  GLX_TRUE=
+  GLX_FALSE='#'
+else
+  GLX_TRUE='#'
+  GLX_FALSE=
+fi
+
+
+if test "x$GLX" = xno; then
+        AIGLX=no
+fi
+
+if test "x$AIGLX" = xyes -a \( "x$DRI2" = xyes \); then
+
+$as_echo "#define AIGLX 1" >>confdefs.h
+
+fi
+ if { test "x$DRI2" = xyes; } && test "x$AIGLX" = xyes; then
+  AIGLX_DRI_LOADER_TRUE=
+  AIGLX_DRI_LOADER_FALSE='#'
+else
+  AIGLX_DRI_LOADER_TRUE='#'
+  AIGLX_DRI_LOADER_FALSE=
+fi
+
+
+if test "x$GLX_USE_TLS" = xyes ; then
+	GLX_DEFINES="-DGLX_USE_TLS -DPTHREADS"
+	GLX_SYS_LIBS="$GLX_SYS_LIBS -lpthread"
+fi
+
+
+
+ if test "x$PRESENT" = xyes; then
+  PRESENT_TRUE=
+  PRESENT_FALSE='#'
+else
+  PRESENT_TRUE='#'
+  PRESENT_FALSE=
+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 "x$XINERAMA" = xyes; then
   XINERAMA_TRUE=
@@ -24118,6 +25997,7 @@
 $as_echo "#define XF86BIGFONT 1" >>confdefs.h
 
 	REQUIRED_MODULES="$REQUIRED_MODULES $BIGFONTPROTO"
+	SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $BIGFONTPROTO"
 fi
 
  if test "x$DPMSExtension" = xyes; then
@@ -24652,7 +26532,7 @@
 
 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)'
+  OS_LIB='$(top_builddir)/os/os.O $(SHA1_LIBS) $(DLOPEN_LIBS) $(LIBUNWIND_LIBS)'
 else
   DIX_LIB='$(top_builddir)/dix/libdix.la'
   OS_LIB='$(top_builddir)/os/libos.la'
@@ -25291,6 +27171,97 @@
 
 fi
 
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBUNWIND" >&5
+$as_echo_n "checking for LIBUNWIND... " >&6; }
+
+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
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_LIBUNWIND_CFLAGS=`$PKG_CONFIG --cflags "libunwind" 2>/dev/null`
+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" && \
+    { { $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`
+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
+	        LIBUNWIND_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libunwind" 2>&1`
+        else
+	        LIBUNWIND_PKG_ERRORS=`$PKG_CONFIG --print-errors "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
+
+if test "x$LIBUNWIND" = "xyes"; then
+    if test "x$HAVE_LIBUNWIND" != "xyes"; then
+        as_fn_error $? "libunwind requested but not installed." "$LINENO" 5
+    fi
+
+$as_echo "#define HAVE_LIBUNWIND 1" >>confdefs.h
+
+fi
+
+ if test "x$LIBUNWIND" = xyes; then
+  HAVE_LIBUNWIND_TRUE=
+  HAVE_LIBUNWIND_FALSE='#'
+else
+  HAVE_LIBUNWIND_TRUE='#'
+  HAVE_LIBUNWIND_FALSE=
+fi
+
+
 # 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
@@ -25428,7 +27399,7 @@
 rm -f conftest*
 
 
-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"
+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"
 
 
 
@@ -25446,7 +27417,7 @@
 
 
 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 $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB"
+	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"
 
 
@@ -25543,7 +27514,7 @@
 	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 $RENDER_LIB $DAMAGE_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"
+	XNEST_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"
 	XNEST_SYS_LIBS="$XNESTMODULES_LIBS $GLX_SYS_LIBS"
 
 
@@ -25569,7 +27540,7 @@
 	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 $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $XI_LIB $XKB_LIB"
+	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"
 
 			symbol_visibility=
 	have_visibility=disabled
@@ -25629,7 +27600,6 @@
 $as_echo_n "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 PCIACCESS" >&5
 $as_echo_n "checking for PCIACCESS... " >&6; }
@@ -25720,9 +27690,9 @@
 $as_echo "yes" >&6; }
 
 fi
-	SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $LIBPCIACCESS"
-	XORG_SYS_LIBS="$XORG_SYS_LIBS $PCIACCESS_LIBS $GLX_SYS_LIBS $LIBDRM_LIBS"
-	XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS $LIBDRM_CFLAGS"
+		SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $LIBPCIACCESS"
+		XORG_SYS_LIBS="$XORG_SYS_LIBS $PCIACCESS_LIBS $GLX_SYS_LIBS $LIBDRM_LIBS"
+		XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS $LIBDRM_CFLAGS"
 
 
 $as_echo "#define XSERVER_LIBPCIACCESS 1" >>confdefs.h
@@ -25744,16 +27714,23 @@
   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
+		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; }
@@ -25768,9 +27745,6 @@
 
 	case $host_os in
 	  linux*)
-		if test "x$LNXAPM" = xyes; then
-			XORG_CFLAGS="$XORG_CFLAGS -DXF86PM"
-		fi
 		XORG_OS_SUBDIR="linux"
 		linux_acpi="no"
 		case $host_cpu in
@@ -25778,11 +27752,28 @@
 		  	linux_alpha=yes
 			;;
 		  i*86|amd64*|x86_64*|ia64*)
-			linux_acpi="yes"
+			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
+_ACEOF
+ linux_apm=$enable_linux_apm
+fi
+
+done
+
+		if test "x$linux_apm" = xyes -o "x$linux_acpi" = xyes; then
+
+$as_echo "#define XF86PM 1" >>confdefs.h
+
+		fi
 		;;
 	  freebsd* | kfreebsd*-gnu | dragonfly*)
 		XORG_OS_SUBDIR="bsd"
@@ -25840,9 +27831,6 @@
 		if test "${OS_MINOR}" -lt 8 ; then
 			as_fn_error $? "This release no longer supports Solaris versions older than Solaris 8." "$LINENO" 5
 		fi
-		if test "x$SUNCC" = "xyes"; then
-			solaris_asm_inline="yes"
-		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"
@@ -25869,11 +27857,6 @@
 			xorg@lists.freedesktop.org." "$LINENO" 5 ;;
 		esac
 
-		if test x$solaris_asm_inline = xyes ; then
-			SOLARIS_ASM_CFLAGS='$(top_srcdir)/hw/xfree86/os-support/solaris/solaris-$(SOLARIS_INOUT_ARCH).il'
-			XORG_CFLAGS="${XORG_CFLAGS} "'$(SOLARIS_ASM_CFLAGS)'
-		fi
-
 		;;
 	  gnu*)
 		XORG_OS_SUBDIR="hurd"
@@ -26552,12 +28535,12 @@
   LNXACPI_FALSE=
 fi
 
- if test "x$solaris_asm_inline" = xyes; then
-  SOLARIS_ASM_INLINE_TRUE=
-  SOLARIS_ASM_INLINE_FALSE='#'
+ if test "x$linux_apm" = xyes; then
+  LNXAPM_TRUE=
+  LNXAPM_FALSE='#'
 else
-  SOLARIS_ASM_INLINE_TRUE='#'
-  SOLARIS_ASM_INLINE_FALSE=
+  LNXAPM_TRUE='#'
+  LNXAPM_FALSE=
 fi
 
  if test "x$solaris_vt" = xyes; then
@@ -26964,8 +28947,8 @@
 			;;
 	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 $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $OS_LIB"
-	XWIN_SYS_LIBS="$XWIN_SYS_LIBS $XWINMODULES_LIBS $GLX_SYS_LIBS"
+	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"
 
 
 
@@ -26990,6 +28973,54 @@
 
 
 	if test "x$XWIN" = xyes && test "x$AIGLX" = 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
 
 pkg_failed=no
@@ -27169,7 +29200,7 @@
 $as_echo "#define ROOTLESS 1" >>confdefs.h
 
 
-	XQUARTZ_LIBS="$MAIN_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"
+	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"
 
 
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for xp_init in -lXplugin" >&5
@@ -27491,12 +29522,12 @@
     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 xrender xfixes \$LIBXI \$DMXPROTO xau \$XDMCP_MODULES\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "xmuu $LIBXEXT x11 xrender xfixes $LIBXI $DMXPROTO xau $XDMCP_MODULES") 2>&5
+    { { $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 xrender xfixes $LIBXI $DMXPROTO xau $XDMCP_MODULES" 2>/dev/null`
+  pkg_cv_DMXMODULES_CFLAGS=`$PKG_CONFIG --cflags "xmuu $LIBXEXT x11 >= 1.6 xrender xfixes $LIBXI $DMXPROTO xau $XDMCP_MODULES" 2>/dev/null`
 else
   pkg_failed=yes
 fi
@@ -27507,12 +29538,12 @@
     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 xrender xfixes \$LIBXI \$DMXPROTO xau \$XDMCP_MODULES\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "xmuu $LIBXEXT x11 xrender xfixes $LIBXI $DMXPROTO xau $XDMCP_MODULES") 2>&5
+    { { $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 xrender xfixes $LIBXI $DMXPROTO xau $XDMCP_MODULES" 2>/dev/null`
+  pkg_cv_DMXMODULES_LIBS=`$PKG_CONFIG --libs "xmuu $LIBXEXT x11 >= 1.6 xrender xfixes $LIBXI $DMXPROTO xau $XDMCP_MODULES" 2>/dev/null`
 else
   pkg_failed=yes
 fi
@@ -27532,9 +29563,9 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        DMXMODULES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xmuu $LIBXEXT x11 xrender xfixes $LIBXI $DMXPROTO xau $XDMCP_MODULES" 2>&1`
+	        DMXMODULES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xmuu $LIBXEXT x11 >= 1.6 xrender xfixes $LIBXI $DMXPROTO xau $XDMCP_MODULES" 2>&1`
         else
-	        DMXMODULES_PKG_ERRORS=`$PKG_CONFIG --print-errors "xmuu $LIBXEXT x11 xrender xfixes $LIBXI $DMXPROTO xau $XDMCP_MODULES" 2>&1`
+	        DMXMODULES_PKG_ERRORS=`$PKG_CONFIG --print-errors "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
@@ -27647,7 +29678,7 @@
 	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 $MIEXT_SYNC_LIB $MIEXT_SHADOW_LIB $MIEXT_DAMAGE_LIB $COMPOSITE_LIB $DAMAGE_LIB $MAIN_LIB $DIX_LIB $CONFIG_LIB $OS_LIB $FIXES_LIB"
+	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 $CONFIG_LIB $OS_LIB $FIXES_LIB"
 	XDMX_SYS_LIBS="$DMXMODULES_LIBS"
 
 
@@ -28432,12 +30463,12 @@
 
     fi
 
-    XEPHYR_REQUIRED_LIBS="x11 $LIBXEXT xau xdmcp"
+    XEPHYR_REQUIRED_LIBS="xau xdmcp xcb xcb-shape xcb-aux xcb-image xcb-icccm xcb-shm xcb-keysyms"
     if test "x$XV" = xyes; then
-        XEPHYR_REQUIRED_LIBS="$XEPHYR_REQUIRED_LIBS xv"
+        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 $LIBGL libdrm"
+        XEPHYR_REQUIRED_LIBS="$XEPHYR_REQUIRED_LIBS libdrm xcb-glx xcb-xf86dri > 1.6"
     fi
 
     if test "x$XEPHYR" = xauto; then
@@ -28660,7 +30691,7 @@
 
     KDRIVE_CFLAGS="$XSERVER_CFLAGS -DHAVE_KDRIVE_CONFIG_H $TSLIB_CFLAGS"
 
-    KDRIVE_PURE_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $OS_LIB"
+    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'
     case $host_os in
 	*linux*)
@@ -28848,7 +30879,7 @@
              ***********************************************" >&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 record/Makefile config/Makefile mi/Makefile miext/Makefile miext/sync/Makefile miext/damage/Makefile miext/shadow/Makefile miext/rootless/Makefile os/Makefile randr/Makefile render/Makefile xkb/Makefile Xext/Makefile Xi/Makefile xfixes/Makefile exa/Makefile hw/Makefile hw/xfree86/Makefile 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/exa/Makefile hw/xfree86/exa/man/Makefile hw/xfree86/fbdevhw/Makefile hw/xfree86/fbdevhw/man/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/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/glx/Makefile hw/xwin/man/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/fake/Makefile hw/kdrive/fbdev/Makefile hw/kdrive/linux/Makefile hw/kdrive/src/Makefile test/Makefile test/xi2/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 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/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/exa/Makefile hw/xfree86/exa/man/Makefile hw/xfree86/fbdevhw/Makefile hw/xfree86/fbdevhw/man/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/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/glx/Makefile hw/xwin/man/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/fake/Makefile hw/kdrive/fbdev/Makefile hw/kdrive/linux/Makefile hw/kdrive/src/Makefile test/Makefile test/xi2/Makefile xserver.ent xorg-server.pc"
 
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -28975,6 +31006,10 @@
   as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${HAVE_DOT_TRUE}" && test -z "${HAVE_DOT_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_DOT\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${HAVE_DOXYGEN_TRUE}" && test -z "${HAVE_DOXYGEN_FALSE}"; then
   as_fn_error $? "conditional \"HAVE_DOXYGEN\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -29032,10 +31067,6 @@
   as_fn_error $? "conditional \"AGP\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
-if test -z "${LNXAPM_TRUE}" && test -z "${LNXAPM_FALSE}"; then
-  as_fn_error $? "conditional \"LNXAPM\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
 if test -z "${FBDEVHW_TRUE}" && test -z "${FBDEVHW_FALSE}"; then
   as_fn_error $? "conditional \"FBDEVHW\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -29160,14 +31191,6 @@
   as_fn_error $? "conditional \"CLIENTIDS\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
-if test -z "${GLX_TRUE}" && test -z "${GLX_FALSE}"; then
-  as_fn_error $? "conditional \"GLX\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${AIGLX_DRI_LOADER_TRUE}" && test -z "${AIGLX_DRI_LOADER_FALSE}"; then
-  as_fn_error $? "conditional \"AIGLX_DRI_LOADER\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
 if test -z "${DRI_TRUE}" && test -z "${DRI_FALSE}"; then
   as_fn_error $? "conditional \"DRI\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -29176,10 +31199,34 @@
   as_fn_error $? "conditional \"DRI2\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${BUSFAULT_TRUE}" && test -z "${BUSFAULT_FALSE}"; then
+  as_fn_error $? "conditional \"BUSFAULT\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${XSHMFENCE_TRUE}" && test -z "${XSHMFENCE_FALSE}"; then
+  as_fn_error $? "conditional \"XSHMFENCE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${DRI3_TRUE}" && test -z "${DRI3_FALSE}"; then
+  as_fn_error $? "conditional \"DRI3\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${DRI2_AIGLX_TRUE}" && test -z "${DRI2_AIGLX_FALSE}"; then
   as_fn_error $? "conditional \"DRI2_AIGLX\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${GLX_TRUE}" && test -z "${GLX_FALSE}"; then
+  as_fn_error $? "conditional \"GLX\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${AIGLX_DRI_LOADER_TRUE}" && test -z "${AIGLX_DRI_LOADER_FALSE}"; then
+  as_fn_error $? "conditional \"AIGLX_DRI_LOADER\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${PRESENT_TRUE}" && test -z "${PRESENT_FALSE}"; then
+  as_fn_error $? "conditional \"PRESENT\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${XINERAMA_TRUE}" && test -z "${XINERAMA_FALSE}"; then
   as_fn_error $? "conditional \"XINERAMA\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -29236,6 +31283,10 @@
   as_fn_error $? "conditional \"DEBUG\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${HAVE_LIBUNWIND_TRUE}" && test -z "${HAVE_LIBUNWIND_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_LIBUNWIND\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${CYGWIN_TRUE}" && test -z "${CYGWIN_FALSE}"; then
   as_fn_error $? "conditional \"CYGWIN\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -29276,8 +31327,8 @@
   as_fn_error $? "conditional \"LNXACPI\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
-if test -z "${SOLARIS_ASM_INLINE_TRUE}" && test -z "${SOLARIS_ASM_INLINE_FALSE}"; then
-  as_fn_error $? "conditional \"SOLARIS_ASM_INLINE\" was never defined.
+if test -z "${LNXAPM_TRUE}" && test -z "${LNXAPM_FALSE}"; then
+  as_fn_error $? "conditional \"LNXAPM\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${SOLARIS_VT_TRUE}" && test -z "${SOLARIS_VT_FALSE}"; then
@@ -29809,7 +31860,7 @@
 # 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.14.2.901, which was
+This file was extended by xorg-server $as_me 1.15.1, which was
 generated by GNU Autoconf 2.68.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -29875,7 +31926,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-xorg-server config.status 1.14.2.901
+xorg-server config.status 1.15.1
 configured by $0, generated by GNU Autoconf 2.68,
   with options \\"\$ac_cs_config\\"
 
@@ -30314,6 +32365,7 @@
     "miext/shadow/Makefile") CONFIG_FILES="$CONFIG_FILES miext/shadow/Makefile" ;;
     "miext/rootless/Makefile") CONFIG_FILES="$CONFIG_FILES miext/rootless/Makefile" ;;
     "os/Makefile") CONFIG_FILES="$CONFIG_FILES os/Makefile" ;;
+    "pseudoramiX/Makefile") CONFIG_FILES="$CONFIG_FILES pseudoramiX/Makefile" ;;
     "randr/Makefile") CONFIG_FILES="$CONFIG_FILES randr/Makefile" ;;
     "render/Makefile") CONFIG_FILES="$CONFIG_FILES render/Makefile" ;;
     "xkb/Makefile") CONFIG_FILES="$CONFIG_FILES xkb/Makefile" ;;
@@ -30321,6 +32373,8 @@
     "Xi/Makefile") CONFIG_FILES="$CONFIG_FILES Xi/Makefile" ;;
     "xfixes/Makefile") CONFIG_FILES="$CONFIG_FILES xfixes/Makefile" ;;
     "exa/Makefile") CONFIG_FILES="$CONFIG_FILES exa/Makefile" ;;
+    "dri3/Makefile") CONFIG_FILES="$CONFIG_FILES dri3/Makefile" ;;
+    "present/Makefile") CONFIG_FILES="$CONFIG_FILES present/Makefile" ;;
     "hw/Makefile") CONFIG_FILES="$CONFIG_FILES hw/Makefile" ;;
     "hw/xfree86/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/Makefile" ;;
     "hw/xfree86/common/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/common/Makefile" ;;

=== modified file 'configure.ac'
--- configure.ac	2013-08-14 10:52:17 +0000
+++ configure.ac	2014-07-01 14:18:40 +0000
@@ -26,11 +26,12 @@
 dnl Process this file with autoconf to create configure.
 
 AC_PREREQ(2.60)
-AC_INIT([xorg-server], 1.14.2.901, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
-RELEASE_DATE="2013-07-25"
-RELEASE_NAME="Act semi-normal-rc1"
+AC_INIT([xorg-server], 1.15.1, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
+RELEASE_DATE="2014-04-13"
+RELEASE_NAME="Heart Candy"
 AC_CONFIG_SRCDIR([Makefile.am])
 AM_INIT_AUTOMAKE([foreign dist-bzip2])
+AC_USE_SYSTEM_EXTENSIONS
 
 # Require xorg-macros minimum of 1.14 for XORG_COMPILER_BRAND in XORG_DEFAULT_OPTIONS
 m4_ifndef([XORG_MACROS_VERSION],
@@ -47,7 +48,7 @@
 XORG_ENABLE_UNIT_TESTS
 XORG_LD_WRAP([optional])
 
-m4_ifndef([XORG_FONT_MACROS_VERSION], [m4_fatal([must install fontutil 1.1 or later before running autoconf/autogen])])
+m4_ifndef([XORG_FONT_MACROS_VERSION], [m4_fatal([must install font-util 1.1 or later before running autoconf/autogen])])
 XORG_FONT_MACROS_VERSION(1.1)
 
 dnl this gets generated by autoheader, and thus contains all the defines.  we
@@ -215,7 +216,7 @@
 dnl Checks for library functions.
 AC_CHECK_FUNCS([backtrace ffs geteuid getuid issetugid getresuid \
 	getdtablesize getifaddrs getpeereid getpeerucred getzoneid \
-	mmap shmctl64 strncasecmp vasprintf vsnprintf walkcontext])
+	mmap seteuid shmctl64 strncasecmp vasprintf vsnprintf walkcontext])
 AC_REPLACE_FUNCS([strcasecmp strcasestr strlcat strlcpy strndup])
 
 dnl Find the math libary, then check for cbrt function in it.
@@ -228,10 +229,6 @@
 AC_CHECK_HEADERS([linux/agpgart.h sys/agpio.h sys/agpgart.h], AGP=yes)
 AM_CONDITIONAL(AGP, [test "x$AGP" = xyes])
 
-dnl APM header
-AC_CHECK_HEADERS([linux/apm_bios.h], LNXAPM=yes)
-AM_CONDITIONAL(LNXAPM, [test "x$LNXAPM" = xyes])
-
 dnl fbdev header
 AC_CHECK_HEADERS([linux/fb.h], FBDEV=yes)
 AM_CONDITIONAL(FBDEVHW, [test "x$FBDEV" = xyes])
@@ -300,7 +297,7 @@
 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 (hw/xfree86/common/xf86Events.c)
+dnl glibc backtrace support check
 AC_CHECK_HEADER([execinfo.h],[
     AC_CHECK_LIB(c, backtrace, [
         AC_DEFINE(HAVE_BACKTRACE, 1, [Has backtrace support])
@@ -606,6 +603,8 @@
 AC_ARG_ENABLE(glx,            AS_HELP_STRING([--disable-glx], [Build GLX extension (default: enabled)]), [GLX=$enableval], [GLX=yes])
 AC_ARG_ENABLE(dri,            AS_HELP_STRING([--enable-dri], [Build DRI extension (default: auto)]), [DRI=$enableval])
 AC_ARG_ENABLE(dri2,           AS_HELP_STRING([--enable-dri2], [Build DRI2 extension (default: auto)]), [DRI2=$enableval], [DRI2=auto])
+AC_ARG_ENABLE(dri3,           AS_HELP_STRING([--enable-dri3], [Build DRI3 extension (default: auto)]), [DRI3=$enableval], [DRI3=auto])
+AC_ARG_ENABLE(present,	      AS_HELP_STRING([--disable-present], [Build Present extension (default: enabled)]), [PRESENT=$enableval], [PRESENT=yes])
 AC_ARG_ENABLE(xinerama,	      AS_HELP_STRING([--disable-xinerama], [Build Xinerama extension (default: enabled)]), [XINERAMA=$enableval], [XINERAMA=yes])
 AC_ARG_ENABLE(xf86vidmode,    AS_HELP_STRING([--disable-xf86vidmode], [Build XF86VidMode extension (default: auto)]), [XF86VIDMODE=$enableval], [XF86VIDMODE=auto])
 AC_ARG_ENABLE(xace,           AS_HELP_STRING([--disable-xace], [Build X-ACE extension (default: enabled)]), [XACE=$enableval], [XACE=yes])
@@ -628,6 +627,8 @@
 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])
 AC_ARG_ENABLE(pciaccess, AS_HELP_STRING([--enable-pciaccess], [Build Xorg with pciaccess library (default: enabled)]), [PCI=$enableval], [PCI=yes])
+AC_ARG_ENABLE(linux_acpi, AC_HELP_STRING([--disable-linux-acpi], [Disable building ACPI support on Linux (if available).]), [enable_linux_acpi=$enableval], [enable_linux_acpi=yes])
+AC_ARG_ENABLE(linux_apm, AC_HELP_STRING([--disable-linux-apm], [Disable building APM support on Linux (if available).]), [enable_linux_apm=$enableval], [enable_linux_apm=yes])
 
 dnl DDXes.
 AC_ARG_ENABLE(xorg,    	      AS_HELP_STRING([--enable-xorg], [Build Xorg server (default: auto)]), [XORG=$enableval], [XORG=auto])
@@ -646,6 +647,7 @@
 AC_ARG_ENABLE(kdrive-kbd,     AS_HELP_STRING([--enable-kdrive-kbd], [Build kbd driver for kdrive (default: auto)]), [KDRIVE_KBD=$enableval], [KDRIVE_KBD=auto])
 AC_ARG_ENABLE(kdrive-mouse,   AC_HELP_STRING([--enable-kdrive-mouse], [Build mouse driver for kdrive (default: auto)]), [KDRIVE_MOUSE=$enableval], [KDRIVE_MOUSE=auto])
 AC_ARG_ENABLE(kdrive-evdev,   AC_HELP_STRING([--enable-kdrive-evdev], [Build evdev driver for kdrive (default: auto)]), [KDRIVE_EVDEV=$enableval], [KDRIVE_EVDEV=auto])
+AC_ARG_ENABLE(libunwind,      AS_HELP_STRING([--enable-libunwind], [Use libunwind for backtracing (default: auto)]), [LIBUNWIND="$enableval"], [LIBUNWIND="auto"])
 
 
 dnl chown/chmod to be setuid root as part of build
@@ -708,6 +710,7 @@
 		CONFIG_UDEV_KMS=no
 		DGA=no
 		DRI2=no
+		DRI3=no
 		INT10MODULE=no
 		PCI=no
 		VGAHW=no
@@ -725,6 +728,7 @@
 		VBE=no
 		DRM=no
 		DRI2=no
+		DRI3=no
 
 		if test x$XQUARTZ = xauto; then
 			AC_CACHE_CHECK([whether to build Xquartz],xorg_cv_Carbon_framework,[
@@ -774,20 +778,22 @@
 RESOURCEPROTO="resourceproto >= 1.2.0"
 DRIPROTO="xf86driproto >= 2.1.0"
 DRI2PROTO="dri2proto >= 2.8"
+DRI3PROTO="dri3proto >= 1.0"
 XINERAMAPROTO="xineramaproto"
 BIGFONTPROTO="xf86bigfontproto >= 1.2.0"
 DGAPROTO="xf86dgaproto >= 2.0.99.1"
-GLPROTO="glproto >= 1.4.16"
+GLPROTO="glproto >= 1.4.17"
 DMXPROTO="dmxproto >= 2.2.99.1"
 VIDMODEPROTO="xf86vidmodeproto >= 2.2.99.1"
 WINDOWSWMPROTO="windowswmproto"
 APPLEWMPROTO="applewmproto >= 1.4"
+XSHMFENCE="xshmfence >= 1.1"
 
 dnl Required modules
 XPROTO="xproto >= 7.0.22"
 RANDRPROTO="randrproto >= 1.4.0"
 RENDERPROTO="renderproto >= 0.11"
-XEXTPROTO="xextproto >= 7.1.99"
+XEXTPROTO="xextproto >= 7.2.99.901"
 INPUTPROTO="inputproto >= 2.3"
 KBPROTO="kbproto >= 1.0.3"
 FONTSPROTO="fontsproto"
@@ -795,7 +801,8 @@
 DAMAGEPROTO="damageproto >= 1.1"
 XCMISCPROTO="xcmiscproto >= 1.2.0"
 BIGREQSPROTO="bigreqsproto >= 1.1.0"
-XTRANS="xtrans >= 1.2.2"
+XTRANS="xtrans >= 1.3.2"
+PRESENTPROTO="presentproto >= 1.0"
 
 dnl List of libraries that require a specific version
 LIBAPPLEWM="applewm >= 1.4"
@@ -1028,12 +1035,14 @@
 if test "x$SCREENSAVER" = xyes; then
 	AC_DEFINE(SCREENSAVER, 1, [Support MIT-SCREEN-SAVER extension])
 	REQUIRED_MODULES="$REQUIRED_MODULES $SCRNSAVERPROTO"
+	SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $SCRNSAVERPROTO"
 fi
 
 AM_CONDITIONAL(RES, [test "x$RES" = xyes])
 if test "x$RES" = xyes; then
 	AC_DEFINE(RES, 1, [Support X resource extension])
 	REQUIRED_MODULES="$REQUIRED_MODULES $RESOURCEPROTO"
+	SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $RESOURCEPROTO"
 fi
 
 # The XRes extension may support client ID tracking only if it has
@@ -1055,34 +1064,6 @@
 AC_MSG_RESULT([$CLIENTIDS])
 AM_CONDITIONAL(CLIENTIDS, [test "x$CLIENTIDS" = xyes])
 
-if test "x$GLX" = xyes; then
-	PKG_CHECK_MODULES([XLIB], [x11])
-	PKG_CHECK_MODULES([GL], $GLPROTO $LIBGL)
-	AC_SUBST(XLIB_CFLAGS)
-	AC_DEFINE(GLXEXT, 1, [Build GLX extension])
-	GLX_LIBS='$(top_builddir)/glx/libglx.la'
-	GLX_SYS_LIBS="$GLX_SYS_LIBS"
-else
-        GLX=no
-fi
-AM_CONDITIONAL(GLX, test "x$GLX" = xyes)
-
-if test "x$GLX" = xno; then
-        AIGLX=no
-fi
-
-if test "x$AIGLX" = xyes -a \( "x$DRI" = xyes -o "x$DRI2" = xyes \); then
-	AC_DEFINE(AIGLX, 1, [Build AIGLX loader])
-fi
-AM_CONDITIONAL(AIGLX_DRI_LOADER, { test "x$DRI" = xyes || test "x$DRI2" = xyes; } && test "x$AIGLX" = xyes)
-
-if test "x$GLX_USE_TLS" = xyes ; then
-	GLX_DEFINES="-DGLX_USE_TLS -DPTHREADS"
-	GLX_SYS_LIBS="$GLX_SYS_LIBS -lpthread"
-fi
-AC_SUBST([GLX_DEFINES])
-AC_SUBST([GLX_SYS_LIBS])
-
 AM_CONDITIONAL(DRI, test "x$DRI" = xyes)
 if test "x$DRI" = xyes; then
 	AC_DEFINE(XF86DRI, 1, [Build DRI extension])
@@ -1099,12 +1080,168 @@
 	yes,yes | auto,yes)
 		AC_DEFINE(DRI2, 1, [Build DRI2 extension])
 		DRI2=yes
+		LIBGL="gl >= 9.2.0"
 		SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $DRI2PROTO"
 		;;
 esac
 AM_CONDITIONAL(DRI2, test "x$DRI2" = xyes)
 
-if test "x$DRI" = xyes || test "x$DRI2" = xyes || test "x$CONFIG_UDEV_KMS" = xyes; then
+dnl
+dnl Locate a suitable tmp file system for creating shared memeory files
+dnl
+
+AC_ARG_WITH(shared-memory-dir, AS_HELP_STRING([--with-shared-memory-dir=PATH], [Path to directory in a world-writable temporary directory for anonymous shared memory (default: auto)]),
+[],
+[with_shared_memory_dir=yes])
+
+shmdirs="/run/shm /var/tmp /tmp"
+
+case x"$with_shared_memory_dir" in
+xyes)
+	for dir in $shmdirs; do
+		case x"$with_shared_memory_dir" in
+		xyes)
+			echo Checking temp dir "$dir"
+			if test -d "$dir"; then
+				with_shared_memory_dir="$dir"
+			fi
+			;;
+		esac
+	done
+	;;
+x/*)
+	;;
+xno)
+	;;
+*)
+	AC_MSG_ERROR([Invalid directory specified for --with-shared-memory-dir: $with_shared_memory_dir])
+	;;
+esac
+
+case x"$with_shared_memory_dir" in
+xyes)
+	AC_MSG_ERROR([No directory found for shared memory temp files.])
+	;;
+xno)
+	;;
+*)
+	AC_DEFINE_UNQUOTED(SHMDIR, ["$with_shared_memory_dir"], [Directory for shared memory temp files])
+	;;
+esac
+
+AC_ARG_ENABLE(xtrans-send-fds,	AS_HELP_STRING([--disable-xtrans-send-fds], [Use Xtrans support for fd passing (default: auto)]), [XTRANS_SEND_FDS=$enableval], [XTRANS_SEND_FDS=auto])
+
+case "x$XTRANS_SEND_FDS" in
+xauto)
+	case "$host_os" in
+	linux*|solaris*)
+		XTRANS_SEND_FDS=yes
+		;;
+	*)
+		XTRANS_SEND_FDS=no
+		;;
+	esac
+esac
+
+case "x$XTRANS_SEND_FDS" in
+xyes)
+	AC_DEFINE(XTRANS_SEND_FDS, 1, [Enable xtrans fd passing support])
+	;;
+esac
+
+case "$DRI3,$XTRANS_SEND_FDS" in
+	yes,yes | auto,yes)
+		;;
+	yes,no)
+		AC_MSG_ERROR([DRI3 requested, but xtrans fd passing support not found.])
+		DRI3=no
+		;;
+	no,*)
+		;;
+	*)
+		AC_MSG_NOTICE([DRI3 disabled because xtrans fd passing support not found.])
+		DRI3=no
+		;;
+esac
+
+PKG_CHECK_MODULES([DRI3PROTO], $DRI3PROTO,
+                  [HAVE_DRI3PROTO=yes], [HAVE_DRI3PROTO=no])
+
+case "$DRI3,$HAVE_DRI3PROTO" in
+	yes,yes | auto,yes)
+		;;
+	yes,no)
+		AC_MSG_ERROR([DRI3 requested, but dri3proto not found.])
+		DRI3=no
+		;;
+	no,*)
+		;;
+	*)
+		AC_MSG_NOTICE([DRI3 disabled because dri3proto not found.])
+		DRI3=no
+		;;
+esac
+
+AC_CHECK_FUNCS([sigaction])
+
+BUSFAULT=no
+
+case x"$ac_cv_func_sigaction" in
+	xyes)
+		AC_DEFINE(HAVE_SIGACTION, 1, [Have sigaction function])
+		BUSFAULT=yes
+		;;
+esac
+
+case x"$BUSFAULT" in
+	xyes)
+		AC_DEFINE(BUSFAULT, 1, [Include busfault OS API])
+		;;
+esac
+
+AM_CONDITIONAL(BUSFAULT, test x"$BUSFAULT" = xyes)
+
+PKG_CHECK_MODULES([XSHMFENCE], $XSHMFENCE,
+		  [HAVE_XSHMFENCE=yes], [HAVE_XSHMFENCE=no])
+
+AM_CONDITIONAL(XSHMFENCE, test "x$HAVE_XSHMFENCE" = xyes)
+
+case x"$HAVE_XSHMFENCE" in
+	xyes)
+		AC_DEFINE(HAVE_XSHMFENCE, 1, [Have X Shared Memory Fence library])
+		REQUIRED_LIBS="$REQUIRED_LIBS xshmfence"
+		;;
+esac
+
+
+case "$DRI3,$HAVE_XSHMFENCE" in
+	yes,yes | auto,yes)
+		;;
+	yes,no)
+		AC_MSG_ERROR([DRI3 requested, but xshmfence not found.])
+		DRI3=no
+		;;
+	no,*)
+		;;
+	*)
+		AC_MSG_NOTICE([DRI3 disabled because xshmfence not found.])
+		DRI3=no
+		;;
+esac
+
+case x"$DRI3" in
+	xyes|xauto)
+		DRI3=yes
+		AC_DEFINE(DRI3, 1, [Build DRI3 extension])
+		DRI3_LIB='$(top_builddir)/dri3/libdri3.la'
+		SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $DRI3PROTO"
+		AC_MSG_NOTICE([DRI3 enabled]);
+		;;
+esac
+
+AM_CONDITIONAL(DRI3, test "x$DRI3" = xyes)
+
+if test "x$DRI" = xyes || test "x$DRI2" = xyes || test "x$DRI3" = xyes || test "x$CONFIG_UDEV_KMS" = xyes; then
 	if test "x$DRM" = xyes; then
 		AC_DEFINE(WITH_LIBDRM, 1, [Building with libdrm support])
 		PKG_CHECK_MODULES([LIBDRM], $LIBDRM)
@@ -1132,6 +1269,42 @@
 fi
 AM_CONDITIONAL(DRI2_AIGLX, test "x$DRI2_AIGLX" = xyes)
 
+if test "x$GLX" = xyes; then
+	PKG_CHECK_MODULES([XLIB], [x11])
+	PKG_CHECK_MODULES([GL], $GLPROTO $LIBGL)
+	AC_SUBST(XLIB_CFLAGS)
+	AC_DEFINE(GLXEXT, 1, [Build GLX extension])
+	GLX_LIBS='$(top_builddir)/glx/libglx.la'
+	GLX_SYS_LIBS="$GLX_SYS_LIBS $GL_LIBS"
+else
+        GLX=no
+fi
+AM_CONDITIONAL(GLX, test "x$GLX" = xyes)
+
+if test "x$GLX" = xno; then
+        AIGLX=no
+fi
+
+if test "x$AIGLX" = xyes -a \( "x$DRI2" = xyes \); then
+	AC_DEFINE(AIGLX, 1, [Build AIGLX loader])
+fi
+AM_CONDITIONAL(AIGLX_DRI_LOADER, { test "x$DRI2" = xyes; } && test "x$AIGLX" = xyes)
+
+if test "x$GLX_USE_TLS" = xyes ; then
+	GLX_DEFINES="-DGLX_USE_TLS -DPTHREADS"
+	GLX_SYS_LIBS="$GLX_SYS_LIBS -lpthread"
+fi
+AC_SUBST([GLX_DEFINES])
+AC_SUBST([GLX_SYS_LIBS])
+
+AM_CONDITIONAL(PRESENT, [test "x$PRESENT" = xyes])
+if test "x$PRESENT" = xyes; then
+	AC_DEFINE(PRESENT, 1, [Support Present extension])
+	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
 
 AM_CONDITIONAL(XINERAMA, [test "x$XINERAMA" = xyes])
 if test "x$XINERAMA" = xyes; then
@@ -1177,6 +1350,7 @@
 if test "x$XF86BIGFONT" = xyes; then
 	AC_DEFINE(XF86BIGFONT, 1, [Support XF86 Big font extension])
 	REQUIRED_MODULES="$REQUIRED_MODULES $BIGFONTPROTO"
+	SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $BIGFONTPROTO"
 fi
 
 AM_CONDITIONAL(DPMSExtension, [test "x$DPMSExtension" = xyes])
@@ -1336,7 +1510,7 @@
 
 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)'
+  OS_LIB='$(top_builddir)/os/os.O $(SHA1_LIBS) $(DLOPEN_LIBS) $(LIBUNWIND_LIBS)'
 else
   DIX_LIB='$(top_builddir)/dix/libdix.la'
   OS_LIB='$(top_builddir)/os/libos.la'
@@ -1479,6 +1653,20 @@
 PKG_CHECK_MODULES([XSERVERCFLAGS], [$REQUIRED_MODULES $REQUIRED_LIBS])
 PKG_CHECK_MODULES([XSERVERLIBS], [$REQUIRED_LIBS])
 
+PKG_CHECK_MODULES(LIBUNWIND, libunwind, [HAVE_LIBUNWIND=yes], [HAVE_LIBUNWIND=no])
+if test "x$LIBUNWIND" = "xauto"; then
+    LIBUNWIND="$HAVE_LIBUNWIND"
+fi
+
+if test "x$LIBUNWIND" = "xyes"; then
+    if test "x$HAVE_LIBUNWIND" != "xyes"; then
+        AC_MSG_ERROR([libunwind requested but not installed.])
+    fi
+    AC_DEFINE(HAVE_LIBUNWIND, 1, [Have libunwind support])
+fi
+
+AM_CONDITIONAL(HAVE_LIBUNWIND, [test "x$LIBUNWIND" = xyes])
+
 # 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
@@ -1554,7 +1742,7 @@
 AC_DEFINE([SVR4],1,[Define to 1 on systems derived from System V Release 4])
 AC_MSG_RESULT([yes])], AC_MSG_RESULT([no]))
 
-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"
+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"
 
 dnl ---------------------------------------------------------------------------
 dnl DDX section.
@@ -1567,7 +1755,7 @@
 AM_CONDITIONAL(XVFB, [test "x$XVFB" = xyes])
 
 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 $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB"
+	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"
 	AC_SUBST([XVFB_LIBS])
 	AC_SUBST([XVFB_SYS_LIBS])
@@ -1588,7 +1776,7 @@
 	if test "x$have_xnest" = xno; then
 		AC_MSG_ERROR([Xnest build explicitly requested, but required modules not found.])
 	fi
-	XNEST_LIBS="$FB_LIB $FIXES_LIB $MI_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_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"
+	XNEST_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"
 	XNEST_SYS_LIBS="$XNESTMODULES_LIBS $GLX_SYS_LIBS"
 	AC_SUBST([XNEST_LIBS])
 	AC_SUBST([XNEST_SYS_LIBS])
@@ -1613,7 +1801,7 @@
 	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 $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $XI_LIB $XKB_LIB"
+	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"
 
 	dnl ==================================================================
 	dnl symbol visibility
@@ -1664,24 +1852,30 @@
 
 	AC_MSG_CHECKING([whether to build Xorg PCI functions])
 	if test "x$PCI" = xyes; then
-
-	PKG_CHECK_MODULES([PCIACCESS], $LIBPCIACCESS)
-	SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $LIBPCIACCESS"
-	XORG_SYS_LIBS="$XORG_SYS_LIBS $PCIACCESS_LIBS $GLX_SYS_LIBS $LIBDRM_LIBS"
-	XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS $LIBDRM_CFLAGS"
-
-	AC_DEFINE(XSERVER_LIBPCIACCESS, 1, [Use libpciaccess for all pci manipulation])
-	AC_DEFINE_DIR(PCI_TXT_IDS_PATH, PCI_TXT_IDS_DIR, [Default PCI text file ID path])
-	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
+		PKG_CHECK_MODULES([PCIACCESS], $LIBPCIACCESS)
+		SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $LIBPCIACCESS"
+		XORG_SYS_LIBS="$XORG_SYS_LIBS $PCIACCESS_LIBS $GLX_SYS_LIBS $LIBDRM_LIBS"
+		XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS $LIBDRM_CFLAGS"
+
+		AC_DEFINE(XSERVER_LIBPCIACCESS, 1, [Use libpciaccess for all pci manipulation])
+		AC_DEFINE_DIR(PCI_TXT_IDS_PATH, PCI_TXT_IDS_DIR, [Default PCI text file ID path])
+		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
+			AC_MSG_ERROR([Platform device enumeration requires libpciaccess])
+		fi
+		if test "x$INT10MODULE" = xyes && test "x$INT10" != xstub; then
+			AC_MSG_ERROR([Cannot build int10 without libpciaccess])
+		fi
 	fi
 	AC_MSG_RESULT([$PCI])
 
@@ -1695,9 +1889,6 @@
 
 	case $host_os in
 	  linux*)
-		if test "x$LNXAPM" = xyes; then
-			XORG_CFLAGS="$XORG_CFLAGS -DXF86PM"
-		fi
 		XORG_OS_SUBDIR="linux"
 		linux_acpi="no"
 		case $host_cpu in
@@ -1705,11 +1896,16 @@
 		  	linux_alpha=yes
 			;;
 		  i*86|amd64*|x86_64*|ia64*)
-			linux_acpi="yes"
+			linux_acpi=$enable_linux_acpi
 			;;
 		  *)
 			;;
 		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"
@@ -1740,9 +1936,6 @@
 		if test "${OS_MINOR}" -lt 8 ; then
 			AC_MSG_ERROR([This release no longer supports Solaris versions older than Solaris 8.])
 		fi
-		if test "x$SUNCC" = "xyes"; then
-			solaris_asm_inline="yes"
-		fi
 		AC_CHECK_DECL([_LP64], [SOLARIS_64="yes"], [SOLARIS_64="no"])
 			
 		case $host_cpu in
@@ -1763,11 +1956,6 @@
 			xorg@lists.freedesktop.org.]) ;;
 		esac
 		AC_SUBST([SOLARIS_INOUT_ARCH])
-		if test x$solaris_asm_inline = xyes ; then
-			SOLARIS_ASM_CFLAGS='$(top_srcdir)/hw/xfree86/os-support/solaris/solaris-$(SOLARIS_INOUT_ARCH).il'
-			XORG_CFLAGS="${XORG_CFLAGS} "'$(SOLARIS_ASM_CFLAGS)'
-		fi
-		AC_SUBST([SOLARIS_ASM_CFLAGS])
 		;;
 	  gnu*)
 		XORG_OS_SUBDIR="hurd"
@@ -1872,7 +2060,7 @@
 AM_CONDITIONAL([XORG_BUS_SPARC], [test "x$xorg_bus_sparc" = xyes])
 AM_CONDITIONAL([LINUX_ALPHA], [test "x$linux_alpha" = xyes])
 AM_CONDITIONAL([LNXACPI], [test "x$linux_acpi" = xyes])
-AM_CONDITIONAL([SOLARIS_ASM_INLINE], [test "x$solaris_asm_inline" = xyes])
+AM_CONDITIONAL([LNXAPM], [test "x$linux_apm" = xyes])
 AM_CONDITIONAL([SOLARIS_VT], [test "x$solaris_vt" = xyes])
 AM_CONDITIONAL([DGA], [test "x$DGA" = xyes])
 AM_CONDITIONAL([XF86VIDMODE], [test "x$XF86VIDMODE" = xyes])
@@ -1920,8 +2108,8 @@
 			;;
 	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 $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $OS_LIB"
-	XWIN_SYS_LIBS="$XWIN_SYS_LIBS $XWINMODULES_LIBS $GLX_SYS_LIBS"
+	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"
 	AC_SUBST(XWIN_LIBS)
 	AC_SUBST(XWIN_SERVER_NAME)
 	AC_SUBST(XWIN_SYS_LIBS)
@@ -1937,6 +2125,16 @@
 
 dnl XWin with AIGLX requires OpenGL spec files in order to generate wrapper code for native GL functions
 	if [test "x$XWIN" = xyes && test "x$AIGLX" = xyes] ; then
+           AC_CHECK_PROG(PYTHON3, python3, python3)
+           if test -z "$PYTHON3"; then
+                AC_MSG_ERROR([python3 not found])
+           fi
+           AC_MSG_CHECKING(for python module lxml)
+           $PYTHON3 -c "import lxml;"
+           if test $? -ne 0 ; then
+                AC_MSG_ERROR([not found])
+           fi
+           AC_MSG_RESULT(yes)
            if test "x$KHRONOS_SPEC_DIR" = "xauto" ; then
 		PKG_CHECK_MODULES([KHRONOS_OPENGL_REGISTRY], [khronos-opengl-registry])
 		KHRONOS_SPEC_DIR=`pkg-config khronos-opengl-registry --variable=specdir`
@@ -1960,7 +2158,7 @@
 	AC_DEFINE(XQUARTZ,1,[Have Quartz])
 	AC_DEFINE(ROOTLESS,1,[Build Rootless code])
 
-	XQUARTZ_LIBS="$MAIN_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"
+	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"
 	AC_SUBST([XQUARTZ_LIBS])
 
 	AC_CHECK_LIB([Xplugin],[xp_init],[:])
@@ -1996,7 +2194,7 @@
 dnl DMX DDX
 PKG_CHECK_MODULES(
 	[DMXMODULES],
-	[xmuu $LIBXEXT x11 xrender xfixes $LIBXI $DMXPROTO xau $XDMCP_MODULES],
+	[xmuu $LIBXEXT x11 >= 1.6 xrender xfixes $LIBXI $DMXPROTO xau $XDMCP_MODULES],
 	[PKG_CHECK_MODULES(
 		[XDMXCONFIG_DEP],
 		[xaw7 xmu xt xpm x11],
@@ -2022,7 +2220,7 @@
 	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 $MIEXT_SYNC_LIB $MIEXT_SHADOW_LIB $MIEXT_DAMAGE_LIB $COMPOSITE_LIB $DAMAGE_LIB $MAIN_LIB $DIX_LIB $CONFIG_LIB $OS_LIB $FIXES_LIB"
+	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 $CONFIG_LIB $OS_LIB $FIXES_LIB"
 	XDMX_SYS_LIBS="$DMXMODULES_LIBS"
 	AC_SUBST([XDMX_CFLAGS])
 	AC_SUBST([XDMX_LIBS])
@@ -2105,12 +2303,12 @@
        AC_DEFINE(KDRIVE_MOUSE, 1, [Enable KDrive mouse driver])
     fi
 
-    XEPHYR_REQUIRED_LIBS="x11 $LIBXEXT xau xdmcp"
+    XEPHYR_REQUIRED_LIBS="xau xdmcp xcb xcb-shape xcb-aux xcb-image xcb-icccm xcb-shm xcb-keysyms"
     if test "x$XV" = xyes; then
-        XEPHYR_REQUIRED_LIBS="$XEPHYR_REQUIRED_LIBS xv"
+        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 $LIBGL libdrm"
+        XEPHYR_REQUIRED_LIBS="$XEPHYR_REQUIRED_LIBS libdrm xcb-glx xcb-xf86dri > 1.6"
     fi
 
     if test "x$XEPHYR" = xauto; then
@@ -2131,7 +2329,7 @@
     
     KDRIVE_CFLAGS="$XSERVER_CFLAGS -DHAVE_KDRIVE_CONFIG_H $TSLIB_CFLAGS"
 
-    KDRIVE_PURE_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $OS_LIB"
+    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'
     case $host_os in
 	*linux*)
@@ -2224,7 +2422,7 @@
              ***********************************************])
 fi
 
-AC_OUTPUT([
+AC_CONFIG_FILES([
 Makefile
 glx/Makefile
 include/Makefile
@@ -2245,6 +2443,7 @@
 miext/shadow/Makefile
 miext/rootless/Makefile
 os/Makefile
+pseudoramiX/Makefile
 randr/Makefile
 render/Makefile
 xkb/Makefile
@@ -2252,6 +2451,8 @@
 Xi/Makefile
 xfixes/Makefile
 exa/Makefile
+dri3/Makefile
+present/Makefile
 hw/Makefile
 hw/xfree86/Makefile
 hw/xfree86/common/Makefile
@@ -2324,3 +2525,4 @@
 xserver.ent
 xorg-server.pc
 ])
+AC_OUTPUT

=== modified file 'damageext/Makefile.in'
--- damageext/Makefile.in	2013-08-14 10:52:17 +0000
+++ damageext/Makefile.in	2014-07-01 14:18:40 +0000
@@ -169,9 +169,12 @@
 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@
@@ -203,6 +206,7 @@
 GREP = @GREP@
 HAL_CFLAGS = @HAL_CFLAGS@
 HAL_LIBS = @HAL_LIBS@
+HAVE_DOT = @HAVE_DOT@
 INSTALL = @INSTALL@
 INSTALL_CMD = @INSTALL_CMD@
 INSTALL_DATA = @INSTALL_DATA@
@@ -232,6 +236,8 @@
 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@
@@ -275,6 +281,7 @@
 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 PROJECTROOT = @PROJECTROOT@
+PYTHON3 = @PYTHON3@
 RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
@@ -288,7 +295,6 @@
 SHA1_CFLAGS = @SHA1_CFLAGS@
 SHA1_LIBS = @SHA1_LIBS@
 SHELL = @SHELL@
-SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@
 SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@
 STRICT_CFLAGS = @STRICT_CFLAGS@
 STRIP = @STRIP@
@@ -359,6 +365,8 @@
 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@

=== modified file 'damageext/damageext.c'
--- damageext/damageext.c	2013-08-14 10:52:17 +0000
+++ damageext/damageext.c	2014-07-01 14:18:40 +0000
@@ -1,5 +1,6 @@
 /*
  * Copyright © 2002 Keith Packard
+ * Copyright 2013 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
@@ -25,26 +26,76 @@
 #endif
 
 #include "damageextint.h"
+#include "damagestr.h"
 #include "protocol-versions.h"
 #include "extinit.h"
 
+#ifdef PANORAMIX
+#include "panoramiX.h"
+#include "panoramiXsrv.h"
+
+typedef struct {
+    DamageExtPtr ext;
+    DamagePtr damage[MAXSCREENS];
+} PanoramiXDamageRes;
+
+static RESTYPE XRT_DAMAGE;
+static int (*PanoramiXSaveDamageCreate) (ClientPtr);
+
+#endif
+
 static unsigned char DamageReqCode;
 static int DamageEventBase;
 static RESTYPE DamageExtType;
-static RESTYPE DamageExtWinType;
 
 static DevPrivateKeyRec DamageClientPrivateKeyRec;
 
 #define DamageClientPrivateKey (&DamageClientPrivateKeyRec)
 
 static void
+DamageNoteCritical(ClientPtr pClient)
+{
+    DamageClientPtr pDamageClient = GetDamageClient(pClient);
+
+    /* Composite extension marks clients with manual Subwindows as critical */
+    if (pDamageClient->critical > 0) {
+        SetCriticalOutputPending();
+        pClient->smart_priority = SMART_MAX_PRIORITY;
+    }
+}
+
+static void
+damageGetGeometry(DrawablePtr draw, int *x, int *y, int *w, int *h)
+{
+#ifdef PANORAMIX
+    if (!noPanoramiXExtension && draw->type == DRAWABLE_WINDOW) {
+        WindowPtr win = (WindowPtr)draw;
+
+        if (!win->parent) {
+            *x = screenInfo.x;
+            *y = screenInfo.y;
+            *w = screenInfo.width;
+            *h = screenInfo.height;
+            return;
+        }
+    }
+#endif
+
+    *x = draw->x;
+    *y = draw->y;
+    *w = draw->width;
+    *h = draw->height;
+}
+
+static void
 DamageExtNotify(DamageExtPtr pDamageExt, BoxPtr pBoxes, int nBoxes)
 {
     ClientPtr pClient = pDamageExt->pClient;
-    DamageClientPtr pDamageClient = GetDamageClient(pClient);
     DrawablePtr pDrawable = pDamageExt->pDrawable;
     xDamageNotifyEvent ev;
-    int i;
+    int i, x, y, w, h;
+
+    damageGetGeometry(pDrawable, &x, &y, &w, &h);
 
     UpdateCurrentTimeIf();
     ev = (xDamageNotifyEvent) {
@@ -53,10 +104,10 @@
         .drawable = pDamageExt->drawable,
         .damage = pDamageExt->id,
         .timestamp = currentTime.milliseconds,
-        .geometry.x = pDrawable->x,
-        .geometry.y = pDrawable->y,
-        .geometry.width = pDrawable->width,
-        .geometry.height = pDrawable->height
+        .geometry.x = x,
+        .geometry.y = y,
+        .geometry.width = w,
+        .geometry.height = h
     };
     if (pBoxes) {
         for (i = 0; i < nBoxes; i++) {
@@ -73,15 +124,12 @@
     else {
         ev.area.x = 0;
         ev.area.y = 0;
-        ev.area.width = pDrawable->width;
-        ev.area.height = pDrawable->height;
+        ev.area.width = w;
+        ev.area.height = h;
         WriteEventsToClient(pClient, 1, (xEvent *) &ev);
     }
-    /* Composite extension marks clients with manual Subwindows as critical */
-    if (pDamageClient->critical > 0) {
-        SetCriticalOutputPending();
-        pClient->smart_priority = SMART_MAX_PRIORITY;
-    }
+
+    DamageNoteCritical(pClient);
 }
 
 static void
@@ -163,23 +211,62 @@
     return Success;
 }
 
-static int
-ProcDamageCreate(ClientPtr client)
+static void
+DamageExtRegister(DrawablePtr pDrawable, DamagePtr pDamage, Bool report)
+{
+    DamageSetReportAfterOp(pDamage, TRUE);
+    DamageRegister(pDrawable, pDamage);
+
+    if (report) {
+        RegionPtr pRegion = &((WindowPtr) pDrawable)->borderClip;
+        RegionTranslate(pRegion, -pDrawable->x, -pDrawable->y);
+        DamageReportDamage(pDamage, pRegion);
+        RegionTranslate(pRegion, pDrawable->x, pDrawable->y);
+    }
+}
+
+static DamageExtPtr
+DamageExtCreate(DrawablePtr pDrawable, DamageReportLevel level,
+                ClientPtr client, XID id, XID drawable)
+{
+    DamageExtPtr pDamageExt = malloc(sizeof(DamageExtRec));
+    if (!pDamageExt)
+        return NULL;
+
+    pDamageExt->id = id;
+    pDamageExt->drawable = drawable;
+    pDamageExt->pDrawable = pDrawable;
+    pDamageExt->level = level;
+    pDamageExt->pClient = client;
+    pDamageExt->pDamage = DamageCreate(DamageExtReport, DamageExtDestroy, level,
+                                       FALSE, pDrawable->pScreen, pDamageExt);
+    if (!pDamageExt->pDamage) {
+        free(pDamageExt);
+        return NULL;
+    }
+
+    if (!AddResource(id, DamageExtType, (pointer) pDamageExt))
+        return NULL;
+
+    DamageExtRegister(pDrawable, pDamageExt->pDamage,
+                      pDrawable->type == DRAWABLE_WINDOW);
+
+    return pDamageExt;
+}
+
+static DamageExtPtr
+doDamageCreate(ClientPtr client, int *rc)
 {
     DrawablePtr pDrawable;
     DamageExtPtr pDamageExt;
     DamageReportLevel level;
-    RegionPtr pRegion;
-    int rc;
 
     REQUEST(xDamageCreateReq);
 
-    REQUEST_SIZE_MATCH(xDamageCreateReq);
-    LEGAL_NEW_RESOURCE(stuff->damage, client);
-    rc = dixLookupDrawable(&pDrawable, stuff->drawable, client, 0,
-                           DixGetAttrAccess | DixReadAccess);
-    if (rc != Success)
-        return rc;
+    *rc = dixLookupDrawable(&pDrawable, stuff->drawable, client, 0,
+                            DixGetAttrAccess | DixReadAccess);
+    if (*rc != Success)
+        return NULL;
 
     switch (stuff->level) {
     case XDamageReportRawRectangles:
@@ -196,37 +283,27 @@
         break;
     default:
         client->errorValue = stuff->level;
-        return BadValue;
+        *rc = BadValue;
+        return NULL;
     }
 
-    pDamageExt = malloc(sizeof(DamageExtRec));
+    pDamageExt = DamageExtCreate(pDrawable, level, client, stuff->damage,
+                                 stuff->drawable);
     if (!pDamageExt)
-        return BadAlloc;
-    pDamageExt->id = stuff->damage;
-    pDamageExt->drawable = stuff->drawable;
-    pDamageExt->pDrawable = pDrawable;
-    pDamageExt->level = level;
-    pDamageExt->pClient = client;
-    pDamageExt->pDamage = DamageCreate(DamageExtReport,
-                                       DamageExtDestroy,
-                                       level,
-                                       FALSE, pDrawable->pScreen, pDamageExt);
-    if (!pDamageExt->pDamage) {
-        free(pDamageExt);
-        return BadAlloc;
-    }
-    if (!AddResource(stuff->damage, DamageExtType, (pointer) pDamageExt))
-        return BadAlloc;
-
-    DamageSetReportAfterOp(pDamageExt->pDamage, TRUE);
-    DamageRegister(pDamageExt->pDrawable, pDamageExt->pDamage);
-
-    if (pDrawable->type == DRAWABLE_WINDOW) {
-        pRegion = &((WindowPtr) pDrawable)->borderClip;
-        DamageReportDamage(pDamageExt->pDamage, pRegion);
-    }
-
-    return Success;
+        *rc = BadAlloc;
+
+    return pDamageExt;
+}
+
+static int
+ProcDamageCreate(ClientPtr client)
+{
+    int rc;
+    REQUEST(xDamageCreateReq);
+    REQUEST_SIZE_MATCH(xDamageCreateReq);
+    LEGAL_NEW_RESOURCE(stuff->damage, client);
+    doDamageCreate(client, &rc);
+    return rc;
 }
 
 static int
@@ -241,6 +318,88 @@
     return Success;
 }
 
+#ifdef PANORAMIX
+static RegionPtr
+DamageExtSubtractWindowClip(DamageExtPtr pDamageExt)
+{
+    WindowPtr win = (WindowPtr)pDamageExt->pDrawable;
+    PanoramiXRes *res = NULL;
+    RegionPtr ret;
+    int i;
+
+    if (!win->parent)
+        return &PanoramiXScreenRegion;
+
+    dixLookupResourceByType((void **)&res, win->drawable.id, XRT_WINDOW,
+                            serverClient, DixReadAccess);
+    if (!res)
+        return NULL;
+
+    ret = RegionCreate(NULL, 0);
+    if (!ret)
+        return NULL;
+
+    FOR_NSCREENS_FORWARD(i) {
+        ScreenPtr screen;
+        if (Success != dixLookupWindow(&win, res->info[i].id, serverClient,
+                                       DixReadAccess))
+            goto out;
+
+        screen = win->drawable.pScreen;
+
+        RegionTranslate(ret, -screen->x, -screen->y);
+        if (!RegionUnion(ret, ret, &win->borderClip))
+            goto out;
+        RegionTranslate(ret, screen->x, screen->y);
+    }
+
+    return ret;
+
+out:
+    RegionDestroy(ret);
+    return NULL;
+}
+
+static void
+DamageExtFreeWindowClip(RegionPtr reg)
+{
+    if (reg != &PanoramiXScreenRegion)
+        RegionDestroy(reg);
+}
+#endif
+
+/*
+ * DamageSubtract intersects with borderClip, so we must reconstruct the
+ * protocol's perspective of same...
+ */
+static Bool
+DamageExtSubtract(DamageExtPtr pDamageExt, const RegionPtr pRegion)
+{
+    DamagePtr pDamage = pDamageExt->pDamage;
+
+#ifdef PANORAMIX
+    if (!noPanoramiXExtension) {
+        RegionPtr damage = DamageRegion(pDamage);
+        RegionSubtract(damage, damage, pRegion);
+
+        if (pDamageExt->pDrawable->type == DRAWABLE_WINDOW) {
+            DrawablePtr pDraw = pDamageExt->pDrawable;
+            RegionPtr clip = DamageExtSubtractWindowClip(pDamageExt);
+            if (clip) {
+                RegionTranslate(clip, -pDraw->x, -pDraw->y);
+                RegionIntersect(damage, damage, clip);
+                RegionTranslate(clip, pDraw->x, pDraw->y);
+                DamageExtFreeWindowClip(clip);
+            }
+        }
+
+        return RegionNotEmpty(damage);
+    }
+#endif
+
+    return DamageSubtract(pDamage, pRegion);
+}
+
 static int
 ProcDamageSubtract(ClientPtr client)
 {
@@ -260,7 +419,7 @@
         if (pRepair) {
             if (pParts)
                 RegionIntersect(pParts, DamageRegion(pDamage), pRepair);
-            if (DamageSubtract(pDamage, pRepair))
+            if (DamageExtSubtract(pDamageExt, pRepair))
                 DamageExtReport(pDamage, DamageRegion(pDamage),
                                 (void *) pDamageExt);
         }
@@ -270,6 +429,7 @@
             DamageEmpty(pDamage);
         }
     }
+
     return Success;
 }
 
@@ -307,11 +467,14 @@
 #define NUM_VERSION_REQUESTS	(sizeof (version_requests) / sizeof (version_requests[0]))
 
 static int (*ProcDamageVector[XDamageNumberRequests]) (ClientPtr) = {
-/*************** Version 1 ******************/
+    /*************** Version 1 ******************/
     ProcDamageQueryVersion,
-        ProcDamageCreate, ProcDamageDestroy, ProcDamageSubtract,
-/*************** Version 1.1 ****************/
-ProcDamageAdd,};
+    ProcDamageCreate,
+    ProcDamageDestroy,
+    ProcDamageSubtract,
+    /*************** Version 1.1 ****************/
+    ProcDamageAdd,
+};
 
 static int
 ProcDamageDispatch(ClientPtr client)
@@ -387,11 +550,14 @@
 }
 
 static int (*SProcDamageVector[XDamageNumberRequests]) (ClientPtr) = {
-/*************** Version 1 ******************/
+    /*************** Version 1 ******************/
     SProcDamageQueryVersion,
-        SProcDamageCreate, SProcDamageDestroy, SProcDamageSubtract,
-/*************** Version 1.1 ****************/
-SProcDamageAdd,};
+    SProcDamageCreate,
+    SProcDamageDestroy,
+    SProcDamageSubtract,
+    /*************** Version 1.1 ****************/
+    SProcDamageAdd,
+};
 
 static int
 SProcDamageDispatch(ClientPtr client)
@@ -429,26 +595,13 @@
      * Get rid of the resource table entry hanging from the window id
      */
     pDamageExt->id = 0;
-    if (WindowDrawable(pDamageExt->pDrawable->type))
-        FreeResourceByType(pDamageExt->pDrawable->id, DamageExtWinType, TRUE);
     if (pDamageExt->pDamage) {
-        DamageUnregister(pDamageExt->pDrawable, pDamageExt->pDamage);
         DamageDestroy(pDamageExt->pDamage);
     }
     free(pDamageExt);
     return Success;
 }
 
-static int
-FreeDamageExtWin(pointer value, XID wid)
-{
-    DamageExtPtr pDamageExt = (DamageExtPtr) value;
-
-    if (pDamageExt->id)
-        FreeResource(pDamageExt->id, RT_NONE);
-    return Success;
-}
-
 static void
 SDamageNotifyEvent(xDamageNotifyEvent * from, xDamageNotifyEvent * to)
 {
@@ -466,6 +619,127 @@
     cpswaps(from->geometry.height, to->geometry.height);
 }
 
+#ifdef PANORAMIX
+
+static void
+PanoramiXDamageReport(DamagePtr pDamage, RegionPtr pRegion, void *closure)
+{
+    PanoramiXDamageRes *res = closure;
+    DamageExtPtr pDamageExt = res->ext;
+    WindowPtr pWin = (WindowPtr)pDamage->pDrawable;
+    ScreenPtr pScreen = pDamage->pScreen;
+
+    /* happens on unmap? sigh xinerama */
+    if (RegionNil(pRegion))
+        return;
+
+    /* translate root windows if necessary */
+    if (!pWin->parent)
+        RegionTranslate(pRegion, pScreen->x, pScreen->y);
+
+    /* add our damage to the protocol view */
+    DamageReportDamage(pDamageExt->pDamage, pRegion);
+
+    /* empty our view */
+    DamageEmpty(pDamage);
+}
+
+static void
+PanoramiXDamageExtDestroy(DamagePtr pDamage, void *closure)
+{
+    PanoramiXDamageRes *damage = closure;
+    damage->damage[pDamage->pScreen->myNum] = NULL;
+}
+
+static int
+PanoramiXDamageCreate(ClientPtr client)
+{
+    PanoramiXDamageRes *damage;
+    PanoramiXRes *draw;
+    int i, rc;
+
+    REQUEST(xDamageCreateReq);
+
+    REQUEST_SIZE_MATCH(xDamageCreateReq);
+    LEGAL_NEW_RESOURCE(stuff->damage, client);
+    rc = dixLookupResourceByClass((void **)&draw, stuff->drawable, XRC_DRAWABLE,
+                                  client, DixGetAttrAccess | DixReadAccess);
+    if (rc != Success)
+        return rc;
+
+    if (!(damage = calloc(1, sizeof(PanoramiXDamageRes))))
+        return BadAlloc;
+
+    if (!AddResource(stuff->damage, XRT_DAMAGE, damage))
+        return BadAlloc;
+
+    damage->ext = doDamageCreate(client, &rc);
+    if (rc == Success && draw->type == XRT_WINDOW) {
+        FOR_NSCREENS_FORWARD(i) {
+            DrawablePtr pDrawable;
+            DamagePtr pDamage = DamageCreate(PanoramiXDamageReport,
+                                             PanoramiXDamageExtDestroy,
+                                             DamageReportRawRegion,
+                                             FALSE,
+                                             screenInfo.screens[i],
+                                             damage);
+            if (!pDamage) {
+                rc = BadAlloc;
+            } else {
+                damage->damage[i] = pDamage;
+                rc = dixLookupDrawable(&pDrawable, draw->info[i].id, client,
+                                       M_WINDOW,
+                                       DixGetAttrAccess | DixReadAccess);
+            }
+            if (rc != Success)
+                break;
+
+            DamageExtRegister(pDrawable, pDamage, i != 0);
+        }
+    }
+
+    if (rc != Success)
+        FreeResource(stuff->damage, RT_NONE);
+
+    return rc;
+}
+
+static int
+PanoramiXDamageDelete(void *res, XID id)
+{
+    int i;
+    PanoramiXDamageRes *damage = res;
+
+    FOR_NSCREENS_BACKWARD(i) {
+        if (damage->damage[i]) {
+            DamageDestroy(damage->damage[i]);
+            damage->damage[i] = NULL;
+        }
+    }
+
+    free(damage);
+    return 1;
+}
+
+void
+PanoramiXDamageInit(void)
+{
+    XRT_DAMAGE = CreateNewResourceType(PanoramiXDamageDelete, "XineramaDamage");
+    if (!XRT_DAMAGE)
+        FatalError("Couldn't Xineramify Damage extension\n");
+
+    PanoramiXSaveDamageCreate = ProcDamageVector[X_DamageCreate];
+    ProcDamageVector[X_DamageCreate] = PanoramiXDamageCreate;
+}
+
+void
+PanoramiXDamageReset(void)
+{
+    ProcDamageVector[X_DamageCreate] = PanoramiXSaveDamageCreate;
+}
+
+#endif /* PANORAMIX */
+
 void
 DamageExtensionInit(void)
 {
@@ -479,10 +753,6 @@
     if (!DamageExtType)
         return;
 
-    DamageExtWinType = CreateNewResourceType(FreeDamageExtWin, "DamageExtWin");
-    if (!DamageExtWinType)
-        return;
-
     if (!dixRegisterPrivateKey
         (&DamageClientPrivateKeyRec, PRIVATE_CLIENT, sizeof(DamageClientRec)))
         return;
@@ -500,5 +770,10 @@
             (EventSwapPtr) SDamageNotifyEvent;
         SetResourceTypeErrorValue(DamageExtType,
                                   extEntry->errorBase + BadDamage);
+#ifdef PANORAMIX
+        if (XRT_DAMAGE)
+            SetResourceTypeErrorValue(XRT_DAMAGE,
+                                      extEntry->errorBase + BadDamage);
+#endif
     }
 }

=== modified file 'damageext/damageextint.h'
--- damageext/damageextint.h	2013-08-14 10:52:17 +0000
+++ damageext/damageextint.h	2014-07-01 14:18:40 +0000
@@ -67,4 +67,7 @@
 void
  DamageExtSetCritical(ClientPtr pClient, Bool critical);
 
+void PanoramiXDamageInit(void);
+void PanoramiXDamageReset(void);
+
 #endif                          /* _DAMAGEEXTINT_H_ */

=== modified file 'dbe/Makefile.am'
--- dbe/Makefile.am	2009-03-06 14:44:31 +0000
+++ dbe/Makefile.am	2014-07-01 14:18:40 +0000
@@ -9,5 +9,4 @@
 libdbe_la_SOURCES = \
         dbe.c \
         midbe.c \
-        midbe.h \
-        midbestr.h
+        midbe.h

=== modified file 'dbe/Makefile.in'
--- dbe/Makefile.in	2013-08-14 10:52:17 +0000
+++ dbe/Makefile.in	2014-07-01 14:18:40 +0000
@@ -201,9 +201,12 @@
 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@
@@ -235,6 +238,7 @@
 GREP = @GREP@
 HAL_CFLAGS = @HAL_CFLAGS@
 HAL_LIBS = @HAL_LIBS@
+HAVE_DOT = @HAVE_DOT@
 INSTALL = @INSTALL@
 INSTALL_CMD = @INSTALL_CMD@
 INSTALL_DATA = @INSTALL_DATA@
@@ -264,6 +268,8 @@
 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@
@@ -307,6 +313,7 @@
 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 PROJECTROOT = @PROJECTROOT@
+PYTHON3 = @PYTHON3@
 RANLIB = @RANLIB@
 RAWCPP = @RAWCPP@
 RAWCPPFLAGS = @RAWCPPFLAGS@
@@ -320,7 +327,6 @@
 SHA1_CFLAGS = @SHA1_CFLAGS@
 SHA1_LIBS = @SHA1_LIBS@
 SHELL = @SHELL@
-SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@
 SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@
 STRICT_CFLAGS = @STRICT_CFLAGS@
 STRIP = @STRIP@
@@ -391,6 +397,8 @@
 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@
@@ -475,8 +483,7 @@
 libdbe_la_SOURCES = \
         dbe.c \
         midbe.c \
-        midbe.h \
-        midbestr.h
+        midbe.h
 
 all: all-am
 

=== modified file 'dbe/dbe.c'
--- dbe/dbe.c	2013-08-14 10:52:17 +0000
+++ dbe/dbe.c	2014-07-01 14:18:40 +0000
@@ -90,10 +90,7 @@
     pDbeScreenPriv->GetVisualInfo = NULL;
     pDbeScreenPriv->AllocBackBufferName = NULL;
     pDbeScreenPriv->SwapBuffers = NULL;
-    pDbeScreenPriv->BeginIdiom = NULL;
-    pDbeScreenPriv->EndIdiom = NULL;
     pDbeScreenPriv->WinPrivDelete = NULL;
-    pDbeScreenPriv->ResetProc = NULL;
 
     (*nStubbedScreens)++;
 
@@ -232,8 +229,7 @@
          * Allocate a window priv.
          */
 
-        pDbeWindowPriv =
-            dixAllocateObjectWithPrivates(DbeWindowPrivRec, PRIVATE_DBE_WINDOW);
+        pDbeWindowPriv = calloc(1, sizeof(DbeWindowPrivRec));
         if (!pDbeWindowPriv)
             return BadAlloc;
 
@@ -545,44 +541,6 @@
 
 /******************************************************************************
  *
- * DBE DIX Procedure: ProcDbeBeginIdiom
- *
- * Description:
- *
- *     This function is for processing a DbeBeginIdiom request.
- *     This request informs the server that a complex swap will immediately
- *     follow this request.
- *
- * Return Values:
- *
- *     Success
- *
- *****************************************************************************/
-
-static int
-ProcDbeBeginIdiom(ClientPtr client)
-{
-    /* REQUEST(xDbeBeginIdiomReq); */
-    DbeScreenPrivPtr pDbeScreenPriv;
-    register int i;
-
-    REQUEST_SIZE_MATCH(xDbeBeginIdiomReq);
-
-    for (i = 0; i < screenInfo.numScreens; i++) {
-        pDbeScreenPriv = DBE_SCREEN_PRIV(screenInfo.screens[i]);
-
-        /* Call the DDX begin idiom procedure if there is one. */
-        if (pDbeScreenPriv->BeginIdiom) {
-            (*pDbeScreenPriv->BeginIdiom) (client);
-        }
-    }
-
-    return Success;
-
-}                               /* ProcDbeBeginIdiom() */
-
-/******************************************************************************
- *
  * DBE DIX Procedure: ProcDbeGetVisualInfo
  *
  * Description:
@@ -818,7 +776,7 @@
         return (ProcDbeSwapBuffers(client));
 
     case X_DbeBeginIdiom:
-        return (ProcDbeBeginIdiom(client));
+        return Success;
 
     case X_DbeEndIdiom:
         return Success;
@@ -982,32 +940,6 @@
 
 /******************************************************************************
  *
- * DBE DIX Procedure: SProcDbeBeginIdiom
- *
- * Description:
- *
- *     This function is for processing a DbeBeginIdiom request on a swapped
- *     server.  This request informs the server that a complex swap will
- *     immediately follow this request.
- *
- * Return Values:
- *
- *     Success
- *
- *****************************************************************************/
-
-static int
-SProcDbeBeginIdiom(ClientPtr client)
-{
-    REQUEST(xDbeBeginIdiomReq);
-
-    swaps(&stuff->length);
-    return (ProcDbeBeginIdiom(client));
-
-}                               /* SProcDbeBeginIdiom() */
-
-/******************************************************************************
- *
  * DBE DIX Procedure: SProcDbeGetVisualInfo
  *
  * Description:
@@ -1097,7 +1029,7 @@
         return (SProcDbeSwapBuffers(client));
 
     case X_DbeBeginIdiom:
-        return (SProcDbeBeginIdiom(client));
+        return Success;
 
     case X_DbeEndIdiom:
         return Success;
@@ -1289,7 +1221,7 @@
                       NULL);
 
         /* We are done with the window priv. */
-        dixFreeObjectWithPrivates(pDbeWindowPriv, PRIVATE_DBE_WINDOW);
+        free(pDbeWindowPriv);
     }
 
     return Success;
@@ -1321,10 +1253,7 @@
         if (pDbeScreenPriv) {
             /* Unwrap DestroyWindow, which was wrapped in DbeExtensionInit(). */
             pScreen->DestroyWindow = pDbeScreenPriv->DestroyWindow;
-
-            if (pDbeScreenPriv->ResetProc)
-                (*pDbeScreenPriv->ResetProc) (pScreen);
-
+            pScreen->PositionWindow = pDbeScreenPriv->PositionWindow;
             free(pDbeScreenPriv);
         }
     }

=== modified file 'dbe/dbestruct.h'
--- dbe/dbestruct.h	2013-08-14 10:52:17 +0000
+++ dbe/dbestruct.h	2014-07-01 14:18:40 +0000
@@ -143,6 +143,20 @@
      */
     XID initIDs[DBE_INIT_MAX_IDS];
 
+    /* Pointer to a drawable that contains the contents of the back buffer.
+     */
+    PixmapPtr pBackBuffer;
+
+    /* Pointer to a drawable that contains the contents of the front buffer.
+     * This pointer is only used for the XdbeUntouched swap action.  For that
+     * swap action, we need to copy the front buffer (window) contents into
+     * this drawable, copy the contents of current back buffer drawable (the
+     * back buffer) into the window, swap the front and back drawable pointers,
+     * and then swap the drawable/resource associations in the resource
+     * database.
+     */
+    PixmapPtr pFrontBuffer;
+
     /* Device-specific private information.
      */
     PrivateRec *devPrivates;
@@ -180,16 +194,9 @@
                         int * /*pNumWindows */ ,
                         DbeSwapInfoPtr  /*swapInfo */
         );
-    void (*BeginIdiom) (ClientPtr       /*client */
-        );
-    void (*EndIdiom) (ClientPtr /*client */
-        );
     void (*WinPrivDelete) (DbeWindowPrivPtr /*pDbeWindowPriv */ ,
                            XID  /*bufId */
         );
-    void (*ResetProc) (ScreenPtr        /*pScreen */
-        );
-
 } DbeScreenPrivRec, *DbeScreenPrivPtr;
 
 #endif                          /* DBE_STRUCT_H */

=== modified file 'dbe/midbe.c'
--- dbe/midbe.c	2012-06-04 19:12:23 +0000
+++ dbe/midbe.c	2014-07-01 14:18:40 +0000
@@ -48,7 +48,6 @@
 #include "resource.h"
 #include "opaque.h"
 #include "dbestruct.h"
-#include "midbestr.h"
 #include "regionstr.h"
 #include "gcstruct.h"
 #include "inputstr.h"
@@ -57,9 +56,6 @@
 
 #include <stdio.h>
 
-static DevPrivateKeyRec miDbeWindowPrivPrivKeyRec;
-
-#define miDbeWindowPrivPrivKey (&miDbeWindowPrivPrivKeyRec)
 
 /******************************************************************************
  *
@@ -138,7 +134,6 @@
 {
     ScreenPtr pScreen;
     DbeWindowPrivPtr pDbeWindowPriv;
-    MiDbeWindowPrivPrivPtr pDbeWindowPrivPriv;
     DbeScreenPrivPtr pDbeScreenPriv;
     GCPtr pGC;
     xRectangle clearRect;
@@ -156,12 +151,8 @@
 
         pDbeScreenPriv = DBE_SCREEN_PRIV(pScreen);
 
-        /* Setup the window priv priv. */
-        pDbeWindowPrivPriv = MI_DBE_WINDOW_PRIV_PRIV(pDbeWindowPriv);
-        pDbeWindowPrivPriv->pDbeWindowPriv = pDbeWindowPriv;
-
         /* Get a front pixmap. */
-        if (!(pDbeWindowPrivPriv->pFrontBuffer =
+        if (!(pDbeWindowPriv->pFrontBuffer =
               (*pScreen->CreatePixmap) (pScreen, pDbeWindowPriv->width,
                                         pDbeWindowPriv->height,
                                         pWin->drawable.depth, 0))) {
@@ -169,22 +160,22 @@
         }
 
         /* Get a back pixmap. */
-        if (!(pDbeWindowPrivPriv->pBackBuffer =
+        if (!(pDbeWindowPriv->pBackBuffer =
               (*pScreen->CreatePixmap) (pScreen, pDbeWindowPriv->width,
                                         pDbeWindowPriv->height,
                                         pWin->drawable.depth, 0))) {
-            (*pScreen->DestroyPixmap) (pDbeWindowPrivPriv->pFrontBuffer);
+            (*pScreen->DestroyPixmap) (pDbeWindowPriv->pFrontBuffer);
             return BadAlloc;
         }
 
         /* Security creation/labeling check. */
         rc = XaceHook(XACE_RESOURCE_ACCESS, serverClient, bufId,
-                      dbeDrawableResType, pDbeWindowPrivPriv->pBackBuffer,
+                      dbeDrawableResType, pDbeWindowPriv->pBackBuffer,
                       RT_WINDOW, pWin, DixCreateAccess);
 
         /* Make the back pixmap a DBE drawable resource. */
         if (rc != Success || !AddResource(bufId, dbeDrawableResType,
-                                          pDbeWindowPrivPriv->pBackBuffer)) {
+                                          pDbeWindowPriv->pBackBuffer)) {
             /* free the buffer and the drawable resource */
             FreeResource(bufId, RT_NONE);
             return (rc == Success) ? BadAlloc : rc;
@@ -193,11 +184,11 @@
         /* Clear the back buffer. */
         pGC = GetScratchGC(pWin->drawable.depth, pWin->drawable.pScreen);
         if ((*pDbeScreenPriv->SetupBackgroundPainter) (pWin, pGC)) {
-            ValidateGC((DrawablePtr) pDbeWindowPrivPriv->pBackBuffer, pGC);
+            ValidateGC((DrawablePtr) pDbeWindowPriv->pBackBuffer, pGC);
             clearRect.x = clearRect.y = 0;
-            clearRect.width = pDbeWindowPrivPriv->pBackBuffer->drawable.width;
-            clearRect.height = pDbeWindowPrivPriv->pBackBuffer->drawable.height;
-            (*pGC->ops->PolyFillRect) ((DrawablePtr) pDbeWindowPrivPriv->
+            clearRect.width = pDbeWindowPriv->pBackBuffer->drawable.width;
+            clearRect.height = pDbeWindowPriv->pBackBuffer->drawable.height;
+            (*pGC->ops->PolyFillRect) ((DrawablePtr) pDbeWindowPriv->
                                        pBackBuffer, pGC, 1, &clearRect);
         }
         FreeScratchGC(pGC);
@@ -210,9 +201,8 @@
          */
 
         /* Associate the new ID with an existing pixmap. */
-        pDbeWindowPrivPriv = MI_DBE_WINDOW_PRIV_PRIV(pDbeWindowPriv);
         if (!AddResource(bufId, dbeDrawableResType,
-                         (pointer) pDbeWindowPrivPriv->pBackBuffer)) {
+                         (pointer) pDbeWindowPriv->pBackBuffer)) {
             return BadAlloc;
         }
 
@@ -237,12 +227,10 @@
 miDbeAliasBuffers(DbeWindowPrivPtr pDbeWindowPriv)
 {
     int i;
-    MiDbeWindowPrivPrivPtr pDbeWindowPrivPriv =
-        MI_DBE_WINDOW_PRIV_PRIV(pDbeWindowPriv);
 
     for (i = 0; i < pDbeWindowPriv->nBufferIDs; i++) {
         ChangeResourceValue(pDbeWindowPriv->IDs[i], dbeDrawableResType,
-                            (pointer) pDbeWindowPrivPriv->pBackBuffer);
+                            (pointer) pDbeWindowPriv->pBackBuffer);
     }
 
 }                               /* miDbeAliasBuffers() */
@@ -261,15 +249,15 @@
 miDbeSwapBuffers(ClientPtr client, int *pNumWindows, DbeSwapInfoPtr swapInfo)
 {
     DbeScreenPrivPtr pDbeScreenPriv;
+    DbeWindowPrivPtr pDbeWindowPriv;
     GCPtr pGC;
     WindowPtr pWin;
-    MiDbeWindowPrivPrivPtr pDbeWindowPrivPriv;
     PixmapPtr pTmpBuffer;
     xRectangle clearRect;
 
     pWin = swapInfo[0].pWindow;
     pDbeScreenPriv = DBE_SCREEN_PRIV_FROM_WINDOW(pWin);
-    pDbeWindowPrivPriv = MI_DBE_WINDOW_PRIV_PRIV_FROM_WINDOW(pWin);
+    pDbeWindowPriv = DBE_WINDOW_PRIV(pWin);
     pGC = GetScratchGC(pWin->drawable.depth, pWin->drawable.pScreen);
 
     /*
@@ -286,9 +274,9 @@
         break;
 
     case XdbeUntouched:
-        ValidateGC((DrawablePtr) pDbeWindowPrivPriv->pFrontBuffer, pGC);
+        ValidateGC((DrawablePtr) pDbeWindowPriv->pFrontBuffer, pGC);
         (*pGC->ops->CopyArea) ((DrawablePtr) pWin,
-                               (DrawablePtr) pDbeWindowPrivPriv->pFrontBuffer,
+                               (DrawablePtr) pDbeWindowPriv->pFrontBuffer,
                                pGC, 0, 0, pWin->drawable.width,
                                pWin->drawable.height, 0, 0);
         break;
@@ -305,7 +293,7 @@
      */
 
     ValidateGC((DrawablePtr) pWin, pGC);
-    (*pGC->ops->CopyArea) ((DrawablePtr) pDbeWindowPrivPriv->pBackBuffer,
+    (*pGC->ops->CopyArea) ((DrawablePtr) pDbeWindowPriv->pBackBuffer,
                            (DrawablePtr) pWin, pGC, 0, 0,
                            pWin->drawable.width, pWin->drawable.height, 0, 0);
 
@@ -321,23 +309,23 @@
 
     case XdbeBackground:
         if ((*pDbeScreenPriv->SetupBackgroundPainter) (pWin, pGC)) {
-            ValidateGC((DrawablePtr) pDbeWindowPrivPriv->pBackBuffer, pGC);
+            ValidateGC((DrawablePtr) pDbeWindowPriv->pBackBuffer, pGC);
             clearRect.x = 0;
             clearRect.y = 0;
-            clearRect.width = pDbeWindowPrivPriv->pBackBuffer->drawable.width;
-            clearRect.height = pDbeWindowPrivPriv->pBackBuffer->drawable.height;
-            (*pGC->ops->PolyFillRect) ((DrawablePtr) pDbeWindowPrivPriv->
+            clearRect.width = pDbeWindowPriv->pBackBuffer->drawable.width;
+            clearRect.height = pDbeWindowPriv->pBackBuffer->drawable.height;
+            (*pGC->ops->PolyFillRect) ((DrawablePtr) pDbeWindowPriv->
                                        pBackBuffer, pGC, 1, &clearRect);
         }
         break;
 
     case XdbeUntouched:
         /* Swap pixmap pointers. */
-        pTmpBuffer = pDbeWindowPrivPriv->pBackBuffer;
-        pDbeWindowPrivPriv->pBackBuffer = pDbeWindowPrivPriv->pFrontBuffer;
-        pDbeWindowPrivPriv->pFrontBuffer = pTmpBuffer;
+        pTmpBuffer = pDbeWindowPriv->pBackBuffer;
+        pDbeWindowPriv->pBackBuffer = pDbeWindowPriv->pFrontBuffer;
+        pDbeWindowPriv->pFrontBuffer = pTmpBuffer;
 
-        miDbeAliasBuffers(pDbeWindowPrivPriv->pDbeWindowPriv);
+        miDbeAliasBuffers(pDbeWindowPriv);
 
         break;
 
@@ -427,8 +415,6 @@
 static void
 miDbeWinPrivDelete(DbeWindowPrivPtr pDbeWindowPriv, XID bufId)
 {
-    MiDbeWindowPrivPrivPtr pDbeWindowPrivPriv;
-
     if (pDbeWindowPriv->nBufferIDs != 0) {
         /* We still have at least one more buffer ID associated with this
          * window.
@@ -440,18 +426,15 @@
      * free some stuff.
      */
 
-    pDbeWindowPrivPriv = MI_DBE_WINDOW_PRIV_PRIV(pDbeWindowPriv);
-
     /* Destroy the front and back pixmaps. */
-    if (pDbeWindowPrivPriv->pFrontBuffer) {
-        (*pDbeWindowPriv->pWindow->drawable.pScreen->
-         DestroyPixmap) (pDbeWindowPrivPriv->pFrontBuffer);
-    }
-    if (pDbeWindowPrivPriv->pBackBuffer) {
-        (*pDbeWindowPriv->pWindow->drawable.pScreen->
-         DestroyPixmap) (pDbeWindowPrivPriv->pBackBuffer);
-    }
-
+    if (pDbeWindowPriv->pFrontBuffer) {
+        (*pDbeWindowPriv->pWindow->drawable.pScreen->
+         DestroyPixmap) (pDbeWindowPriv->pFrontBuffer);
+    }
+    if (pDbeWindowPriv->pBackBuffer) {
+        (*pDbeWindowPriv->pWindow->drawable.pScreen->
+         DestroyPixmap) (pDbeWindowPriv->pBackBuffer);
+    }
 }                               /* miDbeWinPrivDelete() */
 
 /******************************************************************************
@@ -627,10 +610,6 @@
     else {
         /* Clear out the new DBE buffer pixmaps. */
 
-        MiDbeWindowPrivPrivPtr pDbeWindowPrivPriv;
-
-        pDbeWindowPrivPriv = MI_DBE_WINDOW_PRIV_PRIV(pDbeWindowPriv);
-
         /* I suppose this could avoid quite a bit of work if
          * it computed the minimal area required.
          */
@@ -641,9 +620,9 @@
         }
         /* Copy the contents of the old front pixmap to the new one. */
         if (pWin->bitGravity != ForgetGravity) {
-            (*pGC->ops->CopyArea) ((DrawablePtr) pDbeWindowPrivPriv->
-                                   pFrontBuffer, (DrawablePtr) pFrontBuffer,
-                                   pGC, sourcex, sourcey, savewidth, saveheight,
+            (*pGC->ops->CopyArea) ((DrawablePtr) pDbeWindowPriv->pFrontBuffer,
+				   (DrawablePtr) pFrontBuffer, pGC,
+				   sourcex, sourcey, savewidth, saveheight,
                                    destx, desty);
         }
 
@@ -654,8 +633,8 @@
         }
         /* Copy the contents of the old back pixmap to the new one. */
         if (pWin->bitGravity != ForgetGravity) {
-            (*pGC->ops->CopyArea) ((DrawablePtr) pDbeWindowPrivPriv->
-                                   pBackBuffer, (DrawablePtr) pBackBuffer, pGC,
+            (*pGC->ops->CopyArea) ((DrawablePtr) pDbeWindowPriv->pBackBuffer,
+				   (DrawablePtr) pBackBuffer, pGC,
                                    sourcex, sourcey, savewidth, saveheight,
                                    destx, desty);
         }
@@ -664,11 +643,11 @@
          * pixmaps.
          */
 
-        (*pScreen->DestroyPixmap) (pDbeWindowPrivPriv->pFrontBuffer);
-        (*pScreen->DestroyPixmap) (pDbeWindowPrivPriv->pBackBuffer);
+        (*pScreen->DestroyPixmap) (pDbeWindowPriv->pFrontBuffer);
+        (*pScreen->DestroyPixmap) (pDbeWindowPriv->pBackBuffer);
 
-        pDbeWindowPrivPriv->pFrontBuffer = pFrontBuffer;
-        pDbeWindowPrivPriv->pBackBuffer = pBackBuffer;
+        pDbeWindowPriv->pFrontBuffer = pFrontBuffer;
+        pDbeWindowPriv->pBackBuffer = pBackBuffer;
 
         /* Make sure all XID are associated with the new back pixmap. */
         miDbeAliasBuffers(pDbeWindowPriv);
@@ -682,30 +661,6 @@
 
 /******************************************************************************
  *
- * DBE MI Procedure: miDbeResetProc
- *
- * Description:
- *
- *     This function is called from DbeResetProc(), which is called at the end
- *     of every server generation.  This function peforms any MI-specific
- *     shutdown tasks.
- *
- *****************************************************************************/
-
-static void
-miDbeResetProc(ScreenPtr pScreen)
-{
-    DbeScreenPrivPtr pDbeScreenPriv;
-
-    pDbeScreenPriv = DBE_SCREEN_PRIV(pScreen);
-
-    /* Unwrap wrappers */
-    pScreen->PositionWindow = pDbeScreenPriv->PositionWindow;
-
-}                               /* miDbeResetProc() */
-
-/******************************************************************************
- *
  * DBE MI Procedure: miDbeInit
  *
  * Description:
@@ -717,10 +672,6 @@
 Bool
 miDbeInit(ScreenPtr pScreen, DbeScreenPrivPtr pDbeScreenPriv)
 {
-    if (!dixRegisterPrivateKey(&miDbeWindowPrivPrivKeyRec, PRIVATE_DBE_WINDOW,
-                               sizeof(MiDbeWindowPrivPrivRec)))
-        return FALSE;
-
     /* Wrap functions. */
     pDbeScreenPriv->PositionWindow = pScreen->PositionWindow;
     pScreen->PositionWindow = miDbePositionWindow;
@@ -729,9 +680,6 @@
     pDbeScreenPriv->GetVisualInfo = miDbeGetVisualInfo;
     pDbeScreenPriv->AllocBackBufferName = miDbeAllocBackBufferName;
     pDbeScreenPriv->SwapBuffers = miDbeSwapBuffers;
-    pDbeScreenPriv->BeginIdiom = 0;
-    pDbeScreenPriv->EndIdiom = 0;
-    pDbeScreenPriv->ResetProc = miDbeResetProc;
     pDbeScreenPriv->WinPrivDelete = miDbeWinPrivDelete;
 
     return TRUE;

=== removed file 'dbe/midbestr.h'
--- dbe/midbestr.h	2012-06-04 19:12:23 +0000
+++ dbe/midbestr.h	1970-01-01 00:00:00 +0000
@@ -1,75 +0,0 @@
-/******************************************************************************
- * 
- * Copyright (c) 1994, 1995  Hewlett-Packard Company
- *
- * 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 HEWLETT-PACKARD COMPANY 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 Hewlett-Packard
- * Company 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 Hewlett-Packard Company.
- * 
- *     Header file for users of machine-independent DBE code
- * 
- *****************************************************************************/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#ifndef MIDBE_STRUCT_H
-#define MIDBE_STRUCT_H
-
-/* DEFINES */
-
-#define MI_DBE_WINDOW_PRIV_PRIV(pDbeWindowPriv) \
-    (!(pDbeWindowPriv) ? NULL : (MiDbeWindowPrivPrivPtr) \
-     dixLookupPrivate(&(pDbeWindowPriv)->devPrivates, miDbeWindowPrivPrivKey))
-
-#define MI_DBE_WINDOW_PRIV_PRIV_FROM_WINDOW(pWin)\
-    MI_DBE_WINDOW_PRIV_PRIV(DBE_WINDOW_PRIV(pWin))
-
-/* TYPEDEFS */
-
-typedef struct _MiDbeWindowPrivPrivRec {
-    /* Place machine-specific fields in here.
-     * Since this is mi code, we do not really have machine-specific fields.
-     */
-
-    /* Pointer to a drawable that contains the contents of the back buffer.
-     */
-    PixmapPtr pBackBuffer;
-
-    /* Pointer to a drawable that contains the contents of the front buffer.
-     * This pointer is only used for the XdbeUntouched swap action.  For that
-     * swap action, we need to copy the front buffer (window) contents into
-     * this drawable, copy the contents of current back buffer drawable (the
-     * back buffer) into the window, swap the front and back drawable pointers,
-     * and then swap the drawable/resource associations in the resource
-     * database.
-     */
-    PixmapPtr pFrontBuffer;
-
-    /* Pointer back to our window private with which we are associated. */
-    DbeWindowPrivPtr pDbeWindowPriv;
-
-} MiDbeWindowPrivPrivRec, *MiDbeWindowPrivPrivPtr;
-
-#endif                          /* MIDBE_STRUCT_H */

=== modified file 'debian/changelog'
--- debian/changelog	2013-08-14 10:52:17 +0000
+++ debian/changelog	2014-07-01 14:18:40 +0000
@@ -1,3 +1,373 @@
+xorg-server (2:1.15.1-0ubuntu7) UNRELEASED; urgency=medium
+
+  * debian/patches/29b1484bb9555e45067669cbfe68a3c40596f4ff.patch
+    - Upstream patch to fix "No devices detected" error for seats
+      other than seat0. (LP: #1209008)
+
+ -- Alberts Muktupāvels <alberts.muktupavels@gmail.com>  Tue, 01 Jul 2014 17:12:51 +0300
+
+xorg-server (2:1.15.1-0ubuntu6) utopic; urgency=medium
+
+  * ppc64el-endian-fix.patch: Fix PPC endian assumptions (LP: #1333422)
+
+ -- Adam Conrad <adconrad@ubuntu.com>  Mon, 23 Jun 2014 23:47:15 -0600
+
+xorg-server (2:1.15.1-0ubuntu5) utopic; urgency=low
+
+  * Add upstream patch to fix some valgrind issues.
+    - xi-dont-copy-too-much.patch
+  * Fix crash related to suspend/shutdown. (LP: #1208473)
+    - mi-dont-process-disabled.patch
+
+ -- Maarten Lankhorst <maarten.lankhorst@ubuntu.com>  Tue, 20 May 2014 11:32:41 +0200
+
+xorg-server (2:1.15.1-0ubuntu4) utopic; urgency=low
+
+  * Resize touch event history if the array is filled up.
+    - xi2-resize-touch.patch
+
+ -- Maarten Lankhorst <maarten.lankhorst@ubuntu.com>  Wed, 07 May 2014 13:52:59 +0200
+
+xorg-server (2:1.15.1-0ubuntu3) utopic; urgency=medium
+
+  * Revive the old drm_device_keep_trying.patch.
+    - Removing the call to get_drm_info fixes switching to guest sessions.
+
+ -- Maarten Lankhorst <maarten.lankhorst@ubuntu.com>  Mon, 28 Apr 2014 10:06:21 +0200
+
+xorg-server (2:1.15.1-0ubuntu2) trusty; urgency=medium
+
+  * Disable support for rotations and transforms
+    on gpu screens for now. (LP: #1308515)
+
+ -- Maarten Lankhorst <maarten.lankhorst@ubuntu.com>  Wed, 16 Apr 2014 10:14:39 +0200
+
+xorg-server (2:1.15.1-0ubuntu1) trusty; urgency=medium
+
+  * Merge from unreleased debian unstable.
+    - Unbreaks KDE desktop effects on IVB+. (LP: #1294666)
+
+ -- Maarten Lankhorst <maarten.lankhorst@ubuntu.com>  Mon, 14 Apr 2014 12:57:12 +0200
+
+xorg-server (2:1.15.1-1) UNRELEASED; urgency=low
+
+  * New upstream release.
+
+ -- Maarten Lankhorst <maarten.lankhorst@ubuntu.com>  Mon, 14 Apr 2014 12:52:18 +0200
+
+xorg-server (2:1.15.0.901-1) unstable; urgency=medium
+
+  [ Robert Millan ]
+  * Add devd input backend for kFreeBSD, and use it instead of hal (closes:
+    #736765, #710196, #683833)
+
+  [ Julien Cristau ]
+  * New upstream release
+
+ -- Julien Cristau <jcristau@debian.org>  Mon, 31 Mar 2014 12:19:57 +0200
+
+xorg-server (2:1.15.0-1ubuntu7) trusty; urgency=medium
+
+  * Fix crash in RRCrtcDetachScanoutPixmap. (LP: #1280743)
+
+ -- Maarten Lankhorst <maarten.lankhorst@ubuntu.com>  Thu, 13 Mar 2014 13:10:52 +0100
+
+xorg-server (2:1.15.0-1ubuntu6) trusty; urgency=low
+
+  * Add a small patch to hopefully fix FTBFS on ppc64el.
+  * Add breaks/replaces on xserver-common-lts-* to fix upgrades from precise.
+
+ -- Maarten Lankhorst <maarten.lankhorst@ubuntu.com>  Thu, 13 Feb 2014 14:06:11 +0100
+
+xorg-server (2:1.15.0-1ubuntu5) trusty; urgency=medium
+
+  * Another no-change rebuild against latest Mir
+
+ -- Łukasz 'sil2100' Zemczak <lukasz.zemczak@canonical.com>  Wed, 12 Feb 2014 18:33:20 +0100
+
+xorg-server (2:1.15.0-1ubuntu4) trusty; urgency=low
+
+  * Only set RR caps that are appropriate to main/gpu screen. (LP: #1277014)
+
+ -- Maarten Lankhorst <maarten.lankhorst@ubuntu.com>  Mon, 10 Feb 2014 18:51:19 +0100
+
+xorg-server (2:1.15.0-1ubuntu3) trusty; urgency=low
+
+  * No-change rebuild against correct libgcrypt.
+
+ -- Maarten Lankhorst <maarten.lankhorst@ubuntu.com>  Thu, 06 Feb 2014 09:38:39 +0000
+
+xorg-server (2:1.15.0-1ubuntu2) trusty; urgency=medium
+
+  * No-change rebuild against latest Mir
+
+ -- Ricardo Salveti de Araujo <ricardo.salveti@canonical.com>  Tue, 04 Feb 2014 20:35:47 -0200
+
+xorg-server (2:1.15.0-1ubuntu1) trusty; urgency=low
+
+  * New upstream release.
+
+ -- Maarten Lankhorst <maarten.lankhorst@ubuntu.com>  Tue, 04 Feb 2014 15:45:00 +0000
+
+xorg-server (2:1.15.0-2) unstable; urgency=medium
+
+  [ Julien Cristau ]
+  * Bump debhelper compat level to 7.
+  * Upload to unstable.
+
+  [ Yaroslav Halchenko ]
+  * Adding xorg-server-source binary package to provide a tarball with
+    original (patched, autoreconfed) sources of the xserver (Closes:
+    #730552)
+
+ -- Julien Cristau <jcristau@debian.org>  Thu, 06 Feb 2014 16:14:15 +0100
+
+xorg-server (2:1.15.0-1) experimental; urgency=low
+
+  * New upstream release.
+
+ -- Maarten Lankhorst <maarten.lankhorst@ubuntu.com>  Mon, 06 Jan 2014 11:00:39 +0100
+
+xorg-server (2:1.14.99.904-2) experimental; urgency=medium
+
+  * Pass VERBOSE=1 to make check to make debugging test failures possible.
+  * Disable dri3 on kfreebsd.  xtrans doesn't enable fd passing there yet.
+
+ -- Julien Cristau <jcristau@debian.org>  Sat, 14 Dec 2013 18:16:17 +0100
+
+xorg-server (2:1.14.99.904-1) experimental; urgency=low
+
+  [ Julien Cristau ]
+  * New upstream release candidate.
+  * Update (build-)dependencies:
+    - bump x11proto-xext-dev, x11proto-gl-dev, xtrans-dev, libgl1-mesa-dev
+    - add x11proto-present-dev, x11proto-dri3-dev, libxshmfence-dev
+  * Enable dri3 (on !hurd) and present extensions.
+  * Point to http://www.debian.org/support instead of the uploader's email
+    address in the Xorg log.
+
+  [ Maarten Lankhorst ]
+  * Disable xorg-server's linux acpi and apm support.  Can only cause bugs.
+
+ -- Julien Cristau <jcristau@debian.org>  Thu, 12 Dec 2013 12:11:14 +0100
+
+xorg-server (2:1.14.99.3-1) experimental; urgency=low
+
+  * New upstream snapshot.
+  * Drop patches applied upstream:
+    - 02_improve-posix-saved-ids-check.diff
+    - 04_hashtabletest-s390x.diff
+    - 10_Include-missing-selection-h.diff
+    - os-move-arpa-inet.h-for-any-win32-system.patch
+    - xfree86-hurd-include-hurd.h.patch
+  * Update build-deps:
+    - bump libx11-dev to 2:1.6 for _XEatDataWords
+    - require xcb bits for Xephyr
+    - xserver-xorg-dev depends on x11proto-xf86bigfont-dev
+  * Bump ABI versions (should have been done upstream, but hasn't yet).
+  * Stop building Xfbdev.
+  * Reduce noise from dh_install --list-missing by deleting some files from the
+    udeb build after make install.
+  * Run abibumpcheck on build instead of clean so it's done on a patched tree.
+  * Remove Drew and Cyril from Uploaders.
+
+ -- Julien Cristau <jcristau@debian.org>  Mon, 21 Oct 2013 23:46:34 +0200
+
+xorg-server (2:1.14.5-1ubuntu4) trusty; urgency=medium
+
+  * Build xserver-xorg-core-udeb on arm64 and ppc64el.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Mon, 03 Feb 2014 15:44:50 +0000
+
+xorg-server (2:1.14.5-1ubuntu3) trusty; urgency=low
+
+  * Add a workaround for a linker crash bug. (LP: #1266492)
+
+ -- Maarten Lankhorst <maarten.lankhorst@ubuntu.com>  Wed, 29 Jan 2014 16:13:36 +0100
+
+xorg-server (2:1.14.5-1ubuntu2) trusty; urgency=medium
+
+  * Don't build XMir on ppc64el.
+
+ -- Matthias Klose <doko@ubuntu.com>  Sun, 15 Dec 2013 22:42:40 +0100
+
+xorg-server (2:1.14.5-1ubuntu1) trusty; urgency=low
+
+  * Merge from released debian-unstable.
+  * Refresh xrandr-rroutputchanged-main.patch.
+
+ -- Maarten Lankhorst <maarten.lankhorst@ubuntu.com>  Fri, 13 Dec 2013 11:24:16 +0100
+
+xorg-server (2:1.14.5-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Maarten Lankhorst <maarten.lankhorst@ubuntu.com>  Fri, 13 Dec 2013 11:10:46 +0100
+
+xorg-server (2:1.14.4.901-0ubuntu2) trusty; urgency=low
+
+  * Re-apply security update again.
+
+ -- Maarten Lankhorst <maarten.lankhorst@ubuntu.com>  Tue, 10 Dec 2013 15:25:04 +0100
+
+xorg-server (2:1.14.4.901-0ubuntu1) trusty; urgency=low
+
+  * New upstream release with some optimus fixes.
+  * Include a patch to fix gpu screen output hotplugging. (LP: #1259561)
+
+ -- Maarten Lankhorst <maarten.lankhorst@ubuntu.com>  Tue, 10 Dec 2013 15:09:07 +0100
+
+xorg-server (2:1.14.4-1ubuntu2) trusty; urgency=low
+
+  * SECURITY UPDATE: unsafe use of xkb cache files
+    - debian/patches/190_cache-xkbcomp_output_for_fast_start_up.patch:
+      updated to not use xkb cache files in /tmp when running a non-root
+      server.
+    - CVE-2013-1056
+
+ -- Marc Deslauriers <marc.deslauriers@ubuntu.com>  Fri, 06 Dec 2013 11:15:23 -0500
+
+xorg-server (2:1.14.4-1ubuntu1) trusty; urgency=low
+
+  * Merge released debian-unstable.
+  * Cherry-pick fix to sync code. (LP: #1238410)
+
+ -- Maarten Lankhorst <maarten.lankhorst@ubuntu.com>  Wed, 04 Dec 2013 13:54:02 +0100
+
+xorg-server (2:1.14.4-1) unstable; urgency=low
+
+  * New upstream release.
+  * Drop upstreamed patches.
+    - 02_improve-posix-saved-ids-check.diff
+    - 04_hashtabletest-s390x.diff
+    - 10_Include-missing-selection-h.diff
+
+ -- Maarten Lankhorst <maarten.lankhorst@ubuntu.com>  Wed, 04 Dec 2013 13:09:36 +0100
+
+xorg-server (2:1.14.3-5ubuntu1) trusty; urgency=low
+
+  * Merge released debian-unstable to fix mesa-10 loading.
+  * Drop avoid-use-after-free.diff, upstreamed.
+
+ -- Maarten Lankhorst <maarten.lankhorst@ubuntu.com>  Mon, 25 Nov 2013 16:17:49 +0100
+
+xorg-server (2:1.14.3-5) unstable; urgency=low
+
+  * Cherry-pick a upstream commit to fix mesa-10 driver loading.
+
+ -- Maarten Lankhorst <maarten.lankhorst@ubuntu.com>  Mon, 25 Nov 2013 14:52:54 +0100
+
+xorg-server (2:1.14.3-3ubuntu4) trusty; urgency=low
+
+  * No-change rebuild for xmir to use the new Mir ABI.
+
+ -- Mathieu Trudel-Lapierre <mathieu-tl@ubuntu.com>  Mon, 28 Oct 2013 13:36:02 -0400
+
+xorg-server (2:1.14.3-3ubuntu3) trusty; urgency=low
+
+  * pixman-validate.patch: Do not render invalid trapezoids. (LP: #1197921)
+
+ -- Maarten Lankhorst <maarten.lankhorst@ubuntu.com>  Wed, 23 Oct 2013 12:11:27 +0200
+
+xorg-server (2:1.14.3-3ubuntu2) saucy-proposed; urgency=low
+
+  * avoid-use-after-free.diff: Fix CVE-2013-4396.
+
+ -- Timo Aaltonen <tjaalton@ubuntu.com>  Tue, 15 Oct 2013 12:05:48 +0300
+
+xorg-server (2:1.14.3-3ubuntu1) saucy; urgency=low
+
+  * Merge from unreleased debian git.
+  * rrcrtc-brackets-are-hard.patch: Replace xf86-detach-scanout.patch
+    with this patch from Fedora. Should fix crashers on hybrid systems
+    (LP: #1210025)
+  * Drop include-selection-h.patch, not needed anymore.
+
+ -- Timo Aaltonen <tjaalton@ubuntu.com>  Thu, 03 Oct 2013 15:30:22 +0300
+
+xorg-server (2:1.14.3-4) unstable; urgency=high
+
+  [ Timo Aaltonen ]
+  * rules: Drop defoma support from the font path. (Closes: #689233,
+    LP: #986061)
+
+  [ Julien Cristau ]
+  * Avoid use-after-free in dix/dixfonts.c: doImageText().  Addresses
+    CVE-2013-4396.
+
+ -- Julien Cristau <jcristau@debian.org>  Sat, 05 Oct 2013 15:57:55 +0200
+
+xorg-server (2:1.14.3-3) unstable; urgency=low
+
+  * Upload to unstable.
+
+ -- Julien Cristau <jcristau@debian.org>  Sun, 22 Sep 2013 16:32:19 +0200
+
+xorg-server (2:1.14.3-2) experimental; urgency=low
+
+  * Delete test-driver on clean.
+  * Add a couple patches to fix FTBFS on hurd (closes: #720736).  Thanks, Pino
+    Toscano!
+
+ -- Julien Cristau <jcristau@debian.org>  Fri, 20 Sep 2013 00:21:41 +0200
+
+xorg-server (2:1.14.3-1) experimental; urgency=low
+
+  [ Julien Cristau ]
+  * Remove the Replaces: xdmx from xdmx-tools, that was before lenny.  That
+    change was done in the 1.10.x timeframe and then lost when moving to
+    1.11.x.
+
+  [ Michele Cane ]
+  * New upstream release.
+
+ -- Julien Cristau <jcristau@debian.org>  Sun, 15 Sep 2013 23:57:26 +0200
+
+xorg-server (2:1.14.2.901-2ubuntu7) saucy; urgency=low
+
+  * Make glx link against glapi for the dispatch table symbols. (LP: #1232000)
+  * Cherry pick a few related glx fixes from upstream.
+
+ -- Maarten Lankhorst <maarten.lankhorst@ubuntu.com>  Tue, 01 Oct 2013 13:30:59 +0200
+
+xorg-server (2:1.14.2.901-2ubuntu6) saucy; urgency=low
+
+  * xmir.patch: Drop vestigial libatomic-ops dependency, fixing
+    driver FTBFS.
+
+ -- Christopher James Halse Rogers <raof@ubuntu.com>  Thu, 26 Sep 2013 08:29:44 -0700
+
+xorg-server (2:1.14.2.901-2ubuntu5) saucy; urgency=low
+
+  * xmir.patch: Drop input on loss of focus. Fixes "I'm sending all my
+    passwords to IRC when I switch to a VT" with associated 
+    unity-system-compositor change. (LP: #1192843)
+  * xmir.patch: Add DPMS support (LP: #1193222)
+  * Drop os-use-libunwind-to-generate-backtraces.patch; this was not enabled
+    due to libunwind8-dev not shipping a pkg-config file. Now that it does,
+    this causes FTBFS on armhf.
+
+ -- Christopher James Halse Rogers <raof@ubuntu.com>  Tue, 24 Sep 2013 08:58:45 -0700
+
+xorg-server (2:1.14.2.901-2ubuntu4) saucy; urgency=low
+
+  * xmir.patch: Add XRandR support
+  * Bump serverminver for XMir API changes
+
+ -- Christopher James Halse Rogers <raof@ubuntu.com>  Thu, 29 Aug 2013 19:42:41 +1000
+
+xorg-server (2:1.14.2.901-2ubuntu3) saucy; urgency=low
+
+  * xmir.patch: Use the API we have, not the API we've documented
+
+ -- Christopher James Halse Rogers <raof@ubuntu.com>  Thu, 22 Aug 2013 15:18:55 +1000
+
+xorg-server (2:1.14.2.901-2ubuntu2) saucy; urgency=low
+
+  * xmir.patch: Update for new API
+
+ -- Christopher James Halse Rogers <raof@ubuntu.com>  Thu, 22 Aug 2013 14:23:40 +1000
+
 xorg-server (2:1.14.2.901-2ubuntu1) saucy; urgency=low
 
   * Merge from released debian-experimental.
@@ -48,6 +418,8 @@
     d/rules.
   * Make build-deps match xserver-xorg-dev dependencies and configure checks.
 
+ -- Julien Cristau <jcristau@debian.org>  Sat, 27 Jul 2013 13:18:28 +0200
+
 xorg-server (2:1.14.2-0ubuntu9) saucy; urgency=low
 
   [ Maarten Lankhorst ]
@@ -529,10 +901,9 @@
       my testing. We may later wish to improve this with some processing in
       the apport hook.
 
- -- Christopher James Halse Rogers <raof@ubuntu.com>  Wed, 25 Jul 2012 16:54:16 +1000
-
  -- Julien Cristau <jcristau@debian.org>  Sat, 27 Jul 2013 13:18:28 +0200
 
+
 xorg-server (2:1.12.4-6.1) unstable; urgency=low
 
   * Non-maintainer upload.

=== modified file 'debian/compat'
--- debian/compat	2009-12-07 15:30:18 +0000
+++ debian/compat	2014-07-01 14:18:40 +0000
@@ -1,1 +1,1 @@
-5
+7

=== modified file 'debian/control'
--- debian/control	2013-08-14 10:52:17 +0000
+++ debian/control	2014-07-01 14:18:40 +0000
@@ -3,12 +3,6 @@
 Priority: optional
 Maintainer: Ubuntu X-SWAT <ubuntu-x@lists.ubuntu.com>
 XSBC-Original-Maintainer: Debian X Strike Force <debian-x@lists.debian.org>
-Uploaders: Drew Parsons <dparsons@debian.org>, Cyril Brulebois <kibi@debian.org>
-# all the Build-Depends up to x11proto-xf86-dri-dev are for the normal Xorg
-# server, and common dependencies for the DIX.
-# x11proto-xf86dri-dev and libdrm-dev are for DRI support for the Xorg server.
-# x11proto-print-dev and libfreetype6-dev are for Xprint
-# everything on is for the DMX and Xnest servers.
 Build-Depends:
  debhelper (>= 7),
  dpkg-dev (>= 1.16.1),
@@ -36,11 +30,13 @@
  x11proto-scrnsaver-dev,
  x11proto-video-dev,
  x11proto-xcmisc-dev (>= 1.2.0),
- x11proto-xext-dev (>= 7.1.99),
+ x11proto-xext-dev (>= 7.2.99.901),
  x11proto-xf86bigfont-dev (>= 1.2.0),
  x11proto-xf86dga-dev (>= 2.0.99.1),
  x11proto-xf86vidmode-dev (>= 2.2.99.1),
- xtrans-dev (>= 1.2.2),
+ x11proto-present-dev,
+ x11proto-dri3-dev,
+ xtrans-dev (>= 1.3.2),
  libxau-dev (>= 1:1.0.5-2),
  x11proto-input-dev (>= 2.3),
  x11proto-dri2-dev (>= 2.8),
@@ -51,20 +47,16 @@
  libpciaccess-dev (>= 0.12.901),
  libgcrypt-dev,
  nettle-dev,
- libdbus-1-dev [kfreebsd-any],
- libhal-dev [kfreebsd-any],
  libudev-dev (>= 151-3) [linux-any],
- libunwind8-dev,
  libselinux1-dev (>= 2.0.80) [linux-any],
  libaudit-dev [linux-any],
  x11proto-xf86dri-dev (>= 2.1.0),
- libdrm-dev (>= 2.4.38-0ubuntu2~) [!hurd-i386],
- x11proto-gl-dev (>= 1.4.16),
- mesa-common-dev (>= 7.10.3-0ubuntu1),
- libgl1-mesa-dev (>= 7.8),
+ libdrm-dev (>= 2.4.3) [!hurd-i386],
+ x11proto-gl-dev (>= 1.4.17),
+ libgl1-mesa-dev (>= 9.2),
  libxmuu-dev (>= 1:0.99.1),
  libxext-dev (>= 1:0.99.1),
- libx11-dev (>= 1:0.99.2),
+ libx11-dev (>= 2:1.6),
  libxrender-dev (>= 1:0.9.0),
  libxi-dev (>= 2:1.7.1.901),
  x11proto-dmx-dev (>= 1:2.2.99.1),
@@ -78,13 +70,26 @@
  libxfixes-dev (>= 1:5.0.1),
  libxv-dev,
  libxinerama-dev,
+ libxshmfence-dev (>= 1.1) [!hurd-i386],
+# XCB bits for Xephyr
+ libxcb1-dev,
+ libxcb-shape0-dev,
+ libxcb-util0-dev,
+ libxcb-image0-dev,
+ libxcb-icccm4-dev,
+ libxcb-shm0-dev,
+ libxcb-keysyms1-dev,
+ libxcb-xv0-dev,
+ libxcb-glx0-dev,
+ libxcb-xf86dri0-dev (>= 1.6),
 # unit tests
  xkb-data,
  x11-xkb-utils,
 # getpeereid()
  libbsd-dev [kfreebsd-any],
 # XMir
- libmirclient-dev (>= 0.0.8+13.10.20130803) [!arm64 !powerpc],
+ libmirclient-dev (>= 0.1.5) [!arm64 !powerpc !ppc64el],
+ libatomic-ops-dev,
 Standards-Version: 3.9.3
 Vcs-Git: git://git.debian.org/git/pkg-xorg/xserver/xorg-server
 Vcs-Browser: http://git.debian.org/?p=pkg-xorg/xserver/xorg-server.git
@@ -95,6 +100,7 @@
  xserver-common (>= ${source:Version}),
  keyboard-configuration [linux-any kfreebsd-any],
  udev (>= 149) [linux-any],
+ devd [kfreebsd-any],
  ${shlibs:Depends},
  ${misc:Depends},
 Recommends: libgl1-mesa-dri (>= 7.10.2-4)
@@ -154,13 +160,14 @@
 XC-Package-Type: udeb
 Section: debian-installer
 # exclude sparc because of linker errors
-Architecture: alpha amd64 armel armhf hppa hurd-i386 i386 ia64 kfreebsd-amd64 kfreebsd-i386 mips mipsel powerpc powerpcspe s390
+Architecture: alpha amd64 arm64 armel armhf hppa hurd-i386 i386 ia64 kfreebsd-amd64 kfreebsd-i386 mips mipsel powerpc powerpcspe ppc64el s390
 Depends:
 # merged: xserver-common (>= ${source:Version}),
  xkb-data-udeb,
  x11-xkb-utils-udeb,
 # disabled: keyboard-configuration [linux-any kfreebsd-any],
  udev-udeb (>= 149) [linux-any],
+ devd-udeb [kfreebsd-any],
  ${shlibs:Depends},
  ${misc:Depends},
 Provides:
@@ -175,22 +182,25 @@
  libpixman-1-dev (>= 0.27.2),
  x11proto-core-dev (>= 7.0.22),
  x11proto-input-dev (>= 2.3),
- x11proto-xext-dev (>= 7.1.99),
+ x11proto-xext-dev (>= 7.2.99.901),
  x11proto-video-dev,
  x11proto-randr-dev (>= 1.4.0),
  x11proto-render-dev (>= 2:0.11),
  x11proto-dri2-dev (>= 2.8),
- x11proto-gl-dev (>= 1.4.16),
+ x11proto-gl-dev (>= 1.4.17),
  x11proto-fonts-dev,
  x11proto-xinerama-dev,
  x11proto-kb-dev,
  x11proto-xf86dri-dev,
  x11proto-resource-dev (>= 1.2.0),
  x11proto-scrnsaver-dev,
+ x11proto-xf86bigfont-dev (>= 1.2.0),
+ x11proto-dri3-dev,
+ x11proto-present-dev,
  libxkbfile-dev,
  libpciaccess-dev,
  mesa-common-dev,
- libmirclient-dev [!arm64 !powerpc],
+ libmirclient-dev [!arm64 !powerpc !ppc64el],
  ${misc:Depends},
 Description: Xorg X server - development files
  This package provides development files for the X.Org ('Xorg') X server.
@@ -234,7 +244,6 @@
  xdmx,
  ${shlibs:Depends},
  ${misc:Depends},
-Replaces: xdmx (<= 2:1.1.1-10)
 Description: Distributed Multihead X tools
  This package provides a collection of tools used for administration of
  the Xdmx server; see the xdmx package for more information.
@@ -316,22 +325,6 @@
  .
  This package is built from the X.org xserver module.
 
-Package: xserver-xfbdev
-Architecture: linux-any
-Depends:
- xserver-common (>= ${source:Version}),
- ${shlibs:Depends},
- ${misc:Depends},
-Provides: xserver
-Description: Linux framebuffer device tiny X server
- xserver-xfbdev is a Linux framebuffer device tiny X server based on the
- kdrive X server.
- .
- More information about X.Org can be found at:
- <URL:http://www.X.org>
- .
- This package is built from the X.org xserver module.
-
 Package: xserver-xorg-core-dbg
 Architecture: any
 Depends:
@@ -359,7 +352,17 @@
 Recommends:
  xfonts-base,
  xauth,
-Replaces: xserver-xorg-core (<< 2:1.5.2)
+Breaks:
+ xserver-common-lts-quantal (<< 3:0),
+ xserver-common-lts-raring (<< 3:0),
+ xserver-common-lts-saucy (<< 3:0),
+ xserver-common-lts-trusty (<< 3:0),
+Replaces:
+ xserver-common-lts-quantal (<< 3:0),
+ xserver-common-lts-raring (<< 3:0),
+ xserver-common-lts-saucy (<< 3:0),
+ xserver-common-lts-trusty (<< 3:0),
+ xserver-xorg-core (<< 2:1.5.2)
 Description: common files used by various X servers
  This package provides files necessary for all X.Org based X servers.
 
@@ -372,3 +375,17 @@
 Description: Xorg - the X.Org X server (module for running nested in Mir)
  xserver-xorg-xmir provides an extension module to support running an
  Xorg as a client of an existing Mir compositor.
+
+Package: xorg-server-source
+Architecture: all
+Depends:
+ ${misc:Depends},
+Description: Xorg X server - source files
+ This package provides original Debian (with Debian patches already
+ applied, and autotools files updated) sources for the X.Org ('Xorg')
+ X server shipped in a tarball.  This enables other projects re-using
+ X server codebase (e.g. VNC servers) to (re-)use officially
+ Debian-supported version of the X xserver for their builds.
+ .
+ Unless you are building a software product using X server sources,
+ you probably want xserver-xorg and/or xserver-xorg-core instead.

=== removed file 'debian/patches/02_improve-posix-saved-ids-check.diff'
--- debian/patches/02_improve-posix-saved-ids-check.diff	2013-08-03 18:17:30 +0000
+++ debian/patches/02_improve-posix-saved-ids-check.diff	1970-01-01 00:00:00 +0000
@@ -1,65 +0,0 @@
-From a2b08b941b841db226d7c9dfd264045abcd8f8b4 Mon Sep 17 00:00:00 2001
-From: Julien Cristau <jcristau@debian.org>
-Date: Sat, 27 Jul 2013 20:09:16 +0200
-Subject: [PATCH] xfree86: improve check for posix saved ids
-
-Replace hardcoded SVR4 || linux || CSRG_BASED with an autoconf check and
-the _POSIX_SAVED_IDS macro.
-
-Suggested-by: Mark Kettenis <mark.kettenis@xs4all.nl>
-Signed-off-by: Julien Cristau <jcristau@debian.org>
----
- configure.ac              |    2 +-
- hw/xfree86/parser/write.c |    3 ++-
- include/xorg-config.h.in  |    3 +++
- 3 files changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index c6ecba4..d27ca23 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -215,7 +215,7 @@ AC_SUBST(DLOPEN_LIBS)
- dnl Checks for library functions.
- AC_CHECK_FUNCS([backtrace ffs geteuid getuid issetugid getresuid \
- 	getdtablesize getifaddrs getpeereid getpeerucred getzoneid \
--	mmap shmctl64 strncasecmp vasprintf vsnprintf walkcontext])
-+	mmap seteuid shmctl64 strncasecmp vasprintf vsnprintf walkcontext])
- AC_REPLACE_FUNCS([strcasecmp strcasestr strlcat strlcpy strndup])
- 
- dnl Find the math libary, then check for cbrt function in it.
-diff --git a/hw/xfree86/parser/write.c b/hw/xfree86/parser/write.c
-index 9c706a0..eb5e3cf 100644
---- a/hw/xfree86/parser/write.c
-+++ b/hw/xfree86/parser/write.c
-@@ -55,6 +55,7 @@
- #include <xorg-config.h>
- #endif
- 
-+#include "os.h"
- #include "xf86Parser.h"
- #include "xf86tokens.h"
- #include "Configint.h"
-@@ -65,7 +66,7 @@
- #include <signal.h>
- #include <errno.h>
- 
--#if defined(SVR4) || defined(__linux__) || defined(CSRG_BASED)
-+#if defined(HAVE_SETEUID) && defined(_POSIX_SAVED_IDS) && _POSIX_SAVED_IDS > 0
- #define HAS_SAVED_IDS_AND_SETEUID
- #endif
- #if defined(WIN32)
-diff --git a/include/xorg-config.h.in b/include/xorg-config.h.in
-index a71b25d..0df31ae 100644
---- a/include/xorg-config.h.in
-+++ b/include/xorg-config.h.in
-@@ -139,4 +139,7 @@
- /* Have X server platform bus support */
- #undef XSERVER_PLATFORM_BUS
- 
-+/* Define to 1 if you have the `seteuid' function. */
-+#undef HAVE_SETEUID
-+
- #endif /* _XORG_CONFIG_H_ */
--- 
-1.7.10.4
-

=== added file 'debian/patches/02_kbsd-input-devd.diff'
--- debian/patches/02_kbsd-input-devd.diff	1970-01-01 00:00:00 +0000
+++ debian/patches/02_kbsd-input-devd.diff	2014-07-01 14:18:40 +0000
@@ -0,0 +1,551 @@
+>From d96e2bd2a2b48ede527ad7071d3e0eeda9861b73 Mon Sep 17 00:00:00 2001
+From: Robert Millan <rmh@debian.org>
+Date: Mon, 24 Feb 2014 23:22:57 +0100
+Subject: [PATCH] Add devd config backend for FreeBSD (and GNU/kFreeBSD)
+
+Based on original code by Baptiste Daroussin, with some fixes made
+by Koop Mast and myself.
+
+Signed-off-by: Robert Millan <rmh@freebsd.org>
+---
+ config/Makefile.am              |    4 +
+ config/config-backends.h        |    5 +
+ config/config.c                 |    5 +
+ config/devd.c                   |  387 +++++++++++++++++++++++++++++++++++++++
+ configure.ac                    |   16 ++
+ hw/xfree86/common/xf86Config.c  |    7 +-
+ hw/xfree86/common/xf86Globals.c |    3 +-
+ include/dix-config.h.in         |    3 +
+ 8 files changed, 427 insertions(+), 3 deletions(-)
+ create mode 100644 config/devd.c
+
+Index: xorg-server/config/Makefile.am
+===================================================================
+--- xorg-server.orig/config/Makefile.am
++++ xorg-server/config/Makefile.am
+@@ -40,6 +40,10 @@ if CONFIG_WSCONS
+ libconfig_la_SOURCES += wscons.c
+ endif # CONFIG_WSCONS
+ 
++if CONFIG_DEVD
++libconfig_la_SOURCES += devd.c
++endif
++
+ endif # CONFIG_NEED_DBUS
+ 
+ endif # !CONFIG_UDEV
+Index: xorg-server/config/config-backends.h
+===================================================================
+--- xorg-server.orig/config/config-backends.h
++++ xorg-server/config/config-backends.h
+@@ -75,3 +75,8 @@ void config_hal_fini(void);
+ int config_wscons_init(void);
+ void config_wscons_fini(void);
+ #endif
++
++#ifdef CONFIG_DEVD
++int config_devd_init(void);
++void config_devd_fini(void);
++#endif
+Index: xorg-server/config/config.c
+===================================================================
+--- xorg-server.orig/config/config.c
++++ xorg-server/config/config.c
+@@ -64,6 +64,9 @@ config_init(void)
+ #elif defined(CONFIG_WSCONS)
+     if (!config_wscons_init())
+         ErrorF("[config] failed to initialise wscons\n");
++#elif defined(CONFIG_DEVD)
++    if (!config_devd_init())
++        ErrorF("[config] failed to initialise devd\n");
+ #endif
+ }
+ 
+@@ -82,6 +85,8 @@ config_fini(void)
+     config_dbus_core_fini();
+ #elif defined(CONFIG_WSCONS)
+     config_wscons_fini();
++#elif defined(CONFIG_DEVD)
++    config_devd_fini();
+ #endif
+ }
+ 
+Index: xorg-server/config/devd.c
+===================================================================
+--- /dev/null
++++ xorg-server/config/devd.c
+@@ -0,0 +1,387 @@
++/*
++ * Copyright © 2012 Baptiste Daroussin
++ * Copyright © 2014 Robert Millan
++ *
++ * 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.
++ *
++ * Author: Baptiste Daroussin <bapt@FreeBSD.org>
++ */
++
++#ifdef HAVE_DIX_CONFIG_H
++#include <dix-config.h>
++#endif
++
++#include <sys/types.h>
++#include <sys/socket.h>
++#include <sys/sysctl.h>
++#include <sys/un.h>
++
++#include <ctype.h>
++#include <errno.h>
++#include <fcntl.h>
++#include <stdlib.h>
++#include <stdio.h>
++#include <stdarg.h>
++#include <stdbool.h>
++#include <unistd.h>
++
++#include "input.h"
++#include "inputstr.h"
++#include "hotplug.h"
++#include "config-backends.h"
++#include "os.h"
++
++#define DEVD_SOCK_PATH "/var/run/devd.pipe"
++
++#define DEVD_EVENT_ADD		'+'
++#define DEVD_EVENT_REMOVE	'-'
++
++static int sock_devd = -1;
++
++struct hw_type {
++    const char *driver;
++    int flag;
++    const char *xdriver;
++};
++
++static struct hw_type hw_types[] = {
++    {"ukbd", ATTR_KEYBOARD, "kbd"},
++    {"atkbd", ATTR_KEYBOARD, "kbd"},
++    {"ums", ATTR_POINTER, "mouse"},
++    {"psm", ATTR_POINTER, "mouse"},
++    {"uhid", ATTR_POINTER, "mouse"},
++    {"joy", ATTR_JOYSTICK, NULL},
++    {"atp", ATTR_TOUCHPAD, NULL},
++    {"uep", ATTR_TOUCHSCREEN, NULL},
++    {NULL, -1, NULL},
++};
++
++static bool
++sysctl_exists(const char *format, ...)
++{
++    va_list args;
++    char *name = NULL;
++    size_t len;
++    int ret;
++
++    if (format == NULL)
++        return false;
++
++    va_start(args, format);
++    vasprintf(&name, format, args);
++    va_end(args);
++
++    ret = sysctlbyname(name, NULL, &len, NULL, 0);
++
++    if (ret == -1)
++        len = 0;
++
++    free(name);
++    return (len > 0);
++}
++
++static char *
++sysctl_get_str(const char *format, ...)
++{
++    va_list args;
++    char *name = NULL;
++    char *dest = NULL;
++    size_t len;
++
++    if (format == NULL)
++        return NULL;
++
++    va_start(args, format);
++    vasprintf(&name, format, args);
++    va_end(args);
++
++    if (sysctlbyname(name, NULL, &len, NULL, 0) == 0) {
++        dest = malloc(len + 1);
++        if (!dest)
++            goto unwind;
++        if (sysctlbyname(name, dest, &len, NULL, 0) == 0)
++            dest[len] = '\0';
++        else {
++            free(dest);
++            dest = NULL;
++        }
++    }
++
++ unwind:
++    free(name);
++    return dest;
++}
++
++static void
++device_added(char *devname)
++{
++    char path[PATH_MAX];
++    char *vendor;
++    char *product = NULL;
++    char *config_info = NULL;
++    char *walk;
++    InputOption *options = NULL;
++    InputAttributes attrs = { };
++    DeviceIntPtr dev = NULL;
++    int i, rc;
++    int fd;
++
++    for (i = 0; hw_types[i].driver != NULL; i++) {
++        if (strncmp(devname, hw_types[i].driver,
++                    strlen(hw_types[i].driver)) == 0 &&
++            isdigit(*(devname + strlen(hw_types[i].driver)))) {
++            attrs.flags |= hw_types[i].flag;
++            break;
++        }
++    }
++    if (hw_types[i].driver == NULL) {
++        LogMessageVerb(X_INFO, 10, "config/devd: ignoring device %s\n",
++                       devname);
++        return;
++    }
++    if (hw_types[i].xdriver == NULL) {
++        LogMessageVerb(X_INFO, 10, "config/devd: ignoring device %s\n",
++                       devname);
++        return;
++    }
++    snprintf(path, sizeof(path), "/dev/%s", devname);
++
++    options = input_option_new(NULL, "_source", "server/devd");
++    if (!options)
++        return;
++
++    vendor =
++        sysctl_get_str("dev.%s.%s.%%desc", hw_types[i].driver,
++                       devname + strlen(hw_types[i].driver));
++    if (vendor == NULL) {
++        attrs.vendor = strdup("(unnamed)");
++        attrs.product = strdup("(unnamed)");
++    }
++    else {
++        if ((walk = strchr(vendor, ' ')) != NULL) {
++            walk[0] = '\0';
++            walk++;
++            product = walk;
++            if ((walk = strchr(product, ',')) != NULL)
++                walk[0] = '\0';
++        }
++
++        attrs.vendor = strdup(vendor);
++        if (product) 
++            attrs.product = strdup(product);
++        else
++            attrs.product = strdup("(unnamed)");
++
++        options = input_option_new(options, "name", xstrdup(attrs.product));
++
++        free(vendor);
++    }
++    attrs.usb_id = NULL;
++    attrs.device = strdup(path);
++    options = input_option_new(options, "driver", hw_types[i].xdriver);
++    if (attrs.flags & ATTR_KEYBOARD) {
++        /*
++         * Don't pass device option if keyboard is attached to console (open fails),
++         * thus activating special logic in xf86-input-keyboard.
++         */
++        fd = open(path, O_RDONLY | O_NONBLOCK | O_EXCL);
++        if (fd > 0) {
++            close(fd);
++            options = input_option_new(options, "device", xstrdup(path));
++        }
++    }
++    else {
++        options = input_option_new(options, "device", xstrdup(path));
++    }
++
++    if (asprintf(&config_info, "devd:%s", devname) == -1) {
++        config_info = NULL;
++        goto unwind;
++    }
++
++    if (device_is_duplicate(config_info)) {
++        LogMessage(X_WARNING, "config/devd: device %s already added. "
++                   "Ignoring.\n", attrs.product);
++        goto unwind;
++    }
++
++    options = input_option_new(options, "config_info", config_info);
++    LogMessage(X_INFO, "config/devd: adding input device %s (%s)\n",
++               attrs.product, path);
++
++    rc = NewInputDeviceRequest(options, &attrs, &dev);
++
++    if (rc != Success)
++        goto unwind;
++
++ unwind:
++    free(config_info);
++    input_option_free_list(&options);
++
++    free(attrs.usb_id);
++    free(attrs.product);
++    free(attrs.device);
++    free(attrs.vendor);
++}
++
++static void
++device_removed(char *devname)
++{
++    char *value;
++
++    if (asprintf(&value, "devd:%s", devname) == -1)
++        return;
++
++    remove_devices("devd", value);
++
++    free(value);
++}
++
++static ssize_t
++socket_getline(int fd, char **out)
++{
++    char *buf, *newbuf;
++    ssize_t ret, cap, sz = 0;
++    char c;
++
++    cap = 1024;
++    buf = malloc(cap * sizeof(char));
++    if (!buf)
++        return -1;
++
++    for (;;) {
++        ret = read(sock_devd, &c, 1);
++        if (ret < 1) {
++            if (errno == EINTR)
++                continue;
++            free(buf);
++            return -1;
++        }
++
++        if (c == '\n')
++            break;
++
++        if (sz + 1 >= cap) {
++            cap *= 2;
++            newbuf = realloc(buf, cap * sizeof(char));
++            if (!newbuf) {
++                free(buf);
++                return -1;
++            }
++            buf = newbuf;
++        }
++        buf[sz] = c;
++        sz++;
++    }
++
++    buf[sz] = '\0';
++    if (sz >= 0)
++        *out = buf;
++    else
++        free(buf);
++
++    return sz;                  /* number of bytes in the line, not counting the line break */
++}
++
++static void
++wakeup_handler(void *data, int err, void *read_mask)
++{
++    char *line = NULL;
++    char *walk;
++
++    if (err < 0)
++        return;
++
++    if (FD_ISSET(sock_devd, (fd_set *) read_mask)) {
++        if (socket_getline(sock_devd, &line) < 0)
++            return;
++
++        walk = strchr(line + 1, ' ');
++        if (walk != NULL)
++            walk[0] = '\0';
++
++        switch (*line) {
++        case DEVD_EVENT_ADD:
++            device_added(line + 1);
++            break;
++        case DEVD_EVENT_REMOVE:
++            device_removed(line + 1);
++            break;
++        default:
++            break;
++        }
++        free(line);
++    }
++}
++
++static void
++block_handler(void *data, struct timeval **tv, void *read_mask)
++{
++}
++
++int
++config_devd_init(void)
++{
++    struct sockaddr_un devd;
++    char devicename[1024];
++    int i, j;
++
++    /* first scan the sysctl to determine the hardware if needed */
++
++    for (i = 0; hw_types[i].driver != NULL; i++) {
++        for (j = 0; sysctl_exists("dev.%s.%i.%%desc", hw_types[i].driver, j);
++             j++) {
++            snprintf(devicename, sizeof(devicename), "%s%i", hw_types[i].driver,
++                     j);
++            device_added(devicename);
++        }
++
++    }
++    sock_devd = socket(AF_UNIX, SOCK_STREAM, 0);
++    if (sock_devd < 0) {
++        ErrorF("config/devd: Fail opening stream socket");
++        return 0;
++    }
++
++    devd.sun_family = AF_UNIX;
++    strlcpy(devd.sun_path, DEVD_SOCK_PATH, sizeof(devd.sun_path));
++
++    if (connect(sock_devd, (struct sockaddr *) &devd, sizeof(devd)) < 0) {
++        close(sock_devd);
++        ErrorF("config/devd: Fail to connect to devd");
++        return 0;
++    }
++
++    RegisterBlockAndWakeupHandlers(block_handler, wakeup_handler, NULL);
++    AddGeneralSocket(sock_devd);
++
++    return 1;
++}
++
++void
++config_devd_fini(void)
++{
++    if (sock_devd < 0)
++        return;
++
++    RemoveGeneralSocket(sock_devd);
++    RemoveBlockAndWakeupHandlers(block_handler, wakeup_handler, NULL);
++    close(sock_devd);
++}
+Index: xorg-server/configure.ac
+===================================================================
+--- xorg-server.orig/configure.ac
++++ xorg-server/configure.ac
+@@ -618,6 +618,7 @@ AC_ARG_ENABLE(config-udev,    AS_HELP_ST
+ AC_ARG_ENABLE(config-udev-kms,    AS_HELP_STRING([--enable-config-udev-kms], [Build udev kms support (default: auto)]), [CONFIG_UDEV_KMS=$enableval], [CONFIG_UDEV_KMS=auto])
+ AC_ARG_ENABLE(config-dbus,    AS_HELP_STRING([--enable-config-dbus], [Build D-BUS API support (default: no)]), [CONFIG_DBUS_API=$enableval], [CONFIG_DBUS_API=no])
+ AC_ARG_ENABLE(config-hal,     AS_HELP_STRING([--disable-config-hal], [Build HAL support (default: auto)]), [CONFIG_HAL=$enableval], [CONFIG_HAL=auto])
++AC_ARG_ENABLE(config-devd,    AS_HELP_STRING([--disable-config-devd], [Build devd support (default: auto)]), [CONFIG_DEVD=$enableval], [CONFIG_DEVD=auto])
+ 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])
+@@ -922,6 +923,21 @@ if test "x$CONFIG_WSCONS" = xyes; then
+ 	AC_DEFINE(CONFIG_WSCONS, 1, [Use wscons for input auto configuration])
+ fi
+ 
++if test "x$CONFIG_DEVD" = xauto; then
++	case $host_os in
++		freebsd* | kfreebsd*-gnu)
++			CONFIG_DEVD=yes;
++			;;
++		*)
++			CONFIG_DEVD=no;
++			;;
++	esac
++fi
++AM_CONDITIONAL(CONFIG_DEVD, [test "x$CONFIG_DEVD" = xyes])
++if test "x$CONFIG_DEVD" = xyes; then
++	AC_DEFINE(CONFIG_DEVD, 1, [Use devd for input auto configuration])
++fi
++
+ if test "x$USE_SIGIO_BY_DEFAULT" = xyes; then
+ 	USE_SIGIO_BY_DEFAULT_VALUE=TRUE
+ else
+Index: xorg-server/hw/xfree86/common/xf86Config.c
+===================================================================
+--- xorg-server.orig/hw/xfree86/common/xf86Config.c
++++ xorg-server/hw/xfree86/common/xf86Config.c
+@@ -1377,15 +1377,18 @@ checkCoreInputDevices(serverLayoutPtr se
+     }
+ 
+     if (!xf86Info.forceInputDevices && !(foundPointer && foundKeyboard)) {
+-#if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS)
++#if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS) || \
++    defined(CONFIG_DEVD)
+         const char *config_backend;
+ 
+ #if defined(CONFIG_HAL)
+         config_backend = "HAL";
+ #elif defined(CONFIG_UDEV)
+         config_backend = "udev";
+-#else
++#elif defined(CONFIG_WSCONS)
+         config_backend = "wscons";
++#elif defined(CONFIG_DEVD)
++        config_backend = "devd";
+ #endif
+         xf86Msg(X_INFO, "The server relies on %s to provide the list of "
+                 "input devices.\n\tIf no devices become available, "
+Index: xorg-server/hw/xfree86/common/xf86Globals.c
+===================================================================
+--- xorg-server.orig/hw/xfree86/common/xf86Globals.c
++++ xorg-server/hw/xfree86/common/xf86Globals.c
+@@ -123,7 +123,8 @@ xf86InfoRec xf86Info = {
+     .log = LogNone,
+     .disableRandR = FALSE,
+     .randRFrom = X_DEFAULT,
+-#if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS)
++#if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS) || \
++    defined(CONFIG_DEVD)
+     .forceInputDevices = FALSE,
+     .autoAddDevices = TRUE,
+     .autoEnableDevices = TRUE,
+Index: xorg-server/include/dix-config.h.in
+===================================================================
+--- xorg-server.orig/include/dix-config.h.in
++++ xorg-server/include/dix-config.h.in
+@@ -420,6 +420,9 @@
+ /* Support HAL for hotplug */
+ #undef CONFIG_HAL
+ 
++/* Support devd for hotplug */
++#undef CONFIG_DEVD
++
+ /* Have a monotonic clock from clock_gettime() */
+ #undef MONOTONIC_CLOCK
+ 

=== removed file 'debian/patches/04_hashtabletest-s390x.diff'
--- debian/patches/04_hashtabletest-s390x.diff	2013-08-03 18:17:30 +0000
+++ debian/patches/04_hashtabletest-s390x.diff	1970-01-01 00:00:00 +0000
@@ -1,27 +0,0 @@
-From 3562cb865b13d6f59e5c3b472d073ad6bbc06ceb Mon Sep 17 00:00:00 2001
-From: Julien Cristau <jcristau@debian.org>
-Date: Fri, 2 Aug 2013 23:40:55 +0200
-Subject: [PATCH] test: include dix-config.h in hashtabletest.c
-
-Missing _XSERVER64 define caused inconsistent sizeof(XID) between the
-test and hashtable code, leading to test failures on 64bit big endian
-archs like s390x or ppc64.
----
- test/hashtabletest.c |    4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/test/hashtabletest.c b/test/hashtabletest.c
-index 64c7091..6af14a8 100644
---- a/test/hashtabletest.c
-+++ b/test/hashtabletest.c
-@@ -1,3 +1,7 @@
-+#ifdef HAVE_DIX_CONFIG_H
-+#include <dix-config.h>
-+#endif
-+
- #include <misc.h>
- #include <stdlib.h>
- #include <stdio.h>
--- 
-1.7.10.4
-

=== removed file 'debian/patches/10_Include-missing-selection-h.diff'
--- debian/patches/10_Include-missing-selection-h.diff	2013-07-25 19:45:29 +0000
+++ debian/patches/10_Include-missing-selection-h.diff	1970-01-01 00:00:00 +0000
@@ -1,20 +0,0 @@
-Description: Fix build failure with GCC 4.8
-   This patches fixes the following build failure:
-   
-   ../../dix/window.c:887:5: error: implicit declaration of function 'DeleteWindowFromAnySelections' [-Werror=implicit-function-declaration]
-   
-   by including "selection.h", where the function is prototyped.
-
-Author: Gerardo Malazdrewicz <gerardo@malazdrewicz.com.ar>
-Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=701372
---- xorg-server-1.12.4/dix/window.c	2012-05-17 14:09:02.000000000 -0300
-+++ xorg-server-1.12.4.good/dix/window.c	2013-04-18 11:53:06.787521781 -0300
-@@ -131,6 +131,8 @@
- #include "xace.h"
- #include "exevents.h"
- 
-+#include "selection.h"
-+
- #include <X11/Xatom.h>          /* must come after server includes */
- 
- /******

=== modified file 'debian/patches/190_cache-xkbcomp_output_for_fast_start_up.patch'
--- debian/patches/190_cache-xkbcomp_output_for_fast_start_up.patch	2012-06-04 19:12:23 +0000
+++ debian/patches/190_cache-xkbcomp_output_for_fast_start_up.patch	2014-07-01 14:18:40 +0000
@@ -1,8 +1,10 @@
-diff --git a/configure.ac b/configure.ac
-index 2693ce7..6665c10 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -515,9 +515,9 @@ AC_MSG_RESULT([$FONTPATH])
+Last-Update: 2013-09-19
+
+Index: xorg-server-1.14.2.901/configure.ac
+===================================================================
+--- xorg-server-1.14.2.901.orig/configure.ac	2013-09-19 11:43:53.948797077 -0400
++++ xorg-server-1.14.2.901/configure.ac	2013-09-19 11:43:53.944797077 -0400
+@@ -517,9 +517,9 @@
  AC_ARG_WITH(xkb-path,         AS_HELP_STRING([--with-xkb-path=PATH], [Path to XKB base dir (default: ${datadir}/X11/xkb)]),
  				[ XKBPATH="$withval" ],
  				[ XKBPATH="${datadir}/X11/xkb" ])
@@ -14,7 +16,7 @@
  AC_ARG_WITH(default-xkb-rules, AS_HELP_STRING([--with-default-xkb-rules=RULES],
                                     [Keyboard ruleset (default: base/evdev)]),
                                  [ XKB_DFLT_RULES="$withval" ],
-@@ -1204,7 +1204,7 @@ AC_DEFINE_DIR(XKB_BIN_DIRECTORY, XKB_BIN_DIRECTORY, [Path to XKB bin dir])
+@@ -1225,7 +1225,7 @@
  dnl Make sure XKM_OUTPUT_DIR is an absolute path
  XKBOUTPUT_FIRSTCHAR=`echo $XKBOUTPUT | cut -b 1`
  if [[ x$XKBOUTPUT_FIRSTCHAR != x/ -a x$XKBOUTPUT_FIRSTCHAR != 'x$' ]] ; then
@@ -23,11 +25,11 @@
  fi
  
  dnl XKM_OUTPUT_DIR (used in code) must end in / or file names get hosed
-diff --git a/xkb/README.compiled b/xkb/README.compiled
-index 71caa2f..a4a2ae0 100644
---- a/xkb/README.compiled
-+++ b/xkb/README.compiled
-@@ -4,10 +4,10 @@ current keymap and/or any scratch keymaps used by clients.  The X server
+Index: xorg-server-1.14.2.901/xkb/README.compiled
+===================================================================
+--- xorg-server-1.14.2.901.orig/xkb/README.compiled	2013-09-19 11:43:53.948797077 -0400
++++ xorg-server-1.14.2.901/xkb/README.compiled	2013-09-19 11:43:53.944797077 -0400
+@@ -4,10 +4,10 @@
  or some other tool might destroy or replace the files in this directory,
  so it is not a safe place to store compiled keymaps for long periods of
  time.  The default keymap for any server is usually stored in:
@@ -42,11 +44,11 @@
  
  Unless the X server is modified, sharing this directory between servers on
  different hosts could cause problems.
-diff --git a/xkb/ddxLoad.c b/xkb/ddxLoad.c
-index cb2dfc3..e531540 100644
---- a/xkb/ddxLoad.c
-+++ b/xkb/ddxLoad.c
-@@ -30,6 +30,12 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
+Index: xorg-server-1.14.2.901/xkb/ddxLoad.c
+===================================================================
+--- xorg-server-1.14.2.901.orig/xkb/ddxLoad.c	2013-09-19 11:43:53.948797077 -0400
++++ xorg-server-1.14.2.901/xkb/ddxLoad.c	2013-09-19 11:51:04.744800715 -0400
+@@ -30,6 +30,12 @@
  
  #include <xkb-config.h>
  
@@ -59,7 +61,7 @@
  #include <stdio.h>
  #include <ctype.h>
  #include <X11/X.h>
-@@ -43,20 +49,9 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
+@@ -43,20 +49,9 @@
  #define	XKBSRV_NEED_FILE_FUNCS
  #include <xkbsrv.h>
  #include <X11/extensions/XI.h>
@@ -81,7 +83,35 @@
  #define	PRE_ERROR_MSG "\"The XKEYBOARD keymap compiler (xkbcomp) reports:\""
  #define	ERROR_PREFIX	"\"> \""
  #define	POST_ERROR_MSG1 "\"Errors from xkbcomp are not fatal to the X server\""
-@@ -165,6 +160,47 @@ OutputDirectory(char *outdir, size_t size)
+@@ -69,35 +64,87 @@
+ #endif
+ 
+ static void
+-OutputDirectory(char *outdir, size_t size)
++OutputDirectory(char *outdir, size_t size, Bool *is_private_directory)
+ {
+ #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 (is_private_directory)
++            *is_private_directory = TRUE;
+     }
+     else
+ #else
+     if (strlen(Win32TempDir()) + 1 < size) {
+         (void) strcpy(outdir, Win32TempDir());
+         (void) strcat(outdir, "\\");
++        if (is_private_directory)
++            *is_private_directory = FALSE;
+     }
+     else
+ #endif
+     if (strlen("/tmp/") < size) {
+         (void) strcpy(outdir, "/tmp/");
++        if (is_private_directory)
++            *is_private_directory = FALSE;
      }
  }
  
@@ -129,8 +159,10 @@
  static Bool
  XkbDDXCompileKeymapByNames(XkbDescPtr xkb,
                             XkbComponentNamesPtr names,
-@@ -172,7 +208,11 @@ XkbDDXCompileKeymapByNames(XkbDescPtr xkb,
-                            unsigned need, char *nameRtrn, int nameRtrnLen)
+                            unsigned want,
+-                           unsigned need, char *nameRtrn, int nameRtrnLen)
++                           unsigned need, char *nameRtrn, int nameRtrnLen,
++                           Bool *is_private_directory)
  {
      FILE *out;
 -    char *buf = NULL, keymap[PATH_MAX], xkm_output_dir[PATH_MAX];
@@ -142,7 +174,7 @@
  
      const char *emptystring = "";
      char *xkbbasedirflag = NULL;
-@@ -183,14 +223,68 @@ XkbDDXCompileKeymapByNames(XkbDescPtr xkb,
+@@ -108,14 +155,68 @@
      /* WIN32 has no popen. The input must be stored in a file which is
         used as input for xkbcomp. xkbcomp does not read from stdin. */
      char tmpname[PATH_MAX];
@@ -189,18 +221,19 @@
 +               "using display name instead as xkm file name\n");
 +        snprintf(xkmfile, sizeof(xkmfile), "server-%s", display);
 +    }
- 
-     OutputDirectory(xkm_output_dir, sizeof(xkm_output_dir));
++
++    OutputDirectory(xkm_output_dir, sizeof(xkm_output_dir), is_private_directory);
 +    /* set nameRtrn, fail if it's too small */
 +    if ((strlen(xkmfile) + 1 > nameRtrnLen) && nameRtrn) {
 +        ErrorF("[xkb] nameRtrn too small to hold xkmfile name\n");
 +        return FALSE;
 +    }
 +    strncpy(nameRtrn, xkmfile, nameRtrnLen);
-+
+ 
+-    OutputDirectory(xkm_output_dir, sizeof(xkm_output_dir));
 +    /* if the xkm file already exists, reuse it */
 +    canonicalXkmFileName = Xprintf("%s%s.xkm", xkm_output_dir, xkmfile);
-+    if (access(canonicalXkmFileName, R_OK) == 0) {
++    if ((*is_private_directory) && (access(canonicalXkmFileName, R_OK) == 0)) {
 +        /* yes, we can reuse the old xkm file */
 +        LogMessage(X_INFO, "XKB: reuse xkmfile %s\n", canonicalXkmFileName);
 +        result = TRUE;
@@ -214,7 +247,7 @@
  
  #ifdef WIN32
      strcpy(tmpname, Win32TempDir());
-@@ -214,15 +308,21 @@ XkbDDXCompileKeymapByNames(XkbDescPtr xkb,
+@@ -139,15 +240,21 @@
          }
      }
  
@@ -239,7 +272,7 @@
          buf = NULL;
  
      free(xkbbasedirflag);
-@@ -233,6 +333,11 @@ XkbDDXCompileKeymapByNames(XkbDescPtr xkb,
+@@ -158,6 +265,11 @@
          return FALSE;
      }
  
@@ -251,7 +284,7 @@
  #ifndef WIN32
      out = Popen(buf, "w");
  #else
-@@ -240,32 +345,43 @@ XkbDDXCompileKeymapByNames(XkbDescPtr xkb,
+@@ -165,32 +277,43 @@
  #endif
  
      if (out != NULL) {
@@ -306,7 +339,7 @@
  #ifdef WIN32
          /* remove the temporary file */
          unlink(tmpname);
-@@ -280,8 +396,17 @@ XkbDDXCompileKeymapByNames(XkbDescPtr xkb,
+@@ -205,8 +328,17 @@
      }
      if (nameRtrn)
          nameRtrn[0] = '\0';
@@ -326,11 +359,40 @@
  }
  
  static FILE *
-@@ -368,7 +493,6 @@ XkbDDXLoadKeymapByNames(DeviceIntPtr keybd,
+@@ -217,7 +349,7 @@
+ 
+     buf[0] = '\0';
+     if (mapName != NULL) {
+-        OutputDirectory(xkm_output_dir, sizeof(xkm_output_dir));
++        OutputDirectory(xkm_output_dir, sizeof(xkm_output_dir), NULL);
+         if ((XkbBaseDirectory != NULL) && (xkm_output_dir[0] != '/')
+ #ifdef WIN32
+             && (!isalpha(xkm_output_dir[0]) || xkm_output_dir[1] != ':')
+@@ -256,6 +388,7 @@
+     FILE *file;
+     char fileName[PATH_MAX];
+     unsigned missing;
++    Bool is_private_directory;
+ 
+     *xkbRtrn = NULL;
+     if ((keybd == NULL) || (keybd->key == NULL) ||
+@@ -271,7 +404,8 @@
+         return 0;
+     }
+     else if (!XkbDDXCompileKeymapByNames(xkb, names, want, need,
+-                                         nameRtrn, nameRtrnLen)) {
++                                         nameRtrn, nameRtrnLen,
++                                         &is_private_directory)) {
+         LogMessage(X_ERROR, "XKB: Couldn't compile keymap\n");
+         return 0;
+     }
+@@ -293,7 +427,8 @@
                 (*xkbRtrn)->defined);
      }
      fclose(file);
 -    (void) unlink(fileName);
++    if (!is_private_directory)
++        (void) unlink(fileName);
      return (need | want) & (~missing);
  }
  

=== added file 'debian/patches/29b1484bb9555e45067669cbfe68a3c40596f4ff.patch'
--- debian/patches/29b1484bb9555e45067669cbfe68a3c40596f4ff.patch	1970-01-01 00:00:00 +0000
+++ debian/patches/29b1484bb9555e45067669cbfe68a3c40596f4ff.patch	2014-07-01 14:18:40 +0000
@@ -0,0 +1,44 @@
+From 29b1484bb9555e45067669cbfe68a3c40596f4ff Mon Sep 17 00:00:00 2001
+From: Laércio de Sousa <lbsousajr@gmail.com>
+Date: Thu, 03 Apr 2014 14:19:13 +0000
+Subject: xfree86: allow fallback to PCI bus probe for graphics devices on non-seat0 X servers (#66851)
+
+Currently non-seat0 X servers only probe platform bus for graphics devices,
+which is OK for most KMS-compliant drivers. However, for non-KMS drivers
+(like NVIDIA proprietary ones), graphics devices can't be reached
+by platform bus probe, resulting in a "No devices detected" error.
+
+This patch allows a fallback to PCI bus probe for non-seat0 X servers
+in case no platform bus graphics device is found.
+
+Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=66851
+
+Signed-off-by: Laércio de Sousa <lbsousajr@gmail.com>
+Reviewed-by: Hans de Goede <hdegoede@redhat.com>
+Reviewed-by: Dave Airlie <airlied@redhat.com>
+Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+---
+diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c
+index 507c57d..b3b3f8c 100644
+--- a/hw/xfree86/common/xf86Bus.c
++++ b/hw/xfree86/common/xf86Bus.c
+@@ -81,7 +81,7 @@ xf86CallDriverProbe(DriverPtr drv, Bool detect_only)
+     if (drv->platformProbe != NULL) {
+         foundScreen = xf86platformProbeDev(drv);
+     }
+-    if (ServerIsNotSeat0())
++    if (ServerIsNotSeat0() && foundScreen)
+         return foundScreen;
+ #endif
+ 
+@@ -201,7 +201,7 @@ xf86BusProbe(void)
+ {
+ #ifdef XSERVER_PLATFORM_BUS
+     xf86platformProbe();
+-    if (ServerIsNotSeat0())
++    if (ServerIsNotSeat0() && xf86_num_platform_devices > 0)
+         return;
+ #endif
+ #ifdef XSERVER_LIBPCIACCESS
+--
+cgit v0.9.0.2-2-gbebe

=== removed file 'debian/patches/aarch64.patch'
--- debian/patches/aarch64.patch	2013-07-24 14:24:25 +0000
+++ debian/patches/aarch64.patch	1970-01-01 00:00:00 +0000
@@ -1,39 +0,0 @@
-Author: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
-
-Upstream-status: not sent yet
-
----
- hw/xfree86/os-support/linux/lnx_video.c |    4 ++--
- include/servermd.h                      |    7 +++++++
- 2 files changed, 9 insertions(+), 2 deletions(-)
-
-Index: b/hw/xfree86/os-support/linux/lnx_video.c
-===================================================================
---- a/hw/xfree86/os-support/linux/lnx_video.c
-+++ b/hw/xfree86/os-support/linux/lnx_video.c
-@@ -58,6 +58,7 @@
-       !defined(__sparc__) && \
-       !defined(__mips__) && \
-       !defined(__nds32__) && \
-+      !defined(__aarch64__) && \
-       !defined(__arm__)
- 
- /*
-Index: b/include/servermd.h
-===================================================================
---- a/include/servermd.h
-+++ b/include/servermd.h
-@@ -245,6 +245,13 @@
- /* ???? */
- #endif                          /* AMD64 */
- 
-+#if defined(__aarch64__) || defined(aarch64) || defined(__aarch64)
-+#define IMAGE_BYTE_ORDER	MSBFirst
-+#define BITMAP_BIT_ORDER       MSBFirst
-+#define GLYPHPADBYTES		4
-+/* ???? */
-+#endif                          /* AArch64 */
-+
- #if	defined(SVR4) && (defined(__i386__) || defined(__i386) ) ||	\
- 	defined(__alpha__) || defined(__alpha) || \
- 	defined(__i386__) || \

=== removed file 'debian/patches/autoconfig-fixup-tell-changed-so-randr-clients-can-t.patch'
--- debian/patches/autoconfig-fixup-tell-changed-so-randr-clients-can-t.patch	2013-03-21 15:40:42 +0000
+++ debian/patches/autoconfig-fixup-tell-changed-so-randr-clients-can-t.patch	1970-01-01 00:00:00 +0000
@@ -1,192 +0,0 @@
-From 4ff93e2e2d5253ac8aa773861e15dd41c0b5d4fd Mon Sep 17 00:00:00 2001
-From: Fedora X Ninjas <x@fedoraproject.org>
-Date: Wed, 12 Dec 2012 15:15:38 +1000
-Subject: [PATCH] autoconfig: fixup tell changed so randr clients can tell
-
-This lets the gnome applet update if a usb device appears/disappears
----
- hw/xfree86/common/xf86platformBus.c |  7 +++++--
- hw/xfree86/modes/xf86Crtc.c         |  2 ++
- hw/xfree86/modes/xf86RandR12.c      |  2 ++
- randr/randr.c                       | 24 +++++++++++++++++++++++-
- randr/randrstr.h                    |  4 ++++
- randr/rrcrtc.c                      |  2 +-
- randr/rrinfo.c                      |  2 +-
- randr/rroutput.c                    |  2 +-
- randr/rrscreen.c                    |  2 +-
- 9 files changed, 40 insertions(+), 7 deletions(-)
-
---- a/hw/xfree86/common/xf86platformBus.c
-+++ b/hw/xfree86/common/xf86platformBus.c
-@@ -47,6 +47,7 @@
- #include "Pci.h"
- #include "xf86platformBus.h"
- 
-+#include "randrstr.h"
- int platformSlotClaimed;
- 
- int xf86_num_platform_devices;
-@@ -470,7 +471,8 @@
-    /* attach unbound to 0 protocol screen */
-    AttachUnboundGPU(xf86Screens[0]->pScreen, xf86GPUScreens[i]->pScreen);
-    xf86AutoConfigOutputDevice(xf86GPUScreens[i], xf86Screens[0]);
--
-+   
-+   RRTellChanged(xf86Screens[0]->pScreen);
-    return 0;
- }
- 
-@@ -508,12 +510,13 @@
-     xf86GPUScreens[i]->pScreen->CloseScreen(xf86GPUScreens[i]->pScreen);
- 
-     RemoveGPUScreen(xf86GPUScreens[i]->pScreen);
-+
-     xf86DeleteScreen(xf86GPUScreens[i]);
- 
-     xf86UnclaimPlatformSlot(&xf86_platform_devices[index], NULL);
- 
-     xf86_remove_platform_device(index);
--
-+    RRTellChanged(xf86Screens[0]->pScreen);
-  out:
-     return;
- }
---- a/hw/xfree86/modes/xf86Crtc.c
-+++ b/hw/xfree86/modes/xf86Crtc.c
-@@ -3283,6 +3283,7 @@
-         unbound = TRUE;
-         AttachOffloadGPU(master->pScreen, pScrn->pScreen);
-         slave_config->randr_provider->offload_sink = master_provider;
-+	RRSetChanged(master->pScreen);
-     }
-     if ((master->capabilities & RR_Capability_SourceOutput) &&
-                pScrn->capabilities & RR_Capability_SinkOutput) {
-@@ -3291,5 +3292,6 @@
-             DetachUnboundGPU(pScrn->pScreen);
-         AttachOutputGPU(master->pScreen, pScrn->pScreen);
-         slave_config->randr_provider->output_source = master_provider;
-+	RRSetChanged(master->pScreen);
-     }
- }
---- a/hw/xfree86/modes/xf86RandR12.c
-+++ b/hw/xfree86/modes/xf86RandR12.c
-@@ -1893,15 +1893,20 @@
-     xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn);
-     
-     if (config->randr_provider == provider) {
-+        BOOL detached = FALSE;
-         if (config->randr_provider->offload_sink) {
-             DetachOffloadGPU(screen);
-             config->randr_provider->offload_sink = NULL;
-+            RRSetChanged(screen);
-+            detached = TRUE;
-         }
--        else if (config->randr_provider->output_source) {
-+        if (config->randr_provider->output_source) {
-             DetachOutputGPU(screen);
-             config->randr_provider->output_source = NULL;
-+            RRSetChanged(screen);
-+            detached = TRUE;
-         }
--        else if (screen->current_master)
-+        if (!detached && screen->current_master)
-             DetachUnboundGPU(screen);
-     }
-     config->randr_provider = NULL;
---- a/randr/randr.c
-+++ b/randr/randr.c
-@@ -464,6 +464,28 @@
-     return WT_WALKCHILDREN;
- }
- 
-+void
-+RRSetChanged(ScreenPtr pScreen)
-+{
-+    /* set changed bits on the master screen only */
-+    ScreenPtr master;
-+    rrScrPriv(pScreen);
-+    rrScrPrivPtr mastersp;
-+
-+    if (pScreen->isGPU) {
-+        master = pScreen->current_master;
-+	if (!master)
-+	  return;
-+        mastersp = rrGetScrPriv(master);
-+    }
-+    else {
-+        master = pScreen;
-+        mastersp = pScrPriv;
-+    }
-+
-+    mastersp->changed = TRUE;
-+}
-+
- /*
-  * Something changed; send events and adjust pointer position
-  */
-@@ -484,7 +506,7 @@
-         mastersp = pScrPriv;
-     }
- 
--    if (pScrPriv->changed) {
-+    if (mastersp->changed) {
-         UpdateCurrentTimeIf();
-         if (mastersp->configChanged) {
-             mastersp->lastConfigTime = currentTime;
---- a/randr/randrstr.h
-+++ b/randr/randrstr.h
-@@ -486,6 +486,10 @@
-  RRDeliverScreenEvent(ClientPtr client, WindowPtr pWin, ScreenPtr pScreen);
- 
- /* randr.c */
-+/* set a screen change on the primary screen */
-+extern _X_EXPORT void
-+RRSetChanged(ScreenPtr pScreen);
-+
- /*
-  * Send all pending events
-  */
---- a/randr/rrcrtc.c
-+++ b/randr/rrcrtc.c
-@@ -39,7 +39,7 @@
-     if (pScreen) {
-         rrScrPriv(pScreen);
- 
--        pScrPriv->changed = TRUE;
-+	RRSetChanged(pScreen);
-         /*
-          * Send ConfigureNotify on any layout change
-          */
---- a/randr/rrinfo.c
-+++ b/randr/rrinfo.c
-@@ -225,7 +225,7 @@
-     pScrPriv->minHeight = minHeight;
-     pScrPriv->maxWidth = maxWidth;
-     pScrPriv->maxHeight = maxHeight;
--    pScrPriv->changed = TRUE;
-+    RRSetChanged(pScreen);
-     pScrPriv->configChanged = TRUE;
- }
- 
---- a/randr/rroutput.c
-+++ b/randr/rroutput.c
-@@ -36,7 +36,7 @@
-     output->changed = TRUE;
-     if (pScreen) {
-         rrScrPriv(pScreen);
--        pScrPriv->changed = TRUE;
-+	RRSetChanged(pScreen);
-         if (configChanged)
-             pScrPriv->configChanged = TRUE;
-     }
---- a/randr/rrscreen.c
-+++ b/randr/rrscreen.c
-@@ -143,7 +143,7 @@
-     pScrPriv->height = pScreen->height;
-     pScrPriv->mmWidth = pScreen->mmWidth;
-     pScrPriv->mmHeight = pScreen->mmHeight;
--    pScrPriv->changed = TRUE;
-+    RRSetChanged(pScreen);
- /*    pScrPriv->sizeChanged = TRUE; */
- 
-     RRTellChanged(pScreen);

=== added file 'debian/patches/disable-rotation-transform-gpuscreens.patch'
--- debian/patches/disable-rotation-transform-gpuscreens.patch	1970-01-01 00:00:00 +0000
+++ debian/patches/disable-rotation-transform-gpuscreens.patch	2014-07-01 14:18:40 +0000
@@ -0,0 +1,22 @@
+--- a/hw/xfree86/modes/xf86RandR12.c
++++ b/hw/xfree86/modes/xf86RandR12.c
+@@ -932,6 +932,9 @@
+     if (xf86RandR12Key == NULL)
+         return;
+ 
++    if (pScreen->isGPU)
++        rotations = RR_Rotate_0;
++
+     randrp = XF86RANDRINFO(pScreen);
+ #if RANDR_12_INTERFACE
+     for (c = 0; c < config->num_crtc; c++) {
+@@ -954,6 +957,9 @@
+     xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
+ #endif
+ 
++    if (pScreen->isGPU)
++        transforms = FALSE;
++
+     if (xf86RandR12Key == NULL)
+         return;
+ 

=== added file 'debian/patches/drm_device_keep_trying.patch'
--- debian/patches/drm_device_keep_trying.patch	1970-01-01 00:00:00 +0000
+++ debian/patches/drm_device_keep_trying.patch	2014-07-01 14:18:40 +0000
@@ -0,0 +1,172 @@
+From: Maarten Lankhorst <maarten.lankhorst@canonical.com>
+Subject: [PATCH] do not use drmGetBusid to grab the pci-id name
+
+The kernel returns EACCES or EAGAIN on drm open when the drm device is
+currently unavailable, such as if it is in use by another process
+(e.g. plymouth), or hasn't finished initializing (e.g. on a really fast
+SSD). Because the probing is done before a vt switch is completed,
+we have no way to ensure that we can own DRM master. This results
+in failing to boot.
+
+Also attrib->unowned is not initialized, always initialize it to fix
+a valgrind warning, and to prevent adding the same device a second time
+after a vt switch.
+
+Fixes: https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/982889
+
+Signed-off-by: Bryce Harrington <bryce@canonical.com>
+---
+ hw/xfree86/os-support/linux/lnx_platform.c |   29 +++++++++++++++++++++++++---
+ 1 file changed, 26 insertions(+), 3 deletions(-)
+
+--- a/config/udev.c
++++ b/config/udev.c
+@@ -98,7 +98,7 @@
+         if (strncmp(sysname, "card", 4) != 0)
+             return;
+ 
+-        LogMessage(X_INFO, "config/udev: Adding drm device (%s)\n", path);
++        LogMessage(X_INFO, "config/udev: Adding drm device (%s) %s %s\n", path, sysname, syspath);
+ 
+         config_udev_odev_setup_attribs(path, syspath, NewGPUDeviceRequest);
+         return;
+@@ -430,11 +430,23 @@
+ #ifdef CONFIG_UDEV_KMS
+ 
+ static Bool
++get_pci_busid(const char *in, char *pci_str)
++{
++    int ret, domain, bus, dev, func;
++    ret = sscanf(in, "/%04x:%02x:%02x.%d/drm/card%*d", &domain, &bus, &dev, &func);
++    if (ret != 4)
++        return FALSE;
++    sprintf(pci_str, "pci:%04x:%02x:%02x.%d", domain, bus, dev, func);
++    return TRUE;
++}
++
++static Bool
+ config_udev_odev_setup_attribs(const char *path, const char *syspath,
+                                config_odev_probe_proc_ptr probe_callback)
+ {
+     struct OdevAttributes *attribs = config_odev_allocate_attribute_list();
+     int ret;
++    const char *platform;
+ 
+     if (!attribs)
+         return FALSE;
+@@ -447,6 +459,33 @@
+     if (ret == FALSE)
+         goto fail;
+ 
++    if (strstr(syspath, "/devices/pci")) {
++        char pci_str[17];
++        const char *end = strstr(syspath, "/drm/card");
++        if (strstr(syspath, "/usb"))
++            ret = config_odev_add_attribute(attribs, ODEV_ATTRIB_BUSID, "");
++        else if (get_pci_busid(end - 13, pci_str))
++            ret = config_odev_add_attribute(attribs, ODEV_ATTRIB_BUSID, pci_str);
++    } else if ((platform = strstr(syspath, "/devices/platform/"))) {
++        /* OMAP relies on this, modesetting doesn't use it */
++        const char *end;
++        platform += 18;
++        end = strchr(platform, '.');
++        if (end) {
++            char *busid;
++            ret = asprintf(&busid, "platform:%.*s:%02li",
++                           (int)(end - platform), platform, strtol(end + 1, NULL, 10));
++            if (ret >= 0) {
++                ret = config_odev_add_attribute(attribs, ODEV_ATTRIB_BUSID, busid);
++                free(busid);
++            }
++            else
++                ret = TRUE;
++        }
++    }
++    if (ret == FALSE)
++        goto fail;
++
+     /* ownership of attribs is passed to probe layer */
+     probe_callback(attribs);
+     return TRUE;
+--- a/hw/xfree86/os-support/linux/lnx_platform.c
++++ b/hw/xfree86/os-support/linux/lnx_platform.c
+@@ -19,44 +19,6 @@
+ 
+ #include "hotplug.h"
+ 
+-static Bool
+-get_drm_info(struct OdevAttributes *attribs, char *path, int delayed_index)
+-{
+-    drmSetVersion sv;
+-    char *buf;
+-    int fd;
+-    int err = 0;
+-
+-    fd = open(path, O_RDWR, O_CLOEXEC);
+-    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) {
+-        ErrorF("setversion 1.4 failed: %s\n", strerror(-err));
+-	goto out;
+-    }
+-
+-    /* for a delayed probe we've already added the device */
+-    if (delayed_index == -1) {
+-            xf86_add_platform_device(attribs);
+-            delayed_index = xf86_num_platform_devices - 1;
+-    }
+-
+-    buf = drmGetBusid(fd);
+-    xf86_add_platform_device_attrib(delayed_index,
+-                                    ODEV_ATTRIB_BUSID, buf);
+-    drmFreeBusid(buf);
+-out:
+-    close(fd);
+-    return (err == 0);
+-}
+-
+ Bool
+ xf86PlatformDeviceCheckBusID(struct xf86_platform_device *device, const char *busid)
+ {
+@@ -105,11 +67,6 @@
+     char *dpath;
+     dpath = xf86_get_platform_attrib(index, ODEV_ATTRIB_PATH);
+ 
+-    ret = get_drm_info(attribs, dpath, index);
+-    if (ret == FALSE) {
+-        xf86_remove_platform_device(index);
+-        return;
+-    }
+     ret = xf86platformAddDevice(index);
+     if (ret == -1)
+         xf86_remove_platform_device(index);
+@@ -145,18 +102,10 @@
+ 
+     LogMessage(X_INFO, "xfree86: Adding drm device (%s)\n", path);
+ 
+-    if (!xf86VTOwner()) {
+-            /* if we don't currently own the VT then don't probe the device,
+-               just mark it as unowned for later use */
+-            attribs->unowned = TRUE;
+-            xf86_add_platform_device(attribs);
+-            return;
+-    }
+-
+-    ret = get_drm_info(attribs, path, -1);
+-    if (ret == FALSE)
+-        goto out_free;
+-
++    /* if we don't currently own the VT then don't probe the device,
++       just mark it as unowned for later use */
++    attribs->unowned = !xf86VTOwner();
++    xf86_add_platform_device(attribs);
+     return;
+ 
+ out_free:

=== added file 'debian/patches/fix-detach-gpu.patch'
--- debian/patches/fix-detach-gpu.patch	1970-01-01 00:00:00 +0000
+++ debian/patches/fix-detach-gpu.patch	2014-07-01 14:18:40 +0000
@@ -0,0 +1,89 @@
+--- a/hw/xfree86/modes/xf86RandR12.c
++++ b/hw/xfree86/modes/xf86RandR12.c
+@@ -1800,7 +1800,8 @@
+             ScreenPtr cmScreen = pScreen->current_master;
+ 
+             xf86DetachOutputGPU(pScreen);
+-            AttachUnboundGPU(cmScreen, pScreen);
++            if (!pScreen->current_master)
++                AttachUnboundGPU(cmScreen, pScreen);
+         }
+         provider->output_source = NULL;
+         return TRUE;
+@@ -1811,7 +1812,8 @@
+ 
+     SetRootClip(source_provider->pScreen, FALSE);
+ 
+-    DetachUnboundGPU(pScreen);
++    if (!pScreen->current_master)
++        DetachUnboundGPU(pScreen);
+     AttachOutputGPU(source_provider->pScreen, pScreen);
+ 
+     provider->output_source = source_provider;
+@@ -1828,7 +1830,8 @@
+         if (provider->offload_sink) {
+             ScreenPtr cmScreen = pScreen->current_master;
+             xf86DetachOutputGPU(pScreen);
+-            AttachUnboundGPU(cmScreen, pScreen);
++            if (!pScreen->current_master)
++                AttachUnboundGPU(cmScreen, pScreen);
+         }
+ 
+         provider->offload_sink = NULL;
+@@ -1838,7 +1841,8 @@
+     if (provider->offload_sink == sink_provider)
+         return TRUE;
+ 
+-    DetachUnboundGPU(pScreen);
++    if (!pScreen->current_master)
++        DetachUnboundGPU(pScreen);
+     AttachOffloadGPU(sink_provider->pScreen, pScreen);
+ 
+     provider->offload_sink = sink_provider;
+@@ -1917,12 +1921,14 @@
+             config->randr_provider->offload_sink = NULL;
+             RRSetChanged(screen);
+         }
+-        else if (config->randr_provider->output_source) {
++
++        if (config->randr_provider->output_source) {
+             xf86DetachOutputGPU(screen);
+             config->randr_provider->output_source = NULL;
+             RRSetChanged(screen);
+         }
+-        else if (screen->current_master)
++
++        if (screen->current_master)
+             DetachUnboundGPU(screen);
+     }
+     config->randr_provider = NULL;
+--- a/dix/dispatch.c
++++ b/dix/dispatch.c
+@@ -3911,6 +3911,8 @@ AttachUnboundGPU(ScreenPtr pScreen, ScreenPtr new)
+     assert(new->isGPU);
+     assert(!new->current_master);
+     xorg_list_add(&new->unattached_head, &pScreen->unattached_list);
++    xorg_list_init(&new->offload_head);
++    xorg_list_init(&new->output_head);
+     new->current_master = pScreen;
+ }
+ 
+@@ -3937,7 +3937,8 @@
+ {
+     assert(slave->isGPU);
+     xorg_list_del(&slave->output_head);
+-    slave->current_master = NULL;
++    if (xorg_list_is_empty(&slave->offload_head))
++        slave->current_master = NULL;
+ }
+ 
+ void
+@@ -3953,6 +3954,7 @@
+ {
+     assert(slave->isGPU);
+     xorg_list_del(&slave->offload_head);
+-    slave->current_master = NULL;
++    if (xorg_list_is_empty(&slave->output_head))
++        slave->current_master = NULL;
+ }
+ 

=== added file 'debian/patches/fix-ftbfs-ppc64el.patch'
--- debian/patches/fix-ftbfs-ppc64el.patch	1970-01-01 00:00:00 +0000
+++ debian/patches/fix-ftbfs-ppc64el.patch	2014-07-01 14:18:40 +0000
@@ -0,0 +1,13 @@
+diff --git a/hw/kdrive/src/kinput.c b/hw/kdrive/src/kinput.c
+index a9a9fa5..f88cdc0 100644
+--- a/hw/kdrive/src/kinput.c
++++ b/hw/kdrive/src/kinput.c
+@@ -221,7 +221,7 @@ KdUnregisterFd(void *closure, int fd, Bool do_close)
+             if (do_close)
+                 close(kdInputFds[i].fd);
+             kdNumInputFds--;
+-            for (j = i; j < (kdNumInputFds - 1); j++)
++            for (j = i; j < (kdNumInputFds - 1) && j < (KD_MAX_INPUT_FDS - 1); j++)
+                 kdInputFds[j] = kdInputFds[j + 1];
+             break;
+         }

=== removed file 'debian/patches/include-selection-h.patch'
--- debian/patches/include-selection-h.patch	2013-05-08 14:02:12 +0000
+++ debian/patches/include-selection-h.patch	1970-01-01 00:00:00 +0000
@@ -1,12 +0,0 @@
-diff --git a/dix/window.c b/dix/window.c
-index 49ef4a0..5b87238 100644
---- a/dix/window.c
-+++ b/dix/window.c
-@@ -110,6 +110,7 @@ Equipment Corporation.
- #include "input.h"
- #include "inputstr.h"
- #include "resource.h"
-+#include "selection.h"
- #include "colormapst.h"
- #include "cursorstr.h"
- #include "dixstruct.h"

=== added file 'debian/patches/mi-dont-process-disabled.patch'
--- debian/patches/mi-dont-process-disabled.patch	1970-01-01 00:00:00 +0000
+++ debian/patches/mi-dont-process-disabled.patch	2014-07-01 14:18:40 +0000
@@ -0,0 +1,62 @@
+Date: Tue, 20 May 2014 14:32:59 +1000
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Subject: [PATCH] mi: don't process events from disabled devices (#77884)
+
+Once a device is disabled, it doesn't have a sprite pointer anymore. If an
+event is still in the queue and processed after DisableDevice finished, a
+dereference causes a crash. Example backtrace (crash forced by injecting an
+event at the right time):
+
+(EE) 0: /opt/xorg/bin/Xorg (OsSigHandler+0x3c) [0x48d334]
+(EE) 1: /lib64/libpthread.so.0 (__restore_rt+0x0) [0x37fcc0f74f]
+(EE) 2: /opt/xorg/bin/Xorg (mieqMoveToNewScreen+0x38) [0x609240]
+(EE) 3: /opt/xorg/bin/Xorg (mieqProcessDeviceEvent+0xd4) [0x609389]
+(EE) 4: /opt/xorg/bin/Xorg (mieqProcessInputEvents+0x206) [0x609720]
+(EE) 5: /opt/xorg/bin/Xorg (ProcessInputEvents+0xd) [0x4aeb58]
+(EE) 6: /opt/xorg/bin/Xorg (xf86VTSwitch+0x1a6) [0x4af457]
+(EE) 7: /opt/xorg/bin/Xorg (xf86Wakeup+0x2bf) [0x4af0a7]
+(EE) 8: /opt/xorg/bin/Xorg (WakeupHandler+0x83) [0x4445cb]
+(EE) 9: /opt/xorg/bin/Xorg (WaitForSomething+0x3fe) [0x491bf6]
+(EE) 10: /opt/xorg/bin/Xorg (Dispatch+0x97) [0x435748]
+(EE) 11: /opt/xorg/bin/Xorg (dix_main+0x61d) [0x4438a9]
+(EE) 12: /opt/xorg/bin/Xorg (main+0x28) [0x49ba28]
+(EE) 13: /lib64/libc.so.6 (__libc_start_main+0xf5) [0x37fc821d65]
+(EE) 14: /opt/xorg/bin/Xorg (_start+0x29) [0x425e69]
+(EE) 15: ? (?+0x29) [0x29]
+
+xf86VTSwitch() calls ProcessInputEvents() before disabling a device, and
+DisableDevice() calls mieqProcessInputEvents() again when flushing touches and
+button events. Between that and disabling the device (which causes new events
+to be refused) there is a window where events may be triggered and enqueued.
+On the next call to PIE that event is processed on a now defunct device,
+causing the crash.
+
+The simplest fix to this is to discard events from disabled devices. We flush
+the queue often enough before disabling that when we get here, we really don't
+care about the events from this device.
+
+X.Org Bug 77884 <http://bugs.freedesktop.org/show_bug.cgi?id=77884>
+---
+Modified by Maarten Lankhorst to pass tests.
+
+ mi/mieq.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/mi/mieq.c b/mi/mieq.c
+index 4c07480..188a0b0 100644
+--- a/mi/mieq.c
++++ b/mi/mieq.c
+@@ -515,6 +515,10 @@ mieqProcessDeviceEvent(DeviceIntPtr dev, InternalEvent *event, ScreenPtr screen)
+ 
+     verify_internal_event(event);
+ 
++    /* refuse events from disabled devices */
++    if (dev && !dev->enabled)
++        return 0;
++
+     /* Custom event handler */
+     handler = miEventQueue.handlers[event->any.type];
+ 
+-- 
+1.9.0
+

=== removed file 'debian/patches/os-use-libunwind-to-generate-backtraces.patch'
--- debian/patches/os-use-libunwind-to-generate-backtraces.patch	2013-03-14 16:12:16 +0000
+++ debian/patches/os-use-libunwind-to-generate-backtraces.patch	1970-01-01 00:00:00 +0000
@@ -1,206 +0,0 @@
-From cae16adcfea6d12c72c48b9091b7f562fcb6a925 Mon Sep 17 00:00:00 2001
-From: Marcin Slusarz <marcin.slusarz@gmail.com>
-Date: Thu, 21 Feb 2013 09:02:44 +1000
-Subject: [PATCH] os: use libunwind to generate backtraces
-
-Libunwind generates backtraces much more reliably than glibc's "backtrace".
-
-Before:
-0: /opt/xserver/bin/X (0x400000+0x18ce36) [0x58ce36]
-1: /opt/xserver/bin/X (xorg_backtrace+0x9) [0x58d119]
-2: /opt/xserver/bin/X (0x400000+0x190d69) [0x590d69]
-3: /lib64/libpthread.so.0 (0x7fb904268000+0x10a90) [0x7fb904278a90]
-4: /lib64/libc.so.6 (ioctl+0x7) [0x7fb902fbf987]
-5: /usr/lib64/libdrm.so.2 (drmIoctl+0x28) [0x7fb90405ffa8]
-6: /usr/lib64/libdrm.so.2 (drmCommandWrite+0x1b) [0x7fb90406235b]
-7: /usr/lib64/libdrm_nouveau.so.2 (nouveau_bo_wait+0x89) [0x7fb902009719]
-8: /opt/xserver/lib/xorg/modules/drivers/nouveau_drv.so (0x7fb90220e000+0x76f3) [0x7fb9022156f3]
-9: /opt/xserver/lib/xorg/modules/libexa.so (0x7fb9019c7000+0xbae0) [0x7fb9019d2ae0]
-10: /opt/xserver/bin/X (0x400000+0x17d2b3) [0x57d2b3]
-11: /opt/xserver/bin/X (0x400000+0xc9930) [0x4c9930]
-12: /opt/xserver/bin/X (0x400000+0x3a81a) [0x43a81a]
-13: /opt/xserver/bin/X (0x400000+0x3d6a1) [0x43d6a1]
-14: /opt/xserver/bin/X (0x400000+0x2c2ca) [0x42c2ca]
-15: /lib64/libc.so.6 (__libc_start_main+0xf5) [0x7fb902f019b5]
-16: /opt/xserver/bin/X (0x400000+0x2c60d) [0x42c60d]
-17: ?? [0x0]
-
-After:
-0: /opt/xserver/bin/X (OsSigHandler+0x39) [0x590d69]
-1: /lib64/libpthread.so.0 (__restore_rt+0x0) [0x7fb904278a8f]
-2: /lib64/libc.so.6 (ioctl+0x7) [0x7fb902fbf987]
-3: /usr/lib64/libdrm.so.2 (drmIoctl+0x28) [0x7fb90405ffa8]
-4: /usr/lib64/libdrm.so.2 (drmCommandWrite+0x1b) [0x7fb90406235b]
-5: /usr/lib64/libdrm_nouveau.so.2 (nouveau_bo_wait+0x89) [0x7fb902009719]
-6: /opt/xserver/lib/xorg/modules/drivers/nouveau_drv.so (nouveau_exa_download_from_screen+0x1a3) [0x7fb9022156f3]
-7: /opt/xserver/lib/xorg/modules/libexa.so (exaGetImage+0x1f0) [0x7fb9019d2ae0]
-8: /opt/xserver/bin/X (miSpriteGetImage+0x173) [0x57d2b3]
-9: /opt/xserver/bin/X (compGetImage+0xb0) [0x4c9930]
-10: /opt/xserver/bin/X (ProcGetImage+0x55a) [0x43a81a]
-11: /opt/xserver/bin/X (Dispatch+0x341) [0x43d6a1]
-12: /opt/xserver/bin/X (main+0x3ba) [0x42c2ca]
-13: /lib64/libc.so.6 (__libc_start_main+0xf5) [0x7fb902f019b5]
-14: /opt/xserver/bin/X (_start+0x29) [0x42c60d]
-15: ? (?+0x29) [0x29]
-
-Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
-Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
-Tested-by: Knut Petersen <knut.petersen@t-online.de>
-(cherry picked from commit e21e183059df5975e7086850d1931edb2c1bbd06)
----
- configure.ac            |  9 +++++-
- include/dix-config.h.in |  3 ++
- os/Makefile.am          |  5 ++++
- os/backtrace.c          | 75 +++++++++++++++++++++++++++++++++++++++++++++++++
- 4 files changed, 91 insertions(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index bc4f22e..fc766ab 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -309,6 +309,13 @@ AC_CHECK_HEADER([execinfo.h],[
-     ])]
- )
- 
-+PKG_CHECK_MODULES(LIBUNWIND, libunwind, [HAVE_LIBUNWIND=yes], [HAVE_LIBUNWIND=no])
-+if test "x$HAVE_LIBUNWIND" = xyes; then
-+	AC_DEFINE(HAVE_LIBUNWIND, 1, [Have libunwind support])
-+fi
-+AM_CONDITIONAL(HAVE_LIBUNWIND, [test "x$HAVE_LIBUNWIND" = xyes])
-+
-+
- dnl ---------------------------------------------------------------------------
- dnl Bus options and CPU capabilities.  Replaces logic in
- dnl hw/xfree86/os-support/bus/Makefile.am, among others.
-@@ -1337,7 +1344,7 @@ AC_DEFINE(BIGREQS, 1, [Support BigRequests extension])
- 
- 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)'
-+  OS_LIB='$(top_builddir)/os/os.O $(SHA1_LIBS) $(DLOPEN_LIBS) $(LIBUNWIND_LIBS)'
- else
-   DIX_LIB='$(top_builddir)/dix/libdix.la'
-   OS_LIB='$(top_builddir)/os/libos.la'
-diff --git a/include/dix-config.h.in b/include/dix-config.h.in
-index 578f249..5102263 100644
---- a/include/dix-config.h.in
-+++ b/include/dix-config.h.in
-@@ -60,6 +60,9 @@
- /* Has backtrace support */
- #undef HAVE_BACKTRACE
- 
-+/* Has libunwind support */
-+#undef HAVE_LIBUNWIND
-+
- /* Define to 1 if you have the <byteswap.h> header file. */
- #undef HAVE_BYTESWAP_H
- 
-diff --git a/os/Makefile.am b/os/Makefile.am
-index 8891485..364b6da 100644
---- a/os/Makefile.am
-+++ b/os/Makefile.am
-@@ -34,6 +34,11 @@ if XDMCP
- libos_la_SOURCES += $(XDMCP_SRCS)
- endif
- 
-+if HAVE_LIBUNWIND
-+AM_CFLAGS += $(LIBUNWIND_CFLAGS)
-+libos_la_LIBADD += $(LIBUNWIND_LIBS)
-+endif
-+
- EXTRA_DIST = $(SECURERPC_SRCS) $(XDMCP_SRCS)
- 
- if SPECIAL_DTRACE_OBJECTS
-diff --git a/os/backtrace.c b/os/backtrace.c
-index daac60c..426f9b1 100644
---- a/os/backtrace.c
-+++ b/os/backtrace.c
-@@ -30,6 +30,80 @@
- #include <errno.h>
- #include <string.h>
- 
-+#ifdef HAVE_LIBUNWIND
-+
-+#define UNW_LOCAL_ONLY
-+#include <libunwind.h>
-+
-+#ifndef _GNU_SOURCE
-+#define _GNU_SOURCE
-+#endif
-+#include <dlfcn.h>
-+
-+void
-+xorg_backtrace(void)
-+{
-+    unw_cursor_t cursor;
-+    unw_context_t context;
-+    unw_word_t off;
-+    unw_proc_info_t pip;
-+    int ret, i = 0;
-+    char procname[256];
-+    const char *filename;
-+    Dl_info dlinfo;
-+
-+    pip.unwind_info = NULL;
-+    ret = unw_getcontext(&context);
-+    if (ret) {
-+        ErrorFSigSafe("unw_getcontext failed: %s [%d]\n", unw_strerror(ret),
-+                ret);
-+        return;
-+    }
-+
-+    ret = unw_init_local(&cursor, &context);
-+    if (ret) {
-+        ErrorFSigSafe("unw_init_local failed: %s [%d]\n", unw_strerror(ret),
-+                ret);
-+        return;
-+    }
-+
-+    ErrorFSigSafe("\n");
-+    ErrorFSigSafe("Backtrace:\n");
-+    ret = unw_step(&cursor);
-+    while (ret > 0) {
-+        ret = unw_get_proc_info(&cursor, &pip);
-+        if (ret) {
-+            ErrorFSigSafe("unw_get_proc_info failed: %s [%d]\n",
-+                    unw_strerror(ret), ret);
-+            break;
-+        }
-+
-+        ret = unw_get_proc_name(&cursor, procname, 256, &off);
-+        if (ret && ret != -UNW_ENOMEM) {
-+            if (ret != -UNW_EUNSPEC)
-+                ErrorFSigSafe("unw_get_proc_name failed: %s [%d]\n",
-+                        unw_strerror(ret), ret);
-+            procname[0] = '?';
-+            procname[1] = 0;
-+        }
-+
-+        if (dladdr((void *)(pip.start_ip + off), &dlinfo) && dlinfo.dli_fname &&
-+                *dlinfo.dli_fname)
-+            filename = dlinfo.dli_fname;
-+        else
-+            filename = "?";
-+
-+        ErrorFSigSafe("%u: %s (%s%s+0x%x) [%p]\n", i++, filename, procname,
-+            ret == -UNW_ENOMEM ? "..." : "", (int)off,
-+            (void *)(pip.start_ip + off));
-+
-+        ret = unw_step(&cursor);
-+        if (ret < 0)
-+            ErrorFSigSafe("unw_step failed: %s [%d]\n", unw_strerror(ret), ret);
-+    }
-+    ErrorFSigSafe("\n");
-+}
-+#else /* HAVE_LIBUNWIND */
- #ifdef HAVE_BACKTRACE
- #ifndef _GNU_SOURCE
- #define _GNU_SOURCE
-@@ -246,3 +320,4 @@ xorg_backtrace(void)
- 
- #endif
- #endif
-+#endif
--- 
-1.8.1.2
-

=== added file 'debian/patches/pixman-validate.patch'
--- debian/patches/pixman-validate.patch	1970-01-01 00:00:00 +0000
+++ debian/patches/pixman-validate.patch	2014-07-01 14:18:40 +0000
@@ -0,0 +1,27 @@
+diff --git a/exa/exa_render.c b/exa/exa_render.c
+index 172e2b5..807eeba 100644
+--- a/exa/exa_render.c
++++ b/exa/exa_render.c
+@@ -1141,7 +1141,8 @@ exaTrapezoids(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
+ 
+         exaPrepareAccess(pPicture->pDrawable, EXA_PREPARE_DEST);
+         for (; ntrap; ntrap--, traps++)
+-            (*ps->RasterizeTrapezoid) (pPicture, traps, -bounds.x1, -bounds.y1);
++            if (xTrapezoidValid(traps))
++                (*ps->RasterizeTrapezoid) (pPicture, traps, -bounds.x1, -bounds.y1);
+         exaFinishAccess(pPicture->pDrawable, EXA_PREPARE_DEST);
+ 
+         xRel = bounds.x1 + xSrc - xDst;
+diff --git a/render/picture.h b/render/picture.h
+index c85353a..49eb263 100644
+--- a/render/picture.h
++++ b/render/picture.h
+@@ -211,7 +211,7 @@ typedef pixman_fixed_t xFixed;
+ /* whether 't' is a well defined not obviously empty trapezoid */
+ #define xTrapezoidValid(t)  ((t)->left.p1.y != (t)->left.p2.y && \
+ 			     (t)->right.p1.y != (t)->right.p2.y && \
+-			     (int) ((t)->bottom - (t)->top) > 0)
++			     (t)->bottom > 0 && (int) ((t)->bottom - (t)->top) > 0)
+ 
+ /*
+  * Standard NTSC luminance conversions:

=== added file 'debian/patches/ppc64el-endian-fix.patch'
--- debian/patches/ppc64el-endian-fix.patch	1970-01-01 00:00:00 +0000
+++ debian/patches/ppc64el-endian-fix.patch	2014-07-01 14:18:40 +0000
@@ -0,0 +1,34 @@
+From adb7bc3386559dfee34b359dadcbb6796bc416e7 Mon Sep 17 00:00:00 2001
+From: Dinar Valeev <dvaleev@suse.com>
+Date: Mon, 24 Feb 2014 10:36:54 +0000
+Subject: arch: Fix image and bitmap byte order for ppc64le
+
+So far PPC was big endian for sure. For ppc64le this is no longer
+true.
+
+Signed-off-by: Egbert Eich <eich@freedesktop.org>
+Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
+Signed-off-by: Keith Packard <keithp@keithp.com>
+---
+diff --git a/include/servermd.h b/include/servermd.h
+index 081123b..e413314 100644
+--- a/include/servermd.h
++++ b/include/servermd.h
+@@ -114,8 +114,13 @@ SOFTWARE.
+ 
+ #if defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__)
+ 
+-#define IMAGE_BYTE_ORDER        MSBFirst
+-#define BITMAP_BIT_ORDER        MSBFirst
++#if defined(__LITTLE_ENDIAN__)
++#define IMAGE_BYTE_ORDER      LSBFirst
++#define BITMAP_BIT_ORDER      LSBFirst
++#else
++#define IMAGE_BYTE_ORDER      MSBFirst
++#define BITMAP_BIT_ORDER      MSBFirst
++#endif
+ #define GLYPHPADBYTES           4
+ 
+ #endif                          /* PowerPC */
+--
+cgit v0.9.0.2-2-gbebe

=== added file 'debian/patches/rrcrtc-brackets-are-hard.patch'
--- debian/patches/rrcrtc-brackets-are-hard.patch	1970-01-01 00:00:00 +0000
+++ debian/patches/rrcrtc-brackets-are-hard.patch	2014-07-01 14:18:40 +0000
@@ -0,0 +1,42 @@
+From dd0c31d6b7559bb0dda6283a5d345d537f1d6b42 Mon Sep 17 00:00:00 2001
+From: Dave Airlie <airlied@gmail.com>
+Date: Tue, 30 Jul 2013 13:17:45 +1000
+Subject: [PATCH] rrcrtc: brackets are hard, lets go shopping.
+
+Slaving two outputs on a secondary GPU to a primary GPU testing
+picked this up, in that we'd try to resize to the totally the
+wrong thing, then as usual segfault in the rotation code.
+
+Signed-off-by: Dave Airlie <airlied@redhat.com>
+---
+ randr/rrcrtc.c | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c
+index 2f76b62..40b01f0 100644
+--- a/randr/rrcrtc.c
++++ b/randr/rrcrtc.c
+@@ -474,7 +474,7 @@ rrCheckPixmapBounding(ScreenPtr pScreen,
+ 
+     xorg_list_for_each_entry(slave, &pScreen->output_slave_list, output_head) {
+         rrScrPriv(slave);
+-        for (c = 0; c < pScrPriv->numCrtcs; c++)
++        for (c = 0; c < pScrPriv->numCrtcs; c++) {
+             if (pScrPriv->crtcs[c] == rr_crtc) {
+                 newbox.x1 = x;
+                 newbox.x2 = x + w;
+@@ -489,8 +489,9 @@ rrCheckPixmapBounding(ScreenPtr pScreen,
+                 newbox.y1 = pScrPriv->crtcs[c]->y;
+                 newbox.y2 = pScrPriv->crtcs[c]->y + pScrPriv->crtcs[c]->mode->mode.height;
+             }
+-        RegionInit(&new_crtc_region, &newbox, 1);
+-        RegionUnion(&total_region, &total_region, &new_crtc_region);
++	    RegionInit(&new_crtc_region, &newbox, 1);
++	    RegionUnion(&total_region, &total_region, &new_crtc_region);
++	}
+     }
+ 
+     newsize = RegionExtents(&total_region);
+-- 
+1.8.2.1
+

=== modified file 'debian/patches/series'
--- debian/patches/series	2013-08-14 10:52:17 +0000
+++ debian/patches/series	2014-07-01 14:18:40 +0000
@@ -1,13 +1,11 @@
 ## Patches with a number < 100 are applied in debian.
 ## Ubuntu patches start with 100.
 001_fedora_extramodes.patch
-02_improve-posix-saved-ids-check.diff
+02_kbsd-input-devd.diff
 03_static-nettle.diff
-04_hashtabletest-s390x.diff
 05_Revert-Unload-submodules.diff
 06_Revert-fb-reorder-Bresenham-error-correction-to-avoi.diff
 08_xfree86_fix_ia64_inx_outx.diff
-10_Include-missing-selection-h.diff
 
 ## Ubuntu patches, not upstreamable
 105_nvidia_fglrx_autodetect.patch
@@ -20,7 +18,6 @@
 ## send upstream
 232-xf86compatoutput-valgrind.patch
 xfree86-no-xv-for-gpuscreens.patch
-xephyr-glx-register.patch
 no-nv.patch
 
 ## waiting for review by upstream
@@ -39,20 +36,24 @@
 #   Probably is just papering over issue; needs further analysis
 
 ## upstream patches
-os-use-libunwind-to-generate-backtraces.patch
 
-# hybrid graphics fixes for xserver 1.13
+# hybrid graphics fixes
 228_autobind_gpu.patch
 xf86-fixup-detection.patch
 xf86-inactive-gpuscreen.patch
-
-# hotplug fixes
-
-# fixes for reverse optimus, cherry-picked from fedora X
-autoconfig-fixup-tell-changed-so-randr-clients-can-t.patch
+xrandr-rroutputchanged-main.patch
+rrcrtc-brackets-are-hard.patch
 config-add-no-removal.patch
-include-selection-h.patch
-xf86-detach-scanout.patch
+xf86-ignore-conflicting-rr-caps.patch
+fix-detach-gpu.patch
+disable-rotation-transform-gpuscreens.patch
 
-aarch64.patch
+pixman-validate.patch
+fix-ftbfs-ppc64el.patch
 xmir.patch
+drm_device_keep_trying.patch
+xi2-resize-touch.patch
+xi-dont-copy-too-much.patch
+mi-dont-process-disabled.patch
+ppc64el-endian-fix.patch
+29b1484bb9555e45067669cbfe68a3c40596f4ff.patch

=== removed file 'debian/patches/xephyr-glx-register.patch'
--- debian/patches/xephyr-glx-register.patch	2013-03-26 16:16:14 +0000
+++ debian/patches/xephyr-glx-register.patch	1970-01-01 00:00:00 +0000
@@ -1,39 +0,0 @@
---- a/hw/kdrive/ephyr/ephyrinit.c	2013-03-14 19:07:41.904335711 +0100
-+++ b/hw/kdrive/ephyr/ephyrinit.c	2013-03-14 19:07:33.024335444 +0100
-@@ -28,6 +28,7 @@
- #endif
- #include "ephyr.h"
- #include "ephyrlog.h"
-+#include "glx_extinit.h"
- 
- extern Window EphyrPreExistingHostWin;
- extern Bool EphyrWantGrayScale;
-@@ -53,9 +54,28 @@
-     KdCardInfoAdd(&ephyrFuncs, 0);
- }
- 
-+static const ExtensionModule ephyrExtensions[] = {
-+#ifdef GLXEXT
-+ { GlxExtensionInit, "GLX", &noGlxExtension },
-+#endif
-+};
-+
-+static
-+void ephyrExtensionInit(void)
-+{
-+ int i;
-+
-+ for (i = 0; i < ARRAY_SIZE(ephyrExtensions); i++)
-+ LoadExtension(&ephyrExtensions[i], TRUE);
-+}
-+
-+
- void
- InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
- {
-+    if (serverGeneration == 1)
-+        ephyrExtensionInit();
-+
-     KdInitOutput(pScreenInfo, argc, argv);
- }
- 

=== removed file 'debian/patches/xf86-detach-scanout.patch'
--- debian/patches/xf86-detach-scanout.patch	2013-08-06 16:11:47 +0000
+++ debian/patches/xf86-detach-scanout.patch	1970-01-01 00:00:00 +0000
@@ -1,87 +0,0 @@
-From: Aaron Plattner <aplattner@nvidia.com>
-To: <xorg-devel@lists.x.org>
-Subject: [PATCH] xfree86: detach scanout pixmaps when detaching output GPUs
-Date: Tue, 30 Apr 2013 14:14:23 -0700
-
-Commit 8f4640bdb9d3988148e09a08d2c7e3bab1d538d6 fixed a bit of a
-chicken-and-egg problem by detaching GPU screens when their providers
-are destroyed, which happens before CloseScreen is called.  However,
-this created a new problem: the GPU screen tears down its RandR crtc
-objects during CloseScreen and if one of them is active, it tries to
-detach the scanout pixmap then.  This crashes because
-RRCrtcDetachScanoutPixmap tries to get the master screen's screen
-pixmap, but crtc->pScreen->current_master is already NULL at that
-point.
-
-It doesn't make sense for an unbound GPU screen to still be scanning
-out its former master screen's pixmap, so detach them first when the
-provider is destroyed.
-
-Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
----
-Dave, does this seem like a reasonable way to work around this particular crash?
-
- hw/xfree86/modes/xf86RandR12.c | 19 ++++++++++++++++---
- 1 file changed, 16 insertions(+), 3 deletions(-)
-
---- a/hw/xfree86/modes/xf86RandR12.c
-+++ b/hw/xfree86/modes/xf86RandR12.c
-@@ -1770,6 +1770,19 @@
-     return RRGetInfo(pScreen, TRUE);    /* force a re-probe of outputs and notify clients about changes */
- }
- 
-+static void
-+xf86DetachOutputGPU(ScreenPtr pScreen)
-+{
-+    rrScrPrivPtr rp = rrGetScrPriv(pScreen);
-+    int i;
-+
-+    /* make sure there are no attached shared scanout pixmaps first */
-+    for (i = 0; rp && i < rp->numCrtcs; i++)
-+        RRCrtcDetachScanoutPixmap(rp->crtcs[i]);
-+
-+    DetachOutputGPU(pScreen);
-+}
-+
- static Bool
- xf86RandR14ProviderSetOutputSource(ScreenPtr pScreen,
-                                    RRProviderPtr provider,
-@@ -1779,7 +1792,7 @@
-         if (provider->output_source) {
-             ScreenPtr cmScreen = pScreen->current_master;
- 
--            DetachOutputGPU(pScreen);
-+            xf86DetachOutputGPU(pScreen);
-             AttachUnboundGPU(cmScreen, pScreen);
-         }
-         provider->output_source = NULL;
-@@ -1807,7 +1820,7 @@
-     if (!sink_provider) {
-         if (provider->offload_sink) {
-             ScreenPtr cmScreen = pScreen->current_master;
--            DetachOutputGPU(pScreen);
-+            xf86DetachOutputGPU(pScreen);
-             AttachUnboundGPU(cmScreen, pScreen);
-         }
- 
-@@ -1900,7 +1913,7 @@
-             detached = TRUE;
-         }
-         if (config->randr_provider->output_source) {
--            DetachOutputGPU(screen);
-+            xf86DetachOutputGPU(screen);
-             config->randr_provider->output_source = NULL;
-             RRSetChanged(screen);
-             detached = TRUE;
---- a/randr/rrcrtc.c
-+++ b/randr/rrcrtc.c
-@@ -367,6 +367,9 @@
-     PixmapPtr mscreenpix;
-     rrScrPriv(crtc->pScreen);
- 
-+   if (!crtc->scanout_pixmap)
-+        return;
-+
-     mscreenpix = master->GetScreenPixmap(master);
- 
-     ret = pScrPriv->rrCrtcSetScanoutPixmap(crtc, NULL);

=== added file 'debian/patches/xf86-ignore-conflicting-rr-caps.patch'
--- debian/patches/xf86-ignore-conflicting-rr-caps.patch	1970-01-01 00:00:00 +0000
+++ debian/patches/xf86-ignore-conflicting-rr-caps.patch	2014-07-01 14:18:40 +0000
@@ -0,0 +1,20 @@
+--- a/hw/xfree86/modes/xf86RandR12.c
++++ b/hw/xfree86/modes/xf86RandR12.c
+@@ -1569,10 +1569,16 @@
+     }
+ 
+     if (config->name) {
++        uint32_t caps = pScrn->capabilities;
+         config->randr_provider = RRProviderCreate(pScreen, config->name,
+                                                   strlen(config->name));
+ 
+-        RRProviderSetCapabilities(config->randr_provider, pScrn->capabilities);
++        if (!pScreen->isGPU)
++            caps &= RR_Capability_SinkOffload | RR_Capability_SourceOutput;
++        else
++            caps &= RR_Capability_SourceOffload | RR_Capability_SinkOutput;
++
++        RRProviderSetCapabilities(config->randr_provider, caps);
+     }
+ 
+     return TRUE;

=== added file 'debian/patches/xi-dont-copy-too-much.patch'
--- debian/patches/xi-dont-copy-too-much.patch	1970-01-01 00:00:00 +0000
+++ debian/patches/xi-dont-copy-too-much.patch	2014-07-01 14:18:40 +0000
@@ -0,0 +1,67 @@
+commit 56929f41e6c4cc1b2d72a33d14b4d993e7b613a3
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Tue Apr 29 16:52:01 2014 +1000
+
+    Xi: don't copy a DeviceEvent into an InternalEvent
+    
+    ==26141== Invalid read of size 8
+    ==26141==    at 0x58FAEA: DeliverEmulatedMotionEvent (exevents.c:1484)
+    
+    An InternalEvent is bigger than a DeviceEvent, thus copying one to the other
+    reads past the allocated boundary. Shouldn't have any real effect since we
+    shouldn't access anything past the DeviceEvent boundary if the event type is
+    correct.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+diff --git a/Xi/exevents.c b/Xi/exevents.c
+index 9c207eb..02530bd 100644
+--- a/Xi/exevents.c
++++ b/Xi/exevents.c
+@@ -1469,7 +1469,7 @@ static void
+ DeliverEmulatedMotionEvent(DeviceIntPtr dev, TouchPointInfoPtr ti,
+                            InternalEvent *ev)
+ {
+-    InternalEvent motion;
++    DeviceEvent motion;
+ 
+     if (ti->num_listeners) {
+         ClientPtr client;
+@@ -1481,11 +1481,11 @@ DeliverEmulatedMotionEvent(DeviceIntPtr dev, TouchPointInfoPtr ti,
+             ti->listeners[0].type != LISTENER_POINTER_GRAB)
+             return;
+ 
+-        motion = *ev;
+-        motion.any.type = ET_TouchUpdate;
+-        motion.device_event.detail.button = 0;
++        motion = ev->device_event;
++        motion.type = ET_TouchUpdate;
++        motion.detail.button = 0;
+ 
+-        if (!RetrieveTouchDeliveryData(dev, ti, &motion,
++        if (!RetrieveTouchDeliveryData(dev, ti, (InternalEvent*)&motion,
+                                        &ti->listeners[0], &client, &win, &grab,
+                                        &mask))
+             return;
+@@ -1500,18 +1500,18 @@ DeliverEmulatedMotionEvent(DeviceIntPtr dev, TouchPointInfoPtr ti,
+             }
+         }
+ 
+-        DeliverTouchEmulatedEvent(dev, ti, &motion, &ti->listeners[0], client,
++        DeliverTouchEmulatedEvent(dev, ti, (InternalEvent*)&motion, &ti->listeners[0], client,
+                                   win, grab, mask);
+     }
+     else {
+         InternalEvent button;
+         int converted;
+ 
+-        converted = TouchConvertToPointerEvent(ev, &motion, &button);
++        converted = TouchConvertToPointerEvent(ev, (InternalEvent*)&motion, &button);
+ 
+         BUG_WARN(converted == 0);
+         if (converted)
+-            ProcessOtherEvent(&motion, dev);
++            ProcessOtherEvent((InternalEvent*)&motion, dev);
+     }
+ }
+ 

=== added file 'debian/patches/xi2-resize-touch.patch'
--- debian/patches/xi2-resize-touch.patch	1970-01-01 00:00:00 +0000
+++ debian/patches/xi2-resize-touch.patch	2014-07-01 14:18:40 +0000
@@ -0,0 +1,34 @@
+diff --git a/dix/touch.c b/dix/touch.c
+index a7ea213..1478e38 100644
+--- a/dix/touch.c
++++ b/dix/touch.c
+@@ -460,12 +460,26 @@ TouchEventHistoryPush(TouchPointInfoPtr ti, const DeviceEvent *ev)
+     if (ev->flags & (TOUCH_CLIENT_ID | TOUCH_REPLAYING))
+         return;
+ 
++    if (ti->history_elements == ti->history_size - 1) {
++        DeviceEvent *hist = NULL;
++        size_t sz = ti->history_size * 2;
++
++        if (sz < 10000) {
++            hist = realloc(ti->history, sz * sizeof(*hist));
++
++            if (hist) {
++                ti->history = hist;
++                ti->history_size = sz;
++                memset(&hist[sz/2], 0, sizeof(*hist)*sz/2);
++            }
++        }
++    }
++
+     ti->history[ti->history_elements++] = *ev;
+-    /* FIXME: proper overflow fixes */
+     if (ti->history_elements > ti->history_size - 1) {
+         ti->history_elements = ti->history_size - 1;
+-        DebugF("source device %d: history size %d overflowing for touch %u\n",
+-               ti->sourceid, ti->history_size, ti->client_id);
++        ErrorF("source device %d: history size %d overflowing for touch %u\n",
++              ti->sourceid, ti->history_size, ti->client_id);
+     }
+ }
+ 

=== modified file 'debian/patches/xmir.patch'
--- debian/patches/xmir.patch	2013-08-06 16:11:47 +0000
+++ debian/patches/xmir.patch	2014-07-01 14:18:40 +0000
@@ -1,16 +1,14 @@
-Index: xorg-server/configure.ac
-===================================================================
---- xorg-server.orig/configure.ac	2013-08-06 13:15:53.451098539 +0000
-+++ xorg-server/configure.ac	2013-08-06 13:15:53.579296059 +0000
-@@ -639,6 +639,7 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -631,6 +631,7 @@
  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])
  AC_ARG_ENABLE(pciaccess, AS_HELP_STRING([--enable-pciaccess], [Build Xorg with pciaccess library (default: enabled)]), [PCI=$enableval], [PCI=yes])
 +AC_ARG_ENABLE(xmir,           AS_HELP_STRING([--enable-xmir], [Build support for nesting in Mir (default: auto)]), [XMIR=$enableval], [XMIR=auto])
+ AC_ARG_ENABLE(linux_acpi, AC_HELP_STRING([--disable-linux-acpi], [Disable building ACPI support on Linux (if available).]), [enable_linux_acpi=$enableval], [enable_linux_acpi=yes])
+ AC_ARG_ENABLE(linux_apm, AC_HELP_STRING([--disable-linux-apm], [Disable building APM support on Linux (if available).]), [enable_linux_apm=$enableval], [enable_linux_apm=yes])
  
- dnl DDXes.
- AC_ARG_ENABLE(xorg,    	      AS_HELP_STRING([--enable-xorg], [Build Xorg server (default: auto)]), [XORG=$enableval], [XORG=auto])
-@@ -1152,6 +1153,15 @@
+@@ -1275,6 +1276,15 @@
  	SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $XINERAMAPROTO"
  fi
  
@@ -20,13 +18,13 @@
 +        AC_SUBST([XMIR_CFLAGS])
 +        AC_DEFINE(XMIR, 1, [Support Mir nested mode])
 +	SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES mirclient"
-+fi	      
++fi
 +AM_CONDITIONAL(XMIR, [test "x$XMIR" = xyes])
 +
  AM_CONDITIONAL(XACE, [test "x$XACE" = xyes])
  if test "x$XACE" = xyes; then
  	AC_DEFINE(XACE, 1, [Build X-ACE extension])
-@@ -2300,6 +2310,7 @@
+@@ -2439,6 +2449,7 @@
  hw/xfree86/utils/man/Makefile
  hw/xfree86/utils/cvt/Makefile
  hw/xfree86/utils/gtf/Makefile
@@ -34,11 +32,9 @@
  hw/dmx/config/Makefile
  hw/dmx/config/man/Makefile
  hw/dmx/doc/Makefile
-Index: xorg-server/hw/xfree86/Makefile.am
-===================================================================
---- xorg-server.orig/hw/xfree86/Makefile.am	2013-08-06 13:14:07.176406286 +0000
-+++ xorg-server/hw/xfree86/Makefile.am	2013-08-06 13:15:53.579496055 +0000
-@@ -25,15 +25,20 @@
+--- a/hw/xfree86/Makefile.am
++++ b/hw/xfree86/Makefile.am
+@@ -30,15 +30,20 @@
  INT10_SUBDIR = int10
  endif
  
@@ -61,11 +57,9 @@
  
  bin_PROGRAMS = Xorg
  nodist_Xorg_SOURCES = sdksyms.c
-Index: xorg-server/hw/xfree86/common/xf86Config.c
-===================================================================
---- xorg-server.orig/hw/xfree86/common/xf86Config.c	2013-08-06 13:15:53.364100222 +0000
-+++ xorg-server/hw/xfree86/common/xf86Config.c	2013-08-06 13:15:53.579996045 +0000
-@@ -117,6 +117,7 @@
+--- a/hw/xfree86/common/xf86Config.c
++++ b/hw/xfree86/common/xf86Config.c
+@@ -118,6 +118,7 @@
      {.name = "fb",.toLoad = TRUE,.load_opt = NULL},
      {.name = "shadow",.toLoad = TRUE,.load_opt = NULL},
  #endif
@@ -73,7 +67,7 @@
      {.name = NULL,.toLoad = FALSE,.load_opt = NULL}
  };
  
-@@ -259,6 +260,17 @@
+@@ -260,6 +261,17 @@
          return NULL;
      }
  
@@ -91,10 +85,46 @@
      if (xf86configptr->conf_modules) {
          /* Walk the disable list and let people know what we've parsed to
           * not be loaded 
-Index: xorg-server/hw/xfree86/common/xf86Globals.c
-===================================================================
---- xorg-server.orig/hw/xfree86/common/xf86Globals.c	2013-08-06 13:15:53.372900052 +0000
-+++ xorg-server/hw/xfree86/common/xf86Globals.c	2013-08-06 13:15:53.580196041 +0000
+--- a/hw/xfree86/common/xf86Events.c
++++ b/hw/xfree86/common/xf86Events.c
+@@ -105,8 +105,6 @@
+ extern void (*xf86OSPMClose) (void);
+ #endif
+ 
+-static void xf86VTSwitch(void);
+-
+ /*
+  * Allow arbitrary drivers or other XFree86 code to register with our main
+  * Wakeup handler.
+@@ -411,7 +409,7 @@
+  * xf86VTSwitch --
+  *      Handle requests for switching the vt.
+  */
+-static void
++_X_EXPORT void
+ xf86VTSwitch(void)
+ {
+     int i;
+@@ -471,7 +469,7 @@
+ 
+         xf86AccessLeave();      /* We need this here, otherwise */
+ 
+-        if (!xf86VTSwitchAway()) {
++        if (!xorgMir && !xf86VTSwitchAway()) {
+             /*
+              * switch failed
+              */
+@@ -530,7 +528,7 @@
+     }
+     else {
+         DebugF("xf86VTSwitch: Entering\n");
+-        if (!xf86VTSwitchTo())
++        if (!xorgMir && !xf86VTSwitchTo())
+             return;
+ 
+ #ifdef XF86PM
+--- a/hw/xfree86/common/xf86Globals.c
++++ b/hw/xfree86/common/xf86Globals.c
 @@ -206,3 +206,6 @@
  #endif
  RootWinPropPtr *xf86RegisteredPropertiesTable = NULL;
@@ -102,10 +132,26 @@
 +Bool xorgMir = FALSE;
 +const char *mirID = NULL;
 +const char *mirSocket = NULL;
-Index: xorg-server/hw/xfree86/common/xf86Init.c
-===================================================================
---- xorg-server.orig/hw/xfree86/common/xf86Init.c	2013-08-06 13:15:53.470098171 +0000
-+++ xorg-server/hw/xfree86/common/xf86Init.c	2013-08-06 13:16:03.163310647 +0000
+--- a/hw/xfree86/common/xf86Helper.c
++++ b/hw/xfree86/common/xf86Helper.c
+@@ -100,7 +100,14 @@
+         if (xf86DriverList[drvIndex]->module)
+             UnloadModule(xf86DriverList[drvIndex]->module);
+         free(xf86DriverList[drvIndex]);
+-        xf86DriverList[drvIndex] = NULL;
++
++        /* Compact xf86DriverList array, update xf86NumDrivers */
++        xf86NumDrivers--;
++        if(drvIndex != xf86NumDrivers)
++            memmove(xf86DriverList + drvIndex,
++                    xf86DriverList + drvIndex + 1,
++                    sizeof(DriverPtr) * (xf86NumDrivers - drvIndex));
++        xf86DriverList = realloc(xf86DriverList, xf86NumDrivers * sizeof(DriverPtr));
+     }
+ }
+ 
+--- a/hw/xfree86/common/xf86Init.c
++++ b/hw/xfree86/common/xf86Init.c
 @@ -554,7 +554,7 @@
           * needed at this early stage.
           */
@@ -144,8 +190,8 @@
 -            if (xf86DriverList[i] && xf86DriverList[i]->refCount <= 0)
 +        for (i = 0; i < xf86NumDrivers; )
 +            if (xf86DriverList[i] &&
-+                !xf86DriverHasEntities(xf86DriverList[i]) &&
-+                xf86DriverList[i]->refCount <= 0)
++		!xf86DriverHasEntities(xf86DriverList[i]) &&
++		xf86DriverList[i]->refCount <= 0)
                  xf86DeleteDriver(i);
 +            else
 +                i++;
@@ -179,10 +225,8 @@
      /* OS-specific usage */
      xf86UseMsg();
      ErrorF("\n");
-Index: xorg-server/hw/xfree86/common/xf86Priv.h
-===================================================================
---- xorg-server.orig/hw/xfree86/common/xf86Priv.h	2013-08-06 13:15:53.373400042 +0000
-+++ xorg-server/hw/xfree86/common/xf86Priv.h	2013-08-06 13:15:53.580696032 +0000
+--- a/hw/xfree86/common/xf86Priv.h
++++ b/hw/xfree86/common/xf86Priv.h
 @@ -93,6 +93,9 @@
  extern _X_EXPORT const char *xf86VisualNames[];
  extern _X_EXPORT int xf86Verbose;       /* verbosity level */
@@ -193,10 +237,45 @@
  
  extern _X_EXPORT RootWinPropPtr *xf86RegisteredPropertiesTable;
  
-Index: xorg-server/hw/xfree86/xmir/Makefile.am
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ xorg-server/hw/xfree86/xmir/Makefile.am	2013-08-06 13:15:53.580796030 +0000
+@@ -149,6 +152,9 @@
+ extern _X_EXPORT int (*xf86PMGetEventFromOs) (int fd, pmEvent * events,
+                                               int num);
+ extern _X_EXPORT pmWait (*xf86PMConfirmEventToOs) (int fd, pmEvent event);
++extern _X_EXPORT void
++xf86VTSwitch(void);
++
+ 
+ /* xf86Helper.c */
+ extern _X_EXPORT void
+--- a/hw/xfree86/ramdac/xf86Cursor.c
++++ b/hw/xfree86/ramdac/xf86Cursor.c
+@@ -58,7 +58,12 @@
+     xf86CursorScreenPtr ScreenPriv;
+     miPointerScreenPtr PointPriv;
+ 
+-    if (!xf86InitHardwareCursor(pScreen, infoPtr))
++    infoPtr->pScrn = xf86ScreenToScrn(pScreen);
++
++    /* If we can't create a hardware cursor don't bother initialising HW cursor support */
++    if (infoPtr->MaxWidth != 0 &&
++        infoPtr->MaxHeight != 0 &&
++        !xf86InitHardwareCursor(pScreen, infoPtr))
+         return FALSE;
+ 
+     if (!dixRegisterPrivateKey(&xf86CursorScreenKeyRec, PRIVATE_SCREEN, 0))
+--- a/hw/xfree86/ramdac/xf86HWCurs.c
++++ b/hw/xfree86/ramdac/xf86HWCurs.c
+@@ -114,8 +114,6 @@
+         infoPtr->RealizeCursor = RealizeCursorInterleave0;
+     }
+ 
+-    infoPtr->pScrn = xf86ScreenToScrn(pScreen);
+-
+     return TRUE;
+ }
+ 
+--- /dev/null
++++ b/hw/xfree86/xmir/Makefile.am
 @@ -0,0 +1,26 @@
 +INCLUDES =					\
 +	$(XORG_INCS)                            \
@@ -224,11 +303,9 @@
 +	xmir-private.h
 +
 +sdk_HEADERS = xmir.h
-Index: xorg-server/hw/xfree86/xmir/xmir-output.c
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ xorg-server/hw/xfree86/xmir/xmir-output.c	2013-08-06 13:15:53.580996026 +0000
-@@ -0,0 +1,225 @@
+--- /dev/null
++++ b/hw/xfree86/xmir/xmir-output.c
+@@ -0,0 +1,678 @@
 +/*
 + * Copyright © 2012 Canonical, Inc
 + *
@@ -262,20 +339,353 @@
 + */
 +
 +#include <stdlib.h>
++#include <stdio.h>
++#include <math.h>
 +
++#include <xorg-config.h>
++#include "xmir.h"
 +#include "xmir-private.h"
 +#include "xf86Crtc.h"
-+
-+static void
-+crtc_dpms(xf86CrtcPtr drmmode_crtc, int mode)
-+{
-+}
-+
-+static Bool
-+crtc_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
-+		    Rotation rotation, int x, int y)  
-+{
-+	return TRUE;
++#include "xf86Priv.h"
++
++struct xmir_crtc {
++    xmir_screen             *xmir;
++    xmir_window             *root_fragment;
++    MirDisplayConfiguration *config;
++};
++
++static const char *
++xmir_mir_dpms_mode_description(MirPowerMode mode)
++{
++    switch (mode)
++    {
++    case mir_power_mode_on:
++        return "mir_power_mode_on";
++    case mir_power_mode_standby:
++        return "mir_power_mode_standby";
++    case mir_power_mode_suspend:
++        return "mir_power_mode_suspend";
++    case mir_power_mode_off:
++        return "mir_power_mode_off";
++    default:
++        return "OMGUNKNOWN!";
++    }
++}
++
++static void
++xmir_crtc_dpms(xf86CrtcPtr crtc, int mode)
++{
++    xf86CrtcConfigPtr crtc_cfg = XF86_CRTC_CONFIG_PTR(crtc->scrn);
++    struct xmir_crtc *xmir_crtc = crtc->driver_private;
++
++    for (int i = 0; i < crtc_cfg->num_output; i++) {
++        /* If this output should be driven by our "CRTC", set DPMS mode */
++        MirDisplayOutput *output = crtc_cfg->output[i]->driver_private;
++        if (crtc_cfg->output[i]->crtc == crtc) {
++            xf86Msg(X_INFO, "Setting DPMS mode for output %d to %d\n", i, mode);
++            switch (mode) {
++            case DPMSModeOn:
++                output->power_mode = mir_power_mode_on;
++                xmir_crtc->xmir->dpms_on = TRUE;
++                break;
++            case DPMSModeStandby:
++                output->power_mode = mir_power_mode_standby;
++                xmir_crtc->xmir->dpms_on = FALSE;
++                break;
++            case DPMSModeSuspend:
++                output->power_mode = mir_power_mode_suspend;
++                xmir_crtc->xmir->dpms_on = FALSE;
++                break;
++            case DPMSModeOff:
++                output->power_mode = mir_power_mode_off;
++                xmir_crtc->xmir->dpms_on = FALSE;
++                break;
++            }
++        }
++    }
++    mir_wait_for(mir_connection_apply_display_config(xmir_connection_get(),
++                                                     xmir_crtc->config));
++}
++
++static const char*
++xmir_get_output_type_str(MirDisplayOutput *mir_output)
++{
++    const char *str = "Invalid";
++
++    switch(mir_output->type)
++    {
++    case mir_display_output_type_vga: str = "VGA"; break;
++    case mir_display_output_type_dvii: str = "DVI"; break;
++    case mir_display_output_type_dvid: str = "DVI"; break;
++    case mir_display_output_type_dvia: str = "DVI"; break;
++    case mir_display_output_type_composite: str = "Composite"; break;
++    case mir_display_output_type_svideo: str = "TV"; break;
++    case mir_display_output_type_lvds: str = "LVDS"; break;
++    case mir_display_output_type_component: str = "CTV"; break;
++    case mir_display_output_type_ninepindin: str = "DIN"; break;
++    case mir_display_output_type_displayport: str = "DP"; break;
++    case mir_display_output_type_hdmia: str = "HDMI"; break;
++    case mir_display_output_type_hdmib: str = "HDMI"; break;
++    case mir_display_output_type_tv: str = "TV"; break;
++    case mir_display_output_type_edp: str = "eDP"; break;
++
++    case mir_display_output_type_unknown: str = "None"; break;
++    default: break;
++    }
++
++    return str;
++}
++
++static void
++xmir_output_populate(xf86OutputPtr xf86output, MirDisplayOutput *output)
++{
++    /* We can always arbitrarily clone and output */
++    xf86output->possible_crtcs = 0xffffffff;
++    xf86output->possible_clones = 0xffffffff;
++
++    xf86output->driver_private = output;
++
++    xf86output->interlaceAllowed = FALSE;
++    xf86output->doubleScanAllowed = FALSE;
++    xf86output->mm_width = output->physical_width_mm;
++    xf86output->mm_height = output->physical_height_mm;
++    /* TODO: Subpixel order from Mir */
++    xf86output->subpixel_order = SubPixelUnknown;
++}
++
++static DisplayModePtr
++xmir_create_xf86mode(const struct MirDisplayMode *mir_mode)
++{
++    DisplayModePtr mode;
++
++    mode = xf86CVTMode(mir_mode->horizontal_resolution,
++                       mir_mode->vertical_resolution,
++                       mir_mode->refresh_rate,
++                       FALSE, FALSE);
++
++    /*
++     * And now, because the CVT standard doesn't support such common
++     * resolutions as 1366x768...
++     */
++    mode->VDisplay = mir_mode->vertical_resolution;
++    mode->HDisplay = mir_mode->horizontal_resolution;
++
++    xf86SetModeDefaultName(mode);
++
++    return mode;
++}
++
++static void
++xmir_free_xf86mode(DisplayModePtr mode)
++{
++    free(mode->name);
++    free(mode);
++}
++
++static Bool
++xmir_set_mode_for_output(MirDisplayOutput *output,
++                         DisplayModePtr mode)
++{
++    for (int i = 0; i < output->num_modes; i++) {
++        Bool modes_equal = FALSE;
++        DisplayModePtr mir_mode = NULL;
++        xf86Msg(X_INFO, "Checking against mode (%dx%d)@%.2f\n",
++                output->modes[i].horizontal_resolution,
++                output->modes[i].vertical_resolution,
++                output->modes[i].refresh_rate);
++
++        mir_mode = xmir_create_xf86mode(&output->modes[i]);
++        modes_equal = xf86ModesEqual(mode, mir_mode);
++        xmir_free_xf86mode(mir_mode);
++
++        if (modes_equal) {
++            output->current_mode = i;
++            output->used = 1;
++            xf86Msg(X_INFO, "Matched mode %d\n", i);
++            return TRUE;
++        }
++    }
++    return FALSE;
++}
++
++static uint32_t
++xmir_update_outputs_for_crtc(xf86CrtcPtr crtc, DisplayModePtr mode, int x, int y)
++{
++    xf86CrtcConfigPtr crtc_cfg = XF86_CRTC_CONFIG_PTR(crtc->scrn);
++    uint32_t representative_output_id = mir_display_output_id_invalid;
++
++    for (int i = 0; i < crtc_cfg->num_output; i++) {
++        /* If this output should be driven by our "CRTC", set its mode */
++        if (crtc_cfg->output[i]->crtc == crtc) {
++            MirDisplayOutput *output = crtc_cfg->output[i]->driver_private;
++            xmir_set_mode_for_output(output, mode);
++            output->position_x = x;
++            output->position_y = y;
++            representative_output_id = output->output_id;
++        }
++    }
++    return representative_output_id;
++}
++
++static void
++xmir_disable_unused_outputs(xf86CrtcPtr crtc)
++{
++    xf86CrtcConfigPtr crtc_cfg = XF86_CRTC_CONFIG_PTR(crtc->scrn);
++
++    for (int i = 0; i < crtc_cfg->num_output; i++)
++        /* If any outputs are no longer associated with a CRTC, disable them */
++        if (crtc_cfg->output[i]->crtc == NULL)
++            ((MirDisplayOutput*)crtc_cfg->output[i]->driver_private)->used = 0;
++}
++
++static void
++xmir_stupid_callback(MirSurface *surf, void *ctx)
++{
++}
++
++static void
++xmir_dump_config(MirDisplayConfiguration *config)
++{
++  for (int i = 0; i < config->num_outputs; i++)
++    {
++      xf86Msg(X_INFO, "Output %d (%s, %s) has mode %d (%d x %d @ %.2f), position (%d,%d), dpms: %s\n",
++	      config->outputs[i].output_id,
++	      config->outputs[i].connected ? "connected" : "disconnected",
++	      config->outputs[i].used ? "enabled" : "disabled",
++	      config->outputs[i].current_mode,
++          config->outputs[i].used ? config->outputs[i].modes[config->outputs[i].current_mode].horizontal_resolution : 0,
++          config->outputs[i].used ? config->outputs[i].modes[config->outputs[i].current_mode].vertical_resolution : 0,
++          config->outputs[i].used ? config->outputs[i].modes[config->outputs[i].current_mode].refresh_rate : 0,
++	      config->outputs[i].position_x,
++	      config->outputs[i].position_y,
++          xmir_mir_dpms_mode_description(config->outputs[i].power_mode));
++      for (int m = 0; m < config->outputs[i].num_modes; m++)
++      {
++        xf86Msg(X_INFO, "  mode %d: (%d x %d @ %.2f)\n",
++                m,
++                config->outputs[i].modes[m].horizontal_resolution,
++
++                config->outputs[i].modes[m].vertical_resolution,
++                config->outputs[i].modes[m].refresh_rate);
++      }
++    }
++}
++
++static void
++xmir_update_config(xf86CrtcConfigPtr crtc_cfg)
++{
++    MirDisplayConfiguration *new_config;
++    struct xmir_crtc *xmir_crtc = crtc_cfg->crtc[0]->driver_private;
++
++    mir_display_config_destroy(xmir_crtc->config);
++
++    new_config = mir_connection_create_display_config(xmir_connection_get());
++    for (int i = 0; i < crtc_cfg->num_crtc; i++) {
++        xmir_crtc = crtc_cfg->crtc[i]->driver_private;
++        xmir_crtc-> config = new_config;
++    }
++
++    if (crtc_cfg->num_output != new_config->num_outputs)
++        FatalError("[xmir] New Mir config has different number of outputs?");
++
++    for (int i = 0; i < crtc_cfg->num_output ; i++) {
++        /* TODO: Ensure that the order actually matches up */
++        xmir_output_populate(crtc_cfg->output[i], new_config->outputs + i);
++    }
++    xf86Msg(X_INFO, "Recieved updated config from Mir:\n");
++    xmir_dump_config(new_config);
++}
++
++static void
++xmir_crtc_surface_created(MirSurface *surface, void *ctx)
++{
++    xf86CrtcPtr crtc = ctx;
++    struct xmir_crtc *xmir_crtc = crtc->driver_private;
++
++    if (xmir_crtc->root_fragment->surface != NULL)
++        mir_surface_release(xmir_crtc->root_fragment->surface, xmir_stupid_callback, NULL);
++
++    xmir_crtc->root_fragment->surface = surface;
++}
++
++static Bool
++xmir_crtc_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
++                         Rotation rotation, int x, int y)
++{
++    MirSurfaceParameters params = {
++        .name = "Xorg",
++        .width = mode->HDisplay,
++        .height = mode->VDisplay,
++        .pixel_format = mir_pixel_format_xrgb_8888,
++        .buffer_usage = mir_buffer_usage_hardware,
++        .output_id = mir_display_output_id_invalid
++    };
++    BoxRec output_bounds = {
++        .x1 = x,
++        .y1 = y,
++        .x2 = x + mode->HDisplay,
++        .y2 = y + mode->VDisplay
++    };
++    struct xmir_crtc *xmir_crtc = crtc->driver_private;
++    uint32_t output_id = mir_display_output_id_invalid;
++    const char *error_msg;
++
++    if (mode->HDisplay == 0 || mode->VDisplay == 0)
++        return FALSE;
++
++    xf86Msg(X_INFO, "Initial configuration for crtc %p:\n", crtc);
++    xmir_dump_config(xmir_crtc->config);
++
++    xf86Msg(X_INFO, "Setting mode to %dx%d (%.2f)\n", mode->HDisplay, mode->VDisplay, mode->VRefresh);
++    output_id = xmir_update_outputs_for_crtc(crtc, mode, x, y);
++    xmir_disable_unused_outputs(crtc);
++
++    xf86Msg(X_INFO, "Updated configuration:\n");
++
++    xmir_dump_config(xmir_crtc->config);
++    mir_wait_for(mir_connection_apply_display_config(xmir_connection_get(),
++                                                     xmir_crtc->config));
++    error_msg = mir_connection_get_error_message(xmir_connection_get());
++    if (*error_msg != '\0') {
++        xf86Msg(X_ERROR, "[xmir] Failed to set new display config: %s\n",
++                error_msg);
++        return FALSE;
++        /* TODO: Restore correct config cache */
++    }
++
++    xf86Msg(X_INFO, "Post-modeset config:\n");
++    xmir_update_config(XF86_CRTC_CONFIG_PTR(crtc->scrn));
++
++    if (output_id == mir_display_output_id_invalid) {
++      if (xmir_crtc->root_fragment->surface != NULL)
++        mir_wait_for(mir_surface_release(xmir_crtc->root_fragment->surface, xmir_stupid_callback, NULL));
++        xmir_crtc->root_fragment->surface = NULL;
++        return TRUE;
++    }
++
++    params.output_id = output_id;
++    xf86Msg(X_INFO, "Putting surface on output %d\n", output_id);
++    mir_wait_for(mir_connection_create_surface(xmir_connection_get(),
++					       &params,
++					       xmir_crtc_surface_created,
++					       crtc));
++    if (!mir_surface_is_valid(xmir_crtc->root_fragment->surface)) {
++        xf86Msg(X_ERROR,
++                "[xmir] Failed to create surface for %dx%d mode: %s\n",
++                mode->HDisplay, mode->VDisplay,
++                mir_surface_get_error_message(xmir_crtc->root_fragment->surface));
++        return FALSE;
++    }
++
++
++    /* During X server init this will be NULL.
++       This is fixed up in xmir_window_create */
++    xmir_crtc->root_fragment->win = xf86ScrnToScreen(crtc->scrn)->root;
++
++    RegionInit(&xmir_crtc->root_fragment->region, &output_bounds, 0);
++    xmir_crtc->root_fragment->has_free_buffer = TRUE;
++
++    return TRUE;
 +}
 +
 +static void
@@ -306,13 +716,13 @@
 +static PixmapPtr
 +crtc_shadow_create(xf86CrtcPtr crtc, void *data, int width, int height)
 +{
-+	return NULL;
++    return NULL;
 +}
 +
 +static void *
 +crtc_shadow_allocate(xf86CrtcPtr crtc, int width, int height)
 +{
-+	return NULL;
++    return NULL;
 +}
 +
 +static void
@@ -320,9 +730,20 @@
 +{
 +}
 +
++static void
++xmir_crtc_destroy(xf86CrtcPtr crtc)
++{
++    struct xmir_crtc *xmir_crtc = crtc->driver_private;
++
++    if (xmir_crtc->root_fragment->surface != NULL)
++        mir_surface_release(xmir_crtc->root_fragment->surface, NULL, NULL);
++
++    free(xmir_crtc);
++}
++
 +static const xf86CrtcFuncsRec crtc_funcs = {
-+    .dpms                = crtc_dpms,
-+    .set_mode_major      = crtc_set_mode_major,
++    .dpms                = xmir_crtc_dpms,
++    .set_mode_major      = xmir_crtc_set_mode_major,
 +    .set_cursor_colors   = crtc_set_cursor_colors,
 +    .set_cursor_position = crtc_set_cursor_position,
 +    .show_cursor         = crtc_show_cursor,
@@ -331,134 +752,241 @@
 +    .shadow_create       = crtc_shadow_create,
 +    .shadow_allocate     = crtc_shadow_allocate,
 +    .shadow_destroy      = crtc_shadow_destroy,
-+    .destroy             = NULL, /* XXX */
++    .destroy             = xmir_crtc_destroy,
 +};
 +
 +static void
-+output_dpms(xf86OutputPtr output, int mode)
++xmir_output_dpms(xf86OutputPtr output, int mode)
 +{
-+	return;
++    return;
 +}
 +
 +static xf86OutputStatus
-+output_detect(xf86OutputPtr output)
++xmir_output_detect(xf86OutputPtr output)
 +{
-+	return XF86OutputStatusConnected;
++    MirDisplayOutput *mir_output = output->driver_private;
++    return mir_output->connected ? XF86OutputStatusConnected : XF86OutputStatusDisconnected;
 +}
 +
 +static Bool
-+output_mode_valid(xf86OutputPtr output, DisplayModePtr pModes)
++xmir_output_mode_valid(xf86OutputPtr output, DisplayModePtr pModes)
 +{
-+	return MODE_OK;
++    return MODE_OK;
 +}
 +
-+struct mir_output {
-+    int width;
-+    int height;
-+    xf86Monitor monitor;
-+};
-+
 +static DisplayModePtr
-+output_get_modes(xf86OutputPtr xf86output)
++xmir_output_get_modes(xf86OutputPtr xf86output)
 +{
-+    struct mir_output *output = xf86output->