Eric Blake wrote: > According to Paolo Bonzini on 11/2/2008 1:27 AM: >> By a completely different approach, would it make sense to switch from >> cat to AS_ECHO in order to build the conftest.c files? That would save >> forks for *all* tests... > > That would mean tracking the contents of confdefs.h as a shell variable > rather than a separate file. But yes, it might be possible.
Now I see why I was confused. The reason is that AC_LANG_SOURCE does cat > conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h - <<_ACEOF >>conftest.$ac_ext /* end confdefs.h. */ $1 _ACEOF but the source is split across lang.m4 and c.m4 Why couldn't AC_LANG_CONFTEST do per-language dispatching, so that we can put "/* confdefs.h */" at the beginning of confdefs.h and do cat confdefs.h - <<_ACEOF >>conftest.$ac_ext /* end confdefs.h. */ $1 _ACEOF Again, that would save a fork for *all* tests (not two as with AS_ECHO, but much easier to do and less error-prone). Paolo
