Received: from mailgate011.isp.belgacom.be (mailgate011.isp.belgacom.be [195.238.6.4])
	by maildelivery013.isp.belgacom.be (Postfix) with ESMTP id 82FCE120002
	for <joris.at.lebbeke@skynet.be>; Tue, 23 Oct 2007 22:08:29 +0200 (CEST)
Received: from r153.dmsolutions.ca (HELO duke.maptools.org) ([209.217.116.153])
  by in.mx.skynet.be with ESMTP; 23 Oct 2007 22:08:28 +0200
Received: from duke.maptools.org (duke.maptools.org [127.0.0.1])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id l9NJvEA9030415;
	Tue, 23 Oct 2007 15:57:36 -0400
Received: from toronto2.smartgames.ca (toronto2.smartgames.ca [204.15.192.18])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id l9NJufPu030384
	for <tiff@lists.maptools.org>; Tue, 23 Oct 2007 15:56:42 -0400
Received: from [10.143.176.18] (unknown [10.143.176.18])
	by toronto2.smartgames.ca (Postfix) with ESMTP id E1E2F1EF;
	Tue, 23 Oct 2007 15:59:13 -0400 (EDT)
In-Reply-To: <20071023191750.GA23485@ak4719.spb.edu>
References: <Pine.LNX.4.61.0710231032460.7209@sirius.rasena>
	<20071023155004.GA22207@ak4719.spb.edu>
	<Pine.SOC.4.64.0710231057350.1894@freddy>
	<20071023191750.GA23485@ak4719.spb.edu>
Mime-Version: 1.0 (Apple Message framework v752.2)
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
Message-Id: <CC9B8F86-954D-4D38-AAE9-80B4AE8ADA6F@smartgames.ca>
Content-Transfer-Encoding: 7bit
From: Toby Thain <toby@smartgames.ca>
Subject: Re: [Tiff] universal build patch
Date: Tue, 23 Oct 2007 17:56:32 -0300
To: Andrey Kiselev <dron@ak4719.spb.edu>
X-Mailer: Apple Mail (2.752.2)
Cc: tiff@lists.maptools.org
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.4
Precedence: list
List-Id: TIFF and libtiff discussion <tiff.lists.maptools.org>
List-Unsubscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=unsubscribe>
List-Archive: <http://lists.maptools.org/mailman/private/tiff>
List-Post: <mailto:tiff@lists.maptools.org>
List-Help: <mailto:tiff-request@lists.maptools.org?subject=help>
List-Subscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=subscribe>
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org
X-UIDL: 000000000023ceae.00002886
X-MSP-STORE: Tue, 23 Oct 2007 22:08:29 +0200
Status:   


On 23-Oct-07, at 4:17 PM, Andrey Kiselev wrote:

> On Tue, Oct 23, 2007 at 11:12:33AM -0500, Bob Friesenhahn wrote:
>>> We can easily switch to this method instead of autoconf macro. I am
>>> only concerning about portability of this approach.
>>
>> It is 100% portable as long as you stick to using Apple's modified  
>> GCC
>> 4.X and OS X.  Other targets are of no consequence.  :-)
>>
>> Solaris defines _LITTLE_ENDIAN or _BIG_ENDIAN by including
>> <sys/types.h>
> ...
>> My feeling is that it the only completely correct approach is to
>> configure/build on each native target since otherwise some decisions
>> made may be wrong.

Whether this is true  can be deduced from the set of parameters  
determined at configure-time.

>> Perhaps 32-bit OS X has managed to constrain PPC
>> and Intel differences to only endian order but this is the exception
>> rather than the rule.  With Mac OS X Leopard (Arriving October 26)
>> perhaps the rules will change (the rules for Apple always change).
>
> I am sure that AC_C_BIGENDIAN macro can deduce the target byte order
> using some heuristics (that macro works in case of cross-compilation).

For separate configures, everything already works, of course.

The hitherto unsolved problem is building universally from a single  
configure, which is sometimes necessary. The runtime patch seems a  
clever solution?

--Toby


> So it can be adopted for OS X case too. The only problem for me is  
> that
> I do not have a proper environment to develop and test such a  
> macro. It
> shouldn't be too complicated. So my preference is to modify a test
> rather than libarary itself. I don't see any serious reason to replace
> the compile time switch.
>
> Best regards,
> Andrey
>
>
> -- 
> Andrey V. Kiselev
> ICQ# 26871517
> _______________________________________________
> Tiff mailing list: Tiff@lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/tiff
> http://www.remotesensing.org/libtiff/

_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
