To determine if its doing a cross-compile...
To determine if its doing a cross-compile, autoconf compiles a trivial test program and tries to run it. If it fails to run, then we must be cross compiling.
Wine on Debian at least installs a binfmt handler such that .exe files can be run “as-is”. So autoconf’s tests actually run successfully, and autoconf decides we’re not cross compiling.
You don’t notice this normally because the native tests it runs also succeed. If however you’re doing some autoconf hacks that try to force certain cross-compile setting outside of its normal detection, you think you have them all working when you don’t.
Then you try to deploy them to a system that doesn’t have wine installed, and all hell breaks loose.