Add variable to override host for end users.
As clang is natively a cross compiler, relying on the compiler prefix as the sole heuristic to determine means anyone not using a prefixed compiler is unable to cross compile. For example, if using clang --sysroot=... --target=... the autoconf --host will not be set.
To work around this, there are only 3 ways I know of:
- Hope the library provides an override (e.g.
MP3LAME_SYS_OVERRIDE_HOST) - Patch the library.
- Create wrappers/symlinks for the compiler.
None of these options are particularly great. Hence, I propose a new variable: AUTOTOOLS_RS_OVERRIDE_HOST. Setting this variable will override the host config option to the user's choice, making it much easier to cross compile.
It is fairly ugly, ctarget-wrappers for clang should get more common and in general reduce the amount of boilerplate arguments.
If you want to try doing that please make it prefixed with the package name and use the generic env var as fallback.