[libdispatch-dev] autoconf HAVE macro conventions

Kevin Van Vechten kvv at apple.com
Fri Oct 30 14:44:30 PDT 2009

On Oct 30, 2009, at 1:15 PM, Paolo Bonzini wrote:

>> Mac OS X projects usually use the same set of source files for all of
>> the multiple machine architectures that the project is be built for.
>> This can cause problems when a configure-time check doesn't match the
>> target architecture. An example that has come up in the past is
>> configure-time detection of endianness. If configure was run on a
>> PowerPC machine, the generated config.h would indicate that the machine
>> was big-endian:
> AC_C_BIGENDIAN supports universal binaries.  You just have to run
> ./configure CC='gcc -arch i686 -arch ppc'
> (or anyway use the appropriate GCC flags).
> Are there any other cases?

Ronnie's example was representative of the reason why I'd like to move toward #if HAVE_FOO tests instead of #ifdef HAVE_FOO, but the reasons why we don't run configure during the build process are separate.


More information about the libdispatch-dev mailing list