curl-library
Re: [ curl-Bugs-1812600 ] curl-config --libs doesn't show required libraries
Date: Mon, 22 Oct 2007 14:19:31 -0700
This bug was raised about the output of curl-config --libs not showing
all the libraries needed by libcurl. curl-config isn't actually broken--
it was changed a few releases ago to return only -lcurl when it knows
that's sufficient on the system on which it is running and it's using
shared libraries. There's no point in adding unneeded dependencies to
an app, after all.
But when both shared and static libraries are built and the user wants to
link against libcurl statically, this won't work; all libcurl's dependencies
have to be listed. Recent versions of pkg-config allow the --static option
to handle this situation, but curl-config doesn't have an equivalent option.
Also, I've seen some apps that use curl-config --libs to configure themselves
somehow at compile time--maybe to see which SSL library is in use (I
think PHP/CURL does this).
I propose adding a --static-libs option to curl-config to allow static
linking an app. The output in that case would be something like:
/usr/lib/libcurl.a -lidn -lssl -lcrypto -ldl -lz
which would link against libcurl statically and leave everything else up
to the linker (usually dynamically). Any thoughts?
>>> Dan
-- http://www.MoveAnnouncer.com The web change of address service Let webmasters know that your web site has movedReceived on 2007-10-22