Disable cairo-xcb support by default

* INSTALL (--with-cairo-xcb): Document new option.
* configure.ac (USE_CAIRO_XCB): Implement new option.
This commit is contained in:
Po Lu 2023-05-26 08:41:31 +08:00
parent e5f42706ce
commit 9f5249d5c8
2 changed files with 15 additions and 8 deletions

View file

@ -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.

View 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"