summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2025-03-12 17:28:27 +0800
committerPo Lu <luangruo@yahoo.com>2025-03-12 17:28:37 +0800
commit26f5e6339be08d6a1c8831d87779788d93eeda9b (patch)
tree33f2079455dd2777c38fb72b739ffe107c0e51a2 /configure.ac
parenta5f2d6279e0793aa0f8ba1939273866b6464b7e7 (diff)
Don't warn about Xft >= 2.3.6
* configure.ac: Don't warn about Xft >= 2.3.6. Clarify warning message printed on old releases.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac26
1 files changed, 20 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index 253276d8de5..4a7f326ab2b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4486,6 +4486,7 @@ fi
### End of font-backend (under any platform) section.
### Start of font-backend (under X11) section.
+is_xft_version_outdated=no
if test "${HAVE_X11}" = "yes"; then
if test $HAVE_CAIRO = yes; then
dnl Strict linkers fail with
@@ -4534,7 +4535,20 @@ if test "${HAVE_X11}" = "yes"; then
if test "${HAVE_XFT}" = "yes"; then
AC_DEFINE([HAVE_XFT], [1], [Define to 1 if you have the Xft library.])
- AC_SUBST([XFT_LIBS])
+ AC_SUBST([XFT_LIBS])
+ AC_CACHE_CHECK([whether libXft is not recent enough to support color fonts],
+ [emacs_cv_is_xft_version_outdated],
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+ [[
+ #include <X11/Xlib.h>
+ #include <X11/Xft/Xft.h>
+ #if XftVersion < 20306
+ #error "Xft < 2.3.6"
+ #endif /* XftVersion < 20306 */
+ ]], [])],
+ [emacs_cv_is_xft_version_outdated=no],
+ [emacs_cv_is_xft_version_outdated=yes])])
+ is_xft_version_outdated=$emacs_cv_is_xft_version_outdated
C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
fi # "${HAVE_XFT}" = "yes"
CPPFLAGS=$OLD_CPPFLAGS
@@ -7863,11 +7877,11 @@ you can continue to support by using '$0 --with-pop'.])
esac
fi
-if test "${HAVE_XFT}" = yes; then
- AC_MSG_WARN([This configuration uses libXft, which has a number of
- font rendering issues in its earlier releases. Please consider
- using Cairo graphics instead (they are auto-detected if the
- relevant development headers are installed).])
+if test "${HAVE_XFT}" = yes && test "$is_xft_version_outdated" = "yes"; then
+ AC_MSG_WARN([This configuration uses a version of libXft earlier than 2.3.6,
+ which is impacted by a number of rendering issues up to and including
+ crashes. Please consider using Cairo graphics instead (they are
+ auto-detected if the relevant development headers are installed).])
fi
if test "${HAVE_CAIRO}" = "yes" && test "${HAVE_HARFBUZZ}" = no; then