I'm on macOS, cross-compiling for iOS. I have libgpg-error installed to a custom path, and I pass that prefix to --with-libgpg-error-prefix. This machine also happens to have a /usr/local/gpgrt-config (for the system). Awkwardly, the error message that I'm presented with tells me to use --with-libgpg-error-prefix... which I'm already passing ;P.
(FWIW, I believe this to be a new issue--maybe caused by --as I did not have this issue with revision 1a83df98b198902ee6d71549231a3af37088d452, but do have it with cf88dca069915fe5f2945380add43d62cef31d1e. I also would easily believe I'm just misunderstanding something about how I'm expected to set up this configuration.)
checking for gpg-error-config... /Users/runner/work/orchid/orchid/app-ios/out-ios/arm64/usr/bin/gpg-error-config
checking for gpgrt-config... /usr/local/bin/gpgrt-config
configure: Use gpgrt-config with /usr/local/lib as gpg-error-config
checking for GPG Error - version >= 1.27... yes (1.41)
*** The config script "/usr/local/bin/gpgrt-config --libdir=/usr/local/lib gpg-error" was
*** built for x86_64-apple-darwin19.6.0 and thus may not match the
*** used host aarch64-apple-darwin.
*** You may want to use the configure option --with-libgpg-error-prefix
*** to specify a matching config script or use $SYSROOT.