autoconf
[Top][All Lists]
Advanced

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

Re: determining 32 v. 64 bit compilatio


From: Bob Friesenhahn
Subject: Re: determining 32 v. 64 bit compilatio
Date: Tue, 29 Jun 2010 16:50:25 -0500 (CDT)
User-agent: Alpine 2.01 (GSO 1266 2009-07-14)

On Tue, 29 Jun 2010, Russ Allbery wrote:
I suspect that you're dealing with "all the world is Linux" code, and
therefore doing something like:

AC_CHECK_SIZEOF([long])
AS_IF([test "$ac_cv_sizeof_long" -eq 8],
   [AC_DEFINE([OSBIT], 64, [Define to the size of a long in bits.])],
   [AC_DEFINE([OSBIT], 32, [Define to the size of a long in bits.])])

would do what you want, but you won't find something exactly like that
built into Autoconf since it's not generally a meaningful thing to do on a
broader variety of platforms.

More specifically, this test would not be very useful for Microsoft Windows where the 'long' type is 32-bit in a 64-bit application.

There are also OSs which support various optional application models with various sizes for 'long' and pointers.

Bob
--
Bob Friesenhahn
address@hidden, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/



reply via email to

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