gdbus-codegen etc. not searched properly on Solaris
When trying to build Xfce 4.20pre1 on Solaris 11.4, configuring xfconf-4.19.4
failed:
checking for gdbus-codegen... configure: error: could not find gdbus-codegen. You can run:
./configure GDBUS_CODEGEN=/path/to/gdbus-codegen
to provide a custom location for it.
It turns out that unlike on Ubuntu 20.04, Solaris pkg-config --variable=gdbus_codegen gio-2.0
returns just the file name (gdbus-codegen
), not the path name (/usr/bin/gdbus-codegen
) as on Ubuntu.
This is a regression from 4.18 where this worked just fine.
As a workaround, I configured with GDBUS_CODEGEN=/usr/bin/gdbus-codegen
to avoid this.
Unfortunately, there are three more instances of the same issue: glib-compile-resources
, glib-genmarshal
, and glib-mkenums
.
Looking closer, I found the following: in xfconf-4.18.0
, configure.ac
uses AC_PATH_PROG([GDBUS_CODEGEN], [gdbus-codegen], [no])
to locate the tool, so there's no issue.
OTOH, in 4.20pre1 the detection has switched to use the new XDT_CHECK_PACKAGE_BINARY
macro. It's comment in xfce4-dev-tools-4.19.4 m4macros/xdt-depends.m4
says
dnl Finds a program by looking for a variable named pkgvarname in the
dnl pkg-config file for package. If found, varname (both a shell variable and
dnl automake substitution) is set to the name of the binary (and possibly full
dnl path, if that is how it is specified in the pkg-config file). If not found,
dnl or not present and executable, configure will exit with an error.
Obviously, the comment expects the file name form from pkg-config
, while the code does not. It seems appropriate to allow for both variants.