[vim/vim] --enable-gui=gtk4 doesn't enable X11 feature despite --with-x (Issue #21072)

Bagas Sanjaya (Vim Github Repository) <[email protected]>
Newsgroups gmane.editors.vim.devel
Message-ID <vim/vim/issues/[email protected]>
bagasme created an issue (vim/vim#21072)

### Steps to reproduce

* Configure vim with gtk4 GUI:

```
$ ./configure --prefix=${HOME}/.local/vim --with-features=huge \
  --enable-gpm --enable-acl --with-x=yes --enable-gui=gtk4 \
  --enable-multibyte --enable-cscope --enable-netbeans \
  --enable-perlinterp=dynamic --enable-python3interp=dynamic \
  --enable-tclinterp=dynamic --enable-canberra
```

### Expected behaviour

I'm compiling vim with gtk4 GUI (`--enable-gui=gtk4`). When I check `auto/config.log` output, I see that X11 is not enabled despite being configure with `--with-x=yes`:

```
...
configure:10474: checking --enable-gui argument
configure:10565: result: GTK 4.x GUI support
configure:10864: checking --disable-gtktest argument
configure:10876: result: gtk test enabled
configure:10902: checking for pkg-config gtk4
configure:10907: result: found
configure:10909: checking for GTK - version >= 4.10.0
configure:10921: result: yes; found version 4.22.4
...
```

Switching back to gtk3 (`--enable-gui=gtk3`), however, does enable X11:

```
...
configure:9187: checking --with-wayland argument
configure:9202: result: yes
configure:9214: checking for wayland
configure:9217: result: yes
configure:9253: checking for cairo
configure:9259: result: yes
configure:9274: checking for pango
configure:9280: result: yes
configure:9308: checking for xmkmf
configure:9347: result: no
configure:9353: checking for X
configure:9391: gcc -o conftest -g -O2  -Wl,-E -Wl,-rpath,/usr/lib/perl5/5.42/core_perl/CORE   -L/usr/local/lib conftest.c -lX11 -lnsl   >&5
configure:9391: $? = 0
configure:9581: result: libraries , headers 
configure:9687: gcc -o conftest -g -O2  -Wl,-E -Wl,-rpath,/usr/lib/perl5/5.42/core_perl/CORE   -L/usr/local/lib conftest.c -lnsl    -lX11 >&5
configure:9687: $? = 0
configure:9803: checking for gethostbyname
configure:9803: gcc -o conftest -g -O2  -Wl,-E -Wl,-rpath,/usr/lib/perl5/5.42/core_perl/CORE   -L/usr/local/lib conftest.c -lnsl   >&5
configure:9803: $? = 0
configure:9803: result: yes
configure:9917: checking for connect
configure:9917: gcc -o conftest -g -O2  -Wl,-E -Wl,-rpath,/usr/lib/perl5/5.42/core_perl/CORE   -L/usr/local/lib conftest.c -lnsl   >&5
configure:9917: $? = 0
configure:9917: result: yes
configure:9975: checking for remove
configure:9975: gcc -o conftest -g -O2  -Wl,-E -Wl,-rpath,/usr/lib/perl5/5.42/core_perl/CORE   -L/usr/local/lib conftest.c -lnsl   >&5
configure:9975: $? = 0
configure:9975: result: yes
configure:10033: checking for shmat
configure:10033: gcc -o conftest -g -O2  -Wl,-E -Wl,-rpath,/usr/lib/perl5/5.42/core_perl/CORE   -L/usr/local/lib conftest.c -lnsl   >&5
configure:10033: $? = 0
configure:10033: result: yes
configure:10100: checking for IceConnectionNumber in -lICE
configure:10129: gcc -o conftest -g -O2  -Wl,-E -Wl,-rpath,/usr/lib/perl5/5.42/core_perl/CORE   -L/usr/local/lib conftest.c -lICE  -lnsl   >&5
configure:10129: $? = 0
configure:10141: result: yes
configure:10183: checking if X11 header files can be found
configure:10199: gcc -c -g -O2    conftest.c >&5
configure:10199: $? = 0
configure:10201: result: yes
configure:10222: checking for _XdmcpAuthDoIt in -lXdmcp
configure:10251: gcc -o conftest -g -O2  -L -Wl,-E -Wl,-rpath,/usr/lib/perl5/5.42/core_perl/CORE   -L/usr/local/lib conftest.c -lXdmcp -lXt  -lSM -lICE -lX11  -lXdmcp -lnsl   >&5
configure:10251: $? = 0
configure:10263: result: yes
configure:10271: checking for IceOpenConnection in -lICE
configure:10300: gcc -o conftest -g -O2  -L -Wl,-E -Wl,-rpath,/usr/lib/perl5/5.42/core_perl/CORE   -L/usr/local/lib conftest.c -lICE  -lXdmcp -lnsl   >&5
configure:10300: $? = 0
configure:10312: result: yes
configure:10321: checking for XpmCreatePixmapFromData in -lXpm
configure:10350: gcc -o conftest -g -O2    -Wl,-E -Wl,-rpath,/usr/lib/perl5/5.42/core_perl/CORE   -L/usr/local/lib conftest.c -lXpm -lXt  -lSM -lICE -lXpm -lX11  -lXdmcp -lSM -lICE -lnsl   >&5
configure:10350: $? = 0
configure:10362: result: yes
configure:10370: checking if X11 header files implicitly declare return values
configure:10389: gcc -c -g -O2   -Werror  conftest.c >&5
configure:10389: $? = 0
configure:10391: result: no
configure:10429: checking size of wchar_t
configure:10435: gcc -o conftest -g -O2  -Wl,-E -Wl,-rpath,/usr/lib/perl5/5.42/core_perl/CORE   -L/usr/local/lib conftest.c -lnsl   >&5
configure:10435: $? = 0
configure:10435: ./conftest
configure:10435: $? = 0
configure:10452: result: 4
configure:10474: checking --enable-gui argument
configure:10562: result: GTK+ 3.x GUI support
configure:10681: checking --disable-gtktest argument
configure:10693: result: gtk test enabled
configure:10719: checking for pkg-config gtk+-3.0
configure:10724: result: found
configure:10726: checking for GTK - version >= 3.0.0
configure:10738: result: yes; found version 3.24.52
...
```

Full config.log:

* [for gtk3 build](https://github.com/user-attachments/files/31143812/gtk3.config.log.txt)
* [for gtk4 build](https://github.com/user-attachments/files/31143823/gtk4.config.log.txt)

### Version of Vim

9.2.958

### Environment

Operating system: Arch Linux

### Logs and stack traces

```shell
(see Expected Behaviour section)
```

-- 
Reply to this email directly or view it on GitHub:
https://github.com/vim/vim/issues/21072
You are receiving this because you are subscribed to this thread.

Message ID: <vim/vim/issues/[email protected]>

-- 
-- 
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/vim/vim/issues/21072%40github.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.