emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-29 9f5249d5c8d 1/2: Disable cairo-xcb support by default


From: Po Lu
Subject: emacs-29 9f5249d5c8d 1/2: Disable cairo-xcb support by default
Date: Thu, 25 May 2023 20:43:46 -0400 (EDT)

branch: emacs-29
commit 9f5249d5c8d193fc59d09b9003d26d1ed0884f2c
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Disable cairo-xcb support by default
    
    * INSTALL (--with-cairo-xcb): Document new option.
    * configure.ac (USE_CAIRO_XCB): Implement new option.
---
 INSTALL      |  6 ++++++
 configure.ac | 17 +++++++++--------
 2 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/INSTALL b/INSTALL
index 344ae39f464..2bb8df52dc9 100644
--- a/INSTALL
+++ b/INSTALL
@@ -394,6 +394,12 @@ typical 32-bit host, Emacs integers have 62 bits instead 
of 30.
 
 Use --with-cairo to compile Emacs with Cairo drawing.
 
+Use --with-cairo-xcb to also utilize the Cairo XCB backend on systems
+where it is available.  While such a configuration is moderately
+faster when running over X connections with high latency, it is likely
+to crash when a new frame is created on a display connection opened
+after a display connection is closed.
+
 Use --with-modules to build Emacs with support for dynamic modules.
 This needs a C compiler that supports '__attribute__ ((cleanup (...)))',
 as in GCC 3.4 and later.
diff --git a/configure.ac b/configure.ac
index 2c80d4cc9aa..7ded5289d31 100644
--- a/configure.ac
+++ b/configure.ac
@@ -459,6 +459,7 @@ OPTION_DEFAULT_ON([sqlite3],[don't compile with sqlite3 
support])
 OPTION_DEFAULT_ON([lcms2],[don't compile with Little CMS support])
 OPTION_DEFAULT_ON([libsystemd],[don't compile with libsystemd support])
 OPTION_DEFAULT_ON([cairo],[don't compile with Cairo drawing])
+OPTION_DEFAULT_OFF([cairo-xcb], [use XCB surfaces for Cairo support])
 OPTION_DEFAULT_ON([xml2],[don't compile with XML parsing support])
 OPTION_DEFAULT_OFF([imagemagick],[compile with ImageMagick image support])
 OPTION_DEFAULT_ON([native-image-api], [don't use native image APIs (GDI+ on 
Windows)])
@@ -3607,14 +3608,14 @@ if test "${HAVE_X11}" = "yes"; then
     CAIRO_MODULE="cairo >= $CAIRO_REQUIRED"
     EMACS_CHECK_MODULES([CAIRO], [$CAIRO_MODULE])
     if test $HAVE_CAIRO = yes; then
-      CAIRO_XCB_MODULE="cairo-xcb >= $CAIRO_REQUIRED"
-      EMACS_CHECK_MODULES([CAIRO_XCB], [$CAIRO_XCB_MODULE])
-      if test $HAVE_CAIRO_XCB = yes; then
-       CAIRO_CFLAGS="$CAIRO_CFLAGS $CAIRO_XCB_CFLAGS"
-       CAIRO_LIBS="$CAIRO_LIBS $CAIRO_XCB_LIBS"
-       AC_DEFINE([USE_CAIRO_XCB], [1],
-         [Define to 1 if cairo XCB surfaces are available.])
-      fi
+      AS_IF([test "x$with_cairo_xcb" = "xyes"], [
+       CAIRO_XCB_MODULE="cairo-xcb >= $CAIRO_REQUIRED"
+       EMACS_CHECK_MODULES([CAIRO_XCB], [$CAIRO_XCB_MODULE])
+       AS_IF([test "x$HAVE_CAIRO_XCB" = "xyes"], [
+         CAIRO_CFLAGS="$CAIRO_CFLAGS $CAIRO_XCB_CFLAGS"
+         CAIRO_LIBS="$CAIRO_LIBS $CAIRO_XCB_LIBS"
+         AC_DEFINE([USE_CAIRO_XCB], [1],
+           [Define to 1 if cairo XCB surfaces are available.])])])
       AC_DEFINE([USE_CAIRO], [1], [Define to 1 if using cairo.])
       CFLAGS="$CFLAGS $CAIRO_CFLAGS"
       LIBS="$LIBS $CAIRO_LIBS"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]