A project being built entirely statically will call pkg-config with
--static, which utilises the Libs.private field. Conversely it will
not use --static when not being built entirely statically, even if
there is only a static build of libcurl available. This will most
likely cause the build to fail due to underlinking unless we merge the
Libs fields.
Consider that this is what the Meson build system does when it
generates pkg-config files.
I have also reflected this in the --libs argument of curl-config even
though REQUIRE_LIB_DEPS always seems to be "yes" anyway.
Closes#5373
Otherwise it expands to:
echo ""/etc/pki/tls/certs/ca-bundle.crt""
Detected by ShellCheck:
curl-config:74:16: warning: The double quotes around this do
nothing. Remove or escape them. [SC2140]
In line with the manpage, curl-config --libs should only provide the necessary
library flags for the linker in order to compile software with libcurl. Also
with this change, we match what the pkg-config file provides.
curl-config --version didn't output the correct version string (bug
introduced in commit 0355e33b5f), and unfortunately the test
case 1022 that was supposed to check for this was broken.
This change fixes the test to detect this problem and it fixes the
output.
Bug: http://curl.haxx.se/bug/view.cgi?id=3288727
The curl-config now features a --built-shared command line option that
will output 'yes' or 'no' depending if the build process was asked to
build shared library/libraries or not.
It is primarily made to offer more details to the test suite to know
what kind of stunts it can expect to work.
file for libcurl, and while doing that fix he unified with curl-config.in
how the supported protocols and features are extracted and used, so both those
tools should now always be synced.
(it already before skipped /usr/lib). /usr/lib64 is the default library
directory on many 64bit systems and it's unlikely that anyone would use the
path privately on systems where it's not.
Here's a stab at a consolidation of the SSL detection heuristics into
configure. Source files aren't changed by this patch, except for setup.h and
the various config*.h files. Within the configure script, OPENSSL_ENABLED is
used to determine if SSL is being used or not, and outside configure,
USE_SSLEAY means the same thing; this could be even further unified some day.
Now, when SSL is not detected, configure skips the various checks that are
dependent on SSL, speeding up the configure process and avoiding complications
with cross compiles. I also updated all the architecture- specific config
files I could see, but I couldn't test them.
to compile libcurl stuff without any prior knowledge:
cc=`curl-config --cc`
cflags=`curl-config --cflags`
libs=`curl-config --libs`
$cc $flags $libs -o example example.c
Or if you prefer, the oh-so-cool single-line version:
`curl-config --cc --cflags --libs` -o example example.c