On Wed, Mar 16, 2016 at 9:51 PM, Stelian Ionescu sionescu@cddr.org wrote:
We really really are at the point where we need to have a configure-style script run before anything and detect CPU/OS features.
What's your proposal in this case? Try and compile a single program that prints FFI_UNIX64 and if it fails to compile assume the constant is not defined? Is that how configure does it? Did you mean something else?
Yes, that's how autotools deals with that case: each test gets generated to a separate file and then compiled. That's the reason why people find autoconf-generated configure scripts to be slow: they invoke the compiler for almost every single test, but it's also what makes it robust.