From 973c76f74d77e44e52157f8459f58ba25d6faccf Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 25 Oct 2013 13:54:10 -0400 Subject: [PATCH] xserver 1.14.99.3 - xwayland branch refresh - Drop some F17-era Obsoletes - Update BuildReqs to match reality --- ...ys-install-vbe-and-int10-sdk-headers.patch | 57 +- ...n-CloseScreen-hook-not-ext-CloseDown.patch | 38 +- 0001-ephyr-Add-resizeable-option.patch | 151 - ...use-libunwind-to-generate-backtraces.patch | 204 - 0001-randr-upstream-set-changed-fixes.patch | 167 - 0001-xwayland-Port-to-new-damage-API.patch | 24 + 0002-xkb-Add-struct-XkbCompContext.patch | 4 +- ...out-code-to-start-and-finish-xkbcomp.patch | 4 +- ...by-the-screen-device-resolution-rati.patch | 103 - 0004-xkb-Add-XkbCompileKeymapFromString.patch | 26 +- ...e-Track-updated-version-of-libxtrans.patch | 6 +- ...-instead-of-x-up-when-pre-scaling-co.patch | 74 - ...unction-to-create-a-client-for-an-fd.patch | 8 +- ...NewInputDevice-and-xf86AllocateInput.patch | 4 +- ...RedirectSubwindows-and-CompositeUnRe.patch | 6 +- ...rect-window-for-input-device-feature.patch | 14 +- ...-third-version-of-the-AuthMagic-func.patch | 14 +- 0011-Add-xwayland-module.patch | 4381 +---------------- ...W_WAYLAND-flag-to-let-drivers-explic.patch | 10 +- ...-t-create-alpha-buffers-if-the-windo.patch | 4 +- ...and-handle-global-object-destruction.patch | 4 +- ...and-add-support-for-multiple-outputs.patch | 4 +- 0016-xwayland-Probe-outputs-on-preinit.patch | 4 +- ...wlshm-driver-as-fallback-for-Wayland.patch | 10 +- ...end-out-of-bounds-damage-co-ordinate.patch | 4 +- ...duce-an-auto-mode-for-enable-wayland.patch | 6 +- ...ardcode-DRM-libs-and-lwayland-client.patch | 4 +- ...-Support-16bpp-X-surfaces-in-DRM-SHM.patch | 4 +- ...-Remove-Xdnd-selection-watching-code.patch | 4 +- ...t-non-wayland-capable-servers-from-d.patch | 8 +- ...G_WAYLAND-symbol-to-xorg-config.h.in.patch | 12 +- ...llback-loading-of-the-wayland-driver.patch | 8 +- ...xwayland-Don-t-include-xorg-server.h.patch | 4 +- 0027-os-Don-t-include-xorg-server.h.patch | 4 +- ...istenOnOpenFD-and-AddClientOnOpenFD-.patch | 4 +- 0029-xwayland-Remove-unused-variables.patch | 4 +- ...er-screen-private-key-for-cursor-pri.patch | 4 +- ...XWayland-Don-t-commit-empty-surfaces.patch | 31 + 0032-xwayland-Also-look-for-wlglamor.patch | 23 + ...-xwayland-Add-wlglamor-the-right-way.patch | 32 + ...-redirect-windows-leave-it-to-the-wm.patch | 90 + ...mpositeRedirectSubwindows-and-Compos.patch | 67 + 0036-xwayland-Fix-hidden-cursor.patch | 37 + ...bCopyDeviceKeymap-to-apply-a-given-k.patch | 98 + ...-function-to-copy-a-keymap-s-control.patch | 90 + 0039-xwayland-Handle-keymap-changes.patch | 86 + driver-abi-rebuild.sh | 16 +- xorg-x11-server.spec | 144 +- 48 files changed, 825 insertions(+), 5280 deletions(-) delete mode 100644 0001-ephyr-Add-resizeable-option.patch delete mode 100644 0001-os-use-libunwind-to-generate-backtraces.patch delete mode 100644 0001-randr-upstream-set-changed-fixes.patch create mode 100644 0001-xwayland-Port-to-new-damage-API.patch delete mode 100644 0004-dix-pre-scale-x-by-the-screen-device-resolution-rati.patch delete mode 100644 0005-dix-scale-y-back-instead-of-x-up-when-pre-scaling-co.patch create mode 100644 0031-XWayland-Don-t-commit-empty-surfaces.patch create mode 100644 0032-xwayland-Also-look-for-wlglamor.patch create mode 100644 0033-xwayland-Add-wlglamor-the-right-way.patch create mode 100644 0034-xwayland-Don-t-redirect-windows-leave-it-to-the-wm.patch create mode 100644 0035-Revert-Export-CompositeRedirectSubwindows-and-Compos.patch create mode 100644 0036-xwayland-Fix-hidden-cursor.patch create mode 100644 0037-xkb-Repurpose-XkbCopyDeviceKeymap-to-apply-a-given-k.patch create mode 100644 0038-xkb-Factor-out-a-function-to-copy-a-keymap-s-control.patch create mode 100644 0039-xwayland-Handle-keymap-changes.patch diff --git a/0001-Always-install-vbe-and-int10-sdk-headers.patch b/0001-Always-install-vbe-and-int10-sdk-headers.patch index ef09e8f..7260b93 100644 --- a/0001-Always-install-vbe-and-int10-sdk-headers.patch +++ b/0001-Always-install-vbe-and-int10-sdk-headers.patch @@ -1,20 +1,18 @@ -From a309d8f77319e88df9efa0fd2b2cdf0bc0ad7f0f Mon Sep 17 00:00:00 2001 +From 2612287a97242623355fe3f17796d52b3e3f970e Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Wed, 15 Aug 2012 12:35:21 -0400 Subject: [PATCH] Always install vbe and int10 sdk headers Signed-off-by: Adam Jackson --- - hw/xfree86/Makefile.am | 12 ++---------- - hw/xfree86/int10/Makefile.am | 8 ++++++-- - hw/xfree86/vbe/Makefile.am | 2 ++ - 3 files changed, 10 insertions(+), 12 deletions(-) + hw/xfree86/Makefile.am | 12 ++---------- + 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/hw/xfree86/Makefile.am b/hw/xfree86/Makefile.am -index c3899b5..f190b40 100644 +index 38fb0c1..46e74bf 100644 --- a/hw/xfree86/Makefile.am +++ b/hw/xfree86/Makefile.am -@@ -17,17 +17,9 @@ if VGAHW +@@ -21,17 +21,9 @@ if VGAHW VGAHW_SUBDIR = vgahw endif @@ -29,50 +27,11 @@ index c3899b5..f190b40 100644 -SUBDIRS = common ddc x86emu $(INT10_SUBDIR) os-support parser \ +SUBDIRS = common ddc x86emu int10 os-support parser \ ramdac $(VGAHW_SUBDIR) loader modes $(DRI_SUBDIR) \ -- $(DRI2_SUBDIR) . $(VBE_SUBDIR) i2c dixmods \ -+ $(DRI2_SUBDIR) . vbe i2c dixmods \ +- $(DRI2_SUBDIR) $(WAYLAND_SUBDIR) . $(VBE_SUBDIR) i2c dixmods \ ++ $(DRI2_SUBDIR) $(WAYLAND_SUBDIR) . vbe i2c dixmods \ fbdevhw shadowfb exa $(XF86UTILS_SUBDIR) doc man DIST_SUBDIRS = common ddc i2c x86emu int10 fbdevhw os-support \ -diff --git a/hw/xfree86/int10/Makefile.am b/hw/xfree86/int10/Makefile.am -index f5ece69..9afad2f 100644 ---- a/hw/xfree86/int10/Makefile.am -+++ b/hw/xfree86/int10/Makefile.am -@@ -1,7 +1,9 @@ --module_LTLIBRARIES = libint10.la -- - sdk_HEADERS = xf86int10.h - -+if INT10MODULE -+ -+module_LTLIBRARIES = libint10.la -+ - EXTRA_CFLAGS = - - libint10_la_LDFLAGS = -avoid-version -@@ -43,4 +45,6 @@ INCLUDES = $(XORG_INCS) - libint10_la_SOURCES = stub.c xf86int10module.c - endif - -+endif -+ - EXTRA_DIST = xf86x86emu.h INT10.HOWTO -diff --git a/hw/xfree86/vbe/Makefile.am b/hw/xfree86/vbe/Makefile.am -index 0b24faf..f0a9831 100644 ---- a/hw/xfree86/vbe/Makefile.am -+++ b/hw/xfree86/vbe/Makefile.am -@@ -1,9 +1,11 @@ -+if VBE - module_LTLIBRARIES = libvbe.la - libvbe_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG) - libvbe_la_SOURCES = vbe.c vbeModes.c vbe_module.c - if NO_UNDEFINED - libvbe_la_LIBADD = ../int10/libint10.la - endif -+endif - - sdk_HEADERS = vbe.h vbeModes.h - -- -1.7.7.6 +1.8.3.1 diff --git a/0001-dbe-Cleanup-in-CloseScreen-hook-not-ext-CloseDown.patch b/0001-dbe-Cleanup-in-CloseScreen-hook-not-ext-CloseDown.patch index ad9ac8c..41c4618 100644 --- a/0001-dbe-Cleanup-in-CloseScreen-hook-not-ext-CloseDown.patch +++ b/0001-dbe-Cleanup-in-CloseScreen-hook-not-ext-CloseDown.patch @@ -1,7 +1,7 @@ -From 33cd04abaa651e90537cc15a1c743f35f8eebce6 Mon Sep 17 00:00:00 2001 +From 7bd95101b4a0f39f10d3ed455749a268bf37f967 Mon Sep 17 00:00:00 2001 From: Robert Bragg Date: Thu, 12 Jan 2012 18:16:08 +0000 -Subject: [PATCH 01/30] dbe: Cleanup in CloseScreen hook not ext CloseDown +Subject: [PATCH 01/39] dbe: Cleanup in CloseScreen hook not ext CloseDown Instead of registering an extension CloseDownProc when adding the dbe extension this patch hooks into pScreen->CloseScreen so that the chain @@ -13,15 +13,15 @@ pScreen->DestroyWindow would clobber the chain of callbacks. This is needed for xwayland to be able to know when the root window is destroyed so it can unredirect root sub-windows. --- - dbe/dbe.c | 43 ++++++++++++++++++++++--------------------- + dbe/dbe.c | 41 +++++++++++++++++++++-------------------- dbe/dbestruct.h | 1 + - 2 files changed, 23 insertions(+), 21 deletions(-) + 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/dbe/dbe.c b/dbe/dbe.c -index 9039d80..379feb1 100644 +index 5524615..8d8bfb9 100644 --- a/dbe/dbe.c +++ b/dbe/dbe.c -@@ -292,8 +292,8 @@ ProcDbeAllocateBackBufferName(ClientPtr client) +@@ -288,8 +288,8 @@ ProcDbeAllocateBackBufferName(ClientPtr client) /* malloc/realloc a new array and initialize all elements to 0. */ pDbeWindowPriv->IDs = (XID *) realloc(pIDs, @@ -32,7 +32,7 @@ index 9039d80..379feb1 100644 DBE_INCR_MAX_IDS) * sizeof(XID)); if (!pDbeWindowPriv->IDs) { -@@ -468,7 +468,7 @@ ProcDbeSwapBuffers(ClientPtr client) +@@ -464,7 +464,7 @@ ProcDbeSwapBuffers(ClientPtr client) return BadAlloc; /* Get to the swap info appended to the end of the request. */ @@ -41,7 +41,7 @@ index 9039d80..379feb1 100644 /* Allocate array to record swap information. */ swapInfo = (DbeSwapInfoPtr) malloc(nStuff * sizeof(DbeSwapInfoRec)); -@@ -1298,7 +1298,7 @@ DbeWindowPrivDelete(pointer pDbeWinPriv, XID id) +@@ -1230,7 +1230,7 @@ DbeWindowPrivDelete(pointer pDbeWinPriv, XID id) /****************************************************************************** * @@ -50,7 +50,7 @@ index 9039d80..379feb1 100644 * * Description: * -@@ -1307,28 +1307,26 @@ DbeWindowPrivDelete(pointer pDbeWinPriv, XID id) +@@ -1239,25 +1239,23 @@ DbeWindowPrivDelete(pointer pDbeWinPriv, XID id) * other tasks related to shutting down the extension. * *****************************************************************************/ @@ -74,16 +74,12 @@ index 9039d80..379feb1 100644 - if (pDbeScreenPriv) { - /* Unwrap DestroyWindow, which was wrapped in DbeExtensionInit(). */ - pScreen->DestroyWindow = pDbeScreenPriv->DestroyWindow; -+ /* Unwrap CloseScreen, which was wrapped in DbeExtensionInit(). */ -+ pScreen->CloseScreen = pDbeScreenPriv->CloseScreen; - -- if (pDbeScreenPriv->ResetProc) -- (*pDbeScreenPriv->ResetProc) (pScreen); -+ if (pDbeScreenPriv->ResetProc) -+ (*pDbeScreenPriv->ResetProc) (pScreen); - +- pScreen->PositionWindow = pDbeScreenPriv->PositionWindow; - free(pDbeScreenPriv); - } ++ /* Unwrap CloseScreen, which was wrapped in DbeExtensionInit(). */ ++ pScreen->CloseScreen = pDbeScreenPriv->CloseScreen; ++ + free(pDbeScreenPriv); } -} /* DbeResetProc() */ @@ -93,7 +89,7 @@ index 9039d80..379feb1 100644 /****************************************************************************** * -@@ -1498,6 +1496,9 @@ DbeExtensionInit(void) +@@ -1427,6 +1425,9 @@ DbeExtensionInit(void) pDbeScreenPriv->DestroyWindow = pScreen->DestroyWindow; pScreen->DestroyWindow = DbeDestroyWindow; @@ -103,7 +99,7 @@ index 9039d80..379feb1 100644 } else { /* DDX initialization failed. Stub the screen. */ -@@ -1525,7 +1526,7 @@ DbeExtensionInit(void) +@@ -1454,7 +1455,7 @@ DbeExtensionInit(void) /* Now add the extension. */ extEntry = AddExtension(DBE_PROTOCOL_NAME, DbeNumberEvents, DbeNumberErrors, ProcDbeDispatch, SProcDbeDispatch, @@ -113,10 +109,10 @@ index 9039d80..379feb1 100644 dbeErrorBase = extEntry->errorBase; SetResourceTypeErrorValue(dbeWindowPrivResType, diff --git a/dbe/dbestruct.h b/dbe/dbestruct.h -index f9d938a..4b88d25 100644 +index 2002066..7733d0e 100644 --- a/dbe/dbestruct.h +++ b/dbe/dbestruct.h -@@ -162,6 +162,7 @@ typedef struct _DbeScreenPrivRec { +@@ -176,6 +176,7 @@ typedef struct _DbeScreenPrivRec { */ PositionWindowProcPtr PositionWindow; DestroyWindowProcPtr DestroyWindow; diff --git a/0001-ephyr-Add-resizeable-option.patch b/0001-ephyr-Add-resizeable-option.patch deleted file mode 100644 index 51aa95a..0000000 --- a/0001-ephyr-Add-resizeable-option.patch +++ /dev/null @@ -1,151 +0,0 @@ -From 3aac7a59dc6ef2d8bbf46ba5d37acdf6013e9450 Mon Sep 17 00:00:00 2001 -From: Daniel Martin -Date: Tue, 11 Dec 2012 17:23:55 +0100 -Subject: [PATCH] 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 -Reviewed-by: Peter Hutterer -Signed-off-by: Peter Hutterer ---- - hw/kdrive/ephyr/ephyr.c | 1 + - hw/kdrive/ephyr/ephyrinit.c | 6 ++++++ - hw/kdrive/ephyr/hostx.c | 32 +++++++++++++++++++++----------- - 3 files changed, 28 insertions(+), 11 deletions(-) - -diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c -index e6520d0..f32e432 100644 ---- a/hw/kdrive/ephyr/ephyr.c -+++ b/hw/kdrive/ephyr/ephyr.c -@@ -56,6 +56,7 @@ typedef struct _EphyrInputPrivate { - } EphyrKbdPrivate, EphyrPointerPrivate; - - Bool EphyrWantGrayScale = 0; -+Bool EphyrWantResize = 0; - - Bool - ephyrInitialize(KdCardInfo * card, EphyrPriv * priv) -diff --git a/hw/kdrive/ephyr/ephyrinit.c b/hw/kdrive/ephyr/ephyrinit.c -index 5e2eb67..adacac9 100644 ---- a/hw/kdrive/ephyr/ephyrinit.c -+++ b/hw/kdrive/ephyr/ephyrinit.c -@@ -31,6 +31,7 @@ - - extern Window EphyrPreExistingHostWin; - extern Bool EphyrWantGrayScale; -+extern Bool EphyrWantResize; - extern Bool kdHasPointer; - extern Bool kdHasKbd; - -@@ -116,6 +117,7 @@ ddxUseMsg(void) - ErrorF("-host-cursor Re-use exisiting X host server cursor\n"); - ErrorF("-fullscreen Attempt to run Xephyr fullscreen\n"); - ErrorF("-grayscale Simulate 8bit grayscale\n"); -+ ErrorF("-resizeable Make Xephyr windows resizeable\n"); - ErrorF - ("-fakexa Simulate acceleration using software rendering\n"); - ErrorF("-verbosity Set log verbosity level\n"); -@@ -210,6 +212,10 @@ ddxProcessArgument(int argc, char **argv, int i) - EphyrWantGrayScale = 1; - return 1; - } -+ else if (!strcmp(argv[i], "-resizeable")) { -+ EphyrWantResize = 1; -+ return 1; -+ } - else if (!strcmp(argv[i], "-fakexa")) { - ephyrFuncs.initAccel = ephyrDrawInit; - ephyrFuncs.enableAccel = ephyrDrawEnable; -diff --git a/hw/kdrive/ephyr/hostx.c b/hw/kdrive/ephyr/hostx.c -index aed0285..c8642cb 100644 ---- a/hw/kdrive/ephyr/hostx.c -+++ b/hw/kdrive/ephyr/hostx.c -@@ -117,6 +117,8 @@ extern EphyrKeySyms ephyrKeySyms; - - extern int monitorResolution; - -+extern Bool EphyrWantResize; -+ - char *ephyrResName = NULL; - int ephyrResNameFromCmd = 0; - char *ephyrTitle = NULL; -@@ -697,7 +699,7 @@ hostx_screen_init(EphyrScreenInfo screen, - XResizeWindow(HostX.dpy, host_screen->win, width, height); - - /* Ask the WM to keep our size static */ -- if (host_screen->win_pre_existing == None) { -+ if (host_screen->win_pre_existing == None && !EphyrWantResize) { - size_hints = XAllocSizeHints(); - size_hints->max_width = size_hints->min_width = width; - size_hints->max_height = size_hints->min_height = height; -@@ -1012,19 +1014,27 @@ hostx_get_event(EphyrHostXEvent * ev) - - case ConfigureNotify: - { -- struct EphyrHostScreen *host_screen = -- host_screen_from_window(xev.xconfigure.window); -+ struct EphyrHostScreen *host_screen; - -- if (host_screen && host_screen->win_pre_existing != None) { -- ev->type = EPHYR_EV_CONFIGURE; -- ev->data.configure.width = xev.xconfigure.width; -- ev->data.configure.height = xev.xconfigure.height; -- ev->data.configure.window = xev.xconfigure.window; -- ev->data.configure.screen = host_screen->mynum; -- return 1; -+ /* event compression as for Expose events, cause -+ * we don't want to resize the framebuffer for -+ * every single change */ -+ while (XCheckTypedWindowEvent(HostX.dpy, xev.xconfigure.window, -+ ConfigureNotify, &xev)); -+ host_screen = host_screen_from_window(xev.xconfigure.window); -+ -+ if (!host_screen || -+ (host_screen->win_pre_existing == None && !EphyrWantResize)) { -+ return 0; - } - -- return 0; -+ ev->type = EPHYR_EV_CONFIGURE; -+ ev->data.configure.width = xev.xconfigure.width; -+ ev->data.configure.height = xev.xconfigure.height; -+ ev->data.configure.window = xev.xconfigure.window; -+ ev->data.configure.screen = host_screen->mynum; -+ -+ return 1; - } - default: - break; --- -1.8.2.1 - -From 49521edaf8930b335afac2185209e26e7000820b Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Wed, 15 May 2013 08:51:51 +1000 -Subject: [PATCH] ephyr: add -resizeable to the man page - -Signed-off-by: Peter Hutterer -Reviewed-by: Alan Coopersmith ---- - hw/kdrive/ephyr/man/Xephyr.man | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/hw/kdrive/ephyr/man/Xephyr.man b/hw/kdrive/ephyr/man/Xephyr.man -index 792511b..f14f6c8 100644 ---- a/hw/kdrive/ephyr/man/Xephyr.man -+++ b/hw/kdrive/ephyr/man/Xephyr.man -@@ -59,6 +59,10 @@ set 'cursor acceleration': - The host's cursor is reused. This is only really there to aid - debugging by avoiding server paints for the cursor. Performance - improvement is negligible. -+.TP 8 -+.B -resizeable -+Allow the Xephyr window to be resized, even if not embedded into a parent -+window. By default, the Xephyr window has a fixed size. - .SH "SIGNALS" - Send a SIGUSR1 to the server (e.g. pkill -USR1 Xephyr) to - toggle the debugging mode. --- -1.8.2.1 diff --git a/0001-os-use-libunwind-to-generate-backtraces.patch b/0001-os-use-libunwind-to-generate-backtraces.patch deleted file mode 100644 index 58752df..0000000 --- a/0001-os-use-libunwind-to-generate-backtraces.patch +++ /dev/null @@ -1,204 +0,0 @@ -From e21e183059df5975e7086850d1931edb2c1bbd06 Mon Sep 17 00:00:00 2001 -From: Marcin Slusarz -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 -Reviewed-by: Peter Hutterer -Tested-by: Knut Petersen ---- - 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 53335b1..8b9cbc9 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -308,6 +308,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. -@@ -1336,7 +1343,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 e1cb9eb..a643dfc 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 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 - #include - -+#ifdef HAVE_LIBUNWIND -+ -+#define UNW_LOCAL_ONLY -+#include -+ -+#ifndef _GNU_SOURCE -+#define _GNU_SOURCE -+#endif -+#include -+ -+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.4 diff --git a/0001-randr-upstream-set-changed-fixes.patch b/0001-randr-upstream-set-changed-fixes.patch deleted file mode 100644 index dd6e7c6..0000000 --- a/0001-randr-upstream-set-changed-fixes.patch +++ /dev/null @@ -1,167 +0,0 @@ -From ce3de2dcb1b3bd99a693c828278a416c245acc37 Mon Sep 17 00:00:00 2001 -From: Dave Airlie -Date: Wed, 9 Jan 2013 14:23:57 +1000 -Subject: [PATCH] randr upstream set changed fixes - -Signed-off-by: Dave Airlie ---- - hw/xfree86/common/xf86platformBus.c | 3 ++- - 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 +- - 8 files changed, 35 insertions(+), 6 deletions(-) - -diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c -index 9034dad..bcb65ff 100644 ---- 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; -@@ -499,7 +500,7 @@ xf86platformRemoveDevice(int index) - xf86UnclaimPlatformSlot(&xf86_platform_devices[index], NULL); - - xf86_remove_platform_device(index); -- -+ RRTellChanged(xf86Screens[0]->pScreen); - out: - return; - } -diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c -index 01fc9c5..7f570cf 100644 ---- a/hw/xfree86/modes/xf86RandR12.c -+++ b/hw/xfree86/modes/xf86RandR12.c -@@ -1895,10 +1895,12 @@ xf86RandR14ProviderDestroy(ScreenPtr screen, RRProviderPtr provider) - if (config->randr_provider->offload_sink) { - DetachOffloadGPU(screen); - config->randr_provider->offload_sink = NULL; -+ RRSetChanged(screen); - } - else if (config->randr_provider->output_source) { - DetachOutputGPU(screen); - config->randr_provider->output_source = NULL; -+ RRSetChanged(screen); - } - else if (screen->current_master) - DetachUnboundGPU(screen); -diff --git a/randr/randr.c b/randr/randr.c -index f0decfc..cb6fce7 100644 ---- a/randr/randr.c -+++ b/randr/randr.c -@@ -464,6 +464,28 @@ TellChanged(WindowPtr pWin, pointer value) - 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 @@ RRTellChanged(ScreenPtr pScreen) - mastersp = pScrPriv; - } - -- if (pScrPriv->changed) { -+ if (mastersp->changed) { - UpdateCurrentTimeIf(); - if (mastersp->configChanged) { - mastersp->lastConfigTime = currentTime; -diff --git a/randr/randrstr.h b/randr/randrstr.h -index 2517479..2babfed 100644 ---- a/randr/randrstr.h -+++ b/randr/randrstr.h -@@ -486,6 +486,10 @@ extern _X_EXPORT void - 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 - */ -diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c -index 6e2eca5..b3fb5bd 100644 ---- a/randr/rrcrtc.c -+++ b/randr/rrcrtc.c -@@ -39,7 +39,7 @@ RRCrtcChanged(RRCrtcPtr crtc, Bool layoutChanged) - if (pScreen) { - rrScrPriv(pScreen); - -- pScrPriv->changed = TRUE; -+ RRSetChanged(pScreen); - /* - * Send ConfigureNotify on any layout change - */ -diff --git a/randr/rrinfo.c b/randr/rrinfo.c -index 1408d6f..fc57bd4 100644 ---- a/randr/rrinfo.c -+++ b/randr/rrinfo.c -@@ -225,7 +225,7 @@ RRScreenSetSizeRange(ScreenPtr pScreen, - pScrPriv->minHeight = minHeight; - pScrPriv->maxWidth = maxWidth; - pScrPriv->maxHeight = maxHeight; -- pScrPriv->changed = TRUE; -+ RRSetChanged(pScreen); - pScrPriv->configChanged = TRUE; - } - -diff --git a/randr/rroutput.c b/randr/rroutput.c -index 88781ba..922d61f 100644 ---- a/randr/rroutput.c -+++ b/randr/rroutput.c -@@ -36,7 +36,7 @@ RROutputChanged(RROutputPtr output, Bool configChanged) - output->changed = TRUE; - if (pScreen) { - rrScrPriv(pScreen); -- pScrPriv->changed = TRUE; -+ RRSetChanged(pScreen); - if (configChanged) - pScrPriv->configChanged = TRUE; - } -diff --git a/randr/rrscreen.c b/randr/rrscreen.c -index 39340cc..36179ae 100644 ---- a/randr/rrscreen.c -+++ b/randr/rrscreen.c -@@ -143,7 +143,7 @@ RRScreenSizeNotify(ScreenPtr pScreen) - pScrPriv->height = pScreen->height; - pScrPriv->mmWidth = pScreen->mmWidth; - pScrPriv->mmHeight = pScreen->mmHeight; -- pScrPriv->changed = TRUE; -+ RRSetChanged(pScreen); - /* pScrPriv->sizeChanged = TRUE; */ - - RRTellChanged(pScreen); --- -1.8.2 - diff --git a/0001-xwayland-Port-to-new-damage-API.patch b/0001-xwayland-Port-to-new-damage-API.patch new file mode 100644 index 0000000..2f6e987 --- /dev/null +++ b/0001-xwayland-Port-to-new-damage-API.patch @@ -0,0 +1,24 @@ +From cef3bbdd16e12c344e40e10ede0e511044e3a8df Mon Sep 17 00:00:00 2001 +From: Adam Jackson +Date: Fri, 25 Oct 2013 12:33:38 -0400 +Subject: [PATCH] xwayland: Port to new damage API + +Signed-off-by: Adam Jackson +--- + hw/xfree86/xwayland/xwayland-window.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/hw/xfree86/xwayland/xwayland-window.c b/hw/xfree86/xwayland/xwayland-window.c +index c03855c..0cb4f28 100644 +--- a/hw/xfree86/xwayland/xwayland-window.c ++++ b/hw/xfree86/xwayland/xwayland-window.c +@@ -190,7 +190,6 @@ xwl_unrealize_window(WindowPtr window) + xorg_list_del(&xwl_window->link); + if (RegionNotEmpty(DamageRegion(xwl_window->damage))) + xorg_list_del(&xwl_window->link_damage); +- DamageUnregister(&window->drawable, xwl_window->damage); + DamageDestroy(xwl_window->damage); + free(xwl_window); + dixSetPrivate(&window->devPrivates, &xwl_window_private_key, NULL); +-- +1.8.3.1 diff --git a/0002-xkb-Add-struct-XkbCompContext.patch b/0002-xkb-Add-struct-XkbCompContext.patch index 80f0375..3e79f75 100644 --- a/0002-xkb-Add-struct-XkbCompContext.patch +++ b/0002-xkb-Add-struct-XkbCompContext.patch @@ -1,7 +1,7 @@ -From 0620164c0ef62eea27f429f7a670c9bf9df2c23c Mon Sep 17 00:00:00 2001 +From e262b6e2a6664298e68ca01154c1a16115f24ee2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Tue, 9 Apr 2013 16:54:55 -0400 -Subject: [PATCH 02/30] xkb: Add struct XkbCompContext +Subject: [PATCH 02/39] xkb: Add struct XkbCompContext This commit adds a struct that contains most of the context for starting, running and cleaning up after xkbcomp. diff --git a/0003-xkb-Split-out-code-to-start-and-finish-xkbcomp.patch b/0003-xkb-Split-out-code-to-start-and-finish-xkbcomp.patch index b230578..cce9e4f 100644 --- a/0003-xkb-Split-out-code-to-start-and-finish-xkbcomp.patch +++ b/0003-xkb-Split-out-code-to-start-and-finish-xkbcomp.patch @@ -1,7 +1,7 @@ -From 0a6e38c446258060bd49536f0ddad165c6fd367e Mon Sep 17 00:00:00 2001 +From c2e072d4eeeaa15bfe4b963617688a1f25230ab7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Tue, 9 Apr 2013 17:11:03 -0400 -Subject: [PATCH 03/30] xkb: Split out code to start and finish xkbcomp +Subject: [PATCH 03/39] xkb: Split out code to start and finish xkbcomp Using the context struct from previous commit, we can now split out code to start xkbcomp and to finish and clean up after it. diff --git a/0004-dix-pre-scale-x-by-the-screen-device-resolution-rati.patch b/0004-dix-pre-scale-x-by-the-screen-device-resolution-rati.patch deleted file mode 100644 index 52eff32..0000000 --- a/0004-dix-pre-scale-x-by-the-screen-device-resolution-rati.patch +++ /dev/null @@ -1,103 +0,0 @@ -From 14d89b9a466b521b985bc95fc4994637367362a8 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Sat, 9 Mar 2013 20:43:51 +1000 -Subject: [PATCH 04/35] 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 -(cherry picked from commit 5cc2c96f824dbb28b9f8da61efc41596f8bd0561) ---- - dix/getevents.c | 46 ++++++++++++++++++++++++++++------------------ - 1 file changed, 28 insertions(+), 18 deletions(-) - -diff --git a/dix/getevents.c b/dix/getevents.c -index 241c7ec..ac0ccb2 100644 ---- a/dix/getevents.c -+++ b/dix/getevents.c -@@ -770,6 +770,29 @@ add_to_scroll_valuator(DeviceIntPtr dev, ValuatorMask *mask, int valuator, doubl - } - - -+static void -+scale_for_device_resolution(DeviceIntPtr dev, ValuatorMask *mask) -+{ -+ double x; -+ ValuatorClassPtr v = dev->valuator; -+ int xrange = v->axes[0].max_value - v->axes[0].min_value + 1; -+ int yrange = v->axes[1].max_value - v->axes[1].min_value + 1; -+ -+ double screen_ratio = 1.0 * screenInfo.width/screenInfo.height; -+ double device_ratio = 1.0 * xrange/yrange; -+ double resolution_ratio = 1.0; -+ double ratio; -+ -+ if (!valuator_mask_fetch_double(mask, 0, &x)) -+ return; -+ -+ if (v->axes[0].resolution != 0 && v->axes[1].resolution != 0) -+ resolution_ratio = 1.0 * v->axes[0].resolution/v->axes[1].resolution; -+ -+ ratio = device_ratio/resolution_ratio/screen_ratio; -+ valuator_mask_set_double(mask, 0, x * ratio); -+} -+ - /** - * Move the device's pointer by the values given in @valuators. - * -@@ -781,27 +804,14 @@ moveRelative(DeviceIntPtr dev, int flags, ValuatorMask *mask) - { - int i; - Bool clip_xy = IsMaster(dev) || !IsFloating(dev); -+ ValuatorClassPtr v = dev->valuator; - - /* for abs devices in relative mode, we've just scaled wrong, since we - mapped the device's shape into the screen shape. Undo this. */ -- if ((flags & POINTER_ABSOLUTE) == 0 && dev->valuator && -- dev->valuator->axes[0].min_value < dev->valuator->axes[0].max_value) { -- -- double ratio = 1.0 * screenInfo.width/screenInfo.height; -- -- if (ratio > 1.0) { -- double y; -- if (valuator_mask_fetch_double(mask, 1, &y)) { -- y *= ratio; -- valuator_mask_set_double(mask, 1, y); -- } -- } else { -- double x; -- if (valuator_mask_fetch_double(mask, 0, &x)) { -- x *= ratio; -- valuator_mask_set_double(mask, 0, x); -- } -- } -+ if ((flags & POINTER_ABSOLUTE) == 0 && v && v->numAxes > 1 && -+ v->axes[0].min_value < v->axes[0].max_value && -+ v->axes[1].min_value < v->axes[1].max_value) { -+ scale_for_device_resolution(dev, mask); - } - - /* calc other axes, clip, drop back into valuators */ --- -1.8.2.1 - diff --git a/0004-xkb-Add-XkbCompileKeymapFromString.patch b/0004-xkb-Add-XkbCompileKeymapFromString.patch index 12d6859..04cda12 100644 --- a/0004-xkb-Add-XkbCompileKeymapFromString.patch +++ b/0004-xkb-Add-XkbCompileKeymapFromString.patch @@ -1,7 +1,7 @@ -From 927cff328c2b920a04c78c4ee23bd6908ad46ea5 Mon Sep 17 00:00:00 2001 +From a8d1deb17d69dd8a5aa923edf6640173a5a2191b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Tue, 9 Apr 2013 17:45:08 -0400 -Subject: [PATCH 04/30] xkb: Add XkbCompileKeymapFromString() +Subject: [PATCH 04/39] xkb: Add XkbCompileKeymapFromString() This new function compiles a keymap from an in-memory string. We use it to add a new keyooard device init function, @@ -17,7 +17,7 @@ Reviewed-by: Daniel Stone 4 files changed, 144 insertions(+), 39 deletions(-) diff --git a/include/input.h b/include/input.h -index 7eed60b..9e98e1c 100644 +index 350daba..6573a3a 100644 --- a/include/input.h +++ b/include/input.h @@ -385,6 +385,12 @@ extern _X_EXPORT Bool InitKeyboardDeviceStruct(DeviceIntPtr /*device */ , @@ -34,10 +34,10 @@ index 7eed60b..9e98e1c 100644 CARD8 * /* map */ , int /* len */ , diff --git a/include/xkbsrv.h b/include/xkbsrv.h -index 45e2e8c..38cdd7b 100644 +index 346ebcc..bef98ef 100644 --- a/include/xkbsrv.h +++ b/include/xkbsrv.h -@@ -858,4 +858,8 @@ extern _X_EXPORT XkbDescPtr XkbCompileKeymap(DeviceIntPtr /* dev */ , +@@ -861,4 +861,8 @@ extern _X_EXPORT XkbDescPtr XkbCompileKeymap(DeviceIntPtr /* dev */ , XkbRMLVOSet * /* rmlvo */ ); @@ -221,10 +221,10 @@ index 001ff46..7a7cf1e 100644 + return KeymapOrDefaults(dev, xkb); } diff --git a/xkb/xkbInit.c b/xkb/xkbInit.c -index ed01114..7d06fa7 100644 +index f72655f..f3f0d8f 100644 --- a/xkb/xkbInit.c +++ b/xkb/xkbInit.c -@@ -475,9 +475,10 @@ XkbInitControls(DeviceIntPtr pXDev, XkbSrvInfoPtr xkbi) +@@ -490,9 +490,10 @@ XkbInitControls(DeviceIntPtr pXDev, XkbSrvInfoPtr xkbi) return Success; } @@ -238,16 +238,16 @@ index ed01114..7d06fa7 100644 { int i; unsigned int check; -@@ -491,7 +492,7 @@ InitKeyboardDeviceStruct(DeviceIntPtr dev, XkbRMLVOSet * rmlvo, - if (dev->key || dev->kbdfeed) - return FALSE; +@@ -507,7 +508,7 @@ InitKeyboardDeviceStruct(DeviceIntPtr dev, XkbRMLVOSet * rmlvo, + BUG_RETURN_VAL(dev->key != NULL, FALSE); + BUG_RETURN_VAL(dev->kbdfeed != NULL, FALSE); - if (!rmlvo) { + if (!rmlvo && !keymap) { rmlvo = &rmlvo_dflts; XkbGetRulesDflts(rmlvo); } -@@ -519,19 +520,26 @@ InitKeyboardDeviceStruct(DeviceIntPtr dev, XkbRMLVOSet * rmlvo, +@@ -535,19 +536,26 @@ InitKeyboardDeviceStruct(DeviceIntPtr dev, XkbRMLVOSet * rmlvo, } dev->key->xkbInfo = xkbi; @@ -276,7 +276,7 @@ index ed01114..7d06fa7 100644 } xkb = XkbAllocKeyboard(); -@@ -596,8 +604,10 @@ InitKeyboardDeviceStruct(DeviceIntPtr dev, XkbRMLVOSet * rmlvo, +@@ -612,8 +620,10 @@ InitKeyboardDeviceStruct(DeviceIntPtr dev, XkbRMLVOSet * rmlvo, dev->kbdfeed->CtrlProc(dev, &dev->kbdfeed->ctrl); @@ -289,7 +289,7 @@ index ed01114..7d06fa7 100644 XkbFreeRMLVOSet(&rmlvo_dflts, FALSE); return TRUE; -@@ -616,6 +626,24 @@ InitKeyboardDeviceStruct(DeviceIntPtr dev, XkbRMLVOSet * rmlvo, +@@ -632,6 +642,24 @@ InitKeyboardDeviceStruct(DeviceIntPtr dev, XkbRMLVOSet * rmlvo, return FALSE; } diff --git a/0005-configure-Track-updated-version-of-libxtrans.patch b/0005-configure-Track-updated-version-of-libxtrans.patch index febb30e..e56f28a 100644 --- a/0005-configure-Track-updated-version-of-libxtrans.patch +++ b/0005-configure-Track-updated-version-of-libxtrans.patch @@ -1,7 +1,7 @@ -From 3e23ef6269cfbcd2a3fb7e56bfed347ad6c1f3b9 Mon Sep 17 00:00:00 2001 +From 513821c7014ad999033b273f76a521710f8f6116 Mon Sep 17 00:00:00 2001 From: Tiago Vignatti Date: Thu, 22 Nov 2012 20:22:56 -0200 -Subject: [PATCH 05/30] configure: Track updated version of libxtrans +Subject: [PATCH 05/39] configure: Track updated version of libxtrans XWayland fails to initialize in some systems complaining about realloc problems on libxtrans (when ListenOnOpenFD() is called). It got fixed in @@ -18,7 +18,7 @@ Signed-off-by: Tiago Vignatti 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac -index ac24cb6..737025c 100644 +index 7b4e70f..7f99d2f 100644 --- a/configure.ac +++ b/configure.ac @@ -802,7 +802,7 @@ FIXESPROTO="fixesproto >= 5.0" diff --git a/0005-dix-scale-y-back-instead-of-x-up-when-pre-scaling-co.patch b/0005-dix-scale-y-back-instead-of-x-up-when-pre-scaling-co.patch deleted file mode 100644 index 2fbb577..0000000 --- a/0005-dix-scale-y-back-instead-of-x-up-when-pre-scaling-co.patch +++ /dev/null @@ -1,74 +0,0 @@ -From 9d3cf2e519291f1931fb25ef6a3b2c609e48a787 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Fri, 19 Jul 2013 08:56:38 +1000 -Subject: [PATCH] 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 ---- - dix/getevents.c | 6 +++--- - hw/xfree86/common/xf86Module.h | 2 +- - 2 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/dix/getevents.c b/dix/getevents.c -index 51d4fd4..f5ab8c4 100644 ---- a/dix/getevents.c -+++ b/dix/getevents.c -@@ -773,7 +773,7 @@ add_to_scroll_valuator(DeviceIntPtr dev, ValuatorMask *mask, int valuator, doubl - static void - scale_for_device_resolution(DeviceIntPtr dev, ValuatorMask *mask) - { -- double x; -+ double y; - ValuatorClassPtr v = dev->valuator; - int xrange = v->axes[0].max_value - v->axes[0].min_value + 1; - int yrange = v->axes[1].max_value - v->axes[1].min_value + 1; -@@ -783,14 +783,14 @@ scale_for_device_resolution(DeviceIntPtr dev, ValuatorMask *mask) - double resolution_ratio = 1.0; - double ratio; - -- if (!valuator_mask_fetch_double(mask, 0, &x)) -+ if (!valuator_mask_fetch_double(mask, 1, &y)) - return; - - if (v->axes[0].resolution != 0 && v->axes[1].resolution != 0) - resolution_ratio = 1.0 * v->axes[0].resolution/v->axes[1].resolution; - - ratio = device_ratio/resolution_ratio/screen_ratio; -- valuator_mask_set_double(mask, 0, x * ratio); -+ valuator_mask_set_double(mask, 1, y / ratio); - } - - /** -diff --git a/hw/xfree86/common/xf86Module.h b/hw/xfree86/common/xf86Module.h -index 1393427..e0cec05 100644 ---- a/hw/xfree86/common/xf86Module.h -+++ b/hw/xfree86/common/xf86Module.h -@@ -81,7 +81,7 @@ typedef enum { - */ - #define ABI_ANSIC_VERSION SET_ABI_VERSION(0, 4) - #define ABI_VIDEODRV_VERSION SET_ABI_VERSION(14, 1) --#define ABI_XINPUT_VERSION SET_ABI_VERSION(19, 1) -+#define ABI_XINPUT_VERSION SET_ABI_VERSION(19, 2) - #define ABI_EXTENSION_VERSION SET_ABI_VERSION(7, 0) - #define ABI_FONT_VERSION SET_ABI_VERSION(0, 6) - --- -1.8.2.1 - diff --git a/0006-os-Add-a-function-to-create-a-client-for-an-fd.patch b/0006-os-Add-a-function-to-create-a-client-for-an-fd.patch index df4f818..2fa1a31 100644 --- a/0006-os-Add-a-function-to-create-a-client-for-an-fd.patch +++ b/0006-os-Add-a-function-to-create-a-client-for-an-fd.patch @@ -1,7 +1,7 @@ -From e6d9ba7d490a08ffc553192e229d2488d7abbc9f Mon Sep 17 00:00:00 2001 +From 701261b0407926a34b6d23151f414d95b159c494 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Tue, 21 Jun 2011 21:28:31 -0400 -Subject: [PATCH 06/30] os: Add a function to create a client for an fd +Subject: [PATCH 06/39] os: Add a function to create a client for an fd --- include/opaque.h | 1 + @@ -116,10 +116,10 @@ index 6cd8bcf..499a4dd 100644 + #endif diff --git a/os/utils.c b/os/utils.c -index 60e828e..e56e4a4 100644 +index 97c3125..3e9f525 100644 --- a/os/utils.c +++ b/os/utils.c -@@ -780,7 +780,11 @@ ProcessCommandLine(int argc, char *argv[]) +@@ -778,7 +778,11 @@ ProcessCommandLine(int argc, char *argv[]) #endif else if (strcmp(argv[i], "-nolisten") == 0) { if (++i < argc) { diff --git a/0007-Export-xf86NewInputDevice-and-xf86AllocateInput.patch b/0007-Export-xf86NewInputDevice-and-xf86AllocateInput.patch index 458cd3a..4676cab 100644 --- a/0007-Export-xf86NewInputDevice-and-xf86AllocateInput.patch +++ b/0007-Export-xf86NewInputDevice-and-xf86AllocateInput.patch @@ -1,7 +1,7 @@ -From a097d8905dcfeb799b003faf6aeea3826b5bb35b Mon Sep 17 00:00:00 2001 +From be359481c9c0947451d119efb643dcaef0529a42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Thu, 21 Jul 2011 09:55:46 -0700 -Subject: [PATCH 07/30] Export xf86NewInputDevice and xf86AllocateInput +Subject: [PATCH 07/39] Export xf86NewInputDevice and xf86AllocateInput --- hw/xfree86/common/xf86Xinput.c | 2 +- diff --git a/0008-Export-CompositeRedirectSubwindows-and-CompositeUnRe.patch b/0008-Export-CompositeRedirectSubwindows-and-CompositeUnRe.patch index 7b66658..6892672 100644 --- a/0008-Export-CompositeRedirectSubwindows-and-CompositeUnRe.patch +++ b/0008-Export-CompositeRedirectSubwindows-and-CompositeUnRe.patch @@ -1,7 +1,7 @@ -From e56c222b8e6e7f48e928770b1bd4dff20ad627a3 Mon Sep 17 00:00:00 2001 +From 2493a32018a467ff7a6b8420f1110eb5687a0526 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Fri, 18 Sep 2009 22:02:43 -0400 -Subject: [PATCH 08/30] Export CompositeRedirectSubwindows and +Subject: [PATCH 08/39] Export CompositeRedirectSubwindows and CompositeUnRedirectSubwindows --- @@ -10,7 +10,7 @@ Subject: [PATCH 08/30] Export CompositeRedirectSubwindows and 2 files changed, 15 insertions(+) diff --git a/composite/compalloc.c b/composite/compalloc.c -index cc69c68..edee499 100644 +index b7d731e..98b27b1 100644 --- a/composite/compalloc.c +++ b/composite/compalloc.c @@ -46,6 +46,7 @@ diff --git a/0009-Add-redirect-window-for-input-device-feature.patch b/0009-Add-redirect-window-for-input-device-feature.patch index 36c87cc..34049dc 100644 --- a/0009-Add-redirect-window-for-input-device-feature.patch +++ b/0009-Add-redirect-window-for-input-device-feature.patch @@ -1,7 +1,7 @@ -From d2fcacc2ce6da5348a1ac519cac845270a658669 Mon Sep 17 00:00:00 2001 +From be8fccebacac8c209bbc6e42e5aba49bc8102491 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Fri, 18 Sep 2009 22:09:03 -0400 -Subject: [PATCH 09/30] Add redirect window for input device feature +Subject: [PATCH 09/39] Add redirect window for input device feature --- Xi/exevents.c | 13 +++++++++++++ @@ -11,10 +11,10 @@ Subject: [PATCH 09/30] Add redirect window for input device feature 4 files changed, 29 insertions(+), 1 deletion(-) diff --git a/Xi/exevents.c b/Xi/exevents.c -index 067e6b3..6dd182a 100644 +index fd4b80c..f510a9e 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c -@@ -2029,6 +2029,19 @@ DeliverTouchEvents(DeviceIntPtr dev, TouchPointInfoPtr ti, +@@ -2025,6 +2025,19 @@ DeliverTouchEvents(DeviceIntPtr dev, TouchPointInfoPtr ti, } } @@ -35,10 +35,10 @@ index 067e6b3..6dd182a 100644 InitProximityClassDeviceStruct(DeviceIntPtr dev) { diff --git a/dix/events.c b/dix/events.c -index c079f97..a0c7060 100644 +index 4632bb7..9caa8b0 100644 --- a/dix/events.c +++ b/dix/events.c -@@ -2820,7 +2820,16 @@ XYToWindow(SpritePtr pSprite, int x, int y) +@@ -2877,7 +2877,16 @@ XYToWindow(SpritePtr pSprite, int x, int y) BoxRec box; pSprite->spriteTraceGood = 1; /* root window still there */ @@ -72,7 +72,7 @@ index 321fc42..ba93be3 100644 CheckGrabValues(ClientPtr /* client */ , GrabParameters * /* param */ ); diff --git a/include/inputstr.h b/include/inputstr.h -index 2da72c1..2ae6f5b 100644 +index dc36c5d..09471cf 100644 --- a/include/inputstr.h +++ b/include/inputstr.h @@ -246,6 +246,8 @@ typedef struct _SpriteRec { diff --git a/0010-dri2-Introduce-a-third-version-of-the-AuthMagic-func.patch b/0010-dri2-Introduce-a-third-version-of-the-AuthMagic-func.patch index f85a955..9f3ef19 100644 --- a/0010-dri2-Introduce-a-third-version-of-the-AuthMagic-func.patch +++ b/0010-dri2-Introduce-a-third-version-of-the-AuthMagic-func.patch @@ -1,7 +1,7 @@ -From 5c3fe524e192c878278c650c337b52044daf144a Mon Sep 17 00:00:00 2001 +From 53821bf2c6e95332e3141cafe2fe26527f5dd543 Mon Sep 17 00:00:00 2001 From: Tiago Vignatti Date: Wed, 21 Aug 2013 21:23:09 -0700 -Subject: [PATCH 10/30] dri2: Introduce a third version of the AuthMagic +Subject: [PATCH 10/39] dri2: Introduce a third version of the AuthMagic function This most recent version takes a client pointer to allow xwayland to @@ -13,10 +13,10 @@ asynchronously authenticate a client. 3 files changed, 34 insertions(+), 12 deletions(-) diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c -index 40963c3..8bf0392 100644 +index 0b047f0..efdcd66 100644 --- a/hw/xfree86/dri2/dri2.c +++ b/hw/xfree86/dri2/dri2.c -@@ -122,8 +122,9 @@ typedef struct _DRI2Screen { +@@ -121,8 +121,9 @@ typedef struct _DRI2Screen { DRI2ScheduleSwapProcPtr ScheduleSwap; DRI2GetMSCProcPtr GetMSC; DRI2ScheduleWaitMSCProcPtr ScheduleWaitMSC; @@ -27,7 +27,7 @@ index 40963c3..8bf0392 100644 DRI2ReuseBufferNotifyProcPtr ReuseBufferNotify; DRI2SwapLimitValidateProcPtr SwapLimitValidate; DRI2GetParamProcPtr GetParam; -@@ -1369,7 +1370,7 @@ DRI2Authenticate(ClientPtr client, ScreenPtr pScreen, uint32_t magic) +@@ -1352,7 +1353,7 @@ DRI2Authenticate(ClientPtr client, ScreenPtr pScreen, uint32_t magic) return FALSE; primescreen = GetScreenPrime(pScreen, dri2_client->prime_id); @@ -36,7 +36,7 @@ index 40963c3..8bf0392 100644 return FALSE; return TRUE; } -@@ -1474,8 +1475,11 @@ DRI2ScreenInit(ScreenPtr pScreen, DRI2InfoPtr info) +@@ -1457,8 +1458,11 @@ DRI2ScreenInit(ScreenPtr pScreen, DRI2InfoPtr info) cur_minor = 1; } @@ -49,7 +49,7 @@ index 40963c3..8bf0392 100644 } if (info->version >= 5) { ds->LegacyAuthMagic = info->AuthMagic; -@@ -1514,7 +1518,7 @@ DRI2ScreenInit(ScreenPtr pScreen, DRI2InfoPtr info) +@@ -1497,7 +1501,7 @@ DRI2ScreenInit(ScreenPtr pScreen, DRI2InfoPtr info) * If the driver doesn't provide an AuthMagic function * it relies on the old method (using libdrm) or fails */ diff --git a/0011-Add-xwayland-module.patch b/0011-Add-xwayland-module.patch index 07a7b3c..b5e083b 100644 --- a/0011-Add-xwayland-module.patch +++ b/0011-Add-xwayland-module.patch @@ -1,7 +1,7 @@ -From a426cf14900509b7836495cbc8310351c3d24dde Mon Sep 17 00:00:00 2001 +From b1dc31ffa9508e38164432e9431e4b9c5ce80c34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Fri, 18 Sep 2009 22:08:16 -0400 -Subject: [PATCH 11/30] Add xwayland module +Subject: [PATCH 11/39] Add xwayland module MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -16,37 +16,27 @@ Squashed and rebased from the xwayland-1.12 branch. Contributions from Scott Moreau Tiago Vignatti --- - configure.ac | 13 +- - configure.ac.orig | 2332 ++++++++++++++++++++++++++++++++ - hw/xfree86/Makefile.am | 8 +- - hw/xfree86/Makefile.am.jx | 126 ++ - hw/xfree86/Makefile.am.orig | 122 ++ - hw/xfree86/Makefile.am.rej | 17 + - hw/xfree86/common/xf86Config.c | 28 +- - hw/xfree86/common/xf86Globals.c | 2 + - hw/xfree86/common/xf86Init.c | 20 + - hw/xfree86/common/xf86Init.c.orig | 1656 +++++++++++++++++++++++ - hw/xfree86/common/xf86Priv.h | 2 + - hw/xfree86/dri2/dri2.c | 7 +- - hw/xfree86/dri2/dri2.h | 2 +- - hw/xfree86/xwayland/Makefile.am | 44 + - hw/xfree86/xwayland/drm.xml | 139 ++ - hw/xfree86/xwayland/xserver.xml | 18 + - hw/xfree86/xwayland/xwayland-cursor.c | 241 ++++ - hw/xfree86/xwayland/xwayland-drm.c | 235 ++++ - hw/xfree86/xwayland/xwayland-input.c | 610 +++++++++ - hw/xfree86/xwayland/xwayland-output.c | 309 +++++ - hw/xfree86/xwayland/xwayland-private.h | 132 ++ - hw/xfree86/xwayland/xwayland-window.c | 317 +++++ - hw/xfree86/xwayland/xwayland.c | 392 ++++++ - hw/xfree86/xwayland/xwayland.h | 83 ++ - include/xorg-server.h.in | 3 + - 25 files changed, 6848 insertions(+), 10 deletions(-) - create mode 100644 configure.ac.orig - create mode 100644 hw/xfree86/Makefile.am.jx - create mode 100644 hw/xfree86/Makefile.am.orig - create mode 100644 hw/xfree86/Makefile.am.rej - create mode 100644 hw/xfree86/common/xf86Init.c.orig + configure.ac | 13 +- + hw/xfree86/Makefile.am | 8 +- + hw/xfree86/common/xf86Config.c | 28 +- + hw/xfree86/common/xf86Globals.c | 2 + + hw/xfree86/common/xf86Init.c | 20 ++ + hw/xfree86/common/xf86Priv.h | 2 + + hw/xfree86/dri2/dri2.c | 7 +- + hw/xfree86/dri2/dri2.h | 2 +- + hw/xfree86/xwayland/Makefile.am | 44 +++ + hw/xfree86/xwayland/drm.xml | 139 ++++++++ + hw/xfree86/xwayland/xserver.xml | 18 + + hw/xfree86/xwayland/xwayland-cursor.c | 241 +++++++++++++ + hw/xfree86/xwayland/xwayland-drm.c | 235 +++++++++++++ + hw/xfree86/xwayland/xwayland-input.c | 610 +++++++++++++++++++++++++++++++++ + hw/xfree86/xwayland/xwayland-output.c | 309 +++++++++++++++++ + hw/xfree86/xwayland/xwayland-private.h | 132 +++++++ + hw/xfree86/xwayland/xwayland-window.c | 317 +++++++++++++++++ + hw/xfree86/xwayland/xwayland.c | 392 +++++++++++++++++++++ + hw/xfree86/xwayland/xwayland.h | 83 +++++ + include/xorg-server.h.in | 3 + + 20 files changed, 2595 insertions(+), 10 deletions(-) create mode 100644 hw/xfree86/xwayland/Makefile.am create mode 100644 hw/xfree86/xwayland/drm.xml create mode 100644 hw/xfree86/xwayland/xserver.xml @@ -60,7 +50,7 @@ Squashed and rebased from the xwayland-1.12 branch. Contributions from create mode 100644 hw/xfree86/xwayland/xwayland.h diff --git a/configure.ac b/configure.ac -index 737025c..c65e1a7 100644 +index 7f99d2f..da10573 100644 --- a/configure.ac +++ b/configure.ac @@ -635,6 +635,7 @@ AC_ARG_ENABLE(windowswm, AS_HELP_STRING([--enable-windowswm], [Build XWin w @@ -86,7 +76,7 @@ index 737025c..c65e1a7 100644 AM_CONDITIONAL(MITSHM, [test "x$MITSHM" = xyes]) if test "x$MITSHM" = xyes; then AC_DEFINE(MITSHM, 1, [Support MIT-SHM extension]) -@@ -1111,12 +1120,13 @@ case "$DRI2,$HAVE_DRI2PROTO" in +@@ -1113,12 +1122,13 @@ case "$DRI2,$HAVE_DRI2PROTO" in esac AM_CONDITIONAL(DRI2, test "x$DRI2" = xyes) @@ -101,7 +91,7 @@ index 737025c..c65e1a7 100644 if test "x$DRI2" = xyes; then save_CFLAGS=$CFLAGS -@@ -2267,6 +2277,7 @@ hw/xfree86/dixmods/Makefile +@@ -2276,6 +2286,7 @@ hw/xfree86/dixmods/Makefile hw/xfree86/doc/Makefile hw/xfree86/dri/Makefile hw/xfree86/dri2/Makefile @@ -109,2346 +99,8 @@ index 737025c..c65e1a7 100644 hw/xfree86/exa/Makefile hw/xfree86/exa/man/Makefile hw/xfree86/fbdevhw/Makefile -diff --git a/configure.ac.orig b/configure.ac.orig -new file mode 100644 -index 0000000..737025c ---- /dev/null -+++ b/configure.ac.orig -@@ -0,0 +1,2332 @@ -+dnl Copyright © 2003-2007 Keith Packard, Daniel Stone -+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 -+dnl the rights to use, copy, modify, merge, publish, distribute, sublicense, -+dnl and/or sell copies of the Software, and to permit persons to whom the -+dnl Software is furnished to do so, subject to the following conditions: -+dnl -+dnl The above copyright notice and this permission notice (including the next -+dnl paragraph) shall be included in all copies or substantial portions of the -+dnl Software. -+dnl -+dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -+dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -+dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -+dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -+dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -+dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -+dnl DEALINGS IN THE SOFTWARE. -+dnl -+dnl Authors: Keith Packard -+dnl Daniel Stone -+dnl an unwitting cast of miscellaneous others -+dnl -+dnl Process this file with autoconf to create configure. -+ -+AC_PREREQ(2.60) -+AC_INIT([xorg-server], 1.14.3, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server) -+RELEASE_DATE="2013-09-12" -+RELEASE_NAME="September Rain" -+AC_CONFIG_SRCDIR([Makefile.am]) -+AM_INIT_AUTOMAKE([foreign dist-bzip2]) -+ -+# Require xorg-macros minimum of 1.14 for XORG_COMPILER_BRAND in XORG_DEFAULT_OPTIONS -+m4_ifndef([XORG_MACROS_VERSION], -+ [m4_fatal([must install xorg-macros 1.14 or later before running autoconf/autogen])]) -+XORG_MACROS_VERSION(1.14) -+XORG_DEFAULT_OPTIONS -+XORG_WITH_DOXYGEN(1.6.1) -+XORG_CHECK_SGML_DOCTOOLS(1.8) -+XORG_ENABLE_DOCS -+XORG_ENABLE_DEVEL_DOCS -+XORG_WITH_XMLTO(0.0.20) -+XORG_WITH_FOP -+XORG_WITH_XSLTPROC -+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])]) -+XORG_FONT_MACROS_VERSION(1.1) -+ -+dnl this gets generated by autoheader, and thus contains all the defines. we -+dnl don't ever actually use it, internally. -+AC_CONFIG_HEADERS(include/do-not-use-config.h) -+dnl xorg-server.h is an external header, designed to be included by loadable -+dnl drivers. -+AC_CONFIG_HEADERS(include/xorg-server.h) -+dnl dix-config.h covers most of the DIX (i.e. everything but the DDX, not just -+dnl dix/). -+AC_CONFIG_HEADERS(include/dix-config.h) -+dnl xorg-config.h covers the Xorg DDX. -+AC_CONFIG_HEADERS(include/xorg-config.h) -+dnl xkb-config.h covers XKB for the Xorg and Xnest DDXs. -+AC_CONFIG_HEADERS(include/xkb-config.h) -+dnl xwin-config.h covers the XWin DDX. -+AC_CONFIG_HEADERS(include/xwin-config.h) -+dnl kdrive-config.h covers the kdrive DDX -+AC_CONFIG_HEADERS(include/kdrive-config.h) -+dnl version-config.h covers the version numbers so they can be bumped without -+dnl forcing an entire recompile.x -+AC_CONFIG_HEADERS(include/version-config.h) -+ -+AM_PROG_AS -+AC_PROG_LN_S -+AC_LIBTOOL_WIN32_DLL -+AC_DISABLE_STATIC -+AC_PROG_LIBTOOL -+PKG_PROG_PKG_CONFIG -+AC_PROG_LEX -+AC_PROG_YACC -+AC_SYS_LARGEFILE -+XORG_PROG_RAWCPP -+ -+# Quoted so that make will expand $(CWARNFLAGS) in makefiles to allow -+# easier overrides at build time. -+XSERVER_CFLAGS='$(CWARNFLAGS)' -+ -+dnl Explicitly add -fno-strict-aliasing since this option should disappear -+dnl from util-macros CWARNFLAGS -+if test "x$GCC" = xyes ; then -+ XSERVER_CFLAGS="$XSERVER_CFLAGS -fno-strict-aliasing" -+fi -+ -+dnl Check for dtrace program (needed to build Xserver dtrace probes) -+dnl Also checks for , since some Linux distros have an -+dnl ISDN trace program named dtrace -+AC_ARG_WITH(dtrace, AS_HELP_STRING([--with-dtrace=PATH], -+ [Enable dtrace probes (default: enabled if dtrace found)]), -+ [WDTRACE=$withval], [WDTRACE=auto]) -+if test "x$WDTRACE" = "xyes" -o "x$WDTRACE" = "xauto" ; then -+ AC_PATH_PROG(DTRACE, [dtrace], [not_found], [$PATH:/usr/sbin]) -+ if test "x$DTRACE" = "xnot_found" ; then -+ if test "x$WDTRACE" = "xyes" ; then -+ AC_MSG_FAILURE([dtrace requested but not found]) -+ fi -+ WDTRACE="no" -+ else -+ AC_CHECK_HEADER(sys/sdt.h, [HAS_SDT_H="yes"], [HAS_SDT_H="no"]) -+ if test "x$WDTRACE" = "xauto" -a "x$HAS_SDT_H" = "xno" ; then -+ WDTRACE="no" -+ fi -+ fi -+fi -+if test "x$WDTRACE" != "xno" ; then -+ AC_DEFINE(XSERVER_DTRACE, 1, -+ [Define to 1 if the DTrace Xserver provider probes should be built in.]) -+ -+# Solaris/OpenSolaris require dtrace -G to build dtrace probe information into -+# object files, and require linking with those as relocatable objects, not .a -+# archives. MacOS X handles all this in the normal compiler toolchain, and on -+# some releases (like Tiger), will error out on dtrace -G. For now, other -+# platforms with Dtrace ports are assumed to support -G (the FreeBSD and Linux -+# ports appear to, based on my web searches, but have not yet been tested). -+ case $host_os in -+ darwin*) SPECIAL_DTRACE_OBJECTS=no ;; -+ *) SPECIAL_DTRACE_OBJECTS=yes ;; -+ esac -+fi -+AM_CONDITIONAL(XSERVER_DTRACE, [test "x$WDTRACE" != "xno"]) -+AM_CONDITIONAL(SPECIAL_DTRACE_OBJECTS, [test "x$SPECIAL_DTRACE_OBJECTS" = "xyes"]) -+ -+AC_HEADER_DIRENT -+AC_HEADER_STDC -+AC_CHECK_HEADERS([fcntl.h stdlib.h string.h unistd.h dlfcn.h stropts.h fnmatch.h sys/utsname.h]) -+ -+dnl Checks for typedefs, structures, and compiler characteristics. -+AC_C_CONST -+AC_C_TYPEOF -+AC_C_BIGENDIAN([ENDIAN="X_BIG_ENDIAN"], [ENDIAN="X_LITTLE_ENDIAN"]) -+ -+AC_CHECK_SIZEOF([unsigned long]) -+if test "$ac_cv_sizeof_unsigned_long" = 8; then -+ AC_DEFINE(_XSERVER64, 1, [Define to 1 if unsigned long is 64 bits.]) -+fi -+ -+AC_TYPE_PID_T -+ -+# Checks for headers/macros for byte swapping -+# Known variants: -+# bswap_16, bswap_32, bswap_64 (glibc) -+# __swap16, __swap32, __swap64 (OpenBSD) -+# bswap16, bswap32, bswap64 (other BSD's) -+# and a fallback to local macros if none of the above are found -+ -+# if is found, assume it's the correct version -+AC_CHECK_HEADERS([byteswap.h]) -+ -+# if is found, have to check which version -+AC_CHECK_HEADER([sys/endian.h], [HAVE_SYS_ENDIAN_H="yes"], [HAVE_SYS_ENDIAN_H="no"]) -+ -+if test "x$HAVE_SYS_ENDIAN_H" = "xyes" ; then -+ AC_MSG_CHECKING([for __swap16 variant of byteswapping macros]) -+ AC_LINK_IFELSE([AC_LANG_PROGRAM([ -+#include -+#include -+ ], [ -+int a = 1, b; -+b = __swap16(a); -+ ]) -+], [SYS_ENDIAN__SWAP='yes'], [SYS_ENDIAN__SWAP='no']) -+ AC_MSG_RESULT([$SYS_ENDIAN__SWAP]) -+ -+ AC_MSG_CHECKING([for bswap16 variant of byteswapping macros]) -+ AC_LINK_IFELSE([AC_LANG_PROGRAM([ -+#include -+#include -+ ], [ -+int a = 1, b; -+b = bswap16(a); -+ ]) -+], [SYS_ENDIAN_BSWAP='yes'], [SYS_ENDIAN_BSWAP='no']) -+ AC_MSG_RESULT([$SYS_ENDIAN_BSWAP]) -+ -+ if test "$SYS_ENDIAN_BSWAP" = "yes" ; then -+ USE_SYS_ENDIAN_H=yes -+ BSWAP=bswap -+ else -+ if test "$SYS_ENDIAN__SWAP" = "yes" ; then -+ USE_SYS_ENDIAN_H=yes -+ BSWAP=__swap -+ else -+ USE_SYS_ENDIAN_H=no -+ fi -+ fi -+ -+ if test "$USE_SYS_ENDIAN_H" = "yes" ; then -+ AC_DEFINE([USE_SYS_ENDIAN_H], 1, -+ [Define to use byteswap macros from ]) -+ AC_DEFINE_UNQUOTED([bswap_16], ${BSWAP}16, -+ [Define to 16-bit byteswap macro]) -+ AC_DEFINE_UNQUOTED([bswap_32], ${BSWAP}32, -+ [Define to 32-bit byteswap macro]) -+ AC_DEFINE_UNQUOTED([bswap_64], ${BSWAP}64, -+ [Define to 64-bit byteswap macro]) -+ fi -+fi -+ -+dnl Check to see if dlopen is in default libraries (like Solaris, which -+dnl has it in libc), or if libdl is needed to get it. -+AC_CHECK_FUNC([dlopen], [], -+ AC_CHECK_LIB([dl], [dlopen], DLOPEN_LIBS="-ldl")) -+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]) -+AC_REPLACE_FUNCS([strcasecmp strcasestr strlcat strlcpy strndup]) -+ -+dnl Find the math libary, then check for cbrt function in it. -+AC_CHECK_LIB(m, sqrt) -+AC_CHECK_FUNCS([cbrt]) -+ -+AC_CHECK_HEADERS([ndbm.h dbm.h rpcsvc/dbm.h]) -+ -+dnl AGPGART headers -+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]) -+ -+dnl MTRR header -+AC_CHECK_HEADERS([asm/mtrr.h], ac_cv_asm_mtrr_h=yes) -+if test "x$ac_cv_asm_mtrr_h" = xyes; then -+ HAVE_MTRR=yes -+fi -+ -+dnl BSD MTRR header -+AC_CHECK_HEADERS([sys/memrange.h], ac_cv_memrange_h=yes) -+if test "x$ac_cv_memrange_h" = xyes; then -+ HAVE_MTRR=yes -+fi -+ -+if test "x$HAVE_MTRR" = xyes; then -+ AC_DEFINE(HAS_MTRR_SUPPORT, 1, [MTRR support available]) -+fi -+ -+dnl A NetBSD MTRR header -+AC_CHECK_HEADERS([machine/mtrr.h], ac_cv_machine_mtrr_h=yes) -+if test "x$ac_cv_machine_mtrr_h" = xyes; then -+ AC_DEFINE(HAS_MTRR_BUILTIN, 1, [Define to 1 if NetBSD built-in MTRR -+ support is available]) -+fi -+ -+dnl FreeBSD kldload support (sys/linker.h) -+AC_CHECK_HEADERS([sys/linker.h], -+ [ac_cv_sys_linker_h=yes], -+ [ac_cv_sys_linker_h=no], -+ [#include ]) -+AM_CONDITIONAL(FREEBSD_KLDLOAD, [test "x$ac_cv_sys_linker_h" = xyes]) -+ -+AC_CACHE_CHECK([for SYSV IPC], -+ ac_cv_sysv_ipc, -+ [AC_TRY_LINK([ -+#include -+#include -+#include -+#include -+],[ -+{ -+ int id; -+ id = shmget(IPC_PRIVATE, 512, S_IRUSR | S_IWUSR); -+ if (id < 0) return -1; -+ return shmctl(id, IPC_RMID, 0); -+}], -+ [ac_cv_sysv_ipc=yes], -+ [ac_cv_sysv_ipc=no])]) -+if test "x$ac_cv_sysv_ipc" = xyes; then -+ AC_DEFINE(HAVE_SYSV_IPC, 1, [Define to 1 if SYSV IPC is available]) -+fi -+ -+dnl OpenBSD /dev/xf86 aperture driver -+if test -c /dev/xf86 ; then -+ AC_DEFINE(HAS_APERTURE_DRV, 1, [System has /dev/xf86 aperture driver]) -+fi -+ -+dnl BSD APM support -+AC_CHECK_HEADER([machine/apmvar.h],[ -+ AC_CHECK_HEADER([sys/event.h], -+ ac_cv_BSD_KQUEUE_APM=yes, -+ ac_cv_BSD_APM=yes)]) -+ -+AM_CONDITIONAL(BSD_APM, [test "x$ac_cv_BSD_APM" = xyes]) -+AM_CONDITIONAL(BSD_KQUEUE_APM, [test "x$ac_cv_BSD_KQUEUE_APM" = xyes]) -+ -+dnl glibc backtrace support check (hw/xfree86/common/xf86Events.c) -+AC_CHECK_HEADER([execinfo.h],[ -+ AC_CHECK_LIB(c, backtrace, [ -+ AC_DEFINE(HAVE_BACKTRACE, 1, [Has backtrace support]) -+ AC_DEFINE(HAVE_EXECINFO_H, 1, [Have 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. -+dnl --------------------------------------------------------------------------- -+DEFAULT_INT10="x86emu" -+ -+dnl Override defaults as needed for specific platforms: -+ -+case $host_cpu in -+ alpha*) -+ ALPHA_VIDEO=yes -+ case $host_os in -+ *freebsd*) SYS_LIBS=-lio ;; -+ *netbsd*) AC_DEFINE(USE_ALPHA_PIO, 1, [NetBSD PIO alpha IO]) ;; -+ esac -+ GLX_ARCH_DEFINES="-D__GLX_ALIGN64 -mieee" -+ ;; -+ arm*) -+ ARM_VIDEO=yes -+ ;; -+ i*86) -+ I386_VIDEO=yes -+ case $host_os in -+ *freebsd*) AC_DEFINE(USE_DEV_IO) ;; -+ *dragonfly*) AC_DEFINE(USE_DEV_IO) ;; -+ *netbsd*) AC_DEFINE(USE_I386_IOPL) -+ SYS_LIBS=-li386 -+ ;; -+ *openbsd*) AC_DEFINE(USE_I386_IOPL) -+ SYS_LIBS=-li386 -+ ;; -+ esac -+ ;; -+ powerpc*) -+ PPC_VIDEO=yes -+ case $host_os in -+ *freebsd*) DEFAULT_INT10=stub ;; -+ esac -+ ;; -+ sparc*) -+ SPARC64_VIDEO=yes -+ BSD_ARCH_SOURCES="sparc64_video.c ioperm_noop.c" -+ GLX_ARCH_DEFINES="-D__GLX_ALIGN64" -+ ;; -+ x86_64*|amd64*) -+ I386_VIDEO=yes -+ case $host_os in -+ *freebsd*) AC_DEFINE(USE_DEV_IO, 1, [BSD /dev/io]) ;; -+ *dragonfly*) AC_DEFINE(USE_DEV_IO, 1, [BSD /dev/io]) ;; -+ *netbsd*) AC_DEFINE(USE_I386_IOPL, 1, [BSD i386 iopl]) -+ SYS_LIBS=-lx86_64 -+ ;; -+ *openbsd*) AC_DEFINE(USE_AMD64_IOPL, 1, [BSD AMD64 iopl]) -+ SYS_LIBS=-lamd64 -+ ;; -+ esac -+ GLX_ARCH_DEFINES="-D__GLX_ALIGN64" -+ ;; -+ ia64*) -+ GLX_ARCH_DEFINES="-D__GLX_ALIGN64" -+ ;; -+ s390*) -+ GLX_ARCH_DEFINES="-D__GLX_ALIGN64" -+ ;; -+esac -+AC_SUBST(GLX_ARCH_DEFINES) -+ -+dnl BSD *_video.c selection -+AM_CONDITIONAL(ALPHA_VIDEO, [test "x$ALPHA_VIDEO" = xyes]) -+AM_CONDITIONAL(ARM_VIDEO, [test "x$ARM_VIDEO" = xyes]) -+AM_CONDITIONAL(I386_VIDEO, [test "x$I386_VIDEO" = xyes]) -+AM_CONDITIONAL(PPC_VIDEO, [test "x$PPC_VIDEO" = xyes]) -+AM_CONDITIONAL(SPARC64_VIDEO, [test "x$SPARC64_VIDEO" = xyes]) -+ -+DRI=no -+USE_SIGIO_BY_DEFAULT="yes" -+dnl it would be nice to autodetect these *CONS_SUPPORTs -+case $host_os in -+ *freebsd* | *dragonfly*) -+ case $host_os in -+ kfreebsd*-gnu) ;; -+ *) AC_DEFINE(CSRG_BASED, 1, [System is BSD-like]) ;; -+ esac -+ AC_DEFINE(PCCONS_SUPPORT, 1, [System has PC console]) -+ AC_DEFINE(PCVT_SUPPORT, 1, [System has PCVT console]) -+ AC_DEFINE(SYSCONS_SUPPORT, 1, [System has syscons console]) -+ DRI=yes -+ ;; -+ *netbsd*) -+ AC_DEFINE(CSRG_BASED, 1, [System is BSD-like]) -+ AC_DEFINE(PCCONS_SUPPORT, 1, [System has PC console]) -+ AC_DEFINE(PCVT_SUPPORT, 1, [System has PCVT console]) -+ AC_DEFINE(WSCONS_SUPPORT, 1, [System has wscons console]) -+ DRI=yes -+ ;; -+ *openbsd*) -+ AC_DEFINE(CSRG_BASED, 1, [System is BSD-like]) -+ AC_DEFINE(PCVT_SUPPORT, 1, [System has PC console]) -+ AC_DEFINE(WSCONS_SUPPORT, 1, [System has wscons console]) -+ ;; -+ *linux*) -+ DRI=yes -+ ;; -+ *solaris*) -+ PKG_CHECK_EXISTS(libdrm, DRI=yes, DRI=no) -+ # Disable use of SIGIO by default until some system bugs are -+ # fixed - see Sun/OpenSolaris bug id 6879897 -+ USE_SIGIO_BY_DEFAULT="no" -+ ;; -+ darwin*) -+ AC_DEFINE(CSRG_BASED, 1, [System is BSD-like]) -+ ;; -+ cygwin*|mingw*) -+ CFLAGS="$CFLAGS -DFD_SETSIZE=256" -+ ;; -+esac -+ -+dnl augment XORG_RELEASE_VERSION for our snapshot number and to expose the -+dnl major number -+PVMAJOR=`echo $PACKAGE_VERSION | cut -d . -f 1` -+PVS=`echo $PACKAGE_VERSION | cut -d . -f 4 | cut -d - -f 1` -+if test "x$PVS" = "x"; then -+ PVS="0" -+fi -+ -+VENDOR_RELEASE="((($PVMAJOR) * 10000000) + (($PVM) * 100000) + (($PVP) * 1000) + $PVS)" -+VENDOR_MAN_VERSION="Version ${PACKAGE_VERSION}" -+ -+VENDOR_NAME="The X.Org Foundation" -+VENDOR_NAME_SHORT="X.Org" -+VENDOR_WEB="http://wiki.x.org" -+ -+m4_ifdef([AS_HELP_STRING], , [m4_define([AS_HELP_STRING], m4_defn([AC_HELP_STRING]))]) -+ -+dnl Build options. -+AC_ARG_ENABLE(werror, AS_HELP_STRING([--enable-werror], -+ [Obsolete - use --enable-strict-compilation instead]), -+ AC_MSG_ERROR([--enable-werror has been replaced by --enable-strict-compilation])) -+ -+AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug], -+ [Enable debugging (default: disabled)]), -+ [DEBUGGING=$enableval], [DEBUGGING=no]) -+AC_ARG_ENABLE(use-sigio-by-default, AS_HELP_STRING([--enable-use-sigio-by-default] -+ [Enable SIGIO input handlers by default (default: $USE_SIGIO_BY_DEFAULT)]), -+ [USE_SIGIO_BY_DEFAULT=$enableval], []) -+AC_ARG_WITH(int10, AS_HELP_STRING([--with-int10=BACKEND], [int10 backend: vm86, x86emu or stub]), -+ [INT10="$withval"], -+ [INT10="$DEFAULT_INT10"]) -+AC_ARG_WITH(vendor-name, AS_HELP_STRING([--with-vendor-name=VENDOR], -+ [Vendor string reported by the server]), -+ [ VENDOR_NAME="$withval" ], []) -+AC_ARG_WITH(vendor-name-short, AS_HELP_STRING([--with-vendor-name-short=VENDOR], -+ [Short version of vendor string reported by the server]), -+ [ VENDOR_NAME_SHORT="$withval" ], []) -+AC_ARG_WITH(vendor-web, AS_HELP_STRING([--with-vendor-web=URL], -+ [Vendor web address reported by the server]), -+ [ VENDOR_WEB="$withval" ], []) -+AC_ARG_WITH(module-dir, AS_HELP_STRING([--with-module-dir=DIR], -+ [Directory where modules are installed (default: $libdir/xorg/modules)]), -+ [ moduledir="$withval" ], -+ [ moduledir="${libdir}/xorg/modules" ]) -+AC_ARG_WITH(log-dir, AS_HELP_STRING([--with-log-dir=DIR], -+ [Directory where log files are kept (default: $localstatedir/log)]), -+ [ logdir="$withval" ], -+ [ logdir="$localstatedir/log" ]) -+AC_ARG_WITH(builder-addr, AS_HELP_STRING([--with-builder-addr=ADDRESS], -+ [Builder address (default: xorg@lists.freedesktop.org)]), -+ [ BUILDERADDR="$withval" ], -+ [ BUILDERADDR="xorg@lists.freedesktop.org" ]) -+AC_ARG_WITH(os-name, AS_HELP_STRING([--with-os-name=OSNAME], [Name of OS (default: output of "uname -srm")]), -+ [ OSNAME="$withval" ], -+ [ OSNAME=`uname -srm` ]) -+AC_ARG_WITH(os-vendor, AS_HELP_STRING([--with-os-vendor=OSVENDOR], [Name of OS vendor]), -+ [ OSVENDOR="$withval" ], -+ [ OSVENDOR="" ]) -+AC_ARG_WITH(builderstring, AS_HELP_STRING([--with-builderstring=BUILDERSTRING], [Additional builder string]), -+ [ BUILDERSTRING="$withval" ] -+ [ ]) -+ -+dnl Determine font path -+XORG_FONTROOTDIR -+XORG_FONTSUBDIR(FONTMISCDIR, fontmiscdir, misc) -+XORG_FONTSUBDIR(FONTOTFDIR, fontotfdir, OTF) -+XORG_FONTSUBDIR(FONTTTFDIR, fontttfdir, TTF) -+XORG_FONTSUBDIR(FONTTYPE1DIR, fonttype1dir, Type1) -+XORG_FONTSUBDIR(FONT75DPIDIR, font75dpidir, 75dpi) -+XORG_FONTSUBDIR(FONT100DPIDIR, font100dpidir, 100dpi) -+ -+dnl Uses --default-font-path if set, otherwise checks for /etc/X11/fontpath.d, -+dnl otherwise uses standard subdirectories of FONTROOTDIR. When cross -+dnl compiling, assume default font path uses standard FONTROOTDIR directories. -+DEFAULT_FONT_PATH="${FONTMISCDIR}/,${FONTTTFDIR}/,${FONTOTFDIR}/,${FONTTYPE1DIR}/,${FONT100DPIDIR}/,${FONT75DPIDIR}/" -+if test "$cross_compiling" != yes; then -+ AC_CHECK_FILE([${sysconfdir}/X11/fontpath.d], -+ [DEFAULT_FONT_PATH='catalogue:${sysconfdir}/X11/fontpath.d'], -+ [case $host_os in -+ darwin*) DEFAULT_FONT_PATH="${DEFAULT_FONT_PATH},/Library/Fonts,/System/Library/Fonts" ;; -+ esac]) -+fi -+AC_ARG_WITH(default-font-path, AS_HELP_STRING([--with-default-font-path=PATH], [Comma separated list of font dirs]), -+ [ FONTPATH="$withval" ], -+ [ FONTPATH="${DEFAULT_FONT_PATH}" ]) -+ -+AC_MSG_CHECKING([for default font path]) -+AC_MSG_RESULT([$FONTPATH]) -+ -+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" ]) -+AC_ARG_WITH(xkb-output, AS_HELP_STRING([--with-xkb-output=PATH], [Path to XKB output dir (default: ${datadir}/X11/xkb/compiled)]), -+ [ XKBOUTPUT="$withval" ], -+ [ XKBOUTPUT="compiled" ]) -+AC_ARG_WITH(default-xkb-rules, AS_HELP_STRING([--with-default-xkb-rules=RULES], -+ [Keyboard ruleset (default: base/evdev)]), -+ [ XKB_DFLT_RULES="$withval" ], -+ [ XKB_DFLT_RULES="" ]) -+AC_ARG_WITH(default-xkb-model, AS_HELP_STRING([--with-default-xkb-model=MODEL], -+ [Keyboard model (default: pc105)]), -+ [ XKB_DFLT_MODEL="$withval" ], -+ [ XKB_DFLT_MODEL="pc105" ]) -+AC_ARG_WITH(default-xkb-layout, AS_HELP_STRING([--with-default-xkb-layout=LAYOUT], -+ [Keyboard layout (default: us)]), -+ [ XKB_DFLT_LAYOUT="$withval" ], -+ [ XKB_DFLT_LAYOUT="us" ]) -+AC_ARG_WITH(default-xkb-variant, AS_HELP_STRING([--with-default-xkb-variant=VARIANT], -+ [Keyboard variant (default: (none))]), -+ [ XKB_DFLT_VARIANT="$withval" ], -+ [ XKB_DFLT_VARIANT="" ]) -+AC_ARG_WITH(default-xkb-options, AS_HELP_STRING([--with-default-xkb-options=OPTIONS], -+ [Keyboard layout options (default: (none))]), -+ [ XKB_DFLT_OPTIONS="$withval" ], -+ [ XKB_DFLT_OPTIONS="" ]) -+AC_ARG_WITH(serverconfig-path, AS_HELP_STRING([--with-serverconfig-path=PATH], -+ [Directory where ancillary server config files are installed (default: ${libdir}/xorg)]), -+ [ SERVERCONFIG="$withval" ], -+ [ SERVERCONFIG="${libdir}/xorg" ]) -+AC_ARG_WITH(apple-applications-dir,AS_HELP_STRING([--with-apple-applications-dir=PATH], [Path to the Applications directory (default: /Applications/Utilities)]), -+ [ APPLE_APPLICATIONS_DIR="${withval}" ], -+ [ APPLE_APPLICATIONS_DIR="/Applications/Utilities" ]) -+AC_SUBST([APPLE_APPLICATIONS_DIR]) -+AC_ARG_WITH(apple-application-name,AS_HELP_STRING([--with-apple-application-name=NAME], [Name for the .app (default: X11)]), -+ [ APPLE_APPLICATION_NAME="${withval}" ], -+ [ APPLE_APPLICATION_NAME="X11" ]) -+AC_SUBST([APPLE_APPLICATION_NAME]) -+AC_ARG_WITH(launchd-id-prefix, AS_HELP_STRING([--with-launchd-id-prefix=PATH], [Deprecated: Use --with-bundle-id-prefix.]), -+ [ BUNDLE_ID_PREFIX="${withval}" ], -+ [ BUNDLE_ID_PREFIX="org.x" ]) -+AC_ARG_WITH(bundle-id-prefix, AS_HELP_STRING([--with-bundle-id-prefix=PATH], [Prefix to use for bundle identifiers (default: org.x)]), -+ [ BUNDLE_ID_PREFIX="${withval}" ]) -+AC_SUBST([BUNDLE_ID_PREFIX]) -+AC_DEFINE_UNQUOTED(BUNDLE_ID_PREFIX, "$BUNDLE_ID_PREFIX", [Prefix to use for bundle identifiers]) -+AC_ARG_ENABLE(sparkle,AS_HELP_STRING([--enable-sparkle], [Enable updating of X11.app using the Sparkle Framework (default: disabled)]), -+ [ XQUARTZ_SPARKLE="${enableval}" ], -+ [ XQUARTZ_SPARKLE="no" ]) -+AC_SUBST([XQUARTZ_SPARKLE]) -+AC_ARG_ENABLE(install-libxf86config, -+ AS_HELP_STRING([--enable-install-libxf86config], -+ [Install libxf86config (default: disabled)]), -+ [INSTALL_LIBXF86CONFIG=$enableval], -+ [INSTALL_LIBXF86CONFIG=no]) -+AC_ARG_ENABLE(visibility, AC_HELP_STRING([--enable-visibility], [Enable symbol visibility (default: auto)]), -+ [SYMBOL_VISIBILITY=$enableval], -+ [SYMBOL_VISIBILITY=auto]) -+ -+dnl GLX build options -+AC_ARG_ENABLE(aiglx, AS_HELP_STRING([--enable-aiglx], [Build accelerated indirect GLX (default: enabled)]), -+ [AIGLX=$enableval], -+ [AIGLX=yes]) -+XORG_TLS -+AC_ARG_ENABLE(glx-tls, AS_HELP_STRING([--enable-glx-tls], [Build GLX with TLS support (default: auto)]), -+ [GLX_USE_TLS=$enableval -+ if test "x$GLX_USE_TLS" = "xyes" && test "${ac_cv_tls}" = "none" ; then -+ AC_MSG_ERROR([GLX with TLS support requested, but the compiler does not support it.]) -+ fi], -+ [GLX_USE_TLS=no -+ if test "${ac_cv_tls}" != "none" ; then -+ GLX_USE_TLS=yes -+ fi]) -+AC_SUBST(GLX_TLS, ${GLX_USE_TLS}) -+AC_ARG_WITH(khronos-spec-dir, AS_HELP_STRING([--with-khronos-spec-dir=PATH], [Path to Khronos OpenGL registry database files (default: auto)]), -+ [KHRONOS_SPEC_DIR="${withval}"], -+ [KHRONOS_SPEC_DIR=auto]) -+ -+dnl Extensions. -+AC_ARG_ENABLE(registry, AS_HELP_STRING([--disable-registry], [Build string registry module (default: enabled)]), [XREGISTRY=$enableval], [XREGISTRY=yes]) -+AC_ARG_ENABLE(composite, AS_HELP_STRING([--disable-composite], [Build Composite extension (default: enabled)]), [COMPOSITE=$enableval], [COMPOSITE=yes]) -+AC_ARG_ENABLE(mitshm, AS_HELP_STRING([--disable-mitshm], [Build SHM extension (default: auto)]), [MITSHM=$enableval], [MITSHM=auto]) -+AC_ARG_ENABLE(xres, AS_HELP_STRING([--disable-xres], [Build XRes extension (default: enabled)]), [RES=$enableval], [RES=yes]) -+AC_ARG_ENABLE(record, AS_HELP_STRING([--disable-record], [Build Record extension (default: enabled)]), [RECORD=$enableval], [RECORD=yes]) -+AC_ARG_ENABLE(xv, AS_HELP_STRING([--disable-xv], [Build Xv extension (default: enabled)]), [XV=$enableval], [XV=yes]) -+AC_ARG_ENABLE(xvmc, AS_HELP_STRING([--disable-xvmc], [Build XvMC extension (default: enabled)]), [XVMC=$enableval], [XVMC=yes]) -+AC_ARG_ENABLE(dga, AS_HELP_STRING([--disable-dga], [Build DGA extension (default: auto)]), [DGA=$enableval], [DGA=auto]) -+AC_ARG_ENABLE(screensaver, AS_HELP_STRING([--disable-screensaver], [Build ScreenSaver extension (default: enabled)]), [SCREENSAVER=$enableval], [SCREENSAVER=yes]) -+AC_ARG_ENABLE(xdmcp, AS_HELP_STRING([--disable-xdmcp], [Build XDMCP extension (default: auto)]), [XDMCP=$enableval], [XDMCP=auto]) -+AC_ARG_ENABLE(xdm-auth-1, AS_HELP_STRING([--disable-xdm-auth-1], [Build XDM-Auth-1 extension (default: auto)]), [XDMAUTH=$enableval], [XDMAUTH=auto]) -+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(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]) -+AC_ARG_ENABLE(xselinux, AS_HELP_STRING([--enable-xselinux], [Build SELinux extension (default: disabled)]), [XSELINUX=$enableval], [XSELINUX=no]) -+AC_ARG_ENABLE(xcsecurity, AS_HELP_STRING([--enable-xcsecurity], [Build Security extension (default: disabled)]), [XCSECURITY=$enableval], [XCSECURITY=no]) -+AC_ARG_ENABLE(tslib, AS_HELP_STRING([--enable-tslib], [Build kdrive tslib touchscreen support (default: disabled)]), [TSLIB=$enableval], [TSLIB=no]) -+AC_ARG_ENABLE(dbe, AS_HELP_STRING([--disable-dbe], [Build DBE extension (default: enabled)]), [DBE=$enableval], [DBE=yes]) -+AC_ARG_ENABLE(xf86bigfont, AS_HELP_STRING([--enable-xf86bigfont], [Build XF86 Big Font extension (default: disabled)]), [XF86BIGFONT=$enableval], [XF86BIGFONT=no]) -+AC_ARG_ENABLE(dpms, AS_HELP_STRING([--disable-dpms], [Build DPMS extension (default: enabled)]), [DPMSExtension=$enableval], [DPMSExtension=yes]) -+AC_ARG_ENABLE(config-udev, AS_HELP_STRING([--enable-config-udev], [Build udev support (default: auto)]), [CONFIG_UDEV=$enableval], [CONFIG_UDEV=auto]) -+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-wscons, AS_HELP_STRING([--enable-config-wscons], [Build wscons config support (default: auto)]), [CONFIG_WSCONS=$enableval], [CONFIG_WSCONS=auto]) -+AC_ARG_ENABLE(xfree86-utils, AS_HELP_STRING([--enable-xfree86-utils], [Build xfree86 DDX utilities (default: enabled)]), [XF86UTILS=$enableval], [XF86UTILS=yes]) -+AC_ARG_ENABLE(vgahw, AS_HELP_STRING([--enable-vgahw], [Build Xorg with vga access (default: enabled)]), [VGAHW=$enableval], [VGAHW=yes]) -+AC_ARG_ENABLE(vbe, AS_HELP_STRING([--enable-vbe], [Build Xorg with VBE module (default: enabled)]), [VBE=$enableval], [VBE=yes]) -+AC_ARG_ENABLE(int10-module, AS_HELP_STRING([--enable-int10-module], [Build Xorg with int10 module (default: enabled)]), [INT10MODULE=$enableval], [INT10MODULE=yes]) -+AC_ARG_ENABLE(windowswm, AS_HELP_STRING([--enable-windowswm], [Build XWin with WindowsWM extension (default: no)]), [WINDOWSWM=$enableval], [WINDOWSWM=no]) -+AC_ARG_ENABLE(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]) -+ -+dnl DDXes. -+AC_ARG_ENABLE(xorg, AS_HELP_STRING([--enable-xorg], [Build Xorg server (default: auto)]), [XORG=$enableval], [XORG=auto]) -+AC_ARG_ENABLE(dmx, AS_HELP_STRING([--enable-dmx], [Build DMX server (default: auto)]), [DMX=$enableval], [DMX=auto]) -+AC_ARG_ENABLE(xvfb, AS_HELP_STRING([--enable-xvfb], [Build Xvfb server (default: yes)]), [XVFB=$enableval], [XVFB=yes]) -+AC_ARG_ENABLE(xnest, AS_HELP_STRING([--enable-xnest], [Build Xnest server (default: auto)]), [XNEST=$enableval], [XNEST=auto]) -+AC_ARG_ENABLE(xquartz, AS_HELP_STRING([--enable-xquartz], [Build Xquartz server for OS-X (default: auto)]), [XQUARTZ=$enableval], [XQUARTZ=auto]) -+AC_ARG_ENABLE(standalone-xpbproxy, AS_HELP_STRING([--enable-standalone-xpbproxy], [Build a standalone xpbproxy (in addition to the one integrated into Xquartz as a separate thread) (default: no)]), [STANDALONE_XPBPROXY=$enableval], [STANDALONE_XPBPROXY=no]) -+AC_ARG_ENABLE(xwin, AS_HELP_STRING([--enable-xwin], [Build XWin server (default: auto)]), [XWIN=$enableval], [XWIN=auto]) -+dnl kdrive and its subsystems -+AC_ARG_ENABLE(kdrive, AS_HELP_STRING([--enable-kdrive], [Build kdrive servers (default: no)]), [KDRIVE=$enableval], [KDRIVE=no]) -+AC_ARG_ENABLE(xephyr, AS_HELP_STRING([--enable-xephyr], [Build the kdrive Xephyr server (default: auto)]), [XEPHYR=$enableval], [XEPHYR=auto]) -+AC_ARG_ENABLE(xfake, AS_HELP_STRING([--enable-xfake], [Build the kdrive 'fake' server (default: auto)]), [XFAKE=$enableval], [XFAKE=auto]) -+AC_ARG_ENABLE(xfbdev, AS_HELP_STRING([--enable-xfbdev], [Build the kdrive framebuffer device server (default: auto)]), [XFBDEV=$enableval], [XFBDEV=auto]) -+dnl kdrive options -+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]) -+ -+ -+dnl chown/chmod to be setuid root as part of build -+dnl Replaces InstallXserverSetUID in imake -+AC_ARG_ENABLE(install-setuid, -+ AS_HELP_STRING([--enable-install-setuid], -+ [Install Xorg server as owned by root with setuid bit (default: auto)]), -+ [SETUID=$enableval], [SETUID=auto]) -+AC_MSG_CHECKING([to see if we can install the Xorg server as root]) -+if test "x$SETUID" = "xauto" ; then -+ case $host_os in -+ cygwin*) SETUID="no" ;; -+ mingw*) SETUID="no" ;; -+ darwin*) SETUID="no" ;; -+ *) -+ case $host_cpu in -+ sparc) SETUID="no" ;; -+ *) SETUID="yes" ;; -+ esac -+ esac -+ if test "x$SETUID" = xyes; then -+ touch testfile -+ chown root testfile > /dev/null 2>&1 || SETUID="no" -+ rm -f testfile -+ fi -+fi -+AC_MSG_RESULT([$SETUID]) -+AM_CONDITIONAL(INSTALL_SETUID, [test "x$SETUID" = "xyes"]) -+ -+dnl Issue an error if xtrans.m4 was not found and XTRANS_CONNECTION_FLAGS macro -+dnl was not expanded, since xorg-server with no transport types is rather useless. -+dnl -+dnl If you're seeing an error here, be sure you installed the lib/xtrans module -+dnl first and if it's not in the default location, that you set the ACLOCAL -+dnl environment variable to find it, such as: -+dnl ACLOCAL="aclocal -I ${PREFIX}/share/aclocal" -+m4_pattern_forbid([^XTRANS_CONNECTION_FLAGS$]) -+ -+# Transport selection macro from xtrans.m4 -+XTRANS_CONNECTION_FLAGS -+ -+# Secure RPC detection macro from xtrans.m4 -+XTRANS_SECURE_RPC_FLAGS -+AM_CONDITIONAL(SECURE_RPC, [test "x$SECURE_RPC" = xyes]) -+ -+AM_CONDITIONAL(INT10_VM86, [test "x$INT10" = xvm86]) -+AM_CONDITIONAL(INT10_X86EMU, [test "x$INT10" = xx86emu]) -+AM_CONDITIONAL(INT10_STUB, [test "x$INT10" = xstub]) -+ -+dnl Handle installing libxf86config -+AM_CONDITIONAL(INSTALL_LIBXF86CONFIG, [test "x$INSTALL_LIBXF86CONFIG" = xyes]) -+ -+dnl DDX Detection... Yes, it's ugly to have it here... but we need to -+dnl handle this early on so that we don't require unsupported extensions -+case $host_os in -+ cygwin* | mingw*) -+ CONFIG_DBUS_API=no -+ CONFIG_HAL=no -+ CONFIG_UDEV=no -+ CONFIG_UDEV_KMS=no -+ DGA=no -+ DRI2=no -+ INT10MODULE=no -+ PCI=no -+ VGAHW=no -+ VBE=no -+ XF86UTILS=no -+ XF86VIDMODE=no -+ XSELINUX=no -+ XV=no -+ SYMBOL_VISIBILITY=no -+ ;; -+ darwin*) -+ PCI=no -+ INT10MODULE=no -+ VGAHW=no -+ VBE=no -+ DRM=no -+ DRI2=no -+ -+ if test x$XQUARTZ = xauto; then -+ AC_CACHE_CHECK([whether to build Xquartz],xorg_cv_Carbon_framework,[ -+ save_LDFLAGS=$LDFLAGS -+ LDFLAGS="$LDFLAGS -framework Carbon" -+ AC_LINK_IFELSE([AC_LANG_SOURCE([char FSFindFolder(); int main() { FSFindFolder(); return 0;}])], -+ [xorg_cv_Carbon_framework=yes], -+ [xorg_cv_Carbon_framework=no]) -+ LDFLAGS=$save_LDFLAGS]) -+ -+ if test "X$xorg_cv_Carbon_framework" = Xyes; then -+ XQUARTZ=yes -+ else -+ XQUARTZ=no -+ fi -+ fi -+ -+ AC_CHECK_FUNC(dispatch_async, -+ AC_DEFINE([HAVE_LIBDISPATCH], 1, [Define to 1 if you have the libdispatch (GCD) available]), -+ []) -+ -+ if test "x$XQUARTZ" = xyes ; then -+ XQUARTZ=yes -+ XVFB=no -+ XNEST=no -+ -+ COMPOSITE=no -+ DGA=no -+ DPMSExtension=no -+ XF86VIDMODE=no -+ fi -+ ;; -+ *) XQUARTZ=no ;; -+esac -+ -+dnl --------------------------------------------------------------------------- -+dnl Extension section -+dnl --------------------------------------------------------------------------- -+XEXT_INC='-I$(top_srcdir)/Xext' -+XEXT_LIB='$(top_builddir)/Xext/libXext.la' -+ -+dnl Optional modules -+VIDEOPROTO="videoproto" -+COMPOSITEPROTO="compositeproto >= 0.4" -+RECORDPROTO="recordproto >= 1.13.99.1" -+SCRNSAVERPROTO="scrnsaverproto >= 1.1" -+RESOURCEPROTO="resourceproto >= 1.2.0" -+DRIPROTO="xf86driproto >= 2.1.0" -+DRI2PROTO="dri2proto >= 2.8" -+XINERAMAPROTO="xineramaproto" -+BIGFONTPROTO="xf86bigfontproto >= 1.2.0" -+DGAPROTO="xf86dgaproto >= 2.0.99.1" -+GLPROTO="glproto >= 1.4.16" -+DMXPROTO="dmxproto >= 2.2.99.1" -+VIDMODEPROTO="xf86vidmodeproto >= 2.2.99.1" -+WINDOWSWMPROTO="windowswmproto" -+APPLEWMPROTO="applewmproto >= 1.4" -+ -+dnl Required modules -+XPROTO="xproto >= 7.0.22" -+RANDRPROTO="randrproto >= 1.4.0" -+RENDERPROTO="renderproto >= 0.11" -+XEXTPROTO="xextproto >= 7.1.99" -+INPUTPROTO="inputproto >= 2.3" -+KBPROTO="kbproto >= 1.0.3" -+FONTSPROTO="fontsproto" -+FIXESPROTO="fixesproto >= 5.0" -+DAMAGEPROTO="damageproto >= 1.1" -+XCMISCPROTO="xcmiscproto >= 1.2.0" -+BIGREQSPROTO="bigreqsproto >= 1.1.0" -+XTRANS="xtrans >= 1.2.7" -+ -+dnl List of libraries that require a specific version -+LIBAPPLEWM="applewm >= 1.4" -+LIBDMX="dmx >= 1.0.99.1" -+LIBDRI="dri >= 7.8.0" -+LIBDRM="libdrm >= 2.3.0" -+LIBGL="gl >= 7.1.0" -+LIBXEXT="xext >= 1.0.99.4" -+LIBXFONT="xfont >= 1.4.2" -+LIBXI="xi >= 1.2.99.1" -+LIBXTST="xtst >= 1.0.99.2" -+LIBPCIACCESS="pciaccess >= 0.12.901" -+LIBUDEV="libudev >= 143" -+LIBSELINUX="libselinux >= 2.0.86" -+LIBDBUS="dbus-1 >= 1.0" -+LIBPIXMAN="pixman-1 >= 0.27.2" -+ -+dnl Pixman is always required, but we separate it out so we can link -+dnl specific modules against it -+PKG_CHECK_MODULES(PIXMAN, $LIBPIXMAN) -+REQUIRED_LIBS="$REQUIRED_LIBS $LIBPIXMAN $LIBXFONT xau" -+ -+dnl Core modules for most extensions, et al. -+SDK_REQUIRED_MODULES="$XPROTO $RANDRPROTO $RENDERPROTO $XEXTPROTO $INPUTPROTO $KBPROTO $FONTSPROTO $LIBPIXMAN" -+# Make SDK_REQUIRED_MODULES available for inclusion in xorg-server.pc -+AC_SUBST(SDK_REQUIRED_MODULES) -+ -+REQUIRED_MODULES="$FIXESPROTO $DAMAGEPROTO $XCMISCPROTO $XTRANS $BIGREQSPROTO $SDK_REQUIRED_MODULES" -+ -+if test "x$CONFIG_UDEV" = xyes && -+ { test "x$CONFIG_DBUS_API" = xyes || test "x$CONFIG_HAL" = xyes; }; then -+ AC_MSG_ERROR([Hotplugging through both libudev and dbus/hal not allowed]) -+fi -+ -+PKG_CHECK_MODULES(UDEV, $LIBUDEV, [HAVE_LIBUDEV=yes], [HAVE_LIBUDEV=no]) -+if test "x$CONFIG_UDEV" = xauto; then -+ CONFIG_UDEV="$HAVE_LIBUDEV" -+fi -+AM_CONDITIONAL(CONFIG_UDEV, [test "x$CONFIG_UDEV" = xyes]) -+if test "x$CONFIG_UDEV" = xyes; then -+ CONFIG_DBUS_API=no -+ CONFIG_HAL=no -+ if test "x$CONFIG_UDEV_KMS" = xauto; then -+ CONFIG_UDEV_KMS="$HAVE_LIBUDEV" -+ fi -+ if ! test "x$HAVE_LIBUDEV" = xyes; then -+ AC_MSG_ERROR([udev configuration API requested, but libudev is not installed]) -+ fi -+ AC_DEFINE(CONFIG_UDEV, 1, [Use libudev for input hotplug]) -+ if test "x$CONFIG_UDEV_KMS" = xyes; then -+ AC_DEFINE(CONFIG_UDEV_KMS, 1, [Use libudev for kms enumeration]) -+ fi -+ SAVE_LIBS=$LIBS -+ SAVE_CFLAGS=$CFLAGS -+ CFLAGS=$UDEV_CFLAGS -+ LIBS=$UDEV_LIBS -+ AC_CHECK_FUNCS([udev_monitor_filter_add_match_tag]) -+ AC_CHECK_FUNCS([udev_enumerate_add_match_tag]) -+ LIBS=$SAVE_LIBS -+ CFLAGS=$SAVE_CFLAGS -+fi -+AM_CONDITIONAL(CONFIG_UDEV_KMS, [test "x$CONFIG_UDEV_KMS" = xyes]) -+ -+dnl HAVE_DBUS is true if we actually have the D-Bus library, whereas -+dnl CONFIG_DBUS_API is true if we want to enable the D-Bus config -+dnl API. -+PKG_CHECK_MODULES(DBUS, $LIBDBUS, [HAVE_DBUS=yes], [HAVE_DBUS=no]) -+if test "x$HAVE_DBUS" = xyes; then -+ AC_DEFINE(HAVE_DBUS, 1, [Have D-Bus support]) -+fi -+AM_CONDITIONAL(HAVE_DBUS, [test "x$HAVE_DBUS" = xyes]) -+ -+if test "x$CONFIG_DBUS_API" = xauto; then -+ CONFIG_DBUS_API="$HAVE_DBUS" -+fi -+if test "x$CONFIG_DBUS_API" = xyes; then -+ if ! test "x$HAVE_DBUS" = xyes; then -+ AC_MSG_ERROR([D-Bus configuration API requested, but D-Bus is not installed.]) -+ fi -+ -+ AC_DEFINE(CONFIG_DBUS_API, 1, [Use the D-Bus input configuration API]) -+ CONFIG_NEED_DBUS="yes" -+fi -+AM_CONDITIONAL(CONFIG_DBUS_API, [test "x$CONFIG_DBUS_API" = xyes]) -+ -+PKG_CHECK_MODULES(HAL, hal, [HAVE_HAL=yes], [HAVE_HAL=no]) -+if test "x$CONFIG_HAL" = xauto; then -+ CONFIG_HAL="$HAVE_HAL" -+fi -+if test "x$CONFIG_HAL" = xyes; then -+ if ! test "x$HAVE_HAL" = xyes; then -+ AC_MSG_ERROR([HAL hotplug API requested, but HAL is not installed.]) -+ fi -+ -+ AC_DEFINE(CONFIG_HAL, 1, [Use the HAL hotplug API]) -+ CONFIG_NEED_DBUS="yes" -+fi -+AM_CONDITIONAL(CONFIG_HAL, [test "x$CONFIG_HAL" = xyes]) -+ -+if test "x$CONFIG_NEED_DBUS" = xyes; then -+ AC_DEFINE(CONFIG_NEED_DBUS, 1, [Use D-Bus for input hotplug]) -+fi -+AM_CONDITIONAL(CONFIG_NEED_DBUS, [test "x$CONFIG_NEED_DBUS" = xyes]) -+ -+if test "x$CONFIG_WSCONS" = xauto; then -+ case $host_os in -+ *openbsd*) -+ CONFIG_WSCONS=yes; -+ ;; -+ *) -+ CONFIG_WSCONS=no; -+ ;; -+ esac -+fi -+AM_CONDITIONAL(CONFIG_WSCONS, [test "x$CONFIG_WSCONS" = xyes]) -+if test "x$CONFIG_WSCONS" = xyes; then -+ AC_DEFINE(CONFIG_WSCONS, 1, [Use wscons for input auto configuration]) -+fi -+ -+if test "x$USE_SIGIO_BY_DEFAULT" = xyes; then -+ USE_SIGIO_BY_DEFAULT_VALUE=TRUE -+else -+ USE_SIGIO_BY_DEFAULT_VALUE=FALSE -+fi -+AC_DEFINE_UNQUOTED([USE_SIGIO_BY_DEFAULT], [$USE_SIGIO_BY_DEFAULT_VALUE], -+ [Use SIGIO handlers for input device events by default]) -+ -+AC_MSG_CHECKING([for glibc...]) -+AC_PREPROC_IFELSE([AC_LANG_SOURCE([ -+#include -+#ifndef __GLIBC__ -+#error -+#endif -+])], glibc=yes, glibc=no) -+AC_MSG_RESULT([$glibc]) -+ -+AC_CHECK_FUNCS([clock_gettime], [have_clock_gettime=yes], -+ [AC_CHECK_LIB([rt], [clock_gettime], [have_clock_gettime=-lrt], -+ [have_clock_gettime=no])]) -+ -+AC_MSG_CHECKING([for a useful monotonic clock ...]) -+ -+if ! test "x$have_clock_gettime" = xno; then -+ if ! test "x$have_clock_gettime" = xyes; then -+ CLOCK_LIBS="$have_clock_gettime" -+ else -+ CLOCK_LIBS="" -+ fi -+ -+ LIBS_SAVE="$LIBS" -+ LIBS="$CLOCK_LIBS" -+ CPPFLAGS_SAVE="$CPPFLAGS" -+ -+ if test x"$glibc" = xyes; then -+ CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE=200112L" -+ fi -+ -+ AC_RUN_IFELSE([AC_LANG_SOURCE([ -+#include -+ -+int main(int argc, char *argv[[]]) { -+ struct timespec tp; -+ -+ if (clock_gettime(CLOCK_MONOTONIC, &tp) == 0) -+ return 0; -+ else -+ return 1; -+} -+ ])], [MONOTONIC_CLOCK=yes], [MONOTONIC_CLOCK=no], -+ [MONOTONIC_CLOCK="cross compiling"]) -+ -+ LIBS="$LIBS_SAVE" -+ CPPFLAGS="$CPPFLAGS_SAVE" -+else -+ MONOTONIC_CLOCK=no -+fi -+ -+AC_MSG_RESULT([$MONOTONIC_CLOCK]) -+ -+if test "x$MONOTONIC_CLOCK" = xyes; then -+ AC_DEFINE(MONOTONIC_CLOCK, 1, [Have monotonic clock from clock_gettime()]) -+ LIBS="$LIBS $CLOCK_LIBS" -+fi -+ -+AM_CONDITIONAL(XV, [test "x$XV" = xyes]) -+if test "x$XV" = xyes; then -+ AC_DEFINE(XV, 1, [Support Xv extension]) -+ AC_DEFINE(XvExtension, 1, [Build Xv extension]) -+ REQUIRED_MODULES="$REQUIRED_MODULES $VIDEOPROTO" -+ SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $VIDEOPROTO" -+else -+ XVMC=no -+fi -+ -+AM_CONDITIONAL(XVMC, [test "x$XVMC" = xyes]) -+if test "x$XVMC" = xyes; then -+ AC_DEFINE(XvMCExtension, 1, [Build XvMC extension]) -+fi -+ -+AM_CONDITIONAL(XREGISTRY, [test "x$XREGISTRY" = xyes]) -+if test "x$XREGISTRY" = xyes; then -+ AC_DEFINE(XREGISTRY, 1, [Build registry module]) -+fi -+ -+AM_CONDITIONAL(COMPOSITE, [test "x$COMPOSITE" = xyes]) -+if test "x$COMPOSITE" = xyes; then -+ AC_DEFINE(COMPOSITE, 1, [Support Composite Extension]) -+ REQUIRED_MODULES="$REQUIRED_MODULES $COMPOSITEPROTO" -+ COMPOSITE_LIB='$(top_builddir)/composite/libcomposite.la' -+ COMPOSITE_INC='-I$(top_srcdir)/composite' -+fi -+ -+if test "x$MITSHM" = xauto; then -+ MITSHM="$ac_cv_sysv_ipc" -+fi -+AM_CONDITIONAL(MITSHM, [test "x$MITSHM" = xyes]) -+if test "x$MITSHM" = xyes; then -+ AC_DEFINE(MITSHM, 1, [Support MIT-SHM extension]) -+ AC_DEFINE(HAS_SHM, 1, [Support SHM]) -+fi -+ -+AM_CONDITIONAL(RECORD, [test "x$RECORD" = xyes]) -+if test "x$RECORD" = xyes; then -+ AC_DEFINE(XRECORD, 1, [Support Record extension]) -+ REQUIRED_MODULES="$REQUIRED_MODULES $RECORDPROTO" -+ RECORD_LIB='$(top_builddir)/record/librecord.la' -+fi -+ -+AM_CONDITIONAL(SCREENSAVER, [test "x$SCREENSAVER" = xyes]) -+if test "x$SCREENSAVER" = xyes; then -+ AC_DEFINE(SCREENSAVER, 1, [Support MIT-SCREEN-SAVER extension]) -+ REQUIRED_MODULES="$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" -+fi -+ -+# The XRes extension may support client ID tracking only if it has -+# been specifically enabled. Client ID tracking is implicitly not -+# supported if XRes extension is disabled. -+AC_MSG_CHECKING([whether to track client ids]) -+if test "x$RES" = xyes && test "x$CLIENTIDS" = xyes; then -+ AC_DEFINE(CLIENTIDS, 1, [Support client ID tracking]) -+else -+ CLIENTIDS=no -+fi -+if test "x$CLIENTIDS" = xyes; then -+ case $host_os in -+ openbsd*) -+ SYS_LIBS="$SYS_LIBS -lkvm" -+ ;; -+ esac -+fi -+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]) -+ REQUIRED_MODULES="$REQUIRED_MODULES $DRIPROTO $GLPROTO $LIBDRI" -+ SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $DRIPROTO $GLPROTO $LIBDRI" -+fi -+ -+PKG_CHECK_MODULES([DRI2PROTO], $DRI2PROTO, -+ [HAVE_DRI2PROTO=yes], [HAVE_DRI2PROTO=no]) -+case "$DRI2,$HAVE_DRI2PROTO" in -+ yes,no) -+ AC_MSG_ERROR([DRI2 requested, but dri2proto not found.]) -+ ;; -+ yes,yes | auto,yes) -+ AC_DEFINE(DRI2, 1, [Build DRI2 extension]) -+ DRI2=yes -+ 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 -+ if test "x$DRM" = xyes; then -+ AC_DEFINE(WITH_LIBDRM, 1, [Building with libdrm support]) -+ PKG_CHECK_MODULES([LIBDRM], $LIBDRM) -+ fi -+fi -+ -+if test "x$DRI2" = xyes; then -+ save_CFLAGS=$CFLAGS -+ CFLAGS="$GL_CFLAGS $LIBDRM_CFLAGS" -+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include -+#include -+#ifndef __DRI_DRI2 -+#error DRI2 extension not available. -+#endif]])], -+ [HAVE_DRI2EXTENSION=yes], -+ [HAVE_DRI2EXTENSION=no]) -+ CFLAGS=$save_CFLAGS -+ if test "x$HAVE_DRI2EXTENSION" = xyes; then -+ AC_DEFINE(DRI2_AIGLX, 1, [Build DRI2 AIGLX loader]) -+ DRI2_AIGLX=yes -+ else -+ AC_MSG_NOTICE([DRI2 AIGLX disabled, __DRI_DRI2 not defined in dri_interface.h.]) -+ DRI2_AIGLX=no -+ fi -+fi -+AM_CONDITIONAL(DRI2_AIGLX, test "x$DRI2_AIGLX" = xyes) -+ -+ -+AM_CONDITIONAL(XINERAMA, [test "x$XINERAMA" = xyes]) -+if test "x$XINERAMA" = xyes; then -+ AC_DEFINE(XINERAMA, 1, [Support Xinerama extension]) -+ AC_DEFINE(PANORAMIX, 1, [Internal define for Xinerama]) -+ REQUIRED_MODULES="$REQUIRED_MODULES $XINERAMAPROTO" -+ SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $XINERAMAPROTO" -+fi -+ -+AM_CONDITIONAL(XACE, [test "x$XACE" = xyes]) -+if test "x$XACE" = xyes; then -+ AC_DEFINE(XACE, 1, [Build X-ACE extension]) -+fi -+ -+AM_CONDITIONAL(XSELINUX, [test "x$XSELINUX" = xyes]) -+if test "x$XSELINUX" = xyes; then -+ if test "x$XACE" != xyes; then -+ AC_MSG_ERROR([cannot build SELinux extension without X-ACE]) -+ fi -+ AC_CHECK_HEADERS([libaudit.h], [], AC_MSG_ERROR([SELinux extension requires audit system headers])) -+ AC_CHECK_LIB(audit, audit_open, [], AC_MSG_ERROR([SELinux extension requires audit system library])) -+ PKG_CHECK_MODULES([SELINUX], $LIBSELINUX) -+ SELINUX_LIBS="$SELINUX_LIBS -laudit" -+ AC_DEFINE(XSELINUX, 1, [Build SELinux extension]) -+fi -+ -+AM_CONDITIONAL(XCSECURITY, [test "x$XCSECURITY" = xyes]) -+if test "x$XCSECURITY" = xyes; then -+ if test "x$XACE" != xyes; then -+ AC_MSG_ERROR([cannot build Security extension without X-ACE]) -+ fi -+ AC_DEFINE(XCSECURITY, 1, [Build Security extension]) -+fi -+ -+AM_CONDITIONAL(DBE, [test "x$DBE" = xyes]) -+if test "x$DBE" = xyes; then -+ AC_DEFINE(DBE, 1, [Support DBE extension]) -+ DBE_LIB='$(top_builddir)/dbe/libdbe.la' -+ DBE_INC='-I$(top_srcdir)/dbe' -+fi -+ -+AM_CONDITIONAL(XF86BIGFONT, [test "x$XF86BIGFONT" = xyes]) -+if test "x$XF86BIGFONT" = xyes; then -+ AC_DEFINE(XF86BIGFONT, 1, [Support XF86 Big font extension]) -+ REQUIRED_MODULES="$REQUIRED_MODULES $BIGFONTPROTO" -+fi -+ -+AM_CONDITIONAL(DPMSExtension, [test "x$DPMSExtension" = xyes]) -+if test "x$DPMSExtension" = xyes; then -+ AC_DEFINE(DPMSExtension, 1, [Support DPMS extension]) -+fi -+ -+AC_DEFINE(RENDER, 1, [Support RENDER extension]) -+RENDER_LIB='$(top_builddir)/render/librender.la' -+RENDER_INC='-I$(top_srcdir)/render' -+ -+AC_DEFINE(RANDR, 1, [Support RANDR extension]) -+RANDR_LIB='$(top_builddir)/randr/librandr.la' -+RANDR_INC='-I$(top_srcdir)/randr' -+ -+AC_DEFINE(XFIXES,1,[Support XFixes extension]) -+FIXES_LIB='$(top_builddir)/xfixes/libxfixes.la' -+FIXES_INC='-I$(top_srcdir)/xfixes' -+ -+AC_DEFINE(DAMAGE,1,[Support Damage extension]) -+DAMAGE_LIB='$(top_builddir)/damageext/libdamageext.la' -+DAMAGE_INC='-I$(top_srcdir)/damageext' -+MIEXT_DAMAGE_LIB='$(top_builddir)/miext/damage/libdamage.la' -+MIEXT_DAMAGE_INC='-I$(top_srcdir)/miext/damage' -+ -+# XINPUT extension is integral part of the server -+AC_DEFINE(XINPUT, 1, [Support X Input extension]) -+XI_LIB='$(top_builddir)/Xi/libXi.la' -+XI_INC='-I$(top_srcdir)/Xi' -+ -+AM_CONDITIONAL(XF86UTILS, test "x$XF86UTILS" = xyes) -+AM_CONDITIONAL(VGAHW, test "x$VGAHW" = xyes) -+AM_CONDITIONAL(VBE, test "x$VBE" = xyes) -+AM_CONDITIONAL(INT10MODULE, test "x$INT10MODULE" = xyes) -+ -+AC_DEFINE(SHAPE, 1, [Support SHAPE extension]) -+ -+AC_DEFINE_DIR(XKB_BASE_DIRECTORY, XKBPATH, [Path to XKB data]) -+AC_ARG_WITH(xkb-bin-directory, -+ AS_HELP_STRING([--with-xkb-bin-directory=DIR], [Directory containing xkbcomp program]), -+ [XKB_BIN_DIRECTORY="$withval"], -+ [XKB_BIN_DIRECTORY="$bindir"]) -+ -+AC_DEFINE_DIR(XKB_BIN_DIRECTORY, XKB_BIN_DIRECTORY, [Path to XKB bin dir]) -+ -+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 -+ XKBOUTPUT="$XKB_BASE_DIRECTORY/$XKBOUTPUT" -+fi -+ -+dnl XKM_OUTPUT_DIR (used in code) must end in / or file names get hosed -+dnl XKB_COMPILED_DIR (used in Makefiles) must not or install-sh gets confused -+ -+XKBOUTPUT=`echo $XKBOUTPUT/ | $SED 's|/*$|/|'` -+XKB_COMPILED_DIR=`echo $XKBOUTPUT | $SED 's|/*$||'` -+AC_DEFINE_DIR(XKM_OUTPUT_DIR, XKBOUTPUT, [Path to XKB output dir]) -+AC_SUBST(XKB_COMPILED_DIR) -+ -+if test "x$XKB_DFLT_RULES" = x; then -+ case $host_os in -+ linux*) -+ dnl doesn't take AutoAddDevices into account, but whatever. -+ XKB_DFLT_RULES="evdev" -+ ;; -+ *) -+ XKB_DFLT_RULES="base" -+ ;; -+ esac -+fi -+AC_DEFINE_UNQUOTED(XKB_DFLT_RULES, ["$XKB_DFLT_RULES"], [Default XKB ruleset]) -+AC_DEFINE_UNQUOTED(XKB_DFLT_MODEL, ["$XKB_DFLT_MODEL"], [Default XKB model]) -+AC_DEFINE_UNQUOTED(XKB_DFLT_LAYOUT, ["$XKB_DFLT_LAYOUT"], [Default XKB layout]) -+AC_DEFINE_UNQUOTED(XKB_DFLT_VARIANT, ["$XKB_DFLT_VARIANT"], [Default XKB variant]) -+AC_DEFINE_UNQUOTED(XKB_DFLT_OPTIONS, ["$XKB_DFLT_OPTIONS"], [Default XKB options]) -+AC_SUBST([XKB_DFLT_RULES]) -+AC_SUBST([XKB_DFLT_MODEL]) -+AC_SUBST([XKB_DFLT_LAYOUT]) -+AC_SUBST([XKB_DFLT_VARIANT]) -+AC_SUBST([XKB_DFLT_OPTIONS]) -+ -+XKB_LIB='$(top_builddir)/xkb/libxkb.la' -+XKB_STUB_LIB='$(top_builddir)/xkb/libxkbstubs.la' -+REQUIRED_MODULES="$REQUIRED_MODULES xkbfile" -+ -+PKG_CHECK_MODULES([XDMCP], [xdmcp], [have_libxdmcp="yes"], [have_libxdmcp="no"]) -+if test "x$have_libxdmcp" = xyes; then -+ AC_CHECK_LIB(Xdmcp, XdmcpWrap, [have_xdmcpwrap="yes"], [have_xdmcpwrap="no"], [$XDMCP_LIBS]) -+fi -+if test "x$XDMCP" = xauto; then -+ if test "x$have_libxdmcp" = xyes; then -+ XDMCP=yes -+ else -+ XDMCP=no -+ fi -+fi -+if test "x$XDMAUTH" = xauto; then -+ if test "x$have_libxdmcp" = xyes && test "x$have_xdmcpwrap" = xyes; then -+ XDMAUTH=yes -+ else -+ XDMAUTH=no -+ fi -+fi -+ -+AM_CONDITIONAL(XDMCP, [test "x$XDMCP" = xyes]) -+if test "x$XDMCP" = xyes; then -+ AC_DEFINE(XDMCP, 1, [Support XDM Control Protocol]) -+ REQUIRED_LIBS="$REQUIRED_LIBS xdmcp" -+ XDMCP_MODULES="xdmcp" -+fi -+ -+AM_CONDITIONAL(XDMAUTH, [test "x$XDMAUTH" = xyes]) -+if test "x$XDMAUTH" = xyes; then -+ AC_DEFINE(HASXDMAUTH,1,[Support XDM-AUTH*-1]) -+ if ! test "x$XDMCP" = xyes; then -+ REQUIRED_LIBS="$REQUIRED_LIBS xdmcp" -+ XDMCP_MODULES="xdmcp" -+ fi -+fi -+ -+AC_DEFINE_DIR(COMPILEDDEFAULTFONTPATH, FONTPATH, [Default font path]) -+AC_DEFINE_DIR(SERVER_MISC_CONFIG_PATH, SERVERCONFIG, [Server miscellaneous config path]) -+AC_DEFINE_DIR(BASE_FONT_PATH, FONTROOTDIR, [Default base font path]) -+dridriverdir=`$PKG_CONFIG --variable=dridriverdir dri` -+AC_DEFINE_DIR(DRI_DRIVER_PATH, dridriverdir, [Default DRI driver path]) -+AC_DEFINE_UNQUOTED(XVENDORNAME, ["$VENDOR_NAME"], [Vendor name]) -+AC_DEFINE_UNQUOTED(XVENDORNAMESHORT, ["$VENDOR_NAME_SHORT"], [Short vendor name]) -+AC_DEFINE_UNQUOTED(XORG_DATE, ["$RELEASE_DATE"], [Vendor release]) -+AC_DEFINE_UNQUOTED(XORG_MAN_VERSION, ["$VENDOR_MAN_VERSION"], [Vendor man version]) -+AC_DEFINE_UNQUOTED(BUILDERADDR, ["$BUILDERADDR"], [Builder address]) -+ -+if test -z "$OSNAME"; then -+ OSNAME="UNKNOWN" -+fi -+ -+AC_DEFINE_UNQUOTED(OSNAME, ["$OSNAME"], [Operating System Name]) -+AC_DEFINE_UNQUOTED(OSVENDOR, ["$OSVENDOR"], [Operating System Vendor]) -+AC_DEFINE_UNQUOTED(BUILDERSTRING, ["$BUILDERSTRING"], [Builder string]) -+ -+AC_SUBST([VENDOR_NAME_SHORT]) -+AC_DEFINE_UNQUOTED(VENDOR_NAME, ["$VENDOR_NAME"], [Vendor name]) -+AC_DEFINE_UNQUOTED(VENDOR_NAME_SHORT, ["$VENDOR_NAME_SHORT"], [Vendor name]) -+AC_DEFINE_UNQUOTED(VENDOR_RELEASE, [$VENDOR_RELEASE], [Vendor release]) -+AC_DEFINE_UNQUOTED(VENDOR_MAN_VERSION, ["$VENDOR_MAN_VERSION"], [Vendor man version]) -+ -+AC_DEFINE(NO_LIBCWRAPPER, 1, [Define to 1 if modules should avoid the libcwrapper]) -+ -+if test "x$DEBUGGING" = xyes; then -+ AC_DEFINE(DEBUG, 1, [Enable debugging code]) -+fi -+AM_CONDITIONAL(DEBUG, [test "x$DEBUGGING" = xyes]) -+ -+AC_DEFINE(XTEST, 1, [Support XTest extension]) -+AC_DEFINE(XSYNC, 1, [Support XSync extension]) -+AC_DEFINE(XCMISC, 1, [Support XCMisc extension]) -+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) $(LIBUNWIND_LIBS)' -+else -+ DIX_LIB='$(top_builddir)/dix/libdix.la' -+ OS_LIB='$(top_builddir)/os/libos.la' -+fi -+AC_SUBST([DIX_LIB]) -+AC_SUBST([OS_LIB]) -+ -+MAIN_LIB='$(top_builddir)/dix/libmain.la' -+AC_SUBST([MAIN_LIB]) -+ -+MI_LIB='$(top_builddir)/mi/libmi.la' -+MI_EXT_LIB='$(top_builddir)/mi/libmiext.la' -+MI_INC='-I$(top_srcdir)/mi' -+FB_LIB='$(top_builddir)/fb/libfb.la' -+FB_INC='-I$(top_srcdir)/fb' -+MIEXT_SHADOW_INC='-I$(top_srcdir)/miext/shadow' -+MIEXT_SHADOW_LIB='$(top_builddir)/miext/shadow/libshadow.la' -+MIEXT_SYNC_INC='-I$(top_srcdir)/miext/sync' -+MIEXT_SYNC_LIB='$(top_builddir)/miext/sync/libsync.la' -+CORE_INCS='-I$(top_srcdir)/include -I$(top_builddir)/include' -+ -+# SHA1 hashing -+AC_ARG_WITH([sha1], -+ [AS_HELP_STRING([--with-sha1=libc|libmd|libnettle|libgcrypt|libcrypto|libsha1|CommonCrypto|CryptoAPI], -+ [choose SHA1 implementation])]) -+AC_CHECK_FUNC([SHA1Init], [HAVE_SHA1_IN_LIBC=yes]) -+if test "x$with_sha1" = x && test "x$HAVE_SHA1_IN_LIBC" = xyes; then -+ with_sha1=libc -+fi -+if test "x$with_sha1" = xlibc && test "x$HAVE_SHA1_IN_LIBC" != xyes; then -+ AC_MSG_ERROR([libc requested but not found]) -+fi -+if test "x$with_sha1" = xlibc; then -+ AC_DEFINE([HAVE_SHA1_IN_LIBC], [1], -+ [Use libc SHA1 functions]) -+ SHA1_LIBS="" -+fi -+AC_CHECK_FUNC([CC_SHA1_Init], [HAVE_SHA1_IN_COMMONCRYPTO=yes]) -+if test "x$with_sha1" = x && test "x$HAVE_SHA1_IN_COMMONCRYPTO" = xyes; then -+ with_sha1=CommonCrypto -+fi -+if test "x$with_sha1" = xCommonCrypto && test "x$HAVE_SHA1_IN_COMMONCRYPTO" != xyes; then -+ AC_MSG_ERROR([CommonCrypto requested but not found]) -+fi -+if test "x$with_sha1" = xCommonCrypto; then -+ AC_DEFINE([HAVE_SHA1_IN_COMMONCRYPTO], [1], -+ [Use CommonCrypto SHA1 functions]) -+ SHA1_LIBS="" -+fi -+dnl stdcall functions cannot be tested with AC_CHECK_LIB -+AC_CHECK_HEADER([wincrypt.h], [HAVE_SHA1_IN_CRYPTOAPI=yes], [], [#include ]) -+if test "x$with_sha1" = x && test "x$HAVE_SHA1_IN_CRYPTOAPI" = xyes; then -+ with_sha1=CryptoAPI -+fi -+if test "x$with_sha1" = xCryptoAPI && test "x$HAVE_SHA1_IN_CRYPTOAPI" != xyes; then -+ AC_MSG_ERROR([CryptoAPI requested but not found]) -+fi -+if test "x$with_sha1" = xCryptoAPI; then -+ AC_DEFINE([HAVE_SHA1_IN_CRYPTOAPI], [1], -+ [Use CryptoAPI SHA1 functions]) -+ SHA1_LIBS="" -+fi -+AC_CHECK_LIB([md], [SHA1Init], [HAVE_LIBMD=yes]) -+if test "x$with_sha1" = x && test "x$HAVE_LIBMD" = xyes; then -+ with_sha1=libmd -+fi -+if test "x$with_sha1" = xlibmd && test "x$HAVE_LIBMD" != xyes; then -+ AC_MSG_ERROR([libmd requested but not found]) -+fi -+if test "x$with_sha1" = xlibmd; then -+ AC_DEFINE([HAVE_SHA1_IN_LIBMD], [1], -+ [Use libmd SHA1 functions]) -+ SHA1_LIBS=-lmd -+fi -+PKG_CHECK_MODULES([LIBSHA1], [libsha1], [HAVE_LIBSHA1=yes], [HAVE_LIBSHA1=no]) -+if test "x$with_sha1" = x && test "x$HAVE_LIBSHA1" = xyes; then -+ with_sha1=libsha1 -+fi -+if test "x$with_sha1" = xlibsha1 && test "x$HAVE_LIBSHA1" != xyes; then -+ AC_MSG_ERROR([libsha1 requested but not found]) -+fi -+if test "x$with_sha1" = xlibsha1; then -+ AC_DEFINE([HAVE_SHA1_IN_LIBSHA1], [1], -+ [Use libsha1 for SHA1]) -+ SHA1_LIBS=-lsha1 -+fi -+AC_CHECK_LIB([nettle], [nettle_sha1_init], [HAVE_LIBNETTLE=yes]) -+if test "x$with_sha1" = x && test "x$HAVE_LIBNETTLE" = xyes; then -+ with_sha1=libnettle -+fi -+if test "x$with_sha1" = xlibnettle && test "x$HAVE_LIBNETTLE" != xyes; then -+ AC_MSG_ERROR([libnettle requested but not found]) -+fi -+if test "x$with_sha1" = xlibnettle; then -+ AC_DEFINE([HAVE_SHA1_IN_LIBNETTLE], [1], -+ [Use libnettle SHA1 functions]) -+ SHA1_LIBS=-lnettle -+fi -+AC_CHECK_LIB([gcrypt], [gcry_md_open], [HAVE_LIBGCRYPT=yes]) -+if test "x$with_sha1" = x && test "x$HAVE_LIBGCRYPT" = xyes; then -+ with_sha1=libgcrypt -+fi -+if test "x$with_sha1" = xlibgcrypt && test "x$HAVE_LIBGCRYPT" != xyes; then -+ AC_MSG_ERROR([libgcrypt requested but not found]) -+fi -+if test "x$with_sha1" = xlibgcrypt; then -+ AC_DEFINE([HAVE_SHA1_IN_LIBGCRYPT], [1], -+ [Use libgcrypt SHA1 functions]) -+ SHA1_LIBS=-lgcrypt -+fi -+# We don't need all of the OpenSSL libraries, just libcrypto -+AC_CHECK_LIB([crypto], [SHA1_Init], [HAVE_LIBCRYPTO=yes]) -+PKG_CHECK_MODULES([OPENSSL], [openssl], [HAVE_OPENSSL_PKC=yes], -+ [HAVE_OPENSSL_PKC=no]) -+if test "x$HAVE_LIBCRYPTO" = xyes || test "x$HAVE_OPENSSL_PKC" = xyes; then -+ if test "x$with_sha1" = x; then -+ with_sha1=libcrypto -+ fi -+else -+ if test "x$with_sha1" = xlibcrypto; then -+ AC_MSG_ERROR([OpenSSL libcrypto requested but not found]) -+ fi -+fi -+if test "x$with_sha1" = xlibcrypto; then -+ if test "x$HAVE_LIBCRYPTO" = xyes; then -+ SHA1_LIBS=-lcrypto -+ else -+ SHA1_LIBS="$OPENSSL_LIBS" -+ SHA1_CFLAGS="$OPENSSL_CFLAGS" -+ fi -+fi -+AC_MSG_CHECKING([for SHA1 implementation]) -+if test "x$with_sha1" = x; then -+ AC_MSG_ERROR([No suitable SHA1 implementation found]) -+fi -+AC_MSG_RESULT([$with_sha1]) -+AC_SUBST(SHA1_LIBS) -+AC_SUBST(SHA1_CFLAGS) -+ -+PKG_CHECK_MODULES([XSERVERCFLAGS], [$REQUIRED_MODULES $REQUIRED_LIBS]) -+PKG_CHECK_MODULES([XSERVERLIBS], [$REQUIRED_LIBS]) -+ -+# Autotools has some unfortunate issues with library handling. In order to -+# get a server to rebuild when a dependency in the tree is changed, it must -+# be listed in SERVERNAME_DEPENDENCIES. However, no system libraries may be -+# listed there, or some versions of autotools will break (especially if a -L -+# is required to find the library). So, we keep two sets of libraries -+# detected: NAMESPACE_LIBS for in-tree libraries to be linked against, which -+# will go into the _DEPENDENCIES and _LDADD of the server, and -+# NAMESPACE_SYS_LIBS which will go into only the _LDADD. The -+# NAMESPACEMODULES_LIBS detected from pkgconfig should always go in -+# NAMESPACE_SYS_LIBS. -+# -+# XSERVER_LIBS is the set of in-tree libraries which all servers require. -+# XSERVER_SYS_LIBS is the set of out-of-tree libraries which all servers -+# require. -+# -+XSERVER_CFLAGS="${XSERVER_CFLAGS} ${XSERVERCFLAGS_CFLAGS}" -+XSERVER_LIBS="$DIX_LIB $MI_LIB $OS_LIB" -+XSERVER_SYS_LIBS="${XSERVERLIBS_LIBS} ${SYS_LIBS} ${LIBS}" -+AC_SUBST([XSERVER_LIBS]) -+AC_SUBST([XSERVER_SYS_LIBS]) -+ -+UTILS_SYS_LIBS="${SYS_LIBS}" -+AC_SUBST([UTILS_SYS_LIBS]) -+ -+# The Xorg binary needs to export symbols so that they can be used from modules -+# Some platforms require extra flags to do this. libtool should set the -+# necessary flags for each platform when -export-dynamic is passed to it. -+LD_EXPORT_SYMBOLS_FLAG="-export-dynamic" -+LD_NO_UNDEFINED_FLAG= -+XORG_DRIVER_LIBS= -+case "$host_os" in -+ cygwin*) -+ LD_EXPORT_SYMBOLS_FLAG="-Wl,--export-all,--out-implib,lib\$@.a" -+ LD_NO_UNDEFINED_FLAG="-no-undefined -Wl,\$(top_builddir)/hw/xfree86/libXorg.exe.a" -+ XORG_DRIVER_LIBS="-lXorg.exe -L\${moduledir} -lshadow -lfb -no-undefined" -+ CYGWIN=yes -+ ;; -+ solaris*) -+ # We use AC_LINK_IFELSE to generate a temporary program conftest$EXEEXT -+ # that we can link against for testing if the system linker is new -+ # enough to support -z parent= for verifying loadable modules -+ # are only calling functions defined in either the loading program or -+ # the libraries they're linked with. -+ AC_LINK_IFELSE( -+ [AC_LANG_SOURCE([int main(int argc, char **argv) { return 0; }])], -+ [mv conftest$EXEEXT conftest.parent -+ XORG_CHECK_LINKER_FLAGS([-Wl,-z,parent=conftest.parent -G], -+ [LD_NO_UNDEFINED_FLAG="-Wl,-z,defs -Wl,-z,parent=\$(top_builddir)/hw/xfree86/Xorg" -+# Not set yet, since this gets exported in xorg-server.pc to all the drivers, -+# and they're not all fixed to build correctly with it yet. -+# XORG_DRIVER_LIBS="-Wl,-z,defs -Wl,-z,parent=${bindir}/Xorg" -+ ],[], -+ [AC_LANG_SOURCE([extern int main(int argc, char **argv); -+ int call_main(void) { return main(0, NULL); }])]) -+ rm -f conftest.parent -+ ]) -+ ;; -+esac -+AC_SUBST([LD_EXPORT_SYMBOLS_FLAG]) -+AC_SUBST([LD_NO_UNDEFINED_FLAG]) -+AC_SUBST([XORG_DRIVER_LIBS]) -+AM_CONDITIONAL([CYGWIN], [test x"$CYGWIN" = xyes]) -+AM_CONDITIONAL([NO_UNDEFINED], [test x"$LD_NO_UNDEFINED_FLAG" != x]) -+ -+dnl Imake defines SVR4 on SVR4 systems, and many files check for it, so -+dnl we need to replicate that here until those can all be fixed -+AC_MSG_CHECKING([if SVR4 needs to be defined]) -+AC_EGREP_CPP([I_AM_SVR4],[ -+#if defined(SVR4) || defined(__svr4__) || defined(__SVR4) -+ I_AM_SVR4 -+#endif -+],[ -+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" -+ -+dnl --------------------------------------------------------------------------- -+dnl DDX section. -+dnl --------------------------------------------------------------------------- -+ -+dnl Xvfb DDX -+ -+AC_MSG_CHECKING([whether to build Xvfb DDX]) -+AC_MSG_RESULT([$XVFB]) -+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_SYS_LIBS="$XVFBMODULES_LIBS $GLX_SYS_LIBS" -+ AC_SUBST([XVFB_LIBS]) -+ AC_SUBST([XVFB_SYS_LIBS]) -+fi -+ -+ -+dnl Xnest DDX -+ -+PKG_CHECK_MODULES(XNESTMODULES, [$LIBXEXT x11 xau $XDMCP_MODULES], [have_xnest=yes], [have_xnest=no]) -+AC_MSG_CHECKING([whether to build Xnest DDX]) -+if test "x$XNEST" = xauto; then -+ XNEST="$have_xnest" -+fi -+AC_MSG_RESULT([$XNEST]) -+AM_CONDITIONAL(XNEST, [test "x$XNEST" = xyes]) -+ -+if test "x$XNEST" = xyes; then -+ 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_SYS_LIBS="$XNESTMODULES_LIBS $GLX_SYS_LIBS" -+ AC_SUBST([XNEST_LIBS]) -+ AC_SUBST([XNEST_SYS_LIBS]) -+fi -+ -+ -+dnl Xorg DDX -+ -+AC_MSG_CHECKING([whether to build Xorg DDX]) -+if test "x$XORG" = xauto; then -+ XORG="yes" -+ case $host_os in -+ cygwin*) XORG="no" ;; -+ mingw*) XORG="no" ;; -+ darwin*) XORG="no" ;; -+ esac -+fi -+AC_MSG_RESULT([$XORG]) -+ -+if test "x$XORG" = xyes; then -+ XORG_DDXINCS='-I$(top_srcdir)/hw/xfree86 -I$(top_srcdir)/hw/xfree86/include -I$(top_srcdir)/hw/xfree86/common' -+ XORG_OSINCS='-I$(top_srcdir)/hw/xfree86/os-support -I$(top_srcdir)/hw/xfree86/os-support/bus -I$(top_srcdir)/os' -+ XORG_INCS="$XORG_DDXINCS $XORG_OSINCS" -+ XORG_CFLAGS="$XORGSERVER_CFLAGS -DHAVE_XORG_CONFIG_H" -+ XORG_LIBS="$COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $XI_LIB $XKB_LIB" -+ -+ dnl ================================================================== -+ dnl symbol visibility -+ symbol_visibility= -+ have_visibility=disabled -+ if test x$SYMBOL_VISIBILITY != xno; then -+ AC_MSG_CHECKING(for symbol visibility support) -+ if test x$GCC = xyes; then -+ VISIBILITY_CFLAGS="-fvisibility=hidden" -+ else -+ if test x$SUNCC = xyes; then -+ VISIBILITY_CFLAGS="-xldscope=hidden" -+ else -+ have_visibility=no -+ fi -+ fi -+ if test x$have_visibility != xno; then -+ save_CFLAGS="$CFLAGS" -+ proto_inc=`$PKG_CONFIG --cflags xproto` -+ CFLAGS="$CFLAGS $VISIBILITY_CFLAGS $proto_inc" -+ AC_TRY_COMPILE( -+ [#include -+ extern _X_HIDDEN int hidden_int; -+ extern _X_EXPORT int public_int; -+ extern _X_HIDDEN int hidden_int_func(void); -+ extern _X_EXPORT int public_int_func(void);], -+ [], -+ have_visibility=yes, -+ have_visibility=no) -+ CFLAGS=$save_CFLAGS -+ fi -+ AC_MSG_RESULT([$have_visibility]) -+ if test x$have_visibility != xno; then -+ symbol_visibility=$VISIBILITY_CFLAGS -+ XORG_CFLAGS="$XORG_CFLAGS $VISIBILITY_CFLAGS" -+ XSERVER_CFLAGS="$XSERVER_CFLAGS $VISIBILITY_CFLAGS" -+ fi -+ fi -+ dnl added to xorg-server.pc -+ AC_SUBST([symbol_visibility]) -+ dnl =================================================================== -+ -+ dnl =================================================================== -+ dnl ================= beginning of PCI configuration ================== -+ dnl =================================================================== -+ xorg_bus_bsdpci=no -+ xorg_bus_sparc=no -+ -+ 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 -+ fi -+ AC_MSG_RESULT([$PCI]) -+ -+ if test "x$CONFIG_UDEV_KMS" = xyes; then -+ AC_DEFINE(XSERVER_PLATFORM_BUS, 1, [X server supports platform device enumeration]) -+ fi -+ AC_MSG_RESULT([$XSERVER_PLATFORM_BUS]) -+ dnl =================================================================== -+ dnl ==================== end of PCI configuration ===================== -+ dnl =================================================================== -+ -+ 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 -+ alpha*) -+ linux_alpha=yes -+ ;; -+ i*86|amd64*|x86_64*|ia64*) -+ ;; -+ *) -+ ;; -+ esac -+ ;; -+ freebsd* | kfreebsd*-gnu | dragonfly*) -+ XORG_OS_SUBDIR="bsd" -+ ;; -+ netbsd*) -+ XORG_OS_SUBDIR="bsd" -+ ;; -+ openbsd*) -+ if test "x$ac_cv_BSD_APM" = xyes \ -+ -o "x$ac_cv_BSD_KQUEUE_APM" = xyes; then -+ XORG_CFLAGS="$XORG_CFLAGS -DXF86PM" -+ fi -+ XORG_OS_SUBDIR="bsd" -+ ;; -+ solaris*) -+ XORG_OS_SUBDIR="solaris" -+ XORG_CFLAGS="$XORG_CFLAGS -DXF86PM" -+ AC_CHECK_HEADERS([sys/kd.h]) -+ AC_CHECK_HEADERS([sys/vt.h], [solaris_vt=yes], [solaris_vt=no]) -+ # Check for minimum supported release -+ AC_MSG_CHECKING([Solaris version]) -+ OS_MINOR=`echo ${host_os}|$SED -e 's/^.*solaris2\.//' -e s'/\..*$//'` -+ if test "${OS_MINOR}" -ge 7 ; then -+ AC_MSG_RESULT(Solaris ${OS_MINOR}) -+ else -+ AC_MSG_RESULT(Solaris `echo ${host_os}|$SED -e 's/^.*solaris//`) -+ fi -+ 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 -+ sparc*) -+ SOLARIS_INOUT_ARCH="sparcv8plus" -+ ;; -+ i*86) -+ if test x$SOLARIS_64 = xyes ; then -+ SOLARIS_INOUT_ARCH="amd64" -+ else -+ SOLARIS_INOUT_ARCH="ia32" -+ fi -+ ;; -+ *) -+ AC_MSG_ERROR([Unsupported Solaris platform. Only SPARC & x86 \ -+ are supported on Solaris in this release. If you are \ -+ interested in porting Xorg to your platform, please email \ -+ xorg@lists.freedesktop.org.]) ;; -+ 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" -+ ;; -+ *) -+ XORG_OS_SUBDIR="stub" -+ AC_MSG_NOTICE([m4_text_wrap(m4_join([ ], -+ [Your OS is unknown. Xorg currently only supports Linux,], -+ [Free/Open/Net/DragonFlyBSD, Solaris/OpenSolaris, & GNU Hurd.], -+ [If you are interested in porting Xorg to your platform,], -+ [please email xorg@lists.freedesktop.org.]))]) -+ ;; -+ esac -+ -+ case $host_cpu in -+ i*86) -+ ;; -+ esac -+ -+ if test "x$DGA" = xauto; then -+ PKG_CHECK_MODULES(DGA, $DGAPROTO, [DGA=yes], [DGA=no]) -+ fi -+ if test "x$DGA" = xyes; then -+ XORG_MODULES="$XORG_MODULES $DGAPROTO" -+ PKG_CHECK_MODULES(DGA, $DGAPROTO) -+ AC_DEFINE(DGA, 1, [Support DGA extension]) -+ AC_DEFINE(XFreeXDGA, 1, [Build XDGA support]) -+ fi -+ -+ if test "x$XF86VIDMODE" = xauto; then -+ PKG_CHECK_MODULES(XF86VIDMODE, $VIDMODEPROTO, [XF86VIDMODE=yes], [XF86VIDMODE=no]) -+ fi -+ if test "x$XF86VIDMODE" = xyes; then -+ XORG_MODULES="$XORG_MODULES $VIDMODEPROTO" -+ PKG_CHECK_MODULES(XF86VIDMODE, $VIDMODEPROTO) -+ AC_DEFINE(XF86VIDMODE, 1, [Support XFree86 Video Mode extension]) -+ fi -+ -+ if test -n "$XORG_MODULES"; then -+ PKG_CHECK_MODULES(XORG_MODULES, [$XORG_MODULES]) -+ XORG_CFLAGS="$XORG_CFLAGS $XORG_MODULES_CFLAGS" -+ XORG_SYS_LIBS="$XORG_SYS_LIBS $XORG_MODULES_LIBS" -+ fi -+ -+ AC_SUBST([XORG_LIBS]) -+ AC_SUBST([XORG_SYS_LIBS]) -+ AC_SUBST([XORG_INCS]) -+ AC_SUBST([XORG_OS_SUBDIR]) -+ AC_SUBST([XORG_CFLAGS]) -+ -+ dnl these only go in xorg-config.h -+ XF86CONFIGFILE="xorg.conf" -+ XF86CONFIGDIR="xorg.conf.d" -+ AC_SUBST(XF86CONFIGDIR) -+ CONFIGFILE="$sysconfdir/$XF86CONFIGFILE" -+ LOGPREFIX="$logdir/Xorg." -+ AC_DEFINE(XORG_SERVER, 1, [Building Xorg server]) -+ AC_DEFINE(XORGSERVER, 1, [Building Xorg server]) -+ AC_DEFINE(XFree86Server, 1, [Building XFree86 server]) -+ AC_DEFINE_UNQUOTED(XORG_VERSION_CURRENT, [$VENDOR_RELEASE], [Current Xorg version]) -+ AC_DEFINE(NEED_XF86_TYPES, 1, [Need XFree86 typedefs]) -+ AC_DEFINE(NEED_XF86_PROTOTYPES, 1, [Need XFree86 helper functions]) -+ AC_DEFINE(__XSERVERNAME__, "Xorg", [Name of X server]) -+ AC_DEFINE_DIR(__XCONFIGFILE__, XF86CONFIGFILE, [Name of configuration file]) -+ AC_DEFINE_DIR(XF86CONFIGFILE, XF86CONFIGFILE, [Name of configuration file]) -+ AC_DEFINE_DIR(__XCONFIGDIR__, XF86CONFIGDIR, [Name of configuration directory]) -+ AC_DEFINE_DIR(DEFAULT_MODULE_PATH, moduledir, [Default module search path]) -+ AC_DEFINE_DIR(DEFAULT_LIBRARY_PATH, libdir, [Default library install path]) -+ AC_DEFINE_DIR(DEFAULT_LOGPREFIX, LOGPREFIX, [Default log location]) -+ AC_DEFINE_UNQUOTED(__VENDORDWEBSUPPORT__, ["$VENDOR_WEB"], [Vendor web address for support]) -+ if test "x$VGAHW" = xyes; then -+ AC_DEFINE(WITH_VGAHW, 1, [Building vgahw module]) -+ fi -+ -+ driverdir="$moduledir/drivers" -+ AC_SUBST([moduledir]) -+ AC_SUBST([driverdir]) -+ sdkdir="$includedir/xorg" -+ extdir="$includedir/X11/extensions" -+ sysconfigdir="$datadir/X11/$XF86CONFIGDIR" -+ AC_SUBST([sdkdir]) -+ AC_SUBST([extdir]) -+ AC_SUBST([sysconfigdir]) -+ AC_SUBST([logdir]) -+ -+ # stuff the ABI versions into the pc file too -+ extract_abi() { -+ grep ^.define.*${1}_VERSION ${srcdir}/hw/xfree86/common/xf86Module.h | tr '(),' ' .' | awk '{ print $4$5 }' -+ } -+ abi_ansic=`extract_abi ANSIC` -+ abi_videodrv=`extract_abi VIDEODRV` -+ abi_xinput=`extract_abi XINPUT` -+ abi_extension=`extract_abi EXTENSION` -+ AC_SUBST([abi_ansic]) -+ AC_SUBST([abi_videodrv]) -+ AC_SUBST([abi_xinput]) -+ AC_SUBST([abi_extension]) -+fi -+AM_CONDITIONAL([XORG], [test "x$XORG" = xyes]) -+AM_CONDITIONAL([XORG_BUS_PCI], [test "x$PCI" = xyes]) -+AM_CONDITIONAL([XORG_BUS_BSDPCI], [test "x$xorg_bus_bsdpci" = xyes]) -+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([SOLARIS_VT], [test "x$solaris_vt" = xyes]) -+AM_CONDITIONAL([DGA], [test "x$DGA" = xyes]) -+AM_CONDITIONAL([XF86VIDMODE], [test "x$XF86VIDMODE" = xyes]) -+AM_CONDITIONAL([XORG_BUS_PLATFORM], [test "x$CONFIG_UDEV_KMS" = xyes]) -+dnl XWin DDX -+ -+AC_MSG_CHECKING([whether to build XWin DDX]) -+if test "x$XWIN" = xauto; then -+ case $host_os in -+ cygwin*) XWIN="yes" ;; -+ mingw*) XWIN="yes" ;; -+ *) XWIN="no" ;; -+ esac -+fi -+AC_MSG_RESULT([$XWIN]) -+ -+if test "x$XWIN" = xyes; then -+ AC_DEFINE_DIR(SYSCONFDIR, sysconfdir, [Location of system.XWinrc]) -+ AC_DEFINE_DIR(DEFAULT_LOGDIR, logdir, [Default log location]) -+ AC_DEFINE_UNQUOTED(XORG_VERSION_CURRENT, [$VENDOR_RELEASE], [Current Xorg version]) -+ AC_DEFINE_UNQUOTED(__VENDORDWEBSUPPORT__, ["$VENDOR_WEB"], [Vendor web address for support]) -+ AC_CHECK_TOOL(WINDRES, windres) -+ -+ PKG_CHECK_MODULES([XWINMODULES],[x11 xdmcp xau]) -+ -+ if test "x$WINDOWSWM" = xauto; then -+ PKG_CHECK_EXISTS($WINDOWSWMPROTO, [WINDOWSWM=yes], [WINDOWSWM=no]) -+ fi -+ if test "x$WINDOWSWM" = xyes ; then -+ PKG_CHECK_MODULES(WINDOWSWM, $WINDOWSWMPROTO) -+ XWINMODULES_CFLAGS="$XWINMODULES_CFLAGS $WINDOWSWM_CFLAGS" -+ AC_DEFINE(ROOTLESS,1,[Build Rootless code]) -+ fi -+ -+ case $host_os in -+ cygwin*) -+ XWIN_SERVER_NAME=XWin -+ AC_DEFINE(HAS_DEVWINDOWS,1,[Cygwin has /dev/windows for signaling new win32 messages]) -+ ;; -+ mingw*) -+ XWIN_SERVER_NAME=Xming -+ AC_DEFINE(RELOCATE_PROJECTROOT,1,[Make PROJECT_ROOT relative to the xserver location]) -+ AC_DEFINE(HAS_WINSOCK,1,[Use Windows sockets]) -+ XWIN_SYS_LIBS="-lpthread -lws2_32" -+ ;; -+ esac -+ -+ XWIN_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $RANDR_LIB $RENDER_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $DAMAGE_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $OS_LIB" -+ XWIN_SYS_LIBS="$XWIN_SYS_LIBS $XWINMODULES_LIBS $GLX_SYS_LIBS" -+ AC_SUBST(XWIN_LIBS) -+ AC_SUBST(XWIN_SERVER_NAME) -+ AC_SUBST(XWIN_SYS_LIBS) -+ -+ if test "x$DEBUGGING" = xyes; then -+ AC_DEFINE(CYGDEBUG, 1, [Simple debug messages]) -+ AC_DEFINE(CYGWINDOWING_DEBUG, 1, [Debug messages for window handling]) -+ AC_DEFINE(CYGMULTIWINDOW_DEBUG, 1, [Debug window manager]) -+ fi -+ -+ AC_DEFINE(DDXOSVERRORF, 1, [Use OsVendorVErrorF]) -+ AC_DEFINE(DDXBEFORERESET, 1, [Use ddxBeforeReset ]) -+ -+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 -+ 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` -+ fi -+ AC_SUBST(KHRONOS_SPEC_DIR) -+ fi -+ -+fi -+AM_CONDITIONAL(XWIN, [test "x$XWIN" = xyes]) -+AM_CONDITIONAL(XWIN_MULTIWINDOW, [test "x$XWIN" = xyes]) -+AM_CONDITIONAL(XWIN_MULTIWINDOWEXTWM, [test "x$XWIN" = xyes && test "x$WINDOWSWM" = xyes]) -+AM_CONDITIONAL(XWIN_CLIPBOARD, [test "x$XWIN" = xyes]) -+AM_CONDITIONAL(XWIN_GLX_WINDOWS, [test "x$XWIN" = xyes && test "x$AIGLX" = xyes]) -+AM_CONDITIONAL(XWIN_NATIVEGDI, [test "x$XWIN" = xyes]) -+AM_CONDITIONAL(XWIN_PRIMARYFB, [test "x$XWIN" = xyes]) -+AM_CONDITIONAL(XWIN_RANDR, [test "x$XWIN" = xyes]) -+AM_CONDITIONAL(XWIN_XV, [test "x$XWIN" = xyes && test "x$XV" = xyes]) -+ -+dnl Darwin / OS X DDX -+if test "x$XQUARTZ" = xyes; then -+ 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" -+ AC_SUBST([XQUARTZ_LIBS]) -+ -+ AC_CHECK_LIB([Xplugin],[xp_init],[:]) -+ -+ CFLAGS="${CFLAGS} -DROOTLESS_WORKAROUND -DROOTLESS_SAFEALPHA -DNO_ALLOCA" -+ -+ PKG_CHECK_MODULES(XPBPROXY, $APPLEWMPROTO $LIBAPPLEWM xfixes x11) -+ -+ if test "x$XQUARTZ_SPARKLE" = xyes ; then -+ AC_DEFINE(XQUARTZ_SPARKLE,1,[Support application updating through sparkle.]) -+ fi -+ -+ if test "x$STANDALONE_XPBPROXY" = xyes ; then -+ AC_DEFINE(STANDALONE_XPBPROXY,1,[Build a standalone xpbproxy]) -+ fi -+fi -+ -+# Support for objc in autotools is minimal and not documented. -+OBJC='$(CC)' -+OBJCLD='$(CCLD)' -+OBJCLINK='$(LINK)' -+OBJCFLAGS='$(CFLAGS)' -+AC_SUBST([OBJC]) -+AC_SUBST([OBJCCLD]) -+AC_SUBST([OBJCLINK]) -+AC_SUBST([OBJCFLAGS]) -+# internal, undocumented automake func follows :( -+_AM_DEPENDENCIES([OBJC]) -+AM_CONDITIONAL(XQUARTZ, [test "x$XQUARTZ" = xyes]) -+AM_CONDITIONAL(XQUARTZ_SPARKLE, [test "x$XQUARTZ_SPARKLE" != "xno"]) -+AM_CONDITIONAL(STANDALONE_XPBPROXY, [test "x$STANDALONE_XPBPROXY" = xyes]) -+ -+dnl DMX DDX -+PKG_CHECK_MODULES( -+ [DMXMODULES], -+ [xmuu $LIBXEXT x11 xrender xfixes $LIBXI $DMXPROTO xau $XDMCP_MODULES], -+ [PKG_CHECK_MODULES( -+ [XDMXCONFIG_DEP], -+ [xaw7 xmu xt xpm x11], -+ [have_dmx=yes], -+ [have_dmx=no])], -+ [have_dmx=no]) -+AC_MSG_CHECKING([whether to build Xdmx DDX]) -+if test "x$DMX" = xauto; then -+ DMX="$have_dmx" -+ case $host_os in -+ cygwin*) DMX="no" ;; -+ mingw*) DMX="no" ;; -+ darwin*) DMX="no" ;; -+ esac -+fi -+AC_MSG_RESULT([$DMX]) -+AM_CONDITIONAL(DMX, [test "x$DMX" = xyes]) -+ -+if test "x$DMX" = xyes; then -+ if test "x$have_dmx" = xno; then -+ AC_MSG_ERROR([Xdmx build explicitly requested, but required -+ modules not found.]) -+ fi -+ DMX_INCLUDES="$XEXT_INC $RENDER_INC $RECORD_INC" -+ XDMX_CFLAGS="$DMXMODULES_CFLAGS" -+ XDMX_LIBS="$FB_LIB $MI_LIB $XEXT_LIB $RENDER_LIB $RECORD_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $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]) -+ AC_SUBST([XDMX_SYS_LIBS]) -+ -+dnl USB sources in DMX require -+ AC_CHECK_HEADER([linux/input.h], DMX_BUILD_USB="yes", -+ DMX_BUILD_USB="no") -+dnl Linux sources in DMX require -+ AC_CHECK_HEADER([linux/keyboard.h], DMX_BUILD_LNX="yes", -+ DMX_BUILD_LNX="no") -+ AC_SUBST(XDMXCONFIG_DEP_CFLAGS) -+ AC_SUBST(XDMXCONFIG_DEP_LIBS) -+ PKG_CHECK_MODULES([DMXEXAMPLES_DEP], [$LIBDMX $LIBXEXT x11]) -+ AC_SUBST(DMXEXAMPLES_DEP_LIBS) -+ PKG_CHECK_MODULES([DMXXMUEXAMPLES_DEP], [$LIBDMX xmu $LIBXEXT x11]) -+ AC_SUBST(DMXXMUEXAMPLES_DEP_LIBS) -+ PKG_CHECK_MODULES([DMXXIEXAMPLES_DEP], [$LIBDMX $LIBXI $LIBXEXT x11]) -+ AC_SUBST(DMXXIEXAMPLES_DEP_LIBS) -+ PKG_CHECK_MODULES([XTSTEXAMPLES_DEP], [$LIBXTST $LIBXEXT x11]) -+ AC_SUBST(XTSTEXAMPLES_DEP_LIBS) -+ PKG_CHECK_MODULES([XRESEXAMPLES_DEP], [xres $LIBXEXT x11]) -+ AC_SUBST(XRESEXAMPLES_DEP_LIBS) -+ PKG_CHECK_MODULES([X11EXAMPLES_DEP], [$LIBXEXT x11]) -+ AC_SUBST(X11EXAMPLES_DEP_LIBS) -+ -+fi -+AM_CONDITIONAL([DMX_BUILD_LNX], [test "x$DMX_BUILD_LNX" = xyes]) -+AM_CONDITIONAL([DMX_BUILD_USB], [test "x$DMX_BUILD_USB" = xyes]) -+ -+dnl kdrive DDX -+ -+XEPHYR_LIBS= -+XEPHYR_INCS= -+ -+AM_CONDITIONAL(KDRIVE, [test x$KDRIVE = xyes]) -+ -+if test "$KDRIVE" = yes; then -+ AC_DEFINE(KDRIVESERVER,1,[Build Kdrive X server]) -+ AC_DEFINE(KDRIVEDDXACTIONS,,[Build kdrive ddx]) -+ -+ AC_CHECK_HEADERS([linux/fb.h]) -+ if test "$ac_cv_header_linux_fb_h" = yes && test "x$XFBDEV" = xauto; then -+ XFBDEV=yes -+ fi -+ -+ if test "x$XFBDEV" = xyes; then -+ KDRIVEFBDEVLIB=yes -+ AC_DEFINE(KDRIVEFBDEV, 1, [Build fbdev-based kdrive server]) -+ fi -+ -+ -+ PKG_CHECK_MODULES([TSLIB], [tslib-0.0], [HAVE_TSLIB="yes"], [HAVE_TSLIB="no"]) -+ if test "x$HAVE_TSLIB" = xno; then -+ AC_CHECK_LIB(ts, ts_open, [ -+ HAVE_TSLIB="yes" -+ TSLIB_LIBS="-lts" -+ ]) -+ fi -+ -+ if test "xTSLIB" = xauto; then -+ TSLIB="$HAVE_TSLIB" -+ fi -+ -+ if test "x$TSLIB" = xyes; then -+ if ! test "x$HAVE_TSLIB" = xyes; then -+ AC_MSG_ERROR([tslib must be installed to build the tslib driver. See http://tslib.berlios.de/]) -+ else -+ AC_DEFINE(TSLIB, 1, [Have tslib support]) -+ fi -+ fi -+ -+ if test "x$KDRIVE_KBD" = xyes; then -+ AC_DEFINE(KDRIVE_KBD, 1, [Enable KDrive kbd driver]) -+ fi -+ if test "x$KDRIVE_EVDEV" = xyes; then -+ AC_DEFINE(KDRIVE_EVDEV, 1, [Enable KDrive evdev driver]) -+ fi -+ if test "x$KDRIVE_MOUSE" = xyes; then -+ AC_DEFINE(KDRIVE_MOUSE, 1, [Enable KDrive mouse driver]) -+ fi -+ -+ XEPHYR_REQUIRED_LIBS="x11 $LIBXEXT xau xdmcp" -+ if test "x$XV" = xyes; then -+ XEPHYR_REQUIRED_LIBS="$XEPHYR_REQUIRED_LIBS xv" -+ fi -+ if test "x$DRI" = xyes && test "x$GLX" = xyes; then -+ XEPHYR_REQUIRED_LIBS="$XEPHYR_REQUIRED_LIBS $LIBGL libdrm" -+ fi -+ -+ if test "x$XEPHYR" = xauto; then -+ PKG_CHECK_MODULES(XEPHYR, $XEPHYR_REQUIRED_LIBS, [XEPHYR="yes"], [XEPHYR="no"]) -+ elif test "x$XEPHYR" = xyes ; then -+ PKG_CHECK_MODULES(XEPHYR, $XEPHYR_REQUIRED_LIBS) -+ fi -+ -+ # Xephyr needs nanosleep() which is in librt on Solaris -+ AC_CHECK_FUNC([nanosleep], [], -+ AC_CHECK_LIB([rt], [nanosleep], XEPHYR_LIBS="$XEPHYR_LIBS -lrt")) -+ -+ # damage shadow extension glx (NOTYET) fb mi -+ KDRIVE_INC='-I$(top_srcdir)/hw/kdrive/src' -+ KDRIVE_PURE_INCS="$KDRIVE_INC $MIEXT_SYNC_INC $MIEXT_DAMAGE_INC $MIEXT_SHADOW_INC $XEXT_INC $FB_INC $MI_INC" -+ KDRIVE_OS_INC='-I$(top_srcdir)/hw/kdrive/linux' -+ KDRIVE_INCS="$KDRIVE_PURE_INCS $KDRIVE_OS_INC" -+ -+ KDRIVE_CFLAGS="$XSERVER_CFLAGS -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_LIB='$(top_builddir)/hw/kdrive/src/libkdrive.la' -+ case $host_os in -+ *linux*) -+ KDRIVE_OS_LIB='$(top_builddir)/hw/kdrive/linux/liblinux.la' -+ KDRIVELINUX=yes -+ if test "x$KDRIVE_EVDEV" = xauto; then -+ KDRIVE_EVDEV=yes -+ fi -+ if test "x$KDRIVE_KBD" = xauto; then -+ KDRIVE_KBD=yes -+ fi -+ if test "x$KDRIVE_MOUSE" = xauto; then -+ KDRIVE_MOUSE=yes -+ fi -+ ;; -+ *) -+ if test "x$KDRIVE_EVDEV" = xauto; then -+ KDRIVE_EVDEV=no -+ fi -+ if test "x$KDRIVE_KBD" = xauto; then -+ KDRIVE_KBD=no -+ fi -+ if test "x$KDRIVE_MOUSE" = xauto; then -+ KDRIVE_MOUSE=no -+ fi -+ ;; -+ esac -+ KDRIVE_STUB_LIB='$(top_builddir)/hw/kdrive/src/libkdrivestubs.la' -+ KDRIVE_LOCAL_LIBS="$MAIN_LIB $DIX_LIB $KDRIVE_LIB $KDRIVE_STUB_LIB" -+ KDRIVE_LOCAL_LIBS="$KDRIVE_LOCAL_LIBS $FB_LIB $MI_LIB $KDRIVE_PURE_LIBS" -+ KDRIVE_LOCAL_LIBS="$KDRIVE_LOCAL_LIBS $KDRIVE_OS_LIB" -+ KDRIVE_LIBS="$KDRIVE_LOCAL_LIBS $XSERVER_SYS_LIBS $GLX_SYS_LIBS $DLOPEN_LIBS $TSLIB_LIBS" -+ -+ AC_SUBST([XEPHYR_LIBS]) -+ AC_SUBST([XEPHYR_INCS]) -+fi -+AC_SUBST([KDRIVE_INCS]) -+AC_SUBST([KDRIVE_PURE_INCS]) -+AC_SUBST([KDRIVE_CFLAGS]) -+AC_SUBST([KDRIVE_PURE_LIBS]) -+AC_SUBST([KDRIVE_LOCAL_LIBS]) -+AC_SUBST([KDRIVE_LIBS]) -+AM_CONDITIONAL(KDRIVELINUX, [test "x$KDRIVELINUX" = xyes]) -+AM_CONDITIONAL(KDRIVE_EVDEV, [test "x$KDRIVE_EVDEV" = xyes]) -+AM_CONDITIONAL(KDRIVE_KBD, [test "x$KDRIVE_KBD" = xyes]) -+AM_CONDITIONAL(KDRIVE_MOUSE, [test "x$KDRIVE_MOUSE" = xyes]) -+AM_CONDITIONAL(TSLIB, [test "x$HAVE_TSLIB" = xyes]) -+AM_CONDITIONAL(KDRIVEFBDEV, [test "x$XFBDEV" = xyes]) -+AM_CONDITIONAL(XEPHYR, [test "x$KDRIVE" = xyes && test "x$XEPHYR" = xyes]) -+AM_CONDITIONAL(BUILD_KDRIVEFBDEVLIB, [test "x$KDRIVE" = xyes && test "x$KDRIVEFBDEVLIB" = xyes]) -+AM_CONDITIONAL(XFAKESERVER, [test "x$KDRIVE" = xyes && test "x$XFAKE" = xyes]) -+ -+dnl and the rest of these are generic, so they're in config.h -+dnl -+dnl though, thanks to the passing of some significant amount of time, the -+dnl above is probably a complete fallacy, and you should not rely on it. -+dnl but this is still actually better than imake, honest. -daniels -+ -+AC_TRY_COMPILE([ -+#include -+#ifndef __GLIBC__ -+#error not glibc -+#endif -+], [], [AC_DEFINE(_GNU_SOURCE, 1, -+ [ Enable GNU and other extensions to the C environment for glibc])]) -+ -+AC_DEFINE_DIR(PROJECTROOT, prefix, [Overall prefix]) -+ -+AC_SUBST([RELEASE_DATE]) -+BUILD_DATE="`date +'%Y%m%d'`" -+AC_SUBST([BUILD_DATE]) -+BUILD_TIME="`date +'1%H%M%S'`" -+AC_SUBST([BUILD_TIME]) -+ -+DIX_CFLAGS="-DHAVE_DIX_CONFIG_H $XSERVER_CFLAGS" -+ -+AC_SUBST([DIX_CFLAGS]) -+ -+AC_SUBST([libdir]) -+AC_SUBST([exec_prefix]) -+AC_SUBST([prefix]) -+ -+AC_CONFIG_COMMANDS([sdksyms], [touch hw/xfree86/sdksyms.dep]) -+ -+if test "x$CONFIG_HAL" = xno && test "x$CONFIG_UDEV" = xno; then -+ AC_WARN([ -+ *********************************************** -+ Neither HAL nor udev backend will be enabled. -+ Input device hotplugging will not be available! -+ ***********************************************]) -+fi -+ -+AC_OUTPUT([ -+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 -+]) diff --git a/hw/xfree86/Makefile.am b/hw/xfree86/Makefile.am -index f190b40..09bbc45 100644 +index 59cfb5f..38fb0c1 100644 --- a/hw/xfree86/Makefile.am +++ b/hw/xfree86/Makefile.am @@ -9,6 +9,10 @@ DRI2_SUBDIR = dri2 @@ -2462,12 +114,12 @@ index f190b40..09bbc45 100644 if XF86UTILS XF86UTILS_SUBDIR = utils endif -@@ -19,12 +23,12 @@ endif +@@ -27,12 +31,12 @@ endif - SUBDIRS = common ddc x86emu int10 os-support parser \ + SUBDIRS = common ddc x86emu $(INT10_SUBDIR) os-support parser \ ramdac $(VGAHW_SUBDIR) loader modes $(DRI_SUBDIR) \ -- $(DRI2_SUBDIR) . vbe i2c dixmods \ -+ $(DRI2_SUBDIR) $(WAYLAND_SUBDIR) . vbe i2c dixmods \ +- $(DRI2_SUBDIR) . $(VBE_SUBDIR) i2c dixmods \ ++ $(DRI2_SUBDIR) $(WAYLAND_SUBDIR) . $(VBE_SUBDIR) i2c dixmods \ fbdevhw shadowfb exa $(XF86UTILS_SUBDIR) doc man DIST_SUBDIRS = common ddc i2c x86emu int10 fbdevhw os-support \ @@ -2477,294 +129,11 @@ index f190b40..09bbc45 100644 utils doc man bin_PROGRAMS = Xorg -diff --git a/hw/xfree86/Makefile.am.jx b/hw/xfree86/Makefile.am.jx -new file mode 100644 -index 0000000..58e5d97 ---- /dev/null -+++ b/hw/xfree86/Makefile.am.jx -@@ -0,0 +1,126 @@ -+ -+if DRI -+DRI_SUBDIR = dri -+DRI_LIB = dri/libdri.la -+endif -+ -+if DRI2 -+DRI2_SUBDIR = dri2 -+DRI2_LIB = dri2/libdri2.la -+endif -+ -+if WAYLAND -+WAYLAND_SUBDIR = xwayland -+endif -+ -+if XF86UTILS -+XF86UTILS_SUBDIR = utils -+endif -+ -+if VGAHW -+VGAHW_SUBDIR = vgahw -+endif -+ -+SUBDIRS = common ddc x86emu int10 os-support parser \ -+ ramdac $(VGAHW_SUBDIR) loader modes $(DRI_SUBDIR) \ -+ $(DRI2_SUBDIR) . vbe i2c dixmods \ -+ fbdevhw shadowfb exa $(XF86UTILS_SUBDIR) doc man -+ -+DIST_SUBDIRS = common ddc i2c x86emu int10 fbdevhw os-support \ -+ parser ramdac shadowfb vbe vgahw \ -+ loader dixmods dri dri2 exa modes \ -+ utils doc man -+ -+bin_PROGRAMS = Xorg -+nodist_Xorg_SOURCES = sdksyms.c -+ -+AM_CFLAGS = $(DIX_CFLAGS) @XORG_CFLAGS@ -+INCLUDES = $(XORG_INCS) -I$(srcdir)/parser -I$(top_srcdir)/miext/cw \ -+ -I$(srcdir)/ddc -I$(srcdir)/i2c -I$(srcdir)/modes -I$(srcdir)/ramdac \ -+ -I$(srcdir)/dri -I$(srcdir)/dri2 -+ -+LOCAL_LIBS = \ -+ $(MAIN_LIB) \ -+ $(XSERVER_LIBS) \ -+ loader/libloader.la \ -+ common/libcommon.la \ -+ os-support/libxorgos.la \ -+ parser/libxf86config_internal.la \ -+ dixmods/libdixmods.la \ -+ modes/libxf86modes.la \ -+ ramdac/libramdac.la \ -+ ddc/libddc.la \ -+ i2c/libi2c.la \ -+ $(XORG_LIBS) \ -+ dixmods/libxorgxkb.la \ -+ $(DRI_LIB) \ -+ $(DRI2_LIB) \ -+ $(top_builddir)/mi/libmi.la \ -+ $(top_builddir)/os/libos.la -+Xorg_LDADD = \ -+ $(LOCAL_LIBS) \ -+ $(XORG_SYS_LIBS) \ -+ $(XSERVER_SYS_LIBS) -+Xorg_DEPENDENCIES = $(LOCAL_LIBS) -+ -+Xorg_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) -+ -+BUILT_SOURCES = xorg.conf.example -+DISTCLEANFILES = xorg.conf.example -+EXTRA_DIST = xorgconf.cpp -+ -+if SOLARIS_ASM_INLINE -+# Needs to be built before any files are compiled when using Sun compilers -+# so in*/out* inline definitions are properly processed. -+ -+BUILT_SOURCES += os-support/solaris/solaris-@SOLARIS_INOUT_ARCH@.il -+ -+os-support/solaris/solaris-@SOLARIS_INOUT_ARCH@.il: -+ cd os-support/solaris ; \ -+ $(MAKE) $(AM_MAKEFLAGS) solaris-@SOLARIS_INOUT_ARCH@.il -+endif -+ -+# do not use $(mkdir_p) if you want automake 1.7 to work -+install-data-local: -+ mkdir -p $(DESTDIR)$(logdir) -+ -+ -+install-exec-local: install-binPROGRAMS -+ (cd $(DESTDIR)$(bindir) && rm -f X && ln -s Xorg X) -+if INSTALL_SETUID -+ chown root $(DESTDIR)$(bindir)/Xorg -+ chmod u+s $(DESTDIR)$(bindir)/Xorg -+endif -+if CYGWIN -+ $(INSTALL_DATA) libXorg.exe.a $(DESTDIR)$(libdir)/libXorg.exe.a -+endif -+ -+# Use variables from XORG_MANPAGE_SECTIONS and X Server configuration -+# Do not include manpages.am as values are not appropriate for rc files -+CONF_SUBSTS = -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g' \ -+ -e 's|MODULEPATH|$(DEFAULT_MODULE_PATH)|g' \ -+ -e 's|DEFAULTFONTPATH|$(COMPILEDDEFAULTFONTPATH)|g' -+ -+xorg.conf.example: xorgconf.cpp -+ $(AM_V_GEN)$(SED) $(CONF_SUBSTS) < $(srcdir)/xorgconf.cpp > $@ -+ -+relink: -+ $(AM_V_at)rm -f Xorg$(EXEEXT) && $(MAKE) Xorg$(EXEEXT) -+ -+CLEANFILES = sdksyms.c sdksyms.dep -+EXTRA_DIST += sdksyms.sh -+ -+sdksyms.dep sdksyms.c: sdksyms.sh -+ $(AM_V_GEN)CPP='$(CPP)' AWK='$(AWK)' $(SHELL) $(srcdir)/sdksyms.sh $(top_srcdir) $(CFLAGS) $(AM_CFLAGS) $(INCLUDES) -+ -+SDKSYMS_DEP = sdksyms.dep -+include $(SDKSYMS_DEP) -+ -+i2c/libi2c.la: -+ $(AM_V_at)cd i2c && $(MAKE) libi2c.la -+ -+dixmods/libdixmods.la: -+ $(AM_V_at)cd dixmods && $(MAKE) libdixmods.la -+ -+dixmods/libxorgxkb.la: -+ $(AM_V_at)cd dixmods && $(MAKE) libxorgxkb.la -diff --git a/hw/xfree86/Makefile.am.orig b/hw/xfree86/Makefile.am.orig -new file mode 100644 -index 0000000..f190b40 ---- /dev/null -+++ b/hw/xfree86/Makefile.am.orig -@@ -0,0 +1,122 @@ -+ -+if DRI -+DRI_SUBDIR = dri -+DRI_LIB = dri/libdri.la -+endif -+ -+if DRI2 -+DRI2_SUBDIR = dri2 -+DRI2_LIB = dri2/libdri2.la -+endif -+ -+if XF86UTILS -+XF86UTILS_SUBDIR = utils -+endif -+ -+if VGAHW -+VGAHW_SUBDIR = vgahw -+endif -+ -+SUBDIRS = common ddc x86emu int10 os-support parser \ -+ ramdac $(VGAHW_SUBDIR) loader modes $(DRI_SUBDIR) \ -+ $(DRI2_SUBDIR) . vbe i2c dixmods \ -+ fbdevhw shadowfb exa $(XF86UTILS_SUBDIR) doc man -+ -+DIST_SUBDIRS = common ddc i2c x86emu int10 fbdevhw os-support \ -+ parser ramdac shadowfb vbe vgahw \ -+ loader dixmods dri dri2 exa modes \ -+ utils doc man -+ -+bin_PROGRAMS = Xorg -+nodist_Xorg_SOURCES = sdksyms.c -+ -+AM_CFLAGS = $(DIX_CFLAGS) @XORG_CFLAGS@ -+INCLUDES = $(XORG_INCS) -I$(srcdir)/parser -I$(top_srcdir)/miext/cw \ -+ -I$(srcdir)/ddc -I$(srcdir)/i2c -I$(srcdir)/modes -I$(srcdir)/ramdac \ -+ -I$(srcdir)/dri -I$(srcdir)/dri2 -+ -+LOCAL_LIBS = \ -+ $(MAIN_LIB) \ -+ $(XSERVER_LIBS) \ -+ loader/libloader.la \ -+ common/libcommon.la \ -+ os-support/libxorgos.la \ -+ parser/libxf86config_internal.la \ -+ dixmods/libdixmods.la \ -+ modes/libxf86modes.la \ -+ ramdac/libramdac.la \ -+ ddc/libddc.la \ -+ i2c/libi2c.la \ -+ $(XORG_LIBS) \ -+ dixmods/libxorgxkb.la \ -+ $(DRI_LIB) \ -+ $(DRI2_LIB) \ -+ $(top_builddir)/mi/libmi.la \ -+ $(top_builddir)/os/libos.la -+Xorg_LDADD = \ -+ $(LOCAL_LIBS) \ -+ $(XORG_SYS_LIBS) \ -+ $(XSERVER_SYS_LIBS) -+Xorg_DEPENDENCIES = $(LOCAL_LIBS) -+ -+Xorg_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) -+ -+BUILT_SOURCES = xorg.conf.example -+DISTCLEANFILES = xorg.conf.example -+EXTRA_DIST = xorgconf.cpp -+ -+if SOLARIS_ASM_INLINE -+# Needs to be built before any files are compiled when using Sun compilers -+# so in*/out* inline definitions are properly processed. -+ -+BUILT_SOURCES += os-support/solaris/solaris-@SOLARIS_INOUT_ARCH@.il -+ -+os-support/solaris/solaris-@SOLARIS_INOUT_ARCH@.il: -+ cd os-support/solaris ; \ -+ $(MAKE) $(AM_MAKEFLAGS) solaris-@SOLARIS_INOUT_ARCH@.il -+endif -+ -+# do not use $(mkdir_p) if you want automake 1.7 to work -+install-data-local: -+ mkdir -p $(DESTDIR)$(logdir) -+ -+ -+install-exec-local: install-binPROGRAMS -+ (cd $(DESTDIR)$(bindir) && rm -f X && ln -s Xorg X) -+if INSTALL_SETUID -+ chown root $(DESTDIR)$(bindir)/Xorg -+ chmod u+s $(DESTDIR)$(bindir)/Xorg -+endif -+if CYGWIN -+ $(INSTALL_DATA) libXorg.exe.a $(DESTDIR)$(libdir)/libXorg.exe.a -+endif -+ -+# Use variables from XORG_MANPAGE_SECTIONS and X Server configuration -+# Do not include manpages.am as values are not appropriate for rc files -+CONF_SUBSTS = -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g' \ -+ -e 's|MODULEPATH|$(DEFAULT_MODULE_PATH)|g' \ -+ -e 's|DEFAULTFONTPATH|$(COMPILEDDEFAULTFONTPATH)|g' -+ -+xorg.conf.example: xorgconf.cpp -+ $(AM_V_GEN)$(SED) $(CONF_SUBSTS) < $(srcdir)/xorgconf.cpp > $@ -+ -+relink: -+ $(AM_V_at)rm -f Xorg$(EXEEXT) && $(MAKE) Xorg$(EXEEXT) -+ -+CLEANFILES = sdksyms.c sdksyms.dep -+EXTRA_DIST += sdksyms.sh -+ -+sdksyms.dep sdksyms.c: sdksyms.sh -+ $(AM_V_GEN)CPP='$(CPP)' AWK='$(AWK)' $(SHELL) $(srcdir)/sdksyms.sh $(top_srcdir) $(CFLAGS) $(AM_CFLAGS) $(INCLUDES) -+ -+SDKSYMS_DEP = sdksyms.dep -+include $(SDKSYMS_DEP) -+ -+i2c/libi2c.la: -+ $(AM_V_at)cd i2c && $(MAKE) libi2c.la -+ -+dixmods/libdixmods.la: -+ $(AM_V_at)cd dixmods && $(MAKE) libdixmods.la -+ -+dixmods/libxorgxkb.la: -+ $(AM_V_at)cd dixmods && $(MAKE) libxorgxkb.la -diff --git a/hw/xfree86/Makefile.am.rej b/hw/xfree86/Makefile.am.rej -new file mode 100644 -index 0000000..1e1e7ab ---- /dev/null -+++ b/hw/xfree86/Makefile.am.rej -@@ -0,0 +1,17 @@ -+--- hw/xfree86/Makefile.am -++++ hw/xfree86/Makefile.am -+@@ -31,12 +35,12 @@ -+ -+ SUBDIRS = common ddc x86emu $(INT10_SUBDIR) os-support parser \ -+ ramdac $(VGAHW_SUBDIR) loader modes $(DRI_SUBDIR) \ -+- $(DRI2_SUBDIR) . $(VBE_SUBDIR) i2c dixmods \ -++ $(DRI2_SUBDIR) $(WAYLAND_SUBDIR) . $(VBE_SUBDIR) i2c dixmods \ -+ fbdevhw shadowfb exa $(XF86UTILS_SUBDIR) doc man -+ -+ DIST_SUBDIRS = common ddc i2c x86emu int10 fbdevhw os-support \ -+ parser ramdac shadowfb vbe vgahw \ -+- loader dixmods dri dri2 exa modes \ -++ loader dixmods dri dri2 exa modes xwayland \ -+ utils doc man -+ -+ bin_PROGRAMS = Xorg diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c -index 486752b..55f9883 100644 +index 74d5ed3..39cd58c 100644 --- a/hw/xfree86/common/xf86Config.c +++ b/hw/xfree86/common/xf86Config.c -@@ -117,7 +117,8 @@ static ModuleDefault ModuleDefaults[] = { +@@ -118,7 +118,8 @@ static ModuleDefault ModuleDefaults[] = { {.name = "fb",.toLoad = TRUE,.load_opt = NULL}, {.name = "shadow",.toLoad = TRUE,.load_opt = NULL}, #endif @@ -2772,12 +141,12 @@ index 486752b..55f9883 100644 + {.name = "xwayland",.toLoad = FALSE,.load_opt=NULL}, + {.name = NULL,.toLoad = FALSE,.load_opt=NULL} }; - + /* Forward declarations */ -@@ -259,6 +260,17 @@ xf86ModulelistFromConfig(pointer **optlist) +@@ -260,6 +261,17 @@ xf86ModulelistFromConfig(pointer **optlist) return NULL; } - + + /* + * Set the xwayland module to autoload if requested. + */ @@ -2792,7 +161,7 @@ index 486752b..55f9883 100644 if (xf86configptr->conf_modules) { /* Walk the disable list and let people know what we've parsed to * not be loaded -@@ -862,6 +874,13 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) +@@ -863,6 +875,13 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) } xf86Msg(from, "%sutomatically adding GPU devices\n", xf86Info.autoAddGPU ? "A" : "Not a"); @@ -2806,7 +175,7 @@ index 486752b..55f9883 100644 /* * Set things up based on the config file information. Some of these * settings may be overridden later when the command line options are -@@ -952,9 +971,10 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) +@@ -953,9 +972,10 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) } #endif @@ -2831,10 +200,10 @@ index 7df7a80..b41d2cc 100644 +Bool xorgWayland = FALSE; +Bool xorgRootless = FALSE; diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c -index f95eec5..629d892 100644 +index 91ec4c8..98adaab 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c -@@ -556,6 +556,13 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv) +@@ -546,6 +546,13 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv) if (!(flags & HW_SKIP_CONSOLE)) xorgHWOpenConsole = TRUE; @@ -2848,7 +217,7 @@ index f95eec5..629d892 100644 } if (xorgHWOpenConsole) -@@ -969,6 +976,9 @@ InitInput(int argc, char **argv) +@@ -957,6 +964,9 @@ InitInput(int argc, char **argv) mieqInit(); @@ -2858,7 +227,7 @@ index f95eec5..629d892 100644 /* Initialize all configured input devices */ for (pInfo = xf86ConfigLayout.inputs; pInfo && *pInfo; pInfo++) { (*pInfo)->options = -@@ -1467,6 +1477,16 @@ ddxProcessArgument(int argc, char **argv, int i) +@@ -1455,6 +1465,16 @@ ddxProcessArgument(int argc, char **argv, int i) return 1; } @@ -2875,1668 +244,6 @@ index f95eec5..629d892 100644 /* OS-specific processing */ return xf86ProcessArgument(argc, argv, i); } -diff --git a/hw/xfree86/common/xf86Init.c.orig b/hw/xfree86/common/xf86Init.c.orig -new file mode 100644 -index 0000000..f95eec5 ---- /dev/null -+++ b/hw/xfree86/common/xf86Init.c.orig -@@ -0,0 +1,1656 @@ -+/* -+ * Loosely based on code bearing the following copyright: -+ * -+ * Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany. -+ */ -+/* -+ * Copyright (c) 1992-2003 by The XFree86 Project, Inc. -+ * -+ * Permission is hereby granted, free of charge, to any person obtaining a -+ * copy of this software and associated documentation files (the "Software"), -+ * to deal in the Software without restriction, including without limitation -+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, -+ * and/or sell copies of the Software, and to permit persons to whom the -+ * Software is furnished to do so, subject to the following conditions: -+ * -+ * The above copyright notice and this permission notice shall be included in -+ * all copies or substantial portions of the Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR -+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -+ * OTHER DEALINGS IN THE SOFTWARE. -+ * -+ * Except as contained in this notice, the name of the copyright holder(s) -+ * and author(s) shall not be used in advertising or otherwise to promote -+ * the sale, use or other dealings in this Software without prior written -+ * authorization from the copyright holder(s) and author(s). -+ */ -+ -+#ifdef HAVE_XORG_CONFIG_H -+#include -+#endif -+ -+#include -+#include -+ -+#undef HAS_UTSNAME -+#if !defined(WIN32) -+#define HAS_UTSNAME 1 -+#include -+#endif -+ -+#include -+#include -+#include -+#include -+#include "input.h" -+#include "servermd.h" -+#include "windowstr.h" -+#include "scrnintstr.h" -+#include "site.h" -+#include "mi.h" -+ -+#include "compiler.h" -+ -+#include "loaderProcs.h" -+#ifdef XFreeXDGA -+#include "dgaproc.h" -+#endif -+ -+#define XF86_OS_PRIVS -+#include "xf86.h" -+#include "xf86Priv.h" -+#include "xf86Config.h" -+#include "xf86_OSlib.h" -+#include "xf86cmap.h" -+#include "xorgVersion.h" -+#include "xf86Build.h" -+#include "mipointer.h" -+#include -+#include -+#include "xf86DDC.h" -+#include "xf86Xinput.h" -+#include "xf86InPriv.h" -+#include "picturestr.h" -+ -+#include "xf86Bus.h" -+#ifdef XSERVER_LIBPCIACCESS -+#include "xf86VGAarbiter.h" -+#endif -+#include "globals.h" -+#include "xserver-properties.h" -+ -+#ifdef DPMSExtension -+#include -+#include "dpmsproc.h" -+#endif -+#include -+ -+#ifdef XF86PM -+void (*xf86OSPMClose) (void) = NULL; -+#endif -+static Bool xorgHWOpenConsole = FALSE; -+ -+/* Common pixmap formats */ -+ -+static PixmapFormatRec formats[MAXFORMATS] = { -+ {1, 1, BITMAP_SCANLINE_PAD}, -+ {4, 8, BITMAP_SCANLINE_PAD}, -+ {8, 8, BITMAP_SCANLINE_PAD}, -+ {15, 16, BITMAP_SCANLINE_PAD}, -+ {16, 16, BITMAP_SCANLINE_PAD}, -+ {24, 32, BITMAP_SCANLINE_PAD}, -+ {32, 32, BITMAP_SCANLINE_PAD}, -+}; -+ -+static int numFormats = 7; -+static Bool formatsDone = FALSE; -+ -+#ifndef OSNAME -+#define OSNAME " unknown" -+#endif -+#ifndef OSVENDOR -+#define OSVENDOR "" -+#endif -+#ifndef PRE_RELEASE -+#define PRE_RELEASE XORG_VERSION_SNAP -+#endif -+ -+static void -+xf86PrintBanner(void) -+{ -+#if PRE_RELEASE -+ xf86ErrorFVerb(0, "\n" -+ "This is a pre-release version of the X server from " -+ XVENDORNAME ".\n" "It is not supported in any way.\n" -+ "Bugs may be filed in the bugzilla at http://bugs.freedesktop.org/.\n" -+ "Select the \"xorg\" product for bugs you find in this release.\n" -+ "Before reporting bugs in pre-release versions please check the\n" -+ "latest version in the X.Org Foundation git repository.\n" -+ "See http://wiki.x.org/wiki/GitPage for git access instructions.\n"); -+#endif -+ xf86ErrorFVerb(0, "\nX.Org X Server %d.%d.%d", -+ XORG_VERSION_MAJOR, XORG_VERSION_MINOR, XORG_VERSION_PATCH); -+#if XORG_VERSION_SNAP > 0 -+ xf86ErrorFVerb(0, ".%d", XORG_VERSION_SNAP); -+#endif -+ -+#if XORG_VERSION_SNAP >= 900 -+ /* When the minor number is 99, that signifies that the we are making -+ * a release candidate for a major version. (X.0.0) -+ * When the patch number is 99, that signifies that the we are making -+ * a release candidate for a minor version. (X.Y.0) -+ * When the patch number is < 99, then we are making a release -+ * candidate for the next point release. (X.Y.Z) -+ */ -+#if XORG_VERSION_MINOR >= 99 -+ xf86ErrorFVerb(0, " (%d.0.0 RC %d)", XORG_VERSION_MAJOR + 1, -+ XORG_VERSION_SNAP - 900); -+#elif XORG_VERSION_PATCH == 99 -+ xf86ErrorFVerb(0, " (%d.%d.0 RC %d)", XORG_VERSION_MAJOR, -+ XORG_VERSION_MINOR + 1, XORG_VERSION_SNAP - 900); -+#else -+ xf86ErrorFVerb(0, " (%d.%d.%d RC %d)", XORG_VERSION_MAJOR, -+ XORG_VERSION_MINOR, XORG_VERSION_PATCH + 1, -+ XORG_VERSION_SNAP - 900); -+#endif -+#endif -+ -+#ifdef XORG_CUSTOM_VERSION -+ xf86ErrorFVerb(0, " (%s)", XORG_CUSTOM_VERSION); -+#endif -+#ifndef XORG_DATE -+#define XORG_DATE "Unknown" -+#endif -+ xf86ErrorFVerb(0, "\nRelease Date: %s\n", XORG_DATE); -+ xf86ErrorFVerb(0, "X Protocol Version %d, Revision %d\n", -+ X_PROTOCOL, X_PROTOCOL_REVISION); -+ xf86ErrorFVerb(0, "Build Operating System: %s %s\n", OSNAME, OSVENDOR); -+#ifdef HAS_UTSNAME -+ { -+ struct utsname name; -+ -+ /* Linux & BSD state that 0 is success, SysV (including Solaris, HP-UX, -+ and Irix) and Single Unix Spec 3 just say that non-negative is success. -+ All agree that failure is represented by a negative number. -+ */ -+ if (uname(&name) >= 0) { -+ xf86ErrorFVerb(0, "Current Operating System: %s %s %s %s %s\n", -+ name.sysname, name.nodename, name.release, -+ name.version, name.machine); -+#ifdef linux -+ do { -+ char buf[80]; -+ int fd = open("/proc/cmdline", O_RDONLY); -+ -+ if (fd != -1) { -+ xf86ErrorFVerb(0, "Kernel command line: "); -+ memset(buf, 0, 80); -+ while (read(fd, buf, 80) > 0) { -+ xf86ErrorFVerb(0, "%.80s", buf); -+ memset(buf, 0, 80); -+ } -+ close(fd); -+ } -+ } while (0); -+#endif -+ } -+ } -+#endif -+#if defined(BUILD_DATE) && (BUILD_DATE > 19000000) -+ { -+ struct tm t; -+ char buf[100]; -+ -+ memset(&t, 0, sizeof(t)); -+ memset(buf, 0, sizeof(buf)); -+ t.tm_mday = BUILD_DATE % 100; -+ t.tm_mon = (BUILD_DATE / 100) % 100 - 1; -+ t.tm_year = BUILD_DATE / 10000 - 1900; -+#if defined(BUILD_TIME) -+ t.tm_sec = BUILD_TIME % 100; -+ t.tm_min = (BUILD_TIME / 100) % 100; -+ t.tm_hour = (BUILD_TIME / 10000) % 100; -+ if (strftime(buf, sizeof(buf), "%d %B %Y %I:%M:%S%p", &t)) -+ xf86ErrorFVerb(0, "Build Date: %s\n", buf); -+#else -+ if (strftime(buf, sizeof(buf), "%d %B %Y", &t)) -+ xf86ErrorFVerb(0, "Build Date: %s\n", buf); -+#endif -+ } -+#endif -+#if defined(BUILDERSTRING) -+ xf86ErrorFVerb(0, "%s \n", BUILDERSTRING); -+#endif -+ xf86ErrorFVerb(0, "Current version of pixman: %s\n", -+ pixman_version_string()); -+ xf86ErrorFVerb(0, "\tBefore reporting problems, check " -+ "" __VENDORDWEBSUPPORT__ "\n" -+ "\tto make sure that you have the latest version.\n"); -+} -+ -+static void -+xf86PrintMarkers(void) -+{ -+ LogPrintMarkers(); -+} -+ -+Bool -+xf86PrivsElevated(void) -+{ -+ static Bool privsTested = FALSE; -+ static Bool privsElevated = TRUE; -+ -+ if (!privsTested) { -+#if defined(WIN32) -+ privsElevated = FALSE; -+#else -+ if ((getuid() != geteuid()) || (getgid() != getegid())) { -+ privsElevated = TRUE; -+ } -+ else { -+#if defined(HAVE_ISSETUGID) -+ privsElevated = issetugid(); -+#elif defined(HAVE_GETRESUID) -+ uid_t ruid, euid, suid; -+ gid_t rgid, egid, sgid; -+ -+ if ((getresuid(&ruid, &euid, &suid) == 0) && -+ (getresgid(&rgid, &egid, &sgid) == 0)) { -+ privsElevated = (euid != suid) || (egid != sgid); -+ } -+ else { -+ printf("Failed getresuid or getresgid"); -+ /* Something went wrong, make defensive assumption */ -+ privsElevated = TRUE; -+ } -+#else -+ if (getuid() == 0) { -+ /* running as root: uid==euid==0 */ -+ privsElevated = FALSE; -+ } -+ else { -+ /* -+ * If there are saved ID's the process might still be privileged -+ * even though the above test succeeded. If issetugid() and -+ * getresgid() aren't available, test this by trying to set -+ * euid to 0. -+ */ -+ unsigned int oldeuid; -+ -+ oldeuid = geteuid(); -+ -+ if (seteuid(0) != 0) { -+ privsElevated = FALSE; -+ } -+ else { -+ if (seteuid(oldeuid) != 0) { -+ FatalError("Failed to drop privileges. Exiting\n"); -+ } -+ privsElevated = TRUE; -+ } -+ } -+#endif -+ } -+#endif -+ privsTested = TRUE; -+ } -+ return privsElevated; -+} -+ -+static Bool -+xf86CreateRootWindow(WindowPtr pWin) -+{ -+ int ret = TRUE; -+ int err = Success; -+ ScreenPtr pScreen = pWin->drawable.pScreen; -+ RootWinPropPtr pProp; -+ CreateWindowProcPtr CreateWindow = (CreateWindowProcPtr) -+ dixLookupPrivate(&pScreen->devPrivates, xf86CreateRootWindowKey); -+ -+ DebugF("xf86CreateRootWindow(%p)\n", pWin); -+ -+ if (pScreen->CreateWindow != xf86CreateRootWindow) { -+ /* Can't find hook we are hung on */ -+ xf86DrvMsg(pScreen->myNum, X_WARNING /* X_ERROR */ , -+ "xf86CreateRootWindow %p called when not in pScreen->CreateWindow %p n", -+ (void *) xf86CreateRootWindow, -+ (void *) pScreen->CreateWindow); -+ } -+ -+ /* Unhook this function ... */ -+ pScreen->CreateWindow = CreateWindow; -+ dixSetPrivate(&pScreen->devPrivates, xf86CreateRootWindowKey, NULL); -+ -+ /* ... and call the previous CreateWindow fuction, if any */ -+ if (NULL != pScreen->CreateWindow) { -+ ret = (*pScreen->CreateWindow) (pWin); -+ } -+ -+ /* Now do our stuff */ -+ if (xf86RegisteredPropertiesTable != NULL) { -+ if (pWin->parent == NULL && xf86RegisteredPropertiesTable != NULL) { -+ for (pProp = xf86RegisteredPropertiesTable[pScreen->myNum]; -+ pProp != NULL && err == Success; pProp = pProp->next) { -+ Atom prop; -+ -+ prop = MakeAtom(pProp->name, strlen(pProp->name), TRUE); -+ err = dixChangeWindowProperty(serverClient, pWin, -+ prop, pProp->type, -+ pProp->format, PropModeReplace, -+ pProp->size, pProp->data, FALSE); -+ } -+ -+ /* Look at err */ -+ ret &= (err == Success); -+ -+ } -+ else { -+ xf86Msg(X_ERROR, "xf86CreateRootWindow unexpectedly called with " -+ "non-root window %p (parent %p)\n", -+ (void *) pWin, (void *) pWin->parent); -+ ret = FALSE; -+ } -+ } -+ -+ DebugF("xf86CreateRootWindow() returns %d\n", ret); -+ return ret; -+} -+ -+extern void xf86AutoConfigOutputDevice(ScrnInfoPtr pScrn, ScrnInfoPtr master); -+static void -+xf86AutoConfigOutputDevices(void) -+{ -+ int i; -+ -+ for (i = 0; i < xf86NumGPUScreens; i++) -+ xf86AutoConfigOutputDevice(xf86GPUScreens[i], xf86Screens[0]); -+} -+ -+static void -+InstallSignalHandlers(void) -+{ -+ /* -+ * Install signal handler for unexpected signals -+ */ -+ xf86Info.caughtSignal = FALSE; -+ if (!xf86Info.notrapSignals) { -+ OsRegisterSigWrapper(xf86SigWrapper); -+ } -+ else { -+ signal(SIGSEGV, SIG_DFL); -+ signal(SIGILL, SIG_DFL); -+#ifdef SIGEMT -+ signal(SIGEMT, SIG_DFL); -+#endif -+ signal(SIGFPE, SIG_DFL); -+ signal(SIGBUS, SIG_DFL); -+ signal(SIGSYS, SIG_DFL); -+ signal(SIGXCPU, SIG_DFL); -+ signal(SIGXFSZ, SIG_DFL); -+ } -+} -+ -+/* -+ * InitOutput -- -+ * Initialize screenInfo for all actually accessible framebuffers. -+ * That includes vt-manager setup, querying all possible devices and -+ * collecting the pixmap formats. -+ */ -+void -+InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv) -+{ -+ int i, j, k, scr_index; -+ char **modulelist; -+ pointer *optionlist; -+ Pix24Flags screenpix24, pix24; -+ MessageType pix24From = X_DEFAULT; -+ Bool pix24Fail = FALSE; -+ Bool autoconfig = FALSE; -+ Bool sigio_blocked = FALSE; -+ Bool want_hw_access = FALSE; -+ GDevPtr configured_device; -+ -+ xf86Initialising = TRUE; -+ -+ config_pre_init(); -+ -+ if (serverGeneration == 1) { -+ if ((xf86ServerName = strrchr(argv[0], '/')) != 0) -+ xf86ServerName++; -+ else -+ xf86ServerName = argv[0]; -+ -+ xf86PrintBanner(); -+ xf86PrintMarkers(); -+ if (xf86LogFile) { -+ time_t t; -+ const char *ct; -+ -+ t = time(NULL); -+ ct = ctime(&t); -+ xf86MsgVerb(xf86LogFileFrom, 0, "Log file: \"%s\", Time: %s", -+ xf86LogFile, ct); -+ } -+ -+ /* Read and parse the config file */ -+ if (!xf86DoConfigure && !xf86DoShowOptions) { -+ switch (xf86HandleConfigFile(FALSE)) { -+ case CONFIG_OK: -+ break; -+ case CONFIG_PARSE_ERROR: -+ xf86Msg(X_ERROR, "Error parsing the config file\n"); -+ return; -+ case CONFIG_NOFILE: -+ autoconfig = TRUE; -+ break; -+ } -+ } -+ -+ InstallSignalHandlers(); -+ -+ /* Initialise the loader */ -+ LoaderInit(); -+ -+ /* Tell the loader the default module search path */ -+ LoaderSetPath(xf86ModulePath); -+ -+ if (xf86Info.ignoreABI) { -+ LoaderSetOptions(LDR_OPT_ABI_MISMATCH_NONFATAL); -+ } -+ -+ if (xf86DoShowOptions) -+ DoShowOptions(); -+ -+ /* Do a general bus probe. This will be a PCI probe for x86 platforms */ -+ xf86BusProbe(); -+ -+ if (xf86DoConfigure) -+ DoConfigure(); -+ -+ if (autoconfig) { -+ if (!xf86AutoConfig()) { -+ xf86Msg(X_ERROR, "Auto configuration failed\n"); -+ return; -+ } -+ } -+ -+#ifdef XF86PM -+ xf86OSPMClose = xf86OSPMOpen(); -+#endif -+ -+ xf86ExtensionInit(); -+ -+ /* Load all modules specified explicitly in the config file */ -+ if ((modulelist = xf86ModulelistFromConfig(&optionlist))) { -+ xf86LoadModules(modulelist, optionlist); -+ free(modulelist); -+ free(optionlist); -+ } -+ -+ /* Load all driver modules specified in the config file */ -+ /* If there aren't any specified in the config file, autoconfig them */ -+ /* FIXME: Does not handle multiple active screen sections, but I'm not -+ * sure if we really want to handle that case*/ -+ configured_device = xf86ConfigLayout.screens->screen->device; -+ if ((!configured_device) || (!configured_device->driver)) { -+ if (!autoConfigDevice(configured_device)) { -+ xf86Msg(X_ERROR, "Automatic driver configuration failed\n"); -+ return; -+ } -+ } -+ if ((modulelist = xf86DriverlistFromConfig())) { -+ xf86LoadModules(modulelist, NULL); -+ free(modulelist); -+ } -+ -+ /* Load all input driver modules specified in the config file. */ -+ if ((modulelist = xf86InputDriverlistFromConfig())) { -+ xf86LoadModules(modulelist, NULL); -+ free(modulelist); -+ } -+ -+ /* -+ * It is expected that xf86AddDriver()/xf86AddInputDriver will be -+ * called for each driver as it is loaded. Those functions save the -+ * module pointers for drivers. -+ * XXX Nothing keeps track of them for other modules. -+ */ -+ /* XXX What do we do if not all of these could be loaded? */ -+ -+ /* -+ * At this point, xf86DriverList[] is all filled in with entries for -+ * each of the drivers to try and xf86NumDrivers has the number of -+ * drivers. If there are none, return now. -+ */ -+ -+ if (xf86NumDrivers == 0) { -+ xf86Msg(X_ERROR, "No drivers available.\n"); -+ return; -+ } -+ -+ /* -+ * Call each of the Identify functions and call the driverFunc to check -+ * if HW access is required. The Identify functions print out some -+ * identifying information, and anything else that might be -+ * needed at this early stage. -+ */ -+ -+ for (i = 0; i < xf86NumDrivers; i++) { -+ xorgHWFlags flags = HW_IO; -+ -+ if (xf86DriverList[i]->Identify != NULL) -+ xf86DriverList[i]->Identify(0); -+ -+ if (xf86DriverList[i]->driverFunc) -+ xf86DriverList[i]->driverFunc(NULL, -+ GET_REQUIRED_HW_INTERFACES, -+ &flags); -+ -+ if (NEED_IO_ENABLED(flags)) -+ want_hw_access = TRUE; -+ -+ if (!(flags & HW_SKIP_CONSOLE)) -+ xorgHWOpenConsole = TRUE; -+ } -+ -+ if (xorgHWOpenConsole) -+ xf86OpenConsole(); -+ else -+ xf86Info.dontVTSwitch = TRUE; -+ -+ /* Enable full I/O access */ -+ if (want_hw_access) -+ xorgHWAccess = xf86EnableIO(); -+ -+ if (xf86BusConfig() == FALSE) -+ return; -+ -+ xf86PostProbe(); -+ -+ /* -+ * Sort the drivers to match the requested ording. Using a slow -+ * bubble sort. -+ */ -+ for (j = 0; j < xf86NumScreens - 1; j++) { -+ for (i = 0; i < xf86NumScreens - j - 1; i++) { -+ if (xf86Screens[i + 1]->confScreen->screennum < -+ xf86Screens[i]->confScreen->screennum) { -+ ScrnInfoPtr tmpScrn = xf86Screens[i + 1]; -+ -+ xf86Screens[i + 1] = xf86Screens[i]; -+ xf86Screens[i] = tmpScrn; -+ } -+ } -+ } -+ /* Fix up the indexes */ -+ for (i = 0; i < xf86NumScreens; i++) { -+ xf86Screens[i]->scrnIndex = i; -+ } -+ -+ /* -+ * Call the driver's PreInit()'s to complete initialisation for the first -+ * generation. -+ */ -+ -+ for (i = 0; i < xf86NumScreens; i++) { -+ xf86VGAarbiterScrnInit(xf86Screens[i]); -+ xf86VGAarbiterLock(xf86Screens[i]); -+ if (xf86Screens[i]->PreInit && -+ xf86Screens[i]->PreInit(xf86Screens[i], 0)) -+ xf86Screens[i]->configured = TRUE; -+ xf86VGAarbiterUnlock(xf86Screens[i]); -+ } -+ for (i = 0; i < xf86NumScreens; i++) -+ if (!xf86Screens[i]->configured) -+ xf86DeleteScreen(xf86Screens[i--]); -+ -+ for (i = 0; i < xf86NumGPUScreens; i++) { -+ xf86VGAarbiterScrnInit(xf86GPUScreens[i]); -+ xf86VGAarbiterLock(xf86GPUScreens[i]); -+ if (xf86GPUScreens[i]->PreInit && -+ xf86GPUScreens[i]->PreInit(xf86GPUScreens[i], 0)) -+ xf86GPUScreens[i]->configured = TRUE; -+ xf86VGAarbiterUnlock(xf86GPUScreens[i]); -+ } -+ for (i = 0; i < xf86NumGPUScreens; i++) -+ if (!xf86GPUScreens[i]->configured) -+ xf86DeleteScreen(xf86GPUScreens[i--]); -+ -+ /* -+ * If no screens left, return now. -+ */ -+ -+ if (xf86NumScreens == 0) { -+ xf86Msg(X_ERROR, -+ "Screen(s) found, but none have a usable configuration.\n"); -+ return; -+ } -+ -+ for (i = 0; i < xf86NumScreens; i++) { -+ if (xf86Screens[i]->name == NULL) { -+ XNFasprintf(&xf86Screens[i]->name, "screen%d", i); -+ xf86MsgVerb(X_WARNING, 0, -+ "Screen driver %d has no name set, using `%s'.\n", -+ i, xf86Screens[i]->name); -+ } -+ } -+ -+ /* Remove (unload) drivers that are not required */ -+ for (i = 0; i < xf86NumDrivers; i++) -+ if (xf86DriverList[i] && xf86DriverList[i]->refCount <= 0) -+ xf86DeleteDriver(i); -+ -+ /* -+ * At this stage we know how many screens there are. -+ */ -+ -+ for (i = 0; i < xf86NumScreens; i++) -+ xf86InitViewport(xf86Screens[i]); -+ -+ /* -+ * Collect all pixmap formats and check for conflicts at the display -+ * level. Should we die here? Or just delete the offending screens? -+ */ -+ screenpix24 = Pix24DontCare; -+ for (i = 0; i < xf86NumScreens; i++) { -+ if (xf86Screens[i]->imageByteOrder != -+ xf86Screens[0]->imageByteOrder) -+ FatalError("Inconsistent display bitmapBitOrder. Exiting\n"); -+ if (xf86Screens[i]->bitmapScanlinePad != -+ xf86Screens[0]->bitmapScanlinePad) -+ FatalError -+ ("Inconsistent display bitmapScanlinePad. Exiting\n"); -+ if (xf86Screens[i]->bitmapScanlineUnit != -+ xf86Screens[0]->bitmapScanlineUnit) -+ FatalError -+ ("Inconsistent display bitmapScanlineUnit. Exiting\n"); -+ if (xf86Screens[i]->bitmapBitOrder != -+ xf86Screens[0]->bitmapBitOrder) -+ FatalError("Inconsistent display bitmapBitOrder. Exiting\n"); -+ -+ /* Determine the depth 24 pixmap format the screens would like */ -+ if (xf86Screens[i]->pixmap24 != Pix24DontCare) { -+ if (screenpix24 == Pix24DontCare) -+ screenpix24 = xf86Screens[i]->pixmap24; -+ else if (screenpix24 != xf86Screens[i]->pixmap24) -+ FatalError -+ ("Inconsistent depth 24 pixmap format. Exiting\n"); -+ } -+ } -+ /* check if screenpix24 is consistent with the config/cmdline */ -+ if (xf86Info.pixmap24 != Pix24DontCare) { -+ pix24 = xf86Info.pixmap24; -+ pix24From = xf86Info.pix24From; -+ if (screenpix24 != Pix24DontCare && -+ screenpix24 != xf86Info.pixmap24) -+ pix24Fail = TRUE; -+ } -+ else if (screenpix24 != Pix24DontCare) { -+ pix24 = screenpix24; -+ pix24From = X_PROBED; -+ } -+ else -+ pix24 = Pix24Use32; -+ -+ if (pix24Fail) -+ FatalError("Screen(s) can't use the required depth 24 pixmap format" -+ " (%d). Exiting\n", PIX24TOBPP(pix24)); -+ -+ /* Initialise the depth 24 format */ -+ for (j = 0; j < numFormats && formats[j].depth != 24; j++); -+ formats[j].bitsPerPixel = PIX24TOBPP(pix24); -+ -+ /* Collect additional formats */ -+ for (i = 0; i < xf86NumScreens; i++) { -+ for (j = 0; j < xf86Screens[i]->numFormats; j++) { -+ for (k = 0;; k++) { -+ if (k >= numFormats) { -+ if (k >= MAXFORMATS) -+ FatalError("Too many pixmap formats! Exiting\n"); -+ formats[k] = xf86Screens[i]->formats[j]; -+ numFormats++; -+ break; -+ } -+ if (formats[k].depth == xf86Screens[i]->formats[j].depth) { -+ if ((formats[k].bitsPerPixel == -+ xf86Screens[i]->formats[j].bitsPerPixel) && -+ (formats[k].scanlinePad == -+ xf86Screens[i]->formats[j].scanlinePad)) -+ break; -+ FatalError("Inconsistent pixmap format for depth %d." -+ " Exiting\n", formats[k].depth); -+ } -+ } -+ } -+ } -+ formatsDone = TRUE; -+ -+ if (xf86Info.vtno >= 0) { -+#define VT_ATOM_NAME "XFree86_VT" -+ Atom VTAtom = -1; -+ CARD32 *VT = NULL; -+ int ret; -+ -+ /* This memory needs to stay available until the screen has been -+ initialized, and we can create the property for real. -+ */ -+ if ((VT = malloc(sizeof(CARD32))) == NULL) { -+ FatalError -+ ("Unable to make VT property - out of memory. Exiting...\n"); -+ } -+ *VT = xf86Info.vtno; -+ -+ VTAtom = MakeAtom(VT_ATOM_NAME, sizeof(VT_ATOM_NAME) - 1, TRUE); -+ -+ for (i = 0, ret = Success; i < xf86NumScreens && ret == Success; -+ i++) { -+ ret = -+ xf86RegisterRootWindowProperty(xf86Screens[i]->scrnIndex, -+ VTAtom, XA_INTEGER, 32, 1, -+ VT); -+ if (ret != Success) -+ xf86DrvMsg(xf86Screens[i]->scrnIndex, X_WARNING, -+ "Failed to register VT property\n"); -+ } -+ } -+ -+ if (SeatId) { -+ Atom SeatAtom; -+ -+ SeatAtom = -+ MakeAtom(SEAT_ATOM_NAME, sizeof(SEAT_ATOM_NAME) - 1, TRUE); -+ -+ for (i = 0; i < xf86NumScreens; i++) { -+ int ret; -+ -+ ret = xf86RegisterRootWindowProperty(xf86Screens[i]->scrnIndex, -+ SeatAtom, XA_STRING, 8, -+ strlen(SeatId) + 1, -+ SeatId); -+ if (ret != Success) { -+ xf86DrvMsg(xf86Screens[i]->scrnIndex, X_WARNING, -+ "Failed to register seat property\n"); -+ } -+ } -+ } -+ -+ /* If a screen uses depth 24, show what the pixmap format is */ -+ for (i = 0; i < xf86NumScreens; i++) { -+ if (xf86Screens[i]->depth == 24) { -+ xf86Msg(pix24From, "Depth 24 pixmap format is %d bpp\n", -+ PIX24TOBPP(pix24)); -+ break; -+ } -+ } -+ } -+ else { -+ /* -+ * serverGeneration != 1; some OSs have to do things here, too. -+ */ -+ if (xorgHWOpenConsole) -+ xf86OpenConsole(); -+ -+#ifdef XF86PM -+ /* -+ should we reopen it here? We need to deal with an already opened -+ device. We could leave this to the OS layer. For now we simply -+ close it here -+ */ -+ if (xf86OSPMClose) -+ xf86OSPMClose(); -+ if ((xf86OSPMClose = xf86OSPMOpen()) != NULL) -+ xf86MsgVerb(X_INFO, 3, "APM registered successfully\n"); -+#endif -+ -+ /* Make sure full I/O access is enabled */ -+ if (xorgHWAccess) -+ xf86EnableIO(); -+ } -+ -+ /* -+ * Use the previously collected parts to setup pScreenInfo -+ */ -+ -+ pScreenInfo->imageByteOrder = xf86Screens[0]->imageByteOrder; -+ pScreenInfo->bitmapScanlinePad = xf86Screens[0]->bitmapScanlinePad; -+ pScreenInfo->bitmapScanlineUnit = xf86Screens[0]->bitmapScanlineUnit; -+ pScreenInfo->bitmapBitOrder = xf86Screens[0]->bitmapBitOrder; -+ pScreenInfo->numPixmapFormats = numFormats; -+ for (i = 0; i < numFormats; i++) -+ pScreenInfo->formats[i] = formats[i]; -+ -+ /* Make sure the server's VT is active */ -+ -+ if (serverGeneration != 1) { -+ xf86Resetting = TRUE; -+ /* All screens are in the same state, so just check the first */ -+ if (!xf86VTOwner()) { -+#ifdef HAS_USL_VTS -+ ioctl(xf86Info.consoleFd, VT_RELDISP, VT_ACKACQ); -+#endif -+ xf86AccessEnter(); -+ OsBlockSIGIO(); -+ sigio_blocked = TRUE; -+ } -+ } -+ -+ for (i = 0; i < xf86NumScreens; i++) -+ if (!xf86ColormapAllocatePrivates(xf86Screens[i])) -+ FatalError("Cannot register DDX private keys"); -+ -+ if (!dixRegisterPrivateKey(&xf86ScreenKeyRec, PRIVATE_SCREEN, 0) || -+ !dixRegisterPrivateKey(&xf86CreateRootWindowKeyRec, PRIVATE_SCREEN, 0)) -+ FatalError("Cannot register DDX private keys"); -+ -+ for (i = 0; i < xf86NumGPUScreens; i++) { -+ ScrnInfoPtr pScrn = xf86GPUScreens[i]; -+ xf86VGAarbiterLock(pScrn); -+ -+ /* -+ * Almost everything uses these defaults, and many of those that -+ * don't, will wrap them. -+ */ -+ pScrn->EnableDisableFBAccess = xf86EnableDisableFBAccess; -+#ifdef XFreeXDGA -+ pScrn->SetDGAMode = xf86SetDGAMode; -+#endif -+ pScrn->DPMSSet = NULL; -+ pScrn->LoadPalette = NULL; -+ pScrn->SetOverscan = NULL; -+ pScrn->DriverFunc = NULL; -+ pScrn->pScreen = NULL; -+ scr_index = AddGPUScreen(pScrn->ScreenInit, argc, argv); -+ xf86VGAarbiterUnlock(pScrn); -+ if (scr_index == i) { -+ dixSetPrivate(&screenInfo.gpuscreens[scr_index]->devPrivates, -+ xf86ScreenKey, xf86GPUScreens[i]); -+ pScrn->pScreen = screenInfo.gpuscreens[scr_index]; -+ /* The driver should set this, but make sure it is set anyway */ -+ pScrn->vtSema = TRUE; -+ } else { -+ FatalError("AddScreen/ScreenInit failed for gpu driver %d %d\n", i, scr_index); -+ } -+ } -+ -+ for (i = 0; i < xf86NumScreens; i++) { -+ xf86VGAarbiterLock(xf86Screens[i]); -+ /* -+ * Almost everything uses these defaults, and many of those that -+ * don't, will wrap them. -+ */ -+ xf86Screens[i]->EnableDisableFBAccess = xf86EnableDisableFBAccess; -+#ifdef XFreeXDGA -+ xf86Screens[i]->SetDGAMode = xf86SetDGAMode; -+#endif -+ xf86Screens[i]->DPMSSet = NULL; -+ xf86Screens[i]->LoadPalette = NULL; -+ xf86Screens[i]->SetOverscan = NULL; -+ xf86Screens[i]->DriverFunc = NULL; -+ xf86Screens[i]->pScreen = NULL; -+ scr_index = AddScreen(xf86Screens[i]->ScreenInit, argc, argv); -+ xf86VGAarbiterUnlock(xf86Screens[i]); -+ if (scr_index == i) { -+ /* -+ * Hook in our ScrnInfoRec, and initialise some other pScreen -+ * fields. -+ */ -+ dixSetPrivate(&screenInfo.screens[scr_index]->devPrivates, -+ xf86ScreenKey, xf86Screens[i]); -+ xf86Screens[i]->pScreen = screenInfo.screens[scr_index]; -+ /* The driver should set this, but make sure it is set anyway */ -+ xf86Screens[i]->vtSema = TRUE; -+ } -+ else { -+ /* This shouldn't normally happen */ -+ FatalError("AddScreen/ScreenInit failed for driver %d\n", i); -+ } -+ -+ DebugF("InitOutput - xf86Screens[%d]->pScreen = %p\n", -+ i, xf86Screens[i]->pScreen); -+ DebugF("xf86Screens[%d]->pScreen->CreateWindow = %p\n", -+ i, xf86Screens[i]->pScreen->CreateWindow); -+ -+ dixSetPrivate(&screenInfo.screens[scr_index]->devPrivates, -+ xf86CreateRootWindowKey, -+ xf86Screens[i]->pScreen->CreateWindow); -+ xf86Screens[i]->pScreen->CreateWindow = xf86CreateRootWindow; -+ -+ if (PictureGetSubpixelOrder(xf86Screens[i]->pScreen) == SubPixelUnknown) { -+ xf86MonPtr DDC = (xf86MonPtr) (xf86Screens[i]->monitor->DDC); -+ -+ PictureSetSubpixelOrder(xf86Screens[i]->pScreen, -+ DDC ? -+ (DDC->features.input_type ? -+ SubPixelHorizontalRGB : SubPixelNone) : -+ SubPixelUnknown); -+ } -+#ifdef RANDR -+ if (!xf86Info.disableRandR) -+ xf86RandRInit(screenInfo.screens[scr_index]); -+ xf86Msg(xf86Info.randRFrom, "RandR %s\n", -+ xf86Info.disableRandR ? "disabled" : "enabled"); -+#endif -+ } -+ -+ for (i = 0; i < xf86NumGPUScreens; i++) -+ AttachUnboundGPU(xf86Screens[0]->pScreen, xf86GPUScreens[i]->pScreen); -+ -+ xf86AutoConfigOutputDevices(); -+ -+ xf86VGAarbiterWrapFunctions(); -+ if (sigio_blocked) -+ OsReleaseSIGIO(); -+ -+ xf86InitOrigins(); -+ -+ xf86Resetting = FALSE; -+ xf86Initialising = FALSE; -+ -+ RegisterBlockAndWakeupHandlers((BlockHandlerProcPtr) NoopDDA, xf86Wakeup, -+ NULL); -+} -+ -+/** -+ * Initialize all supported input devices present and referenced in the -+ * xorg.conf. -+ */ -+void -+InitInput(int argc, char **argv) -+{ -+ InputInfoPtr *pInfo; -+ DeviceIntPtr dev; -+ -+ xf86Info.vtRequestsPending = FALSE; -+ -+ mieqInit(); -+ -+ /* Initialize all configured input devices */ -+ for (pInfo = xf86ConfigLayout.inputs; pInfo && *pInfo; pInfo++) { -+ (*pInfo)->options = -+ xf86AddNewOption((*pInfo)->options, "driver", (*pInfo)->driver); -+ (*pInfo)->options = -+ xf86AddNewOption((*pInfo)->options, "identifier", (*pInfo)->name); -+ /* If one fails, the others will too */ -+ if (NewInputDeviceRequest((*pInfo)->options, NULL, &dev) == BadAlloc) -+ break; -+ } -+ -+ config_init(); -+} -+ -+void -+CloseInput(void) -+{ -+ config_fini(); -+ mieqFini(); -+} -+ -+/* -+ * OsVendorInit -- -+ * OS/Vendor-specific initialisations. Called from OsInit(), which -+ * is called by dix before establishing the well known sockets. -+ */ -+ -+void -+OsVendorInit(void) -+{ -+ static Bool beenHere = FALSE; -+ -+ signal(SIGCHLD, SIG_DFL); /* Need to wait for child processes */ -+ -+ if (!beenHere) { -+ umask(022); -+ xf86LogInit(); -+ } -+ -+ /* Set stderr to non-blocking. */ -+#ifndef O_NONBLOCK -+#if defined(FNDELAY) -+#define O_NONBLOCK FNDELAY -+#elif defined(O_NDELAY) -+#define O_NONBLOCK O_NDELAY -+#endif -+ -+#ifdef O_NONBLOCK -+ if (!beenHere) { -+ if (xf86PrivsElevated()) { -+ int status; -+ -+ status = fcntl(fileno(stderr), F_GETFL, 0); -+ if (status != -1) { -+ fcntl(fileno(stderr), F_SETFL, status | O_NONBLOCK); -+ } -+ } -+ } -+#endif -+#endif -+ -+ beenHere = TRUE; -+} -+ -+/* -+ * ddxGiveUp -- -+ * Device dependent cleanup. Called by by dix before normal server death. -+ * For SYSV386 we must switch the terminal back to normal mode. No error- -+ * checking here, since there should be restored as much as possible. -+ */ -+ -+void -+ddxGiveUp(enum ExitCode error) -+{ -+ int i; -+ -+ xf86VGAarbiterFini(); -+ -+#ifdef XF86PM -+ if (xf86OSPMClose) -+ xf86OSPMClose(); -+ xf86OSPMClose = NULL; -+#endif -+ -+ for (i = 0; i < xf86NumScreens; i++) { -+ /* -+ * zero all access functions to -+ * trap calls when switched away. -+ */ -+ xf86Screens[i]->vtSema = FALSE; -+ } -+ -+#ifdef XFreeXDGA -+ DGAShutdown(); -+#endif -+ -+ if (xorgHWOpenConsole) -+ xf86CloseConsole(); -+ -+ xf86CloseLog(error); -+ -+ /* If an unexpected signal was caught, dump a core for debugging */ -+ if (xf86Info.caughtSignal) -+ OsAbort(); -+} -+ -+/* -+ * AbortDDX -- -+ * DDX - specific abort routine. Called by AbortServer(). The attempt is -+ * made to restore all original setting of the displays. Also all devices -+ * are closed. -+ */ -+ -+void -+AbortDDX(enum ExitCode error) -+{ -+ int i; -+ -+ OsBlockSIGIO(); -+ -+ /* -+ * try to restore the original video state -+ */ -+#ifdef DPMSExtension /* Turn screens back on */ -+ if (DPMSPowerLevel != DPMSModeOn) -+ DPMSSet(serverClient, DPMSModeOn); -+#endif -+ if (xf86Screens) { -+ for (i = 0; i < xf86NumScreens; i++) -+ if (xf86Screens[i]->vtSema) { -+ /* -+ * if we are aborting before ScreenInit() has finished -+ * we might not have been wrapped yet. Therefore enable -+ * screen explicitely. -+ */ -+ xf86VGAarbiterLock(xf86Screens[i]); -+ (xf86Screens[i]->LeaveVT) (xf86Screens[i]); -+ xf86VGAarbiterUnlock(xf86Screens[i]); -+ } -+ } -+ -+ xf86AccessLeave(); -+ -+ /* -+ * This is needed for an abnormal server exit, since the normal exit stuff -+ * MUST also be performed (i.e. the vt must be left in a defined state) -+ */ -+ ddxGiveUp(error); -+} -+ -+void -+OsVendorFatalError(const char *f, va_list args) -+{ -+#ifdef VENDORSUPPORT -+ ErrorFSigSafe("\nPlease refer to your Operating System Vendor support " -+ "pages\nat %s for support on this crash.\n", VENDORSUPPORT); -+#else -+ ErrorFSigSafe("\nPlease consult the " XVENDORNAME " support \n\t at " -+ __VENDORDWEBSUPPORT__ "\n for help. \n"); -+#endif -+ if (xf86LogFile && xf86LogFileWasOpened) -+ ErrorFSigSafe("Please also check the log file at \"%s\" for additional " -+ "information.\n", xf86LogFile); -+ ErrorFSigSafe("\n"); -+} -+ -+int -+xf86SetVerbosity(int verb) -+{ -+ int save = xf86Verbose; -+ -+ xf86Verbose = verb; -+ LogSetParameter(XLOG_VERBOSITY, verb); -+ return save; -+} -+ -+int -+xf86SetLogVerbosity(int verb) -+{ -+ int save = xf86LogVerbose; -+ -+ xf86LogVerbose = verb; -+ LogSetParameter(XLOG_FILE_VERBOSITY, verb); -+ return save; -+} -+ -+static void -+xf86PrintDefaultModulePath(void) -+{ -+ ErrorF("%s\n", DEFAULT_MODULE_PATH); -+} -+ -+static void -+xf86PrintDefaultLibraryPath(void) -+{ -+ ErrorF("%s\n", DEFAULT_LIBRARY_PATH); -+} -+ -+/* -+ * ddxProcessArgument -- -+ * Process device-dependent command line args. Returns 0 if argument is -+ * not device dependent, otherwise Count of number of elements of argv -+ * that are part of a device dependent commandline option. -+ * -+ */ -+ -+/* ARGSUSED */ -+int -+ddxProcessArgument(int argc, char **argv, int i) -+{ -+#define CHECK_FOR_REQUIRED_ARGUMENT() \ -+ if (((i + 1) >= argc) || (!argv[i + 1])) { \ -+ ErrorF("Required argument to %s not specified\n", argv[i]); \ -+ UseMsg(); \ -+ FatalError("Required argument to %s not specified\n", argv[i]); \ -+ } -+ -+ /* First the options that are not allowed with elevated privileges */ -+ if (!strcmp(argv[i], "-modulepath") || !strcmp(argv[i], "-logfile")) { -+ if (xf86PrivsElevated()) { -+ FatalError("The '%s' option cannot be used with " -+ "elevated privileges.\n", argv[i]); -+ } -+ else if (!strcmp(argv[i], "-modulepath")) { -+ char *mp; -+ -+ CHECK_FOR_REQUIRED_ARGUMENT(); -+ mp = strdup(argv[i + 1]); -+ if (!mp) -+ FatalError("Can't allocate memory for ModulePath\n"); -+ xf86ModulePath = mp; -+ xf86ModPathFrom = X_CMDLINE; -+ return 2; -+ } -+ else if (!strcmp(argv[i], "-logfile")) { -+ char *lf; -+ -+ CHECK_FOR_REQUIRED_ARGUMENT(); -+ lf = strdup(argv[i + 1]); -+ if (!lf) -+ FatalError("Can't allocate memory for LogFile\n"); -+ xf86LogFile = lf; -+ xf86LogFileFrom = X_CMDLINE; -+ return 2; -+ } -+ } -+ if (!strcmp(argv[i], "-config") || !strcmp(argv[i], "-xf86config")) { -+ CHECK_FOR_REQUIRED_ARGUMENT(); -+ if (xf86PrivsElevated() && !xf86PathIsSafe(argv[i + 1])) { -+ FatalError("\nInvalid argument for %s\n" -+ "\tWith elevated privileges, the file specified with %s must be\n" -+ "\ta relative path and must not contain any \"..\" elements.\n" -+ "\tUsing default " __XCONFIGFILE__ " search path.\n\n", -+ argv[i], argv[i]); -+ } -+ xf86ConfigFile = argv[i + 1]; -+ return 2; -+ } -+ if (!strcmp(argv[i], "-configdir")) { -+ CHECK_FOR_REQUIRED_ARGUMENT(); -+ if (xf86PrivsElevated() && !xf86PathIsSafe(argv[i + 1])) { -+ FatalError("\nInvalid argument for %s\n" -+ "\tWith elevated privileges, the file specified with %s must be\n" -+ "\ta relative path and must not contain any \"..\" elements.\n" -+ "\tUsing default " __XCONFIGDIR__ " search path.\n\n", -+ argv[i], argv[i]); -+ } -+ xf86ConfigDir = argv[i + 1]; -+ return 2; -+ } -+ if (!strcmp(argv[i], "-flipPixels")) { -+ xf86FlipPixels = TRUE; -+ return 1; -+ } -+#ifdef XF86VIDMODE -+ if (!strcmp(argv[i], "-disableVidMode")) { -+ xf86VidModeDisabled = TRUE; -+ return 1; -+ } -+ if (!strcmp(argv[i], "-allowNonLocalXvidtune")) { -+ xf86VidModeAllowNonLocal = TRUE; -+ return 1; -+ } -+#endif -+ if (!strcmp(argv[i], "-allowMouseOpenFail")) { -+ xf86AllowMouseOpenFail = TRUE; -+ return 1; -+ } -+ if (!strcmp(argv[i], "-ignoreABI")) { -+ LoaderSetOptions(LDR_OPT_ABI_MISMATCH_NONFATAL); -+ return 1; -+ } -+ if (!strcmp(argv[i], "-verbose")) { -+ if (++i < argc && argv[i]) { -+ char *end; -+ long val; -+ -+ val = strtol(argv[i], &end, 0); -+ if (*end == '\0') { -+ xf86SetVerbosity(val); -+ return 2; -+ } -+ } -+ xf86SetVerbosity(++xf86Verbose); -+ return 1; -+ } -+ if (!strcmp(argv[i], "-logverbose")) { -+ if (++i < argc && argv[i]) { -+ char *end; -+ long val; -+ -+ val = strtol(argv[i], &end, 0); -+ if (*end == '\0') { -+ xf86SetLogVerbosity(val); -+ return 2; -+ } -+ } -+ xf86SetLogVerbosity(++xf86LogVerbose); -+ return 1; -+ } -+ if (!strcmp(argv[i], "-quiet")) { -+ xf86SetVerbosity(-1); -+ return 1; -+ } -+ if (!strcmp(argv[i], "-showconfig") || !strcmp(argv[i], "-version")) { -+ xf86PrintBanner(); -+ exit(0); -+ } -+ if (!strcmp(argv[i], "-showDefaultModulePath")) { -+ xf86PrintDefaultModulePath(); -+ exit(0); -+ } -+ if (!strcmp(argv[i], "-showDefaultLibPath")) { -+ xf86PrintDefaultLibraryPath(); -+ exit(0); -+ } -+ /* Notice the -fp flag, but allow it to pass to the dix layer */ -+ if (!strcmp(argv[i], "-fp")) { -+ xf86fpFlag = TRUE; -+ return 0; -+ } -+ /* Notice the -bs flag, but allow it to pass to the dix layer */ -+ if (!strcmp(argv[i], "-bs")) { -+ xf86bsDisableFlag = TRUE; -+ return 0; -+ } -+ /* Notice the +bs flag, but allow it to pass to the dix layer */ -+ if (!strcmp(argv[i], "+bs")) { -+ xf86bsEnableFlag = TRUE; -+ return 0; -+ } -+ /* Notice the -s flag, but allow it to pass to the dix layer */ -+ if (!strcmp(argv[i], "-s")) { -+ xf86sFlag = TRUE; -+ return 0; -+ } -+ if (!strcmp(argv[i], "-pixmap24")) { -+ xf86Pix24 = Pix24Use24; -+ return 1; -+ } -+ if (!strcmp(argv[i], "-pixmap32")) { -+ xf86Pix24 = Pix24Use32; -+ return 1; -+ } -+ if (!strcmp(argv[i], "-fbbpp")) { -+ int bpp; -+ -+ CHECK_FOR_REQUIRED_ARGUMENT(); -+ if (sscanf(argv[++i], "%d", &bpp) == 1) { -+ xf86FbBpp = bpp; -+ return 2; -+ } -+ else { -+ ErrorF("Invalid fbbpp\n"); -+ return 0; -+ } -+ } -+ if (!strcmp(argv[i], "-depth")) { -+ int depth; -+ -+ CHECK_FOR_REQUIRED_ARGUMENT(); -+ if (sscanf(argv[++i], "%d", &depth) == 1) { -+ xf86Depth = depth; -+ return 2; -+ } -+ else { -+ ErrorF("Invalid depth\n"); -+ return 0; -+ } -+ } -+ if (!strcmp(argv[i], "-weight")) { -+ int red, green, blue; -+ -+ CHECK_FOR_REQUIRED_ARGUMENT(); -+ if (sscanf(argv[++i], "%1d%1d%1d", &red, &green, &blue) == 3) { -+ xf86Weight.red = red; -+ xf86Weight.green = green; -+ xf86Weight.blue = blue; -+ return 2; -+ } -+ else { -+ ErrorF("Invalid weighting\n"); -+ return 0; -+ } -+ } -+ if (!strcmp(argv[i], "-gamma") || !strcmp(argv[i], "-rgamma") || -+ !strcmp(argv[i], "-ggamma") || !strcmp(argv[i], "-bgamma")) { -+ double gamma; -+ -+ CHECK_FOR_REQUIRED_ARGUMENT(); -+ if (sscanf(argv[++i], "%lf", &gamma) == 1) { -+ if (gamma < GAMMA_MIN || gamma > GAMMA_MAX) { -+ ErrorF("gamma out of range, only %.2f <= gamma_value <= %.1f" -+ " is valid\n", GAMMA_MIN, GAMMA_MAX); -+ return 0; -+ } -+ if (!strcmp(argv[i - 1], "-gamma")) -+ xf86Gamma.red = xf86Gamma.green = xf86Gamma.blue = gamma; -+ else if (!strcmp(argv[i - 1], "-rgamma")) -+ xf86Gamma.red = gamma; -+ else if (!strcmp(argv[i - 1], "-ggamma")) -+ xf86Gamma.green = gamma; -+ else if (!strcmp(argv[i - 1], "-bgamma")) -+ xf86Gamma.blue = gamma; -+ return 2; -+ } -+ } -+ if (!strcmp(argv[i], "-layout")) { -+ CHECK_FOR_REQUIRED_ARGUMENT(); -+ xf86LayoutName = argv[++i]; -+ return 2; -+ } -+ if (!strcmp(argv[i], "-screen")) { -+ CHECK_FOR_REQUIRED_ARGUMENT(); -+ xf86ScreenName = argv[++i]; -+ return 2; -+ } -+ if (!strcmp(argv[i], "-pointer")) { -+ CHECK_FOR_REQUIRED_ARGUMENT(); -+ xf86PointerName = argv[++i]; -+ return 2; -+ } -+ if (!strcmp(argv[i], "-keyboard")) { -+ CHECK_FOR_REQUIRED_ARGUMENT(); -+ xf86KeyboardName = argv[++i]; -+ return 2; -+ } -+ if (!strcmp(argv[i], "-nosilk")) { -+ xf86silkenMouseDisableFlag = TRUE; -+ return 1; -+ } -+#ifdef HAVE_ACPI -+ if (!strcmp(argv[i], "-noacpi")) { -+ xf86acpiDisableFlag = TRUE; -+ return 1; -+ } -+#endif -+ if (!strcmp(argv[i], "-configure")) { -+ if (getuid() != 0 && geteuid() == 0) { -+ ErrorF("The '-configure' option can only be used by root.\n"); -+ exit(1); -+ } -+ xf86DoConfigure = TRUE; -+ xf86AllowMouseOpenFail = TRUE; -+ return 1; -+ } -+ if (!strcmp(argv[i], "-showopts")) { -+ if (getuid() != 0 && geteuid() == 0) { -+ ErrorF("The '-showopts' option can only be used by root.\n"); -+ exit(1); -+ } -+ xf86DoShowOptions = TRUE; -+ return 1; -+ } -+#ifdef XSERVER_LIBPCIACCESS -+ if (!strcmp(argv[i], "-isolateDevice")) { -+ CHECK_FOR_REQUIRED_ARGUMENT(); -+ if (strncmp(argv[++i], "PCI:", 4)) { -+ FatalError("Bus types other than PCI not yet isolable\n"); -+ } -+ xf86PciIsolateDevice(argv[i]); -+ return 2; -+ } -+#endif -+ /* Notice cmdline xkbdir, but pass to dix as well */ -+ if (!strcmp(argv[i], "-xkbdir")) { -+ xf86xkbdirFlag = TRUE; -+ return 0; -+ } -+ if (!strcmp(argv[i], "-novtswitch")) { -+ xf86Info.autoVTSwitch = FALSE; -+ return 1; -+ } -+ if (!strcmp(argv[i], "-sharevts")) { -+ xf86Info.ShareVTs = TRUE; -+ return 1; -+ } -+ -+ /* OS-specific processing */ -+ return xf86ProcessArgument(argc, argv, i); -+} -+ -+/* -+ * ddxUseMsg -- -+ * Print out correct use of device dependent commandline options. -+ * Maybe the user now knows what really to do ... -+ */ -+ -+void -+ddxUseMsg(void) -+{ -+ ErrorF("\n"); -+ ErrorF("\n"); -+ ErrorF("Device Dependent Usage\n"); -+ if (!xf86PrivsElevated()) { -+ ErrorF("-modulepath paths specify the module search path\n"); -+ ErrorF("-logfile file specify a log file name\n"); -+ ErrorF("-configure probe for devices and write an " -+ __XCONFIGFILE__ "\n"); -+ ErrorF -+ ("-showopts print available options for all installed drivers\n"); -+ } -+ ErrorF -+ ("-config file specify a configuration file, relative to the\n"); -+ ErrorF(" " __XCONFIGFILE__ -+ " search path, only root can use absolute\n"); -+ ErrorF -+ ("-configdir dir specify a configuration directory, relative to the\n"); -+ ErrorF(" " __XCONFIGDIR__ -+ " search path, only root can use absolute\n"); -+ ErrorF("-verbose [n] verbose startup messages\n"); -+ ErrorF("-logverbose [n] verbose log messages\n"); -+ ErrorF("-quiet minimal startup messages\n"); -+ ErrorF("-pixmap24 use 24bpp pixmaps for depth 24\n"); -+ ErrorF("-pixmap32 use 32bpp pixmaps for depth 24\n"); -+ ErrorF("-fbbpp n set bpp for the framebuffer. Default: 8\n"); -+ ErrorF("-depth n set colour depth. Default: 8\n"); -+ ErrorF -+ ("-gamma f set gamma value (0.1 < f < 10.0) Default: 1.0\n"); -+ ErrorF("-rgamma f set gamma value for red phase\n"); -+ ErrorF("-ggamma f set gamma value for green phase\n"); -+ ErrorF("-bgamma f set gamma value for blue phase\n"); -+ ErrorF -+ ("-weight nnn set RGB weighting at 16 bpp. Default: 565\n"); -+ ErrorF("-layout name specify the ServerLayout section name\n"); -+ ErrorF("-screen name specify the Screen section name\n"); -+ ErrorF -+ ("-keyboard name specify the core keyboard InputDevice name\n"); -+ ErrorF -+ ("-pointer name specify the core pointer InputDevice name\n"); -+ ErrorF("-nosilk disable Silken Mouse\n"); -+ ErrorF("-flipPixels swap default black/white Pixel values\n"); -+#ifdef XF86VIDMODE -+ ErrorF("-disableVidMode disable mode adjustments with xvidtune\n"); -+ ErrorF -+ ("-allowNonLocalXvidtune allow xvidtune to be run as a non-local client\n"); -+#endif -+ ErrorF -+ ("-allowMouseOpenFail start server even if the mouse can't be initialized\n"); -+ ErrorF("-ignoreABI make module ABI mismatches non-fatal\n"); -+#ifdef XSERVER_LIBPCIACCESS -+ ErrorF -+ ("-isolateDevice bus_id restrict device resets to bus_id (PCI only)\n"); -+#endif -+ ErrorF("-version show the server version\n"); -+ ErrorF("-showDefaultModulePath show the server default module path\n"); -+ ErrorF("-showDefaultLibPath show the server default library path\n"); -+ ErrorF -+ ("-novtswitch don't automatically switch VT at reset & exit\n"); -+ ErrorF("-sharevts share VTs with another X server\n"); -+ /* OS-specific usage */ -+ xf86UseMsg(); -+ ErrorF("\n"); -+} -+ -+/* -+ * xf86LoadModules iterates over a list that is being passed in. -+ */ -+Bool -+xf86LoadModules(char **list, pointer *optlist) -+{ -+ int errmaj, errmin; -+ pointer opt; -+ int i; -+ char *name; -+ Bool failed = FALSE; -+ -+ if (!list) -+ return TRUE; -+ -+ for (i = 0; list[i] != NULL; i++) { -+ -+ /* Normalise the module name */ -+ name = xf86NormalizeName(list[i]); -+ -+ /* Skip empty names */ -+ if (name == NULL || *name == '\0') { -+ free(name); -+ continue; -+ } -+ -+ /* Replace obsolete keyboard driver with kbd */ -+ if (!xf86NameCmp(name, "keyboard")) { -+ strcpy(name, "kbd"); -+ } -+ -+ if (optlist) -+ opt = optlist[i]; -+ else -+ opt = NULL; -+ -+ if (!LoadModule(name, NULL, NULL, NULL, opt, NULL, &errmaj, &errmin)) { -+ LoaderErrorMsg(NULL, name, errmaj, errmin); -+ failed = TRUE; -+ } -+ free(name); -+ } -+ return !failed; -+} -+ -+/* Pixmap format stuff */ -+ -+PixmapFormatPtr -+xf86GetPixFormat(ScrnInfoPtr pScrn, int depth) -+{ -+ int i; -+ static PixmapFormatRec format; /* XXX not reentrant */ -+ -+ /* -+ * When the formats[] list initialisation isn't complete, check the -+ * depth 24 pixmap config/cmdline options and screen-specified formats. -+ */ -+ -+ if (!formatsDone) { -+ if (depth == 24) { -+ Pix24Flags pix24 = Pix24DontCare; -+ -+ format.depth = 24; -+ format.scanlinePad = BITMAP_SCANLINE_PAD; -+ if (xf86Info.pixmap24 != Pix24DontCare) -+ pix24 = xf86Info.pixmap24; -+ else if (pScrn->pixmap24 != Pix24DontCare) -+ pix24 = pScrn->pixmap24; -+ if (pix24 == Pix24Use24) -+ format.bitsPerPixel = 24; -+ else -+ format.bitsPerPixel = 32; -+ return &format; -+ } -+ } -+ -+ for (i = 0; i < numFormats; i++) -+ if (formats[i].depth == depth) -+ break; -+ if (i != numFormats) -+ return &formats[i]; -+ else if (!formatsDone) { -+ /* Check for screen-specified formats */ -+ for (i = 0; i < pScrn->numFormats; i++) -+ if (pScrn->formats[i].depth == depth) -+ break; -+ if (i != pScrn->numFormats) -+ return &pScrn->formats[i]; -+ } -+ return NULL; -+} -+ -+int -+xf86GetBppFromDepth(ScrnInfoPtr pScrn, int depth) -+{ -+ PixmapFormatPtr format; -+ -+ format = xf86GetPixFormat(pScrn, depth); -+ if (format) -+ return format->bitsPerPixel; -+ else -+ return 0; -+} -+ -+#ifdef DDXBEFORERESET -+void -+ddxBeforeReset(void) -+{ -+} -+#endif diff --git a/hw/xfree86/common/xf86Priv.h b/hw/xfree86/common/xf86Priv.h index 58cfe0a..3dd2697 100644 --- a/hw/xfree86/common/xf86Priv.h @@ -4551,10 +258,10 @@ index 58cfe0a..3dd2697 100644 extern _X_EXPORT RootWinPropPtr *xf86RegisteredPropertiesTable; diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c -index 8bf0392..b203d06 100644 +index efdcd66..483d630 100644 --- a/hw/xfree86/dri2/dri2.c +++ b/hw/xfree86/dri2/dri2.c -@@ -1349,13 +1349,16 @@ DRI2Connect(ClientPtr client, ScreenPtr pScreen, +@@ -1332,13 +1332,16 @@ DRI2Connect(ClientPtr client, ScreenPtr pScreen, } static int diff --git a/0012-xwayland-Add-a-HW_WAYLAND-flag-to-let-drivers-explic.patch b/0012-xwayland-Add-a-HW_WAYLAND-flag-to-let-drivers-explic.patch index f54f022..1f0af78 100644 --- a/0012-xwayland-Add-a-HW_WAYLAND-flag-to-let-drivers-explic.patch +++ b/0012-xwayland-Add-a-HW_WAYLAND-flag-to-let-drivers-explic.patch @@ -1,7 +1,7 @@ -From 69def850b10580bcb3b67b5bfcb1d8bc0cb188f4 Mon Sep 17 00:00:00 2001 +From b1439c7708dae1b0f68f6e53264d5be1f636bd82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Wed, 21 Aug 2013 23:02:58 -0700 -Subject: [PATCH 12/30] xwayland: Add a HW_WAYLAND flag to let drivers +Subject: [PATCH 12/39] xwayland: Add a HW_WAYLAND flag to let drivers explicitly opt-in --- @@ -10,10 +10,10 @@ Subject: [PATCH 12/30] xwayland: Add a HW_WAYLAND flag to let drivers 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c -index 629d892..5ac97cc 100644 +index 98adaab..2d3bb01 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c -@@ -557,11 +557,14 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv) +@@ -547,11 +547,14 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv) if (!(flags & HW_SKIP_CONSOLE)) xorgHWOpenConsole = TRUE; @@ -33,7 +33,7 @@ index 629d892..5ac97cc 100644 } diff --git a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h -index f1dbfc5..14b013f 100644 +index 4c2d147..976fa30 100644 --- a/hw/xfree86/common/xf86str.h +++ b/hw/xfree86/common/xf86str.h @@ -288,6 +288,7 @@ typedef struct { diff --git a/0013-xwayland-shm-don-t-create-alpha-buffers-if-the-windo.patch b/0013-xwayland-shm-don-t-create-alpha-buffers-if-the-windo.patch index e5a4ae1..c558918 100644 --- a/0013-xwayland-shm-don-t-create-alpha-buffers-if-the-windo.patch +++ b/0013-xwayland-shm-don-t-create-alpha-buffers-if-the-windo.patch @@ -1,7 +1,7 @@ -From ef9f67ee52b6a49e3a4901704e51f2f6cde9698a Mon Sep 17 00:00:00 2001 +From 2d673d0606ca79ede96c019670286338949e59ec Mon Sep 17 00:00:00 2001 From: Giovanni Campagna Date: Wed, 21 Aug 2013 09:53:25 +0200 -Subject: [PATCH 13/30] xwayland-shm: don't create alpha buffers if the window +Subject: [PATCH 13/39] xwayland-shm: don't create alpha buffers if the window doesn't have alpha If the window is using a 24 bit visual, we must request a buffer diff --git a/0014-xwayland-handle-global-object-destruction.patch b/0014-xwayland-handle-global-object-destruction.patch index fe87bb8..13f8e9a 100644 --- a/0014-xwayland-handle-global-object-destruction.patch +++ b/0014-xwayland-handle-global-object-destruction.patch @@ -1,7 +1,7 @@ -From 5ec1f1446acf1bb7ed04c2844ac62325fc125b91 Mon Sep 17 00:00:00 2001 +From 8608443b26b21991e27bc26fa83cd14b30ee9a01 Mon Sep 17 00:00:00 2001 From: Giovanni Campagna Date: Wed, 21 Aug 2013 09:53:26 +0200 -Subject: [PATCH 14/30] xwayland: handle global object destruction +Subject: [PATCH 14/39] xwayland: handle global object destruction Certain global objects, such as outputs, can be destroyed during the session. We must handle that and not crash. diff --git a/0015-xwayland-add-support-for-multiple-outputs.patch b/0015-xwayland-add-support-for-multiple-outputs.patch index 2aca803..fa57e5f 100644 --- a/0015-xwayland-add-support-for-multiple-outputs.patch +++ b/0015-xwayland-add-support-for-multiple-outputs.patch @@ -1,7 +1,7 @@ -From cf0293df1032b3646ed77b5c1981d6346577f678 Mon Sep 17 00:00:00 2001 +From 99b250c3246d6547cbc6bc84f7f42b9aec5b3a4f Mon Sep 17 00:00:00 2001 From: Giovanni Campagna Date: Thu, 22 Aug 2013 16:23:48 +0200 -Subject: [PATCH 15/30] xwayland: add support for multiple outputs +Subject: [PATCH 15/39] xwayland: add support for multiple outputs Drop xf86InitialConfiguration, which just gets in the way of the compositor doing its own output arrangement, and transform diff --git a/0016-xwayland-Probe-outputs-on-preinit.patch b/0016-xwayland-Probe-outputs-on-preinit.patch index 21b66db..7bd2cba 100644 --- a/0016-xwayland-Probe-outputs-on-preinit.patch +++ b/0016-xwayland-Probe-outputs-on-preinit.patch @@ -1,7 +1,7 @@ -From 20a6f974f413757da649dcc984fd6c759096dd54 Mon Sep 17 00:00:00 2001 +From 796e417ebb9c2f796ce9588a6a8d7b2cd29c7af3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Sun, 1 Sep 2013 23:14:43 +0200 -Subject: [PATCH 16/30] xwayland: Probe outputs on preinit +Subject: [PATCH 16/39] xwayland: Probe outputs on preinit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit diff --git a/0017-XFree86-Load-wlshm-driver-as-fallback-for-Wayland.patch b/0017-XFree86-Load-wlshm-driver-as-fallback-for-Wayland.patch index 0e30e85..916e40d 100644 --- a/0017-XFree86-Load-wlshm-driver-as-fallback-for-Wayland.patch +++ b/0017-XFree86-Load-wlshm-driver-as-fallback-for-Wayland.patch @@ -1,7 +1,7 @@ -From 2ef0364d48a6be3ef69328045ab85d3167840402 Mon Sep 17 00:00:00 2001 +From 400d9b22c0927a20b7255100a4ba8d3d11bef262 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Fri, 16 Aug 2013 13:21:21 +0100 -Subject: [PATCH 17/30] XFree86: Load wlshm driver as fallback for Wayland +Subject: [PATCH 17/39] XFree86: Load wlshm driver as fallback for Wayland Since fbdev or vesa are unlikely to be too useful there ... @@ -34,10 +34,10 @@ index 95d58fe..d5a3370 100644 } #endif /* !sun */ diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c -index 55f9883..434249b 100644 +index 39cd58c..c65cb80 100644 --- a/hw/xfree86/common/xf86Config.c +++ b/hw/xfree86/common/xf86Config.c -@@ -518,7 +518,11 @@ xf86InputDriverlistFromConfig(void) +@@ -519,7 +519,11 @@ xf86InputDriverlistFromConfig(void) static void fixup_video_driver_list(char **drivers) { @@ -50,7 +50,7 @@ index 55f9883..434249b 100644 char **end, **drv; char *x; int i; -@@ -531,9 +535,15 @@ fixup_video_driver_list(char **drivers) +@@ -532,9 +536,15 @@ fixup_video_driver_list(char **drivers) * for each of the fallback drivers, if we find it in the list, * swap it with the last available non-fallback driver. */ diff --git a/0018-XWayland-Don-t-send-out-of-bounds-damage-co-ordinate.patch b/0018-XWayland-Don-t-send-out-of-bounds-damage-co-ordinate.patch index d10d08e..5dfd444 100644 --- a/0018-XWayland-Don-t-send-out-of-bounds-damage-co-ordinate.patch +++ b/0018-XWayland-Don-t-send-out-of-bounds-damage-co-ordinate.patch @@ -1,7 +1,7 @@ -From 007b3b673d7bef6138b3e8a6c2342c1f569c8de8 Mon Sep 17 00:00:00 2001 +From 55f33977d3753f357c407def598647698d5b05a4 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Wed, 7 Nov 2012 17:22:42 +1100 -Subject: [PATCH 18/30] XWayland: Don't send out-of-bounds damage co-ordinates +Subject: [PATCH 18/39] XWayland: Don't send out-of-bounds damage co-ordinates Make sure we don't send damage regions larger than the buffer. diff --git a/0019-xwayland-Introduce-an-auto-mode-for-enable-wayland.patch b/0019-xwayland-Introduce-an-auto-mode-for-enable-wayland.patch index cd7d3a4..940f9cb 100644 --- a/0019-xwayland-Introduce-an-auto-mode-for-enable-wayland.patch +++ b/0019-xwayland-Introduce-an-auto-mode-for-enable-wayland.patch @@ -1,7 +1,7 @@ -From ee97e732bcb1b2eafdaa6339a177ec2bbb6bd574 Mon Sep 17 00:00:00 2001 +From cf0846ea962e60ae1229dba6ee25b067ebafe906 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Tue, 16 Oct 2012 17:14:01 +1100 -Subject: [PATCH 19/30] xwayland: Introduce an auto mode for --enable-wayland +Subject: [PATCH 19/39] xwayland: Introduce an auto mode for --enable-wayland Signed-off-by: Daniel Stone --- @@ -9,7 +9,7 @@ Signed-off-by: Daniel Stone 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac -index c65e1a7..4637c41 100644 +index da10573..a74d607 100644 --- a/configure.ac +++ b/configure.ac @@ -635,7 +635,7 @@ AC_ARG_ENABLE(windowswm, AS_HELP_STRING([--enable-windowswm], [Build XWin w diff --git a/0020-XWayland-Don-t-hardcode-DRM-libs-and-lwayland-client.patch b/0020-XWayland-Don-t-hardcode-DRM-libs-and-lwayland-client.patch index 3a678b8..5b94758 100644 --- a/0020-XWayland-Don-t-hardcode-DRM-libs-and-lwayland-client.patch +++ b/0020-XWayland-Don-t-hardcode-DRM-libs-and-lwayland-client.patch @@ -1,7 +1,7 @@ -From ee550427e188cad38ed5c77899372bf3cc782ece Mon Sep 17 00:00:00 2001 +From b207060d767d908eb4b70607f280d67854a4f161 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Wed, 7 Nov 2012 17:15:13 +1100 -Subject: [PATCH 20/30] XWayland: Don't hardcode DRM libs and -lwayland-client +Subject: [PATCH 20/39] XWayland: Don't hardcode DRM libs and -lwayland-client Take -lwayland-client from configure.ac, and only use DRM if we've actually asked for it. diff --git a/0021-XWayland-Support-16bpp-X-surfaces-in-DRM-SHM.patch b/0021-XWayland-Support-16bpp-X-surfaces-in-DRM-SHM.patch index 1406d8d..5d150b1 100644 --- a/0021-XWayland-Support-16bpp-X-surfaces-in-DRM-SHM.patch +++ b/0021-XWayland-Support-16bpp-X-surfaces-in-DRM-SHM.patch @@ -1,7 +1,7 @@ -From b5d5a1cdb7454f6ed33ba68c79da79504846e568 Mon Sep 17 00:00:00 2001 +From 7d66d6b1bceebea3bdb49886e1f6980d480713df Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Fri, 16 Aug 2013 13:51:08 +0100 -Subject: [PATCH 21/30] XWayland: Support 16bpp X surfaces in DRM/SHM +Subject: [PATCH 21/39] XWayland: Support 16bpp X surfaces in DRM/SHM Properly look at the window's visual to determine which format we should use for allocation. diff --git a/0022-xwayland-Remove-Xdnd-selection-watching-code.patch b/0022-xwayland-Remove-Xdnd-selection-watching-code.patch index 5dc68f5..4078b48 100644 --- a/0022-xwayland-Remove-Xdnd-selection-watching-code.patch +++ b/0022-xwayland-Remove-Xdnd-selection-watching-code.patch @@ -1,7 +1,7 @@ -From 555c7ef6ca7846f68ec8d2ac680e50558b043f39 Mon Sep 17 00:00:00 2001 +From 048c854b7332d19b0654e856c414115acfd456b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Wed, 11 Sep 2013 11:15:18 -0700 -Subject: [PATCH 22/30] xwayland: Remove Xdnd selection watching code +Subject: [PATCH 22/39] xwayland: Remove Xdnd selection watching code We don't need this in the server, the wm can manage dnd proxying. --- diff --git a/0023-xf86Init-trim-out-non-wayland-capable-servers-from-d.patch b/0023-xf86Init-trim-out-non-wayland-capable-servers-from-d.patch index 47c9a29..0705c3e 100644 --- a/0023-xf86Init-trim-out-non-wayland-capable-servers-from-d.patch +++ b/0023-xf86Init-trim-out-non-wayland-capable-servers-from-d.patch @@ -1,7 +1,7 @@ -From 1173a0b6937bda0e684d75111242c2f513b3d072 Mon Sep 17 00:00:00 2001 +From 7865d8abc9fe47ccde165f37c4a887fb398f7216 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Fri, 13 Sep 2013 17:17:16 -0400 -Subject: [PATCH 23/30] xf86Init: trim out non-wayland capable servers from +Subject: [PATCH 23/39] xf86Init: trim out non-wayland capable servers from drive list Otherwise they'll cause the server to crash when run in wayland mode. @@ -10,10 +10,10 @@ Otherwise they'll cause the server to crash when run in wayland mode. 1 file changed, 9 insertions(+) diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c -index 5ac97cc..a5a7daf 100644 +index 2d3bb01..6282252 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c -@@ -568,6 +568,15 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv) +@@ -558,6 +558,15 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv) } } diff --git a/0024-Add-XORG_WAYLAND-symbol-to-xorg-config.h.in.patch b/0024-Add-XORG_WAYLAND-symbol-to-xorg-config.h.in.patch index 7674337..302bb50 100644 --- a/0024-Add-XORG_WAYLAND-symbol-to-xorg-config.h.in.patch +++ b/0024-Add-XORG_WAYLAND-symbol-to-xorg-config.h.in.patch @@ -1,7 +1,7 @@ -From 6c2b9647f370b0381756b2b2438c4d69d3327c92 Mon Sep 17 00:00:00 2001 +From 58a429b667443eb2c38bad82358edc1d3df045c5 Mon Sep 17 00:00:00 2001 From: Giovanni Campagna Date: Fri, 13 Sep 2013 15:52:29 +0200 -Subject: [PATCH 24/30] Add XORG_WAYLAND symbol to xorg-config.h.in +Subject: [PATCH 24/39] Add XORG_WAYLAND symbol to xorg-config.h.in We manually duplicate symbols that we want in both xorg-server.h and xorg-config.h. XORG_WAYLAND is one such symbol, but it was missing from @@ -11,12 +11,12 @@ xorg-config.h.in. 1 file changed, 3 insertions(+) diff --git a/include/xorg-config.h.in b/include/xorg-config.h.in -index a71b25d..b77e72c 100644 +index 0df31ae..8aec1d8 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 +@@ -142,4 +142,7 @@ + /* Define to 1 if you have the `seteuid' function. */ + #undef HAVE_SETEUID +/* Building Xorg server. */ +#undef XORG_WAYLAND diff --git a/0025-Fix-fallback-loading-of-the-wayland-driver.patch b/0025-Fix-fallback-loading-of-the-wayland-driver.patch index 8f85764..9e249bb 100644 --- a/0025-Fix-fallback-loading-of-the-wayland-driver.patch +++ b/0025-Fix-fallback-loading-of-the-wayland-driver.patch @@ -1,7 +1,7 @@ -From ba1428dcb8cdeb22f93c1e3739a7bb8384ec705a Mon Sep 17 00:00:00 2001 +From b04cf1f3df9627b804de1c0c2a2436a608992333 Mon Sep 17 00:00:00 2001 From: Giovanni Campagna Date: Fri, 13 Sep 2013 15:52:30 +0200 -Subject: [PATCH 25/30] Fix fallback loading of the wayland driver +Subject: [PATCH 25/39] Fix fallback loading of the wayland driver Fix the array name to actually compile, and fix the driver name with the new upstream. @@ -24,10 +24,10 @@ index d5a3370..b35cb96 100644 #endif #if !defined(__linux__) && defined(__sparc__) diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c -index 434249b..ffbea8f 100644 +index c65cb80..8255d8d 100644 --- a/hw/xfree86/common/xf86Config.c +++ b/hw/xfree86/common/xf86Config.c -@@ -520,7 +520,7 @@ fixup_video_driver_list(char **drivers) +@@ -521,7 +521,7 @@ fixup_video_driver_list(char **drivers) { static const char *fallback_hw[4] = { "vesa", "fbdev", "wsfb", NULL }; #ifdef XORG_WAYLAND diff --git a/0026-xwayland-Don-t-include-xorg-server.h.patch b/0026-xwayland-Don-t-include-xorg-server.h.patch index 5d5dc65..3233ee9 100644 --- a/0026-xwayland-Don-t-include-xorg-server.h.patch +++ b/0026-xwayland-Don-t-include-xorg-server.h.patch @@ -1,7 +1,7 @@ -From cf5cf51ba3c19b2a736aa30eaf6f43c6f0b971f4 Mon Sep 17 00:00:00 2001 +From 043aa3410eaebb0bf97b6efd2e1897f53d69e76d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Fri, 13 Sep 2013 14:52:13 -0700 -Subject: [PATCH 26/30] xwayland: Don't include xorg-server.h +Subject: [PATCH 26/39] xwayland: Don't include xorg-server.h xorg-config.h now has the XORG_WAYLAND define. --- diff --git a/0027-os-Don-t-include-xorg-server.h.patch b/0027-os-Don-t-include-xorg-server.h.patch index 8c64edb..5d44a3f 100644 --- a/0027-os-Don-t-include-xorg-server.h.patch +++ b/0027-os-Don-t-include-xorg-server.h.patch @@ -1,7 +1,7 @@ -From 9e3f213572e83f38cc86dc4b68c5ccb547a6b0fe Mon Sep 17 00:00:00 2001 +From 77e8c128a8f939895907060126539b2913326e75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Fri, 13 Sep 2013 14:53:16 -0700 -Subject: [PATCH 27/30] os: Don't include xorg-server.h +Subject: [PATCH 27/39] os: Don't include xorg-server.h Just always compile in ListenOnOpenFD and AddClientOnOpenFD, they don't depend on anything from Quartz or Wayland. diff --git a/0028-os-Also-define-ListenOnOpenFD-and-AddClientOnOpenFD-.patch b/0028-os-Also-define-ListenOnOpenFD-and-AddClientOnOpenFD-.patch index 9d214ad..4ff5637 100644 --- a/0028-os-Also-define-ListenOnOpenFD-and-AddClientOnOpenFD-.patch +++ b/0028-os-Also-define-ListenOnOpenFD-and-AddClientOnOpenFD-.patch @@ -1,7 +1,7 @@ -From cc086626e1e02a0639f6107ae10fdbffc9640551 Mon Sep 17 00:00:00 2001 +From 31d81fa77db3989a987b12a822130f8f12cc2276 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Fri, 13 Sep 2013 15:16:31 -0700 -Subject: [PATCH 28/30] os: Also define ListenOnOpenFD and AddClientOnOpenFD +Subject: [PATCH 28/39] os: Also define ListenOnOpenFD and AddClientOnOpenFD unconditionally Remove the #ifdef from the header file as well. diff --git a/0029-xwayland-Remove-unused-variables.patch b/0029-xwayland-Remove-unused-variables.patch index e1d9d53..89fc23a 100644 --- a/0029-xwayland-Remove-unused-variables.patch +++ b/0029-xwayland-Remove-unused-variables.patch @@ -1,7 +1,7 @@ -From ad867da0bccaf1b1d0c726e0e44721ea9cb299bf Mon Sep 17 00:00:00 2001 +From 6e37c4facede1739b5e4e84d775f480d5ebd67ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Mon, 16 Sep 2013 11:51:57 -0700 -Subject: [PATCH 29/30] xwayland: Remove unused variables +Subject: [PATCH 29/39] xwayland: Remove unused variables --- hw/xfree86/xwayland/xwayland-window.c | 3 --- diff --git a/0030-xwayland-Use-a-per-screen-private-key-for-cursor-pri.patch b/0030-xwayland-Use-a-per-screen-private-key-for-cursor-pri.patch index b1ac41a..b4f81da 100644 --- a/0030-xwayland-Use-a-per-screen-private-key-for-cursor-pri.patch +++ b/0030-xwayland-Use-a-per-screen-private-key-for-cursor-pri.patch @@ -1,7 +1,7 @@ -From 696902dbd5a87b09e2972066d9d87928fdc2f61d Mon Sep 17 00:00:00 2001 +From ce5be44c0556b9b097b4800aee75025feef9e2ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Mon, 16 Sep 2013 12:05:19 -0700 -Subject: [PATCH 30/30] xwayland: Use a per-screen private key for cursor +Subject: [PATCH 30/39] xwayland: Use a per-screen private key for cursor privates The cursor is a per-display object, so we need to set private data on it diff --git a/0031-XWayland-Don-t-commit-empty-surfaces.patch b/0031-XWayland-Don-t-commit-empty-surfaces.patch new file mode 100644 index 0000000..078cf39 --- /dev/null +++ b/0031-XWayland-Don-t-commit-empty-surfaces.patch @@ -0,0 +1,31 @@ +From fc45cb4efcb5dd4de3e90911b44c6d66ef6e6618 Mon Sep 17 00:00:00 2001 +From: Daniel Stone +Date: Thu, 12 Sep 2013 16:58:00 -0400 +Subject: [PATCH 31/39] XWayland: Don't commit empty surfaces + +Instead of attaching, damaging and then committing a new buffer as soon +as we allocate a pixmap, just attach and damage the entire buffer. When +the buffer is changed, we'll commit the changes. + +This avoids an ugly black (on SHM) flash when a window is mapped or +resized. + +Signed-off-by: Daniel Stone +--- + hw/xfree86/xwayland/xwayland-window.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/hw/xfree86/xwayland/xwayland-window.c b/hw/xfree86/xwayland/xwayland-window.c +index 20db80c..5045e65 100644 +--- a/hw/xfree86/xwayland/xwayland-window.c ++++ b/hw/xfree86/xwayland/xwayland-window.c +@@ -80,7 +80,6 @@ xwl_window_attach(struct xwl_window *xwl_window, PixmapPtr pixmap) + wl_surface_damage(xwl_window->surface, 0, 0, + pixmap->drawable.width, + pixmap->drawable.height); +- wl_surface_commit(xwl_window->surface); + + callback = wl_display_sync(xwl_screen->display); + wl_callback_add_listener(callback, &free_pixmap_listener, pixmap); +-- +1.8.3.1 diff --git a/0032-xwayland-Also-look-for-wlglamor.patch b/0032-xwayland-Also-look-for-wlglamor.patch new file mode 100644 index 0000000..309e921 --- /dev/null +++ b/0032-xwayland-Also-look-for-wlglamor.patch @@ -0,0 +1,23 @@ +From f6f1c358958303aaa0cb2ae40044dd8cdc756618 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= +Date: Fri, 11 Oct 2013 16:14:54 -0700 +Subject: [PATCH 32/39] xwayland: Also look for wlglamor + +--- + hw/xfree86/common/xf86AutoConfig.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/hw/xfree86/common/xf86AutoConfig.c b/hw/xfree86/common/xf86AutoConfig.c +index b35cb96..9576b86 100644 +--- a/hw/xfree86/common/xf86AutoConfig.c ++++ b/hw/xfree86/common/xf86AutoConfig.c +@@ -285,6 +285,7 @@ listPossibleVideoDrivers(char *matches[], int nmatches) + if (i < (nmatches - 1)) { + #ifdef XORG_WAYLAND + if (xorgWayland) ++ matches[i++] = xnfstrdup("wlglamor"); + matches[i++] = xnfstrdup("wayland"); + else + #endif +-- +1.8.3.1 diff --git a/0033-xwayland-Add-wlglamor-the-right-way.patch b/0033-xwayland-Add-wlglamor-the-right-way.patch new file mode 100644 index 0000000..0dded55 --- /dev/null +++ b/0033-xwayland-Add-wlglamor-the-right-way.patch @@ -0,0 +1,32 @@ +From 6ed319fdf521f3a36eb9635297beec3d3d23be8d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= +Date: Fri, 11 Oct 2013 16:29:02 -0700 +Subject: [PATCH 33/39] xwayland: Add wlglamor the right way + +Defeated by #ifdefs. +--- + hw/xfree86/common/xf86AutoConfig.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/hw/xfree86/common/xf86AutoConfig.c b/hw/xfree86/common/xf86AutoConfig.c +index 9576b86..cc6dcce 100644 +--- a/hw/xfree86/common/xf86AutoConfig.c ++++ b/hw/xfree86/common/xf86AutoConfig.c +@@ -282,12 +282,12 @@ listPossibleVideoDrivers(char *matches[], int nmatches) + + #if !defined(sun) + /* Fallback to platform default frame buffer driver */ +- if (i < (nmatches - 1)) { ++ if (i < (nmatches - 2)) { + #ifdef XORG_WAYLAND +- if (xorgWayland) ++ if (xorgWayland) { + matches[i++] = xnfstrdup("wlglamor"); + matches[i++] = xnfstrdup("wayland"); +- else ++ } else + #endif + #if !defined(__linux__) && defined(__sparc__) + matches[i++] = xnfstrdup("wsfb"); +-- +1.8.3.1 diff --git a/0034-xwayland-Don-t-redirect-windows-leave-it-to-the-wm.patch b/0034-xwayland-Don-t-redirect-windows-leave-it-to-the-wm.patch new file mode 100644 index 0000000..838c50f --- /dev/null +++ b/0034-xwayland-Don-t-redirect-windows-leave-it-to-the-wm.patch @@ -0,0 +1,90 @@ +From 0f0a11b4d5d573080e9db39d150eb66d78a9aab2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= +Date: Fri, 11 Oct 2013 15:41:59 -0700 +Subject: [PATCH 34/39] xwayland: Don't redirect windows, leave it to the wm + +--- + hw/xfree86/xwayland/xwayland-window.c | 51 ----------------------------------- + 1 file changed, 51 deletions(-) + +diff --git a/hw/xfree86/xwayland/xwayland-window.c b/hw/xfree86/xwayland/xwayland-window.c +index 5045e65..c03855c 100644 +--- a/hw/xfree86/xwayland/xwayland-window.c ++++ b/hw/xfree86/xwayland/xwayland-window.c +@@ -31,11 +31,9 @@ + #include + #include + #include +-#include + + #include + #include +-#include + #include + + #include "xwayland.h" +@@ -86,49 +84,6 @@ xwl_window_attach(struct xwl_window *xwl_window, PixmapPtr pixmap) + pixmap->refcnt++; + } + +-static Bool +-xwl_create_window(WindowPtr window) +-{ +- ScreenPtr screen = window->drawable.pScreen; +- struct xwl_screen *xwl_screen; +- Bool ret; +- +- xwl_screen = xwl_screen_get(screen); +- +- screen->CreateWindow = xwl_screen->CreateWindow; +- ret = (*screen->CreateWindow)(window); +- xwl_screen->CreateWindow = screen->CreateWindow; +- screen->CreateWindow = xwl_create_window; +- +- if (!(xwl_screen->flags & XWL_FLAGS_ROOTLESS) || +- window->parent != NULL) +- return ret; +- +- CompositeRedirectSubwindows(window, CompositeRedirectManual); +- +- return ret; +-} +- +-static int +-xwl_destroy_window (WindowPtr window) +-{ +- ScreenPtr screen = window->drawable.pScreen; +- struct xwl_screen *xwl_screen; +- Bool ret; +- +- if (window->parent == NULL) +- CompositeUnRedirectSubwindows (window, CompositeRedirectManual); +- +- xwl_screen = xwl_screen_get(screen); +- +- screen->DestroyWindow = xwl_screen->DestroyWindow; +- ret = (*screen->DestroyWindow)(window); +- xwl_screen->DestroyWindow = screen->DestroyWindow; +- screen->DestroyWindow = xwl_destroy_window; +- +- return ret; +-} +- + static void + damage_report(DamagePtr pDamage, RegionPtr pRegion, void *data) + { +@@ -290,12 +245,6 @@ xwl_screen_init_window(struct xwl_screen *xwl_screen, ScreenPtr screen) + if (!dixRegisterPrivateKey(&xwl_window_private_key, PRIVATE_WINDOW, 0)) + return BadAlloc; + +- xwl_screen->CreateWindow = screen->CreateWindow; +- screen->CreateWindow = xwl_create_window; +- +- xwl_screen->DestroyWindow = screen->DestroyWindow; +- screen->DestroyWindow = xwl_destroy_window; +- + xwl_screen->RealizeWindow = screen->RealizeWindow; + screen->RealizeWindow = xwl_realize_window; + +-- +1.8.3.1 diff --git a/0035-Revert-Export-CompositeRedirectSubwindows-and-Compos.patch b/0035-Revert-Export-CompositeRedirectSubwindows-and-Compos.patch new file mode 100644 index 0000000..395388a --- /dev/null +++ b/0035-Revert-Export-CompositeRedirectSubwindows-and-Compos.patch @@ -0,0 +1,67 @@ +From 15a94f4f263cfe848382e0587a68d48da31a24b3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= +Date: Fri, 11 Oct 2013 16:40:39 -0700 +Subject: [PATCH 35/39] Revert "Export CompositeRedirectSubwindows and + CompositeUnRedirectSubwindows" + +This reverts commit 15a7e62a9848f2089180c49b02887565d29bb896. + +Now that we don't redirect windows on behalf of the wm, we don't need this. +--- + composite/compalloc.c | 11 ----------- + composite/compositeext.h | 4 ---- + 2 files changed, 15 deletions(-) + +diff --git a/composite/compalloc.c b/composite/compalloc.c +index 98b27b1..b7d731e 100644 +--- a/composite/compalloc.c ++++ b/composite/compalloc.c +@@ -46,7 +46,6 @@ + #endif + + #include "compint.h" +-#include "compositeext.h" + + static void + compScreenUpdate(ScreenPtr pScreen) +@@ -412,11 +411,6 @@ compRedirectSubwindows(ClientPtr pClient, WindowPtr pWin, int update) + return Success; + } + +-int CompositeRedirectSubwindows (WindowPtr pWin, int update) +-{ +- return compRedirectSubwindows (serverClient, pWin, update); +-} +- + /* + * Free one of the per-client per-subwindows resources, + * which frees one redirect per subwindow +@@ -488,11 +482,6 @@ compUnredirectSubwindows(ClientPtr pClient, WindowPtr pWin, int update) + return BadValue; + } + +-int CompositeUnRedirectSubwindows (WindowPtr pWin, int update) +-{ +- return compUnredirectSubwindows (serverClient, pWin, update); +-} +- + /* + * Add redirection information for one subwindow (during reparent) + */ +diff --git a/composite/compositeext.h b/composite/compositeext.h +index a072966..0b148f0 100644 +--- a/composite/compositeext.h ++++ b/composite/compositeext.h +@@ -34,10 +34,6 @@ + extern _X_EXPORT Bool CompositeRegisterAlternateVisuals(ScreenPtr pScreen, + VisualID * vids, + int nVisuals); +-extern _X_EXPORT int CompositeRedirectSubwindows(WindowPtr pWin, +- int update); +-extern _X_EXPORT int CompositeUnRedirectSubwindows (WindowPtr pWin, +- int update); + + extern _X_EXPORT RESTYPE CompositeClientWindowType; + +-- +1.8.3.1 diff --git a/0036-xwayland-Fix-hidden-cursor.patch b/0036-xwayland-Fix-hidden-cursor.patch new file mode 100644 index 0000000..41ad5ad --- /dev/null +++ b/0036-xwayland-Fix-hidden-cursor.patch @@ -0,0 +1,37 @@ +From 00e15ddb814dd39bbe7915fff7920aa90ca52cea Mon Sep 17 00:00:00 2001 +From: Trevor McCort +Date: Tue, 15 Oct 2013 19:41:12 -0500 +Subject: [PATCH 36/39] xwayland: Fix hidden cursor + +If a cursor is set when bits->emptyMask is true, the xserver +sets a NULL cursor instead. + +Signed-off-by: Trevor McCort +--- + hw/xfree86/xwayland/xwayland-cursor.c | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/hw/xfree86/xwayland/xwayland-cursor.c b/hw/xfree86/xwayland/xwayland-cursor.c +index 2cdd248..2b3cb5e 100644 +--- a/hw/xfree86/xwayland/xwayland-cursor.c ++++ b/hw/xfree86/xwayland/xwayland-cursor.c +@@ -153,9 +153,16 @@ xwl_seat_set_cursor(struct xwl_seat *xwl_seat) + { + struct wl_buffer *buffer; + +- if (!xwl_seat->x_cursor || !xwl_seat->wl_pointer) ++ if (!xwl_seat->wl_pointer) + return; + ++ if (!xwl_seat->x_cursor) { ++ wl_pointer_set_cursor(xwl_seat->wl_pointer, ++ xwl_seat->pointer_enter_serial, ++ NULL, 0, 0); ++ return; ++ } ++ + buffer = dixGetPrivate(&xwl_seat->x_cursor->devPrivates, + &xwl_seat->xwl_screen->cursor_private_key); + +-- +1.8.3.1 diff --git a/0037-xkb-Repurpose-XkbCopyDeviceKeymap-to-apply-a-given-k.patch b/0037-xkb-Repurpose-XkbCopyDeviceKeymap-to-apply-a-given-k.patch new file mode 100644 index 0000000..966d11f --- /dev/null +++ b/0037-xkb-Repurpose-XkbCopyDeviceKeymap-to-apply-a-given-k.patch @@ -0,0 +1,98 @@ +From 1af712071d2cf7aac5232da166276d38cded68e7 Mon Sep 17 00:00:00 2001 +From: Rui Matos +Date: Tue, 22 Oct 2013 16:50:29 +0200 +Subject: [PATCH 37/39] xkb: Repurpose XkbCopyDeviceKeymap to apply a given + keymap to a device + +This will also make it useful for cases when we have a new keymap to +apply to a device but don't have a source device. +--- + Xi/exevents.c | 2 +- + include/xkbsrv.h | 4 ++-- + xkb/xkb.c | 2 +- + xkb/xkbUtils.c | 14 +++++++------- + 4 files changed, 11 insertions(+), 11 deletions(-) + +diff --git a/Xi/exevents.c b/Xi/exevents.c +index f510a9e..5b6d370 100644 +--- a/Xi/exevents.c ++++ b/Xi/exevents.c +@@ -230,7 +230,7 @@ CopyKeyClass(DeviceIntPtr device, DeviceIntPtr master) + + mk->sourceid = device->id; + +- if (!XkbCopyDeviceKeymap(master, device)) ++ if (!XkbDeviceApplyKeymap(master, device->key->xkbInfo->desc)) + FatalError("Couldn't pivot keymap from device to core!\n"); + } + +diff --git a/include/xkbsrv.h b/include/xkbsrv.h +index bef98ef..83ee1d0 100644 +--- a/include/xkbsrv.h ++++ b/include/xkbsrv.h +@@ -812,8 +812,8 @@ extern _X_EXPORT void XkbSendNewKeyboardNotify(DeviceIntPtr /* kbd */ , + extern Bool XkbCopyKeymap(XkbDescPtr /* dst */ , + XkbDescPtr /* src */ ); + +-extern _X_EXPORT Bool XkbCopyDeviceKeymap(DeviceIntPtr /* dst */ , +- DeviceIntPtr /* src */ ); ++extern _X_EXPORT Bool XkbDeviceApplyKeymap(DeviceIntPtr /* dst */ , ++ XkbDescPtr /* src */ ); + + extern void XkbFilterEvents(ClientPtr /* pClient */ , + int /* nEvents */ , +diff --git a/xkb/xkb.c b/xkb/xkb.c +index c78aceb..7a631b8 100644 +--- a/xkb/xkb.c ++++ b/xkb/xkb.c +@@ -5991,7 +5991,7 @@ ProcXkbGetKbdByName(ClientPtr client) + continue; + + if (tmpd != dev) +- XkbCopyDeviceKeymap(tmpd, dev); ++ XkbDeviceApplyKeymap(tmpd, xkb); + + if (tmpd->kbdfeed && tmpd->kbdfeed->xkb_sli) { + old_sli = tmpd->kbdfeed->xkb_sli; +diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c +index 6c6af60..1f8a839 100644 +--- a/xkb/xkbUtils.c ++++ b/xkb/xkbUtils.c +@@ -1999,28 +1999,28 @@ XkbCopyKeymap(XkbDescPtr dst, XkbDescPtr src) + } + + Bool +-XkbCopyDeviceKeymap(DeviceIntPtr dst, DeviceIntPtr src) ++XkbDeviceApplyKeymap(DeviceIntPtr dst, XkbDescPtr desc) + { + xkbNewKeyboardNotify nkn; + Bool ret; + +- if (!dst->key || !src->key) ++ if (!dst->key || !desc) + return FALSE; + + memset(&nkn, 0, sizeof(xkbNewKeyboardNotify)); + nkn.oldMinKeyCode = dst->key->xkbInfo->desc->min_key_code; + nkn.oldMaxKeyCode = dst->key->xkbInfo->desc->max_key_code; + nkn.deviceID = dst->id; +- nkn.oldDeviceID = dst->id; /* maybe src->id? */ +- nkn.minKeyCode = src->key->xkbInfo->desc->min_key_code; +- nkn.maxKeyCode = src->key->xkbInfo->desc->max_key_code; ++ nkn.oldDeviceID = dst->id; ++ nkn.minKeyCode = desc->min_key_code; ++ nkn.maxKeyCode = desc->max_key_code; + nkn.requestMajor = XkbReqCode; + nkn.requestMinor = X_kbSetMap; /* Near enough's good enough. */ + nkn.changed = XkbNKN_KeycodesMask; +- if (src->key->xkbInfo->desc->geom) ++ if (desc->geom) + nkn.changed |= XkbNKN_GeometryMask; + +- ret = XkbCopyKeymap(dst->key->xkbInfo->desc, src->key->xkbInfo->desc); ++ ret = XkbCopyKeymap(dst->key->xkbInfo->desc, desc); + if (ret) + XkbSendNewKeyboardNotify(dst, &nkn); + +-- +1.8.3.1 diff --git a/0038-xkb-Factor-out-a-function-to-copy-a-keymap-s-control.patch b/0038-xkb-Factor-out-a-function-to-copy-a-keymap-s-control.patch new file mode 100644 index 0000000..1c1c863 --- /dev/null +++ b/0038-xkb-Factor-out-a-function-to-copy-a-keymap-s-control.patch @@ -0,0 +1,90 @@ +From 50904d21bffcd88bede056d10e7826d5f6c83278 Mon Sep 17 00:00:00 2001 +From: Rui Matos +Date: Mon, 21 Oct 2013 14:41:53 +0200 +Subject: [PATCH 38/39] xkb: Factor out a function to copy a keymap's controls + unto another + +--- + include/xkbsrv.h | 3 +++ + xkb/xkb.c | 14 +------------- + xkb/xkbUtils.c | 23 +++++++++++++++++++++++ + 3 files changed, 27 insertions(+), 13 deletions(-) + +diff --git a/include/xkbsrv.h b/include/xkbsrv.h +index 83ee1d0..6a2e96e 100644 +--- a/include/xkbsrv.h ++++ b/include/xkbsrv.h +@@ -829,6 +829,9 @@ extern void XkbFakeDeviceButton(DeviceIntPtr /* dev */ , + int /* press */ , + int /* button */ ); + ++extern _X_EXPORT void XkbCopyControls(XkbDescPtr /* dst */ , ++ XkbDescPtr /* src */ ); ++ + #include "xkbfile.h" + #include "xkbrules.h" + +diff --git a/xkb/xkb.c b/xkb/xkb.c +index 7a631b8..6a68e81 100644 +--- a/xkb/xkb.c ++++ b/xkb/xkb.c +@@ -5950,25 +5950,13 @@ ProcXkbGetKbdByName(ClientPtr client) + if (rep.loaded) { + XkbDescPtr old_xkb; + xkbNewKeyboardNotify nkn; +- int i, nG, nTG; + + old_xkb = xkb; + xkb = new; + dev->key->xkbInfo->desc = xkb; + new = old_xkb; /* so it'll get freed automatically */ + +- *xkb->ctrls = *old_xkb->ctrls; +- for (nG = nTG = 0, i = xkb->min_key_code; i <= xkb->max_key_code; i++) { +- nG = XkbKeyNumGroups(xkb, i); +- if (nG >= XkbNumKbdGroups) { +- nTG = XkbNumKbdGroups; +- break; +- } +- if (nG > nTG) { +- nTG = nG; +- } +- } +- xkb->ctrls->num_groups = nTG; ++ XkbCopyControls(xkb, old_xkb); + + nkn.deviceID = nkn.oldDeviceID = dev->id; + nkn.minKeyCode = new->min_key_code; +diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c +index 1f8a839..6cf6e79 100644 +--- a/xkb/xkbUtils.c ++++ b/xkb/xkbUtils.c +@@ -2090,3 +2090,26 @@ XkbMergeLockedPtrBtns(DeviceIntPtr master) + xkbi->lockedPtrButtons |= d->key->xkbInfo->lockedPtrButtons; + } + } ++ ++void ++XkbCopyControls(XkbDescPtr dst, XkbDescPtr src) ++{ ++ int i, nG, nTG; ++ ++ if (!dst || !src) ++ return; ++ ++ *dst->ctrls = *src->ctrls; ++ ++ for (nG = nTG = 0, i = dst->min_key_code; i <= dst->max_key_code; i++) { ++ nG = XkbKeyNumGroups(dst, i); ++ if (nG >= XkbNumKbdGroups) { ++ nTG = XkbNumKbdGroups; ++ break; ++ } ++ if (nG > nTG) { ++ nTG = nG; ++ } ++ } ++ dst->ctrls->num_groups = nTG; ++} +-- +1.8.3.1 diff --git a/0039-xwayland-Handle-keymap-changes.patch b/0039-xwayland-Handle-keymap-changes.patch new file mode 100644 index 0000000..32cf3af --- /dev/null +++ b/0039-xwayland-Handle-keymap-changes.patch @@ -0,0 +1,86 @@ +From f56320a89c3da88bc844069e33edf34cca09e39a Mon Sep 17 00:00:00 2001 +From: Rui Matos +Date: Mon, 21 Oct 2013 14:41:54 +0200 +Subject: [PATCH 39/39] xwayland: Handle keymap changes + +--- + hw/xfree86/xwayland/xwayland-input.c | 39 +++++++++++++++++++++++++++++++++--- + include/input.h | 2 +- + 2 files changed, 37 insertions(+), 4 deletions(-) + +diff --git a/hw/xfree86/xwayland/xwayland-input.c b/hw/xfree86/xwayland/xwayland-input.c +index d031b34..ebf1af1 100644 +--- a/hw/xfree86/xwayland/xwayland-input.c ++++ b/hw/xfree86/xwayland/xwayland-input.c +@@ -143,7 +143,10 @@ xwl_keyboard_proc(DeviceIntPtr device, int what) + switch (what) { + case DEVICE_INIT: + device->public.on = FALSE; +- len = strnlen(xwl_seat->keymap, xwl_seat->keymap_size); ++ if (xwl_seat->keymap) ++ len = strnlen(xwl_seat->keymap, xwl_seat->keymap_size); ++ else ++ len = 0; + if (!InitKeyboardDeviceStructFromString(device, xwl_seat->keymap, + len, + NULL, xwl_keyboard_control)) +@@ -453,12 +456,42 @@ keyboard_handle_keymap(void *data, struct wl_keyboard *keyboard, + uint32_t format, int fd, uint32_t size) + { + struct xwl_seat *xwl_seat = data; ++ DeviceIntPtr master; ++ XkbDescPtr xkb; ++ XkbChangesRec changes = { 0 }; ++ ++ if (xwl_seat->keymap) ++ munmap(xwl_seat->keymap, xwl_seat->keymap_size); + + xwl_seat->keymap_size = size; + xwl_seat->keymap = mmap(NULL, size, PROT_READ, MAP_SHARED, fd, 0); +- if (xwl_seat->keymap == MAP_FAILED) +- ; /* wah wah */ ++ if (xwl_seat->keymap == MAP_FAILED) { ++ xwl_seat->keymap_size = 0; ++ xwl_seat->keymap = NULL; ++ goto out; ++ } ++ ++ if (!xwl_seat->keyboard) ++ goto out; ++ ++ xkb = XkbCompileKeymapFromString(xwl_seat->keyboard, xwl_seat->keymap, ++ strnlen(xwl_seat->keymap, xwl_seat->keymap_size)); ++ if (!xkb) ++ goto out; ++ ++ XkbUpdateDescActions(xkb, xkb->min_key_code, XkbNumKeys(xkb), &changes); ++ /* Keep the current controls */ ++ XkbCopyControls(xkb, xwl_seat->keyboard->key->xkbInfo->desc); ++ ++ XkbDeviceApplyKeymap(xwl_seat->keyboard, xkb); ++ ++ master = GetMaster(xwl_seat->keyboard, MASTER_KEYBOARD); ++ if (master && master->lastSlave == xwl_seat->keyboard) ++ XkbDeviceApplyKeymap(master, xkb); ++ ++ XkbFreeKeyboard(xkb, XkbAllComponentsMask, TRUE); + ++ out: + close(fd); + } + +diff --git a/include/input.h b/include/input.h +index 6573a3a..1edcedc 100644 +--- a/include/input.h ++++ b/include/input.h +@@ -508,7 +508,7 @@ extern int AttachDevice(ClientPtr client, + DeviceIntPtr slave, DeviceIntPtr master); + + extern _X_EXPORT DeviceIntPtr GetPairedDevice(DeviceIntPtr kbd); +-extern DeviceIntPtr GetMaster(DeviceIntPtr dev, int type); ++extern _X_EXPORT DeviceIntPtr GetMaster(DeviceIntPtr dev, int type); + + extern _X_EXPORT int AllocDevicePair(ClientPtr client, + const char *name, +-- +1.8.3.1 diff --git a/driver-abi-rebuild.sh b/driver-abi-rebuild.sh index 34add3d..576d5e0 100755 --- a/driver-abi-rebuild.sh +++ b/driver-abi-rebuild.sh @@ -5,10 +5,10 @@ builddir="abi-rebuild" -if [ -e "$builddir" ]; then - echo "Path '$builddir' exists. Move out of the way first" - exit 1 -fi +#if [ -e "$builddir" ]; then +# echo "Path '$builddir' exists. Move out of the way first" +# exit 1 +#fi mkdir -p $builddir pushd $builddir @@ -36,11 +36,15 @@ extradrivers="xorg-x11-drv-ivtv" rm -rf xorg-x11-drivers echo $driverlist $extradrivers | xargs -n1 $pkg co $branch -for i in */ ; do +for i in xorg-x11-drv-*/ ; do [ -e $i/dead.package ] && continue pushd $i rpmdev-bumpspec -c "- ABI rebuild" *.spec - $pkg commit -c -p && $pkg build --nowait + #$pkg commit -c -p && $pkg build --nowait + #$pkg mockbuild + $pkg srpm + #mockchain -r fedora-20-x86_64 -l $OLDPWD + #mockchain -r rhel-7.0-candidate-x86_64 -l $OLDPWD popd done diff --git a/xorg-x11-server.spec b/xorg-x11-server.spec index 5ecfcc4..6430723 100644 --- a/xorg-x11-server.spec +++ b/xorg-x11-server.spec @@ -8,8 +8,8 @@ # format, and add a PatchN: line. If you want to push something upstream, # check out the master branch, pull, cherry-pick, and push. -#global gitdate 20130215 -%global stable_abi 1 +%global gitdate 20131021 +%global stable_abi 0 %if !0%{?gitdate} || %{stable_abi} # Released ABI versions. Have to keep these manually in sync with the @@ -41,8 +41,8 @@ Summary: X.Org X11 X server Name: xorg-x11-server -Version: 1.14.3 -Release: 6%{?gitdate:.%{gitdate}}%{dist} +Version: 1.14.99.3 +Release: 1%{?gitdate:.%{gitdate}}%{dist} URL: http://www.x.org License: MIT Group: User Interface/X @@ -51,7 +51,8 @@ Group: User Interface/X %if 0%{?gitdate} # git snapshot. to recreate, run: # ./make-git-snapshot.sh `cat commitid` -Source0: xorg-server-%{gitdate}.tar.xz +#Source0: xorg-server-%{gitdate}.tar.xz +Source0: http://www.x.org/pub/individual/xserver/%{pkgname}-%{version}.tar.bz2 Source1: make-git-snapshot.sh Source2: commitid %else @@ -73,6 +74,48 @@ Source31: xserver-sdk-abi-requires.git # maintainer convenience script Source40: driver-abi-rebuild.sh +# xwayland. trivial rebase onto master: +# http://cgit.freedesktop.org/~ajax/xserver/log/?h=wl-rebase-for-f20 +Patch0000: 0001-dbe-Cleanup-in-CloseScreen-hook-not-ext-CloseDown.patch +Patch0001: 0002-xkb-Add-struct-XkbCompContext.patch +Patch0002: 0003-xkb-Split-out-code-to-start-and-finish-xkbcomp.patch +Patch0003: 0004-xkb-Add-XkbCompileKeymapFromString.patch +Patch0004: 0005-configure-Track-updated-version-of-libxtrans.patch +Patch0005: 0006-os-Add-a-function-to-create-a-client-for-an-fd.patch +Patch0006: 0007-Export-xf86NewInputDevice-and-xf86AllocateInput.patch +Patch0007: 0008-Export-CompositeRedirectSubwindows-and-CompositeUnRe.patch +Patch0008: 0009-Add-redirect-window-for-input-device-feature.patch +Patch0009: 0010-dri2-Introduce-a-third-version-of-the-AuthMagic-func.patch +Patch0010: 0011-Add-xwayland-module.patch +Patch0011: 0012-xwayland-Add-a-HW_WAYLAND-flag-to-let-drivers-explic.patch +Patch0012: 0013-xwayland-shm-don-t-create-alpha-buffers-if-the-windo.patch +Patch0013: 0014-xwayland-handle-global-object-destruction.patch +Patch0014: 0015-xwayland-add-support-for-multiple-outputs.patch +Patch0015: 0016-xwayland-Probe-outputs-on-preinit.patch +Patch0016: 0017-XFree86-Load-wlshm-driver-as-fallback-for-Wayland.patch +Patch0017: 0018-XWayland-Don-t-send-out-of-bounds-damage-co-ordinate.patch +Patch0018: 0019-xwayland-Introduce-an-auto-mode-for-enable-wayland.patch +Patch0019: 0020-XWayland-Don-t-hardcode-DRM-libs-and-lwayland-client.patch +Patch0020: 0021-XWayland-Support-16bpp-X-surfaces-in-DRM-SHM.patch +Patch0021: 0022-xwayland-Remove-Xdnd-selection-watching-code.patch +Patch0022: 0023-xf86Init-trim-out-non-wayland-capable-servers-from-d.patch +Patch0023: 0024-Add-XORG_WAYLAND-symbol-to-xorg-config.h.in.patch +Patch0024: 0025-Fix-fallback-loading-of-the-wayland-driver.patch +Patch0025: 0026-xwayland-Don-t-include-xorg-server.h.patch +Patch0026: 0027-os-Don-t-include-xorg-server.h.patch +Patch0027: 0028-os-Also-define-ListenOnOpenFD-and-AddClientOnOpenFD-.patch +Patch0028: 0029-xwayland-Remove-unused-variables.patch +Patch0029: 0030-xwayland-Use-a-per-screen-private-key-for-cursor-pri.patch +Patch0030: 0031-XWayland-Don-t-commit-empty-surfaces.patch +Patch0031: 0032-xwayland-Also-look-for-wlglamor.patch +Patch0032: 0033-xwayland-Add-wlglamor-the-right-way.patch +Patch0033: 0034-xwayland-Don-t-redirect-windows-leave-it-to-the-wm.patch +Patch0034: 0035-Revert-Export-CompositeRedirectSubwindows-and-Compos.patch +Patch0035: 0036-xwayland-Fix-hidden-cursor.patch +Patch0036: 0037-xkb-Repurpose-XkbCopyDeviceKeymap-to-apply-a-given-k.patch +Patch0037: 0038-xkb-Factor-out-a-function-to-copy-a-keymap-s-control.patch +Patch0038: 0039-xwayland-Handle-keymap-changes.patch + # Trivial things to never merge upstream ever: # This really could be done prettier. Patch5002: xserver-1.4.99-ssh-isnt-local.patch @@ -84,9 +127,6 @@ Patch6011: xserver-1.6.0-less-acpi-brokenness.patch Patch6030: xserver-1.6.99-right-of.patch #Patch6044: xserver-1.6.99-hush-prerelease-warning.patch -# upstream submitted -Patch6052: 0001-randr-upstream-set-changed-fixes.patch - # Fix libselinux-triggered build error # RedHat/Fedora-specific patch Patch7013: xserver-1.12-Xext-fix-selinux-build-failure.patch @@ -104,56 +144,14 @@ Patch7052: 0001-xf86-return-NULL-for-compat-output-if-no-outputs.patch # mustard: make the default queue length bigger to calm abrt down Patch7064: 0001-mieq-Bump-default-queue-size-to-512.patch -# scale events from abs devices in relative mode to something useful -Patch8003: 0004-dix-pre-scale-x-by-the-screen-device-resolution-rati.patch -Patch8004: 0005-dix-scale-y-back-instead-of-x-up-when-pre-scaling-co.patch - -# Bug 962572 - X-sandboxes are not resizeable -Patch8038: 0001-ephyr-Add-resizeable-option.patch - # Fix multiple monitors in reverse optimus configurations Patch8040: 0001-rrcrtc-brackets-are-hard-lets-go-shopping.patch Patch8041: 0001-pixmap-fix-reverse-optimus-support-with-multiple-hea.patch -# upstream in -next for 1.15, e21e183059df5975e7086850d1931edb2c1bbd06 -%if !0%{?rhel} -Patch7071: 0001-os-use-libunwind-to-generate-backtraces.patch -%endif - -# xwayland. trivial backport from master to 1.14: -# http://cgit.freedesktop.org/~ajax/xserver/log/?h=xwayland-1.14 -Patch9001: 0001-dbe-Cleanup-in-CloseScreen-hook-not-ext-CloseDown.patch -Patch9002: 0002-xkb-Add-struct-XkbCompContext.patch -Patch9003: 0003-xkb-Split-out-code-to-start-and-finish-xkbcomp.patch -Patch9004: 0004-xkb-Add-XkbCompileKeymapFromString.patch -Patch9005: 0005-configure-Track-updated-version-of-libxtrans.patch -Patch9006: 0006-os-Add-a-function-to-create-a-client-for-an-fd.patch -Patch9007: 0007-Export-xf86NewInputDevice-and-xf86AllocateInput.patch -Patch9008: 0008-Export-CompositeRedirectSubwindows-and-CompositeUnRe.patch -Patch9009: 0009-Add-redirect-window-for-input-device-feature.patch -Patch9010: 0010-dri2-Introduce-a-third-version-of-the-AuthMagic-func.patch -Patch9011: 0011-Add-xwayland-module.patch -Patch9012: 0012-xwayland-Add-a-HW_WAYLAND-flag-to-let-drivers-explic.patch -Patch9013: 0013-xwayland-shm-don-t-create-alpha-buffers-if-the-windo.patch -Patch9014: 0014-xwayland-handle-global-object-destruction.patch -Patch9015: 0015-xwayland-add-support-for-multiple-outputs.patch -Patch9016: 0016-xwayland-Probe-outputs-on-preinit.patch -Patch9017: 0017-XFree86-Load-wlshm-driver-as-fallback-for-Wayland.patch -Patch9018: 0018-XWayland-Don-t-send-out-of-bounds-damage-co-ordinate.patch -Patch9019: 0019-xwayland-Introduce-an-auto-mode-for-enable-wayland.patch -Patch9020: 0020-XWayland-Don-t-hardcode-DRM-libs-and-lwayland-client.patch -Patch9021: 0021-XWayland-Support-16bpp-X-surfaces-in-DRM-SHM.patch -Patch9022: 0022-xwayland-Remove-Xdnd-selection-watching-code.patch -Patch9023: 0023-xf86Init-trim-out-non-wayland-capable-servers-from-d.patch -Patch9024: 0024-Add-XORG_WAYLAND-symbol-to-xorg-config.h.in.patch -Patch9025: 0025-Fix-fallback-loading-of-the-wayland-driver.patch -Patch9026: 0026-xwayland-Don-t-include-xorg-server.h.patch -Patch9027: 0027-os-Don-t-include-xorg-server.h.patch -Patch9028: 0028-os-Also-define-ListenOnOpenFD-and-AddClientOnOpenFD-.patch -Patch9029: 0029-xwayland-Remove-unused-variables.patch -Patch9030: 0030-xwayland-Use-a-per-screen-private-key-for-cursor-pri.patch -Patch9031: 0001-xfree86-Only-look-at-wayland-capable-drivers-when-wa.patch -Patch9032: 0001-xwayland-Just-send-the-bounding-box-of-the-damage.patch +# extra magic to be upstreamed +Patch9001: 0001-xfree86-Only-look-at-wayland-capable-drivers-when-wa.patch +Patch9002: 0001-xwayland-Just-send-the-bounding-box-of-the-damage.patch +Patch9003: 0001-xwayland-Port-to-new-damage-API.patch # Bug 1019821: Xdmx mouse after button-click goes to upper-left position Patch9040: 0001-dmx-queue-button-events-with-valid-valuators.patch @@ -184,12 +182,12 @@ Patch9040: 0001-dmx-queue-button-events-with-valid-valuators.patch BuildRequires: systemtap-sdt-devel BuildRequires: git-core BuildRequires: automake autoconf libtool pkgconfig -BuildRequires: xorg-x11-util-macros >= 1.1.5 +BuildRequires: xorg-x11-util-macros >= 1.17 -BuildRequires: xorg-x11-proto-devel >= 7.6-20 +BuildRequires: xorg-x11-proto-devel >= 7.7-6 BuildRequires: xorg-x11-font-utils >= 7.2-11 -BuildRequires: xorg-x11-xtrans-devel >= 1.2.2-1 +BuildRequires: xorg-x11-xtrans-devel >= 1.2.7 BuildRequires: libXfont-devel libXau-devel libxkbfile-devel libXres-devel BuildRequires: libfontenc-devel libXtst-devel libXdmcp-devel BuildRequires: libX11-devel libXext-devel @@ -201,9 +199,9 @@ BuildRequires: libXi-devel libXpm-devel libXaw-devel libXfixes-devel BuildRequires: libXv-devel BuildRequires: wayland-devel pkgconfig(wayland-client) -BuildRequires: pixman-devel >= 0.21.8 -BuildRequires: libpciaccess-devel >= 0.12.901-1 openssl-devel byacc flex -BuildRequires: mesa-libGL-devel >= 7.6-0.6 +BuildRequires: pixman-devel >= 0.30.0 +BuildRequires: libpciaccess-devel >= 0.13.1 openssl-devel byacc flex +BuildRequires: mesa-libGL-devel >= 9.2 # XXX silly... BuildRequires: libdrm-devel >= 2.4.0 kernel-headers @@ -216,6 +214,9 @@ BuildRequires: libunwind-devel %endif %endif +BuildRequires: pkgconfig(xcb-aux) pkgconfig(xcb-image) pkgconfig(xcb-icccm) +BuildRequires: pkgconfig(xcb-keysyms) + # All server subpackages have a virtual provide for the name of the server # they deliver. The Xorg one is versioned, the others are intentionally # unversioned. @@ -226,7 +227,7 @@ X.Org X11 X server %package common Summary: Xorg server common files Group: User Interface/X -Requires: pixman >= 0.21.8 +Requires: pixman >= 0.30.0 Requires: xkeyboard-config xkbcomp %description common @@ -255,14 +256,6 @@ Provides: xserver-abi(extension-%{git_extension_major}) = %{git_extension_minor} # need to do something lockstep between now and upstream merge Provides: xserver-abi(xwayland) = 1 -# Dropped from F17, use evdev -Obsoletes: xorg-x11-drv-acecad <= 1.5.0-2.fc16 -Obsoletes: xorg-x11-drv-aiptek <= 1.4.1-2.fc16 -Obsoletes: xorg-x11-drv-elographics <= 1.3.0-2.fc16 -Obsoletes: xorg-x11-drv-fpit <= 1.4.0-2.fc16 -Obsoletes: xorg-x11-drv-hyperpen <= 1.4.1-2.fc16 -Obsoletes: xorg-x11-drv-mutouch <= 1.3.0-2.fc16 -Obsoletes: xorg-x11-drv-penmount <= 1.5.0-3.fc16 %if 0%{?fedora} > 17 # Dropped from F18, use a video card instead # in F17 updates-testing: 0.7.4-1.fc17 @@ -374,9 +367,11 @@ BuildArch: noarch Xserver source code needed to build VNC server (Xvnc) %prep -%setup -q -n %{pkgname}-%{?gitdate:%{gitdate}}%{!?gitdate:%{version}} +#setup -q -n %{pkgname}-%{?gitdate:%{gitdate}}%{!?gitdate:%{version}} +%setup -q -n %{pkgname}-%{version} -%if 0%{?gitdate} +#if 0%{?gitdate} +%if 0 git checkout -b fedora sed -i 's/git/&+ssh/' .git/config if [ -z "$GIT_COMMITTER_NAME" ]; then @@ -460,7 +455,6 @@ rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT moduledir=%{moduledir} %if %{with_hw_servers} -rm -f $RPM_BUILD_ROOT%{_libdir}/xorg/modules/libxf8_16bpp.so rm -rf $RPM_BUILD_ROOT%{_libdir}/xorg/modules/multimedia/ mkdir -p $RPM_BUILD_ROOT%{_libdir}/xorg/modules/{drivers,input} @@ -636,6 +630,12 @@ rm -rf $RPM_BUILD_ROOT %{xserver_source_dir} %changelog +* Fri Oct 25 2013 Adam Jackson 1.14.99.3-1 +- xserver 1.14.99.3 +- xwayland branch refresh +- Drop some F17-era Obsoletes +- Update BuildReqs to match reality + * Wed Oct 23 2013 Peter Hutterer 1.14.3-6 - Fix Xdmx cursor jumps (#1019821)