cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: curl-config

From: Todd Fisher <taf2_at_lehigh.edu>
Date: Tue, 24 Aug 2004 16:10:57 -0700

Daniel Stenberg wrote:

> On Tue, 24 Aug 2004, Todd Fisher wrote:
>
>> Attached, is a patch for curl-config. It detects via CC if the msvc
>> compilier is being used and returns linker flags that would be
>> appropriate for the msvc compilier.
>
>
> This puzzles me a lot (still):
>
> When is this useful?

The idea is very useful for people that use Makefiles, specifically with
GNU Make, cygwin makes this possible in win32
hence the ability to use cl with a gnu makefile. Mozilla does this for
example.

>
> curl-config is generated when configure is run (based on the template
> curl-config.in and results that the script figures out) and thus you
> must not patch curl-config itself, patches should be made on the .in
> file.

I didn't realize that. When I originally made this posting it was based
on the changes I had made to pkg-config; which checks for .pc files in
an installed PKG_CONFIG_PATH. What I did was make pkg-config check CC
in the environment for the type of compiler and return the correct flags
accordingly. I can see that since curl-config is generated by running
the configure script this type of logic would not be needed in the
curl-config script. However, that limits the compiled libraries to only
being used by the said compiler. However, if curl-config checked the
environment and returned the correct flags for either gcc or cl then
this could be more flexible. Since, I can generate .lib's and .a's for
both compilers why not have a single curl-config that works with both
too. I agree with your point that most windows people don't use the
command line, but does that really mean
it should just be ignored entirely? Perhaps, just adding support in
libcurl for a libcurl.pc file would solve this issue for me.

-todd
Received on 2004-08-25