patch 9.2.0504: configure: requires X11 libraries for GTK4 build
Commit:
https://github.com/vim/vim/commit/f7a58aee36d7fe17657b6eea6f30806050e0571d
Author: Yasuhiro Matsumoto <[email protected]>
Date: Wed May 20 18:01:52 2026 +0000
patch 9.2.0504: configure: requires X11 libraries for GTK4 build
Problem: configure: requires X11 libraries for GTK4 build
(after v9.2.0501)
Solution: Allow to build GTK4 even when no X11 libraries are present
(Yasuhiro Matsumoto)
GTK4 does not use X11 APIs directly; the X11 backend is loaded by
GTK4 at runtime. Skip the X11 dependency enforcement when the user
explicitly passes --enable-gui=gtk4 so the build can succeed on
systems without X11 development headers.
closes: #20265
Co-authored-by: Claude <[email protected]>
Signed-off-by: Yasuhiro Matsumoto <[email protected]>
Signed-off-by: Christian Brabandt <[email protected]>
diff --git a/src/auto/configure b/src/auto/configure
index ff4d5e361..69b1a39ef 100755
--- a/src/auto/configure
+++ b/src/auto/configure
@@ -5193,7 +5193,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam
\
CPPFLAGS="$CPPFLAGS -DMACOS_X_DARWIN"
- if test -z "$with_x" -a "X$enable_gui" != Xmotif -a
"X$enable_gui" != Xgtk2 -a "X$enable_gui" != Xgtk3; then
+ if test -z "$with_x" -a "X$enable_gui" != Xmotif -a
"X$enable_gui" != Xgtk2 -a "X$enable_gui" != Xgtk3 -a "X$enable_gui" != Xgtk4;
then
with_x=no
fi
fi
@@ -10469,7 +10469,7 @@ if test "x$with_x" = xno -a "x$with_x_arg" = xyes; then
as_fn_error $? "could not configure X" "$LINENO" 5
fi
-test "x$with_x" = xno -a "x$HAIKU" != "xyes" -a "x$MACOS_X" != "xyes" -a
"x$QNX" != "xyes" && enable_gui=no
+test "x$with_x" = xno -a "x$HAIKU" != "xyes" -a "x$MACOS_X" != "xyes" -a
"x$QNX" != "xyes" -a "x$enable_gui" != xgtk4 && enable_gui=no
{ printf "%s
" "$as_me:${as_lineno-$LINENO}: checking --enable-gui argument" >&5
printf %s "checking --enable-gui argument... " >&6; }
diff --git a/src/configure.ac b/src/configure.ac
index a808530d2..a49c6d26b 100644
--- a/src/configure.ac
+++ b/src/configure.ac
@@ -330,7 +330,7 @@ if test "$vim_cv_uname_output" = Darwin; then
dnl Assume we don't want X11 unless it was specifically asked for
dnl (--with-x) or Motif or GTK GUI is used.
- if test -z "$with_x" -a "X$enable_gui" != Xmotif -a "X$enable_gui" !=
Xgtk2 -a "X$enable_gui" != Xgtk3; then
+ if test -z "$with_x" -a "X$enable_gui" != Xmotif -a "X$enable_gui" !=
Xgtk2 -a "X$enable_gui" != Xgtk3 -a "X$enable_gui" != Xgtk4; then
with_x=no
fi
fi
@@ -2609,7 +2609,7 @@ if test "x$with_x" = xno -a "x$with_x_arg" = xyes; then
AC_MSG_ERROR([could not configure X])
fi
-test "x$with_x" = xno -a "x$HAIKU" != "xyes" -a "x$MACOS_X" != "xyes" -a
"x$QNX" != "xyes" && enable_gui=no
+test "x$with_x" = xno -a "x$HAIKU" != "xyes" -a "x$MACOS_X" != "xyes" -a
"x$QNX" != "xyes" -a "x$enable_gui" != xgtk4 && enable_gui=no
AC_MSG_CHECKING(--enable-gui argument)
AC_ARG_ENABLE(gui,
diff --git a/src/version.c b/src/version.c
index c98973831..e07f50f04 100644
--- a/src/version.c
+++ b/src/version.c
@@ -729,6 +729,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 504,
/**/
503,
/**/
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/vim_dev/E1wPlRi-00F608-5N%40256bit.org.