cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: [PATCH v3] OpenSSL vs. NSS clash on PKG_CONFIG_LIBDIR

From: Yang Tse <yangsita_at_gmail.com>
Date: Wed, 13 Jan 2010 17:04:35 +0100

2010/1/13, Kamil Dudka wrote:

> let's go for the next iteration...

Here we go, relative to ac-openssl-nss-v3.patch...

> +AC_DEFUN([CURL_EXPORT_PCDIR], [
> + if test -n "$1"; then
> + PKG_CONFIG_LIBDIR="$1"
> + export PKG_CONFIG_LIBDIR
> + fi
> +])
>
> [...]
>
> + SSL_LIBS=`CURL_EXPORT_PCDIR([$OPENSSL_PCDIR]) \
> + $PKGCONFIG --libs-only-l openssl 2>/dev/null`
> +
> + SSL_LDFLAGS=`CURL_EXPORT_PCDIR([$OPENSSL_PCDIR]) \
> + $PKGCONFIG --libs-only-L openssl 2>/dev/null`
> +
> + SSL_CPPFLAGS=`CURL_EXPORT_PCDIR([$OPENSSL_PCDIR]) \
> + $PKGCONFIG --cflags-only-I openssl 2>/dev/null`

Good idea there. But you'll need to tweak it a bit with 'dnl's or
something, most surely some extra linefeeds are been placed in the
generated script after the initial backtick and around the backslash.
Look at what is placed in the generated configure script and you'll
see what I mean.

Now relative to the changes in CURL_CHECK_PKGCONFIG...

If the optional second argument is given, shell variable
PKG_CONFIG_LIBDIR is still polluted. To avoid this, probably, the
second argument could be used via CURL_EXPORT_PCDIR when calling
$PKGCONFIG. Current call to $PKGCONFIG would need to be backticked to
do this and slightly adjusted. The following will give you the idea...

itexists=`CURL_EXPORT_PCDIR([$2]) \
  $PKGCONFIG --exists $1 2>/dev/null && echo 1`
if test -n "$itexists"; then
   echo "It exists"
fi

HTH

-- 
-=[Yang]=-
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2010-01-13