]> git.eshelyaron.com Git - emacs.git/commitdiff
Disable cairo-xcb support by default
authorPo Lu <luangruo@yahoo.com>
Fri, 26 May 2023 00:41:31 +0000 (08:41 +0800)
committerPo Lu <luangruo@yahoo.com>
Fri, 26 May 2023 00:41:31 +0000 (08:41 +0800)
* INSTALL (--with-cairo-xcb): Document new option.
* configure.ac (USE_CAIRO_XCB): Implement new option.

INSTALL
configure.ac

diff --git a/INSTALL b/INSTALL
index 344ae39f464734b75c236682c658c5237ec04df2..2bb8df52dc9f56067834c527bbe0975c2227683c 100644 (file)
--- 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.
index 2c80d4cc9aab38b15f1083fcb252f07ec70b5f19..7ded5289d3174417141fb498f352e65bb917b448 100644 (file)
@@ -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"