While reviewing some Gentoo multilib work, I stumbled upon the need to set LIBGCRYPT_CONFIG so that configure script would pick the correct libgcrypt-config when building (in libsecret here, but applies elsewhere as well).
Some search lead me to rC1e8b86494cf8: build: Support SYSROOT based config script finding. which changed from AC_PATH_TOOL, which would work fine in this context, to AC_PATH_PROG, which does not.
I understand this is related to SYSROOT support and I have no patch to offer at the moment, I just need a pointer for our teams so we can eventually provide a fix.