cURL / Mailing Lists / curl-library / Single Mail

curl-library

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

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sun, 2 Nov 2008 00:27:36 +0100 (CET)

On Fri, 31 Oct 2008, Dan Fandrich wrote:

> 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.

Yes. In fact, we have a define set in lib/config.h already named "OS" that we
can use (with a better name of course).

> 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

Right, this can already be done by someone who just runs configure twice and
rename curlbuild.h between them.

I've tried to come up with something, but I can't think of any good additional
tricks we can offer to make that easier.

-- 
  / daniel.haxx.se
Received on 2008-11-02