build: fix detection of NSS library on Debian
authorThomas Haller <thaller@redhat.com>
Thu, 18 Feb 2016 10:48:26 +0000 (11:48 +0100)
committerThomas Haller <thaller@redhat.com>
Thu, 18 Feb 2016 11:44:21 +0000 (12:44 +0100)
Debian added an epoch "2" to the version of NSS library. Fix configure
to account for that.

Related: https://launchpad.net/debian/sid/+source/nss

configure.ac

index c367eba..46f3314 100644 (file)
@@ -595,7 +595,11 @@ AC_ARG_WITH(crypto, AS_HELP_STRING([--with-crypto=nss|gnutls], [Cryptography lib
 with_nss=no
 with_gnutls=no
 if test x"$ac_crypto" = xnss; then
-  PKG_CHECK_MODULES(NSS, [nss >= 3.11])
+  PKG_CHECK_MODULES(NSS, [nss >= 3.11], [have_nss=yes], [have_nss=no])
+  if test "$have_nss" != yes; then
+    # workaround on Debian, where the NSS module bumped the epoch
+    PKG_CHECK_MODULES(NSS, [nss >= 2:3.11])
+  fi
 
   # Work around a pkg-config bug (fdo #29801) where exists != usable
   FOO=`$PKG_CONFIG --cflags --libs nss`