cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: [PATCH] Add supported_features and supported_protocol to pkg-config file

From: Michal Marek <mmarek_at_suse.cz>
Date: Tue, 02 Sep 2008 11:27:36 +0200

Keith Mok wrote:
> This patch add supported_features and supported_protocol variables to
> libcurl.pc.
> So application can use pkg-config ---variable=xxx to retrieve the
> supported feature of the installed package.
> Although there is a program curl-config to retrieve these settings, but
> when cross-compiling, curl-config often refer to the host machine
> configuration instead of the target machine.

I think that if it's in curl-config, it makes sense to have it in the
.pc file as well. We could also replace the ifs in curl-config with a
'for feature in @SUPPORT_FEATURES@; do echo $feature; done' statement to
make it simpler.

> --- configure.ac 26 Aug 2008 16:46:46 -0000 1.335
> +++ configure.ac 2 Sep 2008 08:42:27 -0000
...
> +if test "x$USE_SSLEAY" = "x1"; then
> + SUPPORT_FEATURES="$SUPPORT_FEATURES SSL "
> + NTLM=1 # OpenSSL implies NTLM

...
> +if test "x$USE_WINDOWS_SSPI" = "x1"; then
> + SUPPORT_FEATURES="$SUPPORT_FEATURES SSPI "
> + NTLM=1
> +fi
> +if test "x$NTLM" = "x1"; then

Make it
+ if test "x$USE_SSLEAY" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1"; then

Having a variable called NTLM is ok in curl-config, but in the longish
configure script it might be confusing, esp. when other variables are
called *_ENABLED or USE_*.

Btw the trailing space in "SUPPORT_FEATURES="$SUPPORT_FEATURES xxx " is
not necessary ;).

Michal
Received on 2008-09-02