Hello,
I've hopefully resolved the configuration problem Dan Fandrich faced. It seems
to be caused by the recent changes in OpenSSL checks, in particular by setting
and then restoring the PKG_CONFIG_LIBDIR environment variables.
The key problem is that pkg-config distinguishes among empty and unset. Thus
only restoring the value was not sufficient. And having the variable empty
instead of unset prevents pkg-config from finding nss properly.
Claes, now you see why I was in no hurry to implement the same for nss :-)
Attached is a patch which should fix it.
Additionally I spotted a few trailing spaces/tabs in that file. The second
patch addresses this flaw.
Could anybody review and/or comment?
Kamil
diff --git a/configure.ac b/configure.ac
index 23d820e..e4d6aa4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1278,7 +1278,11 @@ if test X"$OPT_SSL" != Xno; then
dnl we're done using pkg-config for openssl
PKG_CONFIG_LIBDIR="$SAVE_PKG_CONFIG_LIBDIR"
- export PKG_CONFIG_LIBDIR
+ if test -z "$PKG_CONFIG_LIBDIR"; then
+ unset PKG_CONFIG_LIBDIR
+ else
+ export PKG_CONFIG_LIBDIR
+ fi
dnl finally, set flags to use SSL
CPPFLAGS="$CPPFLAGS $SSL_CPPFLAGS"
diff --git a/configure.ac b/configure.ac
index e4d6aa4..7a18871 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1710,14 +1710,14 @@ if test "$OPENSSL_ENABLED" != "1" -a "$GNUTLS_ENABLED" != "1"; then
version="unknown"
fi
fi
- else
- # Without pkg-config, we'll kludge in some defaults
- addlib="-L$OPT_NSS/lib -lssl3 -lsmime3 -lnss3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl"
- addcflags="-I$OPT_NSS/include"
- version="unknown"
+ else
+ # Without pkg-config, we'll kludge in some defaults
+ addlib="-L$OPT_NSS/lib -lssl3 -lsmime3 -lnss3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl"
+ addcflags="-I$OPT_NSS/include"
+ version="unknown"
nssprefix=$OPT_NSS
fi
-
+
dnl Check for functionPK11_CreateGenericObject
dnl this is needed for using the PEM PKCS#11 module
AC_CHECK_LIB(nss3, PK11_CreateGenericObject,
@@ -1811,7 +1811,7 @@ if test X"$OPT_LIBSSH2" != Xno; then
version=`$PKGCONFIG --modversion libssh2`
DIR_SSH2=`echo $LD_SSH2 | $SED -e 's/-L//'`
fi
-
+
;;
off)
dnl no --with-libssh2 option given, just check default places
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html