cURL / Mailing Lists / curl-library / Single Mail

curl-library

Solving the curlbuild.h problem (was Re: The TODO list)

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Fri, 31 Oct 2008 15:10:00 -0700

On Thu, Oct 30, 2008 at 08:24:41PM +0100, Yang Tse wrote:
> 2008/10/30, Dan Fandrich wrote:
> > [...], but there are potentially some
> > things that curl could do to make an adminstrator's job a bit easier
> > (such as adding the host type to curlbuild.h, to start).
>
> Which format would be appropriate? the libtool triplet for example?

That's the most logical one, IMHO.

> Could you elaborate a bit further on this idea? Providing a
> preprocessor symbol definition, only for configure capable builds,
> would probably be the easiest route for us. But it should certainly
> belong to the libcurl 'namesapce' CURL_SOMETHING.

I haven't given a lot of thought to a solution. Adding a comment in the
file like "This file is valid only for i686-pc-linux-gnu" is just easy to do
and would help someone trying to solve the problem on his own. I envision
some way to let people create two libcurl builds (e.g. 32 bit and 64 bit
builds) and install the two curlbuild.h files next to one another and
have the right one conditionally included at compile time. I'm not saying
that curl should be the one to do this, but if we can do something easy
to help administrators/packagers accomplish this, we should.

Actually, maybe nothing new is actually needed. Would it work for a
packager to manually rename one curlbuild.h file to curlbuild-x86_64.h
and the other to curlbuild-x86.h and create a curlbuild.h that looks like:

#ifdef __x86_64__
#include "curlbuild-x86_64.h"
#else
#include "curlbuild-x86.h"
#endif

As I said, I haven't thought this all the way through, but it's probably
worth thinking about how to make this better.

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
Received on 2008-10-31