On Fri Apr 17 17:34:07 2026 +0000, Matteo Bruni wrote:
Once the initialization of those pointers is keyed onto `SONAME_LIBXKBREGISTRY`, this has to as well, otherwise if the header is present but the library isn't (maybe because the 32-bit version isn't around) you'd get a bunch of unused static variable declarations. Probably an uncommon case, especially with the new wow64 becoming the standard, but it's a relatively sane setup. I think the nicest way of handling this is to check just `HAVE_XKBCOMMON_XKBREGISTRY_H` but undef it when there is no `SONAME_LIBXKBREGISTRY`. Or, actually, the other way around, making `SONAME_LIBXKBREGISTRY` only be defined if the header is present.
if test "x$have_x$with_wayland" != "xnono"
then
WINE_PACKAGE_FLAGS(XKBREGISTRY,[xkbregistry],,,,
[AC_CHECK_HEADER([xkbcommon/xkbregistry.h],
[WINE_CHECK_SONAME(xkbregistry,rxkb_context_new,[:],[XKBREGISTRY_LIBS=""],[$XKBREGISTRY_LIBS])])])
fi
Does that look alright to you? -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10550#note_136807