autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AC_C_BIGENDIAN vs. Darwin


From: Lars J. Aas
Subject: Re: AC_C_BIGENDIAN vs. Darwin
Date: Mon, 25 Jun 2001 10:27:27 +0200
User-agent: Mutt/1.2.5i

On Sun, Jun 24, 2001 at 01:51:27PM -0700, Matt Watson wrote:
: (This issue caused OpenSSH to fail to configure properly on Darwin, so 
: it's not just a contrived example...)
: 
: Darwin's (g)cc driver has the ability to build for multiple 
: architectures simultaneously:
: 
: cc -arch i386 -arch ppc foo.c
: 
: This will invoke the compiler once for each architecture and create a 
: "fat" binary with both i386 and ppc sections.

This can't be achieved with Autoconf that easily.  Can you detect which
mode the compiler is in with a preprocessor define?  If you can, you will
have to make conditional sections in config.h based on that define.
If not, you would probably have to code around the problem with arithmetics,
byte-for-byte access, and the htonl/ntohl function family.  (the htonl
declaration may BTW contain clues on how you can find out this at compile-
time).

  Lars J



reply via email to

[Prev in Thread] Current Thread [Next in Thread]