On 6/8/05, Ronald Oussoren <[EMAIL PROTECTED]> wrote: > It should be possible to split the configure script into two parts: > one that tests cpu features (sizeof(int), byte order, ...) and one > that tests API features (do we have sockets, ...). The cpu-features > part can be converted to something that uses feature macros instead > of detection, e.g. > > #if defined __i386__ > #define LITTLE_ENDIAN > ... > #elif defined __ppc__ > #define BIG_ENDIAN > ... > #elif ... > ...
It looks like Apple has anticipated you here <http://developer.apple.com/documentation/MacOSX/Conceptual/universal_binary/universal_binary_compiling/chapter_2_section_6.html>: "If you are compiling a project that uses autoconf and trying to build it for both the PowerPC and x86 architectures, you need to make sure that when the project configures itself, it doesn't use autoconf macros to determine the endian type of the runtime system. For example, if your project uses the autoconf AC_C_BIGENDIAN macro, the program won't work correctly when it is run on the opposite architecture from the one you are targeting when you configure the project. To correctly build for both PowerPC and x86 architectures, use the compiler-defined __BIG_ENDIAN__ and __LITTLE_ENDIAN__ macros in your code." Apparently these symbols are already defined for you by gcc. (I'm still trying to find exactly where it says so in the Apple documentation.) -- Russell Finn _______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig